@remnic/core 9.3.622 → 9.3.624
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/access-cli.js +24 -24
- package/dist/access-http.js +9 -9
- package/dist/access-mcp.js +8 -8
- package/dist/access-service.js +7 -7
- package/dist/briefing.js +4 -4
- package/dist/buffer-surprise.js +3 -3
- package/dist/calibration.js +2 -2
- package/dist/causal-consolidation.js +8 -8
- package/dist/{chunk-UK727RHF.js → chunk-2L54V4ZO.js} +3 -3
- package/dist/{chunk-YPNGPHNZ.js → chunk-2UFQYU5F.js} +2 -2
- package/dist/{chunk-XAZOWLW4.js → chunk-3VONWEQB.js} +3 -3
- package/dist/{chunk-BF7ZRHH2.js → chunk-66SLUXKM.js} +2 -2
- package/dist/{chunk-VNR3K2R3.js → chunk-7TPH6UZL.js} +14 -14
- package/dist/{chunk-AVHPSLQ2.js → chunk-AYHXQR53.js} +2 -2
- package/dist/{chunk-LANHQ7EN.js → chunk-BNW5NJJH.js} +2 -2
- package/dist/{chunk-6GMPIJAZ.js → chunk-C3IW2F5Z.js} +2 -2
- package/dist/{chunk-4NS2ELXF.js → chunk-FG76RDVI.js} +8 -10
- package/dist/chunk-FG76RDVI.js.map +1 -0
- package/dist/{chunk-3GM7ZY6H.js → chunk-FMGWXIES.js} +4 -4
- package/dist/{chunk-LMZ7XQBB.js → chunk-GLWW3EJQ.js} +3 -3
- package/dist/{chunk-2GRRN7SZ.js → chunk-GYTVOLNX.js} +2 -2
- package/dist/{chunk-IMA6GU4Y.js → chunk-H3PHZLMF.js} +3 -3
- package/dist/chunk-H3PHZLMF.js.map +1 -0
- package/dist/{chunk-XQUIHXNI.js → chunk-I6UCUHLK.js} +4 -4
- package/dist/{chunk-2I2MDQIB.js → chunk-I74SUMNI.js} +2 -2
- package/dist/chunk-I74SUMNI.js.map +1 -0
- package/dist/{chunk-4H5ZJHEN.js → chunk-J6A3CX5N.js} +8 -3
- package/dist/{chunk-4H5ZJHEN.js.map → chunk-J6A3CX5N.js.map} +1 -1
- package/dist/{chunk-DEVUWMME.js → chunk-KGIGRNR6.js} +2 -2
- package/dist/{chunk-EOLCAPOU.js → chunk-KQFQ3IS5.js} +5 -5
- package/dist/{chunk-QSVPYQPG.js → chunk-LDXUBPMO.js} +2 -2
- package/dist/chunk-LDXUBPMO.js.map +1 -0
- package/dist/{chunk-JFEKNTX7.js → chunk-LN4YGHTM.js} +6 -2
- package/dist/chunk-LN4YGHTM.js.map +1 -0
- package/dist/{chunk-WB3LYXC5.js → chunk-MON3LMO7.js} +3 -3
- package/dist/{chunk-GA3PMY73.js → chunk-O4UNM6OR.js} +2 -2
- package/dist/{chunk-4G2RQTAE.js → chunk-OZXVGYGZ.js} +2 -2
- package/dist/{chunk-WCYKT2DE.js → chunk-P4BC54KI.js} +23 -14
- package/dist/chunk-P4BC54KI.js.map +1 -0
- package/dist/{chunk-DXBCNDVD.js → chunk-PJGB7XRR.js} +5 -5
- package/dist/chunk-PJGB7XRR.js.map +1 -0
- package/dist/{chunk-ZNCDQZIS.js → chunk-QFQQFX2H.js} +3 -3
- package/dist/{chunk-ZNCDQZIS.js.map → chunk-QFQQFX2H.js.map} +1 -1
- package/dist/{chunk-CCNZM5UM.js → chunk-R3OQGYOU.js} +2 -2
- package/dist/{chunk-UZB5KHKX.js → chunk-RGMVMVMF.js} +2 -2
- package/dist/chunk-RGMVMVMF.js.map +1 -0
- package/dist/{chunk-EDP57PFC.js → chunk-RKW6QR7W.js} +22 -18
- package/dist/chunk-RKW6QR7W.js.map +1 -0
- package/dist/{chunk-4MHHUPNH.js → chunk-UGEBPVNI.js} +3 -3
- package/dist/{chunk-4WMCPJWX.js → chunk-UQ7RN5HK.js} +22 -13
- package/dist/chunk-UQ7RN5HK.js.map +1 -0
- package/dist/{chunk-ZUNNG6PC.js → chunk-W3BKVM64.js} +2 -2
- package/dist/{chunk-K5O2QY6T.js → chunk-YTWNKQ2G.js} +2 -2
- package/dist/chunk-YTWNKQ2G.js.map +1 -0
- package/dist/{chunk-2SGJY2UY.js → chunk-Z3CCEP6F.js} +3 -3
- package/dist/{chunk-UCGCSZP2.js → chunk-ZZPIJPPD.js} +2 -2
- package/dist/chunking.js +1 -1
- package/dist/cli.js +19 -19
- package/dist/compounding/engine.js +4 -4
- package/dist/connectors/codex-materialize-runner.js +5 -5
- package/dist/connectors/codex-materialize.js +1 -1
- package/dist/connectors/index.js +5 -5
- package/dist/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-GD7KUFWS.js → contradiction-scan-AZTGFMPY.js} +3 -3
- package/dist/entity-retrieval.js +4 -4
- package/dist/explicit-capture.js +1 -1
- package/dist/extraction-judge.js +3 -3
- package/dist/extraction.js +3 -3
- package/dist/fallback-llm.js +2 -2
- package/dist/identity-continuity.js +1 -1
- package/dist/index.js +39 -36
- package/dist/index.js.map +1 -1
- package/dist/json-extract.js +1 -1
- package/dist/maintenance/memory-governance.js +4 -4
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +4 -4
- package/dist/maintenance/rebuild-memory-projection.js +5 -5
- package/dist/namespaces/migrate.js +5 -5
- package/dist/namespaces/storage.js +4 -4
- package/dist/operator-toolkit.js +7 -7
- package/dist/orchestrator.js +21 -21
- package/dist/peers/index.js +1 -1
- package/dist/recall-planner-llm.js +2 -2
- package/dist/semantic-chunking.js +2 -2
- package/dist/semantic-consolidation.js +6 -6
- package/dist/semantic-rule-promotion.js +4 -4
- package/dist/semantic-rule-verifier.js +4 -4
- package/dist/source-attribution.js +1 -1
- package/dist/storage.js +3 -3
- package/dist/summarizer.js +3 -3
- package/dist/temporal-supersession.js +1 -1
- package/dist/verified-recall.js +4 -4
- package/package.json +1 -1
- package/src/access-http.ts +15 -8
- package/src/chunking.ts +38 -23
- package/src/coding/review-context.ts +7 -1
- package/src/connectors/codex-materialize.ts +6 -1
- package/src/explicit-capture.ts +7 -2
- package/src/identity-continuity.ts +7 -1
- package/src/json-extract.ts +4 -1
- package/src/orchestrator.ts +5 -1
- package/src/peers/profile-reasoner.ts +4 -1
- package/src/semantic-chunking.ts +32 -16
- package/src/semantic-consolidation.ts +4 -1
- package/src/source-attribution.test.ts +21 -0
- package/src/source-attribution.ts +17 -2
- package/src/storage.ts +11 -2
- package/src/temporal-supersession.ts +4 -1
- package/dist/chunk-2I2MDQIB.js.map +0 -1
- package/dist/chunk-4NS2ELXF.js.map +0 -1
- package/dist/chunk-4WMCPJWX.js.map +0 -1
- package/dist/chunk-DXBCNDVD.js.map +0 -1
- package/dist/chunk-EDP57PFC.js.map +0 -1
- package/dist/chunk-IMA6GU4Y.js.map +0 -1
- package/dist/chunk-JFEKNTX7.js.map +0 -1
- package/dist/chunk-K5O2QY6T.js.map +0 -1
- package/dist/chunk-QSVPYQPG.js.map +0 -1
- package/dist/chunk-UZB5KHKX.js.map +0 -1
- package/dist/chunk-WCYKT2DE.js.map +0 -1
- /package/dist/{chunk-UK727RHF.js.map → chunk-2L54V4ZO.js.map} +0 -0
- /package/dist/{chunk-YPNGPHNZ.js.map → chunk-2UFQYU5F.js.map} +0 -0
- /package/dist/{chunk-XAZOWLW4.js.map → chunk-3VONWEQB.js.map} +0 -0
- /package/dist/{chunk-BF7ZRHH2.js.map → chunk-66SLUXKM.js.map} +0 -0
- /package/dist/{chunk-VNR3K2R3.js.map → chunk-7TPH6UZL.js.map} +0 -0
- /package/dist/{chunk-AVHPSLQ2.js.map → chunk-AYHXQR53.js.map} +0 -0
- /package/dist/{chunk-LANHQ7EN.js.map → chunk-BNW5NJJH.js.map} +0 -0
- /package/dist/{chunk-6GMPIJAZ.js.map → chunk-C3IW2F5Z.js.map} +0 -0
- /package/dist/{chunk-3GM7ZY6H.js.map → chunk-FMGWXIES.js.map} +0 -0
- /package/dist/{chunk-LMZ7XQBB.js.map → chunk-GLWW3EJQ.js.map} +0 -0
- /package/dist/{chunk-2GRRN7SZ.js.map → chunk-GYTVOLNX.js.map} +0 -0
- /package/dist/{chunk-XQUIHXNI.js.map → chunk-I6UCUHLK.js.map} +0 -0
- /package/dist/{chunk-DEVUWMME.js.map → chunk-KGIGRNR6.js.map} +0 -0
- /package/dist/{chunk-EOLCAPOU.js.map → chunk-KQFQ3IS5.js.map} +0 -0
- /package/dist/{chunk-WB3LYXC5.js.map → chunk-MON3LMO7.js.map} +0 -0
- /package/dist/{chunk-GA3PMY73.js.map → chunk-O4UNM6OR.js.map} +0 -0
- /package/dist/{chunk-4G2RQTAE.js.map → chunk-OZXVGYGZ.js.map} +0 -0
- /package/dist/{chunk-CCNZM5UM.js.map → chunk-R3OQGYOU.js.map} +0 -0
- /package/dist/{chunk-4MHHUPNH.js.map → chunk-UGEBPVNI.js.map} +0 -0
- /package/dist/{chunk-ZUNNG6PC.js.map → chunk-W3BKVM64.js.map} +0 -0
- /package/dist/{chunk-2SGJY2UY.js.map → chunk-Z3CCEP6F.js.map} +0 -0
- /package/dist/{chunk-UCGCSZP2.js.map → chunk-ZZPIJPPD.js.map} +0 -0
- /package/dist/{contradiction-scan-GD7KUFWS.js.map → contradiction-scan-AZTGFMPY.js.map} +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
hasCodexMaterializeSentinel,
|
|
3
3
|
materializeForNamespace
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LN4YGHTM.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveNamespaceChildRoot
|
|
7
7
|
} from "./chunk-3UXOZBHV.js";
|
|
8
8
|
import {
|
|
9
9
|
StorageManager
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-PJGB7XRR.js";
|
|
11
11
|
import {
|
|
12
12
|
isSafeRouteNamespace
|
|
13
13
|
} from "./chunk-U3PN77QT.js";
|
|
@@ -118,4 +118,4 @@ export {
|
|
|
118
118
|
runCodexMaterialize,
|
|
119
119
|
runPostConsolidationMaterialize
|
|
120
120
|
};
|
|
121
|
-
//# sourceMappingURL=chunk-
|
|
121
|
+
//# sourceMappingURL=chunk-UGEBPVNI.js.map
|
|
@@ -9,20 +9,29 @@ function estimateTokens(text) {
|
|
|
9
9
|
}
|
|
10
10
|
function splitSentences(text) {
|
|
11
11
|
const sentences = [];
|
|
12
|
-
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
12
|
+
let start = 0;
|
|
13
|
+
for (let i = 0; i < text.length; i++) {
|
|
14
|
+
const ch = text[i];
|
|
15
|
+
if (ch !== "." && ch !== "!" && ch !== "?") continue;
|
|
16
|
+
let end = i;
|
|
17
|
+
while (end + 1 < text.length) {
|
|
18
|
+
const n = text[end + 1];
|
|
19
|
+
if (n !== "." && n !== "!" && n !== "?") break;
|
|
20
|
+
end++;
|
|
21
|
+
}
|
|
22
|
+
const after = text[end + 1];
|
|
23
|
+
if (after === void 0 || /\s/.test(after)) {
|
|
24
|
+
const sentence = text.slice(start, end + 1).trim();
|
|
25
|
+
if (sentence.length > 0) sentences.push(sentence);
|
|
26
|
+
start = end + 1;
|
|
23
27
|
}
|
|
28
|
+
i = end;
|
|
29
|
+
}
|
|
30
|
+
if (start < text.length) {
|
|
31
|
+
const remaining = text.slice(start).trim();
|
|
32
|
+
if (remaining.length > 0) sentences.push(remaining);
|
|
24
33
|
}
|
|
25
|
-
return sentences
|
|
34
|
+
return sentences;
|
|
26
35
|
}
|
|
27
36
|
function chunkContent(content, config = DEFAULT_CHUNKING_CONFIG) {
|
|
28
37
|
const totalTokens = estimateTokens(content);
|
|
@@ -114,4 +123,4 @@ export {
|
|
|
114
123
|
chunkContent,
|
|
115
124
|
reassembleChunks
|
|
116
125
|
};
|
|
117
|
-
//# sourceMappingURL=chunk-
|
|
126
|
+
//# sourceMappingURL=chunk-UQ7RN5HK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/chunking.ts"],"sourcesContent":["/**\n * Automatic Chunking with Overlap (Phase 2A)\n *\n * Sentence-boundary chunking for long memories.\n * Preserves coherent thoughts by never splitting mid-sentence.\n */\n\nexport interface ChunkingConfig {\n /** Target tokens per chunk (default 200) */\n targetTokens: number;\n /** Minimum tokens to trigger chunking (default 150) */\n minTokens: number;\n /** Number of sentences to overlap between chunks (default 2) */\n overlapSentences: number;\n}\n\nexport interface Chunk {\n /** Chunk content */\n content: string;\n /** 0-based index */\n index: number;\n /** Approximate token count */\n tokenCount: number;\n}\n\nexport interface ChunkResult {\n /** Whether content was chunked */\n chunked: boolean;\n /** Array of chunks (length 1 if not chunked) */\n chunks: Chunk[];\n}\n\n/** Default chunking configuration */\nexport const DEFAULT_CHUNKING_CONFIG: ChunkingConfig = {\n targetTokens: 200,\n minTokens: 150,\n overlapSentences: 2,\n};\n\n/**\n * Estimate token count for text.\n * Rough approximation: ~4 characters per token for English.\n */\nfunction estimateTokens(text: string): number {\n return Math.ceil(text.length / 4);\n}\n\n/**\n * Split text into sentences.\n * Handles common abbreviations and edge cases.\n */\nfunction splitSentences(text: string): string[] {\n // Split on sentence-ending punctuation (. ! ?) that is followed by whitespace\n // or end of string; the punctuation stays with the sentence.\n //\n // Implemented as a single linear scan rather than a regex. Every regex form of\n // this split is either polynomial (CodeQL js/polynomial-redos) or — once\n // bounded/anchored to satisfy CodeQL — mishandles long runs or non-boundary\n // punctuation (a global match silently drops a skipped prefix; a sticky match\n // stops at the first interior `.` that is not a real boundary, e.g. \"v1.2.3\"\n // or \"example.com\", emitting the whole document as one chunk). A character\n // scan is O(n), allocation-free, drops nothing, and treats interior\n // punctuation correctly. Normal prose splits identically to the previous\n // /[^.!?]*[.!?]+(?:\\s+|$)/g form.\n const sentences: string[] = [];\n let start = 0;\n for (let i = 0; i < text.length; i++) {\n const ch = text[i];\n if (ch !== \".\" && ch !== \"!\" && ch !== \"?\") continue;\n // Consume a run of terminators (e.g. \"?!\", \"...\").\n let end = i;\n while (end + 1 < text.length) {\n const n = text[end + 1];\n if (n !== \".\" && n !== \"!\" && n !== \"?\") break;\n end++;\n }\n const after = text[end + 1];\n // A real boundary only if the terminator run ends the string or is followed\n // by whitespace. Interior punctuation (no following whitespace) is left in\n // place and the scan continues.\n if (after === undefined || /\\s/.test(after)) {\n const sentence = text.slice(start, end + 1).trim();\n if (sentence.length > 0) sentences.push(sentence);\n start = end + 1;\n }\n i = end;\n }\n // Trailing text without a closing terminator.\n if (start < text.length) {\n const remaining = text.slice(start).trim();\n if (remaining.length > 0) sentences.push(remaining);\n }\n return sentences;\n}\n\n/**\n * Chunk content into overlapping segments at sentence boundaries.\n *\n * @param content - The text content to chunk\n * @param config - Chunking configuration\n * @returns ChunkResult with chunks array\n */\nexport function chunkContent(\n content: string,\n config: ChunkingConfig = DEFAULT_CHUNKING_CONFIG,\n): ChunkResult {\n const totalTokens = estimateTokens(content);\n\n // Don't chunk if below minimum threshold\n if (totalTokens < config.minTokens) {\n return {\n chunked: false,\n chunks: [{\n content,\n index: 0,\n tokenCount: totalTokens,\n }],\n };\n }\n\n const sentences = splitSentences(content);\n\n // If we couldn't split into multiple sentences, don't chunk\n if (sentences.length <= 1) {\n return {\n chunked: false,\n chunks: [{\n content,\n index: 0,\n tokenCount: totalTokens,\n }],\n };\n }\n\n const chunks: Chunk[] = [];\n let currentChunkSentences: string[] = [];\n let currentTokens = 0;\n let chunkIndex = 0;\n\n for (let i = 0; i < sentences.length; i++) {\n const sentence = sentences[i];\n const sentenceTokens = estimateTokens(sentence);\n\n // Add sentence to current chunk\n currentChunkSentences.push(sentence);\n currentTokens += sentenceTokens;\n\n // Check if we've reached target size (with some flexibility)\n // Allow going over by up to 50% to avoid tiny final chunks\n const atTarget = currentTokens >= config.targetTokens;\n const isLastSentence = i === sentences.length - 1;\n\n if (atTarget || isLastSentence) {\n // Create chunk from accumulated sentences\n const chunkContent = currentChunkSentences.join(\" \");\n chunks.push({\n content: chunkContent,\n index: chunkIndex,\n tokenCount: estimateTokens(chunkContent),\n });\n chunkIndex++;\n\n // Start new chunk with overlap (if not at end)\n if (!isLastSentence) {\n // Keep last N sentences for overlap.\n // Guard: slice(-0) === slice(0), which returns the ENTIRE array\n // (CLAUDE.md gotcha #27). When overlapSentences is 0, clear fully.\n const overlapCount = Math.min(config.overlapSentences, currentChunkSentences.length);\n if (overlapCount <= 0) {\n currentChunkSentences = [];\n currentTokens = 0;\n } else {\n currentChunkSentences = currentChunkSentences.slice(-overlapCount);\n currentTokens = currentChunkSentences.reduce((sum, s) => sum + estimateTokens(s), 0);\n }\n }\n }\n }\n\n // Only consider it \"chunked\" if we got multiple chunks\n return {\n chunked: chunks.length > 1,\n chunks,\n };\n}\n\n/**\n * Get parent content by reassembling chunks.\n * Useful for displaying full context when a chunk is retrieved.\n *\n * @param chunks - Array of chunk contents in order\n * @returns Reassembled parent content (with overlap removed)\n */\nexport function reassembleChunks(chunks: string[]): string {\n if (chunks.length === 0) return \"\";\n if (chunks.length === 1) return chunks[0];\n\n // For overlapping chunks, we need to deduplicate\n // Simple approach: use full first chunk, then non-overlapping parts of subsequent chunks\n // This is imperfect but handles most cases\n const result: string[] = [chunks[0]];\n\n for (let i = 1; i < chunks.length; i++) {\n const prevChunk = chunks[i - 1];\n const currChunk = chunks[i];\n\n // Find overlap by looking for common suffix/prefix\n // Try to find where the previous chunk ends in the current chunk\n const prevSentences = splitSentences(prevChunk);\n const currSentences = splitSentences(currChunk);\n\n // Find how many sentences from prev are at the start of curr\n let overlapCount = 0;\n for (let j = 0; j < Math.min(prevSentences.length, currSentences.length); j++) {\n // Check if last N sentences of prev match first N sentences of curr\n const prevEnd = prevSentences.slice(-(j + 1));\n const currStart = currSentences.slice(0, j + 1);\n\n if (prevEnd.join(\" \") === currStart.join(\" \")) {\n overlapCount = j + 1;\n }\n }\n\n // Add non-overlapping portion\n if (overlapCount > 0 && overlapCount < currSentences.length) {\n result.push(currSentences.slice(overlapCount).join(\" \"));\n } else if (overlapCount === 0) {\n // No detected overlap, add full chunk\n result.push(currChunk);\n }\n // If overlapCount === currSentences.length, skip (fully contained)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,QAAQ,KAAK;AACtC,UAAM,YAAY,OAAO,IAAI,CAAC;AAC9B,UAAM,YAAY,OAAO,CAAC;AAI1B,UAAM,gBAAgB,eAAe,SAAS;AAC9C,UAAM,gBAAgB,eAAe,SAAS;AAG9C,QAAI,eAAe;AACnB,aAAS,IAAI,GAAG,IAAI,KAAK,IAAI,cAAc,QAAQ,cAAc,MAAM,GAAG,KAAK;AAE7E,YAAM,UAAU,cAAc,MAAM,EAAE,IAAI,EAAE;AAC5C,YAAM,YAAY,cAAc,MAAM,GAAG,IAAI,CAAC;AAE9C,UAAI,QAAQ,KAAK,GAAG,MAAM,UAAU,KAAK,GAAG,GAAG;AAC7C,uBAAe,IAAI;AAAA,MACrB;AAAA,IACF;AAGA,QAAI,eAAe,KAAK,eAAe,cAAc,QAAQ;AAC3D,aAAO,KAAK,cAAc,MAAM,YAAY,EAAE,KAAK,GAAG,CAAC;AAAA,IACzD,WAAW,iBAAiB,GAAG;AAE7B,aAAO,KAAK,SAAS;AAAA,IACvB;AAAA,EAEF;AAEA,SAAO,OAAO,KAAK,GAAG;AACxB;","names":["chunkContent"]}
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-ZFXCQPNO.js";
|
|
5
5
|
import {
|
|
6
6
|
StorageManager
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PJGB7XRR.js";
|
|
8
8
|
import {
|
|
9
9
|
isSafeRouteNamespace
|
|
10
10
|
} from "./chunk-U3PN77QT.js";
|
|
@@ -161,4 +161,4 @@ export {
|
|
|
161
161
|
getCategoryDir,
|
|
162
162
|
NamespaceStorageRouter
|
|
163
163
|
};
|
|
164
|
-
//# sourceMappingURL=chunk-
|
|
164
|
+
//# sourceMappingURL=chunk-W3BKVM64.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
|
|
8
8
|
// src/temporal-supersession.ts
|
|
9
9
|
function normalizeSupersessionKey(raw) {
|
|
10
|
-
return raw.trim().toLowerCase().replace(/[\s\-]+/g, "-").replace(
|
|
10
|
+
return raw.trim().toLowerCase().replace(/[\s\-]+/g, "-").replace(/^-|-$/g, "");
|
|
11
11
|
}
|
|
12
12
|
function computeSupersessionKey(entityRef, attributeName) {
|
|
13
13
|
if (!entityRef || typeof entityRef !== "string") return null;
|
|
@@ -238,4 +238,4 @@ export {
|
|
|
238
238
|
applyTemporalSupersession,
|
|
239
239
|
shouldFilterSupersededFromRecall
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=chunk-
|
|
241
|
+
//# sourceMappingURL=chunk-YTWNKQ2G.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/temporal-supersession.ts"],"sourcesContent":["/**\n * Temporal Supersession (issue #375)\n *\n * When a new fact lands with `structuredAttributes` keyed on a known\n * `entityRef`, any prior fact whose supersession key collides with the new\n * fact's key is marked `status: \"superseded\"` and linked via\n * `supersededBy` / `supersededAt`. Recall filters those superseded memories\n * by default so agents see only the \"current\" value per entity attribute.\n *\n * The algorithm is intentionally O(N) over the memory corpus per write, but\n * skips cheaply when the new fact has no structuredAttributes. It reuses the\n * cached `readAllMemories()` path so cost is amortized with the rest of the\n * write pipeline.\n */\nimport type { MemoryFile, MemoryFrontmatter } from \"./types.js\";\nimport type { StorageManager } from \"./storage.js\";\nimport { log } from \"./logger.js\";\nimport { effectiveValidAt } from \"./temporal-validity.js\";\n\n/**\n * Shared normalization for supersession key components.\n *\n * Trims surrounding whitespace, lowercases, then collapses any run of\n * whitespace OR hyphens to a single hyphen, and strips any leading/trailing\n * hyphens that result. Both `computeSupersessionKey` and\n * `lookupAttributeByNormalizedKey` must use this so that keys produced at\n * write time and keys used at lookup time are identical regardless of how\n * the LLM encoded whitespace, hyphens, or casing (Finding B fix).\n *\n * Symmetry guarantee: `\"foo bar\"`, `\"foo-bar\"`, `\"foo - bar\"`, and\n * `\"foo bar\"` all canonicalize to `\"foo-bar\"`.\n *\n * Exported so external tests can verify the canonical form.\n */\nexport function normalizeSupersessionKey(raw: string): string {\n return raw\n .trim()\n .toLowerCase()\n .replace(/[\\s\\-]+/g, \"-\")\n // The previous line already collapsed runs to single hyphens, so ^-|-$ is\n // equivalent to ^-+|-+$ here and drops the anchored quantifier flagged by\n // CodeQL js/polynomial-redos.\n .replace(/^-|-$/g, \"\");\n}\n\n/**\n * Stable supersession key for an (entityRef, attributeName) pair.\n *\n * The algorithm is:\n * - normalize the entityRef (trim, lower-case, collapse whitespace)\n * - normalize the attributeName the same way\n * - join with `::`\n *\n * Exported so tests and tools can recompute it without depending on storage.\n */\nexport function computeSupersessionKey(\n entityRef: string | undefined,\n attributeName: string,\n): string | null {\n if (!entityRef || typeof entityRef !== \"string\") return null;\n if (!attributeName || typeof attributeName !== \"string\") return null;\n const entity = normalizeSupersessionKey(entityRef);\n const attr = normalizeSupersessionKey(attributeName);\n if (entity.length === 0 || attr.length === 0) return null;\n return `${entity}::${attr}`;\n}\n\n/**\n * Compute the full set of supersession keys for a fact with structured\n * attributes. Returns an empty array if no keys can be derived.\n */\nexport function supersessionKeysForFact(spec: {\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n}): string[] {\n if (!spec.entityRef) return [];\n if (!spec.structuredAttributes) return [];\n const keys: string[] = [];\n for (const attrName of Object.keys(spec.structuredAttributes)) {\n const key = computeSupersessionKey(spec.entityRef, attrName);\n if (key) keys.push(key);\n }\n return keys;\n}\n\n/**\n * Look up a structured-attribute value by a raw key, normalizing both sides\n * with `normalizeSupersessionKey` before comparing. This ensures that keys\n * written by the LLM with mixed case, surrounding whitespace, or internal\n * whitespace (e.g. `\"City\"`, `\" city \"`, `\"job title\"`, `\"job-title\"`)\n * are all matched against normalized keys produced by `computeSupersessionKey`\n * (Finding B fix — uses the same helper so both sides are identical).\n *\n * The storage format is NOT changed — we only normalize at lookup time.\n */\nexport function lookupAttributeByNormalizedKey(\n attributes: Record<string, unknown>,\n rawKey: string,\n): unknown {\n const normalizedTarget = normalizeSupersessionKey(rawKey);\n for (const [k, v] of Object.entries(attributes)) {\n if (normalizeSupersessionKey(k) === normalizedTarget) return v;\n }\n return undefined;\n}\n\n/**\n * Decide whether an existing memory should be superseded by a newly-written\n * memory that carries the supplied supersession key set.\n *\n * Only memories that:\n * - are currently `active`\n * - share an `entityRef` with the new fact\n * - share at least one supersession key with the new fact\n * - are older than the new fact\n * - have a conflicting value (different string) for the overlapping key\n * are eligible. This keeps supersession local to the attribute that actually\n * changed — if fact A sets `{city: Austin, tool: vim}` and fact B sets\n * `{city: NYC}`, only the city attribute is superseded, not the tool.\n */\nexport function shouldSupersedeExisting(args: {\n candidate: MemoryFrontmatter;\n newEntityRef: string;\n newAttributes: Record<string, string>;\n newCreatedAt: string;\n newMemoryId: string;\n}): { matchedKeys: string[] } | null {\n const { candidate, newEntityRef, newAttributes, newCreatedAt, newMemoryId } = args;\n\n if (candidate.id === newMemoryId) return null;\n if (candidate.status && candidate.status !== \"active\") return null;\n if (!candidate.entityRef) return null;\n if (!candidate.structuredAttributes) return null;\n\n // Reuse the shared `normalizeSupersessionKey` helper so this comparison\n // cannot drift from the canonical form used to build supersession keys\n // elsewhere in this file.\n const candidateEntityNorm = normalizeSupersessionKey(candidate.entityRef);\n const newEntityNorm = normalizeSupersessionKey(newEntityRef);\n if (candidateEntityNorm !== newEntityNorm) return null;\n\n // Must be older than the new fact's effective validity start — equal\n // timestamps are ignored to avoid races within the same millisecond. When\n // replay/import supplies source time, valid_at must drive ordering instead\n // of wall-clock persistence time.\n const candidateCreated = Date.parse(effectiveValidAt(candidate));\n const newCreated = Date.parse(newCreatedAt);\n if (!Number.isFinite(candidateCreated) || !Number.isFinite(newCreated)) return null;\n if (candidateCreated >= newCreated) return null;\n\n const matchedKeys: string[] = [];\n for (const [attrName, newValue] of Object.entries(newAttributes)) {\n // Use normalized key lookup so mixed-case or whitespace-padded keys\n // stored by the LLM are matched correctly (Finding 2 fix).\n const candidateValue = lookupAttributeByNormalizedKey(\n candidate.structuredAttributes,\n attrName,\n );\n if (candidateValue === undefined) continue;\n // Only supersede on conflicting values — identical values are a no-op.\n if (normalizeValue(String(candidateValue)) === normalizeValue(newValue)) continue;\n const key = computeSupersessionKey(newEntityRef, attrName);\n if (key) matchedKeys.push(key);\n }\n\n return matchedKeys.length > 0 ? { matchedKeys } : null;\n}\n\nfunction normalizeValue(v: string): string {\n return v.trim().toLowerCase();\n}\n\nasync function expireChildChunksForSupersededParent(args: {\n storage: StorageManager;\n allCandidates: MemoryFile[];\n parentId: string;\n newMemoryId: string;\n supersededAt: string;\n invalidAt?: string;\n}): Promise<void> {\n const processedChunkIds = new Set<string>();\n const chunks = args.allCandidates.filter(\n (candidate) => candidate.frontmatter.parentId === args.parentId,\n );\n\n for (const chunk of chunks) {\n const chunkKey = chunk.frontmatter.id ?? chunk.path;\n if (processedChunkIds.has(chunkKey)) continue;\n\n try {\n const freshChunk = await args.storage.readMemoryByPath(chunk.path);\n if (!freshChunk) continue;\n processedChunkIds.add(chunkKey);\n const freshStatus = freshChunk.frontmatter.status ?? \"active\";\n if (freshStatus !== \"active\" || freshChunk.frontmatter.supersededBy) continue;\n\n await args.storage.writeMemoryFrontmatter(\n freshChunk,\n {\n status: \"superseded\",\n supersededBy: args.newMemoryId,\n supersededAt: args.supersededAt,\n updated: args.supersededAt,\n ...(args.invalidAt && !freshChunk.frontmatter.invalid_at\n ? { invalid_at: args.invalidAt }\n : {}),\n },\n {\n actor: \"temporal-supersession\",\n reasonCode: \"structured-attribute-update-child-chunk\",\n relatedMemoryIds: [args.newMemoryId, args.parentId],\n },\n );\n } catch (err) {\n log.warn(\n `temporal-supersession: failed to expire child chunk ${chunk.frontmatter.id} for parent ${args.parentId}: ${err}`,\n );\n }\n }\n}\n\nexport interface TemporalSupersessionResult {\n supersededIds: string[];\n matchedKeys: string[];\n}\n\n/**\n * Scan existing memories and mark any that are superseded by the\n * just-written memory. Fails open on I/O errors — the new memory is already\n * on disk, and supersession is a best-effort hygiene step.\n */\nexport async function applyTemporalSupersession(args: {\n storage: StorageManager;\n newMemoryId: string;\n entityRef?: string;\n structuredAttributes?: Record<string, string>;\n createdAt: string;\n enabled: boolean;\n /**\n * When true, skip the persisted `frontmatter.created` lookup and use\n * `args.createdAt` directly as the ordering anchor. Set this on the\n * hash-dedup short-circuit path where `newMemoryId` points to an existing\n * OLD fact (no new file is written) and its persisted timestamp would be\n * stale relative to the incoming promotion event (PR #402 Finding Uyui).\n */\n useCallerTimestamp?: boolean;\n}): Promise<TemporalSupersessionResult> {\n const empty: TemporalSupersessionResult = { supersededIds: [], matchedKeys: [] };\n if (!args.enabled) return empty;\n if (!args.entityRef) return empty;\n if (!args.structuredAttributes) return empty;\n if (Object.keys(args.structuredAttributes).length === 0) return empty;\n\n const newKeys = supersessionKeysForFact({\n entityRef: args.entityRef,\n structuredAttributes: args.structuredAttributes,\n });\n if (newKeys.length === 0) return empty;\n\n let hotMemories: MemoryFile[];\n try {\n hotMemories = await args.storage.readAllMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllMemories failed: ${err}`);\n return empty;\n }\n\n // Finding 1 fix: use the on-disk effective validity start of the\n // newly-written memory rather than a wall-clock timestamp sampled after\n // `writeMemory` returns. In concurrent writers the two can differ by enough\n // to cause wrong-direction supersession. If source replay/import provided\n // valid_at, it must drive ordering; otherwise created remains the legacy\n // fallback. If the memory is not yet visible in the cache (edge case during\n // fast concurrent writes) fall back to args.createdAt.\n //\n // PR #402 round-12 (Finding Uyui): on the hash-dedup early-return path the\n // caller supplies the OLD matching fact's id as `newMemoryId` (no new file is\n // written). That makes `newMemoryFile.frontmatter.created` an arbitrarily\n // old timestamp. When `args.useCallerTimestamp` is set the caller explicitly\n // opts out of the persisted-timestamp lookup so `args.createdAt` (the\n // incoming event time: source valid_at when present, otherwise wall-clock) is\n // used directly, keeping ordering correct regardless of how old the matching\n // fact is.\n const newMemoryFile = hotMemories.find((m) => m.frontmatter.id === args.newMemoryId);\n const persistedCreatedAt = args.useCallerTimestamp\n ? args.createdAt\n : (newMemoryFile ? effectiveValidAt(newMemoryFile.frontmatter) : args.createdAt);\n\n const supersededIds: string[] = [];\n const matchedKeys = new Set<string>();\n\n // Process hot then cold. Hot-then-cold ordering is safer because hot\n // writes are more frequent and the CAS re-read guards against double-writes.\n // A Set<string> of already-processed ids ensures that a memory visible in\n // both tiers (same logical memory with different filesystem paths during a\n // migration race) is processed at most once. Keying on `frontmatter.id`\n // is correct because the same logical memory has the same id regardless of\n // which tier's directory it currently lives in (PR #402 Finding 1 fix).\n // Fall back to path-based keying when id is absent (defensive).\n const processedIds = new Set<string>();\n\n // Finding UOGi fix (round-6): readAllColdMemories() performs a full uncached\n // recursive directory scan of cold/. After Finding UTsP broadened the scan\n // to cover the entire cold root (not just facts/+corrections/), the per-call\n // cost grows with the cold tree size.\n //\n // The fix is a TTL-based in-memory cache inside StorageManager\n // (readAllColdMemories caches its result for COLD_SCAN_CACHE_TTL_MS) that is\n // shared across consecutive supersession calls within the same write burst.\n // The cache is invalidated automatically on any hot→cold demotion (which\n // calls invalidateAllMemoriesCache, which also clears the cold cache) and\n // expires after the TTL as a safety net.\n //\n // This means back-to-back structured-attribute writes in the same burst\n // (e.g. batch extraction) pay the cold I/O cost at most once, not N times.\n // Correctness is preserved because the cache TTL ensures eventual consistency\n // and the invalidation hook covers the hot→cold path.\n\n let coldMemories: MemoryFile[];\n try {\n coldMemories = await args.storage.readAllColdMemories();\n } catch (err) {\n log.warn(`temporal-supersession: readAllColdMemories failed: ${err}`);\n coldMemories = [];\n }\n\n // Combine hot and cold memories into a single scan. New memory itself is\n // excluded inline. We do NOT skip cold scan when hot produced zero\n // supersessions — the P1 finding is precisely that stale cold facts leak\n // when hot has no hits.\n const allCandidates: MemoryFile[] = [...hotMemories, ...coldMemories];\n\n for (const memory of allCandidates) {\n if (memory.frontmatter.id === args.newMemoryId) continue;\n const dedupeKey = memory.frontmatter.id ?? memory.path;\n if (processedIds.has(dedupeKey)) continue;\n const snapshotStatus = memory.frontmatter.status ?? \"active\";\n if (snapshotStatus !== \"active\") {\n // A stale non-active snapshot entry must not suppress an active copy of\n // the same logical memory that appears later in another tier. This can\n // happen during hot/cold migration races where the hot snapshot is already\n // superseded but the cold copy is still active and should be evaluated.\n continue;\n }\n // NOTE: do NOT call processedIds.add(dedupeKey) here. We defer marking\n // the id as processed until AFTER the CAS re-read succeeds. If we mark\n // it here and the re-read fails (e.g. the hot entry has already been\n // migrated to cold storage), the same logical id that appears later in\n // the cold tier scan would be silently skipped, leaving a stale cold\n // fact unsuperseded. Deferring ensures that a failed primary-tier read\n // grants the alternate tier a chance to process the same id (PR #402\n // round-6 Finding 1 fix).\n\n const decision = shouldSupersedeExisting({\n candidate: memory.frontmatter,\n newEntityRef: args.entityRef,\n newAttributes: args.structuredAttributes,\n newCreatedAt: persistedCreatedAt,\n newMemoryId: args.newMemoryId,\n });\n if (!decision) {\n // No supersession decision — safe to mark as processed now so the\n // alternate tier doesn't re-evaluate an identical non-matching entry.\n processedIds.add(dedupeKey);\n continue;\n }\n\n try {\n // CAS-style re-read immediately before the write. `readAllMemories()`\n // is a snapshot — with concurrent writers, another run may have already\n // superseded this candidate since we loaded it. If we blindly trust the\n // snapshot we can clobber a newer `supersededBy` link with a stale one.\n //\n // File storage offers no true locking, so the best we can do is:\n // 1. re-read the exact file we're about to mutate\n // 2. verify status is still \"active\" and no `supersededBy` is set\n // 3. only then issue the write\n // If the re-read shows a newer concurrent writer beat us to it, skip.\n // This CAS pattern applies equally to hot and cold tier candidates.\n // Mark as processed AFTER confirming the candidate is readable so that\n // a migration-race read failure on the hot entry does not silently\n // prevent the cold entry from being evaluated (Finding 1, round 6).\n const fresh = await args.storage.readMemoryByPath(memory.path);\n if (!fresh) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: no longer readable at ${memory.path} — leaving id available for alternate tier`,\n );\n // Do NOT add to processedIds — allow the cold-tier copy to be\n // evaluated in the next iteration of the same scan.\n continue;\n }\n // Candidate is readable — mark the id as processed now to prevent the\n // alternate tier from double-writing.\n processedIds.add(dedupeKey);\n const freshStatus = fresh.frontmatter.status ?? \"active\";\n if (freshStatus !== \"active\" || fresh.frontmatter.supersededBy) {\n log.debug(\n `[engram] temporal supersession skipped candidate ${memory.frontmatter.id}: already superseded by concurrent writer`,\n );\n continue;\n }\n\n // Finding 2 fix: the `supersededAt` / `updated` timestamps written to the\n // old fact must never run backwards relative to its own persisted\n // `created` timestamp. If the caller-supplied `args.createdAt` (which\n // represents \"when the new replacing fact was authored\") is earlier than\n // either the new fact's persisted `created` (T_new) or the old fact's\n // persisted `created` (T_old), we'd be writing a nonsensical\n // `supersededAt` that precedes the old memory's own creation. Clamp to\n // the monotonic maximum so time only moves forward.\n // This monotonic clamp is applied for both hot and cold tier writes.\n const oldCreatedMs = new Date(fresh.frontmatter.created).getTime();\n const newCreatedMs = new Date(persistedCreatedAt).getTime();\n const argCreatedMs = new Date(args.createdAt).getTime();\n const maxMs = Math.max(\n Number.isFinite(oldCreatedMs) ? oldCreatedMs : 0,\n Number.isFinite(newCreatedMs) ? newCreatedMs : 0,\n Number.isFinite(argCreatedMs) ? argCreatedMs : 0,\n );\n const supersededAt = new Date(maxMs).toISOString();\n\n // Issue #680 — explicit fact lifecycle. When the new fact\n // supersedes this one, set the predecessor's `invalid_at` to the\n // successor's effective valid_at. Skip when the predecessor\n // already carries an `invalid_at` so manual / earlier values\n // are preserved (idempotent).\n //\n // Codex P1 on PR #713: in the hash-dedup early-return path\n // (`useCallerTimestamp: true`), `newMemoryFile` is actually the\n // OLD matching fact — no new file was written — so its\n // `valid_at` is the predecessor's own old timestamp, not the\n // successor's effective time. Use `persistedCreatedAt`\n // directly in that path so the predecessor's invalid_at lines\n // up with the caller's wall-clock, not the matching fact's old\n // valid_at. The non-dedup path keeps the previous behavior\n // (prefer the new file's explicit valid_at, fall back to its\n // persisted created).\n let invalidAtPatch: string | undefined;\n if (!fresh.frontmatter.invalid_at) {\n if (args.useCallerTimestamp) {\n invalidAtPatch = persistedCreatedAt;\n } else {\n const newValidAt = newMemoryFile?.frontmatter.valid_at?.trim();\n invalidAtPatch =\n newValidAt && newValidAt.length > 0 ? newValidAt : persistedCreatedAt;\n }\n }\n const wrote = await args.storage.writeMemoryFrontmatter(\n fresh,\n {\n status: \"superseded\",\n supersededBy: args.newMemoryId,\n supersededAt,\n updated: supersededAt,\n ...(invalidAtPatch ? { invalid_at: invalidAtPatch } : {}),\n },\n {\n actor: \"temporal-supersession\",\n reasonCode: \"structured-attribute-update\",\n relatedMemoryIds: [args.newMemoryId],\n },\n );\n if (wrote) {\n supersededIds.push(memory.frontmatter.id);\n for (const key of decision.matchedKeys) matchedKeys.add(key);\n await expireChildChunksForSupersededParent({\n storage: args.storage,\n allCandidates,\n parentId: fresh.frontmatter.id,\n newMemoryId: args.newMemoryId,\n supersededAt,\n invalidAt: invalidAtPatch ?? fresh.frontmatter.invalid_at,\n });\n }\n } catch (err) {\n log.warn(\n `temporal-supersession: failed to mark ${memory.frontmatter.id} superseded: ${err}`,\n );\n }\n }\n\n if (supersededIds.length > 0) {\n log.debug(\n `temporal-supersession: marked ${supersededIds.length} memories superseded by ${args.newMemoryId} (keys=${Array.from(matchedKeys).join(\",\")})`,\n );\n }\n\n return { supersededIds, matchedKeys: Array.from(matchedKeys) };\n}\n\n/**\n * Recall-side filter: returns true when the candidate should be excluded\n * from recall because it has been temporally superseded. When\n * `includeInRecall` is true, this always returns false (the fact is kept),\n * matching the audit/history opt-in described in the config.\n */\nexport function shouldFilterSupersededFromRecall(\n frontmatter: MemoryFrontmatter,\n options: { enabled: boolean; includeInRecall: boolean },\n): boolean {\n if (!options.enabled) return false;\n if (options.includeInRecall) return false;\n return frontmatter.status === \"superseded\";\n}\n"],"mappings":";;;;;;;;AAkCO,SAAS,yBAAyB,KAAqB;AAC5D,SAAO,IACJ,KAAK,EACL,YAAY,EACZ,QAAQ,YAAY,GAAG,EAIvB,QAAQ,UAAU,EAAE;AACzB;AAYO,SAAS,uBACd,WACA,eACe;AACf,MAAI,CAAC,aAA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Q,QAAS,QAAO;AAC7B,MAAI,QAAQ,gBAAiB,QAAO;AACpC,SAAO,YAAY,WAAW;AAChC;","names":[]}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
gatewayTaskChainOptions
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-KGIGRNR6.js";
|
|
4
4
|
import {
|
|
5
5
|
extractJsonCandidates
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-RGMVMVMF.js";
|
|
7
7
|
import {
|
|
8
8
|
normalizeProcedureSteps
|
|
9
9
|
} from "./chunk-QDW3E4RD.js";
|
|
@@ -486,4 +486,4 @@ export {
|
|
|
486
486
|
createVerdictCache,
|
|
487
487
|
createDeferCountMap
|
|
488
488
|
};
|
|
489
|
-
//# sourceMappingURL=chunk-
|
|
489
|
+
//# sourceMappingURL=chunk-Z3CCEP6F.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
StorageManager
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PJGB7XRR.js";
|
|
4
4
|
|
|
5
5
|
// src/semantic-rule-promotion.ts
|
|
6
6
|
import { createHash, randomUUID } from "crypto";
|
|
@@ -529,4 +529,4 @@ export {
|
|
|
529
529
|
setSemanticRulePromotionTestHooks,
|
|
530
530
|
promoteSemanticRuleFromMemory
|
|
531
531
|
};
|
|
532
|
-
//# sourceMappingURL=chunk-
|
|
532
|
+
//# sourceMappingURL=chunk-ZZPIJPPD.js.map
|
package/dist/chunking.js
CHANGED
package/dist/cli.js
CHANGED
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
runWorkProductStatusCliCommand,
|
|
90
90
|
runWorkProjectCliCommand,
|
|
91
91
|
runWorkTaskCliCommand
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-7TPH6UZL.js";
|
|
93
93
|
import "./chunk-MC4FJXPA.js";
|
|
94
94
|
import "./chunk-LQHDIS7L.js";
|
|
95
95
|
import "./chunk-7F7Z6MOS.js";
|
|
@@ -111,18 +111,18 @@ import "./chunk-PYIFUBRK.js";
|
|
|
111
111
|
import "./chunk-WMWVO45V.js";
|
|
112
112
|
import "./chunk-D6RIFG4O.js";
|
|
113
113
|
import "./chunk-JCK7V6SN.js";
|
|
114
|
-
import "./chunk-
|
|
115
|
-
import "./chunk-
|
|
114
|
+
import "./chunk-O4UNM6OR.js";
|
|
115
|
+
import "./chunk-GLWW3EJQ.js";
|
|
116
116
|
import "./chunk-KJTKLXTH.js";
|
|
117
117
|
import "./chunk-H2NCNXMS.js";
|
|
118
118
|
import "./chunk-PU44GBL4.js";
|
|
119
119
|
import "./chunk-YR6GIWWY.js";
|
|
120
|
-
import "./chunk-
|
|
120
|
+
import "./chunk-ZZPIJPPD.js";
|
|
121
121
|
import "./chunk-FH3PPO42.js";
|
|
122
122
|
import "./chunk-3QSU4NFF.js";
|
|
123
123
|
import "./chunk-TGQ2NTWH.js";
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
124
|
+
import "./chunk-FMGWXIES.js";
|
|
125
|
+
import "./chunk-AYHXQR53.js";
|
|
126
126
|
import "./chunk-3T74IZB3.js";
|
|
127
127
|
import "./chunk-HL4DB7TO.js";
|
|
128
128
|
import "./chunk-YNDLCWXS.js";
|
|
@@ -135,9 +135,9 @@ import "./chunk-2PRQG7PV.js";
|
|
|
135
135
|
import "./chunk-X6IRLNOO.js";
|
|
136
136
|
import "./chunk-2F6NP3NT.js";
|
|
137
137
|
import "./chunk-TERNBNJB.js";
|
|
138
|
-
import "./chunk-
|
|
138
|
+
import "./chunk-R3OQGYOU.js";
|
|
139
139
|
import "./chunk-W4RVMTHR.js";
|
|
140
|
-
import "./chunk-
|
|
140
|
+
import "./chunk-2UFQYU5F.js";
|
|
141
141
|
import "./chunk-ZRWB5D4H.js";
|
|
142
142
|
import "./chunk-A6D7A2FW.js";
|
|
143
143
|
import "./chunk-FF4KLI5W.js";
|
|
@@ -152,7 +152,7 @@ import "./chunk-CYEPCZN5.js";
|
|
|
152
152
|
import "./chunk-DCGT4FPP.js";
|
|
153
153
|
import "./chunk-Q4CAQGKQ.js";
|
|
154
154
|
import "./chunk-CINZGPSJ.js";
|
|
155
|
-
import "./chunk-
|
|
155
|
+
import "./chunk-W3BKVM64.js";
|
|
156
156
|
import "./chunk-ZFXCQPNO.js";
|
|
157
157
|
import "./chunk-Q6YIJGXJ.js";
|
|
158
158
|
import "./chunk-ORFGK3XI.js";
|
|
@@ -175,7 +175,7 @@ import "./chunk-3ONXXHQO.js";
|
|
|
175
175
|
import "./chunk-LMDRGRJ2.js";
|
|
176
176
|
import "./chunk-OKTXM5H4.js";
|
|
177
177
|
import "./chunk-3UXOZBHV.js";
|
|
178
|
-
import "./chunk-
|
|
178
|
+
import "./chunk-UQ7RN5HK.js";
|
|
179
179
|
import "./chunk-5GOMXHLC.js";
|
|
180
180
|
import "./chunk-PHK3HARR.js";
|
|
181
181
|
import "./chunk-Z5LAYHGJ.js";
|
|
@@ -183,7 +183,7 @@ import "./chunk-LBJBNWS2.js";
|
|
|
183
183
|
import "./chunk-HQ6NIBL6.js";
|
|
184
184
|
import "./chunk-PVGDJXVK.js";
|
|
185
185
|
import "./chunk-OADWQ5CR.js";
|
|
186
|
-
import "./chunk-
|
|
186
|
+
import "./chunk-FG76RDVI.js";
|
|
187
187
|
import "./chunk-SEDEKFYQ.js";
|
|
188
188
|
import "./chunk-2QSZNTDO.js";
|
|
189
189
|
import "./chunk-RSUYKGGZ.js";
|
|
@@ -191,10 +191,10 @@ import "./chunk-42NQ7AVG.js";
|
|
|
191
191
|
import "./chunk-TMSXWOBZ.js";
|
|
192
192
|
import "./chunk-J64TK33U.js";
|
|
193
193
|
import "./chunk-7RXCMVFQ.js";
|
|
194
|
-
import "./chunk-
|
|
194
|
+
import "./chunk-I6UCUHLK.js";
|
|
195
195
|
import "./chunk-6L46YAEZ.js";
|
|
196
196
|
import "./chunk-D24OXEPB.js";
|
|
197
|
-
import "./chunk-
|
|
197
|
+
import "./chunk-KQFQ3IS5.js";
|
|
198
198
|
import "./chunk-GDASG7NC.js";
|
|
199
199
|
import "./chunk-GDB4J2H3.js";
|
|
200
200
|
import "./chunk-DGNQRNLL.js";
|
|
@@ -202,7 +202,7 @@ import "./chunk-PSUB67YB.js";
|
|
|
202
202
|
import "./chunk-SOBJ6NEY.js";
|
|
203
203
|
import "./chunk-BT7NVCML.js";
|
|
204
204
|
import "./chunk-H7XKCNR6.js";
|
|
205
|
-
import "./chunk-
|
|
205
|
+
import "./chunk-GYTVOLNX.js";
|
|
206
206
|
import "./chunk-EDQVAMQI.js";
|
|
207
207
|
import "./chunk-JGSKJHF7.js";
|
|
208
208
|
import "./chunk-BPSGLMQ4.js";
|
|
@@ -215,15 +215,15 @@ import "./chunk-EI6V5UXY.js";
|
|
|
215
215
|
import "./chunk-QY7YA7OL.js";
|
|
216
216
|
import "./chunk-NNVTUXEB.js";
|
|
217
217
|
import "./chunk-QDW3E4RD.js";
|
|
218
|
-
import "./chunk-
|
|
218
|
+
import "./chunk-H3PHZLMF.js";
|
|
219
219
|
import "./chunk-ODPLEWB6.js";
|
|
220
220
|
import "./chunk-XL7FK7PJ.js";
|
|
221
221
|
import "./chunk-2LSZVONP.js";
|
|
222
222
|
import "./chunk-DEUNUKTD.js";
|
|
223
|
-
import "./chunk-
|
|
224
|
-
import "./chunk-
|
|
223
|
+
import "./chunk-OZXVGYGZ.js";
|
|
224
|
+
import "./chunk-PJGB7XRR.js";
|
|
225
225
|
import "./chunk-5UZXUTVO.js";
|
|
226
|
-
import "./chunk-
|
|
226
|
+
import "./chunk-J6A3CX5N.js";
|
|
227
227
|
import "./chunk-4R4KTDIE.js";
|
|
228
228
|
import "./chunk-RULE4VG5.js";
|
|
229
229
|
import "./chunk-SCU65EZI.js";
|
|
@@ -231,7 +231,7 @@ import "./chunk-MB5RSUW6.js";
|
|
|
231
231
|
import "./chunk-6KYMPV2O.js";
|
|
232
232
|
import "./chunk-CPPS65WS.js";
|
|
233
233
|
import "./chunk-DM2T26WE.js";
|
|
234
|
-
import "./chunk-
|
|
234
|
+
import "./chunk-LDXUBPMO.js";
|
|
235
235
|
import "./chunk-FVQJYWH7.js";
|
|
236
236
|
import "./chunk-G7D6GZ5J.js";
|
|
237
237
|
import "./chunk-ALEPI75L.js";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CompoundingEngine,
|
|
3
3
|
defaultTierMigrationCycleBudget
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-2L54V4ZO.js";
|
|
5
5
|
import "../chunk-DRD2Q7HQ.js";
|
|
6
|
-
import "../chunk-
|
|
6
|
+
import "../chunk-PJGB7XRR.js";
|
|
7
7
|
import "../chunk-5UZXUTVO.js";
|
|
8
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-J6A3CX5N.js";
|
|
9
9
|
import "../chunk-4R4KTDIE.js";
|
|
10
10
|
import "../chunk-RULE4VG5.js";
|
|
11
11
|
import "../chunk-SCU65EZI.js";
|
|
@@ -13,7 +13,7 @@ import "../chunk-MB5RSUW6.js";
|
|
|
13
13
|
import "../chunk-6KYMPV2O.js";
|
|
14
14
|
import "../chunk-CPPS65WS.js";
|
|
15
15
|
import "../chunk-DM2T26WE.js";
|
|
16
|
-
import "../chunk-
|
|
16
|
+
import "../chunk-LDXUBPMO.js";
|
|
17
17
|
import "../chunk-FVQJYWH7.js";
|
|
18
18
|
import "../chunk-G7D6GZ5J.js";
|
|
19
19
|
import "../chunk-ALEPI75L.js";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runCodexMaterialize,
|
|
3
3
|
runPostConsolidationMaterialize
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-UGEBPVNI.js";
|
|
5
|
+
import "../chunk-LN4YGHTM.js";
|
|
6
6
|
import "../chunk-3UXOZBHV.js";
|
|
7
|
-
import "../chunk-
|
|
7
|
+
import "../chunk-PJGB7XRR.js";
|
|
8
8
|
import "../chunk-5UZXUTVO.js";
|
|
9
|
-
import "../chunk-
|
|
9
|
+
import "../chunk-J6A3CX5N.js";
|
|
10
10
|
import "../chunk-4R4KTDIE.js";
|
|
11
11
|
import "../chunk-RULE4VG5.js";
|
|
12
12
|
import "../chunk-SCU65EZI.js";
|
|
@@ -14,7 +14,7 @@ import "../chunk-MB5RSUW6.js";
|
|
|
14
14
|
import "../chunk-6KYMPV2O.js";
|
|
15
15
|
import "../chunk-CPPS65WS.js";
|
|
16
16
|
import "../chunk-DM2T26WE.js";
|
|
17
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-LDXUBPMO.js";
|
|
18
18
|
import "../chunk-FVQJYWH7.js";
|
|
19
19
|
import "../chunk-G7D6GZ5J.js";
|
|
20
20
|
import "../chunk-ALEPI75L.js";
|
package/dist/connectors/index.js
CHANGED
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
import "../chunk-G56P5RLD.js";
|
|
28
28
|
import {
|
|
29
29
|
runCodexMaterialize
|
|
30
|
-
} from "../chunk-
|
|
30
|
+
} from "../chunk-UGEBPVNI.js";
|
|
31
31
|
import {
|
|
32
32
|
MATERIALIZE_VERSION,
|
|
33
33
|
SENTINEL_FILE,
|
|
@@ -42,15 +42,15 @@ import {
|
|
|
42
42
|
renderRolloutSummary,
|
|
43
43
|
truncateToTokenBudget,
|
|
44
44
|
validateMemoryMd
|
|
45
|
-
} from "../chunk-
|
|
45
|
+
} from "../chunk-LN4YGHTM.js";
|
|
46
46
|
import "../chunk-3UXOZBHV.js";
|
|
47
47
|
import {
|
|
48
48
|
coerceInstallExtension
|
|
49
49
|
} from "../chunk-PHK3HARR.js";
|
|
50
50
|
import "../chunk-NNVTUXEB.js";
|
|
51
|
-
import "../chunk-
|
|
51
|
+
import "../chunk-PJGB7XRR.js";
|
|
52
52
|
import "../chunk-5UZXUTVO.js";
|
|
53
|
-
import "../chunk-
|
|
53
|
+
import "../chunk-J6A3CX5N.js";
|
|
54
54
|
import "../chunk-4R4KTDIE.js";
|
|
55
55
|
import "../chunk-RULE4VG5.js";
|
|
56
56
|
import "../chunk-SCU65EZI.js";
|
|
@@ -58,7 +58,7 @@ import "../chunk-MB5RSUW6.js";
|
|
|
58
58
|
import "../chunk-6KYMPV2O.js";
|
|
59
59
|
import "../chunk-CPPS65WS.js";
|
|
60
60
|
import "../chunk-DM2T26WE.js";
|
|
61
|
-
import "../chunk-
|
|
61
|
+
import "../chunk-LDXUBPMO.js";
|
|
62
62
|
import "../chunk-FVQJYWH7.js";
|
|
63
63
|
import "../chunk-G7D6GZ5J.js";
|
|
64
64
|
import "../chunk-ALEPI75L.js";
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
judgeContradictionPairs,
|
|
7
7
|
runContradictionScan,
|
|
8
8
|
verdictCacheSize
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-C3IW2F5Z.js";
|
|
10
10
|
import {
|
|
11
11
|
executeResolution,
|
|
12
12
|
isValidResolutionVerb
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
writePair,
|
|
21
21
|
writePairs
|
|
22
22
|
} from "../chunk-35NN3ZFA.js";
|
|
23
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-RGMVMVMF.js";
|
|
24
24
|
import "../chunk-2ODBA7MQ.js";
|
|
25
25
|
import "../chunk-PZ5AY32C.js";
|
|
26
26
|
export {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ACTIVE_STATUSES,
|
|
3
3
|
runContradictionScan
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-C3IW2F5Z.js";
|
|
5
5
|
import "./chunk-35NN3ZFA.js";
|
|
6
|
-
import "./chunk-
|
|
6
|
+
import "./chunk-RGMVMVMF.js";
|
|
7
7
|
import "./chunk-2ODBA7MQ.js";
|
|
8
8
|
import "./chunk-PZ5AY32C.js";
|
|
9
9
|
export {
|
|
10
10
|
ACTIVE_STATUSES,
|
|
11
11
|
runContradictionScan
|
|
12
12
|
};
|
|
13
|
-
//# sourceMappingURL=contradiction-scan-
|
|
13
|
+
//# sourceMappingURL=contradiction-scan-AZTGFMPY.js.map
|
package/dist/entity-retrieval.js
CHANGED
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
entityIndexVersion,
|
|
4
4
|
entityRecentTranscriptLookbackHours,
|
|
5
5
|
readRecentEntityTranscriptEntries
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-BNW5NJJH.js";
|
|
7
7
|
import "./chunk-BEUDU7Y4.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-PJGB7XRR.js";
|
|
9
9
|
import "./chunk-5UZXUTVO.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-J6A3CX5N.js";
|
|
11
11
|
import "./chunk-4R4KTDIE.js";
|
|
12
12
|
import "./chunk-RULE4VG5.js";
|
|
13
13
|
import "./chunk-SCU65EZI.js";
|
|
@@ -15,7 +15,7 @@ import "./chunk-MB5RSUW6.js";
|
|
|
15
15
|
import "./chunk-6KYMPV2O.js";
|
|
16
16
|
import "./chunk-CPPS65WS.js";
|
|
17
17
|
import "./chunk-DM2T26WE.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-LDXUBPMO.js";
|
|
19
19
|
import "./chunk-FVQJYWH7.js";
|
|
20
20
|
import "./chunk-G7D6GZ5J.js";
|
|
21
21
|
import "./chunk-ALEPI75L.js";
|
package/dist/explicit-capture.js
CHANGED
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
shouldSkipImplicitExtraction,
|
|
8
8
|
stripInlineExplicitCaptureNotes,
|
|
9
9
|
validateExplicitCaptureInput
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-H3PHZLMF.js";
|
|
11
11
|
import "./chunk-FVQJYWH7.js";
|
|
12
12
|
import "./chunk-U3PN77QT.js";
|
|
13
13
|
import "./chunk-PZ5AY32C.js";
|
package/dist/extraction-judge.js
CHANGED
|
@@ -9,12 +9,12 @@ import {
|
|
|
9
9
|
normalizeCachedVerdict,
|
|
10
10
|
validateProcedureExtraction,
|
|
11
11
|
verdictCacheSize
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
12
|
+
} from "./chunk-Z3CCEP6F.js";
|
|
13
|
+
import "./chunk-KGIGRNR6.js";
|
|
14
14
|
import "./chunk-B5XMS73R.js";
|
|
15
15
|
import "./chunk-7SI52C65.js";
|
|
16
16
|
import "./chunk-L2EXJQJP.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-RGMVMVMF.js";
|
|
18
18
|
import "./chunk-RK6F44Y6.js";
|
|
19
19
|
import "./chunk-QDW3E4RD.js";
|
|
20
20
|
import "./chunk-EYIEWJNI.js";
|
package/dist/extraction.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ExtractionEngine
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-MON3LMO7.js";
|
|
4
4
|
import "./chunk-4RA3C3EV.js";
|
|
5
5
|
import "./chunk-ROZJACKP.js";
|
|
6
6
|
import "./chunk-54V4BZWP.js";
|
|
@@ -9,11 +9,11 @@ import "./chunk-77NAFXUD.js";
|
|
|
9
9
|
import "./chunk-WLEB7WCG.js";
|
|
10
10
|
import "./chunk-VEWZZM3H.js";
|
|
11
11
|
import "./chunk-JLNBQWZ2.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-KGIGRNR6.js";
|
|
13
13
|
import "./chunk-B5XMS73R.js";
|
|
14
14
|
import "./chunk-7SI52C65.js";
|
|
15
15
|
import "./chunk-L2EXJQJP.js";
|
|
16
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-RGMVMVMF.js";
|
|
17
17
|
import "./chunk-RK6F44Y6.js";
|
|
18
18
|
import "./chunk-EI6V5UXY.js";
|
|
19
19
|
import "./chunk-QY7YA7OL.js";
|
package/dist/fallback-llm.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
FallbackLlmClient,
|
|
3
3
|
fallbackLlmRuntimeContextFromConfig,
|
|
4
4
|
gatewayTaskChainOptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-KGIGRNR6.js";
|
|
6
6
|
import "./chunk-B5XMS73R.js";
|
|
7
7
|
import "./chunk-7SI52C65.js";
|
|
8
8
|
import "./chunk-L2EXJQJP.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-RGMVMVMF.js";
|
|
10
10
|
import "./chunk-RK6F44Y6.js";
|
|
11
11
|
import "./chunk-EYIEWJNI.js";
|
|
12
12
|
import "./chunk-JUC24CTX.js";
|