@karmaniverous/jeeves-watcher-openclaw 0.16.1 → 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.
- package/LICENSE +28 -0
- package/README.md +16 -13
- package/dist/index.js +2329 -708
- package/dist/scripts/build-skills.d.ts +1 -1
- package/dist/skills/jeeves-watcher/SKILL.md +230 -136
- package/dist/src/auth.test.d.ts +5 -0
- package/dist/src/catalogTools.d.ts +96 -0
- package/dist/src/catalogTools.test.d.ts +5 -0
- package/dist/src/constants.d.ts +1 -1
- package/dist/src/distSmoke.test.d.ts +5 -0
- package/dist/src/helpers.d.ts +15 -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/surfaceDiff.d.ts +27 -0
- package/dist/src/test/toolRenames.d.ts +13 -0
- package/dist/src/toolGating.d.ts +8 -6
- package/dist/src/toolSurface.test.d.ts +5 -0
- package/dist/src/watcherComponent.d.ts +3 -2
- package/openclaw.plugin.json +20 -11
- package/package.json +18 -13
- package/dist/src/apiTool.d.ts +0 -37
- 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 -15
- 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,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/catalogTools
|
|
3
|
+
* Every watcher tool, built from `WATCHER_CATALOG` by core's toolset (D38): the four standard tools (`watcher_status`, `watcher_service`, `watcher_config`, `watcher_config_apply`) and the 14 domain tools, all sending the bearer key where their entry requires it; `registerCatalogTool` registers one of them as an optional tool.
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Each tool is named `watcher_` plus its entry's verb-first name in
|
|
7
|
+
* snake_case (D77, `toToolName`). Parameters come from the entry's request
|
|
8
|
+
* schemas; descriptions keep the 0.17.0 wording where it is still true
|
|
9
|
+
* (`WATCHER_TOOL_SELECTION`). `watcher_search` and `watcher_scan` are
|
|
10
|
+
* `catalogMode: 'direct-only'`, so OpenClaw Tool Search keeps them
|
|
11
|
+
* model-visible: semantic search must be a direct tool or the model reaches
|
|
12
|
+
* for grep first. Every call runs on core's 120 s default timeout
|
|
13
|
+
* (`DEFAULT_FETCH_TIMEOUT_MS`, D137), the status probe on 5 s. Errors are
|
|
14
|
+
* reported as core's `HTTP <status>: <body>`; API-key guidance lives in the
|
|
15
|
+
* skill's troubleshooting section (spec #281 D31).
|
|
16
|
+
*/
|
|
17
|
+
import { type JeevesComponentDescriptor, type PluginApi, type ToolDescriptor } from '@karmaniverous/jeeves';
|
|
18
|
+
/** `watcher_exclude_vcs_path` description (D103, D137). */
|
|
19
|
+
export declare const VCS_EXCLUDE_DESCRIPTION: string;
|
|
20
|
+
/** `watcher_check_vcs_exclusion` description (0.21.0, spec B4). */
|
|
21
|
+
export declare const VCS_CHECK_DESCRIPTION = "Check whether git ignores a path and why: the rule, the file holding it and its line";
|
|
22
|
+
/** The scope `watcher_reindex` sends when the caller omits one: 0.17.0's default (owner ruling, 2026-11-04). */
|
|
23
|
+
export declare const REINDEX_DEFAULT_SCOPE = "rules";
|
|
24
|
+
/** `watcher_reindex` description. */
|
|
25
|
+
export declare const REINDEX_DESCRIPTION = "Trigger a reindex of the watched files. Without scope, re-applies inference rules (scope \"rules\"); the HTTP API's own default is \"issues\".";
|
|
26
|
+
/**
|
|
27
|
+
* The 14 domain tools, in their 0.17.0 registration order, by catalog entry.
|
|
28
|
+
* Descriptions keep the 0.17.0 text unless it changed with the tool.
|
|
29
|
+
*/
|
|
30
|
+
export declare const WATCHER_TOOL_SELECTION: {
|
|
31
|
+
readonly search: {
|
|
32
|
+
readonly description: "Semantic search over indexed documents. Supports Qdrant filters. This is a direct tool: call it directly, never through tool_call.";
|
|
33
|
+
readonly catalogMode: "direct-only";
|
|
34
|
+
};
|
|
35
|
+
readonly setMetadata: {
|
|
36
|
+
readonly description: "Set or update metadata on a document by file path or source reference.";
|
|
37
|
+
};
|
|
38
|
+
readonly validateConfig: {
|
|
39
|
+
readonly description: "Validate a candidate config (or current config if omitted). Optionally test file paths against the config to preview rule matching and metadata output.";
|
|
40
|
+
};
|
|
41
|
+
readonly reindex: {
|
|
42
|
+
readonly description: "Trigger a reindex of the watched files. Without scope, re-applies inference rules (scope \"rules\"); the HTTP API's own default is \"issues\".";
|
|
43
|
+
};
|
|
44
|
+
readonly scan: {
|
|
45
|
+
readonly description: "Filter-only point query without vector search. Returns metadata for points matching a Qdrant filter. Use for structural queries: file enumeration, staleness checks, delta computation. Use watcher_search for semantic/similarity queries. This is a direct tool: call it directly, never through tool_call.";
|
|
46
|
+
readonly catalogMode: "direct-only";
|
|
47
|
+
};
|
|
48
|
+
readonly listIssues: {
|
|
49
|
+
readonly description: "Get runtime processing failures. Shows the documents (file path or source reference) that failed processing and why.";
|
|
50
|
+
};
|
|
51
|
+
readonly walk: {
|
|
52
|
+
readonly description: "Walk watched filesystem paths with glob intersection. Returns matching file paths from all configured watch roots, applying watch.ignored and gitignore filtering.";
|
|
53
|
+
};
|
|
54
|
+
readonly getVcsStatus: {
|
|
55
|
+
readonly description: "Get version tracking health: enabled state, tracked roots, remote status, last activity";
|
|
56
|
+
};
|
|
57
|
+
readonly listVcsHistory: {
|
|
58
|
+
readonly description: "Query change history by path or glob with optional date range";
|
|
59
|
+
};
|
|
60
|
+
readonly showVcsFile: {
|
|
61
|
+
readonly description: "Retrieve file content at a specific version";
|
|
62
|
+
};
|
|
63
|
+
readonly diffVcs: {
|
|
64
|
+
readonly description: "Show what changed between two versions, or between a version and current";
|
|
65
|
+
};
|
|
66
|
+
readonly revertVcs: {
|
|
67
|
+
readonly description: "Undo changes by restoring files to a specific version";
|
|
68
|
+
};
|
|
69
|
+
readonly excludeVcsPath: {
|
|
70
|
+
readonly description: string;
|
|
71
|
+
};
|
|
72
|
+
readonly checkVcsExclusion: {
|
|
73
|
+
readonly description: "Check whether git ignores a path and why: the rule, the file holding it and its line";
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
/** Every tool the plugin registers, in registration order (0.17.0 order). */
|
|
77
|
+
export declare const WATCHER_TOOL_NAMES: readonly string[];
|
|
78
|
+
/**
|
|
79
|
+
* Core's toolset for the watcher: the four standard tools and the 14 domain
|
|
80
|
+
* tools. The base URL and the bearer key are resolved from `api` on every
|
|
81
|
+
* call.
|
|
82
|
+
*
|
|
83
|
+
* @param api - Plugin API (config source).
|
|
84
|
+
* @param component - Plugin-side component descriptor.
|
|
85
|
+
* @returns The tools, keyed by name.
|
|
86
|
+
*/
|
|
87
|
+
export declare function createCatalogTools(api: PluginApi, component: JeevesComponentDescriptor): Map<string, ToolDescriptor>;
|
|
88
|
+
/**
|
|
89
|
+
* Register one catalog-built tool as an optional tool.
|
|
90
|
+
*
|
|
91
|
+
* @param api - Plugin API (tool registration target).
|
|
92
|
+
* @param catalogTools - Catalog-built tools, by name ({@link createCatalogTools}).
|
|
93
|
+
* @param name - Tool name.
|
|
94
|
+
* @throws When no tool of that name was built.
|
|
95
|
+
*/
|
|
96
|
+
export declare function registerCatalogTool(api: Pick<PluginApi, 'registerTool'>, catalogTools: ReadonlyMap<string, ToolDescriptor>, name: string): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/catalogTools.test
|
|
3
|
+
* Tests for the catalog-built toolset: the tool-name rule (D77), registration order, each rebuilt domain tool's request (method, path, query, body, bearer key), the destructive annotation, the 120 s timeout (D137), the error format (D31), and that every `watcher_*` name in the prompt rules and the skill is a built tool (Design 14).
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module plugin/constants
|
|
3
3
|
* Shared constants for the OpenClaw plugin package.
|
|
4
4
|
*/
|
|
5
|
-
export { COMPONENT_NAME, DEFAULT_PORT, PLUGIN_PACKAGE, SERVICE_PACKAGE, } from '@karmaniverous/jeeves-watcher-core';
|
|
5
|
+
export { API_KEY_ENV_VAR, COMPONENT_NAME, DEFAULT_PORT, PLUGIN_PACKAGE, SERVICE_PACKAGE, } from '@karmaniverous/jeeves-watcher-core';
|
|
6
6
|
/** Plugin identifier used in OpenClaw config (`plugins.entries.<id>`). */
|
|
7
7
|
export declare const PLUGIN_ID = "jeeves-watcher-openclaw";
|
|
8
8
|
/** Default watcher API base URL. */
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/distSmoke.test
|
|
3
|
+
* Smoke test of the built plugin (`dist/index.js`, as OpenClaw loads it): it registers the 18 tools in their 0.17.0 order (under their D77 names) from its bundled watcher-core and Zod, keeps `watcher_search` and `watcher_scan` `direct-only`, and a catalog-built tool sends the bearer key. Runs after `npm run build`; in CI (which builds before testing) a missing `dist` fails.
|
|
4
|
+
*/
|
|
5
|
+
export {};
|
package/dist/src/helpers.d.ts
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
* Watcher-specific convenience wrappers over `@karmaniverous/jeeves` core SDK.
|
|
3
3
|
*
|
|
4
4
|
* @remarks
|
|
5
|
-
* Only watcher-specific resolution logic
|
|
6
|
-
* utilities
|
|
7
|
-
*
|
|
5
|
+
* Only watcher-specific resolution logic (API URL, API key, config root)
|
|
6
|
+
* lives here. Core SDK types and utilities should be imported directly from
|
|
7
|
+
* `@karmaniverous/jeeves`; every watcher API request goes through core's
|
|
8
|
+
* catalog toolset (`catalogTools.ts`).
|
|
8
9
|
*
|
|
9
10
|
* @module plugin/helpers
|
|
10
11
|
*/
|
|
@@ -18,6 +19,17 @@ import { type PluginApi } from '@karmaniverous/jeeves';
|
|
|
18
19
|
* `DEFAULT_API_URL`. Safe to call per tool invocation.
|
|
19
20
|
*/
|
|
20
21
|
export declare function getApiUrl(api: PluginApi): string;
|
|
22
|
+
/**
|
|
23
|
+
* Resolve the watcher API bearer key, if configured.
|
|
24
|
+
*
|
|
25
|
+
* @remarks
|
|
26
|
+
* Resolution order: plugin-scoped config (`api.pluginConfig.apiKey`), then
|
|
27
|
+
* `plugins.entries.<id>.config.apiKey`, then `JEEVES_WATCHER_API_KEY`. Blank
|
|
28
|
+
* values count as unset. Resolved per request; never logged.
|
|
29
|
+
*
|
|
30
|
+
* @returns The key, or `undefined` when unset (requests carry no header).
|
|
31
|
+
*/
|
|
32
|
+
export declare function getApiKey(api: PluginApi): string | undefined;
|
|
21
33
|
/**
|
|
22
34
|
* Resolve the platform config root path, if configured.
|
|
23
35
|
*
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @module plugin/promptContext
|
|
3
|
-
*
|
|
3
|
+
* Injects the descriptor's always-in-context rules (`promptRules`, from watcher-core) via `before_prompt_build`.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
6
|
* Replaces the v0.x TOOLS.md `## Watcher` section that core's
|
|
7
|
-
* `ComponentWriter` wrote on a timer.
|
|
8
|
-
*
|
|
9
|
-
* `watcher_status` and `watcher_config`, and detail lives in the skill.
|
|
7
|
+
* `ComponentWriter` wrote on a timer. Core registers nothing itself: the
|
|
8
|
+
* plugin passes the descriptor's `promptRules` to `registerPromptContext`.
|
|
10
9
|
*/
|
|
11
|
-
import { type PluginApi } from '@karmaniverous/jeeves';
|
|
12
|
-
/** Static watcher rules the agent must see on every turn. */
|
|
13
|
-
export declare const WATCHER_PROMPT_CONTEXT: string;
|
|
10
|
+
import { type JeevesComponentDescriptor, type PluginApi } from '@karmaniverous/jeeves';
|
|
14
11
|
/**
|
|
15
|
-
* Register the
|
|
12
|
+
* Register the component's prompt rules with OpenClaw's `before_prompt_build` hook.
|
|
16
13
|
*
|
|
17
|
-
* @
|
|
14
|
+
* @param api - Plugin API.
|
|
15
|
+
* @param component - Descriptor carrying `promptRules`.
|
|
16
|
+
* @returns `true` when the hook was registered; `false` when the host has no
|
|
17
|
+
* `api.on` or the descriptor has no rules.
|
|
18
18
|
*/
|
|
19
|
-
export declare function registerWatcherPromptContext(api: PluginApi): boolean;
|
|
19
|
+
export declare function registerWatcherPromptContext(api: PluginApi, component: Pick<JeevesComponentDescriptor, 'promptRules'>): boolean;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module plugin/skillFiles
|
|
3
|
+
* Writes the watcher skill (descriptor `skill`, from watcher-core) as `SKILL.md` into the plugin's dist, the folder `openclaw.plugin.json` lists under `skills`. Used by the build (`scripts/build-skills.ts`); writes files.
|
|
4
|
+
*/
|
|
5
|
+
/** Skill folder relative to the dist directory (manifest `skills[0]` minus `dist/`). */
|
|
6
|
+
export declare const SKILL_DIR = "skills/jeeves-watcher";
|
|
7
|
+
/**
|
|
8
|
+
* Write `skill` to `<distDir>/skills/jeeves-watcher/SKILL.md`.
|
|
9
|
+
*
|
|
10
|
+
* @param distDir - The plugin's dist directory.
|
|
11
|
+
* @param skill - Skill markdown (the descriptor's `skill`).
|
|
12
|
+
* @returns The path written.
|
|
13
|
+
*/
|
|
14
|
+
export declare function writeSkill(distDir: string, skill: string): string;
|
|
@@ -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
|
@@ -7,15 +7,17 @@
|
|
|
7
7
|
* error only when its implementation actually reads `configRoot`. Tools
|
|
8
8
|
* that only call the service HTTP API keep working without it.
|
|
9
9
|
*
|
|
10
|
-
* Audit of the
|
|
11
|
-
* - `watcher_status`, `watcher_config`, `watcher_config_apply
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
10
|
+
* Audit of the tools the plugin registers:
|
|
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).
|
|
15
|
+
* - `watcher_service` (core standard toolset): only `install` reads
|
|
16
|
+
* `configRoot` (`createServiceManager` → `resolveConfigFilePath` →
|
|
15
17
|
* `getComponentConfigDir`); the other actions query or drive the OS
|
|
16
18
|
* service manager by service name.
|
|
17
19
|
*
|
|
18
|
-
* The 14 domain tools
|
|
20
|
+
* The 14 domain tools come from the same core toolset (D38): HTTP only,
|
|
19
21
|
* never gated.
|
|
20
22
|
*/
|
|
21
23
|
/** Decides, per call, whether a tool invocation reads `configRoot`. */
|
|
@@ -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,8 +3,9 @@
|
|
|
3
3
|
* Jeeves component descriptor for the watcher OpenClaw plugin.
|
|
4
4
|
*
|
|
5
5
|
* @remarks
|
|
6
|
-
* Feeds `createPluginToolset()` (`
|
|
7
|
-
*
|
|
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
|
|
8
9
|
* (`packages/service/src/descriptor.ts`) is the canonical source for the
|
|
9
10
|
* config schema and CLI commands.
|
|
10
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-0",
|
|
6
6
|
"skills": ["dist/skills/jeeves-watcher"],
|
|
7
7
|
"configSchema": {
|
|
8
8
|
"type": "object",
|
|
@@ -13,6 +13,10 @@
|
|
|
13
13
|
"description": "jeeves-watcher API base URL",
|
|
14
14
|
"default": "http://127.0.0.1:1936"
|
|
15
15
|
},
|
|
16
|
+
"apiKey": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Bearer key sent as Authorization: Bearer <key> on every watcher API request; must match the service's api.apiKey. Falls back to the JEEVES_WATCHER_API_KEY env var. Unset: no header."
|
|
19
|
+
},
|
|
16
20
|
"configRoot": {
|
|
17
21
|
"type": "string",
|
|
18
22
|
"description": "Platform config root path (e.g. /srv/jeeves/config). No default: set it here (jeeves install --config-root) or via the JEEVES_CONFIG_ROOT env var."
|
|
@@ -26,19 +30,19 @@
|
|
|
26
30
|
"watcher_config_apply",
|
|
27
31
|
"watcher_service",
|
|
28
32
|
"watcher_search",
|
|
29
|
-
"
|
|
30
|
-
"
|
|
33
|
+
"watcher_set_metadata",
|
|
34
|
+
"watcher_validate_config",
|
|
31
35
|
"watcher_reindex",
|
|
32
36
|
"watcher_scan",
|
|
33
|
-
"
|
|
37
|
+
"watcher_list_issues",
|
|
34
38
|
"watcher_walk",
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"
|
|
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"
|
|
42
46
|
]
|
|
43
47
|
},
|
|
44
48
|
"uiHints": {
|
|
@@ -46,6 +50,11 @@
|
|
|
46
50
|
"label": "Watcher API URL",
|
|
47
51
|
"placeholder": "http://127.0.0.1:1936"
|
|
48
52
|
},
|
|
53
|
+
"apiKey": {
|
|
54
|
+
"label": "Watcher API key",
|
|
55
|
+
"help": "Sent as a bearer token; matches the service's api.apiKey. Leave unset when the API has no key.",
|
|
56
|
+
"sensitive": true
|
|
57
|
+
},
|
|
49
58
|
"configRoot": {
|
|
50
59
|
"label": "Config root",
|
|
51
60
|
"placeholder": "/path/to/config"
|
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.3
|
|
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.
|
|
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
|
".": {
|
|
@@ -67,9 +67,14 @@
|
|
|
67
67
|
"tagName": "openclaw/${version}"
|
|
68
68
|
},
|
|
69
69
|
"github": {
|
|
70
|
-
"release": true
|
|
70
|
+
"release": true,
|
|
71
|
+
"releaseName": "${name.split('/').pop()}@${version}",
|
|
72
|
+
"releaseNotes": "npx git-cliff --tag openclaw/${version} --unreleased --strip header"
|
|
71
73
|
},
|
|
72
74
|
"hooks": {
|
|
75
|
+
"before:init": [
|
|
76
|
+
"node ../../scripts/check-core-range.mjs"
|
|
77
|
+
],
|
|
73
78
|
"after:bump": [
|
|
74
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)+'')\"",
|
|
75
80
|
"npx prettier --write openclaw.plugin.json",
|
|
@@ -88,7 +93,7 @@
|
|
|
88
93
|
"git switch ${branchName}"
|
|
89
94
|
],
|
|
90
95
|
"before:npm:release": [
|
|
91
|
-
"npx git-cliff -o CHANGELOG.md",
|
|
96
|
+
"npx git-cliff --tag openclaw/${version} -o CHANGELOG.md",
|
|
92
97
|
"git add -A"
|
|
93
98
|
]
|
|
94
99
|
},
|
|
@@ -115,5 +120,5 @@
|
|
|
115
120
|
},
|
|
116
121
|
"type": "module",
|
|
117
122
|
"types": "dist/index.d.ts",
|
|
118
|
-
"version": "0.
|
|
123
|
+
"version": "0.18.0-0"
|
|
119
124
|
}
|
package/dist/src/apiTool.d.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module plugin/apiTool
|
|
3
|
-
* Generic HTTP-backed watcher tool registration: config shape, request helpers, and ok/connectionFail wrapping.
|
|
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
|
-
/** Register a single API tool with standard try/catch + ok/connectionFail. */
|
|
33
|
-
export declare function registerApiTool(api: PluginApi, baseUrl: string, config: ApiToolConfig): void;
|
|
34
|
-
/** Build a query string from defined params. */
|
|
35
|
-
export declare function buildQuery(params: Record<string, unknown>, keys: string[]): string;
|
|
36
|
-
/** Pick defined keys from params into a body object. */
|
|
37
|
-
export declare function pickDefined(params: Record<string, unknown>, keys: string[]): Record<string, unknown>;
|
|
@@ -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,15 +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
|
-
/**
|
|
7
|
-
* Register the 14 domain-specific watcher_* tools with the OpenClaw plugin API.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* `watcher_search` and `watcher_scan` are `catalogMode: 'direct-only'` so
|
|
11
|
-
* OpenClaw Tool Search keeps them model-visible: semantic search must be a
|
|
12
|
-
* direct tool or the model reaches for grep first. All other tools remain
|
|
13
|
-
* catalog-eligible.
|
|
14
|
-
*/
|
|
15
|
-
export declare function registerWatcherTools(api: PluginApi, baseUrl: string): void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
File without changes
|