@karmaniverous/jeeves-watcher-openclaw 0.17.0 → 0.18.0
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/README.md +18 -13
- package/dist/index.js +1118 -858
- package/dist/scripts/build-skills.d.ts +1 -1
- package/dist/skills/jeeves-watcher/SKILL.md +96 -44
- package/dist/src/auth.test.d.ts +1 -1
- package/dist/src/catalogTools.d.ts +96 -0
- package/dist/src/catalogTools.test.d.ts +5 -0
- package/dist/src/distSmoke.test.d.ts +5 -0
- package/dist/src/helpers.d.ts +3 -3
- package/dist/src/manifest.test.d.ts +1 -1
- package/dist/src/promptContext.d.ts +10 -10
- package/dist/src/skillFiles.d.ts +14 -0
- package/dist/src/test/distFreshness.d.ts +20 -0
- package/dist/src/test/distFreshness.test.d.ts +5 -0
- package/dist/src/test/surfaceDiff.d.ts +27 -0
- package/dist/src/test/toolRenames.d.ts +13 -0
- package/dist/src/toolGating.d.ts +6 -8
- package/dist/src/toolSurface.test.d.ts +5 -0
- package/dist/src/watcherComponent.d.ts +3 -4
- package/openclaw.plugin.json +11 -11
- package/package.json +14 -11
- package/dist/src/apiTool.d.ts +0 -45
- package/dist/src/configTools.d.ts +0 -14
- package/dist/src/configTools.test.d.ts +0 -5
- package/dist/src/http.d.ts +0 -19
- package/dist/src/http.test.d.ts +0 -5
- package/dist/src/toolTestHarness.d.ts +0 -23
- package/dist/src/vcsTools.d.ts +0 -7
- package/dist/src/vcsTools.test.d.ts +0 -1
- package/dist/src/watcherTools.d.ts +0 -21
- package/dist/src/watcherTools.test.d.ts +0 -1
- /package/dist/src/{apiTool.test.d.ts → skillFiles.test.d.ts} +0 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module test/surfaceDiff
|
|
3
|
+
* Renders the agent-facing differences between two plugin tool surfaces (tool name, description, parameters, catalog mode, options) as Markdown, for the reviewed delta report. Pure.
|
|
4
|
+
*/
|
|
5
|
+
/** One registered tool, as the surface fixtures record it. */
|
|
6
|
+
export interface ToolSurface {
|
|
7
|
+
name: string;
|
|
8
|
+
description: string;
|
|
9
|
+
parameters: {
|
|
10
|
+
type?: string;
|
|
11
|
+
properties?: Record<string, unknown>;
|
|
12
|
+
required?: string[];
|
|
13
|
+
additionalProperties?: unknown;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
};
|
|
16
|
+
catalogMode?: unknown;
|
|
17
|
+
options?: unknown;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Render the delta report between a baseline surface and the current one.
|
|
21
|
+
*
|
|
22
|
+
* @param before - Baseline tools, in registration order.
|
|
23
|
+
* @param after - Current tools, in registration order.
|
|
24
|
+
* @param renames - Each renamed baseline tool and its current name.
|
|
25
|
+
* @returns Markdown: one section per tool that changed, then removed and added tools.
|
|
26
|
+
*/
|
|
27
|
+
export declare function renderSurfaceDiff(before: readonly ToolSurface[], after: readonly ToolSurface[], renames: Readonly<Record<string, string>>): string;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module test/toolRenames
|
|
3
|
+
* The plugin tool renames of 0.18.0 (D77, Design 14): each 0.17.0 tool name and its current name, for the surface tests. Pure data.
|
|
4
|
+
*/
|
|
5
|
+
/** Each renamed 0.17.0 tool name and its current name. */
|
|
6
|
+
export declare const TOOL_RENAMES: Readonly<Record<string, string>>;
|
|
7
|
+
/**
|
|
8
|
+
* A 0.17.0 tool name under its current name.
|
|
9
|
+
*
|
|
10
|
+
* @param name - The 0.17.0 name.
|
|
11
|
+
* @returns The current name.
|
|
12
|
+
*/
|
|
13
|
+
export declare const renamedTool: (name: string) => string;
|
package/dist/src/toolGating.d.ts
CHANGED
|
@@ -8,19 +8,17 @@
|
|
|
8
8
|
* that only call the service HTTP API keep working without it.
|
|
9
9
|
*
|
|
10
10
|
* Audit of the tools the plugin registers:
|
|
11
|
-
* - `watcher_status`
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
* `Authorization: Bearer` key); HTTP only.
|
|
11
|
+
* - `watcher_status`, `watcher_config`, `watcher_config_apply` (core
|
|
12
|
+
* toolset from `WATCHER_CATALOG`, `catalogTools.ts`): HTTP only
|
|
13
|
+
* (`{apiUrl}` resolved per call; the bearer key sent where the entry
|
|
14
|
+
* requires it).
|
|
16
15
|
* - `watcher_service` (core standard toolset): only `install` reads
|
|
17
16
|
* `configRoot` (`createServiceManager` → `resolveConfigFilePath` →
|
|
18
17
|
* `getComponentConfigDir`); the other actions query or drive the OS
|
|
19
18
|
* service manager by service name.
|
|
20
19
|
*
|
|
21
|
-
* The 14 domain tools
|
|
22
|
-
*
|
|
23
|
-
* `requestJson` and are never gated.
|
|
20
|
+
* The 14 domain tools come from the same core toolset (D38): HTTP only,
|
|
21
|
+
* never gated.
|
|
24
22
|
*/
|
|
25
23
|
/** Decides, per call, whether a tool invocation reads `configRoot`. */
|
|
26
24
|
export type ConfigRootPredicate = (params: Record<string, unknown> | undefined) => boolean;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/toolSurface.test
|
|
3
|
+
* Agent-facing surface: every registered tool's name, description, parameters, `catalogMode` and registration options, and the injected prompt rules, are pinned in `test/surface-0.18.0/`, and the differences from what plugin 0.17.0 registered (`test/baseline-0.17.0/`) are rendered to `test/surface-0.18.0/deltas.md`: the reviewed list of agent-facing changes (spec #281 A6). Any change to the surface changes these files.
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
* Jeeves component descriptor for the watcher OpenClaw plugin.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
|
-
* Feeds `createPluginToolset()
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* which send the API key). The service descriptor
|
|
6
|
+
* Feeds `createPluginToolset()` (with `WATCHER_CATALOG`, `catalogTools.ts`),
|
|
7
|
+
* which builds the four standard tools and the catalog-built domain tools.
|
|
8
|
+
* The service descriptor
|
|
10
9
|
* (`packages/service/src/descriptor.ts`) is the canonical source for the
|
|
11
10
|
* config schema and CLI commands.
|
|
12
11
|
*/
|
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
|
+
"version": "0.18.0",
|
|
6
6
|
"skills": ["dist/skills/jeeves-watcher"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
"watcher_config_apply",
|
|
31
31
|
"watcher_service",
|
|
32
32
|
"watcher_search",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"watcher_set_metadata",
|
|
34
|
+
"watcher_validate_config",
|
|
35
35
|
"watcher_reindex",
|
|
36
36
|
"watcher_scan",
|
|
37
|
-
"
|
|
37
|
+
"watcher_list_issues",
|
|
38
38
|
"watcher_walk",
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
45
|
-
"
|
|
39
|
+
"watcher_get_vcs_status",
|
|
40
|
+
"watcher_list_vcs_history",
|
|
41
|
+
"watcher_show_vcs_file",
|
|
42
|
+
"watcher_diff_vcs",
|
|
43
|
+
"watcher_revert_vcs",
|
|
44
|
+
"watcher_exclude_vcs_path",
|
|
45
|
+
"watcher_check_vcs_exclusion"
|
|
46
46
|
]
|
|
47
47
|
},
|
|
48
48
|
"uiHints": {
|
package/package.json
CHANGED
|
@@ -4,25 +4,25 @@
|
|
|
4
4
|
"url": "https://github.com/karmaniverous/jeeves-watcher/issues"
|
|
5
5
|
},
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@karmaniverous/jeeves": "0.
|
|
8
|
-
"@karmaniverous/jeeves-watcher-core": "^0.
|
|
7
|
+
"@karmaniverous/jeeves": "0.9.0",
|
|
8
|
+
"@karmaniverous/jeeves-watcher-core": "^0.5.0"
|
|
9
9
|
},
|
|
10
10
|
"description": "OpenClaw plugin for jeeves-watcher — semantic search and metadata enrichment tools",
|
|
11
11
|
"devDependencies": {
|
|
12
|
-
"@dotenvx/dotenvx": "^2.
|
|
12
|
+
"@dotenvx/dotenvx": "^2.38.2",
|
|
13
13
|
"@rollup/plugin-commonjs": "^29.0.3",
|
|
14
14
|
"@rollup/plugin-json": "^6.1.0",
|
|
15
15
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
16
|
-
"@rollup/plugin-typescript": "^12.3.
|
|
16
|
+
"@rollup/plugin-typescript": "^12.3.1",
|
|
17
17
|
"cross-env": "^10.1.0",
|
|
18
|
-
"knip": "^6.
|
|
19
|
-
"release-it": "^21.1.
|
|
20
|
-
"rollup": "^4.
|
|
21
|
-
"tslib": "^2.
|
|
22
|
-
"vitest": "^5.0
|
|
18
|
+
"knip": "^6.44.1",
|
|
19
|
+
"release-it": "^21.1.2",
|
|
20
|
+
"rollup": "^4.67.5",
|
|
21
|
+
"tslib": "^2.9.1",
|
|
22
|
+
"vitest": "^5.1.0"
|
|
23
23
|
},
|
|
24
24
|
"engines": {
|
|
25
|
-
"node": ">=22.
|
|
25
|
+
"node": ">=24.22.2"
|
|
26
26
|
},
|
|
27
27
|
"exports": {
|
|
28
28
|
".": {
|
|
@@ -72,6 +72,9 @@
|
|
|
72
72
|
"releaseNotes": "npx git-cliff --tag openclaw/${version} --unreleased --strip header"
|
|
73
73
|
},
|
|
74
74
|
"hooks": {
|
|
75
|
+
"before:init": [
|
|
76
|
+
"node ../../scripts/check-core-range.mjs"
|
|
77
|
+
],
|
|
75
78
|
"after:bump": [
|
|
76
79
|
"node -e \"const f='openclaw.plugin.json';const j=JSON.parse(require('fs').readFileSync(f,'utf8'));j.version='${version}';require('fs').writeFileSync(f,JSON.stringify(j,null,2)+'')\"",
|
|
77
80
|
"npx prettier --write openclaw.plugin.json",
|
|
@@ -117,5 +120,5 @@
|
|
|
117
120
|
},
|
|
118
121
|
"type": "module",
|
|
119
122
|
"types": "dist/index.d.ts",
|
|
120
|
-
"version": "0.
|
|
123
|
+
"version": "0.18.0"
|
|
121
124
|
}
|
package/dist/src/apiTool.d.ts
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/apiTool
|
|
3
|
-
* Generic HTTP-backed watcher tool registration: config shape, request helpers, and ok/connectionFail wrapping. Requests carry the bearer key (if configured) via `requestJson`.
|
|
4
|
-
*/
|
|
5
|
-
import { type PluginApi, type ToolDescriptor } from '@karmaniverous/jeeves';
|
|
6
|
-
/**
|
|
7
|
-
* OpenClaw Tool Search catalog mode.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* Mirrors `AnyAgentTool['catalogMode']` in the OpenClaw plugin SDK
|
|
11
|
-
* (OpenClaw 2026.9+). `'direct-only'` keeps the tool model-visible instead of
|
|
12
|
-
* moving it into the hidden `tool_search` catalog. Declared locally because
|
|
13
|
-
* `ToolDescriptor` in `@karmaniverous/jeeves` does not carry it yet and
|
|
14
|
-
* `openclaw` is not a dependency of this package.
|
|
15
|
-
*/
|
|
16
|
-
export type ToolCatalogMode = 'direct-only';
|
|
17
|
-
/** A tool descriptor carrying the optional OpenClaw catalog mode. */
|
|
18
|
-
export type CatalogToolDescriptor = ToolDescriptor & {
|
|
19
|
-
/** OpenClaw Tool Search catalog mode (omitted = catalog-eligible). */
|
|
20
|
-
catalogMode?: ToolCatalogMode;
|
|
21
|
-
};
|
|
22
|
-
/** Config for a watcher API tool. */
|
|
23
|
-
export interface ApiToolConfig {
|
|
24
|
-
name: string;
|
|
25
|
-
description: string;
|
|
26
|
-
parameters: Record<string, unknown>;
|
|
27
|
-
/** OpenClaw Tool Search catalog mode; omit to leave the tool catalog-eligible. */
|
|
28
|
-
catalogMode?: ToolCatalogMode;
|
|
29
|
-
/** Build the request: return [endpoint, body?]. No body = GET. */
|
|
30
|
-
buildRequest: (params: Record<string, unknown>) => [string, unknown?];
|
|
31
|
-
}
|
|
32
|
-
/** API base URL, or a resolver evaluated on every call. */
|
|
33
|
-
export type BaseUrlSource = string | (() => string);
|
|
34
|
-
/**
|
|
35
|
-
* Register a single API tool with standard try/catch + ok/connectionFail.
|
|
36
|
-
*
|
|
37
|
-
* @remarks
|
|
38
|
-
* The bearer key is resolved from `api` ({@link getApiKey}) on every call,
|
|
39
|
-
* so a key set after registration takes effect without re-registering.
|
|
40
|
-
*/
|
|
41
|
-
export declare function registerApiTool(api: PluginApi, baseUrlSource: BaseUrlSource, config: ApiToolConfig): void;
|
|
42
|
-
/** Build a query string from defined params. */
|
|
43
|
-
export declare function buildQuery(params: Record<string, unknown>, keys: string[]): string;
|
|
44
|
-
/** Pick defined keys from params into a body object. */
|
|
45
|
-
export declare function pickDefined(params: Record<string, unknown>, keys: string[]): Record<string, unknown>;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/configTools
|
|
3
|
-
* Watcher-owned `watcher_config` and `watcher_config_apply` tools: same names, parameters and requests as the core toolset's, but sent through the plugin HTTP helper so they carry the bearer key.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* Core's `createPluginToolset` cannot attach request headers, so its two
|
|
7
|
-
* authenticated HTTP tools are replaced by these (see {@link CORE_TOOLS_REPLACED}).
|
|
8
|
-
* `watcher_status` stays with core: `GET /status` is always open.
|
|
9
|
-
*/
|
|
10
|
-
import type { ApiToolConfig } from './apiTool.js';
|
|
11
|
-
/** Core toolset tools that this module replaces. */
|
|
12
|
-
export declare const CORE_TOOLS_REPLACED: ReadonlySet<string>;
|
|
13
|
-
/** `watcher_config` and `watcher_config_apply`, as API tool configs. */
|
|
14
|
-
export declare const configToolConfigs: ApiToolConfig[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/configTools.test
|
|
3
|
-
* watcher_config and watcher_config_apply build the same requests as the core tools: GET /config (optional URL-encoded JSONPath) and POST /config/apply with the config wrapped as `patch`; a missing config is rejected before any request.
|
|
4
|
-
*/
|
|
5
|
-
export {};
|
package/dist/src/http.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/http
|
|
3
|
-
* The plugin's single HTTP helper for watcher API calls: JSON GET/POST via `fetch` with the core bearer header and the core error mapping (errors carry the server `code`; 401 adds key guidance). Never logs the key.
|
|
4
|
-
*/
|
|
5
|
-
/** Where the plugin reads its API key from (named in 401 guidance). */
|
|
6
|
-
export declare const PLUGIN_KEY_SOURCES = "plugins.entries.jeeves-watcher-openclaw.config.apiKey or the JEEVES_WATCHER_API_KEY env var";
|
|
7
|
-
/**
|
|
8
|
-
* Call the watcher API and return the parsed JSON body.
|
|
9
|
-
*
|
|
10
|
-
* @param url - Full request URL.
|
|
11
|
-
* @param body - JSON body; `undefined` sends a GET, anything else a POST.
|
|
12
|
-
* @param apiKey - Bearer key; `undefined` sends no `Authorization` header.
|
|
13
|
-
* @returns Parsed JSON response body.
|
|
14
|
-
* @throws On `401` with core `unauthorizedMessage` (naming
|
|
15
|
-
* {@link PLUGIN_KEY_SOURCES}); on any other non-OK status with
|
|
16
|
-
* `HTTP <status> <code>: <message>` (core `httpError`); network errors
|
|
17
|
-
* propagate unchanged.
|
|
18
|
-
*/
|
|
19
|
-
export declare function requestJson(url: string, body: unknown, apiKey: string | undefined): Promise<unknown>;
|
package/dist/src/http.test.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/toolTestHarness
|
|
3
|
-
* Test-only helpers: a fetch stub and a plugin API that captures registered watcher tools by name. No side effects.
|
|
4
|
-
*/
|
|
5
|
-
import type { ToolRegistrationOptions } from '@karmaniverous/jeeves';
|
|
6
|
-
import { type Mock } from 'vitest';
|
|
7
|
-
import type { CatalogToolDescriptor } from './apiTool.js';
|
|
8
|
-
/** Base URL used by tool tests. */
|
|
9
|
-
export declare const BASE = "http://localhost:1936";
|
|
10
|
-
/** Signature of the `fetch` stub. */
|
|
11
|
-
type FetchStub = (...args: unknown[]) => Promise<unknown>;
|
|
12
|
-
/** A `fetch` stub resolving to an OK JSON response carrying `data`. */
|
|
13
|
-
export declare function mockFetch(data?: unknown): Mock<FetchStub>;
|
|
14
|
-
/** A registered tool plus the options it was registered with. */
|
|
15
|
-
export interface CapturedTool {
|
|
16
|
-
tool: CatalogToolDescriptor;
|
|
17
|
-
options?: ToolRegistrationOptions;
|
|
18
|
-
}
|
|
19
|
-
/** Register the watcher tools against a capturing API; returns them by name, in order. */
|
|
20
|
-
export declare function captureTools(baseUrl?: string): Map<string, CapturedTool>;
|
|
21
|
-
/** Invoke a captured tool by name. */
|
|
22
|
-
export declare function run(tools: Map<string, CapturedTool>, name: string, params: Record<string, unknown>): Promise<import("@karmaniverous/jeeves").ToolResult>;
|
|
23
|
-
export {};
|
package/dist/src/vcsTools.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/vcsTools
|
|
3
|
-
* Version-tracking (watcher_vcs_*) tool configs for the OpenClaw plugin; each maps tool params to a watcher VCS endpoint.
|
|
4
|
-
*/
|
|
5
|
-
import { type ApiToolConfig } from './apiTool.js';
|
|
6
|
-
/** The 7 watcher_vcs_* tool configs. */
|
|
7
|
-
export declare const vcsToolConfigs: ApiToolConfig[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/watcherTools
|
|
3
|
-
* Domain-specific watcher tool registrations (14 tools) for the OpenClaw plugin.
|
|
4
|
-
*/
|
|
5
|
-
import { type PluginApi } from '@karmaniverous/jeeves';
|
|
6
|
-
import { type BaseUrlSource } from './apiTool.js';
|
|
7
|
-
/**
|
|
8
|
-
* Register the 14 domain-specific watcher_* tools with the OpenClaw plugin API.
|
|
9
|
-
*
|
|
10
|
-
* @remarks
|
|
11
|
-
* `watcher_search` and `watcher_scan` are `catalogMode: 'direct-only'` so
|
|
12
|
-
* OpenClaw Tool Search keeps them model-visible: semantic search must be a
|
|
13
|
-
* direct tool or the model reaches for grep first. All other tools remain
|
|
14
|
-
* catalog-eligible.
|
|
15
|
-
*
|
|
16
|
-
* @param api - Plugin API.
|
|
17
|
-
* @param baseUrl - API base URL, or a getter resolved on every call (so a
|
|
18
|
-
* changed `apiUrl` takes effect without re-registering, as for the config
|
|
19
|
-
* tools).
|
|
20
|
-
*/
|
|
21
|
-
export declare function registerWatcherTools(api: PluginApi, baseUrl: BaseUrlSource): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|