@remnic/core 9.3.650 → 9.3.651

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.
Files changed (154) hide show
  1. package/dist/access-cli.js +35 -34
  2. package/dist/access-cli.js.map +1 -1
  3. package/dist/access-http.js +15 -15
  4. package/dist/access-mcp.js +14 -14
  5. package/dist/access-schema.js +3 -3
  6. package/dist/access-service.js +12 -12
  7. package/dist/{auto-sync-54QQHOG5.js → auto-sync-5CJBJMPZ.js} +5 -5
  8. package/dist/briefing.js +3 -3
  9. package/dist/calibration.js +2 -2
  10. package/dist/{capsule-crypto-GWVG7LGC.js → capsule-crypto-7FJQINUR.js} +2 -2
  11. package/dist/causal-consolidation.js +6 -6
  12. package/dist/{chunk-OWHERGF2.js → chunk-2NLLXCJG.js} +2 -2
  13. package/dist/{chunk-OAZ5MFUB.js → chunk-3XGWCZ63.js} +45 -28
  14. package/dist/chunk-3XGWCZ63.js.map +1 -0
  15. package/dist/{chunk-QKE4LHNR.js → chunk-4HYSMH7D.js} +2 -2
  16. package/dist/{chunk-NMIOW7XG.js → chunk-4PTKFBST.js} +2 -2
  17. package/dist/{chunk-DDRNDPX4.js → chunk-4SKKVWLQ.js} +2 -2
  18. package/dist/chunk-5FOCXX5E.js +34 -0
  19. package/dist/chunk-5FOCXX5E.js.map +1 -0
  20. package/dist/{chunk-23RYLGYA.js → chunk-5WSDHTBO.js} +100 -111
  21. package/dist/chunk-5WSDHTBO.js.map +1 -0
  22. package/dist/{chunk-WPCCNSWO.js → chunk-6UKL6IXM.js} +4 -4
  23. package/dist/{chunk-DB5A3NHS.js → chunk-7LWRCOP7.js} +9 -2
  24. package/dist/chunk-7LWRCOP7.js.map +1 -0
  25. package/dist/{chunk-APJQ6UEA.js → chunk-AGNBY3VG.js} +4 -4
  26. package/dist/{chunk-4BISW7RX.js → chunk-AJE7FJVE.js} +2 -2
  27. package/dist/{chunk-ZXWAQFDE.js → chunk-CFOCZPIQ.js} +2 -2
  28. package/dist/{chunk-NT5TINK5.js → chunk-DHGSZ3UD.js} +2 -2
  29. package/dist/{chunk-OTC2KOZ2.js → chunk-EHQLDFSH.js} +2 -2
  30. package/dist/{chunk-AMACWKM4.js → chunk-IJHLC5CH.js} +2 -2
  31. package/dist/{chunk-OR7R6M5Z.js → chunk-IVYSVAC6.js} +2 -2
  32. package/dist/{chunk-UMKPSD35.js → chunk-JF7SFXTG.js} +2 -2
  33. package/dist/{chunk-MCYT2RNT.js → chunk-KJDKZVF3.js} +3 -3
  34. package/dist/{chunk-BUKK5SWA.js → chunk-KQAFEZQX.js} +2 -2
  35. package/dist/{chunk-PQFUUXWK.js → chunk-KWM33SPU.js} +2 -2
  36. package/dist/{chunk-A3BS64GV.js → chunk-LCC5EZTT.js} +4 -4
  37. package/dist/{chunk-ZT6R3WR3.js → chunk-LFTLXOFX.js} +4 -4
  38. package/dist/{chunk-3IJEQWQX.js → chunk-MF32AL7N.js} +4 -4
  39. package/dist/{chunk-D6WVJIS3.js → chunk-ORGWWNJG.js} +2 -2
  40. package/dist/{chunk-Z3PZRDLW.js → chunk-PRQXUSQV.js} +2 -2
  41. package/dist/{chunk-VWT3F4IV.js → chunk-PS3SYNHP.js} +12 -4
  42. package/dist/chunk-PS3SYNHP.js.map +1 -0
  43. package/dist/{chunk-IMWFHBG2.js → chunk-QWRC7GIO.js} +2 -2
  44. package/dist/{chunk-TUMH6EDV.js → chunk-RKN5J4RO.js} +26 -26
  45. package/dist/{chunk-TVOPSKOK.js → chunk-RSS2KWN6.js} +4 -4
  46. package/dist/{chunk-U3GQ33JC.js → chunk-SLTKP5WJ.js} +2 -2
  47. package/dist/{chunk-YAFSTKTH.js → chunk-SLYD3AH4.js} +10 -10
  48. package/dist/{chunk-6NKAQ74D.js → chunk-UU6MVCJ6.js} +1 -1
  49. package/dist/chunk-UU6MVCJ6.js.map +1 -0
  50. package/dist/{chunk-WEPMT6SC.js → chunk-V25ZAOSB.js} +5 -5
  51. package/dist/{chunk-UMTG2BN2.js → chunk-V4UDXYGG.js} +2 -2
  52. package/dist/{chunk-RRRCNIPK.js → chunk-WJK75OCH.js} +4 -4
  53. package/dist/{chunk-UVYI6VIX.js → chunk-X7Y7WX73.js} +1 -1
  54. package/dist/{chunk-OZKZ2TRP.js → chunk-XBIACVCO.js} +9 -2
  55. package/dist/chunk-XBIACVCO.js.map +1 -0
  56. package/dist/{chunk-ALUZN7BE.js → chunk-XMN6MMTU.js} +2 -2
  57. package/dist/{chunk-A4BTPHIN.js → chunk-Y7NWBBHV.js} +6 -6
  58. package/dist/{chunk-M75TBFKQ.js → chunk-Z2OXSMZK.js} +2 -2
  59. package/dist/cli.js +30 -30
  60. package/dist/compounding/engine.js +3 -3
  61. package/dist/connectors/codex-materialize-runner.js +3 -3
  62. package/dist/connectors/index.js +3 -3
  63. package/dist/entity-retrieval.js +3 -3
  64. package/dist/event-order-recall.js +1 -1
  65. package/dist/explicit-cue-recall.d.ts +7 -0
  66. package/dist/explicit-cue-recall.js +2 -1
  67. package/dist/extraction-judge.js +3 -3
  68. package/dist/extraction.js +3 -3
  69. package/dist/fallback-llm.js +2 -2
  70. package/dist/focused-list-recall.d.ts +6 -0
  71. package/dist/focused-list-recall.js +2 -1
  72. package/dist/index.js +83 -82
  73. package/dist/index.js.map +1 -1
  74. package/dist/lcm/engine.js +2 -2
  75. package/dist/lcm/index.js +5 -5
  76. package/dist/lcm-fallback-read.d.ts +71 -0
  77. package/dist/lcm-fallback-read.js +10 -0
  78. package/dist/lcm-fallback-read.js.map +1 -0
  79. package/dist/maintenance/memory-governance.js +3 -3
  80. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +3 -3
  81. package/dist/maintenance/rebuild-memory-projection.js +4 -4
  82. package/dist/namespaces/migrate.js +7 -7
  83. package/dist/namespaces/search.js +3 -3
  84. package/dist/namespaces/storage.js +3 -3
  85. package/dist/operator-toolkit.js +9 -9
  86. package/dist/orchestrator.js +29 -28
  87. package/dist/recall-planner-llm.js +2 -2
  88. package/dist/response-guidance-recall.d.ts +6 -0
  89. package/dist/response-guidance-recall.js +2 -1
  90. package/dist/schemas.d.ts +22 -22
  91. package/dist/search/factory.js +2 -2
  92. package/dist/search/index.js +4 -4
  93. package/dist/semantic-consolidation.js +4 -4
  94. package/dist/semantic-rule-promotion.js +3 -3
  95. package/dist/semantic-rule-verifier.js +3 -3
  96. package/dist/storage.js +2 -2
  97. package/dist/summarizer.js +3 -3
  98. package/dist/targeted-fact-recall.d.ts +6 -0
  99. package/dist/targeted-fact-recall.js +2 -1
  100. package/dist/transfer/backup.js +2 -2
  101. package/dist/transfer/capsule-export.js +2 -2
  102. package/dist/transfer/capsule-import.js +2 -2
  103. package/dist/transfer/import-sqlite.js +2 -2
  104. package/dist/transfer/types.d.ts +12 -12
  105. package/dist/verified-recall.js +3 -3
  106. package/package.json +1 -1
  107. package/src/event-order-recall.ts +8 -0
  108. package/src/explicit-cue-recall.ts +70 -29
  109. package/src/focused-list-recall.ts +23 -1
  110. package/src/lcm-fallback-read.ts +113 -0
  111. package/src/orchestrator.ts +168 -121
  112. package/src/response-guidance-recall.ts +21 -1
  113. package/src/targeted-fact-recall.ts +24 -3
  114. package/dist/chunk-23RYLGYA.js.map +0 -1
  115. package/dist/chunk-6NKAQ74D.js.map +0 -1
  116. package/dist/chunk-DB5A3NHS.js.map +0 -1
  117. package/dist/chunk-OAZ5MFUB.js.map +0 -1
  118. package/dist/chunk-OZKZ2TRP.js.map +0 -1
  119. package/dist/chunk-VWT3F4IV.js.map +0 -1
  120. /package/dist/{auto-sync-54QQHOG5.js.map → auto-sync-5CJBJMPZ.js.map} +0 -0
  121. /package/dist/{capsule-crypto-GWVG7LGC.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
  122. /package/dist/{chunk-OWHERGF2.js.map → chunk-2NLLXCJG.js.map} +0 -0
  123. /package/dist/{chunk-QKE4LHNR.js.map → chunk-4HYSMH7D.js.map} +0 -0
  124. /package/dist/{chunk-NMIOW7XG.js.map → chunk-4PTKFBST.js.map} +0 -0
  125. /package/dist/{chunk-DDRNDPX4.js.map → chunk-4SKKVWLQ.js.map} +0 -0
  126. /package/dist/{chunk-WPCCNSWO.js.map → chunk-6UKL6IXM.js.map} +0 -0
  127. /package/dist/{chunk-APJQ6UEA.js.map → chunk-AGNBY3VG.js.map} +0 -0
  128. /package/dist/{chunk-4BISW7RX.js.map → chunk-AJE7FJVE.js.map} +0 -0
  129. /package/dist/{chunk-ZXWAQFDE.js.map → chunk-CFOCZPIQ.js.map} +0 -0
  130. /package/dist/{chunk-NT5TINK5.js.map → chunk-DHGSZ3UD.js.map} +0 -0
  131. /package/dist/{chunk-OTC2KOZ2.js.map → chunk-EHQLDFSH.js.map} +0 -0
  132. /package/dist/{chunk-AMACWKM4.js.map → chunk-IJHLC5CH.js.map} +0 -0
  133. /package/dist/{chunk-OR7R6M5Z.js.map → chunk-IVYSVAC6.js.map} +0 -0
  134. /package/dist/{chunk-UMKPSD35.js.map → chunk-JF7SFXTG.js.map} +0 -0
  135. /package/dist/{chunk-MCYT2RNT.js.map → chunk-KJDKZVF3.js.map} +0 -0
  136. /package/dist/{chunk-BUKK5SWA.js.map → chunk-KQAFEZQX.js.map} +0 -0
  137. /package/dist/{chunk-PQFUUXWK.js.map → chunk-KWM33SPU.js.map} +0 -0
  138. /package/dist/{chunk-A3BS64GV.js.map → chunk-LCC5EZTT.js.map} +0 -0
  139. /package/dist/{chunk-ZT6R3WR3.js.map → chunk-LFTLXOFX.js.map} +0 -0
  140. /package/dist/{chunk-3IJEQWQX.js.map → chunk-MF32AL7N.js.map} +0 -0
  141. /package/dist/{chunk-D6WVJIS3.js.map → chunk-ORGWWNJG.js.map} +0 -0
  142. /package/dist/{chunk-Z3PZRDLW.js.map → chunk-PRQXUSQV.js.map} +0 -0
  143. /package/dist/{chunk-IMWFHBG2.js.map → chunk-QWRC7GIO.js.map} +0 -0
  144. /package/dist/{chunk-TUMH6EDV.js.map → chunk-RKN5J4RO.js.map} +0 -0
  145. /package/dist/{chunk-TVOPSKOK.js.map → chunk-RSS2KWN6.js.map} +0 -0
  146. /package/dist/{chunk-U3GQ33JC.js.map → chunk-SLTKP5WJ.js.map} +0 -0
  147. /package/dist/{chunk-YAFSTKTH.js.map → chunk-SLYD3AH4.js.map} +0 -0
  148. /package/dist/{chunk-WEPMT6SC.js.map → chunk-V25ZAOSB.js.map} +0 -0
  149. /package/dist/{chunk-UMTG2BN2.js.map → chunk-V4UDXYGG.js.map} +0 -0
  150. /package/dist/{chunk-RRRCNIPK.js.map → chunk-WJK75OCH.js.map} +0 -0
  151. /package/dist/{chunk-UVYI6VIX.js.map → chunk-X7Y7WX73.js.map} +0 -0
  152. /package/dist/{chunk-ALUZN7BE.js.map → chunk-XMN6MMTU.js.map} +0 -0
  153. /package/dist/{chunk-A4BTPHIN.js.map → chunk-Y7NWBBHV.js.map} +0 -0
  154. /package/dist/{chunk-M75TBFKQ.js.map → chunk-Z2OXSMZK.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  isValidCapsuleSince
3
- } from "./chunk-BUKK5SWA.js";
3
+ } from "./chunk-KQAFEZQX.js";
4
4
  import {
5
5
  CAPSULE_ID_PATTERN
6
6
  } from "./chunk-WEHSQBFR.js";
