@remnic/core 9.54.3 → 9.54.5
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 +12 -11
- package/dist/access-admin-ops-surface.js +46 -44
- package/dist/access-authorization-probe.d.ts +12 -11
- package/dist/access-authorization-probe.js +47 -45
- package/dist/access-boundary.d.ts +12 -11
- package/dist/access-boundary.js +46 -44
- package/dist/access-cli.js +92 -90
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +1 -1
- package/dist/access-extraction-force-flush.d.ts +12 -11
- package/dist/access-extraction-force-flush.js +46 -44
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +12 -11
- package/dist/access-http-lifecycle-flush.d.ts +12 -11
- package/dist/access-http-offline-stream.d.ts +12 -11
- package/dist/access-http-query.js +46 -44
- package/dist/access-http.d.ts +12 -11
- package/dist/access-http.js +56 -54
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +46 -44
- package/dist/access-lcm-surface.d.ts +12 -11
- package/dist/access-lcm-surface.js +46 -44
- package/dist/access-mcp.d.ts +12 -11
- package/dist/access-mcp.js +52 -50
- package/dist/access-memory-search-fanout.d.ts +22 -2
- package/dist/access-memory-search-fanout.js +1 -1
- package/dist/{access-namespace-preflight-C7n4tgWC.d.ts → access-namespace-preflight-BdHlGd_T.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +46 -44
- package/dist/access-observe-write-surface.d.ts +12 -11
- package/dist/access-observe-write-surface.js +46 -44
- package/dist/access-offline-manifest.d.ts +10 -9
- package/dist/access-offline-manifest.js +12 -10
- package/dist/access-operations-batch.js +48 -46
- package/dist/access-operations.d.ts +15 -14
- package/dist/access-operations.js +51 -49
- package/dist/access-recall-concurrency.d.ts +12 -11
- package/dist/access-recall-concurrency.js +46 -44
- package/dist/access-recall-response.d.ts +12 -11
- package/dist/access-recall-response.js +46 -44
- package/dist/access-recall-surface.d.ts +12 -11
- package/dist/access-recall-surface.js +46 -44
- package/dist/access-schema.d.ts +90 -90
- package/dist/access-schema.js +3 -2
- package/dist/{access-service-CXvbxLK-.d.ts → access-service-DL7X9hrg.d.ts} +7 -7
- package/dist/access-service-helpers.d.ts +12 -11
- package/dist/access-service.d.ts +12 -11
- package/dist/access-service.js +46 -44
- package/dist/access-surface-catalog.d.ts +12 -11
- package/dist/access-wearables-meetings-surface.d.ts +3 -3
- package/dist/action-confidence.d.ts +1 -1
- package/dist/active-memory-bridge.d.ts +13 -1
- package/dist/active-memory-bridge.js +6 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +3 -2
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/behavior-learner.d.ts +1 -1
- package/dist/behavior-signals.d.ts +1 -1
- package/dist/bootstrap.d.ts +9 -9
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +30 -9
- package/dist/buffer-surprise-report.d.ts +1 -1
- package/dist/buffer-turn-helpers.d.ts +1 -1
- package/dist/buffer.d.ts +2 -2
- package/dist/buffer.js +3 -3
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-BOOxl-I2.d.ts → catalog-B90is4d8.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 +31 -10
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-6LAPLZOS.js → chunk-2DD6ZHOM.js} +8 -3
- package/dist/chunk-2DD6ZHOM.js.map +1 -0
- package/dist/{chunk-47P3RYZP.js → chunk-2INWPC6E.js} +2 -2
- package/dist/{chunk-3CSX3ETE.js → chunk-2LWQSV6A.js} +23 -11
- package/dist/chunk-2LWQSV6A.js.map +1 -0
- package/dist/{chunk-7BZOBA5J.js → chunk-2PNXOQ4P.js} +69 -11
- package/dist/chunk-2PNXOQ4P.js.map +1 -0
- package/dist/{chunk-WOPA3SGI.js → chunk-3OTSVCPK.js} +8 -8
- package/dist/{chunk-PX2LSHYM.js → chunk-3SXLD5T3.js} +3 -3
- package/dist/{chunk-T2JHZWH6.js → chunk-3WGI7F4V.js} +237 -93
- package/dist/chunk-3WGI7F4V.js.map +1 -0
- package/dist/{chunk-C4ZNGVK3.js → chunk-5JKUSBMX.js} +2 -2
- package/dist/{chunk-S75M5ZRK.js → chunk-6LEIWWAF.js} +16 -1
- package/dist/chunk-6LEIWWAF.js.map +1 -0
- package/dist/{chunk-MAXVH44E.js → chunk-6NNNURLK.js} +4 -4
- package/dist/{chunk-LJS7KUPV.js → chunk-6PZGKGAO.js} +2 -2
- package/dist/{chunk-YN6ASZUG.js → chunk-6QPI2ITJ.js} +5 -5
- package/dist/{chunk-CYF6WVE7.js → chunk-7HG7MGAP.js} +2688 -496
- package/dist/chunk-7HG7MGAP.js.map +1 -0
- package/dist/{chunk-CGVHPCP2.js → chunk-7Q7JWLQ4.js} +2 -2
- package/dist/{chunk-227UFSEQ.js → chunk-7RZJWZ46.js} +5 -5
- package/dist/{chunk-JBPKEARU.js → chunk-AU7Q3LSC.js} +4 -4
- package/dist/{chunk-PDDTI7IC.js → chunk-B4T3FQMT.js} +1 -1
- package/dist/{chunk-UU3G6GUP.js → chunk-BIF4SHMD.js} +1 -1
- package/dist/{chunk-UU3G6GUP.js.map → chunk-BIF4SHMD.js.map} +1 -1
- package/dist/{chunk-APPFNGX6.js → chunk-BSXGTDVJ.js} +2 -2
- package/dist/{chunk-4IIFL7GC.js → chunk-CLKBV3Z3.js} +10 -10
- package/dist/{chunk-ZYLC7NFO.js → chunk-CSY44OKU.js} +4 -4
- package/dist/{chunk-HLYR2TQL.js → chunk-CUTFSLSD.js} +2 -2
- package/dist/{chunk-RDJRFDJY.js → chunk-DBY26JJJ.js} +2 -2
- package/dist/{chunk-QWGE2PUH.js → chunk-DDA55IVB.js} +10 -10
- package/dist/{chunk-VMMQDEN5.js → chunk-DN2IDKI5.js} +2 -2
- package/dist/{chunk-2GFK22OZ.js → chunk-DOOWFDWN.js} +2 -2
- package/dist/{chunk-7FGL6CGA.js → chunk-DVYRD4HY.js} +2 -2
- package/dist/{chunk-YGLY6QFV.js → chunk-F2Y6I74C.js} +2 -2
- package/dist/{chunk-UU7TRFNE.js → chunk-FFEBSFVT.js} +2 -2
- package/dist/chunk-HNDIND7P.js +331 -0
- package/dist/chunk-HNDIND7P.js.map +1 -0
- package/dist/{chunk-NIS256NW.js → chunk-JKW663ZN.js} +2 -2
- package/dist/{chunk-G7A5HLUS.js → chunk-KJH6W2I7.js} +2 -2
- package/dist/{chunk-IXEBUYO4.js → chunk-KM55SMLG.js} +11 -2
- package/dist/{chunk-IXEBUYO4.js.map → chunk-KM55SMLG.js.map} +1 -1
- package/dist/{chunk-G2LUMAUF.js → chunk-L7RTUEDG.js} +12 -5
- package/dist/chunk-L7RTUEDG.js.map +1 -0
- package/dist/chunk-LC2BDILZ.js +57 -0
- package/dist/chunk-LC2BDILZ.js.map +1 -0
- package/dist/{chunk-JV5YUBIZ.js → chunk-LC3FD4BV.js} +52 -46
- package/dist/chunk-LC3FD4BV.js.map +1 -0
- package/dist/{chunk-HWRD23DW.js → chunk-LVKYLMSM.js} +3 -3
- package/dist/{chunk-RUMNY5DT.js → chunk-MRGJZ75M.js} +6 -2
- package/dist/chunk-MRGJZ75M.js.map +1 -0
- package/dist/{chunk-ZMYDYNI4.js → chunk-N7CXQ5TA.js} +4 -4
- package/dist/{chunk-3JLPGJ43.js → chunk-NGT35IGQ.js} +5 -5
- package/dist/{chunk-GUKBW4HL.js → chunk-NQMSEB5D.js} +6 -6
- package/dist/{chunk-WRJVB3C2.js → chunk-PO7NXBG2.js} +2 -2
- package/dist/{chunk-WM65LU67.js → chunk-QOQQMVR2.js} +2 -2
- package/dist/{chunk-QHFV6VNU.js → chunk-QPAQSG3F.js} +2 -2
- package/dist/{chunk-UTRO5UJU.js → chunk-QPW3PAIH.js} +5 -1
- package/dist/chunk-QPW3PAIH.js.map +1 -0
- package/dist/{chunk-6R4G7N4S.js → chunk-QQXWFDRD.js} +128 -74
- package/dist/chunk-QQXWFDRD.js.map +1 -0
- package/dist/{chunk-UES4BHA2.js → chunk-QTO6BMQZ.js} +2 -2
- package/dist/{chunk-THPPCISA.js → chunk-RBII7637.js} +5 -5
- package/dist/{chunk-QT2FRYI4.js → chunk-RG426DJO.js} +2 -2
- package/dist/{chunk-XUAMCLY4.js → chunk-TKFGFDPJ.js} +17 -13
- package/dist/chunk-TKFGFDPJ.js.map +1 -0
- package/dist/{chunk-VKXWK44Q.js → chunk-TY6MKIWP.js} +3 -3
- package/dist/{chunk-AZM4CCAC.js → chunk-UWJNKGBA.js} +5 -5
- package/dist/{chunk-JDZPNCMA.js → chunk-UYOXFFEY.js} +6 -3
- package/dist/chunk-UYOXFFEY.js.map +1 -0
- package/dist/{chunk-ZPJ4QSGP.js → chunk-VTU5IEKY.js} +2 -2
- package/dist/{chunk-RZ4XGKOJ.js → chunk-VYQ4URQB.js} +8 -8
- package/dist/{chunk-WDBX6VER.js → chunk-VZRFGJCH.js} +5 -5
- package/dist/{chunk-IBKR2TFR.js → chunk-WM5LD6AT.js} +2 -2
- package/dist/{chunk-K4QS7LXU.js → chunk-WZWZRZ2V.js} +2 -2
- package/dist/{chunk-G4T7L557.js → chunk-XKAR4RF6.js} +2 -2
- package/dist/{chunk-DZD576ZU.js → chunk-XSV2YDCJ.js} +2 -2
- package/dist/{chunk-G7Z6EENO.js → chunk-YDWPYDML.js} +4 -4
- package/dist/{chunk-6HPHEFXT.js → chunk-YKZLOPTC.js} +2 -2
- package/dist/{chunk-NH5IR2WM.js → chunk-YR65W7BV.js} +6 -2
- package/dist/chunk-YR65W7BV.js.map +1 -0
- package/dist/{chunk-GYPQL6XN.js → chunk-Z4N7SVVF.js} +35 -47
- package/dist/chunk-Z4N7SVVF.js.map +1 -0
- package/dist/{cli-DVUFIa5E.d.ts → cli-jfuZXixq.d.ts} +5 -5
- package/dist/cli.d.ts +14 -13
- package/dist/cli.js +74 -72
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +30 -9
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +3 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +30 -9
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +29 -9
- 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 +3 -1
- package/dist/contradiction-scan-KCADHXPE.js +20 -0
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +32 -11
- package/dist/conversation-index/backend.d.ts +1 -1
- package/dist/conversation-index/backend.js +2 -2
- package/dist/conversation-index/chunker.d.ts +1 -1
- package/dist/conversation-index/faiss-adapter.d.ts +1 -1
- package/dist/conversation-index/indexer.d.ts +1 -1
- package/dist/conversation-index/search.d.ts +1 -1
- package/dist/corpus-watermark.d.ts +1 -1
- package/dist/corpus-watermark.js +21 -20
- package/dist/day-summary.d.ts +1 -1
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-XzF76C9n.d.ts → dependency-propagation-delivery-CTDuAVJc.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/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +2 -2
- package/dist/entity-retrieval.js +30 -9
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +6 -4
- package/dist/external-wiki-access.d.ts +12 -11
- package/dist/external-wiki-access.js +47 -45
- package/dist/external-wiki-collection-registration.d.ts +1 -1
- package/dist/external-wiki-collection.d.ts +1 -1
- package/dist/external-wiki-mcp-tools.d.ts +12 -11
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-source-grounding-rules.d.ts +1 -1
- package/dist/extraction-source-grounding.d.ts +1 -1
- package/dist/extraction.d.ts +1 -1
- package/dist/extraction.js +29 -13
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-626C5554.js → first-start-migration-LMMZFLKK.js} +13 -5
- package/dist/first-start-migration-LMMZFLKK.js.map +1 -0
- 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-path-reconstruction.d.ts +1 -1
- package/dist/graph-path-scoring.d.ts +1 -1
- package/dist/graph-snapshot.d.ts +1 -1
- package/dist/graph.d.ts +1 -1
- package/dist/harmonic-retrieval.js +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 +1439 -716
- package/dist/index.js +207 -121
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +2 -2
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +5 -5
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +30 -9
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +30 -9
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +31 -10
- package/dist/{maintenance-BJzNIKBE.d.ts → maintenance-heMZSq7G.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +12 -11
- 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-mutations.js +2 -2
- package/dist/memory-projection-store.d.ts +6 -2
- package/dist/memory-projection-store.js +1 -1
- package/dist/memory-provenance.d.ts +1 -1
- package/dist/memory-snapshot.d.ts +1 -1
- package/dist/memory-worth-outcomes.d.ts +2 -2
- package/dist/models-json.d.ts +1 -1
- package/dist/namespaces/migrate.d.ts +3 -3
- package/dist/namespaces/migrate.js +20 -19
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +30 -9
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-file-io.d.ts +20 -0
- package/dist/offline-sync-file-io.js +18 -0
- package/dist/offline-sync-file-io.js.map +1 -0
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +5 -5
- package/dist/offline-sync.d.ts +8 -6
- package/dist/offline-sync.js +2 -1
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +22 -21
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +34 -32
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +35 -15
- package/dist/{orchestrator-BiXgBJBQ.d.ts → orchestrator-BQQPsSjs.d.ts} +11 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +93 -91
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-sz_dcuLg.d.ts → pipeline-DFfmsnGk.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-533FZLS4.js → purge-GB7PZHT2.js} +2 -2
- package/dist/{qmd-eAWObK4M.d.ts → qmd-BF5bcVRs.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/reconcile/cursor.d.ts +2 -1
- package/dist/reconcile/manifest.d.ts +2 -1
- package/dist/reconcile/manifest.js +6 -5
- package/dist/reconcile/plan.d.ts +2 -1
- package/dist/reconcile/plan.js +3 -2
- package/dist/replay/normalizers/chatgpt.d.ts +1 -1
- package/dist/replay/normalizers/claude.d.ts +1 -1
- package/dist/replay/normalizers/openclaw.d.ts +1 -1
- package/dist/replay/normalizers/shared.d.ts +1 -1
- package/dist/replay/runner.d.ts +1 -1
- package/dist/replay/types.d.ts +1 -1
- package/dist/replica-divergence.d.ts +1 -1
- package/dist/replica-peers-config.d.ts +1 -1
- package/dist/resolve-auth-token.d.ts +1 -1
- package/dist/resume-bundles.js +4 -3
- 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 +138 -138
- package/dist/{scope-profiles-BBQsXuyj.d.ts → scope-profiles-CbUOsE_E.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +4 -4
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +6 -6
- 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-HD8RkzVA.d.ts → semantic-consolidation-DAB3xdKM.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +31 -10
- package/dist/semantic-rule-promotion.js +30 -9
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +30 -9
- package/dist/{service-DIrtHHEg.d.ts → service-DGKg2O6r.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +9 -9
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +28 -12
- package/dist/{storage-DqCzXi56.d.ts → storage-CC1jKcWg.d.ts} +46 -13
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +30 -9
- package/dist/summarizer.d.ts +1 -1
- 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 +2 -2
- package/dist/tier-routing.js +7 -1
- package/dist/{tier-stats-2JCZYEF7.js → tier-stats-JDN6HRNT.js} +8 -2
- package/dist/{tier-stats-2JCZYEF7.js.map → tier-stats-JDN6HRNT.js.map} +1 -1
- 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-d_j4vC6N.d.ts → types-BnQza1y8.d.ts} +2 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -2
- package/dist/verified-recall.js +30 -9
- package/dist/write-envelope.d.ts +1 -1
- package/package.json +2 -2
- package/src/access-http.test.ts +31 -0
- package/src/access-memory-search-fanout.ts +24 -1
- package/src/access-offline-manifest.ts +5 -0
- package/src/access-service-namespace.test.ts +14 -0
- package/src/access-service-observe-scope.test.ts +2 -0
- package/src/access-service-offline-file-content.test.ts +211 -0
- package/src/access-service.ts +20 -43
- package/src/active-memory-bridge.test.ts +151 -0
- package/src/active-memory-bridge.ts +87 -11
- package/src/briefing.test.ts +38 -0
- package/src/briefing.ts +3 -3
- package/src/cli.ts +6 -1
- package/src/connectors/codex-materialize-runner.ts +2 -0
- package/src/contradiction/contradiction-scan.ts +2 -0
- package/src/contradiction/contradiction.test.ts +42 -0
- package/src/correction/correction-access-wiring.ts +8 -2
- package/src/correction/correction-storage-integration.test.ts +7 -0
- package/src/explicit-capture.test.ts +24 -0
- package/src/explicit-capture.ts +2 -0
- package/src/index.ts +3 -0
- package/src/maintenance/first-start-migration.ts +2 -1
- package/src/maintenance/memory-governance.test.ts +25 -0
- package/src/maintenance/memory-governance.ts +4 -1
- package/src/maintenance/pattern-reinforcement.test.ts +20 -0
- package/src/maintenance/pattern-reinforcement.ts +2 -1
- package/src/maintenance/rebuild-memory-projection.ts +8 -8
- package/src/memory-projection-store.ts +25 -27
- package/src/offline-sync-file-io.ts +68 -0
- package/src/offline-sync.ts +43 -57
- package/src/orchestration/consolidation-run.ts +5 -4
- package/src/orchestration/contradiction-linking-coordinator.ts +7 -0
- package/src/orchestration/contradiction-localization.integration.test.ts +115 -0
- package/src/orchestration/lifecycle-policy-coordinator.ts +2 -1
- package/src/orchestration/qmd-result-resolver.test.ts +215 -14
- package/src/orchestration/qmd-result-resolver.ts +142 -82
- package/src/orchestration/recall-search-pipeline.test.ts +41 -0
- package/src/orchestration/recall-search-pipeline.ts +12 -0
- package/src/orchestration/semantic-consolidation-coordinator.ts +2 -1
- package/src/orchestration/tier-migration-coordinator.ts +23 -56
- package/src/orchestration/workspace-ops.test.ts +37 -0
- package/src/orchestration/workspace-ops.ts +5 -29
- package/src/orchestrator.ts +7 -8
- package/src/storage/supersession-audit.ts +7 -1
- package/src/storage/supersession-side-effects.ts +17 -5
- package/src/storage.ts +18 -19
- package/src/support-passport/card-projection.test.ts +129 -0
- package/src/support-passport/card-projection.ts +287 -0
- package/src/support-passport/card-service.test.ts +2462 -0
- package/src/support-passport/card-service.ts +1042 -0
- package/src/support-passport/contracts.test.ts +143 -0
- package/src/support-passport/contracts.ts +136 -0
- package/src/support-passport/errors.ts +24 -0
- package/src/support-passport/grant-contracts.ts +139 -0
- package/src/support-passport/grant-service-cache.test.ts +148 -0
- package/src/support-passport/grant-service-cancellation.test.ts +81 -0
- package/src/support-passport/grant-service.test.ts +2882 -0
- package/src/support-passport/grant-service.ts +364 -0
- package/src/support-passport/grant-store-commit-hook.test.ts +123 -0
- package/src/support-passport/grant-store-order.test.ts +60 -0
- package/src/support-passport/grant-store-path-safety.test.ts +30 -0
- package/src/support-passport/grant-store-recovery.test.ts +448 -0
- package/src/support-passport/grant-store.ts +902 -0
- package/src/support-passport/index.ts +7 -0
- package/src/support-passport/offline-sync-guard.ts +230 -0
- package/src/support-passport/owner-lock.ts +53 -0
- package/src/support-passport/private-file.ts +371 -0
- package/src/tier-routing.ts +28 -17
- package/src/training-export/converter.test.ts +24 -0
- package/src/training-export/converter.ts +2 -0
- package/src/types.ts +1 -1
- package/src/wearables/service.test.ts +13 -0
- package/src/wearables/service.ts +2 -0
- package/dist/chunk-3CSX3ETE.js.map +0 -1
- package/dist/chunk-6LAPLZOS.js.map +0 -1
- package/dist/chunk-6R4G7N4S.js.map +0 -1
- package/dist/chunk-7BZOBA5J.js.map +0 -1
- package/dist/chunk-CYF6WVE7.js.map +0 -1
- package/dist/chunk-G2LUMAUF.js.map +0 -1
- package/dist/chunk-GYPQL6XN.js.map +0 -1
- package/dist/chunk-JDZPNCMA.js.map +0 -1
- package/dist/chunk-JV5YUBIZ.js.map +0 -1
- package/dist/chunk-NH5IR2WM.js.map +0 -1
- package/dist/chunk-RUMNY5DT.js.map +0 -1
- package/dist/chunk-S75M5ZRK.js.map +0 -1
- package/dist/chunk-T2JHZWH6.js.map +0 -1
- package/dist/chunk-UTRO5UJU.js.map +0 -1
- package/dist/chunk-XUAMCLY4.js.map +0 -1
- package/dist/contradiction-scan-HYLIRMJ2.js +0 -14
- package/dist/first-start-migration-626C5554.js.map +0 -1
- /package/dist/{chunk-47P3RYZP.js.map → chunk-2INWPC6E.js.map} +0 -0
- /package/dist/{chunk-WOPA3SGI.js.map → chunk-3OTSVCPK.js.map} +0 -0
- /package/dist/{chunk-PX2LSHYM.js.map → chunk-3SXLD5T3.js.map} +0 -0
- /package/dist/{chunk-C4ZNGVK3.js.map → chunk-5JKUSBMX.js.map} +0 -0
- /package/dist/{chunk-MAXVH44E.js.map → chunk-6NNNURLK.js.map} +0 -0
- /package/dist/{chunk-LJS7KUPV.js.map → chunk-6PZGKGAO.js.map} +0 -0
- /package/dist/{chunk-YN6ASZUG.js.map → chunk-6QPI2ITJ.js.map} +0 -0
- /package/dist/{chunk-CGVHPCP2.js.map → chunk-7Q7JWLQ4.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-7RZJWZ46.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-AU7Q3LSC.js.map} +0 -0
- /package/dist/{chunk-PDDTI7IC.js.map → chunk-B4T3FQMT.js.map} +0 -0
- /package/dist/{chunk-APPFNGX6.js.map → chunk-BSXGTDVJ.js.map} +0 -0
- /package/dist/{chunk-4IIFL7GC.js.map → chunk-CLKBV3Z3.js.map} +0 -0
- /package/dist/{chunk-ZYLC7NFO.js.map → chunk-CSY44OKU.js.map} +0 -0
- /package/dist/{chunk-HLYR2TQL.js.map → chunk-CUTFSLSD.js.map} +0 -0
- /package/dist/{chunk-RDJRFDJY.js.map → chunk-DBY26JJJ.js.map} +0 -0
- /package/dist/{chunk-QWGE2PUH.js.map → chunk-DDA55IVB.js.map} +0 -0
- /package/dist/{chunk-VMMQDEN5.js.map → chunk-DN2IDKI5.js.map} +0 -0
- /package/dist/{chunk-2GFK22OZ.js.map → chunk-DOOWFDWN.js.map} +0 -0
- /package/dist/{chunk-7FGL6CGA.js.map → chunk-DVYRD4HY.js.map} +0 -0
- /package/dist/{chunk-YGLY6QFV.js.map → chunk-F2Y6I74C.js.map} +0 -0
- /package/dist/{chunk-UU7TRFNE.js.map → chunk-FFEBSFVT.js.map} +0 -0
- /package/dist/{chunk-NIS256NW.js.map → chunk-JKW663ZN.js.map} +0 -0
- /package/dist/{chunk-G7A5HLUS.js.map → chunk-KJH6W2I7.js.map} +0 -0
- /package/dist/{chunk-HWRD23DW.js.map → chunk-LVKYLMSM.js.map} +0 -0
- /package/dist/{chunk-ZMYDYNI4.js.map → chunk-N7CXQ5TA.js.map} +0 -0
- /package/dist/{chunk-3JLPGJ43.js.map → chunk-NGT35IGQ.js.map} +0 -0
- /package/dist/{chunk-GUKBW4HL.js.map → chunk-NQMSEB5D.js.map} +0 -0
- /package/dist/{chunk-WRJVB3C2.js.map → chunk-PO7NXBG2.js.map} +0 -0
- /package/dist/{chunk-WM65LU67.js.map → chunk-QOQQMVR2.js.map} +0 -0
- /package/dist/{chunk-QHFV6VNU.js.map → chunk-QPAQSG3F.js.map} +0 -0
- /package/dist/{chunk-UES4BHA2.js.map → chunk-QTO6BMQZ.js.map} +0 -0
- /package/dist/{chunk-THPPCISA.js.map → chunk-RBII7637.js.map} +0 -0
- /package/dist/{chunk-QT2FRYI4.js.map → chunk-RG426DJO.js.map} +0 -0
- /package/dist/{chunk-VKXWK44Q.js.map → chunk-TY6MKIWP.js.map} +0 -0
- /package/dist/{chunk-AZM4CCAC.js.map → chunk-UWJNKGBA.js.map} +0 -0
- /package/dist/{chunk-ZPJ4QSGP.js.map → chunk-VTU5IEKY.js.map} +0 -0
- /package/dist/{chunk-RZ4XGKOJ.js.map → chunk-VYQ4URQB.js.map} +0 -0
- /package/dist/{chunk-WDBX6VER.js.map → chunk-VZRFGJCH.js.map} +0 -0
- /package/dist/{chunk-IBKR2TFR.js.map → chunk-WM5LD6AT.js.map} +0 -0
- /package/dist/{chunk-K4QS7LXU.js.map → chunk-WZWZRZ2V.js.map} +0 -0
- /package/dist/{chunk-G4T7L557.js.map → chunk-XKAR4RF6.js.map} +0 -0
- /package/dist/{chunk-DZD576ZU.js.map → chunk-XSV2YDCJ.js.map} +0 -0
- /package/dist/{chunk-G7Z6EENO.js.map → chunk-YDWPYDML.js.map} +0 -0
- /package/dist/{chunk-6HPHEFXT.js.map → chunk-YKZLOPTC.js.map} +0 -0
- /package/dist/{contradiction-scan-HYLIRMJ2.js.map → contradiction-scan-KCADHXPE.js.map} +0 -0
- /package/dist/{purge-533FZLS4.js.map → purge-GB7PZHT2.js.map} +0 -0
|
@@ -108,6 +108,47 @@ test("recall safety derives sourceConnector exclusively from the hydrated memory
|
|
|
108
108
|
}
|
|
109
109
|
});
|
|
110
110
|
|
|
111
|
+
test("recall safety keeps support passport records out of generic recall", async () => {
|
|
112
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-passport-recall-"));
|
|
113
|
+
try {
|
|
114
|
+
const coordinator = await makeCoordinator(memoryDir);
|
|
115
|
+
const card = {
|
|
116
|
+
path: "preferences/support-card.md",
|
|
117
|
+
content: "Give me time to answer.",
|
|
118
|
+
frontmatter: {
|
|
119
|
+
status: "active",
|
|
120
|
+
tags: ["support-passport-card"],
|
|
121
|
+
created: "2026-07-19T00:00:00.000Z",
|
|
122
|
+
updated: "2026-07-19T00:00:00.000Z",
|
|
123
|
+
},
|
|
124
|
+
} as unknown as MemoryFile;
|
|
125
|
+
const audit = {
|
|
126
|
+
path: "corrections/support-card-audit.md",
|
|
127
|
+
content: "Superseded: Give me time to answer.",
|
|
128
|
+
frontmatter: {
|
|
129
|
+
status: "active",
|
|
130
|
+
tags: ["support-passport-audit"],
|
|
131
|
+
created: "2026-07-19T00:00:00.000Z",
|
|
132
|
+
updated: "2026-07-19T00:00:00.000Z",
|
|
133
|
+
},
|
|
134
|
+
} as unknown as MemoryFile;
|
|
135
|
+
const candidates = [result("default", card.path), result("default", audit.path)];
|
|
136
|
+
const memoryByPath = new Map([
|
|
137
|
+
[`default\0${card.path}`, card],
|
|
138
|
+
[`default\0${audit.path}`, audit],
|
|
139
|
+
]);
|
|
140
|
+
|
|
141
|
+
assert.deepEqual(coordinator.filterSearchResultsByRecallSafety(candidates, memoryByPath), []);
|
|
142
|
+
assert.deepEqual(
|
|
143
|
+
coordinator.filterSearchResultsByRecallSafety(candidates, memoryByPath, { allowDedicatedSurface: true }),
|
|
144
|
+
[],
|
|
145
|
+
"a generic-recall override must not disclose owner-controlled support records",
|
|
146
|
+
);
|
|
147
|
+
} finally {
|
|
148
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
|
|
111
152
|
test("recall safety partitions tool-scoped memories by requesting connector", async () => {
|
|
112
153
|
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-connector-partition-"));
|
|
113
154
|
try {
|
|
@@ -70,6 +70,7 @@ import {
|
|
|
70
70
|
} from "../orchestrator.js";
|
|
71
71
|
import { isActivityDigestPath } from "./orchestrator-helpers.js";
|
|
72
72
|
import { isGenericRecallExcludedPath, isTopLevelArchivePath } from "./generic-recall-paths.js";
|
|
73
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
73
74
|
|
|
74
75
|
export interface RecallSearchPipelineDeps {
|
|
75
76
|
applyMemoryWorthRerank(
|
|
@@ -1091,6 +1092,7 @@ export class RecallSearchPipelineCoordinator {
|
|
|
1091
1092
|
let forgottenFilteredCount = 0;
|
|
1092
1093
|
let blockedPathFilteredCount = 0;
|
|
1093
1094
|
let connectorPartitionFilteredCount = 0;
|
|
1095
|
+
let supportPassportFilteredCount = 0;
|
|
1094
1096
|
const filtered: QmdSearchResult[] = [];
|
|
1095
1097
|
for (const r of results) {
|
|
1096
1098
|
if (options?.blockedPaths && resultHasKey(options.blockedPaths, r)) {
|
|
@@ -1127,6 +1129,11 @@ export class RecallSearchPipelineCoordinator {
|
|
|
1127
1129
|
continue;
|
|
1128
1130
|
}
|
|
1129
1131
|
|
|
1132
|
+
if (isSupportPassportPrivateMemory(memory)) {
|
|
1133
|
+
supportPassportFilteredCount += 1;
|
|
1134
|
+
continue;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1130
1137
|
if (
|
|
1131
1138
|
options?.allowLifecycleFiltered !== true &&
|
|
1132
1139
|
shouldFilterLifecycleRecallCandidate(memory.frontmatter, {
|
|
@@ -1223,6 +1230,11 @@ export class RecallSearchPipelineCoordinator {
|
|
|
1223
1230
|
`connector partition filter removed ${connectorPartitionFilteredCount} tool-scoped candidates from recall`,
|
|
1224
1231
|
);
|
|
1225
1232
|
}
|
|
1233
|
+
if (supportPassportFilteredCount > 0) {
|
|
1234
|
+
log.debug(
|
|
1235
|
+
`support passport filter removed ${supportPassportFilteredCount} owner-controlled records from generic recall`,
|
|
1236
|
+
);
|
|
1237
|
+
}
|
|
1226
1238
|
if (lifecycleFilteredCount > 0) {
|
|
1227
1239
|
log.debug(
|
|
1228
1240
|
`lifecycle retrieval filter removed ${lifecycleFilteredCount} stale/archived candidates`,
|
|
@@ -51,6 +51,7 @@ import type { PluginConfig, MemoryFile, AgentPersonaModelConfig } from "../types
|
|
|
51
51
|
import { log } from "../logger.js";
|
|
52
52
|
import { composeMemoryEnvelope } from "../write-envelope.js";
|
|
53
53
|
import { resolveConversationContextCapabilities } from "../capabilities.js";
|
|
54
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
54
55
|
|
|
55
56
|
/** Dependencies injected by the orchestrator. All stable references or
|
|
56
57
|
* live accessors. */
|
|
@@ -110,7 +111,7 @@ export class SemanticConsolidationCoordinator {
|
|
|
110
111
|
|
|
111
112
|
log.info("[semantic-consolidation] starting run");
|
|
112
113
|
|
|
113
|
-
const allMemories = await targetStorage.readAllMemories();
|
|
114
|
+
const allMemories = excludeSupportPassportPrivateMemories(await targetStorage.readAllMemories());
|
|
114
115
|
if (allMemories.length < 10) {
|
|
115
116
|
log.debug("[semantic-consolidation] too few memories, skipping");
|
|
116
117
|
return result;
|
|
@@ -19,28 +19,22 @@
|
|
|
19
19
|
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
|
|
22
|
+
import { resolveQmdCapabilities } from "../capabilities.js";
|
|
23
|
+
import { type CompoundingEngine, defaultTierMigrationCycleBudget } from "../compounding/engine.js";
|
|
22
24
|
// StorageManager type comes from the package barrel (type-only) so this
|
|
23
25
|
// module does not add a direct storage.ts import (#1533 ratchet).
|
|
24
26
|
import type { StorageManager } from "../index.js";
|
|
25
|
-
import
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
import { log } from "../logger.js";
|
|
28
|
+
import type {
|
|
29
|
+
TierMigrationCycleSummary,
|
|
30
|
+
TierMigrationStatusSnapshot,
|
|
29
31
|
TierMigrationStatusStore,
|
|
30
|
-
type TierMigrationCycleSummary,
|
|
31
|
-
type TierMigrationStatusSnapshot,
|
|
32
32
|
} from "../recall-state.js";
|
|
33
|
-
import {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
} from "../
|
|
37
|
-
import {
|
|
38
|
-
applyUtilityPromotionRuntimePolicy,
|
|
39
|
-
type UtilityRuntimeValues,
|
|
40
|
-
} from "../utility-runtime.js";
|
|
41
|
-
import type { PluginConfig, MemoryFile } from "../types.js";
|
|
42
|
-
import { log } from "../logger.js";
|
|
43
|
-
import { resolveQmdCapabilities } from "../capabilities.js";
|
|
33
|
+
import type { SearchBackend } from "../search/port.js";
|
|
34
|
+
import { TierMigrationExecutor } from "../tier-migration.js";
|
|
35
|
+
import { type MemoryTier, decideTierTransition } from "../tier-routing.js";
|
|
36
|
+
import type { MemoryFile, PluginConfig } from "../types.js";
|
|
37
|
+
import { type UtilityRuntimeValues, applyUtilityPromotionRuntimePolicy } from "../utility-runtime.js";
|
|
44
38
|
|
|
45
39
|
/** Dependencies injected by the orchestrator. All stable references or live
|
|
46
40
|
* accessors (the orchestrator reassigns `qmd` to NoopSearchBackend and
|
|
@@ -91,7 +85,7 @@ export class TierMigrationCoordinator {
|
|
|
91
85
|
dryRun?: boolean;
|
|
92
86
|
limitOverride?: number;
|
|
93
87
|
force?: boolean;
|
|
94
|
-
}
|
|
88
|
+
}
|
|
95
89
|
): Promise<TierMigrationCycleSummary> {
|
|
96
90
|
const { config, tierMigrationStatus } = this.deps;
|
|
97
91
|
const dryRun = options?.dryRun === true;
|
|
@@ -110,11 +104,7 @@ export class TierMigrationCoordinator {
|
|
|
110
104
|
if (persistSkipped) await tierMigrationStatus.recordCycle(skipped);
|
|
111
105
|
return skipped;
|
|
112
106
|
}
|
|
113
|
-
if (
|
|
114
|
-
trigger === "maintenance" &&
|
|
115
|
-
!resolveQmdCapabilities(config).qmdTierAutoBackfill &&
|
|
116
|
-
options?.force !== true
|
|
117
|
-
) {
|
|
107
|
+
if (trigger === "maintenance" && !resolveQmdCapabilities(config).qmdTierAutoBackfill && options?.force !== true) {
|
|
118
108
|
const skipped: TierMigrationCycleSummary = {
|
|
119
109
|
trigger,
|
|
120
110
|
scanned: 0,
|
|
@@ -147,15 +137,9 @@ export class TierMigrationCoordinator {
|
|
|
147
137
|
const budget =
|
|
148
138
|
this.deps.getCompounding()?.tierMigrationCycleBudget(budgetTrigger) ??
|
|
149
139
|
defaultTierMigrationCycleBudget(config, budgetTrigger);
|
|
150
|
-
const limit =
|
|
151
|
-
options?.limitOverride !== undefined
|
|
152
|
-
? Math.max(0, Math.floor(options.limitOverride))
|
|
153
|
-
: budget.limit;
|
|
140
|
+
const limit = options?.limitOverride !== undefined ? Math.max(0, Math.floor(options.limitOverride)) : budget.limit;
|
|
154
141
|
const nowMs = Date.now();
|
|
155
|
-
if (
|
|
156
|
-
options?.force !== true &&
|
|
157
|
-
nowMs - this.lastRunAtMs < budget.minIntervalMs
|
|
158
|
-
) {
|
|
142
|
+
if (options?.force !== true && nowMs - this.lastRunAtMs < budget.minIntervalMs) {
|
|
159
143
|
const skipped: TierMigrationCycleSummary = {
|
|
160
144
|
trigger,
|
|
161
145
|
scanned: 0,
|
|
@@ -177,28 +161,17 @@ export class TierMigrationCoordinator {
|
|
|
177
161
|
demotionValueThreshold: config.qmdTierDemotionValueThreshold,
|
|
178
162
|
promotionValueThreshold: config.qmdTierPromotionValueThreshold,
|
|
179
163
|
},
|
|
180
|
-
this.deps.getUtilityRuntimeValues()
|
|
164
|
+
this.deps.getUtilityRuntimeValues()
|
|
181
165
|
);
|
|
182
166
|
|
|
183
167
|
this.inFlight = true;
|
|
184
168
|
try {
|
|
185
|
-
const coldStorage = this.deps.createColdStorage(
|
|
186
|
-
|
|
187
|
-
);
|
|
188
|
-
const [hotMemories, coldMemories] = await Promise.all([
|
|
189
|
-
storage.readAllMemories(),
|
|
190
|
-
coldStorage.readAllMemories(),
|
|
191
|
-
]);
|
|
169
|
+
const coldStorage = this.deps.createColdStorage(path.join(storage.dir, "cold"));
|
|
170
|
+
const [hotMemories, coldMemories] = await Promise.all([storage.readAllMemories(), coldStorage.readAllMemories()]);
|
|
192
171
|
const now = new Date();
|
|
193
172
|
const scanLimit = Math.max(0, Math.floor(budget.scanLimit));
|
|
194
|
-
const hotScanLimit = Math.min(
|
|
195
|
-
|
|
196
|
-
Math.ceil(scanLimit * 0.75),
|
|
197
|
-
);
|
|
198
|
-
const coldScanLimit = Math.min(
|
|
199
|
-
coldMemories.length,
|
|
200
|
-
Math.max(0, scanLimit - hotScanLimit),
|
|
201
|
-
);
|
|
173
|
+
const hotScanLimit = Math.min(hotMemories.length, Math.ceil(scanLimit * 0.75));
|
|
174
|
+
const coldScanLimit = Math.min(coldMemories.length, Math.max(0, scanLimit - hotScanLimit));
|
|
202
175
|
const toTimestamp = (memory: MemoryFile): number =>
|
|
203
176
|
Date.parse(memory.frontmatter.updated ?? memory.frontmatter.created);
|
|
204
177
|
const hotCandidates = hotMemories
|
|
@@ -215,8 +188,7 @@ export class TierMigrationCoordinator {
|
|
|
215
188
|
storage,
|
|
216
189
|
qmd: this.deps.getQmd(),
|
|
217
190
|
hotCollection: config.qmdCollection,
|
|
218
|
-
coldCollection:
|
|
219
|
-
config.qmdColdCollection ?? `${config.qmdCollection}-cold`,
|
|
191
|
+
coldCollection: config.qmdColdCollection ?? `${config.qmdCollection}-cold`,
|
|
220
192
|
autoEmbed: resolveQmdCapabilities(config).qmdAutoEmbed,
|
|
221
193
|
});
|
|
222
194
|
|
|
@@ -225,12 +197,7 @@ export class TierMigrationCoordinator {
|
|
|
225
197
|
let demoted = 0;
|
|
226
198
|
for (const candidate of candidates) {
|
|
227
199
|
if (migrated >= limit) break;
|
|
228
|
-
const decision = decideTierTransition(
|
|
229
|
-
candidate.memory,
|
|
230
|
-
candidate.tier,
|
|
231
|
-
policy,
|
|
232
|
-
now,
|
|
233
|
-
);
|
|
200
|
+
const decision = decideTierTransition(candidate.memory, candidate.tier, policy, now);
|
|
234
201
|
if (!decision.changed) continue;
|
|
235
202
|
|
|
236
203
|
if (!dryRun) {
|
|
@@ -249,7 +216,7 @@ export class TierMigrationCoordinator {
|
|
|
249
216
|
|
|
250
217
|
if (!dryRun) this.lastRunAtMs = Date.now();
|
|
251
218
|
log.debug(
|
|
252
|
-
`tier migration cycle completed: trigger=${trigger} scanned=${candidates.length} migrated=${migrated} limit=${limit}${dryRun ? " dryRun=true" : ""}
|
|
219
|
+
`tier migration cycle completed: trigger=${trigger} scanned=${candidates.length} migrated=${migrated} limit=${limit}${dryRun ? " dryRun=true" : ""}`
|
|
253
220
|
);
|
|
254
221
|
const summary: TierMigrationCycleSummary = {
|
|
255
222
|
trigger,
|
|
@@ -1,9 +1,46 @@
|
|
|
1
1
|
import test from "node:test";
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
|
+
import { mkdtemp, mkdir, rm } from "node:fs/promises";
|
|
4
|
+
import os from "node:os";
|
|
3
5
|
import path from "node:path";
|
|
6
|
+
import { StorageManager } from "../storage.js";
|
|
4
7
|
import { WorkspaceOpsCoordinator, type WorkspaceOpsDeps } from "./workspace-ops.js";
|
|
5
8
|
import type { AccessTrackingEntry, PluginConfig } from "../types.js";
|
|
6
9
|
|
|
10
|
+
test("gatherTodayFacts excludes support passport cards from day-summary input", async () => {
|
|
11
|
+
const root = await mkdtemp(path.join(os.tmpdir(), "remnic-workspace-passport-"));
|
|
12
|
+
try {
|
|
13
|
+
await mkdir(root, { recursive: true });
|
|
14
|
+
const storage = new StorageManager(root);
|
|
15
|
+
await storage.writeMemory("preference", "Private support statement", {
|
|
16
|
+
tags: ["support-passport-card"],
|
|
17
|
+
source: "support-passport",
|
|
18
|
+
});
|
|
19
|
+
await storage.writeMemory("fact", "Public project update", {
|
|
20
|
+
source: "test",
|
|
21
|
+
});
|
|
22
|
+
const coordinator = new WorkspaceOpsCoordinator({
|
|
23
|
+
config: {
|
|
24
|
+
defaultNamespace: "default",
|
|
25
|
+
daySummaryTimezone: "UTC",
|
|
26
|
+
} as unknown as PluginConfig,
|
|
27
|
+
storageRouter: {
|
|
28
|
+
storageFor: async () => storage,
|
|
29
|
+
},
|
|
30
|
+
} as unknown as WorkspaceOpsDeps);
|
|
31
|
+
|
|
32
|
+
const gathered = await coordinator.gatherTodayFacts(undefined, {
|
|
33
|
+
now: new Date(),
|
|
34
|
+
timeZone: "UTC",
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
assert.equal(gathered.includes("Private support statement"), false);
|
|
38
|
+
assert.equal(gathered.includes("Public project update"), true);
|
|
39
|
+
} finally {
|
|
40
|
+
await rm(root, { recursive: true, force: true });
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
|
|
7
44
|
test("flushAccessTracking keeps duplicate memory IDs scoped by memory path", async () => {
|
|
8
45
|
const defaultPath = path.join("/memory", "namespaces", "default", "facts", "same-id.md");
|
|
9
46
|
const sharedPath = path.join("/memory", "namespaces", "shared", "facts", "same-id.md");
|
|
@@ -33,6 +33,7 @@ import { evaluateMemoryActionPolicy } from "../memory-action-policy.js";
|
|
|
33
33
|
import { NamespaceStorageRouter } from "../namespaces/storage.js";
|
|
34
34
|
import { namespaceCollectionName } from "../namespaces/search.js";
|
|
35
35
|
import { parseMemoryActionEligibilityContext } from "../schemas.js";
|
|
36
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
36
37
|
import type { SearchBackend } from "../search/port.js";
|
|
37
38
|
import { type AccessTrackingEntry, type MemoryActionEvent, type MemoryFile, type PluginConfig, confidenceTier } from "../types.js";
|
|
38
39
|
import { RECALL_FALLBACK_DIRS } from "../utils/category-dir.js";
|
|
@@ -371,41 +372,16 @@ export class WorkspaceOpsCoordinator {
|
|
|
371
372
|
const fullPath = path.join(dateDir, entry.name);
|
|
372
373
|
try {
|
|
373
374
|
assertPathInsideRoot(memoryRootReal, await realpath(fullPath), fullPath);
|
|
374
|
-
const
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
const fmBlock = fmMatch[1];
|
|
378
|
-
const content = fmMatch[2].trim();
|
|
379
|
-
const fm: Record<string, string> = {};
|
|
380
|
-
for (const line of fmBlock.split("\n")) {
|
|
381
|
-
const colonIdx = line.indexOf(":");
|
|
382
|
-
if (colonIdx === -1) continue;
|
|
383
|
-
fm[line.slice(0, colonIdx).trim()] = line
|
|
384
|
-
.slice(colonIdx + 1)
|
|
385
|
-
.trim();
|
|
386
|
-
}
|
|
387
|
-
const created = fm.created || "unknown";
|
|
388
|
-
const createdAt = parseFiniteDate(created);
|
|
375
|
+
const memory = await storage.readMemoryByPath(fullPath);
|
|
376
|
+
if (!memory || isSupportPassportPrivateMemory(memory)) continue;
|
|
377
|
+
const createdAt = parseFiniteDate(memory.frontmatter.created);
|
|
389
378
|
if (
|
|
390
379
|
createdAt &&
|
|
391
380
|
formatDateInTimeZone(createdAt, timeZone) !== targetLocalDate
|
|
392
381
|
) {
|
|
393
382
|
continue;
|
|
394
383
|
}
|
|
395
|
-
facts.push(
|
|
396
|
-
path: fullPath,
|
|
397
|
-
frontmatter: {
|
|
398
|
-
id: fm.id || path.basename(entry.name, ".md"),
|
|
399
|
-
category: (fm.category as any) || "fact",
|
|
400
|
-
created,
|
|
401
|
-
updated: fm.updated || created,
|
|
402
|
-
source: fm.source || "unknown",
|
|
403
|
-
confidence: parseFloat(fm.confidence || "0.8"),
|
|
404
|
-
confidenceTier: (fm.confidenceTier as any) || "implied",
|
|
405
|
-
tags: [],
|
|
406
|
-
},
|
|
407
|
-
content,
|
|
408
|
-
});
|
|
384
|
+
facts.push(memory);
|
|
409
385
|
} catch {
|
|
410
386
|
// Skip unreadable files
|
|
411
387
|
}
|
package/src/orchestrator.ts
CHANGED
|
@@ -1116,6 +1116,13 @@ export class Orchestrator {
|
|
|
1116
1116
|
return this.storageRouter.storageFor(ns);
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
|
+
filterPrivateSearchResults = (
|
|
1120
|
+
results: QmdSearchResult[], namespaces: readonly string[] = [], preserveUnresolved = false,
|
|
1121
|
+
visibilityCache?: Map<string, boolean>,
|
|
1122
|
+
) => this.qmdResultResolver.filterPrivateSearchResults(
|
|
1123
|
+
results, this.storage, namespaces, preserveUnresolved, visibilityCache,
|
|
1124
|
+
);
|
|
1125
|
+
|
|
1119
1126
|
private configuredNamespaceList(): string[] {
|
|
1120
1127
|
// #1521: delegates to the scope-module resolver. The inline derivation is
|
|
1121
1128
|
// retired so the adHocNamespaceResolutions ratchet no longer counts this
|
|
@@ -3784,14 +3791,6 @@ export class Orchestrator {
|
|
|
3784
3791
|
.filter((id): id is string => id !== null);
|
|
3785
3792
|
}
|
|
3786
3793
|
|
|
3787
|
-
// ---------------------------------------------------------------------------
|
|
3788
|
-
// Contradiction Detection (Phase 2B)
|
|
3789
|
-
// ---------------------------------------------------------------------------
|
|
3790
|
-
|
|
3791
|
-
// ---------------------------------------------------------------------------
|
|
3792
|
-
// Feedback (v2.2)
|
|
3793
|
-
// ---------------------------------------------------------------------------
|
|
3794
|
-
|
|
3795
3794
|
async recordMemoryFeedback(
|
|
3796
3795
|
memoryId: string,
|
|
3797
3796
|
vote: "up" | "down",
|
|
@@ -2,6 +2,7 @@ import { readdir } from "node:fs/promises";
|
|
|
2
2
|
import type { Dirent } from "node:fs";
|
|
3
3
|
import path from "node:path";
|
|
4
4
|
|
|
5
|
+
import { stripAttributesSuffix } from "../structured-attributes.js";
|
|
5
6
|
import type { MemoryFile } from "../types.js";
|
|
6
7
|
import { isErrnoCode } from "../utils/errno.js";
|
|
7
8
|
|
|
@@ -15,6 +16,7 @@ export async function hasSupersessionAudit(
|
|
|
15
16
|
oldMemoryId: string,
|
|
16
17
|
newMemoryId: string,
|
|
17
18
|
auditBody: string,
|
|
19
|
+
structuredAttributes?: Record<string, string>
|
|
18
20
|
): Promise<boolean> {
|
|
19
21
|
let entries: Dirent[];
|
|
20
22
|
try {
|
|
@@ -32,7 +34,11 @@ export async function hasSupersessionAudit(
|
|
|
32
34
|
(memory.frontmatter.sourceMemoryId === oldMemoryId ||
|
|
33
35
|
(memory.frontmatter.sourceMemoryId === undefined && memory.frontmatter.lineage?.includes(oldMemoryId))) &&
|
|
34
36
|
memory.frontmatter.lineage?.includes(newMemoryId) &&
|
|
35
|
-
memory.content === auditBody
|
|
37
|
+
stripAttributesSuffix(memory.content) === auditBody &&
|
|
38
|
+
(structuredAttributes === undefined ||
|
|
39
|
+
Object.entries(structuredAttributes).every(
|
|
40
|
+
([key, value]) => memory.frontmatter.structuredAttributes?.[key] === value
|
|
41
|
+
))
|
|
36
42
|
) {
|
|
37
43
|
return true;
|
|
38
44
|
}
|
|
@@ -31,6 +31,8 @@ export interface SupersessionSideEffectOptions {
|
|
|
31
31
|
exactReplay: boolean;
|
|
32
32
|
currentBefore: MemoryFile;
|
|
33
33
|
updatedFm: MemoryFrontmatter;
|
|
34
|
+
actor?: string;
|
|
35
|
+
audit?: SupersessionAuditOptions;
|
|
34
36
|
citationTemplate: string;
|
|
35
37
|
correctionsDir: string;
|
|
36
38
|
readMemoryByPath: (filePath: string) => Promise<MemoryFile | null>;
|
|
@@ -44,10 +46,17 @@ export interface SupersessionSideEffectOptions {
|
|
|
44
46
|
appendTombstone: (input: TombstoneInput) => Promise<string | null>;
|
|
45
47
|
writeSealedMemory: (
|
|
46
48
|
envelope: SealedMemoryEnvelope,
|
|
47
|
-
extras: { lineage: [string, string]; sourceMemoryId: string }
|
|
49
|
+
extras: { actor?: string; lineage: [string, string]; sourceMemoryId: string }
|
|
48
50
|
) => Promise<unknown>;
|
|
49
51
|
}
|
|
50
52
|
|
|
53
|
+
export interface SupersessionAuditOptions {
|
|
54
|
+
content: string;
|
|
55
|
+
tags?: string[];
|
|
56
|
+
structuredAttributes?: Record<string, string>;
|
|
57
|
+
source?: string;
|
|
58
|
+
}
|
|
59
|
+
|
|
51
60
|
export async function runSupersessionSideEffects(options: SupersessionSideEffectOptions): Promise<boolean> {
|
|
52
61
|
const {
|
|
53
62
|
oldMemoryId,
|
|
@@ -90,7 +99,7 @@ export async function runSupersessionSideEffects(options: SupersessionSideEffect
|
|
|
90
99
|
}
|
|
91
100
|
}
|
|
92
101
|
|
|
93
|
-
const auditBody = `Superseded: ${currentBefore.content}\n\nReason: ${reason}`;
|
|
102
|
+
const auditBody = `Superseded: ${options.audit?.content ?? currentBefore.content}\n\nReason: ${reason}`;
|
|
94
103
|
const auditExists = await hasSupersessionAudit(
|
|
95
104
|
{
|
|
96
105
|
correctionsDir: options.correctionsDir,
|
|
@@ -98,7 +107,8 @@ export async function runSupersessionSideEffects(options: SupersessionSideEffect
|
|
|
98
107
|
},
|
|
99
108
|
oldMemoryId,
|
|
100
109
|
newMemoryId,
|
|
101
|
-
auditBody
|
|
110
|
+
auditBody,
|
|
111
|
+
options.audit?.structuredAttributes
|
|
102
112
|
);
|
|
103
113
|
if (!auditExists) {
|
|
104
114
|
const auditEnvelope = composeMemoryEnvelope(
|
|
@@ -106,11 +116,13 @@ export async function runSupersessionSideEffects(options: SupersessionSideEffect
|
|
|
106
116
|
content: auditBody,
|
|
107
117
|
category: "correction",
|
|
108
118
|
confidence: 1,
|
|
109
|
-
tags: ["supersession", "auto-resolved"],
|
|
119
|
+
tags: options.audit?.tags ?? ["supersession", "auto-resolved"],
|
|
120
|
+
structuredAttributes: options.audit?.structuredAttributes,
|
|
110
121
|
},
|
|
111
|
-
{ source: "contradiction-detection" }
|
|
122
|
+
{ source: options.audit?.source ?? "contradiction-detection" }
|
|
112
123
|
);
|
|
113
124
|
await options.writeSealedMemory(auditEnvelope, {
|
|
125
|
+
actor: options.actor,
|
|
114
126
|
lineage: [oldMemoryId, newMemoryId],
|
|
115
127
|
sourceMemoryId: oldMemoryId,
|
|
116
128
|
});
|
package/src/storage.ts
CHANGED
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
type TombstoneStats,
|
|
138
138
|
} from "./lifecycle/tombstones.js";
|
|
139
139
|
import { supersessionKeysForFact } from "./temporal-supersession.js";
|
|
140
|
-
import { runSupersessionSideEffects } from "./storage/supersession-side-effects.js";
|
|
140
|
+
import { runSupersessionSideEffects, type SupersessionAuditOptions } from "./storage/supersession-side-effects.js";
|
|
141
141
|
import type {
|
|
142
142
|
AccessTrackingEntry,
|
|
143
143
|
BufferState,
|
|
@@ -233,6 +233,7 @@ import {
|
|
|
233
233
|
} from "./memory-projection-store.js";
|
|
234
234
|
import { inferMemoryStatus, isArchivedMemoryPath, toMemoryPathRel } from "./memory-lifecycle-ledger-utils.js";
|
|
235
235
|
import { normalizeProjectionPreview, normalizeProjectionTags } from "./memory-projection-format.js";
|
|
236
|
+
import { isSupportPassportPrivateMemory } from "./support-passport/card-projection.js";
|
|
236
237
|
import { parseFlexibleIsoTimestamp } from "./utils/iso-timestamp.js";
|
|
237
238
|
import {
|
|
238
239
|
composeMemoryEnvelope,
|
|
@@ -3682,7 +3683,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
3682
3683
|
category: MemoryCategory,
|
|
3683
3684
|
content: string,
|
|
3684
3685
|
options: WriteMemoryOptions = {}
|
|
3685
|
-
)
|
|
3686
|
+
) {
|
|
3686
3687
|
await this.ensureDirectories();
|
|
3687
3688
|
const rawEntityRef = options.entityRef;
|
|
3688
3689
|
let refIds = typeof options.entityRef === "string" ? this.currentHistoricalIds() : null;
|
|
@@ -3883,6 +3884,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
3883
3884
|
tombstoneBlocked: true,
|
|
3884
3885
|
blockedBy: duplicateBlocked.frontmatter.blockedBy,
|
|
3885
3886
|
duplicateOf: duplicateBlocked.frontmatter.id,
|
|
3887
|
+
memory: duplicateBlocked,
|
|
3886
3888
|
};
|
|
3887
3889
|
}
|
|
3888
3890
|
await this.patchHotMemoriesCache({ addedPath: filePath }, "memory-create");
|
|
@@ -3937,7 +3939,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
3937
3939
|
}
|
|
3938
3940
|
}
|
|
3939
3941
|
log.debug(`wrote memory ${id} to ${filePath}`);
|
|
3940
|
-
return { id, tombstoneBlocked, ...(fm.blockedBy ? { blockedBy: fm.blockedBy } : {}) };
|
|
3942
|
+
return { id, tombstoneBlocked, ...(fm.blockedBy ? { blockedBy: fm.blockedBy } : {}), memory: { path: filePath, frontmatter: fm, content: sanitized.text } };
|
|
3941
3943
|
}
|
|
3942
3944
|
|
|
3943
3945
|
/**
|
|
@@ -3959,7 +3961,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
3959
3961
|
* `envelope.sourceReason` is access-layer metadata with no frontmatter
|
|
3960
3962
|
* field and is deliberately not persisted here.
|
|
3961
3963
|
*/
|
|
3962
|
-
async writeSealedMemory(envelope: SealedMemoryEnvelope, extras: SealedWriteExtras = {})
|
|
3964
|
+
async writeSealedMemory(envelope: SealedMemoryEnvelope, extras: SealedWriteExtras = {}) {
|
|
3963
3965
|
if (!isSealedMemoryEnvelope(envelope)) {
|
|
3964
3966
|
throw new Error(
|
|
3965
3967
|
"writeSealedMemory: value is not a valid sealed memory envelope (fails the composeMemoryEnvelope contract)"
|
|
@@ -6636,21 +6638,18 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
6636
6638
|
return updated;
|
|
6637
6639
|
}
|
|
6638
6640
|
|
|
6639
|
-
/**
|
|
6640
|
-
* Get a memory by its ID.
|
|
6641
|
-
*/
|
|
6642
6641
|
async getMemoryById(id: string): Promise<MemoryFile | null> {
|
|
6643
6642
|
const memories = await this.readAllMemories();
|
|
6644
6643
|
return memories.find((m) => m.frontmatter.id === id) ?? null;
|
|
6645
6644
|
}
|
|
6646
6645
|
|
|
6647
|
-
|
|
6648
|
-
|
|
6649
|
-
|
|
6650
|
-
|
|
6651
|
-
|
|
6652
|
-
|
|
6653
|
-
|
|
6646
|
+
async getMemoryByIdIncludingArchived(id: string): Promise<MemoryFile | null> {
|
|
6647
|
+
const active = await this.getMemoryById(id);
|
|
6648
|
+
return active ?? (await this.readAllColdMemories()).find((memory) => memory.frontmatter.id === id) ??
|
|
6649
|
+
(await this.readArchivedMemories()).find((memory) => memory.frontmatter.id === id) ?? null;
|
|
6650
|
+
}
|
|
6651
|
+
|
|
6652
|
+
/** Resolve existing active memory IDs through a lightweight directory scan. */
|
|
6654
6653
|
async findExistingMemoryPaths(
|
|
6655
6654
|
ids: string[],
|
|
6656
6655
|
preferredPaths: Map<string, string[]> = new Map()
|
|
@@ -6751,6 +6750,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
6751
6750
|
lastAccessed: memory.frontmatter.lastAccessed,
|
|
6752
6751
|
tags: normalizeProjectionTags(memory.frontmatter.tags),
|
|
6753
6752
|
preview: normalizeProjectionPreview(memory.content),
|
|
6753
|
+
privateRecord: isSupportPassportPrivateMemory(memory),
|
|
6754
6754
|
};
|
|
6755
6755
|
}
|
|
6756
6756
|
|
|
@@ -6916,9 +6916,9 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
6916
6916
|
reason: string,
|
|
6917
6917
|
supersessionMetadata?: Pick<MemoryFrontmatter, "supersessionCause" | "invalidatedBy">,
|
|
6918
6918
|
options: {
|
|
6919
|
-
requireActive?: boolean;
|
|
6920
|
-
acceptExactReplay?: boolean;
|
|
6919
|
+
actor?: string; requireActive?: boolean; acceptExactReplay?: boolean;
|
|
6921
6920
|
expectedSnapshot?: Pick<MemoryFile, "content" | "frontmatter"> & Partial<Pick<MemoryFile, "path">>;
|
|
6921
|
+
audit?: SupersessionAuditOptions;
|
|
6922
6922
|
} = {},
|
|
6923
6923
|
): Promise<boolean> {
|
|
6924
6924
|
const matchesSupersession = (memory: MemoryFile): boolean =>
|
|
@@ -7061,6 +7061,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
7061
7061
|
exactReplay,
|
|
7062
7062
|
currentBefore,
|
|
7063
7063
|
updatedFm,
|
|
7064
|
+
actor: options.actor, audit: options.audit,
|
|
7064
7065
|
citationTemplate: this.citationTemplate,
|
|
7065
7066
|
correctionsDir: this.correctionsDir,
|
|
7066
7067
|
readMemoryByPath: (filePath) => this.readMemoryByPath(filePath),
|
|
@@ -7093,7 +7094,7 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
7093
7094
|
memoryId: oldMemoryId,
|
|
7094
7095
|
eventType: "superseded",
|
|
7095
7096
|
timestamp: supersededAt,
|
|
7096
|
-
actor: "storage.supersedeMemory",
|
|
7097
|
+
actor: options.actor ?? "storage.supersedeMemory",
|
|
7097
7098
|
reasonCode: reason,
|
|
7098
7099
|
before: exactReplay ? { ...beforeState, status: "active" } : beforeState,
|
|
7099
7100
|
after: afterState,
|
|
@@ -7107,14 +7108,12 @@ export class StorageManager extends TombstoneBlockedCaptureIndexHost {
|
|
|
7107
7108
|
writeSealedMemory: (envelope, extras) => this.writeSealedMemory(envelope, extras),
|
|
7108
7109
|
});
|
|
7109
7110
|
return sideEffectsComplete || options.acceptExactReplay !== true;
|
|
7110
|
-
|
|
7111
7111
|
} catch (err) {
|
|
7112
7112
|
log.error(`failed to supersede memory ${oldMemoryId}:`, err);
|
|
7113
7113
|
return false;
|
|
7114
7114
|
}
|
|
7115
7115
|
}
|
|
7116
7116
|
|
|
7117
|
-
|
|
7118
7117
|
private get summariesDir(): string {
|
|
7119
7118
|
return path.join(this.baseDir, "summaries");
|
|
7120
7119
|
}
|