The @karmaniverous/jeeves-watcher-openclaw plugin gives your OpenClaw agent access to jeeves-watcher's semantic search, metadata enrichment, and management capabilities.
The plugin is a standard OpenClaw plugin with no installer of its own. On a Jeeves box, jeeves install (from @karmaniverous/jeeves 0.6+) installs it and writes its config:
jeeves install --workspace /srv/jeeves/workspace --config-root /srv/jeeves/config watcher
Without --workspace, jeeves install takes the current folder as the workspace and writes its platform files there.
Or install it directly with the OpenClaw CLI and set the config yourself:
openclaw plugins install npm:@karmaniverous/jeeves-watcher-openclaw@<version> --pin --accept-capabilities --force
--force confirms the npm source and replaces an installed version; without it a non-interactive install is cancelled.
The plugin registers an always-in-context rule set through OpenClaw's before_prompt_build hook, so it needs plugins.entries.jeeves-watcher-openclaw.hooks.allowConversationAccess: true. jeeves install / jeeves update grant this automatically (the hook is declared in package.json under jeeves.conversationHooks).
Restart the OpenClaw gateway to apply changes.
Plugin config lives in openclaw.json under plugins.entries.jeeves-watcher-openclaw.config:
{
"apiUrl": "http://127.0.0.1:1936",
"apiKey": "<the service api.apiKey>",
"configRoot": "/srv/jeeves/config"
}
apiUrl: jeeves-watcher API base URL (default: http://127.0.0.1:1936; env fallback JEEVES_WATCHER_URL).apiKey (optional): bearer key sent as Authorization: Bearer <key> on every watcher API request; it must match the service's api.apiKey. Env fallback JEEVES_WATCHER_API_KEY. Resolved on every call and never logged. Unset (the default): no header is sent, exactly as before. If the service requires a key and it is missing or wrong, tools return an HTTP 401 unauthorized error naming both ways to set it (see Errors). Only watcher_status (GET /status is always open) and watcher_service (no HTTP) do not use it.configRoot: platform config root path, used by @karmaniverous/jeeves core to derive {configRoot}/jeeves-watcher/. No default. Set it in plugin config or via the JEEVES_CONFIG_ROOT env var.configRoot is resolved lazily. The plugin always registers, even before its config is written (openclaw plugins install activates a plugin before jeeves install writes plugins.entries.<id>.config). While configRoot is unset the plugin logs one warning at registration. Gating is per call: only invocations that actually read configRoot are gated. Today that is exactly watcher_service with action: "install" (it derives the service config path from configRoot); it returns an error naming both ways to set it. Other watcher_service actions (uninstall, start, stop, restart, status) address the OS service by name, and every other tool only calls the watcher HTTP API, so they keep working without configRoot. Core is initialized on the first gated call after it resolves.
The plugin registers 22 tools (contracts.tools in openclaw.plugin.json), all as optional tools. Core's toolset (createPluginToolset in @karmaniverous/jeeves) builds all of them: watcher_service, plus 21 from the watcher's endpoint catalog (WATCHER_CATALOG in @karmaniverous/jeeves-watcher-core), each named watcher_ plus its catalog entry in snake_case (showVcsFile becomes watcher_show_vcs_file). Their parameters are generated from the catalog's request schemas, so they reject unknown parameters and carry the server's bounds. Each of those 21 calls the watcher through one method of the SDK (@karmaniverous/jeeves-watcher-sdk, the method named by the catalog entry), which checks a successful reply against the entry's response schema: a field the schema does not declare is dropped, an object's keys print in schema order, and a reply the schema rejects reads Error: <entry> response did not match the expected shape. An error reply still reads HTTP <status>: <body> with the server's body verbatim. The SDK and watcher-core are runtime dependencies that openclaw plugins install installs; the plugin bundles neither. Every call waits up to 120 s (core's default; watcher_status waits 5 s); a timeout does not cancel the operation on the service, so check the outcome (for example with watcher_check_vcs_exclusion) before retrying a state change. Every HTTP tool reads apiUrl and the API key on each call and sends the key when one is configured (watcher_status never needs it).
A non-2xx response from the watcher API becomes a tool error (prefixed Error: ):
HTTP <status>: <body>, with the server's JSON body verbatim: Fastify's standard error body { statusCode, code?, error, message } (watcher 0.22.0+), e.g. HTTP 503: {"statusCode":503,"code":"WATCHER_SCAN_IN_PROGRESS","error":"Service Unavailable","message":"The initial filesystem scan is still running; retry when it finishes."}. Branch on code (WATCHER_*, JEEVES_* or FST_ERR_*); an unexpected failure is a 500 with no code. A 401 is HTTP 401: {"statusCode":401,"code":"WATCHER_UNAUTHORIZED","error":"Unauthorized","message":"A valid API key is required: send Authorization: Bearer <key>."}; the skill's troubleshooting section says how to supply or fix the key. The tool passes the body only, not headers, so a message that comes with Retry-After states the wait itself. Parameters that fail the tool's own schema are rejected before any request is sent.Service not reachable at <apiUrl>. with a hint to set apiUrl.watcher_statusReturns service health, uptime, and Qdrant collection statistics (GET /status, which never requires the API key). No parameters.
watcher_searchSemantic search across all indexed documents (POST /search). Pass a natural-language query and optional filters. Returns { id, score, payload } hits ordered by score; a source document's payload carries source and no file_path.
Parameters:
query (string, required, non-empty) — search textlimit (integer > 0) — max results (default: 10)offset (integer ≥ 0) — skip N results for paginationfilter (object) — Qdrant filter conditionsRegistered catalogMode: 'direct-only' (see the README's Tool Search section).
watcher_set_metadataSet or update metadata on a document by file path or source reference (POST /metadata). Metadata is validated against the schemas of the rules matching the document and merged into its points without re-embedding. Returns { ok: true, matched_rules }.
Parameters:
path (string) or source (string): exactly one; the file path or source reference of the documentmetadata (object, required) — key-value metadata to set on the documentwatcher_configQuery the effective runtime config via JSONPath (GET /config). Returns the full resolved merged document when no path is provided. Useful for discovering available inference rules, schemas, and runtime values. Only the allow-listed keys (description, watch, configWatch, search, schemas, inferenceRules, mapHelpers, templateHelpers, maps, templates) plus issues are included; api, sources and provider keys never are. Built by core's toolset from the catalog's config entry, with the API key.
Parameters:
path (string, optional) — JSONPath expressionwatcher_validate_configValidate a candidate config (or the current config if omitted), optionally testing file paths against it (POST /config/validate). Returns { valid: false, errors }, or { valid: true, warnings?, testResults? } with { path, matchedRules, metadata, error? } per test path.
Parameters:
config (object) — candidate config (partial or full); merged into the running config (top-level keys replace, inferenceRules merge by name). Omit to validate the current config.testPaths (string[]) — file paths to test against the config for a dry-run previewwatcher_config_applyApply a config patch to the running watcher service (POST /config/apply, body { patch }). The patch is deep-merged into the service's config file (inferenceRules by rule name), validated and written; the configWatch.reindex scope (default issues, files only) is then triggered. Built by core's toolset from the catalog's configApply entry, with the API key; the tool's config parameter is sent as patch.
Parameters:
config (object, required) — config patch to applyreplace (boolean) — replace the whole config with the patch instead of mergingReturns { applied: true, config }. The echoed config is redacted through the same allow-list as GET /config (api, sources and provider keys are never echoed). When the config was written but the post-write apply step failed, the response also carries warning (a string). An invalid merged config is an HTTP 400 with code JEEVES_CONFIG_INVALID and the issues folded into its message; use watcher_validate_config to see the individual errors. A config file the service cannot read or write is HTTP 500 with JEEVES_CONFIG_READ_FAILED or JEEVES_CONFIG_WRITE_FAILED, with the cause in the service log.
watcher_reindexTrigger a scoped reindex (POST /reindex). Supports rules, full, issues, path, and prune scopes; the tool sends rules when scope is omitted, as 0.17.0 did (the HTTP API defaults to issues). Non-prune scopes return a blast area plan (files plus source documents). Live prune returns immediately without a plan. Explicit reindexes also cover source documents in full, rules (without path) and issues; path and prune cover files only (prune never deletes source points). Progress is reported by watcher_status under health.reindex. To reindex specific source references, pass scope: "path" with source.
Parameters:
scope (string): reindex scope (default: rules)path (string | string[]) — target file(s) or directories for path scope (required there); globs narrowing rules scopedryRun (boolean) — compute plan without executingsource (string | string[]): source references for path scope (instead of path)watcher_walkList watched files matching globs (POST /walk), from the filesystem watcher's inventory across all configured watch roots: only files that pass its filters (globs, watch.ignored, gitignore), sorted by path. Returns { paths, matchedCount, scannedRoots }; HTTP 503 with WATCHER_SCAN_IN_PROGRESS until the initial scan completes.
Parameters:
globs (string[], required) — glob patterns to intersect with watch pathswatcher_scanFilter-only point query without vector search (POST /scan). Returns metadata for points matching a Qdrant filter. Use for structural queries: file enumeration, staleness checks, domain listing, counts.
Parameters:
filter (object, required) — Qdrant filter objectlimit (integer, 1 to 1000) — page size (default: 100)cursor (string or number) — opaque cursor from previous response for paginationfields (string[]) — payload fields to return (projection)countOnly (boolean) — if true, return { count } instead of pointswatcher_list_issuesList current processing issues (GET /issues): files and source documents with template or rule errors, or failed extraction, embedding, upsert, rule matching or source retrieval. Returns { count, issues }, where issues maps each file path or source reference to its issue records (type, message, timestamp, and context fields). No parameters.
watcher_serviceManage the watcher background service (install, uninstall, start, stop, restart, status). No HTTP call.
Parameters:
action (string, required) — one of: install, uninstall, start, stop, restart, statuswatcher_get_vcs_statusGet version tracking health: enabled state, tracked roots, remote status, last activity (GET /vcs/status). No parameters.
watcher_list_vcs_historyQuery change history by path or glob with optional date range (GET /vcs/history).
Parameters:
glob (string, required) — path or glob pattern to query history forsince (string) — start date (ISO 8601 or git date string)until (string) — end date (ISO 8601 or git date string)limit (number) — maximum number of history entries to returnwatcher_show_vcs_fileRetrieve file content at a specific version (GET /vcs/show). Returns the file's text, whatever its type (before the catalog slice the tool failed on any file that was not JSON). Built by core's toolset from the catalog's vcsShow entry.
Parameters:
path (string, required, non-empty) — file path to retrievecommit (string, required, non-empty) — version identifierwatcher_diff_vcsShow what changed between two versions, or between a version and current (GET /vcs/diff).
Parameters:
glob (string, required) — path or glob pattern to diffcommit (string, required) — start version identifiercommitEnd (string) — end version identifier (defaults to current if omitted)watcher_revert_vcsUndo changes by restoring files to a specific version (POST /vcs/revert).
Parameters:
glob (string, required) — path or glob pattern to revertcommit (string, required) — version to restore files toexistingOnly (boolean) — when true, only revert files that currently exist (skip deleted files)watcher_exclude_vcs_pathExclude a path from version history while keeping it in search, or remove the exclusion (POST /vcs/exclude). Adding writes a root-anchored pattern to the root's .git/info/exclude and untracks the files it matches, ending their history (the files stay on disk).
Parameters:
glob (string, required) — one gitignore pattern, absolute under a tracked root or relative to root (a glob starting with / is a filesystem path); brackets are a character class, so escape them to name a file literally (Report \[draft\].docx)root (string) — tracked root to target (defaults to auto-detect); a glob outside it is refusedremove (boolean) — when true, remove the exclusion rule (untracked files are not re-added)confirm (boolean) — required (true) when more than 100 files would be untracked; without it nothing changes and the tool returns { "confirmRequired": true, "untracked": <n> } (not an error): check the count with the user, then repeat with confirm: truewatcher_check_vcs_exclusionCheck whether git ignores a path and why: the rule, the file holding it (.git/info/exclude for a VCS-only exclusion) and its line (GET /vcs/check-exclusion). A tracked path is never reported ignored.
Parameters:
path (string, required) — file path to check exclusion status forFour read tools over existing endpoints (D206). Like every tool but watcher_search and watcher_scan, they are deferred: OpenClaw Tool Search lists them in one line and loads a schema when the agent looks for it. The Facets guide explains facets end to end.
watcher_list_facetsList the search facets (GET /search/facets): every field a rule schema gives a uiHint or enum, with its type, hint, rules and values (the declared enum, else the values recorded per rule for the list hints dropdown, tags, select, multiselect). Values are per rule, never per tenant.
Parameters:
rules (string) — comma-separated rule names: only those rules' fields and valueswatcher_count_facetsCount documents per value of facet fields under an optional filter, or give { min, max } for number, date and range fields (POST /search/facets/counts). Each document counts once; counts are approximate. A field without a payload index answers HTTP 400; the route answers HTTP 503 while its system indexes build or past its 10 s budget.
Parameters:
fields (string[], required, 1 to 20) — payload fields to countfilter (object) — Qdrant filter scoping the counts (e.g. a tenant condition)rules (string[]) — only documents of these ruleslimit (integer, 1 to 1000) — most values per field (default 100)watcher_renderRender a document through the inference rules it matches (POST /render): { renderAs, content, rules, metadata }. It reads the whole file, whatever its size.
Parameters:
path (string) or source (string): exactly one; the file path, or a source reference fetched through its callbackwatcher_match_configTest file paths against the inference rules and watch scope without reading the files (POST /config/match): per path, { rules, watched }.
Parameters:
paths (string[], required) — file paths to test
The plugin builds on @karmaniverous/jeeves 0.7 (static-content core since 0.6). It writes no workspace files and starts no timers:
before_prompt_build (registerPromptContext). They replace the v0.x TOOLS.md ## Watcher section.watcher_status, watcher_config) rather than a refreshed file.jeeves-watcher ships in the package and is declared in openclaw.plugin.json (skills).jeeves install."Search the watcher for documents about authentication configuration"
The agent calls watcher_search with the query and returns matching document chunks with their source paths and metadata.
"Is the watcher service running? How many documents are indexed?"
The agent calls watcher_status and reports uptime, health, and collection point count.
"Are there any files that failed to index?"
The agent calls watcher_list_issues and summarizes any errors or warnings.
"I updated the watcher config — please reindex everything"
The agent calls watcher_config_apply (if a new config is provided), then watcher_reindex with scope: "full", previewing the blast area with dryRun: true first.