@remnic/core 9.69.37 → 9.69.39
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 +14 -12
- package/dist/access-admin-ops-surface.js +86 -83
- package/dist/access-authorization-probe.d.ts +14 -12
- package/dist/access-authorization-probe.js +87 -84
- package/dist/access-boundary.d.ts +14 -12
- package/dist/access-boundary.js +86 -83
- package/dist/access-cli.js +197 -191
- package/dist/access-cli.js.map +1 -1
- package/dist/access-coding-context-resolution.d.ts +2 -1
- package/dist/access-extraction-force-flush.d.ts +14 -12
- package/dist/access-extraction-force-flush.js +86 -83
- package/dist/access-health-types.d.ts +2 -1
- package/dist/access-http-briefing.d.ts +14 -12
- package/dist/access-http-briefing.js +87 -84
- package/dist/access-http-lcm-compaction.d.ts +14 -12
- package/dist/access-http-lifecycle-flush.d.ts +14 -12
- package/dist/access-http-offline-stream.d.ts +14 -12
- package/dist/access-http-query.d.ts +3 -2
- package/dist/access-http-query.js +88 -85
- package/dist/access-http.d.ts +15 -13
- package/dist/access-http.js +108 -105
- package/dist/access-identity-continuity-surface.d.ts +12 -10
- package/dist/access-identity-continuity-surface.js +86 -83
- package/dist/access-lcm-surface.d.ts +14 -12
- package/dist/access-lcm-surface.js +86 -83
- package/dist/access-mcp.d.ts +14 -12
- package/dist/access-mcp.js +97 -94
- package/dist/access-memory-search-fanout.d.ts +3 -2
- package/dist/{access-namespace-preflight-CV5cHujx.d.ts → access-namespace-preflight-DY4z6L5X.d.ts} +1 -1
- package/dist/access-namespace-preflight.d.ts +4 -3
- package/dist/access-namespace-preflight.js +86 -83
- package/dist/access-observe-transcript.d.ts +12 -10
- package/dist/access-observe-write-category.d.ts +37 -0
- package/dist/access-observe-write-category.js +34 -0
- package/dist/access-observe-write-surface.d.ts +17 -15
- package/dist/access-observe-write-surface.js +86 -83
- package/dist/access-offline-manifest.d.ts +12 -10
- package/dist/access-offline-manifest.js +15 -15
- package/dist/access-operations-batch.js +91 -88
- package/dist/access-operations.d.ts +17 -30
- package/dist/access-operations.js +96 -93
- package/dist/access-recall-concurrency.d.ts +14 -12
- package/dist/access-recall-concurrency.js +86 -83
- package/dist/access-recall-response.d.ts +14 -12
- package/dist/access-recall-response.js +86 -83
- package/dist/access-recall-surface.d.ts +14 -12
- package/dist/access-recall-surface.js +86 -83
- package/dist/access-schema.d.ts +210 -107
- package/dist/access-schema.js +9 -15
- package/dist/{access-service-DwHC7lcV.d.ts → access-service-MY4bsr_Q.d.ts} +101 -77
- package/dist/access-service-helpers.d.ts +14 -12
- package/dist/access-service.d.ts +14 -12
- package/dist/access-service.js +86 -83
- package/dist/access-surface-catalog.d.ts +14 -12
- package/dist/access-surface-catalog.js +88 -85
- package/dist/access-surface-catalog.js.map +1 -1
- package/dist/access-wearables-meetings-surface.d.ts +5 -3
- package/dist/action-confidence.d.ts +2 -1
- package/dist/active-memory-bridge.d.ts +2 -1
- package/dist/active-memory-bridge.js +3 -3
- package/dist/active-recall.d.ts +2 -1
- package/dist/active-recall.js +20 -17
- package/dist/active-recall.js.map +1 -1
- package/dist/activity/digest.d.ts +2 -1
- package/dist/adapters/index.js +4 -4
- package/dist/adapters/registry.js +2 -2
- package/dist/ambient-provenance.d.ts +2 -1
- package/dist/artifact-search.d.ts +2 -1
- package/dist/{auto-sync-FSRJDU63.js → auto-sync-RP4C6ZPF.js} +11 -9
- package/dist/{auto-sync-FSRJDU63.js.map → auto-sync-RP4C6ZPF.js.map} +1 -1
- package/dist/background-generation-config.d.ts +10 -0
- package/dist/background-generation-config.js +9 -0
- package/dist/background-generation.d.ts +25 -0
- package/dist/background-generation.js +11 -0
- package/dist/behavior-learner.d.ts +2 -1
- package/dist/behavior-signals.d.ts +2 -1
- package/dist/bootstrap.d.ts +12 -10
- package/dist/briefing-window.d.ts +3 -2
- package/dist/briefing.d.ts +3 -2
- package/dist/briefing.js +27 -26
- package/dist/buffer-surprise-report.d.ts +2 -1
- package/dist/buffer-turn-helpers.d.ts +2 -1
- package/dist/buffer.d.ts +3 -2
- package/dist/buffer.js +8 -8
- package/dist/bulk-import/index.d.ts +4 -3
- package/dist/calibration.d.ts +3 -1
- package/dist/calibration.js +4 -2
- package/dist/calibration.js.map +1 -1
- package/dist/capabilities.d.ts +2 -1
- package/dist/{capsule-crypto-YO5QJ6L3.js → capsule-crypto-7FJQINUR.js} +2 -2
- package/dist/{capsule-merge-ZCXUPLNJ.js → capsule-merge-IPG4IOFP.js} +2 -2
- package/dist/{catalog-Cl4H8N89.d.ts → catalog-CW87xGx8.d.ts} +1 -1
- package/dist/causal-behavior.d.ts +2 -1
- package/dist/causal-behavior.js +2 -2
- package/dist/causal-chain.js +2 -2
- package/dist/causal-consolidation.d.ts +2 -1
- package/dist/causal-consolidation.js +29 -28
- package/dist/causal-consolidation.js.map +1 -1
- package/dist/causal-retrieval.js +2 -2
- package/dist/causal-trajectory-graph.d.ts +2 -1
- package/dist/causal-trajectory-graph.js +2 -2
- package/dist/causal-trajectory.js +1 -1
- package/dist/{chunk-YHU5XUF4.js → chunk-27MKMTBY.js} +2 -2
- package/dist/{chunk-TK4FHQRN.js → chunk-2J3V5QEO.js} +4 -4
- package/dist/{chunk-BXLOS5AJ.js → chunk-2NLLXCJG.js} +2 -2
- package/dist/chunk-2QG4SLZI.js +44 -0
- package/dist/chunk-2QG4SLZI.js.map +1 -0
- package/dist/{chunk-TFRDUD3M.js → chunk-2ZTDRNCS.js} +2 -2
- package/dist/{chunk-PWPIERBM.js → chunk-37CAEC7E.js} +4 -4
- package/dist/{chunk-X7BCM2NA.js → chunk-3EKVN2OP.js} +2 -2
- package/dist/{chunk-S2ULTQZR.js → chunk-3N3PBBEH.js} +2 -2
- package/dist/{chunk-XCF3SFHD.js → chunk-3NPNBVFR.js} +2 -2
- package/dist/{chunk-JO5TQAKW.js → chunk-4BCHFSC7.js} +3 -3
- package/dist/{chunk-Q6D7EUSQ.js → chunk-4JVQRFZD.js} +10 -10
- package/dist/{chunk-YEDVOYL2.js → chunk-4RX5O34R.js} +2 -2
- package/dist/{chunk-JMPYZJQN.js → chunk-4RZLTZVM.js} +4 -4
- package/dist/{chunk-Q7JK6YEB.js → chunk-54NX5EG4.js} +2 -2
- package/dist/{chunk-GWK7FEUL.js → chunk-5FAGCOZD.js} +4 -4
- package/dist/{chunk-2PUE5P7C.js → chunk-5N4MZLEH.js} +5 -5
- package/dist/{chunk-B2YKTE7P.js → chunk-5SPCMAUC.js} +10 -10
- package/dist/{chunk-3OHISDDW.js → chunk-5U7K4W6K.js} +2 -2
- package/dist/{chunk-CYEMS2PG.js → chunk-5YCNDC3C.js} +3 -3
- package/dist/{chunk-PAAJWQH5.js → chunk-62D2PAAM.js} +4 -4
- package/dist/{chunk-52II7PB6.js → chunk-645WOU5I.js} +4 -4
- package/dist/chunk-6AGWBKQU.js +94 -0
- package/dist/chunk-6AGWBKQU.js.map +1 -0
- package/dist/{chunk-326KUXIR.js → chunk-6EHM2AV7.js} +6 -6
- package/dist/{chunk-YM7YN37H.js → chunk-6ET2VII7.js} +2 -2
- package/dist/chunk-6H2G7RFT.js +58 -0
- package/dist/chunk-6H2G7RFT.js.map +1 -0
- package/dist/{chunk-A2YQL2FF.js → chunk-6P4REYKL.js} +5 -5
- package/dist/{chunk-7RKBPXY6.js → chunk-6YAIN5XJ.js} +2 -2
- package/dist/{chunk-2L5FSNPC.js → chunk-A7GQBJP5.js} +10 -10
- package/dist/{chunk-UYVXIY6C.js → chunk-AAZEKXUP.js} +2 -2
- package/dist/{chunk-JR6PP7UM.js → chunk-ACY4ZPF7.js} +28 -2
- package/dist/chunk-ACY4ZPF7.js.map +1 -0
- package/dist/{chunk-IQZ6ISFX.js → chunk-AECJY3GJ.js} +2 -2
- package/dist/{chunk-76DRU7C4.js → chunk-AENM6GKU.js} +2 -2
- package/dist/{chunk-KTRXQQFN.js → chunk-B36GUU6T.js} +4 -4
- package/dist/{chunk-TLHNF6GA.js → chunk-BV4ZKIZH.js} +1 -1
- package/dist/{chunk-ZWEZXVYH.js → chunk-CEO4DONG.js} +2 -2
- package/dist/chunk-CWTCMZGE.js +858 -0
- package/dist/chunk-CWTCMZGE.js.map +1 -0
- package/dist/{chunk-ZEPVWLCN.js → chunk-CZTPU65V.js} +25 -25
- package/dist/{chunk-TRU6JBOI.js → chunk-D545Z7UH.js} +3 -3
- package/dist/{chunk-6E5GYDIE.js → chunk-DGS34QSY.js} +2 -2
- package/dist/{chunk-65RENJGB.js → chunk-E2AWJ7KQ.js} +8 -4
- package/dist/chunk-E2AWJ7KQ.js.map +1 -0
- package/dist/{chunk-6Z3WW2MW.js → chunk-ENBPQEVU.js} +3 -3
- package/dist/{chunk-DOKKRZPH.js → chunk-EYKIDK33.js} +21 -19
- package/dist/chunk-EYKIDK33.js.map +1 -0
- package/dist/{chunk-PNEDMJ53.js → chunk-F4EHXVP7.js} +2 -2
- package/dist/{chunk-JPKZTCWZ.js → chunk-FNHLI2RE.js} +3 -3
- package/dist/{chunk-D2DIYEFW.js → chunk-FWWWUPOE.js} +12 -36
- package/dist/chunk-FWWWUPOE.js.map +1 -0
- package/dist/{chunk-M3MYMWXG.js → chunk-FXHOZGSE.js} +2 -2
- package/dist/{chunk-SAKA6PPL.js → chunk-GAS7KYC7.js} +5 -5
- package/dist/{chunk-LSLCFCCQ.js → chunk-GDYU6VF4.js} +1 -1
- package/dist/chunk-GDYU6VF4.js.map +1 -0
- package/dist/{chunk-2AR5JFD7.js → chunk-GG5FHZJJ.js} +6 -6
- package/dist/{chunk-WS3WNLST.js → chunk-GI4ZBWPQ.js} +3 -3
- package/dist/{chunk-JYR4LH76.js → chunk-GMIQV6DD.js} +2 -2
- package/dist/{chunk-WIKO4SCR.js → chunk-H3TKENU4.js} +5 -5
- package/dist/{chunk-ZLN7AROH.js → chunk-HIP6DKJJ.js} +5 -5
- package/dist/{chunk-SF6RFI5Z.js → chunk-HWLIMQE2.js} +2 -2
- package/dist/{chunk-JZYECQWN.js → chunk-IL6ODG6M.js} +2 -2
- package/dist/{chunk-GNR6YEWZ.js → chunk-IQEJIOEU.js} +6 -6
- package/dist/{chunk-BICNRVEC.js → chunk-IWO6QXWJ.js} +2 -2
- package/dist/{chunk-RN3MVLW3.js → chunk-IYKZJVL5.js} +1 -1
- package/dist/chunk-IYKZJVL5.js.map +1 -0
- package/dist/{chunk-42DJ235G.js → chunk-J272ODKJ.js} +2 -2
- package/dist/{chunk-R3TLVTWW.js → chunk-JDX2OA4R.js} +3 -3
- package/dist/{chunk-G5MO3VQA.js → chunk-JKKII6GX.js} +2 -2
- package/dist/{chunk-L5OXE4PX.js → chunk-JTQR6L2N.js} +3 -3
- package/dist/{chunk-VDX2J7OX.js → chunk-KQAFEZQX.js} +2 -2
- package/dist/{chunk-AKE4GGQ3.js → chunk-KQW3YGEN.js} +2 -2
- package/dist/{chunk-LMMQKZK3.js → chunk-L63GFNKL.js} +1 -1
- package/dist/{chunk-BRZWWUCJ.js → chunk-LMLGBG6H.js} +2 -2
- package/dist/{chunk-3IXB77DA.js → chunk-LPYYY4AP.js} +318 -278
- package/dist/chunk-LPYYY4AP.js.map +1 -0
- package/dist/{chunk-YEN4TREG.js → chunk-LQNRVPTV.js} +54 -567
- package/dist/chunk-LQNRVPTV.js.map +1 -0
- package/dist/{chunk-CQ7SSBO4.js → chunk-M6HBPLBA.js} +2 -2
- package/dist/chunk-MCRVQ5YQ.js +14 -0
- package/dist/chunk-MCRVQ5YQ.js.map +1 -0
- package/dist/{chunk-3YMDY3ZF.js → chunk-MUTVRKKY.js} +16 -16
- package/dist/{chunk-FCFAYMTU.js → chunk-NXGSONWM.js} +2 -2
- package/dist/{chunk-4WGAMREC.js → chunk-O4M4BDIJ.js} +2 -2
- package/dist/{chunk-5SYI2F47.js → chunk-O76F5QPP.js} +2 -2
- package/dist/{chunk-SROIT6QY.js → chunk-OPBFP4TF.js} +28 -11
- package/dist/chunk-OPBFP4TF.js.map +1 -0
- package/dist/{chunk-7MJBKZPU.js → chunk-P4ZAEYKG.js} +68 -34
- package/dist/chunk-P4ZAEYKG.js.map +1 -0
- package/dist/{chunk-57GDHV2D.js → chunk-PCOVEDPK.js} +6 -6
- package/dist/{chunk-PPTOAHTZ.js → chunk-PGAB2V53.js} +2 -2
- package/dist/{chunk-HHDTBYDJ.js → chunk-Q432REND.js} +2 -2
- package/dist/{chunk-XAITGGX5.js → chunk-Q4AUIFUA.js} +4 -4
- package/dist/{chunk-5LLQAUMI.js → chunk-Q7CLGFA7.js} +3 -3
- package/dist/{chunk-KUK56OPR.js → chunk-QHT7MOUF.js} +12 -12
- package/dist/{chunk-W6IJMWTZ.js → chunk-QTQ6XKGT.js} +4 -4
- package/dist/{chunk-FLLORID2.js → chunk-RLJHJQUY.js} +9 -9
- package/dist/{chunk-353KGBKY.js → chunk-RW4QNB4J.js} +4 -4
- package/dist/{chunk-GWQVMKUJ.js → chunk-SCXURCVT.js} +3 -3
- package/dist/{chunk-FQXJAC3T.js → chunk-SGUDMW2K.js} +4 -4
- package/dist/{chunk-LSDEIZ76.js → chunk-TA4C3XB7.js} +6 -6
- package/dist/{chunk-YIZ2EUUL.js → chunk-TNZNSMVJ.js} +94 -94
- package/dist/{chunk-CIYUWSMZ.js → chunk-TRLOFIQC.js} +2 -2
- package/dist/{chunk-TL7NLM2L.js → chunk-TSP5WH72.js} +2 -2
- package/dist/{chunk-3K6UFW5B.js → chunk-UHRZ324M.js} +8 -8
- package/dist/{chunk-JLXWRQNR.js → chunk-UZEHHXYC.js} +170 -167
- package/dist/chunk-UZEHHXYC.js.map +1 -0
- package/dist/{chunk-A5UQ52YQ.js → chunk-UZZ7SQT3.js} +5 -5
- package/dist/{chunk-GHX5PNXW.js → chunk-VBSNUH4J.js} +2 -2
- package/dist/{chunk-MR6LQVZ5.js → chunk-VJIE4D2I.js} +3 -3
- package/dist/{chunk-OTPXEE6W.js → chunk-VSL63CFJ.js} +15 -12
- package/dist/chunk-VSL63CFJ.js.map +1 -0
- package/dist/{chunk-2JGGZICG.js → chunk-WBM2MVBK.js} +2 -2
- package/dist/{chunk-CD3C4BJN.js → chunk-WIWLX65T.js} +2 -2
- package/dist/{chunk-GDDSXVWR.js → chunk-X4TD4O2F.js} +3 -3
- package/dist/{chunk-DQEMWVMT.js → chunk-X7Y7WX73.js} +1 -1
- package/dist/{chunk-FPQDZCUX.js → chunk-XH3HGI2N.js} +2 -2
- package/dist/{chunk-C6KRO3SU.js → chunk-XVDZFTN5.js} +4 -4
- package/dist/{chunk-3SL52JKD.js → chunk-XVZA6VXC.js} +4 -4
- package/dist/chunk-YDVAM7S4.js +221 -0
- package/dist/chunk-YDVAM7S4.js.map +1 -0
- package/dist/chunk-YFTNZMGR.js +71 -0
- package/dist/chunk-YFTNZMGR.js.map +1 -0
- package/dist/{chunk-VELCIWJZ.js → chunk-YKREX63Z.js} +19 -10
- package/dist/chunk-YKREX63Z.js.map +1 -0
- package/dist/{chunk-BLHX5FQW.js → chunk-YUW66UAH.js} +2 -2
- package/dist/{chunk-DOQLHCSS.js → chunk-ZBW7A667.js} +2 -2
- package/dist/{chunk-4DPDIOVA.js → chunk-ZEGL7YCC.js} +2 -2
- package/dist/{chunk-VVX5PZFS.js → chunk-ZHXSOMYH.js} +2 -2
- package/dist/{chunk-GCBIXUPT.js → chunk-ZMWSYUUL.js} +2 -2
- package/dist/{chunk-X2QPKLPL.js → chunk-ZZUVBZL2.js} +2 -2
- package/dist/{cli-1mzd5TM4.d.ts → cli-DGq0MNpO.d.ts} +5 -5
- package/dist/cli-fallback.d.ts +4 -2
- package/dist/cli-fallback.js +3 -1
- package/dist/cli.d.ts +16 -14
- package/dist/cli.js +139 -134
- package/dist/coding/export-okf-codegraph.d.ts +2 -1
- package/dist/coding/export-okf-codegraph.js +26 -25
- package/dist/coding/export-okf-codegraph.js.map +1 -1
- package/dist/coding/pre-action-gate.d.ts +2 -1
- package/dist/coding/pre-action-gate.js +2 -2
- package/dist/compat/codex-cli-fallback.d.ts +1 -1
- package/dist/compat/codex-cli-fallback.js +3 -1
- package/dist/compat/codex-cli-fallback.js.map +1 -1
- package/dist/compounding/engine.d.ts +3 -2
- package/dist/compounding/engine.js +27 -26
- package/dist/compounding/preference-consolidator.d.ts +2 -1
- package/dist/compression-optimizer.d.ts +2 -1
- package/dist/config.d.ts +2 -1
- package/dist/config.js +18 -15
- package/dist/connectors/codex-materialize-runner.d.ts +2 -1
- package/dist/connectors/codex-materialize-runner.js +26 -25
- package/dist/connectors/codex-materialize.d.ts +2 -1
- package/dist/connectors/index.d.ts +2 -1
- package/dist/connectors/index.js +29 -28
- package/dist/consolidation-provenance-check.d.ts +3 -2
- package/dist/consolidation-undo.d.ts +3 -2
- package/dist/contradiction/index.d.ts +5 -3
- package/dist/contradiction/index.js +7 -7
- package/dist/{contradiction-scan-GVD4JJ7B.js → contradiction-scan-BSGKZHYJ.js} +4 -4
- package/dist/contradiction-scan-BSGKZHYJ.js.map +1 -0
- package/dist/converge-config.d.ts +2 -1
- package/dist/convergence-refresh.d.ts +3 -2
- package/dist/convergence-refresh.js +29 -28
- package/dist/conversation-index/backend.d.ts +2 -1
- package/dist/conversation-index/chunker.d.ts +2 -1
- package/dist/conversation-index/faiss-adapter.d.ts +2 -1
- package/dist/conversation-index/indexer.d.ts +2 -1
- package/dist/conversation-index/search.d.ts +2 -1
- package/dist/corpus-watermark.d.ts +2 -1
- package/dist/corpus-watermark.js +29 -28
- package/dist/cross-lingual-recall.d.ts +2 -1
- package/dist/day-summary.d.ts +2 -1
- package/dist/deep-recall-http-glue.d.ts +14 -12
- package/dist/deep-recall-http-glue.js +4 -14
- package/dist/deep-recall-mcp-tools.d.ts +14 -12
- package/dist/deep-recall-policy-llm.d.ts +3 -1
- package/dist/deep-recall-policy-llm.js +5 -3
- package/dist/deep-recall-seeds.d.ts +2 -1
- package/dist/delinearize.d.ts +2 -1
- package/dist/dependency-propagation-config.d.ts +2 -1
- package/dist/{dependency-propagation-delivery-Bua2ApHV.d.ts → dependency-propagation-delivery-Cq1ekOwV.d.ts} +1 -1
- package/dist/direct-answer-wiring.d.ts +2 -1
- package/dist/direct-answer.d.ts +2 -1
- package/dist/embedding-fallback.d.ts +2 -1
- package/dist/enrichment/index.d.ts +2 -1
- package/dist/entity-origin-fields.d.ts +2 -1
- package/dist/entity-retrieval.d.ts +3 -2
- package/dist/entity-retrieval.js +28 -27
- package/dist/entity-schema.d.ts +2 -1
- package/dist/episodic-context.d.ts +2 -1
- package/dist/eval-trajectory-contracts.d.ts +2 -1
- package/dist/eval-trajectory-store.d.ts +2 -1
- package/dist/eval-trajectory.d.ts +2 -1
- package/dist/event-order-recall.js +3 -3
- package/dist/explicit-capture.d.ts +12 -10
- package/dist/explicit-capture.js +6 -6
- package/dist/external-wiki-access.d.ts +14 -12
- package/dist/external-wiki-access.js +87 -84
- package/dist/external-wiki-collection-registration.d.ts +2 -1
- package/dist/external-wiki-collection.d.ts +2 -1
- package/dist/external-wiki-mcp-tools.d.ts +14 -12
- package/dist/extraction-error-classification.d.ts +2 -1
- package/dist/extraction-faithfulness.d.ts +3 -1
- package/dist/extraction-faithfulness.js +5 -3
- package/dist/extraction-judge-telemetry.d.ts +3 -1
- package/dist/extraction-judge-training.d.ts +3 -1
- package/dist/extraction-judge.d.ts +3 -1
- package/dist/extraction-judge.js +5 -3
- package/dist/extraction-liveness.d.ts +2 -1
- package/dist/extraction-normalization.d.ts +2 -1
- package/dist/extraction-prompt.d.ts +2 -1
- package/dist/extraction-source-grounding-rules.d.ts +2 -1
- package/dist/extraction-source-grounding.d.ts +2 -1
- package/dist/extraction-source-grounding.js +3 -3
- package/dist/extraction-span-config.d.ts +2 -1
- package/dist/extraction-span-materialize.d.ts +2 -1
- package/dist/extraction-span-materialize.js +2 -2
- package/dist/extraction.d.ts +2 -1
- package/dist/extraction.js +46 -45
- package/dist/fallback-llm-codex-subscription.d.ts +79 -0
- package/dist/fallback-llm-codex-subscription.js +22 -0
- package/dist/fallback-llm-codex-subscription.js.map +1 -0
- package/dist/fallback-llm.d.ts +5 -1
- package/dist/fallback-llm.js +4 -2
- package/dist/{first-start-migration-GZ45G5FS.js → first-start-migration-ZWMV5CX4.js} +6 -6
- package/dist/{generic-recall-paths-DJBADojG.d.ts → generic-recall-paths-BcySh_f9.d.ts} +1 -1
- package/dist/graph-append-error.d.ts +2 -1
- package/dist/graph-dashboard-diff.d.ts +2 -1
- package/dist/graph-dashboard-key.d.ts +2 -1
- package/dist/graph-dashboard-parser.d.ts +2 -1
- package/dist/{graph-edge-decay-ROSUPDX3.js → graph-edge-decay-MKIRZ762.js} +5 -5
- package/dist/graph-edge-decay-MKIRZ762.js.map +1 -0
- package/dist/graph-edge-reinforcement.d.ts +2 -1
- package/dist/graph-jsonl.d.ts +2 -1
- package/dist/graph-jsonl.js +3 -3
- package/dist/graph-path-reconstruction.d.ts +2 -1
- package/dist/graph-path-scoring.d.ts +2 -1
- package/dist/graph-snapshot.d.ts +2 -1
- package/dist/graph-snapshot.js +3 -3
- package/dist/graph.d.ts +2 -1
- package/dist/graph.js +2 -2
- package/dist/harmonic-retrieval.js +3 -3
- package/dist/importance.d.ts +2 -1
- package/dist/importers/index.d.ts +2 -1
- package/dist/importers/test-utils.d.ts +2 -1
- package/dist/in-flight-reads.d.ts +2 -1
- package/dist/{index-Bsy8ygLL.d.ts → index-DWOb4wz9.d.ts} +2 -2
- package/dist/index.d.ts +713 -705
- package/dist/index.js +419 -346
- package/dist/intent.d.ts +2 -1
- package/dist/lcm/engine.d.ts +2 -1
- package/dist/lcm/engine.js +4 -4
- package/dist/lcm/index.d.ts +2 -1
- package/dist/lcm/index.js +12 -12
- package/dist/lcm/tools.d.ts +2 -1
- package/dist/lifecycle.d.ts +2 -1
- package/dist/live-connectors-runner.d.ts +2 -1
- package/dist/local-llm-config.d.ts +7 -1
- package/dist/local-llm-config.js +12 -0
- package/dist/local-llm.d.ts +2 -1
- package/dist/local-model-endpoint.d.ts +2 -1
- package/dist/location/index.d.ts +4 -3
- package/dist/location/index.js +60 -59
- package/dist/maintenance/memory-governance.d.ts +2 -1
- package/dist/maintenance/memory-governance.js +26 -25
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-lifecycle-ledger.js +27 -26
- package/dist/maintenance/rebuild-memory-projection.d.ts +3 -2
- package/dist/maintenance/rebuild-memory-projection.js +28 -27
- package/dist/{maintenance-DItyBwTC.d.ts → maintenance-CW9wCzMP.d.ts} +3 -3
- package/dist/mcp-memory-inspector-app.d.ts +14 -12
- package/dist/memory-action-policy.d.ts +2 -1
- package/dist/memory-cache.d.ts +2 -1
- package/dist/memory-controller.d.ts +2 -1
- package/dist/memory-lifecycle-ledger-utils.d.ts +2 -1
- package/dist/memory-projection-store.d.ts +2 -1
- package/dist/memory-provenance.d.ts +2 -1
- package/dist/memory-snapshot.d.ts +2 -1
- package/dist/memory-subject-cli.d.ts +14 -12
- package/dist/memory-subject.d.ts +14 -12
- package/dist/memory-worth-outcomes.d.ts +3 -2
- package/dist/models-json.d.ts +2 -1
- package/dist/namespaces/migrate.d.ts +4 -3
- package/dist/namespaces/migrate.js +27 -26
- package/dist/namespaces/principal.d.ts +2 -1
- package/dist/namespaces/search.d.ts +2 -1
- package/dist/namespaces/search.js +6 -6
- package/dist/namespaces/storage.d.ts +4 -3
- package/dist/namespaces/storage.js +26 -25
- package/dist/native-knowledge.d.ts +2 -1
- package/dist/offline-sync-impression-drain.d.ts +2 -1
- package/dist/offline-sync-impression-drain.js +4 -4
- package/dist/operator-doctor-corpus.d.ts +2 -1
- package/dist/operator-doctor-corpus.js +30 -29
- package/dist/operator-doctor-replica.d.ts +2 -1
- package/dist/operator-toolkit.d.ts +4 -3
- package/dist/operator-toolkit.js +53 -49
- package/dist/orchestration/compression-guideline-coordinator.d.ts +3 -2
- package/dist/orchestration/maintenance.d.ts +5 -4
- package/dist/orchestration/maintenance.js +39 -38
- package/dist/{orchestrator-DBUX-aAM.d.ts → orchestrator-ComHLm49.d.ts} +22 -11
- package/dist/orchestrator.d.ts +12 -10
- package/dist/orchestrator.js +224 -218
- package/dist/patterns-cli.d.ts +2 -1
- package/dist/{pipeline-BqgcOk1Z.d.ts → pipeline-CiYcqqhl.d.ts} +1 -1
- package/dist/policy-runtime.d.ts +2 -1
- package/dist/proactive-contention.d.ts +2 -1
- package/dist/provenance.d.ts +2 -1
- package/dist/provenance.js +2 -2
- package/dist/{public-http-CqtZ5kv3.d.ts → public-http-CuK4_Cb1.d.ts} +1 -1
- package/dist/qmd-preflight.d.ts +3 -2
- package/dist/{qmd-BD0ikV_Y.d.ts → qmd-qXD4vatU.d.ts} +1 -1
- package/dist/qmd-recall-cache.d.ts +2 -1
- package/dist/qmd.d.ts +3 -2
- package/dist/recall-concurrency-config.d.ts +2 -1
- package/dist/recall-disclosure-escalation.d.ts +2 -1
- package/dist/recall-explain-renderer.d.ts +2 -1
- package/dist/recall-explain-renderer.js +3 -3
- package/dist/recall-memory-map.d.ts +2 -1
- package/dist/recall-navigate-access.d.ts +2 -1
- package/dist/recall-navigate-access.js +2 -2
- package/dist/recall-navigate-disclosure.d.ts +2 -1
- package/dist/recall-navigate-disclosure.js +1 -1
- package/dist/recall-navigate.d.ts +2 -1
- package/dist/recall-navigate.js +2 -2
- package/dist/recall-planner-llm.d.ts +3 -1
- package/dist/recall-planner-llm.js +4 -2
- package/dist/recall-planner-llm.js.map +1 -1
- package/dist/recall-state-view-admission.d.ts +3 -2
- package/dist/recall-state-view-admission.js +9 -9
- package/dist/recall-state-view-anchors.d.ts +85 -0
- package/dist/recall-state-view-anchors.js +21 -0
- package/dist/recall-state-view-anchors.js.map +1 -0
- package/dist/recall-state-view-inject.js +2 -2
- package/dist/recall-state-view-render.js +2 -2
- package/dist/recall-state-view-widen.js +2 -2
- package/dist/recall-state-view-wire.js +3 -3
- package/dist/recall-state-view.d.ts +37 -1
- package/dist/recall-state-view.js +11 -3
- package/dist/recall-state.d.ts +2 -1
- package/dist/recall-tag-filter.d.ts +2 -1
- package/dist/recall-timings.d.ts +2 -1
- package/dist/recall-xray-cli.d.ts +2 -1
- package/dist/recall-xray-cli.js +4 -4
- package/dist/recall-xray-renderer.d.ts +2 -1
- package/dist/recall-xray-renderer.js +3 -3
- package/dist/recall-xray.d.ts +2 -1
- package/dist/recall-xray.js +2 -2
- package/dist/reconcile/cursor.d.ts +2 -1
- package/dist/reconcile/cursor.js +2 -2
- package/dist/reconcile/manifest.d.ts +2 -1
- package/dist/reconcile/manifest.js +4 -4
- package/dist/reconcile/plan.d.ts +2 -1
- package/dist/reconcile/plan.js +2 -2
- package/dist/replay/normalizers/chatgpt.d.ts +2 -1
- package/dist/replay/normalizers/claude.d.ts +2 -1
- package/dist/replay/normalizers/openclaw.d.ts +2 -1
- package/dist/replay/normalizers/shared.d.ts +2 -1
- package/dist/replay/runner.d.ts +2 -1
- package/dist/replay/types.d.ts +2 -1
- package/dist/replica-divergence.d.ts +2 -1
- package/dist/replica-peers-config.d.ts +2 -1
- package/dist/{resolution-OHJZG45O.js → resolution-4GG3QZRJ.js} +8 -8
- package/dist/resolution-4GG3QZRJ.js.map +1 -0
- package/dist/resolve-auth-token.d.ts +2 -1
- package/dist/resume-bundles.js +19 -16
- package/dist/retrieval-agents.d.ts +3 -2
- package/dist/retrieval-tiers.d.ts +2 -1
- package/dist/routing/engine.d.ts +2 -1
- package/dist/routing/store.d.ts +2 -1
- package/dist/salvage-envelope.d.ts +2 -1
- package/dist/salvage-envelope.js +2 -2
- package/dist/schemas.d.ts +160 -160
- package/dist/{scope-profiles-BIJMsd0B.d.ts → scope-profiles-BT9rqC3w.d.ts} +1 -1
- package/dist/search/embed-helper.d.ts +2 -1
- package/dist/search/factory.d.ts +2 -1
- package/dist/search/factory.js +5 -5
- package/dist/search/index.d.ts +2 -1
- package/dist/search/index.js +13 -13
- package/dist/search/lancedb-backend.d.ts +2 -1
- package/dist/search/meilisearch-backend.d.ts +2 -1
- package/dist/search/noop-backend.d.ts +2 -1
- package/dist/search/orama-backend.d.ts +2 -1
- package/dist/search/port.d.ts +2 -1
- package/dist/search/remote-backend.d.ts +2 -1
- package/dist/{semantic-consolidation-D7sJocll.d.ts → semantic-consolidation-CmZi7thY.d.ts} +1 -1
- package/dist/semantic-consolidation.d.ts +3 -2
- package/dist/semantic-consolidation.js +27 -26
- package/dist/semantic-rule-promotion.js +26 -25
- package/dist/semantic-rule-verifier.d.ts +2 -1
- package/dist/semantic-rule-verifier.js +26 -25
- package/dist/{service-fwgEngUj.d.ts → service-CLkA7AQB.d.ts} +2 -2
- package/dist/session-observer-bands.d.ts +2 -1
- package/dist/session-observer-state.d.ts +2 -1
- package/dist/shared-context/manager.d.ts +8 -7
- package/dist/signal.d.ts +2 -1
- package/dist/source-agent-qualifier.d.ts +2 -1
- package/dist/source-agent-qualifier.js +41 -40
- package/dist/standup/build.js +27 -26
- package/dist/{storage-Cbll3-Tk.d.ts → storage-wvX01lht.d.ts} +1 -1
- package/dist/storage.d.ts +3 -2
- package/dist/storage.js +25 -24
- package/dist/subject-config.d.ts +2 -1
- package/dist/subject-config.js +2 -2
- package/dist/summarizer.d.ts +2 -1
- package/dist/summarizer.js +6 -3
- package/dist/summary-snapshot.d.ts +2 -1
- package/dist/support-passport/index.d.ts +17 -15
- package/dist/support-passport/index.js +92 -89
- package/dist/temporal-supersession.d.ts +3 -2
- package/dist/temporal-timeline-recall.d.ts +2 -1
- package/dist/temporal-validity.d.ts +2 -1
- package/dist/threading.d.ts +2 -1
- package/dist/tier-migration.d.ts +3 -2
- package/dist/tier-routing.d.ts +2 -1
- package/dist/tier-routing.js +3 -3
- package/dist/{tier-stats-VK5PCO2L.js → tier-stats-LUSUUNU6.js} +4 -4
- package/dist/topics.d.ts +2 -1
- package/dist/transcript.d.ts +2 -1
- package/dist/transfer/backup.js +2 -2
- package/dist/transfer/capsule-export.js +2 -2
- package/dist/transfer/capsule-import.js +3 -3
- package/dist/transfer/export-okf.d.ts +2 -1
- package/dist/transfer/export-okf.js +26 -25
- package/dist/transfer/types.d.ts +78 -78
- package/dist/trust-score-stage.d.ts +2 -1
- package/dist/trust-score.d.ts +2 -1
- package/dist/{types-48sPkWB0.d.ts → types-Cyr32ABj.d.ts} +3 -1
- package/dist/types.d.ts +2 -1
- package/dist/types.js +1 -1
- package/dist/utility-runtime.d.ts +2 -1
- package/dist/verified-recall.js +26 -25
- package/dist/who-knows-cli.d.ts +14 -12
- package/dist/who-knows-cli.js +27 -26
- package/dist/who-knows.d.ts +14 -12
- package/dist/who-knows.js +26 -25
- package/dist/write-envelope.d.ts +7 -1
- package/dist/write-envelope.js +1 -1
- package/package.json +2 -2
- package/src/access-boundary.ts +21 -6
- package/src/access-category-alias.test.ts +488 -51
- package/src/access-http.test.ts +249 -0
- package/src/access-http.ts +2 -0
- package/src/access-mcp.test.ts +2 -2
- package/src/access-observe-write-category.ts +25 -0
- package/src/access-observe-write-surface.ts +58 -57
- package/src/access-operations-batch.ts +28 -2
- package/src/access-operations.ts +6 -4
- package/src/access-schema.ts +106 -50
- package/src/access-service.ts +23 -9
- package/src/background-generation-config.ts +79 -0
- package/src/background-generation.test.ts +123 -0
- package/src/background-generation.ts +52 -0
- package/src/cli-fallback.ts +8 -2
- package/src/config.test.ts +172 -0
- package/src/config.ts +2 -43
- package/src/fallback-llm-codex-subscription.ts +168 -0
- package/src/fallback-llm.test.ts +46 -0
- package/src/fallback-llm.ts +60 -48
- package/src/index.ts +2 -16
- package/src/local-llm-config.ts +84 -0
- package/src/orchestration/recall-internal.ts +91 -74
- package/src/orchestration/recall-rerank-coordinator.ts +41 -4
- package/src/orchestration/recall-search-pipeline.ts +25 -18
- package/src/orchestration/recall-state-view-pipeline.test.ts +89 -0
- package/src/providers/codex-subscription.test.ts +804 -1
- package/src/providers/codex-subscription.ts +407 -65
- package/src/recall-rerank-coordinator.test.ts +153 -0
- package/src/recall-state-view-anchors.ts +163 -0
- package/src/recall-state-view-widen.ts +21 -7
- package/src/recall-state-view-zero-diff.test.ts +30 -0
- package/src/recall-state-view.test.ts +161 -0
- package/src/recall-state-view.ts +206 -35
- package/src/summarizer.ts +25 -0
- package/src/trust-score-recall-paths.test.ts +1 -1
- package/src/types.ts +3 -2
- package/src/write-envelope.ts +5 -0
- package/dist/chunk-255PC37A.js +0 -120
- package/dist/chunk-255PC37A.js.map +0 -1
- package/dist/chunk-3IXB77DA.js.map +0 -1
- package/dist/chunk-65RENJGB.js.map +0 -1
- package/dist/chunk-7MJBKZPU.js.map +0 -1
- package/dist/chunk-D2DIYEFW.js.map +0 -1
- package/dist/chunk-DOKKRZPH.js.map +0 -1
- package/dist/chunk-JLXWRQNR.js.map +0 -1
- package/dist/chunk-JR6PP7UM.js.map +0 -1
- package/dist/chunk-LSLCFCCQ.js.map +0 -1
- package/dist/chunk-OTPXEE6W.js.map +0 -1
- package/dist/chunk-RN3MVLW3.js.map +0 -1
- package/dist/chunk-SROIT6QY.js.map +0 -1
- package/dist/chunk-VELCIWJZ.js.map +0 -1
- package/dist/chunk-YEN4TREG.js.map +0 -1
- /package/dist/{capsule-crypto-YO5QJ6L3.js.map → access-observe-write-category.js.map} +0 -0
- /package/dist/{contradiction-scan-GVD4JJ7B.js.map → background-generation-config.js.map} +0 -0
- /package/dist/{graph-edge-decay-ROSUPDX3.js.map → background-generation.js.map} +0 -0
- /package/dist/{resolution-OHJZG45O.js.map → capsule-crypto-7FJQINUR.js.map} +0 -0
- /package/dist/{capsule-merge-ZCXUPLNJ.js.map → capsule-merge-IPG4IOFP.js.map} +0 -0
- /package/dist/{chunk-YHU5XUF4.js.map → chunk-27MKMTBY.js.map} +0 -0
- /package/dist/{chunk-TK4FHQRN.js.map → chunk-2J3V5QEO.js.map} +0 -0
- /package/dist/{chunk-BXLOS5AJ.js.map → chunk-2NLLXCJG.js.map} +0 -0
- /package/dist/{chunk-TFRDUD3M.js.map → chunk-2ZTDRNCS.js.map} +0 -0
- /package/dist/{chunk-PWPIERBM.js.map → chunk-37CAEC7E.js.map} +0 -0
- /package/dist/{chunk-X7BCM2NA.js.map → chunk-3EKVN2OP.js.map} +0 -0
- /package/dist/{chunk-S2ULTQZR.js.map → chunk-3N3PBBEH.js.map} +0 -0
- /package/dist/{chunk-XCF3SFHD.js.map → chunk-3NPNBVFR.js.map} +0 -0
- /package/dist/{chunk-JO5TQAKW.js.map → chunk-4BCHFSC7.js.map} +0 -0
- /package/dist/{chunk-Q6D7EUSQ.js.map → chunk-4JVQRFZD.js.map} +0 -0
- /package/dist/{chunk-YEDVOYL2.js.map → chunk-4RX5O34R.js.map} +0 -0
- /package/dist/{chunk-JMPYZJQN.js.map → chunk-4RZLTZVM.js.map} +0 -0
- /package/dist/{chunk-Q7JK6YEB.js.map → chunk-54NX5EG4.js.map} +0 -0
- /package/dist/{chunk-GWK7FEUL.js.map → chunk-5FAGCOZD.js.map} +0 -0
- /package/dist/{chunk-2PUE5P7C.js.map → chunk-5N4MZLEH.js.map} +0 -0
- /package/dist/{chunk-B2YKTE7P.js.map → chunk-5SPCMAUC.js.map} +0 -0
- /package/dist/{chunk-3OHISDDW.js.map → chunk-5U7K4W6K.js.map} +0 -0
- /package/dist/{chunk-CYEMS2PG.js.map → chunk-5YCNDC3C.js.map} +0 -0
- /package/dist/{chunk-PAAJWQH5.js.map → chunk-62D2PAAM.js.map} +0 -0
- /package/dist/{chunk-52II7PB6.js.map → chunk-645WOU5I.js.map} +0 -0
- /package/dist/{chunk-326KUXIR.js.map → chunk-6EHM2AV7.js.map} +0 -0
- /package/dist/{chunk-YM7YN37H.js.map → chunk-6ET2VII7.js.map} +0 -0
- /package/dist/{chunk-A2YQL2FF.js.map → chunk-6P4REYKL.js.map} +0 -0
- /package/dist/{chunk-7RKBPXY6.js.map → chunk-6YAIN5XJ.js.map} +0 -0
- /package/dist/{chunk-2L5FSNPC.js.map → chunk-A7GQBJP5.js.map} +0 -0
- /package/dist/{chunk-UYVXIY6C.js.map → chunk-AAZEKXUP.js.map} +0 -0
- /package/dist/{chunk-IQZ6ISFX.js.map → chunk-AECJY3GJ.js.map} +0 -0
- /package/dist/{chunk-76DRU7C4.js.map → chunk-AENM6GKU.js.map} +0 -0
- /package/dist/{chunk-KTRXQQFN.js.map → chunk-B36GUU6T.js.map} +0 -0
- /package/dist/{chunk-TLHNF6GA.js.map → chunk-BV4ZKIZH.js.map} +0 -0
- /package/dist/{chunk-ZWEZXVYH.js.map → chunk-CEO4DONG.js.map} +0 -0
- /package/dist/{chunk-ZEPVWLCN.js.map → chunk-CZTPU65V.js.map} +0 -0
- /package/dist/{chunk-TRU6JBOI.js.map → chunk-D545Z7UH.js.map} +0 -0
- /package/dist/{chunk-6E5GYDIE.js.map → chunk-DGS34QSY.js.map} +0 -0
- /package/dist/{chunk-6Z3WW2MW.js.map → chunk-ENBPQEVU.js.map} +0 -0
- /package/dist/{chunk-PNEDMJ53.js.map → chunk-F4EHXVP7.js.map} +0 -0
- /package/dist/{chunk-JPKZTCWZ.js.map → chunk-FNHLI2RE.js.map} +0 -0
- /package/dist/{chunk-M3MYMWXG.js.map → chunk-FXHOZGSE.js.map} +0 -0
- /package/dist/{chunk-SAKA6PPL.js.map → chunk-GAS7KYC7.js.map} +0 -0
- /package/dist/{chunk-2AR5JFD7.js.map → chunk-GG5FHZJJ.js.map} +0 -0
- /package/dist/{chunk-WS3WNLST.js.map → chunk-GI4ZBWPQ.js.map} +0 -0
- /package/dist/{chunk-JYR4LH76.js.map → chunk-GMIQV6DD.js.map} +0 -0
- /package/dist/{chunk-WIKO4SCR.js.map → chunk-H3TKENU4.js.map} +0 -0
- /package/dist/{chunk-ZLN7AROH.js.map → chunk-HIP6DKJJ.js.map} +0 -0
- /package/dist/{chunk-SF6RFI5Z.js.map → chunk-HWLIMQE2.js.map} +0 -0
- /package/dist/{chunk-JZYECQWN.js.map → chunk-IL6ODG6M.js.map} +0 -0
- /package/dist/{chunk-GNR6YEWZ.js.map → chunk-IQEJIOEU.js.map} +0 -0
- /package/dist/{chunk-BICNRVEC.js.map → chunk-IWO6QXWJ.js.map} +0 -0
- /package/dist/{chunk-42DJ235G.js.map → chunk-J272ODKJ.js.map} +0 -0
- /package/dist/{chunk-R3TLVTWW.js.map → chunk-JDX2OA4R.js.map} +0 -0
- /package/dist/{chunk-G5MO3VQA.js.map → chunk-JKKII6GX.js.map} +0 -0
- /package/dist/{chunk-L5OXE4PX.js.map → chunk-JTQR6L2N.js.map} +0 -0
- /package/dist/{chunk-VDX2J7OX.js.map → chunk-KQAFEZQX.js.map} +0 -0
- /package/dist/{chunk-AKE4GGQ3.js.map → chunk-KQW3YGEN.js.map} +0 -0
- /package/dist/{chunk-LMMQKZK3.js.map → chunk-L63GFNKL.js.map} +0 -0
- /package/dist/{chunk-BRZWWUCJ.js.map → chunk-LMLGBG6H.js.map} +0 -0
- /package/dist/{chunk-CQ7SSBO4.js.map → chunk-M6HBPLBA.js.map} +0 -0
- /package/dist/{chunk-3YMDY3ZF.js.map → chunk-MUTVRKKY.js.map} +0 -0
- /package/dist/{chunk-FCFAYMTU.js.map → chunk-NXGSONWM.js.map} +0 -0
- /package/dist/{chunk-4WGAMREC.js.map → chunk-O4M4BDIJ.js.map} +0 -0
- /package/dist/{chunk-5SYI2F47.js.map → chunk-O76F5QPP.js.map} +0 -0
- /package/dist/{chunk-57GDHV2D.js.map → chunk-PCOVEDPK.js.map} +0 -0
- /package/dist/{chunk-PPTOAHTZ.js.map → chunk-PGAB2V53.js.map} +0 -0
- /package/dist/{chunk-HHDTBYDJ.js.map → chunk-Q432REND.js.map} +0 -0
- /package/dist/{chunk-XAITGGX5.js.map → chunk-Q4AUIFUA.js.map} +0 -0
- /package/dist/{chunk-5LLQAUMI.js.map → chunk-Q7CLGFA7.js.map} +0 -0
- /package/dist/{chunk-KUK56OPR.js.map → chunk-QHT7MOUF.js.map} +0 -0
- /package/dist/{chunk-W6IJMWTZ.js.map → chunk-QTQ6XKGT.js.map} +0 -0
- /package/dist/{chunk-FLLORID2.js.map → chunk-RLJHJQUY.js.map} +0 -0
- /package/dist/{chunk-353KGBKY.js.map → chunk-RW4QNB4J.js.map} +0 -0
- /package/dist/{chunk-GWQVMKUJ.js.map → chunk-SCXURCVT.js.map} +0 -0
- /package/dist/{chunk-FQXJAC3T.js.map → chunk-SGUDMW2K.js.map} +0 -0
- /package/dist/{chunk-LSDEIZ76.js.map → chunk-TA4C3XB7.js.map} +0 -0
- /package/dist/{chunk-YIZ2EUUL.js.map → chunk-TNZNSMVJ.js.map} +0 -0
- /package/dist/{chunk-CIYUWSMZ.js.map → chunk-TRLOFIQC.js.map} +0 -0
- /package/dist/{chunk-TL7NLM2L.js.map → chunk-TSP5WH72.js.map} +0 -0
- /package/dist/{chunk-3K6UFW5B.js.map → chunk-UHRZ324M.js.map} +0 -0
- /package/dist/{chunk-A5UQ52YQ.js.map → chunk-UZZ7SQT3.js.map} +0 -0
- /package/dist/{chunk-GHX5PNXW.js.map → chunk-VBSNUH4J.js.map} +0 -0
- /package/dist/{chunk-MR6LQVZ5.js.map → chunk-VJIE4D2I.js.map} +0 -0
- /package/dist/{chunk-2JGGZICG.js.map → chunk-WBM2MVBK.js.map} +0 -0
- /package/dist/{chunk-CD3C4BJN.js.map → chunk-WIWLX65T.js.map} +0 -0
- /package/dist/{chunk-GDDSXVWR.js.map → chunk-X4TD4O2F.js.map} +0 -0
- /package/dist/{chunk-DQEMWVMT.js.map → chunk-X7Y7WX73.js.map} +0 -0
- /package/dist/{chunk-FPQDZCUX.js.map → chunk-XH3HGI2N.js.map} +0 -0
- /package/dist/{chunk-C6KRO3SU.js.map → chunk-XVDZFTN5.js.map} +0 -0
- /package/dist/{chunk-3SL52JKD.js.map → chunk-XVZA6VXC.js.map} +0 -0
- /package/dist/{chunk-BLHX5FQW.js.map → chunk-YUW66UAH.js.map} +0 -0
- /package/dist/{chunk-DOQLHCSS.js.map → chunk-ZBW7A667.js.map} +0 -0
- /package/dist/{chunk-4DPDIOVA.js.map → chunk-ZEGL7YCC.js.map} +0 -0
- /package/dist/{chunk-VVX5PZFS.js.map → chunk-ZHXSOMYH.js.map} +0 -0
- /package/dist/{chunk-GCBIXUPT.js.map → chunk-ZMWSYUUL.js.map} +0 -0
- /package/dist/{chunk-X2QPKLPL.js.map → chunk-ZZUVBZL2.js.map} +0 -0
- /package/dist/{first-start-migration-GZ45G5FS.js.map → first-start-migration-ZWMV5CX4.js.map} +0 -0
- /package/dist/{tier-stats-VK5PCO2L.js.map → tier-stats-LUSUUNU6.js.map} +0 -0
package/src/access-boundary.ts
CHANGED
|
@@ -262,6 +262,14 @@ export interface OperationContext {
|
|
|
262
262
|
readonly abortSignal?: AbortSignal;
|
|
263
263
|
/** Server-resolved connector identity (Phase 1 provenance). Set by the HTTP auth boundary from the matched token's connector; flows to write handlers so frontmatter records which connector submitted the memory. Client-supplied values are always overridden. */
|
|
264
264
|
readonly sourceConnector?: string;
|
|
265
|
+
/**
|
|
266
|
+
* The PRE-validation raw envelope exactly as the transport supplied it
|
|
267
|
+
* (issue #2829). Handlers use it to retain input spellings the schema's
|
|
268
|
+
* transforms canonicalize — e.g. the memory-store category aliases — so
|
|
269
|
+
* diagnostics can name what the caller actually sent. Never trust it for
|
|
270
|
+
* behavior; only the parsed `input` is validated.
|
|
271
|
+
*/
|
|
272
|
+
readonly rawInput?: unknown;
|
|
265
273
|
readonly hooks?: OperationHooks;
|
|
266
274
|
}
|
|
267
275
|
|
|
@@ -286,8 +294,13 @@ export interface OperationSpec<In, Out> {
|
|
|
286
294
|
/** Canonical operation id; matches an {@link OperationName}. */
|
|
287
295
|
readonly name: OperationName;
|
|
288
296
|
readonly description: string;
|
|
289
|
-
/**
|
|
290
|
-
|
|
297
|
+
/**
|
|
298
|
+
* Zod schema validating the raw request envelope. Input type may differ
|
|
299
|
+
* from the output `In` — schemas that canonicalize during parsing (issue
|
|
300
|
+
* #2829 category aliases) are first-class, declared truthfully instead of
|
|
301
|
+
* cast into an input-equals-output shape.
|
|
302
|
+
*/
|
|
303
|
+
readonly schema: z.ZodType<In, z.ZodTypeDef, unknown>;
|
|
291
304
|
/** Handler invoked with the parsed input; throws EngramAccessInputError for domain faults. */
|
|
292
305
|
readonly handler: (input: In, ctx: OperationContext) => Promise<Out>;
|
|
293
306
|
/**
|
|
@@ -478,7 +491,7 @@ export function defineOperation<In, Out>(spec: OperationSpec<In, Out>): BoundOpe
|
|
|
478
491
|
throw new EngramAccessInputError(formatZodIssues(parseResult.error));
|
|
479
492
|
}
|
|
480
493
|
assertOperationAuthorizationAllowed(tokenCapabilityStore.getStore(), spec);
|
|
481
|
-
return spec.handler(parseResult.data, ctx);
|
|
494
|
+
return spec.handler(parseResult.data, { ...ctx, rawInput });
|
|
482
495
|
},
|
|
483
496
|
};
|
|
484
497
|
// Store under the canonical name; the cast is safe because In/Out are
|
|
@@ -496,9 +509,11 @@ export function getOperation(name: OperationName): BoundOperation | undefined {
|
|
|
496
509
|
export function operationRequiresAuthorizedNamespace(name: OperationName): boolean {
|
|
497
510
|
if (name === "namespace_writable") return false;
|
|
498
511
|
if (IMPLICIT_HTTP_NAMESPACE_OPERATIONS.has(name)) return true;
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
512
|
+
let schema: unknown = registry.get(name)?.spec.schema;
|
|
513
|
+
// preprocess/transform/refine each wrap ZodEffects. One unwrap left
|
|
514
|
+
// suggestion_submit looking namespace-free after the category transform.
|
|
515
|
+
while (schema instanceof z.ZodEffects) schema = schema.innerType();
|
|
516
|
+
return schema instanceof z.ZodObject && Object.hasOwn(schema.shape, "namespace");
|
|
502
517
|
}
|
|
503
518
|
|
|
504
519
|
/** Whether an operation resolves its namespace from the authenticated principal. */
|
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* #2780:
|
|
2
|
+
* Issue #2829/#2780: truthful memory-store category input/output types
|
|
3
|
+
* plus alias replay ergonomics.
|
|
3
4
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
5
|
+
* - Input admits the canonical MemoryCategory values plus exactly four
|
|
6
|
+
* project-shaped compat aliases; near-misses reject.
|
|
7
|
+
* - The transform maps aliases to the canonical "fact" DURING parsing.
|
|
8
|
+
* - The inferred output stays the finite MemoryCategory union — the #2826
|
|
9
|
+
* double cast (runtime `project_state`, type says MemoryCategory) is gone.
|
|
10
|
+
* - The raw spelling is retained separately at the request boundary
|
|
11
|
+
* (`rawCategory`, minted only by the transform) for the response coercion
|
|
12
|
+
* note, idempotent-replay rebuild, and quarantine replay.
|
|
13
|
+
* - An idempotent replay recomputes the coercion note from the CURRENT
|
|
14
|
+
* request's spelling while the stored result is reused.
|
|
15
|
+
*
|
|
16
|
+
* The type-level assertions below are enforced by `tsc --noEmit` (tsconfig
|
|
17
|
+
* includes src/**\/*.test.ts), so a regression to a cast or a widened union
|
|
18
|
+
* fails check-types, not just this file's runtime asserts.
|
|
13
19
|
*
|
|
14
20
|
* All fixtures are synthetic — no real user data.
|
|
15
21
|
*/
|
|
@@ -18,15 +24,437 @@ import { mkdtemp, rm } from "node:fs/promises";
|
|
|
18
24
|
import { tmpdir } from "node:os";
|
|
19
25
|
import path from "node:path";
|
|
20
26
|
import test from "node:test";
|
|
27
|
+
import { z } from "zod";
|
|
21
28
|
|
|
22
|
-
import {
|
|
23
|
-
|
|
29
|
+
import {
|
|
30
|
+
categoryAliasCoercion,
|
|
31
|
+
memoryStoreRequestSchema,
|
|
32
|
+
reapplyCategoryCoercion,
|
|
33
|
+
retainedCategoryAlias,
|
|
34
|
+
validateRequest,
|
|
35
|
+
type CategoryAliasCoercion,
|
|
36
|
+
type MemoryStoreRequest,
|
|
37
|
+
type SuggestionSubmitRequest,
|
|
38
|
+
} from "./access-schema.js";
|
|
39
|
+
import { memoryStoreOperation } from "./access-operations.js";
|
|
40
|
+
import { getOperation, operationRequiresAuthorizedNamespace } from "./access-boundary.js";
|
|
41
|
+
import { authorizationProbeNamespaces } from "./access-authorization-probe.js";
|
|
42
|
+
import {
|
|
43
|
+
EngramAccessInputError,
|
|
44
|
+
EngramAccessService,
|
|
45
|
+
NamespaceNotWritableError,
|
|
46
|
+
type EngramAccessWriteResponse,
|
|
47
|
+
} from "./access-service.js";
|
|
48
|
+
import { EngramMcpServer } from "./access-mcp.js";
|
|
24
49
|
import { Orchestrator } from "./orchestrator.js";
|
|
25
|
-
import type { SealedMemoryEnvelope } from "./write-envelope.js";
|
|
26
|
-
import { MEMORY_CATEGORY_NAMES } from "./write-envelope.js";
|
|
27
50
|
import type { CodingContext, PluginConfig } from "./types.js";
|
|
51
|
+
import {
|
|
52
|
+
MEMORY_CATEGORY_NAMES,
|
|
53
|
+
isMemoryCategory,
|
|
54
|
+
sealedWriteToLegacyArgs,
|
|
55
|
+
type SealedMemoryEnvelope,
|
|
56
|
+
} from "./write-envelope.js";
|
|
57
|
+
import { WriteQuarantineStore } from "./write-quarantine.js";
|
|
58
|
+
|
|
59
|
+
const ALIASES = ["project", "project_state", "project-state", "project_update"] as const;
|
|
60
|
+
|
|
61
|
+
const NEAR_MISSES = [
|
|
62
|
+
"projection",
|
|
63
|
+
"projectile",
|
|
64
|
+
"project_typo",
|
|
65
|
+
"project_states",
|
|
66
|
+
"Project",
|
|
67
|
+
"PROJECT_STATE",
|
|
68
|
+
"Project-State",
|
|
69
|
+
" fact",
|
|
70
|
+
"facts",
|
|
71
|
+
"Facts",
|
|
72
|
+
"",
|
|
73
|
+
] as const;
|
|
74
|
+
|
|
75
|
+
// ---------------------------------------------------------------------------
|
|
76
|
+
// Schema: parse behavior
|
|
77
|
+
// ---------------------------------------------------------------------------
|
|
78
|
+
|
|
79
|
+
test("#2829 every compat alias parses to canonical fact and retains its spelling", () => {
|
|
80
|
+
for (const alias of ALIASES) {
|
|
81
|
+
const parsed = memoryStoreRequestSchema.parse({ content: "durable project fact", category: alias });
|
|
82
|
+
assert.equal(parsed.category, "fact", `${alias} must canonicalize to fact`);
|
|
83
|
+
assert.equal(parsed.rawCategory, alias, `${alias} must be retained on rawCategory`);
|
|
84
|
+
assert.equal(isMemoryCategory(alias), false, `${alias} must not be a canonical category`);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
test("#2829 canonical categories parse unchanged with no retained spelling", () => {
|
|
89
|
+
for (const canonical of MEMORY_CATEGORY_NAMES) {
|
|
90
|
+
const parsed = memoryStoreRequestSchema.parse({ content: "durable fact", category: canonical });
|
|
91
|
+
assert.equal(parsed.category, canonical);
|
|
92
|
+
assert.equal(parsed.rawCategory, undefined, `${canonical} must not mint a rawCategory`);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
test("#2829 near-miss spellings reject and list the valid set (rule 51)", () => {
|
|
97
|
+
for (const nearMiss of NEAR_MISSES) {
|
|
98
|
+
const validation = validateRequest("memoryStore", { content: "durable fact", category: nearMiss });
|
|
99
|
+
assert.equal(validation.success, false, `${JSON.stringify(nearMiss)} must reject`);
|
|
100
|
+
if (validation.success) continue;
|
|
101
|
+
const categoryDetail = validation.error.details.find((detail) => detail.field === "category");
|
|
102
|
+
assert.ok(categoryDetail, `${JSON.stringify(nearMiss)} failure must name the category field`);
|
|
103
|
+
assert.match(categoryDetail.message, /category must be one of:/, `${JSON.stringify(nearMiss)} must fail as a finite category`);
|
|
104
|
+
assert.match(categoryDetail.message, /must be one of: fact,/, `${JSON.stringify(nearMiss)} failure must list valid options`);
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
test("#2829 a client-supplied rawCategory never survives parsing", () => {
|
|
109
|
+
const parsed = memoryStoreRequestSchema.parse({
|
|
110
|
+
content: "durable fact",
|
|
111
|
+
category: "preference",
|
|
112
|
+
rawCategory: "project_state",
|
|
113
|
+
});
|
|
114
|
+
assert.equal(parsed.category, "preference");
|
|
115
|
+
assert.equal(parsed.rawCategory, undefined, "rawCategory is transform-minted only — client values strip");
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
test("#2829 reapplyCategoryCoercion rebuilds or removes the stored note", () => {
|
|
119
|
+
const stored: EngramAccessWriteResponse & { categoryCoercion?: CategoryAliasCoercion } = {
|
|
120
|
+
schemaVersion: 1,
|
|
121
|
+
operation: "memory_store",
|
|
122
|
+
namespace: "default",
|
|
123
|
+
dryRun: false,
|
|
124
|
+
accepted: true,
|
|
125
|
+
queued: false,
|
|
126
|
+
status: "stored",
|
|
127
|
+
categoryCoercion: { from: "project_state", to: "fact" },
|
|
128
|
+
};
|
|
129
|
+
const rebuilt = reapplyCategoryCoercion(stored, { from: "project-state", to: "fact" });
|
|
130
|
+
assert.equal(rebuilt.categoryCoercion?.from, "project-state");
|
|
131
|
+
assert.equal(rebuilt.categoryCoercion?.to, "fact");
|
|
132
|
+
assert.equal(stored.categoryCoercion?.from, "project_state", "the stored note itself is untouched");
|
|
133
|
+
|
|
134
|
+
const removed = reapplyCategoryCoercion(stored, undefined);
|
|
135
|
+
assert.equal(removed.categoryCoercion, undefined, "a canonical replay must not report a coercion");
|
|
136
|
+
assert.equal("categoryCoercion" in removed, false, "the key is absent, not undefined-valued");
|
|
137
|
+
|
|
138
|
+
assert.deepEqual(reapplyCategoryCoercion({ status: "stored" } as EngramAccessWriteResponse, undefined), {
|
|
139
|
+
status: "stored",
|
|
140
|
+
});
|
|
141
|
+
});
|
|
142
|
+
|
|
143
|
+
test("#2829 retainedCategoryAlias reads the transform-minted spelling from a raw envelope", () => {
|
|
144
|
+
assert.equal(retainedCategoryAlias({ category: "fact", rawCategory: "project_update" }), "project_update");
|
|
145
|
+
assert.equal(retainedCategoryAlias({ category: "preference" }), undefined);
|
|
146
|
+
assert.equal(retainedCategoryAlias({ rawCategory: "projection" }), undefined);
|
|
147
|
+
assert.equal(retainedCategoryAlias(undefined), undefined);
|
|
148
|
+
assert.equal(retainedCategoryAlias("string"), undefined);
|
|
149
|
+
assert.deepEqual(categoryAliasCoercion("project"), { from: "project", to: "fact" });
|
|
150
|
+
assert.equal(categoryAliasCoercion("fact"), undefined);
|
|
151
|
+
assert.equal(categoryAliasCoercion(undefined), undefined);
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// ---------------------------------------------------------------------------
|
|
155
|
+
// Type-level regressions (enforced by tsc via check-types)
|
|
156
|
+
// ---------------------------------------------------------------------------
|
|
157
|
+
|
|
158
|
+
test("#2829 type-level: output category stays a finite canonical union", () => {
|
|
159
|
+
const canonical: NonNullable<MemoryStoreRequest["category"]> = "fact";
|
|
160
|
+
// @ts-expect-error "project_state" is an input alias, never an output value
|
|
161
|
+
const alias: NonNullable<MemoryStoreRequest["category"]> = "project_state";
|
|
162
|
+
// @ts-expect-error arbitrary strings were never valid output
|
|
163
|
+
const arbitrary: NonNullable<MemoryStoreRequest["category"]> = "projection";
|
|
164
|
+
assert.equal(canonical, "fact");
|
|
165
|
+
assert.equal(alias, "project_state");
|
|
166
|
+
assert.equal(arbitrary, "projection");
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
test("#2829 type-level: wire input admits exactly the canonical set plus the aliases", () => {
|
|
170
|
+
type WireCategory = z.input<typeof memoryStoreRequestSchema>["category"];
|
|
171
|
+
const canonical: WireCategory = "reasoning_trace";
|
|
172
|
+
const alias: WireCategory = "project-state";
|
|
173
|
+
// @ts-expect-error near-misses are not wire input
|
|
174
|
+
const nearMiss: WireCategory = "projection";
|
|
175
|
+
assert.equal(canonical, "reasoning_trace");
|
|
176
|
+
assert.equal(alias, "project-state");
|
|
177
|
+
assert.equal(nearMiss, "projection");
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// ---------------------------------------------------------------------------
|
|
181
|
+
// Operation boundary — the shared HTTP/MCP/CLI dispatch path
|
|
182
|
+
// ---------------------------------------------------------------------------
|
|
183
|
+
|
|
184
|
+
function captureService(): { service: EngramAccessService; captured: Array<Record<string, unknown>> } {
|
|
185
|
+
const captured: Array<Record<string, unknown>> = [];
|
|
186
|
+
const service = {
|
|
187
|
+
memoryStore: async (request: Record<string, unknown>) => {
|
|
188
|
+
captured.push(request);
|
|
189
|
+
return {
|
|
190
|
+
schemaVersion: 1,
|
|
191
|
+
operation: "memory_store",
|
|
192
|
+
namespace: "default",
|
|
193
|
+
dryRun: true,
|
|
194
|
+
accepted: true,
|
|
195
|
+
queued: false,
|
|
196
|
+
status: "validated",
|
|
197
|
+
} satisfies EngramAccessWriteResponse;
|
|
198
|
+
},
|
|
199
|
+
suggestionSubmit: async (request: Record<string, unknown>) => {
|
|
200
|
+
captured.push(request);
|
|
201
|
+
return {
|
|
202
|
+
schemaVersion: 1,
|
|
203
|
+
operation: "suggestion_submit",
|
|
204
|
+
namespace: "default",
|
|
205
|
+
dryRun: true,
|
|
206
|
+
accepted: true,
|
|
207
|
+
queued: true,
|
|
208
|
+
status: "validated",
|
|
209
|
+
} satisfies EngramAccessWriteResponse;
|
|
210
|
+
},
|
|
211
|
+
} as unknown as EngramAccessService;
|
|
212
|
+
return { service, captured };
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
test("#2829 memory_store op canonicalizes the alias and retains the spelling at the boundary", async () => {
|
|
216
|
+
const { service, captured } = captureService();
|
|
217
|
+
const output = await memoryStoreOperation.run(
|
|
218
|
+
{ content: "durable project fact", category: "project_state" },
|
|
219
|
+
{ service },
|
|
220
|
+
);
|
|
221
|
+
assert.equal(output.result.status, "validated");
|
|
222
|
+
assert.equal(captured.length, 1);
|
|
223
|
+
assert.equal(captured[0]?.category, "fact", "the service must receive the canonical category");
|
|
224
|
+
assert.equal(captured[0]?.rawCategory, "project_state", "the boundary must retain the raw spelling");
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
test("#2829 memory_store op rejects a near-miss before the service runs", async () => {
|
|
228
|
+
const { service, captured } = captureService();
|
|
229
|
+
await assert.rejects(
|
|
230
|
+
memoryStoreOperation.run({ content: "durable fact", category: "projection" }, { service }),
|
|
231
|
+
(error: unknown) => {
|
|
232
|
+
assert.ok(error instanceof EngramAccessInputError);
|
|
233
|
+
assert.match(error.message, /Valid: .*fact/);
|
|
234
|
+
return true;
|
|
235
|
+
},
|
|
236
|
+
);
|
|
237
|
+
assert.equal(captured.length, 0);
|
|
238
|
+
});
|
|
239
|
+
|
|
240
|
+
test("#2829 suggestion_submit op uses the same canonical schema and retention", async () => {
|
|
241
|
+
const op = getOperation("suggestion_submit");
|
|
242
|
+
assert.ok(op, "suggestion_submit must be registered");
|
|
243
|
+
const { service, captured } = captureService();
|
|
244
|
+
await op.run(
|
|
245
|
+
{ content: "suggested project fact", category: "project_update", dryRun: true },
|
|
246
|
+
{ service },
|
|
247
|
+
);
|
|
248
|
+
assert.equal(captured.length, 1);
|
|
249
|
+
assert.equal(captured[0]?.category, "fact");
|
|
250
|
+
assert.equal(captured[0]?.rawCategory, "project_update");
|
|
251
|
+
await assert.rejects(
|
|
252
|
+
op.run({ content: "suggested fact", category: "projection" }, { service }),
|
|
253
|
+
EngramAccessInputError,
|
|
254
|
+
);
|
|
255
|
+
assert.equal(captured.length, 1, "near-miss must not dispatch");
|
|
256
|
+
});
|
|
257
|
+
|
|
258
|
+
test("#2829 MCP memory_store dispatch carries the canonical category plus retained spelling", async () => {
|
|
259
|
+
const { service, captured } = captureService();
|
|
260
|
+
const server = new EngramMcpServer(service);
|
|
261
|
+
const response = (await server.handleRequest({
|
|
262
|
+
jsonrpc: "2.0",
|
|
263
|
+
id: 1,
|
|
264
|
+
method: "tools/call",
|
|
265
|
+
params: { name: "engram.memory_store", arguments: { content: "durable project fact", category: "project-state", dryRun: true } },
|
|
266
|
+
})) as { result?: { isError?: boolean } };
|
|
267
|
+
assert.equal(response.result?.isError, false, "the alias must be accepted over MCP");
|
|
268
|
+
assert.equal(captured.length, 1);
|
|
269
|
+
assert.equal(captured[0]?.category, "fact");
|
|
270
|
+
assert.equal(captured[0]?.rawCategory, "project-state");
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
// ---------------------------------------------------------------------------
|
|
274
|
+
// Write surface — coercion note, persisted category, idempotent replay
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
|
|
277
|
+
interface PersistProbe {
|
|
278
|
+
service: EngramAccessService;
|
|
279
|
+
writes: Array<{ category: string; content: string }>;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
function makePersistService(memoryDir: string): PersistProbe {
|
|
283
|
+
const writes: Array<{ category: string; content: string }> = [];
|
|
284
|
+
const orch = Object.create(Orchestrator.prototype) as Orchestrator;
|
|
285
|
+
const internals = orch as unknown as {
|
|
286
|
+
config: PluginConfig;
|
|
287
|
+
_codingContextBySession: Map<string, CodingContext>;
|
|
288
|
+
};
|
|
289
|
+
internals.config = {
|
|
290
|
+
namespacesEnabled: false,
|
|
291
|
+
defaultNamespace: "default",
|
|
292
|
+
sharedNamespace: "shared",
|
|
293
|
+
namespacePolicies: [],
|
|
294
|
+
memoryDir,
|
|
295
|
+
} as unknown as PluginConfig;
|
|
296
|
+
internals._codingContextBySession = new Map();
|
|
297
|
+
(orch as unknown as { getStorage: () => Promise<unknown> }).getStorage = async () => ({
|
|
298
|
+
readAllMemories: async () => [],
|
|
299
|
+
readAllColdMemories: async () => [],
|
|
300
|
+
appendMemoryLifecycleEvents: async () => {},
|
|
301
|
+
writeSealedMemory: async (envelope: SealedMemoryEnvelope) => {
|
|
302
|
+
const { category, content } = sealedWriteToLegacyArgs(envelope);
|
|
303
|
+
writes.push({ category, content });
|
|
304
|
+
return { id: `mem-${writes.length}`, duplicateOf: undefined };
|
|
305
|
+
},
|
|
306
|
+
});
|
|
307
|
+
return { service: new EngramAccessService(orch), writes };
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
async function withPersistService(fn: (probe: PersistProbe) => Promise<void>): Promise<void> {
|
|
311
|
+
const dir = await mkdtemp(path.join(tmpdir(), "remnic-2829-"));
|
|
312
|
+
try {
|
|
313
|
+
await fn(makePersistService(dir));
|
|
314
|
+
} finally {
|
|
315
|
+
await rm(dir, { recursive: true, force: true });
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
test("#2829 an aliased write stores as fact and reports the coercion on the response", async () => {
|
|
320
|
+
await withPersistService(async ({ service, writes }) => {
|
|
321
|
+
const response = await service.memoryStore({
|
|
322
|
+
content: "the deploy pipeline now runs on the staging cluster",
|
|
323
|
+
category: "fact",
|
|
324
|
+
confidence: 0.9,
|
|
325
|
+
tags: [],
|
|
326
|
+
rawCategory: "project_state",
|
|
327
|
+
});
|
|
328
|
+
assert.equal(response.status, "stored");
|
|
329
|
+
assert.deepEqual(response.categoryCoercion, { from: "project_state", to: "fact" });
|
|
330
|
+
assert.equal(writes.length, 1);
|
|
331
|
+
assert.equal(writes[0]?.category, "fact", "the persisted memory must carry the canonical category");
|
|
332
|
+
});
|
|
333
|
+
});
|
|
334
|
+
|
|
335
|
+
test("#2829 a canonical write reports no coercion", async () => {
|
|
336
|
+
await withPersistService(async ({ service }) => {
|
|
337
|
+
const response = await service.memoryStore({
|
|
338
|
+
content: "plain canonical durable fact",
|
|
339
|
+
category: "preference",
|
|
340
|
+
confidence: 0.9,
|
|
341
|
+
tags: [],
|
|
342
|
+
});
|
|
343
|
+
assert.equal(response.status, "stored");
|
|
344
|
+
assert.equal(response.categoryCoercion, undefined);
|
|
345
|
+
assert.equal("categoryCoercion" in response, false);
|
|
346
|
+
});
|
|
347
|
+
});
|
|
348
|
+
|
|
349
|
+
test("#2829 a dry run still reports the coercion note", async () => {
|
|
350
|
+
await withPersistService(async ({ service }) => {
|
|
351
|
+
const response = await service.memoryStore({
|
|
352
|
+
content: "dry run of an aliased write",
|
|
353
|
+
category: "fact",
|
|
354
|
+
confidence: 0.9,
|
|
355
|
+
tags: [],
|
|
356
|
+
dryRun: true,
|
|
357
|
+
rawCategory: "project",
|
|
358
|
+
});
|
|
359
|
+
assert.equal(response.status, "validated");
|
|
360
|
+
assert.deepEqual(response.categoryCoercion, { from: "project", to: "fact" });
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
|
|
364
|
+
test("#2829 idempotent replay rebuilds the note from the CURRENT spelling and persists once", async () => {
|
|
365
|
+
await withPersistService(async ({ service, writes }) => {
|
|
366
|
+
const base = {
|
|
367
|
+
content: "one idempotent aliased write",
|
|
368
|
+
category: "fact" as const,
|
|
369
|
+
confidence: 0.9,
|
|
370
|
+
tags: [] as string[],
|
|
371
|
+
idempotencyKey: "k-2829",
|
|
372
|
+
};
|
|
373
|
+
const first = await service.memoryStore({ ...base, rawCategory: "project_state" });
|
|
374
|
+
assert.equal(first.status, "stored");
|
|
375
|
+
assert.equal(first.idempotencyReplay, undefined);
|
|
376
|
+
assert.equal(first.categoryCoercion?.from, "project_state");
|
|
377
|
+
|
|
378
|
+
// Same key + equivalent (canonicalized) payload: a replay, not a conflict.
|
|
379
|
+
const second = await service.memoryStore({ ...base, rawCategory: "project-state" });
|
|
380
|
+
assert.equal(second.idempotencyReplay, true, "an alias and canonical spelling share one fingerprint");
|
|
381
|
+
assert.equal(second.categoryCoercion?.from, "project-state", "the replay names THIS request's spelling");
|
|
382
|
+
|
|
383
|
+
// A canonical replay must not inherit the stored note.
|
|
384
|
+
const third = await service.memoryStore(base);
|
|
385
|
+
assert.equal(third.idempotencyReplay, true);
|
|
386
|
+
assert.equal("categoryCoercion" in third, false);
|
|
387
|
+
|
|
388
|
+
assert.equal(writes.length, 1, "exactly one persist across all three requests");
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
|
|
392
|
+
test("#2829 peek idempotency ignores the retained spelling", async () => {
|
|
393
|
+
await withPersistService(async ({ service }) => {
|
|
394
|
+
const withAlias = await service.peekMemoryStoreIdempotency({
|
|
395
|
+
content: "peeked write",
|
|
396
|
+
category: "fact",
|
|
397
|
+
confidence: 0.9,
|
|
398
|
+
tags: [],
|
|
399
|
+
idempotencyKey: "peek-2829",
|
|
400
|
+
rawCategory: "project_update",
|
|
401
|
+
});
|
|
402
|
+
const canonical = await service.peekMemoryStoreIdempotency({
|
|
403
|
+
content: "peeked write",
|
|
404
|
+
category: "fact",
|
|
405
|
+
confidence: 0.9,
|
|
406
|
+
tags: [],
|
|
407
|
+
idempotencyKey: "peek-2829",
|
|
408
|
+
});
|
|
409
|
+
assert.deepEqual(withAlias, canonical, "the fingerprint must hash the canonical category only");
|
|
410
|
+
});
|
|
411
|
+
});
|
|
412
|
+
|
|
413
|
+
// ---------------------------------------------------------------------------
|
|
414
|
+
// Quarantine — the parked payload keeps the raw spelling for replay
|
|
415
|
+
// ---------------------------------------------------------------------------
|
|
416
|
+
|
|
417
|
+
test("#2829 an ACL-rejected aliased write parks canonical + rawCategory for replay", async () => {
|
|
418
|
+
const dir = await mkdtemp(path.join(tmpdir(), "remnic-2829-q-"));
|
|
419
|
+
try {
|
|
420
|
+
const orch = Object.create(Orchestrator.prototype) as Orchestrator;
|
|
421
|
+
const internals = orch as unknown as {
|
|
422
|
+
config: PluginConfig;
|
|
423
|
+
_codingContextBySession: Map<string, CodingContext>;
|
|
424
|
+
};
|
|
425
|
+
internals.config = {
|
|
426
|
+
namespacesEnabled: true,
|
|
427
|
+
defaultNamespace: "default",
|
|
428
|
+
sharedNamespace: "shared",
|
|
429
|
+
namespacePolicies: [],
|
|
430
|
+
memoryDir: dir,
|
|
431
|
+
} as unknown as PluginConfig;
|
|
432
|
+
internals._codingContextBySession = new Map();
|
|
433
|
+
const service = new EngramAccessService(orch);
|
|
434
|
+
|
|
435
|
+
await assert.rejects(
|
|
436
|
+
service.memoryStore({
|
|
437
|
+
content: "quarantined aliased write",
|
|
438
|
+
category: "fact",
|
|
439
|
+
confidence: 0.9,
|
|
440
|
+
tags: [],
|
|
441
|
+
namespace: "victim-secret",
|
|
442
|
+
authenticatedPrincipal: "alice",
|
|
443
|
+
rawCategory: "project_state",
|
|
444
|
+
} as Parameters<EngramAccessService["memoryStore"]>[0]),
|
|
445
|
+
NamespaceNotWritableError,
|
|
446
|
+
);
|
|
447
|
+
|
|
448
|
+
const records = await new WriteQuarantineStore(dir).list();
|
|
449
|
+
assert.equal(records.length, 1);
|
|
450
|
+
const payload = records[0]?.payload as { category?: string; rawCategory?: string };
|
|
451
|
+
assert.equal(payload.category, "fact", "parked category is the parsed canonical value");
|
|
452
|
+
assert.equal(payload.rawCategory, "project_state", "parked payload retains the raw spelling for replay");
|
|
453
|
+
} finally {
|
|
454
|
+
await rm(dir, { recursive: true, force: true });
|
|
455
|
+
}
|
|
456
|
+
});
|
|
28
457
|
|
|
29
|
-
const PROJECT_ALIASES = ["project", "project_state", "project-state", "project_update"] as const;
|
|
30
458
|
function makeService(persisted: { category?: string; writes?: number }, memoryDir?: string): EngramAccessService {
|
|
31
459
|
const orch = Object.create(Orchestrator.prototype) as Orchestrator;
|
|
32
460
|
const internals = orch as unknown as {
|
|
@@ -57,7 +485,7 @@ test("project-shaped category aliases store as fact and the response reports the
|
|
|
57
485
|
try {
|
|
58
486
|
const persisted: { category?: string } = {};
|
|
59
487
|
const service = makeService(persisted);
|
|
60
|
-
for (const alias of
|
|
488
|
+
for (const alias of ALIASES) {
|
|
61
489
|
const request = memoryStoreRequestSchema.parse({
|
|
62
490
|
sessionKey: "s-2780",
|
|
63
491
|
content: "durable synthetic memory content for alias tests",
|
|
@@ -79,6 +507,49 @@ test("project-shaped category aliases store as fact and the response reports the
|
|
|
79
507
|
}
|
|
80
508
|
});
|
|
81
509
|
|
|
510
|
+
// ---------------------------------------------------------------------------
|
|
511
|
+
// Authorization probe — nested preprocess/transform still requires namespace
|
|
512
|
+
// ---------------------------------------------------------------------------
|
|
513
|
+
|
|
514
|
+
test("#2829/#2866 transformed write schemas still require an authorized namespace", () => {
|
|
515
|
+
assert.equal(
|
|
516
|
+
memoryStoreRequestSchema instanceof z.ZodEffects,
|
|
517
|
+
true,
|
|
518
|
+
"memory_store schema is a category transform",
|
|
519
|
+
);
|
|
520
|
+
const suggestion = getOperation("suggestion_submit");
|
|
521
|
+
assert.ok(suggestion);
|
|
522
|
+
assert.ok(
|
|
523
|
+
suggestion.spec.schema instanceof z.ZodEffects,
|
|
524
|
+
"suggestion_submit wraps preprocess around the transform",
|
|
525
|
+
);
|
|
526
|
+
const inner = suggestion.spec.schema.innerType();
|
|
527
|
+
assert.equal(
|
|
528
|
+
inner instanceof z.ZodEffects,
|
|
529
|
+
true,
|
|
530
|
+
"one unwrap still lands on the category transform, not the object",
|
|
531
|
+
);
|
|
532
|
+
assert.equal(inner instanceof z.ZodObject, false);
|
|
533
|
+
|
|
534
|
+
for (const operation of ["memory_store", "suggestion_submit"] as const) {
|
|
535
|
+
assert.equal(
|
|
536
|
+
operationRequiresAuthorizedNamespace(operation),
|
|
537
|
+
true,
|
|
538
|
+
`${operation} must stay namespace-required after the category transform`,
|
|
539
|
+
);
|
|
540
|
+
assert.deepEqual(
|
|
541
|
+
authorizationProbeNamespaces([operation], undefined),
|
|
542
|
+
[undefined],
|
|
543
|
+
`${operation} probe must authorize the missing/default namespace`,
|
|
544
|
+
);
|
|
545
|
+
assert.deepEqual(
|
|
546
|
+
authorizationProbeNamespaces([operation], "other"),
|
|
547
|
+
["other"],
|
|
548
|
+
`${operation} probe must authorize the requested namespace`,
|
|
549
|
+
);
|
|
550
|
+
}
|
|
551
|
+
});
|
|
552
|
+
|
|
82
553
|
test("dryRun reports the coercion without persisting (#2780)", async () => {
|
|
83
554
|
const persisted: { category?: string } = {};
|
|
84
555
|
const service = makeService(persisted);
|
|
@@ -115,41 +586,6 @@ test("valid categories pass through unchanged with no coercion note (#2780)", as
|
|
|
115
586
|
}
|
|
116
587
|
});
|
|
117
588
|
|
|
118
|
-
test("near-miss project spellings reject naming the valid set and the fact hint (#2780 fix A)", () => {
|
|
119
|
-
// Only the four telemetry-attested spellings coerce; everything else —
|
|
120
|
-
// including regex-shaped near-misses — must reject with the full list.
|
|
121
|
-
for (const bad of [
|
|
122
|
-
"vibe",
|
|
123
|
-
"Project_State",
|
|
124
|
-
"project state",
|
|
125
|
-
"",
|
|
126
|
-
"projection",
|
|
127
|
-
"projectile",
|
|
128
|
-
"project_typo",
|
|
129
|
-
"projections",
|
|
130
|
-
]) {
|
|
131
|
-
assert.throws(
|
|
132
|
-
() =>
|
|
133
|
-
memoryStoreRequestSchema.parse({
|
|
134
|
-
sessionKey: "s-2780-bad",
|
|
135
|
-
content: "durable synthetic memory content for alias tests",
|
|
136
|
-
category: bad,
|
|
137
|
-
dryRun: true,
|
|
138
|
-
}),
|
|
139
|
-
(err: unknown) => {
|
|
140
|
-
assert.ok(err instanceof Error, `${JSON.stringify(bad)} must reject with an error`);
|
|
141
|
-
assert.match(err.message, /must be one of: /, "error must name the valid categories");
|
|
142
|
-
for (const valid of MEMORY_CATEGORY_NAMES) {
|
|
143
|
-
assert.match(err.message, new RegExp(`\\b${valid}\\b`), `error must list ${valid}`);
|
|
144
|
-
}
|
|
145
|
-
assert.match(err.message, /for project state\/facts use/, "error must carry the hint");
|
|
146
|
-
return true;
|
|
147
|
-
},
|
|
148
|
-
`${JSON.stringify(bad)} must be rejected, not coerced`,
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
});
|
|
152
|
-
|
|
153
589
|
test("suggestion_submit coerces project-shaped aliases the same way (#2780)", async () => {
|
|
154
590
|
const persisted: { category?: string } = {};
|
|
155
591
|
const service = makeService(persisted);
|
|
@@ -193,6 +629,7 @@ test("idempotent replay recomputes the coercion note from the current request's
|
|
|
193
629
|
await rm(dir, { recursive: true, force: true });
|
|
194
630
|
}
|
|
195
631
|
});
|
|
632
|
+
|
|
196
633
|
test("MemoryStoreRequest and SuggestionSubmitRequest category are finite canonical unions (compile-time)", () => {
|
|
197
634
|
const invalidMemoryStore: MemoryStoreRequest = {
|
|
198
635
|
content: "durable synthetic content for type test",
|