@xdarkicex/openclaw-memory-libravdb 1.4.16 → 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/docs/README.md CHANGED
@@ -1,16 +1,31 @@
1
- # Documentation Index
2
-
3
- This index lists the public docs that remain in the main repo. Detailed math
4
- and private design notes are kept out of the public index on purpose.
5
-
6
- - [installation.md](./installation.md) - Complete install, activation, verification, and troubleshooting reference.
7
- - [install.md](./install.md) - Practical lifecycle guide for Homebrew, the OpenClaw plugin, and manual daemon management.
8
- - [uninstall.md](./uninstall.md) - Clean shutdown and removal guide for the plugin, daemon, and optional local data.
9
- - [architecture.md](./architecture.md) - Public system overview covering the plugin, daemon, storage, retrieval, and compaction flow.
10
- - [problem.md](./problem.md) - Technical argument for replacing the stock OpenClaw memory lifecycle in this use case.
11
- - [dependencies.md](./dependencies.md) - Why LibraVDB and slab-based storage were chosen for this plugin.
12
- - [models.md](./models.md) - ONNX model strategy, latency trade-offs, and shipped model roles.
13
- - [security.md](./security.md) - Security model, untrusted-memory framing, isolation guarantees, and deletion boundaries.
14
- - [contributing.md](./contributing.md) - Contributor workflow, prerequisites, and invariant test expectations.
15
- - [architecture-decisions/README.md](./architecture-decisions/README.md) - Index of the repository ADRs.
16
- - [embedding-profiles.md](./embedding-profiles.md) - Shipped embedding profile baseline and current profile metadata.
1
+ # LibraVDB Memory Docs
2
+
3
+ This directory holds the operational and design docs for the LibraVDB Memory
4
+ OpenClaw plugin. The root README is the public entry point; these files go
5
+ deeper by goal.
6
+
7
+ ## Start Here
8
+
9
+ - [Install](./install.md) - shortest supported install and daemon lifecycle path.
10
+ - [Installation reference](./installation.md) - requirements, activation, verification, and troubleshooting.
11
+ - [Uninstall](./uninstall.md) - safe disable, daemon shutdown, package removal, and optional data cleanup.
12
+
13
+ ## Understand The System
14
+
15
+ - [Problem](./problem.md) - why this plugin replaces the stock memory lifecycle.
16
+ - [Architecture](./architecture.md) - plugin, sidecar, storage, retrieval, and compaction overview.
17
+ - [Dependency rationale](./dependencies.md) - why LibraVDB and slab-style storage fit this workload.
18
+ - [Architecture decisions](./architecture-decisions/README.md) - accepted ADRs.
19
+
20
+ ## Configure And Operate
21
+
22
+ - [Features](./features.md) - markdown ingestion, Obsidian ingestion, dream promotion, and memory CLI commands.
23
+ - [Security](./security.md) - trust boundaries, untrusted-memory framing, collection isolation, and deletion limits.
24
+ - [Embedding profiles](./embedding-profiles.md) - shipped embedding profile metadata and defaults.
25
+ - [Models](./models.md) - local ONNX model strategy and summarization roles.
26
+
27
+ ## Advanced And Source Docs
28
+
29
+ - [Performance and tuning](./performance-and-tuning.md) - resource expectations and tuning knobs.
30
+ - [Development](./development.md) - source setup, local daemon builds, generated IPC files, and validation commands.
31
+ - [Contributing](./contributing.md) - contributor workflow and repository expectations.
@@ -0,0 +1,14 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1280" height="170" viewBox="0 0 1280 170" role="img" aria-labelledby="title desc">
2
+ <title id="title">LibraVDB</title>
3
+ <desc id="desc">Dark purple LibraVDB wordmark.</desc>
4
+ <rect width="1280" height="170" fill="none"/>
5
+ <text
6
+ x="640"
7
+ y="128"
8
+ text-anchor="middle"
9
+ fill="#5B21B6"
10
+ font-family="Inter, Avenir Next, Helvetica Neue, Arial, sans-serif"
11
+ font-size="150"
12
+ font-weight="800"
13
+ letter-spacing="0">LibraVDB</text>
14
+ </svg>
@@ -1,88 +1,35 @@
1
1
  # Contributing
2
2
 
3
- ## Prerequisites
3
+ Use [Development](./development.md) for source setup, local daemon preparation,
4
+ generated IPC files, and validation commands. This document covers contribution
5
+ expectations.
4
6
 
