@karmaniverous/jeeves-watcher-openclaw 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/skills/jeeves-watcher/SKILL.md +235 -32
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -96,29 +96,7 @@ You have two complementary tools with different scopes:
|
|
|
96
96
|
|
|
97
97
|
**The principle:** Memory-core is your curated highlights. The watcher archive is your perfect recall. Use memory first for speed and signal, but never let its narrow scope be the ceiling of what you can remember.
|
|
98
98
|
|
|
99
|
-
##
|
|
100
|
-
|
|
101
|
-
Memory-core and the watcher both use embeddings, but may use different models by default. For best cross-tool consistency, offer to configure memory-core to use `gemini-embedding-001` (the same model the watcher uses) via the gateway config:
|
|
102
|
-
|
|
103
|
-
1. **Verify Google API key** — check that the gateway has a Google API key configured (needed for Gemini embeddings).
|
|
104
|
-
2. **Apply config** — use `gateway config.patch` to set the memory-core embedding provider:
|
|
105
|
-
```json
|
|
106
|
-
{
|
|
107
|
-
"agents": {
|
|
108
|
-
"defaults": {
|
|
109
|
-
"memorySearch": {
|
|
110
|
-
"provider": "gemini",
|
|
111
|
-
"model": "gemini-embedding-001"
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
```
|
|
117
|
-
3. **Restart gateway** to pick up the new embedding provider. Memory-core will re-embed all memory files on next sync (dimension change triggers automatic vector table recreation).
|
|
118
|
-
|
|
119
|
-
This gives memory-core the same 3072-dimensional Gemini embeddings the watcher uses, ensuring semantic similarity scores are comparable across memory and archive searches.
|
|
120
|
-
|
|
121
|
-
## Installation
|
|
99
|
+
## Plugin Installation
|
|
122
100
|
|
|
123
101
|
```
|
|
124
102
|
npx @karmaniverous/jeeves-watcher-openclaw install
|
|
@@ -131,24 +109,249 @@ To remove:
|
|
|
131
109
|
npx @karmaniverous/jeeves-watcher-openclaw uninstall
|
|
132
110
|
```
|
|
133
111
|
|
|
134
|
-
## Quick Start
|
|
112
|
+
## Quick Start (Existing Deployment)
|
|
113
|
+
|
|
114
|
+
If the watcher service is already running and healthy:
|
|
135
115
|
|
|
136
116
|
1. **Orient yourself** (once per session) — use `watcher_query` to learn the deployment's organizational strategy and available record types (see Orientation Pattern below)
|
|
137
117
|
2. **Search** — use `watcher_search` with a natural language query and optional metadata filters
|
|
138
118
|
3. **Read source** — use `read` (standard file read) with `file_path` from search results for full document content
|
|
139
119
|
|
|
140
|
-
## Bootstrap (First
|
|
120
|
+
## Bootstrap (First-Time Setup)
|
|
121
|
+
|
|
122
|
+
When the plugin loads and the watcher service is NOT yet set up, drive the entire setup proactively. The user should be able to install the plugin with nothing else in place and the bootstrap process gets them to a working system.
|
|
123
|
+
|
|
124
|
+
**The agent drives this process.** Don't hand the user CLI commands and wait. Check each prerequisite, explain what's needed, execute what you can, and prompt the user only for decisions that require human judgment.
|
|
125
|
+
|
|
126
|
+
### Step 1: Check Node.js
|
|
127
|
+
|
|
128
|
+
Verify Node.js is installed and version ≥ 20:
|
|
129
|
+
```bash
|
|
130
|
+
node --version
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
If missing or too old, guide the user to install Node.js 20+ from https://nodejs.org or via their package manager.
|
|
134
|
+
|
|
135
|
+
### Step 2: Install Qdrant
|
|
136
|
+
|
|
137
|
+
Check if Qdrant is already running:
|
|
138
|
+
```bash
|
|
139
|
+
curl -s http://localhost:6333/healthz
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
If not running, install it. **Prefer native installation** (especially on cloud instances where Docker may not be available):
|
|
143
|
+
|
|
144
|
+
**Linux (recommended for servers):**
|
|
145
|
+
```bash
|
|
146
|
+
# Download and install binary
|
|
147
|
+
curl -L https://github.com/qdrant/qdrant/releases/latest/download/qdrant-x86_64-unknown-linux-musl.tar.gz -o /tmp/qdrant.tar.gz
|
|
148
|
+
sudo tar xzf /tmp/qdrant.tar.gz -C /usr/local/bin/
|
|
149
|
+
|
|
150
|
+
# Create qdrant user and directories
|
|
151
|
+
sudo useradd -r -s /bin/false qdrant
|
|
152
|
+
sudo mkdir -p /var/lib/qdrant/storage /var/lib/qdrant/snapshots /etc/qdrant
|
|
153
|
+
sudo chown -R qdrant:qdrant /var/lib/qdrant
|
|
154
|
+
|
|
155
|
+
# Create config
|
|
156
|
+
sudo tee /etc/qdrant/config.yaml > /dev/null <<EOF
|
|
157
|
+
storage:
|
|
158
|
+
storage_path: /var/lib/qdrant/storage
|
|
159
|
+
snapshots_path: /var/lib/qdrant/snapshots
|
|
160
|
+
service:
|
|
161
|
+
host: 0.0.0.0
|
|
162
|
+
http_port: 6333
|
|
163
|
+
grpc_port: 6334
|
|
164
|
+
EOF
|
|
165
|
+
|
|
166
|
+
# Create systemd service
|
|
167
|
+
sudo tee /etc/systemd/system/qdrant.service > /dev/null <<EOF
|
|
168
|
+
[Unit]
|
|
169
|
+
Description=Qdrant Vector Database
|
|
170
|
+
After=network.target
|
|
171
|
+
|
|
172
|
+
[Service]
|
|
173
|
+
Type=simple
|
|
174
|
+
ExecStart=/usr/local/bin/qdrant --config-path /etc/qdrant/config.yaml
|
|
175
|
+
WorkingDirectory=/var/lib/qdrant
|
|
176
|
+
Restart=always
|
|
177
|
+
User=qdrant
|
|
178
|
+
|
|
179
|
+
[Install]
|
|
180
|
+
WantedBy=multi-user.target
|
|
181
|
+
EOF
|
|
182
|
+
sudo systemctl daemon-reload
|
|
183
|
+
sudo systemctl enable --now qdrant
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
**Windows:**
|
|
187
|
+
```powershell
|
|
188
|
+
# Download from GitHub releases page
|
|
189
|
+
# https://github.com/qdrant/qdrant/releases
|
|
190
|
+
# Extract and run, or register as NSSM service:
|
|
191
|
+
nssm install Qdrant <path-to-qdrant.exe>
|
|
192
|
+
nssm start Qdrant
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
**Docker (fallback, if available):**
|
|
196
|
+
```bash
|
|
197
|
+
docker run -d -p 6333:6333 -v qdrant_data:/qdrant/storage qdrant/qdrant
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
After installation, verify:
|
|
201
|
+
```bash
|
|
202
|
+
curl -s http://localhost:6333/healthz
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### Step 3: Install Watcher Service
|
|
206
|
+
|
|
207
|
+
Install the watcher CLI globally:
|
|
208
|
+
```bash
|
|
209
|
+
npm install -g @karmaniverous/jeeves-watcher
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Verify:
|
|
213
|
+
```bash
|
|
214
|
+
jeeves-watcher --version
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### Step 4: Set Up Embedding Provider
|
|
218
|
+
|
|
219
|
+
The watcher uses Google Gemini for embeddings by default (`gemini-embedding-001`, 3072 dimensions).
|
|
220
|
+
|
|
221
|
+
Check for an existing API key:
|
|
222
|
+
```bash
|
|
223
|
+
echo $GOOGLE_API_KEY # Linux/Mac
|
|
224
|
+
echo %GOOGLE_API_KEY% # Windows cmd
|
|
225
|
+
$env:GOOGLE_API_KEY # PowerShell
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
If not set, guide the user:
|
|
229
|
+
1. Go to https://aistudio.google.com/apikey
|
|
230
|
+
2. Create an API key (free tier supports 1,000 embedding requests/minute)
|
|
231
|
+
3. Set it as a persistent environment variable:
|
|
232
|
+
- **Linux:** Add `export GOOGLE_API_KEY=<key>` to `~/.bashrc` or `~/.profile`
|
|
233
|
+
- **Windows:** `setx GOOGLE_API_KEY "<key>"` (new shell sessions only) or set via System Properties → Environment Variables
|
|
234
|
+
- **macOS:** Add to `~/.zshrc` or use `launchctl setenv`
|
|
235
|
+
|
|
236
|
+
Verify the key works by testing a Gemini API call:
|
|
237
|
+
```bash
|
|
238
|
+
curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-embedding-001:embedContent?key=$GOOGLE_API_KEY" \
|
|
239
|
+
-H "Content-Type: application/json" \
|
|
240
|
+
-d '{"model":"models/gemini-embedding-001","content":{"parts":[{"text":"test"}]}}'
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
A successful response contains an `embedding.values` array.
|
|
244
|
+
|
|
245
|
+
### Step 5: Author Initial Config
|
|
246
|
+
|
|
247
|
+
Ask the user these questions:
|
|
248
|
+
- **What directories should the watcher index?** (e.g., `~/documents`, `~/projects`, a workspace path)
|
|
249
|
+
- **What types of files matter?** (helps determine file extensions for watch globs)
|
|
250
|
+
- **Are there directories to exclude?** (node_modules, .git, build outputs, etc.)
|
|
251
|
+
|
|
252
|
+
Then generate a starter config file. Example minimal config:
|
|
253
|
+
|
|
254
|
+
```json
|
|
255
|
+
{
|
|
256
|
+
"description": "Personal knowledge base indexing",
|
|
257
|
+
"api": { "port": 1936 },
|
|
258
|
+
"watch": {
|
|
259
|
+
"paths": [
|
|
260
|
+
"/home/user/documents/**/*.{md,txt,json,pdf,html,docx}"
|
|
261
|
+
],
|
|
262
|
+
"ignored": ["**/node_modules/**", "**/.git/**", "**/dist/**"]
|
|
263
|
+
},
|
|
264
|
+
"embedding": {
|
|
265
|
+
"provider": "gemini",
|
|
266
|
+
"model": "gemini-embedding-001",
|
|
267
|
+
"dimensions": 3072,
|
|
268
|
+
"apiKey": "${GOOGLE_API_KEY}",
|
|
269
|
+
"chunkSize": 1000,
|
|
270
|
+
"chunkOverlap": 200,
|
|
271
|
+
"rateLimitPerMinute": 1000,
|
|
272
|
+
"concurrency": 5
|
|
273
|
+
},
|
|
274
|
+
"vectorStore": {
|
|
275
|
+
"url": "http://localhost:6333",
|
|
276
|
+
"collection": "jeeves_archive"
|
|
277
|
+
},
|
|
278
|
+
"search": {
|
|
279
|
+
"scoreThresholds": { "strong": 0.75, "relevant": 0.5, "noise": 0.25 },
|
|
280
|
+
"hybrid": { "enabled": true }
|
|
281
|
+
},
|
|
282
|
+
"logging": { "level": "info" },
|
|
283
|
+
"inferenceRules": []
|
|
284
|
+
}
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Write the config to a sensible location (e.g., `~/.config/jeeves-watcher.config.json` on Linux, or alongside the user's workspace). Validate with:
|
|
288
|
+
```bash
|
|
289
|
+
jeeves-watcher validate -c <config-path>
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### Step 6: Register and Start as a Service
|
|
293
|
+
|
|
294
|
+
**The watcher should run as a persistent service, not a foreground process.**
|
|
295
|
+
|
|
296
|
+
**Linux (systemd):**
|
|
297
|
+
```bash
|
|
298
|
+
sudo tee /etc/systemd/system/jeeves-watcher.service > /dev/null <<EOF
|
|
299
|
+
[Unit]
|
|
300
|
+
Description=Jeeves Watcher - Filesystem Indexing Service
|
|
301
|
+
After=network.target qdrant.service
|
|
302
|
+
|
|
303
|
+
[Service]
|
|
304
|
+
Type=simple
|
|
305
|
+
ExecStart=$(which jeeves-watcher) start -c <config-path>
|
|
306
|
+
WorkingDirectory=%h
|
|
307
|
+
Restart=always
|
|
308
|
+
Environment=GOOGLE_API_KEY=<key>
|
|
309
|
+
User=$USER
|
|
310
|
+
|
|
311
|
+
[Install]
|
|
312
|
+
WantedBy=multi-user.target
|
|
313
|
+
EOF
|
|
314
|
+
sudo systemctl enable --now jeeves-watcher
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
**Windows (NSSM):**
|
|
318
|
+
```powershell
|
|
319
|
+
jeeves-watcher service install
|
|
320
|
+
# Or manually:
|
|
321
|
+
nssm install jeeves-watcher "$(which jeeves-watcher)" start -c <config-path>
|
|
322
|
+
nssm set jeeves-watcher AppEnvironmentExtra GOOGLE_API_KEY=<key>
|
|
323
|
+
nssm start jeeves-watcher
|
|
324
|
+
```
|
|
325
|
+
|
|
326
|
+
Verify the service started:
|
|
327
|
+
```bash
|
|
328
|
+
curl -s http://127.0.0.1:1936/status
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
### Step 7: Verify Health
|
|
332
|
+
|
|
333
|
+
Call `watcher_status` (or `curl http://127.0.0.1:1936/status`). Confirm:
|
|
334
|
+
- Service is running
|
|
335
|
+
- Qdrant collection exists with expected dimensions (3072)
|
|
336
|
+
- Point count is increasing (initial indexing in progress)
|
|
337
|
+
|
|
338
|
+
If the point count is 0 after a minute, check `watcher_issues` for embedding failures.
|
|
339
|
+
|
|
340
|
+
### Step 8: Orientation
|
|
341
|
+
|
|
342
|
+
Once health is confirmed and initial indexing has started:
|
|
141
343
|
|
|
142
|
-
|
|
344
|
+
1. Query `$.['description','search']` for the deployment's organizational strategy and score thresholds.
|
|
345
|
+
2. Query `$.inferenceRules[*].['name','description']` for available record types.
|
|
346
|
+
3. Report to the user: how many points indexed so far, which domains are available, estimated time to complete initial indexing (based on file count and embedding rate).
|
|
143
347
|
|
|
144
|
-
|
|
348
|
+
### On Subsequent Sessions
|
|
145
349
|
|
|
146
|
-
|
|
147
|
-
2. **Discover the deployment** — run the Orientation Pattern (see below): query `$.['description','search']` for organizational strategy and score thresholds, then `$.inferenceRules[*].['name','description']` for available record types.
|
|
148
|
-
3. **Cache context** — store the orientation results mentally for the session. You now know what domains exist, what record types are searchable, and how to interpret scores.
|
|
149
|
-
4. **Report readiness** — briefly tell the user what you found: how many points, which domains, any issues. One or two sentences, not a wall of text.
|
|
350
|
+
On sessions after bootstrap is complete:
|
|
150
351
|
|
|
151
|
-
|
|
352
|
+
1. Call `watcher_status` silently.
|
|
353
|
+
2. Run the orientation queries silently.
|
|
354
|
+
3. Only report if something changed (service down, point count dropped significantly, new domains appeared).
|
|
152
355
|
|
|
153
356
|
**Key principle:** The agent drives discovery. The user shouldn't have to explain their archive to you — the archive explains itself through its config.
|
|
154
357
|
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "jeeves-watcher-openclaw",
|
|
3
3
|
"name": "Jeeves Watcher",
|
|
4
4
|
"description": "Semantic search, metadata enrichment, and instance administration for a jeeves-watcher deployment.",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.2",
|
|
6
6
|
"skills": [
|
|
7
7
|
"dist/skills/jeeves-watcher"
|
|
8
8
|
],
|
package/package.json
CHANGED