clawvault 2.0.1 → 2.0.2
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.
|
@@ -173,7 +173,22 @@ var Compressor = class {
|
|
|
173
173
|
const result = hasDateHeading ? cleaned : `## ${this.formatDate(this.now())}
|
|
174
174
|
|
|
175
175
|
${cleaned}`;
|
|
176
|
-
|
|
176
|
+
const sanitized = this.sanitizeWikiLinks(result);
|
|
177
|
+
return this.enforcePriorityRules(sanitized);
|
|
178
|
+
}
|
|
179
|
+
/**
|
|
180
|
+
* Fix wiki-link corruption from LLM compression.
|
|
181
|
+
* LLMs often fuse preceding word fragments into wiki-links during rewriting:
|
|
182
|
+
* "reque[[people/pedro]]" → "[[people/pedro]]"
|
|
183
|
+
* "Linke[[agents/zeca]]" → "[[agents/zeca]]"
|
|
184
|
+
* "taske[[people/pedro]]a" → "[[people/pedro]]"
|
|
185
|
+
* Also fixes trailing word fragments fused after closing brackets.
|
|
186
|
+
*/
|
|
187
|
+
sanitizeWikiLinks(markdown) {
|
|
188
|
+
let result = markdown.replace(/\w+\[\[/g, " [[");
|
|
189
|
+
result = result.replace(/\]\]\w+/g, "]]");
|
|
190
|
+
result = result.replace(/ {2,}/g, " ");
|
|
191
|
+
return result;
|
|
177
192
|
}
|
|
178
193
|
/**
|
|
179
194
|
* Post-process LLM output to enforce priority rules.
|
package/dist/commands/observe.js
CHANGED
package/dist/commands/sleep.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -392,6 +392,15 @@ declare class Compressor {
|
|
|
392
392
|
private callOpenAI;
|
|
393
393
|
private callGemini;
|
|
394
394
|
private normalizeLlmOutput;
|
|
395
|
+
/**
|
|
396
|
+
* Fix wiki-link corruption from LLM compression.
|
|
397
|
+
* LLMs often fuse preceding word fragments into wiki-links during rewriting:
|
|
398
|
+
* "reque[[people/pedro]]" → "[[people/pedro]]"
|
|
399
|
+
* "Linke[[agents/zeca]]" → "[[agents/zeca]]"
|
|
400
|
+
* "taske[[people/pedro]]a" → "[[people/pedro]]"
|
|
401
|
+
* Also fixes trailing word fragments fused after closing brackets.
|
|
402
|
+
*/
|
|
403
|
+
private sanitizeWikiLinks;
|
|
395
404
|
/**
|
|
396
405
|
* Post-process LLM output to enforce priority rules.
|
|
397
406
|
* Lines matching critical rules get upgraded to 🔴, notable rules to 🟡.
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
SessionWatcher,
|
|
7
7
|
observeCommand,
|
|
8
8
|
registerObserveCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-BAS32WLF.js";
|
|
10
10
|
import {
|
|
11
11
|
buildSessionRecap,
|
|
12
12
|
formatSessionRecapMarkdown,
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
Observer,
|
|
22
22
|
Reflector,
|
|
23
23
|
parseSessionFile
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-NU7VKTWG.js";
|
|
25
25
|
import {
|
|
26
26
|
buildContext,
|
|
27
27
|
contextCommand,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "clawvault",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.2",
|
|
4
4
|
"description": "ClawVault™ - 🐘 An elephant never forgets. Structured memory for OpenClaw agents. Context death resilience, Obsidian-compatible markdown, local semantic search.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|