@remnic/core 9.54.8 → 9.55.0
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 +11 -11
- package/dist/access-admin-ops-surface.js +44 -43
- package/dist/access-authorization-probe.d.ts +11 -11
- package/dist/access-authorization-probe.js +45 -44
- package/dist/access-boundary.d.ts +11 -11
- package/dist/access-boundary.js +44 -43
- package/dist/access-cli.js +114 -112
- 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 +11 -11
- package/dist/access-extraction-force-flush.js +44 -43
- package/dist/access-health-types.d.ts +1 -1
- package/dist/access-http-lcm-compaction.d.ts +11 -11
- package/dist/access-http-lifecycle-flush.d.ts +11 -11
- package/dist/access-http-offline-stream.d.ts +11 -11
- package/dist/access-http-query.js +44 -43
- package/dist/access-http.d.ts +12 -12
- package/dist/access-http.js +58 -57
- package/dist/access-identity-continuity-surface.d.ts +9 -9
- package/dist/access-identity-continuity-surface.js +44 -43
- package/dist/access-lcm-surface.d.ts +11 -11
- package/dist/access-lcm-surface.js +44 -43
- package/dist/access-mcp.d.ts +11 -11
- package/dist/access-mcp.js +53 -52
- package/dist/access-memory-search-fanout.d.ts +2 -2
- package/dist/access-memory-search-fanout.js +3 -3
- package/dist/{access-namespace-preflight-CCNn_6NE.d.ts → access-namespace-preflight-Bpt-SYP0.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +3 -3
- package/dist/access-namespace-preflight.js +44 -43
- package/dist/access-observe-write-surface.d.ts +11 -11
- package/dist/access-observe-write-surface.js +44 -43
- package/dist/access-offline-manifest.d.ts +9 -9
- package/dist/access-offline-manifest.js +9 -9
- package/dist/access-operations-batch.js +48 -47
- package/dist/access-operations.d.ts +14 -14
- package/dist/access-operations.js +52 -51
- package/dist/access-recall-concurrency.d.ts +11 -11
- package/dist/access-recall-concurrency.js +44 -43
- package/dist/access-recall-response.d.ts +11 -11
- package/dist/access-recall-response.js +44 -43
- package/dist/access-recall-surface.d.ts +11 -11
- package/dist/access-recall-surface.js +44 -43
- package/dist/access-schema.d.ts +88 -88
- package/dist/access-schema.js +3 -3
- package/dist/{access-service-PEduVt8q.d.ts → access-service-4DO8XMq6.d.ts} +71 -71
- package/dist/access-service-helpers.d.ts +11 -11
- package/dist/access-service.d.ts +11 -11
- package/dist/access-service.js +44 -43
- package/dist/access-surface-catalog.d.ts +11 -11
- package/dist/access-surface-catalog.js +46 -45
- 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 +1 -1
- package/dist/active-memory-bridge.js +3 -3
- 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/ambient-provenance.d.ts +1 -1
- package/dist/artifact-search.d.ts +1 -1
- package/dist/{auto-sync-NR3GPCOA.js → auto-sync-5HVRCMGZ.js} +3 -3
- 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-window.d.ts +2 -2
- package/dist/briefing.d.ts +2 -2
- package/dist/briefing.js +14 -13
- 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 +6 -5
- package/dist/bulk-import/index.d.ts +3 -3
- package/dist/calibration.d.ts +1 -1
- package/dist/capabilities.d.ts +8 -8
- package/dist/capabilities.js +1 -1
- package/dist/{capsule-crypto-7FJQINUR.js → capsule-crypto-YO5QJ6L3.js} +2 -2
- package/dist/{catalog-DGFf8mD9.d.ts → catalog-BasnO3Bw.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +1 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +1 -1
- package/dist/causal-consolidation.js +17 -16
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +1 -1
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-I6WYQSX4.js → chunk-2NKY7OC6.js} +14 -2
- package/dist/chunk-2NKY7OC6.js.map +1 -0
- package/dist/{chunk-E2GZSFR5.js → chunk-2YREVL4T.js} +2 -2
- package/dist/{chunk-PG4QBPVG.js → chunk-3VFVQDZO.js} +8 -4
- package/dist/chunk-3VFVQDZO.js.map +1 -0
- package/dist/{chunk-KM55SMLG.js → chunk-4KM3V6VS.js} +2 -2
- package/dist/{chunk-HAEU3ZW7.js → chunk-4OW2T32G.js} +2 -2
- package/dist/{chunk-PCRHFB75.js → chunk-4QFCAKNM.js} +1 -1
- package/dist/{chunk-OS5DYALF.js → chunk-4THNU7OF.js} +422 -47
- package/dist/chunk-4THNU7OF.js.map +1 -0
- package/dist/{chunk-76JJSXK7.js → chunk-5QHDXMXP.js} +1 -1
- package/dist/chunk-5QHDXMXP.js.map +1 -0
- package/dist/{chunk-OWC42MDT.js → chunk-5ZIWRMZM.js} +2 -2
- package/dist/{chunk-GWFSVJ4P.js → chunk-6KTXE6A3.js} +2 -2
- package/dist/{chunk-5V64M56S.js → chunk-6P2NUVM5.js} +26 -24
- package/dist/chunk-6P2NUVM5.js.map +1 -0
- package/dist/chunk-6Q3ZTEF6.js +54 -0
- package/dist/chunk-6Q3ZTEF6.js.map +1 -0
- package/dist/{chunk-P2FA65P2.js → chunk-7NSC4IVA.js} +2 -2
- package/dist/{chunk-QC6BILS7.js → chunk-7PKNOXYB.js} +11 -11
- package/dist/{chunk-AHVEHR6K.js → chunk-7ZNJN5WZ.js} +13 -1
- package/dist/chunk-7ZNJN5WZ.js.map +1 -0
- package/dist/{chunk-RZRUV6N2.js → chunk-ANMIOQPU.js} +2 -2
- package/dist/{chunk-RPSYDM6C.js → chunk-BPWZDHFM.js} +2 -2
- package/dist/{chunk-JKW663ZN.js → chunk-BVRREV3N.js} +2 -2
- package/dist/{chunk-XXRRHING.js → chunk-BWJMBJCY.js} +24 -15
- package/dist/chunk-BWJMBJCY.js.map +1 -0
- package/dist/{chunk-2NLLXCJG.js → chunk-BXLOS5AJ.js} +2 -2
- package/dist/{chunk-ELXP665P.js → chunk-CKSEJD7K.js} +2 -2
- package/dist/{chunk-4GE3NA5I.js → chunk-CME347TM.js} +2 -2
- package/dist/{chunk-BGLY7EEM.js → chunk-CMRUIKVA.js} +3 -3
- package/dist/{chunk-HGJ6NJ4E.js → chunk-D4LVHPOA.js} +2 -2
- package/dist/{chunk-YK6BDDHP.js → chunk-DFEODULB.js} +2 -2
- package/dist/{chunk-X7Y7WX73.js → chunk-DQEMWVMT.js} +1 -1
- package/dist/{chunk-XWZ6KOL6.js → chunk-E57E5SCS.js} +2 -2
- package/dist/{chunk-M23RF3LJ.js → chunk-ER4BLWI6.js} +2 -2
- package/dist/{chunk-47J4EDGR.js → chunk-F7M36OG2.js} +3 -3
- package/dist/{chunk-MTF5EFFF.js → chunk-FK7T55BA.js} +60 -41
- package/dist/{chunk-MTF5EFFF.js.map → chunk-FK7T55BA.js.map} +1 -1
- package/dist/{chunk-ZUJW327U.js → chunk-FONW766A.js} +2 -2
- package/dist/{chunk-FEBHRT2I.js → chunk-FR3FNPCJ.js} +3 -3
- package/dist/{chunk-G6DFSS6A.js → chunk-GUNIXT36.js} +2 -2
- package/dist/{chunk-K2UGPTYY.js → chunk-H6ZXNH5I.js} +2 -2
- package/dist/{chunk-Z463UYI6.js → chunk-HC55YCNK.js} +2 -2
- package/dist/{chunk-IEQCHXUS.js → chunk-HQ2VGCGP.js} +14 -14
- package/dist/{chunk-ZXGKQQ3L.js → chunk-HXXGZ4KV.js} +1 -1
- package/dist/{chunk-YZFPEHXF.js → chunk-HYVBJLEK.js} +5 -5
- package/dist/{chunk-FPKKFDO4.js → chunk-IFFW25NG.js} +246 -118
- package/dist/chunk-IFFW25NG.js.map +1 -0
- package/dist/{chunk-3GD2HFR6.js → chunk-IGWVMA4Y.js} +2 -2
- package/dist/{chunk-FONWBCVY.js → chunk-IKT6ZVO7.js} +3 -3
- package/dist/{chunk-KMWYZTIE.js → chunk-ION47U3Z.js} +3 -3
- package/dist/{chunk-OCIP6YMD.js → chunk-IXGQP4RZ.js} +3 -3
- package/dist/{chunk-FYZKFLKY.js → chunk-JFPZEWY3.js} +3 -3
- package/dist/{chunk-SMNYAMJD.js → chunk-JKL53MOY.js} +4 -4
- package/dist/{chunk-2T5AWWMF.js → chunk-JOA4Q765.js} +3 -3
- package/dist/{chunk-2XRE6FLM.js → chunk-JUOZ62Y7.js} +3 -1
- package/dist/chunk-JUOZ62Y7.js.map +1 -0
- package/dist/{chunk-MLPTFODV.js → chunk-KHQ57QLJ.js} +4 -4
- package/dist/{chunk-NSVDUN76.js → chunk-LCU5R6TQ.js} +8 -3
- package/dist/chunk-LCU5R6TQ.js.map +1 -0
- package/dist/{chunk-OTUFRUV3.js → chunk-LYPG7GOO.js} +4 -4
- package/dist/{chunk-OTUFRUV3.js.map → chunk-LYPG7GOO.js.map} +1 -1
- package/dist/{chunk-KRTY3ENI.js → chunk-MDVBCPOS.js} +2 -2
- package/dist/{chunk-M3UYE6PS.js → chunk-N655QIA2.js} +4 -4
- package/dist/{chunk-5NB726GV.js → chunk-NFQB6RJT.js} +3 -3
- package/dist/{chunk-OIOV4RJE.js → chunk-NP7FLVZW.js} +2 -2
- package/dist/{chunk-CX5SW2EW.js → chunk-NRFU5MVH.js} +4 -4
- package/dist/{chunk-QDWDVNWU.js → chunk-O4TTIMOP.js} +2 -2
- package/dist/{chunk-XCO2NXPZ.js → chunk-O54B5YNM.js} +3 -3
- package/dist/{chunk-UQWUDD7E.js → chunk-ONCWJBWV.js} +3 -3
- package/dist/{chunk-Z3SQEEB6.js → chunk-PD66CVSD.js} +2 -2
- package/dist/{chunk-QYN5PXDZ.js → chunk-PPUTUOC3.js} +2 -2
- package/dist/{chunk-TPWBUKS3.js → chunk-PSH3VFZ7.js} +4 -4
- package/dist/{chunk-MK5VEWCR.js → chunk-QKPDN325.js} +2 -2
- package/dist/{chunk-EVWWT3KE.js → chunk-QP2IZTUR.js} +2 -2
- package/dist/{chunk-4ESX4WX2.js → chunk-QSDPVZPD.js} +5 -5
- package/dist/{chunk-LHIBA4G7.js → chunk-QV7OEHFN.js} +2 -2
- package/dist/{chunk-3DVG3GRQ.js → chunk-QZR3WT3L.js} +2 -2
- package/dist/{chunk-EEAMSNSG.js → chunk-R7TZ2HCS.js} +2 -2
- package/dist/{chunk-IOYXIY7W.js → chunk-R7UHWPYI.js} +2 -2
- package/dist/{chunk-L6Z5OAS4.js → chunk-RL3EGL7A.js} +2 -2
- package/dist/{chunk-7SF5BAWF.js → chunk-S6AH7WSF.js} +3 -3
- package/dist/{chunk-QGKCM7C4.js → chunk-SFCJCMZQ.js} +5 -5
- package/dist/{chunk-K44N3CFW.js → chunk-T3HC7RJ7.js} +2 -2
- package/dist/chunk-T3JQTCCO.js +94 -0
- package/dist/chunk-T3JQTCCO.js.map +1 -0
- package/dist/{chunk-6PCND4O2.js → chunk-T6EQPZ6E.js} +4 -4
- package/dist/{chunk-G7YUH4WT.js → chunk-TAMY4NKO.js} +2 -2
- package/dist/{chunk-XDBFSUHX.js → chunk-TAPFJ3ET.js} +2 -2
- package/dist/{chunk-MANCJV6J.js → chunk-TF3LMM5E.js} +2 -2
- package/dist/{chunk-2GD6MLXD.js → chunk-TFXYQNBH.js} +12 -12
- package/dist/{chunk-7DISPKXT.js → chunk-THACANBI.js} +4 -4
- package/dist/{chunk-6G4D222J.js → chunk-TLVLJSWS.js} +2 -2
- package/dist/{chunk-6QPI2ITJ.js → chunk-TVKWT2CY.js} +4 -4
- package/dist/{chunk-H7NAZ3UB.js → chunk-U7BMN33M.js} +2 -2
- package/dist/{chunk-BXIMH7MC.js → chunk-UTDMY476.js} +49 -5
- package/dist/chunk-UTDMY476.js.map +1 -0
- package/dist/{chunk-6LKEUCEM.js → chunk-UXREWVW4.js} +2 -2
- package/dist/{chunk-SUPEYLH2.js → chunk-UYCIS6V5.js} +2 -2
- package/dist/{chunk-F2BOUJUS.js → chunk-V3IT3XNG.js} +9 -9
- package/dist/{chunk-KQAFEZQX.js → chunk-VDX2J7OX.js} +2 -2
- package/dist/{chunk-NUA4VM46.js → chunk-VWP5DEHU.js} +2 -2
- package/dist/{chunk-NQMSEB5D.js → chunk-X5OIPQME.js} +2 -2
- package/dist/{chunk-RBII7637.js → chunk-XRPPHIRI.js} +2 -2
- package/dist/{chunk-OLT3YTDH.js → chunk-YMOPYG3K.js} +4 -4
- package/dist/{cli-DNvGlD4i.d.ts → cli-CQdYilcx.d.ts} +61 -11
- package/dist/cli.d.ts +18 -18
- package/dist/cli.js +84 -80
- package/dist/coding/pre-action-gate.d.ts +1 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compounding/engine.d.ts +2 -2
- package/dist/compounding/engine.js +16 -15
- package/dist/compounding/preference-consolidator.d.ts +1 -1
- package/dist/compression-optimizer.d.ts +1 -1
- package/dist/config-security.d.ts +7 -0
- package/dist/config-security.js +12 -0
- 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 +14 -13
- package/dist/connectors/codex-materialize.d.ts +1 -1
- package/dist/connectors/index.d.ts +1 -1
- package/dist/connectors/index.js +15 -14
- 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 +4 -4
- package/dist/{contradiction-scan-JDTBXRGW.js → contradiction-scan-522AYLQC.js} +3 -3
- package/dist/converge-config.d.ts +1 -1
- package/dist/convergence-refresh.d.ts +2 -2
- package/dist/convergence-refresh.js +16 -15
- package/dist/conversation-index/backend.d.ts +1 -1
- 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 +16 -15
- package/dist/day-summary.d.ts +1 -1
- package/dist/day-summary.js +2 -2
- package/dist/delinearize.d.ts +1 -1
- package/dist/dependency-propagation-config.d.ts +1 -1
- package/dist/{dependency-propagation-delivery-CzEfB31P.d.ts → dependency-propagation-delivery-C_K_AHcv.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/embedding-fallback.js +2 -2
- package/dist/enrichment/index.d.ts +1 -1
- package/dist/entity-retrieval.d.ts +4 -2
- package/dist/entity-retrieval.js +15 -13
- package/dist/entity-schema.d.ts +1 -1
- package/dist/explicit-capture.d.ts +9 -9
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +11 -11
- package/dist/external-wiki-access.js +45 -44
- 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 +11 -11
- package/dist/extraction-error-classification.d.ts +1 -1
- package/dist/extraction-faithfulness.d.ts +1 -1
- package/dist/extraction-judge-telemetry.d.ts +1 -1
- package/dist/extraction-judge-training.d.ts +1 -1
- package/dist/extraction-judge.d.ts +1 -1
- package/dist/extraction-liveness.d.ts +1 -1
- package/dist/extraction-normalization.d.ts +1 -1
- package/dist/extraction-normalization.js +3 -3
- package/dist/extraction-prompt.d.ts +1 -1
- package/dist/extraction-prompt.js +2 -2
- 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 +25 -24
- package/dist/fallback-llm.d.ts +1 -1
- package/dist/{first-start-migration-CRZCZAJN.js → first-start-migration-HZ4VPRFQ.js} +2 -2
- package/dist/{forget-EHGGJZLX.js → forget-5TWK7CZT.js} +3 -3
- 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-decay-JI2XDCTY.js → graph-edge-decay-ZXGBXNPW.js} +4 -4
- 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-snapshot.js +3 -3
- package/dist/graph.d.ts +1 -1
- package/dist/graph.js +2 -2
- 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 +755 -706
- package/dist/index.js +158 -133
- package/dist/intent.d.ts +1 -1
- package/dist/lcm/engine.d.ts +1 -1
- package/dist/lcm/index.d.ts +1 -1
- package/dist/lcm/index.js +3 -3
- package/dist/lcm/tools.d.ts +1 -1
- package/dist/lifecycle.d.ts +1 -1
- package/dist/live-connectors-runner.d.ts +1 -1
- package/dist/local-llm.d.ts +1 -1
- package/dist/local-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 +14 -13
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +14 -13
- package/dist/maintenance/rebuild-memory-projection.d.ts +2 -2
- package/dist/maintenance/rebuild-memory-projection.js +15 -14
- package/dist/{maintenance-laHYTo0s.d.ts → maintenance-DdP931i9.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +11 -11
- package/dist/memory-action-policy.d.ts +1 -1
- package/dist/memory-cache.d.ts +1 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +1 -1
- package/dist/memory-projection-store.d.ts +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 +15 -14
- package/dist/namespaces/principal.d.ts +1 -1
- package/dist/namespaces/principal.js +2 -2
- package/dist/namespaces/search.d.ts +1 -1
- package/dist/namespaces/search.js +4 -4
- package/dist/namespaces/storage.d.ts +3 -3
- package/dist/namespaces/storage.js +14 -13
- package/dist/native-knowledge.d.ts +1 -1
- package/dist/offline-sync-impression-drain.d.ts +1 -1
- package/dist/offline-sync-impression-drain.js +5 -5
- package/dist/operator-doctor-corpus.d.ts +1 -1
- package/dist/operator-doctor-corpus.js +17 -16
- package/dist/operator-doctor-replica.d.ts +1 -1
- package/dist/operator-toolkit.d.ts +3 -3
- package/dist/operator-toolkit.js +29 -27
- package/dist/orchestration/compression-guideline-coordinator.d.ts +2 -2
- package/dist/orchestration/compression-guideline-coordinator.js +2 -2
- package/dist/orchestration/maintenance.d.ts +4 -4
- package/dist/orchestration/maintenance.js +22 -21
- package/dist/{orchestrator-Cz2QmqsN.d.ts → orchestrator-DxUWX7gs.d.ts} +26 -20
- package/dist/orchestrator.d.ts +9 -9
- package/dist/orchestrator.js +114 -112
- package/dist/patterns-cli.d.ts +1 -1
- package/dist/{pipeline-DPcUifCO.d.ts → pipeline-BKUMU1vU.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-Dq2iqtcI.d.ts → public-http-Dw0bJhcC.d.ts} +1 -1
- package/dist/{qmd-dFCHp1r0.d.ts → qmd-DJP-GLFe.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-context-composition.d.ts +11 -1
- package/dist/recall-context-composition.js +4 -1
- package/dist/recall-disclosure-escalation.d.ts +1 -1
- package/dist/recall-explain-renderer.d.ts +1 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +1 -1
- package/dist/recall-planner-llm.d.ts +1 -1
- package/dist/recall-state.d.ts +1 -1
- package/dist/recall-tag-filter.d.ts +1 -1
- package/dist/recall-timings.d.ts +1 -1
- package/dist/recall-xray-cli.d.ts +1 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +1 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +1 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +1 -1
- package/dist/reconcile/manifest.d.ts +1 -1
- package/dist/reconcile/manifest.js +3 -3
- package/dist/reconcile/plan.d.ts +1 -1
- 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/{resolution-MMOD5WC4.js → resolution-DKMBPXHI.js} +3 -3
- package/dist/resolution-DKMBPXHI.js.map +1 -0
- 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/salvage-envelope.js +2 -2
- package/dist/schemas.d.ts +138 -138
- package/dist/{scope-profiles-DICK7GtN.d.ts → scope-profiles-CaKcnB-6.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +1 -1
- package/dist/search/embed-helper.js +2 -2
- package/dist/search/factory.d.ts +1 -1
- package/dist/search/factory.js +3 -3
- package/dist/search/index.d.ts +1 -1
- package/dist/search/index.js +3 -3
- 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-BP7NAX0N.d.ts → semantic-consolidation-P0eMWqh-.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +2 -2
- package/dist/semantic-consolidation.js +15 -14
- package/dist/semantic-rule-promotion.js +14 -13
- package/dist/semantic-rule-verifier.d.ts +1 -1
- package/dist/semantic-rule-verifier.js +14 -13
- package/dist/{service-D_ddZmpI.d.ts → service-D5GQLxq_.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +1 -1
- package/dist/session-observer-state.d.ts +1 -1
- package/dist/shared-context/manager.d.ts +9 -9
- package/dist/shared-context/manager.js +2 -2
- package/dist/signal.d.ts +1 -1
- package/dist/source-agent-qualifier.d.ts +1 -1
- package/dist/source-agent-qualifier.js +20 -19
- package/dist/{storage-Cdz7jb9t.d.ts → storage-DIyil2ll.d.ts} +5 -2
- package/dist/storage.d.ts +2 -2
- package/dist/storage.js +13 -12
- package/dist/summarizer.d.ts +1 -1
- package/dist/summarizer.js +3 -3
- package/dist/summary-snapshot.d.ts +1 -1
- package/dist/support-passport/index.d.ts +14 -14
- package/dist/support-passport/index.js +47 -46
- package/dist/temporal-supersession.d.ts +2 -2
- package/dist/temporal-timeline-recall.d.ts +3 -1
- package/dist/temporal-timeline-recall.js +3 -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 +1 -1
- package/dist/{tier-stats-EXYSKSVN.js → tier-stats-7E6OBUSD.js} +2 -2
- package/dist/topics.d.ts +1 -1
- package/dist/transcript.d.ts +1 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +2 -2
- package/dist/transfer/types.d.ts +66 -66
- package/dist/trust-score-stage.d.ts +1 -1
- package/dist/trust-score.d.ts +1 -1
- package/dist/{types-ed-SvS2t.d.ts → types-CbXieHKr.d.ts} +15 -3
- package/dist/types.d.ts +1 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +1 -1
- package/dist/verified-recall.js +14 -13
- package/dist/write-envelope.d.ts +5 -2
- package/dist/write-envelope.js +1 -1
- package/package.json +2 -2
- package/src/bitemporal-frontmatter.test.ts +20 -1
- package/src/capabilities.test.ts +2 -0
- package/src/capabilities.ts +17 -17
- package/src/cli.ts +14 -0
- package/src/config-security.ts +131 -0
- package/src/config.test.ts +61 -0
- package/src/config.ts +2 -1
- package/src/entity-retrieval.ts +31 -24
- package/src/index.ts +4 -6
- package/src/orchestration/conversation-index-coordinator.ts +13 -2
- package/src/orchestration/extraction-injection-gate.ts +154 -0
- package/src/orchestration/extraction-origin-context.ts +90 -0
- package/src/orchestration/extraction-persist.ts +66 -64
- package/src/orchestration/extraction-run.ts +4 -2
- package/src/orchestration/extraction-security.test.ts +271 -0
- package/src/orchestration/graph-recall-coordinator.ts +2 -0
- package/src/orchestration/namespace-read-fanout.ts +1 -0
- package/src/orchestration/qmd-result-resolver.ts +1 -0
- package/src/orchestration/recall-internal.ts +17 -11
- package/src/orchestration/recall-result-formatter.ts +35 -6
- package/src/orchestration/recall-search-pipeline.ts +3 -5
- package/src/orchestration/recall-search-prefilter.ts +1 -0
- package/src/orchestrator.ts +2 -1
- package/src/procedural/procedure-recall.ts +11 -1
- package/src/recall-authority-fence.test.ts +180 -0
- package/src/recall-context-composition.ts +28 -0
- package/src/security/audit-memory-cli.ts +42 -0
- package/src/security/audit-memory.test.ts +252 -0
- package/src/security/audit-memory.ts +318 -0
- package/src/security/injection-screen.test.ts +77 -0
- package/src/security/injection-screen.ts +158 -0
- package/src/security/origin-authority.test.ts +61 -0
- package/src/security/origin-authority.ts +88 -0
- package/src/security/types.ts +14 -0
- package/src/semantic-rule-promotion.ts +1 -1
- package/src/storage.ts +10 -2
- package/src/temporal-timeline-recall.test.ts +18 -0
- package/src/temporal-timeline-recall.ts +12 -1
- package/src/types.ts +4 -4
- package/src/write-envelope.test.ts +1 -0
- package/src/write-envelope.ts +9 -0
- package/dist/chunk-2XRE6FLM.js.map +0 -1
- package/dist/chunk-5V64M56S.js.map +0 -1
- package/dist/chunk-76JJSXK7.js.map +0 -1
- package/dist/chunk-AHVEHR6K.js.map +0 -1
- package/dist/chunk-BXIMH7MC.js.map +0 -1
- package/dist/chunk-FPKKFDO4.js.map +0 -1
- package/dist/chunk-I6WYQSX4.js.map +0 -1
- package/dist/chunk-NSVDUN76.js.map +0 -1
- package/dist/chunk-OS5DYALF.js.map +0 -1
- package/dist/chunk-PG4QBPVG.js.map +0 -1
- package/dist/chunk-XXRRHING.js.map +0 -1
- /package/dist/{auto-sync-NR3GPCOA.js.map → auto-sync-5HVRCMGZ.js.map} +0 -0
- /package/dist/{capsule-crypto-7FJQINUR.js.map → capsule-crypto-YO5QJ6L3.js.map} +0 -0
- /package/dist/{chunk-E2GZSFR5.js.map → chunk-2YREVL4T.js.map} +0 -0
- /package/dist/{chunk-KM55SMLG.js.map → chunk-4KM3V6VS.js.map} +0 -0
- /package/dist/{chunk-HAEU3ZW7.js.map → chunk-4OW2T32G.js.map} +0 -0
- /package/dist/{chunk-PCRHFB75.js.map → chunk-4QFCAKNM.js.map} +0 -0
- /package/dist/{chunk-OWC42MDT.js.map → chunk-5ZIWRMZM.js.map} +0 -0
- /package/dist/{chunk-GWFSVJ4P.js.map → chunk-6KTXE6A3.js.map} +0 -0
- /package/dist/{chunk-P2FA65P2.js.map → chunk-7NSC4IVA.js.map} +0 -0
- /package/dist/{chunk-QC6BILS7.js.map → chunk-7PKNOXYB.js.map} +0 -0
- /package/dist/{chunk-RZRUV6N2.js.map → chunk-ANMIOQPU.js.map} +0 -0
- /package/dist/{chunk-RPSYDM6C.js.map → chunk-BPWZDHFM.js.map} +0 -0
- /package/dist/{chunk-JKW663ZN.js.map → chunk-BVRREV3N.js.map} +0 -0
- /package/dist/{chunk-2NLLXCJG.js.map → chunk-BXLOS5AJ.js.map} +0 -0
- /package/dist/{chunk-ELXP665P.js.map → chunk-CKSEJD7K.js.map} +0 -0
- /package/dist/{chunk-4GE3NA5I.js.map → chunk-CME347TM.js.map} +0 -0
- /package/dist/{chunk-BGLY7EEM.js.map → chunk-CMRUIKVA.js.map} +0 -0
- /package/dist/{chunk-HGJ6NJ4E.js.map → chunk-D4LVHPOA.js.map} +0 -0
- /package/dist/{chunk-YK6BDDHP.js.map → chunk-DFEODULB.js.map} +0 -0
- /package/dist/{chunk-X7Y7WX73.js.map → chunk-DQEMWVMT.js.map} +0 -0
- /package/dist/{chunk-XWZ6KOL6.js.map → chunk-E57E5SCS.js.map} +0 -0
- /package/dist/{chunk-M23RF3LJ.js.map → chunk-ER4BLWI6.js.map} +0 -0
- /package/dist/{chunk-47J4EDGR.js.map → chunk-F7M36OG2.js.map} +0 -0
- /package/dist/{chunk-ZUJW327U.js.map → chunk-FONW766A.js.map} +0 -0
- /package/dist/{chunk-FEBHRT2I.js.map → chunk-FR3FNPCJ.js.map} +0 -0
- /package/dist/{chunk-G6DFSS6A.js.map → chunk-GUNIXT36.js.map} +0 -0
- /package/dist/{chunk-K2UGPTYY.js.map → chunk-H6ZXNH5I.js.map} +0 -0
- /package/dist/{chunk-Z463UYI6.js.map → chunk-HC55YCNK.js.map} +0 -0
- /package/dist/{chunk-IEQCHXUS.js.map → chunk-HQ2VGCGP.js.map} +0 -0
- /package/dist/{chunk-ZXGKQQ3L.js.map → chunk-HXXGZ4KV.js.map} +0 -0
- /package/dist/{chunk-YZFPEHXF.js.map → chunk-HYVBJLEK.js.map} +0 -0
- /package/dist/{chunk-3GD2HFR6.js.map → chunk-IGWVMA4Y.js.map} +0 -0
- /package/dist/{chunk-FONWBCVY.js.map → chunk-IKT6ZVO7.js.map} +0 -0
- /package/dist/{chunk-KMWYZTIE.js.map → chunk-ION47U3Z.js.map} +0 -0
- /package/dist/{chunk-OCIP6YMD.js.map → chunk-IXGQP4RZ.js.map} +0 -0
- /package/dist/{chunk-FYZKFLKY.js.map → chunk-JFPZEWY3.js.map} +0 -0
- /package/dist/{chunk-SMNYAMJD.js.map → chunk-JKL53MOY.js.map} +0 -0
- /package/dist/{chunk-2T5AWWMF.js.map → chunk-JOA4Q765.js.map} +0 -0
- /package/dist/{chunk-MLPTFODV.js.map → chunk-KHQ57QLJ.js.map} +0 -0
- /package/dist/{chunk-KRTY3ENI.js.map → chunk-MDVBCPOS.js.map} +0 -0
- /package/dist/{chunk-M3UYE6PS.js.map → chunk-N655QIA2.js.map} +0 -0
- /package/dist/{chunk-5NB726GV.js.map → chunk-NFQB6RJT.js.map} +0 -0
- /package/dist/{chunk-OIOV4RJE.js.map → chunk-NP7FLVZW.js.map} +0 -0
- /package/dist/{chunk-CX5SW2EW.js.map → chunk-NRFU5MVH.js.map} +0 -0
- /package/dist/{chunk-QDWDVNWU.js.map → chunk-O4TTIMOP.js.map} +0 -0
- /package/dist/{chunk-XCO2NXPZ.js.map → chunk-O54B5YNM.js.map} +0 -0
- /package/dist/{chunk-UQWUDD7E.js.map → chunk-ONCWJBWV.js.map} +0 -0
- /package/dist/{chunk-Z3SQEEB6.js.map → chunk-PD66CVSD.js.map} +0 -0
- /package/dist/{chunk-QYN5PXDZ.js.map → chunk-PPUTUOC3.js.map} +0 -0
- /package/dist/{chunk-TPWBUKS3.js.map → chunk-PSH3VFZ7.js.map} +0 -0
- /package/dist/{chunk-MK5VEWCR.js.map → chunk-QKPDN325.js.map} +0 -0
- /package/dist/{chunk-EVWWT3KE.js.map → chunk-QP2IZTUR.js.map} +0 -0
- /package/dist/{chunk-4ESX4WX2.js.map → chunk-QSDPVZPD.js.map} +0 -0
- /package/dist/{chunk-LHIBA4G7.js.map → chunk-QV7OEHFN.js.map} +0 -0
- /package/dist/{chunk-3DVG3GRQ.js.map → chunk-QZR3WT3L.js.map} +0 -0
- /package/dist/{chunk-EEAMSNSG.js.map → chunk-R7TZ2HCS.js.map} +0 -0
- /package/dist/{chunk-IOYXIY7W.js.map → chunk-R7UHWPYI.js.map} +0 -0
- /package/dist/{chunk-L6Z5OAS4.js.map → chunk-RL3EGL7A.js.map} +0 -0
- /package/dist/{chunk-7SF5BAWF.js.map → chunk-S6AH7WSF.js.map} +0 -0
- /package/dist/{chunk-QGKCM7C4.js.map → chunk-SFCJCMZQ.js.map} +0 -0
- /package/dist/{chunk-K44N3CFW.js.map → chunk-T3HC7RJ7.js.map} +0 -0
- /package/dist/{chunk-6PCND4O2.js.map → chunk-T6EQPZ6E.js.map} +0 -0
- /package/dist/{chunk-G7YUH4WT.js.map → chunk-TAMY4NKO.js.map} +0 -0
- /package/dist/{chunk-XDBFSUHX.js.map → chunk-TAPFJ3ET.js.map} +0 -0
- /package/dist/{chunk-MANCJV6J.js.map → chunk-TF3LMM5E.js.map} +0 -0
- /package/dist/{chunk-2GD6MLXD.js.map → chunk-TFXYQNBH.js.map} +0 -0
- /package/dist/{chunk-7DISPKXT.js.map → chunk-THACANBI.js.map} +0 -0
- /package/dist/{chunk-6G4D222J.js.map → chunk-TLVLJSWS.js.map} +0 -0
- /package/dist/{chunk-6QPI2ITJ.js.map → chunk-TVKWT2CY.js.map} +0 -0
- /package/dist/{chunk-H7NAZ3UB.js.map → chunk-U7BMN33M.js.map} +0 -0
- /package/dist/{chunk-6LKEUCEM.js.map → chunk-UXREWVW4.js.map} +0 -0
- /package/dist/{chunk-SUPEYLH2.js.map → chunk-UYCIS6V5.js.map} +0 -0
- /package/dist/{chunk-F2BOUJUS.js.map → chunk-V3IT3XNG.js.map} +0 -0
- /package/dist/{chunk-KQAFEZQX.js.map → chunk-VDX2J7OX.js.map} +0 -0
- /package/dist/{chunk-NUA4VM46.js.map → chunk-VWP5DEHU.js.map} +0 -0
- /package/dist/{chunk-NQMSEB5D.js.map → chunk-X5OIPQME.js.map} +0 -0
- /package/dist/{chunk-RBII7637.js.map → chunk-XRPPHIRI.js.map} +0 -0
- /package/dist/{chunk-OLT3YTDH.js.map → chunk-YMOPYG3K.js.map} +0 -0
- /package/dist/{contradiction-scan-JDTBXRGW.js.map → config-security.js.map} +0 -0
- /package/dist/{graph-edge-decay-JI2XDCTY.js.map → contradiction-scan-522AYLQC.js.map} +0 -0
- /package/dist/{first-start-migration-CRZCZAJN.js.map → first-start-migration-HZ4VPRFQ.js.map} +0 -0
- /package/dist/{forget-EHGGJZLX.js.map → forget-5TWK7CZT.js.map} +0 -0
- /package/dist/{resolution-MMOD5WC4.js.map → graph-edge-decay-ZXGBXNPW.js.map} +0 -0
- /package/dist/{tier-stats-EXYSKSVN.js.map → tier-stats-7E6OBUSD.js.map} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remnic/core",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.55.0",
|
|
4
4
|
"description": "Framework-agnostic Remnic memory engine — orchestrator, storage, extraction, search, trust zones",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -3136,7 +3136,7 @@
|
|
|
3136
3136
|
"core"
|
|
3137
3137
|
],
|
|
3138
3138
|
"peerDependencies": {
|
|
3139
|
-
"@remnic/coding-graph": "^9.
|
|
3139
|
+
"@remnic/coding-graph": "^9.55.0"
|
|
3140
3140
|
},
|
|
3141
3141
|
"peerDependenciesMeta": {
|
|
3142
3142
|
"@remnic/coding-graph": {
|
|
@@ -2,7 +2,7 @@ import test from "node:test";
|
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
3
|
import os from "node:os";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { mkdtemp, rm } from "node:fs/promises";
|
|
5
|
+
import { mkdtemp, readFile, rm } from "node:fs/promises";
|
|
6
6
|
|
|
7
7
|
import { StorageManager } from "./storage.js";
|
|
8
8
|
import { isValidityExpiredNow } from "./temporal-validity.js";
|
|
@@ -54,6 +54,25 @@ test("round-trip: observedAt + eventTimeSource + valid_at survive write → read
|
|
|
54
54
|
await rm(dir, { recursive: true, force: true });
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
+
test("writeMemory normalizes arbitrary origin strings to unknown", async () => {
|
|
58
|
+
const dir = await mkdtemp(path.join(os.tmpdir(), "remnic-origin-normalize-"));
|
|
59
|
+
try {
|
|
60
|
+
const storage = new StorageManager(dir);
|
|
61
|
+
await storage.ensureDirectories();
|
|
62
|
+
|
|
63
|
+
const { id } = await storage.writeMemory("fact", "Origin boundary test.", {
|
|
64
|
+
origin: "weird\nvalue",
|
|
65
|
+
});
|
|
66
|
+
const written = (await storage.readAllMemories()).find((memory) => memory.frontmatter.id === id);
|
|
67
|
+
assert.ok(written);
|
|
68
|
+
const raw = await readFile(written!.path, "utf8");
|
|
69
|
+
assert.match(raw, /^origin: unknown$/m);
|
|
70
|
+
assert.doesNotMatch(raw, /weird/);
|
|
71
|
+
assert.equal(written!.frontmatter.origin, "unknown");
|
|
72
|
+
} finally {
|
|
73
|
+
await rm(dir, { recursive: true, force: true });
|
|
74
|
+
}
|
|
75
|
+
});
|
|
57
76
|
|
|
58
77
|
test("round-trip: invalid_at + forgottenAt coexist with observedAt/eventTimeSource (parser not corrupted)", async () => {
|
|
59
78
|
// Exercises the full serialize→parse round trip through the
|
package/src/capabilities.test.ts
CHANGED
|
@@ -857,6 +857,8 @@ const SECURITY_FIELD_TO_FLAG: Record<keyof SecurityCapabilitySet, string> = {
|
|
|
857
857
|
trustZones: "trustZonesEnabled",
|
|
858
858
|
quarantinePromotion: "quarantinePromotionEnabled",
|
|
859
859
|
memoryPoisoningDefense: "memoryPoisoningDefenseEnabled",
|
|
860
|
+
originAuthority: "originAuthorityEnabled",
|
|
861
|
+
injectionScreen: "injectionScreenEnabled",
|
|
860
862
|
trustZoneRecall: "trustZoneRecallEnabled",
|
|
861
863
|
};
|
|
862
864
|
|
package/src/capabilities.ts
CHANGED
|
@@ -616,13 +616,12 @@ export function resolveLocalLlmCapabilities(
|
|
|
616
616
|
}
|
|
617
617
|
|
|
618
618
|
// ---------------------------------------------------------------------------
|
|
619
|
-
// Security capability set (issue #1523 batch 7).
|
|
620
|
-
//
|
|
621
|
-
//
|
|
622
|
-
//
|
|
623
|
-
//
|
|
624
|
-
//
|
|
625
|
-
// a pure pass-through.
|
|
619
|
+
// Security capability set (issue #1523 batch 7). The six security/trust-zone
|
|
620
|
+
// flags gate quarantine promotion, poisoning defense, origin authority,
|
|
621
|
+
// injection screening, and trust-zone recall. Read sites span orchestrator,
|
|
622
|
+
// access-service, CLI, and research-status commands. All flags are
|
|
623
|
+
// non-optional booleans on PluginConfig (defaults resolved at the parse
|
|
624
|
+
// boundary), so the projection is a pure pass-through.
|
|
626
625
|
// ---------------------------------------------------------------------------
|
|
627
626
|
|
|
628
627
|
/**
|
|
@@ -635,26 +634,27 @@ export interface SecurityCapabilitySet {
|
|
|
635
634
|
readonly quarantinePromotion: boolean;
|
|
636
635
|
/** `memoryPoisoningDefenseEnabled` — detect and defend against memory poisoning. */
|
|
637
636
|
readonly memoryPoisoningDefense: boolean;
|
|
637
|
+
/** `originAuthorityEnabled` — preserve origin-bound write authority. */
|
|
638
|
+
readonly originAuthority: boolean;
|
|
639
|
+
/** `injectionScreenEnabled` — quarantine deterministic injection findings. */
|
|
640
|
+
readonly injectionScreen: boolean;
|
|
638
641
|
/** `trustZoneRecallEnabled` — restrict recall to trusted zones. */
|
|
639
642
|
readonly trustZoneRecall: boolean;
|
|
640
643
|
}
|
|
641
644
|
|
|
642
|
-
/**
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
PluginConfig,
|
|
647
|
-
"trustZonesEnabled" | "quarantinePromotionEnabled" | "memoryPoisoningDefenseEnabled" | "trustZoneRecallEnabled"
|
|
648
|
-
>;
|
|
645
|
+
/** Config projection consumed by {@link resolveSecurityCapabilities}. */
|
|
646
|
+
export type SecurityConfigProjection = Pick<PluginConfig,
|
|
647
|
+
| "trustZonesEnabled" | "quarantinePromotionEnabled" | "memoryPoisoningDefenseEnabled"
|
|
648
|
+
| "originAuthorityEnabled" | "injectionScreenEnabled" | "trustZoneRecallEnabled">;
|
|
649
649
|
|
|
650
|
-
/**
|
|
651
|
-
* Resolve the {@link SecurityCapabilitySet} from parsed config.
|
|
652
|
-
*/
|
|
650
|
+
/** Resolve the {@link SecurityCapabilitySet} from parsed config. */
|
|
653
651
|
export function resolveSecurityCapabilities(config: SecurityConfigProjection): SecurityCapabilitySet {
|
|
654
652
|
return Object.freeze({
|
|
655
653
|
trustZones: config.trustZonesEnabled,
|
|
656
654
|
quarantinePromotion: config.quarantinePromotionEnabled,
|
|
657
655
|
memoryPoisoningDefense: config.memoryPoisoningDefenseEnabled,
|
|
656
|
+
originAuthority: config.originAuthorityEnabled,
|
|
657
|
+
injectionScreen: config.injectionScreenEnabled,
|
|
658
658
|
trustZoneRecall: config.trustZoneRecallEnabled,
|
|
659
659
|
});
|
|
660
660
|
}
|
package/src/cli.ts
CHANGED
|
@@ -66,6 +66,11 @@ import {
|
|
|
66
66
|
restoreMemoryGovernanceRun,
|
|
67
67
|
runMemoryGovernance,
|
|
68
68
|
} from "./maintenance/memory-governance.js";
|
|
69
|
+
import {
|
|
70
|
+
auditMemoryStore,
|
|
71
|
+
type AuditMemoryStoreOptions,
|
|
72
|
+
} from "./security/audit-memory.js";
|
|
73
|
+
import { registerSecurityCommands } from "./security/audit-memory-cli.js";
|
|
69
74
|
import {
|
|
70
75
|
rebuildMemoryProjection,
|
|
71
76
|
repairMemoryProjection,
|
|
@@ -534,6 +539,8 @@ export interface MemoryReviewDispositionCliCommandOptions {
|
|
|
534
539
|
now?: Date;
|
|
535
540
|
}
|
|
536
541
|
|
|
542
|
+
export interface AuditMemoryCliCommandOptions extends AuditMemoryStoreOptions {}
|
|
543
|
+
|
|
537
544
|
export interface MigrateObservationsCliCommandOptions {
|
|
538
545
|
memoryDir: string;
|
|
539
546
|
write?: boolean;
|
|
@@ -1130,6 +1137,11 @@ export async function runMemoryReviewDispositionCliCommand(
|
|
|
1130
1137
|
reasonCode: options.reasonCode,
|
|
1131
1138
|
};
|
|
1132
1139
|
}
|
|
1140
|
+
export async function runAuditMemoryCliCommand(
|
|
1141
|
+
options: AuditMemoryCliCommandOptions,
|
|
1142
|
+
) {
|
|
1143
|
+
return auditMemoryStore(options);
|
|
1144
|
+
}
|
|
1133
1145
|
|
|
1134
1146
|
export async function runMigrateObservationsCliCommand(
|
|
1135
1147
|
options: MigrateObservationsCliCommandOptions,
|
|
@@ -7187,6 +7199,8 @@ export function registerCli(
|
|
|
7187
7199
|
console.log("OK");
|
|
7188
7200
|
});
|
|
7189
7201
|
|
|
7202
|
+
registerSecurityCommands(cmd, orchestrator);
|
|
7203
|
+
|
|
7190
7204
|
cmd
|
|
7191
7205
|
.command("governance-run")
|
|
7192
7206
|
.description("Run memory governance in shadow/apply mode and write audit artifacts")
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { coerceBool } from "./connectors/coerce.js";
|
|
2
|
+
import { readEnvVar } from "./runtime/env.js";
|
|
3
|
+
import { DEFAULT_UNTRUSTED_ORIGINS } from "./security/origin-authority.js";
|
|
4
|
+
|
|
5
|
+
// Memory-poisoning hardening (#1955): preserve explicit config, but let env
|
|
6
|
+
// values replace schema-materialized defaults from the host config loader.
|
|
7
|
+
function resolveSecurityBooleanConfig(
|
|
8
|
+
value: unknown,
|
|
9
|
+
rawOperatorConfig: Record<string, unknown> | null | undefined,
|
|
10
|
+
flagName: string,
|
|
11
|
+
envName: string,
|
|
12
|
+
defaultValue: boolean,
|
|
13
|
+
): boolean {
|
|
14
|
+
const rawAuthored =
|
|
15
|
+
rawOperatorConfig !== undefined &&
|
|
16
|
+
rawOperatorConfig !== null &&
|
|
17
|
+
Object.prototype.hasOwnProperty.call(rawOperatorConfig, flagName) &&
|
|
18
|
+
rawOperatorConfig[flagName] !== undefined &&
|
|
19
|
+
rawOperatorConfig[flagName] !== null;
|
|
20
|
+
const schemaDefaultMaterialized =
|
|
21
|
+
rawOperatorConfig !== undefined &&
|
|
22
|
+
!rawAuthored &&
|
|
23
|
+
value === defaultValue;
|
|
24
|
+
if (!schemaDefaultMaterialized && value !== undefined && value !== null) {
|
|
25
|
+
return resolveBooleanConfig(value, defaultValue, flagName);
|
|
26
|
+
}
|
|
27
|
+
if (rawAuthored) {
|
|
28
|
+
return resolveBooleanConfig(value ?? rawOperatorConfig?.[flagName], defaultValue, flagName);
|
|
29
|
+
}
|
|
30
|
+
const envValue = readEnvVar(envName);
|
|
31
|
+
return envValue === undefined
|
|
32
|
+
? defaultValue
|
|
33
|
+
: resolveBooleanConfig(envValue, defaultValue, flagName);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function resolveBooleanConfig(
|
|
37
|
+
value: unknown,
|
|
38
|
+
defaultValue: boolean,
|
|
39
|
+
keyName: string,
|
|
40
|
+
): boolean {
|
|
41
|
+
if (value === undefined || value === null) return defaultValue;
|
|
42
|
+
const coerced = coerceBool(value);
|
|
43
|
+
if (coerced === undefined) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
`${keyName} must be a boolean-like value (true/false/1/0/yes/no/on/off); got ${JSON.stringify(value)}`,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return coerced;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Memory-poisoning hardening (#1955): keep origin allow-list parsing in the
|
|
52
|
+
// parser module so config-contract extraction covers this delegated surface.
|
|
53
|
+
function resolveUntrustedOrigins(
|
|
54
|
+
value: unknown,
|
|
55
|
+
rawOperatorConfig: Record<string, unknown> | null | undefined,
|
|
56
|
+
): string[] {
|
|
57
|
+
const rawAuthored =
|
|
58
|
+
rawOperatorConfig !== undefined &&
|
|
59
|
+
rawOperatorConfig !== null &&
|
|
60
|
+
Object.prototype.hasOwnProperty.call(rawOperatorConfig, "untrustedOrigins") &&
|
|
61
|
+
rawOperatorConfig.untrustedOrigins !== undefined &&
|
|
62
|
+
rawOperatorConfig.untrustedOrigins !== null;
|
|
63
|
+
const schemaDefaultMaterialized =
|
|
64
|
+
rawOperatorConfig !== undefined &&
|
|
65
|
+
!rawAuthored &&
|
|
66
|
+
Array.isArray(value) &&
|
|
67
|
+
value.length === DEFAULT_UNTRUSTED_ORIGINS.length &&
|
|
68
|
+
value.every((entry, index) => entry === DEFAULT_UNTRUSTED_ORIGINS[index]);
|
|
69
|
+
const configValue = schemaDefaultMaterialized ? undefined : value;
|
|
70
|
+
const fromEnv = configValue === undefined || configValue === null;
|
|
71
|
+
const envValue = fromEnv ? readEnvVar("REMNIC_UNTRUSTED_ORIGINS") : undefined;
|
|
72
|
+
const source = fromEnv ? envValue : configValue;
|
|
73
|
+
if (source === undefined || source === null) return [...DEFAULT_UNTRUSTED_ORIGINS];
|
|
74
|
+
|
|
75
|
+
let entries: unknown[];
|
|
76
|
+
if (Array.isArray(source)) {
|
|
77
|
+
entries = source;
|
|
78
|
+
} else if (fromEnv && typeof source === "string" && source.trim().length > 0) {
|
|
79
|
+
const trimmed = source.trim();
|
|
80
|
+
if (trimmed.startsWith("[")) {
|
|
81
|
+
try {
|
|
82
|
+
const parsed: unknown = JSON.parse(trimmed);
|
|
83
|
+
if (!Array.isArray(parsed)) throw new Error("not an array");
|
|
84
|
+
entries = parsed;
|
|
85
|
+
} catch {
|
|
86
|
+
throw new Error("untrustedOrigins must be an array of strings");
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
entries = trimmed.split(",");
|
|
90
|
+
}
|
|
91
|
+
} else {
|
|
92
|
+
throw new Error("untrustedOrigins must be an array of strings");
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const normalized: string[] = [];
|
|
96
|
+
for (const entry of entries) {
|
|
97
|
+
if (typeof entry !== "string") {
|
|
98
|
+
throw new Error("untrustedOrigins must be an array of strings");
|
|
99
|
+
}
|
|
100
|
+
const trimmed = entry.trim();
|
|
101
|
+
if (trimmed.length > 0) normalized.push(trimmed);
|
|
102
|
+
}
|
|
103
|
+
return normalized.length > 0 ? normalized : [...DEFAULT_UNTRUSTED_ORIGINS];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function parseSecurityConfig(
|
|
107
|
+
cfg: Record<string, unknown>,
|
|
108
|
+
rawOperatorConfig: Record<string, unknown> | null | undefined,
|
|
109
|
+
): {
|
|
110
|
+
originAuthorityEnabled: boolean;
|
|
111
|
+
injectionScreenEnabled: boolean;
|
|
112
|
+
untrustedOrigins: string[];
|
|
113
|
+
} {
|
|
114
|
+
return {
|
|
115
|
+
originAuthorityEnabled: resolveSecurityBooleanConfig(
|
|
116
|
+
cfg.originAuthorityEnabled,
|
|
117
|
+
rawOperatorConfig,
|
|
118
|
+
"originAuthorityEnabled",
|
|
119
|
+
"REMNIC_ORIGIN_AUTHORITY_ENABLED",
|
|
120
|
+
false,
|
|
121
|
+
),
|
|
122
|
+
injectionScreenEnabled: resolveSecurityBooleanConfig(
|
|
123
|
+
cfg.injectionScreenEnabled,
|
|
124
|
+
rawOperatorConfig,
|
|
125
|
+
"injectionScreenEnabled",
|
|
126
|
+
"REMNIC_INJECTION_SCREEN_ENABLED",
|
|
127
|
+
true,
|
|
128
|
+
),
|
|
129
|
+
untrustedOrigins: resolveUntrustedOrigins(cfg.untrustedOrigins, rawOperatorConfig),
|
|
130
|
+
};
|
|
131
|
+
}
|
package/src/config.test.ts
CHANGED
|
@@ -31,6 +31,67 @@ function withIsolatedConnectorsDir<T>(
|
|
|
31
31
|
rmSync(root, { recursive: true, force: true });
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
test("parseConfig memory-poisoning hardening defaults and validation (#1955)", () => {
|
|
35
|
+
const previousOrigin = process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
|
|
36
|
+
const previousInjection = process.env.REMNIC_INJECTION_SCREEN_ENABLED;
|
|
37
|
+
const previousOrigins = process.env.REMNIC_UNTRUSTED_ORIGINS;
|
|
38
|
+
delete process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
|
|
39
|
+
delete process.env.REMNIC_INJECTION_SCREEN_ENABLED;
|
|
40
|
+
delete process.env.REMNIC_UNTRUSTED_ORIGINS;
|
|
41
|
+
try {
|
|
42
|
+
const defaults = parseConfig({});
|
|
43
|
+
assert.equal(defaults.originAuthorityEnabled, false);
|
|
44
|
+
assert.equal(defaults.injectionScreenEnabled, true);
|
|
45
|
+
assert.deepEqual(defaults.untrustedOrigins, ["tool_output", "import:*", "unknown"]);
|
|
46
|
+
|
|
47
|
+
const configured = parseConfig({
|
|
48
|
+
originAuthorityEnabled: "true",
|
|
49
|
+
injectionScreenEnabled: "off",
|
|
50
|
+
untrustedOrigins: [" connector:calendar ", "unknown", ""],
|
|
51
|
+
});
|
|
52
|
+
assert.equal(configured.originAuthorityEnabled, true);
|
|
53
|
+
assert.equal(configured.injectionScreenEnabled, false);
|
|
54
|
+
assert.deepEqual(configured.untrustedOrigins, ["connector:calendar", "unknown"]);
|
|
55
|
+
|
|
56
|
+
process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED = "yes";
|
|
57
|
+
process.env.REMNIC_INJECTION_SCREEN_ENABLED = "0";
|
|
58
|
+
process.env.REMNIC_UNTRUSTED_ORIGINS = "connector:calendar, import:legacy, unknown";
|
|
59
|
+
const fromEnv = parseConfig({});
|
|
60
|
+
assert.equal(fromEnv.originAuthorityEnabled, true);
|
|
61
|
+
assert.equal(fromEnv.injectionScreenEnabled, false);
|
|
62
|
+
assert.deepEqual(fromEnv.untrustedOrigins, ["connector:calendar", "import:legacy", "unknown"]);
|
|
63
|
+
const envWithSchemaDefaults = parseConfig(
|
|
64
|
+
{
|
|
65
|
+
originAuthorityEnabled: false,
|
|
66
|
+
injectionScreenEnabled: true,
|
|
67
|
+
untrustedOrigins: ["tool_output", "import:*", "unknown"],
|
|
68
|
+
},
|
|
69
|
+
{},
|
|
70
|
+
);
|
|
71
|
+
assert.equal(envWithSchemaDefaults.originAuthorityEnabled, true);
|
|
72
|
+
assert.equal(envWithSchemaDefaults.injectionScreenEnabled, false);
|
|
73
|
+
assert.deepEqual(
|
|
74
|
+
envWithSchemaDefaults.untrustedOrigins,
|
|
75
|
+
["connector:calendar", "import:legacy", "unknown"],
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
assert.throws(
|
|
79
|
+
() => parseConfig({ originAuthorityEnabled: "maybe" }),
|
|
80
|
+
/originAuthorityEnabled must be a boolean-like value/,
|
|
81
|
+
);
|
|
82
|
+
assert.throws(
|
|
83
|
+
() => parseConfig({ untrustedOrigins: "unknown" }),
|
|
84
|
+
/untrustedOrigins must be an array of strings/,
|
|
85
|
+
);
|
|
86
|
+
} finally {
|
|
87
|
+
if (previousOrigin === undefined) delete process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED;
|
|
88
|
+
else process.env.REMNIC_ORIGIN_AUTHORITY_ENABLED = previousOrigin;
|
|
89
|
+
if (previousInjection === undefined) delete process.env.REMNIC_INJECTION_SCREEN_ENABLED;
|
|
90
|
+
else process.env.REMNIC_INJECTION_SCREEN_ENABLED = previousInjection;
|
|
91
|
+
if (previousOrigins === undefined) delete process.env.REMNIC_UNTRUSTED_ORIGINS;
|
|
92
|
+
else process.env.REMNIC_UNTRUSTED_ORIGINS = previousOrigins;
|
|
93
|
+
}
|
|
94
|
+
});
|
|
34
95
|
|
|
35
96
|
test("parseConfig emitLegacyTools sticky-legacy default (issue #1550)", () => {
|
|
36
97
|
// Fresh install (no legacy connector entries): canonical-only surface.
|
package/src/config.ts
CHANGED
|
@@ -55,6 +55,7 @@ import {
|
|
|
55
55
|
parseQmdSubprocessStrategy,
|
|
56
56
|
parseQmdSupportedVersion,
|
|
57
57
|
} from "./config-qmd.js";
|
|
58
|
+
import { parseSecurityConfig } from "./config-security.js";
|
|
58
59
|
import {
|
|
59
60
|
resolveEmitLegacyTools,
|
|
60
61
|
resolveNamespaceCatalogEnabled,
|
|
@@ -357,7 +358,6 @@ function resolveBooleanConfig(
|
|
|
357
358
|
return coerced;
|
|
358
359
|
}
|
|
359
360
|
|
|
360
|
-
|
|
361
361
|
function resolvePositiveIntegerConfig(
|
|
362
362
|
value: unknown,
|
|
363
363
|
defaultValue: number,
|
|
@@ -1554,6 +1554,7 @@ export function parseConfig(
|
|
|
1554
1554
|
model,
|
|
1555
1555
|
reasoningEffort,
|
|
1556
1556
|
triggerMode,
|
|
1557
|
+
...parseSecurityConfig(cfg, rawOperatorConfig),
|
|
1557
1558
|
bufferMaxTurns:
|
|
1558
1559
|
typeof cfg.bufferMaxTurns === "number" ? cfg.bufferMaxTurns : 5,
|
|
1559
1560
|
bufferMaxMinutes:
|
package/src/entity-retrieval.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { resolveNamespaceCapabilities } from "./capabilities.js";
|
|
2
|
+
import { renderAuthorityBoundContent } from "./recall-context-composition.js";
|
|
2
3
|
import { createHash } from "node:crypto";
|
|
3
4
|
import { sanitizeMemoryContent } from "./sanitize.js";
|
|
4
5
|
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
@@ -44,7 +45,7 @@ type EntityMentionIndexEntry = {
|
|
|
44
45
|
relationships: Array<{ target: string; label: string }>;
|
|
45
46
|
activity: Array<{ date: string; note: string }>;
|
|
46
47
|
factCount: number;
|
|
47
|
-
memorySnippets: string[];
|
|
48
|
+
memorySnippets: string[]; memorySnippetOrigins?: Array<string | undefined>;
|
|
48
49
|
nativeChunks: Array<{
|
|
49
50
|
chunkId: string;
|
|
50
51
|
title: string;
|
|
@@ -72,9 +73,8 @@ type EntityCandidate = {
|
|
|
72
73
|
type EntityHintSnippet = {
|
|
73
74
|
text: string;
|
|
74
75
|
score: number;
|
|
75
|
-
kind: "summary" | "fact" | "section" | "relationship" | "activity" | "memory" | "native";
|
|
76
|
+
kind: "summary" | "fact" | "section" | "relationship" | "activity" | "memory" | "native"; origin?: string;
|
|
76
77
|
};
|
|
77
|
-
|
|
78
78
|
export interface BuildEntityRecallSectionOptions {
|
|
79
79
|
config: PluginConfig;
|
|
80
80
|
storage: StorageManager;
|
|
@@ -87,6 +87,7 @@ export interface BuildEntityRecallSectionOptions {
|
|
|
87
87
|
maxRelatedEntities: number;
|
|
88
88
|
maxChars: number;
|
|
89
89
|
transcriptEntries: TranscriptEntry[];
|
|
90
|
+
originAuthorityEnabled?: boolean; untrustedOrigins?: readonly string[];
|
|
90
91
|
/**
|
|
91
92
|
* Cancels the build at its next checkpoint (issue #2291). Entity recall reads
|
|
92
93
|
* every entity and memory file across the recalled namespaces, which is
|
|
@@ -617,16 +618,13 @@ async function buildEntityMentionIndex(
|
|
|
617
618
|
for (const memory of memories) {
|
|
618
619
|
scanned += 1;
|
|
619
620
|
await yieldEntityRecallScanEvery(scanned, abortSignal);
|
|
620
|
-
const
|
|
621
|
-
if (!entityRef) continue;
|
|
622
|
-
const entry = entities.get(entityRef);
|
|
621
|
+
const entry = typeof memory.frontmatter.entityRef === "string" ? entities.get(memory.frontmatter.entityRef) : undefined;
|
|
623
622
|
if (!entry) continue;
|
|
624
623
|
const snippet = await readMemorySnippet(memory);
|
|
625
|
-
if (
|
|
626
|
-
|
|
627
|
-
|
|
624
|
+
if (entry.memorySnippets.includes(snippet)) continue;
|
|
625
|
+
entry.memorySnippets.push(snippet);
|
|
626
|
+
entry.memorySnippetOrigins = [...(entry.memorySnippetOrigins ?? []), memory.frontmatter.origin];
|
|
628
627
|
}
|
|
629
|
-
|
|
630
628
|
// Each remaining phase is another synchronous pass over the whole index
|
|
631
629
|
// (alias map, native-chunk merge, sort, two full serializations). Yield between
|
|
632
630
|
// them so a section deadline can fire between passes instead of only after all
|
|
@@ -908,12 +906,8 @@ async function buildHintSnippets(
|
|
|
908
906
|
});
|
|
909
907
|
}
|
|
910
908
|
|
|
911
|
-
for (const memorySnippet of entry.memorySnippets.slice(0, Math.min(maxSupportingFacts, 4))) {
|
|
912
|
-
snippets.push({
|
|
913
|
-
text: memorySnippet,
|
|
914
|
-
score: 5,
|
|
915
|
-
kind: "memory",
|
|
916
|
-
});
|
|
909
|
+
for (const [index, memorySnippet] of entry.memorySnippets.slice(0, Math.min(maxSupportingFacts, 4)).entries()) {
|
|
910
|
+
snippets.push({ text: memorySnippet, score: 5, kind: "memory", origin: entry.memorySnippetOrigins?.[index] });
|
|
917
911
|
}
|
|
918
912
|
|
|
919
913
|
for (const chunk of entry.nativeChunks) {
|
|
@@ -968,9 +962,18 @@ function formatEntityHintSection(
|
|
|
968
962
|
mode: EntityQueryMode,
|
|
969
963
|
maxRelatedEntities: number,
|
|
970
964
|
maxChars: number,
|
|
965
|
+
originAuthorityEnabled: boolean, untrustedOrigins: readonly string[],
|
|
971
966
|
): string | null {
|
|
972
967
|
if (candidates.length === 0) return null;
|
|
973
968
|
const lines: string[] = ["## entity_answer_hints", ""];
|
|
969
|
+
// #1955 review: non-native snippet kinds may embed extraction-written content
|
|
970
|
+
// without per-field origin — fence as unknown (least privilege; plumbing #2397).
|
|
971
|
+
const renderSnippet = (snippet: EntityHintSnippet): string => snippet.kind !== "native"
|
|
972
|
+
? renderAuthorityBoundContent(snippet.text, snippet.origin, { enabled: originAuthorityEnabled, untrustedOrigins }) : snippet.text;
|
|
973
|
+
// (see comment above)
|
|
974
|
+
// #1955 review: inline fields (names/types/aliases/targets) cannot carry the
|
|
975
|
+
// multi-line block fence without collapsing the hint list structure —
|
|
976
|
+
// per-field origin plumbing is tracked in #2397.
|
|
974
977
|
for (const { candidate, snippets, uncertainty } of candidates) {
|
|
975
978
|
const hasSummary = Boolean(candidate.entry.summary?.trim());
|
|
976
979
|
const preferredTopSnippets = hasSummary
|
|
@@ -1020,16 +1023,12 @@ function formatEntityHintSection(
|
|
|
1020
1023
|
}
|
|
1021
1024
|
const topSnippetTexts = new Set(topSnippets.map((snippet) => normalizeEntityText(snippet.text)));
|
|
1022
1025
|
lines.push(`- target: ${candidate.entry.name} (${candidate.entry.type})`);
|
|
1023
|
-
|
|
1024
|
-
lines.push(`- resolution: carried forward from recent turns via alias "${candidate.alias}"`);
|
|
1025
|
-
} else {
|
|
1026
|
-
lines.push(`- resolution: matched alias "${candidate.alias}" in the query`);
|
|
1027
|
-
}
|
|
1026
|
+
lines.push(`- resolution: ${candidate.source === "recent_turn" ? "carried forward from recent turns via alias" : "matched alias"} "${candidate.alias}"${candidate.source === "recent_turn" ? "" : " in the query"}`);
|
|
1028
1027
|
if (uncertainty) lines.push(`- uncertainty: ${uncertainty}`);
|
|
1029
1028
|
if (topSnippets.length > 0) {
|
|
1030
1029
|
lines.push("- likely answer:");
|
|
1031
1030
|
for (const snippet of topSnippets) {
|
|
1032
|
-
lines.push(` - ${snippet
|
|
1031
|
+
lines.push(` - ${renderSnippet(snippet)}`);
|
|
1033
1032
|
}
|
|
1034
1033
|
}
|
|
1035
1034
|
if (mode !== "direct") {
|
|
@@ -1039,7 +1038,7 @@ function formatEntityHintSection(
|
|
|
1039
1038
|
if (fallbackTimeline.length > 0) {
|
|
1040
1039
|
lines.push("- recent timeline:");
|
|
1041
1040
|
for (const snippet of fallbackTimeline) {
|
|
1042
|
-
lines.push(` - ${snippet
|
|
1041
|
+
lines.push(` - ${renderSnippet(snippet)}`);
|
|
1043
1042
|
}
|
|
1044
1043
|
}
|
|
1045
1044
|
}
|
|
@@ -1172,7 +1171,15 @@ export async function buildEntityRecallSection(options: BuildEntityRecallSection
|
|
|
1172
1171
|
}),
|
|
1173
1172
|
);
|
|
1174
1173
|
|
|
1175
|
-
const section = formatEntityHintSection(
|
|
1174
|
+
const section = formatEntityHintSection(
|
|
1175
|
+
enriched,
|
|
1176
|
+
queryTokens,
|
|
1177
|
+
mode,
|
|
1178
|
+
options.maxRelatedEntities,
|
|
1179
|
+
options.maxChars,
|
|
1180
|
+
options.originAuthorityEnabled === true,
|
|
1181
|
+
options.untrustedOrigins ?? [],
|
|
1182
|
+
);
|
|
1176
1183
|
// `entityRecallSectionAbsent` so a cancelled build is not recorded as a
|
|
1177
1184
|
// successful section that simply found no entities.
|
|
1178
1185
|
if (!section) return entityRecallSectionAbsent(options.abortSignal);
|
package/src/index.ts
CHANGED
|
@@ -389,8 +389,9 @@ export {
|
|
|
389
389
|
type TrustZoneRecordKind,
|
|
390
390
|
type TrustZoneSourceClass,
|
|
391
391
|
} from "./trust-zones.js";
|
|
392
|
-
|
|
393
|
-
|
|
392
|
+
export { DEFAULT_UNTRUSTED_ORIGINS, classifyOrigin, isUntrustedOrigin, parseOriginClass, renderAuthorityFence, type OriginClass } from "./security/origin-authority.js";
|
|
393
|
+
export { INJECTION_SCREEN_THRESHOLD, screenCandidateFact, type InjectionScreenFinding, type InjectionScreenResult } from "./security/injection-screen.js";
|
|
394
|
+
export { auditMemoryStore, formatAuditMemoryReport, type AuditMemoryReport } from "./security/audit-memory.js";
|
|
394
395
|
// Access layer (HTTP + MCP + schema validation)
|
|
395
396
|
// ---------------------------------------------------------------------------
|
|
396
397
|
|
|
@@ -1204,10 +1205,7 @@ export {
|
|
|
1204
1205
|
type ProcessBatchResult,
|
|
1205
1206
|
} from "./bulk-import/index.js";
|
|
1206
1207
|
|
|
1207
|
-
export {
|
|
1208
|
-
runBulkImportCliCommand,
|
|
1209
|
-
type BulkImportCliCommandOptions,
|
|
1210
|
-
} from "./cli.js";
|
|
1208
|
+
export { runAuditMemoryCliCommand, runBulkImportCliCommand, type BulkImportCliCommandOptions } from "./cli.js";
|
|
1211
1209
|
|
|
1212
1210
|
// ---------------------------------------------------------------------------
|
|
1213
1211
|
// Wearable transcript subsystem (Limitless / Bee / Omi connectors).
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
import { readdir } from "node:fs/promises";
|
|
20
20
|
import path from "node:path";
|
|
21
21
|
|
|
22
|
-
import { resolveIndexingCapabilities } from "../capabilities.js";
|
|
22
|
+
import { resolveIndexingCapabilities, resolveSecurityCapabilities } from "../capabilities.js";
|
|
23
|
+
import { renderAuthorityBoundContent } from "../recall-context-composition.js";
|
|
23
24
|
import { cleanupConversationChunks } from "../conversation-index/cleanup.js";
|
|
24
25
|
import { chunkTranscriptEntries } from "../conversation-index/chunker.js";
|
|
25
26
|
import type { ConversationChunk } from "../conversation-index/chunker.js";
|
|
@@ -42,6 +43,7 @@ import type { PluginConfig } from "../types.js";
|
|
|
42
43
|
*/
|
|
43
44
|
export class ConversationIndexCoordinator {
|
|
44
45
|
private readonly config: PluginConfig;
|
|
46
|
+
private readonly originAuthorityEnabled: boolean;
|
|
45
47
|
private readonly getTranscript: () => TranscriptManager;
|
|
46
48
|
private readonly getBackend: () => ConversationIndexBackend | undefined;
|
|
47
49
|
private readonly indexDir: string;
|
|
@@ -54,6 +56,7 @@ export class ConversationIndexCoordinator {
|
|
|
54
56
|
indexDir: string;
|
|
55
57
|
}) {
|
|
56
58
|
this.config = options.config;
|
|
59
|
+
this.originAuthorityEnabled = resolveSecurityCapabilities(this.config).originAuthority;
|
|
57
60
|
this.getTranscript = options.getTranscript;
|
|
58
61
|
this.getBackend = options.getBackend;
|
|
59
62
|
this.indexDir = options.indexDir;
|
|
@@ -81,10 +84,18 @@ export class ConversationIndexCoordinator {
|
|
|
81
84
|
let used = 0;
|
|
82
85
|
for (const r of results) {
|
|
83
86
|
if (!r?.snippet) continue;
|
|
87
|
+
const body = renderAuthorityBoundContent(
|
|
88
|
+
r.snippet.trim(),
|
|
89
|
+
undefined,
|
|
90
|
+
{
|
|
91
|
+
enabled: this.originAuthorityEnabled,
|
|
92
|
+
untrustedOrigins: this.config.untrustedOrigins,
|
|
93
|
+
},
|
|
94
|
+
);
|
|
84
95
|
const chunk =
|
|
85
96
|
`### ${r.path}\n` +
|
|
86
97
|
`Score: ${r.score.toFixed(3)}\n\n` +
|
|
87
|
-
`${
|
|
98
|
+
`${body}\n`;
|
|
88
99
|
if (used + chunk.length > maxChars) break;
|
|
89
100
|
lines.push(chunk);
|
|
90
101
|
used += chunk.length;
|