@@ -432,4 +432,4 @@ export {
432
432
  actionConfidenceRequestSchema,
433
433
  validateRequest
434
434
  };
435
- //# sourceMappingURL=chunk-QKE4LHNR.js.map
435
+ //# sourceMappingURL=chunk-4HYSMH7D.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  createSearchBackend
3
- } from "./chunk-WPCCNSWO.js";
3
+ } from "./chunk-6UKL6IXM.js";
4
4
  import {
5
5
  namespaceIdentityToken,
6
6
  normalizeNamespaceIdentity
@@ -257,4 +257,4 @@ export {
257
257
  namespaceCollectionName,
258
258
  NamespaceSearchRouter
259
259
  };
260
- //# sourceMappingURL=chunk-NMIOW7XG.js.map
260
+ //# sourceMappingURL=chunk-4PTKFBST.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getVerdictKind
3
- } from "./chunk-M75TBFKQ.js";
3
+ } from "./chunk-Z2OXSMZK.js";
4
4
  import {
5
5
  scoreImportance
6
6
  } from "./chunk-JXS5PDQ7.js";
@@ -1161,4 +1161,4 @@ export {
1161
1161
  syncWearableSource,
1162
1162
  defaultTimezone
1163
1163
  };
1164
- //# sourceMappingURL=chunk-DDRNDPX4.js.map
1164
+ //# sourceMappingURL=chunk-4SKKVWLQ.js.map
@@ -0,0 +1,34 @@
1
+ // src/lcm-fallback-read.ts
2
+ var UNDEFINED_SESSION_SENTINEL = " <lcm-sessionless>";
3
+ function resolveLcmReadSessionIds(target) {
4
+ const source = target.sessionIds && target.sessionIds.length > 0 ? target.sessionIds : [target.sessionId];
5
+ const seen = /* @__PURE__ */ new Set();
6
+ const out = [];
7
+ for (const sessionId of source) {
8
+ const key = sessionId === void 0 ? UNDEFINED_SESSION_SENTINEL : sessionId;
9
+ if (seen.has(key)) continue;
10
+ seen.add(key);
11
+ out.push(sessionId);
12
+ }
13
+ return out.length > 0 ? out : [target.sessionId];
14
+ }
15
+ async function gatherAcrossReadSessions(sessionIds, gather) {
16
+ if (sessionIds.length <= 1) {
17
+ for (const sessionId of sessionIds) {
18
+ await gather(sessionId);
19
+ }
20
+ return;
21
+ }
22
+ for (const sessionId of sessionIds) {
23
+ try {
24
+ await gather(sessionId);
25
+ } catch {
26
+ }
27
+ }
28
+ }
29
+
30
+ export {
31
+ resolveLcmReadSessionIds,
32
+ gatherAcrossReadSessions
33
+ };
34
+ //# sourceMappingURL=chunk-5FOCXX5E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/lcm-fallback-read.ts"],"sourcesContent":["/**\n * Shared helper for reading LCM-backed recall sections across the ordered,\n * read-authorized fallback key set (#1505 codex P2 \"Merge LCM fallback reads\n * instead of short-circuiting\").\n *\n * Background: a branch-scoped session archives its LCM rows under whichever\n * coding-overlay namespace was effective at write time, so its evidence can be\n * split across the primary overlay key AND the project / root fallback keys.\n * Normal QMD/file recall already searches the primary namespace PLUS\n * `codingOverlay.readFallbacks` and MERGES the rows. The LCM read path must do\n * the same: query EVERY authorized read key and merge the candidate evidence\n * into each section's existing dedupe + rank + budget pass, instead of stopping\n * at the first key that happens to yield a (possibly weak) hit.\n *\n * Each section already owns a section-appropriate dedupe (a `seen` set or a\n * `rankAndDedupe…` step), so the fan-out only needs to resolve the ordered,\n * deduped read-key set and UNION the per-key candidates into that existing\n * pipeline — the budget is then applied exactly once to the union. Centralizing\n * the key-set resolution here (rather than re-implementing per builder) follows\n * CLAUDE.md rule 22 (scope resolution must be deduplicated).\n */\n\n/** A recall section's LCM read target: either a single key or an ordered set. */\nexport interface LcmReadSessionTarget {\n /**\n * The single LCM read `session_id` (pre-#1505 behavior). `undefined` means a\n * sessionless, archive-wide read with no `session_id` filter.\n */\n sessionId?: string;\n /**\n * The ordered, read-authorized LCM read key set (primary overlay key first,\n * then project / root fallbacks) the orchestrator derived from the same\n * readable namespace set normal recall searches. When present and non-empty,\n * it supersedes `sessionId`.\n */\n sessionIds?: readonly (string | undefined)[];\n}\n\n// `undefined` (a sessionless, archive-wide read) is a distinct, legitimate read\n// target, so it needs a non-string sentinel in the dedupe set. A leading space\n// keeps it disjoint from every real session key / namespaced LCM key (which are\n// `[A-Za-z0-9._-]` plus the U+001F namespace sentinel, never leading-space).\nconst UNDEFINED_SESSION_SENTINEL = \" <lcm-sessionless>\";\n\n/**\n * Resolve the ordered, deduped set of LCM read `session_id`s a recall section\n * must query.\n *\n * When `sessionIds` is provided (the #1505 fallback unification), it is used\n * verbatim, deduped while preserving first-seen order so the caller queries\n * keys in priority order (primary overlay → fallbacks) without re-querying an\n * identical key (e.g. when two namespaces both collapse to the default store).\n * Otherwise the section reads under the single `sessionId`, so the result is\n * `[sessionId]` — byte-for-byte the pre-#1505 single-key behavior, including a\n * single `undefined` for a sessionless archive-wide read.\n */\nexport function resolveLcmReadSessionIds(\n target: LcmReadSessionTarget,\n): Array<string | undefined> {\n const source =\n target.sessionIds && target.sessionIds.length > 0\n ? target.sessionIds\n : [target.sessionId];\n const seen = new Set<string>();\n const out: Array<string | undefined> = [];\n for (const sessionId of source) {\n const key = sessionId === undefined ? UNDEFINED_SESSION_SENTINEL : sessionId;\n if (seen.has(key)) continue;\n seen.add(key);\n out.push(sessionId);\n }\n // Defensive: an all-empty `sessionIds` still collapses to the single-key path.\n return out.length > 0 ? out : [target.sessionId];\n}\n\n/**\n * Run a per-key LCM `gather` across the resolved read-key set with FAULT\n * ISOLATION across keys (#1505 codex P2 review follow-up).\n *\n * A recall section that reads every key in a bare `for…await` loop loses the\n * WHOLE section if any one key throws (e.g. a `SqliteError` from a corrupt or\n * locked fallback index) — even when the primary overlay key already gathered\n * evidence. The pre-#1505 first-non-empty read never had this problem: it\n * returned the primary key's non-empty result without ever touching a failing\n * fallback. This helper restores that resilience for the merged path: when more\n * than one key is read, a per-key failure is contained so the other keys'\n * evidence survives (best-effort recall — a total failure degrades to an empty\n * section, which the orchestrator already treats as \"no evidence\").\n *\n * SINGLE-KEY is byte-for-byte the pre-#1505 behavior: the gather runs directly,\n * so a failure PROPAGATES exactly as before (the caller / orchestrator catch\n * still logs it). Fault isolation only engages once there is a fallback key that\n * could fail independently of the primary.\n */\nexport async function gatherAcrossReadSessions(\n sessionIds: ReadonlyArray<string | undefined>,\n gather: (sessionId: string | undefined) => Promise<void>,\n): Promise<void> {\n if (sessionIds.length <= 1) {\n for (const sessionId of sessionIds) {\n await gather(sessionId);\n }\n return;\n }\n for (const sessionId of sessionIds) {\n try {\n await gather(sessionId);\n } catch {\n // One read key failed; keep the evidence already gathered from the other\n // keys instead of discarding the whole section.\n }\n }\n}\n"],"mappings":";AA0CA,IAAM,6BAA6B;AAc5B,SAAS,yBACd,QAC2B;AAC3B,QAAM,SACJ,OAAO,cAAc,OAAO,WAAW,SAAS,IAC5C,OAAO,aACP,CAAC,OAAO,SAAS;AACvB,QAAM,OAAO,oBAAI,IAAY;AAC7B,QAAM,MAAiC,CAAC;AACxC,aAAW,aAAa,QAAQ;AAC9B,UAAM,MAAM,cAAc,SAAY,6BAA6B;AACnE,QAAI,KAAK,IAAI,GAAG,EAAG;AACnB,SAAK,IAAI,GAAG;AACZ,QAAI,KAAK,SAAS;AAAA,EACpB;AAEA,SAAO,IAAI,SAAS,IAAI,MAAM,CAAC,OAAO,SAAS;AACjD;AAqBA,eAAsB,yBACpB,YACA,QACe;AACf,MAAI,WAAW,UAAU,GAAG;AAC1B,eAAW,aAAa,YAAY;AAClC,YAAM,OAAO,SAAS;AAAA,IACxB;AACA;AAAA,EACF;AACA,aAAW,aAAa,YAAY;AAClC,QAAI;AACF,YAAM,OAAO,SAAS;AAAA,IACxB,QAAQ;AAAA,IAGR;AAAA,EACF;AACF;","names":[]}
@@ -4,7 +4,7 @@ import {
4
4
  loadSyncState,
5
5
  syncWearableSource,
6
6
  wearableSourceLabel
7
- } from "./chunk-DDRNDPX4.js";
7
+ } from "./chunk-4SKKVWLQ.js";
8
8
  import {
9
9
  migrateFromEngram
10
10
  } from "./chunk-7HYPN2GC.js";
