@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/config.test.ts
CHANGED
|
@@ -2724,3 +2724,175 @@ test("parseConfig coerces string-typed sharedContextAllowBindingAuthority from t
|
|
|
2724
2724
|
);
|
|
2725
2725
|
}
|
|
2726
2726
|
});
|
|
2727
|
+
|
|
2728
|
+
test("parseConfig consumes backgroundGeneration and leaves openaiBaseUrl untouched", () => {
|
|
2729
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2730
|
+
const previousKey = process.env.OPENAI_API_KEY;
|
|
2731
|
+
const previousBase = process.env.OPENAI_BASE_URL;
|
|
2732
|
+
delete process.env.OPENAI_API_KEY;
|
|
2733
|
+
delete process.env.OPENAI_BASE_URL;
|
|
2734
|
+
try {
|
|
2735
|
+
const parsed = parseConfig({
|
|
2736
|
+
backgroundGeneration: {
|
|
2737
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2738
|
+
token: "bridge-token-fixture",
|
|
2739
|
+
timeoutSeconds: 120,
|
|
2740
|
+
},
|
|
2741
|
+
});
|
|
2742
|
+
assert.equal(parsed.openaiBaseUrl, undefined);
|
|
2743
|
+
assert.equal(parsed.openaiApiKey, undefined);
|
|
2744
|
+
assert.deepEqual(parsed.backgroundGeneration, {
|
|
2745
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2746
|
+
token: "bridge-token-fixture",
|
|
2747
|
+
timeoutSeconds: 120,
|
|
2748
|
+
});
|
|
2749
|
+
|
|
2750
|
+
const explicitOpenAi = parseConfig({
|
|
2751
|
+
backgroundGeneration: {
|
|
2752
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2753
|
+
token: "bridge-token-fixture",
|
|
2754
|
+
timeoutSeconds: 120,
|
|
2755
|
+
},
|
|
2756
|
+
openaiBaseUrl: "http://127.0.0.1:9999/v1",
|
|
2757
|
+
openaiApiKey: "keep-me",
|
|
2758
|
+
});
|
|
2759
|
+
assert.equal(explicitOpenAi.openaiBaseUrl, "http://127.0.0.1:9999/v1");
|
|
2760
|
+
assert.equal(explicitOpenAi.openaiApiKey, "keep-me");
|
|
2761
|
+
assert.equal(
|
|
2762
|
+
explicitOpenAi.backgroundGeneration?.endpoint,
|
|
2763
|
+
"http://127.0.0.1:8765/v1/chat/completions",
|
|
2764
|
+
);
|
|
2765
|
+
} finally {
|
|
2766
|
+
if (previousKey === undefined) delete process.env.OPENAI_API_KEY;
|
|
2767
|
+
else process.env.OPENAI_API_KEY = previousKey;
|
|
2768
|
+
if (previousBase === undefined) delete process.env.OPENAI_BASE_URL;
|
|
2769
|
+
else process.env.OPENAI_BASE_URL = previousBase;
|
|
2770
|
+
}
|
|
2771
|
+
});
|
|
2772
|
+
});
|
|
2773
|
+
|
|
2774
|
+
test("parseConfig ignores llmBridgeClientConfigPath", () => {
|
|
2775
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2776
|
+
const parsed = parseConfig({
|
|
2777
|
+
llmBridgeClientConfigPath: "/no/such/remnic-llm-bridge-client.json",
|
|
2778
|
+
});
|
|
2779
|
+
assert.equal(parsed.backgroundGeneration, undefined);
|
|
2780
|
+
});
|
|
2781
|
+
});
|
|
2782
|
+
|
|
2783
|
+
test("parseConfig rejects backgroundGeneration without a token", () => {
|
|
2784
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2785
|
+
assert.throws(
|
|
2786
|
+
() =>
|
|
2787
|
+
parseConfig({
|
|
2788
|
+
backgroundGeneration: {
|
|
2789
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2790
|
+
},
|
|
2791
|
+
}),
|
|
2792
|
+
/must include a token/,
|
|
2793
|
+
);
|
|
2794
|
+
});
|
|
2795
|
+
});
|
|
2796
|
+
|
|
2797
|
+
test("parseConfig ignores Hermes timeout_seconds on backgroundGeneration", () => {
|
|
2798
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2799
|
+
const parsed = parseConfig({
|
|
2800
|
+
backgroundGeneration: {
|
|
2801
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2802
|
+
token: "bridge-token-fixture",
|
|
2803
|
+
timeout_seconds: 45,
|
|
2804
|
+
},
|
|
2805
|
+
});
|
|
2806
|
+
assert.equal(parsed.backgroundGeneration?.timeoutSeconds, 120);
|
|
2807
|
+
});
|
|
2808
|
+
});
|
|
2809
|
+
|
|
2810
|
+
test("parseConfig keeps env openaiBaseUrl isolated from backgroundGeneration", () => {
|
|
2811
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2812
|
+
const previousKey = process.env.OPENAI_API_KEY;
|
|
2813
|
+
const previousBase = process.env.OPENAI_BASE_URL;
|
|
2814
|
+
process.env.OPENAI_API_KEY = "env-openai-key";
|
|
2815
|
+
process.env.OPENAI_BASE_URL = "http://127.0.0.1:9999/v1";
|
|
2816
|
+
try {
|
|
2817
|
+
const parsed = parseConfig({
|
|
2818
|
+
backgroundGeneration: {
|
|
2819
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2820
|
+
token: "bridge-token-fixture",
|
|
2821
|
+
timeoutSeconds: 45,
|
|
2822
|
+
},
|
|
2823
|
+
});
|
|
2824
|
+
assert.equal(parsed.openaiBaseUrl, "http://127.0.0.1:9999/v1");
|
|
2825
|
+
assert.equal(parsed.openaiApiKey, "env-openai-key");
|
|
2826
|
+
assert.deepEqual(parsed.backgroundGeneration, {
|
|
2827
|
+
endpoint: "http://127.0.0.1:8765/v1/chat/completions",
|
|
2828
|
+
token: "bridge-token-fixture",
|
|
2829
|
+
timeoutSeconds: 45,
|
|
2830
|
+
});
|
|
2831
|
+
} finally {
|
|
2832
|
+
if (previousKey === undefined) delete process.env.OPENAI_API_KEY;
|
|
2833
|
+
else process.env.OPENAI_API_KEY = previousKey;
|
|
2834
|
+
if (previousBase === undefined) delete process.env.OPENAI_BASE_URL;
|
|
2835
|
+
else process.env.OPENAI_BASE_URL = previousBase;
|
|
2836
|
+
}
|
|
2837
|
+
});
|
|
2838
|
+
});
|
|
2839
|
+
|
|
2840
|
+
test("parseConfig rejects a non-object backgroundGeneration value", () => {
|
|
2841
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2842
|
+
assert.throws(
|
|
2843
|
+
() => parseConfig({ backgroundGeneration: "http://127.0.0.1:8765/v1/chat/completions" }),
|
|
2844
|
+
/backgroundGeneration must be an object/,
|
|
2845
|
+
);
|
|
2846
|
+
});
|
|
2847
|
+
});
|
|
2848
|
+
|
|
2849
|
+
test("parseConfig strips a slash-rich bridge endpoint without regex", () => {
|
|
2850
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2851
|
+
const parsed = parseConfig({
|
|
2852
|
+
backgroundGeneration: {
|
|
2853
|
+
endpoint: `http://127.0.0.1:8765/v1/chat/completions${"/".repeat(10_000)}`,
|
|
2854
|
+
token: "bridge-token-fixture",
|
|
2855
|
+
},
|
|
2856
|
+
});
|
|
2857
|
+
assert.equal(
|
|
2858
|
+
parsed.backgroundGeneration?.endpoint,
|
|
2859
|
+
"http://127.0.0.1:8765/v1/chat/completions",
|
|
2860
|
+
);
|
|
2861
|
+
assert.equal(parsed.openaiBaseUrl, undefined);
|
|
2862
|
+
});
|
|
2863
|
+
});
|
|
2864
|
+
|
|
2865
|
+
test("parseConfig rejects plaintext non-loopback backgroundGeneration endpoints", () => {
|
|
2866
|
+
withIsolatedConnectorsDir(false, () => {
|
|
2867
|
+
for (const endpoint of [
|
|
2868
|
+
"http://192.168.10.20:8765/v1/chat/completions",
|
|
2869
|
+
"http://example.test/v1/chat/completions",
|
|
2870
|
+
]) {
|
|
2871
|
+
assert.throws(
|
|
2872
|
+
() =>
|
|
2873
|
+
parseConfig({
|
|
2874
|
+
backgroundGeneration: {
|
|
2875
|
+
endpoint,
|
|
2876
|
+
token: "bridge-token-fixture",
|
|
2877
|
+
},
|
|
2878
|
+
}),
|
|
2879
|
+
/must use HTTPS unless the host is loopback/,
|
|
2880
|
+
);
|
|
2881
|
+
}
|
|
2882
|
+
|
|
2883
|
+
for (const endpoint of [
|
|
2884
|
+
"http://127.0.0.1:8765/v1/chat/completions",
|
|
2885
|
+
"http://localhost:8765/v1/chat/completions",
|
|
2886
|
+
"http://[::1]:8765/v1/chat/completions",
|
|
2887
|
+
"https://example.test/v1/chat/completions",
|
|
2888
|
+
]) {
|
|
2889
|
+
const parsed = parseConfig({
|
|
2890
|
+
backgroundGeneration: {
|
|
2891
|
+
endpoint,
|
|
2892
|
+
token: "bridge-token-fixture",
|
|
2893
|
+
},
|
|
2894
|
+
});
|
|
2895
|
+
assert.equal(parsed.backgroundGeneration?.endpoint, endpoint);
|
|
2896
|
+
}
|
|
2897
|
+
});
|
|
2898
|
+
});
|
package/src/config.ts
CHANGED
|
@@ -25,6 +25,7 @@ import type {
|
|
|
25
25
|
TriggerMode,
|
|
26
26
|
TrustWeights,
|
|
27
27
|
} from "./types.js";
|
|
28
|
+
import { parseLocalLlmConfig } from "./local-llm-config.js";
|
|
28
29
|
import { parseConvergeConfig } from "./converge-config.js";
|
|
29
30
|
import { parseExternalWikiRecallGuard } from "./external-wiki-guard.js";
|
|
30
31
|
import { log } from "./logger.js";
|
|
@@ -2680,49 +2681,7 @@ export function parseConfig(
|
|
|
2680
2681
|
typeof cfg.abstractionNodeStoreDir === "string" && cfg.abstractionNodeStoreDir.trim().length > 0
|
|
2681
2682
|
? cfg.abstractionNodeStoreDir.trim()
|
|
2682
2683
|
: path.join(memoryDir, "state", "abstraction-nodes"),
|
|
2683
|
-
|
|
2684
|
-
localLlmEnabled: cfg.localLlmEnabled === true || cfg.localLlmEnabled === "true", // default: false
|
|
2685
|
-
localLlmUrl:
|
|
2686
|
-
typeof cfg.localLlmUrl === "string" && cfg.localLlmUrl.length > 0
|
|
2687
|
-
? cfg.localLlmUrl
|
|
2688
|
-
: "http://localhost:1234/v1",
|
|
2689
|
-
localLlmModel:
|
|
2690
|
-
typeof cfg.localLlmModel === "string" && cfg.localLlmModel.length > 0
|
|
2691
|
-
? cfg.localLlmModel
|
|
2692
|
-
: "local-model",
|
|
2693
|
-
localLlmApiKey:
|
|
2694
|
-
typeof cfg.localLlmApiKey === "string" && cfg.localLlmApiKey.length > 0
|
|
2695
|
-
? resolveEnvVars(cfg.localLlmApiKey)
|
|
2696
|
-
: localLlmApiKeyEnv === undefined
|
|
2697
|
-
? undefined
|
|
2698
|
-
: readEnvVar(localLlmApiKeyEnv),
|
|
2699
|
-
localLlmApiKeyEnv,
|
|
2700
|
-
localLlmHeaders:
|
|
2701
|
-
cfg.localLlmHeaders && typeof cfg.localLlmHeaders === "object" && !Array.isArray(cfg.localLlmHeaders)
|
|
2702
|
-
? Object.fromEntries(
|
|
2703
|
-
Object.entries(cfg.localLlmHeaders as Record<string, unknown>)
|
|
2704
|
-
.filter(([, value]) => typeof value === "string")
|
|
2705
|
-
.map(([key, value]) => [key, String(value)]),
|
|
2706
|
-
)
|
|
2707
|
-
: undefined,
|
|
2708
|
-
localLlmAuthHeader: cfg.localLlmAuthHeader !== false,
|
|
2709
|
-
localLlmFallback: cfg.localLlmFallback !== false, // default: true
|
|
2710
|
-
localLlmHomeDir:
|
|
2711
|
-
typeof cfg.localLlmHomeDir === "string" && cfg.localLlmHomeDir.length > 0
|
|
2712
|
-
? cfg.localLlmHomeDir
|
|
2713
|
-
: undefined,
|
|
2714
|
-
localLmsCliPath:
|
|
2715
|
-
typeof cfg.localLmsCliPath === "string" && cfg.localLmsCliPath.length > 0
|
|
2716
|
-
? cfg.localLmsCliPath
|
|
2717
|
-
: undefined,
|
|
2718
|
-
localLmsBinDir:
|
|
2719
|
-
typeof cfg.localLmsBinDir === "string" && cfg.localLmsBinDir.length > 0
|
|
2720
|
-
? cfg.localLmsBinDir
|
|
2721
|
-
: undefined,
|
|
2722
|
-
localLlmTimeoutMs:
|
|
2723
|
-
parseBoundedIntegerMs(cfg.localLlmTimeoutMs, 180_000, 1, 86_400_000),
|
|
2724
|
-
localLlmMaxContext:
|
|
2725
|
-
parseOptionalIntegerAtLeast(cfg.localLlmMaxContext, 1024, "localLlmMaxContext"),
|
|
2684
|
+
...parseLocalLlmConfig(cfg, localLlmApiKeyEnv, resolveEnvVars),
|
|
2726
2685
|
// Observability (disabled by default to avoid log spam)
|
|
2727
2686
|
slowLogEnabled: cfg.slowLogEnabled === true,
|
|
2728
2687
|
slowLogThresholdMs:
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Codex-subscription helpers for FallbackLlmClient (issue #2833).
|
|
3
|
+
*
|
|
4
|
+
* Terminal error classification, the `api: "codex-cli"` provider attempt,
|
|
5
|
+
* and Codex runner/lifecycle helpers live here so fallback-llm.ts stays
|
|
6
|
+
* generic chain orchestration.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { raceAbort } from "./abort-error.js";
|
|
10
|
+
import { callCodexCliFallback, isCodexCliFallbackRunnerRegistered } from "./cli-fallback.js";
|
|
11
|
+
import type { CodexCliFallbackRunner } from "./cli-fallback.js";
|
|
12
|
+
import {
|
|
13
|
+
CODEX_SUBSCRIPTION_PROVIDER_ID,
|
|
14
|
+
CodexSubscriptionAuthError,
|
|
15
|
+
CodexSubscriptionConfigError,
|
|
16
|
+
CodexSubscriptionTimeoutError,
|
|
17
|
+
assertNoApiKeyConfig,
|
|
18
|
+
ensureCodexSubscriptionRunnerRegistered,
|
|
19
|
+
getCodexSubscriptionShutdownSignal,
|
|
20
|
+
isDefaultRegisteredCodexSubscriptionRunner,
|
|
21
|
+
} from "./providers/codex-subscription.js";
|
|
22
|
+
import type { ModelProviderConfig } from "./types.js";
|
|
23
|
+
|
|
24
|
+
type CodexSubscriptionAttemptResult = {
|
|
25
|
+
content: string;
|
|
26
|
+
usage?: {
|
|
27
|
+
inputTokens?: number;
|
|
28
|
+
outputTokens?: number;
|
|
29
|
+
totalTokens?: number;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Terminal codex-subscription failures (timeout, auth, config contract).
|
|
35
|
+
* These carry documented caller guidance (`TimeoutError` name, `codex login`
|
|
36
|
+
* steps), so they must survive the chain instead of collapsing into a
|
|
37
|
+
* generic empty/http_error result (issue #2833).
|
|
38
|
+
*/
|
|
39
|
+
export function isTerminalCodexSubscriptionError(error: unknown): boolean {
|
|
40
|
+
return (
|
|
41
|
+
error instanceof CodexSubscriptionTimeoutError ||
|
|
42
|
+
error instanceof CodexSubscriptionAuthError ||
|
|
43
|
+
error instanceof CodexSubscriptionConfigError
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Settle a fallback-LLM chain at the caller deadline. Abort the in-flight
|
|
49
|
+
* work, return immediately, and observe the abandoned promise so a late
|
|
50
|
+
* rejection cannot become unhandled.
|
|
51
|
+
*/
|
|
52
|
+
export async function raceFallbackLlmDeadline<T>(
|
|
53
|
+
work: Promise<T>,
|
|
54
|
+
timeoutMs: number,
|
|
55
|
+
abortOnTimeout: () => void,
|
|
56
|
+
): Promise<{ timedOut: true } | { timedOut: false; value: T }> {
|
|
57
|
+
const deadline = new AbortController();
|
|
58
|
+
const timer = setTimeout(() => deadline.abort(), timeoutMs);
|
|
59
|
+
deadline.signal.addEventListener("abort", abortOnTimeout, { once: true });
|
|
60
|
+
try {
|
|
61
|
+
const value = await raceAbort(
|
|
62
|
+
work,
|
|
63
|
+
deadline.signal,
|
|
64
|
+
`fallback LLM timed out after ${timeoutMs}ms`,
|
|
65
|
+
);
|
|
66
|
+
return { timedOut: false, value };
|
|
67
|
+
} catch (error) {
|
|
68
|
+
if (!deadline.signal.aborted) throw error;
|
|
69
|
+
const afterAbort = await Promise.race([
|
|
70
|
+
work.then(
|
|
71
|
+
(value) => ({ state: "value" as const, value }),
|
|
72
|
+
(lateError) => ({ state: "error" as const, error: lateError }),
|
|
73
|
+
),
|
|
74
|
+
new Promise<{ state: "pending" }>((resolve) => {
|
|
75
|
+
setImmediate(() => resolve({ state: "pending" }));
|
|
76
|
+
}),
|
|
77
|
+
]);
|
|
78
|
+
if (afterAbort.state === "value") return { timedOut: false, value: afterAbort.value };
|
|
79
|
+
if (afterAbort.state === "error") throw afterAbort.error;
|
|
80
|
+
void work.then(
|
|
81
|
+
() => undefined,
|
|
82
|
+
() => undefined,
|
|
83
|
+
);
|
|
84
|
+
return { timedOut: true };
|
|
85
|
+
} finally {
|
|
86
|
+
clearTimeout(timer);
|
|
87
|
+
deadline.signal.removeEventListener("abort", abortOnTimeout);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Attempt the Codex CLI / subscription provider. Returns `undefined` when the
|
|
93
|
+
* model is not `api: "codex-cli"` so the generic FallbackLlmClient path runs.
|
|
94
|
+
*
|
|
95
|
+
* Subscription ids reject a configured apiKey before generic secret resolution
|
|
96
|
+
* — otherwise an unresolvable ref throws a generic error and the provider's
|
|
97
|
+
* `codex login` guidance never surfaces (issue #2833). Other `codex-cli`
|
|
98
|
+
* providers still resolve a configured key. Runtime auth is skipped: the CLI
|
|
99
|
+
* login is the credential.
|
|
100
|
+
*/
|
|
101
|
+
export async function tryCodexSubscriptionProvider(
|
|
102
|
+
model: {
|
|
103
|
+
providerId: string;
|
|
104
|
+
modelId: string;
|
|
105
|
+
providerConfig: ModelProviderConfig;
|
|
106
|
+
},
|
|
107
|
+
messages: Array<{ role: "system" | "user" | "assistant"; content: string }>,
|
|
108
|
+
options: { timeoutMs?: number; signal?: AbortSignal },
|
|
109
|
+
resolveFallbackApiKey: () => Promise<string | undefined>,
|
|
110
|
+
runner?: CodexCliFallbackRunner,
|
|
111
|
+
): Promise<CodexSubscriptionAttemptResult | undefined> {
|
|
112
|
+
if (model.providerConfig.api !== "codex-cli") return undefined;
|
|
113
|
+
|
|
114
|
+
if (model.providerId === CODEX_SUBSCRIPTION_PROVIDER_ID) {
|
|
115
|
+
assertNoApiKeyConfig(model.providerConfig);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const resolvedApiKey =
|
|
119
|
+
model.providerConfig.apiKey === undefined ? undefined : await resolveFallbackApiKey();
|
|
120
|
+
const rawKey = model.providerConfig.apiKey;
|
|
121
|
+
const needsResolution =
|
|
122
|
+
rawKey === "secretref-managed" || (typeof rawKey === "object" && rawKey !== null);
|
|
123
|
+
if (needsResolution && !resolvedApiKey) {
|
|
124
|
+
throw new Error(`API key for provider "${model.providerId}" could not be resolved from secret ref`);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
const effectiveConfig: ModelProviderConfig = {
|
|
128
|
+
...model.providerConfig,
|
|
129
|
+
...(resolvedApiKey ? { apiKey: resolvedApiKey } : {}),
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
// Let the provider surface its typed timeout before the generic outer deadline.
|
|
133
|
+
const callOptions = {
|
|
134
|
+
timeoutMs: options.timeoutMs === undefined
|
|
135
|
+
? undefined
|
|
136
|
+
: Math.max(1, options.timeoutMs - Math.min(100, Math.max(5, Math.floor(options.timeoutMs / 5)))),
|
|
137
|
+
signal: options.signal,
|
|
138
|
+
};
|
|
139
|
+
// A host/benchmark runner on the process seam still wins. The core
|
|
140
|
+
// default runner does not: prefer the owning runtime so shutdown
|
|
141
|
+
// terminates the request that runtime started.
|
|
142
|
+
if (isCodexCliFallbackRunnerRegistered() && !(runner && isDefaultRegisteredCodexSubscriptionRunner())) {
|
|
143
|
+
return await callCodexCliFallback(effectiveConfig, model.modelId, messages, callOptions);
|
|
144
|
+
}
|
|
145
|
+
if (runner) {
|
|
146
|
+
return await callCodexCliFallback(effectiveConfig, model.modelId, messages, callOptions, runner);
|
|
147
|
+
}
|
|
148
|
+
ensureCodexSubscriptionRunnerRegistered();
|
|
149
|
+
return await callCodexCliFallback(effectiveConfig, model.modelId, messages, callOptions);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function abortReason(signal: AbortSignal | undefined): Error {
|
|
153
|
+
const reason = signal?.reason;
|
|
154
|
+
return reason instanceof Error ? reason : new Error("fallback LLM request aborted");
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export function withCodexRuntimeShutdown<T extends { signal?: AbortSignal }>(
|
|
158
|
+
options: T,
|
|
159
|
+
runner: CodexCliFallbackRunner | undefined,
|
|
160
|
+
): T {
|
|
161
|
+
if (!runner) return options;
|
|
162
|
+
const shutdown = getCodexSubscriptionShutdownSignal(runner);
|
|
163
|
+
if (!shutdown) return options;
|
|
164
|
+
return {
|
|
165
|
+
...options,
|
|
166
|
+
signal: options.signal ? AbortSignal.any([options.signal, shutdown]) : shutdown,
|
|
167
|
+
};
|
|
168
|
+
}
|
package/src/fallback-llm.test.ts
CHANGED
|
@@ -939,6 +939,52 @@ test("fallback llm aborts codex-cli fallback requests when timeout wins", { conc
|
|
|
939
939
|
}
|
|
940
940
|
});
|
|
941
941
|
|
|
942
|
+
test("fallback llm timeout is a hard deadline when the provider never settles", { concurrency: false }, async () => {
|
|
943
|
+
clearModelsJsonCache();
|
|
944
|
+
clearSecretCache();
|
|
945
|
+
|
|
946
|
+
const restoreRunner = __codexCliFallbackTestHooks.setRunCodexCliForTest(
|
|
947
|
+
async (request) =>
|
|
948
|
+
await new Promise<never>(() => {
|
|
949
|
+
request.options.signal?.addEventListener("abort", () => undefined, { once: true });
|
|
950
|
+
}),
|
|
951
|
+
);
|
|
952
|
+
|
|
953
|
+
const llm = new FallbackLlmClient({
|
|
954
|
+
agents: {
|
|
955
|
+
defaults: {
|
|
956
|
+
model: {
|
|
957
|
+
primary: "codex-cli/gpt-custom",
|
|
958
|
+
},
|
|
959
|
+
},
|
|
960
|
+
},
|
|
961
|
+
models: {
|
|
962
|
+
providers: {
|
|
963
|
+
"codex-cli": {
|
|
964
|
+
baseUrl: "",
|
|
965
|
+
api: "codex-cli",
|
|
966
|
+
apiKey: "codex-test-key",
|
|
967
|
+
models: [],
|
|
968
|
+
},
|
|
969
|
+
},
|
|
970
|
+
},
|
|
971
|
+
});
|
|
972
|
+
|
|
973
|
+
try {
|
|
974
|
+
const started = Date.now();
|
|
975
|
+
const response = await llm.chatCompletion(
|
|
976
|
+
[{ role: "user", content: "Say OK" }],
|
|
977
|
+
{ temperature: 0, maxTokens: 16, timeoutMs: 30 },
|
|
978
|
+
);
|
|
979
|
+
assert.equal(response, null);
|
|
980
|
+
assert.ok(Date.now() - started < 1_000, "outer timeout must settle without waiting on the provider");
|
|
981
|
+
} finally {
|
|
982
|
+
restoreRunner();
|
|
983
|
+
clearModelsJsonCache();
|
|
984
|
+
clearSecretCache();
|
|
985
|
+
}
|
|
986
|
+
});
|
|
987
|
+
|
|
942
988
|
test("fallback llm can call Ollama native chat and suppress thinking", { concurrency: false }, async () => {
|
|
943
989
|
clearModelsJsonCache();
|
|
944
990
|
clearSecretCache();
|
package/src/fallback-llm.ts
CHANGED
|
@@ -16,10 +16,17 @@ import {
|
|
|
16
16
|
import {
|
|
17
17
|
CODEX_SUBSCRIPTION_PROVIDER_ID,
|
|
18
18
|
codexSubscriptionBuiltinProviderConfig,
|
|
19
|
-
|
|
19
|
+
getCodexSubscriptionRunnerForOwner,
|
|
20
20
|
} from "./providers/codex-subscription.js";
|
|
21
21
|
import { loadModelsJsonProviders } from "./models-json.js";
|
|
22
|
-
import {
|
|
22
|
+
import {
|
|
23
|
+
abortReason,
|
|
24
|
+
isTerminalCodexSubscriptionError,
|
|
25
|
+
raceFallbackLlmDeadline,
|
|
26
|
+
tryCodexSubscriptionProvider,
|
|
27
|
+
withCodexRuntimeShutdown,
|
|
28
|
+
} from "./fallback-llm-codex-subscription.js";
|
|
29
|
+
import type { CodexCliFallbackRunner } from "./cli-fallback.js";
|
|
23
30
|
import { resolveHomeDir } from "./runtime/env.js";
|
|
24
31
|
import { expandTildePath } from "./utils/path.js";
|
|
25
32
|
|
|
@@ -85,6 +92,8 @@ export interface FallbackLlmRuntimeContext {
|
|
|
85
92
|
getRuntimeAuthForModel?: GetRuntimeAuthForModelFn | null;
|
|
86
93
|
resolveApiKeyForProvider?: ResolveApiKeyFn | null;
|
|
87
94
|
workspaceDir?: string;
|
|
95
|
+
/** Per-runtime Codex child owner. Shutdown must terminate only this runner. */
|
|
96
|
+
codexSubscriptionRunner?: CodexCliFallbackRunner;
|
|
88
97
|
}
|
|
89
98
|
|
|
90
99
|
export function fallbackLlmRuntimeContextFromConfig(
|
|
@@ -98,6 +107,7 @@ export function fallbackLlmRuntimeContextFromConfig(
|
|
|
98
107
|
workspaceDir: config.workspaceDir,
|
|
99
108
|
resolveApiKeyForProvider: config.providerApiKeyResolver,
|
|
100
109
|
getRuntimeAuthForModel: config.runtimeAuthForModelResolver,
|
|
110
|
+
codexSubscriptionRunner: getCodexSubscriptionRunnerForOwner(config),
|
|
101
111
|
...overrides,
|
|
102
112
|
};
|
|
103
113
|
}
|
|
@@ -224,12 +234,14 @@ export class FallbackLlmClient {
|
|
|
224
234
|
log.warn("fallback LLM: no models configured in gateway");
|
|
225
235
|
return null;
|
|
226
236
|
}
|
|
237
|
+
options = withCodexRuntimeShutdown(options, this.runtimeContext.codexSubscriptionRunner);
|
|
227
238
|
|
|
228
239
|
const runChain = async (
|
|
229
240
|
initialOptions: FallbackLlmOptions,
|
|
230
241
|
): Promise<FallbackLlmResponse | null> => {
|
|
231
242
|
let runOptions = initialOptions;
|
|
232
243
|
let lastRejectedResponse: FallbackLlmResponse | null = null;
|
|
244
|
+
let terminalError: unknown;
|
|
233
245
|
// Try each model in the chain
|
|
234
246
|
for (let i = 0; i < models.length; i++) {
|
|
235
247
|
if (runOptions.signal?.aborted) {
|
|
@@ -257,6 +269,9 @@ export class FallbackLlmClient {
|
|
|
257
269
|
return response;
|
|
258
270
|
}
|
|
259
271
|
} catch (err) {
|
|
272
|
+
if (isTerminalCodexSubscriptionError(err) && runOptions.signal?.aborted) {
|
|
273
|
+
throw err;
|
|
274
|
+
}
|
|
260
275
|
if (runOptions.signal?.aborted) {
|
|
261
276
|
throw abortReason(runOptions.signal);
|
|
262
277
|
}
|
|
@@ -289,6 +304,9 @@ export class FallbackLlmClient {
|
|
|
289
304
|
continue;
|
|
290
305
|
}
|
|
291
306
|
} catch (retryError) {
|
|
307
|
+
if (isTerminalCodexSubscriptionError(retryError) && runOptions.signal?.aborted) {
|
|
308
|
+
throw retryError;
|
|
309
|
+
}
|
|
292
310
|
if (runOptions.signal?.aborted) throw abortReason(runOptions.signal);
|
|
293
311
|
const retryErrorMsg = runOptions.redactProviderErrors
|
|
294
312
|
? "provider error details redacted"
|
|
@@ -298,6 +316,9 @@ export class FallbackLlmClient {
|
|
|
298
316
|
log.debug(
|
|
299
317
|
`fallback LLM: ${model.modelString} unstructured retry failed (${retryErrorMsg})`,
|
|
300
318
|
);
|
|
319
|
+
if (isTerminalCodexSubscriptionError(retryError)) {
|
|
320
|
+
terminalError = retryError;
|
|
321
|
+
}
|
|
301
322
|
}
|
|
302
323
|
continue;
|
|
303
324
|
}
|
|
@@ -307,11 +328,20 @@ export class FallbackLlmClient {
|
|
|
307
328
|
? err.message
|
|
308
329
|
: String(err);
|
|
309
330
|
log.debug(`fallback LLM: ${model.modelString} failed (${errorMsg}), trying next...`);
|
|
331
|
+
if (isTerminalCodexSubscriptionError(err)) {
|
|
332
|
+
terminalError = err;
|
|
333
|
+
}
|
|
310
334
|
// Continue to next model in chain
|
|
311
335
|
}
|
|
312
336
|
}
|
|
313
337
|
|
|
314
338
|
log.warn(`fallback LLM: all ${models.length} models in chain failed`);
|
|
339
|
+
// A terminal typed provider failure must reach the caller when the
|
|
340
|
+
// chain is exhausted — the documented timeout/re-login guidance
|
|
341
|
+
// depends on it (issue #2833).
|
|
342
|
+
if (terminalError !== undefined) {
|
|
343
|
+
throw terminalError;
|
|
344
|
+
}
|
|
315
345
|
return lastRejectedResponse;
|
|
316
346
|
};
|
|
317
347
|
|
|
@@ -320,7 +350,6 @@ export class FallbackLlmClient {
|
|
|
320
350
|
log.warn("fallback LLM: timed out before request started");
|
|
321
351
|
return null;
|
|
322
352
|
}
|
|
323
|
-
let timeoutHandle: ReturnType<typeof setTimeout> | undefined;
|
|
324
353
|
const controller = new AbortController();
|
|
325
354
|
const onCallerAbort = (): void => {
|
|
326
355
|
controller.abort(abortReason(options.signal));
|
|
@@ -331,22 +360,22 @@ export class FallbackLlmClient {
|
|
|
331
360
|
}
|
|
332
361
|
const timedOptions = { ...options, signal: controller.signal };
|
|
333
362
|
const chain = runChain(timedOptions);
|
|
334
|
-
chain.
|
|
363
|
+
const guarded = chain.then(
|
|
364
|
+
(value) => value,
|
|
365
|
+
(err) => {
|
|
366
|
+
if (isTerminalCodexSubscriptionError(err)) throw err;
|
|
367
|
+
return null;
|
|
368
|
+
},
|
|
369
|
+
);
|
|
335
370
|
try {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
);
|
|
344
|
-
resolve(null);
|
|
345
|
-
}, options.timeoutMs);
|
|
346
|
-
}),
|
|
347
|
-
]);
|
|
371
|
+
const outcome = await raceFallbackLlmDeadline(guarded, options.timeoutMs, () => {
|
|
372
|
+
log.warn(`fallback LLM: timed out after ${options.timeoutMs}ms`);
|
|
373
|
+
controller.abort(
|
|
374
|
+
new Error(`fallback LLM timed out after ${options.timeoutMs}ms`),
|
|
375
|
+
);
|
|
376
|
+
});
|
|
377
|
+
return outcome.timedOut ? null : outcome.value;
|
|
348
378
|
} finally {
|
|
349
|
-
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
350
379
|
options.signal?.removeEventListener("abort", onCallerAbort);
|
|
351
380
|
}
|
|
352
381
|
}
|
|
@@ -386,7 +415,9 @@ export class FallbackLlmClient {
|
|
|
386
415
|
// Caller aborts must propagate (e.g. recall planner cancellation) — do
|
|
387
416
|
// not swallow them as a provider failure, or abort-driven callers lose
|
|
388
417
|
// cancellation and treat it as an extraction error (codex review).
|
|
389
|
-
|
|
418
|
+
// Terminal codex-subscription failures propagate for the same reason:
|
|
419
|
+
// their TimeoutError/auth guidance is the documented contract.
|
|
420
|
+
if (options.signal?.aborted || isTerminalCodexSubscriptionError(err)) throw err;
|
|
390
421
|
log.warn("fallback LLM: chatCompletion threw during structured parse:", err);
|
|
391
422
|
return { result: null, failureReason: "http_error" };
|
|
392
423
|
}
|
|
@@ -643,24 +674,22 @@ export class FallbackLlmClient {
|
|
|
643
674
|
messages: Array<{ role: "system" | "user" | "assistant"; content: string }>,
|
|
644
675
|
options: FallbackLlmOptions,
|
|
645
676
|
): Promise<{ content: string; usage?: FallbackLlmResponse["usage"] } | null> {
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
677
|
+
const codexResult = await tryCodexSubscriptionProvider(
|
|
678
|
+
model,
|
|
679
|
+
messages,
|
|
680
|
+
options,
|
|
681
|
+
() => this.resolveFallbackApiKey(model),
|
|
682
|
+
this.runtimeContext.codexSubscriptionRunner,
|
|
683
|
+
);
|
|
684
|
+
if (codexResult !== undefined) return codexResult;
|
|
685
|
+
const runtimeAuth = await this.resolveRuntimeAuth(model);
|
|
651
686
|
const effectiveBaseUrl = runtimeAuth?.baseUrl ?? model.providerConfig.baseUrl;
|
|
652
|
-
const resolvedApiKey = runtimeAuth?.apiKey
|
|
653
|
-
?? (
|
|
654
|
-
model.providerConfig.api === "codex-cli" && model.providerConfig.apiKey === undefined
|
|
655
|
-
? undefined
|
|
656
|
-
: await this.resolveFallbackApiKey(model)
|
|
657
|
-
);
|
|
687
|
+
const resolvedApiKey = runtimeAuth?.apiKey ?? await this.resolveFallbackApiKey(model);
|
|
658
688
|
|
|
659
689
|
// If the raw key looks like an unresolved secret ref and resolution fails,
|
|
660
690
|
// skip this provider entirely so the chain falls through to the next.
|
|
661
691
|
const rawKey = model.providerConfig.apiKey;
|
|
662
|
-
const needsResolution = rawKey === "secretref-managed"
|
|
663
|
-
|| (typeof rawKey === "object" && rawKey !== null);
|
|
692
|
+
const needsResolution = rawKey === "secretref-managed" || (typeof rawKey === "object" && rawKey !== null);
|
|
664
693
|
if (needsResolution && !resolvedApiKey) {
|
|
665
694
|
throw new Error(`API key for provider "${model.providerId}" could not be resolved from secret ref`);
|
|
666
695
|
}
|
|
@@ -675,18 +704,6 @@ export class FallbackLlmClient {
|
|
|
675
704
|
return await this.callAnthropic(effectiveConfig, model.modelId, messages, options);
|
|
676
705
|
}
|
|
677
706
|
|
|
678
|
-
if (model.providerConfig.api === "codex-cli") {
|
|
679
|
-
// Registers the core subprocess transport only when no host/benchmark
|
|
680
|
-
// runner claimed the seam, so daemon/plugin runtimes work out of the box.
|
|
681
|
-
ensureCodexSubscriptionRunnerRegistered();
|
|
682
|
-
return await callCodexCliFallback(
|
|
683
|
-
effectiveConfig,
|
|
684
|
-
model.modelId,
|
|
685
|
-
messages,
|
|
686
|
-
{ timeoutMs: options.timeoutMs, signal: options.signal },
|
|
687
|
-
);
|
|
688
|
-
}
|
|
689
|
-
|
|
690
707
|
if (model.providerConfig.api === "ollama-chat") {
|
|
691
708
|
return await this.callOllamaChat(effectiveConfig, model.modelId, messages, options);
|
|
692
709
|
}
|
|
@@ -1125,11 +1142,6 @@ export class FallbackLlmClient {
|
|
|
1125
1142
|
}
|
|
1126
1143
|
}
|
|
1127
1144
|
|
|
1128
|
-
function abortReason(signal: AbortSignal | undefined): Error {
|
|
1129
|
-
const reason = signal?.reason;
|
|
1130
|
-
return reason instanceof Error ? reason : new Error("fallback LLM request aborted");
|
|
1131
|
-
}
|
|
1132
|
-
|
|
1133
1145
|
function normalizeRuntimePath(value: unknown): string | undefined {
|
|
1134
1146
|
if (typeof value !== "string") return undefined;
|
|
1135
1147
|
const trimmed = value.trim();
|