@xdarkicex/openclaw-memory-libravdb 1.4.6 → 1.4.7

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.
Files changed (75) hide show
  1. package/HOOK.md +14 -0
  2. package/README.md +32 -2
  3. package/dist/cli.d.ts +39 -0
  4. package/dist/cli.js +208 -0
  5. package/dist/context-engine.d.ts +56 -0
  6. package/dist/context-engine.js +125 -0
  7. package/dist/dream-promotion.d.ts +47 -0
  8. package/dist/dream-promotion.js +363 -0
  9. package/dist/dream-routing.d.ts +6 -0
  10. package/dist/dream-routing.js +31 -0
  11. package/dist/durable-namespace.d.ts +6 -0
  12. package/dist/durable-namespace.js +24 -0
  13. package/dist/grpc-client.d.ts +23 -0
  14. package/dist/grpc-client.js +104 -0
  15. package/dist/index.d.ts +10 -0
  16. package/dist/index.js +40 -0
  17. package/dist/lifecycle-hooks.d.ts +4 -0
  18. package/dist/lifecycle-hooks.js +64 -0
  19. package/dist/markdown-hash.d.ts +3 -0
  20. package/dist/markdown-hash.js +82 -0
  21. package/dist/markdown-ingest.d.ts +43 -0
  22. package/dist/markdown-ingest.js +464 -0
  23. package/dist/memory-provider.d.ts +4 -0
  24. package/dist/memory-provider.js +13 -0
  25. package/dist/memory-runtime.d.ts +118 -0
  26. package/dist/memory-runtime.js +217 -0
  27. package/dist/plugin-runtime.d.ts +28 -0
  28. package/dist/plugin-runtime.js +127 -0
  29. package/dist/proto/intelligence_kernel/v1/kernel.proto +378 -0
  30. package/dist/recall-cache.d.ts +2 -0
  31. package/dist/recall-cache.js +30 -0
  32. package/dist/rpc-protobuf-codecs.d.ts +70 -0
  33. package/dist/rpc-protobuf-codecs.js +77 -0
  34. package/dist/rpc.d.ts +14 -0
  35. package/dist/rpc.js +121 -0
  36. package/dist/sidecar.d.ts +34 -0
  37. package/dist/sidecar.js +535 -0
  38. package/dist/types.d.ts +163 -0
  39. package/dist/types.js +1 -0
  40. package/docs/contributing.md +14 -13
  41. package/docs/install.md +7 -9
  42. package/docs/installation.md +23 -16
  43. package/docs/uninstall.md +1 -1
  44. package/index.js +2 -0
  45. package/openclaw.plugin.json +2 -2
  46. package/package.json +39 -16
  47. package/packaging/README.md +0 -71
  48. package/packaging/homebrew/libravdbd.rb.tmpl +0 -224
  49. package/packaging/launchd/com.xdarkicex.libravdbd.plist +0 -32
  50. package/packaging/systemd/libravdbd.service +0 -12
  51. package/src/cli.ts +0 -299
  52. package/src/comparison-experiments.ts +0 -128
  53. package/src/context-engine.ts +0 -1645
  54. package/src/continuity.ts +0 -93
  55. package/src/dream-promotion.ts +0 -492
  56. package/src/dream-routing.ts +0 -40
  57. package/src/durable-namespace.ts +0 -34
  58. package/src/index.ts +0 -47
  59. package/src/lifecycle-hooks.ts +0 -96
  60. package/src/markdown-hash.ts +0 -104
  61. package/src/markdown-ingest.ts +0 -627
  62. package/src/memory-provider.ts +0 -25
  63. package/src/memory-runtime.ts +0 -283
  64. package/src/openclaw-plugin-sdk.d.ts +0 -59
  65. package/src/plugin-runtime.ts +0 -119
  66. package/src/recall-cache.ts +0 -34
  67. package/src/recall-utils.ts +0 -131
  68. package/src/rpc.ts +0 -92
  69. package/src/scoring.ts +0 -632
  70. package/src/sidecar.ts +0 -583
  71. package/src/temporal.ts +0 -1031
  72. package/src/tokens.ts +0 -52
  73. package/src/types.ts +0 -278
  74. package/tsconfig.json +0 -20
  75. package/tsconfig.tests.json +0 -12
