@remnic/core 9.50.3 → 9.51.0

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 (486) hide show
  1. package/dist/access-admin-ops-surface.d.ts +13 -11
  2. package/dist/access-admin-ops-surface.js +41 -39
  3. package/dist/access-authorization-probe.d.ts +13 -11
  4. package/dist/access-authorization-probe.js +42 -40
  5. package/dist/access-boundary.d.ts +13 -11
  6. package/dist/access-boundary.js +41 -39
  7. package/dist/access-cli.js +109 -104
  8. package/dist/access-cli.js.map +1 -1
  9. package/dist/access-coding-context-resolution.d.ts +3 -1
  10. package/dist/access-extraction-force-flush.d.ts +13 -11
  11. package/dist/access-extraction-force-flush.js +41 -39
  12. package/dist/access-health-types.d.ts +3 -1
  13. package/dist/access-http-lcm-compaction.d.ts +13 -11
  14. package/dist/access-http-lifecycle-flush.d.ts +13 -11
  15. package/dist/access-http-offline-stream.d.ts +13 -11
  16. package/dist/access-http-query.js +41 -39
  17. package/dist/access-http.d.ts +13 -11
  18. package/dist/access-http.js +52 -50
  19. package/dist/access-identity-continuity-surface.d.ts +11 -9
  20. package/dist/access-identity-continuity-surface.js +41 -39
  21. package/dist/access-lcm-surface.d.ts +13 -11
  22. package/dist/access-lcm-surface.js +41 -39
  23. package/dist/access-mcp.d.ts +13 -11
  24. package/dist/access-mcp.js +47 -45
  25. package/dist/access-memory-search-fanout.d.ts +4 -2
  26. package/dist/{access-namespace-preflight-Dj2QolFE.d.ts → access-namespace-preflight-Ds6CGlCP.d.ts} +1 -1
  27. package/dist/access-namespace-preflight.d.ts +5 -3
  28. package/dist/access-namespace-preflight.js +41 -39
  29. package/dist/access-observe-write-surface.d.ts +13 -11
  30. package/dist/access-observe-write-surface.js +41 -39
  31. package/dist/access-offline-manifest.d.ts +11 -9
  32. package/dist/access-operations-batch.js +43 -41
  33. package/dist/access-operations.d.ts +16 -14
  34. package/dist/access-operations.js +46 -44
  35. package/dist/access-recall-concurrency.d.ts +13 -11
  36. package/dist/access-recall-concurrency.js +41 -39
  37. package/dist/access-recall-response.d.ts +13 -11
  38. package/dist/access-recall-response.js +41 -39
  39. package/dist/access-recall-surface.d.ts +13 -11
  40. package/dist/access-recall-surface.js +41 -39
  41. package/dist/access-schema.d.ts +88 -88
  42. package/dist/access-schema.js +3 -3
  43. package/dist/{access-service-DesbnTSa.d.ts → access-service-BY0KJ44c.d.ts} +7 -7
  44. package/dist/access-service-helpers.d.ts +13 -11
  45. package/dist/access-service.d.ts +13 -11
  46. package/dist/access-service.js +41 -39
  47. package/dist/access-surface-catalog.d.ts +13 -11
  48. package/dist/access-wearables-meetings-surface.d.ts +5 -3
  49. package/dist/action-confidence.d.ts +3 -1
  50. package/dist/active-memory-bridge.d.ts +3 -1
  51. package/dist/active-recall.d.ts +3 -1
  52. package/dist/active-recall.js +5 -3
  53. package/dist/active-recall.js.map +1 -1
  54. package/dist/adapters/index.js +4 -4
  55. package/dist/adapters/registry.js +2 -2
  56. package/dist/ambient-provenance.d.ts +3 -1
  57. package/dist/archive-mutation-version.d.ts +9 -0
  58. package/dist/archive-mutation-version.js +20 -0
  59. package/dist/artifact-search.d.ts +3 -1
  60. package/dist/behavior-learner.d.ts +3 -1
  61. package/dist/behavior-signals.d.ts +3 -1
  62. package/dist/bootstrap.d.ts +11 -9
  63. package/dist/briefing.d.ts +4 -2
  64. package/dist/briefing.js +10 -9
  65. package/dist/buffer-surprise-report.d.ts +3 -1
  66. package/dist/buffer-turn-helpers.d.ts +3 -1
  67. package/dist/buffer.d.ts +4 -2
  68. package/dist/buffer.js +5 -5
  69. package/dist/bulk-import/index.d.ts +5 -3
  70. package/dist/calibration.d.ts +3 -1
  71. package/dist/capabilities.d.ts +3 -1
  72. package/dist/{catalog-D-G7RgXR.d.ts → catalog-D3B4RDy1.d.ts} +1 -1
  73. package/dist/causal-behavior.d.ts +3 -1
  74. package/dist/causal-behavior.js +2 -2
  75. package/dist/causal-chain.js +2 -2
  76. package/dist/causal-consolidation.d.ts +3 -1
  77. package/dist/causal-consolidation.js +13 -12
  78. package/dist/causal-consolidation.js.map +1 -1
  79. package/dist/causal-retrieval.js +2 -2
  80. package/dist/causal-trajectory-graph.d.ts +4 -2
  81. package/dist/causal-trajectory-graph.js +2 -1
  82. package/dist/causal-trajectory-graph.js.map +1 -1
  83. package/dist/causal-trajectory.js +1 -1
  84. package/dist/{chunk-KDG2KTWW.js → chunk-33SV3E43.js} +4 -4
  85. package/dist/{chunk-2HGUDBRJ.js → chunk-37ZO6LLJ.js} +2 -2
  86. package/dist/{chunk-QW3WFHKU.js → chunk-45BRYON6.js} +2 -2
  87. package/dist/{chunk-GZICBRWK.js → chunk-4F6X3RXW.js} +2 -2
  88. package/dist/{chunk-7BAYBYY5.js → chunk-4PC4PRJE.js} +2 -2
  89. package/dist/{chunk-VJXY5ZCT.js → chunk-52UKFTUK.js} +2 -2
  90. package/dist/{chunk-ESG7Z255.js → chunk-5UDMFE3Q.js} +2 -2
  91. package/dist/{chunk-JPHEOE6Z.js → chunk-6MTSFX7A.js} +15 -15
  92. package/dist/chunk-6ZN34ISG.js +44 -0
  93. package/dist/chunk-6ZN34ISG.js.map +1 -0
  94. package/dist/{chunk-M4MP34AQ.js → chunk-AHZOMHWN.js} +1 -1
  95. package/dist/{chunk-Z3RHPGSY.js → chunk-AIUBBHSF.js} +3 -3
  96. package/dist/{chunk-S3AYIQCU.js → chunk-AXIDQG5A.js} +12 -12
  97. package/dist/{chunk-QN7NTKRC.js → chunk-AZ2QBGYB.js} +1 -1
  98. package/dist/{chunk-47J4EDGR.js → chunk-AZM4CCAC.js} +8 -8
  99. package/dist/{chunk-IXXABW5A.js → chunk-BHXYAVUM.js} +11 -5
  100. package/dist/chunk-BHXYAVUM.js.map +1 -0
  101. package/dist/{chunk-L2DPF4DF.js → chunk-BIJAWZYW.js} +54 -12
  102. package/dist/chunk-BIJAWZYW.js.map +1 -0
  103. package/dist/{chunk-LEJPSMKM.js → chunk-C5QLI33R.js} +3 -3
  104. package/dist/{chunk-SV3PSA7Y.js → chunk-CV6BBVYV.js} +5 -5
  105. package/dist/{chunk-V7X767RT.js → chunk-DCZBSE4F.js} +52 -52
  106. package/dist/chunk-FC67T4E6.js +70 -0
  107. package/dist/chunk-FC67T4E6.js.map +1 -0
  108. package/dist/{chunk-7PKFPLLZ.js → chunk-FXTYIA46.js} +2 -2
  109. package/dist/{chunk-64BHFFKZ.js → chunk-HLYR2TQL.js} +5 -5
  110. package/dist/{chunk-5C2HNJMO.js → chunk-J5LLX6IL.js} +32 -32
  111. package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
  112. package/dist/{chunk-PLKFO2HJ.js → chunk-JL43BVDE.js} +2 -2
  113. package/dist/{chunk-2S72LWKX.js → chunk-JYL3BVVZ.js} +2 -2
  114. package/dist/{chunk-IPLYGWQF.js → chunk-KQAFEZQX.js} +5 -5
  115. package/dist/chunk-LXY5VVGM.js +61 -0
  116. package/dist/chunk-LXY5VVGM.js.map +1 -0
  117. package/dist/{chunk-PYKKWQZ2.js → chunk-M7BXDKPR.js} +6 -6
  118. package/dist/{chunk-Z54EM5YZ.js → chunk-MAXVH44E.js} +7 -7
  119. package/dist/{chunk-LYMNZZIM.js → chunk-NIS256NW.js} +2 -2
  120. package/dist/{chunk-67QG75MJ.js → chunk-NLK2VZYZ.js} +2 -2
  121. package/dist/{chunk-A4QMKFFO.js → chunk-O5FFBO2M.js} +14 -28
  122. package/dist/chunk-O5FFBO2M.js.map +1 -0
  123. package/dist/{chunk-JYIFGGEM.js → chunk-OUKBMQ2O.js} +2 -2
  124. package/dist/{chunk-75XOWNRS.js → chunk-OYESWJ43.js} +4 -4
  125. package/dist/{chunk-TS4AJ2GI.js → chunk-PA45XCUD.js} +3 -3
  126. package/dist/{chunk-BJYET5TX.js → chunk-PRDJMOST.js} +7 -1
  127. package/dist/chunk-PRDJMOST.js.map +1 -0
  128. package/dist/{chunk-4MBPIL4V.js → chunk-PUSLMZBQ.js} +2 -2
  129. package/dist/{chunk-RVO6TCTU.js → chunk-QCECHYZL.js} +6 -6
  130. package/dist/{chunk-GFIKG4FR.js → chunk-QGR6OVGT.js} +2 -2
  131. package/dist/{chunk-NSGU76YO.js → chunk-QHFV6VNU.js} +6 -2
  132. package/dist/chunk-QHFV6VNU.js.map +1 -0
  133. package/dist/{chunk-PDEKQWDV.js → chunk-QT2FRYI4.js} +18 -2
  134. package/dist/chunk-QT2FRYI4.js.map +1 -0
  135. package/dist/{chunk-HNZKVLAN.js → chunk-S354QO4R.js} +2 -2
  136. package/dist/{chunk-NO37MR45.js → chunk-SOEN6KCF.js} +2 -2
  137. package/dist/{chunk-FXX6RQYC.js → chunk-TPTECFWR.js} +2 -2
  138. package/dist/{chunk-GDDGZVFI.js → chunk-UEVLYVNW.js} +2 -2
  139. package/dist/{chunk-YQ4IQ2GA.js → chunk-UT5BV5OG.js} +2 -2
  140. package/dist/{chunk-LAQ33B5D.js → chunk-UU3G6GUP.js} +1 -1
  141. package/dist/chunk-UU3G6GUP.js.map +1 -0
  142. package/dist/{chunk-LNTUXKBT.js → chunk-UYYW2KPU.js} +2 -2
  143. package/dist/{chunk-BOFVT6P3.js → chunk-VBHPOWBJ.js} +175 -98
  144. package/dist/chunk-VBHPOWBJ.js.map +1 -0
  145. package/dist/{chunk-QSYL5CXK.js → chunk-VKXWK44Q.js} +3 -3
  146. package/dist/{chunk-KMWYZTIE.js → chunk-VMMQDEN5.js} +2 -2
  147. package/dist/{chunk-JB6D7EFB.js → chunk-VVG2BOKA.js} +2 -2
  148. package/dist/chunk-W5BIQOAJ.js +69 -0
  149. package/dist/chunk-W5BIQOAJ.js.map +1 -0
  150. package/dist/{chunk-V5H6OJCR.js → chunk-W5XVQFLM.js} +2 -2
  151. package/dist/{chunk-OIOZ6MOP.js → chunk-W6FNX2LP.js} +2 -2
  152. package/dist/{chunk-6QPHF6RR.js → chunk-WQM326GS.js} +2 -2
  153. package/dist/{chunk-TQFHQPWD.js → chunk-XADV5IZ3.js} +8 -8
  154. package/dist/{chunk-DATDLJAO.js → chunk-XAPMEU3K.js} +2 -2
  155. package/dist/chunk-XXSOVESA.js +42 -0
  156. package/dist/chunk-XXSOVESA.js.map +1 -0
  157. package/dist/{chunk-IK6X5QPO.js → chunk-ZHY5TMJG.js} +1193 -443
  158. package/dist/chunk-ZHY5TMJG.js.map +1 -0
  159. package/dist/{chunk-N3LL5NEU.js → chunk-ZMYDYNI4.js} +2 -2
  160. package/dist/{cli-D4vvtxjY.d.ts → cli-CnOkH9hA.d.ts} +6 -6
  161. package/dist/cli.d.ts +15 -13
  162. package/dist/cli.js +74 -70
  163. package/dist/coding/pre-action-gate.d.ts +3 -1
  164. package/dist/coding/pre-action-gate.js +2 -2
  165. package/dist/compounding/engine.d.ts +4 -2
  166. package/dist/compounding/engine.js +10 -9
  167. package/dist/compounding/preference-consolidator.d.ts +3 -1
  168. package/dist/compression-optimizer.d.ts +3 -1
  169. package/dist/config.d.ts +3 -1
  170. package/dist/config.js +5 -3
  171. package/dist/connectors/codex-materialize-runner.d.ts +3 -1
  172. package/dist/connectors/codex-materialize-runner.js +10 -9
  173. package/dist/connectors/codex-materialize.d.ts +3 -1
  174. package/dist/connectors/index.d.ts +3 -1
  175. package/dist/connectors/index.js +10 -9
  176. package/dist/consolidation-provenance-check.d.ts +4 -2
  177. package/dist/consolidation-undo.d.ts +4 -2
  178. package/dist/contradiction/index.d.ts +4 -2
  179. package/dist/contradiction-config.d.ts +29 -0
  180. package/dist/contradiction-config.js +12 -0
  181. package/dist/contradiction-config.js.map +1 -0
  182. package/dist/converge-config.d.ts +3 -1
  183. package/dist/convergence-refresh.d.ts +4 -2
  184. package/dist/convergence-refresh.js +12 -11
  185. package/dist/conversation-index/backend.d.ts +3 -1
  186. package/dist/conversation-index/chunker.d.ts +3 -1
  187. package/dist/conversation-index/faiss-adapter.d.ts +3 -1
  188. package/dist/conversation-index/indexer.d.ts +3 -1
  189. package/dist/conversation-index/search.d.ts +3 -1
  190. package/dist/corpus-watermark.d.ts +3 -1
  191. package/dist/corpus-watermark.js +21 -20
  192. package/dist/day-summary.d.ts +3 -1
  193. package/dist/delinearize.d.ts +3 -1
  194. package/dist/dependency-propagation-config.d.ts +3 -1
  195. package/dist/direct-answer-wiring.d.ts +3 -1
  196. package/dist/direct-answer.d.ts +3 -1
  197. package/dist/embedding-fallback.d.ts +3 -1
  198. package/dist/enrichment/index.d.ts +3 -1
  199. package/dist/entity-retrieval.d.ts +4 -2
  200. package/dist/entity-retrieval.js +10 -9
  201. package/dist/entity-schema.d.ts +3 -1
  202. package/dist/explicit-capture.d.ts +11 -9
  203. package/dist/explicit-capture.js +3 -2
  204. package/dist/external-wiki-access.d.ts +13 -11
  205. package/dist/external-wiki-access.js +42 -40
  206. package/dist/external-wiki-collection-registration.d.ts +3 -1
  207. package/dist/external-wiki-collection.d.ts +3 -1
  208. package/dist/external-wiki-mcp-tools.d.ts +13 -11
  209. package/dist/extraction-error-classification.d.ts +3 -1
  210. package/dist/extraction-faithfulness.d.ts +3 -1
  211. package/dist/extraction-judge-telemetry.d.ts +3 -1
  212. package/dist/extraction-judge-training.d.ts +3 -1
  213. package/dist/extraction-judge.d.ts +3 -1
  214. package/dist/extraction-liveness.d.ts +3 -1
  215. package/dist/extraction-normalization.d.ts +3 -1
  216. package/dist/extraction-prompt.d.ts +3 -1
  217. package/dist/extraction-source-grounding-rules.d.ts +3 -1
  218. package/dist/extraction-source-grounding.d.ts +3 -1
  219. package/dist/extraction.d.ts +3 -1
  220. package/dist/extraction.js +22 -21
  221. package/dist/fallback-llm.d.ts +3 -1
  222. package/dist/graph-444E-DrF.d.ts +349 -0
  223. package/dist/graph-dashboard-diff.d.ts +4 -2
  224. package/dist/graph-dashboard-key.d.ts +4 -2
  225. package/dist/graph-dashboard-parser.d.ts +4 -2
  226. package/dist/{graph-edge-decay-Z6ENALU2.js → graph-edge-decay-65KMOJWY.js} +4 -3
  227. package/dist/graph-edge-decay-65KMOJWY.js.map +1 -0
  228. package/dist/graph-edge-reinforcement.d.ts +4 -2
  229. package/dist/graph-path-reconstruction.d.ts +10 -0
  230. package/dist/graph-path-reconstruction.js +12 -0
  231. package/dist/graph-path-reconstruction.js.map +1 -0
  232. package/dist/graph-path-scoring-config.d.ts +8 -0
  233. package/dist/graph-path-scoring-config.js +10 -0
  234. package/dist/graph-path-scoring-config.js.map +1 -0
  235. package/dist/graph-path-scoring.d.ts +36 -0
  236. package/dist/graph-path-scoring.js +11 -0
  237. package/dist/graph-path-scoring.js.map +1 -0
  238. package/dist/graph-snapshot.d.ts +4 -2
  239. package/dist/graph-snapshot.js +3 -2
  240. package/dist/graph.d.ts +5 -318
  241. package/dist/graph.js +5 -1
  242. package/dist/harmonic-retrieval.js +1 -1
  243. package/dist/importance.d.ts +3 -1
  244. package/dist/importers/index.d.ts +3 -1
  245. package/dist/in-flight-reads.d.ts +3 -1
  246. package/dist/index.d.ts +696 -694
  247. package/dist/index.js +149 -144
  248. package/dist/intent.d.ts +3 -1
  249. package/dist/lcm/engine.d.ts +3 -1
  250. package/dist/lcm/engine.js +3 -3
  251. package/dist/lcm/index.d.ts +3 -1
  252. package/dist/lcm/index.js +6 -6
  253. package/dist/lcm/tools.d.ts +3 -1
  254. package/dist/lifecycle.d.ts +3 -1
  255. package/dist/live-connectors-runner.d.ts +3 -1
  256. package/dist/local-llm.d.ts +3 -1
  257. package/dist/local-model-endpoint.d.ts +3 -1
  258. package/dist/maintenance/memory-governance.d.ts +3 -1
  259. package/dist/maintenance/memory-governance.js +10 -9
  260. package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +4 -2
  261. package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -9
  262. package/dist/maintenance/rebuild-memory-projection.d.ts +4 -2
  263. package/dist/maintenance/rebuild-memory-projection.js +11 -10
  264. package/dist/{maintenance-ClmUVpGI.d.ts → maintenance-CKwxpdRx.d.ts} +3 -3
  265. package/dist/mcp-memory-inspector-app.d.ts +13 -11
  266. package/dist/memory-action-policy.d.ts +3 -1
  267. package/dist/memory-cache.d.ts +3 -1
  268. package/dist/memory-lifecycle-ledger-utils.d.ts +3 -1
  269. package/dist/memory-projection-store.d.ts +3 -1
  270. package/dist/memory-provenance.d.ts +3 -1
  271. package/dist/memory-snapshot.d.ts +3 -1
  272. package/dist/memory-worth-outcomes.d.ts +4 -2
  273. package/dist/models-json.d.ts +3 -1
  274. package/dist/namespaces/migrate.d.ts +5 -3
  275. package/dist/namespaces/migrate.js +20 -19
  276. package/dist/namespaces/principal.d.ts +3 -1
  277. package/dist/namespaces/search.d.ts +3 -1
  278. package/dist/namespaces/search.js +7 -7
  279. package/dist/namespaces/storage.d.ts +5 -3
  280. package/dist/namespaces/storage.js +10 -9
  281. package/dist/native-knowledge.d.ts +3 -1
  282. package/dist/offline-sync-impression-drain.d.ts +3 -1
  283. package/dist/operator-doctor-corpus.d.ts +3 -1
  284. package/dist/operator-doctor-corpus.js +22 -21
  285. package/dist/operator-doctor-replica.d.ts +3 -1
  286. package/dist/operator-toolkit.d.ts +6 -4
  287. package/dist/operator-toolkit.js +33 -29
  288. package/dist/orchestration/compression-guideline-coordinator.d.ts +4 -2
  289. package/dist/orchestration/maintenance.d.ts +6 -4
  290. package/dist/orchestration/maintenance.js +15 -14
  291. package/dist/{orchestrator-qJ07zI8H.d.ts → orchestrator-BshGam-o.d.ts} +45 -19
  292. package/dist/orchestrator.d.ts +11 -9
  293. package/dist/orchestrator.js +109 -104
  294. package/dist/patterns-cli.d.ts +3 -1
  295. package/dist/{pipeline-WFCxhHOn.d.ts → pipeline-D21Rs6gW.d.ts} +1 -1
  296. package/dist/policy-runtime.d.ts +3 -1
  297. package/dist/proactive-contention.d.ts +3 -1
  298. package/dist/provenance.d.ts +3 -1
  299. package/dist/{qmd-5tzkQ44y.d.ts → qmd-Dhle1P4X.d.ts} +1 -1
  300. package/dist/qmd-preflight.d.ts +4 -2
  301. package/dist/qmd-recall-cache.d.ts +3 -1
  302. package/dist/qmd.d.ts +4 -2
  303. package/dist/qmd.js +4 -4
  304. package/dist/recall-concurrency-config.d.ts +3 -1
  305. package/dist/recall-disclosure-escalation.d.ts +3 -1
  306. package/dist/recall-explain-renderer.d.ts +3 -1
  307. package/dist/recall-explain-renderer.js +3 -3
  308. package/dist/recall-memory-map.d.ts +3 -1
  309. package/dist/recall-planner-llm.d.ts +3 -1
  310. package/dist/recall-planner-llm.js +3 -3
  311. package/dist/recall-state.d.ts +7 -1
  312. package/dist/recall-state.js +1 -1
  313. package/dist/recall-tag-filter.d.ts +3 -1
  314. package/dist/recall-timings.d.ts +3 -1
  315. package/dist/recall-xray-cli.d.ts +3 -1
  316. package/dist/recall-xray-cli.js +4 -4
  317. package/dist/recall-xray-renderer.d.ts +3 -1
  318. package/dist/recall-xray-renderer.js +3 -3
  319. package/dist/recall-xray.d.ts +7 -1
  320. package/dist/recall-xray.js +2 -2
  321. package/dist/reconcile/cursor.d.ts +3 -1
  322. package/dist/reconcile/manifest.d.ts +3 -1
  323. package/dist/reconcile/plan.d.ts +3 -1
  324. package/dist/replay/normalizers/chatgpt.d.ts +3 -1
  325. package/dist/replay/normalizers/claude.d.ts +3 -1
  326. package/dist/replay/normalizers/openclaw.d.ts +3 -1
  327. package/dist/replay/normalizers/shared.d.ts +3 -1
  328. package/dist/replay/runner.d.ts +3 -1
  329. package/dist/replay/types.d.ts +3 -1
  330. package/dist/replica-divergence.d.ts +3 -1
  331. package/dist/replica-peers-config.d.ts +3 -1
  332. package/dist/resolve-auth-token.d.ts +3 -1
  333. package/dist/resume-bundles.js +6 -4
  334. package/dist/retrieval-agents.d.ts +4 -2
  335. package/dist/retrieval-tiers.d.ts +3 -1
  336. package/dist/routing/engine.d.ts +3 -1
  337. package/dist/routing/store.d.ts +3 -1
  338. package/dist/salvage-envelope.d.ts +3 -1
  339. package/dist/schemas.d.ts +116 -116
  340. package/dist/{scope-profiles--vfXPl3X.d.ts → scope-profiles-NzGPDXLn.d.ts} +1 -1
  341. package/dist/search/embed-helper.d.ts +3 -1
  342. package/dist/search/factory.d.ts +3 -1
  343. package/dist/search/factory.js +6 -6
  344. package/dist/search/index.d.ts +3 -1
  345. package/dist/search/index.js +12 -12
  346. package/dist/search/lancedb-backend.d.ts +3 -1
  347. package/dist/search/meilisearch-backend.d.ts +3 -1
  348. package/dist/search/noop-backend.d.ts +3 -1
  349. package/dist/search/orama-backend.d.ts +3 -1
  350. package/dist/search/port.d.ts +3 -1
  351. package/dist/search/remote-backend.d.ts +3 -1
  352. package/dist/{semantic-consolidation-BBDuP9nJ.d.ts → semantic-consolidation-DLDKvyy5.d.ts} +1 -1
  353. package/dist/semantic-consolidation.d.ts +4 -2
  354. package/dist/semantic-consolidation.js +11 -10
  355. package/dist/semantic-rule-promotion.js +10 -9
  356. package/dist/semantic-rule-verifier.d.ts +3 -1
  357. package/dist/semantic-rule-verifier.js +10 -9
  358. package/dist/{service-B8DtbpCM.d.ts → service-BIgVM7fL.d.ts} +2 -2
  359. package/dist/session-observer-bands.d.ts +3 -1
  360. package/dist/session-observer-state.d.ts +3 -1
  361. package/dist/shared-context/manager.d.ts +11 -9
  362. package/dist/signal.d.ts +3 -1
  363. package/dist/source-agent-qualifier.d.ts +3 -1
  364. package/dist/source-agent-qualifier.js +18 -17
  365. package/dist/{storage-BkYN1RIy.d.ts → storage-CVfGWqCI.d.ts} +7 -6
  366. package/dist/storage.d.ts +4 -2
  367. package/dist/storage.js +9 -8
  368. package/dist/summarizer.d.ts +3 -1
  369. package/dist/summary-snapshot.d.ts +3 -1
  370. package/dist/temporal-supersession.d.ts +4 -2
  371. package/dist/temporal-timeline-recall.d.ts +3 -1
  372. package/dist/temporal-validity.d.ts +3 -1
  373. package/dist/threading.d.ts +3 -1
  374. package/dist/tier-migration.d.ts +4 -2
  375. package/dist/tier-routing.d.ts +3 -1
  376. package/dist/topics.d.ts +3 -1
  377. package/dist/transcript.d.ts +3 -1
  378. package/dist/transfer/autodetect.js +1 -1
  379. package/dist/transfer/backup.js +1 -1
  380. package/dist/transfer/capsule-export.js +2 -2
  381. package/dist/transfer/types.d.ts +66 -66
  382. package/dist/trust-score-stage.d.ts +3 -1
  383. package/dist/trust-score.d.ts +3 -1
  384. package/dist/{types-u2s9j1uD.d.ts → types-CkiDUorT.d.ts} +10 -16
  385. package/dist/types.d.ts +3 -1
  386. package/dist/types.js +1 -1
  387. package/dist/utility-runtime.d.ts +3 -1
  388. package/dist/verified-recall.js +10 -9
  389. package/dist/write-envelope.d.ts +3 -1
  390. package/package.json +2 -2
  391. package/src/archive-mutation-version.ts +59 -0
  392. package/src/config.test.ts +45 -0
  393. package/src/config.ts +10 -30
  394. package/src/contradiction/contradiction.test.ts +86 -1
  395. package/src/contradiction-config.ts +92 -0
  396. package/src/graph-path-reconstruction.ts +91 -0
  397. package/src/graph-path-scoring-config.ts +55 -0
  398. package/src/graph-path-scoring.test.ts +238 -0
  399. package/src/graph-path-scoring.ts +77 -0
  400. package/src/graph.test.ts +225 -5
  401. package/src/graph.ts +72 -5
  402. package/src/orchestration/contradiction-linking-coordinator.ts +246 -76
  403. package/src/orchestration/contradiction-localization.integration.test.ts +1953 -0
  404. package/src/orchestration/extraction-anchor-snapshot.ts +83 -0
  405. package/src/orchestration/extraction-persist-deps.ts +8 -2
  406. package/src/orchestration/extraction-persist.ts +43 -34
  407. package/src/orchestration/graph-path-state-loader.test.ts +801 -0
  408. package/src/orchestration/graph-path-state-loader.ts +318 -0
  409. package/src/orchestration/graph-recall-coordinator.integration.test.ts +1163 -0
  410. package/src/orchestration/graph-recall-coordinator.ts +206 -29
  411. package/src/orchestration/graph-recall-seam.ts +19 -0
  412. package/src/orchestration/recall-internal-deps.ts +7 -13
  413. package/src/orchestration/recall-internal.ts +5 -0
  414. package/src/orchestration/recall-introspection.ts +9 -1
  415. package/src/orchestration/recall-search-pipeline.ts +8 -13
  416. package/src/orchestration/update-localization.test.ts +784 -0
  417. package/src/orchestration/update-localization.ts +173 -0
  418. package/src/orchestrator.ts +19 -18
  419. package/src/recall-state.test.ts +29 -1
  420. package/src/recall-state.ts +13 -0
  421. package/src/recall-xray-renderer.test.ts +45 -0
  422. package/src/recall-xray-renderer.ts +16 -0
  423. package/src/recall-xray.ts +13 -0
  424. package/src/storage/supersession-side-effects.ts +97 -0
  425. package/src/storage/tombstone-blocked-capture-sync.ts +13 -5
  426. package/src/storage-contract/cache-coherence.test.ts +299 -0
  427. package/src/storage.ts +86 -88
  428. package/src/types.ts +12 -15
  429. package/dist/chunk-A4QMKFFO.js.map +0 -1
  430. package/dist/chunk-BJYET5TX.js.map +0 -1
  431. package/dist/chunk-BOFVT6P3.js.map +0 -1
  432. package/dist/chunk-IK6X5QPO.js.map +0 -1
  433. package/dist/chunk-IXXABW5A.js.map +0 -1
  434. package/dist/chunk-L2DPF4DF.js.map +0 -1
  435. package/dist/chunk-LAQ33B5D.js.map +0 -1
  436. package/dist/chunk-NSGU76YO.js.map +0 -1
  437. package/dist/chunk-PDEKQWDV.js.map +0 -1
  438. /package/dist/{graph-edge-decay-Z6ENALU2.js.map → archive-mutation-version.js.map} +0 -0
  439. /package/dist/{chunk-KDG2KTWW.js.map → chunk-33SV3E43.js.map} +0 -0
  440. /package/dist/{chunk-2HGUDBRJ.js.map → chunk-37ZO6LLJ.js.map} +0 -0
  441. /package/dist/{chunk-QW3WFHKU.js.map → chunk-45BRYON6.js.map} +0 -0
  442. /package/dist/{chunk-GZICBRWK.js.map → chunk-4F6X3RXW.js.map} +0 -0
  443. /package/dist/{chunk-7BAYBYY5.js.map → chunk-4PC4PRJE.js.map} +0 -0
  444. /package/dist/{chunk-VJXY5ZCT.js.map → chunk-52UKFTUK.js.map} +0 -0
  445. /package/dist/{chunk-ESG7Z255.js.map → chunk-5UDMFE3Q.js.map} +0 -0
  446. /package/dist/{chunk-JPHEOE6Z.js.map → chunk-6MTSFX7A.js.map} +0 -0
  447. /package/dist/{chunk-M4MP34AQ.js.map → chunk-AHZOMHWN.js.map} +0 -0
  448. /package/dist/{chunk-Z3RHPGSY.js.map → chunk-AIUBBHSF.js.map} +0 -0
  449. /package/dist/{chunk-S3AYIQCU.js.map → chunk-AXIDQG5A.js.map} +0 -0
  450. /package/dist/{chunk-QN7NTKRC.js.map → chunk-AZ2QBGYB.js.map} +0 -0
  451. /package/dist/{chunk-47J4EDGR.js.map → chunk-AZM4CCAC.js.map} +0 -0
  452. /package/dist/{chunk-LEJPSMKM.js.map → chunk-C5QLI33R.js.map} +0 -0
  453. /package/dist/{chunk-SV3PSA7Y.js.map → chunk-CV6BBVYV.js.map} +0 -0
  454. /package/dist/{chunk-V7X767RT.js.map → chunk-DCZBSE4F.js.map} +0 -0
  455. /package/dist/{chunk-7PKFPLLZ.js.map → chunk-FXTYIA46.js.map} +0 -0
  456. /package/dist/{chunk-64BHFFKZ.js.map → chunk-HLYR2TQL.js.map} +0 -0
  457. /package/dist/{chunk-5C2HNJMO.js.map → chunk-J5LLX6IL.js.map} +0 -0
  458. /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
  459. /package/dist/{chunk-PLKFO2HJ.js.map → chunk-JL43BVDE.js.map} +0 -0
  460. /package/dist/{chunk-2S72LWKX.js.map → chunk-JYL3BVVZ.js.map} +0 -0
  461. /package/dist/{chunk-IPLYGWQF.js.map → chunk-KQAFEZQX.js.map} +0 -0
  462. /package/dist/{chunk-PYKKWQZ2.js.map → chunk-M7BXDKPR.js.map} +0 -0
  463. /package/dist/{chunk-Z54EM5YZ.js.map → chunk-MAXVH44E.js.map} +0 -0
  464. /package/dist/{chunk-LYMNZZIM.js.map → chunk-NIS256NW.js.map} +0 -0
  465. /package/dist/{chunk-67QG75MJ.js.map → chunk-NLK2VZYZ.js.map} +0 -0
  466. /package/dist/{chunk-JYIFGGEM.js.map → chunk-OUKBMQ2O.js.map} +0 -0
  467. /package/dist/{chunk-75XOWNRS.js.map → chunk-OYESWJ43.js.map} +0 -0
  468. /package/dist/{chunk-TS4AJ2GI.js.map → chunk-PA45XCUD.js.map} +0 -0
  469. /package/dist/{chunk-4MBPIL4V.js.map → chunk-PUSLMZBQ.js.map} +0 -0
  470. /package/dist/{chunk-RVO6TCTU.js.map → chunk-QCECHYZL.js.map} +0 -0
  471. /package/dist/{chunk-GFIKG4FR.js.map → chunk-QGR6OVGT.js.map} +0 -0
  472. /package/dist/{chunk-HNZKVLAN.js.map → chunk-S354QO4R.js.map} +0 -0
  473. /package/dist/{chunk-NO37MR45.js.map → chunk-SOEN6KCF.js.map} +0 -0
  474. /package/dist/{chunk-FXX6RQYC.js.map → chunk-TPTECFWR.js.map} +0 -0
  475. /package/dist/{chunk-GDDGZVFI.js.map → chunk-UEVLYVNW.js.map} +0 -0
  476. /package/dist/{chunk-YQ4IQ2GA.js.map → chunk-UT5BV5OG.js.map} +0 -0
  477. /package/dist/{chunk-LNTUXKBT.js.map → chunk-UYYW2KPU.js.map} +0 -0
  478. /package/dist/{chunk-QSYL5CXK.js.map → chunk-VKXWK44Q.js.map} +0 -0
  479. /package/dist/{chunk-KMWYZTIE.js.map → chunk-VMMQDEN5.js.map} +0 -0
  480. /package/dist/{chunk-JB6D7EFB.js.map → chunk-VVG2BOKA.js.map} +0 -0
  481. /package/dist/{chunk-V5H6OJCR.js.map → chunk-W5XVQFLM.js.map} +0 -0
  482. /package/dist/{chunk-OIOZ6MOP.js.map → chunk-W6FNX2LP.js.map} +0 -0
  483. /package/dist/{chunk-6QPHF6RR.js.map → chunk-WQM326GS.js.map} +0 -0
  484. /package/dist/{chunk-TQFHQPWD.js.map → chunk-XADV5IZ3.js.map} +0 -0
  485. /package/dist/{chunk-DATDLJAO.js.map → chunk-XAPMEU3K.js.map} +0 -0
  486. /package/dist/{chunk-N3LL5NEU.js.map → chunk-ZMYDYNI4.js.map} +0 -0