@@ -19,7 +19,7 @@ import {
19
19
  } from "./chunk-666A3MOW.js";
20
20
  import {
21
21
  LcmEngine
22
- } from "./chunk-WEPMT6SC.js";
22
+ } from "./chunk-V25ZAOSB.js";
23
23
  import {
24
24
  chunkTranscriptEntries
25
25
  } from "./chunk-TECVW3JP.js";
@@ -29,7 +29,7 @@ import {
29
29
  import {
30
30
  CompoundingEngine,
31
31
  defaultTierMigrationCycleBudget
32
- } from "./chunk-Z3PZRDLW.js";
32
+ } from "./chunk-PRQXUSQV.js";
33
33
  import {
34
34
  SharedContextManager
35
35
  } from "./chunk-DRD2Q7HQ.js";
@@ -52,11 +52,11 @@ import {
52
52
  } from "./chunk-UHGBNIOS.js";
53
53
  import {
54
54
  HourlySummarizer
55
- } from "./chunk-IMWFHBG2.js";
55
+ } from "./chunk-QWRC7GIO.js";
56
56
  import {
57
57
  buildTargetedFactRecallSection,
58
58
  shouldRecallTargetedFactEvidence
59
- } from "./chunk-VWT3F4IV.js";
59
+ } from "./chunk-PS3SYNHP.js";
60
60
  import {
61
61
  applyTemporalSupersession,
62
62
  normalizeSupersessionKey,
@@ -71,7 +71,7 @@ import {
71
71
  import {
72
72
  buildResponseGuidanceRecallSection,
73
73
  shouldRecallResponseGuidance
74
- } from "./chunk-OZKZ2TRP.js";
74
+ } from "./chunk-XBIACVCO.js";
75
75
  import {
76
76
  mergeWithAgentResults,
77
77
  runDirectAgent,
@@ -154,10 +154,10 @@ import {
154
154
  getVerdictKind,
155
155
  judgeFactDurability,
156
156
  validateProcedureExtraction
157
- } from "./chunk-M75TBFKQ.js";
157
+ } from "./chunk-Z2OXSMZK.js";
158
158
  import {
159
159
  ExtractionEngine
160
- } from "./chunk-U3GQ33JC.js";
160
+ } from "./chunk-SLTKP5WJ.js";
161
161
  import {
162
162
  parseMemoryActionEligibilityContext
163
163
  } from "./chunk-ROZJACKP.js";
