@karmaniverous/jeeves-watcher-openclaw 0.3.8 → 0.3.10

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/index.js CHANGED
@@ -265,7 +265,7 @@ function createMemoryTools(api, baseUrl) {
265
265
  });
266
266
  const minScore = typeof params.minScore === 'number' ? params.minScore : 0;
267
267
  const filtered = results.filter((r) => typeof r.score === 'number' && r.score >= minScore);
268
- return ok(filtered);
268
+ return ok({ provider: 'jeeves-watcher', results: filtered });
269
269
  }
270
270
  catch (error) {
271
271
  state.initialized = false;
@@ -289,9 +289,9 @@ function createMemoryTools(api, baseUrl) {
289
289
  ? Number(params.lines)
290
290
  : lines.length - startIdx;
291
291
  const sliced = lines.slice(startIdx, startIdx + count);
292
- return ok(sliced.join('\n'));
292
+ return ok({ provider: 'jeeves-watcher', content: sliced.join('\n') });
293
293
  }
294
- return ok(content);
294
+ return ok({ provider: 'jeeves-watcher', content });
295
295
  }
296
296
  catch (error) {
297
297
  return fail(error);
@@ -84,6 +84,54 @@ You don't need to know the rules in advance. The config is introspectable at run
84
84
  2. **Search** — use `watcher_search` with a natural language query and optional metadata filters
85
85
  3. **Read source** — use `read` (standard file read) with `file_path` from search results for full document content
86
86
 
87
+ ## Bootstrap (First Session)
88
+
89
+ The first time the watcher plugin loads in a new deployment, orient yourself proactively. Don't wait for the user to ask a question — understand what you have access to.
90
+
91
+ **Automatic bootstrap sequence:**
92
+
93
+ 1. **Health check** — call `watcher_status`. Confirm the service is running, note point count and collection dimensions.
94
+ 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.
95
+ 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.
96
+ 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.
97
+
98
+ **On subsequent sessions:** Repeat steps 1-3 silently. Only report if something changed (service down, point count dropped significantly, new domains appeared).
99
+
100
+ **Key principle:** The agent drives discovery. The user shouldn't have to explain their archive to you — the archive explains itself through its config.
101
+
102
+ ## Install Modes
103
+
104
+ The plugin supports two install modes, controlled by the `--memory` flag during installation:
105
+
106
+ **Standard mode** (`npx @karmaniverous/jeeves-watcher-openclaw install`):
107
+ - Registers `watcher_*` tools only (search, enrich, status, query, validate, config_apply, reindex, issues)
108
+ - OpenClaw's built-in `memory-core` remains the memory provider
109
+ - Use when the watcher is a supplementary search tool alongside native memory
110
+
111
+ **Memory mode** (`npx @karmaniverous/jeeves-watcher-openclaw install --memory`):
112
+ - Registers all tools: `watcher_*` plus `memory_search` and `memory_get`
113
+ - Claims the OpenClaw memory slot — the watcher becomes the memory provider
114
+ - MEMORY.md and memory/*.md files are indexed and searched via the watcher's vector store
115
+ - Use when the watcher should be the single source of truth for both archive search and agent memory
116
+
117
+ **How to tell which mode you're in:** Check the response from `memory_search` or `memory_get`. In memory mode (watcher-backed), responses include `"provider": "jeeves-watcher"`. In standard mode (memory-core), responses are bare arrays/strings with no `provider` field.
118
+
119
+ ## Proactive Posture
120
+
121
+ **On your first `memory_search` or `memory_get` call each session, check the response for the `provider` field.**
122
+
123
+ - **If the response is `{ provider: "jeeves-watcher", ... }`:** You're in memory mode. The watcher is serving memory. No action needed.
124
+ - **If the response has any other shape** (bare array, bare string, different provider, no `provider` field): The watcher is NOT serving memory. Another provider is active. Check whether an upgrade is warranted.
125
+
126
+ **When to suggest upgrading to memory mode:**
127
+ Call `watcher_status` to check the archive size. If the watcher has >10K points, the deployment has a substantial archive and would benefit from semantic memory. Offer to run the upgrade yourself:
128
+
129
+ > "I notice memory queries are running on flat file search, but the watcher has [N] points with semantic embeddings. I can upgrade to memory mode now — this runs `npx @karmaniverous/jeeves-watcher-openclaw install --memory` and restarts the gateway. Shall I go ahead?"
130
+
131
+ If the user agrees, execute the install and gateway restart. Don't hand them a CLI command when you can do it yourself.
132
+
133
+ **Don't nag.** Suggest once per session at most. If the user declines, drop it.
134
+
87
135
  ## Tools
88
136
 
89
137
  ### `memory_search`
@@ -92,7 +140,8 @@ Semantically search MEMORY.md and memory/*.md files. Powered by the watcher's ve
92
140
  - `maxResults` (number, optional) — maximum results to return
93
141
  - `minScore` (number, optional) — minimum similarity score threshold
94
142
 
95
- Returns: `[{ path, from, to, snippet, score }]` where `from`/`to` are 1-indexed line numbers.
143
+ **Response (memory mode):** `{ provider: "jeeves-watcher", results: [{ path, from, to, snippet, score }] }` where `from`/`to` are 1-indexed line numbers.
144
+ **Response (standard mode / memory-core):** `[{ path, from, to, snippet, score }]` — bare array, no `provider` field.
96
145
 
97
146
  ### `memory_get`
98
147
  Read content from MEMORY.md or memory/*.md files with optional line range.
@@ -100,6 +149,9 @@ Read content from MEMORY.md or memory/*.md files with optional line range.
100
149
  - `from` (number, optional) — line number to start reading from (1-indexed)
101
150
  - `lines` (number, optional) — number of lines to read
102
151
 
152
+ **Response (memory mode):** `{ provider: "jeeves-watcher", content: "file content..." }`
153
+ **Response (standard mode / memory-core):** `"file content..."` — bare string, no `provider` field.
154
+
103
155
  Path validation: only files within the workspace's MEMORY.md and memory/**/*.md are accessible.
104
156
 
105
157
  ### `watcher_search`
@@ -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.3.8",
5
+ "version": "0.3.10",
6
6
  "skills": [
7
7
  "dist/skills/jeeves-watcher"
8
8
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/jeeves-watcher-openclaw",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "author": "Jason Williscroft",
5
5
  "description": "OpenClaw plugin for jeeves-watcher — semantic search and metadata enrichment tools",
6
6
  "license": "BSD-3-Clause",