@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
package/src/config.ts
CHANGED
|
@@ -66,6 +66,7 @@ import { parseProvenanceConfig } from "./provenance.js";
|
|
|
66
66
|
import { parseBoundedJsonlStateConfig } from "./bounded-jsonl-state.js";
|
|
67
67
|
import { parseCodingKnowledgeConfig } from "./coding/coding-knowledge-config.js";
|
|
68
68
|
import { parseChatConfig } from "./chat/chat-config.js";
|
|
69
|
+
import { parseSupportPassportConfig } from "./support-passport/config.js";
|
|
69
70
|
import { parseCorrectionIntentConfig, parseFaithfulnessGateConfig } from "./faithfulness-config.js";
|
|
70
71
|
import { parseOfflineSyncExcludes } from "./offline-sync.js";
|
|
71
72
|
import { parseExternalWikiRoots } from "./external-wiki-config.js";
|
|
@@ -469,23 +470,27 @@ export function resolveEnvVars(value: string): string {
|
|
|
469
470
|
}
|
|
470
471
|
|
|
471
472
|
function normalizeOpenaiBaseUrl(value: string | undefined, source: "config" | "env"): string | undefined {
|
|
472
|
-
if (
|
|
473
|
+
if (value === undefined) return undefined;
|
|
473
474
|
const trimmed = value.trim();
|
|
474
|
-
if (trimmed.length === 0)
|
|
475
|
+
if (trimmed.length === 0) {
|
|
476
|
+
throw new Error(`${source === "env" ? "OPENAI_BASE_URL" : "openaiBaseUrl"} must be an absolute HTTP or HTTPS URL`);
|
|
477
|
+
}
|
|
475
478
|
|
|
476
479
|
let parsed: URL;
|
|
477
480
|
try {
|
|
478
481
|
parsed = new URL(trimmed);
|
|
479
482
|
} catch {
|
|
480
|
-
|
|
481
|
-
return undefined;
|
|
483
|
+
throw new Error(`${source === "env" ? "OPENAI_BASE_URL" : "openaiBaseUrl"} must be an absolute HTTP or HTTPS URL`);
|
|
482
484
|
}
|
|
483
485
|
|
|
484
486
|
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
|
|
485
|
-
|
|
486
|
-
|
|
487
|
+
throw new Error(`${source === "env" ? "OPENAI_BASE_URL" : "openaiBaseUrl"} must use HTTP or HTTPS`);
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
if (parsed.username || parsed.password || parsed.search || parsed.hash) {
|
|
491
|
+
throw new Error(
|
|
492
|
+
`${source === "env" ? "OPENAI_BASE_URL" : "openaiBaseUrl"} must not include credentials, query parameters, or fragments`,
|
|
487
493
|
);
|
|
488
|
-
return undefined;
|
|
489
494
|
}
|
|
490
495
|
|
|
491
496
|
if (parsed.protocol === "http:") {
|
|
@@ -1461,9 +1466,12 @@ export function parseConfig(
|
|
|
1461
1466
|
};
|
|
1462
1467
|
|
|
1463
1468
|
let baseUrl: string | undefined;
|
|
1464
|
-
if (
|
|
1469
|
+
if (cfg.openaiBaseUrl !== undefined && typeof cfg.openaiBaseUrl !== "string") {
|
|
1470
|
+
throw new Error("openaiBaseUrl must be a string");
|
|
1471
|
+
}
|
|
1472
|
+
if (cfg.openaiBaseUrl !== undefined) {
|
|
1465
1473
|
baseUrl = normalizeOpenaiBaseUrl(resolveEnvVars(cfg.openaiBaseUrl), "config");
|
|
1466
|
-
} else {
|
|
1474
|
+
} else if (apiKey !== undefined) {
|
|
1467
1475
|
baseUrl = normalizeOpenaiBaseUrl(readEnvVar("OPENAI_BASE_URL"), "env");
|
|
1468
1476
|
}
|
|
1469
1477
|
|
|
@@ -2325,6 +2333,7 @@ export function parseConfig(
|
|
|
2325
2333
|
codexCompat,
|
|
2326
2334
|
codingKnowledge: parseCodingKnowledgeConfig(cfg.codingKnowledge),
|
|
2327
2335
|
chat: parseChatConfig(cfg.chat),
|
|
2336
|
+
supportPassport: parseSupportPassportConfig(cfg.supportPassport),
|
|
2328
2337
|
hourlySummariesEnabled: cfg.hourlySummariesEnabled !== false, // default: true
|
|
2329
2338
|
daySummaryEnabled: cfg.daySummaryEnabled !== false, // default: true
|
|
2330
2339
|
hourlySummaryCronAutoRegister: cfg.hourlySummaryCronAutoRegister === true,
|
|
@@ -15,6 +15,7 @@ import { log } from "../logger.js";
|
|
|
15
15
|
import { resolveNamespaceChildRoot } from "../namespaces/path.js";
|
|
16
16
|
import { isSafeRouteNamespace } from "../routing/engine.js";
|
|
17
17
|
import { StorageManager } from "../storage.js";
|
|
18
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
18
19
|
import type { PluginConfig, MemoryFile } from "../types.js";
|
|
19
20
|
import {
|
|
20
21
|
hasCodexMaterializeSentinel,
|
|
@@ -106,6 +107,7 @@ export async function runCodexMaterialize(
|
|
|
106
107
|
const storage = new StorageManager(nsDir);
|
|
107
108
|
memories = await storage.readAllMemories();
|
|
108
109
|
}
|
|
110
|
+
memories = excludeSupportPassportPrivateMemories(memories);
|
|
109
111
|
|
|
110
112
|
// Intentionally NOT catching here: per the JSDoc contract above,
|
|
111
113
|
// schema-validation and I/O errors from `materializeForNamespace` must
|
|
@@ -32,6 +32,7 @@ import {
|
|
|
32
32
|
} from "./contradiction-review.js";
|
|
33
33
|
import type { LocalLlmClient } from "../local-llm.js";
|
|
34
34
|
import type { FallbackLlmClient } from "../fallback-llm.js";
|
|
35
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
35
36
|
|
|
36
37
|
// ── Types ──────────────────────────────────────────────────────────────────────
|
|
37
38
|
|
|
@@ -450,6 +451,7 @@ async function loadEligibleMemories(storage: StorageManager): Promise<MemoryFile
|
|
|
450
451
|
|
|
451
452
|
return all.filter((mem) => {
|
|
452
453
|
const fm = mem.frontmatter;
|
|
454
|
+
if (isSupportPassportPrivateMemory(mem)) return false;
|
|
453
455
|
// Only active memories (rule 53: explicit ACTIVE_STATUSES set)
|
|
454
456
|
const status = (fm.status as MemoryStatus) ?? "active";
|
|
455
457
|
if (!ACTIVE_STATUSES.has(status)) return false;
|
|
@@ -970,6 +970,48 @@ test("runContradictionScan loads memories from namespace-scoped storage", async
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
|
|
973
|
+
test("runContradictionScan excludes support passport private records", async () => {
|
|
974
|
+
const { dir, cleanup } = await makeTempDir();
|
|
975
|
+
try {
|
|
976
|
+
const visibleA = makeMemory("visible-a", "preference");
|
|
977
|
+
visibleA.frontmatter.entityRef = "entity:shared";
|
|
978
|
+
const visibleB = makeMemory("visible-b", "preference");
|
|
979
|
+
visibleB.frontmatter.entityRef = "entity:shared";
|
|
980
|
+
const passport = makeMemory("passport-card", "preference");
|
|
981
|
+
passport.frontmatter.entityRef = "entity:shared";
|
|
982
|
+
passport.frontmatter.tags = ["support-passport-card"];
|
|
983
|
+
passport.content = "Private support passport statement.";
|
|
984
|
+
|
|
985
|
+
const storage = makeScanStorage([visibleA, passport, visibleB]);
|
|
986
|
+
const config = parseConfig({
|
|
987
|
+
memoryDir: dir,
|
|
988
|
+
contradictionScan: {
|
|
989
|
+
enabled: true,
|
|
990
|
+
maxPairsPerRun: 10,
|
|
991
|
+
topicOverlapFloor: 0,
|
|
992
|
+
similarityFloor: 0,
|
|
993
|
+
},
|
|
994
|
+
});
|
|
995
|
+
|
|
996
|
+
const result = await runContradictionScan({
|
|
997
|
+
storage,
|
|
998
|
+
config,
|
|
999
|
+
memoryDir: dir,
|
|
1000
|
+
localLlm: null,
|
|
1001
|
+
fallbackLlm: null,
|
|
1002
|
+
});
|
|
1003
|
+
|
|
1004
|
+
assert.equal(result.scanned, 2);
|
|
1005
|
+
assert.equal(result.candidates, 1);
|
|
1006
|
+
assert.deepEqual(listPairs(dir, { filter: "all" }).pairs[0]?.memoryIds, [
|
|
1007
|
+
"visible-a",
|
|
1008
|
+
"visible-b",
|
|
1009
|
+
]);
|
|
1010
|
+
} finally {
|
|
1011
|
+
await cleanup();
|
|
1012
|
+
}
|
|
1013
|
+
});
|
|
1014
|
+
|
|
973
1015
|
test("runContradictionScan caps candidates during generation and preserves strategy priority", async () => {
|
|
974
1016
|
const { dir, cleanup } = await makeTempDir();
|
|
975
1017
|
try {
|
|
@@ -48,6 +48,7 @@ import {
|
|
|
48
48
|
import { type ExecutorDeps, type ExecutorMemory } from "./correction-executor.js";
|
|
49
49
|
import { CorrectionService, type CorrectionServiceDeps } from "./correction-service.js";
|
|
50
50
|
import { resolveRecallAuxiliaryCapabilities } from "../capabilities.js";
|
|
51
|
+
import { isSupportPassportPrivateMemory } from "../support-passport/card-projection.js";
|
|
51
52
|
|
|
52
53
|
// ---------------------------------------------------------------------------
|
|
53
54
|
// Public entry: build a fully-wired CorrectionService
|
|
@@ -223,7 +224,7 @@ async function resolveTargetMemories(
|
|
|
223
224
|
for (const ns of namespaces) {
|
|
224
225
|
const storage = await wiring.orchestrator.getStorage(ns);
|
|
225
226
|
const m = await storage.getMemoryById(id);
|
|
226
|
-
if (m) {
|
|
227
|
+
if (m && isEligibleCorrectionCandidate(m)) {
|
|
227
228
|
found = toCandidate(m, ns, 1);
|
|
228
229
|
break;
|
|
229
230
|
}
|
|
@@ -261,7 +262,11 @@ async function expandEntityNeighbors(
|
|
|
261
262
|
const storage = await wiring.orchestrator.getStorage(ns);
|
|
262
263
|
const all = await storage.readAllMemories();
|
|
263
264
|
for (const m of all) {
|
|
264
|
-
if (
|
|
265
|
+
if (
|
|
266
|
+
seedIds.includes(m.frontmatter.id) &&
|
|
267
|
+
m.frontmatter.entityRef &&
|
|
268
|
+
isEligibleCorrectionCandidate(m)
|
|
269
|
+
) {
|
|
265
270
|
seedRefs.add(m.frontmatter.entityRef);
|
|
266
271
|
}
|
|
267
272
|
}
|
|
@@ -859,6 +864,7 @@ function toCandidate(m: MemoryFile, namespace: string, score: number): PlannerCa
|
|
|
859
864
|
* stays consistent with the rescope/retire apply-time guards.
|
|
860
865
|
*/
|
|
861
866
|
function isEligibleCorrectionCandidate(m: MemoryFile): boolean {
|
|
867
|
+
if (isSupportPassportPrivateMemory(m)) return false;
|
|
862
868
|
if (m.frontmatter.status && m.frontmatter.status !== "active") return false;
|
|
863
869
|
if (typeof m.frontmatter.archivedAt === "string" && m.frontmatter.archivedAt.length > 0) return false;
|
|
864
870
|
return true;
|
|
@@ -86,6 +86,13 @@ test("#1672 item 2: isEligibleCorrectionCandidate rejects archived memory with n
|
|
|
86
86
|
assert.equal(isEligibleCorrectionCandidate(m), false);
|
|
87
87
|
});
|
|
88
88
|
|
|
89
|
+
test("support passport records are not correction candidates", () => {
|
|
90
|
+
for (const tag of ["support-passport-card", "support-passport-audit"]) {
|
|
91
|
+
const memory = fakeMemoryFile({ id: tag, status: "active", tags: [tag] });
|
|
92
|
+
assert.equal(isEligibleCorrectionCandidate(memory), false);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
89
96
|
// ---------------------------------------------------------------------------
|
|
90
97
|
// item 3: contentHash recomputed on edit
|
|
91
98
|
// ---------------------------------------------------------------------------
|
|
@@ -52,6 +52,7 @@ type StoredMemory = {
|
|
|
52
52
|
category: string;
|
|
53
53
|
status?: string;
|
|
54
54
|
tags?: string[];
|
|
55
|
+
structuredAttributes?: Record<string, string>;
|
|
55
56
|
sourceConnector?: string;
|
|
56
57
|
blockedBy?: string;
|
|
57
58
|
};
|
|
@@ -1147,3 +1148,26 @@ test("explicit capture scans active rows when the blocked index is unavailable",
|
|
|
1147
1148
|
assert.equal(result.duplicateOf, "active-existing");
|
|
1148
1149
|
assert.equal(probe.envelopes.length, 0);
|
|
1149
1150
|
});
|
|
1151
|
+
|
|
1152
|
+
test("explicit capture never deduplicates against private support-passport records", async () => {
|
|
1153
|
+
const probe = createInlineCaptureProcessorProbe();
|
|
1154
|
+
const candidate = validateExplicitCaptureInput({
|
|
1155
|
+
content: "The same words can exist in an owner-controlled passport card.",
|
|
1156
|
+
category: "preference",
|
|
1157
|
+
});
|
|
1158
|
+
probe.memories.push({
|
|
1159
|
+
frontmatter: {
|
|
1160
|
+
id: "private-passport-card",
|
|
1161
|
+
category: "preference",
|
|
1162
|
+
status: "active",
|
|
1163
|
+
structuredAttributes: { "support-passport-owner": "private-owner" },
|
|
1164
|
+
},
|
|
1165
|
+
content: candidate.content,
|
|
1166
|
+
});
|
|
1167
|
+
|
|
1168
|
+
const result = await persistExplicitCapture(probe.orchestrator, candidate, "memory_store");
|
|
1169
|
+
|
|
1170
|
+
assert.equal(result.duplicateOf, undefined);
|
|
1171
|
+
assert.equal(probe.envelopes.length, 1);
|
|
1172
|
+
assert.notEqual(result.id, "private-passport-card");
|
|
1173
|
+
});
|
package/src/explicit-capture.ts
CHANGED
|
@@ -12,6 +12,7 @@ import {
|
|
|
12
12
|
normalizeExplicitCaptureContent,
|
|
13
13
|
} from "./storage/tombstone-blocked-capture-index.js";
|
|
14
14
|
import type { StorageManager } from "./storage.js";
|
|
15
|
+
import { isSupportPassportPrivateMemory } from "./support-passport/card-projection.js";
|
|
15
16
|
|
|
16
17
|
export type ExplicitCaptureInput = {
|
|
17
18
|
content: string;
|
|
@@ -480,6 +481,7 @@ async function findDuplicateExplicitCapture(
|
|
|
480
481
|
const existing = [...hotMemories, ...coldMemories];
|
|
481
482
|
const normalizedCandidate = normalizeExplicitCaptureContent(candidate.content);
|
|
482
483
|
const match = existing.find((memory) => {
|
|
484
|
+
if (isSupportPassportPrivateMemory(memory)) return false;
|
|
483
485
|
const status = memory.frontmatter.status ?? "active";
|
|
484
486
|
if (status !== "active" && (status !== "pending_review" || !memory.frontmatter.blockedBy)) {
|
|
485
487
|
return false;
|
package/src/fallback-llm.test.ts
CHANGED
|
@@ -4,6 +4,7 @@ import test from "node:test";
|
|
|
4
4
|
|
|
5
5
|
import { FallbackLlmClient, gatewayTaskChainOptions } from "./fallback-llm.js";
|
|
6
6
|
import { __codexCliFallbackTestHooks } from "./cli-fallback.js";
|
|
7
|
+
import { initLogger, resetLogger } from "./logger.js";
|
|
7
8
|
import { clearModelsJsonCache, __setModelsJsonForTest } from "./models-json.js";
|
|
8
9
|
import {
|
|
9
10
|
__setGatewayRuntimeAuthForModelForTest,
|
|
@@ -1654,6 +1655,59 @@ test("fallback llm does NOT append default for a primary-less override that fall
|
|
|
1654
1655
|
}
|
|
1655
1656
|
});
|
|
1656
1657
|
|
|
1658
|
+
test("fallback llm redacts provider error bodies for sensitive calls", { concurrency: false }, async () => {
|
|
1659
|
+
clearModelsJsonCache();
|
|
1660
|
+
clearSecretCache();
|
|
1661
|
+
const privateMarker = "private-support-note-must-not-log";
|
|
1662
|
+
const lines: string[] = [];
|
|
1663
|
+
initLogger(
|
|
1664
|
+
{
|
|
1665
|
+
info: (message) => lines.push(message),
|
|
1666
|
+
warn: (message) => lines.push(message),
|
|
1667
|
+
error: (message) => lines.push(message),
|
|
1668
|
+
debug: (message) => lines.push(message),
|
|
1669
|
+
},
|
|
1670
|
+
true,
|
|
1671
|
+
{ timestamps: false },
|
|
1672
|
+
);
|
|
1673
|
+
const llm = new FallbackLlmClient({
|
|
1674
|
+
agents: { defaults: { model: { primary: "private-provider/test-model" } } },
|
|
1675
|
+
models: {
|
|
1676
|
+
providers: {
|
|
1677
|
+
"private-provider": {
|
|
1678
|
+
baseUrl: "https://private-provider.example/v1",
|
|
1679
|
+
api: "openai-completions",
|
|
1680
|
+
apiKey: "test-key",
|
|
1681
|
+
models: [],
|
|
1682
|
+
},
|
|
1683
|
+
},
|
|
1684
|
+
},
|
|
1685
|
+
});
|
|
1686
|
+
const originalFetch = globalThis.fetch;
|
|
1687
|
+
globalThis.fetch = (async () =>
|
|
1688
|
+
new Response(JSON.stringify({ error: { message: privateMarker } }), {
|
|
1689
|
+
status: 400,
|
|
1690
|
+
headers: { "content-type": "application/json" },
|
|
1691
|
+
})) as typeof fetch;
|
|
1692
|
+
|
|
1693
|
+
try {
|
|
1694
|
+
assert.equal(
|
|
1695
|
+
await llm.chatCompletion(
|
|
1696
|
+
[{ role: "user", content: privateMarker }],
|
|
1697
|
+
{ redactProviderErrors: true },
|
|
1698
|
+
),
|
|
1699
|
+
null,
|
|
1700
|
+
);
|
|
1701
|
+
assert.equal(lines.join("\n").includes(privateMarker), false);
|
|
1702
|
+
assert.match(lines.join("\n"), /provider error details redacted/);
|
|
1703
|
+
} finally {
|
|
1704
|
+
globalThis.fetch = originalFetch;
|
|
1705
|
+
resetLogger();
|
|
1706
|
+
clearModelsJsonCache();
|
|
1707
|
+
clearSecretCache();
|
|
1708
|
+
}
|
|
1709
|
+
});
|
|
1710
|
+
|
|
1657
1711
|
function disableGatewaySecretResolverForTest(): void {
|
|
1658
1712
|
__setGatewayResolverForTest(async () => null);
|
|
1659
1713
|
}
|
package/src/fallback-llm.ts
CHANGED
|
@@ -23,12 +23,22 @@ export interface FallbackLlmOptions {
|
|
|
23
23
|
maxTokens?: number;
|
|
24
24
|
timeoutMs?: number;
|
|
25
25
|
signal?: AbortSignal;
|
|
26
|
+
/** Set the Responses API storage policy. Other transports ignore this value. */
|
|
27
|
+
store?: boolean;
|
|
28
|
+
/** Request strict JSON output when a route uses the Responses API. */
|
|
29
|
+
responsesJsonSchema?: { name: string; schema: Record<string, unknown> };
|
|
30
|
+
/** Hide provider error details that could echo private request content. */
|
|
31
|
+
redactProviderErrors?: boolean;
|
|
26
32
|
/** Explicit "provider/model" override to try before the configured chain. */
|
|
27
33
|
model?: string;
|
|
28
34
|
/** Explicit model chain override to use instead of the configured agent/default chain. */
|
|
29
35
|
modelChain?: AgentPersonaModelConfig;
|
|
36
|
+
/** Append the gateway default chain after an explicit model chain. */
|
|
37
|
+
includeDefaultModelFallback?: boolean;
|
|
30
38
|
/** Override which agent persona's model chain to use (by ID from agents.list[]). */
|
|
31
39
|
agentId?: string;
|
|
40
|
+
/** Reject a transport-successful response and continue through the configured model chain. */
|
|
41
|
+
acceptResponse?: (response: FallbackLlmResponse) => boolean;
|
|
32
42
|
}
|
|
33
43
|
|
|
34
44
|
export interface FallbackLlmAvailabilityOptions {
|
|
@@ -177,7 +187,12 @@ export class FallbackLlmClient {
|
|
|
177
187
|
messages: Array<{ role: "system" | "user" | "assistant"; content: string }>,
|
|
178
188
|
options: FallbackLlmOptions = {},
|
|
179
189
|
): Promise<FallbackLlmResponse | null> {
|
|
180
|
-
const models = this.getModelChain(
|
|
190
|
+
const models = this.getModelChain(
|
|
191
|
+
options.agentId,
|
|
192
|
+
options.model,
|
|
193
|
+
options.modelChain,
|
|
194
|
+
options.includeDefaultModelFallback,
|
|
195
|
+
);
|
|
181
196
|
if (models.length === 0) {
|
|
182
197
|
log.warn("fallback LLM: no models configured in gateway");
|
|
183
198
|
return null;
|
|
@@ -186,6 +201,7 @@ export class FallbackLlmClient {
|
|
|
186
201
|
const runChain = async (
|
|
187
202
|
runOptions: FallbackLlmOptions,
|
|
188
203
|
): Promise<FallbackLlmResponse | null> => {
|
|
204
|
+
let lastRejectedResponse: FallbackLlmResponse | null = null;
|
|
189
205
|
// Try each model in the chain
|
|
190
206
|
for (let i = 0; i < models.length; i++) {
|
|
191
207
|
if (runOptions.signal?.aborted) {
|
|
@@ -197,27 +213,37 @@ export class FallbackLlmClient {
|
|
|
197
213
|
try {
|
|
198
214
|
const result = await this.tryModel(model, messages, runOptions);
|
|
199
215
|
if (result) {
|
|
200
|
-
|
|
201
|
-
log.debug(`fallback LLM: succeeded using ${model.modelString} (fallback ${i})`);
|
|
202
|
-
}
|
|
203
|
-
return {
|
|
216
|
+
const response = {
|
|
204
217
|
content: result.content,
|
|
205
218
|
modelUsed: model.modelString,
|
|
206
219
|
usage: result.usage,
|
|
207
220
|
};
|
|
221
|
+
if (runOptions.acceptResponse && !runOptions.acceptResponse(response)) {
|
|
222
|
+
lastRejectedResponse = response;
|
|
223
|
+
log.debug(`fallback LLM: ${model.modelString} returned rejected output, trying next...`);
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
if (isFallback) {
|
|
227
|
+
log.debug(`fallback LLM: succeeded using ${model.modelString} (fallback ${i})`);
|
|
228
|
+
}
|
|
229
|
+
return response;
|
|
208
230
|
}
|
|
209
231
|
} catch (err) {
|
|
210
232
|
if (runOptions.signal?.aborted) {
|
|
211
233
|
throw abortReason(runOptions.signal);
|
|
212
234
|
}
|
|
213
|
-
const errorMsg =
|
|
235
|
+
const errorMsg = runOptions.redactProviderErrors
|
|
236
|
+
? "provider error details redacted"
|
|
237
|
+
: err instanceof Error
|
|
238
|
+
? err.message
|
|
239
|
+
: String(err);
|
|
214
240
|
log.debug(`fallback LLM: ${model.modelString} failed (${errorMsg}), trying next...`);
|
|
215
241
|
// Continue to next model in chain
|
|
216
242
|
}
|
|
217
243
|
}
|
|
218
244
|
|
|
219
245
|
log.warn(`fallback LLM: all ${models.length} models in chain failed`);
|
|
220
|
-
return
|
|
246
|
+
return lastRejectedResponse;
|
|
221
247
|
};
|
|
222
248
|
|
|
223
249
|
if (typeof options.timeoutMs === "number") {
|
|
@@ -301,7 +327,12 @@ export class FallbackLlmClient {
|
|
|
301
327
|
// Disambiguate via the resolved model chain so the retry layer can pick
|
|
302
328
|
// the right failure class.
|
|
303
329
|
const hasModels =
|
|
304
|
-
this.getModelChain(
|
|
330
|
+
this.getModelChain(
|
|
331
|
+
options.agentId,
|
|
332
|
+
options.model,
|
|
333
|
+
options.modelChain,
|
|
334
|
+
options.includeDefaultModelFallback,
|
|
335
|
+
).length > 0;
|
|
305
336
|
return { result: null, failureReason: hasModels ? "http_error" : "no_models" };
|
|
306
337
|
}
|
|
307
338
|
|
|
@@ -335,6 +366,7 @@ export class FallbackLlmClient {
|
|
|
335
366
|
agentId?: string,
|
|
336
367
|
modelOverride?: string,
|
|
337
368
|
modelChainOverride?: AgentPersonaModelConfig,
|
|
369
|
+
includeDefaultModelFallback = true,
|
|
338
370
|
): ModelRef[] {
|
|
339
371
|
const chain: ModelRef[] = [];
|
|
340
372
|
const providers = this.gatewayConfig?.models?.providers ?? {};
|
|
@@ -402,7 +434,7 @@ export class FallbackLlmClient {
|
|
|
402
434
|
// the SAME activation condition chain resolution uses above — so a
|
|
403
435
|
// primary-less override (e.g. {}) that falls through to a persona/default
|
|
404
436
|
// chain does NOT get the default appended (gotcha #39). Issue #1365 / PR #1370.
|
|
405
|
-
if (modelChainOverride?.primary && modelStrings.length > 0) {
|
|
437
|
+
if (includeDefaultModelFallback && modelChainOverride?.primary && modelStrings.length > 0) {
|
|
406
438
|
// Append the FULL gateway default chain (primary + fallbacks), not just
|
|
407
439
|
// the primary — if the default primary is also unreachable, a listed
|
|
408
440
|
// default fallback may still succeed (cursor review #1425).
|
|
@@ -858,6 +890,19 @@ export class FallbackLlmClient {
|
|
|
858
890
|
...buildChatCompletionTemperature(modelId, options.temperature ?? 0.3, {
|
|
859
891
|
assumeOpenAI: shouldAssumeOpenAiChatCompletions(config.baseUrl),
|
|
860
892
|
}),
|
|
893
|
+
...(options.store === undefined ? {} : { store: options.store }),
|
|
894
|
+
...(options.responsesJsonSchema
|
|
895
|
+
? {
|
|
896
|
+
text: {
|
|
897
|
+
format: {
|
|
898
|
+
type: "json_schema",
|
|
899
|
+
name: options.responsesJsonSchema.name,
|
|
900
|
+
strict: true,
|
|
901
|
+
schema: options.responsesJsonSchema.schema,
|
|
902
|
+
},
|
|
903
|
+
},
|
|
904
|
+
}
|
|
905
|
+
: {}),
|
|
861
906
|
};
|
|
862
907
|
if (instructions.length > 0) {
|
|
863
908
|
body.instructions = instructions;
|
package/src/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export {
|
|
|
48
48
|
defaultWorkspaceDir,
|
|
49
49
|
} from "./orchestrator.js";
|
|
50
50
|
export * from "./memory-projection-format.js";
|
|
51
|
+
export { searchWithGenericExclusion } from "./access-memory-search-fanout.js";
|
|
51
52
|
export * from "./model-registry.js";
|
|
52
53
|
export * from "./contradiction/index.js";
|
|
53
54
|
|
|
@@ -404,6 +405,7 @@ export {
|
|
|
404
405
|
type RemnicAdminModelOption,
|
|
405
406
|
} from "./access-http.js";
|
|
406
407
|
export { EngramMcpServer } from "./access-mcp.js";
|
|
408
|
+
export * from "./support-passport/index.js";
|
|
407
409
|
|
|
408
410
|
// Remnic Relay — host-agnostic mission evidence and receipt contract.
|
|
409
411
|
export {
|
|
@@ -873,6 +875,7 @@ export {
|
|
|
873
875
|
type OfflineSyncDeletionRevision,
|
|
874
876
|
type OfflineSyncFileDeleteTarget,
|
|
875
877
|
type OfflineSyncFileDigest,
|
|
878
|
+
type OfflineSyncExcludeFile,
|
|
876
879
|
type OfflineSyncFileRecord,
|
|
877
880
|
type OfflineSyncFileContentChunk,
|
|
878
881
|
type OfflineSyncRecordDeletionRevision,
|
|
@@ -13,6 +13,7 @@ import {
|
|
|
13
13
|
|
|
14
14
|
import { LocalLlmClient } from "./local-llm.js";
|
|
15
15
|
import { ChatTransport } from "./local-llm-transport.js";
|
|
16
|
+
import { initLogger, resetLogger } from "./logger.js";
|
|
16
17
|
import type { PluginConfig } from "./types.js";
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -511,3 +512,44 @@ test("availability probes stop after the caller aborts", async () => {
|
|
|
511
512
|
await new Promise<void>((resolve) => server.close(() => resolve()));
|
|
512
513
|
}
|
|
513
514
|
});
|
|
515
|
+
|
|
516
|
+
test("sensitive local requests do not log provider error bodies", { concurrency: false }, async () => {
|
|
517
|
+
const original = globalThis.fetch;
|
|
518
|
+
const privateMarker = "private-local-support-note-must-not-log";
|
|
519
|
+
const privateStatusText = "private-provider-status-must-not-log";
|
|
520
|
+
const lines: string[] = [];
|
|
521
|
+
initLogger(
|
|
522
|
+
{
|
|
523
|
+
info: (message) => lines.push(message),
|
|
524
|
+
warn: (message) => lines.push(message),
|
|
525
|
+
error: (message) => lines.push(message),
|
|
526
|
+
debug: (message) => lines.push(message),
|
|
527
|
+
},
|
|
528
|
+
true,
|
|
529
|
+
{ timestamps: false },
|
|
530
|
+
);
|
|
531
|
+
globalThis.fetch = (async () =>
|
|
532
|
+
new Response(JSON.stringify({ error: { message: privateMarker } }), {
|
|
533
|
+
status: 400,
|
|
534
|
+
statusText: privateStatusText,
|
|
535
|
+
headers: { "content-type": "application/json" },
|
|
536
|
+
})) as typeof fetch;
|
|
537
|
+
const client = new LocalLlmClient(createConfig());
|
|
538
|
+
|
|
539
|
+
try {
|
|
540
|
+
primeClient(client);
|
|
541
|
+
assert.equal(
|
|
542
|
+
await client.chatCompletion(
|
|
543
|
+
[{ role: "user", content: privateMarker }],
|
|
544
|
+
{ redactProviderErrors: true },
|
|
545
|
+
),
|
|
546
|
+
null,
|
|
547
|
+
);
|
|
548
|
+
assert.equal(lines.join("\n").includes(privateMarker), false);
|
|
549
|
+
assert.equal(lines.join("\n").includes(privateStatusText), false);
|
|
550
|
+
} finally {
|
|
551
|
+
globalThis.fetch = original;
|
|
552
|
+
resetLogger();
|
|
553
|
+
await dispatcherOf(client).close();
|
|
554
|
+
}
|
|
555
|
+
});
|
package/src/local-llm.ts
CHANGED
|
@@ -235,8 +235,8 @@ interface LocalLlmChatCompletionOptions {
|
|
|
235
235
|
disableThinking?: boolean;
|
|
236
236
|
priority?: LocalLlmRequestPriority;
|
|
237
237
|
signal?: AbortSignal;
|
|
238
|
+
redactProviderErrors?: boolean;
|
|
238
239
|
}
|
|
239
|
-
|
|
240
240
|
interface LocalLlmQueuedRequest {
|
|
241
241
|
messages: Array<{ role: string; content: string }>;
|
|
242
242
|
options: LocalLlmChatCompletionOptions;
|
|
@@ -917,7 +917,7 @@ export class LocalLlmClient {
|
|
|
917
917
|
enqueuedAtMs: next.enqueuedAtMs,
|
|
918
918
|
});
|
|
919
919
|
} catch (err) {
|
|
920
|
-
log.warn(`local LLM queue drain failed open: ${err instanceof Error ? err.message : String(err)}`);
|
|
920
|
+
log.warn(`local LLM queue drain failed open: ${next.options.redactProviderErrors ? "provider error details redacted" : err instanceof Error ? err.message : String(err)}`);
|
|
921
921
|
}
|
|
922
922
|
next.resolve(result);
|
|
923
923
|
} finally {
|
|
@@ -1071,7 +1071,7 @@ export class LocalLlmClient {
|
|
|
1071
1071
|
break;
|
|
1072
1072
|
}
|
|
1073
1073
|
if (response && !response.ok) {
|
|
1074
|
-
log.debug(`local LLM failed to read ${response.status} response body: ${error.message}`);
|
|
1074
|
+
log.debug(`local LLM failed to read ${response.status} response body: ${options.redactProviderErrors ? "details redacted" : error.message}`);
|
|
1075
1075
|
} else {
|
|
1076
1076
|
response = null;
|
|
1077
1077
|
if (!isAbortError(err)) throw err;
|
|
@@ -1132,10 +1132,10 @@ export class LocalLlmClient {
|
|
|
1132
1132
|
const parsed = JSON.parse(responseBody) as { error?: { message?: string } };
|
|
1133
1133
|
reason = parsed?.error?.message ? ` — ${parsed.error.message}` : "";
|
|
1134
1134
|
} catch {
|
|
1135
|
-
log.debug(`local LLM error body: ${responseBody.slice(0, 500)}`);
|
|
1135
|
+
if (!options.redactProviderErrors) log.debug(`local LLM error body: ${responseBody.slice(0, 500)}`);
|
|
1136
1136
|
}
|
|
1137
1137
|
log.warn(
|
|
1138
|
-
`local LLM request failed: ${response.status} ${response.statusText}${reason} ` +
|
|
1138
|
+
`local LLM request failed: ${response.status}${options.redactProviderErrors ? "" : ` ${response.statusText}${reason}`} ` +
|
|
1139
1139
|
`(op=${operation}, model=${this.config.localLlmModel}, url=${chatUrl}, promptChars=${promptChars}, maxTokens=${requestBody.max_tokens as number})`,
|
|
1140
1140
|
);
|
|
1141
1141
|
const nonRecoverableReason =
|
|
@@ -1187,7 +1187,7 @@ export class LocalLlmClient {
|
|
|
1187
1187
|
const msg = data.choices?.[0]?.message;
|
|
1188
1188
|
const content = msg?.content || msg?.reasoning_content || "";
|
|
1189
1189
|
if (!content) {
|
|
1190
|
-
log.warn(`local LLM returned empty content. choices=${JSON.stringify(data.choices)?.slice(0, 200)}`);
|
|
1190
|
+
log.warn(`local LLM returned empty content.${options.redactProviderErrors ? "" : ` choices=${JSON.stringify(data.choices)?.slice(0, 200)}`}`);
|
|
1191
1191
|
return null;
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
@@ -1216,11 +1216,11 @@ export class LocalLlmClient {
|
|
|
1216
1216
|
const durationMs = Date.now() - startedAtMs;
|
|
1217
1217
|
if (isAbortError(err)) {
|
|
1218
1218
|
log.warn(
|
|
1219
|
-
`local LLM request aborted: op=${operation} timeoutMs=${options.timeoutMs ?? this.config.localLlmTimeoutMs} model=${this.config.localLlmModel} durationMs=${durationMs} error=${errMsg}`,
|
|
1219
|
+
`local LLM request aborted: op=${operation} timeoutMs=${options.timeoutMs ?? this.config.localLlmTimeoutMs} model=${this.config.localLlmModel} durationMs=${durationMs} error=${options.redactProviderErrors ? "provider error details redacted" : errMsg}`,
|
|
1220
1220
|
);
|
|
1221
1221
|
return null;
|
|
1222
1222
|
}
|
|
1223
|
-
log.warn(`local LLM request error: op=${operation} error=${errMsg}`);
|
|
1223
|
+
log.warn(`local LLM request error: op=${operation} error=${options.redactProviderErrors ? "provider error details redacted" : errMsg}`);
|
|
1224
1224
|
this.isAvailable = false; // Mark as unavailable on non-abort errors
|
|
1225
1225
|
const nonRecoverableReason = extractNonRecoverableBackendReason(errMsg);
|
|
1226
1226
|
if (nonRecoverableReason) {
|
|
@@ -34,6 +34,7 @@ import {
|
|
|
34
34
|
applyUtilityPromotionRuntimePolicy,
|
|
35
35
|
loadUtilityRuntimeValues,
|
|
36
36
|
} from "../utility-runtime.js";
|
|
37
|
+
import { excludeSupportPassportPrivateMemories } from "../support-passport/card-projection.js";
|
|
37
38
|
|
|
38
39
|
export const FIRST_START_DEMOTION_CAP = 50;
|
|
39
40
|
export const LIFECYCLE_INIT_DONE_MARKER = ".lifecycle-init-done";
|
|
@@ -243,7 +244,7 @@ export async function runFirstStartMigration(
|
|
|
243
244
|
return abortedResult();
|
|
244
245
|
}
|
|
245
246
|
|
|
246
|
-
const hotMemories = await storage.readAllMemories();
|
|
247
|
+
const hotMemories = excludeSupportPassportPrivateMemories(await storage.readAllMemories());
|
|
247
248
|
if (signal?.aborted) {
|
|
248
249
|
return abortedResult();
|
|
249
250
|
}
|
|
@@ -51,3 +51,28 @@ test("governance restore manifest pre-marks actions applied before mutation", as
|
|
|
51
51
|
await rm(memoryDir, { recursive: true, force: true });
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
|
+
|
|
55
|
+
test("governance excludes support-passport private records", async () => {
|
|
56
|
+
const memoryDir = await mkdtemp(path.join(os.tmpdir(), "remnic-governance-passport-"));
|
|
57
|
+
try {
|
|
58
|
+
const storage = new StorageManager(memoryDir);
|
|
59
|
+
const { id } = await storage.writeMemory("preference", "Give me advance notice.", {
|
|
60
|
+
source: "support-passport",
|
|
61
|
+
tags: ["support-passport-card"],
|
|
62
|
+
confidence: 0.9,
|
|
63
|
+
});
|
|
64
|
+
await storage.updateMemoryFrontmatter(id, { verificationState: "disputed" });
|
|
65
|
+
|
|
66
|
+
const result = await runMemoryGovernance({
|
|
67
|
+
memoryDir,
|
|
68
|
+
mode: "apply",
|
|
69
|
+
now: new Date("2026-08-13T12:00:00.000Z"),
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
assert.equal(result.summary.scannedMemories, 0);
|
|
73
|
+
assert.deepEqual(result.proposedActions, []);
|
|
74
|
+
assert.equal((await storage.getMemoryById(id))?.frontmatter.status, "active");
|
|
75
|
+
} finally {
|
|
76
|
+
await rm(memoryDir, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
});
|