@remnic/core 9.17.1 → 9.18.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 +8 -8
- package/dist/access-admin-ops-surface.js +18 -18
- package/dist/access-boundary.d.ts +8 -8
- package/dist/access-boundary.js +18 -18
- package/dist/access-cli.js +52 -52
- package/dist/access-http.d.ts +8 -8
- package/dist/access-http.js +23 -23
- package/dist/access-identity-continuity-surface.d.ts +6 -6
- package/dist/access-identity-continuity-surface.js +18 -18
- package/dist/access-lcm-surface.d.ts +8 -8
- package/dist/access-lcm-surface.js +18 -18
- package/dist/access-mcp.d.ts +8 -8
- package/dist/access-mcp.js +22 -22
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/access-memory-search-fanout.js +3 -3
- package/dist/{access-namespace-preflight-_yxq3PYy.d.ts → access-namespace-preflight-IbQ0O8Kf.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +18 -18
- package/dist/access-observe-write-surface.d.ts +8 -8
- package/dist/access-observe-write-surface.js +18 -18
- package/dist/access-operations-batch.js +20 -20
- package/dist/access-operations.d.ts +11 -11
- package/dist/access-operations.js +21 -21
- package/dist/access-recall-concurrency.d.ts +8 -8
- package/dist/access-recall-concurrency.js +18 -18
- package/dist/access-recall-response.d.ts +8 -8
- package/dist/access-recall-response.js +18 -18
- package/dist/access-recall-surface.d.ts +8 -8
- package/dist/access-recall-surface.js +18 -18
- package/dist/access-schema.d.ts +76 -76
- package/dist/{access-service-CSm242ks.d.ts → access-service-BqjsJRn_.d.ts} +6 -6
- package/dist/access-service.d.ts +8 -8
- package/dist/access-service.js +18 -18
- package/dist/access-surface-catalog.d.ts +8 -8
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +1 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +6 -6
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +6 -6
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +2 -2
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +4 -3
- package/dist/capabilities.js +1 -1
- package/dist/{catalog-9qLG_2OV.d.ts → catalog-D_ToaAZM.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +7 -7
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-BV5WMSIJ.js → chunk-2AJ72VVS.js} +3 -3
- package/dist/{chunk-755Q3DGF.js → chunk-2H7OEVPO.js} +2 -2
- package/dist/{chunk-TG6IHVE2.js → chunk-354T54RR.js} +2 -2
- package/dist/{chunk-347WD2LE.js → chunk-3CSX3ETE.js} +2 -1
- package/dist/chunk-3CSX3ETE.js.map +1 -0
- package/dist/{chunk-EA2H5LML.js → chunk-44DUJETW.js} +2 -2
- package/dist/{chunk-SESF64QR.js → chunk-52H7OB7Y.js} +4 -4
- package/dist/{chunk-KQED7RCV.js → chunk-6P6ZR6JR.js} +22 -22
- package/dist/{chunk-C2RMQRPN.js → chunk-6YJLLDWO.js} +3 -3
- package/dist/{chunk-QDTEH6BS.js → chunk-7JXXI3GW.js} +2 -2
- package/dist/{chunk-B6P3QDBF.js → chunk-7KXE7KN5.js} +2 -2
- package/dist/{chunk-2OH3ZRYH.js → chunk-7NHIHUBW.js} +7 -6
- package/dist/chunk-7NHIHUBW.js.map +1 -0
- package/dist/{chunk-LMVAIZR5.js → chunk-A2KGXUOU.js} +5 -9
- package/dist/chunk-A2KGXUOU.js.map +1 -0
- package/dist/{chunk-52EFQMQC.js → chunk-AKWX5E6R.js} +30 -30
- package/dist/{chunk-WIUYMCPL.js → chunk-ALPBE5EC.js} +15 -15
- package/dist/{chunk-VZC7ORJE.js → chunk-B3R5CC35.js} +2 -2
- package/dist/{chunk-JECBQBEX.js → chunk-B7GROTXD.js} +2 -2
- package/dist/{chunk-6WAFYNVT.js → chunk-BJJAX3IZ.js} +2 -2
- package/dist/{chunk-7O2C2OOF.js → chunk-CNNQVI2A.js} +7 -7
- package/dist/{chunk-S2FSBU4H.js → chunk-FCCMFVS6.js} +2 -2
- package/dist/{chunk-F7BWFIDK.js → chunk-FO3WM76R.js} +65 -4
- package/dist/chunk-FO3WM76R.js.map +1 -0
- package/dist/{chunk-V57NLO5P.js → chunk-HKF5VASQ.js} +11 -4
- package/dist/chunk-HKF5VASQ.js.map +1 -0
- package/dist/{chunk-7ON2JW73.js → chunk-IKMAO55B.js} +2 -2
- package/dist/{chunk-B57BIBXI.js → chunk-IU3XJAQM.js} +3 -3
- package/dist/{chunk-WQ2I6ODB.js → chunk-JEMLK7ED.js} +3 -3
- package/dist/{chunk-RFDD3B7W.js → chunk-JGUXPJUQ.js} +2 -2
- package/dist/{chunk-BGBPDAIN.js → chunk-JHIEQCMG.js} +6 -6
- package/dist/{chunk-N7DK67GZ.js → chunk-KPEIWAZY.js} +1 -1
- package/dist/{chunk-N7DK67GZ.js.map → chunk-KPEIWAZY.js.map} +1 -1
- package/dist/{chunk-I6ODVWQB.js → chunk-LTGSOACX.js} +2 -2
- package/dist/{chunk-AWT7SCWQ.js → chunk-LU22QKFA.js} +2 -2
- package/dist/{chunk-QCLQ4BGA.js → chunk-MJYYXODM.js} +3 -3
- package/dist/{chunk-7VZWZVYG.js → chunk-MQVINOJQ.js} +3 -3
- package/dist/{chunk-7YJLCNPF.js → chunk-NEFMSUC2.js} +204 -170
- package/dist/chunk-NEFMSUC2.js.map +1 -0
- package/dist/{chunk-K2B2TMF3.js → chunk-NGO4QKMY.js} +2 -2
- package/dist/{chunk-7LXSPIVG.js → chunk-OR3OQHHS.js} +4 -4
- package/dist/{chunk-ANEUPF6O.js → chunk-QH6CS6XJ.js} +2 -2
- package/dist/{chunk-SCCO46KZ.js → chunk-RDQGLJRR.js} +3 -2
- package/dist/chunk-RDQGLJRR.js.map +1 -0
- package/dist/{chunk-QDNE35FU.js → chunk-SB4OKS6C.js} +3 -3
- package/dist/{chunk-IZHXSLO7.js → chunk-SGCWBLHN.js} +2 -2
- package/dist/{chunk-B6NCHYAK.js → chunk-SQEDDWAM.js} +4 -4
- package/dist/{chunk-XSBUROEB.js → chunk-UGH6VPPO.js} +2 -2
- package/dist/{chunk-GBT4TFV7.js → chunk-UHOUNNY3.js} +9 -9
- package/dist/{chunk-7PK4W4RN.js → chunk-UL6WTQN4.js} +3 -3
- package/dist/{chunk-KGKYTCDO.js → chunk-UQXIW7OZ.js} +3 -3
- package/dist/{chunk-WIS5JTJR.js → chunk-UVCY7VDX.js} +2 -2
- package/dist/{chunk-BIRPR5N7.js → chunk-VMALXCR5.js} +2 -2
- package/dist/{chunk-L3HAUO7K.js → chunk-WIP3MQZY.js} +2 -2
- package/dist/{chunk-AE7WMV4V.js → chunk-WMLHJ5UW.js} +2 -2
- package/dist/{chunk-G2WCVFDC.js → chunk-WMMT6W7C.js} +4 -4
- package/dist/{chunk-AFH7PIFU.js → chunk-XGYCI23S.js} +2 -2
- package/dist/{chunk-6QYST5XN.js → chunk-XY7QPJDA.js} +2 -2
- package/dist/{chunk-BZ52BJ6C.js → chunk-YWJBAHTY.js} +2 -2
- package/dist/{chunk-BCNVNUQG.js → chunk-ZHWEUG7Y.js} +10 -1
- package/dist/{chunk-BCNVNUQG.js.map → chunk-ZHWEUG7Y.js.map} +1 -1
- package/dist/{cli-BLZHYY2A.d.ts → cli-D2g5mRgf.d.ts} +5 -5
- package/dist/cli.d.ts +10 -10
- package/dist/cli.js +36 -36
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +7 -7
- 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 +1 -1
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +6 -6
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +7 -7
- package/dist/consolidation-provenance-check.d.ts +2 -2
- package/dist/consolidation-undo.d.ts +2 -2
- package/dist/contradiction/index.d.ts +2 -2
- package/dist/contradiction/index.js +2 -2
- package/dist/{contradiction-scan-RJBABNRH.js → contradiction-scan-HMF7CNKD.js} +3 -3
- 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/day-summary.d.ts +1 -1
- package/dist/day-summary.js +2 -2
- package/dist/delinearize.d.ts +1 -1
- 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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +6 -6
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +6 -6
- package/dist/explicit-capture.js +2 -2
- 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.d.ts +1 -1
- package/dist/extraction.js +4 -4
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-CSRHCJIQ.js → first-start-migration-LEXL3XYL.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/importance.d.ts +1 -1
- package/dist/importers/index.d.ts +1 -1
- package/dist/in-flight-reads.d.ts +1 -1
- package/dist/index.d.ts +418 -418
- package/dist/index.js +52 -52
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- 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-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +6 -6
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +6 -6
- package/dist/maintenance/rebuild-memory-projection.d.ts +26 -8
- package/dist/maintenance/rebuild-memory-projection.js +7 -7
- package/dist/mcp-memory-inspector-app.d.ts +8 -8
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +3 -2
- package/dist/memory-projection-store.js +3 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +10 -10
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +6 -6
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +4 -4
- package/dist/operator-toolkit.d.ts +2 -2
- package/dist/operator-toolkit.js +16 -16
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -3
- package/dist/orchestration/maintenance.js +15 -11
- package/dist/{orchestrator-CplS9U3U.d.ts → orchestrator-DrILRi-n.d.ts} +5 -5
- package/dist/orchestrator.d.ts +6 -6
- package/dist/orchestrator.js +52 -52
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-DB4CbFqo.d.ts → pipeline-BYo4b_y9.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/{purge-IRF47ZTX.js → purge-YSGX5BOG.js} +2 -2
- package/dist/{qmd-BxZmOLHq.d.ts → qmd-BIrL8e69.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/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-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/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/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +2 -2
- 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/schemas.d.ts +54 -54
- package/dist/{scope-profiles-NsQQo1Lt.d.ts → scope-profiles-BiQ9yXP4.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- 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-DW85h30n.d.ts → semantic-consolidation-C-cSATcR.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +7 -7
- package/dist/semantic-rule-promotion.js +6 -6
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +6 -6
- 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/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +1 -1
- package/dist/{storage-o5BTAa8d.d.ts → storage-ByTv05qM.d.ts} +1 -1
- package/dist/storage-guards.d.ts +6 -2
- package/dist/storage-guards.js +3 -1
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +5 -5
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +3 -3
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/temporal-supersession.d.ts +2 -2
- 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 +2 -2
- package/dist/tier-routing.d.ts +1 -1
- package/dist/{tier-stats-QEJSPFV2.js → tier-stats-XKD7SXYY.js} +2 -2
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- 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/{types-V3dT-pen.d.ts → types-e0_MI3Iq.d.ts} +16 -0
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +6 -6
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/capabilities.test.ts +1 -0
- package/src/capabilities.ts +4 -1
- package/src/config.test.ts +22 -0
- package/src/config.ts +5 -0
- package/src/maintenance/projection-support.ts +56 -0
- package/src/maintenance/rebuild-memory-lifecycle-ledger.ts +2 -7
- package/src/maintenance/rebuild-memory-projection.ts +7 -10
- package/src/memory-projection-store.ts +1 -1
- package/src/orchestration/maintenance.test.ts +116 -0
- package/src/orchestration/maintenance.ts +16 -0
- package/src/orchestration/projection-rebuild-schedule.ts +115 -0
- package/src/storage-guards.ts +19 -2
- package/src/storage-memory-lifecycle-ledger.test.ts +32 -0
- package/src/storage.ts +15 -1
- package/src/testing/subjects/memory-projection.test.ts +78 -0
- package/src/types.ts +18 -0
- package/dist/chunk-2OH3ZRYH.js.map +0 -1
- package/dist/chunk-347WD2LE.js.map +0 -1
- package/dist/chunk-7YJLCNPF.js.map +0 -1
- package/dist/chunk-F7BWFIDK.js.map +0 -1
- package/dist/chunk-LMVAIZR5.js.map +0 -1
- package/dist/chunk-SCCO46KZ.js.map +0 -1
- package/dist/chunk-V57NLO5P.js.map +0 -1
- /package/dist/{chunk-BV5WMSIJ.js.map → chunk-2AJ72VVS.js.map} +0 -0
- /package/dist/{chunk-755Q3DGF.js.map → chunk-2H7OEVPO.js.map} +0 -0
- /package/dist/{chunk-TG6IHVE2.js.map → chunk-354T54RR.js.map} +0 -0
- /package/dist/{chunk-EA2H5LML.js.map → chunk-44DUJETW.js.map} +0 -0
- /package/dist/{chunk-SESF64QR.js.map → chunk-52H7OB7Y.js.map} +0 -0
- /package/dist/{chunk-KQED7RCV.js.map → chunk-6P6ZR6JR.js.map} +0 -0
- /package/dist/{chunk-C2RMQRPN.js.map → chunk-6YJLLDWO.js.map} +0 -0
- /package/dist/{chunk-QDTEH6BS.js.map → chunk-7JXXI3GW.js.map} +0 -0
- /package/dist/{chunk-B6P3QDBF.js.map → chunk-7KXE7KN5.js.map} +0 -0
- /package/dist/{chunk-52EFQMQC.js.map → chunk-AKWX5E6R.js.map} +0 -0
- /package/dist/{chunk-WIUYMCPL.js.map → chunk-ALPBE5EC.js.map} +0 -0
- /package/dist/{chunk-VZC7ORJE.js.map → chunk-B3R5CC35.js.map} +0 -0
- /package/dist/{chunk-JECBQBEX.js.map → chunk-B7GROTXD.js.map} +0 -0
- /package/dist/{chunk-6WAFYNVT.js.map → chunk-BJJAX3IZ.js.map} +0 -0
- /package/dist/{chunk-7O2C2OOF.js.map → chunk-CNNQVI2A.js.map} +0 -0
- /package/dist/{chunk-S2FSBU4H.js.map → chunk-FCCMFVS6.js.map} +0 -0
- /package/dist/{chunk-7ON2JW73.js.map → chunk-IKMAO55B.js.map} +0 -0
- /package/dist/{chunk-B57BIBXI.js.map → chunk-IU3XJAQM.js.map} +0 -0
- /package/dist/{chunk-WQ2I6ODB.js.map → chunk-JEMLK7ED.js.map} +0 -0
- /package/dist/{chunk-RFDD3B7W.js.map → chunk-JGUXPJUQ.js.map} +0 -0
- /package/dist/{chunk-BGBPDAIN.js.map → chunk-JHIEQCMG.js.map} +0 -0
- /package/dist/{chunk-I6ODVWQB.js.map → chunk-LTGSOACX.js.map} +0 -0
- /package/dist/{chunk-AWT7SCWQ.js.map → chunk-LU22QKFA.js.map} +0 -0
- /package/dist/{chunk-QCLQ4BGA.js.map → chunk-MJYYXODM.js.map} +0 -0
- /package/dist/{chunk-7VZWZVYG.js.map → chunk-MQVINOJQ.js.map} +0 -0
- /package/dist/{chunk-K2B2TMF3.js.map → chunk-NGO4QKMY.js.map} +0 -0
- /package/dist/{chunk-7LXSPIVG.js.map → chunk-OR3OQHHS.js.map} +0 -0
- /package/dist/{chunk-ANEUPF6O.js.map → chunk-QH6CS6XJ.js.map} +0 -0
- /package/dist/{chunk-QDNE35FU.js.map → chunk-SB4OKS6C.js.map} +0 -0
- /package/dist/{chunk-IZHXSLO7.js.map → chunk-SGCWBLHN.js.map} +0 -0
- /package/dist/{chunk-B6NCHYAK.js.map → chunk-SQEDDWAM.js.map} +0 -0
- /package/dist/{chunk-XSBUROEB.js.map → chunk-UGH6VPPO.js.map} +0 -0
- /package/dist/{chunk-GBT4TFV7.js.map → chunk-UHOUNNY3.js.map} +0 -0
- /package/dist/{chunk-7PK4W4RN.js.map → chunk-UL6WTQN4.js.map} +0 -0
- /package/dist/{chunk-KGKYTCDO.js.map → chunk-UQXIW7OZ.js.map} +0 -0
- /package/dist/{chunk-WIS5JTJR.js.map → chunk-UVCY7VDX.js.map} +0 -0
- /package/dist/{chunk-BIRPR5N7.js.map → chunk-VMALXCR5.js.map} +0 -0
- /package/dist/{chunk-L3HAUO7K.js.map → chunk-WIP3MQZY.js.map} +0 -0
- /package/dist/{chunk-AE7WMV4V.js.map → chunk-WMLHJ5UW.js.map} +0 -0
- /package/dist/{chunk-G2WCVFDC.js.map → chunk-WMMT6W7C.js.map} +0 -0
- /package/dist/{chunk-AFH7PIFU.js.map → chunk-XGYCI23S.js.map} +0 -0
- /package/dist/{chunk-6QYST5XN.js.map → chunk-XY7QPJDA.js.map} +0 -0
- /package/dist/{chunk-BZ52BJ6C.js.map → chunk-YWJBAHTY.js.map} +0 -0
- /package/dist/{contradiction-scan-RJBABNRH.js.map → contradiction-scan-HMF7CNKD.js.map} +0 -0
- /package/dist/{first-start-migration-CSRHCJIQ.js.map → first-start-migration-LEXL3XYL.js.map} +0 -0
- /package/dist/{purge-IRF47ZTX.js.map → purge-YSGX5BOG.js.map} +0 -0
- /package/dist/{tier-stats-QEJSPFV2.js.map → tier-stats-XKD7SXYY.js.map} +0 -0
|
@@ -6,8 +6,9 @@ import {
|
|
|
6
6
|
writeFileAtomically
|
|
7
7
|
} from "./chunk-R6YJI3HE.js";
|
|
8
8
|
import {
|
|
9
|
-
StorageManager
|
|
10
|
-
|
|
9
|
+
StorageManager,
|
|
10
|
+
assertInjectedStorageRooted
|
|
11
|
+
} from "./chunk-NEFMSUC2.js";
|
|
11
12
|
import {
|
|
12
13
|
withHeldFileLock
|
|
13
14
|
} from "./chunk-WL5EBRDH.js";
|
|
@@ -92,12 +93,7 @@ async function rebuildMemoryLifecycleLedger(options) {
|
|
|
92
93
|
const dryRun = options.dryRun !== false;
|
|
93
94
|
const now = options.now ?? /* @__PURE__ */ new Date();
|
|
94
95
|
const outputPath = path.join(options.memoryDir, "state", "memory-lifecycle-ledger.jsonl");
|
|
95
|
-
const storage = options.storage ?? new StorageManager(options.memoryDir);
|
|
96
|
-
if (options.storage && path.resolve(storage.dir) !== path.resolve(options.memoryDir)) {
|
|
97
|
-
throw new Error(
|
|
98
|
-
`rebuildMemoryLifecycleLedger: storage.dir (${storage.dir}) must match memoryDir (${options.memoryDir})`
|
|
99
|
-
);
|
|
100
|
-
}
|
|
96
|
+
const storage = assertInjectedStorageRooted("rebuildMemoryLifecycleLedger", options.memoryDir, options.storage) ?? new StorageManager(options.memoryDir);
|
|
101
97
|
const secureRewrite = options.storage !== void 0;
|
|
102
98
|
const tiers = [
|
|
103
99
|
await storage.readAllMemories(),
|
|
@@ -267,4 +263,4 @@ export {
|
|
|
267
263
|
backupExistingLedger,
|
|
268
264
|
rebuildMemoryLifecycleLedger
|
|
269
265
|
};
|
|
270
|
-
//# sourceMappingURL=chunk-
|
|
266
|
+
//# sourceMappingURL=chunk-A2KGXUOU.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/maintenance/rebuild-memory-lifecycle-ledger.ts"],"sourcesContent":["import path from \"node:path\";\nimport { stat } from \"node:fs/promises\";\nimport { StorageManager } from \"../storage.js\";\nimport { assertInjectedStorageRooted } from \"./projection-support.js\";\nimport { log } from \"../logger.js\";\nimport { displayErrorDetail } from \"../runtime/better-sqlite.js\";\nimport type { MemoryLifecycleEvent } from \"../types.js\";\nimport { toBackupStamp } from \"./backup-stamp.js\";\nimport { copyExistingFileToBackup, writeFileAtomically } from \"./atomic-file.js\";\nimport {\n buildLifecycleEventsForMemory,\n compareMemoryLifecycleEvents,\n sortMemoryLifecycleEvents,\n memoryLifecycleLedgerLockPath,\n MEMORY_LIFECYCLE_LEDGER_LOCK_STALE_MS,\n} from \"../memory-lifecycle-ledger-utils.js\";\nimport { withHeldFileLock, type HeldFileLockOptions, type HeldFileLockController } from \"../utils/serialize-mutations.js\";\nimport { probeEncryptedRegularFileHeader } from \"../secure-store/secure-fs.js\";\n\n/**\n * Event types `buildLifecycleEventsForMemory` reconstructs from frontmatter.\n * Everything else in the ledger is append-only history with no frontmatter\n * equivalent and must be carried over by a preserving rebuild (issue #1910).\n */\nconst FRONTMATTER_DERIVED_EVENT_TYPES: Record<string, true> = {\n created: true,\n updated: true,\n superseded: true,\n archived: true,\n};\n\nexport interface RebuildMemoryLifecycleLedgerOptions {\n memoryDir: string;\n dryRun?: boolean;\n now?: Date;\n /**\n * Active storage context (issue #1910). When provided, memories are read\n * through it (so encrypted-at-rest memories in a secure-store deployment are\n * decrypted with the live key) and the rebuilt ledger is rewritten through\n * its secure writer (so it stays encrypted at rest). Its `dir` MUST equal\n * `memoryDir`. When omitted, a fresh plaintext `StorageManager` is used and\n * the ledger is written as plaintext — the CLI default.\n */\n storage?: StorageManager;\n /**\n * Preserve append-only lifecycle events that have no frontmatter equivalent\n * (issue #1910). `buildLifecycleEventsForMemory` only reconstructs\n * `created`/`updated`/`superseded`/`archived` from frontmatter, so a bare\n * rebuild silently drops history like `explicit_capture_accepted`,\n * `explicit_capture_queued`, `imported`, `promoted`, `merged`, `restored`,\n * and `rejected`. When true, the existing ledger's non-reconstructable rows\n * are read (via the same secure/permissive `readAllMemoryLifecycleEvents`\n * path), merged with the rebuilt rows, deduplicated by `eventId`, and sorted\n * canonically. Background auto-compaction sets this so it never loses events;\n * the manual/CLI repair rebuild leaves it off (reconstruct purely from\n * frontmatter).\n */\n preserveExistingEvents?: boolean;\n /**\n * Override the ledger-lock acquisition timing (issue #2033). Only\n * `maxWaitMs`/`pollMs` are honored; `staleMs` stays fixed at\n * `MEMORY_LIFECYCLE_LEDGER_LOCK_STALE_MS`. Used by tests to force the\n * lock-acquisition-failure branch (`acquired=false`) deterministically\n * without a multi-second wait.\n */\n lockOptions?: Pick<HeldFileLockOptions, \"maxWaitMs\" | \"pollMs\">;\n /**\n * Upper bound (bytes) on the rewritten ledger when preserving events (issue\n * #2033). A preserving compaction carries over ALL append-only history, which\n * — if the history alone is large — could leave the rewritten ledger over the\n * whole-file read/decrypt cap (STATE_FILE_MAX_DECRYPT_BYTES), the exact\n * unreadable-ledger failure compaction exists to prevent. When set and the\n * preserved payload would exceed it, the OLDEST rows are dropped from the\n * active ledger until it fits; because the full pre-compaction ledger is\n * copied verbatim to the timestamped backup first, those rows are archived,\n * not lost. Ignored when `preserveExistingEvents` is off (a frontmatter-only\n * rebuild is already bounded by the corpus). `0`/undefined disables bounding.\n */\n maxLedgerBytes?: number;\n}\n\nexport interface SkippedLifecycleBlankIdMemory {\n path: string;\n}\n\nexport interface SkippedDuplicateLifecycleEvent {\n eventId: string;\n keptPath: string;\n skippedPath: string;\n}\n\nexport interface RebuildMemoryLifecycleLedgerResult {\n dryRun: boolean;\n scannedMemories: number;\n rebuiltRows: number;\n outputPath: string;\n backupPath?: string;\n skippedBlankIdMemories: SkippedLifecycleBlankIdMemory[];\n skippedDuplicateEvents: SkippedDuplicateLifecycleEvent[];\n /**\n * Count of existing-ledger rows carried over beyond the frontmatter\n * reconstruction (only set when `preserveExistingEvents` is on; issue #1910):\n * append-only history with no frontmatter equivalent, plus any\n * frontmatter-derived row that raced in after the corpus scan and so was not\n * reproduced by the reconstruction (#2033).\n */\n preservedAppendOnlyRows?: number;\n /**\n * Count of oldest rows dropped from the ACTIVE ledger to keep it under\n * `maxLedgerBytes` (issue #2033). They remain in the verbatim timestamped\n * backup, so this is a bound-and-archive, not a loss. Set only when bounding\n * actually trimmed rows.\n */\n archivedOverflowRows?: number;\n /**\n * Whether the active ledger was actually backed up and rewritten (issue #2033\n * thread PRRT_kwDORJXyws6SExst). A preserving write-mode rebuild that would\n * reproduce the current ledger byte-for-byte (same decrypted content AND same\n * at-rest format) skips the backup+rewrite, so callers can distinguish a real\n * compaction from a no-op and avoid re-archiving an unchanged ledger every\n * interval. `true` for every dry run's non-write preview is never set — only\n * write-mode results carry it; defaults to `false` when no rewrite happened.\n */\n rewritten?: boolean;\n}\n\nfunction isNodeError(err: unknown): err is NodeJS.ErrnoException {\n return typeof err === \"object\" && err !== null && \"code\" in err;\n}\n\n/** Serialized on-disk size (bytes, incl. trailing newline) of one ledger row. */\nfunction lifecycleRowBytes(event: MemoryLifecycleEvent): number {\n return Buffer.byteLength(`${JSON.stringify(event)}\\n`, \"utf8\");\n}\n\n/**\n * Keep the NEWEST canonically-ordered events whose serialized payload fits\n * strictly under `cap` bytes (issue #2033). Recency is by `timestamp` (newest\n * first), tie-broken by the canonical comparator, so a large append-only\n * history is trimmed to its most recent rows rather than to a single memoryId\n * group (the ledger's on-disk order is by memoryId then time).\n *\n * A row too large to fit the remaining budget is SKIPPED, and scanning\n * continues to older rows that still fit — one oversized (or future-dated,\n * hence recency-first) row cannot truncate the entire older history. The kept\n * subset is returned in the input's canonical order; the caller relies on the\n * verbatim backup to retain the dropped rows.\n */\nexport function boundLifecycleEventsToByteCap(\n events: MemoryLifecycleEvent[],\n cap: number,\n): { kept: MemoryLifecycleEvent[]; dropped: number } {\n if (!(cap > 0)) return { kept: events, dropped: 0 };\n const sizes = new Map<MemoryLifecycleEvent, number>();\n let total = 0;\n for (const event of events) {\n const bytes = lifecycleRowBytes(event);\n sizes.set(event, bytes);\n total += bytes;\n }\n if (total <= cap) return { kept: events, dropped: 0 };\n const byRecency = [...events].sort((a, b) => {\n if (a.timestamp !== b.timestamp) return b.timestamp.localeCompare(a.timestamp);\n return -compareMemoryLifecycleEvents(a, b);\n });\n const keep = new Set<MemoryLifecycleEvent>();\n let running = 0;\n for (const event of byRecency) {\n const bytes = sizes.get(event)!;\n if (running + bytes > cap) continue; // skip this row, keep scanning older rows that still fit\n running += bytes;\n keep.add(event);\n }\n const kept = events.filter((event) => keep.has(event));\n return { kept, dropped: events.length - kept.length };\n}\n\nexport async function backupExistingLedger(\n memoryDir: string,\n outputPath: string,\n now: Date,\n): Promise<string | undefined> {\n try {\n await stat(outputPath);\n } catch (err) {\n if (isNodeError(err) && err.code === \"ENOENT\") {\n return undefined;\n }\n throw err;\n }\n\n const backupPath = path.join(\n memoryDir,\n \"archive\",\n \"memory-lifecycle-ledger\",\n toBackupStamp(now),\n \"state\",\n \"memory-lifecycle-ledger.jsonl\",\n );\n return backupPath;\n}\n\nexport async function rebuildMemoryLifecycleLedger(\n options: RebuildMemoryLifecycleLedgerOptions,\n): Promise<RebuildMemoryLifecycleLedgerResult> {\n const dryRun = options.dryRun !== false;\n const now = options.now ?? new Date();\n const outputPath = path.join(options.memoryDir, \"state\", \"memory-lifecycle-ledger.jsonl\");\n const storage = assertInjectedStorageRooted(\"rebuildMemoryLifecycleLedger\", options.memoryDir, options.storage) ?? new StorageManager(options.memoryDir);\n const secureRewrite = options.storage !== undefined;\n const tiers = [\n await storage.readAllMemories(),\n await storage.readAllColdMemories(),\n await storage.readArchivedMemories(),\n ];\n const allMemories = tiers.flat();\n const skippedBlankIdMemories: SkippedLifecycleBlankIdMemory[] = [];\n const eventCandidates: Array<{ event: MemoryLifecycleEvent; path: string }> = [];\n for (const tier of tiers) {\n for (const memory of [...tier].sort((left, right) => left.path.localeCompare(right.path))) {\n if (!memory.frontmatter.id.trim()) {\n skippedBlankIdMemories.push({ path: memory.path });\n log.warn(`lifecycle ledger rebuild skipped blank memory id: path=${memory.path}`);\n continue;\n }\n for (const event of buildLifecycleEventsForMemory(memory)) {\n eventCandidates.push({ event, path: memory.path });\n }\n }\n }\n\n const orderedEvents = sortMemoryLifecycleEvents(eventCandidates.map((candidate) => candidate.event));\n const candidateByEvent = new Map(\n eventCandidates.map((candidate) => [candidate.event, candidate]),\n );\n const keptByEventId = new Map<string, { event: MemoryLifecycleEvent; path: string }>();\n const events: MemoryLifecycleEvent[] = [];\n const skippedDuplicateEvents: SkippedDuplicateLifecycleEvent[] = [];\n for (const event of orderedEvents) {\n const candidate = candidateByEvent.get(event)!;\n const kept = keptByEventId.get(event.eventId);\n if (kept) {\n skippedDuplicateEvents.push({\n eventId: event.eventId,\n keptPath: kept.path,\n skippedPath: candidate.path,\n });\n log.warn(\n `lifecycle ledger rebuild skipped duplicate event_id=${event.eventId}: `\n + `kept=${kept.path} skipped=${candidate.path}`,\n );\n continue;\n }\n keptByEventId.set(event.eventId, candidate);\n events.push(event);\n }\n\n let finalEvents = events;\n let preservedAppendOnlyRows: number | undefined;\n let archivedOverflowRows: number | undefined;\n let backupPath: string | undefined;\n let rewritten = false;\n // The preserve-read + whole-file rewrite are serialized against concurrent\n // lifecycle appends ONLY in write mode (issue #1910, codex):\n // appendMemoryLifecycleEvents holds this same cross-process lock, so an event\n // appended after the preserve-read but before the atomic rename waits and\n // lands on the compacted ledger instead of being clobbered by the rename. A\n // DRY RUN takes no lock — it reads the ledger read-only to compute the\n // preserve/merge/byte-cap PREVIEW and never rewrites, so it must not block\n // appends (#2033 Cursor). The corpus scan above stays outside the lock in\n // both modes — frontmatter-derived rows come from the memory files.\n const runLedgerCriticalSection = async (\n acquired: boolean,\n lock: HeldFileLockController | null,\n ): Promise<void> => {\n // A WRITE that read or rewrote the ledger without the lock could race a\n // concurrent append/rewrite and lose data, so REFUSE the unlocked fallback\n // withHeldFileLock takes on acquisition timeout (issue #2033 CodeRabbit\n // Critical / codex). A dry run passes lock=null and acquired=true: it never\n // reaches the rewrite, so the unlocked preview read is safe.\n if (!dryRun && !acquired) {\n throw new Error(\n \"lifecycle ledger rebuild aborted: could not acquire the ledger lock within the \"\n + \"acquisition budget; refusing to read or rewrite unlocked so a concurrent append \"\n + \"or compaction cannot be clobbered (issue #1910).\",\n );\n }\n if (options.preserveExistingEvents) {\n // Merge the frontmatter reconstruction (`events`) with the CURRENT ledger\n // so compaction never deletes a lifecycle row that raced the scan (issue\n // #1910, #2033). Read the existing ledger through the uncapped BUFFER\n // path — it decrypts with the live key when `storage` carries the secure\n // context and bypasses the whole-file string decrypt cap, so an oversize\n // encrypted ledger (the exact file compaction must shrink) is still\n // readable here rather than aborting (#2033 Cursor High).\n // preserveExistingEvents means \"never lose history\": if the current\n // ledger genuinely cannot be read (corruption, or a locked required\n // store), ABORT rather than rewrite from frontmatter only and silently\n // drop that history. An absent ledger reads as [] (ENOENT swallowed\n // downstream), so a throw here is always a real read failure.\n let existing: MemoryLifecycleEvent[];\n try {\n existing = await storage.readAllMemoryLifecycleEventsForCompaction();\n } catch (err) {\n throw new Error(\n `lifecycle ledger rebuild aborted: cannot read existing events to preserve `\n + `(${displayErrorDetail(err) || \"unknown error\"})`,\n );\n }\n // The corpus scan (`events`) runs OUTSIDE the lock and is therefore a\n // stale snapshot; `existing` is read here under the lock and is\n // authoritative for what the ledger holds at rewrite time. A\n // frontmatter-derived row (created/updated/superseded/archived) is safe to\n // collapse into the reconstruction ONLY when the scan actually reproduced\n // the same logical event — same (memoryId, eventType, timestamp), which is\n // exactly what the live append stamps (fm.created/updated/...) and what\n // makeRebuiltMemoryLifecycleEvent emits. A frontmatter-derived row whose\n // content key the reconstruction did NOT produce raced in after the scan\n // (a memory created/updated between the scan and this locked read); the\n // reconstruction has no equivalent, so dropping it by eventType alone\n // would delete it. Preserve it instead, deduped by content key so a\n // retried append of the same logical event still collapses to one. Rows\n // that are not frontmatter-derived are append-only history with no\n // reconstruction — always carried over, deduped by eventId in the merge.\n const contentKey = (event: MemoryLifecycleEvent): string =>\n `${event.memoryId}\\u0000${event.eventType}\\u0000${event.timestamp}`;\n const reconstructedKeys = new Set(events.map(contentKey));\n const racedFrontmatterByKey = new Map<string, MemoryLifecycleEvent>();\n const appendOnly: MemoryLifecycleEvent[] = [];\n for (const event of existing) {\n if (!FRONTMATTER_DERIVED_EVENT_TYPES[event.eventType]) {\n appendOnly.push(event);\n continue;\n }\n const key = contentKey(event);\n if (reconstructedKeys.has(key)) continue; // collapsed into reconstruction\n if (!racedFrontmatterByKey.has(key)) racedFrontmatterByKey.set(key, event);\n }\n const mergedById = new Map<string, MemoryLifecycleEvent>();\n for (const event of sortMemoryLifecycleEvents([\n ...events,\n ...racedFrontmatterByKey.values(),\n ...appendOnly,\n ])) {\n if (!mergedById.has(event.eventId)) mergedById.set(event.eventId, event);\n }\n finalEvents = [...mergedById.values()];\n preservedAppendOnlyRows = finalEvents.length - events.length;\n // Bound the rewritten ledger so a preserving compaction can never leave it\n // over the whole-file read/decrypt cap (#2033). This must run whenever a\n // cap is set — NOT only when `existing.length > 0`: an oversized on-disk\n // ledger whose every row fails validation reads as `existing === []`, yet\n // `finalEvents` (the frontmatter reconstruction) can itself exceed the cap.\n // Overflow (oldest) rows are dropped from the active ledger but survive\n // both in the timestamped backup (a verbatim copy when the ledger is\n // plaintext, re-encrypted under the backup path's own AAD when it is\n // encrypted so it still decrypts there, #2033) and, for frontmatter-derived\n // rows, in the memory files they were reconstructed from — so a later full\n // rebuild regenerates them.\n if (options.maxLedgerBytes && options.maxLedgerBytes > 0) {\n const bounded = boundLifecycleEventsToByteCap(finalEvents, options.maxLedgerBytes);\n if (bounded.dropped > 0) {\n finalEvents = bounded.kept;\n archivedOverflowRows = bounded.dropped;\n log.warn(\n `lifecycle ledger rebuild bounded to ${options.maxLedgerBytes} bytes: `\n + `dropped ${bounded.dropped} oldest row(s) from the active ledger `\n + `(preserved in the backup) to stay under the read/decrypt cap.`,\n );\n }\n }\n }\n\n // Re-assert the lock immediately before the destructive active-ledger\n // rewrite. Everything above (the preserve read, merge, sort, byte-cap\n // bound, and JSON serialize) is CPU-bound and blocks the event loop, so the\n // timer heartbeat inside withHeldFileLock cannot refresh the lock's mtime;\n // a peer that judged the lock stale within the 30s window could have broken\n // it and appended to the current ledger. `lock.refresh()` (a) reports the\n // lock LOST so we ABORT rather than rename our compacted file over that\n // peer's append, and (b) when still held, re-stamps the mtime so the bounded\n // write below cannot itself be judged stale mid-rename (issue #1910/#2033).\n const abortIfLockLost = async (): Promise<void> => {\n if (lock && await lock.refresh()) return;\n throw new Error(\n \"lifecycle ledger rebuild aborted: lost the ledger lock during the compaction \"\n + \"rewrite (a peer stale-broke it while the event loop was blocked by CPU-bound \"\n + \"merge/serialize); refusing to clobber a concurrent append (issue #1910/#2033).\",\n );\n };\n if (!dryRun) {\n const payload = finalEvents.map((event) => JSON.stringify(event)).join(\"\\n\");\n const content = payload.length > 0 ? `${payload}\\n` : \"\";\n // No-op skip (#2033 thread PRRT_kwDORJXyws6SExst): a preserving rebuild\n // bounds the ACTIVE ledger to the read/decrypt cap, so a VALID ledger that\n // sits above the configured compaction trigger but below the cap would\n // otherwise be rewritten to identical content and re-archived on every\n // maintenance interval — unbounded growth of archive/memory-lifecycle-ledger\n // plus pointless disk/CPU churn. Skip the backup+rewrite when it would\n // change neither the logical (decrypted) content NOR the at-rest format.\n // The raw read here doubles as the source for the encrypted verbatim backup\n // below, so the current ledger is read at most once. An absent ledger reads\n // as ENOENT (a create is always a real change) and any other read/probe\n // error propagates rather than masking a needed rewrite.\n let currentEncrypted = false;\n let priorRawBuffer: Buffer | null = null;\n try {\n currentEncrypted = await probeEncryptedRegularFileHeader(outputPath);\n priorRawBuffer = await storage.readMemoryLifecycleLedgerRawBufferForCompaction();\n } catch (err) {\n if (!isNodeError(err) || err.code !== \"ENOENT\") throw err;\n }\n // Preserve encryption at rest (#2033). An already-encrypted ledger (or its\n // encrypted backup) MUST be rewritten encrypted even when the\n // `secureStoreEncryptOnWrite` policy is paused — otherwise the compaction\n // silently DOWNGRADES encrypted state to plaintext. Force encryption\n // whenever the current ledger is encrypted and the store is unlocked (a\n // key is available); reaching this point with an encrypted ledger already\n // implies an unlocked store, since the raw read above decrypts and would\n // have thrown under a locked key. A plaintext ledger keeps the ordinary\n // policy (`willEncryptStateWrites`), so existing plaintext behavior holds.\n const forceEncrypt =\n secureRewrite && currentEncrypted && storage.isSecureStoreUnlocked();\n const replacementEncrypted =\n secureRewrite && (storage.willEncryptStateWrites() || forceEncrypt);\n // Compare as buffers, never decoding the raw ledger to one giant string:\n // a multi-hundred-MB decrypted ledger can exceed V8's max string length,\n // so `priorRawBuffer.equals(...)` (byte compare) must be used, NOT\n // `.toString()` (#2033 giant-string invariant). `content` is the freshly\n // serialized replacement, already a string; Buffer.from() reuses it.\n if (\n priorRawBuffer !== null &&\n currentEncrypted === replacementEncrypted &&\n priorRawBuffer.equals(Buffer.from(content, \"utf8\"))\n ) {\n // Nothing to change: leave the active ledger and archive untouched.\n rewritten = false;\n } else {\n const desiredBackup = await backupExistingLedger(options.memoryDir, outputPath, now);\n if (secureRewrite) {\n // Preserve encrypted-at-rest (issue #1910). The BACKUP needs care under\n // secure-store (#2033): when the existing ledger is encrypted, its bytes\n // are path-bound via AAD, so a byte-for-byte copy to the archive path\n // cannot be decrypted there — it would silently orphan the overflow rows\n // a bounded rewrite claims to preserve. Reuse the RAW decrypted ledger\n // content read above (no event parsing, so malformed/truncated/future\n // rows survive exactly as the plaintext verbatim copy keeps them) and\n // re-encrypt it under the backup path's own AAD, yielding a directly\n // decryptable backup that retains every original byte. A PLAINTEXT\n // existing ledger is already readable, so a verbatim copy is correct.\n // Then rewrite the active ledger through the secure writer.\n if (desiredBackup && currentEncrypted) {\n const rawForBackup =\n priorRawBuffer ?? (await storage.readMemoryLifecycleLedgerRawBufferForCompaction());\n await storage.writeMemoryLifecycleLedgerContent(rawForBackup, desiredBackup, forceEncrypt);\n backupPath = desiredBackup;\n } else {\n backupPath = desiredBackup\n ? await copyExistingFileToBackup(outputPath, desiredBackup)\n : undefined;\n }\n await abortIfLockLost();\n await storage.writeMemoryLifecycleLedgerContent(content, undefined, forceEncrypt);\n } else {\n await abortIfLockLost();\n backupPath = await writeFileAtomically(outputPath, content, desiredBackup);\n }\n rewritten = true;\n }\n }\n };\n // Write mode holds the ledger lock across the preserve-read and atomic\n // rewrite so a concurrent append lands on the compacted ledger instead of\n // being clobbered. A dry run computes the SAME preserve/merge/byte-cap\n // preview but WITHOUT the lock (read-only, no rewrite), so `rebuiltRows`,\n // `preservedAppendOnlyRows`, and `archivedOverflowRows` report what a --write\n // would apply while never blocking concurrent appends (#2033 Cursor). A dry\n // run with nothing to preserve touches nothing at all.\n if (!dryRun) {\n await withHeldFileLock(\n memoryLifecycleLedgerLockPath(outputPath),\n { staleMs: MEMORY_LIFECYCLE_LEDGER_LOCK_STALE_MS, ...options.lockOptions },\n runLedgerCriticalSection,\n );\n } else if (options.preserveExistingEvents) {\n await runLedgerCriticalSection(true, null);\n }\n\n return {\n dryRun,\n scannedMemories: allMemories.length,\n rebuiltRows: finalEvents.length,\n outputPath,\n backupPath,\n skippedBlankIdMemories,\n skippedDuplicateEvents,\n preservedAppendOnlyRows,\n archivedOverflowRows,\n rewritten,\n };\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,UAAU;AACjB,SAAS,YAAY;AAuBrB,IAAM,kCAAwD;AAAA,EAC5D,SAAS;AAAA,EACT,SAAS;AAAA,EACT,YAAY;AAAA,EACZ,UAAU;AACZ;AAiGA,SAAS,YAAY,KAA4C;AAC/D,SAAO,OAAO,QAAQ,YAAY,QAAQ,QAAQ,UAAU;AAC9D;AAGA,SAAS,kBAAkB,OAAqC;AA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xD,UACE,mBAAmB,QACnB,qBAAqB,wBACrB,eAAe,OAAO,OAAO,KAAK,SAAS,MAAM,CAAC,GAClD;AAEA,oBAAY;AAAA,MACd,OAAO;AACL,cAAM,gBAAgB,MAAM,qBAAqB,QAAQ,WAAW,YAAY,GAAG;AACnF,YAAI,eAAe;AAYjB,cAAI,iBAAiB,kBAAkB;AACrC,kBAAM,eACJ,kBAAmB,MAAM,QAAQ,gDAAgD;AACnF,kBAAM,QAAQ,kCAAkC,cAAc,eAAe,YAAY;AACzF,yBAAa;AAAA,UACf,OAAO;AACL,yBAAa,gBACT,MAAM,yBAAyB,YAAY,aAAa,IACxD;AAAA,UACN;AACA,gBAAM,gBAAgB;AACtB,gBAAM,QAAQ,kCAAkC,SAAS,QAAW,YAAY;AAAA,QAClF,OAAO;AACL,gBAAM,gBAAgB;AACtB,uBAAa,MAAM,oBAAoB,YAAY,SAAS,aAAa;AAAA,QAC3E;AACA,oBAAY;AAAA,MACd;AAAA,IACF;AAAA,EACF;AAQA,MAAI,CAAC,QAAQ;AACX,UAAM;AAAA,MACJ,8BAA8B,UAAU;AAAA,MACxC,EAAE,SAAS,uCAAuC,GAAG,QAAQ,YAAY;AAAA,MACzE;AAAA,IACF;AAAA,EACF,WAAW,QAAQ,wBAAwB;AACzC,UAAM,yBAAyB,MAAM,IAAI;AAAA,EAC3C;AAEA,SAAO;AAAA,IACL;AAAA,IACA,iBAAiB,YAAY;AAAA,IAC7B,aAAa,YAAY;AAAA,IACzB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":[]}
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
} from "./chunk-UX3ZXN34.js";
|
|
10
10
|
import {
|
|
11
11
|
CompressionGuidelineCoordinator
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B7GROTXD.js";
|
|
13
13
|
import {
|
|
14
14
|
MaintenanceScheduler
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FO3WM76R.js";
|
|
16
16
|
import {
|
|
17
17
|
runPeerProfileReasoner
|
|
18
18
|
} from "./chunk-I74SUMNI.js";
|
|
@@ -28,10 +28,10 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
CompoundingEngine,
|
|
30
30
|
defaultTierMigrationCycleBudget
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-OR3OQHHS.js";
|
|
32
32
|
import {
|
|
33
33
|
SharedContextManager
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-JGUXPJUQ.js";
|
|
35
35
|
import {
|
|
36
36
|
chunkTranscriptEntries
|
|
37
37
|
} from "./chunk-TECVW3JP.js";
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
} from "./chunk-ECZU5BJH.js";
|
|
61
61
|
import {
|
|
62
62
|
HourlySummarizer
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-IU3XJAQM.js";
|
|
64
64
|
import {
|
|
65
65
|
buildTargetedFactRecallSection,
|
|
66
66
|
shouldRecallTargetedFactEvidence
|
|
@@ -172,7 +172,7 @@ import {
|
|
|
172
172
|
} from "./chunk-LTHVM4XN.js";
|
|
173
173
|
import {
|
|
174
174
|
ExtractionEngine
|
|
175
|
-
} from "./chunk-
|
|
175
|
+
} from "./chunk-SQEDDWAM.js";
|
|
176
176
|
import {
|
|
177
177
|
parseMemoryActionEligibilityContext
|
|
178
178
|
} from "./chunk-5GSUBCZM.js";
|
|
@@ -181,7 +181,7 @@ import {
|
|
|
181
181
|
} from "./chunk-WLZYGLJ4.js";
|
|
182
182
|
import {
|
|
183
183
|
LocalLlmClient
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-YWJBAHTY.js";
|
|
185
185
|
import {
|
|
186
186
|
buildFocusedListRecallSection,
|
|
187
187
|
shouldRecallFocusedListEvidence
|
|
@@ -199,18 +199,18 @@ import {
|
|
|
199
199
|
} from "./chunk-TVIVY7KU.js";
|
|
200
200
|
import {
|
|
201
201
|
formatDaySummaryMemories
|
|
202
|
-
} from "./chunk-
|
|
202
|
+
} from "./chunk-FCCMFVS6.js";
|
|
203
203
|
import {
|
|
204
204
|
tryDirectAnswer
|
|
205
205
|
} from "./chunk-Q6IP2ARR.js";
|
|
206
206
|
import {
|
|
207
207
|
EmbeddingFallback
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-XY7QPJDA.js";
|
|
209
209
|
import {
|
|
210
210
|
buildEntityRecallSection,
|
|
211
211
|
entityRecentTranscriptLookbackHours,
|
|
212
212
|
readRecentEntityTranscriptEntries
|
|
213
|
-
} from "./chunk-
|
|
213
|
+
} from "./chunk-UL6WTQN4.js";
|
|
214
214
|
import {
|
|
215
215
|
normalizeReplaySessionKey
|
|
216
216
|
} from "./chunk-AJVLDJU6.js";
|
|
@@ -220,14 +220,14 @@ import {
|
|
|
220
220
|
import {
|
|
221
221
|
compareVerifiedEpisodeResults,
|
|
222
222
|
searchVerifiedEpisodes
|
|
223
|
-
} from "./chunk-
|
|
223
|
+
} from "./chunk-XGYCI23S.js";
|
|
224
224
|
import {
|
|
225
225
|
ThreadingManager
|
|
226
226
|
} from "./chunk-OJP3N7UK.js";
|
|
227
227
|
import {
|
|
228
228
|
compareVerifiedSemanticRuleResults,
|
|
229
229
|
searchVerifiedSemanticRules
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-WIP3MQZY.js";
|
|
231
231
|
import {
|
|
232
232
|
searchWorkProductLedgerEntries
|
|
233
233
|
} from "./chunk-ZRWB5D4H.js";
|
|
@@ -240,14 +240,14 @@ import {
|
|
|
240
240
|
import {
|
|
241
241
|
runNamespaceMaintenanceFanout,
|
|
242
242
|
summarizeNamespaceMaintenanceHealth
|
|
243
|
-
} from "./chunk-
|
|
243
|
+
} from "./chunk-UHOUNNY3.js";
|
|
244
244
|
import {
|
|
245
245
|
NamespaceCatalog,
|
|
246
246
|
planNamespaceMaintenance
|
|
247
|
-
} from "./chunk-
|
|
247
|
+
} from "./chunk-52H7OB7Y.js";
|
|
248
248
|
import {
|
|
249
249
|
NamespaceStorageRouter
|
|
250
|
-
} from "./chunk-
|
|
250
|
+
} from "./chunk-JEMLK7ED.js";
|
|
251
251
|
import {
|
|
252
252
|
searchHarmonicRetrieval
|
|
253
253
|
} from "./chunk-AV5ZEH4M.js";
|
|
@@ -282,7 +282,7 @@ import {
|
|
|
282
282
|
materializeAfterSemanticConsolidation,
|
|
283
283
|
parseConsolidationResponse,
|
|
284
284
|
parseOperatorAwareConsolidationResponse
|
|
285
|
-
} from "./chunk-
|
|
285
|
+
} from "./chunk-UQXIW7OZ.js";
|
|
286
286
|
import {
|
|
287
287
|
BootstrapEngine
|
|
288
288
|
} from "./chunk-MYVPLJOO.js";
|
|
@@ -297,7 +297,7 @@ import {
|
|
|
297
297
|
} from "./chunk-UQ7RN5HK.js";
|
|
298
298
|
import {
|
|
299
299
|
SmartBuffer
|
|
300
|
-
} from "./chunk-
|
|
300
|
+
} from "./chunk-354T54RR.js";
|
|
301
301
|
import {
|
|
302
302
|
isDisagreementPrompt
|
|
303
303
|
} from "./chunk-H3FZVNRN.js";
|
|
@@ -334,7 +334,7 @@ import {
|
|
|
334
334
|
clusterByKey,
|
|
335
335
|
createCorrectionService,
|
|
336
336
|
detectPassiveCorrections
|
|
337
|
-
} from "./chunk-
|
|
337
|
+
} from "./chunk-ALPBE5EC.js";
|
|
338
338
|
import {
|
|
339
339
|
importCapsule
|
|
340
340
|
} from "./chunk-7CPOZH6Y.js";
|
|
@@ -354,14 +354,14 @@ import {
|
|
|
354
354
|
} from "./chunk-JGSKJHF7.js";
|
|
355
355
|
import {
|
|
356
356
|
buildXraySnapshot
|
|
357
|
-
} from "./chunk-
|
|
357
|
+
} from "./chunk-VMALXCR5.js";
|
|
358
358
|
import {
|
|
359
359
|
NamespaceSearchRouter
|
|
360
|
-
} from "./chunk-
|
|
360
|
+
} from "./chunk-SB4OKS6C.js";
|
|
361
361
|
import {
|
|
362
362
|
createConversationIndexRuntime,
|
|
363
363
|
createSearchBackend
|
|
364
|
-
} from "./chunk-
|
|
364
|
+
} from "./chunk-MJYYXODM.js";
|
|
365
365
|
import {
|
|
366
366
|
NoopSearchBackend
|
|
367
367
|
} from "./chunk-CYEPCZN5.js";
|
|
@@ -382,7 +382,7 @@ import {
|
|
|
382
382
|
resolveNamespaceFromStorageDir,
|
|
383
383
|
resolveScopePlan,
|
|
384
384
|
resolveScopeProfilePlan
|
|
385
|
-
} from "./chunk-
|
|
385
|
+
} from "./chunk-MQVINOJQ.js";
|
|
386
386
|
import {
|
|
387
387
|
ProfilingCollector
|
|
388
388
|
} from "./chunk-NLE6TSLG.js";
|
|
@@ -391,7 +391,7 @@ import {
|
|
|
391
391
|
} from "./chunk-QDW3E4RD.js";
|
|
392
392
|
import {
|
|
393
393
|
shouldSkipImplicitExtraction
|
|
394
|
-
} from "./chunk-
|
|
394
|
+
} from "./chunk-IKMAO55B.js";
|
|
395
395
|
import {
|
|
396
396
|
GraphIndex
|
|
397
397
|
} from "./chunk-L2DPF4DF.js";
|
|
@@ -400,7 +400,7 @@ import {
|
|
|
400
400
|
} from "./chunk-W4FBGYGK.js";
|
|
401
401
|
import {
|
|
402
402
|
buildChainFollowupGenerator
|
|
403
|
-
} from "./chunk-
|
|
403
|
+
} from "./chunk-7JXXI3GW.js";
|
|
404
404
|
import {
|
|
405
405
|
ContentHashIndex,
|
|
406
406
|
QmdResultResolver,
|
|
@@ -417,7 +417,7 @@ import {
|
|
|
417
417
|
reconstructFusionInputs,
|
|
418
418
|
selfDeps,
|
|
419
419
|
serializeFusionDay
|
|
420
|
-
} from "./chunk-
|
|
420
|
+
} from "./chunk-NEFMSUC2.js";
|
|
421
421
|
import {
|
|
422
422
|
bodyIsEscaped,
|
|
423
423
|
decodeTranscriptBody,
|
|
@@ -448,7 +448,7 @@ import {
|
|
|
448
448
|
} from "./chunk-J6A3CX5N.js";
|
|
449
449
|
import {
|
|
450
450
|
confidenceTier
|
|
451
|
-
} from "./chunk-
|
|
451
|
+
} from "./chunk-KPEIWAZY.js";
|
|
452
452
|
import {
|
|
453
453
|
namespaceIdentityFromToken,
|
|
454
454
|
namespaceIdentityToken,
|
|
@@ -538,7 +538,7 @@ import {
|
|
|
538
538
|
defaultNamespaceForPrincipal,
|
|
539
539
|
recallNamespacesForPrincipal,
|
|
540
540
|
resolvePrincipal
|
|
541
|
-
} from "./chunk-
|
|
541
|
+
} from "./chunk-2H7OEVPO.js";
|
|
542
542
|
import {
|
|
543
543
|
isSafeRouteNamespace,
|
|
544
544
|
selectRouteRule
|
|
@@ -564,7 +564,7 @@ import {
|
|
|
564
564
|
resolveRecallEnhancementCapabilities,
|
|
565
565
|
resolveSecurityCapabilities,
|
|
566
566
|
resolveUtilityLearningCapabilities
|
|
567
|
-
} from "./chunk-
|
|
567
|
+
} from "./chunk-RDQGLJRR.js";
|
|
568
568
|
import {
|
|
569
569
|
abortError,
|
|
570
570
|
isAbortError,
|
|
@@ -13397,7 +13397,7 @@ var OrchestratorInitCoordinator = class {
|
|
|
13397
13397
|
if (signal.aborted) return;
|
|
13398
13398
|
if (lifecycleCaps.lifecyclePolicy && resolveQmdCapabilities(this.deps.config).qmdTierMigration) {
|
|
13399
13399
|
try {
|
|
13400
|
-
const { runFirstStartMigration } = await import("./first-start-migration-
|
|
13400
|
+
const { runFirstStartMigration } = await import("./first-start-migration-LEXL3XYL.js");
|
|
13401
13401
|
const result = await runFirstStartMigration({
|
|
13402
13402
|
storage: this.deps.storage,
|
|
13403
13403
|
config: this.deps.config,
|
|
@@ -24462,4 +24462,4 @@ export {
|
|
|
24462
24462
|
blendGraphExpandedRecallScore,
|
|
24463
24463
|
Orchestrator
|
|
24464
24464
|
};
|
|
24465
|
-
//# sourceMappingURL=chunk-
|
|
24465
|
+
//# sourceMappingURL=chunk-AKWX5E6R.js.map
|
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
} from "./chunk-P5FPO2BR.js";
|
|
33
33
|
import {
|
|
34
34
|
toRecallExplainJson
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-LTGSOACX.js";
|
|
36
36
|
import {
|
|
37
37
|
estimateRecallTokens
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-VMALXCR5.js";
|
|
39
39
|
import {
|
|
40
40
|
decideDisclosureEscalation
|
|
41
41
|
} from "./chunk-H7XKCNR6.js";
|
|
42
42
|
import {
|
|
43
43
|
namespaceCollectionName
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-SB4OKS6C.js";
|
|
45
45
|
import {
|
|
46
46
|
buildProposedActions,
|
|
47
47
|
buildQualityScore,
|
|
@@ -49,7 +49,7 @@ import {
|
|
|
49
49
|
listMemoryGovernanceRuns,
|
|
50
50
|
readMemoryGovernanceRunArtifact,
|
|
51
51
|
runMemoryGovernance
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-LU22QKFA.js";
|
|
53
53
|
import {
|
|
54
54
|
recordObjectiveStateSnapshotsFromObservedMessages
|
|
55
55
|
} from "./chunk-ICP53SKG.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
} from "./chunk-6HMYUWXR.js";
|
|
59
59
|
import {
|
|
60
60
|
offlineSyncStorageForSnapshot
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-UGH6VPPO.js";
|
|
62
62
|
import {
|
|
63
63
|
combineNamespaces,
|
|
64
64
|
defaultGitInvoker,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
resolveScopedWritableNamespaceValue,
|
|
73
73
|
resolveWritableNamespaceValue,
|
|
74
74
|
sanitizeFragment
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-MQVINOJQ.js";
|
|
76
76
|
import {
|
|
77
77
|
recordMemoryOutcome
|
|
78
78
|
} from "./chunk-EIR5VLIH.js";
|
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
persistExplicitCapture,
|
|
94
94
|
queueExplicitCaptureForReview,
|
|
95
95
|
validateExplicitCaptureInput
|
|
96
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-IKMAO55B.js";
|
|
97
97
|
import {
|
|
98
98
|
lcmEvidenceIdentity
|
|
99
99
|
} from "./chunk-C37ZRXX7.js";
|
|
@@ -114,20 +114,20 @@ import {
|
|
|
114
114
|
enqueuePassiveCorrectionNotification,
|
|
115
115
|
parseBriefingFocus,
|
|
116
116
|
parseBriefingWindow
|
|
117
|
-
} from "./chunk-
|
|
117
|
+
} from "./chunk-7JXXI3GW.js";
|
|
118
118
|
import {
|
|
119
119
|
parseEntityFile,
|
|
120
120
|
qmdCollectionPathParts,
|
|
121
121
|
qmdResultPathCandidates,
|
|
122
122
|
selfDeps
|
|
123
|
-
} from "./chunk-
|
|
123
|
+
} from "./chunk-NEFMSUC2.js";
|
|
124
124
|
import {
|
|
125
125
|
supersessionKeysForFact
|
|
126
126
|
} from "./chunk-DNHVPZOD.js";
|
|
127
127
|
import {
|
|
128
128
|
DEFAULT_RECALL_DISCLOSURE,
|
|
129
129
|
isRecallDisclosure
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-KPEIWAZY.js";
|
|
131
131
|
import {
|
|
132
132
|
namespaceIdentityFromToken
|
|
133
133
|
} from "./chunk-EGGE52UU.js";
|
|
@@ -144,7 +144,7 @@ import {
|
|
|
144
144
|
} from "./chunk-SCU65EZI.js";
|
|
145
145
|
import {
|
|
146
146
|
getMemoryProjectionPath
|
|
147
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-3CSX3ETE.js";
|
|
148
148
|
import {
|
|
149
149
|
displayErrorDetail
|
|
150
150
|
} from "./chunk-RL6NEVXT.js";
|
|
@@ -218,7 +218,7 @@ import {
|
|
|
218
218
|
mergeMemorySearchDefaultFallback,
|
|
219
219
|
resolveMemorySearchDefaultFallback,
|
|
220
220
|
runMemorySearchFanout
|
|
221
|
-
} from "./chunk-
|
|
221
|
+
} from "./chunk-44DUJETW.js";
|
|
222
222
|
import {
|
|
223
223
|
canReadNamespace,
|
|
224
224
|
canWriteNamespace,
|
|
@@ -226,7 +226,7 @@ import {
|
|
|
226
226
|
defaultNamespaceForPrincipal,
|
|
227
227
|
recallNamespacesForPrincipal,
|
|
228
228
|
resolvePrincipal
|
|
229
|
-
} from "./chunk-
|
|
229
|
+
} from "./chunk-2H7OEVPO.js";
|
|
230
230
|
import {
|
|
231
231
|
resolveAccessSetupCapabilities,
|
|
232
232
|
resolveCompressionCapabilities,
|
|
@@ -241,7 +241,7 @@ import {
|
|
|
241
241
|
resolveRecallAuxiliaryCapabilities,
|
|
242
242
|
resolveRecallEnhancementCapabilities,
|
|
243
243
|
resolveSecurityCapabilities
|
|
244
|
-
} from "./chunk-
|
|
244
|
+
} from "./chunk-RDQGLJRR.js";
|
|
245
245
|
import {
|
|
246
246
|
abortError,
|
|
247
247
|
throwIfAborted
|
|
@@ -12385,4 +12385,4 @@ export {
|
|
|
12385
12385
|
EngramAccessService,
|
|
12386
12386
|
AccessAdminOpsSurface
|
|
12387
12387
|
};
|
|
12388
|
-
//# sourceMappingURL=chunk-
|
|
12388
|
+
//# sourceMappingURL=chunk-ALPBE5EC.js.map
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
DELTA_SUBCOMMANDS,
|
|
8
8
|
defineOperation,
|
|
9
9
|
isCodegraphToolName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-ALPBE5EC.js";
|
|
11
11
|
import {
|
|
12
12
|
serializeMutations,
|
|
13
13
|
withHeldFileLock
|
|
@@ -1805,4 +1805,4 @@ export {
|
|
|
1805
1805
|
codegraphIngestTracesOperation,
|
|
1806
1806
|
REGISTERED_OPERATIONS
|
|
1807
1807
|
};
|
|
1808
|
-
//# sourceMappingURL=chunk-
|
|
1808
|
+
//# sourceMappingURL=chunk-B3R5CC35.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-OD4FM2U7.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveCompressionCapabilities
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RDQGLJRR.js";
|
|
9
9
|
import {
|
|
10
10
|
log
|
|
11
11
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -283,4 +283,4 @@ export {
|
|
|
283
283
|
CompressionGuidelineCoordinator,
|
|
284
284
|
formatCompressionGuidelinesForRecall
|
|
285
285
|
};
|
|
286
|
-
//# sourceMappingURL=chunk-
|
|
286
|
+
//# sourceMappingURL=chunk-B7GROTXD.js.map
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-RGMVMVMF.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveNamespaceCapabilities
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-RDQGLJRR.js";
|
|
16
16
|
import {
|
|
17
17
|
log
|
|
18
18
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -546,4 +546,4 @@ export {
|
|
|
546
546
|
ACTIVE_STATUSES,
|
|
547
547
|
runContradictionScan
|
|
548
548
|
};
|
|
549
|
-
//# sourceMappingURL=chunk-
|
|
549
|
+
//# sourceMappingURL=chunk-BJJAX3IZ.js.map
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
processChatMessage,
|
|
17
17
|
sessionBelongsToPrincipal,
|
|
18
18
|
subscribeChatTranscript
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-7KXE7KN5.js";
|
|
20
20
|
import {
|
|
21
21
|
RelayMissionStoreError
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B3R5CC35.js";
|
|
23
23
|
import {
|
|
24
24
|
executeResolution,
|
|
25
25
|
isValidResolutionVerb
|
|
@@ -36,19 +36,19 @@ import {
|
|
|
36
36
|
CorrectionContractError,
|
|
37
37
|
getOperation,
|
|
38
38
|
resolveQueryNamespaceWritablePreflight
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-ALPBE5EC.js";
|
|
40
40
|
import {
|
|
41
41
|
isTrustZoneName
|
|
42
42
|
} from "./chunk-JGSKJHF7.js";
|
|
43
43
|
import {
|
|
44
44
|
projectTagProjectId
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-MQVINOJQ.js";
|
|
46
46
|
import {
|
|
47
47
|
subscribeGraphEvents
|
|
48
48
|
} from "./chunk-DEUNUKTD.js";
|
|
49
49
|
import {
|
|
50
50
|
isRecallDisclosure
|
|
51
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-KPEIWAZY.js";
|
|
52
52
|
import {
|
|
53
53
|
assertOperationAllowed,
|
|
54
54
|
enforceNamespaceAllowList,
|
|
@@ -2083,7 +2083,7 @@ var EngramAccessHttpServer = class {
|
|
|
2083
2083
|
if (req.method === "POST" && pathname === "/engram/v1/contradiction-scan") {
|
|
2084
2084
|
this.enforceTokenOp("contradiction_scan_run");
|
|
2085
2085
|
const body = await this.readJsonBody(req);
|
|
2086
|
-
const { runContradictionScan } = await import("./contradiction-scan-
|
|
2086
|
+
const { runContradictionScan } = await import("./contradiction-scan-HMF7CNKD.js");
|
|
2087
2087
|
const principal = this.resolveRequestPrincipal(req);
|
|
2088
2088
|
const result = await runContradictionScan({
|
|
2089
2089
|
storage: this.service.storageRef,
|
|
@@ -3132,4 +3132,4 @@ function positiveIntQueryParam(value, label) {
|
|
|
3132
3132
|
export {
|
|
3133
3133
|
EngramAccessHttpServer
|
|
3134
3134
|
};
|
|
3135
|
-
//# sourceMappingURL=chunk-
|
|
3135
|
+
//# sourceMappingURL=chunk-CNNQVI2A.js.map
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-JLNBQWZ2.js";
|
|
6
6
|
import {
|
|
7
7
|
resolvePipelineProcessingCapabilities
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RDQGLJRR.js";
|
|
9
9
|
import {
|
|
10
10
|
log
|
|
11
11
|
} from "./chunk-3WCASNQZ.js";
|
|
@@ -116,4 +116,4 @@ export {
|
|
|
116
116
|
formatDaySummaryMemories,
|
|
117
117
|
buildExtensionsFooterForSummary
|
|
118
118
|
};
|
|
119
|
-
//# sourceMappingURL=chunk-
|
|
119
|
+
//# sourceMappingURL=chunk-FCCMFVS6.js.map
|