@xdarkicex/openclaw-memory-libravdb 1.4.54 → 1.4.56
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/context-engine.js +4 -1
- package/dist/grpc-client.d.ts +1 -0
- package/dist/grpc-client.js +4 -5
- package/dist/index.js +5 -2
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
package/dist/context-engine.js
CHANGED
|
@@ -312,7 +312,10 @@ function escapeMemoryFactText(text) {
|
|
|
312
312
|
.replaceAll("<", "<")
|
|
313
313
|
.replaceAll(">", ">")
|
|
314
314
|
.replaceAll('"', """)
|
|
315
|
-
.replaceAll("'", "'")
|
|
315
|
+
.replaceAll("'", "'")
|
|
316
|
+
.replaceAll("\r", " ")
|
|
317
|
+
.replaceAll("\n", " ")
|
|
318
|
+
.replaceAll("\t", "	");
|
|
316
319
|
}
|
|
317
320
|
function buildExactRecallFact(result, token) {
|
|
318
321
|
const factText = extractExactRecallFactText(result.text, token);
|
package/dist/grpc-client.d.ts
CHANGED
package/dist/grpc-client.js
CHANGED
|
@@ -7,6 +7,9 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
7
7
|
// The proto file is expected to be copied to dist/proto/ at build time.
|
|
8
8
|
// In source, it's at api/proto/.
|
|
9
9
|
const PROTO_PATH = path.resolve(__dirname, "./proto/intelligence_kernel/v1/kernel.proto");
|
|
10
|
+
export function resolveGrpcTarget(endpoint) {
|
|
11
|
+
return endpoint.startsWith("tcp:") ? endpoint.substring(4) : endpoint;
|
|
12
|
+
}
|
|
10
13
|
export class GrpcKernelClient {
|
|
11
14
|
client;
|
|
12
15
|
secret;
|
|
@@ -24,11 +27,7 @@ export class GrpcKernelClient {
|
|
|
24
27
|
});
|
|
25
28
|
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
|
|
26
29
|
const kernelService = protoDescriptor.intelligence_kernel.v1.IntelligenceKernel;
|
|
27
|
-
const target = options.endpoint
|
|
28
|
-
? options.endpoint.substring(4)
|
|
29
|
-
: options.endpoint.startsWith("unix:")
|
|
30
|
-
? options.endpoint.substring(5)
|
|
31
|
-
: options.endpoint;
|
|
30
|
+
const target = resolveGrpcTarget(options.endpoint);
|
|
32
31
|
this.client = new kernelService(target, grpc.credentials.createInsecure());
|
|
33
32
|
}
|
|
34
33
|
getMetadata(signed = true) {
|
package/dist/index.js
CHANGED
|
@@ -33919,7 +33919,7 @@ function extractExactRecallFactText(text, token) {
|
|
|
33919
33919
|
return factSentence ?? tail.split("\n")[0]?.trim() ?? tail;
|
|
33920
33920
|
}
|
|
33921
33921
|
function escapeMemoryFactText(text) {
|
|
33922
|
-
return text.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'");
|
|
33922
|
+
return text.replaceAll("&", "&").replaceAll("<", "<").replaceAll(">", ">").replaceAll('"', """).replaceAll("'", "'").replaceAll("\r", " ").replaceAll("\n", " ").replaceAll(" ", "	");
|
|
33923
33923
|
}
|
|
33924
33924
|
function buildExactRecallFact(result, token) {
|
|
33925
33925
|
const factText = extractExactRecallFactText(result.text, token);
|
|
@@ -39260,6 +39260,9 @@ import path3 from "node:path";
|
|
|
39260
39260
|
import { fileURLToPath } from "node:url";
|
|
39261
39261
|
var __dirname2 = path3.dirname(fileURLToPath(import.meta.url));
|
|
39262
39262
|
var PROTO_PATH = path3.resolve(__dirname2, "./proto/intelligence_kernel/v1/kernel.proto");
|
|
39263
|
+
function resolveGrpcTarget(endpoint) {
|
|
39264
|
+
return endpoint.startsWith("tcp:") ? endpoint.substring(4) : endpoint;
|
|
39265
|
+
}
|
|
39263
39266
|
var GrpcKernelClient = class {
|
|
39264
39267
|
client;
|
|
39265
39268
|
secret;
|
|
@@ -39277,7 +39280,7 @@ var GrpcKernelClient = class {
|
|
|
39277
39280
|
});
|
|
39278
39281
|
const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
|
|
39279
39282
|
const kernelService = protoDescriptor.intelligence_kernel.v1.IntelligenceKernel;
|
|
39280
|
-
const target =
|
|
39283
|
+
const target = resolveGrpcTarget(options.endpoint);
|
|
39281
39284
|
this.client = new kernelService(target, grpc.credentials.createInsecure());
|
|
39282
39285
|
}
|
|
39283
39286
|
getMetadata(signed = true) {
|
package/openclaw.plugin.json
CHANGED