@@ -0,0 +1,163 @@
1
+ export interface PluginConfig {
2
+ dbPath?: string;
3
+ sidecarPath?: string;
4
+ useSessionRecallProjection?: boolean;
5
+ useSessionSummarySearchExperiment?: boolean;
6
+ embeddingRuntimePath?: string;
7
+ embeddingBackend?: "bundled" | "onnx-local" | "custom-local";
8
+ embeddingProfile?: string;
9
+ fallbackProfile?: string;
10
+ embeddingModelPath?: string;
11
+ embeddingTokenizerPath?: string;
12
+ embeddingDimensions?: number;
13
+ embeddingNormalize?: boolean;
14
+ summarizerBackend?: "bundled" | "onnx-local" | "ollama-local" | "custom-local";
15
+ summarizerProfile?: string;
16
+ summarizerRuntimePath?: string;
17
+ summarizerModelPath?: string;
18
+ summarizerTokenizerPath?: string;
19
+ summarizerModel?: string;
20
+ summarizerEndpoint?: string;
21
+ sessionTTL?: number;
22
+ topK?: number;
23
+ alpha?: number;
24
+ beta?: number;
25
+ gamma?: number;
26
+ ingestionGateThreshold?: number;
27
+ markdownIngestionEnabled?: boolean;
28
+ markdownIngestionRoots?: string[];
29
+ markdownIngestionObsidianEnabled?: boolean;
30
+ markdownIngestionObsidianRoots?: string[];
31
+ markdownIngestionObsidianInclude?: string[];
32
+ markdownIngestionObsidianExclude?: string[];
33
+ markdownIngestionObsidianDebounceMs?: number;
34
+ markdownIngestionInclude?: string[];
35
+ markdownIngestionExclude?: string[];
36
+ markdownIngestionCollection?: string;
37
+ markdownIngestionDebounceMs?: number;
38
+ dreamPromotionEnabled?: boolean;
39
+ dreamPromotionDiaryPath?: string;
40
+ dreamPromotionUserId?: string;
41
+ dreamPromotionDebounceMs?: number;
42
+ gatingWeights?: {
43
+ w1c?: number;
44
+ w2c?: number;
45
+ w3c?: number;
46
+ w1t?: number;
47
+ w2t?: number;
48
+ w3t?: number;
49
+ };
50
+ gatingTechNorm?: number;
51
+ gatingCentroidK?: number;
52
+ lifecycleJournalMaxEntries?: number;
53
+ compactionQualityWeight?: number;
54
+ recencyLambdaSession?: number;
55
+ recencyLambdaUser?: number;
56
+ recencyLambdaGlobal?: number;
57
+ tokenBudgetFraction?: number;
58
+ authoredHardBudgetFraction?: number;
59
+ authoredSoftBudgetFraction?: number;
60
+ elevatedGuidanceBudgetFraction?: number;
61
+ section7StartupTokenBudgetTokens?: number;
62
+ continuityMinTurns?: number;
63
+ continuityTailBudgetTokens?: number;
64
+ continuityPriorContextTokens?: number;
65
+ compactThreshold?: number;
66
+ compactSessionTokenBudget?: number;
67
+ section7CoarseTopK?: number;
68
+ section7SecondPassTopK?: number;
69
+ section7Theta1?: number;
70
+ section7Kappa?: number;
71
+ section7HopEta?: number;
72
+ section7HopThreshold?: number;
73
+ section7AuthorityRecencyLambda?: number;
74
+ section7AuthorityRecencyWeight?: number;
75
+ section7AuthorityFrequencyWeight?: number;
76
+ section7AuthorityAuthoredWeight?: number;
77
+ summaryExpansionConfidenceThreshold?: number;
78
+ summaryExpansionDepth?: number;
79
+ summaryExpansionTokenBudget?: number;
80
+ summaryExpansionPenaltyFactor?: number;
81
+ recoveryFloorScore?: number;
82
+ recoveryMinTopK?: number;
83
+ recoveryMinConfidenceMean?: number;
84
+ ollamaUrl?: string;
85
+ compactModel?: string;
86
+ rpcTimeoutMs?: number;
87
+ maxRetries?: number;
88
+ logLevel?: "debug" | "info" | "warn" | "error";
89
+ grpcEndpoint?: string;
90
+ }
91
+ export interface SearchResult {
92
+ id: string;
93
+ score: number;
94
+ text: string;
95
+ metadata: {
96
+ ts?: number;
97
+ sessionId?: string;
98
+ userId?: string;
99
+ role?: string;
100
+ source_doc?: string;
101
+ node_kind?: string;
102
+ ordinal?: number;
103
+ position?: number;
104
+ tier?: number;
105
+ authored?: boolean;
106
+ authority?: number;
107
+ access_count?: number;
108
+ collection?: string;
109
+ hop_targets?: string[] | string;
110
+ token_estimate?: number;
111
+ continuity_tail?: boolean;
112
+ continuity_base?: boolean;
113
+ continuity_bundle_id?: string;
114
+ elevated_guidance?: boolean;
115
+ source_turn_id?: string;
116
+ source_turn_ts?: number;
117
+ provenance_class?: string;
118
+ stability_weight?: number;
119
+ expanded_from_summary?: boolean;
120
+ parent_summary_id?: string;
121
+ expansion_depth?: number;
122
+ cascade_tier?: number;
123
+ [key: string]: unknown;
124
+ };
125
+ finalScore?: number;
126
+ }
127
+ export interface SidecarSocket {
128
+ setEncoding(encoding: string): void;
129
+ on(event: "data", handler: (chunk: Buffer) => void): void;
130
+ on(event: "close", handler: () => void): void;
131
+ on(event: "error", handler: (error: Error) => void): void;
132
+ once(event: "connect", handler: () => void): void;
133
+ once(event: "error", handler: (error: Error) => void): void;
134
+ write(chunk: Buffer | string): void;
135
+ destroy(err?: Error): void;
136
+ }
137
+ export interface LoggerLike {
138
+ error(message: string): void;
139
+ info?(message: string): void;
140
+ warn?(message: string): void;
141
+ }
142
+ export interface SidecarHandle {
143
+ socket: SidecarSocket;
144
+ isDegraded(): boolean;
145
+ shutdown(): Promise<void>;
146
+ }
147
+ export interface RpcCallOptions {
148
+ timeoutMs: number;
149
+ }
150
+ export interface RecallCacheEntry<T = unknown> {
151
+ userId: string;
152
+ queryText: string;
153
+ durableVariantHits: T[];
154
+ userHits?: T[];
155
+ globalHits?: T[];
156
+ authoredVariantHits?: T[];
157
+ }
158
+ export interface RecallCache<T = unknown> {
159
+ put(entry: RecallCacheEntry<T>): void;
160
+ get(key: Pick<RecallCacheEntry<T>, "userId" | "queryText">): RecallCacheEntry<T> | undefined;
161
+ take(key: Pick<RecallCacheEntry<T>, "userId" | "queryText">): RecallCacheEntry<T> | undefined;
162
+ clearUser(userId: string): void;
163
+ }
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};
@@ -3,7 +3,6 @@
3
3
  ## Prerequisites
