@remnic/core 9.54.4 → 9.54.6
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 +24 -23
- package/dist/access-admin-ops-surface.js +55 -50
- package/dist/access-authorization-probe.d.ts +25 -22
- package/dist/access-authorization-probe.js +58 -51
- package/dist/access-boundary.d.ts +26 -23
- package/dist/access-boundary.js +59 -52
- package/dist/access-cli.js +115 -107
- 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 +19 -18
- package/dist/access-extraction-force-flush.js +55 -50
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +22 -21
- package/dist/access-http-lifecycle-flush.d.ts +22 -21
- package/dist/access-http-offline-stream.d.ts +19 -18
- package/dist/access-http-query.js +55 -50
- package/dist/access-http.d.ts +55 -36
- package/dist/access-http.js +76 -65
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +55 -50
- package/dist/access-lcm-surface.d.ts +21 -20
- package/dist/access-lcm-surface.js +55 -50
- package/dist/access-mcp.d.ts +22 -21
- package/dist/access-mcp.js +63 -57
- 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-CCNn_6NE.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +55 -50
- package/dist/access-observe-write-surface.d.ts +22 -21
- package/dist/access-observe-write-surface.js +55 -50
- package/dist/access-offline-manifest.d.ts +10 -9
- package/dist/access-offline-manifest.js +12 -10
- package/dist/access-operations-batch.js +57 -52
- package/dist/access-operations.d.ts +23 -22
- package/dist/access-operations.js +61 -55
- package/dist/access-recall-concurrency.d.ts +21 -20
- package/dist/access-recall-concurrency.js +55 -50
- package/dist/access-recall-response.d.ts +19 -18
- package/dist/access-recall-response.js +55 -50
- package/dist/access-recall-surface.d.ts +19 -18
- package/dist/access-recall-surface.js +55 -50
- package/dist/access-schema.d.ts +2 -2
- package/dist/access-schema.js +5 -4
- package/dist/{access-service-CXvbxLK-.d.ts → access-service-DkSdXK4S.d.ts} +1314 -83
- package/dist/access-service-helpers.d.ts +22 -21
- package/dist/access-service.d.ts +31 -30
- package/dist/access-service.js +55 -50
- package/dist/access-surface-catalog.d.ts +22 -21
- package/dist/access-surface-catalog.js +209 -2
- package/dist/access-surface-catalog.js.map +1 -1
- 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 +14 -1
- package/dist/active-memory-bridge.js +6 -1
- package/dist/active-recall.d.ts +1 -1
- package/dist/active-recall.js +4 -2
- package/dist/active-recall.js.map +1 -1
- package/dist/adapters/index.js +7 -7
- package/dist/adapters/registry.js +3 -3
- package/dist/admin-console/public/what-helps-me/app.js +1594 -0
- package/dist/admin-console/public/what-helps-me/index.html +339 -0
- package/dist/admin-console/public/what-helps-me/model.js +685 -0
- package/dist/admin-console/public/what-helps-me/what-helps-me.css +1296 -0
- package/dist/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-TDHLZPVP.js → auto-sync-NR3GPCOA.js} +4 -4
- 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 +33 -12
- 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/calibration.js +1 -1
- package/dist/capabilities.d.ts +1 -1
- package/dist/{catalog-BOOxl-I2.d.ts → catalog-DGFf8mD9.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 +34 -13
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/{chunk-ZYLC7NFO.js → chunk-26ZXBTYN.js} +4 -4
- package/dist/chunk-26ZXBTYN.js.map +1 -0
- package/dist/{chunk-LLJMAULE.js → chunk-2FKEIPIT.js} +5 -5
- package/dist/{chunk-3CSX3ETE.js → chunk-2LWQSV6A.js} +23 -11
- package/dist/chunk-2LWQSV6A.js.map +1 -0
- package/dist/{chunk-JBPKEARU.js → chunk-2QSZNTDO.js} +7 -7
- package/dist/chunk-37DZZFFM.js +502 -0
- package/dist/chunk-37DZZFFM.js.map +1 -0
- package/dist/chunk-3HSRWJTC.js +9 -0
- package/dist/chunk-3HSRWJTC.js.map +1 -0
- package/dist/{chunk-XUAMCLY4.js → chunk-3TIZPSJC.js} +17 -13
- package/dist/chunk-3TIZPSJC.js.map +1 -0
- package/dist/{chunk-PDDTI7IC.js → chunk-43SEBY2M.js} +1 -1
- package/dist/{chunk-HWRD23DW.js → chunk-46SZBVDS.js} +3 -3
- package/dist/{chunk-6HPHEFXT.js → chunk-5FD7JMTX.js} +2 -2
- package/dist/{chunk-7BZOBA5J.js → chunk-5NB726GV.js} +70 -16
- package/dist/chunk-5NB726GV.js.map +1 -0
- package/dist/chunk-62OKGIJA.js +39 -0
- package/dist/chunk-62OKGIJA.js.map +1 -0
- package/dist/{chunk-IBKR2TFR.js → chunk-6CYHUWCO.js} +2 -2
- package/dist/{chunk-YN6ASZUG.js → chunk-6QPI2ITJ.js} +5 -5
- package/dist/{chunk-UU3G6GUP.js → chunk-76JJSXK7.js} +1 -1
- package/dist/chunk-76JJSXK7.js.map +1 -0
- package/dist/{chunk-PX2LSHYM.js → chunk-7BD6O7ZV.js} +189 -4
- package/dist/chunk-7BD6O7ZV.js.map +1 -0
- package/dist/chunk-7TBXNYLO.js +346 -0
- package/dist/chunk-7TBXNYLO.js.map +1 -0
- package/dist/{chunk-NH5IR2WM.js → chunk-BRR5EUTF.js} +6 -2
- package/dist/chunk-BRR5EUTF.js.map +1 -0
- package/dist/{chunk-NIS256NW.js → chunk-CIAI24TQ.js} +3 -3
- package/dist/{chunk-T2JHZWH6.js → chunk-D3LBIUWV.js} +11703 -7573
- package/dist/chunk-D3LBIUWV.js.map +1 -0
- package/dist/{chunk-7FGL6CGA.js → chunk-DVYRD4HY.js} +2 -2
- package/dist/{chunk-G7Z6EENO.js → chunk-EKTP7MNS.js} +4 -4
- package/dist/{chunk-S75M5ZRK.js → chunk-F2JRDPON.js} +16 -1
- package/dist/chunk-F2JRDPON.js.map +1 -0
- package/dist/{chunk-RZ4XGKOJ.js → chunk-FFRTNF3L.js} +8 -8
- package/dist/{chunk-VKXWK44Q.js → chunk-FONWBCVY.js} +3 -3
- package/dist/{chunk-DZD576ZU.js → chunk-FPLM2TKD.js} +2 -2
- package/dist/{chunk-ZPJ4QSGP.js → chunk-FTPONF6B.js} +2 -2
- package/dist/{chunk-LJS7KUPV.js → chunk-FWX7W5PM.js} +2 -2
- package/dist/{chunk-UTRO5UJU.js → chunk-G6DFSS6A.js} +5 -1
- package/dist/chunk-G6DFSS6A.js.map +1 -0
- package/dist/{chunk-6LAPLZOS.js → chunk-GJ776BC2.js} +8 -3
- package/dist/chunk-GJ776BC2.js.map +1 -0
- package/dist/{chunk-G4T7L557.js → chunk-GN3WRFJY.js} +6 -6
- package/dist/{chunk-QT2FRYI4.js → chunk-H7NAZ3UB.js} +2 -2
- package/dist/{chunk-APPFNGX6.js → chunk-HBUFQRIM.js} +2 -2
- package/dist/{chunk-UU7TRFNE.js → chunk-HGJ6NJ4E.js} +2 -2
- package/dist/{chunk-WB7JSQCP.js → chunk-HIEWDJ2O.js} +5 -2
- package/dist/{chunk-WB7JSQCP.js.map → chunk-HIEWDJ2O.js.map} +1 -1
- package/dist/{chunk-UES4BHA2.js → chunk-I3MSGFGD.js} +17 -6
- package/dist/chunk-I3MSGFGD.js.map +1 -0
- package/dist/{chunk-C4ZNGVK3.js → chunk-IKP5OYQQ.js} +2 -2
- package/dist/{chunk-KQAFEZQX.js → chunk-IPLYGWQF.js} +5 -5
- package/dist/{chunk-RDJRFDJY.js → chunk-IQ4NVWEF.js} +2 -2
- package/dist/{chunk-CGVHPCP2.js → chunk-JYG4OLWH.js} +2 -2
- package/dist/{chunk-WOPA3SGI.js → chunk-K26NWEOC.js} +8 -8
- package/dist/{chunk-K4QS7LXU.js → chunk-K2UGPTYY.js} +485 -44
- package/dist/chunk-K2UGPTYY.js.map +1 -0
- package/dist/{chunk-L6CQ7WIW.js → chunk-KFBOPMF6.js} +11 -11
- package/dist/chunk-KFBOPMF6.js.map +1 -0
- 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-HOIRB77A.js → chunk-L6Z5OAS4.js} +2 -2
- package/dist/chunk-LC2BDILZ.js +57 -0
- package/dist/chunk-LC2BDILZ.js.map +1 -0
- package/dist/{chunk-227UFSEQ.js → chunk-LEPOP46W.js} +4 -4
- package/dist/{chunk-6R4G7N4S.js → chunk-M4YHAODQ.js} +388 -748
- package/dist/chunk-M4YHAODQ.js.map +1 -0
- package/dist/{chunk-3JLPGJ43.js → chunk-MIH3CJPN.js} +5 -5
- package/dist/{chunk-QHFV6VNU.js → chunk-MK5VEWCR.js} +2 -2
- package/dist/chunk-NISZQW72.js +140 -0
- package/dist/chunk-NISZQW72.js.map +1 -0
- package/dist/{chunk-GUKBW4HL.js → chunk-NQMSEB5D.js} +6 -6
- package/dist/{chunk-G2LUMAUF.js → chunk-OCIP6YMD.js} +12 -5
- package/dist/chunk-OCIP6YMD.js.map +1 -0
- package/dist/{chunk-47P3RYZP.js → chunk-PG4QBPVG.js} +21 -11
- package/dist/chunk-PG4QBPVG.js.map +1 -0
- package/dist/{chunk-WRJVB3C2.js → chunk-PO7NXBG2.js} +2 -2
- package/dist/{chunk-QWGE2PUH.js → chunk-PT54WISF.js} +190 -56
- package/dist/chunk-PT54WISF.js.map +1 -0
- package/dist/{chunk-AZM4CCAC.js → chunk-QZLDRQ4I.js} +8 -8
- package/dist/{chunk-THPPCISA.js → chunk-RBII7637.js} +5 -5
- package/dist/{chunk-JDZPNCMA.js → chunk-RUNORG2P.js} +6 -3
- package/dist/chunk-RUNORG2P.js.map +1 -0
- package/dist/{chunk-JV5YUBIZ.js → chunk-RZQ6W2W4.js} +50 -44
- package/dist/chunk-RZQ6W2W4.js.map +1 -0
- package/dist/{chunk-RUMNY5DT.js → chunk-SMNYAMJD.js} +6 -2
- package/dist/chunk-SMNYAMJD.js.map +1 -0
- package/dist/{chunk-MKQBXQKU.js → chunk-TB6CBZ5V.js} +22 -15
- package/dist/chunk-TB6CBZ5V.js.map +1 -0
- package/dist/{chunk-VMMQDEN5.js → chunk-TO7ZTWJW.js} +2 -2
- package/dist/{chunk-K2TDK7GG.js → chunk-TWTUGCTY.js} +2 -2
- package/dist/{chunk-HLYR2TQL.js → chunk-UCTS3DDH.js} +2 -2
- package/dist/{chunk-JYIJNNN3.js → chunk-UG6VXIOK.js} +2 -2
- package/dist/{chunk-WM65LU67.js → chunk-UKYS3NU5.js} +2 -2
- package/dist/{chunk-WDBX6VER.js → chunk-UPLZNJKN.js} +5 -5
- package/dist/{chunk-C23BYTJV.js → chunk-UW5NPZJ2.js} +40 -12
- package/dist/chunk-UW5NPZJ2.js.map +1 -0
- package/dist/{chunk-2GFK22OZ.js → chunk-V6ERBR7U.js} +2 -2
- package/dist/{chunk-CYF6WVE7.js → chunk-W5ZKPI34.js} +139 -158
- package/dist/chunk-W5ZKPI34.js.map +1 -0
- package/dist/chunk-XX4HPFFM.js +370 -0
- package/dist/chunk-XX4HPFFM.js.map +1 -0
- package/dist/{chunk-ZMYDYNI4.js → chunk-XZHE2DEN.js} +4 -4
- package/dist/chunk-YXQEKCZM.js +223 -0
- package/dist/chunk-YXQEKCZM.js.map +1 -0
- package/dist/{chunk-GYPQL6XN.js → chunk-Z4N7SVVF.js} +35 -47
- package/dist/chunk-Z4N7SVVF.js.map +1 -0
- package/dist/{chunk-MAXVH44E.js → chunk-Z54EM5YZ.js} +7 -7
- package/dist/{chunk-YGLY6QFV.js → chunk-ZRZVLB7O.js} +2 -2
- package/dist/{chunk-4IIFL7GC.js → chunk-ZUKIUXHQ.js} +10 -10
- package/dist/{cli-DVUFIa5E.d.ts → cli-Bze8S0Qs.d.ts} +5 -5
- package/dist/cli.d.ts +22 -21
- package/dist/cli.js +90 -80
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +33 -12
- 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 +4 -2
- package/dist/connectors/codex-materialize-runner.d.ts +1 -1
- package/dist/connectors/codex-materialize-runner.js +33 -12
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +32 -12
- 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-JDTBXRGW.js +20 -0
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +35 -14
- 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 +25 -24
- 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-CzEfB31P.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 +33 -12
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +7 -4
- package/dist/external-wiki-access.d.ts +22 -21
- package/dist/external-wiki-access.js +56 -51
- 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 +22 -21
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-faithfulness.js +2 -2
- 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-judge.js +2 -2
- 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 +35 -19
- package/dist/fallback-llm.d.ts +14 -1
- package/dist/fallback-llm.js +1 -1
- package/dist/{first-start-migration-626C5554.js → first-start-migration-CRZCZAJN.js} +11 -3
- package/dist/first-start-migration-CRZCZAJN.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 +314 -308
- package/dist/index.js +304 -133
- package/dist/inline-script.d.ts +3 -0
- package/dist/inline-script.js +8 -0
- package/dist/inline-script.js.map +1 -0
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/engine.js +3 -3
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +6 -6
- 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 +2 -1
- package/dist/local-llm.js +2 -2
- package/dist/local-model-endpoint.d.ts +1 -1
- package/dist/maintenance/memory-governance.d.ts +1 -1
- package/dist/maintenance/memory-governance.js +33 -12
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +33 -12
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +34 -13
- package/dist/{maintenance-BJzNIKBE.d.ts → maintenance-C8aRWfhq.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +22 -21
- package/dist/mcp-read-only-tools.js +1 -1
- 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 +24 -23
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +8 -8
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +33 -12
- 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 +26 -25
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +39 -36
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +38 -18
- package/dist/{orchestrator-BiXgBJBQ.d.ts → orchestrator-D85CzDDY.d.ts} +11 -8
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +117 -109
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-sz_dcuLg.d.ts → pipeline-DPcUifCO.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/public-http-D-SyWNj6.d.ts +25 -0
- package/dist/{purge-533FZLS4.js → purge-GB7PZHT2.js} +2 -2
- package/dist/{qmd-eAWObK4M.d.ts → qmd-dFCHp1r0.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-planner-llm.js +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 +5 -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 +38 -38
- package/dist/{scope-profiles-BBQsXuyj.d.ts → scope-profiles-DICK7GtN.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 +6 -6
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +12 -12
- 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-BP7NAX0N.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +34 -13
- package/dist/semantic-rule-promotion.js +33 -12
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +33 -12
- package/dist/{service-DIrtHHEg.d.ts → service-DT-pJyda.d.ts} +660 -660
- 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 +1 -1
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +31 -15
- package/dist/{storage-DqCzXi56.d.ts → storage-qOnaJ1Lw.d.ts} +49 -13
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +33 -12
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +5 -5
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +518 -0
- package/dist/support-passport/index.js +357 -0
- package/dist/support-passport/index.js.map +1 -0
- 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-EXYSKSVN.js} +8 -2
- package/dist/{tier-stats-2JCZYEF7.js.map → tier-stats-EXYSKSVN.js.map} +1 -1
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/autodetect.js +1 -1
- package/dist/transfer/backup.js +1 -1
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/types.d.ts +36 -36
- 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-ed-SvS2t.d.ts} +8 -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 +33 -12
- package/dist/write-envelope.d.ts +1 -1
- package/dist/write-rate-limiter.d.ts +11 -5
- package/dist/write-rate-limiter.js +1 -1
- package/package.json +12 -2
- package/scripts/build-with-heap.mjs +11 -1
- package/src/access-authorization-probe.ts +20 -2
- package/src/access-boundary.ts +32 -0
- package/src/access-http.test.ts +1971 -643
- package/src/access-http.ts +81 -74
- package/src/access-mcp.ts +3 -1
- package/src/access-memory-search-fanout.ts +24 -1
- package/src/access-offline-manifest.ts +5 -0
- package/src/access-operations.ts +2 -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 +628 -884
- package/src/access-surface-catalog.test.ts +40 -10
- package/src/access-surface-catalog.ts +15 -0
- package/src/active-memory-bridge.test.ts +151 -0
- package/src/active-memory-bridge.ts +95 -21
- package/src/briefing.test.ts +38 -0
- package/src/briefing.ts +3 -3
- package/src/cli.ts +6 -1
- package/src/config.ts +18 -9
- 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/fallback-llm.test.ts +54 -0
- package/src/fallback-llm.ts +54 -9
- package/src/index.ts +3 -0
- package/src/inline-script.ts +6 -0
- package/src/local-llm-headers-timeout.test.ts +42 -0
- package/src/local-llm.ts +8 -8
- 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/mcp-read-only-tools.ts +3 -0
- 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/relay/mission-access.test.ts +11 -11
- package/src/relay/mission-ui.test.ts +3 -1
- package/src/storage/supersession-audit.ts +7 -1
- package/src/storage/supersession-side-effects.ts +17 -5
- package/src/storage/tombstone-blocked-capture-sync.ts +31 -0
- package/src/storage-contract/failure-semantics.test.ts +102 -0
- package/src/storage.ts +18 -19
- package/src/support-passport/access-http-base.ts +143 -0
- package/src/support-passport/access-http.ts +172 -0
- package/src/support-passport/access-operations.ts +272 -0
- package/src/support-passport/access-service-base.test.ts +193 -0
- package/src/support-passport/access-service-base.ts +176 -0
- package/src/support-passport/access-surface.test.ts +283 -0
- package/src/support-passport/access-surface.ts +286 -0
- package/src/support-passport/card-projection.test.ts +137 -0
- package/src/support-passport/card-projection.ts +348 -0
- package/src/support-passport/card-replacement.ts +126 -0
- package/src/support-passport/card-service-commit-forwarding.test.ts +160 -0
- package/src/support-passport/card-service.test.ts +2964 -0
- package/src/support-passport/card-service.ts +1184 -0
- package/src/support-passport/card-state.ts +158 -0
- package/src/support-passport/config-model-routing.test.ts +37 -0
- package/src/support-passport/config.test.ts +34 -0
- package/src/support-passport/config.ts +41 -0
- package/src/support-passport/contracts.test.ts +156 -0
- package/src/support-passport/contracts.ts +149 -0
- package/src/support-passport/errors.ts +30 -0
- package/src/support-passport/generated-batch.test.ts +185 -0
- package/src/support-passport/generated-batch.ts +338 -0
- package/src/support-passport/grant-contracts.ts +183 -0
- package/src/support-passport/grant-generated-batch-scope.test.ts +201 -0
- package/src/support-passport/grant-service-cache.test.ts +148 -0
- package/src/support-passport/grant-service-cancellation.test.ts +83 -0
- package/src/support-passport/grant-service-marker-cache.test.ts +62 -0
- package/src/support-passport/grant-service.test.ts +3496 -0
- package/src/support-passport/grant-service.ts +513 -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 +906 -0
- package/src/support-passport/index.ts +17 -0
- package/src/support-passport/mcp-tools.test.ts +222 -0
- package/src/support-passport/mcp-tools.ts +187 -0
- package/src/support-passport/model-adapter.test.ts +840 -0
- package/src/support-passport/model-adapter.ts +602 -0
- package/src/support-passport/model-audit-pinned-write.test.ts +59 -0
- package/src/support-passport/model-audit.ts +152 -0
- package/src/support-passport/model-bridge.test.ts +456 -0
- package/src/support-passport/model-bridge.ts +439 -0
- package/src/support-passport/model-contracts.ts +124 -0
- package/src/support-passport/model-service.test.ts +1731 -0
- package/src/support-passport/model-service.ts +399 -0
- package/src/support-passport/offline-sync-guard.ts +230 -0
- package/src/support-passport/owner-http.test.ts +671 -0
- package/src/support-passport/owner-lock.ts +70 -0
- package/src/support-passport/private-file.test.ts +99 -0
- package/src/support-passport/private-file.ts +498 -0
- package/src/support-passport/public-http.test.ts +476 -0
- package/src/support-passport/public-http.ts +601 -0
- package/src/support-passport/ui.test.ts +181 -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 +8 -1
- package/src/wearables/service.test.ts +13 -0
- package/src/wearables/service.ts +2 -0
- package/src/write-rate-limiter.test.ts +30 -6
- package/src/write-rate-limiter.ts +29 -18
- package/dist/chunk-3CSX3ETE.js.map +0 -1
- package/dist/chunk-47P3RYZP.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-C23BYTJV.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-K4QS7LXU.js.map +0 -1
- package/dist/chunk-L6CQ7WIW.js.map +0 -1
- package/dist/chunk-MKQBXQKU.js.map +0 -1
- package/dist/chunk-NH5IR2WM.js.map +0 -1
- package/dist/chunk-PX2LSHYM.js.map +0 -1
- package/dist/chunk-QWGE2PUH.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-UES4BHA2.js.map +0 -1
- package/dist/chunk-UTRO5UJU.js.map +0 -1
- package/dist/chunk-UU3G6GUP.js.map +0 -1
- package/dist/chunk-XUAMCLY4.js.map +0 -1
- package/dist/chunk-ZYLC7NFO.js.map +0 -1
- package/dist/contradiction-scan-HYLIRMJ2.js +0 -14
- package/dist/first-start-migration-626C5554.js.map +0 -1
- /package/dist/{auto-sync-TDHLZPVP.js.map → auto-sync-NR3GPCOA.js.map} +0 -0
- /package/dist/{chunk-LLJMAULE.js.map → chunk-2FKEIPIT.js.map} +0 -0
- /package/dist/{chunk-JBPKEARU.js.map → chunk-2QSZNTDO.js.map} +0 -0
- /package/dist/{chunk-PDDTI7IC.js.map → chunk-43SEBY2M.js.map} +0 -0
- /package/dist/{chunk-HWRD23DW.js.map → chunk-46SZBVDS.js.map} +0 -0
- /package/dist/{chunk-6HPHEFXT.js.map → chunk-5FD7JMTX.js.map} +0 -0
- /package/dist/{chunk-IBKR2TFR.js.map → chunk-6CYHUWCO.js.map} +0 -0
- /package/dist/{chunk-YN6ASZUG.js.map → chunk-6QPI2ITJ.js.map} +0 -0
- /package/dist/{chunk-NIS256NW.js.map → chunk-CIAI24TQ.js.map} +0 -0
- /package/dist/{chunk-7FGL6CGA.js.map → chunk-DVYRD4HY.js.map} +0 -0
- /package/dist/{chunk-G7Z6EENO.js.map → chunk-EKTP7MNS.js.map} +0 -0
- /package/dist/{chunk-RZ4XGKOJ.js.map → chunk-FFRTNF3L.js.map} +0 -0
- /package/dist/{chunk-VKXWK44Q.js.map → chunk-FONWBCVY.js.map} +0 -0
- /package/dist/{chunk-DZD576ZU.js.map → chunk-FPLM2TKD.js.map} +0 -0
- /package/dist/{chunk-ZPJ4QSGP.js.map → chunk-FTPONF6B.js.map} +0 -0
- /package/dist/{chunk-LJS7KUPV.js.map → chunk-FWX7W5PM.js.map} +0 -0
- /package/dist/{chunk-G4T7L557.js.map → chunk-GN3WRFJY.js.map} +0 -0
- /package/dist/{chunk-QT2FRYI4.js.map → chunk-H7NAZ3UB.js.map} +0 -0
- /package/dist/{chunk-APPFNGX6.js.map → chunk-HBUFQRIM.js.map} +0 -0
- /package/dist/{chunk-UU7TRFNE.js.map → chunk-HGJ6NJ4E.js.map} +0 -0
- /package/dist/{chunk-C4ZNGVK3.js.map → chunk-IKP5OYQQ.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-IPLYGWQF.js.map} +0 -0
- /package/dist/{chunk-RDJRFDJY.js.map → chunk-IQ4NVWEF.js.map} +0 -0
- /package/dist/{chunk-CGVHPCP2.js.map → chunk-JYG4OLWH.js.map} +0 -0
- /package/dist/{chunk-WOPA3SGI.js.map → chunk-K26NWEOC.js.map} +0 -0
- /package/dist/{chunk-G7A5HLUS.js.map → chunk-KJH6W2I7.js.map} +0 -0
- /package/dist/{chunk-HOIRB77A.js.map → chunk-L6Z5OAS4.js.map} +0 -0
- /package/dist/{chunk-227UFSEQ.js.map → chunk-LEPOP46W.js.map} +0 -0
- /package/dist/{chunk-3JLPGJ43.js.map → chunk-MIH3CJPN.js.map} +0 -0
- /package/dist/{chunk-QHFV6VNU.js.map → chunk-MK5VEWCR.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-AZM4CCAC.js.map → chunk-QZLDRQ4I.js.map} +0 -0
- /package/dist/{chunk-THPPCISA.js.map → chunk-RBII7637.js.map} +0 -0
- /package/dist/{chunk-VMMQDEN5.js.map → chunk-TO7ZTWJW.js.map} +0 -0
- /package/dist/{chunk-K2TDK7GG.js.map → chunk-TWTUGCTY.js.map} +0 -0
- /package/dist/{chunk-HLYR2TQL.js.map → chunk-UCTS3DDH.js.map} +0 -0
- /package/dist/{chunk-JYIJNNN3.js.map → chunk-UG6VXIOK.js.map} +0 -0
- /package/dist/{chunk-WM65LU67.js.map → chunk-UKYS3NU5.js.map} +0 -0
- /package/dist/{chunk-WDBX6VER.js.map → chunk-UPLZNJKN.js.map} +0 -0
- /package/dist/{chunk-2GFK22OZ.js.map → chunk-V6ERBR7U.js.map} +0 -0
- /package/dist/{chunk-ZMYDYNI4.js.map → chunk-XZHE2DEN.js.map} +0 -0
- /package/dist/{chunk-MAXVH44E.js.map → chunk-Z54EM5YZ.js.map} +0 -0
- /package/dist/{chunk-YGLY6QFV.js.map → chunk-ZRZVLB7O.js.map} +0 -0
- /package/dist/{chunk-4IIFL7GC.js.map → chunk-ZUKIUXHQ.js.map} +0 -0
- /package/dist/{contradiction-scan-HYLIRMJ2.js.map → contradiction-scan-JDTBXRGW.js.map} +0 -0
- /package/dist/{purge-533FZLS4.js.map → purge-GB7PZHT2.js.map} +0 -0
|
@@ -36,6 +36,8 @@ import {
|
|
|
36
36
|
type HttpRouteEntry,
|
|
37
37
|
type McpToolEntry,
|
|
38
38
|
} from "./access-surface-catalog.js";
|
|
39
|
+
import { SUPPORT_PASSPORT_OWNER_HTTP_ROUTES } from "./support-passport/access-http.js";
|
|
40
|
+
import { SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES } from "./support-passport/public-http.js";
|
|
39
41
|
|
|
40
42
|
// #1668: all remaining MCP tools migrated through the strict-schema boundary
|
|
41
43
|
// (recall, capsule, continuity, work, shared-context, peer, dreams, etc.).
|
|
@@ -62,7 +64,7 @@ function shortToolName(advertised: string): string {
|
|
|
62
64
|
|
|
63
65
|
/** Spin up a server with emitLegacyTools=true and read the deduped short names. */
|
|
64
66
|
async function liveMcpToolShortNames(): Promise<ReadonlySet<string>> {
|
|
65
|
-
const stub = { briefingEnabled: true } as unknown as EngramAccessService;
|
|
67
|
+
const stub = { briefingEnabled: true, supportPassportEnabled: true } as unknown as EngramAccessService;
|
|
66
68
|
const server = new EngramMcpServer(stub, { emitLegacyTools: true, codingDecisionVisible: true, architectureCardVisible: true, codegraphVisible: true, sessionDeltaVisible: true, chatVisible: true });
|
|
67
69
|
const response = await server.handleRequest({ jsonrpc: "2.0", id: 1, method: "tools/list" });
|
|
68
70
|
const result = (response as { result?: { tools?: Array<{ name: string }> } }).result;
|
|
@@ -142,22 +144,35 @@ function formatViolations(violations: readonly CoverageViolation[]): string {
|
|
|
142
144
|
* catalog row is not a false migration — the surface code must also wire
|
|
143
145
|
* the dispatch.
|
|
144
146
|
*/
|
|
145
|
-
function
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
);
|
|
147
|
+
function extractMcpOperationMap(
|
|
148
|
+
sourceUrl: URL,
|
|
149
|
+
constantName: string,
|
|
150
|
+
): Map<string, string> {
|
|
151
|
+
const source = readFileSync(sourceUrl, "utf-8");
|
|
150
152
|
const blockMatch = source.match(
|
|
151
|
-
|
|
153
|
+
new RegExp(`(?:export\\s+)?const\\s+${constantName}[^=]*=\\s*\\{([\\s\\S]*?)\\}\\s*(?:as const)?;`),
|
|
152
154
|
);
|
|
153
|
-
|
|
155
|
+
assert.ok(blockMatch, `could not find ${constantName} in ${sourceUrl.pathname}`);
|
|
154
156
|
const map = new Map<string, string>();
|
|
155
|
-
for (const m of
|
|
157
|
+
for (const m of blockMatch[1]!.matchAll(/"engram\.(\w+)"\s*:\s*"(\w+)"/g)) {
|
|
156
158
|
map.set(m[1]!, m[2]!);
|
|
157
159
|
}
|
|
158
160
|
return map;
|
|
159
161
|
}
|
|
160
162
|
|
|
163
|
+
function extractMcpDispatchMap(): Map<string, string> {
|
|
164
|
+
return new Map([
|
|
165
|
+
...extractMcpOperationMap(
|
|
166
|
+
new URL("./access-mcp.ts", import.meta.url),
|
|
167
|
+
"MCP_MIGRATED_OPERATIONS",
|
|
168
|
+
),
|
|
169
|
+
...extractMcpOperationMap(
|
|
170
|
+
new URL("./support-passport/mcp-tools.ts", import.meta.url),
|
|
171
|
+
"SUPPORT_PASSPORT_MCP_MIGRATED_OPERATIONS",
|
|
172
|
+
),
|
|
173
|
+
]);
|
|
174
|
+
}
|
|
175
|
+
|
|
161
176
|
/**
|
|
162
177
|
* Normalize a regex route body (e.g. `\/engram\/v1\/peers\/([^/]+)`) to the
|
|
163
178
|
* catalog pathname form (`/engram/v1/peers/:id`).
|
|
@@ -302,6 +317,21 @@ function extractHttpRouteDispatchMap(): Map<string, Set<string>> {
|
|
|
302
317
|
}
|
|
303
318
|
}
|
|
304
319
|
}
|
|
320
|
+
for (const [sourcePath, routes] of [
|
|
321
|
+
["./support-passport/access-http.ts", SUPPORT_PASSPORT_OWNER_HTTP_ROUTES],
|
|
322
|
+
["./support-passport/public-http.ts", SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES],
|
|
323
|
+
] as const) {
|
|
324
|
+
const routeSource = readFileSync(new URL(sourcePath, import.meta.url), "utf-8");
|
|
325
|
+
for (const route of routes) {
|
|
326
|
+
const dynamicCardMutation =
|
|
327
|
+
route.operation.startsWith("support_passport_card_") &&
|
|
328
|
+
routeSource.includes("operation = `support_passport_card_${cardMatch[2]}`");
|
|
329
|
+
const publicDispatch = new RegExp(`runPublicOperation\\(\\s*service,\\s*"${route.operation}"`).test(routeSource);
|
|
330
|
+
if (routeSource.includes(`operation = "${route.operation}"`) || dynamicCardMutation || publicDispatch) {
|
|
331
|
+
routeOps.set(`${route.method} ${route.pathname}`, new Set([route.operation]));
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
305
335
|
return routeOps;
|
|
306
336
|
}
|
|
307
337
|
|
|
@@ -824,4 +854,4 @@ test("memory_get operation resolves through the boundary without hooks (read par
|
|
|
824
854
|
{ service },
|
|
825
855
|
)) as { result: { found: boolean } };
|
|
826
856
|
assert.equal(output.result.found, false);
|
|
827
|
-
});
|
|
857
|
+
});
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import type { OperationName } from "./access-boundary.js";
|
|
25
|
+
import { SUPPORT_PASSPORT_OWNER_HTTP_ROUTES } from "./support-passport/access-http.js";
|
|
26
|
+
import { SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES } from "./support-passport/public-http.js";
|
|
25
27
|
|
|
26
28
|
/**
|
|
27
29
|
* One row per MCP tool, keyed by the canonical SHORT name (no `engram.`/
|
|
@@ -162,6 +164,17 @@ export const MCP_TOOLS: readonly McpToolEntry[] = [
|
|
|
162
164
|
{ tool: "console_state", operation: "console_state" },
|
|
163
165
|
{ tool: "dreams_status", operation: "dreams_status" },
|
|
164
166
|
{ tool: "dreams_run", operation: "dreams_run" },
|
|
167
|
+
{ tool: "support_passport_memory_preview", operation: "support_passport_memory_preview" },
|
|
168
|
+
{ tool: "support_passport_cards_list", operation: "support_passport_cards_list" },
|
|
169
|
+
{ tool: "support_passport_draft_create", operation: "support_passport_draft_create" },
|
|
170
|
+
{ tool: "support_passport_drafts_generate", operation: "support_passport_drafts_generate" },
|
|
171
|
+
{ tool: "support_passport_card_replace", operation: "support_passport_card_replace" },
|
|
172
|
+
{ tool: "support_passport_card_approve", operation: "support_passport_card_approve" },
|
|
173
|
+
{ tool: "support_passport_card_reject", operation: "support_passport_card_reject" },
|
|
174
|
+
{ tool: "support_passport_card_withdraw", operation: "support_passport_card_withdraw" },
|
|
175
|
+
{ tool: "support_passport_grant_create", operation: "support_passport_grant_create" },
|
|
176
|
+
{ tool: "support_passport_grants_list", operation: "support_passport_grants_list" },
|
|
177
|
+
{ tool: "support_passport_grant_revoke", operation: "support_passport_grant_revoke" },
|
|
165
178
|
];
|
|
166
179
|
|
|
167
180
|
// Each route below corresponds 1:1 to a service-invoking route branch in
|
|
@@ -260,6 +273,8 @@ export const HTTP_ROUTES: readonly HttpRouteEntry[] = [
|
|
|
260
273
|
{ method: "GET", pathname: "/engram/v1/graph/events", operation: "graph_events" },
|
|
261
274
|
{ method: "POST", pathname: "/engram/v1/chat/message", operation: "chat_message" },
|
|
262
275
|
{ method: "GET", pathname: "/engram/v1/chat/events/:id", operation: "chat_events" },
|
|
276
|
+
...SUPPORT_PASSPORT_OWNER_HTTP_ROUTES,
|
|
277
|
+
...SUPPORT_PASSPORT_PUBLIC_HTTP_ROUTES,
|
|
263
278
|
];
|
|
264
279
|
|
|
265
280
|
/**
|
|
@@ -6,9 +6,12 @@ import {
|
|
|
6
6
|
recallForActiveMemory,
|
|
7
7
|
} from "./active-memory-bridge.js";
|
|
8
8
|
|
|
9
|
+
const keepVisibleSearchResults = async <T>(results: T[]): Promise<T[]> => results;
|
|
10
|
+
|
|
9
11
|
test("recallForActiveMemory caps limit, truncates snippets, and strips internal scoring fields", async () => {
|
|
10
12
|
const orchestrator = {
|
|
11
13
|
resolveSelfNamespace: (_sessionKey?: string) => "resolved-namespace",
|
|
14
|
+
filterPrivateSearchResults: keepVisibleSearchResults,
|
|
12
15
|
searchAcrossNamespaces: async (_params: unknown) => [
|
|
13
16
|
{
|
|
14
17
|
id: "mem-1",
|
|
@@ -54,6 +57,9 @@ test("recallForActiveMemory caps limit, truncates snippets, and strips internal
|
|
|
54
57
|
test("recallForActiveMemory truncates snippets without splitting surrogate pairs", async () => {
|
|
55
58
|
const orchestrator = {
|
|
56
59
|
resolveSelfNamespace: () => "resolved-namespace",
|
|
60
|
+
getStorageForNamespace: async () => ({
|
|
61
|
+
getMemoryById: async () => ({ content: "emoji memory", frontmatter: {} } as never),
|
|
62
|
+
}),
|
|
57
63
|
searchAcrossNamespaces: async () => [
|
|
58
64
|
{
|
|
59
65
|
id: "mem-emoji",
|
|
@@ -95,6 +101,7 @@ test("recallForActiveMemory prioritizes an explicit namespace filter over the se
|
|
|
95
101
|
let receivedNamespaces: string[] | undefined;
|
|
96
102
|
const orchestrator = {
|
|
97
103
|
resolveSelfNamespace: () => "session-namespace",
|
|
104
|
+
filterPrivateSearchResults: keepVisibleSearchResults,
|
|
98
105
|
searchAcrossNamespaces: async (params: { namespaces?: string[] }) => {
|
|
99
106
|
receivedNamespaces = params.namespaces;
|
|
100
107
|
return [];
|
|
@@ -165,6 +172,7 @@ test("recallForActiveMemory denies blank session keys when namespaces are enable
|
|
|
165
172
|
test("recallForActiveMemory marks results truncated when the underlying recall exceeds the requested limit", async () => {
|
|
166
173
|
const orchestrator = {
|
|
167
174
|
resolveSelfNamespace: () => "session-namespace",
|
|
175
|
+
filterPrivateSearchResults: keepVisibleSearchResults,
|
|
168
176
|
searchAcrossNamespaces: async () =>
|
|
169
177
|
Array.from({ length: 3 }, (_, index) => ({
|
|
170
178
|
id: `mem-${index + 1}`,
|
|
@@ -187,6 +195,7 @@ test("recallForActiveMemory marks results truncated when the underlying recall e
|
|
|
187
195
|
test("recallForActiveMemory excludes artifact-backed hits before applying the visible result cap", async () => {
|
|
188
196
|
const orchestrator = {
|
|
189
197
|
resolveSelfNamespace: () => "session-namespace",
|
|
198
|
+
filterPrivateSearchResults: keepVisibleSearchResults,
|
|
190
199
|
searchAcrossNamespaces: async () => [
|
|
191
200
|
{
|
|
192
201
|
id: "artifact-1",
|
|
@@ -226,6 +235,128 @@ test("recallForActiveMemory excludes artifact-backed hits before applying the vi
|
|
|
226
235
|
);
|
|
227
236
|
});
|
|
228
237
|
|
|
238
|
+
test("recallForActiveMemory excludes support passport records before applying the visible result cap", async () => {
|
|
239
|
+
const memories = new Map([
|
|
240
|
+
["/tmp/memory/preferences/card.md", {
|
|
241
|
+
content: "Give me time to answer.",
|
|
242
|
+
frontmatter: { tags: ["support-passport-card"] },
|
|
243
|
+
} as never],
|
|
244
|
+
["/tmp/memory/corrections/audit.md", {
|
|
245
|
+
content: "Superseded: Give me time to answer.",
|
|
246
|
+
frontmatter: { tags: ["support-passport-audit"] },
|
|
247
|
+
} as never],
|
|
248
|
+
["/tmp/memory/facts/safe.md", {
|
|
249
|
+
content: "Safe memory.",
|
|
250
|
+
frontmatter: { tags: [] },
|
|
251
|
+
} as never],
|
|
252
|
+
]);
|
|
253
|
+
const orchestrator = {
|
|
254
|
+
resolveSelfNamespace: () => "session-namespace",
|
|
255
|
+
getStorageForNamespace: async () => ({
|
|
256
|
+
readMemoryByPath: async (memoryPath: string) => memories.get(memoryPath) ?? null,
|
|
257
|
+
}),
|
|
258
|
+
filterPrivateSearchResults: async (results: Array<{ path: string }>) =>
|
|
259
|
+
results.filter((result) => !result.path.includes("/preferences/card.md") && !result.path.includes("/corrections/audit.md")),
|
|
260
|
+
searchAcrossNamespaces: async () => [
|
|
261
|
+
{ id: "card", score: 0.99, path: "/tmp/memory/preferences/card.md", snippet: "private card" },
|
|
262
|
+
{ id: "audit", score: 0.98, path: "/tmp/memory/corrections/audit.md", snippet: "private audit" },
|
|
263
|
+
{ id: "safe", score: 0.8, path: "/tmp/memory/facts/safe.md", snippet: "safe memory" },
|
|
264
|
+
],
|
|
265
|
+
};
|
|
266
|
+
|
|
267
|
+
const result = await recallForActiveMemory(orchestrator as never, {
|
|
268
|
+
query: "support",
|
|
269
|
+
limit: 2,
|
|
270
|
+
sessionKey: "session-b",
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
assert.deepEqual(result.results.map((entry) => entry.id), ["safe"]);
|
|
274
|
+
assert.equal(result.truncated, false);
|
|
275
|
+
});
|
|
276
|
+
|
|
277
|
+
test("recallForActiveMemory pages past private passport records", async () => {
|
|
278
|
+
const corpus = [
|
|
279
|
+
...Array.from({ length: 40 }, (_, index) => ({
|
|
280
|
+
id: `private-${index}`,
|
|
281
|
+
score: 1 - index / 100,
|
|
282
|
+
path: `/tmp/memory/preferences/private-${index}.md`,
|
|
283
|
+
snippet: "private support card",
|
|
284
|
+
})),
|
|
285
|
+
{ id: "safe", score: 0.5, path: "/tmp/memory/facts/safe.md", snippet: "safe memory" },
|
|
286
|
+
];
|
|
287
|
+
const limits: number[] = [];
|
|
288
|
+
const orchestrator = {
|
|
289
|
+
resolveSelfNamespace: () => "session-namespace",
|
|
290
|
+
filterPrivateSearchResults: async (results: Array<{ path: string }>) =>
|
|
291
|
+
results.filter((result) => result.path.endsWith("safe.md")),
|
|
292
|
+
searchAcrossNamespaces: async ({ maxResults }: { maxResults?: number }) => {
|
|
293
|
+
limits.push(maxResults ?? corpus.length);
|
|
294
|
+
return corpus.slice(0, maxResults);
|
|
295
|
+
},
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
const result = await recallForActiveMemory(orchestrator as never, {
|
|
299
|
+
query: "support",
|
|
300
|
+
limit: 1,
|
|
301
|
+
sessionKey: "session-b",
|
|
302
|
+
});
|
|
303
|
+
|
|
304
|
+
assert.deepEqual(result.results.map((entry) => entry.id), ["safe"]);
|
|
305
|
+
assert.ok(limits.length > 1);
|
|
306
|
+
assert.equal(result.truncated, false);
|
|
307
|
+
});
|
|
308
|
+
|
|
309
|
+
test("recallForActiveMemory resolves collection-prefixed paths through the private-result filter", async () => {
|
|
310
|
+
const calls: Array<{ paths: string[]; namespaces: readonly string[] | undefined }> = [];
|
|
311
|
+
const orchestrator = {
|
|
312
|
+
resolveSelfNamespace: () => "session-namespace",
|
|
313
|
+
getStorageForNamespace: async () => ({
|
|
314
|
+
readMemoryByPath: async () => {
|
|
315
|
+
throw new Error("direct path reads must not decide QMD visibility");
|
|
316
|
+
},
|
|
317
|
+
}),
|
|
318
|
+
filterPrivateSearchResults: async (
|
|
319
|
+
results: Array<{ path: string }>,
|
|
320
|
+
namespaces: readonly string[] | undefined,
|
|
321
|
+
) => {
|
|
322
|
+
calls.push({ paths: results.map((result) => result.path), namespaces });
|
|
323
|
+
return results.filter((result) => result.path.endsWith("safe.md"));
|
|
324
|
+
},
|
|
325
|
+
searchAcrossNamespaces: async () => [
|
|
326
|
+
{ id: "card", score: 0.99, path: "openclaw-engram/preferences/card.md", snippet: "private card" },
|
|
327
|
+
{ id: "safe", score: 0.8, path: "openclaw-engram/facts/safe.md", snippet: "safe memory" },
|
|
328
|
+
],
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
const result = await recallForActiveMemory(orchestrator as never, {
|
|
332
|
+
query: "support",
|
|
333
|
+
sessionKey: "session-b",
|
|
334
|
+
});
|
|
335
|
+
|
|
336
|
+
assert.deepEqual(result.results.map((entry) => entry.id), ["safe"]);
|
|
337
|
+
assert.deepEqual(calls, [{
|
|
338
|
+
paths: ["openclaw-engram/preferences/card.md", "openclaw-engram/facts/safe.md"],
|
|
339
|
+
namespaces: ["session-namespace"],
|
|
340
|
+
}]);
|
|
341
|
+
});
|
|
342
|
+
|
|
343
|
+
test("recallForActiveMemory fails closed when candidate storage cannot be resolved", async () => {
|
|
344
|
+
const orchestrator = {
|
|
345
|
+
resolveSelfNamespace: () => "session-namespace",
|
|
346
|
+
searchAcrossNamespaces: async () => [
|
|
347
|
+
{ id: "unresolved-path", path: "openclaw-engram/preferences/card.md", snippet: "private path" },
|
|
348
|
+
{ id: "unresolved-id", snippet: "private id" },
|
|
349
|
+
],
|
|
350
|
+
};
|
|
351
|
+
|
|
352
|
+
const result = await recallForActiveMemory(orchestrator as never, {
|
|
353
|
+
query: "support",
|
|
354
|
+
sessionKey: "session-b",
|
|
355
|
+
});
|
|
356
|
+
|
|
357
|
+
assert.deepEqual(result, { results: [], truncated: false });
|
|
358
|
+
});
|
|
359
|
+
|
|
229
360
|
test("getMemoryForActiveMemory returns not_found instead of throwing", async () => {
|
|
230
361
|
const orchestrator = {
|
|
231
362
|
resolveSelfNamespace: () => "readable-session",
|
|
@@ -238,6 +369,26 @@ test("getMemoryForActiveMemory returns not_found instead of throwing", async ()
|
|
|
238
369
|
assert.deepEqual(result, { error: "not_found" });
|
|
239
370
|
});
|
|
240
371
|
|
|
372
|
+
test("getMemoryForActiveMemory hides support passport records", async () => {
|
|
373
|
+
for (const tag of ["support-passport-card", "support-passport-audit"]) {
|
|
374
|
+
const orchestrator = {
|
|
375
|
+
resolveSelfNamespace: () => "readable-session",
|
|
376
|
+
getStorageForNamespace: async () => ({
|
|
377
|
+
getMemoryById: async () => ({
|
|
378
|
+
content: "owner-controlled content",
|
|
379
|
+
frontmatter: { tags: [tag] },
|
|
380
|
+
} as never),
|
|
381
|
+
}),
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
assert.deepEqual(
|
|
385
|
+
await getMemoryForActiveMemory(orchestrator as never, "private-record"),
|
|
386
|
+
{ error: "not_found" },
|
|
387
|
+
tag,
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
});
|
|
391
|
+
|
|
241
392
|
test("getMemoryForActiveMemory reads via the session-derived namespace storage", async () => {
|
|
242
393
|
let readNamespace: string | undefined;
|
|
243
394
|
const orchestrator = {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { resolveNamespaceCapabilities } from "./capabilities.js";
|
|
2
2
|
import { canReadNamespace, defaultNamespaceForPrincipal, resolvePrincipal } from "./namespaces/principal.js";
|
|
3
|
-
import type { MemoryFile, PluginConfig } from "./types.js";
|
|
4
|
-
import { collapseWhitespace, truncateCodePointSafe } from "./whitespace.js";
|
|
5
3
|
import { isHandleToken } from "./recall-handles.js";
|
|
4
|
+
import { isSupportPassportPrivateMemory } from "./support-passport/card-projection.js";
|
|
5
|
+
import type { MemoryFile, PluginConfig, QmdSearchResult } from "./types.js";
|
|
6
|
+
import { collapseWhitespace, truncateCodePointSafe } from "./whitespace.js";
|
|
6
7
|
|
|
7
8
|
export interface ActiveMemoryMetadata {
|
|
8
9
|
type?: "fact" | "preference";
|
|
@@ -38,10 +39,22 @@ export interface ActiveMemoryRecallParams {
|
|
|
38
39
|
snippetMaxChars?: number;
|
|
39
40
|
}
|
|
40
41
|
|
|
42
|
+
interface ActiveMemoryStorage {
|
|
43
|
+
readMemoryByPath?: (path: string) => Promise<MemoryFile | null>;
|
|
44
|
+
getMemoryById?: (id: string) => Promise<MemoryFile | null>;
|
|
45
|
+
}
|
|
46
|
+
|
|
41
47
|
interface ActiveMemoryScopedOrchestrator {
|
|
42
48
|
config?: PluginConfig;
|
|
43
49
|
resolvePrincipal?: (sessionKey?: string) => string | undefined;
|
|
44
50
|
resolveSelfNamespace?: (sessionKey?: string) => string;
|
|
51
|
+
getStorageForNamespace?: (namespace: string) => Promise<ActiveMemoryStorage>;
|
|
52
|
+
filterPrivateSearchResults?: (
|
|
53
|
+
results: QmdSearchResult[],
|
|
54
|
+
namespaces?: readonly string[],
|
|
55
|
+
preserveUnresolved?: boolean,
|
|
56
|
+
visibilityCache?: Map<string, boolean>,
|
|
57
|
+
) => Promise<QmdSearchResult[]>;
|
|
45
58
|
}
|
|
46
59
|
|
|
47
60
|
type ActiveMemorySearchCandidate = {
|
|
@@ -57,6 +70,54 @@ function isArtifactPath(value: string | undefined): boolean {
|
|
|
57
70
|
return typeof value === "string" && /(?:^|[\\/])artifacts(?:[\\/]|$)/i.test(value);
|
|
58
71
|
}
|
|
59
72
|
|
|
73
|
+
async function filterVisibleActiveMemoryCandidates(
|
|
74
|
+
orchestrator: ActiveMemoryScopedOrchestrator,
|
|
75
|
+
namespace: string,
|
|
76
|
+
storage: ActiveMemoryStorage | undefined,
|
|
77
|
+
candidates: ActiveMemorySearchCandidate[],
|
|
78
|
+
visibilityCache?: Map<string, boolean>,
|
|
79
|
+
): Promise<ActiveMemorySearchCandidate[]> {
|
|
80
|
+
const visible = new Set<ActiveMemorySearchCandidate>();
|
|
81
|
+
const pathCandidates = candidates.filter(
|
|
82
|
+
(candidate) => typeof candidate.path === "string" && !isArtifactPath(candidate.path)
|
|
83
|
+
);
|
|
84
|
+
if (pathCandidates.length > 0 && typeof orchestrator.filterPrivateSearchResults === "function") {
|
|
85
|
+
const qmdCandidates = pathCandidates.map((candidate): QmdSearchResult => ({
|
|
86
|
+
docid: candidate.id ?? candidate.path!,
|
|
87
|
+
path: candidate.path!,
|
|
88
|
+
snippet: candidate.snippet ?? candidate.text ?? "",
|
|
89
|
+
score: typeof candidate.score === "number" ? candidate.score : 0,
|
|
90
|
+
namespace,
|
|
91
|
+
}));
|
|
92
|
+
const filtered = await orchestrator.filterPrivateSearchResults(
|
|
93
|
+
qmdCandidates,
|
|
94
|
+
[namespace],
|
|
95
|
+
false,
|
|
96
|
+
visibilityCache,
|
|
97
|
+
);
|
|
98
|
+
const visibleKeys = new Set(filtered.map((candidate) => `${candidate.docid}\0${candidate.path}`));
|
|
99
|
+
qmdCandidates.forEach((candidate, index) => {
|
|
100
|
+
if (visibleKeys.has(`${candidate.docid}\0${candidate.path}`)) visible.add(pathCandidates[index]!);
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const idCandidates = candidates.filter(
|
|
105
|
+
(candidate) => candidate.path === undefined && typeof candidate.id === "string"
|
|
106
|
+
);
|
|
107
|
+
if (storage) {
|
|
108
|
+
const idVisibility = await Promise.all(
|
|
109
|
+
idCandidates.map(async (candidate) => {
|
|
110
|
+
const memory = await storage.getMemoryById?.(candidate.id!);
|
|
111
|
+
return memory !== null && memory !== undefined && !isSupportPassportPrivateMemory(memory);
|
|
112
|
+
})
|
|
113
|
+
);
|
|
114
|
+
idCandidates.forEach((candidate, index) => {
|
|
115
|
+
if (idVisibility[index]) visible.add(candidate);
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
return candidates.filter((candidate) => visible.has(candidate));
|
|
119
|
+
}
|
|
120
|
+
|
|
60
121
|
function clampLimit(value: number | undefined): number {
|
|
61
122
|
if (typeof value !== "number" || !Number.isFinite(value)) return 8;
|
|
62
123
|
return Math.max(1, Math.min(50, Math.floor(value)));
|
|
@@ -80,7 +141,7 @@ function pickMetadata(value: Record<string, unknown> | undefined): ActiveMemoryM
|
|
|
80
141
|
function resolveActiveMemoryNamespace(
|
|
81
142
|
orchestrator: ActiveMemoryScopedOrchestrator,
|
|
82
143
|
sessionKey: string | undefined,
|
|
83
|
-
requestedNamespace: string | undefined
|
|
144
|
+
requestedNamespace: string | undefined
|
|
84
145
|
): string {
|
|
85
146
|
const explicitNamespace =
|
|
86
147
|
typeof requestedNamespace === "string" && requestedNamespace.trim().length > 0
|
|
@@ -127,6 +188,8 @@ export async function recallForActiveMemory(
|
|
|
127
188
|
config?: PluginConfig;
|
|
128
189
|
resolvePrincipal?: (sessionKey?: string) => string | undefined;
|
|
129
190
|
resolveSelfNamespace?: (sessionKey?: string) => string;
|
|
191
|
+
getStorageForNamespace?: ActiveMemoryScopedOrchestrator["getStorageForNamespace"];
|
|
192
|
+
filterPrivateSearchResults?: ActiveMemoryScopedOrchestrator["filterPrivateSearchResults"];
|
|
130
193
|
searchAcrossNamespaces: (params: {
|
|
131
194
|
query: string;
|
|
132
195
|
maxResults?: number;
|
|
@@ -134,10 +197,9 @@ export async function recallForActiveMemory(
|
|
|
134
197
|
mode?: string;
|
|
135
198
|
}) => Promise<ActiveMemorySearchCandidate[]>;
|
|
136
199
|
},
|
|
137
|
-
params: ActiveMemoryRecallParams
|
|
200
|
+
params: ActiveMemoryRecallParams
|
|
138
201
|
): Promise<ActiveMemorySearchOutput> {
|
|
139
202
|
const limit = clampLimit(params.limit);
|
|
140
|
-
const requestedResults = Math.min(200, limit + 20);
|
|
141
203
|
const snippetMaxChars =
|
|
142
204
|
typeof params.snippetMaxChars === "number" && Number.isFinite(params.snippetMaxChars)
|
|
143
205
|
? Math.max(1, Math.min(4000, Math.floor(params.snippetMaxChars)))
|
|
@@ -145,16 +207,32 @@ export async function recallForActiveMemory(
|
|
|
145
207
|
const namespace = resolveActiveMemoryNamespace(
|
|
146
208
|
orchestrator,
|
|
147
209
|
params.sessionKey,
|
|
148
|
-
typeof params.filters?.namespace === "string" ? params.filters.namespace : undefined
|
|
210
|
+
typeof params.filters?.namespace === "string" ? params.filters.namespace : undefined
|
|
149
211
|
);
|
|
150
212
|
|
|
151
|
-
const
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
213
|
+
const storage = await orchestrator.getStorageForNamespace?.(namespace);
|
|
214
|
+
const candidateCap = 25_000;
|
|
215
|
+
let requestedResults = Math.min(candidateCap, limit + 20);
|
|
216
|
+
let raw: ActiveMemorySearchCandidate[] = [];
|
|
217
|
+
let visible: ActiveMemorySearchCandidate[] = [];
|
|
218
|
+
const privateVisibilityCache = new Map<string, boolean>();
|
|
219
|
+
for (;;) {
|
|
220
|
+
raw = await orchestrator.searchAcrossNamespaces({
|
|
221
|
+
query: params.query,
|
|
222
|
+
maxResults: requestedResults,
|
|
223
|
+
namespaces: [namespace],
|
|
224
|
+
mode: "search",
|
|
225
|
+
});
|
|
226
|
+
visible = await filterVisibleActiveMemoryCandidates(
|
|
227
|
+
orchestrator,
|
|
228
|
+
namespace,
|
|
229
|
+
storage,
|
|
230
|
+
raw,
|
|
231
|
+
privateVisibilityCache,
|
|
232
|
+
);
|
|
233
|
+
if (visible.length > limit || raw.length < requestedResults || requestedResults >= candidateCap) break;
|
|
234
|
+
requestedResults = Math.min(candidateCap, requestedResults * 2);
|
|
235
|
+
}
|
|
158
236
|
|
|
159
237
|
return {
|
|
160
238
|
results: visible.slice(0, limit).map((candidate, index) => ({
|
|
@@ -163,7 +241,7 @@ export async function recallForActiveMemory(
|
|
|
163
241
|
text: truncateSnippet(candidate.snippet ?? candidate.text ?? "", snippetMaxChars),
|
|
164
242
|
metadata: pickMetadata(candidate.metadata),
|
|
165
243
|
})),
|
|
166
|
-
truncated: visible.length > limit,
|
|
244
|
+
truncated: visible.length > limit || (raw.length === requestedResults && requestedResults >= candidateCap),
|
|
167
245
|
};
|
|
168
246
|
}
|
|
169
247
|
|
|
@@ -201,13 +279,9 @@ export async function getMemoryForActiveMemory(
|
|
|
201
279
|
options: {
|
|
202
280
|
namespace?: string;
|
|
203
281
|
sessionKey?: string;
|
|
204
|
-
} = {}
|
|
282
|
+
} = {}
|
|
205
283
|
): Promise<ActiveMemoryGetOutput> {
|
|
206
|
-
const namespace = resolveActiveMemoryNamespace(
|
|
207
|
-
orchestrator,
|
|
208
|
-
options.sessionKey,
|
|
209
|
-
options.namespace,
|
|
210
|
-
);
|
|
284
|
+
const namespace = resolveActiveMemoryNamespace(orchestrator, options.sessionKey, options.namespace);
|
|
211
285
|
|
|
212
286
|
const storage =
|
|
213
287
|
typeof orchestrator.getStorageForNamespace === "function"
|
|
@@ -231,7 +305,7 @@ export async function getMemoryForActiveMemory(
|
|
|
231
305
|
}
|
|
232
306
|
}
|
|
233
307
|
const memory = await storage?.getMemoryById?.(resolvedId);
|
|
234
|
-
if (!memory) return { error: "not_found" };
|
|
308
|
+
if (!memory || isSupportPassportPrivateMemory(memory)) return { error: "not_found" };
|
|
235
309
|
return {
|
|
236
310
|
id: resolvedId,
|
|
237
311
|
text: collapseWhitespace(memory.content),
|
package/src/briefing.test.ts
CHANGED
|
@@ -914,6 +914,44 @@ function makeEmptyStorage(): StorageManager {
|
|
|
914
914
|
} as unknown as StorageManager;
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
+
test("buildBriefing excludes support passport records from generated context", async () => {
|
|
918
|
+
const generatedPrompts: unknown[] = [];
|
|
919
|
+
const privateMemory: MemoryFile = {
|
|
920
|
+
...makeMemory("2026-04-10T12:00:00.000Z"),
|
|
921
|
+
frontmatter: {
|
|
922
|
+
...makeMemory("2026-04-10T12:00:00.000Z").frontmatter,
|
|
923
|
+
tags: ["support-passport-card"],
|
|
924
|
+
},
|
|
925
|
+
content: "Private support statement",
|
|
926
|
+
};
|
|
927
|
+
const publicMemory: MemoryFile = {
|
|
928
|
+
...makeMemory("2026-04-10T13:00:00.000Z"),
|
|
929
|
+
frontmatter: {
|
|
930
|
+
...makeMemory("2026-04-10T13:00:00.000Z").frontmatter,
|
|
931
|
+
id: "public-memory",
|
|
932
|
+
},
|
|
933
|
+
content: "Public project update",
|
|
934
|
+
};
|
|
935
|
+
const storage = {
|
|
936
|
+
readAllMemories: async () => [privateMemory, publicMemory],
|
|
937
|
+
readAllEntityFiles: async () => [],
|
|
938
|
+
} as unknown as StorageManager;
|
|
939
|
+
|
|
940
|
+
const result = await buildBriefing({
|
|
941
|
+
storage,
|
|
942
|
+
window: makeWindow("2026-04-10T00:00:00.000Z", "2026-04-11T00:00:00.000Z"),
|
|
943
|
+
followupGenerator: async (prompt) => {
|
|
944
|
+
generatedPrompts.push(prompt);
|
|
945
|
+
return [];
|
|
946
|
+
},
|
|
947
|
+
now: new Date("2026-04-11T10:00:00.000Z"),
|
|
948
|
+
});
|
|
949
|
+
|
|
950
|
+
assert.equal(result.markdown.includes(privateMemory.content), false);
|
|
951
|
+
assert.equal(JSON.stringify(generatedPrompts).includes(privateMemory.content), false);
|
|
952
|
+
assert.equal(result.markdown.includes(publicMemory.content), true);
|
|
953
|
+
});
|
|
954
|
+
|
|
917
955
|
test("buildBriefing: model-not-found 400 error produces user-friendly followupsUnavailableReason", async () => {
|
|
918
956
|
// Inject a mock generator that throws an error resembling a Responses API
|
|
919
957
|
// 400 "model does not exist" response.
|
package/src/briefing.ts
CHANGED
|
@@ -21,6 +21,7 @@ import path from "node:path";
|
|
|
21
21
|
import { log } from "./logger.js";
|
|
22
22
|
import { extractJsonCandidates } from "./json-extract.js";
|
|
23
23
|
import { drainPassiveCorrectionNotifications } from "./correction/passive-correction-notifications.js";
|
|
24
|
+
import { excludeSupportPassportPrivateMemories } from "./support-passport/card-projection.js";
|
|
24
25
|
import { normalizeEntityName, StorageManager } from "./storage.js";
|
|
25
26
|
import { readEnvVar, resolveHomeDir } from "./runtime/env.js";
|
|
26
27
|
import type {
|
|
@@ -978,9 +979,8 @@ function defaultWindow(now: Date): ParsedBriefingWindow {
|
|
|
978
979
|
|
|
979
980
|
async function safeReadMemories(storage: StorageManager): Promise<MemoryFile[]> {
|
|
980
981
|
try {
|
|
981
|
-
return await storage.readAllMemories();
|
|
982
|
-
} catch (err) {
|
|
983
|
-
log.warn(`briefing: readAllMemories failed: ${err}`);
|
|
982
|
+
return excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
983
|
+
} catch (err) { log.warn(`briefing: readAllMemories failed: ${err}`);
|
|
984
984
|
return [];
|
|
985
985
|
}
|
|
986
986
|
}
|
package/src/cli.ts
CHANGED
|
@@ -236,6 +236,9 @@ import {
|
|
|
236
236
|
import { resolveHomeDir } from "./runtime/env.js";
|
|
237
237
|
import { expandTildePath } from "./utils/path.js";
|
|
238
238
|
import { RECALL_FALLBACK_DIRS } from "./utils/category-dir.js";
|
|
239
|
+
import {
|
|
240
|
+
isSupportPassportPrivateMemory,
|
|
241
|
+
} from "./support-passport/card-projection.js";
|
|
239
242
|
import { assertPathInsideRoot } from "./utils/path-containment.js";
|
|
240
243
|
import { convertMemoriesToRecords } from "./training-export/converter.js";
|
|
241
244
|
import { parseStrictCliDate as parseStrictCliDateShared } from "./training-export/date-parse.js";
|
|
@@ -1066,6 +1069,8 @@ export async function runMemoryTimelineCliCommand(
|
|
|
1066
1069
|
options: MemoryTimelineCliCommandOptions,
|
|
1067
1070
|
) {
|
|
1068
1071
|
const storage = new (await import("./storage.js")).StorageManager(options.memoryDir);
|
|
1072
|
+
const memory = await storage.getMemoryByIdIncludingArchived(options.memoryId);
|
|
1073
|
+
if (!memory || isSupportPassportPrivateMemory(memory)) return [];
|
|
1069
1074
|
return storage.getMemoryTimeline(options.memoryId, options.limit);
|
|
1070
1075
|
}
|
|
1071
1076
|
|
|
@@ -1382,7 +1387,7 @@ export async function runVerifiedRecallSearchCliCommand(options: {
|
|
|
1382
1387
|
}
|
|
1383
1388
|
|
|
1384
1389
|
export function isNormalRetrievalVisibleMemory(memory: MemoryFile): boolean {
|
|
1385
|
-
return memory.frontmatter.status !== "forgotten";
|
|
1390
|
+
return memory.frontmatter.status !== "forgotten" && !isSupportPassportPrivateMemory(memory);
|
|
1386
1391
|
}
|
|
1387
1392
|
|
|
1388
1393
|
export async function filterNormalMemorySearchResults(
|