@karmaniverous/jeeves-watcher-openclaw 0.5.0 → 0.5.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/index.js +20 -2
- package/dist/src/helpers.d.ts +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -96,8 +96,9 @@ async function generateWatcherMenu(apiUrl) {
|
|
|
96
96
|
let pointCount = 0;
|
|
97
97
|
const activeRules = [];
|
|
98
98
|
const watchPaths = [];
|
|
99
|
+
const ignoredPaths = [];
|
|
99
100
|
try {
|
|
100
|
-
const [statusRes, rulesRes, pathsRes] = await Promise.all([
|
|
101
|
+
const [statusRes, rulesRes, pathsRes, ignoredRes] = await Promise.all([
|
|
101
102
|
fetchJson(`${apiUrl}/status`),
|
|
102
103
|
fetchJson(`${apiUrl}/config/query`, {
|
|
103
104
|
method: 'POST',
|
|
@@ -109,6 +110,11 @@ async function generateWatcherMenu(apiUrl) {
|
|
|
109
110
|
headers: { 'Content-Type': 'application/json' },
|
|
110
111
|
body: JSON.stringify({ path: '$.watch.paths[*]' }),
|
|
111
112
|
}),
|
|
113
|
+
fetchJson(`${apiUrl}/config/query`, {
|
|
114
|
+
method: 'POST',
|
|
115
|
+
headers: { 'Content-Type': 'application/json' },
|
|
116
|
+
body: JSON.stringify({ path: '$.watch.ignored[*]' }),
|
|
117
|
+
}),
|
|
112
118
|
]);
|
|
113
119
|
pointCount = statusRes.collection?.pointCount ?? 0;
|
|
114
120
|
if (Array.isArray(rulesRes.result)) {
|
|
@@ -125,6 +131,12 @@ async function generateWatcherMenu(apiUrl) {
|
|
|
125
131
|
}
|
|
126
132
|
}
|
|
127
133
|
}
|
|
134
|
+
if (Array.isArray(ignoredRes.result)) {
|
|
135
|
+
for (const p of ignoredRes.result) {
|
|
136
|
+
if (typeof p === 'string')
|
|
137
|
+
ignoredPaths.push(p);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
128
140
|
}
|
|
129
141
|
catch {
|
|
130
142
|
return '*Watcher service is currently unreachable.*';
|
|
@@ -157,6 +169,12 @@ async function generateWatcherMenu(apiUrl) {
|
|
|
157
169
|
else {
|
|
158
170
|
lines.push('* (No watch paths configured)');
|
|
159
171
|
}
|
|
172
|
+
if (ignoredPaths.length > 0) {
|
|
173
|
+
lines.push('', '### Ignored paths:');
|
|
174
|
+
for (const p of ignoredPaths) {
|
|
175
|
+
lines.push(`* \`${p}\``);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
160
178
|
return lines.join('\n');
|
|
161
179
|
}
|
|
162
180
|
async function getCachedWatcherMenu(apiUrl, ttlMs) {
|
|
@@ -400,7 +418,7 @@ function register(api) {
|
|
|
400
418
|
const baseUrl = getApiUrl(api);
|
|
401
419
|
registerWatcherTools(api, baseUrl);
|
|
402
420
|
// Register the agent:bootstrap hook if the host OpenClaw version supports it
|
|
403
|
-
const registerHook = api.
|
|
421
|
+
const registerHook = api.registerHook;
|
|
404
422
|
if (typeof registerHook === 'function') {
|
|
405
423
|
registerHook('agent:bootstrap', async (event) => {
|
|
406
424
|
await handleAgentBootstrap(event, api);
|
package/dist/src/helpers.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface PluginApi {
|
|
|
23
23
|
* Optional internal hook registration (available on newer OpenClaw builds).
|
|
24
24
|
* We keep this optional to preserve compatibility.
|
|
25
25
|
*/
|
|
26
|
-
|
|
26
|
+
registerHook?: (event: string | string[], handler: (event: unknown) => Promise<void> | void) => void;
|
|
27
27
|
}
|
|
28
28
|
/** Result shape returned by each tool execution. */
|
|
29
29
|
export interface ToolResult {
|
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.5.
|
|
5
|
+
"version": "0.5.2",
|
|
6
6
|
"skills": [
|
|
7
7
|
"dist/skills/jeeves-watcher"
|
|
8
8
|
],
|
package/package.json
CHANGED