@karmaniverous/jeeves-watcher-openclaw 0.3.4 → 0.3.6
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 +19 -7
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -98,12 +98,10 @@ function buildVirtualRules(workspace) {
|
|
|
98
98
|
name: 'openclaw-memory-longterm',
|
|
99
99
|
description: 'OpenClaw long-term memory file',
|
|
100
100
|
match: {
|
|
101
|
-
type: 'object',
|
|
102
101
|
properties: {
|
|
103
102
|
file: {
|
|
104
|
-
type: 'object',
|
|
105
103
|
properties: {
|
|
106
|
-
path: {
|
|
104
|
+
path: { glob: `${ws}/MEMORY.md` },
|
|
107
105
|
},
|
|
108
106
|
},
|
|
109
107
|
},
|
|
@@ -122,12 +120,10 @@ function buildVirtualRules(workspace) {
|
|
|
122
120
|
name: 'openclaw-memory-daily',
|
|
123
121
|
description: 'OpenClaw daily memory logs',
|
|
124
122
|
match: {
|
|
125
|
-
type: 'object',
|
|
126
123
|
properties: {
|
|
127
124
|
file: {
|
|
128
|
-
type: 'object',
|
|
129
125
|
properties: {
|
|
130
|
-
path: {
|
|
126
|
+
path: { glob: `${ws}/memory/**/*.md` },
|
|
131
127
|
},
|
|
132
128
|
},
|
|
133
129
|
},
|
|
@@ -184,10 +180,26 @@ function createMemoryTools(api, baseUrl) {
|
|
|
184
180
|
body: JSON.stringify({ source: PLUGIN_SOURCE }),
|
|
185
181
|
});
|
|
186
182
|
// Register virtual rules
|
|
183
|
+
const virtualRules = buildVirtualRules(state.workspace);
|
|
187
184
|
await postJson(`${state.baseUrl}/rules/register`, {
|
|
188
185
|
source: PLUGIN_SOURCE,
|
|
189
|
-
rules:
|
|
186
|
+
rules: virtualRules,
|
|
190
187
|
});
|
|
188
|
+
// Re-apply rules to already-indexed files matching virtual rule globs
|
|
189
|
+
const globs = virtualRules
|
|
190
|
+
.map((r) => {
|
|
191
|
+
const path = r.match.properties.file.properties.path;
|
|
192
|
+
return typeof path.glob === 'string' ? path.glob : undefined;
|
|
193
|
+
})
|
|
194
|
+
.filter((g) => g !== undefined);
|
|
195
|
+
if (globs.length > 0) {
|
|
196
|
+
try {
|
|
197
|
+
await postJson(`${state.baseUrl}/rules/reapply`, { globs });
|
|
198
|
+
}
|
|
199
|
+
catch {
|
|
200
|
+
// Non-fatal: files will get correct rules on next change
|
|
201
|
+
}
|
|
202
|
+
}
|
|
191
203
|
state.initialized = true;
|
|
192
204
|
}
|
|
193
205
|
const memorySearch = async (_id, params) => {
|
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.6",
|
|
6
6
|
"kind": "memory",
|
|
7
7
|
"skills": [
|
|
8
8
|
"dist/skills/jeeves-watcher"
|
package/package.json
CHANGED