@karmaniverous/jeeves-meta-openclaw 0.4.0 → 0.5.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.
@@ -2,6 +2,10 @@
2
2
  * Rollup configuration for the OpenClaw plugin package.
3
3
  * Two entry points: plugin (ESM + declarations) and CLI (ESM executable).
4
4
  *
5
+ * `\@karmaniverous/jeeves` is BUNDLED into the plugin output — the plugin
6
+ * runs in OpenClaw's extensions directory where node_modules is not
7
+ * reliably available. All other node: builtins are externalized.
8
+ *
5
9
  * @module rollup.config
6
10
  */
7
11
  import type { RollupOptions } from 'rollup';
@@ -55,6 +55,31 @@ critic) runs in the background.
55
55
  - `path` (optional): Specific `.meta/` or owner directory path. If omitted,
56
56
  synthesizes the stalest candidate.
57
57
 
58
+ ### meta_seed
59
+ Create a new `.meta/` directory with a skeleton `meta.json` (containing a
60
+ UUID `_id`). Use this to bootstrap synthesis for a new path before the
61
+ first cycle runs.
62
+
63
+ **Parameters:**
64
+ - `path` (required): Owner directory path where `.meta/` will be created.
65
+
66
+ ### meta_unlock
67
+ Remove a stale `.lock` file from a meta entity. Locks are created during
68
+ synthesis and normally cleaned up automatically; use this when a synthesis
69
+ crashed and left a lock behind.
70
+
71
+ **Parameters:**
72
+ - `path` (required): `.meta/` or owner directory path with a stuck lock.
73
+
74
+ ### meta_config
75
+ Query the running service configuration. Supports optional JSONPath
76
+ filtering to extract specific settings. Sensitive fields (e.g.
77
+ `gatewayApiKey`) are redacted.
78
+
79
+ **Parameters:**
80
+ - `path` (optional): JSONPath expression (e.g. `$.schedule`). If omitted,
81
+ returns the full sanitized config.
82
+
58
83
  ## When to Use
59
84
 
60
85
  - **Checking synthesis health:** `meta_list`
@@ -63,6 +88,9 @@ critic) runs in the background.
63
88
  - **Getting full details:** `meta_detail` with optional `includeArchive: 5`
64
89
  - **Understanding what a cycle will do:** `meta_preview`
65
90
  - **Forcing a refresh:** `meta_trigger` with optional path
91
+ - **Seeding a new meta:** `meta_seed` with path
92
+ - **Clearing a stuck lock:** `meta_unlock` with path
93
+ - **Inspecting service config:** `meta_config` with optional JSONPath
66
94
  - **Reading synthesis output:** Use `watcher_search` filtered by the properties
67
95
  configured in `metaProperty` (e.g. `{ "domains": ["meta"] }` in production).
68
96
  The default properties are `{ _meta: "current" }` for live metas and
@@ -77,6 +105,12 @@ critic) runs in the background.
77
105
  - **Three steps:** Architect crafts the task brief, Builder produces content,
78
106
  Critic evaluates quality. The feedback loop self-improves over cycles.
79
107
  - **Archives:** Each cycle creates a timestamped snapshot in `.meta/archive/`.
108
+ - **Progressive synthesis (`_state`):** The builder can set an opaque `_state`
109
+ value in its output JSON. This state is persisted in `meta.json` and passed
110
+ back as context on the next cycle, enabling multi-cycle progressive work
111
+ (e.g. phased analysis, incremental refinement). On builder timeout, the
112
+ engine attempts to recover partial output — if `_state` advanced, it saves
113
+ the new state without overwriting existing content.
80
114
 
81
115
  ## Configuration
82
116
 
@@ -104,7 +138,9 @@ Key settings:
104
138
  | `skipUnchanged` | true | Skip candidates with no changes since last synthesis |
105
139
  | `thinking` | `low` | Thinking level for spawned LLM sessions |
106
140
  | `port` | 1938 | HTTP API listen port |
141
+ | `host` | `127.0.0.1` | Bind address for the HTTP server |
107
142
  | `schedule` | `*/30 * * * *` | Cron expression for automatic synthesis scheduling |