4
4
 
5
5
  - Node.js `>= 22`
6
- - Go `>= 1.22` for daemon development and release builds
7
6
  - `pnpm`
8
7
  - OpenClaw CLI for end-to-end plugin testing
9
8
 
@@ -21,12 +20,10 @@ Integration tests:
21
20
  npm run test:integration
22
21
  ```
23
22
 
24
- Go daemon tests:
23
+ Plugin integration tests:
25
24
 
26
25
  ```bash
27
- cd sidecar
28
- env GOCACHE=/tmp/openclaw-memory-libravdb-gocache go test ./...
29
- env GOCACHE=/tmp/openclaw-memory-libravdb-gocache go test -race ./...
26
+ npm run test:integration
30
27
  ```
31
28
 
32
29
  ## Local Daemon Build
@@ -35,12 +32,19 @@ env GOCACHE=/tmp/openclaw-memory-libravdb-gocache go test -race ./...
35
32
  bash scripts/build-daemon.sh
36
33
  ```
37
34
 
38
- This creates `.daemon-bin/libravdbd` and copies locally available bundled assets into `.daemon-bin/`.
39
- That includes the embedding models, ONNX Runtime, and the bundled T5 summarizer assets when they are present under `.models/`.
35
+ This prepares `.daemon-bin/libravdbd` for local plugin testing and copies locally available bundled assets into `.daemon-bin/`.
36
+
37
+ Supported inputs:
38
+
39
+ - installed daemon on `PATH` such as `brew install libravdbd`
40
+ - `LIBRAVDBD_BINARY_PATH=/path/to/libravdbd`
41
+ - `LIBRAVDBD_SOURCE_DIR=/path/to/libravdbd` to build from your private local daemon repo
42
+
43
+ For daemon-internal Go development and release work, use the separate `libravdbd` repository.
40
44
 
