@remnic/core 9.54.4 → 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
package/src/offline-sync.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createHash, randomUUID } from "node:crypto";
|
|
2
|
-
import { createReadStream } from "node:fs";
|
|
3
2
|
import {
|
|
4
3
|
lstat,
|
|
5
4
|
mkdir,
|
|
@@ -17,7 +16,6 @@ import path from "node:path";
|
|
|
17
16
|
import {
|
|
18
17
|
DEFAULT_TRANSFER_EXCLUDE_DIRS,
|
|
19
18
|
} from "./transfer/exclusions.js";
|
|
20
|
-
import { isEncryptedFile, MAGIC_HEADER_SIZE } from "./secure-store/secure-fs.js";
|
|
21
19
|
import {
|
|
22
20
|
prepareSafeArchiveRoot,
|
|
23
21
|
resolveSafeArchiveTarget,
|
|
@@ -27,6 +25,16 @@ import {
|
|
|
27
25
|
} from "./transfer/fs-utils.js";
|
|
28
26
|
import { parseFlexibleIsoTimestamp } from "./utils/iso-timestamp.js";
|
|
29
27
|
import { DEFAULT_OFFLINE_SYNC_EXCLUDE_GLOBS } from "./offline-sync-exclude-globs.js";
|
|
28
|
+
import {
|
|
29
|
+
isEncryptedOfflineSyncFile,
|
|
30
|
+
readPlainOfflineSyncFileChunk,
|
|
31
|
+
sha256OfflineSyncFile,
|
|
32
|
+
shouldExcludeOfflineSyncFile,
|
|
33
|
+
type OfflineSyncExcludeFile,
|
|
34
|
+
type OfflineSyncFileTarget,
|
|
35
|
+
} from "./offline-sync-file-io.js";
|
|
36
|
+
|
|
37
|
+
export type { OfflineSyncExcludeFile, OfflineSyncFileTarget } from "./offline-sync-file-io.js";
|
|
30
38
|
|
|
31
39
|
export const OFFLINE_SYNC_SNAPSHOT_FORMAT = "remnic.offline-sync.snapshot.v1";
|
|
32
40
|
export const OFFLINE_SYNC_CHANGESET_FORMAT = "remnic.offline-sync.changeset.v1";
|
|
@@ -141,12 +149,6 @@ export interface OfflineSyncChangesetSummary {
|
|
|
141
149
|
total: number;
|
|
142
150
|
}
|
|
143
151
|
|
|
144
|
-
export interface OfflineSyncFileTarget {
|
|
145
|
-
root: string;
|
|
146
|
-
path: string;
|
|
147
|
-
filePath: string;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
152
|
export interface OfflineSyncFileDeleteTarget extends OfflineSyncFileTarget {
|
|
151
153
|
mtimeMs?: number;
|
|
152
154
|
}
|
|
@@ -826,7 +828,7 @@ async function readOfflineSyncFileRecord(
|
|
|
826
828
|
digest = sha256Buffer(content);
|
|
827
829
|
content = null;
|
|
828
830
|
} else {
|
|
829
|
-
digest = await
|
|
831
|
+
digest = await sha256OfflineSyncFile(options.filePath, options.signal);
|
|
830
832
|
}
|
|
831
833
|
throwIfOfflineSyncAborted(options.signal);
|
|
832
834
|
const st = await stat(options.filePath);
|
|
@@ -839,57 +841,13 @@ async function readOfflineSyncFileRecord(
|
|
|
839
841
|
};
|
|
840
842
|
}
|
|
841
843
|
|
|
842
|
-
async function sha256File(filePath: string, signal?: AbortSignal): Promise<OfflineSyncFileDigest> {
|
|
843
|
-
const hash = createHash("sha256");
|
|
844
|
-
let bytes = 0;
|
|
845
|
-
for await (const chunk of createReadStream(filePath)) {
|
|
846
|
-
throwIfOfflineSyncAborted(signal);
|
|
847
|
-
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
848
|
-
hash.update(buffer);
|
|
849
|
-
bytes += buffer.length;
|
|
850
|
-
}
|
|
851
|
-
throwIfOfflineSyncAborted(signal);
|
|
852
|
-
return {
|
|
853
|
-
sha256: hash.digest("hex"),
|
|
854
|
-
bytes,
|
|
855
|
-
};
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
async function fileIsSecureStoreEncrypted(filePath: string): Promise<boolean> {
|
|
859
|
-
const handle = await open(filePath, "r");
|
|
860
|
-
try {
|
|
861
|
-
const header = Buffer.alloc(MAGIC_HEADER_SIZE);
|
|
862
|
-
const { bytesRead } = await handle.read(header, 0, header.length, 0);
|
|
863
|
-
return bytesRead >= MAGIC_HEADER_SIZE && isEncryptedFile(header);
|
|
864
|
-
} finally {
|
|
865
|
-
await handle.close();
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
|
|
869
|
-
async function readPlainFileContentChunk(options: {
|
|
870
|
-
filePath: string;
|
|
871
|
-
offset: number;
|
|
872
|
-
length: number;
|
|
873
|
-
bytes: number;
|
|
874
|
-
}): Promise<Buffer> {
|
|
875
|
-
const chunkBytes = Math.min(options.length, options.bytes - options.offset);
|
|
876
|
-
const chunk = Buffer.alloc(chunkBytes);
|
|
877
|
-
if (chunkBytes === 0) return chunk;
|
|
878
|
-
const handle = await open(options.filePath, "r");
|
|
879
|
-
try {
|
|
880
|
-
const { bytesRead } = await handle.read(chunk, 0, chunk.length, options.offset);
|
|
881
|
-
return bytesRead === chunk.length ? chunk : chunk.subarray(0, bytesRead);
|
|
882
|
-
} finally {
|
|
883
|
-
await handle.close();
|
|
884
|
-
}
|
|
885
|
-
}
|
|
886
|
-
|
|
887
844
|
export async function* iterateOfflineSyncSnapshotFileRecords(options: {
|
|
888
845
|
root: string;
|
|
889
846
|
includeContent?: boolean;
|
|
890
847
|
includeTranscripts?: boolean;
|
|
891
848
|
readFile?: (target: OfflineSyncFileTarget) => Promise<Buffer>;
|
|
892
849
|
readFileDigest?: (target: OfflineSyncFileTarget) => Promise<OfflineSyncFileDigest>;
|
|
850
|
+
excludeFile?: OfflineSyncExcludeFile;
|
|
893
851
|
userExcludeRegexps?: readonly RegExp[];
|
|
894
852
|
/**
|
|
895
853
|
* When false, enumeration uses only the legacy structural excludes —
|
|
@@ -924,6 +882,11 @@ export async function* iterateOfflineSyncSnapshotFileRecords(options: {
|
|
|
924
882
|
continue;
|
|
925
883
|
}
|
|
926
884
|
if (!entry.isFile()) continue;
|
|
885
|
+
if (await shouldExcludeOfflineSyncFile(options.excludeFile, {
|
|
886
|
+
root: root.abs,
|
|
887
|
+
path: relPosix,
|
|
888
|
+
filePath: abs,
|
|
889
|
+
})) continue;
|
|
927
890
|
yield await readOfflineSyncFileRecord({
|
|
928
891
|
root,
|
|
929
892
|
relPath: relPosix,
|
|
@@ -948,6 +911,7 @@ export async function buildOfflineSyncSnapshot(options: {
|
|
|
948
911
|
now?: Date;
|
|
949
912
|
readFile?: (target: OfflineSyncFileTarget) => Promise<Buffer>;
|
|
950
913
|
readFileDigest?: (target: OfflineSyncFileTarget) => Promise<OfflineSyncFileDigest>;
|
|
914
|
+
excludeFile?: OfflineSyncExcludeFile;
|
|
951
915
|
userExcludeRegexps?: readonly RegExp[];
|
|
952
916
|
/**
|
|
953
917
|
* When false, enumeration uses only the legacy structural excludes —
|
|
@@ -995,6 +959,7 @@ export async function buildOfflineSyncSnapshotFromBase(options: {
|
|
|
995
959
|
now?: Date;
|
|
996
960
|
readFile?: (target: OfflineSyncFileTarget) => Promise<Buffer>;
|
|
997
961
|
readFileDigest?: (target: OfflineSyncFileTarget) => Promise<OfflineSyncFileDigest>;
|
|
962
|
+
excludeFile?: OfflineSyncExcludeFile;
|
|
998
963
|
userExcludeRegexps?: readonly RegExp[];
|
|
999
964
|
/**
|
|
1000
965
|
* When false, enumeration uses only the legacy structural excludes —
|
|
@@ -1039,6 +1004,11 @@ export async function buildOfflineSyncSnapshotFromBase(options: {
|
|
|
1039
1004
|
continue;
|
|
1040
1005
|
}
|
|
1041
1006
|
if (!entry.isFile()) continue;
|
|
1007
|
+
if (await shouldExcludeOfflineSyncFile(options.excludeFile, {
|
|
1008
|
+
root: root.abs,
|
|
1009
|
+
path: relPosix,
|
|
1010
|
+
filePath: abs,
|
|
1011
|
+
})) continue;
|
|
1042
1012
|
const st = await stat(abs);
|
|
1043
1013
|
const baseEntry = base.get(relPosix);
|
|
1044
1014
|
if (
|
|
@@ -1094,6 +1064,7 @@ export async function buildOfflineSyncSnapshotForPaths(options: {
|
|
|
1094
1064
|
now?: Date;
|
|
1095
1065
|
readFile?: (target: OfflineSyncFileTarget) => Promise<Buffer>;
|
|
1096
1066
|
readFileDigest?: (target: OfflineSyncFileTarget) => Promise<OfflineSyncFileDigest>;
|
|
1067
|
+
excludeFile?: OfflineSyncExcludeFile;
|
|
1097
1068
|
userExcludeRegexps?: readonly RegExp[];
|
|
1098
1069
|
/**
|
|
1099
1070
|
* When false, enumeration uses only the legacy structural excludes —
|
|
@@ -1130,6 +1101,13 @@ export async function buildOfflineSyncSnapshotForPaths(options: {
|
|
|
1130
1101
|
throw error;
|
|
1131
1102
|
});
|
|
1132
1103
|
if (!st || st.isSymbolicLink() || !st.isFile()) continue;
|
|
1104
|
+
if (await shouldExcludeOfflineSyncFile(options.excludeFile, {
|
|
1105
|
+
root: root.abs,
|
|
1106
|
+
path: relPath,
|
|
1107
|
+
filePath,
|
|
1108
|
+
})) {
|
|
1109
|
+
throw new Error(`offline sync snapshot path is excluded: ${relPath}`);
|
|
1110
|
+
}
|
|
1133
1111
|
files.push(await readOfflineSyncFileRecord({
|
|
1134
1112
|
root,
|
|
1135
1113
|
relPath,
|
|
@@ -1169,6 +1147,7 @@ export async function readOfflineSyncFileContentChunk(options: {
|
|
|
1169
1147
|
length?: number;
|
|
1170
1148
|
includeTranscripts?: boolean;
|
|
1171
1149
|
readFile?: (target: OfflineSyncFileTarget) => Promise<Buffer>;
|
|
1150
|
+
excludeFile?: OfflineSyncExcludeFile;
|
|
1172
1151
|
userExcludeRegexps?: readonly RegExp[];
|
|
1173
1152
|
/**
|
|
1174
1153
|
* When false, enumeration uses only the legacy structural excludes —
|
|
@@ -1209,12 +1188,19 @@ export async function readOfflineSyncFileContentChunk(options: {
|
|
|
1209
1188
|
if (!st || st.isSymbolicLink() || !st.isFile()) {
|
|
1210
1189
|
throw new Error(`offline sync file content path not found: ${relPath}`);
|
|
1211
1190
|
}
|
|
1212
|
-
|
|
1191
|
+
if (await shouldExcludeOfflineSyncFile(options.excludeFile, {
|
|
1192
|
+
root: root.abs,
|
|
1193
|
+
path: relPath,
|
|
1194
|
+
filePath,
|
|
1195
|
+
})) {
|
|
1196
|
+
throw new Error(`offline sync file content path is excluded: ${relPath}`);
|
|
1197
|
+
}
|
|
1198
|
+
const encrypted = await isEncryptedOfflineSyncFile(filePath);
|
|
1213
1199
|
if (!encrypted) {
|
|
1214
1200
|
if (offset > st.size) {
|
|
1215
1201
|
throw new Error(`offset must be <= file size for ${relPath}`);
|
|
1216
1202
|
}
|
|
1217
|
-
const chunk = await
|
|
1203
|
+
const chunk = await readPlainOfflineSyncFileChunk({
|
|
1218
1204
|
filePath,
|
|
1219
1205
|
offset,
|
|
1220
1206
|
length: requestedLength,
|
|
@@ -2017,7 +2003,7 @@ async function readLocalFileState(options: {
|
|
|
2017
2003
|
const content = await options.readFile({ root: options.rootAbs, path: options.relPath, filePath });
|
|
2018
2004
|
digest = sha256Buffer(content);
|
|
2019
2005
|
} else {
|
|
2020
|
-
digest = await
|
|
2006
|
+
digest = await sha256OfflineSyncFile(filePath, options.signal);
|
|
2021
2007
|
}
|
|
2022
2008
|
throwIfOfflineSyncAborted(options.signal);
|
|
2023
2009
|
return {
|
|
@@ -67,6 +67,7 @@ import type {
|
|
|
67
67
|
PluginConfig,
|
|
68
68
|
RecallSectionConfig,
|
|
69
69
|
} from "../types.js";
|
|
70
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
70
71
|
|
|
71
72
|
/** Dependencies injected by the orchestrator. Stable references or live
|
|
72
73
|
* accessors — lazy getters for mutable fields tests reassign
|
|
@@ -449,7 +450,7 @@ export class ConsolidationRunCoordinator {
|
|
|
449
450
|
}
|
|
450
451
|
await this.pruneHarmonicStores(storage);
|
|
451
452
|
|
|
452
|
-
let allMemories = await storage.readAllMemories();
|
|
453
|
+
let allMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
453
454
|
if (allMemories.length < 5) {
|
|
454
455
|
return { memoriesProcessed: allMemories.length, merged, invalidated };
|
|
455
456
|
}
|
|
@@ -801,7 +802,7 @@ export class ConsolidationRunCoordinator {
|
|
|
801
802
|
// mutations for the catalog touch below (codex NThSW).
|
|
802
803
|
const tierMigration = await this.deps.tierMigrationCoordinator.runCycle(storage, "maintenance");
|
|
803
804
|
if (tierMigration.migrated > 0) memoryItemMutated = true;
|
|
804
|
-
allMemories = await storage.readAllMemories();
|
|
805
|
+
allMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
805
806
|
|
|
806
807
|
// Fact archival pass (v6.0) — move old, low-importance, rarely-accessed facts to archive/
|
|
807
808
|
if (resolveRecallEnhancementCapabilities(config).factArchival) {
|
|
@@ -823,7 +824,7 @@ export class ConsolidationRunCoordinator {
|
|
|
823
824
|
} catch (err) {
|
|
824
825
|
log.warn(`deep-sleep maintenance pass failed (ignored): ${err}`);
|
|
825
826
|
try {
|
|
826
|
-
allMemories = await storage.readAllMemories();
|
|
827
|
+
allMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
827
828
|
} catch (readErr) {
|
|
828
829
|
log.warn(`deep-sleep maintenance recovery read failed: ${readErr}`);
|
|
829
830
|
throw err;
|
|
@@ -862,7 +863,7 @@ export class ConsolidationRunCoordinator {
|
|
|
862
863
|
const semResult = await this.deps.semanticConsolidationCoordinator.runSemanticConsolidation();
|
|
863
864
|
let remItemsProcessed = allMemories.length;
|
|
864
865
|
try {
|
|
865
|
-
allMemories = await storage.readAllMemories();
|
|
866
|
+
allMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
866
867
|
remItemsProcessed = allMemories.length;
|
|
867
868
|
} catch (err) {
|
|
868
869
|
log.warn(
|
|
@@ -43,6 +43,7 @@ import type {
|
|
|
43
43
|
DependencyPropagationDeliveryPort,
|
|
44
44
|
DependencyPropagationPreparationToken,
|
|
45
45
|
} from "./dependency-propagation-delivery.js";
|
|
46
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
46
47
|
|
|
47
48
|
/** Result type of {@link ContradictionLinkingCoordinator.checkForContradiction}. */
|
|
48
49
|
export interface ContradictionResult {
|
|
@@ -170,6 +171,7 @@ export class ContradictionLinkingCoordinator {
|
|
|
170
171
|
const resultStorage = await this.storageForNamespace(resultNamespace);
|
|
171
172
|
const existingMemory = await resultStorage.getMemoryById(memoryId);
|
|
172
173
|
if (!existingMemory) continue;
|
|
174
|
+
if (isSupportPassportPrivateMemory(existingMemory)) continue;
|
|
173
175
|
if (inferLocalizationMemoryStatus(existingMemory, resultStorage.dir) !== "active") continue;
|
|
174
176
|
const verification = await this.getExtraction().verifyContradiction(
|
|
175
177
|
{ content, category },
|
|
@@ -231,6 +233,9 @@ export class ContradictionLinkingCoordinator {
|
|
|
231
233
|
]);
|
|
232
234
|
anchorSnapshot = mergeMemorySnapshots(hot, cold, resultStorage.dir);
|
|
233
235
|
}
|
|
236
|
+
anchorSnapshot = anchorSnapshot?.filter(
|
|
237
|
+
(memory) => !isSupportPassportPrivateMemory(memory),
|
|
238
|
+
);
|
|
234
239
|
const anchorMemoryById = anchorSnapshot
|
|
235
240
|
? new Map(anchorSnapshot.map((memory) => [memory.frontmatter.id, memory]))
|
|
236
241
|
: undefined;
|
|
@@ -264,6 +269,7 @@ export class ContradictionLinkingCoordinator {
|
|
|
264
269
|
anchorMemoryById?.get(memoryId) ?? (await resultStorage.getMemoryById(memoryId));
|
|
265
270
|
if (
|
|
266
271
|
!existingMemory ||
|
|
272
|
+
isSupportPassportPrivateMemory(existingMemory) ||
|
|
267
273
|
inferLocalizationMemoryStatus(existingMemory, resultStorage.dir) !== "active"
|
|
268
274
|
) continue;
|
|
269
275
|
hits.push({
|
|
@@ -290,6 +296,7 @@ export class ContradictionLinkingCoordinator {
|
|
|
290
296
|
anchorMemoryById?.get(candidate.id) ?? (await resultStorage.getMemoryById(candidate.id));
|
|
291
297
|
if (
|
|
292
298
|
!existingMemory ||
|
|
299
|
+
isSupportPassportPrivateMemory(existingMemory) ||
|
|
293
300
|
inferLocalizationMemoryStatus(existingMemory, resultStorage.dir) !== "active"
|
|
294
301
|
) continue;
|
|
295
302
|
const verification = await this.getExtraction().verifyContradiction(
|
|
@@ -1951,3 +1951,118 @@ test("QMD candidates under archive paths are not eligible without raw status", a
|
|
|
1951
1951
|
omitStatus: true,
|
|
1952
1952
|
});
|
|
1953
1953
|
});
|
|
1954
|
+
|
|
1955
|
+
test("live contradiction linking excludes support passport QMD candidates", async () => {
|
|
1956
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-contradiction-passport-qmd-"));
|
|
1957
|
+
try {
|
|
1958
|
+
const config = baseConfig(memoryDir) as PluginConfig;
|
|
1959
|
+
const candidate = {
|
|
1960
|
+
path: path.join(memoryDir, "facts", "passport.md"),
|
|
1961
|
+
content: "I need written instructions.",
|
|
1962
|
+
frontmatter: {
|
|
1963
|
+
id: "passport-card",
|
|
1964
|
+
category: "preference",
|
|
1965
|
+
created: "2026-08-01T00:00:00.000Z",
|
|
1966
|
+
updated: "2026-08-01T00:00:00.000Z",
|
|
1967
|
+
source: "support-passport",
|
|
1968
|
+
confidence: 1,
|
|
1969
|
+
confidenceTier: "explicit",
|
|
1970
|
+
tags: ["support-passport-card"],
|
|
1971
|
+
status: "active",
|
|
1972
|
+
},
|
|
1973
|
+
} as unknown as MemoryFile;
|
|
1974
|
+
const storage = {
|
|
1975
|
+
dir: memoryDir,
|
|
1976
|
+
readAllMemories: async () => [],
|
|
1977
|
+
readAllColdMemories: async () => [],
|
|
1978
|
+
getMemoryById: async () => candidate,
|
|
1979
|
+
} as never as StorageManager;
|
|
1980
|
+
let verificationCalls = 0;
|
|
1981
|
+
const coordinator = new ContradictionLinkingCoordinator({
|
|
1982
|
+
getConfig: () => config,
|
|
1983
|
+
isSearchAvailable: () => true,
|
|
1984
|
+
searchAcrossNamespaces: async () => [{
|
|
1985
|
+
docid: candidate.path,
|
|
1986
|
+
path: candidate.path,
|
|
1987
|
+
snippet: candidate.content,
|
|
1988
|
+
score: 0.99,
|
|
1989
|
+
}],
|
|
1990
|
+
extractMemoryIdsFromResults: () => [candidate.frontmatter.id],
|
|
1991
|
+
namespaceFromPath: () => "default",
|
|
1992
|
+
storageForNamespace: async () => storage,
|
|
1993
|
+
getExtraction: () => ({
|
|
1994
|
+
verifyContradiction: async () => {
|
|
1995
|
+
verificationCalls++;
|
|
1996
|
+
return null;
|
|
1997
|
+
},
|
|
1998
|
+
}) as unknown as ExtractionEngine,
|
|
1999
|
+
});
|
|
2000
|
+
|
|
2001
|
+
const contradiction = await coordinator.checkForContradiction(
|
|
2002
|
+
"New preference",
|
|
2003
|
+
"preference",
|
|
2004
|
+
"default",
|
|
2005
|
+
);
|
|
2006
|
+
|
|
2007
|
+
assert.equal(contradiction, null);
|
|
2008
|
+
assert.equal(verificationCalls, 0);
|
|
2009
|
+
} finally {
|
|
2010
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
2011
|
+
}
|
|
2012
|
+
});
|
|
2013
|
+
|
|
2014
|
+
test("live contradiction linking excludes support passport anchor candidates", async () => {
|
|
2015
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-contradiction-passport-anchor-"));
|
|
2016
|
+
try {
|
|
2017
|
+
const config = baseConfig(memoryDir) as PluginConfig;
|
|
2018
|
+
const candidate = {
|
|
2019
|
+
path: path.join(memoryDir, "facts", "passport.md"),
|
|
2020
|
+
content: "I need written instructions.",
|
|
2021
|
+
frontmatter: {
|
|
2022
|
+
id: "passport-card",
|
|
2023
|
+
category: "preference",
|
|
2024
|
+
created: "2026-08-01T00:00:00.000Z",
|
|
2025
|
+
updated: "2026-08-01T00:00:00.000Z",
|
|
2026
|
+
source: "support-passport",
|
|
2027
|
+
confidence: 1,
|
|
2028
|
+
confidenceTier: "explicit",
|
|
2029
|
+
tags: ["support-passport-card"],
|
|
2030
|
+
status: "active",
|
|
2031
|
+
entityRef: "person:owner",
|
|
2032
|
+
},
|
|
2033
|
+
} as unknown as MemoryFile;
|
|
2034
|
+
const storage = {
|
|
2035
|
+
dir: memoryDir,
|
|
2036
|
+
readAllMemories: async () => [candidate],
|
|
2037
|
+
readAllColdMemories: async () => [],
|
|
2038
|
+
getMemoryById: async () => candidate,
|
|
2039
|
+
} as never as StorageManager;
|
|
2040
|
+
let verificationCalls = 0;
|
|
2041
|
+
const coordinator = new ContradictionLinkingCoordinator({
|
|
2042
|
+
getConfig: () => config,
|
|
2043
|
+
isSearchAvailable: () => false,
|
|
2044
|
+
searchAcrossNamespaces: async () => [],
|
|
2045
|
+
extractMemoryIdsFromResults: () => [],
|
|
2046
|
+
namespaceFromPath: () => "default",
|
|
2047
|
+
storageForNamespace: async () => storage,
|
|
2048
|
+
getExtraction: () => ({
|
|
2049
|
+
verifyContradiction: async () => {
|
|
2050
|
+
verificationCalls++;
|
|
2051
|
+
return null;
|
|
2052
|
+
},
|
|
2053
|
+
}) as unknown as ExtractionEngine,
|
|
2054
|
+
});
|
|
2055
|
+
|
|
2056
|
+
const contradiction = await coordinator.checkForContradiction(
|
|
2057
|
+
"New preference",
|
|
2058
|
+
"preference",
|
|
2059
|
+
"default",
|
|
2060
|
+
{ entityRef: "person:owner", storageSnapshot: [candidate] },
|
|
2061
|
+
);
|
|
2062
|
+
|
|
2063
|
+
assert.equal(contradiction, null);
|
|
2064
|
+
assert.equal(verificationCalls, 0);
|
|
2065
|
+
} finally {
|
|
2066
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
2067
|
+
}
|
|
2068
|
+
});
|
|
@@ -48,6 +48,7 @@ import type {
|
|
|
48
48
|
MemoryActionEvent,
|
|
49
49
|
MemorySummary,
|
|
50
50
|
} from "../types.js";
|
|
51
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
51
52
|
|
|
52
53
|
/** Dependencies injected by the orchestrator. All stable references or
|
|
53
54
|
* live accessors. */
|
|
@@ -202,7 +203,7 @@ export class LifecyclePolicyCoordinator {
|
|
|
202
203
|
};
|
|
203
204
|
const actionPriors = await this.buildLifecycleActionPriors(storage);
|
|
204
205
|
|
|
205
|
-
for (const memory of allMemories) {
|
|
206
|
+
for (const memory of excludeSupportPassportPrivateMemories(allMemories)) {
|
|
206
207
|
if (
|
|
207
208
|
memory.frontmatter.status === "superseded" ||
|
|
208
209
|
memory.frontmatter.status === "forgotten"
|