5
- - Node.js `>= 22`
6
- - `pnpm`
7
- - OpenClaw CLI for end-to-end plugin testing
7
+ ## Baseline Checks
8
8
 
9
- ## Core Validation Commands
10
-
11
- TypeScript and unit checks:
9
+ Before opening a PR:
12
10
 
13
11
  ```bash
14
12
  pnpm check
15
- ```
16
-
17
- Integration tests:
18
-
19
- ```bash
20
- npm run test:integration
21
- ```
22
-
23
- Plugin integration tests:
24
-
25
- ```bash
26
13
  npm run test:integration
27
14
  ```
28
15
 
29
- ## Local Daemon Build
16
+ Integration tests require a running daemon or a prepared local daemon binary.
17
+ Use:
30
18
 
31
19
  ```bash
32
20
  bash scripts/build-daemon.sh
33
21
  ```
34
22
 
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.
23
+ ## Behavioral Changes
44
24
 
45
- ## Gating Invariants
46
-
47
- Do not weaken the gate invariants casually. The daemon-owned tests in `libravdbd/compact/gate_test.go` check structural properties:
48
-
49
- - empty-memory novelty
50
- - saturation veto
51
- - convex boundedness
52
- - conversational collapse at `T = 0`
53
- - technical collapse at `T = 1`
54
- - non-overfiring conversational structure on code
55
-
56
- If you add a new signal, it must preserve those invariants.
57
-
58
- ## Calibration Coverage
59
-
60
- There is not yet a dedicated `gate_calibration_test.go` golden set in the
61
- repository. Current gating correctness is enforced by the invariant suite in
62
- `libravdbd/compact/gate_test.go`.
63
-
64
- If you introduce new signals or change weighting behavior, do not only update
65
- the implementation. Add one of:
66
-
67
- - a new invariant if the change alters a structural property of the gate
68
- - a dedicated calibration/golden test file if the change adds new labeled
69
- examples or expected decompositions
70
-
71
- Do not rewrite expectations just to make regressions disappear.
25
+ If you change retrieval, compaction, or ranking behavior, add or update the
26
+ matching validation coverage and avoid weakening checks just to hide a
27
+ regression.
72
28
 
73
29
  ## PR Expectations
74
30
 
