@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 +28 -4
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -110,7 +110,11 @@ function buildVirtualRules(workspace) {
|
|
|
110
110
|
{
|
|
111
111
|
type: 'object',
|
|
112
112
|
properties: {
|
|
113
|
-
|
|
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
|
-
|
|
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:
|
|
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: '
|
|
219
|
+
must: [{ key: 'domains', match: { value: 'memory' } }],
|
|
196
220
|
},
|
|
197
221
|
};
|
|
198
222
|
if (params.maxResults !== undefined)
|
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.3.
|
|
5
|
+
"version": "0.3.7",
|
|
6
6
|
"kind": "memory",
|
|
7
7
|
"skills": [
|
|
8
8
|
"dist/skills/jeeves-watcher"
|
package/package.json
CHANGED