@karmaniverous/jeeves-watcher-openclaw 0.3.5 → 0.3.7

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
@@ -110,7 +110,11 @@ function buildVirtualRules(workspace) {
110
110
  {
111
111
  type: 'object',
112
112
  properties: {
113
- domain: { type: 'string', set: 'memory' },
113
+ domains: {
114
+ type: 'array',
115
+ items: { type: 'string' },
116
+ set: ['memory'],
117
+ },
114
118
  kind: { type: 'string', set: 'long-term' },
115
119
  },
116
120
  },
@@ -132,7 +136,11 @@ function buildVirtualRules(workspace) {
132
136
  {
133
137
  type: 'object',
134
138
  properties: {
135
- domain: { type: 'string', set: 'memory' },
139
+ domains: {
140
+ type: 'array',
141
+ items: { type: 'string' },
142
+ set: ['memory'],
143
+ },
136
144
  kind: { type: 'string', set: 'daily-log' },
137
145
  },
138
146
  },
@@ -180,10 +188,26 @@ function createMemoryTools(api, baseUrl) {
180
188
  body: JSON.stringify({ source: PLUGIN_SOURCE }),
181
189
  });
182
190
  // Register virtual rules
191
+ const virtualRules = buildVirtualRules(state.workspace);
183
192
  await postJson(`${state.baseUrl}/rules/register`, {
184
193
  source: PLUGIN_SOURCE,
185
- rules: buildVirtualRules(state.workspace),
194
+ rules: virtualRules,
186
195
  });
196
+ // Re-apply rules to already-indexed files matching virtual rule globs
197
+ const globs = virtualRules
198
+ .map((r) => {
199
+ const path = r.match.properties.file.properties.path;
200
+ return typeof path.glob === 'string' ? path.glob : undefined;
201
+ })
202
+ .filter((g) => g !== undefined);
203
+ if (globs.length > 0) {
204
+ try {
205
+ await postJson(`${state.baseUrl}/rules/reapply`, { globs });
206
+ }
207
+ catch {
208
+ // Non-fatal: files will get correct rules on next change
209
+ }
210
+ }
187
211
  state.initialized = true;
188
212
  }
189
213
  const memorySearch = async (_id, params) => {
@@ -192,7 +216,7 @@ function createMemoryTools(api, baseUrl) {
192
216
  const body = {
193
217
  query: params.query,
194
218
  filter: {
195
- must: [{ key: 'domain', match: { value: 'memory' } }],
219
+ must: [{ key: 'domains', match: { value: 'memory' } }],
196
220
  },
197
221
  };
198
222
  if (params.maxResults !== undefined)
@@ -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.5",
5
+ "version": "0.3.7",
6
6
  "kind": "memory",
7
7
  "skills": [
8
8
  "dist/skills/jeeves-watcher"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/jeeves-watcher-openclaw",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
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",