@@ -170,19 +170,19 @@ import {
170
170
  import {
171
171
  buildFocusedListRecallSection,
172
172
  shouldRecallFocusedListEvidence
173
- } from "./chunk-DB5A3NHS.js";
173
+ } from "./chunk-7LWRCOP7.js";
174
174
  import {
175
175
  buildEntityRecallSection,
176
176
  entityRecentTranscriptLookbackHours,
177
177
  readRecentEntityTranscriptEntries
178
- } from "./chunk-ALUZN7BE.js";
178
+ } from "./chunk-XMN6MMTU.js";
179
179
  import {
180
180
  buildEventOrderRecallSection,
181
181
  shouldRecallEventOrderEvidence
182
- } from "./chunk-6NKAQ74D.js";
182
+ } from "./chunk-UU6MVCJ6.js";
183
183
  import {
184
184
  buildExplicitCueRecallSection
185
- } from "./chunk-OAZ5MFUB.js";
185
+ } from "./chunk-3XGWCZ63.js";
186
186
  import {
187
187
  formatDaySummaryMemories
188
188
  } from "./chunk-WLEB7WCG.js";
@@ -210,7 +210,7 @@ import {
210
210
  materializeAfterSemanticConsolidation,
211
211
  parseConsolidationResponse,
212
212
  parseOperatorAwareConsolidationResponse
213
- } from "./chunk-ZXWAQFDE.js";
213
+ } from "./chunk-CFOCZPIQ.js";
214
214
  import {
215
215
  normalizeReplaySessionKey
216
216
  } from "./chunk-2PRQG7PV.js";
