@xdarkicex/openclaw-memory-libravdb 1.4.77 → 1.4.80

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.
@@ -441,7 +441,6 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
441
441
  continuityMinTurns: cfg.continuityMinTurns,
442
442
  continuityTailBudgetTokens: cfg.continuityTailBudgetTokens,
443
443
  continuityPriorContextTokens: cfg.continuityPriorContextTokens,
444
- compactThreshold: getDynamicCompactThreshold(tokenBudget),
445
444
  compactSessionTokenBudget: cfg.compactSessionTokenBudget,
446
445
  section7Theta1: cfg.section7Theta1,
447
446
  section7Kappa: cfg.section7Kappa,
@@ -449,17 +448,24 @@ export function buildContextEngineFactory(runtime, cfg, logger = console) {
449
448
  section7HopThreshold: cfg.section7HopThreshold,
450
449
  section7CoarseTopK: cfg.section7CoarseTopK,
451
450
  section7SecondPassTopK: cfg.section7SecondPassTopK,
452
- section7AuthorityRecencyLambda: cfg.section7AuthorityRecencyLambda,
451
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
452
+ // section7AuthorityRecencyLambda: cfg.section7AuthorityRecencyLambda,
453
453
  section7AuthorityRecencyWeight: cfg.section7AuthorityRecencyWeight,
454
454
  section7AuthorityFrequencyWeight: cfg.section7AuthorityFrequencyWeight,
455
455
  section7AuthorityAuthoredWeight: cfg.section7AuthorityAuthoredWeight,
456
+ section7AuthoritySalienceWeight: cfg.section7AuthoritySalienceWeight,
457
+ section7RecencyAccessLambda: cfg.section7RecencyAccessLambda,
456
458
  recoveryFloorScore: cfg.recoveryFloorScore,
457
459
  recoveryMinTopK: cfg.recoveryMinTopK,
458
460
  recoveryMinConfidenceMean: cfg.recoveryMinConfidenceMean,
459
- recencyLambdaSession: cfg.recencyLambdaSession,
461
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
462
+ // recencyLambdaSession: cfg.recencyLambdaSession,
460
463
  recencyLambdaUser: cfg.recencyLambdaUser,
461
- recencyLambdaGlobal: cfg.recencyLambdaGlobal,
464
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
465
+ // recencyLambdaGlobal: cfg.recencyLambdaGlobal,
462
466
  ingestionGateThreshold: cfg.ingestionGateThreshold,
467
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
468
+ // compactThreshold: getDynamicCompactThreshold(tokenBudget),
463
469
  });
