updates to install procedures
This commit is contained in:
79
INSTALL.md
79
INSTALL.md
@@ -331,45 +331,38 @@ obsidian-rag index
|
|||||||
|
|
||||||
## 8. Register the Plugin with OpenClaw
|
## 8. Register the Plugin with OpenClaw
|
||||||
|
|
||||||
OpenClaw auto-discovers plugins by reading the `openclaw.plugin.json` manifest in the project root and loading `dist/index.js`.
|
OpenClaw discovers plugins from these locations:
|
||||||
|
- `~/.openclaw/extensions/` (global, recommended for most users)
|
||||||
|
- `<workspace>/.openclaw/extensions/` (workspace-specific)
|
||||||
|
- Bundled plugins in OpenClaw's install directory
|
||||||
|
|
||||||
### 8.1 Register via OpenClaw's Plugin Manager
|
### 8.1 Link Plugin to Global Extensions (Recommended)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# OpenClaw CLI — register the local plugin
|
mkdir -p ~/.openclaw/extensions
|
||||||
openclaw plugin add "$DESTINATION"
|
ln -s "$DESTINATION" ~/.openclaw/extensions/obsidian-rag
|
||||||
# or, if OpenClaw has a specific register command:
|
|
||||||
openclaw plugins register --path "$DESTINATION/dist/index.js" --name obsidian-rag
|
|
||||||
```
|
```
|
||||||
|
|
||||||
> **Note:** The exact command depends on your OpenClaw version. Check `openclaw --help` or `openclaw plugin --help` for the correct syntax. The plugin manifest (`openclaw.plugin.json`) in this project already declares all four tools.
|
### 8.2 Link Plugin to Workspace Extensions (Alternative)
|
||||||
|
|
||||||
### 8.2 Alternative — Register by Path in OpenClaw Config
|
|
||||||
|
|
||||||
If your OpenClaw installation uses a config file (e.g., `~/.openclaw/config.json` or `~/.openclaw/plugins.json`), add this project's built bundle:
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"plugins": [
|
|
||||||
{
|
|
||||||
"name": "obsidian-rag",
|
|
||||||
"path": "/full/path/to/obsidian-rag/dist/index.js"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
### 8.3 Confirm the Plugin Loaded
|
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
openclaw plugins list
|
# From your OpenClaw workspace root
|
||||||
# → obsidian-rag 0.1.0 (loaded)
|
mkdir -p ./.openclaw/extensions
|
||||||
|
ln -s "$DESTINATION" ./.openclaw/extensions/obsidian-rag
|
||||||
```
|
```
|
||||||
|
|
||||||
Or, if OpenClaw has a status command:
|
### 8.3 Using openclaw plugins install --link
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
openclaw status
|
openclaw plugins install --link "$DESTINATION"
|
||||||
# → Plugin: obsidian-rag ✓ loaded
|
```
|
||||||
|
|
||||||
|
### 8.4 Confirm the Plugin Loaded
|
||||||
|
|
||||||
|
```bash
|
||||||
|
openclaw plugins list | grep obsidian-rag
|
||||||
|
# or
|
||||||
|
openclaw plugins list --verbose | grep obsidian-rag
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -589,10 +582,27 @@ Use an absolute path with proper escaping:
|
|||||||
|
|
||||||
### Plugin not appearing in `openclaw plugins list`
|
### Plugin not appearing in `openclaw plugins list`
|
||||||
|
|
||||||
1. Confirm `dist/index.js` exists (`ls -la dist/`)
|
1. Confirm `dist/index.js` exists:
|
||||||
2. Check that `openclaw.plugin.json` is valid JSON
|
```bash
|
||||||
3. Try re-registering: `openclaw plugin add "$DESTINATION"`
|
ls -la ~/.openclaw/extensions/obsidian-rag/dist/
|
||||||
4. Check OpenClaw's plugin discovery path — it may need to be in a specific directory like `~/.openclaw/plugins/`
|
```
|
||||||
|
2. Confirm `openclaw.plugin.json` exists:
|
||||||
|
```bash
|
||||||
|
ls ~/.openclaw/extensions/obsidian-rag/openclaw.plugin.json
|
||||||
|
```
|
||||||
|
3. Check that the symlink is valid (not broken):
|
||||||
|
```bash
|
||||||
|
ls -la ~/.openclaw/extensions/obsidian-rag
|
||||||
|
# Should point to your DESTINATION, not show as "red" (broken)
|
||||||
|
```
|
||||||
|
4. Verify the manifest has `configSchema` (required since v0.1.1):
|
||||||
|
```bash
|
||||||
|
grep configSchema ~/.openclaw/extensions/obsidian-rag/openclaw.plugin.json
|
||||||
|
```
|
||||||
|
5. Try bypassing discovery cache:
|
||||||
|
```bash
|
||||||
|
OPENCLAW_DISABLE_PLUGIN_DISCOVERY_CACHE=1 openclaw plugins list
|
||||||
|
```
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -623,7 +633,8 @@ npm run build
|
|||||||
obsidian-rag index
|
obsidian-rag index
|
||||||
|
|
||||||
# 7. Register with OpenClaw
|
# 7. Register with OpenClaw
|
||||||
openclaw plugin add ~/dev/obsidian-rag
|
mkdir -p ~/.openclaw/extensions
|
||||||
|
ln -s ~/dev/obsidian-rag ~/.openclaw/extensions/obsidian-rag
|
||||||
|
|
||||||
# 8. Verify
|
# 8. Verify
|
||||||
obsidian-rag status
|
obsidian-rag status
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ The system is structured in four protocol layers, each with its own contract:
|
|||||||
|
|
||||||
The plugin follows OpenClaw's standard plugin lifecycle:
|
The plugin follows OpenClaw's standard plugin lifecycle:
|
||||||
|
|
||||||
1. **INSTALL** — `openclaw plugins install clawhub:obsidian-rag` downloads the plugin and reads `openclaw.plugin.json`
|
1. **INSTALL** — Link plugin to `~/.openclaw/extensions/obsidian-rag` or `<workspace>/.openclaw/extensions/obsidian-rag`. OpenClaw reads `openclaw.plugin.json` on discovery.
|
||||||
2. **REGISTER** — Plugin registers 4 tools with OpenClaw's Tool Registry: `obsidian_rag_search`, `obsidian_rag_index`, `obsidian_rag_status`, `obsidian_rag_memory_store`. Each tool declares: name, description, parameterSchema, requiredPermissions.
|
2. **REGISTER** — Plugin registers 4 tools with OpenClaw's Tool Registry: `obsidian_rag_search`, `obsidian_rag_index`, `obsidian_rag_status`, `obsidian_rag_memory_store`. Each tool declares: name, description, parameterSchema, requiredPermissions.
|
||||||
3. **SERVE** — OpenClaw agent calls tools based on user intent.
|
3. **SERVE** — OpenClaw agent calls tools based on user intent.
|
||||||
4. **HEALTH CHECK** — `Plugin.onLoad()` probes Ollama, LanceDB, and the vault, then reports `healthy | degraded | unavailable`.
|
4. **HEALTH CHECK** — `Plugin.onLoad()` probes Ollama, LanceDB, and the vault, then reports `healthy | degraded | unavailable`.
|
||||||
@@ -562,7 +562,7 @@ clawhub skill publish ./skill --slug obsidian-rag --version 1.0.0
|
|||||||
clawhub package publish santhosh/obsidian-rag
|
clawhub package publish santhosh/obsidian-rag
|
||||||
```
|
```
|
||||||
|
|
||||||
Install: `openclaw plugins install clawhub:obsidian-rag`
|
Install: Link plugin to `~/.openclaw/extensions/obsidian-rag` or use `openclaw plugins install --link /path/to/obsidian-rag`
|
||||||
|
|
||||||
## Windows Development Notes
|
## Windows Development Notes
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,125 @@
|
|||||||
"author": "Santhosh Janardhanan",
|
"author": "Santhosh Janardhanan",
|
||||||
"openclaw": "^2026.4.9",
|
"openclaw": "^2026.4.9",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
"configSchema": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"vault_path": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Path to Obsidian vault"
|
||||||
|
},
|
||||||
|
"embedding": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"provider": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["ollama"]
|
||||||
|
},
|
||||||
|
"model": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"base_url": {
|
||||||
|
"type": "string",
|
||||||
|
"format": "uri"
|
||||||
|
},
|
||||||
|
"dimensions": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"batch_size": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"vector_store": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"type": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["lancedb"]
|
||||||
|
},
|
||||||
|
"path": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"indexing": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"chunk_size": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 1
|
||||||
|
},
|
||||||
|
"chunk_overlap": {
|
||||||
|
"type": "integer",
|
||||||
|
"minimum": 0
|
||||||
|
},
|
||||||
|
"file_patterns": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"deny_dirs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"allow_dirs": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"security": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"require_confirmation_for": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"sensitive_sections": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"local_only": {
|
||||||
|
"type": "boolean"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"memory": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": false,
|
||||||
|
"properties": {
|
||||||
|
"auto_suggest": {
|
||||||
|
"type": "boolean"
|
||||||
|
},
|
||||||
|
"patterns": {
|
||||||
|
"type": "object",
|
||||||
|
"additionalProperties": {
|
||||||
|
"type": "array",
|
||||||
|
"items": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"tools": [
|
"tools": [
|
||||||
{
|
{
|
||||||
"name": "obsidian_rag_search",
|
"name": "obsidian_rag_search",
|
||||||
|
|||||||
Reference in New Issue
Block a user