143
+ | `serverBaseUrl` | (optional) | Public base URL of the service (e.g. `http://myhost:1938`). When set, progress reports include clickable entity links. |
108
144
  | `reportChannel` | (optional) | Gateway channel target for progress messages (e.g. Slack channel ID) |
109
145
  | `logging.level` | `info` | Log level (trace/debug/info/warn/error) |
110
146
  | `logging.file` | (optional) | Log file path |
@@ -221,8 +257,8 @@ The following fields can be changed without restarting the service:
221
257
  - `logging.level` — log verbosity
222
258
 
223
259
  Edit the config file and save; the service detects changes via `fs.watchFile`.
224
- All other fields (including `metaProperty`, `port`, timeouts) require a service
225
- restart.
260
+ All other fields (including `metaProperty`, `host`, `port`, timeouts) require a
261
+ service restart.
226
262
 
227
263
  ### Progress Reporting
228
264
 
@@ -302,7 +338,7 @@ To uninstall: `npx @karmaniverous/jeeves-meta-openclaw uninstall`
302
338
  "jeeves-meta-openclaw": {
303
339
  "enabled": true,
304
340
  "config": {
305
- "serviceUrl": "http://127.0.0.1:1938"
341
+ "apiUrl": "http://127.0.0.1:1938"
306
342
  }
307
343
  }
308
344
  }
@@ -357,7 +393,7 @@ The service exposes these endpoints (default port 1938):
357
393
  | POST | `/synthesize` | Enqueue synthesis (stalest or specific path) |
358
394
  | POST | `/seed` | Create `.meta/` directory + meta.json |
359
395
  | POST | `/unlock` | Remove `.lock` file from a meta entity |
360
- | GET | `/config/validate` | Return sanitized active configuration |
396
+ | GET | `/config` | Query sanitized config with optional JSONPath (`?path=$.schedule`) |
361
397
 
362
398
  All endpoints return JSON. The OpenClaw plugin tools are thin wrappers
363
399
  around these endpoints.
@@ -371,7 +407,7 @@ jeeves-meta <command> [options]
371
407
  ```
372
408
 
373
409
  Commands: `start`, `status`, `list`, `detail`, `preview`, `synthesize`,
374
- `seed`, `unlock`, `validate`, `service install|start|stop|status|remove`.
410
+ `seed`, `unlock`, `config`, `service install|start|stop|status|remove`.
375
411
 
376
412
  Config resolution: `--config` flag → `JEEVES_META_CONFIG` env var → error.
377
413
  All client commands support `-p, --port` to specify the service port (default: 1938).
@@ -397,11 +433,11 @@ stalest entity) in the agent's system prompt automatically.
397
433
  ### Service unreachable
398
434
 
399
435
  **Symptom:** TOOLS.md shows "ACTION REQUIRED: jeeves-meta service is unreachable"
400
- **Cause:** Meta service not running or wrong `serviceUrl` in plugin config
436
+ **Cause:** Meta service not running or wrong `apiUrl` in plugin config
401
437
  **Fix:**
402
438
  1. Check if the service is running: `jeeves-meta service status` or `curl http://localhost:1938/status`
403
439
  2. If down, start it: `jeeves-meta service start` or `jeeves-meta start --config <path>`
404
- 3. If running on a different port, update `serviceUrl` in plugin config
440
+ 3. If running on a different port, update `apiUrl` in plugin config
405
441
 
406
442
  ### Watcher unreachable
407
443
 
@@ -437,13 +473,19 @@ stalest entity) in the agent's system prompt automatically.
437
473
 
438
474
  ### Executor timeouts
439
475
 
440
- **Symptom:** `meta_trigger` fails with timeout error
476
+ **Symptom:** `meta_detail` shows `_error` with code `TIMEOUT`
441
477
  **Cause:** Subprocess took longer than configured timeout
478
+ **Note:** The engine attempts partial recovery on builder timeouts. If the
479
+ builder wrote partial output with an advanced `_state`, the state is saved
480
+ (preserving existing content) and the error is recorded. This means
481
+ progressive work is not lost on timeout — only the content update is skipped.
442
482
  **Fix:**
