@xdarkicex/openclaw-memory-libravdb 1.4.73 → 1.4.74
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/index.js +9 -1
- package/dist/memory-runtime.js +9 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32976,6 +32976,7 @@ function buildMemoryRuntimeBridge(getRpc, cfg) {
|
|
|
32976
32976
|
function createMemorySearchManager(getRpc, cfg, defaults, initialStatus) {
|
|
32977
32977
|
let cachedStatus = initialStatus;
|
|
32978
32978
|
let cachedIdentityUserId = null;
|
|
32979
|
+
const returnedSearchPaths = /* @__PURE__ */ new Set();
|
|
32979
32980
|
function getResolvedUserId(sessionKey) {
|
|
32980
32981
|
if (cachedIdentityUserId !== null) return cachedIdentityUserId;
|
|
32981
32982
|
cachedIdentityUserId = resolveIdentity({
|
|
@@ -33028,9 +33029,16 @@ function createMemorySearchManager(getRpc, cfg, defaults, initialStatus) {
|
|
|
33028
33029
|
if (legacyCall) {
|
|
33029
33030
|
return { results: legacyResults };
|
|
33030
33031
|
}
|
|
33031
|
-
|
|
33032
|
+
const memoryResults = filteredResults.map(toMemorySearchResult);
|
|
33033
|
+
for (const item of memoryResults) {
|
|
33034
|
+
returnedSearchPaths.add(item.path);
|
|
33035
|
+
}
|
|
33036
|
+
return memoryResults;
|
|
33032
33037
|
},
|
|
33033
33038
|
async readFile(params) {
|
|
33039
|
+
if (!returnedSearchPaths.has(params.relPath)) {
|
|
33040
|
+
throw new Error("LibraVDB memory path was not returned by this search manager");
|
|
33041
|
+
}
|
|
33034
33042
|
const located = await loadSearchResultText(getRpc, params.relPath);
|
|
33035
33043
|
const fromLine = Math.max(1, params.from ?? 1);
|
|
33036
33044
|
const lineCount = Math.max(1, params.lines ?? 200);
|
package/dist/memory-runtime.js
CHANGED
|
@@ -22,6 +22,7 @@ export function buildMemoryRuntimeBridge(getRpc, cfg) {
|
|
|
22
22
|
function createMemorySearchManager(getRpc, cfg, defaults, initialStatus) {
|
|
23
23
|
let cachedStatus = initialStatus;
|
|
24
24
|
let cachedIdentityUserId = null;
|
|
25
|
+
const returnedSearchPaths = new Set();
|
|
25
26
|
function getResolvedUserId(sessionKey) {
|
|
26
27
|
if (cachedIdentityUserId !== null)
|
|
27
28
|
return cachedIdentityUserId;
|
|
@@ -82,9 +83,16 @@ function createMemorySearchManager(getRpc, cfg, defaults, initialStatus) {
|
|
|
82
83
|
if (legacyCall) {
|
|
83
84
|
return { results: legacyResults };
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
+
const memoryResults = filteredResults.map(toMemorySearchResult);
|
|
87
|
+
for (const item of memoryResults) {
|
|
88
|
+
returnedSearchPaths.add(item.path);
|
|
89
|
+
}
|
|
90
|
+
return memoryResults;
|
|
86
91
|
},
|
|
87
92
|
async readFile(params) {
|
|
93
|
+
if (!returnedSearchPaths.has(params.relPath)) {
|
|
94
|
+
throw new Error("LibraVDB memory path was not returned by this search manager");
|
|
95
|
+
}
|
|
88
96
|
const located = await loadSearchResultText(getRpc, params.relPath);
|
|
89
97
|
const fromLine = Math.max(1, params.from ?? 1);
|
|
90
98
|
const lineCount = Math.max(1, params.lines ?? 200);
|
package/openclaw.plugin.json
CHANGED