@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/access-http.test.ts
CHANGED
|
@@ -4361,6 +4361,7 @@ test("HTTP memory search excludes artifacts and tops up to a full page", async (
|
|
|
4361
4361
|
authorizeScope: () => {},
|
|
4362
4362
|
namespacesEnabled: false,
|
|
4363
4363
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4364
|
+
filterPrivate: async (hits) => hits,
|
|
4364
4365
|
flatCorpus: async (limit) => {
|
|
4365
4366
|
seen.push(limit ?? -1);
|
|
4366
4367
|
return corpus.slice(0, limit);
|
|
@@ -4385,6 +4386,7 @@ test("HTTP memory search stops topping up when the corpus is exhausted", async (
|
|
|
4385
4386
|
authorizeScope: () => {},
|
|
4386
4387
|
namespacesEnabled: false,
|
|
4387
4388
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4389
|
+
filterPrivate: async (hits) => hits,
|
|
4388
4390
|
flatCorpus: async (limit) => {
|
|
4389
4391
|
seen.push(limit ?? -1);
|
|
4390
4392
|
return [{ path: "facts/only.md", score: 0.5, snippet: "only" }];
|
|
@@ -4407,6 +4409,7 @@ test("HTTP memory search omits maxResults when the caller named no budget", asyn
|
|
|
4407
4409
|
authorizeScope: () => {},
|
|
4408
4410
|
namespacesEnabled: false,
|
|
4409
4411
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4412
|
+
filterPrivate: async (hits) => hits,
|
|
4410
4413
|
flatCorpus: async (limit) => {
|
|
4411
4414
|
seen.push(limit);
|
|
4412
4415
|
const corpus = [
|
|
@@ -4448,6 +4451,7 @@ test("HTTP memory search keeps topping up past four excluded pages", async () =>
|
|
|
4448
4451
|
authorizeScope: () => {},
|
|
4449
4452
|
namespacesEnabled: false,
|
|
4450
4453
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4454
|
+
filterPrivate: async (hits) => hits,
|
|
4451
4455
|
flatCorpus: async (limit) => {
|
|
4452
4456
|
seen.push(limit);
|
|
4453
4457
|
return corpus.slice(0, limit);
|
|
@@ -4470,6 +4474,7 @@ test("HTTP memory search stops at the candidate ceiling", async () => {
|
|
|
4470
4474
|
authorizeScope: () => {},
|
|
4471
4475
|
namespacesEnabled: false,
|
|
4472
4476
|
isExcluded: () => true,
|
|
4477
|
+
filterPrivate: async (hits) => hits,
|
|
4473
4478
|
flatCorpus: async (limit) => {
|
|
4474
4479
|
seen.push(limit);
|
|
4475
4480
|
return Array.from({ length: limit ?? 0 }, (_, index) => ({
|
|
@@ -4500,6 +4505,7 @@ test("HTTP memory search scales its ceiling above a large requested budget", asy
|
|
|
4500
4505
|
authorizeScope: () => {},
|
|
4501
4506
|
namespacesEnabled: false,
|
|
4502
4507
|
isExcluded: (memoryPath) => memoryPath === "artifacts/a.md",
|
|
4508
|
+
filterPrivate: async (hits) => hits,
|
|
4503
4509
|
flatCorpus: async (limit) => {
|
|
4504
4510
|
seen.push(limit);
|
|
4505
4511
|
const size = limit ?? 0;
|
|
@@ -4531,6 +4537,7 @@ test("HTTP memory search keeps the backend page size when no limit is named", as
|
|
|
4531
4537
|
authorizeScope: () => {},
|
|
4532
4538
|
namespacesEnabled: false,
|
|
4533
4539
|
isExcluded: () => false,
|
|
4540
|
+
filterPrivate: async (hits) => hits,
|
|
4534
4541
|
flatCorpus: async (limit) => {
|
|
4535
4542
|
seen.push(limit);
|
|
4536
4543
|
const size = limit ?? 6;
|
|
@@ -4558,6 +4565,7 @@ test("HTTP memory search still tops up a thinned default page", async () => {
|
|
|
4558
4565
|
authorizeScope: () => {},
|
|
4559
4566
|
namespacesEnabled: false,
|
|
4560
4567
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4568
|
+
filterPrivate: async (hits) => hits,
|
|
4561
4569
|
flatCorpus: async (limit) => {
|
|
4562
4570
|
seen.push(limit);
|
|
4563
4571
|
const size = limit ?? 6;
|
|
@@ -4605,6 +4613,7 @@ test("search keeps archived memories but still excludes the dedicated surfaces",
|
|
|
4605
4613
|
authorizeScope: () => {},
|
|
4606
4614
|
namespacesEnabled: false,
|
|
4607
4615
|
isExcluded: (memoryPath) => isSearchExcludedPath(memoryPath),
|
|
4616
|
+
filterPrivate: async (hits) => hits,
|
|
4608
4617
|
flatCorpus: async () => [
|
|
4609
4618
|
{ path: "archive/2026-01/fact-1.md", score: 0.9, snippet: "archived" },
|
|
4610
4619
|
{ path: "artifacts/report.md", score: 0.8, snippet: "artifact" },
|
|
@@ -4709,6 +4718,7 @@ test("search keeps paging while the backend page is full of excluded hits", asyn
|
|
|
4709
4718
|
limits.push(limit);
|
|
4710
4719
|
return corpus.slice(0, limit ?? corpus.length);
|
|
4711
4720
|
},
|
|
4721
|
+
filterPrivate: async (hits) => hits,
|
|
4712
4722
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4713
4723
|
});
|
|
4714
4724
|
assert.equal(results.length, 50, "the memories behind the excluded block are returned");
|
|
@@ -4719,6 +4729,26 @@ test("search keeps paging while the backend page is full of excluded hits", asyn
|
|
|
4719
4729
|
);
|
|
4720
4730
|
});
|
|
4721
4731
|
|
|
4732
|
+
test("search removes excluded paths before private-memory resolution", async () => {
|
|
4733
|
+
const { searchWithGenericExclusion } = await import("./access-memory-search-fanout.js");
|
|
4734
|
+
const resolved: string[] = [];
|
|
4735
|
+
const results = await searchWithGenericExclusion({
|
|
4736
|
+
budget: 1,
|
|
4737
|
+
sendInitialLimit: true,
|
|
4738
|
+
search: async () => [
|
|
4739
|
+
{ path: "artifacts/private.md" },
|
|
4740
|
+
{ path: "facts/visible.md" },
|
|
4741
|
+
],
|
|
4742
|
+
filterPrivate: async (hits) => {
|
|
4743
|
+
resolved.push(...hits.map((hit) => hit.path));
|
|
4744
|
+
return hits;
|
|
4745
|
+
},
|
|
4746
|
+
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4747
|
+
});
|
|
4748
|
+
assert.deepEqual(resolved, ["facts/visible.md"]);
|
|
4749
|
+
assert.deepEqual(results, [{ path: "facts/visible.md" }]);
|
|
4750
|
+
});
|
|
4751
|
+
|
|
4722
4752
|
test("a budget above the backend cap still gets the rows it asked for", async () => {
|
|
4723
4753
|
// The cap protects the backend from an unbounded walk; it must never sit
|
|
4724
4754
|
// BELOW an explicit request, or a large search returns a short page for a
|
|
@@ -4732,6 +4762,7 @@ test("a budget above the backend cap still gets the rows it asked for", async ()
|
|
|
4732
4762
|
budget: 30_000,
|
|
4733
4763
|
sendInitialLimit: true,
|
|
4734
4764
|
search: async (limit) => corpus.slice(0, limit ?? corpus.length),
|
|
4765
|
+
filterPrivate: async (hits) => hits,
|
|
4735
4766
|
isExcluded: (memoryPath) => memoryPath.startsWith("artifacts/"),
|
|
4736
4767
|
});
|
|
4737
4768
|
assert.equal(results.length, 30_000, "the excluded hit was replaced, not subtracted");
|
|
@@ -299,6 +299,7 @@ export async function searchWithGenericExclusion<TResult extends { path: string
|
|
|
299
299
|
*/
|
|
300
300
|
sendInitialLimit: boolean;
|
|
301
301
|
search(limit: number | undefined): Promise<TResult[]>;
|
|
302
|
+
filterPrivate(results: TResult[]): Promise<TResult[]>;
|
|
302
303
|
isExcluded(memoryPath: string): boolean;
|
|
303
304
|
}): Promise<TResult[]> {
|
|
304
305
|
const { budget } = options;
|
|
@@ -313,7 +314,8 @@ export async function searchWithGenericExclusion<TResult extends { path: string
|
|
|
313
314
|
let firstPage = true;
|
|
314
315
|
for (;;) {
|
|
315
316
|
const raw = await options.search(limit);
|
|
316
|
-
|
|
317
|
+
const eligible = raw.filter((hit) => !options.isExcluded(hit.path));
|
|
318
|
+
results = await options.filterPrivate(eligible);
|
|
317
319
|
if (firstPage) {
|
|
318
320
|
firstPage = false;
|
|
319
321
|
if (!options.sendInitialLimit) target = Math.min(budget, raw.length);
|
|
@@ -358,6 +360,9 @@ export async function runScopedMemorySearch(options: {
|
|
|
358
360
|
mode?: "search" | "hybrid" | "bm25" | "vector";
|
|
359
361
|
namespacesEnabled: boolean;
|
|
360
362
|
isExcluded(memoryPath: string): boolean;
|
|
363
|
+
filterPrivate(
|
|
364
|
+
results: Array<{ path: string; score: number; snippet?: string }>,
|
|
365
|
+
): Promise<Array<{ path: string; score: number; snippet?: string }>>;
|
|
361
366
|
flatCorpus(
|
|
362
367
|
limit: number | undefined,
|
|
363
368
|
): Promise<Array<{ path: string; score: number; snippet?: string }>>;
|
|
@@ -370,6 +375,7 @@ export async function runScopedMemorySearch(options: {
|
|
|
370
375
|
budget: options.budget,
|
|
371
376
|
sendInitialLimit: options.sendInitialLimit,
|
|
372
377
|
isExcluded: options.isExcluded,
|
|
378
|
+
filterPrivate: options.filterPrivate,
|
|
373
379
|
search: (limit) =>
|
|
374
380
|
options.namespacesEnabled ? options.namespaced(limit) : options.flatCorpus(limit),
|
|
375
381
|
});
|
|
@@ -384,7 +390,14 @@ export async function runScopedMemorySearch(options: {
|
|
|
384
390
|
export interface ScopedMemorySearchDeps {
|
|
385
391
|
namespacesEnabled: boolean;
|
|
386
392
|
defaultBudget: number;
|
|
393
|
+
memoryCollections: readonly string[];
|
|
387
394
|
isExcluded(memoryPath: string): boolean;
|
|
395
|
+
filterPrivate(
|
|
396
|
+
results: Array<{ path: string; score: number; snippet?: string }>,
|
|
397
|
+
namespaces: readonly string[],
|
|
398
|
+
preserveUnresolved?: boolean,
|
|
399
|
+
visibilityCache?: Map<string, boolean>,
|
|
400
|
+
): Promise<Array<{ path: string; score: number; snippet?: string }>>;
|
|
388
401
|
/** Flat-corpus authorization; throws when the namespace is unreadable. */
|
|
389
402
|
authorizeFlatCorpus(namespace: string | undefined, principal: string | undefined): void;
|
|
390
403
|
/** Namespace-aware authorization; throws, else returns the search fan-out. */
|
|
@@ -437,10 +450,20 @@ export async function memorySearchThroughScope(
|
|
|
437
450
|
throw new EngramAccessInputError("collection must be a non-empty string");
|
|
438
451
|
}
|
|
439
452
|
let searchNamespaces: string[] = [];
|
|
453
|
+
const privateVisibilityCache = new Map<string, boolean>();
|
|
440
454
|
const results = await runScopedMemorySearch({
|
|
441
455
|
query, collection, mode,
|
|
442
456
|
namespacesEnabled: deps.namespacesEnabled,
|
|
443
457
|
isExcluded: deps.isExcluded,
|
|
458
|
+
filterPrivate: (results) => deps.filterPrivate(
|
|
459
|
+
results,
|
|
460
|
+
searchNamespaces,
|
|
461
|
+
!deps.namespacesEnabled &&
|
|
462
|
+
collection !== undefined &&
|
|
463
|
+
collection !== "global" &&
|
|
464
|
+
!deps.memoryCollections.includes(collection),
|
|
465
|
+
privateVisibilityCache,
|
|
466
|
+
),
|
|
444
467
|
budget: maxResults ?? deps.defaultBudget,
|
|
445
468
|
sendInitialLimit: maxResults !== undefined,
|
|
446
469
|
authorizeScope: async () => {
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
type ReconcileManifestFile,
|
|
11
11
|
type ReconcileMemoryParser,
|
|
12
12
|
} from "./reconcile/manifest.js";
|
|
13
|
+
import { isSupportPassportPrivateMemory } from "./support-passport/card-projection.js";
|
|
13
14
|
|
|
14
15
|
export interface OfflineSyncManifestRequest {
|
|
15
16
|
includeTranscripts?: boolean;
|
|
@@ -36,6 +37,10 @@ export async function createOfflineSyncManifestStream(
|
|
|
36
37
|
readFileDigest: async ({ filePath }) => storage.digestOfflineSyncFile(filePath),
|
|
37
38
|
signal: options.signal,
|
|
38
39
|
userExcludeRegexps,
|
|
40
|
+
excludeFile: async ({ filePath }) => {
|
|
41
|
+
const memory = await storage.readMemoryByPath(filePath);
|
|
42
|
+
return memory ? isSupportPassportPrivateMemory(memory) : false;
|
|
43
|
+
},
|
|
39
44
|
});
|
|
40
45
|
return {
|
|
41
46
|
namespace,
|
|
@@ -71,6 +71,9 @@ function makeService(): {
|
|
|
71
71
|
maxResults?: number;
|
|
72
72
|
mode?: string;
|
|
73
73
|
}): Promise<unknown[]>;
|
|
74
|
+
filterPrivateSearchResults(
|
|
75
|
+
results: Array<{ path: string; score: number; snippet?: string }>,
|
|
76
|
+
): Promise<Array<{ path: string; score: number; snippet?: string }>>;
|
|
74
77
|
};
|
|
75
78
|
}).orchestrator = {
|
|
76
79
|
config: makeConfig(),
|
|
@@ -92,6 +95,9 @@ function makeService(): {
|
|
|
92
95
|
async searchAcrossNamespaces() {
|
|
93
96
|
return [];
|
|
94
97
|
},
|
|
98
|
+
async filterPrivateSearchResults(results) {
|
|
99
|
+
return results;
|
|
100
|
+
},
|
|
95
101
|
};
|
|
96
102
|
|
|
97
103
|
return { service, storage, getStorageCalls };
|
|
@@ -1343,6 +1349,9 @@ test("offlineSyncSnapshot does not trust client base capture time for server fas
|
|
|
1343
1349
|
async readDeletionRevisions() {
|
|
1344
1350
|
return new Map<string, number>();
|
|
1345
1351
|
},
|
|
1352
|
+
async readMemoryByPath() {
|
|
1353
|
+
return null;
|
|
1354
|
+
},
|
|
1346
1355
|
async readOfflineSyncFile(targetPath: string) {
|
|
1347
1356
|
return readFile(targetPath);
|
|
1348
1357
|
},
|
|
@@ -1410,6 +1419,9 @@ test("offlineSyncSnapshot drains pending recall-impression spills so a recorded
|
|
|
1410
1419
|
async readDeletionRevisions() {
|
|
1411
1420
|
return new Map<string, number>();
|
|
1412
1421
|
},
|
|
1422
|
+
async readMemoryByPath() {
|
|
1423
|
+
return null;
|
|
1424
|
+
},
|
|
1413
1425
|
async readOfflineSyncFile(targetPath: string) {
|
|
1414
1426
|
return readFile(targetPath);
|
|
1415
1427
|
},
|
|
@@ -1688,6 +1700,7 @@ function makeServiceWithConfig(config: PluginConfig): {
|
|
|
1688
1700
|
mode?: string;
|
|
1689
1701
|
execution?: unknown;
|
|
1690
1702
|
}): Promise<unknown[]>;
|
|
1703
|
+
filterPrivateSearchResults(results: unknown[]): Promise<unknown[]>;
|
|
1691
1704
|
};
|
|
1692
1705
|
const orchestrator: OrchLike = {
|
|
1693
1706
|
config,
|
|
@@ -1701,6 +1714,7 @@ function makeServiceWithConfig(config: PluginConfig): {
|
|
|
1701
1714
|
captured.execution = params.execution;
|
|
1702
1715
|
return [];
|
|
1703
1716
|
},
|
|
1717
|
+
async filterPrivateSearchResults(results) { return results; },
|
|
1704
1718
|
};
|
|
1705
1719
|
(service as unknown as { orchestrator: OrchLike }).orchestrator = orchestrator;
|
|
1706
1720
|
return { service, captured };
|
|
@@ -1140,6 +1140,7 @@ test("#1501 implicit memorySearch honors active scope profile readOrder", async
|
|
|
1140
1140
|
config,
|
|
1141
1141
|
qmd: { isAvailable: () => true },
|
|
1142
1142
|
getStorage: async () => ({ dir: config.memoryDir } as StorageManager),
|
|
1143
|
+
filterPrivateSearchResults: async (results: unknown[]) => results,
|
|
1143
1144
|
searchAcrossNamespaces: async (options: { namespaces: string[] }) => {
|
|
1144
1145
|
searchedNamespaces = options.namespaces;
|
|
1145
1146
|
return [];
|
|
@@ -1193,6 +1194,7 @@ test("#1501 memorySearch collection names stay constrained to active scope profi
|
|
|
1193
1194
|
config,
|
|
1194
1195
|
qmd: { isAvailable: () => true },
|
|
1195
1196
|
getStorage: async () => ({ dir: config.memoryDir } as StorageManager),
|
|
1197
|
+
filterPrivateSearchResults: async (results: unknown[]) => results,
|
|
1196
1198
|
searchAcrossNamespaces: async (options: { namespaces: string[] }) => {
|
|
1197
1199
|
searchedNamespaces = options.namespaces;
|
|
1198
1200
|
return [];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
+
import { createHash } from "node:crypto";
|
|
2
3
|
import { mkdir, mkdtemp, readFile, rm, writeFile } from "node:fs/promises";
|
|
3
4
|
import os from "node:os";
|
|
4
5
|
import path from "node:path";
|
|
@@ -85,6 +86,24 @@ function memoryFile(options: {
|
|
|
85
86
|
].join("\n");
|
|
86
87
|
}
|
|
87
88
|
|
|
89
|
+
function supportPassportFile(options: { id: string; includeTag?: boolean }): string {
|
|
90
|
+
return [
|
|
91
|
+
"---",
|
|
92
|
+
`id: ${options.id}`,
|
|
93
|
+
"category: preference",
|
|
94
|
+
...(options.includeTag === false ? [] : ["tags: [support-passport-card]"]),
|
|
95
|
+
`structuredAttributes: ${JSON.stringify({ "support-passport-owner": "a".repeat(64) })}`,
|
|
96
|
+
"created: 2026-08-13T00:00:00.000Z",
|
|
97
|
+
"updated: 2026-08-13T00:00:00.000Z",
|
|
98
|
+
"---",
|
|
99
|
+
"Private support statement",
|
|
100
|
+
].join("\n");
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function sha256(content: Buffer): string {
|
|
104
|
+
return createHash("sha256").update(content).digest("hex");
|
|
105
|
+
}
|
|
106
|
+
|
|
88
107
|
function createManifestService(options: {
|
|
89
108
|
root: string;
|
|
90
109
|
storage: StorageManager;
|
|
@@ -304,6 +323,198 @@ test("offline file-transfer endpoints reject internal Remnic state paths", async
|
|
|
304
323
|
}
|
|
305
324
|
});
|
|
306
325
|
|
|
326
|
+
test("offline read surfaces exclude support-passport private records", async () => {
|
|
327
|
+
const root = await mkdtemp(path.join(os.tmpdir(), "remnic-access-private-sync-"));
|
|
328
|
+
try {
|
|
329
|
+
const storage = new StorageManager(root);
|
|
330
|
+
await storage.ensureDirectories();
|
|
331
|
+
const privatePath = path.join(root, "preferences", "2026-08-13", "passport.md");
|
|
332
|
+
const publicPath = path.join(root, "facts", "2026-08-13", "public.md");
|
|
333
|
+
const localStatePath = path.join(root, "state", "lcm.sqlite");
|
|
334
|
+
await mkdir(path.dirname(privatePath), { recursive: true });
|
|
335
|
+
await mkdir(path.dirname(publicPath), { recursive: true });
|
|
336
|
+
await mkdir(path.dirname(localStatePath), { recursive: true });
|
|
337
|
+
await writeFile(privatePath, supportPassportFile({ id: "passport" }));
|
|
338
|
+
await writeFile(publicPath, memoryFile({ id: "public", body: "Public fact", status: "active" }));
|
|
339
|
+
await writeFile(localStatePath, "node-local state");
|
|
340
|
+
const { service } = createManifestService({ root, storage });
|
|
341
|
+
|
|
342
|
+
const snapshot = await service.offlineSyncSnapshot({ includeContent: true });
|
|
343
|
+
assert.equal(snapshot.files.some((file) => file.path === "facts/2026-08-13/public.md"), true);
|
|
344
|
+
assert.equal(snapshot.files.some((file) => file.path.includes("passport.md")), false);
|
|
345
|
+
const stream = await service.offlineSyncSnapshotStream({ includeContent: true });
|
|
346
|
+
const streamed = [];
|
|
347
|
+
for await (const file of stream.files) streamed.push(file.path);
|
|
348
|
+
assert.equal(streamed.includes("facts/2026-08-13/public.md"), true);
|
|
349
|
+
assert.equal(streamed.some((file) => file.includes("passport.md")), false);
|
|
350
|
+
const manifest = await service.offlineSyncManifestStream();
|
|
351
|
+
const manifested = [];
|
|
352
|
+
for await (const file of manifest.files) manifested.push(file.path);
|
|
353
|
+
assert.equal(manifested.includes("facts/2026-08-13/public.md"), true);
|
|
354
|
+
assert.equal(manifested.some((file) => file.includes("passport.md")), false);
|
|
355
|
+
await assert.rejects(
|
|
356
|
+
() => service.offlineSyncFiles({ paths: ["preferences/2026-08-13/passport.md"] }),
|
|
357
|
+
(error) => error instanceof EngramAccessInputError && /path is excluded/.test(error.message),
|
|
358
|
+
);
|
|
359
|
+
await assert.rejects(
|
|
360
|
+
() => service.offlineSyncFileContent({
|
|
361
|
+
path: "preferences/2026-08-13/passport.md",
|
|
362
|
+
offset: 0,
|
|
363
|
+
length: 10,
|
|
364
|
+
}),
|
|
365
|
+
(error) => error instanceof EngramAccessInputError && /path is excluded/.test(error.message),
|
|
366
|
+
);
|
|
367
|
+
const applyResult = await service.offlineSyncApply({
|
|
368
|
+
changeset: {
|
|
369
|
+
format: OFFLINE_SYNC_CHANGESET_FORMAT,
|
|
370
|
+
schemaVersion: 1,
|
|
371
|
+
createdAt: new Date().toISOString(),
|
|
372
|
+
sourceId: "peer",
|
|
373
|
+
includeTranscripts: true,
|
|
374
|
+
changes: [],
|
|
375
|
+
},
|
|
376
|
+
});
|
|
377
|
+
assert.equal(applyResult.currentFiles.some((file) => file.path === "facts/2026-08-13/public.md"), true);
|
|
378
|
+
assert.equal(applyResult.currentFiles.some((file) => file.path === "state/lcm.sqlite"), true);
|
|
379
|
+
assert.equal(applyResult.currentFiles.some((file) => file.path.includes("passport.md")), false);
|
|
380
|
+
} finally {
|
|
381
|
+
await rm(root, { recursive: true, force: true });
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
|
|
385
|
+
test("offline apply routes reject existing support-passport private records", async () => {
|
|
386
|
+
const root = await mkdtemp(path.join(os.tmpdir(), "remnic-access-private-apply-target-"));
|
|
387
|
+
try {
|
|
388
|
+
const storage = new StorageManager(root);
|
|
389
|
+
await storage.ensureDirectories();
|
|
390
|
+
const relativePath = "preferences/2026-08-13/passport.md";
|
|
391
|
+
const targetPath = path.join(root, relativePath);
|
|
392
|
+
const original = Buffer.from(supportPassportFile({ id: "passport", includeTag: false }));
|
|
393
|
+
await mkdir(path.dirname(targetPath), { recursive: true });
|
|
394
|
+
await writeFile(targetPath, original);
|
|
395
|
+
const { service } = createManifestService({ root, storage });
|
|
396
|
+
const replacement = Buffer.from(memoryFile({ id: "public", body: "Replacement", status: "active" }));
|
|
397
|
+
|
|
398
|
+
await assert.rejects(
|
|
399
|
+
() => service.offlineSyncApplyFileContent({
|
|
400
|
+
sourceId: "peer",
|
|
401
|
+
path: relativePath,
|
|
402
|
+
sha256: sha256(replacement),
|
|
403
|
+
bytes: replacement.length,
|
|
404
|
+
mtimeMs: 0,
|
|
405
|
+
offset: 0,
|
|
406
|
+
baseSha256: sha256(original),
|
|
407
|
+
content: replacement,
|
|
408
|
+
}),
|
|
409
|
+
(error) => error instanceof EngramAccessInputError && /private support-passport record/.test(error.message),
|
|
410
|
+
);
|
|
411
|
+
await assert.rejects(
|
|
412
|
+
() => service.offlineSyncApply({
|
|
413
|
+
returnCurrentFiles: false,
|
|
414
|
+
changeset: {
|
|
415
|
+
format: OFFLINE_SYNC_CHANGESET_FORMAT,
|
|
416
|
+
schemaVersion: 1,
|
|
417
|
+
createdAt: new Date().toISOString(),
|
|
418
|
+
sourceId: "peer",
|
|
419
|
+
includeTranscripts: true,
|
|
420
|
+
changes: [{
|
|
421
|
+
type: "delete",
|
|
422
|
+
path: relativePath,
|
|
423
|
+
baseSha256: sha256(original),
|
|
424
|
+
}],
|
|
425
|
+
},
|
|
426
|
+
}),
|
|
427
|
+
(error) => error instanceof EngramAccessInputError && /private support-passport record/.test(error.message),
|
|
428
|
+
);
|
|
429
|
+
assert.deepEqual(await readFile(targetPath), original);
|
|
430
|
+
} finally {
|
|
431
|
+
await rm(root, { recursive: true, force: true });
|
|
432
|
+
}
|
|
433
|
+
});
|
|
434
|
+
|
|
435
|
+
test("offline apply routes reject forged support-passport metadata and allow public records", async () => {
|
|
436
|
+
const root = await mkdtemp(path.join(os.tmpdir(), "remnic-access-private-apply-content-"));
|
|
437
|
+
try {
|
|
438
|
+
const storage = new StorageManager(root);
|
|
439
|
+
await storage.ensureDirectories();
|
|
440
|
+
const { service } = createManifestService({ root, storage });
|
|
441
|
+
const forgedPath = "preferences/2026-08-13/forged.md";
|
|
442
|
+
const forged = Buffer.from(supportPassportFile({ id: "forged", includeTag: false }));
|
|
443
|
+
const splitAt = forged.indexOf("support-passport-owner") + 8;
|
|
444
|
+
|
|
445
|
+
const first = await service.offlineSyncApplyFileContent({
|
|
446
|
+
sourceId: "peer",
|
|
447
|
+
path: forgedPath,
|
|
448
|
+
sha256: sha256(forged),
|
|
449
|
+
bytes: forged.length,
|
|
450
|
+
mtimeMs: 0,
|
|
451
|
+
offset: 0,
|
|
452
|
+
content: forged.subarray(0, splitAt),
|
|
453
|
+
});
|
|
454
|
+
assert.equal(first.applied, false);
|
|
455
|
+
assert.equal(first.done, false);
|
|
456
|
+
await assert.rejects(
|
|
457
|
+
() => service.offlineSyncApplyFileContent({
|
|
458
|
+
sourceId: "peer",
|
|
459
|
+
path: forgedPath,
|
|
460
|
+
sha256: sha256(forged),
|
|
461
|
+
bytes: forged.length,
|
|
462
|
+
mtimeMs: 0,
|
|
463
|
+
offset: splitAt,
|
|
464
|
+
content: forged.subarray(splitAt),
|
|
465
|
+
}),
|
|
466
|
+
(error) => error instanceof EngramAccessInputError && /private support-passport record/.test(error.message),
|
|
467
|
+
);
|
|
468
|
+
await assert.rejects(() => readFile(path.join(root, forgedPath)));
|
|
469
|
+
|
|
470
|
+
const changesetPath = "preferences/2026-08-13/forged-changeset.md";
|
|
471
|
+
await assert.rejects(
|
|
472
|
+
() => service.offlineSyncApply({
|
|
473
|
+
returnCurrentFiles: false,
|
|
474
|
+
changeset: {
|
|
475
|
+
format: OFFLINE_SYNC_CHANGESET_FORMAT,
|
|
476
|
+
schemaVersion: 1,
|
|
477
|
+
createdAt: new Date().toISOString(),
|
|
478
|
+
sourceId: "peer",
|
|
479
|
+
includeTranscripts: true,
|
|
480
|
+
changes: [{
|
|
481
|
+
type: "upsert",
|
|
482
|
+
path: changesetPath,
|
|
483
|
+
file: {
|
|
484
|
+
path: changesetPath,
|
|
485
|
+
sha256: sha256(forged),
|
|
486
|
+
bytes: forged.length,
|
|
487
|
+
mtimeMs: 0,
|
|
488
|
+
contentBase64: forged.toString("base64"),
|
|
489
|
+
},
|
|
490
|
+
}],
|
|
491
|
+
},
|
|
492
|
+
}),
|
|
493
|
+
(error) => error instanceof EngramAccessInputError && /private support-passport record/.test(error.message),
|
|
494
|
+
);
|
|
495
|
+
|
|
496
|
+
const publicPath = "facts/2026-08-13/public-sync.md";
|
|
497
|
+
const publicContent = Buffer.from(memoryFile({
|
|
498
|
+
id: "public-sync",
|
|
499
|
+
body: "The body can mention support-passport-owner without becoming private.",
|
|
500
|
+
status: "active",
|
|
501
|
+
}));
|
|
502
|
+
const publicResult = await service.offlineSyncApplyFileContent({
|
|
503
|
+
sourceId: "peer",
|
|
504
|
+
path: publicPath,
|
|
505
|
+
sha256: sha256(publicContent),
|
|
506
|
+
bytes: publicContent.length,
|
|
507
|
+
mtimeMs: 0,
|
|
508
|
+
offset: 0,
|
|
509
|
+
content: publicContent,
|
|
510
|
+
});
|
|
511
|
+
assert.equal(publicResult.applied, true);
|
|
512
|
+
assert.deepEqual(await storage.readOfflineSyncFile(path.join(root, publicPath)), publicContent);
|
|
513
|
+
} finally {
|
|
514
|
+
await rm(root, { recursive: true, force: true });
|
|
515
|
+
}
|
|
516
|
+
});
|
|
517
|
+
|
|
307
518
|
test("offline apply-file-content reports invalid metadata as input errors", async () => {
|
|
308
519
|
const service = createOfflineService();
|
|
309
520
|
await assert.rejects(
|