@karmaniverous/jeeves-watcher-openclaw 0.17.0 → 0.18.0-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.
@@ -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` (core standard toolset, `createPluginToolset`): HTTP
12
- * only (`{apiUrl}/status`, resolved per call).
13
- * - `watcher_config`, `watcher_config_apply`: implemented by the plugin
14
- * (`configTools.ts`, replacing the core ones so the request carries the
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 (7 in `watcherTools.ts`, 7 VCS tools in
22
- * `vcsTools.ts`) call the service API via `registerApiTool` →
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()`, of which the plugin registers
7
- * `watcher_status` and `watcher_service`; its `watcher_config` and
8
- * `watcher_config_apply` are replaced by the plugin's own (`configTools.ts`,
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
  */
@@ -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.17.0",
5
+ "version": "0.18.0-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
- "watcher_enrich",
34
- "watcher_validate",
33
+ "watcher_set_metadata",
34
+ "watcher_validate_config",
35
35
  "watcher_reindex",
36
36
  "watcher_scan",
37
- "watcher_issues",
37
+ "watcher_list_issues",
38
38
  "watcher_walk",
39
- "watcher_vcs_status",
40
- "watcher_vcs_history",
41
- "watcher_vcs_show",
42
- "watcher_vcs_diff",
43
- "watcher_vcs_revert",
44
- "watcher_vcs_exclude",
45
- "watcher_vcs_check"
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.7.0",
8
- "@karmaniverous/jeeves-watcher-core": "^0.4.0"
7
+ "@karmaniverous/jeeves": "0.9.0",
8
+ "@karmaniverous/jeeves-watcher-core": "^0.5.0-3"
9
9
  },
10
10
  "description": "OpenClaw plugin for jeeves-watcher — semantic search and metadata enrichment tools",
11
11
  "devDependencies": {
12
- "@dotenvx/dotenvx": "^2.35.0",
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.0",
16
+ "@rollup/plugin-typescript": "^12.3.1",
17
17
  "cross-env": "^10.1.0",
18
- "knip": "^6.41.0",
19
- "release-it": "^21.1.1",
20
- "rollup": "^4.64.6",
21
- "tslib": "^2.8.1",
22
- "vitest": "^5.0.4"
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.13"
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.17.0"
123
+ "version": "0.18.0-0"
121
124
  }
@@ -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 {};
@@ -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>;
@@ -1,5 +0,0 @@
1
- /**
2
- * @module plugin/http.test
3
- * Unit tests for the plugin HTTP helper: bearer header presence/absence, unchanged unauthenticated request shape, 401 guidance naming the plugin key sources without the key, other errors carrying the server code.
4
- */
5
- export {};
@@ -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 {};
@@ -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 {};