@xdarkicex/openclaw-memory-libravdb 1.4.35 → 1.4.37
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/HOOK.md +97 -8
- package/dist/index.js +9 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +9 -3
package/HOOK.md
CHANGED
|
@@ -1,14 +1,103 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: libravdb-memory
|
|
3
|
-
description:
|
|
3
|
+
description: LibraVDB Memory plugin hook and capability metadata.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# LibraVDB Memory Hook
|
|
6
|
+
# LibraVDB Memory — Hook & Capability Reference
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
under `dist/`.
|
|
8
|
+
## Lifecycle Hooks
|
|
10
9
|
|
|
11
|
-
`
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
### `before_reset`
|
|
11
|
+
|
|
12
|
+
Fires when a session is reset via `/reset` or programmatic reset.
|
|
13
|
+
|
|
14
|
+
- **Emitter:** OpenClaw core
|
|
15
|
+
- **Behavior:** Sends a `session_lifecycle_hint` to the sidecar with hook type
|
|
16
|
+
`before_reset`, including session id, agent id, reason, message count, and
|
|
17
|
+
workspace directory.
|
|
18
|
+
- **Side effects:** Sidecar may persist hint for journaling or eviction
|
|
19
|
+
heuristics. Non-blocking.
|
|
20
|
+
|
|
21
|
+
### `session_end`
|
|
22
|
+
|
|
23
|
+
Fires when a session ends (user disconnects, session expires, or agent
|
|
24
|
+
completes).
|
|
25
|
+
|
|
26
|
+
- **Emitter:** OpenClaw core
|
|
27
|
+
- **Behavior:** Sends a `session_lifecycle_hint` with hook type `session_end`,
|
|
28
|
+
including session id, agent id, message count, duration, transcript archival
|
|
29
|
+
status, and next session id when applicable.
|
|
30
|
+
- **Side effects:** Sidecar may flush session-scoped indexes or journal the
|
|
31
|
+
event. Non-blocking.
|
|
32
|
+
|
|
33
|
+
### `gateway_stop`
|
|
34
|
+
|
|
35
|
+
Fires during gateway shutdown.
|
|
36
|
+
|
|
37
|
+
- **Emitter:** OpenClaw core
|
|
38
|
+
- **Behavior:** Flushes pending writes to the sidecar, then shuts down the
|
|
39
|
+
sidecar process and closes the gRPC kernel client (if configured).
|
|
40
|
+
- **Side effects:** Destructive — after this hook runs, the sidecar connection
|
|
41
|
+
is closed.
|
|
42
|
+
- **Configuration:** None required.
|
|
43
|
+
|
|
44
|
+
## Memory Capability
|
|
45
|
+
|
|
46
|
+
Registered via `registerMemoryCapability("libravdb-memory", { ... })`.
|
|
47
|
+
|
|
48
|
+
### `promptBuilder`
|
|
49
|
+
|
|
50
|
+
Returns a static memory header block injected into the system prompt. Actual
|
|
51
|
+
retrieval and ranking happen in the context engine during `assemble()`.
|
|
52
|
+
|
|
53
|
+
### `runtime`
|
|
54
|
+
|
|
55
|
+
Exposes `getMemorySearchManager()` for programmatic memory search. Delegates to
|
|
56
|
+
the sidecar over RPC. Supports session-scoped, user-scoped, and global
|
|
57
|
+
collection search with hybrid scoring.
|
|
58
|
+
|
|
59
|
+
## Context Engine
|
|
60
|
+
|
|
61
|
+
Registered via `registerContextEngine("libravdb-memory", factory)`.
|
|
62
|
+
`ownsCompaction: true` — compaction is managed by the plugin, not the host.
|
|
63
|
+
|
|
64
|
+
### `bootstrap(args)`
|
|
65
|
+
|
|
66
|
+
Initializes a session in the vector store. Called once per session. Resolves
|
|
67
|
+
the durable user identity from config, auto-derived identity file, or session
|
|
68
|
+
key.
|
|
69
|
+
|
|
70
|
+
### `ingest(args)`
|
|
71
|
+
|
|
72
|
+
Writes a conversational message into the vector store. Called after each
|
|
73
|
+
assistant turn and for heartbeat messages.
|
|
74
|
+
|
|
75
|
+
### `assemble(args)`
|
|
76
|
+
|
|
77
|
+
Retrieves and assembles context for the next model call. Runs predictive
|
|
78
|
+
compaction when the session exceeds the configured token threshold. Augments
|
|
79
|
+
results with exact-match durable memory recall for fact-lookup queries.
|
|
80
|
+
|
|
81
|
+
### `compact(args)`
|
|
82
|
+
|
|
83
|
+
Runs compaction on demand. Supports force compaction and target-size-driven
|
|
84
|
+
compaction. Uses the kernel (gRPC) path when available, falling back to
|
|
85
|
+
sidecar RPC.
|
|
86
|
+
|
|
87
|
+
### `afterTurn(args)`
|
|
88
|
+
|
|
89
|
+
Post-turn hook for side effects: incremental indexing, compaction trigger
|
|
90
|
+
evaluation, and lifecycle journaling. Called after every agent turn including
|
|
91
|
+
heartbeat turns.
|
|
92
|
+
|
|
93
|
+
## CLI
|
|
94
|
+
|
|
95
|
+
### `memory`
|
|
96
|
+
|
|
97
|
+
Root command registered via `registerCli` with lazy descriptors.
|
|
98
|
+
|
|
99
|
+
Subcommands: `status`, `index`, `search`, `flush`, `export`, `journal`,
|
|
100
|
+
`dream-promote`.
|
|
101
|
+
|
|
102
|
+
CLI registration guards on `plugins.slots.memory === "libravdb-memory"`.
|
|
103
|
+
Lightweight modes register CLI structure only (no runtime, no action handlers).
|
package/dist/index.js
CHANGED
|
@@ -39655,10 +39655,19 @@ function register(api) {
|
|
|
39655
39655
|
});
|
|
39656
39656
|
api.on("before_reset", createBeforeResetHook(runtime, api.logger ?? console));
|
|
39657
39657
|
api.on("session_end", createSessionEndHook(runtime, api.logger ?? console));
|
|
39658
|
+
api.on("agent_end", async (event) => {
|
|
39659
|
+
const e = asRecord(event) ?? {};
|
|
39660
|
+
logger.info?.(
|
|
39661
|
+
`LibraVDB agent_end success=${e.success ?? "unknown"} durationMs=${e.durationMs ?? "?"} error=${typeof e.error === "string" ? e.error : "none"}`
|
|
39662
|
+
);
|
|
39663
|
+
});
|
|
39658
39664
|
api.on("gateway_stop", async () => {
|
|
39659
39665
|
await runtime.shutdown();
|
|
39660
39666
|
});
|
|
39661
39667
|
}
|
|
39668
|
+
function asRecord(value) {
|
|
39669
|
+
return typeof value === "object" && value !== null ? value : null;
|
|
39670
|
+
}
|
|
39662
39671
|
var index_default = definePluginEntry({
|
|
39663
39672
|
id: MEMORY_ID,
|
|
39664
39673
|
name: "LibraVDB Memory",
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xdarkicex/openclaw-memory-libravdb",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.37",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -31,10 +31,16 @@
|
|
|
31
31
|
},
|
|
32
32
|
"openclaw": {
|
|
33
33
|
"extensions": [
|
|
34
|
-
"./dist/index.js"
|
|
34
|
+
"./dist/index.js",
|
|
35
|
+
"./dist/cli-metadata.js"
|
|
35
36
|
],
|
|
36
37
|
"compat": {
|
|
37
|
-
"pluginApi": ">=2026.3.22"
|
|
38
|
+
"pluginApi": ">=2026.3.22",
|
|
39
|
+
"minGatewayVersion": ">=2026.3.22"
|
|
40
|
+
},
|
|
41
|
+
"build": {
|
|
42
|
+
"openclawVersion": "2026.4.11",
|
|
43
|
+
"pluginSdkVersion": "2026.4.11"
|
|
38
44
|
},
|
|
39
45
|
"install": {
|
|
40
46
|
"minHostVersion": ">=2026.3.22"
|