@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
|
@@ -970,6 +970,48 @@ test("runContradictionScan loads memories from namespace-scoped storage", async
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
|
|
973
|
+
test("runContradictionScan excludes support passport private records", async () => {
|
|
974
|
+
const { dir, cleanup } = await makeTempDir();
|
|
975
|
+
try {
|
|
976
|
+
const visibleA = makeMemory("visible-a", "preference");
|
|
977
|
+
visibleA.frontmatter.entityRef = "entity:shared";
|
|
978
|
+
const visibleB = makeMemory("visible-b", "preference");
|
|
979
|
+
visibleB.frontmatter.entityRef = "entity:shared";
|
|
980
|
+
const passport = makeMemory("passport-card", "preference");
|
|
981
|
+
passport.frontmatter.entityRef = "entity:shared";
|
|
982
|
+
passport.frontmatter.tags = ["support-passport-card"];
|
|
983
|
+
passport.content = "Private support passport statement.";
|
|
984
|
+
|
|
985
|
+
const storage = makeScanStorage([visibleA, passport, visibleB]);
|
|
986
|
+
const config = parseConfig({
|
|
987
|
+
memoryDir: dir,
|
|
988
|
+
contradictionScan: {
|
|
989
|
+
enabled: true,
|
|
990
|
+
maxPairsPerRun: 10,
|
|
991
|
+
topicOverlapFloor: 0,
|
|
992
|
+
similarityFloor: 0,
|
|
993
|
+
},
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
const result = await runContradictionScan({
|
|
997
|
+
storage,
|
|
998
|
+
config,
|
|
999
|
+
memoryDir: dir,
|
|
1000
|
+
localLlm: null,
|
|
1001
|
+
fallbackLlm: null,
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
assert.equal(result.scanned, 2);
|
|
1005
|
+
assert.equal(result.candidates, 1);
|
|
1006
|
+
assert.deepEqual(listPairs(dir, { filter: "all" }).pairs[0]?.memoryIds, [
|
|
1007
|
+
"visible-a",
|
|
1008
|
+
"visible-b",
|
|
1009
|
+
]);
|
|
1010
|
+
} finally {
|
|
1011
|
+
await cleanup();
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
|
|
973
1015
|
test("runContradictionScan caps candidates during generation and preserves strategy priority", async () => {
|
|
974
1016
|
const { dir, cleanup } = await makeTempDir();
|
|
975
1017
|
try {
|
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
import { type ExecutorDeps, type ExecutorMemory } from "./correction-executor.js";
|
|
49
49
|
import { CorrectionService, type CorrectionServiceDeps } from "./correction-service.js";
|
|
50
50
|
import { resolveRecallAuxiliaryCapabilities } from "../capabilities.js";
|
|
51
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
51
52
|
|
|
52
53
|
// ---------------------------------------------------------------------------
|
|
53
54
|
// Public entry: build a fully-wired CorrectionService
|
|
@@ -223,7 +224,7 @@ async function resolveTargetMemories(
|
|
|
223
224
|
for (const ns of namespaces) {
|
|
224
225
|
const storage = await wiring.orchestrator.getStorage(ns);
|
|
225
226
|
const m = await storage.getMemoryById(id);
|
|
226
|
-
if (m) {
|
|
227
|
+
if (m && isEligibleCorrectionCandidate(m)) {
|
|
227
228
|
found = toCandidate(m, ns, 1);
|
|
228
229
|
break;
|
|
229
230
|
}
|
|
@@ -261,7 +262,11 @@ async function expandEntityNeighbors(
|
|
|
261
262
|
const storage = await wiring.orchestrator.getStorage(ns);
|
|
262
263
|
const all = await storage.readAllMemories();
|
|
263
264
|
for (const m of all) {
|
|
264
|
-
if (
|
|
265
|
+
if (
|
|
266
|
+
seedIds.includes(m.frontmatter.id) &&
|
|
267
|
+
m.frontmatter.entityRef &&
|
|
268
|
+
isEligibleCorrectionCandidate(m)
|
|
269
|
+
) {
|
|
265
270
|
seedRefs.add(m.frontmatter.entityRef);
|
|
266
271
|
}
|
|
267
272
|
}
|
|
@@ -859,6 +864,7 @@ function toCandidate(m: MemoryFile, namespace: string, score: number): PlannerCa
|
|
|
859
864
|
* stays consistent with the rescope/retire apply-time guards.
|
|
860
865
|
*/
|
|
861
866
|
function isEligibleCorrectionCandidate(m: MemoryFile): boolean {
|
|
867
|
+
if (isSupportPassportPrivateMemory(m)) return false;
|
|
862
868
|
if (m.frontmatter.status && m.frontmatter.status !== "active") return false;
|
|
863
869
|
if (typeof m.frontmatter.archivedAt === "string" && m.frontmatter.archivedAt.length > 0) return false;
|
|
864
870
|
return true;
|
|
@@ -86,6 +86,13 @@ test("#1672 item 2: isEligibleCorrectionCandidate rejects archived memory with n
|
|
|
86
86
|
assert.equal(isEligibleCorrectionCandidate(m), false);
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
+
test("support passport records are not correction candidates", () => {
|
|
90
|
+
for (const tag of ["support-passport-card", "support-passport-audit"]) {
|
|
91
|
+
const memory = fakeMemoryFile({ id: tag, status: "active", tags: [tag] });
|
|
92
|
+
assert.equal(isEligibleCorrectionCandidate(memory), false);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
89
96
|
// ---------------------------------------------------------------------------
|
|
90
97
|
// item 3: contentHash recomputed on edit
|
|
91
98
|
// ---------------------------------------------------------------------------
|
|
@@ -52,6 +52,7 @@ type StoredMemory = {
|
|
|
52
52
|
category: string;
|
|
53
53
|
status?: string;
|
|
54
54
|
tags?: string[];
|
|
55
|
+
structuredAttributes?: Record<string, string>;
|
|
55
56
|
sourceConnector?: string;
|
|
56
57
|
blockedBy?: string;
|
|
57
58
|
};
|
|
@@ -1147,3 +1148,26 @@ test("explicit capture scans active rows when the blocked index is unavailable",
|
|
|
1147
1148
|
assert.equal(result.duplicateOf, "active-existing");
|
|
1148
1149
|
assert.equal(probe.envelopes.length, 0);
|
|
1149
1150
|
});
|
|
1151
|
+
|
|
1152
|
+
test("explicit capture never deduplicates against private support-passport records", async () => {
|
|
1153
|
+
const probe = createInlineCaptureProcessorProbe();
|
|
1154
|
+
const candidate = validateExplicitCaptureInput({
|
|
1155
|
+
content: "The same words can exist in an owner-controlled passport card.",
|
|
1156
|
+
category: "preference",
|
|
1157
|
+
});
|
|
1158
|
+
probe.memories.push({
|
|
1159
|
+
frontmatter: {
|
|
1160
|
+
id: "private-passport-card",
|
|
1161
|
+
category: "preference",
|
|
1162
|
+
status: "active",
|
|
1163
|
+
structuredAttributes: { "support-passport-owner": "private-owner" },
|
|
1164
|
+
},
|
|
1165
|
+
content: candidate.content,
|
|
1166
|
+
});
|
|
1167
|
+
|
|
1168
|
+
const result = await persistExplicitCapture(probe.orchestrator, candidate, "memory_store");
|
|
1169
|
+
|
|
1170
|
+
assert.equal(result.duplicateOf, undefined);
|
|
1171
|
+
assert.equal(probe.envelopes.length, 1);
|
|
1172
|
+
assert.notEqual(result.id, "private-passport-card");
|
|
1173
|
+
});
|
package/src/explicit-capture.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
normalizeExplicitCaptureContent,
|
|
13
13
|
} from "./storage/tombstone-blocked-capture-index.js";
|
|
14
14
|
import type { StorageManager } from "./storage.js";
|
|
15
|
+
import { isSupportPassportPrivateMemory } from "./support-passport/card-projection.js";
|
|
15
16
|
|
|
16
17
|
export type ExplicitCaptureInput = {
|
|
17
18
|
content: string;
|
|
@@ -480,6 +481,7 @@ async function findDuplicateExplicitCapture(
|
|
|
480
481
|
const existing = [...hotMemories, ...coldMemories];
|
|
481
482
|
const normalizedCandidate = normalizeExplicitCaptureContent(candidate.content);
|
|
482
483
|
const match = existing.find((memory) => {
|
|
484
|
+
if (isSupportPassportPrivateMemory(memory)) return false;
|
|
483
485
|
const status = memory.frontmatter.status ?? "active";
|
|
484
486
|
if (status !== "active" && (status !== "pending_review" || !memory.frontmatter.blockedBy)) {
|
|
485
487
|
return false;
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export {
|
|
|
48
48
|
defaultWorkspaceDir,
|
|
49
49
|
} from "./orchestrator.js";
|
|
50
50
|
export * from "./memory-projection-format.js";
|
|
51
|
+
export { searchWithGenericExclusion } from "./access-memory-search-fanout.js";
|
|
51
52
|
export * from "./model-registry.js";
|
|
52
53
|
export * from "./contradiction/index.js";
|
|
53
54
|
|
|
@@ -404,6 +405,7 @@ export {
|
|
|
404
405
|
type RemnicAdminModelOption,
|
|
405
406
|
} from "./access-http.js";
|
|
406
407
|
export { EngramMcpServer } from "./access-mcp.js";
|
|
408
|
+
export * from "./support-passport/index.js";
|
|
407
409
|
|
|
408
410
|
// Remnic Relay — host-agnostic mission evidence and receipt contract.
|
|
409
411
|
export {
|
|
@@ -873,6 +875,7 @@ export {
|
|
|
873
875
|
type OfflineSyncDeletionRevision,
|
|
874
876
|
type OfflineSyncFileDeleteTarget,
|
|
875
877
|
type OfflineSyncFileDigest,
|
|
878
|
+
type OfflineSyncExcludeFile,
|
|
876
879
|
type OfflineSyncFileRecord,
|
|
877
880
|
type OfflineSyncFileContentChunk,
|
|
878
881
|
type OfflineSyncRecordDeletionRevision,
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
applyUtilityPromotionRuntimePolicy,
|
|
35
35
|
loadUtilityRuntimeValues,
|
|
36
36
|
} from "../utility-runtime.js";
|
|
37
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
37
38
|
|
|
38
39
|
export const FIRST_START_DEMOTION_CAP = 50;
|
|
39
40
|
export const LIFECYCLE_INIT_DONE_MARKER = ".lifecycle-init-done";
|
|
@@ -243,7 +244,7 @@ export async function runFirstStartMigration(
|
|
|
243
244
|
return abortedResult();
|
|
244
245
|
}
|
|
245
246
|
|
|
246
|
-
const hotMemories = await storage.readAllMemories();
|
|
247
|
+
const hotMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
247
248
|
if (signal?.aborted) {
|
|
248
249
|
return abortedResult();
|
|
249
250
|
}
|
|
@@ -51,3 +51,28 @@ test("governance restore manifest pre-marks actions applied before mutation", as
|
|
|
51
51
|
await rm(memoryDir, { recursive: true, force: true });
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
|
|
55
|
+
test("governance excludes support-passport private records", async () => {
|
|
56
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-governance-passport-"));
|
|
57
|
+
try {
|
|
58
|
+
const storage = new StorageManager(memoryDir);
|
|
59
|
+
const { id } = await storage.writeMemory("preference", "Give me advance notice.", {
|
|
60
|
+
source: "support-passport",
|
|
61
|
+
tags: ["support-passport-card"],
|
|
62
|
+
confidence: 0.9,
|
|
63
|
+
});
|
|
64
|
+
await storage.updateMemoryFrontmatter(id, { verificationState: "disputed" });
|
|
65
|
+
|
|
66
|
+
const result = await runMemoryGovernance({
|
|
67
|
+
memoryDir,
|
|
68
|
+
mode: "apply",
|
|
69
|
+
now: new Date("2026-08-13T12:00:00.000Z"),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
assert.equal(result.summary.scannedMemories, 0);
|
|
73
|
+
assert.deepEqual(result.proposedActions, []);
|
|
74
|
+
assert.equal((await storage.getMemoryById(id))?.frontmatter.status, "active");
|
|
75
|
+
} finally {
|
|
76
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
});
|
|
@@ -7,6 +7,7 @@ import { RECALL_FALLBACK_DIRS } from "../utils/category-dir.js";
|
|
|
7
7
|
import { bumpMemoryCorpusVersionForDir } from "../memory-corpus-version.js";
|
|
8
8
|
import { assertPathInsideRoot } from "../utils/path-containment.js";
|
|
9
9
|
import { requestEntityCanonicalIdReconcile } from "../storage/entity-canonical-id-references.js";
|
|
10
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
10
11
|
|
|
11
12
|
export type MemoryGovernanceMode = "shadow" | "apply";
|
|
12
13
|
export type MemoryGovernanceReasonCode =
|
|
@@ -830,7 +831,9 @@ export async function runMemoryGovernance(
|
|
|
830
831
|
updatedAfter,
|
|
831
832
|
})
|
|
832
833
|
: undefined;
|
|
833
|
-
const memories =
|
|
834
|
+
const memories = excludeSupportPassportPrivateMemories(
|
|
835
|
+
memoryWindow?.memories ?? await storage.readAllMemories(),
|
|
836
|
+
);
|
|
834
837
|
const reviewQueue = await buildReviewQueue(options.memoryDir, storage, memories, now, {
|
|
835
838
|
malformedCandidateFiles: memoryWindow?.filePaths,
|
|
836
839
|
});
|
|
@@ -328,6 +328,26 @@ test("runPatternReinforcement: skips out-of-scope categories", async () => {
|
|
|
328
328
|
assert.equal(writes.length, 0);
|
|
329
329
|
});
|
|
330
330
|
|
|
331
|
+
test("runPatternReinforcement: excludes support-passport private records", async () => {
|
|
332
|
+
const content = "Give me advance notice before plans change.";
|
|
333
|
+
const passport = makeMemory({
|
|
334
|
+
id: "passport-card",
|
|
335
|
+
content,
|
|
336
|
+
tags: ["support-passport-card"],
|
|
337
|
+
});
|
|
338
|
+
const publicPreference = makeMemory({ id: "public-preference", content });
|
|
339
|
+
const { stub, writes } = makeStorageStub([passport, publicPreference]);
|
|
340
|
+
|
|
341
|
+
const result = await runPatternReinforcement(stub, {
|
|
342
|
+
categories: ["preference"],
|
|
343
|
+
minCount: 2,
|
|
344
|
+
now: frozenNow,
|
|
345
|
+
});
|
|
346
|
+
|
|
347
|
+
assert.equal(result.clustersFound, 0);
|
|
348
|
+
assert.deepEqual(writes, []);
|
|
349
|
+
});
|
|
350
|
+
|
|
331
351
|
test("runPatternReinforcement: counts both active and already-superseded members; only writes to active duplicates", async () => {
|
|
332
352
|
const dupContent = "mixed status cluster";
|
|
333
353
|
const memories = [
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
import { clusterByKey } from "../procedural/reinforcement-core.js";
|
|
36
36
|
import { buildRetiredFactTombstoneInputs, type TombstoneReason, type TombstoneCreatedBy } from "../lifecycle/tombstones.js";
|
|
37
37
|
import { supersessionKeysForFact } from "../temporal-supersession.js";
|
|
38
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
38
39
|
import type {
|
|
39
40
|
MemoryFile,
|
|
40
41
|
MemoryFrontmatter,
|
|
@@ -225,7 +226,7 @@ export async function runPatternReinforcement(
|
|
|
225
226
|
return emptyResult();
|
|
226
227
|
}
|
|
227
228
|
|
|
228
|
-
const memories = await storage.readAllMemories();
|
|
229
|
+
const memories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
229
230
|
|
|
230
231
|
// Cluster across BOTH active and already-superseded memories so a
|
|
231
232
|
// canonical that has previously absorbed duplicates still gets
|
|
@@ -44,6 +44,7 @@ import {
|
|
|
44
44
|
} from "../memory-projection-format.js";
|
|
45
45
|
import { openBetterSqlite3 } from "../runtime/better-sqlite.js";
|
|
46
46
|
import { commitPreparedFileAtomically } from "./atomic-file.js";
|
|
47
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
47
48
|
|
|
48
49
|
export interface RebuildMemoryProjectionOptions {
|
|
49
50
|
memoryDir: string;
|
|
@@ -204,6 +205,7 @@ function toCurrentStateRow(memoryDir: string, memory: MemoryFile): MemoryProject
|
|
|
204
205
|
lastAccessed: memory.frontmatter.lastAccessed,
|
|
205
206
|
tags: normalizeProjectionTags(memory.frontmatter.tags),
|
|
206
207
|
preview: normalizeProjectionPreview(memory.content),
|
|
208
|
+
privateRecord: isSupportPassportPrivateMemory(memory),
|
|
207
209
|
};
|
|
208
210
|
}
|
|
209
211
|
|
|
@@ -406,6 +408,7 @@ function serializeCurrentStateRow(row: MemoryProjectionCurrentState): string {
|
|
|
406
408
|
lastAccessed: row.lastAccessed ?? null,
|
|
407
409
|
tags: row.tags ?? [],
|
|
408
410
|
preview: row.preview ?? "",
|
|
411
|
+
privateRecord: row.privateRecord === true,
|
|
409
412
|
});
|
|
410
413
|
}
|
|
411
414
|
|
|
@@ -691,8 +694,7 @@ function readProjectedCurrentRows(
|
|
|
691
694
|
memory_kind,
|
|
692
695
|
access_count,
|
|
693
696
|
last_accessed,
|
|
694
|
-
${selectExpressions.tagsJson},
|
|
695
|
-
${selectExpressions.previewText}
|
|
697
|
+
${selectExpressions.tagsJson}, ${selectExpressions.previewText}, ${selectExpressions.privateRecord}
|
|
696
698
|
FROM memory_current
|
|
697
699
|
`).all() as Array<Record<string, unknown>>;
|
|
698
700
|
|
|
@@ -788,9 +790,8 @@ function writeProjectionDb(
|
|
|
788
790
|
memory_kind,
|
|
789
791
|
access_count,
|
|
790
792
|
last_accessed,
|
|
791
|
-
tags_json,
|
|
792
|
-
|
|
793
|
-
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
793
|
+
tags_json, preview_text, private_record
|
|
794
|
+
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
|
794
795
|
`);
|
|
795
796
|
|
|
796
797
|
const insertTimeline = db.prepare(`
|
|
@@ -899,9 +900,8 @@ function writeProjectionDb(
|
|
|
899
900
|
row.confidenceTier,
|
|
900
901
|
row.memoryKind ?? null,
|
|
901
902
|
row.accessCount ?? null,
|
|
902
|
-
row.lastAccessed ?? null,
|
|
903
|
-
|
|
904
|
-
row.preview ?? "",
|
|
903
|
+
row.lastAccessed ?? null, JSON.stringify(row.tags ?? []), row.preview ?? "",
|
|
904
|
+
row.privateRecord === true ? 1 : 0,
|
|
905
905
|
);
|
|
906
906
|
}
|
|
907
907
|
|
|
@@ -20,12 +20,11 @@ import {
|
|
|
20
20
|
type BetterSqlite3Database,
|
|
21
21
|
} from "./runtime/better-sqlite.js";
|
|
22
22
|
|
|
23
|
-
export const MEMORY_PROJECTION_SCHEMA_VERSION =
|
|
23
|
+
export const MEMORY_PROJECTION_SCHEMA_VERSION = 4;
|
|
24
24
|
|
|
25
25
|
export interface ProjectedMemoryBrowseOptions {
|
|
26
|
-
query?: string;
|
|
27
|
-
|
|
28
|
-
category?: string;
|
|
26
|
+
query?: string; status?: string; category?: string;
|
|
27
|
+
excludeTags?: readonly string[]; excludePrivateRecords?: boolean;
|
|
29
28
|
sort?: "updated_desc" | "updated_asc" | "created_desc" | "created_asc";
|
|
30
29
|
limit: number;
|
|
31
30
|
offset: number;
|
|
@@ -154,15 +153,15 @@ function migrateProjectionSchemaIfNeeded(memoryDir: string): void {
|
|
|
154
153
|
}
|
|
155
154
|
|
|
156
155
|
export function memoryCurrentSelectExpressions(db: BetterSqlite3Database): {
|
|
157
|
-
tagsJson: string;
|
|
158
|
-
|
|
159
|
-
hasPathValid: boolean;
|
|
156
|
+
tagsJson: string; previewText: string; hasPathValid: boolean;
|
|
157
|
+
privateRecord: string; hasPrivateRecord: boolean;
|
|
160
158
|
} {
|
|
161
159
|
const columns = listTableColumns(db, "memory_current");
|
|
162
160
|
return {
|
|
163
161
|
tagsJson: columns.has("tags_json") ? "tags_json" : `'[]' AS tags_json`,
|
|
164
|
-
previewText: columns.has("preview_text") ? "preview_text" : `'' AS preview_text`,
|
|
165
|
-
|
|
162
|
+
previewText: columns.has("preview_text") ? "preview_text" : `'' AS preview_text`, hasPathValid: columns.has("path_valid"),
|
|
163
|
+
privateRecord: columns.has("private_record") ? "private_record" : "0 AS private_record",
|
|
164
|
+
hasPrivateRecord: columns.has("private_record"),
|
|
166
165
|
};
|
|
167
166
|
}
|
|
168
167
|
|
|
@@ -192,7 +191,8 @@ export function initializeMemoryProjectionDb(db: BetterSqlite3Database): void {
|
|
|
192
191
|
access_count INTEGER,
|
|
193
192
|
last_accessed TEXT,
|
|
194
193
|
tags_json TEXT NOT NULL DEFAULT '[]',
|
|
195
|
-
preview_text TEXT NOT NULL DEFAULT ''
|
|
194
|
+
preview_text TEXT NOT NULL DEFAULT '',
|
|
195
|
+
private_record INTEGER NOT NULL DEFAULT 0 CHECK (private_record IN (0, 1))
|
|
196
196
|
);
|
|
197
197
|
|
|
198
198
|
CREATE INDEX IF NOT EXISTS idx_memory_current_status
|
|
@@ -428,6 +428,7 @@ const REQUIRED_MEMORY_CURRENT_COLUMNS = [
|
|
|
428
428
|
"created_at",
|
|
429
429
|
"updated_at",
|
|
430
430
|
"entity_ref",
|
|
431
|
+
"private_record",
|
|
431
432
|
] as const;
|
|
432
433
|
|
|
433
434
|
function assertProjectionSchemaReadable(db: BetterSqlite3Database): void {
|
|
@@ -698,6 +699,7 @@ export function parseCurrentRow(
|
|
|
698
699
|
lastAccessed: typeof row.last_accessed === "string" ? row.last_accessed : undefined,
|
|
699
700
|
tags: parseStringArray(row.tags_json),
|
|
700
701
|
preview: typeof row.preview_text === "string" ? row.preview_text : "",
|
|
702
|
+
privateRecord: row.private_record === 1,
|
|
701
703
|
};
|
|
702
704
|
}
|
|
703
705
|
|
|
@@ -760,7 +762,8 @@ export function readProjectedMemoryState(
|
|
|
760
762
|
access_count,
|
|
761
763
|
last_accessed,
|
|
762
764
|
${currentSelect.tagsJson},
|
|
763
|
-
${currentSelect.previewText}
|
|
765
|
+
${currentSelect.previewText},
|
|
766
|
+
${currentSelect.privateRecord}
|
|
764
767
|
FROM memory_current
|
|
765
768
|
WHERE memory_id = ?
|
|
766
769
|
`,
|
|
@@ -820,38 +823,33 @@ export function readProjectedMemoryBrowse(
|
|
|
820
823
|
): ProjectedMemoryBrowsePage | null {
|
|
821
824
|
return withProjectionReadonly(memoryDir, (db) => {
|
|
822
825
|
const normalizedQuery = options.query?.trim().toLowerCase() ?? "";
|
|
823
|
-
|
|
824
826
|
const currentSelect = memoryCurrentSelectExpressions(db);
|
|
827
|
+
if ((options.excludeTags?.length ?? 0) > 0 && currentSelect.tagsJson.startsWith("'[]'"))
|
|
828
|
+
throw new Error("tag exclusions require tags_json");
|
|
829
|
+
if (options.excludePrivateRecords && !currentSelect.hasPrivateRecord)
|
|
830
|
+
throw new Error("private-record exclusions require private_record");
|
|
825
831
|
const whereClauses: string[] = [];
|
|
826
832
|
const params: unknown[] = [];
|
|
827
|
-
|
|
828
|
-
if (options.
|
|
829
|
-
|
|
830
|
-
|
|
833
|
+
if (options.status) { whereClauses.push("status = ?"); params.push(options.status); }
|
|
834
|
+
if (options.category) { whereClauses.push("category = ?"); params.push(options.category); }
|
|
835
|
+
for (const tag of options.excludeTags ?? []) {
|
|
836
|
+
whereClauses.push("NOT EXISTS (SELECT 1 FROM json_each(memory_current.tags_json) WHERE value = ?)");
|
|
837
|
+
params.push(tag);
|
|
831
838
|
}
|
|
832
|
-
if (options.
|
|
833
|
-
whereClauses.push("category = ?");
|
|
834
|
-
params.push(options.category);
|
|
835
|
-
}
|
|
836
|
-
const sort = options.sort ?? "updated_desc";
|
|
839
|
+
if (options.excludePrivateRecords) whereClauses.push("private_record = 0");
|
|
837
840
|
const orderBySql = (() => {
|
|
838
|
-
switch (sort) {
|
|
841
|
+
switch (options.sort ?? "updated_desc") {
|
|
839
842
|
case "updated_asc":
|
|
840
843
|
return "updated_at ASC, created_at ASC, memory_id ASC";
|
|
841
844
|
case "created_desc":
|
|
842
845
|
return "created_at DESC, updated_at DESC, memory_id ASC";
|
|
843
846
|
case "created_asc":
|
|
844
847
|
return "created_at ASC, updated_at ASC, memory_id ASC";
|
|
845
|
-
case "updated_desc":
|
|
846
848
|
default:
|
|
847
849
|
return "updated_at DESC, created_at DESC, memory_id ASC";
|
|
848
850
|
}
|
|
849
851
|
})();
|
|
850
|
-
const whereSql = whereClauses.length > 0 ? `WHERE ${whereClauses.join(" AND ")}` : "";
|
|
851
|
-
|
|
852
852
|
if (normalizedQuery) {
|
|
853
|
-
// Full-content search still examines every eligible row so totals and
|
|
854
|
-
// matches stay exact, but iteration keeps memory use proportional to the page.
|
|
855
853
|
const queryWhereClauses = currentSelect.hasPathValid
|
|
856
854
|
? [...whereClauses, ...projectedBrowsePathSqlClauses(), "path_valid = 1"]
|
|
857
855
|
: whereClauses;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { createReadStream } from "node:fs";
|
|
3
|
+
import { open } from "node:fs/promises";
|
|
4
|
+
import { MAGIC_HEADER_SIZE, isEncryptedFile } from "./secure-store/secure-fs.js";
|
|
5
|
+
|
|
6
|
+
export interface OfflineSyncFileTarget {
|
|
7
|
+
root: string;
|
|
8
|
+
path: string;
|
|
9
|
+
filePath: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export type OfflineSyncExcludeFile = (target: OfflineSyncFileTarget) => boolean | Promise<boolean>;
|
|
13
|
+
|
|
14
|
+
function throwIfAborted(signal: AbortSignal | undefined): void {
|
|
15
|
+
if (signal?.aborted) throw new Error("offline sync request aborted");
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export async function shouldExcludeOfflineSyncFile(
|
|
19
|
+
excludeFile: OfflineSyncExcludeFile | undefined,
|
|
20
|
+
target: OfflineSyncFileTarget
|
|
21
|
+
): Promise<boolean> {
|
|
22
|
+
return excludeFile ? await excludeFile(target) : false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export async function sha256OfflineSyncFile(
|
|
26
|
+
filePath: string,
|
|
27
|
+
signal?: AbortSignal
|
|
28
|
+
): Promise<{ sha256: string; bytes: number }> {
|
|
29
|
+
const hash = createHash("sha256");
|
|
30
|
+
let bytes = 0;
|
|
31
|
+
for await (const chunk of createReadStream(filePath)) {
|
|
32
|
+
throwIfAborted(signal);
|
|
33
|
+
const buffer = Buffer.isBuffer(chunk) ? chunk : Buffer.from(chunk);
|
|
34
|
+
hash.update(buffer);
|
|
35
|
+
bytes += buffer.length;
|
|
36
|
+
}
|
|
37
|
+
throwIfAborted(signal);
|
|
38
|
+
return { sha256: hash.digest("hex"), bytes };
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export async function isEncryptedOfflineSyncFile(filePath: string): Promise<boolean> {
|
|
42
|
+
const handle = await open(filePath, "r");
|
|
43
|
+
try {
|
|
44
|
+
const header = Buffer.alloc(MAGIC_HEADER_SIZE);
|
|
45
|
+
const { bytesRead } = await handle.read(header, 0, header.length, 0);
|
|
46
|
+
return bytesRead >= MAGIC_HEADER_SIZE && isEncryptedFile(header);
|
|
47
|
+
} finally {
|
|
48
|
+
await handle.close();
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function readPlainOfflineSyncFileChunk(options: {
|
|
53
|
+
filePath: string;
|
|
54
|
+
offset: number;
|
|
55
|
+
length: number;
|
|
56
|
+
bytes: number;
|
|
57
|
+
}): Promise<Buffer> {
|
|
58
|
+
const chunkBytes = Math.min(options.length, options.bytes - options.offset);
|
|
59
|
+
const chunk = Buffer.alloc(chunkBytes);
|
|
60
|
+
if (chunkBytes === 0) return chunk;
|
|
61
|
+
const handle = await open(options.filePath, "r");
|
|
62
|
+
try {
|
|
63
|
+
const { bytesRead } = await handle.read(chunk, 0, chunk.length, options.offset);
|
|
64
|
+
return bytesRead === chunk.length ? chunk : chunk.subarray(0, bytesRead);
|
|
65
|
+
} finally {
|
|
66
|
+
await handle.close();
|
|
67
|
+
}
|
|
68
|
+
}
|