@lobu/openclaw-plugin 6.0.1 → 7.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/README.md +30 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +301 -281
- package/dist/index.js.map +1 -1
- package/dist/{owletto-guidance.d.ts → lobu-guidance.d.ts} +1 -1
- package/dist/lobu-guidance.d.ts.map +1 -0
- package/dist/lobu-guidance.js +40 -0
- package/dist/lobu-guidance.js.map +1 -0
- package/dist/openclaw.plugin.json +15 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/openclaw.plugin.json +15 -1
- package/package.json +10 -3
- package/dist/owletto-guidance.d.ts.map +0 -1
- package/dist/owletto-guidance.js +0 -40
- package/dist/owletto-guidance.js.map +0 -1
package/README.md
CHANGED
|
@@ -32,9 +32,39 @@ Replace `<mcp-url>` with your workspace MCP URL (for example `https://lobu.ai/mc
|
|
|
32
32
|
| `autoRecall` | Search Lobu memory for relevant memories before each prompt. Default `true`. |
|
|
33
33
|
| `recallLimit` | Maximum recalled memory records per request. Default `6`. |
|
|
34
34
|
| `autoCapture` | Capture conversation observations as long-term memories after each session. Default `true`. |
|
|
35
|
+
| `memoryWikiCompat` | Spike/compat mode. `true` (or `{ enabled: true }`) registers OpenClaw memory-wiki tools (`wiki_status`, `wiki_search`, `wiki_get`, `wiki_apply`, `wiki_lint`) and the `memory_search`/`memory_get` aliases. Default `false`. |
|
|
35
36
|
|
|
36
37
|
See [`openclaw.plugin.json`](./openclaw.plugin.json) for the full schema.
|
|
37
38
|
|
|
39
|
+
## Memory-wiki compatibility mode
|
|
40
|
+
|
|
41
|
+
When `memoryWikiCompat` is enabled the plugin registers an OpenClaw-flavoured tool surface backed by existing Lobu MCP primitives — there is no separate wiki vault, no markdown export, and no MCP contract changes.
|
|
42
|
+
|
|
43
|
+
> **MCP surface note.** Watcher and knowledge admin operations (`list_watchers`, `get_watcher`, `read_knowledge`, `manage_watchers`) are registered as `INTERNAL_REST_TOOLS` in Lobu and **not** exposed on the MCP wire (`internal: true` hides them from `tools/list`). The compatibility layer therefore reaches those capabilities by scripting over the ClientSDK via the two MCP tools that *are* exposed for sandboxed execution: `query_sdk` (read-only) and `run_sdk` (writes). The sandbox requires `isolated-vm` in the host process — if it isn't installed, `query_sdk` returns `{ success: false, error: { name: 'RuntimeUnavailable', ... } }` and this layer surfaces it to the agent as a clear error instead of returning empty results.
|
|
44
|
+
|
|
45
|
+
| Compat tool | Backed by | Notes |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| `wiki_status` | `query_sdk` (`client.watchers.list`) + `search_memory` probe | Reports `corpus = memory \| wiki \| all`, watcher count, MCP reachability. The SDK probe failure is caught internally so status itself always returns. |
|
|
48
|
+
| `wiki_search` | `search_memory` for `corpus=memory`; `query_sdk` running a single SDK script that fans out to `client.watchers.list` + `client.knowledge.read({ semantic_type: 'claim' })` + `client.knowledge.read({ semantic_type: 'synthesis' })` for `corpus=wiki`; merges both for `corpus=all` | Short queries (<3 chars) embed `includeContent=false` so the SDK script skips the knowledge calls. |
|
|
49
|
+
| `wiki_get` | `query_sdk` running `client.watchers.get` / `client.knowledge.read({ window_id })` / `client.knowledge.read({ content_ids })` / `client.knowledge.read({ query })` | Lookup parser accepts `event:123`, `watcher:7`, `window:9`, `reports/watchers/4`, or a free-text query. |
|
|
50
|
+
| `wiki_apply` | `save_memory` (MCP) for `create_synthesis`; `run_sdk` running `client.watchers.submitFeedback` for `update_metadata` with `watcher_id`/`window_id`/`corrections`; `save_memory` claim fallback otherwise | Corrections must contain `field_path`; empty or malformed arrays throw before MCP is called. |
|
|
51
|
+
| `wiki_lint` | In-plugin session ring buffer (cap 32) | Warns when `wiki_apply` was called with no evidence, when `status=active` confidence is below `0.5`, and when a wiki/memory search returned zero results. |
|
|
52
|
+
| `memory_search`, `memory_get` | `search_memory` (MCP); `query_sdk` running `client.knowledge.read` | OpenClaw-named aliases. `memory_search` does not route corpus — use `wiki_search` for that. |
|
|
53
|
+
|
|
54
|
+
`corpus` always means `memory | wiki | all` inside the agent's authenticated Lobu org. It is **not** an org/workspace selector.
|
|
55
|
+
|
|
56
|
+
### Tracing the compatibility tools against a live Lobu
|
|
57
|
+
|
|
58
|
+
`scripts/lobu/run-memory-wiki-compat-trace.ts` exercises the compat layer against a running Lobu MCP and emits a markdown comparison alongside the baseline (raw `search_memory`/`read_knowledge`/`list_watchers`) calls:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
LOBU_MCP_URL=http://localhost:8787/mcp/<org-slug> \
|
|
62
|
+
LOBU_MCP_TOKEN=$BENCH_TOKEN \
|
|
63
|
+
bun run scripts/lobu/run-memory-wiki-compat-trace.ts
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
The script writes `.lobu/benchmarks/memory/wiki-compat-trace.{md,json}`. It captures tool-surface differences (fan-out, latency, error shape) rather than retrieval recall — the existing retrieval-only benchmark in `packages/server/src/benchmarks/memory/` would show no difference between compat-on and compat-off, since both paths fetch the same underlying records.
|
|
67
|
+
|
|
38
68
|
## License
|
|
39
69
|
|
|
40
70
|
BUSL-1.1. See the repository [LICENSE](../../LICENSE).
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
export declare const KNOWN_MCP_TOOL_NAMES: Set<string>;
|
|
2
|
+
export declare const LOGIN_TOOL_NAMES: readonly ["lobu_login", "lobu_login_check"];
|
|
3
|
+
/**
|
|
4
|
+
* Run `work` with a hard wall-clock deadline. On timeout, the supplied
|
|
5
|
+
* `AbortSignal` is aborted (so an in-flight `fetch` cancels instead of
|
|
6
|
+
* lingering) and `onTimeout` is returned regardless of what is still pending.
|
|
7
|
+
* `work` is responsible for swallowing its own rejections; if it rejects after
|
|
8
|
+
* the deadline, the rejection is observed and ignored.
|
|
9
|
+
*/
|
|
10
|
+
export declare function runWithAbortDeadline<T>(work: (signal: AbortSignal) => Promise<T>, timeoutMs: number, onTimeout: T): Promise<T>;
|
|
1
11
|
declare const plugin: {
|
|
2
12
|
id: string;
|
|
3
13
|
name: string;
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAqCA,eAAO,MAAM,oBAAoB,aAQ/B,CAAC;AAGH,eAAO,MAAM,gBAAgB,6CAA8C,CAAC;AAO5E;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,CAAC,EAC1C,IAAI,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,OAAO,CAAC,CAAC,CAAC,EACzC,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,CAAC,GACX,OAAO,CAAC,CAAC,CAAC,CAeZ;AAi7BD,QAAA,MAAM,MAAM;;;;;kBAKI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CA2etC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|