75
- Before opening a PR:
76
-
77
- - `pnpm check` must pass
78
- - plugin integration coverage must pass against a running daemon or a prepared local daemon binary
79
- - any new gating signal must come with calibration or invariant coverage
80
- - any retrieval math or gating change must be reflected in the private design notes
81
-
82
- ## Release Versioning
83
-
84
- `package.json` is the source of truth for the release version.
85
-
86
- The release automation syncs `openclaw.plugin.json` from `package.json` during the
87
- auto-bump/tag flow, and the publish workflow refuses to publish if the Git tag,
88
- `package.json`, and `openclaw.plugin.json` versions do not all match.
31
+ - Keep plugin lifecycle and daemon lifecycle separate.
32
+ - Include focused docs updates for user-visible behavior or config changes.
33
+ - Keep internal design changes reflected in the appropriate design notes.
34
+ - Do not add install-time daemon bootstrap to the npm/OpenClaw package without
35
+ documenting the security and distribution trade-off.
@@ -0,0 +1,98 @@
1
+ # Development
2
+
3
+ This document covers source setup and repository maintenance tasks. For user
4
+ installation, use [Install](./install.md).
5
+
6
+ ## Prerequisites
7
+
8
+ - Node.js `>= 22`
9
+ - `pnpm`
10
+ - OpenClaw CLI for end-to-end plugin testing
11
+ - a published or locally built `libravdbd` daemon for integration tests
12
+
13
+ Go is only required when building the daemon from a local daemon checkout or
14
+ regenerating Go gRPC stubs.
15
+
16
+ ## Source Setup
17
+
18
+ ```bash
19
+ pnpm install
20
+ pnpm check
21
+ ```
22
+
23
+ `pnpm check` runs TypeScript validation and unit tests:
24
+
25
+ ```bash
26
+ tsc --noEmit
27
+ tsc -p tsconfig.tests.json && node --test .ts-build/test/unit/*.test.js
28
+ ```
29
+
30
+ ## Local Daemon Build
31
+
32
+ Prepare `.daemon-bin/libravdbd` for local plugin testing:
33
+
34
+ ```bash
35
+ bash scripts/build-daemon.sh
36
+ ```
37
+
38
+ Supported inputs:
39
+
40
+ - installed daemon on `PATH`, such as `brew install libravdbd`
41
+ - `LIBRAVDBD_BINARY_PATH=/path/to/libravdbd`
42
+ - `LIBRAVDBD_SOURCE_DIR=/path/to/libravdbd` to build from a local daemon repo
43
+
44
+ For daemon-internal Go development and release work, use the separate
45
+ `libravdbd` repository.
46
+
47
+ ## Validation Commands
48
+
49
+ ```bash
50
+ pnpm check
51
+ npm run test:integration
52
+ ```
53
+
54
+ Benchmark and tuning commands are documented in
55
+ [Performance and tuning](./performance-and-tuning.md).
56
+
57
+ ## Generated IPC Files
58
+
59
+ The plugin imports generated IPC envelope and RPC payload classes from
60
+ `src/generated/libravdb/ipc/v1/rpc_pb.js`.
61
+
62
+ Those generated files are checked in and copied into `dist/generated/` during
63
+ `npm run build`:
64
+
65
+ ```bash
66
+ npm run build
67
+ ```
68
+
69
+ Do not replace those imports with the older external
70
+ `@xdarkicex/libravdb-contracts` path. The current package resolves generated
71
+ types from this repository.
72
+
73
+ ## Proto Generation
74
+
75
+ The repo also contains `api/proto/intelligence_kernel/v1/kernel.proto` and a
76
+ small `Makefile` target for Go gRPC stub generation:
77
+
78
+ ```bash
79
+ make proto
80
+ ```
81
+
82
+ That target assumes Homebrew-style locations for `go`, `protoc`, and the Go
83
+ plugins. Adjust the Makefile locally if your toolchain lives elsewhere.
84
+
85
+ ## Release Shape
86
+
87
+ The npm package contains:
88
+
89
+ - `README.md`
90
+ - `HOOK.md`
91
+ - `index.js`
92
+ - `openclaw.plugin.json`
93
+ - `package.json`
94
+ - `docs/`
95
+ - `dist/`
96
+
97
+ The package is connect-only. It does not compile Go code, download models, or
98
+ manage the daemon process during plugin installation.
@@ -0,0 +1,125 @@
1
+ # Features
2
+
3
+ This document covers optional plugin features that do not belong in the root
4
+ README: markdown ingestion, Obsidian ingestion, dream promotion, and memory CLI
5
+ commands.
6
+
7
+ ## Markdown Ingestion
8
+
9
+ LibraVDB Memory can watch markdown roots and sync changed notes into vector
10
+ memory without changing the sidecar RPC contract.
11
+
12
+ The built-in source adapters are:
13
+
14
+ - `generic` for OpenClaw-owned markdown, including stock files like `MEMORY.md`
15
+ - `obsidian` for Obsidian vault roots, with tag-aware defaults
16
+
17
+ Typical usage:
18
+
19
+ - point `markdownIngestionRoots` at OpenClaw-owned markdown roots, such as
20
+ `.openclaw/skills/*/*.md` or a directory that contains `MEMORY.md`
21
+ - enable the Obsidian adapter with `markdownIngestionObsidianEnabled: true` and
22
+ one or more vault roots
23
+ - use include/exclude globs to narrow what gets watched
24
+
25
+ Example:
26
+
27
+ ```json
28
+ {
29
+ "plugins": {
30
+ "configs": {
31
+ "libravdb-memory": {
32
+ "markdownIngestionEnabled": true,
33
+ "markdownIngestionRoots": [
34
+ "/Users/<you>/.openclaw/memory"
35
+ ],
36
+ "markdownIngestionObsidianEnabled": true,
37
+ "markdownIngestionObsidianRoots": [
38
+ "/Users/<you>/Documents/Obsidian/Main"
39
+ ]
40
+ }
41
+ }
42
+ }
43
+ }
44
+ ```
45
+
46
+ Relevant config fields:
47
+
48
+ | Field | Purpose |
49
+ |---|---|
50
+ | `markdownIngestionEnabled` | Enables or disables generic markdown ingestion. |
51
+ | `markdownIngestionRoots` | Generic markdown roots to watch. |
52
+ | `markdownIngestionInclude` | Optional include globs for generic roots. |
53
+ | `markdownIngestionExclude` | Optional exclude globs for generic roots. |
54
+ | `markdownIngestionCollection` | Target collection for generic markdown, default `global`. |
55
+ | `markdownIngestionDebounceMs` | Watch debounce window, default `150`. |
56
+ | `markdownIngestionObsidianEnabled` | Enables Obsidian ingestion when vault roots exist. |
57
+ | `markdownIngestionObsidianRoots` | Obsidian vault roots to watch. |
58
+ | `markdownIngestionObsidianInclude` | Optional include globs for Obsidian roots. |
59
+ | `markdownIngestionObsidianExclude` | Optional exclude globs for Obsidian roots. |
60
+ | `markdownIngestionObsidianDebounceMs` | Obsidian watch debounce window, default `150`. |
61
+
62
+ By default, the Obsidian adapter auto-ingests notes that look like memory notes,
63
+ using frontmatter tags or inline tags such as `#project`. The stock OpenClaw
64
+ `MEMORY.md` file is always eligible through the generic adapter path.
65
+
66
+ ## Dream Promotion
67
+
68
+ Dream promotion is an opt-in path for promoting vetted dream diary entries into
69
+ a dedicated `dream:{userId}` collection.
70
+
71
+ It does not use `MEMORY.md`. It expects a dream diary markdown file with
72
+ candidate bullets under promotion-oriented headings such as `## Deep Sleep`.
73
+ Each promoted bullet should include trailing metadata with the gating fields:
74
+
75
+ ```md
76
+ - Preserve the recent tail buffer {score=0.82 recall=3 unique=2}
77
+ ```
78
+
79
+ Only bullets that satisfy the sidecar gates are inserted. The dream collection
80
+ is isolated from normal `user:` and `global` retrieval by default, and dream
81
+ phrasing in chat or search queries routes there automatically.
82
+
83
+ Automatic diary watching:
84
+
85
+ ```json
86
+ {
87
+ "plugins": {
88
+ "configs": {
89
+ "libravdb-memory": {
90
+ "dreamPromotionEnabled": true,
91
+ "dreamPromotionDiaryPath": "/Users/<you>/DREAMS.md",
92
+ "dreamPromotionUserId": "<userId>",
93
+ "dreamPromotionDebounceMs": 150
94
+ }
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ Manual run:
101
+
102
+ ```bash
103
+ openclaw memory dream-promote --user-id <userId> --dream-file /path/to/DREAMS.md
104
+ ```
105
+
106
+ The manual command and watcher both use the same sidecar promotion RPC, so
107
+ admission gates and provenance metadata are identical.
108
+
109
+ ## Memory CLI
110
+
111
+ The plugin registers `openclaw memory` commands when the host exposes the plugin
112
+ CLI API.
113
+
114
+ | Command | Purpose |
115
+ |---|---|
116
+ | `openclaw memory status` | Show sidecar health, counts, active thresholds, and model readiness. |
117
+ | `openclaw memory export --user-id <userId>` | Stream stored memories as newline-delimited JSON for one durable namespace. |
118
+ | `openclaw memory export --session-key <sessionKey>` | Export a namespace derived from a session key. |
119
+ | `openclaw memory flush --user-id <userId>` | Delete one durable user namespace after confirmation. |
120
+ | `openclaw memory flush --session-key <sessionKey>` | Delete a namespace derived from a session key after confirmation. |
121
+ | `openclaw memory journal --limit 50` | Inspect bounded lifecycle hints recorded by the sidecar. |
122
+ | `openclaw memory dream-promote --user-id <userId> --dream-file <path>` | Promote vetted dream diary bullets. |
123
+
124
+ Use `--yes` with `flush` only when you intentionally want to skip the
125
+ confirmation prompt.
package/docs/install.md CHANGED
@@ -4,6 +4,10 @@ LibraVDB Memory is a connect-only OpenClaw plugin. Install the plugin as a
4
4
  normal package, install `libravdbd` separately, and point the plugin at the
5
5
  daemon endpoint when you need a non-default location.
6
6
 
7
+ OpenClaw compatibility note:
8
+
9
+ - the plugin is currently verified against OpenClaw `2026.4.23`
10
+
7
11
  For deeper operational detail, use the full
8
12
  [installation reference](./installation.md).
9
13