@xdarkicex/openclaw-memory-libravdb 1.4.22 → 1.4.24
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/dist/cli.js +36 -34
- package/dist/context-engine.d.ts +1 -1
- package/dist/index.js +6 -2
- package/dist/markdown-ingest.js +45 -12
- package/dist/plugin-runtime.d.ts +2 -0
- package/dist/plugin-runtime.js +20 -0
- package/dist/rpc-protobuf-codecs.d.ts +2 -1
- package/dist/rpc-protobuf-codecs.js +2 -1
- package/dist/rpc.js +1 -1
- package/dist/types.d.ts +0 -1
- package/docs/features.md +0 -1
- package/openclaw.plugin.json +1 -5
- package/package.json +3 -2
- package/dist/generated/libravdb/ipc/v1/rpc_pb.d.ts +0 -1810
- package/dist/generated/libravdb/ipc/v1/rpc_pb.d.ts.map +0 -1
- package/dist/generated/libravdb/ipc/v1/rpc_pb.js +0 -2808
- package/dist/generated/libravdb/ipc/v1/rpc_pb.js.map +0 -1
- package/dist/generated/libravdb/ipc/v1/rpc_pb.ts +0 -3429
package/dist/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ export function registerMemoryCli(api, runtime, cfg, logger = console) {
|
|
|
19
19
|
// Non-full modes register structure only so `openclaw memory --help` works.
|
|
20
20
|
// No runtime available — do not attach action handlers.
|
|
21
21
|
ensureCommand(root, "status").description("Show sidecar health, record counts, and active thresholds");
|
|
22
|
-
ensureCommand(root, "index").description("
|
|
22
|
+
ensureCommand(root, "index").description("Rebuild LibraVDB memory vector index (requires --force)");
|
|
23
23
|
ensureCommand(root, "search").description("Search LibraVDB memory");
|
|
24
24
|
ensureCommand(root, "flush").description("Wipe a durable memory namespace after confirmation");
|
|
25
25
|
ensureCommand(root, "export").description("Stream stored memories as newline-delimited JSON");
|
|
@@ -32,7 +32,6 @@ export function registerMemoryCli(api, runtime, cfg, logger = console) {
|
|
|
32
32
|
.option("--agent <id>", "Agent id")
|
|
33
33
|
.option("--json", "Print JSON")
|
|
34
34
|
.option("--deep", "Probe daemon readiness")
|
|
35
|
-
.option("--index", "Refresh delegated index state before printing status")
|
|
36
35
|
.option("--fix", "Accepted for OpenClaw memory CLI compatibility")
|
|
37
36
|
.option("--verbose", "Verbose logging")
|
|
38
37
|
.action(async (opts) => {
|
|
@@ -41,9 +40,12 @@ export function registerMemoryCli(api, runtime, cfg, logger = console) {
|
|
|
41
40
|
});
|
|
42
41
|
});
|
|
43
42
|
ensureCommand(root, "index")
|
|
44
|
-
.description("
|
|
43
|
+
.description("Rebuild LibraVDB memory vector index (requires --force)")
|
|
45
44
|
.option("--agent <id>", "Agent id")
|
|
46
|
-
.option("--
|
|
45
|
+
.option("--user-id <userId>", "User id")
|
|
46
|
+
.option("--session-key <sessionKey>", "Session key")
|
|
47
|
+
.option("--collections <list>", "Comma-separated collection names to reindex")
|
|
48
|
+
.option("--force", "Required: confirm index rebuild")
|
|
47
49
|
.option("--verbose", "Verbose logging")
|
|
48
50
|
.action(async (opts) => {
|
|
49
51
|
await runCliCommand(runtime, logger, async () => {
|
|
@@ -142,9 +144,6 @@ async function runCliCommand(runtime, logger, action) {
|
|
|
142
144
|
}
|
|
143
145
|
}
|
|
144
146
|
async function runStatus(runtime, cfg, logger, opts = {}) {
|
|
145
|
-
if (opts.index) {
|
|
146
|
-
await runIndex(runtime, cfg, { ...opts, verbose: false }, logger, { quiet: true });
|
|
147
|
-
}
|
|
148
147
|
try {
|
|
149
148
|
const rpc = await runtime.getRpc();
|
|
150
149
|
const status = await rpc.call("status", {});
|
|
@@ -189,38 +188,40 @@ async function runStatus(runtime, cfg, logger, opts = {}) {
|
|
|
189
188
|
process.exitCode = 1;
|
|
190
189
|
}
|
|
191
190
|
}
|
|
192
|
-
async function runIndex(runtime,
|
|
191
|
+
async function runIndex(runtime, _cfg, opts, logger, params = {}) {
|
|
192
|
+
if (!opts?.force) {
|
|
193
|
+
logger.error("LibraVDB index rebuild requires --force. This re-embeds all stored documents with the current model and may be slow.");
|
|
194
|
+
process.exitCode = 1;
|
|
195
|
+
return;
|
|
196
|
+
}
|
|
197
|
+
const namespace = resolveCliNamespace(opts);
|
|
198
|
+
const collections = opts?.collections
|
|
199
|
+
?.split(",")
|
|
200
|
+
.map((c) => c.trim())
|
|
201
|
+
.filter((c) => c.length > 0);
|
|
193
202
|
try {
|
|
194
|
-
const
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
});
|
|
199
|
-
await manager.sync?.({
|
|
200
|
-
reason: "cli",
|
|
201
|
-
force: Boolean(opts?.force),
|
|
203
|
+
const rpc = await runtime.getRpc();
|
|
204
|
+
const result = await rpc.call("rebuild_index", {
|
|
205
|
+
namespace: namespace ?? "",
|
|
206
|
+
...(collections?.length ? { collections } : {}),
|
|
202
207
|
});
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
+
if (!params.quiet) {
|
|
209
|
+
console.log(`Collections processed: ${result.collectionsProcessed ?? 0}`);
|
|
210
|
+
console.log(`Records reindexed: ${result.recordsReindexed ?? 0}`);
|
|
211
|
+
if ((result.collectionsRecreated ?? 0) > 0) {
|
|
212
|
+
console.log(`Collections recreated: ${result.collectionsRecreated} (embedding dimensions changed)`);
|
|
213
|
+
}
|
|
208
214
|
}
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
Provider: status.provider ?? "libravdb",
|
|
212
|
-
Model: status.model ?? status.embeddingProfile ?? "unknown",
|
|
213
|
-
"Turns stored": status.turnCount ?? 0,
|
|
214
|
-
"Memories stored": status.memoryCount ?? 0,
|
|
215
|
-
Message: status.message ?? "ok",
|
|
216
|
-
});
|
|
215
|
+
for (const err of result.errors ?? []) {
|
|
216
|
+
logger.warn?.(`LibraVDB index rebuild: ${err}`);
|
|
217
217
|
}
|
|
218
|
-
if (
|
|
219
|
-
|
|
218
|
+
if ((result.errors?.length ?? 0) > 0 && (result.recordsReindexed ?? 0) === 0) {
|
|
219
|
+
logger.error("LibraVDB index rebuild completed with errors and no records reindexed.");
|
|
220
|
+
process.exitCode = 1;
|
|
220
221
|
}
|
|
221
222
|
}
|
|
222
223
|
catch (error) {
|
|
223
|
-
logger.error(`LibraVDB index
|
|
224
|
+
logger.error(`LibraVDB index rebuild failed: ${formatError(error)}`);
|
|
224
225
|
process.exitCode = 1;
|
|
225
226
|
}
|
|
226
227
|
}
|
|
@@ -390,8 +391,9 @@ function normalizeQueryArg(value) {
|
|
|
390
391
|
function resolveCliNamespace(opts) {
|
|
391
392
|
const userId = opts?.userId?.trim();
|
|
392
393
|
const sessionKey = opts?.sessionKey?.trim();
|
|
393
|
-
|
|
394
|
+
const agentId = opts?.agent?.trim();
|
|
395
|
+
if (!userId && !sessionKey && !agentId) {
|
|
394
396
|
return undefined;
|
|
395
397
|
}
|
|
396
|
-
return resolveDurableNamespace({ userId, sessionKey });
|
|
398
|
+
return resolveDurableNamespace({ userId, sessionKey, agentId });
|
|
397
399
|
}
|
package/dist/context-engine.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PluginRuntime } from "./plugin-runtime.js";
|
|
2
2
|
import type { LoggerLike, PluginConfig, RecallCache, SearchResult } from "./types.js";
|
|
3
|
-
import { AssembleContextInternalResponse } from "
|
|
3
|
+
import { AssembleContextInternalResponse } from "@xdarkicex/libravdb-contracts";
|
|
4
4
|
type KernelCompatibleMessage = {
|
|
5
5
|
role: string;
|
|
6
6
|
content: string;
|
package/dist/index.js
CHANGED
|
@@ -69,6 +69,12 @@ export function register(api) {
|
|
|
69
69
|
api.registerContextEngine(MEMORY_ID, () => buildContextEngineFactory(runtime, cfg, recallCache, api.logger ?? console));
|
|
70
70
|
const markdownIngestion = createMarkdownIngestionHandle(cfg, runtime.getRpc, api.logger ?? console);
|
|
71
71
|
const dreamPromotion = createDreamPromotionHandle(cfg, runtime.getRpc, api.logger ?? console);
|
|
72
|
+
runtime.onShutdown(async () => {
|
|
73
|
+
await markdownIngestion.stop();
|
|
74
|
+
});
|
|
75
|
+
runtime.onShutdown(async () => {
|
|
76
|
+
await dreamPromotion.stop();
|
|
77
|
+
});
|
|
72
78
|
void markdownIngestion.start().catch((error) => {
|
|
73
79
|
api.logger?.warn?.(`LibraVDB markdown ingestion failed to start: ${error instanceof Error ? error.message : String(error)}`);
|
|
74
80
|
});
|
|
@@ -78,8 +84,6 @@ export function register(api) {
|
|
|
78
84
|
api.on("before_reset", createBeforeResetHook(runtime, api.logger ?? console));
|
|
79
85
|
api.on("session_end", createSessionEndHook(runtime, api.logger ?? console));
|
|
80
86
|
api.on("gateway_stop", async () => {
|
|
81
|
-
await dreamPromotion.stop();
|
|
82
|
-
await markdownIngestion.stop();
|
|
83
87
|
await runtime.shutdown();
|
|
84
88
|
});
|
|
85
89
|
}
|
package/dist/markdown-ingest.js
CHANGED
|
@@ -73,9 +73,11 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
73
73
|
logger;
|
|
74
74
|
states = new Map();
|
|
75
75
|
fileStates = new Map();
|
|
76
|
+
activeScans = new Set();
|
|
76
77
|
tokenizerId;
|
|
77
78
|
coreDoc;
|
|
78
79
|
started = false;
|
|
80
|
+
stopping = false;
|
|
79
81
|
constructor(kind, config, getRpc, logger, fsApi) {
|
|
80
82
|
this.kind = kind;
|
|
81
83
|
this.roots = config.roots;
|
|
@@ -93,10 +95,11 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
93
95
|
return;
|
|
94
96
|
}
|
|
95
97
|
this.started = true;
|
|
98
|
+
this.stopping = false;
|
|
96
99
|
await this.refresh();
|
|
97
100
|
}
|
|
98
101
|
async refresh() {
|
|
99
|
-
if (!this.started) {
|
|
102
|
+
if (!this.started || this.stopping) {
|
|
100
103
|
return;
|
|
101
104
|
}
|
|
102
105
|
for (const root of this.roots) {
|
|
@@ -104,6 +107,7 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
104
107
|
}
|
|
105
108
|
}
|
|
106
109
|
async stop() {
|
|
110
|
+
this.stopping = true;
|
|
107
111
|
for (const state of this.states.values()) {
|
|
108
112
|
if (state.scanState.timer) {
|
|
109
113
|
clearTimeout(state.scanState.timer);
|
|
@@ -114,6 +118,9 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
114
118
|
}
|
|
115
119
|
state.directoryWatchers.clear();
|
|
116
120
|
}
|
|
121
|
+
if (this.activeScans.size > 0) {
|
|
122
|
+
await Promise.allSettled([...this.activeScans]);
|
|
123
|
+
}
|
|
117
124
|
this.states.clear();
|
|
118
125
|
this.fileStates.clear();
|
|
119
126
|
this.started = false;
|
|
@@ -138,27 +145,46 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
138
145
|
return created;
|
|
139
146
|
}
|
|
140
147
|
async scanRoot(root) {
|
|
148
|
+
if (!this.started || this.stopping) {
|
|
149
|
+
return;
|
|
150
|
+
}
|
|
141
151
|
const rootState = this.getRootState(root);
|
|
142
152
|
if (rootState.scanState.scanning) {
|
|
143
153
|
rootState.scanState.dirty = true;
|
|
144
154
|
return;
|
|
145
155
|
}
|
|
146
156
|
rootState.scanState.scanning = true;
|
|
157
|
+
const scan = (async () => {
|
|
158
|
+
try {
|
|
159
|
+
const currentFiles = new Set();
|
|
160
|
+
await this.walkDirectory(rootState, rootState.root, currentFiles);
|
|
161
|
+
if (!this.stopping) {
|
|
162
|
+
await this.pruneDeletedFiles(rootState, currentFiles);
|
|
163
|
+
rootState.knownFiles = currentFiles;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
finally {
|
|
167
|
+
rootState.scanState.scanning = false;
|
|
168
|
+
if (rootState.scanState.dirty) {
|
|
169
|
+
rootState.scanState.dirty = false;
|
|
170
|
+
if (!this.stopping) {
|
|
171
|
+
this.scheduleRootScan(rootState);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
})();
|
|
176
|
+
this.activeScans.add(scan);
|
|
147
177
|
try {
|
|
148
|
-
|
|
149
|
-
await this.walkDirectory(rootState, rootState.root, currentFiles);
|
|
150
|
-
await this.pruneDeletedFiles(rootState, currentFiles);
|
|
151
|
-
rootState.knownFiles = currentFiles;
|
|
178
|
+
await scan;
|
|
152
179
|
}
|
|
153
180
|
finally {
|
|
154
|
-
|
|
155
|
-
if (rootState.scanState.dirty) {
|
|
156
|
-
rootState.scanState.dirty = false;
|
|
157
|
-
this.scheduleRootScan(rootState);
|
|
158
|
-
}
|
|
181
|
+
this.activeScans.delete(scan);
|
|
159
182
|
}
|
|
160
183
|
}
|
|
161
184
|
scheduleRootScan(rootState) {
|
|
185
|
+
if (!this.started || this.stopping) {
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
162
188
|
if (rootState.scanState.scanning) {
|
|
163
189
|
rootState.scanState.dirty = true;
|
|
164
190
|
return;
|
|
@@ -187,6 +213,9 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
187
213
|
return;
|
|
188
214
|
}
|
|
189
215
|
for (const entry of entries) {
|
|
216
|
+
if (this.stopping) {
|
|
217
|
+
return;
|
|
218
|
+
}
|
|
190
219
|
const child = path.join(dir, entry.name);
|
|
191
220
|
if (entry.isDirectory()) {
|
|
192
221
|
await this.walkDirectory(rootState, child, currentFiles);
|
|
@@ -203,7 +232,9 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
203
232
|
await this.syncMarkdownFile(rootState, child);
|
|
204
233
|
}
|
|
205
234
|
catch (error) {
|
|
206
|
-
this.
|
|
235
|
+
if (!this.stopping) {
|
|
236
|
+
this.logger.warn?.(`[markdown-ingest] sync failed for ${child}: ${formatError(error)}`);
|
|
237
|
+
}
|
|
207
238
|
}
|
|
208
239
|
}
|
|
209
240
|
}
|
|
@@ -213,7 +244,9 @@ class DirectoryMarkdownSourceAdapter {
|
|
|
213
244
|
}
|
|
214
245
|
try {
|
|
215
246
|
const watcher = this.fsApi.watch(dir, () => {
|
|
216
|
-
this.
|
|
247
|
+
if (!this.stopping) {
|
|
248
|
+
this.scheduleRootScan(rootState);
|
|
249
|
+
}
|
|
217
250
|
});
|
|
218
251
|
watcher.on("error", (error) => {
|
|
219
252
|
this.logger.warn?.(`[markdown-ingest] watch error for ${dir}: ${formatError(error)}`);
|
package/dist/plugin-runtime.d.ts
CHANGED
|
@@ -19,10 +19,12 @@ export interface LifecycleHint {
|
|
|
19
19
|
nextSessionId?: string;
|
|
20
20
|
nextSessionKey?: string;
|
|
21
21
|
}
|
|
22
|
+
export type RuntimeShutdownTask = () => Promise<void> | void;
|
|
22
23
|
export interface PluginRuntime {
|
|
23
24
|
getRpc: RpcGetter;
|
|
24
25
|
getKernel(): GrpcKernelClient | null;
|
|
25
26
|
emitLifecycleHint(hint: LifecycleHint): Promise<void>;
|
|
27
|
+
onShutdown(task: RuntimeShutdownTask): void;
|
|
26
28
|
shutdown(): Promise<void>;
|
|
27
29
|
}
|
|
28
30
|
export declare function createPluginRuntime(cfg: PluginConfig, logger?: LoggerLike): PluginRuntime;
|
package/dist/plugin-runtime.js
CHANGED
|
@@ -10,7 +10,9 @@ export function resolveStartupHealthTimeoutMs(cfg) {
|
|
|
10
10
|
export function createPluginRuntime(cfg, logger = console) {
|
|
11
11
|
let started = null;
|
|
12
12
|
let stopped = false;
|
|
13
|
+
let shuttingDown = false;
|
|
13
14
|
let resolvedKernel = null;
|
|
15
|
+
const shutdownTasks = [];
|
|
14
16
|
const ensureStarted = async () => {
|
|
15
17
|
if (stopped) {
|
|
16
18
|
throw new Error("LibraVDB plugin runtime has been shut down");
|
|
@@ -74,7 +76,25 @@ export function createPluginRuntime(cfg, logger = console) {
|
|
|
74
76
|
logger.warn?.(`LibraVDB lifecycle hint dropped: ${formatError(error)}`);
|
|
75
77
|
}
|
|
76
78
|
},
|
|
79
|
+
onShutdown(task) {
|
|
80
|
+
if (stopped || shuttingDown) {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
shutdownTasks.push(task);
|
|
84
|
+
},
|
|
77
85
|
async shutdown() {
|
|
86
|
+
if (stopped || shuttingDown) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
shuttingDown = true;
|
|
90
|
+
for (const task of shutdownTasks.splice(0).reverse()) {
|
|
91
|
+
try {
|
|
92
|
+
await task();
|
|
93
|
+
}
|
|
94
|
+
catch (error) {
|
|
95
|
+
logger.warn?.(`LibraVDB shutdown task failed: ${formatError(error)}`);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
78
98
|
stopped = true;
|
|
79
99
|
if (!started) {
|
|
80
100
|
return;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterTurnKernelRequest, AfterTurnKernelResponse, AssembleContextInternalRequest, AssembleContextInternalResponse, BootstrapSessionKernelRequest, BootstrapSessionKernelResponse, CompactSessionRequest, CompactSessionResponse, DeleteAuthoredDocumentResponse, DreamPromotionResponse, ExportMemoryResponse, FlushNamespaceResponse, FlushResponse, HealthResponse, IngestMarkdownDocumentResponse, IngestMessageKernelRequest, IngestMessageKernelResponse, MemoryStatusResponse, RankCandidatesRequest, RankCandidatesResponse, SearchTextResponse, SessionLifecycleHintResponse } from "
|
|
1
|
+
import { AfterTurnKernelRequest, AfterTurnKernelResponse, AssembleContextInternalRequest, AssembleContextInternalResponse, BootstrapSessionKernelRequest, BootstrapSessionKernelResponse, CompactSessionRequest, CompactSessionResponse, DeleteAuthoredDocumentResponse, DreamPromotionResponse, ExportMemoryResponse, FlushNamespaceResponse, FlushResponse, HealthResponse, IngestMarkdownDocumentResponse, IngestMessageKernelRequest, IngestMessageKernelResponse, MemoryStatusResponse, RankCandidatesRequest, RankCandidatesResponse, RebuildIndexRequest, RebuildIndexResponse, SearchTextResponse, SessionLifecycleHintResponse } from "@xdarkicex/libravdb-contracts";
|
|
2
2
|
import type { LifecycleHint } from "./plugin-runtime.js";
|
|
3
3
|
export type RpcMethodCodec<Params = unknown, Result = unknown> = {
|
|
4
4
|
encodeParams(params: Params): Uint8Array;
|
|
@@ -66,5 +66,6 @@ export declare const rpcProtobufCodecs: {
|
|
|
66
66
|
assemble_context_internal: RpcMethodCodec<AssembleContextInternalRequest, AssembleContextInternalResponse>;
|
|
67
67
|
compact_session: RpcMethodCodec<CompactSessionRequest, CompactSessionResponse>;
|
|
68
68
|
rank_candidates: RpcMethodCodec<RankCandidatesRequest, RankCandidatesResponse>;
|
|
69
|
+
rebuild_index: RpcMethodCodec<RebuildIndexRequest, RebuildIndexResponse>;
|
|
69
70
|
};
|
|
70
71
|
export declare function getRpcMethodCodec(method: string): RpcMethodCodec<any, any> | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterTurnKernelRequest, AfterTurnKernelResponse, AssembleContextInternalRequest, AssembleContextInternalResponse, BootstrapSessionKernelRequest, BootstrapSessionKernelResponse, CompactSessionRequest, CompactSessionResponse, DeleteAuthoredDocumentRequest, DeleteAuthoredDocumentResponse, DreamPromotionResponse, ExportMemoryRequest, ExportMemoryResponse, FlushNamespaceRequest, FlushNamespaceResponse, FlushResponse, HealthResponse, IngestMarkdownDocumentRequest, IngestMarkdownDocumentResponse, IngestMessageKernelRequest, IngestMessageKernelResponse, ListCollectionRequest, ListLifecycleJournalRequest, MemoryStatusResponse, PromoteDreamEntriesRequest, RankCandidatesRequest, RankCandidatesResponse, SearchTextCollectionsRequest, SearchTextRequest, SearchTextResponse, SessionLifecycleHintRequest, SessionLifecycleHintResponse, StringList, } from "
|
|
1
|
+
import { AfterTurnKernelRequest, AfterTurnKernelResponse, AssembleContextInternalRequest, AssembleContextInternalResponse, BootstrapSessionKernelRequest, BootstrapSessionKernelResponse, CompactSessionRequest, CompactSessionResponse, DeleteAuthoredDocumentRequest, DeleteAuthoredDocumentResponse, DreamPromotionResponse, ExportMemoryRequest, ExportMemoryResponse, FlushNamespaceRequest, FlushNamespaceResponse, FlushResponse, HealthResponse, IngestMarkdownDocumentRequest, IngestMarkdownDocumentResponse, IngestMessageKernelRequest, IngestMessageKernelResponse, ListCollectionRequest, ListLifecycleJournalRequest, MemoryStatusResponse, PromoteDreamEntriesRequest, RankCandidatesRequest, RankCandidatesResponse, RebuildIndexRequest, RebuildIndexResponse, SearchTextCollectionsRequest, SearchTextRequest, SearchTextResponse, SessionLifecycleHintRequest, SessionLifecycleHintResponse, StringList, } from "@xdarkicex/libravdb-contracts";
|
|
2
2
|
function encodeMessage(schema, init) {
|
|
3
3
|
return new schema(init).toBinary();
|
|
4
4
|
}
|
|
@@ -78,6 +78,7 @@ export const rpcProtobufCodecs = {
|
|
|
78
78
|
assemble_context_internal: codec((params) => encodeMessage(AssembleContextInternalRequest, params), normalizeAssembleContextInternalResponse),
|
|
79
79
|
compact_session: codec((params) => encodeMessage(CompactSessionRequest, params), (bytes) => decodeProtobufResult(CompactSessionResponse, bytes)),
|
|
80
80
|
rank_candidates: codec((params) => encodeMessage(RankCandidatesRequest, params), (bytes) => decodeProtobufResult(RankCandidatesResponse, bytes)),
|
|
81
|
+
rebuild_index: codec((params) => encodeMessage(RebuildIndexRequest, params), (bytes) => decodeProtobufResult(RebuildIndexResponse, bytes)),
|
|
81
82
|
};
|
|
82
83
|
export function getRpcMethodCodec(method) {
|
|
83
84
|
return rpcProtobufCodecs[method];
|
package/dist/rpc.js
CHANGED
package/dist/types.d.ts
CHANGED
|
@@ -47,7 +47,6 @@ export interface PluginConfig {
|
|
|
47
47
|
markdownIngestionObsidianDebounceMs?: number;
|
|
48
48
|
markdownIngestionInclude?: string[];
|
|
49
49
|
markdownIngestionExclude?: string[];
|
|
50
|
-
markdownIngestionCollection?: string;
|
|
51
50
|
markdownIngestionDebounceMs?: number;
|
|
52
51
|
dreamPromotionEnabled?: boolean;
|
|
53
52
|
dreamPromotionDiaryPath?: string;
|
package/docs/features.md
CHANGED
|
@@ -51,7 +51,6 @@ Relevant config fields:
|
|
|
51
51
|
| `markdownIngestionRoots` | Generic markdown roots to watch. |
|
|
52
52
|
| `markdownIngestionInclude` | Optional include globs for generic roots. |
|
|
53
53
|
| `markdownIngestionExclude` | Optional exclude globs for generic roots. |
|
|
54
|
-
| `markdownIngestionCollection` | Target collection for generic markdown, default `global`. |
|
|
55
54
|
| `markdownIngestionDebounceMs` | Watch debounce window, default `150`. |
|
|
56
55
|
| `markdownIngestionObsidianEnabled` | Enables Obsidian ingestion when vault roots exist. |
|
|
57
56
|
| `markdownIngestionObsidianRoots` | Obsidian vault roots to watch. |
|
package/openclaw.plugin.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
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.
|
|
5
|
+
"version": "1.4.24",
|
|
6
6
|
"kind": [
|
|
7
7
|
"memory",
|
|
8
8
|
"context-engine"
|
|
@@ -197,10 +197,6 @@
|
|
|
197
197
|
"type": "string"
|
|
198
198
|
}
|
|
199
199
|
},
|
|
200
|
-
"markdownIngestionCollection": {
|
|
201
|
-
"type": "string",
|
|
202
|
-
"default": "global"
|
|
203
|
-
},
|
|
204
200
|
"markdownIngestionDebounceMs": {
|
|
205
201
|
"type": "number",
|
|
206
202
|
"default": 150
|
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.24",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
}
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
|
-
"build": "tsc -p tsconfig.build.json && mkdir -p dist/proto
|
|
41
|
+
"build": "tsc -p tsconfig.build.json && mkdir -p dist/proto && cp -rf api/proto/. dist/proto/",
|
|
42
42
|
"check": "tsc --noEmit && pnpm run test:ts",
|
|
43
43
|
"test:ts": "tsc -p tsconfig.tests.json && node --test .ts-build/test/unit/*.test.js",
|
|
44
44
|
"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",
|
|
@@ -56,6 +56,7 @@
|
|
|
56
56
|
"@bufbuild/protobuf": "1.7.2",
|
|
57
57
|
"@grpc/grpc-js": "^1.14.3",
|
|
58
58
|
"@grpc/proto-loader": "^0.8.0",
|
|
59
|
+
"@xdarkicex/libravdb-contracts": "^0.0.1",
|
|
59
60
|
"openclaw": "*"
|
|
60
61
|
},
|
|
61
62
|
"devDependencies": {
|