41
45
  ## Gating Invariants
42
46
 
43
- Do not weaken the gate invariants casually. The tests in `sidecar/compact/gate_test.go` check structural properties:
47
+ Do not weaken the gate invariants casually. The daemon-owned tests in `libravdbd/compact/gate_test.go` check structural properties:
44
48
 
45
49
  - empty-memory novelty
46
50
  - saturation veto
@@ -55,7 +59,7 @@ If you add a new signal, it must preserve those invariants.
55
59
 
56
60
  There is not yet a dedicated `gate_calibration_test.go` golden set in the
57
61
  repository. Current gating correctness is enforced by the invariant suite in
58
- [`sidecar/compact/gate_test.go`](../sidecar/compact/gate_test.go).
62
+ `libravdbd/compact/gate_test.go`.
59
63
 
60
64
  If you introduce new signals or change weighting behavior, do not only update
61
65
  the implementation. Add one of:
@@ -71,7 +75,7 @@ Do not rewrite expectations just to make regressions disappear.
71
75
  Before opening a PR:
72
76
 
73
77
  - `pnpm check` must pass
74
- - `go test -race ./...` from `sidecar/` must pass
78
+ - plugin integration coverage must pass against a running daemon or a prepared local daemon binary
75
79
  - any new gating signal must come with calibration or invariant coverage
76
80
  - any retrieval math or gating change must be reflected in the private design notes
77
81
 
@@ -82,6 +86,3 @@ Before opening a PR:
82
86
  The release automation syncs `openclaw.plugin.json` from `package.json` during the
83
87
  auto-bump/tag flow, and the publish workflow refuses to publish if the Git tag,
84
88
  `package.json`, and `openclaw.plugin.json` versions do not all match.
85
-
86
- The daemon release workflow enforces the same alignment before generating the
87
- Homebrew formula, so package, manifest, tag, and formula versioning stay in lockstep.
package/docs/install.md CHANGED
@@ -12,7 +12,7 @@ For deeper operational detail, use the full
12
12
  On macOS, the shortest supported path is:
13
13
 
14
14
  ```bash
15
- brew tap xDarkicex/openclaw-libravdb-memory
15
+ brew tap xDarkicex/homebrew-openclaw-libravdb-memory
16
16
  brew install libravdbd
17
17
  brew services start libravdbd
18
18
  openclaw plugins install @xdarkicex/openclaw-memory-libravdb
@@ -85,7 +85,7 @@ Default data path:
85
85
  Homebrew is the preferred daemon lifecycle on macOS:
86
86
 
87
87
  ```bash
88
- brew tap xDarkicex/openclaw-libravdb-memory
88
+ brew tap xDarkicex/homebrew-openclaw-libravdb-memory
89
89
  brew install libravdbd
90
90
  brew services start libravdbd
91
91
  ```
@@ -105,20 +105,18 @@ If you are not using Homebrew, manage the daemon explicitly.
105
105
  Linux user service from the repo template:
106
106
 
107
107
  ```bash
108
- # Replace vX.Y.Z with the latest tag from:
109
- # https://github.com/xDarkicex/openclaw-memory-libravdb/releases
108
+ # Replace vX.Y.Z with the published libravdbd release you want to install.
110
109
  mkdir -p ~/.local/bin ~/.config/systemd/user
111
- curl -L -o ~/.local/bin/libravdbd https://github.com/xDarkicex/openclaw-memory-libravdb/releases/download/vX.Y.Z/libravdbd-linux-amd64
110
+ # Download the matching published libravdbd binary and service template.
111
+ curl -L -o ~/.local/bin/libravdbd <published-libravdbd-binary-url>
112
112
  chmod +x ~/.local/bin/libravdbd
113
- curl -L -o ~/.config/systemd/user/libravdbd.service \
114
- https://raw.githubusercontent.com/xDarkicex/openclaw-memory-libravdb/main/packaging/systemd/libravdbd.service
113
+ curl -L -o ~/.config/systemd/user/libravdbd.service <published-libravdbd-service-template-url>
115
114
  systemctl --user enable --now libravdbd.service