464
470
  async function augmentWithExactRecall(assembled, args) {
465
471
  if (cfg.crossSessionRecall === false)
@@ -4,6 +4,7 @@ export interface GrpcClientOptions {
4
4
  timeoutMs?: number;
5
5
  }
6
6
  export declare function resolveGrpcTarget(endpoint: string): string;
7
+ export declare function resolveGrpcCredentialMode(endpoint: string): "insecure" | "tls";
7
8
  export declare class GrpcKernelClient {
8
9
  private client;
9
10
  private readonly secret;
@@ -10,6 +10,32 @@ const PROTO_PATH = path.resolve(__dirname, "./proto/intelligence_kernel/v1/kerne
10
10
  export function resolveGrpcTarget(endpoint) {
11
11
  return endpoint.startsWith("tcp:") ? endpoint.substring(4) : endpoint;
12
12
  }
13
+ export function resolveGrpcCredentialMode(endpoint) {
14
+ const target = resolveGrpcTarget(endpoint).trim();
15
+ if (target.startsWith("unix:")) {
16
+ return "insecure";
17
+ }
18
+ const host = extractGrpcHost(target);
19
+ return isLoopbackHost(host) ? "insecure" : "tls";
20
+ }
21
+ function resolveGrpcCredentials(endpoint) {
22
+ return resolveGrpcCredentialMode(endpoint) === "insecure"
23
+ ? grpc.credentials.createInsecure()
24
+ : grpc.credentials.createSsl();
25
+ }
26
+ function extractGrpcHost(target) {
27
+ const withoutDnsPrefix = target.startsWith("dns:///") ? target.slice("dns:///".length) : target;
28
+ if (withoutDnsPrefix.startsWith("[")) {
29
+ const closeBracket = withoutDnsPrefix.indexOf("]");
30
+ return closeBracket > 0 ? withoutDnsPrefix.slice(1, closeBracket) : withoutDnsPrefix;
31
+ }
32
+ const portSeparator = withoutDnsPrefix.lastIndexOf(":");
33
+ return portSeparator > 0 ? withoutDnsPrefix.slice(0, portSeparator) : withoutDnsPrefix;
34
+ }
35
+ function isLoopbackHost(host) {
36
+ const normalized = host.toLowerCase();
37
+ return normalized === "localhost" || normalized === "127.0.0.1" || normalized === "::1";
38
+ }
13
39
  export class GrpcKernelClient {
14
40
  client;
15
41
  secret;
@@ -28,7 +54,7 @@ export class GrpcKernelClient {
28
54
  const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
29
55
  const kernelService = protoDescriptor.intelligence_kernel.v1.IntelligenceKernel;
30
56
  const target = resolveGrpcTarget(options.endpoint);
31
- this.client = new kernelService(target, grpc.credentials.createInsecure());
57
+ this.client = new kernelService(target, resolveGrpcCredentials(options.endpoint));
32
58
  }
33
59
  getMetadata(signed = true) {
34
60
  const md = new grpc.Metadata();
package/dist/index.js CHANGED
@@ -34137,7 +34137,6 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
34137
34137
  continuityMinTurns: cfg.continuityMinTurns,
34138
34138
  continuityTailBudgetTokens: cfg.continuityTailBudgetTokens,
34139
34139
  continuityPriorContextTokens: cfg.continuityPriorContextTokens,
34140
- compactThreshold: getDynamicCompactThreshold(tokenBudget),
34141
34140
  compactSessionTokenBudget: cfg.compactSessionTokenBudget,
34142
34141
  section7Theta1: cfg.section7Theta1,
34143
34142
  section7Kappa: cfg.section7Kappa,
@@ -34145,17 +34144,24 @@ function buildContextEngineFactory(runtime, cfg, logger = console) {
34145
34144
  section7HopThreshold: cfg.section7HopThreshold,
34146
34145
  section7CoarseTopK: cfg.section7CoarseTopK,
34147
34146
  section7SecondPassTopK: cfg.section7SecondPassTopK,
34148
- section7AuthorityRecencyLambda: cfg.section7AuthorityRecencyLambda,
34147
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
34148
+ // section7AuthorityRecencyLambda: cfg.section7AuthorityRecencyLambda,
34149
34149
  section7AuthorityRecencyWeight: cfg.section7AuthorityRecencyWeight,
34150
34150
  section7AuthorityFrequencyWeight: cfg.section7AuthorityFrequencyWeight,
34151
34151
  section7AuthorityAuthoredWeight: cfg.section7AuthorityAuthoredWeight,
34152
+ section7AuthoritySalienceWeight: cfg.section7AuthoritySalienceWeight,
34153
+ section7RecencyAccessLambda: cfg.section7RecencyAccessLambda,
34152
34154
  recoveryFloorScore: cfg.recoveryFloorScore,
34153
34155
  recoveryMinTopK: cfg.recoveryMinTopK,
34154
34156
  recoveryMinConfidenceMean: cfg.recoveryMinConfidenceMean,
34155
- recencyLambdaSession: cfg.recencyLambdaSession,
34157
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
34158
+ // recencyLambdaSession: cfg.recencyLambdaSession,
34156
34159
  recencyLambdaUser: cfg.recencyLambdaUser,
34157
- recencyLambdaGlobal: cfg.recencyLambdaGlobal,
34160
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
34161
+ // recencyLambdaGlobal: cfg.recencyLambdaGlobal,
34158
34162
  ingestionGateThreshold: cfg.ingestionGateThreshold
34163
+ // deprecated in libravdb-contracts — no daemon handler (daemon v1.4.68)
34164
+ // compactThreshold: getDynamicCompactThreshold(tokenBudget),
34159
34165
  });
34160
34166
  async function augmentWithExactRecall(assembled, args) {
34161
34167
  if (cfg.crossSessionRecall === false) return assembled;
@@ -34624,7 +34630,7 @@ import path2 from "node:path";
34624
34630
  var proxy_exports = {};
34625
34631
  __reExport(proxy_exports, __toESM(require_cjs(), 1));
34626
34632
 
34627
- // node_modules/.pnpm/@xdarkicex+libravdb-contracts@0.0.6/node_modules/@xdarkicex/libravdb-contracts/gen/js/libravdb/ipc/v1/rpc_pb.js
34633
+ // node_modules/.pnpm/@xdarkicex+libravdb-contracts@0.0.7/node_modules/@xdarkicex/libravdb-contracts/gen/js/libravdb/ipc/v1/rpc_pb.js
34628
34634
  var IngestMode;
34629
34635
  (function(IngestMode2) {
34630
34636
  IngestMode2[IngestMode2["REPLACE"] = 0] = "REPLACE";
@@ -35241,6 +35247,61 @@ var AssembleContextInternalResponse = class _AssembleContextInternalResponse ext
35241
35247
  return proxy_exports.proto3.util.equals(_AssembleContextInternalResponse, a, b);
35242
35248
  }
35243
35249
  };
35250
+ var PredictedContext = class _PredictedContext extends proxy_exports.Message {
35251
+ /**
35252
+ * @generated from field: string id = 1;
35253
+ */
35254
+ id = "";
35255
+ /**
35256
+ * @generated from field: string text = 2;
35257
+ */
35258
+ text = "";
35259
+ /**
35260
+ * @generated from field: string reason = 3;
35261
+ */
35262
+ reason = "";
35263
+ constructor(data) {
35264
+ super();
35265
+ proxy_exports.proto3.util.initPartial(data, this);
35266
+ }
35267
+ static runtime = proxy_exports.proto3;
35268
+ static typeName = "libravdb.ipc.v1.PredictedContext";
35269
+ static fields = proxy_exports.proto3.util.newFieldList(() => [
35270
+ {
35271
+ no: 1,
35272
+ name: "id",
35273
+ kind: "scalar",
35274
+ T: 9
35275
+ /* ScalarType.STRING */
35276
+ },
35277
+ {
35278
+ no: 2,
35279
+ name: "text",
35280
+ kind: "scalar",
35281
+ T: 9
35282
+ /* ScalarType.STRING */
35283
+ },
35284
+ {
35285
+ no: 3,
35286
+ name: "reason",
35287
+ kind: "scalar",
35288
+ T: 9
35289
+ /* ScalarType.STRING */
35290
+ }
35291
+ ]);
35292
+ static fromBinary(bytes, options) {
35293
+ return new _PredictedContext().fromBinary(bytes, options);
35294
+ }
35295
+ static fromJson(jsonValue, options) {
35296
+ return new _PredictedContext().fromJson(jsonValue, options);
35297
+ }
35298
+ static fromJsonString(jsonString, options) {
35299
+ return new _PredictedContext().fromJsonString(jsonString, options);
35300
+ }
35301
+ static equals(a, b) {
35302
+ return proxy_exports.proto3.util.equals(_PredictedContext, a, b);
35303
+ }
35304
+ };
35244
35305
  var AssemblyDebug = class _AssemblyDebug extends proxy_exports.Message {
35245
35306
  /**
35246
35307
  * @generated from field: bool recovery_trigger_fired = 1;
@@ -35461,6 +35522,14 @@ var AssembleConfigOverrides = class _AssembleConfigOverrides extends proxy_expor
35461
35522
  * @generated from field: optional double section7_authority_authored_weight = 22;
35462
35523
  */
35463
35524
  section7AuthorityAuthoredWeight;
35525
+ /**
35526
+ * @generated from field: optional double section7_authority_salience_weight = 30;
35527
+ */
35528
+ section7AuthoritySalienceWeight;
35529
+ /**
35530
+ * @generated from field: optional double section7_recency_access_lambda = 31;
35531
+ */
35532
+ section7RecencyAccessLambda;
35464
35533
  /**
35465
35534
  * @generated from field: optional double recovery_floor_score = 23;
35466
35535
  */
@@ -35518,6 +35587,8 @@ var AssembleConfigOverrides = class _AssembleConfigOverrides extends proxy_expor
35518
35587
  { no: 20, name: "section7_authority_recency_weight", kind: "scalar", T: 1, opt: true },
35519
35588
  { no: 21, name: "section7_authority_frequency_weight", kind: "scalar", T: 1, opt: true },
35520
35589
  { no: 22, name: "section7_authority_authored_weight", kind: "scalar", T: 1, opt: true },
35590
+ { no: 30, name: "section7_authority_salience_weight", kind: "scalar", T: 1, opt: true },
35591
+ { no: 31, name: "section7_recency_access_lambda", kind: "scalar", T: 1, opt: true },
35521
35592
  { no: 23, name: "recovery_floor_score", kind: "scalar", T: 1, opt: true },
35522
35593
  { no: 24, name: "recovery_min_top_k", kind: "scalar", T: 5, opt: true },
35523
35594
  { no: 25, name: "recovery_min_confidence_mean", kind: "scalar", T: 1, opt: true },
@@ -38092,6 +38163,10 @@ var AfterTurnKernelResponse = class _AfterTurnKernelResponse extends proxy_expor
38092
38163
  * @generated from field: bool ok = 1;
38093
38164
  */
38094
38165
  ok = false;
38166
+ /**
38167
+ * @generated from field: repeated libravdb.ipc.v1.PredictedContext predictions = 2;
38168
+ */
38169
+ predictions = [];
38095
38170
  constructor(data) {
38096
38171
  super();
38097
38172
  proxy_exports.proto3.util.initPartial(data, this);
@@ -38105,7 +38180,8 @@ var AfterTurnKernelResponse = class _AfterTurnKernelResponse extends proxy_expor
38105
38180
  kind: "scalar",
38106
38181
  T: 8
38107
38182
  /* ScalarType.BOOL */
38108
- }
38183
+ },
38184
+ { no: 2, name: "predictions", kind: "message", T: PredictedContext, repeated: true }
38109
38185
  ]);
38110
38186
  static fromBinary(bytes, options) {
38111
38187
  return new _AfterTurnKernelResponse().fromBinary(bytes, options);
@@ -39590,6 +39666,30 @@ var PROTO_PATH = path3.resolve(__dirname2, "./proto/intelligence_kernel/v1/kerne
39590
39666
  function resolveGrpcTarget(endpoint) {
39591
39667
  return endpoint.startsWith("tcp:") ? endpoint.substring(4) : endpoint;
39592
39668
  }
39669
+ function resolveGrpcCredentialMode(endpoint) {
39670
+ const target = resolveGrpcTarget(endpoint).trim();
39671
+ if (target.startsWith("unix:")) {
39672
+ return "insecure";
39673
+ }
39674
+ const host = extractGrpcHost(target);
39675
+ return isLoopbackHost(host) ? "insecure" : "tls";
39676
+ }
39677
+ function resolveGrpcCredentials(endpoint) {
39678
+ return resolveGrpcCredentialMode(endpoint) === "insecure" ? grpc.credentials.createInsecure() : grpc.credentials.createSsl();
39679
+ }
39680
+ function extractGrpcHost(target) {
39681
+ const withoutDnsPrefix = target.startsWith("dns:///") ? target.slice("dns:///".length) : target;
39682
+ if (withoutDnsPrefix.startsWith("[")) {
39683
+ const closeBracket = withoutDnsPrefix.indexOf("]");
39684
+ return closeBracket > 0 ? withoutDnsPrefix.slice(1, closeBracket) : withoutDnsPrefix;
39685
+ }
39686
+ const portSeparator = withoutDnsPrefix.lastIndexOf(":");
39687
+ return portSeparator > 0 ? withoutDnsPrefix.slice(0, portSeparator) : withoutDnsPrefix;
39688
+ }
39689
+ function isLoopbackHost(host) {
39690
+ const normalized = host.toLowerCase();
39691
+ return normalized === "localhost" || normalized === "127.0.0.1" || normalized === "::1";
39692
+ }
39593
39693
  var GrpcKernelClient = class {
39594
39694
  client;
39595
39695
  secret;
@@ -39608,7 +39708,7 @@ var GrpcKernelClient = class {
39608
39708
  const protoDescriptor = grpc.loadPackageDefinition(packageDefinition);
39609
39709
  const kernelService = protoDescriptor.intelligence_kernel.v1.IntelligenceKernel;
39610
39710
  const target = resolveGrpcTarget(options.endpoint);
39611
- this.client = new kernelService(target, grpc.credentials.createInsecure());
39711
+ this.client = new kernelService(target, resolveGrpcCredentials(options.endpoint));
39612
39712
  }
39613
39713
  getMetadata(signed = true) {
39614
39714
  const md = new grpc.Metadata();
package/dist/types.d.ts CHANGED
@@ -63,7 +63,6 @@ export interface PluginConfig {
63
63
  authoredHardBudgetFraction?: number;
64
64
  authoredSoftBudgetFraction?: number;
65
65
  elevatedGuidanceBudgetFraction?: number;
66
- section7StartupTokenBudgetTokens?: number;
67
66
  continuityMinTurns?: number;
68
67
  continuityTailBudgetTokens?: number;
69
68
  continuityPriorContextTokens?: number;
@@ -80,10 +79,8 @@ export interface PluginConfig {
80
79
  section7AuthorityRecencyWeight?: number;
81
80
  section7AuthorityFrequencyWeight?: number;
82
81
  section7AuthorityAuthoredWeight?: number;
83
- summaryExpansionConfidenceThreshold?: number;
84
- summaryExpansionDepth?: number;
85
- summaryExpansionTokenBudget?: number;
86
- summaryExpansionPenaltyFactor?: number;
82
+ section7AuthoritySalienceWeight?: number;
83
+ section7RecencyAccessLambda?: number;
87
84
  recoveryFloorScore?: number;
88
85
  recoveryMinTopK?: number;
89
86
  recoveryMinConfidenceMean?: number;
@@ -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.77",
5
+ "version": "1.4.80",
6
6
  "kind": [
7
7
  "memory",
8
8
  "context-engine"
@@ -64,6 +64,42 @@
64
64
  "useSessionSummarySearchExperiment": {
65
65
  "type": "boolean"
66
66
  },
67
+ "section7CoarseTopK": {
68
+ "type": "number"
69
+ },
70
+ "section7SecondPassTopK": {
71
+ "type": "number"
72
+ },
73
+ "section7Theta1": {
74
+ "type": "number"
75
+ },
76
+ "section7Kappa": {
77
+ "type": "number"
78
+ },
79
+ "section7HopEta": {
80
+ "type": "number"
81
+ },
82
+ "section7HopThreshold": {
83
+ "type": "number"
84
+ },
85
+ "section7AuthorityRecencyLambda": {
86
+ "type": "number"
87
+ },
88
+ "section7AuthorityRecencyWeight": {
89
+ "type": "number"
90
+ },
91
+ "section7AuthorityFrequencyWeight": {
92
+ "type": "number"
93
+ },
94
+ "section7AuthorityAuthoredWeight": {
95
+ "type": "number"
96
+ },
97
+ "section7AuthoritySalienceWeight": {
98
+ "type": "number"
99
+ },
100
+ "section7RecencyAccessLambda": {
101
+ "type": "number"
102
+ },
67
103
  "embeddingRuntimePath": {
68
104
  "type": "string"
69
105
  },
@@ -260,6 +296,24 @@
260
296
  "default": 2000,
261
297
  "description": "Auto-trigger compaction when the session accumulates this many tokens since the last compaction. Set to 0 to disable auto-compaction."
262
298
  },
299
+ "continuityMinTurns": {
300
+ "type": "number"
301
+ },
302
+ "continuityTailBudgetTokens": {
303
+ "type": "number"
304
+ },
305
+ "continuityPriorContextTokens": {
306
+ "type": "number"
307
+ },
308
+ "recoveryFloorScore": {
309
+ "type": "number"
310
+ },
311
+ "recoveryMinTopK": {
312
+ "type": "number"
313
+ },
314
+ "recoveryMinConfidenceMean": {
315
+ "type": "number"
316
+ },
263
317
  "ollamaUrl": {
264
318
  "type": "string"
265
319
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xdarkicex/openclaw-memory-libravdb",
3
- "version": "1.4.77",
3
+ "version": "1.4.80",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -70,7 +70,7 @@
70
70
  "@grpc/proto-loader": "^0.8.0",
71
71
  "@openclaw/plugin-inspector": "0.3.7",
72
72
  "@types/node": "^20.11.0",
73
- "@xdarkicex/libravdb-contracts": "^0.0.6",
73
+ "@xdarkicex/libravdb-contracts": "^0.0.7",
74
74
  "esbuild": "^0.27.0",
75
75
  "openclaw": "2026.4.11",
76
76
  "typescript": "^6.0.3"