@@ -1,10 +1,12 @@
1
- import { GraphType } from './graph.js';
1
+ import { G as GraphType } from './graph-444E-DrF.js';
2
2
  import './capabilities.js';
3
- import './types-u2s9j1uD.js';
3
+ import './types-CkiDUorT.js';
4
4
  import './message-parts/index.js';
5
5
  import './bounded-jsonl-state.js';
6
6
  import './operator-doctor-types.js';
7
7
  import './external-wiki-config.js';
8
+ import './contradiction-config.js';
9
+ import './graph-path-scoring-config.js';
8
10
  import './types-continuity.js';
9
11
 
10
12
  /**
@@ -4,8 +4,9 @@ import {
4
4
  buildGraphSnapshot,
5
5
  normalizeGraphSnapshotLimit,
6
6
  parseGraphSnapshotSince
7
- } from "./chunk-JYIFGGEM.js";
8
- import "./chunk-L2DPF4DF.js";
7
+ } from "./chunk-OUKBMQ2O.js";
8
+ import "./chunk-BIJAWZYW.js";
9
+ import "./chunk-LXY5VVGM.js";
9
10
  import "./chunk-2LSZVONP.js";
10
11
  import "./chunk-DEUNUKTD.js";
11
12
  import "./chunk-PZ5AY32C.js";
package/dist/graph.d.ts CHANGED
@@ -1,323 +1,10 @@
1
- import { GraphConstructionCapabilitySet } from './capabilities.js';
2
- import './types-u2s9j1uD.js';
1
+ import './capabilities.js';
2
+ export { A as ActivationPath, f as ActivationPredecessor, C as CAUSAL_PHRASES, D as DEFAULT_GRAPH_TRAVERSAL_CONFIDENCE_FLOOR, h as DEFAULT_GRAPH_TRAVERSAL_PAGERANK_ITERATIONS, i as GraphConfig, a as GraphEdge, j as GraphHealthFileStats, b as GraphHealthReport, c as GraphIndex, G as GraphType, k as analyzeGraphHealth, l as appendEdge, m as applyLateralInhibition, n as applyPageRankRefinement, o as clampConfidenceFloor, p as clampPageRankIterations, q as detectCausalPhrase, s as ensureGraphsDir, t as graphFilePath, u as graphsDir, v as readAllEdges, w as readEdges, x as readEdgesStrict, r as reconstructActivationPath, y as withGraphWriteLock } from './graph-444E-DrF.js';
3
+ import './types-CkiDUorT.js';
3
4
  import './message-parts/index.js';
4
5
  import './bounded-jsonl-state.js';
5
6
  import './operator-doctor-types.js';
6
7
  import './external-wiki-config.js';
8
+ import './contradiction-config.js';
9
+ import './graph-path-scoring-config.js';
7
10
  import './types-continuity.js';
8
-
9
- /**
10
- * Multi-Graph Memory (MAGMA/SYNAPSE-inspired, v8.2)
11
- *
12
- * Maintains three typed edge graphs:
13
- * entity.jsonl — memories sharing a named entity (entityRef)
14
- * time.jsonl — consecutive memories in the same thread/session
15
- * causal.jsonl — memories linked by causal language heuristics
16
- *
17
- * Stored under `<memoryDir>/state/graphs/`.
18
- * All writes are fail-open: errors are caught/logged, never thrown.
19
- */
20
-
21
- type GraphType = "entity" | "time" | "causal";
22
- interface GraphEdge {
23
- from: string;
24
- to: string;
25
- type: GraphType;
26
- weight: number;
27
- label: string;
28
- ts: string;
29
- confidence?: number;
30
- lastReinforcedAt?: string;
31
- }
32
- interface GraphConfig {
33
- multiGraphMemoryEnabled: boolean;
34
- entityGraphEnabled: boolean;
35
- timeGraphEnabled: boolean;
36
- causalGraphEnabled: boolean;
37
- maxGraphTraversalSteps: number;
38
- graphActivationDecay: number;
39
- maxEntityGraphEdgesPerMemory: number;
40
- graphLateralInhibitionEnabled: boolean;
41
- graphLateralInhibitionBeta: number;
42
- graphLateralInhibitionTopM: number;
43
- /**
44
- * Issue #681 PR 3/3 — minimum edge confidence required for traversal.
45
- * Edges with confidence below this floor are pruned. Legacy edges
46
- * (no `confidence` field) are treated as 1.0 and always pass.
47
- * Range `[0, 1]`. Default 0.2.
48
- */
49
- graphTraversalConfidenceFloor: number;
50
- /**
51
- * Issue #681 PR 3/3 — number of PageRank-style refinement iterations
52
- * applied on top of BFS activation. Set to 0 to disable refinement
53
- * and return raw BFS scores. Default 8.
54
- */
55
- graphTraversalPageRankIterations: number;
56
- /**
57
- * Issue #1904 — incremental GraphIndex edge cache. When true (the default,
58
- * and the value when omitted), a single-writer edge append is pushed into the
59
- * warm edge cache in place (revalidated by file size for cross-process
60
- * coherence) instead of nulling the cache and paying a full 6 MB re-read +
61
- * parse on the next traversal. Set false to restore the pre-#1904
62
- * null-on-every-write behavior. Optional here (unlike the required
63
- * PluginConfig field parseConfig always sets) so GraphConfig can still be
64
- * constructed directly with a partial config; only an explicit `false` opts
65
- * out, so an omitted field keeps the incremental default.
66
- */
67
- graphEdgeCacheIncrementalEnabled?: boolean;
68
- }
69
- /** Default minimum edge confidence required for traversal (issue #681 PR 3/3). */
70
- declare const DEFAULT_GRAPH_TRAVERSAL_CONFIDENCE_FLOOR = 0.2;
71
- /** Default PageRank-style refinement iteration count (issue #681 PR 3/3). */
72
- declare const DEFAULT_GRAPH_TRAVERSAL_PAGERANK_ITERATIONS = 8;
73
- declare const CAUSAL_PHRASES: string[];
74
- declare function graphsDir(memoryDir: string): string;
75
- declare function graphFilePath(memoryDir: string, type: GraphType): string;
76
- declare function ensureGraphsDir(memoryDir: string): Promise<void>;
77
- /**
78
- * Run `fn` while holding the write lock for the given graph JSONL file.
79
- *
80
- * The lock is keyed by absolute file path so concurrent writes to
81
- * different graph types proceed independently. The chain recovers from
82
- * rejection (gotcha #40) so a single I/O failure does not poison all
83
- * future writers, but the original error is still surfaced to the
84
- * caller of `withGraphWriteLock`.
85
- */
86
- declare function withGraphWriteLock<T>(filePath: string, fn: () => Promise<T>): Promise<T>;
87
- declare function appendEdge(memoryDir: string, edge: GraphEdge): Promise<void>;
88
- /**
89
- * Read all edges of a given type from the JSONL file.
90
- * Returns [] if the file doesn't exist or any read error occurs (fail-open).
91
- *
92
- * Production traversal callers (recall/PageRank) depend on this fail-open
93
- * posture so a temporarily missing or unreadable graph file never blocks
94
- * a recall. Maintenance jobs that need to distinguish ENOENT from real
95
- * I/O failures must use {@link readEdgesStrict} instead.
96
- */
97
- declare function readEdges(memoryDir: string, type: GraphType): Promise<GraphEdge[]>;
98
- /**
99
- * Same as {@link readEdges} but only swallows `ENOENT`; all other read
100
- * errors (`EACCES`, `EIO`, …) are propagated. Used by the graph-edge
101
- * decay maintenance job so I/O outages surface as a failed run instead
102
- * of being silently reported as "no edges to decay" (issue #729 /
103
- * Codex P1, line 120).
104
- */
105
- declare function readEdgesStrict(memoryDir: string, type: GraphType): Promise<GraphEdge[]>;
106
- /**
107
- * Read edges from all enabled graph types.
108
- */
109
- declare function readAllEdges(memoryDir: string, graphCaps: Pick<GraphConstructionCapabilitySet, "entityGraph" | "timeGraph" | "causalGraph">): Promise<GraphEdge[]>;
110
- interface GraphHealthFileStats {
111
- type: GraphType;
112
- filePath: string;
113
- exists: boolean;
114
- totalLines: number;
115
- validEdges: number;
116
- corruptLines: number;
117
- uniqueNodes: number;
118
- }
119
- interface GraphHealthReport {
120
- generatedAt: string;
121
- enabledTypes: GraphType[];
122
- totals: {
123
- totalLines: number;
124
- validEdges: number;
125
- corruptLines: number;
126
- uniqueNodes: number;
127
- };
128
- files: GraphHealthFileStats[];
129
- repairGuidance?: string[];
130
- }
131
- declare function analyzeGraphHealth(memoryDir: string, options?: {
132
- entityGraphEnabled?: boolean;
133
- timeGraphEnabled?: boolean;
134
- causalGraphEnabled?: boolean;
135
- includeRepairGuidance?: boolean;
136
- }): Promise<GraphHealthReport>;
137
- /**
138
- * Detect causal signal phrases in text. Returns the first matched phrase, or null.
139
- */
140
- declare function detectCausalPhrase(text: string): string | null;
141
- declare class GraphIndex {
142
- private readonly memoryDir;
143
- private readonly cfg;
144
- private edgeCache;
145
- private static readonly EDGE_CACHE_TTL_MS;
146
- constructor(memoryDir: string, cfg: GraphConfig);
147
- /** Clear the edge cache so the next spreadingActivation() re-reads from disk.
148
- * Call after any code path that appends edges outside of onMemoryWritten(). */
149
- invalidateEdgeCache(): void;
150
- private loadEdgesCached;
151
- /**
152
- * Identity ({ size, mtimeMs, ino }) of each ENABLED graph file (issue #1904).
153
- * Missing files (ENOENT) and any stat error map to the all-zero sentinel so
154
- * the baseline is fail-open: a later revalidation sees a mismatch (or a peer
155
- * creation flipping ino from 0 to non-zero) and forces a full reload rather
156
- * than trusting a stale incremental push.
157
- */
158
- private readEnabledGraphFileMeta;
159
- /** True iff both metadata maps carry identical identity for every key. */
160
- private graphFileMetaEqual;
161
- /**
162
- * Re-stat every graph file whose identity the cache just committed and return
163
- * false if any has moved since (issue #1904, Codex). Closes the validation→
164
- * in-place-push TOCTOU window: a peer process (concurrent CLI / daemon /
165
- * decay job) can append between edgeFilesUnchangedExceptOurAppends()'s final
166
- * stat and the allEdges.push(...). Without this re-check the cache would be
167
- * accepted with identity predating the peer write and miss the peer edge for
168
- * the TTL. A residual infinitesimal window (peer writes during this re-stat)
169
- * remains and is TTL-bounded.
170
- */
171
- private edgeCacheIdentityUnchangedSinceCommit;
172
- /**
173
- * Called after a memory is written to disk.
174
- *
175
- * @param memoryPath - relative path from memoryDir (e.g. "facts/2026-02-22/abc.md")
176
- * @param entityRef - entityRef frontmatter field (if any)
177
- * @param content - full memory text (for causal detection)
178
- * @param created - ISO timestamp of this memory
179
- * @param threadId - current thread ID (for time graph)
180
- * @param recentInThread - paths of the N most-recent memories in this thread (for time graph)
181
- * @param entitySiblings - paths of other memories that share the same entityRef (for entity graph)
182
- */
183
- onMemoryWritten(opts: {
184
- memoryPath: string;
185
- entityRef?: string;
186
- content: string;
187
- created: string;
188
- threadId?: string;
189
- recentInThread?: string[];
190
- entitySiblings?: string[];
191
- causalPredecessor?: string;
192
- /**
193
- * Optional frozen gate overrides (from GraphConstructionCapabilitySet).
194
- * When provided, these take precedence over `this.cfg` so the caller's
195
- * operation-scoped snapshot is the single source of truth (#1566).
196
- */
197
- graphCapsOverride?: {
198
- entityGraph: boolean;
199
- timeGraph: boolean;
200
- causalGraph: boolean;
201
- multiGraphMemory: boolean;
202
- };
203
- }): Promise<void>;
204
- /**
205
- * Cross-process coherence check for the incremental edge cache (issue #1904).
206
- *
207
- * Returns true iff every ENABLED graph file's current identity is explained
208
- * ENTIRELY by THIS call's own append — no other process wrote to any graph
209
- * file since load. Per file:
210
- * - inode must be unchanged. A local append (`appendFile`) keeps the inode;
211
- * an external atomic temp+rename rewrite (e.g. the edge-decay job) changes
212
- * it, so an inode change — even one that preserves byte length, such as
213
- * decaying confidence 0.9->0.8 — forces a reload (Codex).
214
- * - a file WE appended to (delta > 0): size must equal baseline + our exact
215
- * appended bytes. If it was absent at load (sentinel ino 0), our append
216
- * created it, so we accept size === delta and adopt the new identity.
217
- * - a file we did NOT touch (delta 0): size AND mtime must be unchanged, so
218
- * an in-place equal-length rewrite (mtime bump) or a peer append (size
219
- * bump) both force a reload.
220
- * On success it commits the new identity baseline so the next append
221
- * revalidates against post-this-write truth. Fail-open: an unreadable file
222
- * (non-ENOENT) returns false, forcing a full reload.
223
- */
224
- private edgeFilesUnchangedExceptOurAppends;
225
- /**
226
- * Spreading activation BFS (SYNAPSE-inspired).
227
- *
228
- * Starting from `seeds`, traverse the combined graph for up to `maxSteps` hops.
229
- * Each candidate gets an activation score = edge.weight × edgeConfidence × decay^hop.
230
- *
231
- * Issue #681 PR 3/3 — confidence-aware traversal:
232
- * - Each edge's `weight` is multiplied by its `confidence` (legacy edges
233
- * missing `confidence` are treated as 1.0, preserving prior behavior).
234
- * - Edges with `confidence < graphTraversalConfidenceFloor` are pruned and
235
- * contribute neither activation nor downstream neighbors.
236
- * - When `graphTraversalPageRankIterations > 0`, an additional PageRank-
237
- * style refinement pass redistributes activation along confidence-weighted
238
- * edges, sharpening the ranking among multi-hop candidates.
239
- * - Per-result provenance includes the highest-confidence edge that landed
240
- * on each candidate, so the X-ray surface can attribute pruning and
241
- * ranking decisions back to specific edges.
242
- *
243
- * @param seeds - initial memory paths to expand from (e.g. QMD top results)
244
- * @param maxSteps - max BFS hops (from config: maxGraphTraversalSteps)
245
- * @returns Array of {path, score, edgeConfidence, ...} sorted descending, not including seed paths
246
- */
247
- spreadingActivation(seeds: string[], maxSteps?: number, opts?: {
248
- /**
249
- * Issue #681 — when `true`, bypasses the configured
250
- * `graphTraversalConfidenceFloor` and includes low-confidence
251
- * edges in traversal. Equivalent to forcing the floor to `0`.
252
- * Default `false` (floor from config is applied).
253
- */
254
- includeLowConfidence?: boolean;
255
- /** Absolute deadline in ms-since-epoch for post-retrieval assembly. */
256
- deadlineAtMs?: number;
257
- }): Promise<Array<{
258
- path: string;
259
- score: number;
260
- seed: string;
261
- hopDepth: number;
262
- decayedWeight: number;
263
- graphType: "entity" | "time" | "causal";
264
- /**
265
- * Confidence of the edge that produced this candidate's recorded
266
- * provenance (the strongest edge along the chosen entry path).
267
- * In `[0, 1]`. Legacy edges without `confidence` surface as 1.0.
268
- */
269
- edgeConfidence: number;
270
- }>>;
271
- }
272
- /**
273
- * Clamp `graphTraversalConfidenceFloor` into the legal range `[0, 1]`.
274
- * Non-finite or non-numeric values fall back to the documented default
275
- * so misconfiguration cannot silently disable the floor or reject every edge.
276
- *
277
- * Exported for tests; call sites in `spreadingActivation` use it to make
278
- * the contract explicit at every boundary.
279
- */
280
- declare function clampConfidenceFloor(raw: unknown): number;
281
- /**
282
- * Clamp `graphTraversalPageRankIterations` into a non-negative integer.
283
- * Negative or non-finite values fall back to 0 (disable refinement) so
284
- * misconfiguration cannot stall recall in an unbounded loop.
285
- */
286
- declare function clampPageRankIterations(raw: unknown): number;
287
- /**
288
- * PageRank-style refinement on top of the BFS activation map.
289
- *
290
- * Each iteration redistributes a fraction of every node's score along
291
- * its outgoing edges, scaled by edge confidence. Confidence below
292
- * `floor` is filtered out before redistribution, mirroring the BFS
293
- * pruning rule. Mutates `scores` in place.
294
- *
295
- * Exported for tests; in production, call sites pass the same adjacency
296
- * map already used by BFS so behavior stays consistent.
297
- */
298
- declare function applyPageRankRefinement(scores: Map<string, number>, adj: Map<string, GraphEdge[]>, opts: {
299
- iterations: number;
300
- floor: number;
301
- damping: number;
302
- deadlineAtMs?: number;
303
- }): void;
304
- /**
305
- * Lateral inhibition (Synapse-inspired).
306
- *
307
- * For each node, the top-M higher-activation competitors exert inhibition
308
- * proportional to their activation difference. Output is clamped to [0, ∞).
309
- *
310
- * No sigmoid is applied here — downstream `normalizeGraphActivationScore`
311
- * already applies x/(1+x) soft squash, so adding a sigmoid would double-
312
- * normalize and cap graph influence at ~50%.
313
- *
314
- * Formula: u_hat_i = max(0, u_i - beta * sum_{k in top-M where u_k > u_i}(u_k - u_i))
315
- *
316
- * When beta=0 or topM=0, returns original scores unchanged (no-op).
317
- */
318
- declare function applyLateralInhibition(scores: Map<string, number>, opts: {
319
- beta: number;
320
- topM: number;
321
- }): Map<string, number>;
322
-
323
- export { CAUSAL_PHRASES, DEFAULT_GRAPH_TRAVERSAL_CONFIDENCE_FLOOR, DEFAULT_GRAPH_TRAVERSAL_PAGERANK_ITERATIONS, type GraphConfig, type GraphEdge, type GraphHealthFileStats, type GraphHealthReport, GraphIndex, type GraphType, analyzeGraphHealth, appendEdge, applyLateralInhibition, applyPageRankRefinement, clampConfidenceFloor, clampPageRankIterations, detectCausalPhrase, ensureGraphsDir, graphFilePath, graphsDir, readAllEdges, readEdges, readEdgesStrict, withGraphWriteLock };
package/dist/graph.js CHANGED
@@ -17,7 +17,10 @@ import {
17
17
  readEdges,
18
18
  readEdgesStrict,
19
19
  withGraphWriteLock
20
- } from "./chunk-L2DPF4DF.js";
20
+ } from "./chunk-BIJAWZYW.js";
21
+ import {
22
+ reconstructActivationPath
23
+ } from "./chunk-LXY5VVGM.js";
21
24
  import "./chunk-2LSZVONP.js";