@@ -219,25 +219,25 @@ import {
219
219
  } from "./chunk-X6IRLNOO.js";
220
220
  import {
221
221
  searchVerifiedEpisodes
222
- } from "./chunk-UMKPSD35.js";
222
+ } from "./chunk-JF7SFXTG.js";
223
223
  import {
224
224
  ThreadingManager
225
225
  } from "./chunk-W4RVMTHR.js";
226
226
  import {
227
227
  searchVerifiedSemanticRules
228
- } from "./chunk-4BISW7RX.js";
228
+ } from "./chunk-AJE7FJVE.js";
229
229
  import {
230
230
  searchWorkProductLedgerEntries
231
231
  } from "./chunk-ZRWB5D4H.js";
232
232
  import {
233
233
  TranscriptManager
234
234
  } from "./chunk-AGRPGAKR.js";
235
- import {
236
- NamespaceStorageRouter
237
- } from "./chunk-D6WVJIS3.js";
238
235
  import {
239
236
  PolicyRuntimeManager
240
237
  } from "./chunk-33JBK2XP.js";
238
+ import {
239
+ NamespaceStorageRouter
240
+ } from "./chunk-ORGWWNJG.js";
241
241
  import {
242
242
  isAboveImportanceThreshold,
243
243
  scoreImportance
@@ -273,7 +273,7 @@ import {
273
273
  FallbackLlmClient,
274
274
  fallbackLlmRuntimeContextFromConfig,
275
275
  gatewayTaskChainOptions
276
- } from "./chunk-A3BS64GV.js";
276
+ } from "./chunk-LCC5EZTT.js";
277
277
  import {
278
278
  compileCorrectionRule,
279
279
  correctionsFilePath,
@@ -318,11 +318,11 @@ import {
318
318
  } from "./chunk-BEMWL2FZ.js";
319
319
  import {
320
320
  NamespaceSearchRouter
321
- } from "./chunk-NMIOW7XG.js";
321
+ } from "./chunk-4PTKFBST.js";
322
322
  import {
323
323
  createConversationIndexRuntime,
324
324
  createSearchBackend
325
- } from "./chunk-WPCCNSWO.js";
325
+ } from "./chunk-6UKL6IXM.js";
326
326
  import {
327
327
  NoopSearchBackend
328
328
  } from "./chunk-CYEPCZN5.js";