116
115
  ```
117
116
 
118
117
  macOS LaunchAgent from the repo template:
119
118
 
120
- 1. Download `com.xdarkicex.libravdbd.plist` from:
121
- `https://raw.githubusercontent.com/xDarkicex/openclaw-memory-libravdb/main/packaging/launchd/com.xdarkicex.libravdbd.plist`
119
+ 1. Download the published `com.xdarkicex.libravdbd.plist` template for your release.
122
120
  2. Replace `__HOME__` with your home directory.
123
121
  3. Save it to `~/Library/LaunchAgents/com.xdarkicex.libravdbd.plist`.
124
122
  4. Load it with `launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/com.xdarkicex.libravdbd.plist`.
@@ -120,7 +120,7 @@ extractive compaction. The only optional runtime network path is:
120
120
  ### Fastest Path on macOS
121
121
 
122
122
  ```bash
123
- brew tap xDarkicex/openclaw-libravdb-memory
123
+ brew tap xDarkicex/homebrew-openclaw-libravdb-memory
124
124
  brew install libravdbd
125
125
  brew services start libravdbd
126
126
  openclaw plugins install @xdarkicex/openclaw-memory-libravdb
@@ -134,7 +134,7 @@ This is the preferred install flow for macOS users. It gives you a managed `libr
134
134
  openclaw plugins install @xdarkicex/openclaw-memory-libravdb
135
135
  ```
136
136
 
137
- The plugin package installs as normal OpenClaw source without daemon bootstrap hooks.
137
+ The plugin package installs as compiled OpenClaw runtime code without daemon bootstrap hooks.
138
138
 
139
139
  ## Daemon Install
140
140
 
@@ -153,9 +153,9 @@ Recommended layout:
153
153
 
154
154
  ```bash
155
155
  mkdir -p ~/.local/bin ~/.config/systemd/user
156
- curl -L -o ~/.local/bin/libravdbd https://github.com/xDarkicex/openclaw-memory-libravdb/releases/download/vX.Y.Z/libravdbd-linux-amd64
156
+ curl -L -o ~/.local/bin/libravdbd <published-libravdbd-binary-url>
157
157
  chmod +x ~/.local/bin/libravdbd
158
- cp packaging/systemd/libravdbd.service ~/.config/systemd/user/libravdbd.service
158
+ cp <published-libravdbd-service-template> ~/.config/systemd/user/libravdbd.service
159
159
  systemctl --user enable --now libravdbd.service
160
160
  ```
161
161
 
@@ -171,12 +171,12 @@ openclaw memory status
171
171
  Homebrew users should normally install from the published tap:
172
172
 
173
173
  ```bash
174
- brew tap xDarkicex/openclaw-libravdb-memory
174
+ brew tap xDarkicex/homebrew-openclaw-libravdb-memory
175
175
  brew install libravdbd
176
176
  brew services start libravdbd
177
177
  ```
178
178
 
179
- The release workflow generates a publish-ready `libravdbd.rb` formula asset from [`packaging/homebrew/libravdbd.rb.tmpl`](../packaging/homebrew/libravdbd.rb.tmpl). It is designed for GitHub release assets named:
179
+ The daemon release pipeline generates a publish-ready `libravdbd.rb` formula asset for release assets named:
180
180
 
181
181
  - `libravdbd-darwin-arm64`
182
182
  - `libravdbd-darwin-amd64`
@@ -187,8 +187,7 @@ The generated Homebrew formula also stages the bundled ONNX Runtime archive, the
187
187
 
188
188
  If your GitHub Actions configuration includes:
189
189
 
190
- - repository variable `HOMEBREW_TAP_REPO`, for example `xDarkicex/homebrew-openclaw-libravdb-memory`
191
- - repository secret `HOMEBREW_TAP_TOKEN`
190
+ - public tap repository `xDarkicex/homebrew-openclaw-libravdb-memory`
192
191
 
193
192
  then tagged releases also push the generated formula into `Formula/libravdbd.rb` in that tap repository automatically.
194
193
 
@@ -220,7 +219,7 @@ Installed plugin: libravdb-memory
220
219
 
221
220
  ## Activation
222
221
 
223
- The plugin declares `kind: ["memory", "context-engine"]` and is intended to own both the `memory` and `contextEngine` slots together. Treat partial slot assignment as a misconfiguration.
222
+ The manifest declares `kind: "context-engine"` and the runtime registers the memory prompt and memory runtime surfaces in code. It is still intended to own both the `memory` and `contextEngine` slots together. Treat partial slot assignment as a misconfiguration.
224
223
 
225
224
  Add this to `~/.openclaw/openclaw.json`:
226
225
 
@@ -281,30 +280,38 @@ For contributors working from a clone:
281
280
 
282
281
  ```bash
