@xdarkicex/openclaw-memory-libravdb 1.4.3 → 1.4.4
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/README.md +76 -16
- package/docs/README.md +3 -12
- package/docs/architecture.md +68 -153
- package/docs/contributing.md +1 -2
- package/openclaw.plugin.json +64 -1
- package/package.json +2 -2
- package/src/cli.ts +34 -0
- package/src/comparison-experiments.ts +128 -0
- package/src/context-engine.ts +276 -62
- package/src/dream-promotion.ts +492 -0
- package/src/dream-routing.ts +40 -0
- package/src/index.ts +16 -1
- package/src/markdown-hash.ts +104 -0
- package/src/markdown-ingest.ts +627 -0
- package/src/memory-runtime.ts +32 -9
- package/src/scoring.ts +6 -3
- package/src/temporal.ts +657 -80
- package/src/types.ts +48 -0
- package/docs/ast-v2.md +0 -167
- package/docs/ast.md +0 -70
- package/docs/compaction-evaluation.md +0 -182
- package/docs/continuity.md +0 -708
- package/docs/elevated-guidance.md +0 -258
- package/docs/gating.md +0 -134
- package/docs/implementation.md +0 -447
- package/docs/mathematics-v2.md +0 -1879
- package/docs/mathematics.md +0 -695
package/src/scoring.ts
CHANGED
|
@@ -334,8 +334,10 @@ export function rankRawUserRecoveryCandidates(
|
|
|
334
334
|
);
|
|
335
335
|
const intentAlignmentBonus = computeIntentAlignmentBonus(item.text, intentPhrases);
|
|
336
336
|
const finalScore = clamp01(
|
|
337
|
-
|
|
338
|
-
|
|
337
|
+
// Raw recovery is a precision-sensitive fallback: exact-turn recall is
|
|
338
|
+
// usually better served by lexical overlap than by broad semantic drift.
|
|
339
|
+
(0.20 * semanticScore) +
|
|
340
|
+
(0.70 * lexicalCoverage) +
|
|
339
341
|
(0.10 * recencyScore) +
|
|
340
342
|
intentAlignmentBonus,
|
|
341
343
|
);
|
|
@@ -515,7 +517,8 @@ function computeIntentAlignmentBonus(text: string, intentPhrases: string[]): num
|
|
|
515
517
|
if (matched === 0) {
|
|
516
518
|
return 0;
|
|
517
519
|
}
|
|
518
|
-
|
|
520
|
+
// Keep this a small nudge so phrase overlap cannot overwhelm lexical precision.
|
|
521
|
+
return Math.min(0.04, matched * 0.01);
|
|
519
522
|
}
|
|
520
523
|
|
|
521
524
|
function extractIntentPhrases(text: string): string[] {
|