@remnic/core 9.50.2 → 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.
- package/dist/access-admin-ops-surface.d.ts +13 -11
- package/dist/access-admin-ops-surface.js +41 -39
- package/dist/access-authorization-probe.d.ts +13 -11
- package/dist/access-authorization-probe.js +42 -40
- package/dist/access-boundary.d.ts +13 -11
- package/dist/access-boundary.js +41 -39
- package/dist/access-cli.js +109 -104
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +3 -1
- package/dist/access-extraction-force-flush.d.ts +13 -11
- package/dist/access-extraction-force-flush.js +41 -39
- package/dist/access-health-types.d.ts +3 -1
- package/dist/access-http-lcm-compaction.d.ts +13 -11
- package/dist/access-http-lifecycle-flush.d.ts +13 -11
- package/dist/access-http-offline-stream.d.ts +13 -11
- package/dist/access-http-query.js +41 -39
- package/dist/access-http.d.ts +13 -11
- package/dist/access-http.js +52 -50
- package/dist/access-identity-continuity-surface.d.ts +11 -9
- package/dist/access-identity-continuity-surface.js +41 -39
- package/dist/access-lcm-surface.d.ts +13 -11
- package/dist/access-lcm-surface.js +41 -39
- package/dist/access-mcp.d.ts +13 -11
- package/dist/access-mcp.js +47 -45
- package/dist/access-memory-search-fanout.d.ts +4 -2
- package/dist/{access-namespace-preflight-Dj2QolFE.d.ts → access-namespace-preflight-Ds6CGlCP.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +5 -3
- package/dist/access-namespace-preflight.js +41 -39
- package/dist/access-observe-write-surface.d.ts +13 -11
- package/dist/access-observe-write-surface.js +41 -39
- package/dist/access-offline-manifest.d.ts +11 -9
- package/dist/access-operations-batch.js +43 -41
- package/dist/access-operations.d.ts +13 -11
- package/dist/access-operations.js +46 -44
- package/dist/access-recall-concurrency.d.ts +13 -11
- package/dist/access-recall-concurrency.js +41 -39
- package/dist/access-recall-response.d.ts +13 -11
- package/dist/access-recall-response.js +41 -39
- package/dist/access-recall-surface.d.ts +13 -11
- package/dist/access-recall-surface.js +41 -39
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-DesbnTSa.d.ts → access-service-BY0KJ44c.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +13 -11
- package/dist/access-service.d.ts +13 -11
- package/dist/access-service.js +41 -39
- package/dist/access-surface-catalog.d.ts +13 -11
- package/dist/access-wearables-meetings-surface.d.ts +5 -3
- package/dist/action-confidence.d.ts +3 -1
- package/dist/active-memory-bridge.d.ts +3 -1
- package/dist/active-recall.d.ts +3 -1
- package/dist/active-recall.js +5 -3
- 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 +3 -1
- package/dist/archive-mutation-version.d.ts +9 -0
- package/dist/archive-mutation-version.js +20 -0
- package/dist/artifact-search.d.ts +3 -1
- package/dist/behavior-learner.d.ts +3 -1
- package/dist/behavior-signals.d.ts +3 -1
- package/dist/bootstrap.d.ts +11 -9
- package/dist/briefing.d.ts +4 -2
- package/dist/briefing.js +10 -9
- package/dist/buffer-surprise-report.d.ts +3 -1
- package/dist/buffer-turn-helpers.d.ts +3 -1
- package/dist/buffer.d.ts +4 -2
- package/dist/buffer.js +5 -5
- package/dist/bulk-import/index.d.ts +5 -3
- package/dist/calibration.d.ts +3 -1
- package/dist/capabilities.d.ts +3 -1
- package/dist/{catalog-D-G7RgXR.d.ts → catalog-D3B4RDy1.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +3 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +3 -1
- package/dist/causal-consolidation.js +13 -12
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +4 -2
- package/dist/causal-trajectory-graph.js +2 -1
- package/dist/causal-trajectory-graph.js.map +1 -1
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-KDG2KTWW.js → chunk-33SV3E43.js} +4 -4
- package/dist/{chunk-2HGUDBRJ.js → chunk-37ZO6LLJ.js} +2 -2
- package/dist/{chunk-QW3WFHKU.js → chunk-45BRYON6.js} +2 -2
- package/dist/{chunk-GZICBRWK.js → chunk-4F6X3RXW.js} +2 -2
- package/dist/{chunk-7BAYBYY5.js → chunk-4PC4PRJE.js} +2 -2
- package/dist/{chunk-VJXY5ZCT.js → chunk-52UKFTUK.js} +2 -2
- package/dist/{chunk-ESG7Z255.js → chunk-5UDMFE3Q.js} +2 -2
- package/dist/{chunk-JPHEOE6Z.js → chunk-6MTSFX7A.js} +15 -15
- package/dist/chunk-6ZN34ISG.js +44 -0
- package/dist/chunk-6ZN34ISG.js.map +1 -0
- package/dist/{chunk-M4MP34AQ.js → chunk-AHZOMHWN.js} +1 -1
- package/dist/{chunk-Z3RHPGSY.js → chunk-AIUBBHSF.js} +3 -3
- package/dist/{chunk-S3AYIQCU.js → chunk-AXIDQG5A.js} +12 -12
- package/dist/{chunk-QN7NTKRC.js → chunk-AZ2QBGYB.js} +1 -1
- package/dist/{chunk-47J4EDGR.js → chunk-AZM4CCAC.js} +8 -8
- package/dist/{chunk-IXXABW5A.js → chunk-BHXYAVUM.js} +11 -5
- package/dist/chunk-BHXYAVUM.js.map +1 -0
- package/dist/{chunk-L2DPF4DF.js → chunk-BIJAWZYW.js} +54 -12
- package/dist/chunk-BIJAWZYW.js.map +1 -0
- package/dist/{chunk-LEJPSMKM.js → chunk-C5QLI33R.js} +3 -3
- package/dist/{chunk-SV3PSA7Y.js → chunk-CV6BBVYV.js} +5 -5
- package/dist/{chunk-V7X767RT.js → chunk-DCZBSE4F.js} +52 -52
- package/dist/chunk-FC67T4E6.js +70 -0
- package/dist/chunk-FC67T4E6.js.map +1 -0
- package/dist/{chunk-7PKFPLLZ.js → chunk-FXTYIA46.js} +2 -2
- package/dist/{chunk-64BHFFKZ.js → chunk-HLYR2TQL.js} +5 -5
- package/dist/{chunk-5C2HNJMO.js → chunk-J5LLX6IL.js} +32 -32
- package/dist/{chunk-RKNJBZ55.js → chunk-JBPKEARU.js} +4 -4
- package/dist/{chunk-PLKFO2HJ.js → chunk-JL43BVDE.js} +2 -2
- package/dist/{chunk-2S72LWKX.js → chunk-JYL3BVVZ.js} +2 -2
- package/dist/{chunk-IPLYGWQF.js → chunk-KQAFEZQX.js} +5 -5
- package/dist/chunk-LXY5VVGM.js +61 -0
- package/dist/chunk-LXY5VVGM.js.map +1 -0
- package/dist/{chunk-PYKKWQZ2.js → chunk-M7BXDKPR.js} +6 -6
- package/dist/{chunk-Z54EM5YZ.js → chunk-MAXVH44E.js} +7 -7
- package/dist/{chunk-LYMNZZIM.js → chunk-NIS256NW.js} +2 -2
- package/dist/{chunk-67QG75MJ.js → chunk-NLK2VZYZ.js} +2 -2
- package/dist/{chunk-A4QMKFFO.js → chunk-O5FFBO2M.js} +14 -28
- package/dist/chunk-O5FFBO2M.js.map +1 -0
- package/dist/{chunk-JYIFGGEM.js → chunk-OUKBMQ2O.js} +2 -2
- package/dist/{chunk-75XOWNRS.js → chunk-OYESWJ43.js} +4 -4
- package/dist/{chunk-TS4AJ2GI.js → chunk-PA45XCUD.js} +3 -3
- package/dist/{chunk-BJYET5TX.js → chunk-PRDJMOST.js} +7 -1
- package/dist/chunk-PRDJMOST.js.map +1 -0
- package/dist/{chunk-4MBPIL4V.js → chunk-PUSLMZBQ.js} +2 -2
- package/dist/{chunk-RVO6TCTU.js → chunk-QCECHYZL.js} +6 -6
- package/dist/{chunk-GFIKG4FR.js → chunk-QGR6OVGT.js} +2 -2
- package/dist/{chunk-NSGU76YO.js → chunk-QHFV6VNU.js} +6 -2
- package/dist/chunk-QHFV6VNU.js.map +1 -0
- package/dist/{chunk-PDEKQWDV.js → chunk-QT2FRYI4.js} +18 -2
- package/dist/chunk-QT2FRYI4.js.map +1 -0
- package/dist/{chunk-HNZKVLAN.js → chunk-S354QO4R.js} +2 -2
- package/dist/{chunk-NO37MR45.js → chunk-SOEN6KCF.js} +2 -2
- package/dist/{chunk-FXX6RQYC.js → chunk-TPTECFWR.js} +2 -2
- package/dist/{chunk-GDDGZVFI.js → chunk-UEVLYVNW.js} +2 -2
- package/dist/{chunk-YQ4IQ2GA.js → chunk-UT5BV5OG.js} +2 -2
- package/dist/{chunk-LAQ33B5D.js → chunk-UU3G6GUP.js} +1 -1
- package/dist/chunk-UU3G6GUP.js.map +1 -0
- package/dist/{chunk-LNTUXKBT.js → chunk-UYYW2KPU.js} +2 -2
- package/dist/{chunk-BOFVT6P3.js → chunk-VBHPOWBJ.js} +175 -98
- package/dist/chunk-VBHPOWBJ.js.map +1 -0
- package/dist/{chunk-QSYL5CXK.js → chunk-VKXWK44Q.js} +3 -3
- package/dist/{chunk-KMWYZTIE.js → chunk-VMMQDEN5.js} +2 -2
- package/dist/{chunk-JB6D7EFB.js → chunk-VVG2BOKA.js} +2 -2
- package/dist/chunk-W5BIQOAJ.js +69 -0
- package/dist/chunk-W5BIQOAJ.js.map +1 -0
- package/dist/{chunk-V5H6OJCR.js → chunk-W5XVQFLM.js} +2 -2
- package/dist/{chunk-OIOZ6MOP.js → chunk-W6FNX2LP.js} +2 -2
- package/dist/{chunk-6QPHF6RR.js → chunk-WQM326GS.js} +2 -2
- package/dist/{chunk-TQFHQPWD.js → chunk-XADV5IZ3.js} +8 -8
- package/dist/{chunk-DATDLJAO.js → chunk-XAPMEU3K.js} +2 -2
- package/dist/chunk-XXSOVESA.js +42 -0
- package/dist/chunk-XXSOVESA.js.map +1 -0
- package/dist/{chunk-IK6X5QPO.js → chunk-ZHY5TMJG.js} +1193 -443
- package/dist/chunk-ZHY5TMJG.js.map +1 -0
- package/dist/{chunk-N3LL5NEU.js → chunk-ZMYDYNI4.js} +2 -2
- package/dist/{cli-D4vvtxjY.d.ts → cli-CnOkH9hA.d.ts} +6 -6
- package/dist/cli.d.ts +15 -13
- package/dist/cli.js +74 -70
- package/dist/coding/pre-action-gate.d.ts +3 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.d.ts +4 -2
- package/dist/compounding/engine.js +10 -9
- package/dist/compounding/preference-consolidator.d.ts +3 -1
- package/dist/compression-optimizer.d.ts +3 -1
- package/dist/config.d.ts +3 -1
- package/dist/config.js +5 -3
- package/dist/connectors/codex-materialize-runner.d.ts +3 -1
- package/dist/connectors/codex-materialize-runner.js +10 -9
- package/dist/connectors/codex-materialize.d.ts +3 -1
- package/dist/connectors/index.d.ts +3 -1
- package/dist/connectors/index.js +10 -9
- package/dist/consolidation-provenance-check.d.ts +4 -2
- package/dist/consolidation-undo.d.ts +4 -2
- package/dist/contradiction/index.d.ts +4 -2
- package/dist/contradiction-config.d.ts +29 -0
- package/dist/contradiction-config.js +12 -0
- package/dist/contradiction-config.js.map +1 -0
- package/dist/converge-config.d.ts +3 -1
- package/dist/convergence-refresh.d.ts +4 -2
- package/dist/convergence-refresh.js +12 -11
- package/dist/conversation-index/backend.d.ts +3 -1
- package/dist/conversation-index/chunker.d.ts +3 -1
- package/dist/conversation-index/faiss-adapter.d.ts +3 -1
- package/dist/conversation-index/indexer.d.ts +3 -1
- package/dist/conversation-index/search.d.ts +3 -1
- package/dist/corpus-watermark.d.ts +3 -1
- package/dist/corpus-watermark.js +21 -20
- package/dist/day-summary.d.ts +3 -1
- package/dist/delinearize.d.ts +3 -1
- package/dist/dependency-propagation-config.d.ts +3 -1
- package/dist/direct-answer-wiring.d.ts +3 -1
- package/dist/direct-answer.d.ts +3 -1
- package/dist/embedding-fallback.d.ts +3 -1
- package/dist/enrichment/index.d.ts +3 -1
- package/dist/entity-retrieval.d.ts +4 -2
- package/dist/entity-retrieval.js +10 -9
- package/dist/entity-schema.d.ts +3 -1
- package/dist/explicit-capture.d.ts +11 -9
- package/dist/explicit-capture.js +3 -2
- package/dist/external-wiki-access.d.ts +13 -11
- package/dist/external-wiki-access.js +42 -40
- package/dist/external-wiki-collection-registration.d.ts +3 -1
- package/dist/external-wiki-collection.d.ts +3 -1
- package/dist/external-wiki-mcp-tools.d.ts +13 -11
- package/dist/extraction-error-classification.d.ts +3 -1
- package/dist/extraction-faithfulness.d.ts +3 -1
- package/dist/extraction-judge-telemetry.d.ts +3 -1
- package/dist/extraction-judge-training.d.ts +3 -1
- package/dist/extraction-judge.d.ts +3 -1
- package/dist/extraction-liveness.d.ts +3 -1
- package/dist/extraction-normalization.d.ts +3 -1
- package/dist/extraction-prompt.d.ts +3 -1
- package/dist/extraction-source-grounding-rules.d.ts +3 -1
- package/dist/extraction-source-grounding.d.ts +3 -1
- package/dist/extraction.d.ts +3 -1
- package/dist/extraction.js +22 -21
- package/dist/fallback-llm.d.ts +3 -1
- package/dist/graph-444E-DrF.d.ts +349 -0
- package/dist/graph-dashboard-diff.d.ts +4 -2
- package/dist/graph-dashboard-key.d.ts +4 -2
- package/dist/graph-dashboard-parser.d.ts +4 -2
- package/dist/{graph-edge-decay-Z6ENALU2.js → graph-edge-decay-65KMOJWY.js} +4 -3
- package/dist/graph-edge-decay-65KMOJWY.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +4 -2
- package/dist/graph-path-reconstruction.d.ts +10 -0
- package/dist/graph-path-reconstruction.js +12 -0
- package/dist/graph-path-reconstruction.js.map +1 -0
- package/dist/graph-path-scoring-config.d.ts +8 -0
- package/dist/graph-path-scoring-config.js +10 -0
- package/dist/graph-path-scoring-config.js.map +1 -0
- package/dist/graph-path-scoring.d.ts +36 -0
- package/dist/graph-path-scoring.js +11 -0
- package/dist/graph-path-scoring.js.map +1 -0
- package/dist/graph-snapshot.d.ts +4 -2
- package/dist/graph-snapshot.js +3 -2
- package/dist/graph.d.ts +5 -318
- package/dist/graph.js +5 -1
- package/dist/harmonic-retrieval.js +1 -1
- package/dist/importance.d.ts +3 -1
- package/dist/importers/index.d.ts +3 -1
- package/dist/in-flight-reads.d.ts +3 -1
- package/dist/index.d.ts +22 -20
- package/dist/index.js +149 -144
- package/dist/intent.d.ts +3 -1
- package/dist/lcm/engine.d.ts +3 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +3 -1
- package/dist/lcm/index.js +6 -6
- package/dist/lcm/tools.d.ts +3 -1
- package/dist/lifecycle.d.ts +3 -1
- package/dist/live-connectors-runner.d.ts +3 -1
- package/dist/local-llm.d.ts +3 -1
- package/dist/local-model-endpoint.d.ts +3 -1
- package/dist/maintenance/memory-governance.d.ts +3 -1
- package/dist/maintenance/memory-governance.js +10 -9
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +10 -9
- package/dist/maintenance/rebuild-memory-projection.d.ts +4 -2
- package/dist/maintenance/rebuild-memory-projection.js +11 -10
- package/dist/{maintenance-ClmUVpGI.d.ts → maintenance-CKwxpdRx.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +13 -11
- package/dist/memory-action-policy.d.ts +3 -1
- package/dist/memory-cache.d.ts +3 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +3 -1
- package/dist/memory-projection-store.d.ts +3 -1
- package/dist/memory-provenance.d.ts +3 -1
- package/dist/memory-snapshot.d.ts +3 -1
- package/dist/memory-worth-outcomes.d.ts +4 -2
- package/dist/models-json.d.ts +3 -1
- package/dist/namespaces/migrate.d.ts +5 -3
- package/dist/namespaces/migrate.js +20 -19
- package/dist/namespaces/principal.d.ts +3 -1
- package/dist/namespaces/search.d.ts +3 -1
- package/dist/namespaces/search.js +7 -7
- package/dist/namespaces/storage.d.ts +5 -3
- package/dist/namespaces/storage.js +10 -9
- package/dist/native-knowledge.d.ts +3 -1
- package/dist/offline-sync-impression-drain.d.ts +3 -1
- package/dist/operator-doctor-corpus.d.ts +3 -1
- package/dist/operator-doctor-corpus.js +22 -21
- package/dist/operator-doctor-replica.d.ts +3 -1
- package/dist/operator-toolkit.d.ts +6 -4
- package/dist/operator-toolkit.js +33 -29
- package/dist/orchestration/compression-guideline-coordinator.d.ts +4 -2
- package/dist/orchestration/maintenance.d.ts +6 -4
- package/dist/orchestration/maintenance.js +15 -14
- package/dist/{orchestrator-qJ07zI8H.d.ts → orchestrator-BshGam-o.d.ts} +45 -19
- package/dist/orchestrator.d.ts +11 -9
- package/dist/orchestrator.js +109 -104
- package/dist/patterns-cli.d.ts +3 -1
- package/dist/{pipeline-WFCxhHOn.d.ts → pipeline-D21Rs6gW.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +3 -1
- package/dist/proactive-contention.d.ts +3 -1
- package/dist/provenance.d.ts +3 -1
- package/dist/{qmd-5tzkQ44y.d.ts → qmd-Dhle1P4X.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +4 -2
- package/dist/qmd-recall-cache.d.ts +3 -1
- package/dist/qmd.d.ts +4 -2
- package/dist/qmd.js +4 -4
- package/dist/recall-concurrency-config.d.ts +3 -1
- package/dist/recall-disclosure-escalation.d.ts +3 -1
- package/dist/recall-explain-renderer.d.ts +3 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +3 -1
- package/dist/recall-planner-llm.d.ts +3 -1
- package/dist/recall-planner-llm.js +3 -3
- package/dist/recall-state.d.ts +7 -1
- package/dist/recall-state.js +1 -1
- package/dist/recall-tag-filter.d.ts +3 -1
- package/dist/recall-timings.d.ts +3 -1
- package/dist/recall-xray-cli.d.ts +3 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +3 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +7 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +3 -1
- package/dist/reconcile/manifest.d.ts +3 -1
- package/dist/reconcile/plan.d.ts +3 -1
- package/dist/replay/normalizers/chatgpt.d.ts +3 -1
- package/dist/replay/normalizers/claude.d.ts +3 -1
- package/dist/replay/normalizers/openclaw.d.ts +3 -1
- package/dist/replay/normalizers/shared.d.ts +3 -1
- package/dist/replay/runner.d.ts +3 -1
- package/dist/replay/types.d.ts +3 -1
- package/dist/replica-divergence.d.ts +3 -1
- package/dist/replica-peers-config.d.ts +3 -1
- package/dist/resolve-auth-token.d.ts +3 -1
- package/dist/resume-bundles.js +6 -4
- package/dist/retrieval-agents.d.ts +4 -2
- package/dist/retrieval-tiers.d.ts +3 -1
- package/dist/routing/engine.d.ts +3 -1
- package/dist/routing/store.d.ts +3 -1
- package/dist/salvage-envelope.d.ts +3 -1
- package/dist/{scope-profiles--vfXPl3X.d.ts → scope-profiles-NzGPDXLn.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +3 -1
- package/dist/search/factory.d.ts +3 -1
- package/dist/search/factory.js +6 -6
- package/dist/search/index.d.ts +3 -1
- package/dist/search/index.js +12 -12
- package/dist/search/lancedb-backend.d.ts +3 -1
- package/dist/search/meilisearch-backend.d.ts +3 -1
- package/dist/search/noop-backend.d.ts +3 -1
- package/dist/search/orama-backend.d.ts +3 -1
- package/dist/search/port.d.ts +3 -1
- package/dist/search/remote-backend.d.ts +3 -1
- package/dist/{semantic-consolidation-BBDuP9nJ.d.ts → semantic-consolidation-DLDKvyy5.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +4 -2
- package/dist/semantic-consolidation.js +11 -10
- package/dist/semantic-rule-promotion.js +10 -9
- package/dist/semantic-rule-verifier.d.ts +3 -1
- package/dist/semantic-rule-verifier.js +10 -9
- package/dist/{service-B8DtbpCM.d.ts → service-BIgVM7fL.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +3 -1
- package/dist/session-observer-state.d.ts +3 -1
- package/dist/shared-context/manager.d.ts +3 -1
- package/dist/signal.d.ts +3 -1
- package/dist/source-agent-qualifier.d.ts +3 -1
- package/dist/source-agent-qualifier.js +18 -17
- package/dist/{storage-BkYN1RIy.d.ts → storage-CVfGWqCI.d.ts} +7 -6
- package/dist/storage.d.ts +4 -2
- package/dist/storage.js +9 -8
- package/dist/summarizer.d.ts +3 -1
- package/dist/summary-snapshot.d.ts +3 -1
- package/dist/temporal-supersession.d.ts +4 -2
- package/dist/temporal-timeline-recall.d.ts +3 -1
- package/dist/temporal-validity.d.ts +3 -1
- package/dist/threading.d.ts +3 -1
- package/dist/tier-migration.d.ts +4 -2
- package/dist/tier-routing.d.ts +3 -1
- package/dist/topics.d.ts +3 -1
- package/dist/transcript.d.ts +3 -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/trust-score-stage.d.ts +3 -1
- package/dist/trust-score.d.ts +3 -1
- package/dist/{types-u2s9j1uD.d.ts → types-CkiDUorT.d.ts} +10 -16
- package/dist/types.d.ts +3 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +3 -1
- package/dist/verified-recall.js +10 -9
- package/dist/write-envelope.d.ts +3 -1
- package/package.json +2 -2
- package/src/archive-mutation-version.ts +59 -0
- package/src/config.test.ts +45 -0
- package/src/config.ts +10 -30
- package/src/contradiction/contradiction.test.ts +86 -1
- package/src/contradiction-config.ts +92 -0
- package/src/graph-path-reconstruction.ts +91 -0
- package/src/graph-path-scoring-config.ts +55 -0
- package/src/graph-path-scoring.test.ts +238 -0
- package/src/graph-path-scoring.ts +77 -0
- package/src/graph.test.ts +225 -5
- package/src/graph.ts +72 -5
- package/src/orchestration/contradiction-linking-coordinator.ts +246 -76
- package/src/orchestration/contradiction-localization.integration.test.ts +1953 -0
- package/src/orchestration/extraction-anchor-snapshot.ts +83 -0
- package/src/orchestration/extraction-persist-deps.ts +8 -2
- package/src/orchestration/extraction-persist.ts +43 -34
- package/src/orchestration/graph-path-state-loader.test.ts +801 -0
- package/src/orchestration/graph-path-state-loader.ts +318 -0
- package/src/orchestration/graph-recall-coordinator.integration.test.ts +1163 -0
- package/src/orchestration/graph-recall-coordinator.ts +206 -29
- package/src/orchestration/graph-recall-seam.ts +19 -0
- package/src/orchestration/recall-internal-deps.ts +7 -13
- package/src/orchestration/recall-internal.ts +5 -0
- package/src/orchestration/recall-introspection.ts +9 -1
- package/src/orchestration/recall-search-pipeline.ts +8 -13
- package/src/orchestration/update-localization.test.ts +784 -0
- package/src/orchestration/update-localization.ts +173 -0
- package/src/orchestrator.ts +19 -18
- package/src/recall-state.test.ts +29 -1
- package/src/recall-state.ts +13 -0
- package/src/recall-xray-renderer.test.ts +45 -0
- package/src/recall-xray-renderer.ts +16 -0
- package/src/recall-xray.ts +13 -0
- package/src/storage/supersession-side-effects.ts +97 -0
- package/src/storage/tombstone-blocked-capture-sync.ts +13 -5
- package/src/storage-contract/cache-coherence.test.ts +299 -0
- package/src/storage.ts +86 -88
- package/src/types.ts +12 -15
- package/dist/chunk-A4QMKFFO.js.map +0 -1
- package/dist/chunk-BJYET5TX.js.map +0 -1
- package/dist/chunk-BOFVT6P3.js.map +0 -1
- package/dist/chunk-IK6X5QPO.js.map +0 -1
- package/dist/chunk-IXXABW5A.js.map +0 -1
- package/dist/chunk-L2DPF4DF.js.map +0 -1
- package/dist/chunk-LAQ33B5D.js.map +0 -1
- package/dist/chunk-NSGU76YO.js.map +0 -1
- package/dist/chunk-PDEKQWDV.js.map +0 -1
- /package/dist/{graph-edge-decay-Z6ENALU2.js.map → archive-mutation-version.js.map} +0 -0
- /package/dist/{chunk-KDG2KTWW.js.map → chunk-33SV3E43.js.map} +0 -0
- /package/dist/{chunk-2HGUDBRJ.js.map → chunk-37ZO6LLJ.js.map} +0 -0
- /package/dist/{chunk-QW3WFHKU.js.map → chunk-45BRYON6.js.map} +0 -0
- /package/dist/{chunk-GZICBRWK.js.map → chunk-4F6X3RXW.js.map} +0 -0
- /package/dist/{chunk-7BAYBYY5.js.map → chunk-4PC4PRJE.js.map} +0 -0
- /package/dist/{chunk-VJXY5ZCT.js.map → chunk-52UKFTUK.js.map} +0 -0
- /package/dist/{chunk-ESG7Z255.js.map → chunk-5UDMFE3Q.js.map} +0 -0
- /package/dist/{chunk-JPHEOE6Z.js.map → chunk-6MTSFX7A.js.map} +0 -0
- /package/dist/{chunk-M4MP34AQ.js.map → chunk-AHZOMHWN.js.map} +0 -0
- /package/dist/{chunk-Z3RHPGSY.js.map → chunk-AIUBBHSF.js.map} +0 -0
- /package/dist/{chunk-S3AYIQCU.js.map → chunk-AXIDQG5A.js.map} +0 -0
- /package/dist/{chunk-QN7NTKRC.js.map → chunk-AZ2QBGYB.js.map} +0 -0
- /package/dist/{chunk-47J4EDGR.js.map → chunk-AZM4CCAC.js.map} +0 -0
- /package/dist/{chunk-LEJPSMKM.js.map → chunk-C5QLI33R.js.map} +0 -0
- /package/dist/{chunk-SV3PSA7Y.js.map → chunk-CV6BBVYV.js.map} +0 -0
- /package/dist/{chunk-V7X767RT.js.map → chunk-DCZBSE4F.js.map} +0 -0
- /package/dist/{chunk-7PKFPLLZ.js.map → chunk-FXTYIA46.js.map} +0 -0
- /package/dist/{chunk-64BHFFKZ.js.map → chunk-HLYR2TQL.js.map} +0 -0
- /package/dist/{chunk-5C2HNJMO.js.map → chunk-J5LLX6IL.js.map} +0 -0
- /package/dist/{chunk-RKNJBZ55.js.map → chunk-JBPKEARU.js.map} +0 -0
- /package/dist/{chunk-PLKFO2HJ.js.map → chunk-JL43BVDE.js.map} +0 -0
- /package/dist/{chunk-2S72LWKX.js.map → chunk-JYL3BVVZ.js.map} +0 -0
- /package/dist/{chunk-IPLYGWQF.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-PYKKWQZ2.js.map → chunk-M7BXDKPR.js.map} +0 -0
- /package/dist/{chunk-Z54EM5YZ.js.map → chunk-MAXVH44E.js.map} +0 -0
- /package/dist/{chunk-LYMNZZIM.js.map → chunk-NIS256NW.js.map} +0 -0
- /package/dist/{chunk-67QG75MJ.js.map → chunk-NLK2VZYZ.js.map} +0 -0
- /package/dist/{chunk-JYIFGGEM.js.map → chunk-OUKBMQ2O.js.map} +0 -0
- /package/dist/{chunk-75XOWNRS.js.map → chunk-OYESWJ43.js.map} +0 -0
- /package/dist/{chunk-TS4AJ2GI.js.map → chunk-PA45XCUD.js.map} +0 -0
- /package/dist/{chunk-4MBPIL4V.js.map → chunk-PUSLMZBQ.js.map} +0 -0
- /package/dist/{chunk-RVO6TCTU.js.map → chunk-QCECHYZL.js.map} +0 -0
- /package/dist/{chunk-GFIKG4FR.js.map → chunk-QGR6OVGT.js.map} +0 -0
- /package/dist/{chunk-HNZKVLAN.js.map → chunk-S354QO4R.js.map} +0 -0
- /package/dist/{chunk-NO37MR45.js.map → chunk-SOEN6KCF.js.map} +0 -0
- /package/dist/{chunk-FXX6RQYC.js.map → chunk-TPTECFWR.js.map} +0 -0
- /package/dist/{chunk-GDDGZVFI.js.map → chunk-UEVLYVNW.js.map} +0 -0
- /package/dist/{chunk-YQ4IQ2GA.js.map → chunk-UT5BV5OG.js.map} +0 -0
- /package/dist/{chunk-LNTUXKBT.js.map → chunk-UYYW2KPU.js.map} +0 -0
- /package/dist/{chunk-QSYL5CXK.js.map → chunk-VKXWK44Q.js.map} +0 -0
- /package/dist/{chunk-KMWYZTIE.js.map → chunk-VMMQDEN5.js.map} +0 -0
- /package/dist/{chunk-JB6D7EFB.js.map → chunk-VVG2BOKA.js.map} +0 -0
- /package/dist/{chunk-V5H6OJCR.js.map → chunk-W5XVQFLM.js.map} +0 -0
- /package/dist/{chunk-OIOZ6MOP.js.map → chunk-W6FNX2LP.js.map} +0 -0
- /package/dist/{chunk-6QPHF6RR.js.map → chunk-WQM326GS.js.map} +0 -0
- /package/dist/{chunk-TQFHQPWD.js.map → chunk-XADV5IZ3.js.map} +0 -0
- /package/dist/{chunk-DATDLJAO.js.map → chunk-XAPMEU3K.js.map} +0 -0
- /package/dist/{chunk-N3LL5NEU.js.map → chunk-ZMYDYNI4.js.map} +0 -0
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
TombstoneStore,
|
|
3
|
-
applyTombstoneResurrectionGate,
|
|
4
|
-
buildRetiredFactTombstoneInputs,
|
|
5
|
-
collectRetiredMemoriesForRebuild
|
|
6
|
-
} from "./chunk-ENTCVTQR.js";
|
|
7
1
|
import {
|
|
8
2
|
WEARABLES_DIR_NAME,
|
|
9
3
|
escapeSegmentText,
|
|
@@ -15,6 +9,12 @@ import {
|
|
|
15
9
|
unescapeSegmentText,
|
|
16
10
|
unescapeSpeakerLabel
|
|
17
11
|
} from "./chunk-UHVXE24Y.js";
|
|
12
|
+
import {
|
|
13
|
+
TombstoneStore,
|
|
14
|
+
applyTombstoneResurrectionGate,
|
|
15
|
+
buildRetiredFactTombstoneInputs,
|
|
16
|
+
collectRetiredMemoriesForRebuild
|
|
17
|
+
} from "./chunk-ENTCVTQR.js";
|
|
18
18
|
import {
|
|
19
19
|
withholdToolScopedFromSharedNamespace
|
|
20
20
|
} from "./chunk-S2V7RUCL.js";
|
|
@@ -26,10 +26,7 @@ import {
|
|
|
26
26
|
import {
|
|
27
27
|
SPECULATIVE_TTL_DAYS,
|
|
28
28
|
confidenceTier
|
|
29
|
-
} from "./chunk-
|
|
30
|
-
import {
|
|
31
|
-
createMemorySnapshot
|
|
32
|
-
} from "./chunk-S2HLHAZ4.js";
|
|
29
|
+
} from "./chunk-UU3G6GUP.js";
|
|
33
30
|
import {
|
|
34
31
|
normalizeProjectionPreview,
|
|
35
32
|
normalizeProjectionTags
|
|
@@ -38,6 +35,9 @@ import {
|
|
|
38
35
|
rewriteProjectedEntityReferences,
|
|
39
36
|
rewriteProjectedMemoryEntityReference
|
|
40
37
|
} from "./chunk-WRJVB3C2.js";
|
|
38
|
+
import {
|
|
39
|
+
createMemorySnapshot
|
|
40
|
+
} from "./chunk-S2HLHAZ4.js";
|
|
41
41
|
import {
|
|
42
42
|
rotateMarkdownFileToArchive
|
|
43
43
|
} from "./chunk-DM2T26WE.js";
|
|
@@ -61,7 +61,7 @@ import {
|
|
|
61
61
|
isQueuedReviewMemory,
|
|
62
62
|
parseTombstoneBlockedOfflineSyncMemory,
|
|
63
63
|
tombstoneBlocked
|
|
64
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-BHXYAVUM.js";
|
|
65
65
|
import {
|
|
66
66
|
composeMemoryEnvelope,
|
|
67
67
|
isSealedMemoryEnvelope,
|
|
@@ -130,14 +130,20 @@ import {
|
|
|
130
130
|
reconcileProvenanceRead,
|
|
131
131
|
serializeProvenanceFields
|
|
132
132
|
} from "./chunk-QBSFOKY6.js";
|
|
133
|
+
import {
|
|
134
|
+
sanitizeMemoryContent
|
|
135
|
+
} from "./chunk-5GKPFL3S.js";
|
|
133
136
|
import {
|
|
134
137
|
matchEntitySchemaSection,
|
|
135
138
|
normalizeEntityStructuredSection,
|
|
136
139
|
sortStructuredSectionsBySchema
|
|
137
140
|
} from "./chunk-ZIKENA2C.js";
|
|
138
141
|
import {
|
|
139
|
-
|
|
140
|
-
|
|
142
|
+
archive_mutation_version_exports,
|
|
143
|
+
bumpArchiveMutationIfChanged,
|
|
144
|
+
getArchiveMutationVersionForDir,
|
|
145
|
+
recordArchiveDelete
|
|
146
|
+
} from "./chunk-W5BIQOAJ.js";
|
|
141
147
|
import {
|
|
142
148
|
selectArtifactMatches
|
|
143
149
|
} from "./chunk-Z7L72ZHL.js";
|
|
@@ -5064,6 +5070,66 @@ function stripCitationMarkersForHashRemoval(value, template) {
|
|
|
5064
5070
|
return removed ? trimLeadingSpacesAndTabs(result) : value;
|
|
5065
5071
|
}
|
|
5066
5072
|
|
|
5073
|
+
// src/storage/supersession-side-effects.ts
|
|
5074
|
+
async function runSupersessionSideEffects(options) {
|
|
5075
|
+
const {
|
|
5076
|
+
oldMemoryId,
|
|
5077
|
+
newMemoryId,
|
|
5078
|
+
reason,
|
|
5079
|
+
now,
|
|
5080
|
+
currentBefore,
|
|
5081
|
+
updatedFm,
|
|
5082
|
+
citationTemplate,
|
|
5083
|
+
isColdOrArchiveTierPath,
|
|
5084
|
+
invalidateColdMemoriesCache,
|
|
5085
|
+
bumpMemoryCorpusVersion,
|
|
5086
|
+
appendLifecycleEvent,
|
|
5087
|
+
bumpMemoryStatusVersion,
|
|
5088
|
+
appendTombstone,
|
|
5089
|
+
writeSealedMemory
|
|
5090
|
+
} = options;
|
|
5091
|
+
try {
|
|
5092
|
+
if (isColdOrArchiveTierPath(currentBefore.path)) invalidateColdMemoriesCache();
|
|
5093
|
+
bumpMemoryCorpusVersion();
|
|
5094
|
+
await appendLifecycleEvent();
|
|
5095
|
+
bumpMemoryStatusVersion();
|
|
5096
|
+
log.debug(`superseded memory ${oldMemoryId} by ${newMemoryId}: ${reason}`);
|
|
5097
|
+
if (currentBefore.frontmatter.category === "fact") {
|
|
5098
|
+
for (const input of buildRetiredFactTombstoneInputs(
|
|
5099
|
+
{
|
|
5100
|
+
id: oldMemoryId,
|
|
5101
|
+
content: stripCitationForTemplate(currentBefore.content, citationTemplate),
|
|
5102
|
+
contentHash: currentBefore.frontmatter.contentHash,
|
|
5103
|
+
entityRef: updatedFm.entityRef,
|
|
5104
|
+
structuredAttributes: currentBefore.frontmatter.structuredAttributes
|
|
5105
|
+
},
|
|
5106
|
+
{
|
|
5107
|
+
reason: "contradiction_resolution",
|
|
5108
|
+
createdBy: "contradiction_resolution",
|
|
5109
|
+
createdAt: now,
|
|
5110
|
+
supersessionKeysForFact
|
|
5111
|
+
}
|
|
5112
|
+
)) {
|
|
5113
|
+
await appendTombstone(input);
|
|
5114
|
+
}
|
|
5115
|
+
}
|
|
5116
|
+
const auditEnvelope = composeMemoryEnvelope(
|
|
5117
|
+
{
|
|
5118
|
+
content: `Superseded: ${currentBefore.content}
|
|
5119
|
+
|
|
5120
|
+
Reason: ${reason}`,
|
|
5121
|
+
category: "correction",
|
|
5122
|
+
confidence: 1,
|
|
5123
|
+
tags: ["supersession", "auto-resolved"]
|
|
5124
|
+
},
|
|
5125
|
+
{ source: "contradiction-detection" }
|
|
5126
|
+
);
|
|
5127
|
+
await writeSealedMemory(auditEnvelope, { lineage: [oldMemoryId, newMemoryId] });
|
|
5128
|
+
} catch (err) {
|
|
5129
|
+
log.error(`failed to supersede memory ${oldMemoryId}:`, err);
|
|
5130
|
+
}
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5067
5133
|
// src/storage/entity-timeline.ts
|
|
5068
5134
|
import { createHash as createHash5 } from "crypto";
|
|
5069
5135
|
function parseEntityTimelineBullet(bullet, fallbackTimestamp) {
|
|
@@ -6992,10 +7058,17 @@ var StorageManager3 = class _StorageManager extends TombstoneBlockedCaptureIndex
|
|
|
6992
7058
|
getMemoryCorpusVersion() {
|
|
6993
7059
|
return this.readSharedVersion("memory-corpus", _StorageManager.memoryCorpusVersionByDir);
|
|
6994
7060
|
}
|
|
7061
|
+
/**
|
|
7062
|
+
* Bump only — NOT invalidateAllForDir (that would drop the very hot
|
|
7063
|
+
* entry the write path just patched).
|
|
7064
|
+
*/
|
|
6995
7065
|
bumpMemoryCorpusVersion() {
|
|
6996
7066
|
this.bumpSharedVersion("memory-corpus", _StorageManager.memoryCorpusVersionByDir);
|
|
6997
7067
|
deleteInFlightReadsForDir(this.baseDir);
|
|
6998
7068
|
}
|
|
7069
|
+
getArchiveMutationVersion() {
|
|
7070
|
+
return getArchiveMutationVersionForDir(this.baseDir);
|
|
7071
|
+
}
|
|
6999
7072
|
/**
|
|
7000
7073
|
* Corpus bump reporting whether THIS process's append was the only one
|
|
7001
7074
|
* since the pre-bump size (#1902, Codex P1): the `exclusive` flag lets
|
|
@@ -8695,16 +8768,19 @@ ${sanitized.text}
|
|
|
8695
8768
|
invalidateMemoryCachesForTiers(tiers) {
|
|
8696
8769
|
let hotChanged = false;
|
|
8697
8770
|
let coldChanged = false;
|
|
8771
|
+
let archiveChanged = false;
|
|
8698
8772
|
for (const tier of tiers) {
|
|
8699
8773
|
if (tier === "cold") {
|
|
8700
8774
|
coldChanged = true;
|
|
8701
|
-
} else if (tier === "
|
|
8775
|
+
} else if (tier === "archive") {
|
|
8776
|
+
hotChanged = true;
|
|
8777
|
+
archiveChanged = true;
|
|
8778
|
+
} else if (tier === "hot") {
|
|
8702
8779
|
hotChanged = true;
|
|
8703
8780
|
}
|
|
8704
8781
|
}
|
|
8705
|
-
if (hotChanged)
|
|
8706
|
-
|
|
8707
|
-
}
|
|
8782
|
+
if (hotChanged) this.invalidateAllMemoriesCache();
|
|
8783
|
+
bumpArchiveMutationIfChanged(this.baseDir, archiveChanged);
|
|
8708
8784
|
if (coldChanged) {
|
|
8709
8785
|
this.invalidateColdMemoriesCache();
|
|
8710
8786
|
}
|
|
@@ -9106,6 +9182,7 @@ ${memory.content}
|
|
|
9106
9182
|
this.notifyCatalogWrite();
|
|
9107
9183
|
}
|
|
9108
9184
|
async moveMemoryToPath(memory, targetPath) {
|
|
9185
|
+
const { recordArchiveDelete: recordArchiveDelete2, recordArchiveWrite } = archive_mutation_version_exports;
|
|
9109
9186
|
const changed = await this.withTombstoneBlockedMemoryPathLock(
|
|
9110
9187
|
memory.path,
|
|
9111
9188
|
async (current) => {
|
|
@@ -9126,12 +9203,12 @@ ${memory.content}
|
|
|
9126
9203
|
let durable = false;
|
|
9127
9204
|
try {
|
|
9128
9205
|
if (destination?.frontmatter.id === current.frontmatter.id) {
|
|
9129
|
-
await this.deleteManagedStorageFile(current.path);
|
|
9206
|
+
await recordArchiveDelete2(this.baseDir, current.path, () => this.deleteManagedStorageFile(current.path));
|
|
9130
9207
|
durable = true;
|
|
9131
9208
|
this.invalidateAllMemoriesCache();
|
|
9132
9209
|
updateProjectedMemoryPath(this.baseDir, current.frontmatter.id, projectedPath);
|
|
9133
9210
|
} else {
|
|
9134
|
-
await this.writeMemoryFileAtomic(targetPath, current);
|
|
9211
|
+
await recordArchiveWrite(this.baseDir, targetPath, () => this.writeMemoryFileAtomic(targetPath, current));
|
|
9135
9212
|
if (memory.frontmatter.entityRef !== current.frontmatter.entityRef) {
|
|
9136
9213
|
memory.frontmatter.entityRef = current.frontmatter.entityRef;
|
|
9137
9214
|
}
|
|
@@ -9139,7 +9216,7 @@ ${memory.content}
|
|
|
9139
9216
|
const sourcePath = path9.resolve(current.path);
|
|
9140
9217
|
const destPath = path9.resolve(targetPath);
|
|
9141
9218
|
if (sourcePath !== destPath) {
|
|
9142
|
-
await this.deleteManagedStorageFile(current.path);
|
|
9219
|
+
await recordArchiveDelete2(this.baseDir, current.path, () => this.deleteManagedStorageFile(current.path));
|
|
9143
9220
|
this.invalidateAllMemoriesCache();
|
|
9144
9221
|
updateProjectedMemoryPath(this.baseDir, current.frontmatter.id, projectedPath);
|
|
9145
9222
|
}
|
|
@@ -9180,6 +9257,7 @@ ${memory.content}
|
|
|
9180
9257
|
* Returns the new file path on success, null on failure.
|
|
9181
9258
|
*/
|
|
9182
9259
|
async archiveMemory(memory, lifecycle) {
|
|
9260
|
+
const { recordArchiveDelete: recordArchiveDelete2, recordArchiveWrite } = archive_mutation_version_exports;
|
|
9183
9261
|
const archiveCurrent = async (current, markDurable) => {
|
|
9184
9262
|
try {
|
|
9185
9263
|
const now = lifecycle?.at ?? /* @__PURE__ */ new Date();
|
|
@@ -9202,7 +9280,7 @@ ${current.content}
|
|
|
9202
9280
|
`;
|
|
9203
9281
|
const destPath = path9.join(destDir, path9.basename(current.path));
|
|
9204
9282
|
const priorDest = await this.readStorageSecureFile(destPath).catch(() => null);
|
|
9205
|
-
await this.writeStorageSecureFile(destPath, fileContent);
|
|
9283
|
+
await recordArchiveWrite(this.baseDir, destPath, () => this.writeStorageSecureFile(destPath, fileContent));
|
|
9206
9284
|
if (typeof current.frontmatter.entityRef === "string") {
|
|
9207
9285
|
try {
|
|
9208
9286
|
await this.entityRefRepair.repair(
|
|
@@ -9214,14 +9292,29 @@ ${current.content}
|
|
|
9214
9292
|
);
|
|
9215
9293
|
} catch (err) {
|
|
9216
9294
|
if (priorDest === null) {
|
|
9217
|
-
await
|
|
9295
|
+
await recordArchiveDelete2(
|
|
9296
|
+
this.baseDir,
|
|
9297
|
+
destPath,
|
|
9298
|
+
() => unlink4(destPath).then(
|
|
9299
|
+
() => true,
|
|
9300
|
+
() => false
|
|
9301
|
+
)
|
|
9302
|
+
);
|
|
9218
9303
|
} else {
|
|
9219
|
-
await
|
|
9304
|
+
await recordArchiveDelete2(
|
|
9305
|
+
this.baseDir,
|
|
9306
|
+
destPath,
|
|
9307
|
+
() => this.writeStorageSecureFile(destPath, priorDest).then(
|
|
9308
|
+
() => true,
|
|
9309
|
+
() => false
|
|
9310
|
+
)
|
|
9311
|
+
);
|
|
9220
9312
|
}
|
|
9221
9313
|
throw err;
|
|
9222
9314
|
}
|
|
9223
9315
|
}
|
|
9224
|
-
|
|
9316
|
+
const deleted = await recordArchiveDelete2(this.baseDir, current.path, () => this.deleteManagedStorageFile(current.path));
|
|
9317
|
+
if (!deleted) return null;
|
|
9225
9318
|
markDurable();
|
|
9226
9319
|
markProjectedMemoryPathInvalid(this.baseDir, current.frontmatter.id);
|
|
9227
9320
|
this.invalidateAllMemoriesCache();
|
|
@@ -9300,7 +9393,8 @@ ${current.content}
|
|
|
9300
9393
|
const memory = memories.find((candidate) => candidate.frontmatter.id === id);
|
|
9301
9394
|
if (!memory) return false;
|
|
9302
9395
|
return await this.runTombstoneBlockedInvalidation(memory, async (current, rebuildMarker, markDurable) => {
|
|
9303
|
-
|
|
9396
|
+
const deleted = await recordArchiveDelete(this.baseDir, current.path, () => this.deleteManagedStorageFile(current.path));
|
|
9397
|
+
if (!deleted) return false;
|
|
9304
9398
|
markDurable();
|
|
9305
9399
|
markProjectedMemoryPathInvalid(this.baseDir, id);
|
|
9306
9400
|
this.invalidateAllMemoriesCache();
|
|
@@ -10527,49 +10621,64 @@ ${sanitized.text}
|
|
|
10527
10621
|
const memories = await this.readAllMemories();
|
|
10528
10622
|
return memories.filter((m) => m.frontmatter.parentId === parentId).sort((a, b) => (a.frontmatter.chunkIndex ?? 0) - (b.frontmatter.chunkIndex ?? 0));
|
|
10529
10623
|
}
|
|
10530
|
-
// ---------------------------------------------------------------------------
|
|
10531
|
-
// Contradiction Detection (Phase 2B)
|
|
10532
|
-
// ---------------------------------------------------------------------------
|
|
10533
|
-
/**
|
|
10534
|
-
* Mark a memory as superseded by another.
|
|
10535
|
-
* Updates the old memory's status and adds the supersededBy link.
|
|
10536
|
-
*/
|
|
10537
10624
|
async supersedeMemory(oldMemoryId, newMemoryId, reason) {
|
|
10538
10625
|
const memories = await this.readAllMemories();
|
|
10539
|
-
|
|
10626
|
+
let oldMemory = memories.find(
|
|
10627
|
+
(memory) => memory.frontmatter.id === oldMemoryId && inferMemoryStatus(memory.frontmatter, toMemoryPathRel(this.baseDir, memory.path)) === "active"
|
|
10628
|
+
);
|
|
10629
|
+
if (!oldMemory) {
|
|
10630
|
+
oldMemory = (await this.readAllColdMemories()).find(
|
|
10631
|
+
(memory) => memory.frontmatter.id === oldMemoryId && inferMemoryStatus(memory.frontmatter, toMemoryPathRel(this.baseDir, memory.path)) === "active"
|
|
10632
|
+
);
|
|
10633
|
+
}
|
|
10540
10634
|
if (!oldMemory) return false;
|
|
10541
10635
|
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
10542
10636
|
let currentBefore = oldMemory;
|
|
10543
10637
|
let updatedFm = oldMemory.frontmatter;
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10638
|
+
const written = await this.withTombstoneBlockedMemoryPathLock(oldMemory.path, async (current) => {
|
|
10639
|
+
if (current?.frontmatter.id !== oldMemoryId) return false;
|
|
10640
|
+
if (current.frontmatter.supersededBy !== void 0 || inferMemoryStatus(current.frontmatter, toMemoryPathRel(this.baseDir, current.path)) !== "active") {
|
|
10641
|
+
return false;
|
|
10642
|
+
}
|
|
10643
|
+
currentBefore = current;
|
|
10644
|
+
const refIdsAtWrite = this.currentHistoricalIds();
|
|
10645
|
+
updatedFm = canonicalizeEntityRefOption(
|
|
10646
|
+
{ ...current.frontmatter, status: "superseded", supersededBy: newMemoryId, supersededAt: now, updated: now },
|
|
10647
|
+
refIdsAtWrite
|
|
10648
|
+
);
|
|
10649
|
+
const fileContent = `${serializeFrontmatter(updatedFm)}
|
|
10554
10650
|
|
|
10555
10651
|
${current.content}
|
|
10556
10652
|
`;
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10653
|
+
await this.writeTombstoneBlockedFrontmatter(current, fileContent, updatedFm);
|
|
10654
|
+
if (typeof current.frontmatter.entityRef === "string") {
|
|
10655
|
+
await this.entityRefRepair.repair(
|
|
10656
|
+
current.path,
|
|
10657
|
+
updatedFm,
|
|
10658
|
+
current.frontmatter.entityRef,
|
|
10659
|
+
refIdsAtWrite,
|
|
10660
|
+
current.content,
|
|
10661
|
+
{ onFailRestore: current }
|
|
10662
|
+
);
|
|
10663
|
+
}
|
|
10664
|
+
return true;
|
|
10665
|
+
}).catch((err) => {
|
|
10666
|
+
log.error(`failed to supersede memory ${oldMemoryId}:`, err);
|
|
10667
|
+
return false;
|
|
10668
|
+
});
|
|
10669
|
+
if (!written) return false;
|
|
10670
|
+
await runSupersessionSideEffects({
|
|
10671
|
+
oldMemoryId,
|
|
10672
|
+
newMemoryId,
|
|
10673
|
+
reason,
|
|
10674
|
+
now,
|
|
10675
|
+
currentBefore,
|
|
10676
|
+
updatedFm,
|
|
10677
|
+
citationTemplate: this.citationTemplate,
|
|
10678
|
+
isColdOrArchiveTierPath: (memoryPath) => this.isColdOrArchiveTierPath(memoryPath),
|
|
10679
|
+
invalidateColdMemoriesCache: () => this.invalidateColdMemoriesCache(),
|
|
10680
|
+
bumpMemoryCorpusVersion: () => this.bumpMemoryCorpusVersion(),
|
|
10681
|
+
appendLifecycleEvent: () => this.appendGeneratedMemoryLifecycleEventFailOpen("storage.supersedeMemory", {
|
|
10573
10682
|
memoryId: oldMemoryId,
|
|
10574
10683
|
eventType: "superseded",
|
|
10575
10684
|
timestamp: now,
|
|
@@ -10578,44 +10687,12 @@ ${current.content}
|
|
|
10578
10687
|
before: this.summarizeLifecycleState(currentBefore.frontmatter, currentBefore.path),
|
|
10579
10688
|
after: this.summarizeLifecycleState(updatedFm, currentBefore.path),
|
|
10580
10689
|
relatedMemoryIds: [newMemoryId]
|
|
10581
|
-
})
|
|
10582
|
-
this.bumpMemoryStatusVersion()
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
id: oldMemoryId,
|
|
10588
|
-
content: stripCitationForTemplate(currentBefore.content, this.citationTemplate),
|
|
10589
|
-
contentHash: currentBefore.frontmatter.contentHash,
|
|
10590
|
-
entityRef: updatedFm.entityRef,
|
|
10591
|
-
structuredAttributes: currentBefore.frontmatter.structuredAttributes
|
|
10592
|
-
},
|
|
10593
|
-
{
|
|
10594
|
-
reason: "contradiction_resolution",
|
|
10595
|
-
createdBy: "contradiction_resolution",
|
|
10596
|
-
createdAt: now,
|
|
10597
|
-
supersessionKeysForFact
|
|
10598
|
-
}
|
|
10599
|
-
)) {
|
|
10600
|
-
await this.appendTombstone(input);
|
|
10601
|
-
}
|
|
10602
|
-
}
|
|
10603
|
-
const auditBody = `Superseded: ${currentBefore.content}
|
|
10604
|
-
|
|
10605
|
-
Reason: ${reason}`;
|
|
10606
|
-
const auditInput = {
|
|
10607
|
-
content: auditBody,
|
|
10608
|
-
category: "correction",
|
|
10609
|
-
confidence: 1,
|
|
10610
|
-
tags: ["supersession", "auto-resolved"]
|
|
10611
|
-
};
|
|
10612
|
-
const auditEnvelope = composeMemoryEnvelope(auditInput, { source: "contradiction-detection" });
|
|
10613
|
-
await this.writeSealedMemory(auditEnvelope, { lineage: [oldMemoryId, newMemoryId] });
|
|
10614
|
-
return true;
|
|
10615
|
-
} catch (err) {
|
|
10616
|
-
log.error(`failed to supersede memory ${oldMemoryId}:`, err);
|
|
10617
|
-
return false;
|
|
10618
|
-
}
|
|
10690
|
+
}),
|
|
10691
|
+
bumpMemoryStatusVersion: () => this.bumpMemoryStatusVersion(),
|
|
10692
|
+
appendTombstone: (input) => this.appendTombstone(input),
|
|
10693
|
+
writeSealedMemory: (envelope, extras) => this.writeSealedMemory(envelope, extras)
|
|
10694
|
+
});
|
|
10695
|
+
return true;
|
|
10619
10696
|
}
|
|
10620
10697
|
// ---------------------------------------------------------------------------
|
|
10621
10698
|
// Memory Summarization (Phase 4A)
|
|
@@ -10850,4 +10927,4 @@ export {
|
|
|
10850
10927
|
isValidBufferSurpriseEvent,
|
|
10851
10928
|
StorageManager3 as StorageManager
|
|
10852
10929
|
};
|
|
10853
|
-
//# sourceMappingURL=chunk-
|
|
10930
|
+
//# sourceMappingURL=chunk-VBHPOWBJ.js.map
|