22
25
  import "./chunk-DEUNUKTD.js";
23
26
  import "./chunk-PZ5AY32C.js";
@@ -39,6 +42,7 @@ export {
39
42
  readAllEdges,
40
43
  readEdges,
41
44
  readEdgesStrict,
45
+ reconstructActivationPath,
42
46
  withGraphWriteLock
43
47
  };
44
48
  //# sourceMappingURL=graph.js.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  searchHarmonicRetrieval
3
- } from "./chunk-QN7NTKRC.js";
3
+ } from "./chunk-AZ2QBGYB.js";
4
4
  import "./chunk-ACPCA4NO.js";
5
5
  import "./chunk-DJUKBGAD.js";
6
6
  import "./chunk-G73MCJKL.js";
@@ -1,8 +1,10 @@
1
- import { _ as ImportanceLevel, M as MemoryFile, aq as ImportanceScore, w as MemoryCategory } from './types-u2s9j1uD.js';
1
+ import { _ as ImportanceLevel, M as MemoryFile, aq as ImportanceScore, w as MemoryCategory } from './types-CkiDUorT.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
5
5
  import './external-wiki-config.js';
6
+ import './contradiction-config.js';
7
+ import './graph-path-scoring-config.js';
6
8
  import './types-continuity.js';
7
9
 
8
10
  /**
@@ -1,8 +1,10 @@
1
- import { a8 as ImportTurn } from '../types-u2s9j1uD.js';
1
+ import { a8 as ImportTurn } from '../types-CkiDUorT.js';
2
2
  import '../message-parts/index.js';
3
3
  import '../bounded-jsonl-state.js';
4
4
  import '../operator-doctor-types.js';
5
5
  import '../external-wiki-config.js';
6
+ import '../contradiction-config.js';
7
+ import '../graph-path-scoring-config.js';
6
8
  import '../types-continuity.js';
7
9
 
8
10
  /**
@@ -1,8 +1,10 @@
1
- import { M as MemoryFile } from './types-u2s9j1uD.js';
1
+ import { M as MemoryFile } from './types-CkiDUorT.js';
2
2
  import './message-parts/index.js';
3
3
  import './bounded-jsonl-state.js';
4
4
  import './operator-doctor-types.js';
5
5
  import './external-wiki-config.js';
6
+ import './contradiction-config.js';
7
+ import './graph-path-scoring-config.js';
6
8
  import './types-continuity.js';
7
9
 
8
10
  /**