@@ -353,7 +353,7 @@ import {
353
353
  } from "./chunk-Y56J7CXW.js";
354
354
  import {
355
355
  buildChainFollowupGenerator
356
- } from "./chunk-AMACWKM4.js";
356
+ } from "./chunk-IJHLC5CH.js";
357
357
  import {
358
358
  ContentHashIndex,
359
359
  StorageManager,
@@ -363,7 +363,7 @@ import {
363
363
  normalizeEntityName,
364
364
  parseEntityFile,
365
365
  stripAttributesSuffix
366
- } from "./chunk-A4BTPHIN.js";
366
+ } from "./chunk-Y7NWBBHV.js";
367
367
  import {
368
368
  isValidTranscriptDate,
369
369
  loadSpeakerRegistry,
@@ -3425,7 +3425,7 @@ var Orchestrator = class _Orchestrator {
3425
3425
  if (signal.aborted) return;
3426
3426
  if (!this.wearablesAutoSyncHandle && this.config.wearables.enabled && this.config.wearables.autoSyncEnabled && Object.values(this.config.wearables.sources).some((source) => source.enabled)) {
3427
3427
  try {
3428
- const { startWearablesAutoSync } = await import("./auto-sync-54QQHOG5.js");
3428
+ const { startWearablesAutoSync } = await import("./auto-sync-5CJBJMPZ.js");
3429
3429
  if (signal.aborted) return;
3430
3430
  this.wearablesAutoSyncHandle = startWearablesAutoSync(
3431
3431
  {
@@ -8004,21 +8004,19 @@ ${formatted}`;
8004
8004
  const explicitCueMaxChars = this.getRecallSectionMaxChars("explicit-cue") ?? this.config.explicitCueRecallMaxChars;
8005
8005
  if (this.config.explicitCueRecallEnabled && this.isRecallSectionEnabled("explicit-cue") && explicitCueMaxChars !== 0 && this.lcmEngine?.enabled && recallMode !== "no_recall") {
8006
8006
  try {
8007
- const explicitCueSection = await firstNonEmptyLcmRead(
8008
- (lcmSessionId) => buildExplicitCueRecallSection({
8009
- engine: this.lcmEngine,
8010
- // #1495 thread 3 + #1505 fallback unification: read across the
8011
- // ordered LCM read key set (primary overlay coding fallbacks)
8012
- // so a branch-scoped session finds its own explicit-cue evidence
8013
- // even when archived at project/root scope (rule 39).
8014
- sessionId: lcmSessionId,
8015
- query: retrievalQuery,
8016
- maxChars: explicitCueMaxChars,
8017
- maxReferences: this.getRecallSectionNumber("explicit-cue", "maxResults") ?? this.config.explicitCueRecallMaxReferences
8018
- }),
8019
- (s) => !s,
8020
- ""
8021
- );
8007
+ const explicitCueSection = await buildExplicitCueRecallSection({
8008
+ engine: this.lcmEngine,
8009
+ // #1495 thread 3 + #1505 fallback unification: read across the ordered
8010
+ // LCM read key set (primary overlay coding fallbacks) so a
8011
+ // branch-scoped session finds its own explicit-cue evidence even when
8012
+ // archived at project/root scope (rule 39). #1505 codex P2: the builder
8013
+ // MERGES candidates across every key under its single budget instead of
8014
+ // short-circuiting on the first non-empty key.
8015
+ sessionIds: lcmReadSessionIds,
8016
+ query: retrievalQuery,
8017
+ maxChars: explicitCueMaxChars,
8018
+ maxReferences: this.getRecallSectionNumber("explicit-cue", "maxResults") ?? this.config.explicitCueRecallMaxReferences
8019
+ });
8022
8020
  if (explicitCueSection) {
8023
8021
  this.appendRecallSection(
8024
8022
  sectionBuckets,
@@ -8036,22 +8034,19 @@ ${formatted}`;
8036
8034
  this.config.targetedFactRecallEnabled
8037
8035
  ) && targetedFactMaxChars !== 0 && this.lcmEngine?.enabled && recallMode !== "no_recall" && shouldRecallTargetedFactEvidence(retrievalQuery)) {
8038
8036
  try {
8039
- const targetedFactSection = await firstNonEmptyLcmRead(
8040
- (lcmSessionId) => buildTargetedFactRecallSection({
8041
- engine: this.lcmEngine,
8042
- // #1495 + #1505 fallback unification: read across the ordered LCM
8043
- // read key set so a branch-scoped session finds its own
8044
- // targeted-fact evidence even when archived at project/root scope.
8045
- sessionId: lcmSessionId,
8046
- query: retrievalQuery,
8047
- maxChars: targetedFactMaxChars,
8048
- maxSearchResults: this.getRecallSectionNumber("targeted-facts", "maxResults") ?? this.config.targetedFactRecallMaxResults,
8049
- maxScanWindowTurns: this.getRecallSectionNumber("targeted-facts", "maxTurns") ?? this.config.targetedFactRecallScanWindowTurns,
8050
- maxScanWindowTokens: this.getRecallSectionNumber("targeted-facts", "maxTokens") ?? this.config.targetedFactRecallScanWindowTokens
8051
- }),
8052
- (s) => !s,
8053
- ""
8054
- );
8037
+ const targetedFactSection = await buildTargetedFactRecallSection({
8038
+ engine: this.lcmEngine,
8039
+ // #1495 + #1505 fallback unification: read across the ordered LCM read
8040
+ // key set so a branch-scoped session finds its own targeted-fact
8041
+ // evidence even when archived at project/root scope. #1505 codex P2: the
8042
+ // builder MERGES candidates across every key under its single budget.
8043
+ sessionIds: lcmReadSessionIds,
8044
+ query: retrievalQuery,
8045
+ maxChars: targetedFactMaxChars,
8046
+ maxSearchResults: this.getRecallSectionNumber("targeted-facts", "maxResults") ?? this.config.targetedFactRecallMaxResults,
8047
+ maxScanWindowTurns: this.getRecallSectionNumber("targeted-facts", "maxTurns") ?? this.config.targetedFactRecallScanWindowTurns,
8048
+ maxScanWindowTokens: this.getRecallSectionNumber("targeted-facts", "maxTokens") ?? this.config.targetedFactRecallScanWindowTokens
8049
+ });
8055
8050
  if (targetedFactSection) {
8056
8051
  this.appendRecallSection(
8057
8052
  sectionBuckets,
@@ -8069,22 +8064,20 @@ ${formatted}`;
8069
8064
  this.config.focusedListRecallEnabled
8070
8065
  ) && focusedListMaxChars !== 0 && this.lcmEngine?.enabled && recallMode !== "no_recall" && shouldRecallFocusedListEvidence(retrievalQuery)) {
8071
8066
  try {
8072
- const focusedListSection = await firstNonEmptyLcmRead(
8073
- (lcmSessionId) => buildFocusedListRecallSection({
8074
- engine: this.lcmEngine,
8075
- // #1495 thread 3 + #1505 fallback unification: read across the
8076
- // ordered LCM read key set so a branch-scoped session reads its own
8077
- // focused-list/count evidence even at project/root scope (rule 39).
8078
- sessionId: lcmSessionId,
8079
- query: retrievalQuery,
8080
- maxChars: focusedListMaxChars,
8081
- maxSearchResults: this.getRecallSectionNumber("focused-list", "maxResults") ?? this.config.focusedListRecallMaxResults,
8082
- maxScanWindowTurns: this.getRecallSectionNumber("focused-list", "maxTurns") ?? this.config.focusedListRecallScanWindowTurns,
8083
- maxScanWindowTokens: this.getRecallSectionNumber("focused-list", "maxTokens") ?? this.config.focusedListRecallScanWindowTokens
8084
- }),
8085
- (s) => !s,
8086
- ""
8087
- );
8067
+ const focusedListSection = await buildFocusedListRecallSection({
8068
+ engine: this.lcmEngine,
8069
+ // #1495 thread 3 + #1505 fallback unification: read across the ordered
8070
+ // LCM read key set so a branch-scoped session reads its own
8071
+ // focused-list/count evidence even at project/root scope (rule 39).
8072
+ // #1505 codex P2: the builder MERGES candidates across every key under
8073
+ // its single budget.
8074
+ sessionIds: lcmReadSessionIds,
8075
+ query: retrievalQuery,
8076
+ maxChars: focusedListMaxChars,
8077
+ maxSearchResults: this.getRecallSectionNumber("focused-list", "maxResults") ?? this.config.focusedListRecallMaxResults,
8078
+ maxScanWindowTurns: this.getRecallSectionNumber("focused-list", "maxTurns") ?? this.config.focusedListRecallScanWindowTurns,
8079
+ maxScanWindowTokens: this.getRecallSectionNumber("focused-list", "maxTokens") ?? this.config.focusedListRecallScanWindowTokens
8080
+ });
8088
8081
  if (focusedListSection) {
8089
8082
  this.appendRecallSection(
8090
8083
  sectionBuckets,
@@ -8105,23 +8098,21 @@ ${formatted}`;
8105
8098
  this.config.responseGuidanceRecallEnabled
8106
8099
  ) && responseGuidanceMaxChars !== 0 && this.lcmEngine?.enabled && recallMode !== "no_recall" && (responseGuidanceMatchesQuery || responseGuidanceForcedByPipeline)) {
8107
8100
  try {
8108
- const responseGuidanceSection = await firstNonEmptyLcmRead(
8109
- (lcmSessionId) => buildResponseGuidanceRecallSection({
8110
- engine: this.lcmEngine,
8111
- // #1495 thread 3 + #1505 fallback unification: read across the
8112
- // ordered LCM read key set so a branch-scoped session reads its own
8113
- // response-guidance evidence even at project/root scope (rule 39).
8114
- sessionId: lcmSessionId,
8115
- query: retrievalQuery,
8116
- maxChars: responseGuidanceMaxChars,
8117
- maxSearchResults: this.getRecallSectionNumber("response-guidance", "maxResults") ?? this.config.responseGuidanceRecallMaxResults,
8118
- maxScanWindowTurns: this.getRecallSectionNumber("response-guidance", "maxTurns") ?? this.config.responseGuidanceRecallScanWindowTurns,
8119
- maxScanWindowTokens: this.getRecallSectionNumber("response-guidance", "maxTokens") ?? this.config.responseGuidanceRecallScanWindowTokens,
8120
- forceGeneric: responseGuidanceForcedByPipeline
8121
- }),
8122
- (s) => !s,
8123
- ""
8124
- );
8101
+ const responseGuidanceSection = await buildResponseGuidanceRecallSection({
8102
+ engine: this.lcmEngine,
8103
+ // #1495 thread 3 + #1505 fallback unification: read across the ordered
8104
+ // LCM read key set so a branch-scoped session reads its own
8105
+ // response-guidance evidence even at project/root scope (rule 39).
8106
+ // #1505 codex P2: the builder MERGES candidates across every key under
8107
+ // its single budget.
8108
+ sessionIds: lcmReadSessionIds,
8109
+ query: retrievalQuery,
8110
+ maxChars: responseGuidanceMaxChars,
8111
+ maxSearchResults: this.getRecallSectionNumber("response-guidance", "maxResults") ?? this.config.responseGuidanceRecallMaxResults,
8112
+ maxScanWindowTurns: this.getRecallSectionNumber("response-guidance", "maxTurns") ?? this.config.responseGuidanceRecallScanWindowTurns,
8113
+ maxScanWindowTokens: this.getRecallSectionNumber("response-guidance", "maxTokens") ?? this.config.responseGuidanceRecallScanWindowTokens,
8114
+ forceGeneric: responseGuidanceForcedByPipeline
8115
+ });
8125
8116
  if (responseGuidanceSection) {
8126
8117
  this.appendRecallSection(
8127
8118
  sectionBuckets,
@@ -8142,9 +8133,6 @@ ${formatted}`;
8142
8133
  const eventOrderSection = await firstNonEmptyLcmRead(
8143
8134
  (lcmSessionId) => buildEventOrderRecallSection({
8144
8135
  engine: this.lcmEngine,
8145
- // #1495 thread 3 + #1505 fallback unification: read across the
8146
- // ordered LCM read key set so a branch-scoped session reads its own
8147
- // chronological event-order evidence even at project/root scope.
8148
8136
  sessionId: lcmSessionId,
8149
8137
  query: retrievalQuery,
8150
8138
  maxChars: eventOrderMaxChars,
@@ -8289,19 +8277,26 @@ ${tmtNode.summary}`
8289
8277
  }
8290
8278
  if (this.lcmEngine?.enabled && recallMode !== "minimal" && recallMode !== "no_recall") {
8291
8279
  try {
8292
- const structuredMatches = await firstNonEmptyLcmRead(
8293
- (lcmSessionId) => this.lcmEngine.searchStructuredParts(
8294
- // #1495 + #1505 fallback unification: read across the ordered LCM
8295
- // read key set so a branch-scoped session reads its own structured
8296
- // message-part evidence even when archived at project/root scope.
8297
- // Structured parts are inherently per-session (the DAG is keyed by
8298
- // session_id), so a SESSIONLESS read (`undefined`) normalizes to
8299
- // empty → no section, the correct pre-#1505 behavior (codex P2).
8300
- lcmSessionId ?? "",
8301
- retrievalQuery
8302
- ),
8303
- (matches) => matches.length === 0,
8304
- []
8280
+ const structuredSettled = await Promise.allSettled(
8281
+ lcmReadSessionIds.map(
8282
+ (lcmSessionId) => this.lcmEngine.searchStructuredParts(lcmSessionId ?? "", retrievalQuery)
8283
+ )
8284
+ );
8285
+ for (const settled of structuredSettled) {
8286
+ if (settled.status === "rejected") {
8287
+ log.debug(
8288
+ `LCM structured-parts read failed for one key: ${settled.reason}`
8289
+ );
8290
+ }
8291
+ }
8292
+ const seenStructuredParts = /* @__PURE__ */ new Set();
8293
+ const structuredMatches = structuredSettled.flatMap((settled) => settled.status === "fulfilled" ? settled.value : []).filter((match) => {
8294
+ const key = `${match.session_id} ${match.turn_index} ${match.part_id}`;
8295
+ if (seenStructuredParts.has(key)) return false;
8296
+ seenStructuredParts.add(key);
8297
+ return true;
8298
+ }).sort(
8299
+ (a, b) => (b.score ?? 0) - (a.score ?? 0) || b.turn_index - a.turn_index
8305
8300
  );
8306
8301
  const structuredSection = this.lcmEngine.formatStructuredRecall(
8307
8302
  structuredMatches,
@@ -8327,12 +8322,6 @@ ${tmtNode.summary}`
8327
8322
  }
8328
8323
  const lcmSection = await firstNonEmptyLcmRead(
8329
8324
  (lcmSessionId) => this.lcmEngine.assembleRecall(
8330
- // #1495 + #1505 fallback unification: read across the ordered LCM
8331
- // read key set so a branch-scoped session reads its own
8332
- // compressed-history evidence even at project/root scope.
8333
- // Compressed history is inherently per-session (a per-session DAG),
8334
- // so a SESSIONLESS read (`undefined`) normalizes to empty → no
8335
- // section, the correct pre-#1505 behavior (codex P2).
8336
8325
  lcmSessionId ?? "",
8337
8326
  this.config.recallBudgetChars
8338
8327
  ),
@@ -14432,4 +14421,4 @@ export {
14432
14421
  resolvePersistedMemoryRelativePath,
14433
14422
  Orchestrator
14434
14423
  };
14435
- //# sourceMappingURL=chunk-23RYLGYA.js.map
14424
+ //# sourceMappingURL=chunk-5WSDHTBO.js.map