443
- 1. Increase timeout in config (`architectTimeout`, `builderTimeout`,
483
+ 1. Check if `_state` advanced (partial recovery succeeded) — subsequent
484
+ cycles can continue from where the builder left off
485
+ 2. Increase timeout in config (`architectTimeout`, `builderTimeout`,
444
486
  `criticTimeout`)
445
- 2. Check if the LLM provider is slow or rate-limited
446
- 3. Check scope size: large scopes with many files take longer
487
+ 3. Check if the LLM provider is slow or rate-limited
488
+ 4. Check scope size: large scopes with many files take longer
447
489
 
448
490
  ### LLM errors in synthesis steps
449
491
 
package/dist/src/cli.d.ts CHANGED
@@ -15,5 +15,4 @@
15
15
  *
16
16
  * @module cli
17
17
  */
18
- /** Patch OpenClaw config for install or uninstall. Returns log messages. */
19
- export declare function patchConfig(config: Record<string, unknown>, mode: 'add' | 'remove'): string[];
18
+ export {};
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Shared constants for the jeeves-meta OpenClaw plugin.
3
+ *
4
+ * @module constants
5
+ */
6
+ /** Plugin identifier used for config resolution and error guidance. */
7
+ export declare const PLUGIN_ID = "jeeves-meta-openclaw";
@@ -1,50 +1,10 @@
1
1
  /**
2
- * Shared types and utilities for the OpenClaw plugin.
2
+ * Meta-specific convenience wrappers over `@karmaniverous/jeeves` core SDK.
3
3
  *
4
4
  * @module helpers
5
5
  */
6
- /** Minimal OpenClaw plugin API surface. */
7
- export interface PluginApi {
8
- config?: {
9
- plugins?: {
10
- entries?: Record<string, {
11
- config?: Record<string, unknown>;
12
- }>;
13
- };
14
- };
15
- resolvePath?: (input: string) => string;
16
- registerTool(tool: {
17
- name: string;
18
- description: string;
19
- parameters: Record<string, unknown>;
20
- execute: (id: string, params: Record<string, unknown>) => Promise<ToolResult>;
21
- }, options?: {
22
- optional?: boolean;
23
- }): void;
24
- }
25
- /** Tool result shape. */
26
- export interface ToolResult {
27
- content: Array<{
28
- type: string;
29
- text: string;
30
- }>;
31
- isError?: boolean;
32
- }
33
- /**
34
- * Resolve a plugin setting via the standard three-step fallback chain:
35
- * plugin config → environment variable → default value.
36
- *
37
- * @param api - Plugin API.
38
- * @param configKey - Key in the plugin config object.
39
- * @param envVar - Environment variable name.
40
- * @param fallback - Default value if neither source provides one.
41
- */
42
- export declare function resolvePluginSetting(api: PluginApi, configKey: string, envVar: string, fallback: string): string;
6
+ import { type PluginApi } from '@karmaniverous/jeeves';
43
7
  /** Resolve the meta service URL. */
44
8
  export declare function getServiceUrl(api: PluginApi): string;
45
9
  /** Resolve the platform config root. */
46
10
  export declare function getConfigRoot(api: PluginApi): string;
47
- /** Format a successful tool result. */
48
- export declare function ok(data: unknown): ToolResult;
49
- /** Format an error tool result. */
50
- export declare function fail(error: unknown): ToolResult;
@@ -6,6 +6,6 @@
6
6
  *
7
7
  * @packageDocumentation
8
8
  */
9
- import { type PluginApi } from './helpers.js';
9
+ import { type PluginApi } from '@karmaniverous/jeeves';
10
10
  /** Register all jeeves-meta tools with the OpenClaw plugin API. */
11
11
  export default function register(api: PluginApi): void;
@@ -55,11 +55,13 @@ export interface MetasResponse {
55
55
  /** Constructor config. */
56
56
  interface MetaServiceConfig {
57
57
  /** Base URL of the jeeves-meta service (e.g. http://127.0.0.1:1938). */
58
- serviceUrl: string;
58
+ apiUrl: string;
59
59
  }
60
60
  export declare class MetaServiceClient {
61
61
  private readonly baseUrl;
62
62
  constructor(config: MetaServiceConfig);
63
+ /** Return the base URL (for error reporting). */
64
+ getBaseUrl(): string;
63
65
  /** GET helper — returns parsed JSON. */
64
66
  private get;
65
67
  /** POST helper — returns parsed JSON. */
@@ -88,7 +90,7 @@ export declare class MetaServiceClient {
88
90
  seed(path: string): Promise<unknown>;
89
91
  /** POST /unlock — remove .lock from a meta entity. */
90
92
  unlock(path: string): Promise<unknown>;
91
- /** GET /config/validatevalidate current config. */
92
- validate(): Promise<unknown>;
93
+ /** GET /config — query service config with optional JSONPath. */
94
+ config(path?: string): Promise<unknown>;
93
95
  }
94
96
  export {};
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * @module tools
8
8
  */
9
- import { type PluginApi } from './helpers.js';
9
+ import { type PluginApi } from '@karmaniverous/jeeves';
10
10
  import type { MetaServiceClient } from './serviceClient.js';
11
11
  /** Register all meta_* tools. */
12
12
  export declare function registerMetaTools(api: PluginApi, client: MetaServiceClient): void;
@@ -2,16 +2,17 @@
2
2
  "id": "jeeves-meta-openclaw",
3
3
  "name": "Jeeves Meta",
4
4
  "description": "Knowledge synthesis tools — trigger synthesis, view status, manage entities.",
5
- "version": "0.4.0",
5
+ "version": "0.5.0",
6
6
  "skills": [
7
7
  "dist/skills/jeeves-meta"
8
8
  ],
9
9
  "configSchema": {
10
10
  "type": "object",
11
11
  "properties": {
12
- "serviceUrl": {
12
+ "apiUrl": {
13
13
  "type": "string",
14
- "description": "URL of the jeeves-meta HTTP service. Defaults to http://127.0.0.1:1938. Falls back to JEEVES_META_URL env var."
14
+ "description": "URL of the jeeves-meta HTTP service. Falls back to JEEVES_META_URL env var.",
15
+ "default": "http://127.0.0.1:1938"
15
16
  },
16
17
  "configRoot": {
17
18
  "type": "string",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@karmaniverous/jeeves-meta-openclaw",
3
- "version": "0.4.0",
3
+ "version": "0.5.0",
4
4
  "author": "Jason Williscroft",
5
5
  "description": "OpenClaw plugin for jeeves-meta — synthesis tools and virtual rule registration",
6
6
  "license": "BSD-3-Clause",
@@ -20,6 +20,7 @@
20
20
  },
21
21
  "files": [
22
22
  "dist",
23
+ "content",
23
24
  "openclaw.plugin.json"
24
25
  ],
25
26
  "publishConfig": {
@@ -57,6 +58,8 @@
57
58
  },
58
59
  "devDependencies": {
59
60
  "@dotenvx/dotenvx": "^1.55.1",
61
+ "@rollup/plugin-commonjs": "^29.0.2",
62
+ "@rollup/plugin-node-resolve": "^16.0.3",
60
63
  "@rollup/plugin-typescript": "^12.3.0",
61
64
  "auto-changelog": "^2.5.0",
62
65
  "cross-env": "^10.1.0",
@@ -67,7 +70,7 @@
67
70
  "vitest": "^4.1.0"
68
71
  },
69
72
  "scripts": {
70
- "build": "npm run build:plugin && npm run build:skills",
73
+ "build": "npm run build:plugin && npm run build:skills && npm run build:content",
71
74
  "changelog": "auto-changelog",
72
75
  "lint": "eslint .",
73
76
  "lint:fix": "eslint --fix .",
@@ -78,7 +81,8 @@
78
81
  "typecheck": "tsc",
79
82
  "diagrams": "cd diagrams && plantuml -tpng -o ../assets -r .",
80
83
  "build:plugin": "rimraf dist && cross-env NO_COLOR=1 rollup --config rollup.config.ts --configPlugin @rollup/plugin-typescript",
81
- "build:skills": "node scripts/build-skills.mjs"
84
+ "build:skills": "node scripts/build-skills.mjs",
85
+ "build:content": "node scripts/copy-content.mjs"
82
86
  },
83
87
  "release-it": {
84
88
  "git": {
@@ -115,6 +119,6 @@
115
119
  }
116
120
  },
117
121
  "dependencies": {
118
- "@karmaniverous/jeeves": "^0.1.1"
122
+ "@karmaniverous/jeeves": "^0.2.0"
119
123
  }
120
124
  }