@karmaniverous/jeeves-watcher-openclaw 0.15.3 → 0.15.5

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/cli.js CHANGED
@@ -27068,12 +27068,12 @@ const vcsConfigSchema = object$1({
27068
27068
  author: vcsAuthorConfigSchema
27069
27069
  .optional()
27070
27070
  .describe('Git commit author identity. Set per-repo during init. Defaults: name="jeeves-watcher", email="watcher@localhost".'),
27071
- /** Debounce interval in milliseconds for batching commits. */
27072
- commitDebounceMs: number$2()
27071
+ /** Throttle interval in milliseconds for batching commits. */
27072
+ commitThrottleMs: number$2()
27073
27073
  .int()
27074
27074
  .min(1000)
27075
27075
  .default(30000)
27076
- .describe('Debounce interval in milliseconds for batching commits. Default: 30000.'),
27076
+ .describe('Throttle interval in milliseconds for batching commits. Default: 30000.'),
27077
27077
  /** Maximum number of files per commit batch. */
27078
27078
  maxBatchSize: number$2()
27079
27079
  .int()
@@ -27092,6 +27092,18 @@ const vcsConfigSchema = object$1({
27092
27092
  defaultAccessToken: string$2()
27093
27093
  .optional()
27094
27094
  .describe('Default git access token for all roots. Supports env var substitution (e.g., "${GIT_TOKEN}").'),
27095
+ /** Age in ms after which an index.lock is considered stale and force-removed. */
27096
+ staleLockThresholdMs: number$2()
27097
+ .int()
27098
+ .min(5000)
27099
+ .default(60000)
27100
+ .describe('Age in ms after which an index.lock is considered stale and force-removed. Default: 60000.'),
27101
+ /** Circuit breaker: stop re-queuing after this many consecutive commit failures. */
27102
+ maxConsecutiveFailures: number$2()
27103
+ .int()
27104
+ .min(1)
27105
+ .default(5)
27106
+ .describe('Circuit breaker: stop re-queuing after this many consecutive commit failures. Default: 5.'),
27095
27107
  });
27096
27108
  /**
27097
27109
  * Per-root VCS overrides extending the root-level VCS config.
package/dist/index.js CHANGED
@@ -27005,6 +27005,197 @@ const DEFAULT_PORT = DEFAULT_PORTS.watcher;
27005
27005
  ({
27006
27006
  port: DEFAULT_PORTS.watcher});
27007
27007
 
27008
+ /**
27009
+ * Shared endpoint catalog — single source of truth for the jeeves-watcher API.
27010
+ *
27011
+ * Both the CLI service and the OpenClaw plugin derive their registrations
27012
+ * from this declarative catalog, eliminating drift between the two.
27013
+ *
27014
+ */
27015
+ /**
27016
+ * Canonical endpoint catalog for the jeeves-watcher API.
27017
+ *
27018
+ * Every entry describes a single HTTP endpoint exposed by the service.
27019
+ * Route handlers, plugin tools, and HTTP clients should reference these
27020
+ * descriptors rather than hard-coding paths and descriptions.
27021
+ */
27022
+ const WATCHER_ENDPOINTS = [
27023
+ {
27024
+ name: 'status',
27025
+ method: 'GET',
27026
+ path: '/status',
27027
+ description: 'Service health and status overview.',
27028
+ },
27029
+ {
27030
+ name: 'metadata',
27031
+ method: 'POST',
27032
+ path: '/metadata',
27033
+ description: 'Set or update metadata on a document by file path.',
27034
+ },
27035
+ {
27036
+ name: 'render',
27037
+ method: 'POST',
27038
+ path: '/render',
27039
+ description: 'Render a document through the template pipeline.',
27040
+ },
27041
+ {
27042
+ name: 'searchFacets',
27043
+ method: 'GET',
27044
+ path: '/search/facets',
27045
+ description: 'List available search facets and their values.',
27046
+ },
27047
+ {
27048
+ name: 'scan',
27049
+ method: 'POST',
27050
+ path: '/scan',
27051
+ description: 'Filter-only point query without vector search. Returns metadata for points matching a Qdrant filter.',
27052
+ },
27053
+ {
27054
+ name: 'walk',
27055
+ method: 'POST',
27056
+ path: '/walk',
27057
+ description: 'Walk watched filesystem paths with glob intersection. Returns matching file paths.',
27058
+ },
27059
+ {
27060
+ name: 'search',
27061
+ method: 'POST',
27062
+ path: '/search',
27063
+ description: 'Semantic search over indexed documents. Supports Qdrant filters.',
27064
+ },
27065
+ {
27066
+ name: 'rebuildMetadata',
27067
+ method: 'POST',
27068
+ path: '/rebuild-metadata',
27069
+ description: 'Rebuild metadata from enrichment store into vector points.',
27070
+ },
27071
+ {
27072
+ name: 'reindex',
27073
+ method: 'POST',
27074
+ path: '/reindex',
27075
+ description: 'Trigger a scoped reindex of watched files.',
27076
+ },
27077
+ {
27078
+ name: 'issues',
27079
+ method: 'GET',
27080
+ path: '/issues',
27081
+ description: 'Get runtime embedding failures. Shows files that failed processing and why.',
27082
+ },
27083
+ {
27084
+ name: 'configSchema',
27085
+ method: 'GET',
27086
+ path: '/config/schema',
27087
+ description: 'Get the JSON Schema for the configuration file.',
27088
+ },
27089
+ {
27090
+ name: 'configMatch',
27091
+ method: 'POST',
27092
+ path: '/config/match',
27093
+ description: 'Test file paths against config inference rules.',
27094
+ },
27095
+ {
27096
+ name: 'config',
27097
+ method: 'GET',
27098
+ path: '/config',
27099
+ description: 'Query service configuration with optional JSONPath.',
27100
+ },
27101
+ {
27102
+ name: 'configValidate',
27103
+ method: 'POST',
27104
+ path: '/config/validate',
27105
+ description: 'Validate a candidate config. Optionally test file paths against the config.',
27106
+ },
27107
+ {
27108
+ name: 'configApply',
27109
+ method: 'POST',
27110
+ path: '/config/apply',
27111
+ description: 'Apply a configuration patch.',
27112
+ },
27113
+ {
27114
+ name: 'rulesRegister',
27115
+ method: 'POST',
27116
+ path: '/rules/register',
27117
+ description: 'Register external inference rules.',
27118
+ },
27119
+ {
27120
+ name: 'rulesUnregister',
27121
+ method: 'DELETE',
27122
+ path: '/rules/unregister',
27123
+ description: 'Unregister external inference rules.',
27124
+ },
27125
+ {
27126
+ name: 'rulesUnregisterBySource',
27127
+ method: 'DELETE',
27128
+ path: '/rules/unregister/:source',
27129
+ description: 'Unregister all external inference rules from a source.',
27130
+ },
27131
+ {
27132
+ name: 'pointsDelete',
27133
+ method: 'POST',
27134
+ path: '/points/delete',
27135
+ description: 'Delete points from the vector store by filter.',
27136
+ },
27137
+ {
27138
+ name: 'rulesReapply',
27139
+ method: 'POST',
27140
+ path: '/rules/reapply',
27141
+ description: 'Re-apply inference rules to existing vector points.',
27142
+ },
27143
+ {
27144
+ name: 'vcsStatus',
27145
+ method: 'GET',
27146
+ path: '/vcs/status',
27147
+ description: 'VCS state for all roots: enabled state, tracked files, last commit, remote status.',
27148
+ },
27149
+ {
27150
+ name: 'vcsHistory',
27151
+ method: 'GET',
27152
+ path: '/vcs/history',
27153
+ description: 'Query change history by path or glob with optional date range.',
27154
+ },
27155
+ {
27156
+ name: 'vcsShow',
27157
+ method: 'GET',
27158
+ path: '/vcs/show',
27159
+ description: 'Retrieve file content at a specific version.',
27160
+ },
27161
+ {
27162
+ name: 'vcsDiff',
27163
+ method: 'GET',
27164
+ path: '/vcs/diff',
27165
+ description: 'Show what changed between two versions, or between a version and current.',
27166
+ },
27167
+ {
27168
+ name: 'vcsCheckExclusion',
27169
+ method: 'GET',
27170
+ path: '/vcs/check-exclusion',
27171
+ description: 'Check whether a path is excluded from version tracking and why.',
27172
+ },
27173
+ {
27174
+ name: 'vcsRevert',
27175
+ method: 'POST',
27176
+ path: '/vcs/revert',
27177
+ description: 'Restore files from a historical commit (forward-only reversion).',
27178
+ },
27179
+ {
27180
+ name: 'vcsExclude',
27181
+ method: 'POST',
27182
+ path: '/vcs/exclude',
27183
+ description: 'Manage .gitignore entries for version tracking exclusion.',
27184
+ },
27185
+ ];
27186
+ /**
27187
+ * Look up an endpoint descriptor by name.
27188
+ *
27189
+ * @param name - The endpoint identifier.
27190
+ * @returns The matching {@link EndpointDescriptor}.
27191
+ */
27192
+ function getEndpoint(name) {
27193
+ const ep = WATCHER_ENDPOINTS.find((e) => e.name === name);
27194
+ if (!ep)
27195
+ throw new Error(`Unknown endpoint: ${name}`);
27196
+ return ep;
27197
+ }
27198
+
27008
27199
  /**
27009
27200
  * @module schemas/vcs
27010
27201
  * VCS (version control system) configuration schema for git-backed content versioning.
@@ -27078,12 +27269,12 @@ const vcsConfigSchema = object$1({
27078
27269
  author: vcsAuthorConfigSchema
27079
27270
  .optional()
27080
27271
  .describe('Git commit author identity. Set per-repo during init. Defaults: name="jeeves-watcher", email="watcher@localhost".'),
27081
- /** Debounce interval in milliseconds for batching commits. */
27082
- commitDebounceMs: number$2()
27272
+ /** Throttle interval in milliseconds for batching commits. */
27273
+ commitThrottleMs: number$2()
27083
27274
  .int()
27084
27275
  .min(1000)
27085
27276
  .default(30000)
27086
- .describe('Debounce interval in milliseconds for batching commits. Default: 30000.'),
27277
+ .describe('Throttle interval in milliseconds for batching commits. Default: 30000.'),
27087
27278
  /** Maximum number of files per commit batch. */
27088
27279
  maxBatchSize: number$2()
27089
27280
  .int()
@@ -27102,6 +27293,18 @@ const vcsConfigSchema = object$1({
27102
27293
  defaultAccessToken: string$2()
27103
27294
  .optional()
27104
27295
  .describe('Default git access token for all roots. Supports env var substitution (e.g., "${GIT_TOKEN}").'),
27296
+ /** Age in ms after which an index.lock is considered stale and force-removed. */
27297
+ staleLockThresholdMs: number$2()
27298
+ .int()
27299
+ .min(5000)
27300
+ .default(60000)
27301
+ .describe('Age in ms after which an index.lock is considered stale and force-removed. Default: 60000.'),
27302
+ /** Circuit breaker: stop re-queuing after this many consecutive commit failures. */
27303
+ maxConsecutiveFailures: number$2()
27304
+ .int()
27305
+ .min(1)
27306
+ .default(5)
27307
+ .describe('Circuit breaker: stop re-queuing after this many consecutive commit failures. Default: 5.'),
27105
27308
  });
27106
27309
  /**
27107
27310
  * Per-root VCS overrides extending the root-level VCS config.
@@ -27620,9 +27823,9 @@ async function generateWatcherMenu(apiUrl) {
27620
27823
  const scoreThresholds = { strong: 0.75, relevant: 0.5, noise: 0.25 };
27621
27824
  const fetchOpts = { signal: AbortSignal.timeout(MENU_FETCH_TIMEOUT_MS) };
27622
27825
  const [statusRes, thresholdsRes, vcsRes] = (await Promise.all([
27623
- fetchJson(`${apiUrl}/status`, fetchOpts),
27624
- fetchJson(`${apiUrl}/config?path=${encodeURIComponent('$.search.scoreThresholds')}`, fetchOpts),
27625
- fetchJson(`${apiUrl}/vcs/status`, fetchOpts).catch(() => ({
27826
+ fetchJson(`${apiUrl}${getEndpoint('status').path}`, fetchOpts),
27827
+ fetchJson(`${apiUrl}${getEndpoint('config').path}?path=${encodeURIComponent('$.search.scoreThresholds')}`, fetchOpts),
27828
+ fetchJson(`${apiUrl}${getEndpoint('vcsStatus').path}`, fetchOpts).catch(() => ({
27626
27829
  enabled: false,
27627
27830
  })),
27628
27831
  ]));
@@ -27789,7 +27992,7 @@ function registerWatcherTools(api, baseUrl) {
27789
27992
  'offset',
27790
27993
  'filter',
27791
27994
  ]);
27792
- return ['/search', body];
27995
+ return [getEndpoint('search').path, body];
27793
27996
  },
27794
27997
  },
27795
27998
  {
@@ -27810,7 +28013,7 @@ function registerWatcherTools(api, baseUrl) {
27810
28013
  },
27811
28014
  },
27812
28015
  buildRequest: (params) => [
27813
- '/metadata',
28016
+ getEndpoint('metadata').path,
27814
28017
  { path: params.path, metadata: params.metadata },
27815
28018
  ],
27816
28019
  },
@@ -27833,7 +28036,7 @@ function registerWatcherTools(api, baseUrl) {
27833
28036
  },
27834
28037
  buildRequest: (params) => {
27835
28038
  const body = pickDefined(params, ['config', 'testPaths']);
27836
- return ['/config/validate', body];
28039
+ return [getEndpoint('configValidate').path, body];
27837
28040
  },
27838
28041
  },
27839
28042
  {
@@ -27861,7 +28064,7 @@ function registerWatcherTools(api, baseUrl) {
27861
28064
  },
27862
28065
  },
27863
28066
  buildRequest: (params) => [
27864
- '/reindex',
28067
+ getEndpoint('reindex').path,
27865
28068
  {
27866
28069
  scope: params.scope ?? 'rules',
27867
28070
  ...(params.path ? { path: params.path } : {}),
@@ -27907,14 +28110,14 @@ function registerWatcherTools(api, baseUrl) {
27907
28110
  'fields',
27908
28111
  'countOnly',
27909
28112
  ]);
27910
- return ['/scan', body];
28113
+ return [getEndpoint('scan').path, body];
27911
28114
  },
27912
28115
  },
27913
28116
  {
27914
28117
  name: 'watcher_issues',
27915
28118
  description: 'Get runtime embedding failures. Shows files that failed processing and why.',
27916
28119
  parameters: { type: 'object', properties: {} },
27917
- buildRequest: () => ['/issues'],
28120
+ buildRequest: () => [getEndpoint('issues').path],
27918
28121
  },
27919
28122
  {
27920
28123
  name: 'watcher_walk',
@@ -27930,14 +28133,17 @@ function registerWatcherTools(api, baseUrl) {
27930
28133
  },
27931
28134
  },
27932
28135
  },
27933
- buildRequest: (params) => ['/walk', { globs: params.globs }],
28136
+ buildRequest: (params) => [
28137
+ getEndpoint('walk').path,
28138
+ { globs: params.globs },
28139
+ ],
27934
28140
  },
27935
28141
  // ── VCS tools ──────────────────────────────────────────────────────
27936
28142
  {
27937
28143
  name: 'watcher_vcs_status',
27938
28144
  description: 'Get version tracking health: enabled state, tracked roots, remote status, last activity',
27939
28145
  parameters: { type: 'object', properties: {} },
27940
- buildRequest: () => ['/vcs/status'],
28146
+ buildRequest: () => [getEndpoint('vcsStatus').path],
27941
28147
  },
27942
28148
  {
27943
28149
  name: 'watcher_vcs_history',
@@ -27965,7 +28171,7 @@ function registerWatcherTools(api, baseUrl) {
27965
28171
  },
27966
28172
  },
27967
28173
  buildRequest: (params) => [
27968
- `/vcs/history${buildQuery(params, ['glob', 'since', 'until', 'limit'])}`,
28174
+ `${getEndpoint('vcsHistory').path}${buildQuery(params, ['glob', 'since', 'until', 'limit'])}`,
27969
28175
  ],
27970
28176
  },
27971
28177
  {
@@ -27986,7 +28192,7 @@ function registerWatcherTools(api, baseUrl) {
27986
28192
  },
27987
28193
  },
27988
28194
  buildRequest: (params) => [
27989
- `/vcs/show${buildQuery(params, ['path', 'commit'])}`,
28195
+ `${getEndpoint('vcsShow').path}${buildQuery(params, ['path', 'commit'])}`,
27990
28196
  ],
27991
28197
  },
27992
28198
  {
@@ -28011,7 +28217,7 @@ function registerWatcherTools(api, baseUrl) {
28011
28217
  },
28012
28218
  },
28013
28219
  buildRequest: (params) => [
28014
- `/vcs/diff${buildQuery(params, ['glob', 'commit', 'commitEnd'])}`,
28220
+ `${getEndpoint('vcsDiff').path}${buildQuery(params, ['glob', 'commit', 'commitEnd'])}`,
28015
28221
  ],
28016
28222
  },
28017
28223
  {
@@ -28037,7 +28243,7 @@ function registerWatcherTools(api, baseUrl) {
28037
28243
  },
28038
28244
  buildRequest: (params) => {
28039
28245
  const body = pickDefined(params, ['glob', 'commit', 'existingOnly']);
28040
- return ['/vcs/revert', body];
28246
+ return [getEndpoint('vcsRevert').path, body];
28041
28247
  },
28042
28248
  },
28043
28249
  {
@@ -28063,7 +28269,7 @@ function registerWatcherTools(api, baseUrl) {
28063
28269
  },
28064
28270
  buildRequest: (params) => {
28065
28271
  const body = pickDefined(params, ['glob', 'root', 'remove']);
28066
- return ['/vcs/exclude', body];
28272
+ return [getEndpoint('vcsExclude').path, body];
28067
28273
  },
28068
28274
  },
28069
28275
  {
@@ -28080,7 +28286,7 @@ function registerWatcherTools(api, baseUrl) {
28080
28286
  },
28081
28287
  },
28082
28288
  buildRequest: (params) => [
28083
- `/vcs/check-exclusion${buildQuery(params, ['path'])}`,
28289
+ `${getEndpoint('vcsCheckExclusion').path}${buildQuery(params, ['path'])}`,
28084
28290
  ],
28085
28291
  },
28086
28292
  ];
@@ -889,6 +889,8 @@ watcher_vcs_check: path="J:/domains/jira/PROJ-123.json"
889
889
 
890
890
  Version tracking is controlled by the `vcs.enabled` config setting. When set to `true`, the watcher automatically versions all watched files. No additional setup is required — just enable it and history starts accumulating.
891
891
 
892
+ Squash retention activates by default when VCS is enabled, even without explicit `retention` config. The defaults are: 30 days max age, 100 versions max, and a daily midnight cron schedule (`0 0 * * *`). These defaults prevent unbounded commit history growth.
893
+
892
894
  ### Excluding Paths
893
895
 
894
896
  Not all watched files need version history. For example, if Jira issues are synced read-only, there's nothing to "undo." Use `watcher_vcs_exclude` to stop tracking specific paths.
@@ -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.15.3",
5
+ "version": "0.15.5",
6
6
  "skills": [
7
7
  "dist/skills/jeeves-watcher"
8
8
  ],
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@karmaniverous/jeeves": "^0.5.12",
11
- "@karmaniverous/jeeves-watcher-core": "^0.2.2"
11
+ "@karmaniverous/jeeves-watcher-core": "^0.2.4"
12
12
  },
13
13
  "description": "OpenClaw plugin for jeeves-watcher — semantic search and metadata enrichment tools",
14
14
  "devDependencies": {
@@ -112,5 +112,5 @@
112
112
  },
113
113
  "type": "module",
114
114
  "types": "dist/index.d.ts",
115
- "version": "0.15.3"
115
+ "version": "0.15.5"
116
116
  }