283
282
  pnpm check
284
- cd sidecar && env GOCACHE=/tmp/openclaw-memory-libravdb-gocache go test -race ./... && cd ..
285
283
  bash scripts/build-daemon.sh
286
284
  ```
287
285
 
288
- This produces a local daemon binary in `.daemon-bin/libravdbd` (or `.exe` on Windows) and copies any locally available model/runtime assets there for testing.
286
+ This prepares a local daemon binary in `.daemon-bin/libravdbd` (or `.exe` on Windows) and copies any locally available model/runtime assets there for testing.
287
+
288
+ Contributor default:
289
+
290
+ - install `libravdbd` separately with Homebrew or release assets, then run `bash scripts/build-daemon.sh`
291
+
292
+ Private local daemon development:
293
+
294
+ - set `LIBRAVDBD_SOURCE_DIR=/path/to/libravdbd` to build from your local daemon repo
295
+ - or set `LIBRAVDBD_BINARY_PATH=/path/to/libravdbd` to use a prebuilt local daemon binary
289
296
 
290
297
  ## User-Service Templates
291
298
 
292
- Phase 2 packaging assets are included in-repo:
299
+ Published daemon installs include matching user-service templates:
293
300
 
294
- - Linux user service: [`packaging/systemd/libravdbd.service`](../packaging/systemd/libravdbd.service)
295
- - macOS LaunchAgent: [`packaging/launchd/com.xdarkicex.libravdbd.plist`](../packaging/launchd/com.xdarkicex.libravdbd.plist)
301
+ - Linux user service: `libravdbd.service`
302
+ - macOS LaunchAgent: `com.xdarkicex.libravdbd.plist`
296
303
 
297
304
  Linux example:
298
305
 
299
306
  ```bash
300
307
  mkdir -p ~/.config/systemd/user
301
- cp packaging/systemd/libravdbd.service ~/.config/systemd/user/libravdbd.service
308
+ cp <published-libravdbd-service-template> ~/.config/systemd/user/libravdbd.service
302
309
  systemctl --user enable --now libravdbd.service
303
310
  ```
304
311
 
305
312
  macOS example:
306
313
 
307
- 1. Copy `packaging/launchd/com.xdarkicex.libravdbd.plist`
314
+ 1. Copy the published `com.xdarkicex.libravdbd.plist`
308
315
  2. Replace `__LIBRAVDBD_PATH__` and `__HOME__`
309
316
  3. Save it to `~/Library/LaunchAgents/com.xdarkicex.libravdbd.plist`
310
317
  4. Load it with `launchctl load ~/Library/LaunchAgents/com.xdarkicex.libravdbd.plist`
package/docs/uninstall.md CHANGED
@@ -64,7 +64,7 @@ longer assigned to an active slot.
64
64
 
65
65
  ```bash
66
66
  brew uninstall libravdbd
