@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
|
@@ -11,17 +11,18 @@ import {
|
|
|
11
11
|
loadModelsJsonProviders
|
|
12
12
|
} from "./chunk-45GF7Y3V.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
CODEX_SUBSCRIPTION_PROVIDER_ID,
|
|
15
|
+
abortReason,
|
|
16
|
+
codexSubscriptionBuiltinProviderConfig,
|
|
17
|
+
getCodexSubscriptionRunnerForOwner,
|
|
18
|
+
isTerminalCodexSubscriptionError,
|
|
19
|
+
raceFallbackLlmDeadline,
|
|
20
|
+
tryCodexSubscriptionProvider,
|
|
21
|
+
withCodexRuntimeShutdown
|
|
22
|
+
} from "./chunk-CWTCMZGE.js";
|
|
19
23
|
import {
|
|
20
24
|
extractJsonCandidates
|
|
21
25
|
} from "./chunk-RGMVMVMF.js";
|
|
22
|
-
import {
|
|
23
|
-
launchProcess
|
|
24
|
-
} from "./chunk-ZEFVK7XC.js";
|
|
25
26
|
import {
|
|
26
27
|
expandTildePath
|
|
27
28
|
} from "./chunk-6KH5NLQS.js";
|
|
@@ -33,525 +34,7 @@ import {
|
|
|
33
34
|
} from "./chunk-3WCASNQZ.js";
|
|
34
35
|
|
|
35
36
|
// src/fallback-llm.ts
|
|
36
|
-
import path2 from "path";
|
|
37
|
-
|
|
38
|
-
// src/providers/codex-subscription.ts
|
|
39
|
-
import { mkdir, mkdtemp, readFile, rm } from "fs/promises";
|
|
40
|
-
import os from "os";
|
|
41
37
|
import path from "path";
|
|
42
|
-
var CODEX_SUBSCRIPTION_PROVIDER_ID = "codex-subscription";
|
|
43
|
-
var CODEX_EXECUTABLE_ENV = "REMNIC_CODEX_EXECUTABLE";
|
|
44
|
-
var DEFAULT_REASONING_EFFORT = "medium";
|
|
45
|
-
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
46
|
-
var LOGIN_STATUS_TIMEOUT_MS = 1e4;
|
|
47
|
-
var LOGIN_STATUS_CACHE_TTL_MS = 10 * 6e4;
|
|
48
|
-
var STDIO_LIMIT = 64e3;
|
|
49
|
-
var OUTPUT_SUMMARY_LIMIT = 500;
|
|
50
|
-
var CODEX_RUNTIME_ENV_ALLOWLIST = Object.freeze({
|
|
51
|
-
ALL_PROXY: true,
|
|
52
|
-
APPDATA: true,
|
|
53
|
-
CODEX_HOME: true,
|
|
54
|
-
COLORTERM: true,
|
|
55
|
-
COMSPEC: true,
|
|
56
|
-
FORCE_COLOR: true,
|
|
57
|
-
HOME: true,
|
|
58
|
-
HOMEDRIVE: true,
|
|
59
|
-
HOMEPATH: true,
|
|
60
|
-
LANG: true,
|
|
61
|
-
LOCALAPPDATA: true,
|
|
62
|
-
LOGNAME: true,
|
|
63
|
-
NO_COLOR: true,
|
|
64
|
-
NODE_EXTRA_CA_CERTS: true,
|
|
65
|
-
NO_PROXY: true,
|
|
66
|
-
NUMBER_OF_PROCESSORS: true,
|
|
67
|
-
OS: true,
|
|
68
|
-
PATH: true,
|
|
69
|
-
PATHEXT: true,
|
|
70
|
-
PROGRAMDATA: true,
|
|
71
|
-
PROCESSOR_ARCHITECTURE: true,
|
|
72
|
-
HTTP_PROXY: true,
|
|
73
|
-
HTTPS_PROXY: true,
|
|
74
|
-
SHELL: true,
|
|
75
|
-
SSL_CERT_DIR: true,
|
|
76
|
-
SSL_CERT_FILE: true,
|
|
77
|
-
SYSTEMDRIVE: true,
|
|
78
|
-
SYSTEMROOT: true,
|
|
79
|
-
TEMP: true,
|
|
80
|
-
TERM: true,
|
|
81
|
-
TMP: true,
|
|
82
|
-
TMPDIR: true,
|
|
83
|
-
USER: true,
|
|
84
|
-
USERNAME: true,
|
|
85
|
-
USERPROFILE: true,
|
|
86
|
-
WINDIR: true,
|
|
87
|
-
XDG_CACHE_HOME: true,
|
|
88
|
-
XDG_CONFIG_HOME: true,
|
|
89
|
-
XDG_DATA_HOME: true,
|
|
90
|
-
XDG_RUNTIME_DIR: true
|
|
91
|
-
});
|
|
92
|
-
var LOGIN_OK_PATTERN = /logged in using chatgpt/i;
|
|
93
|
-
var LOGIN_API_KEY_PATTERN = /api key/i;
|
|
94
|
-
var AUTH_FAILURE_PATTERN = /\b401\b|\b403\b|unauthorized|forbidden|not logged in|no active|re-?authenticat|token expired|session expired|please log ?in/i;
|
|
95
|
-
var TIMEOUT_PATTERN = /timed out after \d+ms/i;
|
|
96
|
-
var SECRET_ECHO_PATTERNS = [
|
|
97
|
-
/sk-[A-Za-z0-9_-]{8,}/g,
|
|
98
|
-
/Bearer\s+[A-Za-z0-9._-]{8,}/g,
|
|
99
|
-
/eyJ[A-Za-z0-9._-]{10,}/g
|
|
100
|
-
];
|
|
101
|
-
function codexSubscriptionBuiltinProviderConfig() {
|
|
102
|
-
return {
|
|
103
|
-
baseUrl: "codex-cli://subscription",
|
|
104
|
-
api: "codex-cli",
|
|
105
|
-
models: []
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
var CodexSubscriptionAuthError = class extends Error {
|
|
109
|
-
reason;
|
|
110
|
-
constructor(reason, message) {
|
|
111
|
-
super(message);
|
|
112
|
-
this.name = "CodexSubscriptionAuthError";
|
|
113
|
-
this.reason = reason;
|
|
114
|
-
}
|
|
115
|
-
};
|
|
116
|
-
var CodexSubscriptionConfigError = class extends Error {
|
|
117
|
-
constructor(message) {
|
|
118
|
-
super(message);
|
|
119
|
-
this.name = "CodexSubscriptionConfigError";
|
|
120
|
-
}
|
|
121
|
-
};
|
|
122
|
-
var CodexSubscriptionTimeoutError = class extends Error {
|
|
123
|
-
constructor(timeoutMs) {
|
|
124
|
-
super(`codex-subscription request timed out after ${timeoutMs}ms`);
|
|
125
|
-
this.name = "TimeoutError";
|
|
126
|
-
}
|
|
127
|
-
};
|
|
128
|
-
var loginStatusCache = /* @__PURE__ */ new Map();
|
|
129
|
-
var coreRunnerRegistered = false;
|
|
130
|
-
function createCodexSubscriptionRunner(deps = {}) {
|
|
131
|
-
const envSource = deps.env ?? process.env;
|
|
132
|
-
return (request) => runCodexSubscriptionRequest(request, deps, envSource);
|
|
133
|
-
}
|
|
134
|
-
function ensureCodexSubscriptionRunnerRegistered(deps = {}) {
|
|
135
|
-
if (isCodexCliFallbackRunnerRegistered()) return false;
|
|
136
|
-
setCodexCliFallbackRunnerForProcess(createCodexSubscriptionRunner(deps));
|
|
137
|
-
coreRunnerRegistered = true;
|
|
138
|
-
return true;
|
|
139
|
-
}
|
|
140
|
-
async function runCodexSubscriptionRequest(request, deps, envSource) {
|
|
141
|
-
const { config } = request;
|
|
142
|
-
assertNoApiKeyConfig(config);
|
|
143
|
-
const executable = resolveExecutable(config, envSource);
|
|
144
|
-
const env = buildIsolatedEnv(envSource);
|
|
145
|
-
const providerTimeoutMs = config.retryOptions?.timeoutMs !== void 0 ? normalizeCodexCliTimeoutMs(config.retryOptions.timeoutMs) : void 0;
|
|
146
|
-
const timeoutMs = request.options.timeoutMs ?? providerTimeoutMs ?? DEFAULT_TIMEOUT_MS;
|
|
147
|
-
const now = deps.now ?? Date.now;
|
|
148
|
-
const deadlineStartedAt = now();
|
|
149
|
-
await assertSubscriptionLogin(executable, env, deps, Math.min(LOGIN_STATUS_TIMEOUT_MS, timeoutMs));
|
|
150
|
-
if (request.options.signal?.aborted) {
|
|
151
|
-
throw abortErrorOf(request.options.signal);
|
|
152
|
-
}
|
|
153
|
-
const remainingTimeoutMs = timeoutMs - (now() - deadlineStartedAt);
|
|
154
|
-
if (remainingTimeoutMs <= 0) {
|
|
155
|
-
throw new CodexSubscriptionTimeoutError(timeoutMs);
|
|
156
|
-
}
|
|
157
|
-
let tempDir;
|
|
158
|
-
try {
|
|
159
|
-
tempDir = await mkdtemp(path.join(deps.tmpdir?.() ?? os.tmpdir(), "remnic-codex-sub-"));
|
|
160
|
-
const workspacePath = path.join(tempDir, "workspace");
|
|
161
|
-
const outputPath = path.join(tempDir, "last-message.txt");
|
|
162
|
-
await mkdir(workspacePath, { recursive: true });
|
|
163
|
-
const runCodexExec = deps.runCodexExec ?? runCodexExecSubprocess;
|
|
164
|
-
const result = await runCodexExec({
|
|
165
|
-
executable,
|
|
166
|
-
args: buildExecArgs(request.modelId, config, workspacePath, outputPath),
|
|
167
|
-
input: buildPrompt(request.messages),
|
|
168
|
-
env,
|
|
169
|
-
outputPath,
|
|
170
|
-
workspacePath,
|
|
171
|
-
timeoutMs: remainingTimeoutMs,
|
|
172
|
-
signal: request.options.signal
|
|
173
|
-
});
|
|
174
|
-
if (request.options.signal?.aborted) {
|
|
175
|
-
throw abortErrorOf(request.options.signal);
|
|
176
|
-
}
|
|
177
|
-
if (result.status !== 0) {
|
|
178
|
-
throw execFailureError(result, remainingTimeoutMs, executable, env);
|
|
179
|
-
}
|
|
180
|
-
const content = result.outputText.trim();
|
|
181
|
-
if (content.length === 0) {
|
|
182
|
-
throw new Error(
|
|
183
|
-
`codex-subscription: codex exec returned no final message (${summarizeOutput(result.stderr, result.stdout)})`
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
return { content, ...usageFrom(result) };
|
|
187
|
-
} finally {
|
|
188
|
-
if (tempDir) {
|
|
189
|
-
await rm(tempDir, { force: true, recursive: true }).catch(() => {
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
function assertNoApiKeyConfig(config) {
|
|
195
|
-
if (config.apiKey !== void 0 && config.apiKey !== "") {
|
|
196
|
-
throw new CodexSubscriptionConfigError(
|
|
197
|
-
`${CODEX_SUBSCRIPTION_PROVIDER_ID} does not accept apiKey configuration: it authenticates through the Codex CLI login. Remove the apiKey field and run \`codex login\` with a ChatGPT account instead.`
|
|
198
|
-
);
|
|
199
|
-
}
|
|
200
|
-
}
|
|
201
|
-
function resolveExecutable(config, env) {
|
|
202
|
-
const configured = config.codexCliExecutable ?? config.executable ?? env[CODEX_EXECUTABLE_ENV] ?? "codex";
|
|
203
|
-
const expanded = expandTildePath(String(configured).trim());
|
|
204
|
-
if (expanded.trim().length === 0) {
|
|
205
|
-
throw new CodexSubscriptionConfigError(`${CODEX_EXECUTABLE_ENV} / executable must not be empty`);
|
|
206
|
-
}
|
|
207
|
-
if (expanded.includes("/") || expanded.includes("\\")) {
|
|
208
|
-
return path.resolve(expanded);
|
|
209
|
-
}
|
|
210
|
-
return expanded;
|
|
211
|
-
}
|
|
212
|
-
function buildIsolatedEnv(source) {
|
|
213
|
-
const env = {};
|
|
214
|
-
for (const [key, value] of Object.entries(source)) {
|
|
215
|
-
if (value !== void 0 && isAllowedEnvKey(key)) {
|
|
216
|
-
env[key] = value;
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
return env;
|
|
220
|
-
}
|
|
221
|
-
function isAllowedEnvKey(key) {
|
|
222
|
-
const normalized = key.toUpperCase();
|
|
223
|
-
return CODEX_RUNTIME_ENV_ALLOWLIST[normalized] === true || normalized.startsWith("LC_");
|
|
224
|
-
}
|
|
225
|
-
async function assertSubscriptionLogin(executable, env, deps, loginStatusTimeoutMs) {
|
|
226
|
-
const now = deps.now ?? Date.now;
|
|
227
|
-
const cacheKey = `${executable}\0${env.CODEX_HOME ?? env.HOME ?? ""}`;
|
|
228
|
-
const cached = loginStatusCache.get(cacheKey);
|
|
229
|
-
if (cached && now() - cached.at < LOGIN_STATUS_CACHE_TTL_MS) {
|
|
230
|
-
await cached.promise;
|
|
231
|
-
return;
|
|
232
|
-
}
|
|
233
|
-
const promise = (async () => {
|
|
234
|
-
const runLoginStatus = deps.runLoginStatus ?? runLoginStatusSubprocess;
|
|
235
|
-
const result = await runLoginStatus(executable, env, loginStatusTimeoutMs);
|
|
236
|
-
const output = `${result.stdout}
|
|
237
|
-
${result.stderr}`.trim();
|
|
238
|
-
if (TIMEOUT_PATTERN.test(output)) {
|
|
239
|
-
throw new CodexSubscriptionTimeoutError(loginStatusTimeoutMs);
|
|
240
|
-
}
|
|
241
|
-
if (result.status === 0 && LOGIN_OK_PATTERN.test(output)) {
|
|
242
|
-
return;
|
|
243
|
-
}
|
|
244
|
-
const apiKeyNote = LOGIN_API_KEY_PATTERN.test(output) ? " The CLI currently reports an API-key login; subscription extraction needs a ChatGPT login." : "";
|
|
245
|
-
throw new CodexSubscriptionAuthError(
|
|
246
|
-
"unauthenticated",
|
|
247
|
-
`codex-subscription: no ChatGPT-backed Codex login found. Run \`codex login\` and choose the ChatGPT account option, then retry.${apiKeyNote}`
|
|
248
|
-
);
|
|
249
|
-
})();
|
|
250
|
-
loginStatusCache.set(cacheKey, { at: now(), promise });
|
|
251
|
-
try {
|
|
252
|
-
await promise;
|
|
253
|
-
} catch (err) {
|
|
254
|
-
loginStatusCache.delete(cacheKey);
|
|
255
|
-
throw err;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
function buildExecArgs(modelId, config, workspacePath, outputPath) {
|
|
259
|
-
const reasoningEffort = readReasoningEffort(config) ?? DEFAULT_REASONING_EFFORT;
|
|
260
|
-
return [
|
|
261
|
-
"exec",
|
|
262
|
-
"--strict-config",
|
|
263
|
-
"--model",
|
|
264
|
-
modelId,
|
|
265
|
-
"--config",
|
|
266
|
-
`model_reasoning_effort=${JSON.stringify(reasoningEffort)}`,
|
|
267
|
-
"--config",
|
|
268
|
-
'approval_policy="never"',
|
|
269
|
-
"--config",
|
|
270
|
-
'web_search="disabled"',
|
|
271
|
-
"--disable",
|
|
272
|
-
"hooks",
|
|
273
|
-
"--disable",
|
|
274
|
-
"shell_tool",
|
|
275
|
-
"--disable",
|
|
276
|
-
"unified_exec",
|
|
277
|
-
"--disable",
|
|
278
|
-
"apps",
|
|
279
|
-
"--disable",
|
|
280
|
-
"plugins",
|
|
281
|
-
"--disable",
|
|
282
|
-
"remote_plugin",
|
|
283
|
-
"--disable",
|
|
284
|
-
"multi_agent",
|
|
285
|
-
"--disable",
|
|
286
|
-
"browser_use",
|
|
287
|
-
"--disable",
|
|
288
|
-
"browser_use_external",
|
|
289
|
-
"--disable",
|
|
290
|
-
"computer_use",
|
|
291
|
-
"--disable",
|
|
292
|
-
"image_generation",
|
|
293
|
-
"--disable",
|
|
294
|
-
"in_app_browser",
|
|
295
|
-
"--disable",
|
|
296
|
-
"goals",
|
|
297
|
-
"--disable",
|
|
298
|
-
"memories",
|
|
299
|
-
"--disable",
|
|
300
|
-
"chronicle",
|
|
301
|
-
"--disable",
|
|
302
|
-
"tool_suggest",
|
|
303
|
-
"--disable",
|
|
304
|
-
"workspace_dependencies",
|
|
305
|
-
"--disable",
|
|
306
|
-
"shell_snapshot",
|
|
307
|
-
"--ephemeral",
|
|
308
|
-
"--ignore-user-config",
|
|
309
|
-
"--ignore-rules",
|
|
310
|
-
"--sandbox",
|
|
311
|
-
"read-only",
|
|
312
|
-
"--cd",
|
|
313
|
-
workspacePath,
|
|
314
|
-
"--skip-git-repo-check",
|
|
315
|
-
"--json",
|
|
316
|
-
"--output-last-message",
|
|
317
|
-
outputPath,
|
|
318
|
-
"-"
|
|
319
|
-
];
|
|
320
|
-
}
|
|
321
|
-
function readReasoningEffort(config) {
|
|
322
|
-
for (const value of [config.codexCliReasoningEffort, config.reasoningEffort]) {
|
|
323
|
-
if (typeof value === "string") {
|
|
324
|
-
const normalized = value.trim().toLowerCase();
|
|
325
|
-
if (normalized === "low" || normalized === "medium" || normalized === "high" || normalized === "xhigh") {
|
|
326
|
-
return normalized;
|
|
327
|
-
}
|
|
328
|
-
throw new CodexSubscriptionConfigError(
|
|
329
|
-
"codex-subscription reasoningEffort must be one of low, medium, high, xhigh (got unrecognized value)"
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
return void 0;
|
|
334
|
-
}
|
|
335
|
-
function buildPrompt(messages) {
|
|
336
|
-
const transcript = messages.map((message) => JSON.stringify({ role: message.role, content: message.content })).join("\n");
|
|
337
|
-
return [
|
|
338
|
-
"You are acting as an LLM completion endpoint for a memory-extraction pipeline, not as a coding agent.",
|
|
339
|
-
"Answer the request in the transcript below. Do not inspect files, run commands, browse, or use tools.",
|
|
340
|
-
"Return only the final answer text. If the request asks for JSON, return raw JSON only.",
|
|
341
|
-
"",
|
|
342
|
-
'TRANSCRIPT (JSON Lines: one {"role":"...","content":"..."} object per message; newlines inside content are escaped):',
|
|
343
|
-
transcript
|
|
344
|
-
].join("\n");
|
|
345
|
-
}
|
|
346
|
-
function execFailureError(result, timeoutMs, executable, env) {
|
|
347
|
-
const combined = `${result.stderr}
|
|
348
|
-
${result.stdout}`;
|
|
349
|
-
if (AUTH_FAILURE_PATTERN.test(combined)) {
|
|
350
|
-
loginStatusCache.delete(`${executable}\0${env.CODEX_HOME ?? env.HOME ?? ""}`);
|
|
351
|
-
return new CodexSubscriptionAuthError(
|
|
352
|
-
"expired_or_revoked",
|
|
353
|
-
"codex-subscription: the Codex CLI rejected the request as unauthenticated (session expired or revoked). Run `codex login` again to re-authenticate, then retry."
|
|
354
|
-
);
|
|
355
|
-
}
|
|
356
|
-
if (TIMEOUT_PATTERN.test(combined)) {
|
|
357
|
-
return new CodexSubscriptionTimeoutError(timeoutMs);
|
|
358
|
-
}
|
|
359
|
-
const exitLabel = result.signal ? `signal ${result.signal}` : `exit ${result.status ?? "unknown"}`;
|
|
360
|
-
return new Error(
|
|
361
|
-
`codex-subscription: codex exec failed (${exitLabel}): ${summarizeOutput(result.stderr, result.stdout)}`
|
|
362
|
-
);
|
|
363
|
-
}
|
|
364
|
-
function summarizeOutput(stderr, stdout) {
|
|
365
|
-
const summary = [stderr.trim(), stdout.trim()].filter((part) => part.length > 0).join("\n");
|
|
366
|
-
if (summary.length === 0) {
|
|
367
|
-
return "no process output";
|
|
368
|
-
}
|
|
369
|
-
return redactSecretEchoes(summary).slice(-OUTPUT_SUMMARY_LIMIT);
|
|
370
|
-
}
|
|
371
|
-
function redactSecretEchoes(value) {
|
|
372
|
-
let redacted = value;
|
|
373
|
-
for (const pattern of SECRET_ECHO_PATTERNS) {
|
|
374
|
-
redacted = redacted.replace(pattern, "[redacted]");
|
|
375
|
-
}
|
|
376
|
-
return redacted;
|
|
377
|
-
}
|
|
378
|
-
function usageFrom(result) {
|
|
379
|
-
const usage = parseCodexJsonlUsage(`${result.stdout}
|
|
380
|
-
${result.stderr}`);
|
|
381
|
-
if (!usage) {
|
|
382
|
-
return {};
|
|
383
|
-
}
|
|
384
|
-
return {
|
|
385
|
-
usage: {
|
|
386
|
-
inputTokens: usage.inputTokens,
|
|
387
|
-
outputTokens: usage.outputTokens,
|
|
388
|
-
totalTokens: usage.inputTokens + usage.outputTokens
|
|
389
|
-
}
|
|
390
|
-
};
|
|
391
|
-
}
|
|
392
|
-
function parseCodexJsonlUsage(output) {
|
|
393
|
-
let usage;
|
|
394
|
-
for (const line of output.split(/\r?\n/)) {
|
|
395
|
-
const trimmed = line.trim();
|
|
396
|
-
if (!trimmed.startsWith("{")) continue;
|
|
397
|
-
try {
|
|
398
|
-
const event = JSON.parse(trimmed);
|
|
399
|
-
if (event.type !== "turn.completed" || !event.usage) continue;
|
|
400
|
-
const inputTokens = readCounter(event.usage.input_tokens);
|
|
401
|
-
const outputTokens = readCounter(event.usage.output_tokens);
|
|
402
|
-
if (inputTokens !== void 0 && outputTokens !== void 0) {
|
|
403
|
-
usage = { inputTokens, outputTokens };
|
|
404
|
-
}
|
|
405
|
-
} catch {
|
|
406
|
-
}
|
|
407
|
-
}
|
|
408
|
-
return usage;
|
|
409
|
-
}
|
|
410
|
-
function readCounter(value) {
|
|
411
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
412
|
-
return void 0;
|
|
413
|
-
}
|
|
414
|
-
return value;
|
|
415
|
-
}
|
|
416
|
-
function abortErrorOf(signal) {
|
|
417
|
-
if (signal.reason instanceof Error) return signal.reason;
|
|
418
|
-
if (signal.reason !== void 0) return new Error(String(signal.reason));
|
|
419
|
-
return new DOMException("The operation was aborted.", "AbortError");
|
|
420
|
-
}
|
|
421
|
-
function appendBounded(existing, next) {
|
|
422
|
-
const redacted = redactSecretEchoes(existing + next);
|
|
423
|
-
return redacted.length > STDIO_LIMIT ? redacted.slice(-STDIO_LIMIT) : redacted;
|
|
424
|
-
}
|
|
425
|
-
async function runLoginStatusSubprocess(executable, env, timeoutMs) {
|
|
426
|
-
return await runSubprocess(executable, ["login", "status"], {
|
|
427
|
-
env,
|
|
428
|
-
stdin: void 0,
|
|
429
|
-
timeoutMs,
|
|
430
|
-
timeoutLabel: "login status"
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
async function runCodexExecSubprocess(request) {
|
|
434
|
-
const result = await runSubprocess(request.executable, request.args, {
|
|
435
|
-
env: request.env,
|
|
436
|
-
stdin: request.input,
|
|
437
|
-
timeoutMs: request.timeoutMs,
|
|
438
|
-
timeoutLabel: "exec",
|
|
439
|
-
signal: request.signal,
|
|
440
|
-
cwd: request.workspacePath
|
|
441
|
-
});
|
|
442
|
-
let outputText = "";
|
|
443
|
-
try {
|
|
444
|
-
outputText = (await readFile(request.outputPath, "utf8")).trim();
|
|
445
|
-
} catch {
|
|
446
|
-
}
|
|
447
|
-
return { ...result, outputText };
|
|
448
|
-
}
|
|
449
|
-
async function runSubprocess(executable, args, options) {
|
|
450
|
-
return await new Promise((resolve, reject) => {
|
|
451
|
-
if (options.signal?.aborted) {
|
|
452
|
-
reject(abortErrorOf(options.signal));
|
|
453
|
-
return;
|
|
454
|
-
}
|
|
455
|
-
const child = launchProcess(executable, args, {
|
|
456
|
-
...options.cwd ? { cwd: options.cwd } : {},
|
|
457
|
-
env: options.env,
|
|
458
|
-
stdio: [options.stdin === void 0 ? "ignore" : "pipe", "pipe", "pipe"],
|
|
459
|
-
detached: process.platform !== "win32",
|
|
460
|
-
windowsHide: true
|
|
461
|
-
});
|
|
462
|
-
let stdout = "";
|
|
463
|
-
let stderr = "";
|
|
464
|
-
let timedOut = false;
|
|
465
|
-
let killTimeout;
|
|
466
|
-
const clearKillTimeout = () => {
|
|
467
|
-
if (killTimeout) {
|
|
468
|
-
clearTimeout(killTimeout);
|
|
469
|
-
killTimeout = void 0;
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
const terminate = (signal) => {
|
|
473
|
-
if (child.pid && process.platform !== "win32") {
|
|
474
|
-
try {
|
|
475
|
-
process.kill(-child.pid, signal);
|
|
476
|
-
return;
|
|
477
|
-
} catch {
|
|
478
|
-
}
|
|
479
|
-
}
|
|
480
|
-
child.kill(signal);
|
|
481
|
-
};
|
|
482
|
-
const scheduleForcedKill = () => {
|
|
483
|
-
clearKillTimeout();
|
|
484
|
-
killTimeout = setTimeout(() => terminate("SIGKILL"), 1e3);
|
|
485
|
-
killTimeout.unref();
|
|
486
|
-
};
|
|
487
|
-
const onAbort = () => {
|
|
488
|
-
terminate("SIGTERM");
|
|
489
|
-
scheduleForcedKill();
|
|
490
|
-
};
|
|
491
|
-
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
492
|
-
const timeout = options.timeoutMs ? setTimeout(() => {
|
|
493
|
-
timedOut = true;
|
|
494
|
-
stderr = appendBounded(
|
|
495
|
-
stderr,
|
|
496
|
-
`
|
|
497
|
-
codex-subscription: ${options.timeoutLabel} timed out after ${options.timeoutMs}ms.`
|
|
498
|
-
);
|
|
499
|
-
terminate("SIGTERM");
|
|
500
|
-
scheduleForcedKill();
|
|
501
|
-
}, options.timeoutMs) : void 0;
|
|
502
|
-
timeout?.unref();
|
|
503
|
-
child.stdout?.setEncoding("utf8");
|
|
504
|
-
child.stderr?.setEncoding("utf8");
|
|
505
|
-
child.stdout?.on("data", (chunk) => {
|
|
506
|
-
stdout = appendBounded(stdout, chunk);
|
|
507
|
-
});
|
|
508
|
-
child.stderr?.on("data", (chunk) => {
|
|
509
|
-
stderr = appendBounded(stderr, chunk);
|
|
510
|
-
});
|
|
511
|
-
child.stdin?.on("error", (error) => {
|
|
512
|
-
stderr = appendBounded(stderr, `
|
|
513
|
-
codex-subscription: stdin error: ${error.code ?? error.message}`);
|
|
514
|
-
});
|
|
515
|
-
const settle = (fn) => {
|
|
516
|
-
clearTimeout(timeout);
|
|
517
|
-
clearKillTimeout();
|
|
518
|
-
options.signal?.removeEventListener("abort", onAbort);
|
|
519
|
-
fn();
|
|
520
|
-
};
|
|
521
|
-
child.on("error", (error) => {
|
|
522
|
-
settle(() => {
|
|
523
|
-
reject(
|
|
524
|
-
child.pid ? new Error(`codex-subscription: codex CLI failed after start: ${safeMessage(error)}`, { cause: error }) : new CodexSubscriptionAuthError(
|
|
525
|
-
"unauthenticated",
|
|
526
|
-
`codex-subscription: codex CLI not found at \`${executable}\` \u2014 install the Codex CLI and run \`codex login\` with a ChatGPT account, then retry.`
|
|
527
|
-
)
|
|
528
|
-
);
|
|
529
|
-
});
|
|
530
|
-
});
|
|
531
|
-
child.on("close", (status, signal) => {
|
|
532
|
-
settle(() => {
|
|
533
|
-
resolve({
|
|
534
|
-
status: timedOut ? status ?? 124 : status,
|
|
535
|
-
signal: timedOut ? signal ?? "SIGTERM" : signal,
|
|
536
|
-
stdout,
|
|
537
|
-
stderr
|
|
538
|
-
});
|
|
539
|
-
});
|
|
540
|
-
});
|
|
541
|
-
if (options.stdin !== void 0) {
|
|
542
|
-
try {
|
|
543
|
-
child.stdin?.end(options.stdin);
|
|
544
|
-
} catch (error) {
|
|
545
|
-
log.debug(`codex-subscription: failed writing prompt to stdin: ${safeMessage(error)}`);
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
function safeMessage(error) {
|
|
551
|
-
return error instanceof Error ? error.message : String(error);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
// src/fallback-llm.ts
|
|
555
38
|
function gatewayTaskChainOptions(config) {
|
|
556
39
|
if (config.modelSource !== "gateway") return {};
|
|
557
40
|
if (config.taskModelChain) return { modelChain: config.taskModelChain };
|
|
@@ -562,6 +45,7 @@ function fallbackLlmRuntimeContextFromConfig(config, overrides = {}) {
|
|
|
562
45
|
workspaceDir: config.workspaceDir,
|
|
563
46
|
resolveApiKeyForProvider: config.providerApiKeyResolver,
|
|
564
47
|
getRuntimeAuthForModel: config.runtimeAuthForModelResolver,
|
|
48
|
+
codexSubscriptionRunner: getCodexSubscriptionRunnerForOwner(config),
|
|
565
49
|
...overrides
|
|
566
50
|
};
|
|
567
51
|
}
|
|
@@ -635,9 +119,11 @@ var FallbackLlmClient = class {
|
|
|
635
119
|
log.warn("fallback LLM: no models configured in gateway");
|
|
636
120
|
return null;
|
|
637
121
|
}
|
|
122
|
+
options = withCodexRuntimeShutdown(options, this.runtimeContext.codexSubscriptionRunner);
|
|
638
123
|
const runChain = async (initialOptions) => {
|
|
639
124
|
let runOptions = initialOptions;
|
|
640
125
|
let lastRejectedResponse = null;
|
|
126
|
+
let terminalError;
|
|
641
127
|
for (let i = 0; i < models.length; i++) {
|
|
642
128
|
if (runOptions.signal?.aborted) {
|
|
643
129
|
throw abortReason(runOptions.signal);
|
|
@@ -663,6 +149,9 @@ var FallbackLlmClient = class {
|
|
|
663
149
|
return response;
|
|
664
150
|
}
|
|
665
151
|
} catch (err) {
|
|
152
|
+
if (isTerminalCodexSubscriptionError(err) && runOptions.signal?.aborted) {
|
|
153
|
+
throw err;
|
|
154
|
+
}
|
|
666
155
|
if (runOptions.signal?.aborted) {
|
|
667
156
|
throw abortReason(runOptions.signal);
|
|
668
157
|
}
|
|
@@ -689,19 +178,31 @@ var FallbackLlmClient = class {
|
|
|
689
178
|
continue;
|
|
690
179
|
}
|
|
691
180
|
} catch (retryError) {
|
|
181
|
+
if (isTerminalCodexSubscriptionError(retryError) && runOptions.signal?.aborted) {
|
|
182
|
+
throw retryError;
|
|
183
|
+
}
|
|
692
184
|
if (runOptions.signal?.aborted) throw abortReason(runOptions.signal);
|
|
693
185
|
const retryErrorMsg = runOptions.redactProviderErrors ? "provider error details redacted" : retryError instanceof Error ? retryError.message : String(retryError);
|
|
694
186
|
log.debug(
|
|
695
187
|
`fallback LLM: ${model.modelString} unstructured retry failed (${retryErrorMsg})`
|
|
696
188
|
);
|
|
189
|
+
if (isTerminalCodexSubscriptionError(retryError)) {
|
|
190
|
+
terminalError = retryError;
|
|
191
|
+
}
|
|
697
192
|
}
|
|
698
193
|
continue;
|
|
699
194
|
}
|
|
700
195
|
const errorMsg = runOptions.redactProviderErrors ? "provider error details redacted" : err instanceof Error ? err.message : String(err);
|
|
701
196
|
log.debug(`fallback LLM: ${model.modelString} failed (${errorMsg}), trying next...`);
|
|
197
|
+
if (isTerminalCodexSubscriptionError(err)) {
|
|
198
|
+
terminalError = err;
|
|
199
|
+
}
|
|
702
200
|
}
|
|
703
201
|
}
|
|
704
202
|
log.warn(`fallback LLM: all ${models.length} models in chain failed`);
|
|
203
|
+
if (terminalError !== void 0) {
|
|
204
|
+
throw terminalError;
|
|
205
|
+
}
|
|
705
206
|
return lastRejectedResponse;
|
|
706
207
|
};
|
|
707
208
|
if (typeof options.timeoutMs === "number") {
|
|
@@ -709,7 +210,6 @@ var FallbackLlmClient = class {
|
|
|
709
210
|
log.warn("fallback LLM: timed out before request started");
|
|
710
211
|
return null;
|
|
711
212
|
}
|
|
712
|
-
let timeoutHandle;
|
|
713
213
|
const controller = new AbortController();
|
|
714
214
|
const onCallerAbort = () => {
|
|
715
215
|
controller.abort(abortReason(options.signal));
|
|
@@ -720,23 +220,22 @@ var FallbackLlmClient = class {
|
|
|
720
220
|
}
|
|
721
221
|
const timedOptions = { ...options, signal: controller.signal };
|
|
722
222
|
const chain = runChain(timedOptions);
|
|
723
|
-
chain.
|
|
724
|
-
|
|
223
|
+
const guarded = chain.then(
|
|
224
|
+
(value) => value,
|
|
225
|
+
(err) => {
|
|
226
|
+
if (isTerminalCodexSubscriptionError(err)) throw err;
|
|
227
|
+
return null;
|
|
228
|
+
}
|
|
229
|
+
);
|
|
725
230
|
try {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
);
|
|
734
|
-
resolve(null);
|
|
735
|
-
}, options.timeoutMs);
|
|
736
|
-
})
|
|
737
|
-
]);
|
|
231
|
+
const outcome = await raceFallbackLlmDeadline(guarded, options.timeoutMs, () => {
|
|
232
|
+
log.warn(`fallback LLM: timed out after ${options.timeoutMs}ms`);
|
|
233
|
+
controller.abort(
|
|
234
|
+
new Error(`fallback LLM timed out after ${options.timeoutMs}ms`)
|
|
235
|
+
);
|
|
236
|
+
});
|
|
237
|
+
return outcome.timedOut ? null : outcome.value;
|
|
738
238
|
} finally {
|
|
739
|
-
if (timeoutHandle) clearTimeout(timeoutHandle);
|
|
740
239
|
options.signal?.removeEventListener("abort", onCallerAbort);
|
|
741
240
|
}
|
|
742
241
|
}
|
|
@@ -759,7 +258,7 @@ var FallbackLlmClient = class {
|
|
|
759
258
|
try {
|
|
760
259
|
response = await this.chatCompletion(messages, options);
|
|
761
260
|
} catch (err) {
|
|
762
|
-
if (options.signal?.aborted) throw err;
|
|
261
|
+
if (options.signal?.aborted || isTerminalCodexSubscriptionError(err)) throw err;
|
|
763
262
|
log.warn("fallback LLM: chatCompletion threw during structured parse:", err);
|
|
764
263
|
return { result: null, failureReason: "http_error" };
|
|
765
264
|
}
|
|
@@ -953,9 +452,17 @@ var FallbackLlmClient = class {
|
|
|
953
452
|
* simpler providers or when the runtime module isn't loaded.
|
|
954
453
|
*/
|
|
955
454
|
async tryModel(model, messages, options) {
|
|
956
|
-
const
|
|
455
|
+
const codexResult = await tryCodexSubscriptionProvider(
|
|
456
|
+
model,
|
|
457
|
+
messages,
|
|
458
|
+
options,
|
|
459
|
+
() => this.resolveFallbackApiKey(model),
|
|
460
|
+
this.runtimeContext.codexSubscriptionRunner
|
|
461
|
+
);
|
|
462
|
+
if (codexResult !== void 0) return codexResult;
|
|
463
|
+
const runtimeAuth = await this.resolveRuntimeAuth(model);
|
|
957
464
|
const effectiveBaseUrl = runtimeAuth?.baseUrl ?? model.providerConfig.baseUrl;
|
|
958
|
-
const resolvedApiKey = runtimeAuth?.apiKey ??
|
|
465
|
+
const resolvedApiKey = runtimeAuth?.apiKey ?? await this.resolveFallbackApiKey(model);
|
|
959
466
|
const rawKey = model.providerConfig.apiKey;
|
|
960
467
|
const needsResolution = rawKey === "secretref-managed" || typeof rawKey === "object" && rawKey !== null;
|
|
961
468
|
if (needsResolution && !resolvedApiKey) {
|
|
@@ -969,15 +476,6 @@ var FallbackLlmClient = class {
|
|
|
969
476
|
if (model.providerConfig.api === "anthropic-messages") {
|
|
970
477
|
return await this.callAnthropic(effectiveConfig, model.modelId, messages, options);
|
|
971
478
|
}
|
|
972
|
-
if (model.providerConfig.api === "codex-cli") {
|
|
973
|
-
ensureCodexSubscriptionRunnerRegistered();
|
|
974
|
-
return await callCodexCliFallback(
|
|
975
|
-
effectiveConfig,
|
|
976
|
-
model.modelId,
|
|
977
|
-
messages,
|
|
978
|
-
{ timeoutMs: options.timeoutMs, signal: options.signal }
|
|
979
|
-
);
|
|
980
|
-
}
|
|
981
479
|
if (model.providerConfig.api === "ollama-chat") {
|
|
982
480
|
return await this.callOllamaChat(effectiveConfig, model.modelId, messages, options);
|
|
983
481
|
}
|
|
@@ -1276,10 +774,6 @@ var FallbackLlmClient = class {
|
|
|
1276
774
|
};
|
|
1277
775
|
}
|
|
1278
776
|
};
|
|
1279
|
-
function abortReason(signal) {
|
|
1280
|
-
const reason = signal?.reason;
|
|
1281
|
-
return reason instanceof Error ? reason : new Error("fallback LLM request aborted");
|
|
1282
|
-
}
|
|
1283
777
|
function normalizeRuntimePath(value) {
|
|
1284
778
|
if (typeof value !== "string") return void 0;
|
|
1285
779
|
const trimmed = value.trim();
|
|
@@ -1291,7 +785,7 @@ function readGatewayWorkspaceDir(gatewayConfig) {
|
|
|
1291
785
|
return normalizeRuntimePath(raw.workspaceDir) ?? normalizeRuntimePath(raw.workspacePath) ?? normalizeRuntimePath(raw.workspace);
|
|
1292
786
|
}
|
|
1293
787
|
function defaultOpenClawWorkspaceDir() {
|
|
1294
|
-
return
|
|
788
|
+
return path.join(resolveHomeDir(), ".openclaw", "workspace");
|
|
1295
789
|
}
|
|
1296
790
|
function extractResponsesOutputText(data) {
|
|
1297
791
|
if (typeof data.output_text === "string" && data.output_text.trim().length > 0) {
|
|
@@ -1313,15 +807,8 @@ function extractResponsesOutputText(data) {
|
|
|
1313
807
|
}
|
|
1314
808
|
|
|
1315
809
|
export {
|
|
1316
|
-
CODEX_SUBSCRIPTION_PROVIDER_ID,
|
|
1317
|
-
codexSubscriptionBuiltinProviderConfig,
|
|
1318
|
-
CodexSubscriptionAuthError,
|
|
1319
|
-
CodexSubscriptionConfigError,
|
|
1320
|
-
CodexSubscriptionTimeoutError,
|
|
1321
|
-
createCodexSubscriptionRunner,
|
|
1322
|
-
ensureCodexSubscriptionRunnerRegistered,
|
|
1323
810
|
gatewayTaskChainOptions,
|
|
1324
811
|
fallbackLlmRuntimeContextFromConfig,
|
|
1325
812
|
FallbackLlmClient
|
|
1326
813
|
};
|
|
1327
|
-
//# sourceMappingURL=chunk-
|
|
814
|
+
//# sourceMappingURL=chunk-LQNRVPTV.js.map
|