@xdarkicex/openclaw-memory-libravdb 1.4.14 → 1.4.17

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 CHANGED
@@ -1,71 +1,28 @@
1
- # LibraVDB Memory for OpenClaw
2
-
3
- [![Go](https://img.shields.io/badge/Go-1.25%2B-00ADD8?logo=go&logoColor=white)](https://github.com/xDarkicex/libravdbd)
4
- [![TypeScript](https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white)](./package.json)
5
- [![OpenClaw](https://img.shields.io/badge/OpenClaw-memory%20plugin-111827)](./openclaw.plugin.json)
6
-
7
- `@xdarkicex/openclaw-memory-libravdb` is a local-first OpenClaw memory system
8
- for people who want more than "top-k vectors plus a prompt footer."
9
-
10
- It replaces the default lightweight memory path with a full context lifecycle:
11
-
12
- - active session memory
13
- - durable per-user memory
14
- - shared global memory
15
- - continuity-aware compaction
16
- - authored context partitioning
17
- - hybrid scoring across scope, recency, and similarity
18
-
19
- This repository pairs a TypeScript OpenClaw plugin with a Go daemon backed by
20
- `libraVDB`. The plugin owns both the `memory` and `contextEngine` slots, while
21
- the daemon handles embeddings, retrieval, storage, and compaction.
22
- On newer OpenClaw builds, it also bridges the built-in `memory_search` runtime
23
- to the same libraVDB sidecar instead of leaving that tool inert.
24
-
25
- For local development, this repo can target a running daemon or a manual local
26
- daemon binary.
27
-
28
- ## Why This Exists
29
-
30
- The stock "single memory bucket" pattern is good for simple persistence, but it
31
- starts to break down when you care about:
32
-
33
- - keeping the newest working context raw and intact
34
- - separating ephemeral session state from durable memory
35
- - avoiding long-session prompt collapse
36
- - preserving authored instructions differently from recalled user content
37
- - treating memory retrieval as a ranked assembly problem instead of plain
38
- nearest-neighbor lookup
39
-
40
- LibraVDB Memory exists for that harder class of memory problem.
41
-
42
- ## What Makes It Different
43
-
44
- These are the core differentiators the project is built around:
45
-
46
- - Dual slot ownership: the plugin owns both memory prompt injection and the
47
- full context lifecycle.
48
- - Built-in `memory_search` bridge: newer OpenClaw memory runtime calls are
49
- routed into the same sidecar-backed retrieval path.
50
- - Lifecycle hint adoption: `before_reset` and `session_end` are used as
51
- advisory signals into the sidecar without giving OpenClaw control of ingest
52
- or compaction.
53
- - Sidecar-owned lifecycle journal: reset/end hints are recorded internally for
54
- debugging and auditing without entering normal memory retrieval.
55
- The journal is bounded by a sidecar retention cap so it does not grow
56
- forever.
57
- - Local-first runtime: the core path does not depend on external embedding
58
- services.
59
- - Three-tier memory: session, durable user, and global memory stay distinct.
60
- - Hybrid scoring: retrieval is ranked by semantic similarity, recency, scope,
61
- and summary quality instead of cosine alone.
62
- - Automatic compaction: long sessions compact behind a protected recent tail.
63
- - Crash-resilient IPC: the host talks to a sidecar over a stable local socket
64
- or loopback TCP endpoint with degraded-mode fallback.
1
+ # LibraVDB - Memory and Context Management
65
2
 
66
- ## Quick Start
3
+ <div align="center">
4
+ <img src="./docs/assets/libravdb-logo.svg" alt="LibraVDB" width="640">
5
+ </div>
6
+
7
+ <div align="center">
8
+ <a href="https://github.com/xDarkicex/libravdbd"><img src="https://img.shields.io/badge/Go-1.25%2B-00ADD8?logo=go&logoColor=white" alt="Go 1.25+"></a>
9
+ <a href="./package.json"><img src="https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript&logoColor=white" alt="TypeScript 5.x"></a>
10
+ <a href="./openclaw.plugin.json"><img src="https://img.shields.io/badge/OpenClaw-memory%20plugin-111827" alt="OpenClaw memory plugin"></a>
11
+ <a href="https://www.npmjs.com/package/@xdarkicex/openclaw-memory-libravdb"><img src="https://img.shields.io/npm/v/%40xdarkicex%2Fopenclaw-memory-libravdb?label=release&color=5B21B6" alt="Release"></a>
12
+ </div>
13
+
14
+ `@xdarkicex/openclaw-memory-libravdb` is a local-first OpenClaw memory plugin
15
+ backed by the `libravdbd` daemon. It replaces the lightweight default memory
16
+ path with scoped session, user, and global memory; continuity-aware prompt
17
+ assembly; durable recall; and sidecar-owned compaction.
67
18
 
68
- The supported install flow is:
19
+ [Install](./docs/install.md) · [Full installation reference](./docs/installation.md) · [Architecture](./docs/architecture.md) · [Security](./docs/security.md) · [Performance and tuning](./docs/performance-and-tuning.md) · [Contributing](./docs/contributing.md)
20
+
21
+ New install? Start here: [Install guide](./docs/install.md). Preferred setup on
22
+ macOS: install `libravdbd` with Homebrew, install the OpenClaw plugin, then
23
+ assign the plugin to both required slots.
24
+
25
+ ## Install
69
26
 
70
27
  ```bash
71
28
  brew tap xDarkicex/homebrew-openclaw-libravdb-memory
@@ -74,10 +31,7 @@ brew services start libravdbd
74
31
  openclaw plugins install @xdarkicex/openclaw-memory-libravdb
75
32
  ```
76
33
 
77
- The Homebrew formula installs the daemon plus the bundled ONNX Runtime, embedding assets, and T5 summarizer assets it needs to boot cleanly on supported platforms.
78
-
79
- Then assign the plugin to both required OpenClaw slots in
80
- `~/.openclaw/openclaw.json`:
34
+ Then activate both plugin slots in `~/.openclaw/openclaw.json`:
81
35
 
82
36
  ```json
83
37
  {
@@ -95,332 +49,120 @@ Then assign the plugin to both required OpenClaw slots in
95
49
  }
96
50
  ```
97
51
 
98
- Verify the setup:
99
-
100
- ```bash
101
- openclaw memory status
102
- ```
103
-
104
- Expected healthy state:
105
-
106
- - the daemon is reachable
107
- - the plugin is active as the memory provider
108
- - the runtime can report stored counts and model readiness
109
-
110
- ## Markdown Ingestion
111
-
112
- LibraVDB Memory can watch markdown roots and sync changed notes into vector
113
- memory without changing the Go sidecar RPC contract.
114
-
115
- The two built-in source adapters are:
116
-
117
- - `generic`: for OpenClaw-owned markdown, including stock files like
118
- `MEMORY.md`
119
- - `obsidian`: for Obsidian vault roots, with tag-aware defaults
120
-
121
- Configuration is driven through the plugin config fields in
122
- `openclaw.plugin.json`:
123
-
124
- - `markdownIngestionEnabled`
125
- - `markdownIngestionRoots`
126
- - `markdownIngestionInclude`
127
- - `markdownIngestionExclude`
128
- - `markdownIngestionDebounceMs`
129
- - `markdownIngestionObsidianEnabled`
130
- - `markdownIngestionObsidianRoots`
131
- - `markdownIngestionObsidianInclude`
132
- - `markdownIngestionObsidianExclude`
133
- - `markdownIngestionObsidianDebounceMs`
134
-
135
- Typical usage:
136
-
137
- - point `markdownIngestionRoots` at OpenClaw-owned markdown roots, such as
138
- `.openclaw/skills/*/*.md` or a stock memory directory that contains
139
- `MEMORY.md`
140
- - enable the Obsidian adapter separately with
141
- `markdownIngestionObsidianEnabled: true` and one or more vault roots
142
- - use include/exclude globs to narrow what gets watched when needed
143
-
144
- By default, the Obsidian adapter only auto-ingests notes that look like memory
145
- notes, using frontmatter tags or inline tags like `#project`. The OpenClaw
146
- stock `MEMORY.md` file is always eligible through the generic adapter path.
147
-
148
- ## Dream Promotion
149
-
150
- Dream promotion is a separate, opt-in path for promoting vetted dream diary
151
- entries directly into a dedicated `dream:{userId}` collection.
152
-
153
- It does not use `MEMORY.md`. Instead, it expects a dream diary markdown file
154
- that contains explicit candidate bullets under promotion-oriented headings such
155
- as `## Deep Sleep`. Each promoted bullet should include a trailing metadata
156
- block with the gating fields:
157
-
158
- ```md
159
- - Preserve the recent tail buffer {score=0.82 recall=3 unique=2}
160
- ```
161
-
162
- Only bullets that satisfy the sidecar gates are inserted. The dream collection
163
- is isolated from normal `user:` and `global` retrieval by default, and dream
164
- phrasing in chat or search queries routes there automatically.
165
-
166
- Configure automatic diary watching with:
52
+ Verify the daemon and plugin:
167
53
 
168
- - `dreamPromotionEnabled`
169
- - `dreamPromotionDiaryPath`
170
- - `dreamPromotionUserId`
171
- - `dreamPromotionDebounceMs`
172
-
173
- For a manual run, use:
174
-
175
- ```bash
176
- openclaw memory dream-promote --user-id <userId> --dream-file /path/to/DREAMS.md
177
- ```
178
54
 
179
- The manual command and the automatic watcher both go through the same sidecar
180
- promotion RPC, so the admission gates and provenance metadata are identical.
55
+ Healthy output should show `Sidecar=running`, stored memory counts, the active
56
+ gate threshold, and the loaded embedding profile.
181
57
 
182
- ## Install Model
58
+ ## Quick Start
183
59
 
184
- This plugin is intentionally **connect-only** at install time.
60
+ Runtime requirements:
185
61
 
186
- It does not compile Go code during plugin installation, and it does not manage
187
- daemon lifecycle automatically from the npm package. That is deliberate: some
188
- OpenClaw environments are strict about postinstall behavior, daemon spawning,
189
- and anything that looks like binary bootstrap or process management.
62
+ - OpenClaw `>= 2026.3.22`
63
+ - Node.js `>= 22`
64
+ - a separately installed `libravdbd` daemon
190
65
 
191
- Current model:
66
+ Compatibility note:
192
67
 
193
- - npm/OpenClaw package: plugin code and docs
194
- - `libravdbd`: installed and managed separately
195
- - default daemon endpoint on macOS/Linux:
196
- `unix:$HOME/.clawdb/run/libravdb.sock`
197
- - default daemon endpoint on Windows:
198
- `tcp:127.0.0.1:37421`
68
+ - this plugin is currently verified against OpenClaw `2026.4.23`
199
69
 
200
- If your daemon runs elsewhere, set an explicit `sidecarPath`, for example:
70
+ Default endpoints:
201
71
 
202
- - `unix:/custom/path/libravdb.sock`
203
- - `tcp:127.0.0.1:9999`
72
+ - macOS/Linux user-local daemon: `unix:$HOME/.clawdb/run/libravdb.sock`
73
+ - Homebrew daemon on Apple Silicon: `unix:/opt/homebrew/var/clawdb/run/libravdb.sock`
74
+ - Windows daemon: `tcp:127.0.0.1:37421`
204
75
 
205
- ## Architecture At A Glance
76
+ If your daemon runs elsewhere, set `sidecarPath`:
206
77
 
207
- ```text
208
- OpenClaw host
209
- -> memoryPromptSection (static capability header)
210
- -> memory runtime bridge (built-in memory_search)
211
- -> context engine (bootstrap / ingest / assemble / compact)
212
- -> plugin runtime
213
- -> JSON-RPC
214
- -> libravdbd
215
- -> libraVDB + local embedding/summarization stack
78
+ ```json
79
+ {
80
+ "plugins": {
81
+ "configs": {
82
+ "libravdb-memory": {
83
+ "sidecarPath": "tcp:127.0.0.1:37421"
84
+ }
85
+ }
86
+ }
87
+ }
216
88
  ```
217
89
 
218
- The main runtime split is:
219
-
220
- - TypeScript host layer:
221
- - OpenClaw plugin registration
222
- - prompt assembly
223
- - hybrid ranking
224
- - continuity-aware token budgeting
225
- - degraded-mode behavior
226
- - Go daemon layer:
227
- - vector storage
228
- - embeddings
229
- - search RPCs
230
- - compaction and summarization
231
- - stable local IPC endpoint
90
+ ## Highlights
232
91
 
233
- For the implemented architecture map, read [docs/architecture.md](./docs/architecture.md).
92
+ - **Dual slot ownership** - owns both OpenClaw `memory` and `contextEngine`.
93
+ - **Memory runtime bridge** - routes built-in `memory_search` calls to the same
94
+ libraVDB-backed sidecar on hosts that expose the runtime API.
95
+ - **Three memory scopes** - keeps active session, durable user, and global memory
96
+ separate.
97
+ - **Hybrid retrieval** - blends semantic similarity, scope, recency, and summary
98
+ quality instead of relying on cosine similarity alone.
99
+ - **Continuity-aware assembly** - preserves the recent working tail while fitting
100
+ recalled memory into a bounded prompt budget.
101
+ - **Sidecar compaction** - summarizes older session turns without flattening the
102
+ newest working context.
103
+ - **Local-first inference** - uses local embedding and compaction paths by
104
+ default, with optional external summarizer configuration.
105
+ - **Explicit daemon lifecycle** - the npm/OpenClaw package stays connect-only;
106
+ `libravdbd` is installed and supervised separately.
234
107
 
235
- ## Retrieval Model
108
+ ## Security Defaults
236
109
 
237
- The assembly path is not "just search some vectors and paste the top hits."
110
+ Stored memory is treated as untrusted historical context. Retrieved memory is
111
+ framed before it reaches the downstream model, memory collections are scoped by
112
+ session/user/global namespace, and daemon installation is outside the npm plugin
113
+ package.
238
114
 
239
- It combines:
115
+ Before exposing OpenClaw over remote channels, read [Security](./docs/security.md).
240
116
 
241
- - session search for current-work relevance
242
- - durable user recall for long-lived personal context
243
- - global recall for shared facts
244
- - authored invariant and variant context
245
- - continuity-preserving recent-tail injection
246
- - token-budgeted fitting
247
-
248
- The ranking model currently blends:
249
-
250
- - semantic similarity
251
- - scope weighting
252
- - recency decay
253
- - summary quality attenuation
254
-
255
- The formal math and deeper design notes are kept out of the public index on
256
- purpose.
257
-
258
- ## LongMemEval Harness
259
-
260
- For internal tuning, the repo includes a local LongMemEval harness that runs the
261
- dataset through the plugin layer and measures whether the assembled prompt still
262
- contains the evidence turns.
263
-
264
- The benchmark runner is committed, but the dataset and generated reports are not.
265
- Keep downloaded data and local outputs under `benchmarks/longmemeval/`, which is
266
- ignored by default.
267
-
268
- The harness writes JSONL incrementally, so partial results survive if a transient
269
- daemon failure interrupts a long run.
270
-
271
- The run summary now prints a compact table with total questions, processed rows,
272
- skipped abstentions, errors, session hit rate, turn hit rate, and average prompt
273
- size.
274
-
275
- Run it with:
117
+ ## Operator Quick Refs
276
118
 
277
119
  ```bash
278
- LONGMEMEVAL_DATA_FILE=/path/to/longmemeval_oracle.json pnpm run benchmark:longmemeval
120
+ openclaw memory status
121
+ openclaw memory export --user-id <userId>
122
+ openclaw memory flush --user-id <userId>
123
+ openclaw memory journal --limit 50
124
+ openclaw memory dream-promote --user-id <userId> --dream-file /path/to/DREAMS.md
279
125
  ```
280
126
 
281
- If you already have a daemon running and do not want the benchmark to spawn
282
- another one, set:
127
+ Use [Install](./docs/install.md) for daemon lifecycle commands and
128
+ [Uninstall](./docs/uninstall.md) for safe shutdown and removal.
283
129
 
284
- ```bash
285
- LONGMEMEVAL_USE_EXISTING_DAEMON=1 LONGMEMEVAL_SIDECAR_PATH=unix:/path/to/libravdb.sock
286
- ```
130
+ ## Optional Features
287
131
 
288
- If the local test daemon drops mid-run, the benchmark will restart it and retry
289
- the current instance once before recording an error result.
132
+ - **Markdown ingestion** watches OpenClaw-owned markdown roots or Obsidian vaults
133
+ and syncs eligible notes into memory. See [Features](./docs/features.md).
134
+ - **Dream promotion** promotes vetted dream diary bullets into an isolated
135
+ `dream:{userId}` collection. See [Features](./docs/features.md).
136
+ - **Embedding profiles** expose local model metadata defaults for MiniLM and
137
+ Nomic. See [Embedding profiles](./docs/embedding-profiles.md).
290
138
 
291
- Optional outputs:
139
+ ## Docs By Goal
292
140
 
293
- - `LONGMEMEVAL_LIMIT` to cap the number of questions
294
- - `LONGMEMEVAL_TOPK` to change the search budget
295
- - `LONGMEMEVAL_OUT_FILE` to write JSONL records for analysis
141
+ - New install: [Install](./docs/install.md), [Installation reference](./docs/installation.md)
142
+ - Understand the design: [Problem](./docs/problem.md), [Architecture](./docs/architecture.md), [ADRs](./docs/architecture-decisions/README.md)
143
+ - Operate safely: [Security](./docs/security.md), [Uninstall](./docs/uninstall.md)
144
+ - Configure optional inputs: [Features](./docs/features.md), [Embedding profiles](./docs/embedding-profiles.md), [Models](./docs/models.md)
145
+ - Advanced operations: [Performance and tuning](./docs/performance-and-tuning.md)
146
+ - Work from source: [Development](./docs/development.md), [Contributing](./docs/contributing.md)
296
147
 
297
- To score a hypothesis JSONL file with the official LongMemEval evaluator, point
298
- the repo at a local checkout of the benchmark and run:
148
+ ## From Source
299
149
 
300
150
  ```bash
301
- LONGMEMEVAL_EVAL_REPO=/path/to/LongMemEval \
302
- LONGMEMEVAL_HYPOTHESIS_FILE=/path/to/hypotheses.jsonl \
303
- LONGMEMEVAL_DATA_FILE=/path/to/longmemeval_oracle.json \
304
- OPENAI_API_KEY=... \
305
- pnpm run benchmark:longmemeval:score
151
+ pnpm install
152
+ pnpm check
153
+ bash scripts/build-daemon.sh
306
154
  ```
307
155
 
308
- That scorer wrapper shells out to the official Python evaluation script and then
309
- prints the aggregate metrics from the generated log when available.
310
-
311
- ## Compaction Model
312
-
313
- This system does not treat long chats as append-only forever.
314
-
315
- Older session turns compact behind a protected recent tail, so the plugin can:
316
-
317
- - keep the newest working context raw
318
- - preserve adjacency-sensitive continuity near the boundary
319
- - promote older material into summaries
320
- - avoid letting long sessions drown their own prompt budget
321
-
322
- Compaction is designed as part of the memory system itself, not as a separate
323
- maintenance convenience.
324
-
325
- ## For Power Users
326
-
327
- If you are evaluating this as an operator or advanced OpenClaw user, the key
328
- practical points are:
329
-
330
- - This plugin should own both `memory` and `contextEngine`. Partial slot
331
- assignment is a misconfiguration.
332
- - On hosts that expose `registerMemoryRuntime`, the built-in `memory_search`
333
- tool now searches the same libraVDB-backed memory stores.
334
- - The daemon is a separate operational unit. Treat plugin lifecycle and daemon
335
- lifecycle as different concerns.
336
- - The system is local-first by design. The critical retrieval path does not
337
- require a remote embedding service.
338
- - The sidecar transport is stable and explicit, which makes it service-manager
339
- friendly on macOS, Linux, and Windows.
340
-
341
- Good entry points:
342
-
343
- - [docs/install.md](./docs/install.md)
344
- - [docs/installation.md](./docs/installation.md)
345
- - [docs/uninstall.md](./docs/uninstall.md)
346
- - [docs/architecture.md](./docs/architecture.md)
347
-
348
- ## For Researchers And Builders
349
-
350
- If you are studying retrieval, memory systems, or agent architecture, the
351
- interesting parts of this repo are:
352
-
353
- - continuity-aware assembly:
354
- `C_total(q) = I union T_recent union Proj(V_rest, q)`
355
- - hybrid ranking instead of pure cosine retrieval
356
- - separation of authored invariants from searchable authored lore
357
- - durable-memory admission via domain-adaptive gating
358
- - local daemon architecture rather than in-process TS vector plumbing
359
- - compaction that preserves recent working context instead of flattening the
360
- whole transcript
361
-
362
- Start here:
363
-
364
- - [docs/problem.md](./docs/problem.md)
365
- - [docs/architecture.md](./docs/architecture.md)
156
+ `scripts/build-daemon.sh` prepares `.daemon-bin/libravdbd` for local plugin
157
+ testing when you have a published daemon binary, a Homebrew daemon, or a local
158
+ daemon checkout. For the full source workflow, read [Development](./docs/development.md).
366
159
 
367
160
  ## Runtime Facts
368
161
 
369
162
  - npm package: `@xdarkicex/openclaw-memory-libravdb`
370
163
  - OpenClaw plugin id: `libravdb-memory`
371
- - minimum host version: `openclaw >= 2026.3.22`
372
- - default daemon data path: `$HOME/.clawdb/data.libravdb`
373
- - default daemon endpoint on macOS/Linux:
374
- `unix:$HOME/.clawdb/run/libravdb.sock`
375
- - default daemon endpoint on Windows:
376
- `tcp:127.0.0.1:37421`
377
-
378
- ## Repository Guide
379
-
380
- - [docs/install.md](./docs/install.md): quick install and lifecycle guide
381
- - [docs/installation.md](./docs/installation.md): full installation and
382
- packaging reference
383
- - [docs/uninstall.md](./docs/uninstall.md): clean shutdown and removal
384
- - [docs/architecture.md](./docs/architecture.md): current implemented system
385
- architecture
386
-
387
- ## Current Constraint
388
-
389
- Because OpenClaw environments can be strict about postinstall downloads,
390
- daemon spawning, and scanner-visible binary bootstrap behavior, the cleanest
391
- supported user path today is:
392
-
393
- - install plugin
394
- - install daemon
395
- - assign both slots
396
- - let the plugin connect to a stable local endpoint
397
-
398
- That tradeoff is intentional. It keeps the plugin installation surface simple
399
- and auditable while preserving the full local memory engine at runtime.
400
-
401
- ## Generated Contract Types
402
-
403
- TypeScript code in this plugin imports generated LibraVDB IPC types via the
404
- `@xdarkicex/libravdb-contracts` package:
405
-
406
- ```typescript
407
- import { RpcRequest, RpcResponse } from "@xdarkicex/libravdb-contracts";
408
- ```
409
-
410
- The generated types live in `libravdb-contracts/gen/ts/` and are produced by
411
- `buf generate` in that repository. A local `paths` alias in `tsconfig.json`
412
- wires the package name to that directory, so imports resolve without a
413
- `node_modules` install in the contracts repo.
414
-
415
- To regenerate after a proto change:
416
-
417
- ```bash
418
- cd ../libravdb-contracts && buf generate
419
- # or from this repo:
420
- pnpm run generate:contracts
421
- ```
422
-
423
- The alias is configured in both `tsconfig.json` (type-checking) and
424
- `tsconfig.build.json` (declaration emission). The generated `.ts` files use
425
- `@bufbuild/protobuf` at runtime, which must be available in the plugin's
426
- `node_modules`.
164
+ - plugin kind: `memory`, `context-engine`
165
+ - minimum OpenClaw host version: `>= 2026.3.22`
166
+ - default data path: `$HOME/.clawdb/data.libravdb`
167
+ - default macOS/Linux endpoint: `unix:$HOME/.clawdb/run/libravdb.sock`
168
+ - default Windows endpoint: `tcp:127.0.0.1:37421`
package/dist/cli.d.ts CHANGED
@@ -19,7 +19,7 @@ type CliCommand = {
19
19
  name?(): string;
20
20
  };
21
21
  type CliProgram = CliCommand;
22
- export declare function registerMemoryCli(api: OpenClawPluginApi, runtime: PluginRuntime, cfg: PluginConfig, logger?: LoggerLike): void;
22
+ export declare function registerMemoryCli(api: OpenClawPluginApi, runtime: PluginRuntime | null, cfg: PluginConfig, logger?: LoggerLike): void;
23
23
  type CliRegistrar = {
24
24
  registerCli?(builder: (ctx: {
25
25
  program: CliProgram;
package/dist/cli.js CHANGED
@@ -6,9 +6,20 @@ export function registerMemoryCli(api, runtime, cfg, logger = console) {
6
6
  if (!api.registerCli) {
7
7
  return;
8
8
  }
9
+ const isFullMode = runtime !== null;
9
10
  api.registerCli(({ program }) => {
10
11
  const root = ensureCommand(program, "memory")
11
12
  .description("Manage LibraVDB memory");
13
+ if (!isFullMode) {
14
+ // cli-metadata mode: register structure only so `openclaw memory --help` works.
15
+ // No runtime available — do not attach action handlers.
16
+ ensureCommand(root, "status").description("Show sidecar health, record counts, and active thresholds");
17
+ ensureCommand(root, "flush").description("Wipe a durable memory namespace after confirmation");
18
+ ensureCommand(root, "export").description("Stream stored memories as newline-delimited JSON");
19
+ ensureCommand(root, "journal").description("Inspect internal lifecycle journal hints");
20
+ ensureCommand(root, "dream-promote").description("Promote vetted dream diary entries into the dedicated dream collection");
21
+ return;
22
+ }
12
23
  ensureCommand(root, "status")
13
24
  .description("Show sidecar health, record counts, and active thresholds")
14
25
  .action(() => void runStatus(runtime, cfg, logger));
@@ -83,6 +83,7 @@ export declare function buildContextEngineFactory(runtime: PluginRuntime, cfg: P
83
83
  }>;
84
84
  tokenBudget: number;
85
85
  prompt?: string;
86
+ currentTokenCount?: number;
86
87
  }): Promise<OpenClawCompatibleAssembleResult>;
87
88
  compact(args: {
88
89
  sessionId: string;