67
- brew untap xDarkicex/openclaw-libravdb-memory
67
+ brew untap xDarkicex/homebrew-openclaw-libravdb-memory
68
68
  ```
69
69
 
70
70
  ### Manual Daemon Install
package/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { default } from "./dist/index.js";
2
+ export * from "./dist/index.js";
@@ -2,8 +2,8 @@
2
2
  "id": "libravdb-memory",
3
3
  "name": "LibraVDB Memory",
4
4
  "description": "Persistent vector memory with three-tier hybrid scoring",
5
- "version": "1.4.6",
6
- "kind": ["memory", "context-engine"],
5
+ "version": "1.4.7",
6
+ "kind": "context-engine",
7
7
  "configSchema": {
8
8
  "type": "object",
9
9
  "additionalProperties": false,
package/package.json CHANGED
@@ -1,44 +1,67 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.4.6",
3
+ "version": "1.4.7",
4
4
  "type": "module",
5
+ "main": "./dist/index.js",
6
+ "types": "./dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "default": "./dist/index.js"
12
+ },
13
+ "./openclaw.plugin.json": "./openclaw.plugin.json",
14
+ "./HOOK.md": "./HOOK.md"
15
+ },
5
16
  "publishConfig": {
6
17
  "access": "public"
7
18
  },
8
19
  "files": [
9
20
  "README.md",
21
+ "HOOK.md",
22
+ "index.js",
10
23
  "openclaw.plugin.json",
11
24
  "package.json",
12
- "packaging/",
13
- "src/",
14
25
  "docs/",
15
- "tsconfig.json",
16
- "tsconfig.tests.json"
26
+ "dist/"
17
27
  ],
18
28
  "engines": {
19
29
  "node": ">=22"
20
30
  },
21
31
  "openclaw": {
22
32
  "extensions": [
23
- "./src/index.ts"
24
- ]
33
+ "./dist/index.js"
34
+ ],
35
+ "install": {
36
+ "minHostVersion": ">=2026.3.22"
37
+ }
25
38
  },
26
39
  "scripts": {
27
- "check": "./.ts-toolchain/node_modules/.bin/tsc --noEmit && pnpm run test:ts",
28
- "test:ts": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && node --test .ts-build/test/unit/*.test.js",
29
- "test:integration": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && node --test .ts-build/test/integration/checklist-validation.test.js .ts-build/test/integration/dream-promotion.test.js .ts-build/test/integration/host-flow.test.js .ts-build/test/integration/markdown-ingest.test.js .ts-build/test/integration/sidecar-lifecycle.test.js",
30
- "benchmark:session_search_mid": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
31
- "gate:assemble_optimization": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 OPENCLAW_ENFORCE_ASSEMBLE_EVIDENCE_GATE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
32
- "probe:session_recall": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
33
- "probe:session_recall_threshold": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar session_recall index threshold probe\" .ts-build/test/integration/host-flow.test.js",
34
- "benchmark:longmemeval": "./.ts-toolchain/node_modules/.bin/tsc -p tsconfig.tests.json && node --test .ts-build/test/integration/longmemeval-benchmark.test.js",
40
+ "build": "pnpm run generate:contracts && tsc -p tsconfig.build.json && mkdir -p dist/proto && cp -rf api/proto/. dist/proto/",
41
+ "check": "tsc --noEmit && pnpm run test:ts",
42
+ "test:ts": "tsc -p tsconfig.tests.json && node --test .ts-build/test/unit/*.test.js",
43
+ "test:integration": "tsc -p tsconfig.tests.json && node --test .ts-build/test/integration/checklist-validation.test.js .ts-build/test/integration/dream-promotion.test.js .ts-build/test/integration/host-flow.test.js .ts-build/test/integration/markdown-ingest.test.js .ts-build/test/integration/sidecar-lifecycle.test.js",
44
+ "benchmark:session_search_mid": "tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
45
+ "gate:assemble_optimization": "tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 OPENCLAW_ENFORCE_ASSEMBLE_EVIDENCE_GATE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
46
+ "probe:session_recall": "tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar mid-sized session search benchmark\" .ts-build/test/integration/host-flow.test.js",
47
+ "probe:session_recall_threshold": "tsc -p tsconfig.tests.json && OPENCLAW_PROFILE_ASSEMBLE=1 node --test --test-name-pattern=\"real sidecar session_recall index threshold probe\" .ts-build/test/integration/host-flow.test.js",
48
+ "benchmark:longmemeval": "tsc -p tsconfig.tests.json && node --test .ts-build/test/integration/longmemeval-benchmark.test.js",
35
49
  "benchmark:longmemeval:score": "node scripts/longmemeval-score.mjs",
36
50
  "benchmark:longmemeval:diagnose": "node scripts/longmemeval-diagnose.mjs",
37
- "build:daemon": "bash scripts/build-daemon.sh"
51
+ "prepack": "npm run build",
52
+ "build:daemon": "bash scripts/build-daemon.sh",
53
+ "generate:contracts": "cd ../libravdb-contracts && pnpm run build && cp -r gen/js/. ../openclaw-memory-libravdb/src/generated/"
38
54
  },
39
55
  "dependencies": {
56
+ "@bufbuild/protobuf": "1.7.2",
57
+ "@grpc/grpc-js": "^1.14.3",
58
+ "@grpc/proto-loader": "^0.8.0",
59
+ "@xdarkicex/libravdb-contracts": "file:../libravdb-contracts",
40
60
  "openclaw": "*"
41
61
  },
62
+ "devDependencies": {
63
+ "@types/node": "^20.11.0"
64
+ },
42
65
  "peerDependencies": {
43
66
  "openclaw": ">=2026.3.22"
44
67
  }
@@ -1,71 +0,0 @@
1
- # Packaging Assets
2
-
3
- This directory contains Phase 2 daemon-distribution assets for `libravdbd`.
4
-
5
- - `systemd/libravdbd.service`: user-service template for Linux.
6
- - `launchd/com.xdarkicex.libravdbd.plist`: LaunchAgent template for macOS.
7
- - `homebrew/libravdbd.rb.tmpl`: source template used to generate a publish-ready Homebrew formula.
8
-
9
- The templates assume the default daemon endpoint contract used by the plugin:
10
-
11
- - macOS/Linux: `unix:$HOME/.clawdb/run/libravdb.sock`
12
- - Windows: `tcp:127.0.0.1:37421`
13
-
14
- ## LaunchAgent plist
15
-
16
- Before loading the macOS plist, replace:
17
-
18
- - `__LIBRAVDBD_PATH__` with the absolute path to the `libravdbd` binary
19
- - `__HOME__` with the current user's home directory
20
- - `__ONNX_RUNTIME_LIB__` with the absolute path to the ONNX runtime shared library (e.g. `/path/to/onnxruntime/onnxruntime-osx-arm64-1.23.0/lib/libonnxruntime.dylib`)
21
-
22
- ## Provisioning models and runtime
23
-
24
- **Primary install path:** The Homebrew formula (`brew install libravdbd`)
25
- provisions all required assets — ONNX Runtime, nomic-embed-text-v1.5,
26
- all-minilm-l6-v2, and t5-small — inline during `brew install`. No
27
- additional steps are needed for a clean install.
28
-
29
- **Repair / recovery:** If assets are deleted or corrupted after install,
30
- `scripts/provision.sh` can rebuild them. This is an operator tool, not
31
- the normal install path.
32
-
33
- ```bash
34
- bash scripts/provision.sh # provisions into .daemon-bin/
35
- bash scripts/provision.sh --target /opt/libravdbd/assets # custom target
36
- bash scripts/provision.sh --skip-summarizer # skip optional t5-small model
37
- ```
38
-
39
- The script downloads models from HuggingFace and the ONNX runtime from
40
- GitHub Releases, verifies SHA-256 checksums, and writes the `embedding.json`
41
- manifests that `libravdbd` needs at startup. It is idempotent — existing
42
- verified assets are left in place.
43
-
44
- The npm package does not include `provision.sh` or any install-time
45
- provisioning hooks. The `scripts/` directory is excluded from the
46
- published npm tarball via the `files` whitelist in `package.json`.
47
-
48
- ## Homebrew formula
49
-
50
- The release workflow now generates `dist/libravdbd.rb` from this template using
51
- the release version and SHA-256 files. If `HOMEBREW_TAP_REPO` and
52
- `HOMEBREW_TAP_TOKEN` are configured in GitHub Actions, the workflow also updates
53
- the tap automatically.
54
-
55
- The Homebrew formula stages the bundled ONNX Runtime archive, the shipped
56
- embedding profile assets, and the T5 summarizer bundle into the install prefix
57
- so the daemon can boot without an extra asset-unpack step.
58
-
59
- Expected GitHub configuration:
60
-
61
- - repository variable `HOMEBREW_TAP_REPO`, for example `xDarkicex/homebrew-openclaw-libravdb-memory`
62
- - repository secret `HOMEBREW_TAP_TOKEN` with push access to that tap repo
63
-
64
- Template placeholders:
65
-
66
- - `__VERSION__`
67
- - `__SHA256_DARWIN_ARM64__`
68
- - `__SHA256_DARWIN_AMD64__`
69
- - `__SHA256_LINUX_ARM64__`
70
- - `__SHA256_LINUX_AMD64__`
71
- - `__SHA256_PROVISION__`