@remnic/core 9.48.1 → 9.49.1
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/abstraction-nodes.d.ts +12 -1
- package/dist/abstraction-nodes.js +9 -2
- package/dist/access-admin-ops-surface.d.ts +11 -10
- package/dist/access-admin-ops-surface.js +46 -45
- package/dist/access-audit.js +2 -2
- package/dist/access-authorization-probe.d.ts +11 -10
- package/dist/access-authorization-probe.js +47 -46
- package/dist/access-boundary.d.ts +11 -10
- package/dist/access-boundary.js +46 -45
- package/dist/access-cli.js +127 -121
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +11 -10
- package/dist/access-extraction-force-flush.js +46 -45
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +11 -10
- package/dist/access-http-lifecycle-flush.d.ts +11 -10
- package/dist/access-http-offline-stream.d.ts +11 -10
- package/dist/access-http-query.js +46 -45
- package/dist/access-http.d.ts +11 -10
- package/dist/access-http.js +57 -56
- package/dist/access-identity-continuity-surface.d.ts +9 -8
- package/dist/access-identity-continuity-surface.js +46 -45
- package/dist/access-lcm-surface.d.ts +11 -10
- package/dist/access-lcm-surface.js +46 -45
- package/dist/access-mcp.d.ts +11 -10
- package/dist/access-mcp.js +52 -51
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/{access-namespace-preflight--H6HwN85.d.ts → access-namespace-preflight-DuDU301-.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +46 -45
- package/dist/access-observe-write-surface.d.ts +11 -10
- package/dist/access-observe-write-surface.js +46 -45
- package/dist/access-offline-manifest.d.ts +9 -8
- package/dist/access-offline-manifest.js +3 -3
- package/dist/access-operations-batch.js +48 -47
- package/dist/access-operations.d.ts +14 -13
- package/dist/access-operations.js +51 -50
- package/dist/access-recall-concurrency.d.ts +11 -10
- package/dist/access-recall-concurrency.js +46 -45
- package/dist/access-recall-response.d.ts +11 -10
- package/dist/access-recall-response.js +46 -45
- package/dist/access-recall-surface.d.ts +11 -10
- package/dist/access-recall-surface.js +46 -45
- package/dist/access-schema.d.ts +105 -105
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-andNjwfD.d.ts → access-service--_3T_v23.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +11 -10
- package/dist/access-service.d.ts +11 -10
- package/dist/access-service.js +46 -45
- package/dist/access-surface-catalog.d.ts +11 -10
- package/dist/access-wearables-meetings-surface.d.ts +4 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +3 -2
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-7O6RP2RT.js → auto-sync-QFQGOEO2.js} +4 -4
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -8
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +15 -14
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/buffer.js +4 -4
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{capsule-merge-Q6AR3XL7.js → capsule-merge-KXTRZ23Z.js} +6 -6
- package/dist/{catalog-Iwbk9h5E.d.ts → catalog-DjUmUIal.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +3 -3
- package/dist/causal-chain.js +3 -3
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +19 -18
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +3 -3
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory.d.ts +51 -2
- package/dist/causal-trajectory.js +8 -2
- package/dist/{chunk-PLCZD3LG.js → chunk-24BKGKGO.js} +91 -45
- package/dist/chunk-24BKGKGO.js.map +1 -0
- package/dist/{chunk-ICP53SKG.js → chunk-2HIJHXB3.js} +2 -2
- package/dist/{chunk-LZGCJSQR.js → chunk-3LD4N2TF.js} +151 -37
- package/dist/chunk-3LD4N2TF.js.map +1 -0
- package/dist/{chunk-FJ2ND6CZ.js → chunk-47J4EDGR.js} +2 -2
- package/dist/{chunk-S55OAS5P.js → chunk-4EABKPZS.js} +4 -4
- package/dist/{chunk-GD7UPIBG.js → chunk-4JWJMRPJ.js} +2 -2
- package/dist/{chunk-3NDN5P55.js → chunk-4S3ECH3U.js} +2 -2
- package/dist/chunk-5GINB5LC.js +13 -0
- package/dist/chunk-5GINB5LC.js.map +1 -0
- package/dist/{chunk-CGASUJVP.js → chunk-5V6IXHPI.js} +4 -4
- package/dist/{chunk-A4JMGKCD.js → chunk-5XCN4XBU.js} +4 -4
- package/dist/{chunk-2RPJ4NEE.js → chunk-64BHFFKZ.js} +2 -2
- package/dist/{chunk-FQC3DHH2.js → chunk-66SE3BNH.js} +2 -2
- package/dist/{chunk-TERNBNJB.js → chunk-6FC3IZ26.js} +2 -2
- package/dist/{chunk-53AJILXF.js → chunk-6XGEBQ3R.js} +4 -4
- package/dist/{chunk-IP3DHDU2.js → chunk-7BLWBSRL.js} +3 -3
- package/dist/{chunk-A2TFK5PG.js → chunk-7NDM2PNK.js} +3 -3
- package/dist/{chunk-HRMEYQRO.js → chunk-7VWZ4LRW.js} +2 -2
- package/dist/{chunk-RN53QBM4.js → chunk-A4QMKFFO.js} +5 -1
- package/dist/chunk-A4QMKFFO.js.map +1 -0
- package/dist/chunk-ACPCA4NO.js +321 -0
- package/dist/chunk-ACPCA4NO.js.map +1 -0
- package/dist/chunk-AMTEYNYK.js +72 -0
- package/dist/chunk-AMTEYNYK.js.map +1 -0
- package/dist/{chunk-R6YJI3HE.js → chunk-AW4QUFQF.js} +1 -1
- package/dist/{chunk-P65YJEEL.js → chunk-AXFWMRKI.js} +2 -2
- package/dist/{chunk-WG5HSQ4P.js → chunk-BAKXNQ3C.js} +2 -2
- package/dist/{chunk-NM2WP3B7.js → chunk-BJYET5TX.js} +2 -2
- package/dist/{chunk-HLKPRWF4.js → chunk-DATDLJAO.js} +6 -6
- package/dist/chunk-DJUKBGAD.js +260 -0
- package/dist/chunk-DJUKBGAD.js.map +1 -0
- package/dist/{chunk-DX3XRGLH.js → chunk-DQTCGVFK.js} +2 -2
- package/dist/{chunk-HIDEBEAN.js → chunk-E633OXMH.js} +11 -11
- package/dist/{chunk-J7T4MX7P.js → chunk-EEAMSNSG.js} +12 -1
- package/dist/chunk-EEAMSNSG.js.map +1 -0
- package/dist/{chunk-EZNXW27Q.js → chunk-ELQCS47S.js} +4 -4
- package/dist/{chunk-HAYSYUAB.js → chunk-EURCX6PS.js} +2 -2
- package/dist/{chunk-RSPSHRZA.js → chunk-FV7YQTN3.js} +2 -2
- package/dist/chunk-G73MCJKL.js +20 -0
- package/dist/chunk-G73MCJKL.js.map +1 -0
- package/dist/{chunk-GWHPQOUC.js → chunk-GGBSF2X7.js} +2 -2
- package/dist/{chunk-SYUBB3WM.js → chunk-GKEYXXKX.js} +2 -2
- package/dist/{chunk-PELT6ADC.js → chunk-GSEPRIZC.js} +3 -3
- package/dist/{chunk-UTVZKHJK.js → chunk-GUKBW4HL.js} +2 -2
- package/dist/chunk-GXSOUIA4.js +293 -0
- package/dist/chunk-GXSOUIA4.js.map +1 -0
- package/dist/{chunk-2F6NP3NT.js → chunk-HDQUQBPW.js} +2 -2
- package/dist/{chunk-6HMYUWXR.js → chunk-HTP6XRUI.js} +2 -2
- package/dist/{chunk-UYUYZ4WY.js → chunk-IARXXZU4.js} +2 -2
- package/dist/{chunk-MNB5RMAY.js → chunk-IIFFC3RL.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-IPLYGWQF.js} +5 -5
- package/dist/{chunk-NZBZ7IS2.js → chunk-JDCQK3C5.js} +2 -2
- package/dist/{chunk-ANCC3JJH.js → chunk-JI62YGPI.js} +2 -2
- package/dist/{chunk-LULR4IUW.js → chunk-KATEWTQJ.js} +2 -2
- package/dist/{chunk-IJ7HK452.js → chunk-KMAP7SNQ.js} +2 -2
- package/dist/{chunk-PRVJH7CY.js → chunk-KMWYZTIE.js} +2 -2
- package/dist/{chunk-JGSKJHF7.js → chunk-KQS72GCR.js} +2 -2
- package/dist/{chunk-3S63QIFQ.js → chunk-LAQ33B5D.js} +1 -1
- package/dist/chunk-LAQ33B5D.js.map +1 -0
- package/dist/chunk-LNTUXKBT.js +224 -0
- package/dist/chunk-LNTUXKBT.js.map +1 -0
- package/dist/{chunk-FMCHFSZF.js → chunk-LQKXVQZR.js} +12 -12
- package/dist/{chunk-M4DMO67I.js → chunk-LTOAJXZB.js} +4 -4
- package/dist/{chunk-NIS256NW.js → chunk-LYMNZZIM.js} +2 -2
- package/dist/{chunk-W4FBGYGK.js → chunk-M4MP34AQ.js} +189 -5
- package/dist/chunk-M4MP34AQ.js.map +1 -0
- package/dist/{chunk-3PY7VHV7.js → chunk-MCA2X4WH.js} +2 -2
- package/dist/{chunk-S5NZBKKQ.js → chunk-N3CXAYPJ.js} +3 -3
- package/dist/{chunk-WQIHRA5F.js → chunk-N3LL5NEU.js} +2 -2
- package/dist/{chunk-G2RBWVFQ.js → chunk-NKL25FCF.js} +2 -2
- package/dist/{chunk-LMDRGRJ2.js → chunk-NOB2T2FC.js} +2 -2
- package/dist/{chunk-P2OTGMTR.js → chunk-NSGU76YO.js} +2 -2
- package/dist/{chunk-D5NGH2EW.js → chunk-O76MWTVS.js} +2 -2
- package/dist/{chunk-WZFAPHIK.js → chunk-OIOZ6MOP.js} +3 -3
- package/dist/{chunk-DNHVPZOD.js → chunk-P26YHAQH.js} +201 -1
- package/dist/chunk-P26YHAQH.js.map +1 -0
- package/dist/{chunk-UMOO7IY7.js → chunk-P2KBDJJ6.js} +2 -2
- package/dist/{chunk-KVJRXN2E.js → chunk-P4QOYG52.js} +125 -13
- package/dist/chunk-P4QOYG52.js.map +1 -0
- package/dist/chunk-P77QX3ID.js +332 -0
- package/dist/chunk-P77QX3ID.js.map +1 -0
- package/dist/{chunk-SXWHN7GC.js → chunk-PDEKQWDV.js} +2 -2
- package/dist/{chunk-2EJNXE53.js → chunk-PLCHU56K.js} +3 -3
- package/dist/{chunk-45OTV7FZ.js → chunk-PWIMF7LP.js} +38 -38
- package/dist/{chunk-7YKVM5H3.js → chunk-PWLB4TRK.js} +3 -3
- package/dist/{chunk-RVYVMQK4.js → chunk-QSYL5CXK.js} +3 -3
- package/dist/{chunk-NXUJRXSF.js → chunk-QWLW3VQH.js} +2 -2
- package/dist/chunk-RBOJCG4T.js +77 -0
- package/dist/chunk-RBOJCG4T.js.map +1 -0
- package/dist/{chunk-2P3GQVM2.js → chunk-RBPH3GZV.js} +418 -105
- package/dist/chunk-RBPH3GZV.js.map +1 -0
- package/dist/{chunk-JBPKEARU.js → chunk-RKNJBZ55.js} +4 -4
- package/dist/{chunk-QCECHYZL.js → chunk-RVO6TCTU.js} +6 -6
- package/dist/{chunk-5L7PTX2Q.js → chunk-S2SJEOTM.js} +2 -2
- package/dist/{chunk-52I3YZZ6.js → chunk-S75UQ3T3.js} +3 -3
- package/dist/{chunk-LXOM6IQU.js → chunk-SEF4IOFE.js} +2 -2
- package/dist/{chunk-DUEEQCTT.js → chunk-SHYIMIX5.js} +2 -2
- package/dist/{chunk-KSGEGHYA.js → chunk-T35UJI5R.js} +78 -74
- package/dist/chunk-T35UJI5R.js.map +1 -0
- package/dist/{chunk-7K5Q6COX.js → chunk-TVVEYCNW.js} +4 -4
- package/dist/{chunk-3JUYWPFJ.js → chunk-VFS3MK5F.js} +2 -2
- package/dist/chunk-VUDMT5CP.js +86 -0
- package/dist/chunk-VUDMT5CP.js.map +1 -0
- package/dist/{chunk-CMQZNEIF.js → chunk-WFLBP5GC.js} +8 -1
- package/dist/chunk-WFLBP5GC.js.map +1 -0
- package/dist/{chunk-WOEVJKKQ.js → chunk-WPZX7MEA.js} +4 -4
- package/dist/{chunk-ZRWB5D4H.js → chunk-WT6UL3UA.js} +2 -2
- package/dist/{chunk-MC6XO7T4.js → chunk-YLBE6PLR.js} +2 -2
- package/dist/{chunk-GF22HWS2.js → chunk-Z54EM5YZ.js} +4 -4
- package/dist/{chunk-GVX3NAUU.js → chunk-ZDAYWJV6.js} +2 -2
- package/dist/{chunk-4WBGZYZZ.js → chunk-ZJIFYUJI.js} +7 -7
- package/dist/chunk-ZJIFYUJI.js.map +1 -0
- package/dist/{chunk-JYPO7L3G.js → chunk-ZN4EYMKJ.js} +2 -2
- package/dist/{cli-p_WmVo2h.d.ts → cli-BLNmNEMT.d.ts} +16 -14
- package/dist/cli.d.ts +14 -13
- package/dist/cli.js +90 -87
- package/dist/coding/pre-action-gate.d.ts +66 -0
- package/dist/coding/pre-action-gate.js +22 -0
- package/dist/commitment-ledger.js +2 -2
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +16 -15
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +15 -14
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +15 -14
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-provenance-check.js +6 -6
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/consolidation-undo.js +5 -5
- package/dist/contradiction/index.d.ts +3 -2
- package/dist/contradiction/index.js +3 -3
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +18 -17
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-read-cancellation.d.ts +38 -0
- package/dist/corpus-read-cancellation.js +9 -0
- package/dist/corpus-read-cancellation.js.map +1 -0
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +21 -20
- package/dist/cue-anchors.d.ts +19 -1
- package/dist/cue-anchors.js +10 -2
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +10 -0
- package/dist/dependency-propagation-config.js +10 -0
- package/dist/dependency-propagation-config.js.map +1 -0
- package/dist/deterministic-order.d.ts +4 -0
- package/dist/deterministic-order.js +10 -0
- package/dist/deterministic-order.js.map +1 -0
- package/dist/direct-answer-wiring.d.ts +1 -1
- package/dist/direct-answer.d.ts +1 -1
- package/dist/embedding-fallback.d.ts +1 -1
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +15 -14
- package/dist/entity-schema.d.ts +1 -1
- package/dist/evals.js +2 -2
- package/dist/explicit-capture.d.ts +9 -8
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +11 -10
- package/dist/external-wiki-access.js +47 -46
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +11 -10
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +14 -0
- package/dist/extraction-normalization.js +22 -0
- package/dist/extraction-normalization.js.map +1 -0
- package/dist/extraction-prompt.d.ts +4 -3
- package/dist/extraction-prompt.js +3 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +18 -1
- package/dist/extraction.js +24 -21
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-ZSHEFEI3.js → first-start-migration-626C5554.js} +5 -5
- package/dist/{forget-DNAJ66ZD.js → forget-GJ42LCBW.js} +2 -2
- package/dist/graph-dashboard-diff.d.ts +1 -1
- package/dist/graph-dashboard-key.d.ts +1 -1
- package/dist/graph-dashboard-parser.d.ts +1 -1
- package/dist/graph-edge-reinforcement.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-construction.d.ts +43 -0
- package/dist/harmonic-construction.js +26 -0
- package/dist/harmonic-construction.js.map +1 -0
- package/dist/harmonic-retrieval.d.ts +1 -0
- package/dist/harmonic-retrieval.js +10 -4
- package/dist/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +47 -3
- package/dist/in-flight-reads.js +5 -3
- package/dist/index.d.ts +699 -696
- package/dist/index.js +197 -150
- package/dist/intent.d.ts +1 -1
- package/dist/json-store.d.ts +15 -1
- package/dist/json-store.js +11 -3
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +7 -7
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/archive-observations.js +2 -2
- package/dist/maintenance/atomic-file.d.ts +5 -0
- package/dist/maintenance/atomic-file.js +12 -0
- package/dist/maintenance/atomic-file.js.map +1 -0
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +15 -14
- package/dist/maintenance/migrate-observations.js +3 -3
- package/dist/maintenance/observation-ledger-utils.d.ts +1 -1
- package/dist/maintenance/observation-ledger-utils.js +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +16 -15
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +17 -16
- package/dist/maintenance/rebuild-observations.js +3 -3
- package/dist/{maintenance-BfcuwfJS.d.ts → maintenance-DKbKZi3u.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -10
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-corpus-version.js +2 -2
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +20 -19
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +15 -14
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/objective-state-writers.js +3 -3
- package/dist/objective-state.js +2 -2
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +2 -2
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +22 -21
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +31 -29
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +21 -20
- package/dist/{orchestrator-B7nLo4z1.d.ts → orchestrator-BRwD7ceU.d.ts} +7 -7
- package/dist/orchestrator.d.ts +9 -8
- package/dist/orchestrator.js +127 -121
- package/dist/page-versioning.js +5 -5
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-1h2GpiHP.d.ts → pipeline-DC-1C9T8.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +1 -1
- package/dist/proactive-contention.d.ts +1 -1
- package/dist/provenance.d.ts +1 -1
- package/dist/{qmd-UdwoF71D.d.ts → qmd-DdeCEZdb.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +2 -2
- package/dist/qmd-recall-cache.d.ts +1 -1
- package/dist/qmd.d.ts +2 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-concurrency-config.d.ts +1 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-state.js +2 -2
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/plan.d.ts +1 -1
- package/dist/relevance.js +2 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/{resolution-3K27T4VO.js → resolution-MDPNOEG6.js} +4 -4
- package/dist/resolution-MDPNOEG6.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +8 -7
- package/dist/retrieval-agents.d.ts +2 -2
- package/dist/retrieval-tiers.d.ts +1 -1
- package/dist/routing/engine.d.ts +1 -1
- package/dist/routing/store.d.ts +1 -1
- package/dist/salvage-envelope.d.ts +1 -1
- package/dist/salvage-envelope.js +3 -3
- package/dist/schemas.d.ts +213 -116
- package/dist/schemas.js +1 -1
- package/dist/{scope-profiles-APjhSe-w.d.ts → scope-profiles-BXVq4Jv0.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- package/dist/search/lancedb-backend.d.ts +1 -1
- package/dist/search/meilisearch-backend.d.ts +1 -1
- package/dist/search/noop-backend.d.ts +1 -1
- package/dist/search/orama-backend.d.ts +1 -1
- package/dist/search/port.d.ts +1 -1
- package/dist/search/remote-backend.d.ts +1 -1
- package/dist/{semantic-consolidation-CrySDbk3.d.ts → semantic-consolidation-CGYxfa8F.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +16 -15
- package/dist/semantic-rule-promotion.js +15 -14
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +15 -14
- package/dist/{service-B5W5IYCx.d.ts → service-CBDBQFCN.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +11 -11
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +19 -18
- package/dist/{storage-COL907QF.d.ts → storage-V--MQi7w.d.ts} +5 -4
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +14 -13
- package/dist/summarizer.d.ts +1 -1
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +14 -2
- package/dist/temporal-supersession.js +1 -1
- package/dist/temporal-timeline-recall.d.ts +1 -1
- package/dist/temporal-validity.d.ts +1 -1
- package/dist/threading.d.ts +1 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/{tier-stats-OPTSBNRH.js → tier-stats-2JCZYEF7.js} +5 -5
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/autodetect.js +1 -1
- package/dist/transfer/backup.js +1 -1
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +6 -6
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/trust-zones.js +2 -2
- package/dist/{types-D_Au9qJO.d.ts → types-D_a6Sqjz.d.ts} +25 -8
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-learner.js +3 -3
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/utility-runtime.js +4 -4
- package/dist/utility-telemetry.js +2 -2
- package/dist/verified-recall.js +15 -14
- package/dist/work-product-ledger.js +2 -2
- package/dist/write-envelope.d.ts +1 -1
- package/dist/write-envelope.js +2 -2
- package/package.json +32 -2
- package/src/abstraction-nodes.ts +182 -4
- package/src/causal-trajectory.ts +258 -3
- package/src/cli/harmonic-search.ts +23 -0
- package/src/cli/research-status-commands.ts +2 -1
- package/src/cli.ts +1 -24
- package/src/coding/pre-action-gate.test.ts +516 -0
- package/src/coding/pre-action-gate.ts +320 -0
- package/src/config.test.ts +85 -0
- package/src/config.ts +2 -0
- package/src/corpus-read-cancellation.ts +42 -0
- package/src/cue-anchors.test.ts +90 -0
- package/src/cue-anchors.ts +264 -11
- package/src/dependency-frontmatter.test.ts +83 -0
- package/src/dependency-propagation-config.ts +94 -0
- package/src/deterministic-order.ts +14 -0
- package/src/entity-retrieval.ts +4 -4
- package/src/extraction-normalization.ts +71 -0
- package/src/extraction-prompt.ts +45 -11
- package/src/extraction.ts +48 -32
- package/src/faithfulness-graph-guard.test.ts +27 -0
- package/src/harmonic-construction.test.ts +1799 -0
- package/src/harmonic-construction.ts +367 -0
- package/src/harmonic-retrieval.ts +166 -25
- package/src/in-flight-reads.ts +119 -6
- package/src/index.ts +4 -5
- package/src/json-store.ts +354 -12
- package/src/orchestration/consolidation-run.ts +192 -0
- package/src/orchestration/contradiction-linking-coordinator.ts +35 -1
- package/src/orchestration/dependency-propagation-triggers.test.ts +286 -0
- package/src/orchestration/dependency-propagation.test.ts +487 -0
- package/src/orchestration/dependency-propagation.ts +263 -0
- package/src/orchestration/dependency-revalidation.ts +173 -0
- package/src/orchestration/extraction-persist-deps.ts +93 -0
- package/src/orchestration/extraction-persist.ts +101 -94
- package/src/orchestration/harmonic-construction-persist.ts +86 -0
- package/src/orchestration/namespace-read-fanout.ts +13 -2
- package/src/orchestration/recall-internal-deps.ts +2 -0
- package/src/orchestration/recall-internal.ts +5 -1
- package/src/orchestration/recall-search-pipeline.ts +2 -0
- package/src/orchestration/recall-search-prefilter.ts +5 -1
- package/src/orchestrator.ts +7 -6
- package/src/schemas.ts +15 -0
- package/src/storage/entity-store.ts +9 -2
- package/src/storage/memory-read-store.ts +33 -4
- package/src/storage-contract/corpus-read-cancellation.test.ts +408 -0
- package/src/storage.ts +75 -19
- package/src/temporal-supersession.ts +29 -1
- package/src/testing/orchestrator-lite.ts +27 -8
- package/src/testing/subjects/extraction-lifecycle.test.ts +91 -50
- package/src/types.ts +22 -7
- package/dist/chunk-2P3GQVM2.js.map +0 -1
- package/dist/chunk-3S63QIFQ.js.map +0 -1
- package/dist/chunk-4WBGZYZZ.js.map +0 -1
- package/dist/chunk-CMQZNEIF.js.map +0 -1
- package/dist/chunk-DNHVPZOD.js.map +0 -1
- package/dist/chunk-FZZ2QTJI.js +0 -111
- package/dist/chunk-FZZ2QTJI.js.map +0 -1
- package/dist/chunk-J7T4MX7P.js.map +0 -1
- package/dist/chunk-KSGEGHYA.js.map +0 -1
- package/dist/chunk-KVJRXN2E.js.map +0 -1
- package/dist/chunk-LPSF4OQH.js +0 -47
- package/dist/chunk-LPSF4OQH.js.map +0 -1
- package/dist/chunk-LZGCJSQR.js.map +0 -1
- package/dist/chunk-OADWQ5CR.js +0 -115
- package/dist/chunk-OADWQ5CR.js.map +0 -1
- package/dist/chunk-PDJTHRAW.js +0 -36
- package/dist/chunk-PDJTHRAW.js.map +0 -1
- package/dist/chunk-PLCZD3LG.js.map +0 -1
- package/dist/chunk-RN53QBM4.js.map +0 -1
- package/dist/chunk-W4FBGYGK.js.map +0 -1
- /package/dist/{auto-sync-7O6RP2RT.js.map → auto-sync-QFQGOEO2.js.map} +0 -0
- /package/dist/{capsule-merge-Q6AR3XL7.js.map → capsule-merge-KXTRZ23Z.js.map} +0 -0
- /package/dist/{chunk-ICP53SKG.js.map → chunk-2HIJHXB3.js.map} +0 -0
- /package/dist/{chunk-FJ2ND6CZ.js.map → chunk-47J4EDGR.js.map} +0 -0
- /package/dist/{chunk-S55OAS5P.js.map → chunk-4EABKPZS.js.map} +0 -0
- /package/dist/{chunk-GD7UPIBG.js.map → chunk-4JWJMRPJ.js.map} +0 -0
- /package/dist/{chunk-3NDN5P55.js.map → chunk-4S3ECH3U.js.map} +0 -0
- /package/dist/{chunk-CGASUJVP.js.map → chunk-5V6IXHPI.js.map} +0 -0
- /package/dist/{chunk-A4JMGKCD.js.map → chunk-5XCN4XBU.js.map} +0 -0
- /package/dist/{chunk-2RPJ4NEE.js.map → chunk-64BHFFKZ.js.map} +0 -0
- /package/dist/{chunk-FQC3DHH2.js.map → chunk-66SE3BNH.js.map} +0 -0
- /package/dist/{chunk-TERNBNJB.js.map → chunk-6FC3IZ26.js.map} +0 -0
- /package/dist/{chunk-53AJILXF.js.map → chunk-6XGEBQ3R.js.map} +0 -0
- /package/dist/{chunk-IP3DHDU2.js.map → chunk-7BLWBSRL.js.map} +0 -0
- /package/dist/{chunk-A2TFK5PG.js.map → chunk-7NDM2PNK.js.map} +0 -0
- /package/dist/{chunk-HRMEYQRO.js.map → chunk-7VWZ4LRW.js.map} +0 -0
- /package/dist/{chunk-R6YJI3HE.js.map → chunk-AW4QUFQF.js.map} +0 -0
- /package/dist/{chunk-P65YJEEL.js.map → chunk-AXFWMRKI.js.map} +0 -0
- /package/dist/{chunk-WG5HSQ4P.js.map → chunk-BAKXNQ3C.js.map} +0 -0
- /package/dist/{chunk-NM2WP3B7.js.map → chunk-BJYET5TX.js.map} +0 -0
- /package/dist/{chunk-HLKPRWF4.js.map → chunk-DATDLJAO.js.map} +0 -0
- /package/dist/{chunk-DX3XRGLH.js.map → chunk-DQTCGVFK.js.map} +0 -0
- /package/dist/{chunk-HIDEBEAN.js.map → chunk-E633OXMH.js.map} +0 -0
- /package/dist/{chunk-EZNXW27Q.js.map → chunk-ELQCS47S.js.map} +0 -0
- /package/dist/{chunk-HAYSYUAB.js.map → chunk-EURCX6PS.js.map} +0 -0
- /package/dist/{chunk-RSPSHRZA.js.map → chunk-FV7YQTN3.js.map} +0 -0
- /package/dist/{chunk-GWHPQOUC.js.map → chunk-GGBSF2X7.js.map} +0 -0
- /package/dist/{chunk-SYUBB3WM.js.map → chunk-GKEYXXKX.js.map} +0 -0
- /package/dist/{chunk-PELT6ADC.js.map → chunk-GSEPRIZC.js.map} +0 -0
- /package/dist/{chunk-UTVZKHJK.js.map → chunk-GUKBW4HL.js.map} +0 -0
- /package/dist/{chunk-2F6NP3NT.js.map → chunk-HDQUQBPW.js.map} +0 -0
- /package/dist/{chunk-6HMYUWXR.js.map → chunk-HTP6XRUI.js.map} +0 -0
- /package/dist/{chunk-UYUYZ4WY.js.map → chunk-IARXXZU4.js.map} +0 -0
- /package/dist/{chunk-MNB5RMAY.js.map → chunk-IIFFC3RL.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-IPLYGWQF.js.map} +0 -0
- /package/dist/{chunk-NZBZ7IS2.js.map → chunk-JDCQK3C5.js.map} +0 -0
- /package/dist/{chunk-ANCC3JJH.js.map → chunk-JI62YGPI.js.map} +0 -0
- /package/dist/{chunk-LULR4IUW.js.map → chunk-KATEWTQJ.js.map} +0 -0
- /package/dist/{chunk-IJ7HK452.js.map → chunk-KMAP7SNQ.js.map} +0 -0
- /package/dist/{chunk-PRVJH7CY.js.map → chunk-KMWYZTIE.js.map} +0 -0
- /package/dist/{chunk-JGSKJHF7.js.map → chunk-KQS72GCR.js.map} +0 -0
- /package/dist/{chunk-FMCHFSZF.js.map → chunk-LQKXVQZR.js.map} +0 -0
- /package/dist/{chunk-M4DMO67I.js.map → chunk-LTOAJXZB.js.map} +0 -0
- /package/dist/{chunk-NIS256NW.js.map → chunk-LYMNZZIM.js.map} +0 -0
- /package/dist/{chunk-3PY7VHV7.js.map → chunk-MCA2X4WH.js.map} +0 -0
- /package/dist/{chunk-S5NZBKKQ.js.map → chunk-N3CXAYPJ.js.map} +0 -0
- /package/dist/{chunk-WQIHRA5F.js.map → chunk-N3LL5NEU.js.map} +0 -0
- /package/dist/{chunk-G2RBWVFQ.js.map → chunk-NKL25FCF.js.map} +0 -0
- /package/dist/{chunk-LMDRGRJ2.js.map → chunk-NOB2T2FC.js.map} +0 -0
- /package/dist/{chunk-P2OTGMTR.js.map → chunk-NSGU76YO.js.map} +0 -0
- /package/dist/{chunk-D5NGH2EW.js.map → chunk-O76MWTVS.js.map} +0 -0
- /package/dist/{chunk-WZFAPHIK.js.map → chunk-OIOZ6MOP.js.map} +0 -0
- /package/dist/{chunk-UMOO7IY7.js.map → chunk-P2KBDJJ6.js.map} +0 -0
- /package/dist/{chunk-SXWHN7GC.js.map → chunk-PDEKQWDV.js.map} +0 -0
- /package/dist/{chunk-2EJNXE53.js.map → chunk-PLCHU56K.js.map} +0 -0
- /package/dist/{chunk-45OTV7FZ.js.map → chunk-PWIMF7LP.js.map} +0 -0
- /package/dist/{chunk-7YKVM5H3.js.map → chunk-PWLB4TRK.js.map} +0 -0
- /package/dist/{chunk-RVYVMQK4.js.map → chunk-QSYL5CXK.js.map} +0 -0
- /package/dist/{chunk-NXUJRXSF.js.map → chunk-QWLW3VQH.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-RKNJBZ55.js.map} +0 -0
- /package/dist/{chunk-QCECHYZL.js.map → chunk-RVO6TCTU.js.map} +0 -0
- /package/dist/{chunk-5L7PTX2Q.js.map → chunk-S2SJEOTM.js.map} +0 -0
- /package/dist/{chunk-52I3YZZ6.js.map → chunk-S75UQ3T3.js.map} +0 -0
- /package/dist/{chunk-LXOM6IQU.js.map → chunk-SEF4IOFE.js.map} +0 -0
- /package/dist/{chunk-DUEEQCTT.js.map → chunk-SHYIMIX5.js.map} +0 -0
- /package/dist/{chunk-7K5Q6COX.js.map → chunk-TVVEYCNW.js.map} +0 -0
- /package/dist/{chunk-3JUYWPFJ.js.map → chunk-VFS3MK5F.js.map} +0 -0
- /package/dist/{chunk-WOEVJKKQ.js.map → chunk-WPZX7MEA.js.map} +0 -0
- /package/dist/{chunk-ZRWB5D4H.js.map → chunk-WT6UL3UA.js.map} +0 -0
- /package/dist/{chunk-MC6XO7T4.js.map → chunk-YLBE6PLR.js.map} +0 -0
- /package/dist/{chunk-GF22HWS2.js.map → chunk-Z54EM5YZ.js.map} +0 -0
- /package/dist/{chunk-GVX3NAUU.js.map → chunk-ZDAYWJV6.js.map} +0 -0
- /package/dist/{chunk-JYPO7L3G.js.map → chunk-ZN4EYMKJ.js.map} +0 -0
- /package/dist/{resolution-3K27T4VO.js.map → coding/pre-action-gate.js.map} +0 -0
- /package/dist/{first-start-migration-ZSHEFEI3.js.map → first-start-migration-626C5554.js.map} +0 -0
- /package/dist/{forget-DNAJ66ZD.js.map → forget-GJ42LCBW.js.map} +0 -0
- /package/dist/{tier-stats-OPTSBNRH.js.map → tier-stats-2JCZYEF7.js.map} +0 -0
|
@@ -37,6 +37,8 @@ import { semanticChunkContent, type SemanticChunkResult } from "../semantic-chun
|
|
|
37
37
|
import { isAboveImportanceThreshold, scoreImportance } from "../importance.js";
|
|
38
38
|
import { sanitizeMemoryContent } from "../sanitize.js";
|
|
39
39
|
import {
|
|
40
|
+
resolveCapabilities,
|
|
41
|
+
resolveConsolidationCapabilities,
|
|
40
42
|
resolveGraphConstructionCapabilities,
|
|
41
43
|
resolveMemoryLifecycleCapabilities,
|
|
42
44
|
resolvePipelineProcessingCapabilities,
|
|
@@ -90,6 +92,7 @@ import {
|
|
|
90
92
|
import { buildProcedurePersistBody } from "../procedural/procedure-types.js";
|
|
91
93
|
import { stripAttributesSuffix } from "../structured-attributes.js";
|
|
92
94
|
import { LocalLlmClient } from "../local-llm.js";
|
|
95
|
+
import type { ExtractionEngine } from "../extraction.js";
|
|
93
96
|
import {
|
|
94
97
|
FallbackLlmClient,
|
|
95
98
|
fallbackLlmRuntimeContextFromConfig,
|
|
@@ -117,106 +120,17 @@ import {
|
|
|
117
120
|
readActiveMemoriesBothTiers,
|
|
118
121
|
shouldPromoteToShared,
|
|
119
122
|
} from "./extraction-persist-promotion.js";
|
|
123
|
+
import type { ExtractionPersistDeps } from "./extraction-persist-deps.js";
|
|
120
124
|
import type { ResolvedScopeProfilePlan } from "../namespaces/scope-profiles.js";
|
|
121
125
|
import {
|
|
122
126
|
buildMemoryPathById,
|
|
123
127
|
appendMemoryToGraphContext,
|
|
124
128
|
resolvePersistedMemoryRelativePath,
|
|
125
129
|
} from "../orchestrator.js";
|
|
130
|
+
import type { HarmonicConstructionInput } from "../harmonic-construction.js";
|
|
131
|
+
import { persistConstructedHarmonicRecords } from "./harmonic-construction-persist.js";
|
|
132
|
+
|
|
126
133
|
|
|
127
|
-
export interface ExtractionPersistDeps {
|
|
128
|
-
config: PluginConfig;
|
|
129
|
-
getStorageRouter: () => NamespaceStorageRouter;
|
|
130
|
-
getThreading: () => ThreadingManager;
|
|
131
|
-
getLocalLlm: () => LocalLlmClient;
|
|
132
|
-
getQmd: () => SearchBackend;
|
|
133
|
-
getJudgeVerdictCache: () => Map<string, JudgeVerdict>;
|
|
134
|
-
getJudgeDeferCounts: () => Map<string, number>;
|
|
135
|
-
getFaithfulnessCounters: () => FaithfulnessGateCounters;
|
|
136
|
-
getEmbeddingFallback: () => EmbeddingFallback;
|
|
137
|
-
setLastPersistExtractionDeferredCount: (value: number) => void;
|
|
138
|
-
setLastPersistExtractionPendingReviewIds: (ids: string[]) => void;
|
|
139
|
-
addContentHashDedup: (targetStorage: StorageManager, content: string) => Promise<void>;
|
|
140
|
-
hasContentHashDedup: (targetStorage: StorageManager, content: string) => Promise<boolean>;
|
|
141
|
-
backfillTemporalBoundsOnDedupHit: (
|
|
142
|
-
targetStorage: StorageManager,
|
|
143
|
-
dedupContent: string,
|
|
144
|
-
bounds: {
|
|
145
|
-
invalidAt?: string;
|
|
146
|
-
validFrom?: string;
|
|
147
|
-
observedAt?: string;
|
|
148
|
-
eventTimeSource?: "extracted" | "assumed";
|
|
149
|
-
},
|
|
150
|
-
entityRef?: string,
|
|
151
|
-
sourceConnector?: string,
|
|
152
|
-
) => Promise<void>;
|
|
153
|
-
saveContentHashIndexes: () => Promise<void>;
|
|
154
|
-
artifactTypeForCategory: (
|
|
155
|
-
category: string,
|
|
156
|
-
) =>
|
|
157
|
-
| "decision"
|
|
158
|
-
| "constraint"
|
|
159
|
-
| "todo"
|
|
160
|
-
| "definition"
|
|
161
|
-
| "commitment"
|
|
162
|
-
| "correction"
|
|
163
|
-
| "fact";
|
|
164
|
-
loadRoutingRules: () => Promise<RouteRule[]>;
|
|
165
|
-
routeEngineOptions: () => RoutingEngineOptions;
|
|
166
|
-
semanticDedupLookup: (
|
|
167
|
-
content: string,
|
|
168
|
-
limit: number,
|
|
169
|
-
targetStorage: StorageManager,
|
|
170
|
-
) => Promise<SemanticDedupHit[]>;
|
|
171
|
-
checkForContradiction: (
|
|
172
|
-
content: string,
|
|
173
|
-
category: string,
|
|
174
|
-
namespaceScope: string,
|
|
175
|
-
) => Promise<{
|
|
176
|
-
supersededId: string;
|
|
177
|
-
confidence: number;
|
|
178
|
-
reason: string;
|
|
179
|
-
supersededPath: string;
|
|
180
|
-
supersededCreated: string;
|
|
181
|
-
supersededTags: string[];
|
|
182
|
-
} | null>;
|
|
183
|
-
applyDeferredContradictionResolve: (
|
|
184
|
-
contradiction: {
|
|
185
|
-
supersededId: string;
|
|
186
|
-
reason: string;
|
|
187
|
-
supersededPath: string;
|
|
188
|
-
supersededCreated: string;
|
|
189
|
-
supersededTags: string[];
|
|
190
|
-
} | null | undefined,
|
|
191
|
-
storage: StorageManager,
|
|
192
|
-
newMemoryId: string,
|
|
193
|
-
postWriteGuard: boolean,
|
|
194
|
-
) => Promise<void>;
|
|
195
|
-
suggestLinksForMemory: (
|
|
196
|
-
content: string,
|
|
197
|
-
category: string,
|
|
198
|
-
namespaceScope: string,
|
|
199
|
-
) => Promise<MemoryLink[]>;
|
|
200
|
-
storageDirNamespace: (storageDir: string) => string;
|
|
201
|
-
indexPersistedMemory: (storage: StorageManager, memoryId: string) => Promise<void>;
|
|
202
|
-
buildGraphEdge: (
|
|
203
|
-
storage: StorageManager,
|
|
204
|
-
memoryRelPath: string,
|
|
205
|
-
entityRef: string | undefined,
|
|
206
|
-
memoryId: string,
|
|
207
|
-
factContent: string,
|
|
208
|
-
allMemsForGraph: MemoryFile[] | null | undefined,
|
|
209
|
-
memoryPathById: Map<string, string>,
|
|
210
|
-
threadIdForEdge: string | undefined,
|
|
211
|
-
threadEpisodeIdsForGraph: string[] | undefined,
|
|
212
|
-
fallbackCausalPredecessor: string | undefined,
|
|
213
|
-
graphCaps?: GraphConstructionCapabilitySet,
|
|
214
|
-
) => Promise<void>;
|
|
215
|
-
updateTemporalTagIndexes: (
|
|
216
|
-
storage: StorageManager,
|
|
217
|
-
persistedIds: string[],
|
|
218
|
-
) => Promise<void>;
|
|
219
|
-
}
|
|
220
134
|
|
|
221
135
|
export class ExtractionPersistCoordinator {
|
|
222
136
|
constructor(
|
|
@@ -254,6 +168,20 @@ export class ExtractionPersistCoordinator {
|
|
|
254
168
|
// ensureFactHashIndexAuthoritative), so a deferred write, crash, or
|
|
255
169
|
// multi-process interleave is safe by construction with no marker to guard.
|
|
256
170
|
const factDedupEnabled = resolveRecallAuxiliaryCapabilities(this.deps.config).factDeduplication;
|
|
171
|
+
const harmonicConstructionEnabled = resolveCapabilities(this.deps.config).harmonicRetrieval;
|
|
172
|
+
const harmonicAnchorsEnabled =
|
|
173
|
+
resolveConsolidationCapabilities(this.deps.config).abstractionAnchors;
|
|
174
|
+
const harmonicBaseNamespace =
|
|
175
|
+
baseNamespace ?? this.deps.storageDirNamespace(storage.dir);
|
|
176
|
+
const harmonicFactsByStorage = new Map<
|
|
177
|
+
string,
|
|
178
|
+
{
|
|
179
|
+
storage: StorageManager;
|
|
180
|
+
facts: HarmonicConstructionInput["persistedFacts"];
|
|
181
|
+
}
|
|
182
|
+
>();
|
|
183
|
+
const harmonicSourceInsertedAtBase = Date.now();
|
|
184
|
+
let harmonicSourceOrder = 0;
|
|
257
185
|
|
|
258
186
|
// Canonicalize stored content for dedup comparison: strip citations
|
|
259
187
|
// (using the same template), sanitize, then normalize whitespace.
|
|
@@ -304,6 +232,10 @@ export class ExtractionPersistCoordinator {
|
|
|
304
232
|
/** #1635: keep this id out of the persisted thread episode set. */
|
|
305
233
|
pendingReview?: boolean;
|
|
306
234
|
category?: MemoryCategory;
|
|
235
|
+
harmonicFact?: Omit<
|
|
236
|
+
HarmonicConstructionInput["persistedFacts"][number],
|
|
237
|
+
"memoryId"
|
|
238
|
+
>;
|
|
307
239
|
} = {},
|
|
308
240
|
): void => {
|
|
309
241
|
if (options.includeReturnedIds !== false) {
|
|
@@ -319,6 +251,23 @@ export class ExtractionPersistCoordinator {
|
|
|
319
251
|
} else {
|
|
320
252
|
persistedIdsByStorage.set(key, { storage: targetStorage, ids: [id] });
|
|
321
253
|
}
|
|
254
|
+
if (
|
|
255
|
+
harmonicConstructionEnabled &&
|
|
256
|
+
options.harmonicFact &&
|
|
257
|
+
!options.pendingReview
|
|
258
|
+
) {
|
|
259
|
+
const harmonicEntry = harmonicFactsByStorage.get(key) ?? {
|
|
260
|
+
storage: targetStorage,
|
|
261
|
+
facts: [],
|
|
262
|
+
};
|
|
263
|
+
harmonicEntry.facts.push({
|
|
264
|
+
...options.harmonicFact,
|
|
265
|
+
memoryId: id,
|
|
266
|
+
insertedAt: new Date(harmonicSourceInsertedAtBase + harmonicSourceOrder).toISOString(),
|
|
267
|
+
});
|
|
268
|
+
harmonicSourceOrder++;
|
|
269
|
+
harmonicFactsByStorage.set(key, harmonicEntry);
|
|
270
|
+
}
|
|
322
271
|
if (options.category && !memoryPathById.has(id)) {
|
|
323
272
|
const relPath = resolvePersistedMemoryRelativePath({ memoryId: id, pathById: memoryPathById, category: options.category });
|
|
324
273
|
memoryPathById.set(id, relPath);
|
|
@@ -420,6 +369,10 @@ export class ExtractionPersistCoordinator {
|
|
|
420
369
|
sources?: ProvenanceSource[];
|
|
421
370
|
provenance?: "verified" | "unverified" | "none";
|
|
422
371
|
toolScoped?: true;
|
|
372
|
+
harmonicFact?: Omit<
|
|
373
|
+
HarmonicConstructionInput["persistedFacts"][number],
|
|
374
|
+
"memoryId"
|
|
375
|
+
>;
|
|
423
376
|
}): Promise<void> => {
|
|
424
377
|
if (
|
|
425
378
|
!scopeProfileWritePlan ||
|
|
@@ -558,6 +511,9 @@ export class ExtractionPersistCoordinator {
|
|
|
558
511
|
structuredAttributes: { ...targetSurvivingAttrs },
|
|
559
512
|
createdAt: supersessionOrderingAt(options.validAt),
|
|
560
513
|
enabled: !(options.eventTimeSource === "extracted" && !options.validAt),
|
|
514
|
+
extraction: this.deps.getExtraction(),
|
|
515
|
+
config: this.config,
|
|
516
|
+
namespaceScope: this.deps.storageDirNamespace(targetStorage.dir),
|
|
561
517
|
});
|
|
562
518
|
} catch (profileSupersessionErr) {
|
|
563
519
|
log.warn(
|
|
@@ -568,7 +524,11 @@ export class ExtractionPersistCoordinator {
|
|
|
568
524
|
// #1645 TV6: a tombstone-blocked promotion is pending_review (no
|
|
569
525
|
// active copy) — skip catalog/index/behavior like postWriteGuard.
|
|
570
526
|
if (!targetPromotion.tombstoneBlocked) {
|
|
571
|
-
trackPersistedId(targetStorage, promotedId, {
|
|
527
|
+
trackPersistedId(targetStorage, promotedId, {
|
|
528
|
+
includeReturnedIds: false,
|
|
529
|
+
category: options.category as MemoryCategory,
|
|
530
|
+
harmonicFact: options.harmonicFact,
|
|
531
|
+
});
|
|
572
532
|
await this.deps.indexPersistedMemory(targetStorage, promotedId);
|
|
573
533
|
trackBehaviorSignals(
|
|
574
534
|
targetStorage,
|
|
@@ -616,6 +576,10 @@ export class ExtractionPersistCoordinator {
|
|
|
616
576
|
/** Claim-level provenance spans (issue #1575 PR 2). */
|
|
617
577
|
sources?: ProvenanceSource[];
|
|
618
578
|
provenance?: "verified" | "unverified" | "none";
|
|
579
|
+
harmonicFact?: Omit<
|
|
580
|
+
HarmonicConstructionInput["persistedFacts"][number],
|
|
581
|
+
"memoryId"
|
|
582
|
+
>;
|
|
619
583
|
}): Promise<void> => {
|
|
620
584
|
const toolScoped = withholdToolScopedFromSharedNamespace(options);
|
|
621
585
|
await promoteMemoryToProfileTargets({
|
|
@@ -849,6 +813,9 @@ export class ExtractionPersistCoordinator {
|
|
|
849
813
|
createdAt: supersessionOrderingAt(options.validAt),
|
|
850
814
|
enabled: !(options.eventTimeSource === "extracted" && !options.validAt),
|
|
851
815
|
useCallerTimestamp: true,
|
|
816
|
+
extraction: this.deps.getExtraction(),
|
|
817
|
+
config: this.config,
|
|
818
|
+
namespaceScope: this.deps.storageDirNamespace(sharedStorage.dir),
|
|
852
819
|
});
|
|
853
820
|
// Catalog touch (issue #1499 — codex P2 NElSf): this dedup branch
|
|
854
821
|
// returns WITHOUT the post-write catalog touch (now at the storage chokepoint #1522),
|
|
@@ -971,6 +938,9 @@ export class ExtractionPersistCoordinator {
|
|
|
971
938
|
structuredAttributes: { ...sharedSurvivingAttrs },
|
|
972
939
|
createdAt: supersessionOrderingAt(options.validAt),
|
|
973
940
|
enabled: !(options.eventTimeSource === "extracted" && !options.validAt),
|
|
941
|
+
extraction: this.deps.getExtraction(),
|
|
942
|
+
config: this.config,
|
|
943
|
+
namespaceScope: this.deps.storageDirNamespace(sharedStorage.dir),
|
|
974
944
|
});
|
|
975
945
|
} catch (sharedSupersessionErr) {
|
|
976
946
|
log.warn(
|
|
@@ -992,6 +962,7 @@ export class ExtractionPersistCoordinator {
|
|
|
992
962
|
trackPersistedId(sharedStorage, promotedId, {
|
|
993
963
|
includeReturnedIds: false,
|
|
994
964
|
category: options.category as MemoryCategory,
|
|
965
|
+
harmonicFact: options.harmonicFact,
|
|
995
966
|
});
|
|
996
967
|
await this.deps.indexPersistedMemory(sharedStorage, promotedId);
|
|
997
968
|
trackBehaviorSignals(
|
|
@@ -1650,6 +1621,17 @@ export class ExtractionPersistCoordinator {
|
|
|
1650
1621
|
);
|
|
1651
1622
|
}
|
|
1652
1623
|
}
|
|
1624
|
+
const harmonicFact: Omit<
|
|
1625
|
+
HarmonicConstructionInput["persistedFacts"][number],
|
|
1626
|
+
"memoryId"
|
|
1627
|
+
> = {
|
|
1628
|
+
category: writeCategory,
|
|
1629
|
+
content: fact.content,
|
|
1630
|
+
tags: fact.tags,
|
|
1631
|
+
cueAnchors: fact.cueAnchors,
|
|
1632
|
+
entityRef: fact.entityRef,
|
|
1633
|
+
validAt: biTemporal?.validFrom ?? sourceContext?.validAt,
|
|
1634
|
+
};
|
|
1653
1635
|
// #1669 redaction-rule gate: consult BOTH source and target namespace
|
|
1654
1636
|
// rules before any write. A never-store pattern registered under the
|
|
1655
1637
|
// source namespace must survive scope-routing to a different target
|
|
@@ -2346,6 +2328,7 @@ export class ExtractionPersistCoordinator {
|
|
|
2346
2328
|
trackPersistedId(targetStorage, parentId, {
|
|
2347
2329
|
pendingReview: postWriteGuard,
|
|
2348
2330
|
category: writeCategory,
|
|
2331
|
+
harmonicFact,
|
|
2349
2332
|
});
|
|
2350
2333
|
// #1576 (cursor Medium): keep pending_review ids out of threadEpisodeIdsForGraph — else later active facts build thread-predecessor edges to an unfaithful memory.
|
|
2351
2334
|
if (
|
|
@@ -2383,6 +2366,9 @@ export class ExtractionPersistCoordinator {
|
|
|
2383
2366
|
// supersede a later active fact (codex P1 on :15534).
|
|
2384
2367
|
enabled: lifecycleCaps.temporalSupersession &&
|
|
2385
2368
|
!(biTemporal && !biTemporal.validFrom),
|
|
2369
|
+
extraction: this.deps.getExtraction(),
|
|
2370
|
+
config: this.config,
|
|
2371
|
+
namespaceScope: this.deps.storageDirNamespace(targetStorage.dir),
|
|
2386
2372
|
});
|
|
2387
2373
|
} catch (err) {
|
|
2388
2374
|
log.warn(`temporal-supersession (chunked): unexpected error: ${err}`);
|
|
@@ -2418,6 +2404,7 @@ export class ExtractionPersistCoordinator {
|
|
|
2418
2404
|
...(fact.procedureSteps && fact.procedureSteps.length ? { procedureSteps: fact.procedureSteps } : {}),
|
|
2419
2405
|
...(fact.sources && fact.sources.length > 0 ? { sources: fact.sources } : {}),
|
|
2420
2406
|
...(fact.provenance ? { provenance: fact.provenance } : {}),
|
|
2407
|
+
harmonicFact,
|
|
2421
2408
|
});
|
|
2422
2409
|
// Register chunked content in the target storage hash index too.
|
|
2423
2410
|
// Thread 3 fix: canonicalize by stripping any pre-existing citation
|
|
@@ -2654,6 +2641,9 @@ export class ExtractionPersistCoordinator {
|
|
|
2654
2641
|
createdAt: supersessionOrderingAt(biTemporal?.validFrom ?? sourceContext?.validAt),
|
|
2655
2642
|
enabled: lifecycleCaps.temporalSupersession &&
|
|
2656
2643
|
!(biTemporal && !biTemporal.validFrom),
|
|
2644
|
+
extraction: this.deps.getExtraction(),
|
|
2645
|
+
config: this.config,
|
|
2646
|
+
namespaceScope: this.deps.storageDirNamespace(targetStorage.dir),
|
|
2657
2647
|
});
|
|
2658
2648
|
} catch (err) {
|
|
2659
2649
|
log.warn(`temporal-supersession: unexpected error: ${err}`);
|
|
@@ -2674,6 +2664,7 @@ export class ExtractionPersistCoordinator {
|
|
|
2674
2664
|
trackPersistedId(targetStorage, memoryId, {
|
|
2675
2665
|
pendingReview: postWriteGuard,
|
|
2676
2666
|
category: writeCategory,
|
|
2667
|
+
harmonicFact,
|
|
2677
2668
|
});
|
|
2678
2669
|
if (
|
|
2679
2670
|
!postWriteGuard &&
|
|
@@ -2721,6 +2712,7 @@ export class ExtractionPersistCoordinator {
|
|
|
2721
2712
|
...(fact.procedureSteps && fact.procedureSteps.length ? { procedureSteps: fact.procedureSteps } : {}),
|
|
2722
2713
|
...(fact.sources && fact.sources.length > 0 ? { sources: fact.sources } : {}),
|
|
2723
2714
|
...(fact.provenance ? { provenance: fact.provenance } : {}),
|
|
2715
|
+
harmonicFact,
|
|
2724
2716
|
});
|
|
2725
2717
|
// v8.2: graph edge building (fail-open). #1576: skip pending_review facts.
|
|
2726
2718
|
if (graphCaps.multiGraphMemory && !postWriteGuard) {
|
|
@@ -2994,6 +2986,21 @@ export class ExtractionPersistCoordinator {
|
|
|
2994
2986
|
log.info(
|
|
2995
2987
|
`persisted: ${facts.length - dedupedCount - importanceGatedCount - judgeGatedCount - redactionGatedCount} facts${dedupSuffix}${gatedSuffix}${judgeSuffix}${redactionSuffix}, ${entities.length} entities, ${questions.length} questions, ${profileUpdates.length} profile updates`,
|
|
2996
2988
|
);
|
|
2989
|
+
if (harmonicConstructionEnabled && harmonicFactsByStorage.size > 0) {
|
|
2990
|
+
await persistConstructedHarmonicRecords({
|
|
2991
|
+
entries: harmonicFactsByStorage.values(),
|
|
2992
|
+
baseStorageDir: storage.dir,
|
|
2993
|
+
abstractionNodeStoreDir:
|
|
2994
|
+
!scopeProfileWritePlan && harmonicBaseNamespace === this.deps.config.defaultNamespace
|
|
2995
|
+
? this.deps.config.abstractionNodeStoreDir
|
|
2996
|
+
: undefined,
|
|
2997
|
+
sessionKey: sourceContext?.sessionKey,
|
|
2998
|
+
validAt: sourceContext?.validAt,
|
|
2999
|
+
episodeTitle: result.episodeTitle,
|
|
3000
|
+
anchorsEnabled: harmonicAnchorsEnabled,
|
|
3001
|
+
entityMentions: entities,
|
|
3002
|
+
});
|
|
3003
|
+
}
|
|
2997
3004
|
// Update temporal + tag indexes (v8.1) — fire-and-forget, fail-open
|
|
2998
3005
|
void (async () => {
|
|
2999
3006
|
if (persistedIdsByStorage.size === 0) {
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import {
|
|
2
|
+
type HarmonicConstructionInput,
|
|
3
|
+
deriveHarmonicRecords,
|
|
4
|
+
harmonicEntityReferenceMatches,
|
|
5
|
+
harmonicEntitySegment,
|
|
6
|
+
normalizedHarmonicEntityIdentity,
|
|
7
|
+
persistHarmonicRecords,
|
|
8
|
+
} from "../harmonic-construction.js";
|
|
9
|
+
import { log } from "../logger.js";
|
|
10
|
+
import type { ExtractionResult } from "../types.js";
|
|
11
|
+
|
|
12
|
+
export interface HarmonicPersistenceEntry {
|
|
13
|
+
storage: { dir: string };
|
|
14
|
+
facts: HarmonicConstructionInput["persistedFacts"];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function filterHarmonicEntityMentions(
|
|
18
|
+
facts: HarmonicConstructionInput["persistedFacts"],
|
|
19
|
+
entityMentions: ExtractionResult["entities"]
|
|
20
|
+
): ExtractionResult["entities"] {
|
|
21
|
+
const identitiesBySegment = new Map<string, Set<string>>();
|
|
22
|
+
for (const entity of entityMentions) {
|
|
23
|
+
const segment = harmonicEntitySegment(entity.name);
|
|
24
|
+
const identities = identitiesBySegment.get(segment) ?? new Set<string>();
|
|
25
|
+
identities.add(normalizedHarmonicEntityIdentity(entity.name));
|
|
26
|
+
identitiesBySegment.set(segment, identities);
|
|
27
|
+
}
|
|
28
|
+
return entityMentions.flatMap((entity) => {
|
|
29
|
+
const allowSegmentFallback = identitiesBySegment.get(harmonicEntitySegment(entity.name))?.size === 1;
|
|
30
|
+
const activeFacts = facts.filter(
|
|
31
|
+
(fact) =>
|
|
32
|
+
typeof fact.entityRef === "string" &&
|
|
33
|
+
harmonicEntityReferenceMatches(fact.entityRef, entity.name, allowSegmentFallback)
|
|
34
|
+
);
|
|
35
|
+
return activeFacts.length > 0 ? [{ ...entity, facts: activeFacts.map((fact) => fact.content) }] : [];
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export async function persistConstructedHarmonicRecords(options: {
|
|
40
|
+
entries: Iterable<HarmonicPersistenceEntry>;
|
|
41
|
+
baseStorageDir: string;
|
|
42
|
+
abstractionNodeStoreDir?: string;
|
|
43
|
+
sessionKey?: string;
|
|
44
|
+
validAt?: string;
|
|
45
|
+
episodeTitle?: string;
|
|
46
|
+
anchorsEnabled: boolean;
|
|
47
|
+
entityMentions: ExtractionResult["entities"];
|
|
48
|
+
}): Promise<void> {
|
|
49
|
+
const sessionKey = options.sessionKey?.trim();
|
|
50
|
+
if (!sessionKey) {
|
|
51
|
+
log.warn("harmonic construction skipped: extraction session key is missing");
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const recordedAt =
|
|
55
|
+
options.validAt && Number.isFinite(Date.parse(options.validAt))
|
|
56
|
+
? new Date(options.validAt).toISOString()
|
|
57
|
+
: new Date().toISOString();
|
|
58
|
+
const entries = [...options.entries];
|
|
59
|
+
const sharedEpisodeTitle = entries.length === 1 ? options.episodeTitle : undefined;
|
|
60
|
+
for (const entry of entries) {
|
|
61
|
+
try {
|
|
62
|
+
const records = deriveHarmonicRecords({
|
|
63
|
+
sessionKey,
|
|
64
|
+
recordedAt,
|
|
65
|
+
episodeTitle: sharedEpisodeTitle,
|
|
66
|
+
persistedFacts: entry.facts,
|
|
67
|
+
entityMentions: filterHarmonicEntityMentions(entry.facts, options.entityMentions).map((entity) => ({
|
|
68
|
+
name: entity.name,
|
|
69
|
+
type: entity.type,
|
|
70
|
+
facts: entity.facts,
|
|
71
|
+
})),
|
|
72
|
+
});
|
|
73
|
+
await persistHarmonicRecords({
|
|
74
|
+
memoryDir: entry.storage.dir,
|
|
75
|
+
abstractionNodeStoreDir:
|
|
76
|
+
entry.storage.dir === options.baseStorageDir ? options.abstractionNodeStoreDir : undefined,
|
|
77
|
+
nodes: records.nodes,
|
|
78
|
+
anchors: options.anchorsEnabled ? records.anchors : [],
|
|
79
|
+
});
|
|
80
|
+
} catch (error) {
|
|
81
|
+
log.warn(
|
|
82
|
+
`harmonic construction failed open for namespace ${entry.storage.dir}: ${error instanceof Error ? error.message : String(error)}`
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
@@ -27,6 +27,7 @@ import { mergeArtifactRecallCandidates, tokenizeRecallQuery } from "./orchestrat
|
|
|
27
27
|
import { qmdCollectionPathParts } from "./qmd-result-resolver.js";
|
|
28
28
|
import { qmdCollectionNamespaceFromPrefix as computeQmdCollectionNamespaceFromPrefix } from "./orchestrator-namespace-scope.js";
|
|
29
29
|
import { resolveNamespaceFromStorageDir } from "../scopes/scope-plan.js";
|
|
30
|
+
import { checkCorpusReadAbort, type CorpusReadOptions } from "../corpus-read-cancellation.js";
|
|
30
31
|
import type { ArtifactRecallOptions } from "./recall-search-prefilter.js";
|
|
31
32
|
import type { SearchBackend, SearchExecutionOptions, SearchQueryOptions } from "../search/port.js";
|
|
32
33
|
import type { MemoryFile, PluginConfig, QmdSearchResult } from "../types.js";
|
|
@@ -247,7 +248,9 @@ export class NamespaceReadFanoutCoordinator {
|
|
|
247
248
|
async resolveArtifactSourceStatuses(
|
|
248
249
|
storage: StorageManager,
|
|
249
250
|
sourceIds: string[],
|
|
251
|
+
options?: CorpusReadOptions,
|
|
250
252
|
): Promise<Map<string, "active" | "superseded" | "archived" | "missing">> {
|
|
253
|
+
checkCorpusReadAbort(options);
|
|
251
254
|
const currentStatusVersion = storage.getMemoryStatusVersion();
|
|
252
255
|
const cached = this.deps.artifactSourceStatusCache.get(storage);
|
|
253
256
|
let snapshot = cached;
|
|
@@ -266,8 +269,15 @@ export class NamespaceReadFanoutCoordinator {
|
|
|
266
269
|
let latestVersionAfter = storage.getMemoryStatusVersion();
|
|
267
270
|
|
|
268
271
|
for (let attempt = 0; attempt < MAX_STABLE_READ_ATTEMPTS; attempt += 1) {
|
|
272
|
+
// Each attempt is a full corpus read; an abandoned caller must not buy a
|
|
273
|
+
// second or third one (issue #2307).
|
|
274
|
+
checkCorpusReadAbort(options);
|
|
269
275
|
const versionBefore = storage.getMemoryStatusVersion();
|
|
270
|
-
const allMemories = await storage.readAllMemories();
|
|
276
|
+
const allMemories = await storage.readAllMemories(options);
|
|
277
|
+
// An abort landing between the read and the publish below would otherwise
|
|
278
|
+
// cache and return a snapshot to a caller that had already cancelled
|
|
279
|
+
// (issue #2307 review).
|
|
280
|
+
checkCorpusReadAbort(options);
|
|
271
281
|
const versionAfter = storage.getMemoryStatusVersion();
|
|
272
282
|
latestVersionAfter = versionAfter;
|
|
273
283
|
latestStatuses = new Map(
|
|
@@ -467,12 +477,13 @@ export class NamespaceReadFanoutCoordinator {
|
|
|
467
477
|
|
|
468
478
|
async readAllMemoriesForNamespaces(
|
|
469
479
|
namespaces: string[],
|
|
480
|
+
options?: CorpusReadOptions,
|
|
470
481
|
): Promise<MemoryFile[]> {
|
|
471
482
|
const uniq = Array.from(new Set(namespaces.filter(Boolean)));
|
|
472
483
|
const lists = await Promise.all(
|
|
473
484
|
uniq.map(async (ns) => {
|
|
474
485
|
const sm = await this.deps.storageRouter.storageFor(ns);
|
|
475
|
-
return sm.readAllMemories();
|
|
486
|
+
return sm.readAllMemories(options);
|
|
476
487
|
}),
|
|
477
488
|
);
|
|
478
489
|
return lists.flat();
|
|
@@ -17,6 +17,7 @@ import type { NamespaceCatalog } from "../namespaces/catalog.js";
|
|
|
17
17
|
import type { NamespaceStorageRouter } from "../namespaces/storage.js";
|
|
18
18
|
import type { ObjectiveStateSearchResult } from "../objective-state.js";
|
|
19
19
|
import type { IntentDebugSnapshot, QmdRecallSnapshot, QueryAwarePrefilter } from "../orchestrator.js";
|
|
20
|
+
import type { CorpusReadOptions } from "../corpus-read-cancellation.js";
|
|
20
21
|
import type { ProfilingCollector } from "../profiling.js";
|
|
21
22
|
import type { GraphRecallExpandedEntry, LastRecallBudgetSummary, LastRecallStore, RecallHandleHistoryStore } from "../recall-state.js";
|
|
22
23
|
import type { RecallXraySnapshot } from "../recall-xray.js";
|
|
@@ -335,6 +336,7 @@ export interface RecallInternalDeps {
|
|
|
335
336
|
): void;
|
|
336
337
|
readAllMemoriesForNamespaces(
|
|
337
338
|
namespaces: string[],
|
|
339
|
+
options?: CorpusReadOptions,
|
|
338
340
|
): Promise<MemoryFile[]>;
|
|
339
341
|
recallArtifactsAcrossNamespaces(
|
|
340
342
|
prompt: string,
|
|
@@ -1551,6 +1551,7 @@ export class RecallInternalCoordinator {
|
|
|
1551
1551
|
maxResults,
|
|
1552
1552
|
sessionKey,
|
|
1553
1553
|
anchorsEnabled: resolveConsolidationCapabilities(this.deps.config).abstractionAnchors,
|
|
1554
|
+
temporalExpiredInInjection: this.deps.config.temporalExpiredInInjection,
|
|
1554
1555
|
abortSignal: harmonicRetrievalAbort.signal,
|
|
1555
1556
|
}),
|
|
1556
1557
|
),
|
|
@@ -4414,7 +4415,10 @@ export class RecallInternalCoordinator {
|
|
|
4414
4415
|
} else {
|
|
4415
4416
|
const memories = await awaitAssemblyStep(
|
|
4416
4417
|
"recent-memory-read",
|
|
4417
|
-
() =>
|
|
4418
|
+
(stepSignal) =>
|
|
4419
|
+
this.deps.readAllMemoriesForNamespaces(recallNamespaces, {
|
|
4420
|
+
abortSignal: stepSignal,
|
|
4421
|
+
}),
|
|
4418
4422
|
[] as MemoryFile[],
|
|
4419
4423
|
);
|
|
4420
4424
|
if (memories.length > 0) {
|
|
@@ -34,6 +34,7 @@ import { RerankCache, rerankLocalOrNoop, reorderByRankedKeys } from "../rerank.j
|
|
|
34
34
|
import type { SearchBackend, SearchDegradation, SearchExecutionOptions, SearchQueryOptions } from "../search/port.js";
|
|
35
35
|
import { SecureStoreLockedError } from "../secure-store/index.js";
|
|
36
36
|
import { isPathInsideStorageRoot } from "../storage-paths.js";
|
|
37
|
+
import type { CorpusReadOptions } from "../corpus-read-cancellation.js";
|
|
37
38
|
import { extractTagsFromPrompt, isTemporalQuery, queryByDateRangeAsync, queryByTagsAsync, readIndexSnapshotAsync, recencyWindowFromPrompt } from "../temporal-index.js";
|
|
38
39
|
import {
|
|
39
40
|
buildQueryAwarePrefilter as buildQueryAwarePrefilterHelper,
|
|
@@ -206,6 +207,7 @@ export interface RecallSearchPipelineDeps {
|
|
|
206
207
|
resolveArtifactSourceStatuses(
|
|
207
208
|
storage: StorageManager,
|
|
208
209
|
sourceIds: string[],
|
|
210
|
+
options?: CorpusReadOptions,
|
|
209
211
|
): Promise<Map<string, "active" | "superseded" | "archived" | "missing">>;
|
|
210
212
|
resolveColdQmdResultForRecall(
|
|
211
213
|
result: QmdSearchResult,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import path from "node:path";
|
|
2
2
|
import { resolveIndexingCapabilities, resolveMemoryLifecycleCapabilities } from "../capabilities.js";
|
|
3
3
|
import type { EmbeddingFallback } from "../embedding-fallback.js";
|
|
4
|
+
import type { CorpusReadOptions } from "../corpus-read-cancellation.js";
|
|
4
5
|
import type { StorageManager } from "../index.js";
|
|
5
6
|
import type { NamespaceStorageRouter } from "../namespaces/storage.js";
|
|
6
7
|
import {
|
|
@@ -27,6 +28,7 @@ export interface PrefilterAndArtifactDeps {
|
|
|
27
28
|
resolveArtifactSourceStatuses(
|
|
28
29
|
storage: StorageManager,
|
|
29
30
|
sourceIds: string[],
|
|
31
|
+
options?: CorpusReadOptions,
|
|
30
32
|
): Promise<Map<string, "active" | "superseded" | "archived" | "missing">>;
|
|
31
33
|
scopeQueryAwarePaths(
|
|
32
34
|
paths: Set<string> | null,
|
|
@@ -84,7 +86,9 @@ export async function fetchActiveArtifactsForNamespace(
|
|
|
84
86
|
throwIfRecallAborted(options.abortSignal);
|
|
85
87
|
const sourceStatus =
|
|
86
88
|
sourceIds.length > 0
|
|
87
|
-
? await deps.resolveArtifactSourceStatuses(storage, sourceIds
|
|
89
|
+
? await deps.resolveArtifactSourceStatuses(storage, sourceIds, {
|
|
90
|
+
abortSignal: options.abortSignal,
|
|
91
|
+
})
|
|
88
92
|
: new Map<string, "active" | "superseded" | "archived" | "missing">();
|
|
89
93
|
|
|
90
94
|
const filtered: MemoryFile[] = [];
|
package/src/orchestrator.ts
CHANGED
|
@@ -121,6 +121,7 @@ import { ExtractionPersistCoordinator } from "./orchestration/extraction-persist
|
|
|
121
121
|
import { RecallInternalCoordinator } from "./orchestration/recall-internal.js";
|
|
122
122
|
import { RecallSearchPipelineCoordinator } from "./orchestration/recall-search-pipeline.js";
|
|
123
123
|
import type { ArtifactRecallOptions } from "./orchestration/recall-search-prefilter.js";
|
|
124
|
+
import type { CorpusReadOptions } from "./corpus-read-cancellation.js";
|
|
124
125
|
import { TurnIngestionCoordinator, type TurnIngestionOptions } from "./orchestration/turn-ingestion.js";
|
|
125
126
|
import { RecallIntrospectionCoordinator } from "./orchestration/recall-introspection.js";
|
|
126
127
|
import { OrchestratorInitCoordinator } from "./orchestration/orchestrator-init.js";
|
|
@@ -783,13 +784,13 @@ export class Orchestrator {
|
|
|
783
784
|
* its own methods + coordinators.
|
|
784
785
|
*/
|
|
785
786
|
private _consolidationRunCoordinator: ConsolidationRunCoordinator | undefined;
|
|
786
|
-
|
|
787
787
|
private get consolidationRunCoordinator(): ConsolidationRunCoordinator {
|
|
788
788
|
if (!this._consolidationRunCoordinator) {
|
|
789
789
|
this._consolidationRunCoordinator = new ConsolidationRunCoordinator({
|
|
790
790
|
config: this.config,
|
|
791
791
|
getStorage: () => this.storage,
|
|
792
792
|
getStorageRouter: () => this.storageRouter,
|
|
793
|
+
getNamespaceCatalog: () => this.namespaceCatalog,
|
|
793
794
|
getExtraction: () => this.extraction,
|
|
794
795
|
embeddingFallback: this.embeddingFallback,
|
|
795
796
|
tmtBuilder: this.tmtBuilder,
|
|
@@ -824,6 +825,7 @@ export class Orchestrator {
|
|
|
824
825
|
getStorageRouter: () => this.storageRouter,
|
|
825
826
|
getThreading: () => this.threading,
|
|
826
827
|
getLocalLlm: () => this.localLlm,
|
|
828
|
+
getExtraction: () => this.extraction,
|
|
827
829
|
getQmd: () => this.qmd,
|
|
828
830
|
getJudgeVerdictCache: () => this.judgeVerdictCache,
|
|
829
831
|
getJudgeDeferCounts: () => this.judgeDeferCounts,
|
|
@@ -1872,10 +1874,10 @@ export class Orchestrator {
|
|
|
1872
1874
|
private async resolveArtifactSourceStatuses(
|
|
1873
1875
|
storage: StorageManager,
|
|
1874
1876
|
sourceIds: string[],
|
|
1877
|
+
options?: CorpusReadOptions,
|
|
1875
1878
|
): Promise<Map<string, "active" | "superseded" | "archived" | "missing">> {
|
|
1876
1879
|
return this.namespaceReadFanoutCoordinator.resolveArtifactSourceStatuses(
|
|
1877
|
-
storage,
|
|
1878
|
-
sourceIds,
|
|
1880
|
+
storage, sourceIds, options,
|
|
1879
1881
|
);
|
|
1880
1882
|
}
|
|
1881
1883
|
|
|
@@ -3970,9 +3972,8 @@ export class Orchestrator {
|
|
|
3970
3972
|
|
|
3971
3973
|
private async readAllMemoriesForNamespaces(
|
|
3972
3974
|
namespaces: string[],
|
|
3975
|
+
options?: CorpusReadOptions,
|
|
3973
3976
|
): Promise<MemoryFile[]> {
|
|
3974
|
-
return this.namespaceReadFanoutCoordinator.readAllMemoriesForNamespaces(
|
|
3975
|
-
namespaces,
|
|
3976
|
-
);
|
|
3977
|
+
return this.namespaceReadFanoutCoordinator.readAllMemoriesForNamespaces(namespaces, options);
|
|
3977
3978
|
}
|
|
3978
3979
|
}
|
package/src/schemas.ts
CHANGED
|
@@ -81,6 +81,16 @@ export const ExtractedFactSchema = z.object({
|
|
|
81
81
|
.optional()
|
|
82
82
|
.nullable()
|
|
83
83
|
.describe("If about an entity, its normalized name (e.g. person-jane-doe)"),
|
|
84
|
+
cueAnchors: z
|
|
85
|
+
.array(
|
|
86
|
+
z.object({
|
|
87
|
+
type: z.enum(["entity", "file", "tool", "outcome", "constraint", "date"]),
|
|
88
|
+
value: z.string(),
|
|
89
|
+
}),
|
|
90
|
+
)
|
|
91
|
+
.optional()
|
|
92
|
+
.nullable()
|
|
93
|
+
.describe("Up to three short retrieval cues for this fact."),
|
|
84
94
|
promptedByQuestion: z
|
|
85
95
|
.string()
|
|
86
96
|
.optional()
|
|
@@ -296,6 +306,11 @@ export const ExtractionResultSchema = z.object({
|
|
|
296
306
|
.describe(
|
|
297
307
|
"A brief reflection on what you learned about yourself as an agent in this interaction — patterns in your behavior, growth, things you did well or could improve.",
|
|
298
308
|
),
|
|
309
|
+
episodeTitle: z
|
|
310
|
+
.string()
|
|
311
|
+
.optional()
|
|
312
|
+
.nullable()
|
|
313
|
+
.describe("A six-to-eight word title for this conversation segment."),
|
|
299
314
|
relationships: z
|
|
300
315
|
.array(ExtractedRelationshipSchema)
|
|
301
316
|
.optional()
|