@theokit/sdk 4.24.0 → 4.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/a2a/index.cjs +10 -171
- package/dist/a2a/index.cjs.map +1 -1
- package/dist/a2a/index.js +3 -170
- package/dist/a2a/index.js.map +1 -1
- package/dist/agent-factory-registry-UU46BUMU.cjs +16 -0
- package/dist/agent-factory-registry-UU46BUMU.cjs.map +1 -0
- package/dist/agent-factory-registry-ZVTABLEY.js +3 -0
- package/dist/agent-factory-registry-ZVTABLEY.js.map +1 -0
- package/dist/auth/index.cjs +63 -367
- package/dist/auth/index.cjs.map +1 -1
- package/dist/auth/index.js +6 -342
- package/dist/auth/index.js.map +1 -1
- package/dist/batch-2FSD2UNL.cjs +244 -0
- package/dist/batch-2FSD2UNL.cjs.map +1 -0
- package/dist/batch-MR2HKYMS.js +241 -0
- package/dist/batch-MR2HKYMS.js.map +1 -0
- package/dist/chunk-2HRYBRD7.cjs +31 -0
- package/dist/chunk-2HRYBRD7.cjs.map +1 -0
- package/dist/chunk-2MF3IE2D.cjs +2863 -0
- package/dist/chunk-2MF3IE2D.cjs.map +1 -0
- package/dist/chunk-2ONFGMBV.js +6 -0
- package/dist/chunk-2ONFGMBV.js.map +1 -0
- package/dist/chunk-2SFBB54R.js +23 -0
- package/dist/chunk-2SFBB54R.js.map +1 -0
- package/dist/chunk-2XLKLVVR.js +18 -0
- package/dist/chunk-2XLKLVVR.js.map +1 -0
- package/dist/chunk-4SXHEZIV.cjs +240 -0
- package/dist/chunk-4SXHEZIV.cjs.map +1 -0
- package/dist/chunk-4VPXM6UU.js +10 -0
- package/dist/chunk-4VPXM6UU.js.map +1 -0
- package/dist/chunk-4WL52CXU.cjs +148 -0
- package/dist/chunk-4WL52CXU.cjs.map +1 -0
- package/dist/chunk-5NBUH3NO.js +39 -0
- package/dist/chunk-5NBUH3NO.js.map +1 -0
- package/dist/chunk-5PZMMF4H.js +43 -0
- package/dist/chunk-5PZMMF4H.js.map +1 -0
- package/dist/chunk-6CLRANZA.js +289 -0
- package/dist/chunk-6CLRANZA.js.map +1 -0
- package/dist/chunk-6JSIEDKL.cjs +121 -0
- package/dist/chunk-6JSIEDKL.cjs.map +1 -0
- package/dist/chunk-6M4ODB2V.cjs +145 -0
- package/dist/chunk-6M4ODB2V.cjs.map +1 -0
- package/dist/chunk-6X6ID4MO.js +20 -0
- package/dist/chunk-6X6ID4MO.js.map +1 -0
- package/dist/chunk-77FOZCOT.js +165 -0
- package/dist/chunk-77FOZCOT.js.map +1 -0
- package/dist/chunk-7AD3ZTZL.js +25 -0
- package/dist/chunk-7AD3ZTZL.js.map +1 -0
- package/dist/chunk-7GFX45DD.js +57 -0
- package/dist/chunk-7GFX45DD.js.map +1 -0
- package/dist/chunk-7S7KKUO6.cjs +45 -0
- package/dist/chunk-7S7KKUO6.cjs.map +1 -0
- package/dist/chunk-7W7ZWMLQ.js +99 -0
- package/dist/chunk-7W7ZWMLQ.js.map +1 -0
- package/dist/chunk-A44COQJJ.cjs +353 -0
- package/dist/chunk-A44COQJJ.cjs.map +1 -0
- package/dist/chunk-AKSBP7OO.js +185 -0
- package/dist/chunk-AKSBP7OO.js.map +1 -0
- package/dist/chunk-ANIZEWTU.cjs +196 -0
- package/dist/chunk-ANIZEWTU.cjs.map +1 -0
- package/dist/chunk-BEURCLDV.cjs +139 -0
- package/dist/chunk-BEURCLDV.cjs.map +1 -0
- package/dist/chunk-BFWPZMG7.js +379 -0
- package/dist/chunk-BFWPZMG7.js.map +1 -0
- package/dist/chunk-BUUUWQMB.cjs +34 -0
- package/dist/chunk-BUUUWQMB.cjs.map +1 -0
- package/dist/chunk-BV2MWEMV.cjs +26 -0
- package/dist/chunk-BV2MWEMV.cjs.map +1 -0
- package/dist/chunk-BWT67BI4.cjs +268 -0
- package/dist/chunk-BWT67BI4.cjs.map +1 -0
- package/dist/chunk-BXV2QUIC.js +191 -0
- package/dist/chunk-BXV2QUIC.js.map +1 -0
- package/dist/chunk-C6Y6CWYD.cjs +44 -0
- package/dist/chunk-C6Y6CWYD.cjs.map +1 -0
- package/dist/chunk-C7PICHRF.cjs +68 -0
- package/dist/chunk-C7PICHRF.cjs.map +1 -0
- package/dist/chunk-CAH3G4IS.js +13 -0
- package/dist/chunk-CAH3G4IS.js.map +1 -0
- package/dist/chunk-D42XHI4O.cjs +565 -0
- package/dist/chunk-D42XHI4O.cjs.map +1 -0
- package/dist/chunk-DGRZNMTU.js +104 -0
- package/dist/chunk-DGRZNMTU.js.map +1 -0
- package/dist/chunk-DUK5WMKJ.js +71 -0
- package/dist/chunk-DUK5WMKJ.js.map +1 -0
- package/dist/chunk-EEZ7CFMM.js +14 -0
- package/dist/chunk-EEZ7CFMM.js.map +1 -0
- package/dist/chunk-EPYZOCOL.cjs +82 -0
- package/dist/chunk-EPYZOCOL.cjs.map +1 -0
- package/dist/chunk-EVADEGM7.cjs +168 -0
- package/dist/chunk-EVADEGM7.cjs.map +1 -0
- package/dist/chunk-FD2UT76F.js +3 -0
- package/dist/chunk-FD2UT76F.js.map +1 -0
- package/dist/chunk-FV3YEMQ7.js +179 -0
- package/dist/chunk-FV3YEMQ7.js.map +1 -0
- package/dist/chunk-G2F67XUR.cjs +184 -0
- package/dist/chunk-G2F67XUR.cjs.map +1 -0
- package/dist/chunk-G6GO6BXD.js +994 -0
- package/dist/chunk-G6GO6BXD.js.map +1 -0
- package/dist/chunk-GIW4L6HY.cjs +27 -0
- package/dist/chunk-GIW4L6HY.cjs.map +1 -0
- package/dist/chunk-GJAGKFTR.js +74 -0
- package/dist/chunk-GJAGKFTR.js.map +1 -0
- package/dist/chunk-HFPGOTVF.cjs +324 -0
- package/dist/chunk-HFPGOTVF.cjs.map +1 -0
- package/dist/chunk-HRA3CPGG.js +486 -0
- package/dist/chunk-HRA3CPGG.js.map +1 -0
- package/dist/chunk-HZQEDNF6.js +66 -0
- package/dist/chunk-HZQEDNF6.js.map +1 -0
- package/dist/chunk-IT3PWBW4.cjs +19 -0
- package/dist/chunk-IT3PWBW4.cjs.map +1 -0
- package/dist/chunk-JD74LN7R.cjs +171 -0
- package/dist/chunk-JD74LN7R.cjs.map +1 -0
- package/dist/chunk-JTFYYKDT.js +135 -0
- package/dist/chunk-JTFYYKDT.js.map +1 -0
- package/dist/chunk-K2BQQ445.js +30 -0
- package/dist/chunk-K2BQQ445.js.map +1 -0
- package/dist/chunk-KAP4GJHO.js +546 -0
- package/dist/chunk-KAP4GJHO.js.map +1 -0
- package/dist/chunk-KDNBTPY2.js +458 -0
- package/dist/chunk-KDNBTPY2.js.map +1 -0
- package/dist/chunk-KIO7QFIV.cjs +223 -0
- package/dist/chunk-KIO7QFIV.cjs.map +1 -0
- package/dist/chunk-KSKU6JY6.cjs +71 -0
- package/dist/chunk-KSKU6JY6.cjs.map +1 -0
- package/dist/chunk-LSLPF6OI.cjs +192 -0
- package/dist/chunk-LSLPF6OI.cjs.map +1 -0
- package/dist/chunk-LU7VALW5.js +312 -0
- package/dist/chunk-LU7VALW5.js.map +1 -0
- package/dist/chunk-LUSXDZPV.cjs +296 -0
- package/dist/chunk-LUSXDZPV.cjs.map +1 -0
- package/dist/chunk-M72RJVPC.js +69 -0
- package/dist/chunk-M72RJVPC.js.map +1 -0
- package/dist/chunk-MQLCZ4HJ.cjs +1010 -0
- package/dist/chunk-MQLCZ4HJ.cjs.map +1 -0
- package/dist/chunk-MUUQ2WFJ.cjs +4 -0
- package/dist/chunk-MUUQ2WFJ.cjs.map +1 -0
- package/dist/chunk-MZ5ZRORA.cjs +496 -0
- package/dist/chunk-MZ5ZRORA.cjs.map +1 -0
- package/dist/chunk-N24XBYNX.cjs +140 -0
- package/dist/chunk-N24XBYNX.cjs.map +1 -0
- package/dist/chunk-NINIJCHU.cjs +23 -0
- package/dist/chunk-NINIJCHU.cjs.map +1 -0
- package/dist/chunk-NRSH7RJY.js +2841 -0
- package/dist/chunk-NRSH7RJY.js.map +1 -0
- package/dist/chunk-OIYQBUW4.cjs +111 -0
- package/dist/chunk-OIYQBUW4.cjs.map +1 -0
- package/dist/chunk-PNVDQL5Y.cjs +15 -0
- package/dist/chunk-PNVDQL5Y.cjs.map +1 -0
- package/dist/chunk-POQT2OIF.js +214 -0
- package/dist/chunk-POQT2OIF.js.map +1 -0
- package/dist/chunk-PSJN532Q.js +10573 -0
- package/dist/chunk-PSJN532Q.js.map +1 -0
- package/dist/chunk-QUTUJ6P6.cjs +76 -0
- package/dist/chunk-QUTUJ6P6.cjs.map +1 -0
- package/dist/chunk-R43CNCES.cjs +460 -0
- package/dist/chunk-R43CNCES.cjs.map +1 -0
- package/dist/chunk-S2BBRVQX.js +68 -0
- package/dist/chunk-S2BBRVQX.js.map +1 -0
- package/dist/chunk-S5RCBTSF.js +145 -0
- package/dist/chunk-S5RCBTSF.js.map +1 -0
- package/dist/chunk-S7OEXQMI.cjs +136 -0
- package/dist/chunk-S7OEXQMI.cjs.map +1 -0
- package/dist/chunk-SKWVAQAY.js +129 -0
- package/dist/chunk-SKWVAQAY.js.map +1 -0
- package/dist/chunk-SQLZ7ONU.js +152 -0
- package/dist/chunk-SQLZ7ONU.js.map +1 -0
- package/dist/chunk-TIZ4TS5V.cjs +72 -0
- package/dist/chunk-TIZ4TS5V.cjs.map +1 -0
- package/dist/chunk-TQKCU7CL.js +142 -0
- package/dist/chunk-TQKCU7CL.js.map +1 -0
- package/dist/chunk-U54XCYG3.js +116 -0
- package/dist/chunk-U54XCYG3.js.map +1 -0
- package/dist/chunk-U6QGZHPN.js +29 -0
- package/dist/chunk-U6QGZHPN.js.map +1 -0
- package/dist/chunk-UCFONJBG.js +79 -0
- package/dist/chunk-UCFONJBG.js.map +1 -0
- package/dist/chunk-UJ7IQJAG.js +141 -0
- package/dist/chunk-UJ7IQJAG.js.map +1 -0
- package/dist/chunk-UVNG67DG.js +253 -0
- package/dist/chunk-UVNG67DG.js.map +1 -0
- package/dist/chunk-V4XRLPEF.js +25 -0
- package/dist/chunk-V4XRLPEF.js.map +1 -0
- package/dist/chunk-VJ26EKGJ.cjs +28 -0
- package/dist/chunk-VJ26EKGJ.cjs.map +1 -0
- package/dist/chunk-VK7MAV65.cjs +90 -0
- package/dist/chunk-VK7MAV65.cjs.map +1 -0
- package/dist/chunk-VYCKUKPA.cjs +106 -0
- package/dist/chunk-VYCKUKPA.cjs.map +1 -0
- package/dist/chunk-VYHJZVL5.cjs +29 -0
- package/dist/chunk-VYHJZVL5.cjs.map +1 -0
- package/dist/chunk-WA3FO4R7.js +155 -0
- package/dist/chunk-WA3FO4R7.js.map +1 -0
- package/dist/chunk-WJVHMTKB.cjs +12 -0
- package/dist/chunk-WJVHMTKB.cjs.map +1 -0
- package/dist/chunk-WLKFWQSJ.js +333 -0
- package/dist/chunk-WLKFWQSJ.js.map +1 -0
- package/dist/chunk-WPZTYOUX.cjs +59 -0
- package/dist/chunk-WPZTYOUX.cjs.map +1 -0
- package/dist/chunk-X2FR4OIT.js +27 -0
- package/dist/chunk-X2FR4OIT.js.map +1 -0
- package/dist/chunk-XIG2IE3L.js +134 -0
- package/dist/chunk-XIG2IE3L.js.map +1 -0
- package/dist/chunk-YLQQX5W2.cjs +20 -0
- package/dist/chunk-YLQQX5W2.cjs.map +1 -0
- package/dist/chunk-YPEPCZHF.cjs +147 -0
- package/dist/chunk-YPEPCZHF.cjs.map +1 -0
- package/dist/chunk-YPQF26X7.cjs +8 -0
- package/dist/chunk-YPQF26X7.cjs.map +1 -0
- package/dist/chunk-YU6KON2I.cjs +160 -0
- package/dist/chunk-YU6KON2I.cjs.map +1 -0
- package/dist/chunk-Z2OC3UIW.cjs +388 -0
- package/dist/chunk-Z2OC3UIW.cjs.map +1 -0
- package/dist/chunk-ZUBIEQJF.cjs +10590 -0
- package/dist/chunk-ZUBIEQJF.cjs.map +1 -0
- package/dist/chunk-ZZWTY3RX.js +230 -0
- package/dist/chunk-ZZWTY3RX.js.map +1 -0
- package/dist/compact-session-OO2GD76G.js +17 -0
- package/dist/compact-session-OO2GD76G.js.map +1 -0
- package/dist/compact-session-OO7NVWPB.cjs +54 -0
- package/dist/compact-session-OO7NVWPB.cjs.map +1 -0
- package/dist/compaction.cjs +54 -303
- package/dist/compaction.cjs.map +1 -1
- package/dist/compaction.js +3 -292
- package/dist/compaction.js.map +1 -1
- package/dist/concurrency.cjs +9 -81
- package/dist/concurrency.cjs.map +1 -1
- package/dist/concurrency.js +5 -80
- package/dist/concurrency.js.map +1 -1
- package/dist/context-GWANQLX4.js +5 -0
- package/dist/context-GWANQLX4.js.map +1 -0
- package/dist/context-KNWVTZSY.cjs +22 -0
- package/dist/context-KNWVTZSY.cjs.map +1 -0
- package/dist/{cron-x3muPNgg.d.cts → cron-D0JKR-yX.d.cts} +2 -1
- package/dist/{cron-B_NkE_VM.d.ts → cron-DivRaEmN.d.ts} +2 -1
- package/dist/cron.cjs +44 -20676
- package/dist/cron.cjs.map +1 -1
- package/dist/cron.d.cts +1 -1
- package/dist/cron.d.ts +1 -1
- package/dist/cron.js +38 -20676
- package/dist/cron.js.map +1 -1
- package/dist/errors.cjs +78 -470
- package/dist/errors.cjs.map +1 -1
- package/dist/errors.d.ts +3 -424
- package/dist/errors.js +2 -455
- package/dist/errors.js.map +1 -1
- package/dist/eval.cjs +72 -20411
- package/dist/eval.cjs.map +1 -1
- package/dist/eval.js +59 -20402
- package/dist/eval.js.map +1 -1
- package/dist/executor-ORJS5GV2.js +981 -0
- package/dist/executor-ORJS5GV2.js.map +1 -0
- package/dist/executor-Y4MKPIUD.cjs +985 -0
- package/dist/executor-Y4MKPIUD.cjs.map +1 -0
- package/dist/filesystem/index.cjs +7 -112
- package/dist/filesystem/index.cjs.map +1 -1
- package/dist/filesystem/index.js +4 -109
- package/dist/filesystem/index.js.map +1 -1
- package/dist/fork-agent-RSV4E3EA.js +61 -0
- package/dist/fork-agent-RSV4E3EA.js.map +1 -0
- package/dist/fork-agent-Y2IK2RYU.cjs +64 -0
- package/dist/fork-agent-Y2IK2RYU.cjs.map +1 -0
- package/dist/fs-session-store-KAUQYSGI.cjs +17 -0
- package/dist/fs-session-store-KAUQYSGI.cjs.map +1 -0
- package/dist/fs-session-store-ZKB5NN37.js +8 -0
- package/dist/fs-session-store-ZKB5NN37.js.map +1 -0
- package/dist/generate-object-H3RNAM6S.cjs +20 -0
- package/dist/generate-object-H3RNAM6S.cjs.map +1 -0
- package/dist/generate-object-YJPDV5BS.js +7 -0
- package/dist/generate-object-YJPDV5BS.js.map +1 -0
- package/dist/index-manager-CB6I7XFQ.cjs +19 -0
- package/dist/index-manager-CB6I7XFQ.cjs.map +1 -0
- package/dist/index-manager-L27Q3QAC.js +10 -0
- package/dist/index-manager-L27Q3QAC.js.map +1 -0
- package/dist/index.cjs +371 -22888
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +16 -21
- package/dist/index.d.ts +16 -21
- package/dist/index.js +92 -22713
- package/dist/index.js.map +1 -1
- package/dist/inject-session-6MJUSGZP.cjs +27 -0
- package/dist/inject-session-6MJUSGZP.cjs.map +1 -0
- package/dist/inject-session-KOFHS5K3.js +25 -0
- package/dist/inject-session-KOFHS5K3.js.map +1 -0
- package/dist/internal/judge/judge-call.d.ts +32 -19
- package/dist/internal/persistence/index.cjs +93 -508
- package/dist/internal/persistence/index.cjs.map +1 -1
- package/dist/internal/persistence/index.js +11 -489
- package/dist/internal/persistence/index.js.map +1 -1
- package/dist/internal/security/index.cjs +44 -361
- package/dist/internal/security/index.cjs.map +1 -1
- package/dist/internal/security/index.js +4 -355
- package/dist/internal/security/index.js.map +1 -1
- package/dist/judge-call-CEQ3FYYD.js +126 -0
- package/dist/judge-call-CEQ3FYYD.js.map +1 -0
- package/dist/judge-call-QG4WZ7F3.cjs +130 -0
- package/dist/judge-call-QG4WZ7F3.cjs.map +1 -0
- package/dist/models.cjs +24 -919
- package/dist/models.cjs.map +1 -1
- package/dist/models.js +11 -907
- package/dist/models.js.map +1 -1
- package/dist/oauth-transaction-store-7CKHPQRN.cjs +32 -0
- package/dist/oauth-transaction-store-7CKHPQRN.cjs.map +1 -0
- package/dist/oauth-transaction-store-W74I6EFD.js +3 -0
- package/dist/oauth-transaction-store-W74I6EFD.js.map +1 -0
- package/dist/path-safety.cjs +31 -200
- package/dist/path-safety.cjs.map +1 -1
- package/dist/path-safety.js +3 -197
- package/dist/path-safety.js.map +1 -1
- package/dist/persistence.cjs +73 -393
- package/dist/persistence.cjs.map +1 -1
- package/dist/persistence.js +9 -381
- package/dist/persistence.js.map +1 -1
- package/dist/project.cjs +8 -112
- package/dist/project.cjs.map +1 -1
- package/dist/project.js +6 -110
- package/dist/project.js.map +1 -1
- package/dist/registry-34IWWDQQ.js +9 -0
- package/dist/registry-34IWWDQQ.js.map +1 -0
- package/dist/registry-APYDISL6.cjs +46 -0
- package/dist/registry-APYDISL6.cjs.map +1 -0
- package/dist/retry.cjs +7 -87
- package/dist/retry.cjs.map +1 -1
- package/dist/retry.js +3 -90
- package/dist/retry.js.map +1 -1
- package/dist/run-to-completion-J73I6IY4.cjs +48 -0
- package/dist/run-to-completion-J73I6IY4.cjs.map +1 -0
- package/dist/run-to-completion-JDPIUKSH.js +3 -0
- package/dist/run-to-completion-JDPIUKSH.js.map +1 -0
- package/dist/run-until-PNO3QQLI.cjs +180 -0
- package/dist/run-until-PNO3QQLI.cjs.map +1 -0
- package/dist/run-until-XLHEHRQM.js +177 -0
- package/dist/run-until-XLHEHRQM.js.map +1 -0
- package/dist/sandbox/index.cjs +35 -337
- package/dist/sandbox/index.cjs.map +1 -1
- package/dist/sandbox/index.js +7 -323
- package/dist/sandbox/index.js.map +1 -1
- package/dist/sanitize/index.cjs +5 -112
- package/dist/sanitize/index.cjs.map +1 -1
- package/dist/sanitize/index.js +1 -114
- package/dist/sanitize/index.js.map +1 -1
- package/dist/server/auth/index.cjs +35 -175
- package/dist/server/auth/index.cjs.map +1 -1
- package/dist/server/auth/index.js +7 -161
- package/dist/server/auth/index.js.map +1 -1
- package/dist/server/errors-envelope.cjs +17 -328
- package/dist/server/errors-envelope.cjs.map +1 -1
- package/dist/server/errors-envelope.js +4 -317
- package/dist/server/errors-envelope.js.map +1 -1
- package/dist/session-transcript-LPNZR3YS.cjs +46 -0
- package/dist/session-transcript-LPNZR3YS.cjs.map +1 -0
- package/dist/session-transcript-T7LGJUGW.js +5 -0
- package/dist/session-transcript-T7LGJUGW.js.map +1 -0
- package/dist/skills.cjs +12 -280
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.js +4 -282
- package/dist/skills.js.map +1 -1
- package/dist/stream-object-QEQJJDTI.cjs +20 -0
- package/dist/stream-object-QEQJJDTI.cjs.map +1 -0
- package/dist/stream-object-WUQSSRY2.js +7 -0
- package/dist/stream-object-WUQSSRY2.js.map +1 -0
- package/dist/stream-to-completion-DFJ5T3BK.js +30 -0
- package/dist/stream-to-completion-DFJ5T3BK.js.map +1 -0
- package/dist/stream-to-completion-H2MHISSK.cjs +32 -0
- package/dist/stream-to-completion-H2MHISSK.cjs.map +1 -0
- package/dist/subagents.cjs +2 -8
- package/dist/subagents.cjs.map +1 -1
- package/dist/subagents.js +1 -7
- package/dist/subagents.js.map +1 -1
- package/dist/subscription/index.cjs +4 -17
- package/dist/subscription/index.cjs.map +1 -1
- package/dist/subscription/index.js +3 -16
- package/dist/subscription/index.js.map +1 -1
- package/dist/task-store.cjs +16 -258
- package/dist/task-store.cjs.map +1 -1
- package/dist/task-store.js +4 -259
- package/dist/task-store.js.map +1 -1
- package/dist/types/goal-events.d.ts +2 -1
- package/dist/workflow.cjs +71 -2797
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.js +8 -2812
- package/dist/workflow.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkYLQQX5W2_cjs = require('./chunk-YLQQX5W2.cjs');
|
|
4
|
+
|
|
5
|
+
// src/internal/persistence/file-lock.ts
|
|
6
|
+
var cached;
|
|
7
|
+
var warnedMissing = false;
|
|
8
|
+
var warnedStructural = false;
|
|
9
|
+
async function getProperLockfile() {
|
|
10
|
+
if (cached !== void 0) return cached;
|
|
11
|
+
try {
|
|
12
|
+
const mod = await import('proper-lockfile');
|
|
13
|
+
if (!validateLockModule(mod)) {
|
|
14
|
+
if (!warnedStructural) {
|
|
15
|
+
warnedStructural = true;
|
|
16
|
+
process.stderr.write(
|
|
17
|
+
"[theokit-sdk] proper-lockfile: imported module does NOT expose the expected `lock`/`unlock` API surface. This may indicate a supply-chain compromise or an incompatible major version. Falling back to in-process mutex (no cross-process safety). Reinstall with: pnpm add proper-lockfile@^11\n"
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
cached = null;
|
|
21
|
+
return cached;
|
|
22
|
+
}
|
|
23
|
+
cached = mod;
|
|
24
|
+
} catch {
|
|
25
|
+
cached = null;
|
|
26
|
+
}
|
|
27
|
+
return cached;
|
|
28
|
+
}
|
|
29
|
+
function validateLockModule(mod) {
|
|
30
|
+
if (mod === null || mod === void 0 || typeof mod !== "object") return false;
|
|
31
|
+
const m = mod;
|
|
32
|
+
return typeof m.lock === "function" && typeof m.unlock === "function";
|
|
33
|
+
}
|
|
34
|
+
async function withFileLock(path, fn, options) {
|
|
35
|
+
const lib = await getProperLockfile();
|
|
36
|
+
if (lib === null) {
|
|
37
|
+
if (!warnedMissing) {
|
|
38
|
+
warnedMissing = true;
|
|
39
|
+
process.stderr.write(
|
|
40
|
+
"[theokit-sdk] proper-lockfile not installed; cross-process file lock unavailable. Install with: pnpm add proper-lockfile\n"
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
return chunkYLQQX5W2_cjs.withCwdMutex(`file-lock:${path}`, fn);
|
|
44
|
+
}
|
|
45
|
+
return chunkYLQQX5W2_cjs.withCwdMutex(`file-lock:${path}`, async () => {
|
|
46
|
+
const release = await lib.lock(path, {
|
|
47
|
+
// EC-1: companion lockfile, target path may not exist yet.
|
|
48
|
+
lockfilePath: `${path}.lock`,
|
|
49
|
+
realpath: false,
|
|
50
|
+
stale: options?.stale ?? 3e4,
|
|
51
|
+
retries: {
|
|
52
|
+
retries: options?.retries ?? 5,
|
|
53
|
+
factor: options?.retryFactor ?? 1.5,
|
|
54
|
+
minTimeout: 100,
|
|
55
|
+
maxTimeout: 5e3
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
try {
|
|
59
|
+
return await fn();
|
|
60
|
+
} finally {
|
|
61
|
+
await release();
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
exports.withFileLock = withFileLock;
|
|
67
|
+
//# sourceMappingURL=chunk-C7PICHRF.cjs.map
|
|
68
|
+
//# sourceMappingURL=chunk-C7PICHRF.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/internal/persistence/file-lock.ts"],"names":["withCwdMutex"],"mappings":";;;;;AAgCA,IAAI,MAAA;AACJ,IAAI,aAAA,GAAgB,KAAA;AACpB,IAAI,gBAAA,GAAmB,KAAA;AAEvB,eAAe,iBAAA,GAA0D;AACvE,EAAA,IAAI,MAAA,KAAW,QAAW,OAAO,MAAA;AACjC,EAAA,IAAI;AACF,IAAA,MAAM,GAAA,GAAM,MAAM,OAAO,iBAAiB,CAAA;AAM1C,IAAA,IAAI,CAAC,kBAAA,CAAmB,GAAG,CAAA,EAAG;AAC5B,MAAA,IAAI,CAAC,gBAAA,EAAkB;AACrB,QAAA,gBAAA,GAAmB,IAAA;AACnB,QAAA,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,UACb;AAAA,SAKF;AAAA,MACF;AACA,MAAA,MAAA,GAAS,IAAA;AACT,MAAA,OAAO,MAAA;AAAA,IACT;AACA,IAAA,MAAA,GAAS,GAAA;AAAA,EACX,CAAA,CAAA,MAAQ;AACN,IAAA,MAAA,GAAS,IAAA;AAAA,EACX;AACA,EAAA,OAAO,MAAA;AACT;AAaA,SAAS,mBAAmB,GAAA,EAAuB;AACjD,EAAA,IAAI,QAAQ,IAAA,IAAQ,GAAA,KAAQ,UAAa,OAAO,GAAA,KAAQ,UAAU,OAAO,KAAA;AACzE,EAAA,MAAM,CAAA,GAAI,GAAA;AACV,EAAA,OAAO,OAAO,CAAA,CAAE,IAAA,KAAS,UAAA,IAAc,OAAO,EAAE,MAAA,KAAW,UAAA;AAC7D;AAmDA,eAAsB,YAAA,CACpB,IAAA,EACA,EAAA,EACA,OAAA,EACY;AACZ,EAAA,MAAM,GAAA,GAAM,MAAM,iBAAA,EAAkB;AAEpC,EAAA,IAAI,QAAQ,IAAA,EAAM;AAChB,IAAA,IAAI,CAAC,aAAA,EAAe;AAClB,MAAA,aAAA,GAAgB,IAAA;AAChB,MAAA,OAAA,CAAQ,MAAA,CAAO,KAAA;AAAA,QACb;AAAA,OAGF;AAAA,IACF;AACA,IAAA,OAAOA,8BAAA,CAAa,CAAA,UAAA,EAAa,IAAI,CAAA,CAAA,EAAI,EAAE,CAAA;AAAA,EAC7C;AAOA,EAAA,OAAOA,8BAAA,CAAa,CAAA,UAAA,EAAa,IAAI,CAAA,CAAA,EAAI,YAAY;AACnD,IAAA,MAAM,OAAA,GAAU,MAAM,GAAA,CAAI,IAAA,CAAK,IAAA,EAAM;AAAA;AAAA,MAEnC,YAAA,EAAc,GAAG,IAAI,CAAA,KAAA,CAAA;AAAA,MACrB,QAAA,EAAU,KAAA;AAAA,MACV,KAAA,EAAO,SAAS,KAAA,IAAS,GAAA;AAAA,MACzB,OAAA,EAAS;AAAA,QACP,OAAA,EAAS,SAAS,OAAA,IAAW,CAAA;AAAA,QAC7B,MAAA,EAAQ,SAAS,WAAA,IAAe,GAAA;AAAA,QAChC,UAAA,EAAY,GAAA;AAAA,QACZ,UAAA,EAAY;AAAA;AACd,KACD,CAAA;AAED,IAAA,IAAI;AACF,MAAA,OAAO,MAAM,EAAA,EAAG;AAAA,IAClB,CAAA,SAAE;AACA,MAAA,MAAM,OAAA,EAAQ;AAAA,IAChB;AAAA,EACF,CAAC,CAAA;AACH","file":"chunk-C7PICHRF.cjs","sourcesContent":["/**\n * Cross-process file lock helper (ADR D61).\n *\n * Uses `proper-lockfile` (optional peer dep) for cross-process locks. When\n * the peer dep is absent, falls back to `withCwdMutex` (in-process only)\n * with a one-shot stderr warning.\n *\n * EC-1 fix: uses a companion `<path>.lock` file with `realpath: false` so\n * `withFileLock` works even when the target `path` does not exist yet.\n * Without this, fresh installs that lock-then-create would crash with ENOENT.\n *\n * @internal\n */\n\nimport { withCwdMutex } from \"./cwd-mutex.js\";\n\ninterface ProperLockfileModule {\n lock: (file: string, options: ProperLockfileOptions) => Promise<() => Promise<void>>;\n}\n\ninterface ProperLockfileOptions {\n lockfilePath?: string;\n realpath?: boolean;\n stale?: number;\n retries?: {\n retries: number;\n factor?: number;\n minTimeout?: number;\n maxTimeout?: number;\n };\n}\n\nlet cached: ProperLockfileModule | null | undefined;\nlet warnedMissing = false;\nlet warnedStructural = false;\n\nasync function getProperLockfile(): Promise<ProperLockfileModule | null> {\n if (cached !== undefined) return cached;\n try {\n const mod = await import(\"proper-lockfile\");\n // T5.9 — supply-chain hardening: validate the imported module\n // exposes the API surface we depend on BEFORE caching it. A\n // tampered or incompatible version that lacks `lock`/`unlock`\n // functions gets treated as \"not installed\" with an advisory\n // warning — never silently used.\n if (!validateLockModule(mod)) {\n if (!warnedStructural) {\n warnedStructural = true;\n process.stderr.write(\n \"[theokit-sdk] proper-lockfile: imported module does NOT expose \" +\n \"the expected `lock`/`unlock` API surface. This may indicate a \" +\n \"supply-chain compromise or an incompatible major version. \" +\n \"Falling back to in-process mutex (no cross-process safety). \" +\n \"Reinstall with: pnpm add proper-lockfile@^11\\n\",\n );\n }\n cached = null;\n return cached;\n }\n cached = mod as ProperLockfileModule;\n } catch {\n cached = null;\n }\n return cached;\n}\n\n/**\n * T5.9 — Structural validation of the dynamically-imported\n * `proper-lockfile` module. Verifies the API surface we depend on\n * (`lock` and `unlock` as functions) is present. Pure function —\n * never throws, never mutates, never performs I/O.\n *\n * Exported via `__TESTING__validateLockModule` seam so unit tests\n * can drive the check without spinning up the dynamic import.\n *\n * @internal\n */\nfunction validateLockModule(mod: unknown): boolean {\n if (mod === null || mod === undefined || typeof mod !== \"object\") return false;\n const m = mod as Record<string, unknown>;\n return typeof m.lock === \"function\" && typeof m.unlock === \"function\";\n}\n\n/**\n * T5.9 — Test seam: expose the structural validator for unit tests.\n * NOT included in the public barrel.\n *\n * @internal\n */\nexport function __TESTING__validateLockModule(mod: unknown): boolean {\n return validateLockModule(mod);\n}\n\n/**\n * T5.9 — Test seam: reset the module cache + warning flags between\n * tests so each test starts fresh. NOT included in the public barrel.\n *\n * @internal\n */\nexport function __TESTING__resetFileLockCache(): void {\n cached = undefined;\n warnedMissing = false;\n warnedStructural = false;\n}\n\n/**\n * Options for `withFileLock`.\n *\n * @internal\n */\nexport interface FileLockOptions {\n /** Stale lock timeout in ms. Default 30_000 (30s). */\n stale?: number;\n /** Max retries on busy lock. Default 5. */\n retries?: number;\n /** Backoff factor between retries. Default 1.5. */\n retryFactor?: number;\n}\n\n/**\n * Run `fn` while holding an OS-level cross-process lock on `path`.\n *\n * If `proper-lockfile` is installed, uses it with a companion `<path>.lock`\n * file (`realpath: false`, so target file does NOT need to exist yet).\n * Otherwise falls back to in-process `withCwdMutex` and prints a one-shot\n * stderr warning telling the user to install `proper-lockfile` for\n * cross-process safety.\n *\n * The lock is released even when `fn` throws.\n *\n * @internal\n */\nexport async function withFileLock<T>(\n path: string,\n fn: () => Promise<T>,\n options?: FileLockOptions,\n): Promise<T> {\n const lib = await getProperLockfile();\n\n if (lib === null) {\n if (!warnedMissing) {\n warnedMissing = true;\n process.stderr.write(\n \"[theokit-sdk] proper-lockfile not installed; \" +\n \"cross-process file lock unavailable. \" +\n \"Install with: pnpm add proper-lockfile\\n\",\n );\n }\n return withCwdMutex(`file-lock:${path}`, fn);\n }\n\n // proper-lockfile errors immediately on same-process concurrent acquire\n // (\"Lock file is already being held\"). Wrap with cwd-mutex first so\n // in-process callers queue and only ONE thread at a time enters the\n // cross-process acquire path. Combined: full in-process + cross-process\n // serialization.\n return withCwdMutex(`file-lock:${path}`, async () => {\n const release = await lib.lock(path, {\n // EC-1: companion lockfile, target path may not exist yet.\n lockfilePath: `${path}.lock`,\n realpath: false,\n stale: options?.stale ?? 30_000,\n retries: {\n retries: options?.retries ?? 5,\n factor: options?.retryFactor ?? 1.5,\n minTimeout: 100,\n maxTimeout: 5_000,\n },\n });\n\n try {\n return await fn();\n } finally {\n await release();\n }\n });\n}\n\n/**\n * Test helper — resets the cached proper-lockfile module + warning flag.\n * Allows tests to simulate \"module absent\" by clearing cache then\n * monkey-patching the dynamic import resolution.\n *\n * @internal\n */\nexport function _resetFileLockCacheForTesting(): void {\n cached = undefined;\n warnedMissing = false;\n}\n"]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
|
|
3
|
+
// src/internal/persistence/persistence-schema.ts
|
|
4
|
+
var PersistenceSchema = z.object({
|
|
5
|
+
backend: z.enum(["memory", "json"]),
|
|
6
|
+
dir: z.string().optional()
|
|
7
|
+
}).refine((p) => p.backend !== "json" || typeof p.dir === "string" && p.dir.length > 0, {
|
|
8
|
+
message: 'persistence.dir is required when backend = "json"'
|
|
9
|
+
}).optional();
|
|
10
|
+
|
|
11
|
+
export { PersistenceSchema };
|
|
12
|
+
//# sourceMappingURL=chunk-CAH3G4IS.js.map
|
|
13
|
+
//# sourceMappingURL=chunk-CAH3G4IS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/internal/persistence/persistence-schema.ts"],"names":[],"mappings":";;;AAiBO,IAAM,iBAAA,GAAoB,EAC9B,MAAA,CAAO;AAAA,EACN,SAAS,CAAA,CAAE,IAAA,CAAK,CAAC,QAAA,EAAU,MAAM,CAAC,CAAA;AAAA,EAClC,GAAA,EAAK,CAAA,CAAE,MAAA,EAAO,CAAE,QAAA;AAClB,CAAC,CAAA,CACA,MAAA,CAAO,CAAC,CAAA,KAAM,EAAE,OAAA,KAAY,MAAA,IAAW,OAAO,CAAA,CAAE,GAAA,KAAQ,QAAA,IAAY,CAAA,CAAE,GAAA,CAAI,SAAS,CAAA,EAAI;AAAA,EACtF,OAAA,EAAS;AACX,CAAC,EACA,QAAA","file":"chunk-CAH3G4IS.js","sourcesContent":["/**\n * Shared Zod schema for the `{ backend: \"memory\" | \"json\", dir? }` options\n * used by both `Workflow` snapshots and `Cache` semantic store persistence.\n * Extracted to remove the cross-module clone flagged by jscpd.\n *\n * @internal\n */\n\nimport { z } from \"zod\";\n\n/**\n * `persistence?` opt-in JSON disk backend with `dir` required when chosen.\n *\n * `.refine()` restored after Zod v4-only migration (plan zod-v4-migration\n * T1.1, ADR D4). With single v4 instance across workspace, ZodEffects\n * inside `z.object()` works correctly.\n */\nexport const PersistenceSchema = z\n .object({\n backend: z.enum([\"memory\", \"json\"]),\n dir: z.string().optional(),\n })\n .refine((p) => p.backend !== \"json\" || (typeof p.dir === \"string\" && p.dir.length > 0), {\n message: 'persistence.dir is required when backend = \"json\"',\n })\n .optional();\n"]}
|
|
@@ -0,0 +1,565 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkHFPGOTVF_cjs = require('./chunk-HFPGOTVF.cjs');
|
|
4
|
+
var fs = require('fs');
|
|
5
|
+
var path = require('path');
|
|
6
|
+
var url = require('url');
|
|
7
|
+
var zod = require('zod');
|
|
8
|
+
var os = require('os');
|
|
9
|
+
|
|
10
|
+
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
|
|
11
|
+
// src/internal/global-singleton.ts
|
|
12
|
+
function globalSingleton(key, create) {
|
|
13
|
+
const g = globalThis;
|
|
14
|
+
const sym = Symbol.for(key);
|
|
15
|
+
if (g[sym] === void 0) g[sym] = create();
|
|
16
|
+
return g[sym];
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// src/internal/providers/registry.ts
|
|
20
|
+
var REGISTRY = globalSingleton(
|
|
21
|
+
"theokit-sdk.providers.registry",
|
|
22
|
+
() => /* @__PURE__ */ new Map()
|
|
23
|
+
);
|
|
24
|
+
var ALIASES = globalSingleton("theokit-sdk.providers.aliases", () => /* @__PURE__ */ new Map());
|
|
25
|
+
function registerProvider(profile) {
|
|
26
|
+
if (REGISTRY.has(profile.name)) {
|
|
27
|
+
process.stderr.write(`[theokit-sdk] Provider "${profile.name}" overridden by user plugin.
|
|
28
|
+
`);
|
|
29
|
+
}
|
|
30
|
+
REGISTRY.set(profile.name, profile);
|
|
31
|
+
for (const alias of profile.aliases ?? []) {
|
|
32
|
+
const previous = ALIASES.get(alias);
|
|
33
|
+
if (previous !== void 0 && previous !== profile.name) {
|
|
34
|
+
process.stderr.write(
|
|
35
|
+
`[theokit-sdk] Alias "${alias}" collision: was "${previous}", now "${profile.name}".
|
|
36
|
+
`
|
|
37
|
+
);
|
|
38
|
+
}
|
|
39
|
+
ALIASES.set(alias, profile.name);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
function getProviderProfile(name) {
|
|
43
|
+
const canonical = ALIASES.get(name) ?? name;
|
|
44
|
+
return REGISTRY.get(canonical);
|
|
45
|
+
}
|
|
46
|
+
function listProviders() {
|
|
47
|
+
return Array.from(REGISTRY.values());
|
|
48
|
+
}
|
|
49
|
+
var MODALITIES = ["text", "audio", "image", "video", "pdf"];
|
|
50
|
+
var costSchema = zod.z.object({
|
|
51
|
+
/** USD per 1M tokens (models.dev convention). */
|
|
52
|
+
input: zod.z.number().nonnegative(),
|
|
53
|
+
output: zod.z.number().nonnegative(),
|
|
54
|
+
cache_read: zod.z.number().nonnegative().optional(),
|
|
55
|
+
cache_write: zod.z.number().nonnegative().optional()
|
|
56
|
+
}).loose();
|
|
57
|
+
var limitSchema = zod.z.object({
|
|
58
|
+
context: zod.z.number().positive(),
|
|
59
|
+
input: zod.z.number().positive().optional(),
|
|
60
|
+
output: zod.z.number().positive().optional()
|
|
61
|
+
}).loose();
|
|
62
|
+
var modalitiesSchema = zod.z.object({
|
|
63
|
+
input: zod.z.array(zod.z.enum(MODALITIES)).optional(),
|
|
64
|
+
output: zod.z.array(zod.z.enum(MODALITIES)).optional()
|
|
65
|
+
}).loose();
|
|
66
|
+
var catalogModelSchema = zod.z.object({
|
|
67
|
+
name: zod.z.string().optional(),
|
|
68
|
+
release_date: zod.z.string().optional(),
|
|
69
|
+
attachment: zod.z.boolean().optional(),
|
|
70
|
+
reasoning: zod.z.boolean().optional(),
|
|
71
|
+
temperature: zod.z.boolean().optional(),
|
|
72
|
+
tool_call: zod.z.boolean().optional(),
|
|
73
|
+
/** theokit extension — maps to ModelCapabilities.supportsStructuredOutput. */
|
|
74
|
+
structured_output: zod.z.boolean().optional(),
|
|
75
|
+
/** theokit extension — maps to ModelCapabilities.supportsCacheControl. */
|
|
76
|
+
cache_control: zod.z.boolean().optional(),
|
|
77
|
+
cost: costSchema.optional(),
|
|
78
|
+
limit: limitSchema.optional(),
|
|
79
|
+
modalities: modalitiesSchema.optional(),
|
|
80
|
+
status: zod.z.enum(["alpha", "beta", "deprecated"]).optional()
|
|
81
|
+
}).loose();
|
|
82
|
+
|
|
83
|
+
// src/internal/providers/catalog-loader.ts
|
|
84
|
+
var __dirname_resolved = path.dirname(url.fileURLToPath((typeof document === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('chunk-D42XHI4O.cjs', document.baseURI).href))));
|
|
85
|
+
var modelInfoIndex = globalSingleton(
|
|
86
|
+
"theokit-sdk.providers.model-info-index",
|
|
87
|
+
() => /* @__PURE__ */ new Map()
|
|
88
|
+
);
|
|
89
|
+
var patchedModelKeys = globalSingleton(
|
|
90
|
+
"theokit-sdk.providers.model-info-patched",
|
|
91
|
+
() => /* @__PURE__ */ new Set()
|
|
92
|
+
);
|
|
93
|
+
var indexState = globalSingleton("theokit-sdk.providers.model-info-loaded", () => ({
|
|
94
|
+
loaded: false
|
|
95
|
+
}));
|
|
96
|
+
function getCatalogModelInfo(key) {
|
|
97
|
+
ensureModelIndexLoaded();
|
|
98
|
+
return modelInfoIndex.get(key);
|
|
99
|
+
}
|
|
100
|
+
function isPatchedModelKey(key) {
|
|
101
|
+
return patchedModelKeys.has(key);
|
|
102
|
+
}
|
|
103
|
+
function patchModelInfo(key, model) {
|
|
104
|
+
ensureModelIndexLoaded();
|
|
105
|
+
const existing = modelInfoIndex.get(key);
|
|
106
|
+
modelInfoIndex.set(key, existing === void 0 ? model : { ...existing, ...model });
|
|
107
|
+
patchedModelKeys.add(key);
|
|
108
|
+
}
|
|
109
|
+
function ensureModelIndexLoaded() {
|
|
110
|
+
if (indexState.loaded) return;
|
|
111
|
+
indexState.loaded = true;
|
|
112
|
+
try {
|
|
113
|
+
const catalog = loadProviderCatalog();
|
|
114
|
+
for (const entry of Object.values(catalog)) {
|
|
115
|
+
indexEntryModels(entry);
|
|
116
|
+
}
|
|
117
|
+
} catch (err) {
|
|
118
|
+
process.stderr.write(
|
|
119
|
+
`[theokit-sdk] WARN: provider catalog unavailable (${err.message}) \u2014 per-model data disabled
|
|
120
|
+
`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
function indexEntryModels(entry) {
|
|
125
|
+
if (entry.models === void 0 || typeof entry.models !== "object") return;
|
|
126
|
+
for (const [modelId, raw] of Object.entries(entry.models)) {
|
|
127
|
+
const parsed = catalogModelSchema.safeParse(raw);
|
|
128
|
+
if (!parsed.success) {
|
|
129
|
+
process.stderr.write(
|
|
130
|
+
`[theokit-sdk] WARN: Skipping malformed catalog model "${entry.id}/${modelId}": ${parsed.error.issues[0]?.message ?? "invalid"}
|
|
131
|
+
`
|
|
132
|
+
);
|
|
133
|
+
continue;
|
|
134
|
+
}
|
|
135
|
+
modelInfoIndex.set(`${entry.id}/${modelId}`, parsed.data);
|
|
136
|
+
for (const alias of entry.aliases ?? []) {
|
|
137
|
+
const key = `${alias}/${modelId}`;
|
|
138
|
+
if (!modelInfoIndex.has(key)) modelInfoIndex.set(key, parsed.data);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function validateEntry(raw) {
|
|
143
|
+
if (typeof raw.id !== "string" || typeof raw.displayName !== "string" || typeof raw.apiMode !== "string" || typeof raw.authType !== "string" || typeof raw.baseUrl !== "string" || !Array.isArray(raw.envVars) || !Array.isArray(raw.fallbackModels) || raw.capabilities == null || typeof raw.capabilities !== "object") {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return raw;
|
|
147
|
+
}
|
|
148
|
+
function loadProviderCatalog(opts) {
|
|
149
|
+
const catalogPath = path.join(__dirname_resolved, "provider-catalog.json");
|
|
150
|
+
const rawText = fs.readFileSync(catalogPath, "utf-8");
|
|
151
|
+
let entries = JSON.parse(rawText);
|
|
152
|
+
if (opts?._testInjectMalformed) {
|
|
153
|
+
entries = [
|
|
154
|
+
...entries,
|
|
155
|
+
{ id: "malformed-provider", displayName: "Bad" }
|
|
156
|
+
];
|
|
157
|
+
}
|
|
158
|
+
const result = {};
|
|
159
|
+
for (const raw of entries) {
|
|
160
|
+
const validated = validateEntry(raw);
|
|
161
|
+
if (validated === null) {
|
|
162
|
+
process.stderr.write(
|
|
163
|
+
`[theokit-sdk] WARN: Skipping malformed catalog entry: ${JSON.stringify(raw).slice(0, 100)}
|
|
164
|
+
`
|
|
165
|
+
);
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
168
|
+
result[validated.id] = validated;
|
|
169
|
+
}
|
|
170
|
+
return result;
|
|
171
|
+
}
|
|
172
|
+
var _capabilitiesCache = null;
|
|
173
|
+
function getCatalogCapabilities(providerId) {
|
|
174
|
+
if (_capabilitiesCache === null) {
|
|
175
|
+
const catalog = loadProviderCatalog();
|
|
176
|
+
_capabilitiesCache = {};
|
|
177
|
+
for (const entry of Object.values(catalog)) {
|
|
178
|
+
_capabilitiesCache[entry.id] = entry.capabilities;
|
|
179
|
+
for (const alias of entry.aliases ?? []) {
|
|
180
|
+
if (_capabilitiesCache[alias] === void 0) _capabilitiesCache[alias] = entry.capabilities;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
return _capabilitiesCache[providerId];
|
|
185
|
+
}
|
|
186
|
+
function registerCatalogProviders(opts) {
|
|
187
|
+
const catalog = loadProviderCatalog(opts);
|
|
188
|
+
for (const entry of Object.values(catalog)) {
|
|
189
|
+
if (getProviderProfile(entry.id) !== void 0) continue;
|
|
190
|
+
if (entry.aliases?.some((a) => getProviderProfile(a) !== void 0)) continue;
|
|
191
|
+
const profile = {
|
|
192
|
+
name: entry.id,
|
|
193
|
+
apiMode: entry.apiMode,
|
|
194
|
+
authType: entry.authType,
|
|
195
|
+
baseUrl: entry.baseUrl,
|
|
196
|
+
envVars: entry.envVars,
|
|
197
|
+
fallbackModels: entry.fallbackModels,
|
|
198
|
+
displayName: entry.displayName,
|
|
199
|
+
aliases: entry.aliases,
|
|
200
|
+
modelsUrl: entry.modelsUrl,
|
|
201
|
+
hostname: entry.hostname,
|
|
202
|
+
extraHeaders: entry.extraHeaders
|
|
203
|
+
};
|
|
204
|
+
registerProvider(profile);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// src/internal/providers/builtin/anthropic.ts
|
|
209
|
+
var ANTHROPIC = {
|
|
210
|
+
name: "anthropic",
|
|
211
|
+
apiMode: "anthropic_messages",
|
|
212
|
+
envVars: ["ANTHROPIC_API_KEY"],
|
|
213
|
+
authType: "api_key",
|
|
214
|
+
baseUrl: "https://api.anthropic.com",
|
|
215
|
+
modelsUrl: "https://api.anthropic.com/v1/models",
|
|
216
|
+
hostname: "api.anthropic.com",
|
|
217
|
+
fallbackModels: ["claude-opus-4-7", "claude-sonnet-4-6", "claude-haiku-4-5-20251001"],
|
|
218
|
+
// M45 — the Anthropic beta-features header (interleaved thinking + fine-grained tool streaming). An
|
|
219
|
+
// Anthropic API constant, adapted verbatim from OpenCode's anthropic plugin (MIT © 2025 opencode). The
|
|
220
|
+
// SANCTIONED behavior delta of M45 (ADR D4) — consumed by the anthropic transport's extraHeaders wiring.
|
|
221
|
+
extraHeaders: {
|
|
222
|
+
"anthropic-beta": "interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14"
|
|
223
|
+
}
|
|
224
|
+
};
|
|
225
|
+
|
|
226
|
+
// src/internal/providers/builtin/bedrock.ts
|
|
227
|
+
var BEDROCK = {
|
|
228
|
+
name: "bedrock",
|
|
229
|
+
apiMode: "bedrock_anthropic",
|
|
230
|
+
envVars: ["AWS_BEARER_TOKEN_BEDROCK"],
|
|
231
|
+
authType: "aws_bearer",
|
|
232
|
+
baseUrl: "https://bedrock-runtime.us-east-1.amazonaws.com",
|
|
233
|
+
modelsUrl: void 0,
|
|
234
|
+
hostname: "bedrock-runtime.amazonaws.com",
|
|
235
|
+
fallbackModels: [
|
|
236
|
+
"bedrock/us.anthropic.claude-sonnet-4-5-v1:0",
|
|
237
|
+
"bedrock/us.anthropic.claude-opus-4-7-v1:0",
|
|
238
|
+
"bedrock/global.anthropic.claude-haiku-4-5-v1:0"
|
|
239
|
+
]
|
|
240
|
+
};
|
|
241
|
+
function stripBedrockPrefix(modelId) {
|
|
242
|
+
return modelId.replace(/^bedrock\//, "");
|
|
243
|
+
}
|
|
244
|
+
function inferRegionFromModelId(modelId) {
|
|
245
|
+
const id = stripBedrockPrefix(modelId);
|
|
246
|
+
if (id.startsWith("global.")) return "us-east-1";
|
|
247
|
+
if (id.startsWith("us.")) return process.env.AWS_REGION ?? "us-east-1";
|
|
248
|
+
if (id.startsWith("eu.")) return process.env.AWS_REGION ?? "eu-west-1";
|
|
249
|
+
if (id.startsWith("apac.")) return process.env.AWS_REGION ?? "ap-southeast-1";
|
|
250
|
+
if (id.startsWith("jp.")) return "ap-northeast-1";
|
|
251
|
+
return void 0;
|
|
252
|
+
}
|
|
253
|
+
function resolveBedrockBaseUrl(modelId) {
|
|
254
|
+
const region = inferRegionFromModelId(modelId) ?? process.env.AWS_REGION ?? "us-east-1";
|
|
255
|
+
return `https://bedrock-runtime.${region}.amazonaws.com`;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
// src/internal/providers/builtin/openai-compatible.ts
|
|
259
|
+
function openAiCompatibleProfile(p) {
|
|
260
|
+
return {
|
|
261
|
+
apiMode: "chat_completions",
|
|
262
|
+
authType: "api_key",
|
|
263
|
+
fallbackModels: [],
|
|
264
|
+
...p
|
|
265
|
+
};
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
// src/internal/providers/builtin/cerebras.ts
|
|
269
|
+
var CEREBRAS = openAiCompatibleProfile({
|
|
270
|
+
name: "cerebras",
|
|
271
|
+
baseUrl: "https://api.cerebras.ai/v1",
|
|
272
|
+
envVars: ["CEREBRAS_API_KEY"],
|
|
273
|
+
fallbackModels: ["gpt-oss-120b", "zai-glm-4.7"],
|
|
274
|
+
extraHeaders: { "X-Cerebras-3rd-Party-Integration": "theokit" },
|
|
275
|
+
hostname: "api.cerebras.ai"
|
|
276
|
+
});
|
|
277
|
+
|
|
278
|
+
// src/internal/providers/builtin/cohere.ts
|
|
279
|
+
var COHERE = openAiCompatibleProfile({
|
|
280
|
+
name: "cohere",
|
|
281
|
+
baseUrl: "https://api.cohere.ai/compatibility/v1",
|
|
282
|
+
envVars: ["COHERE_API_KEY", "CO_API_KEY"],
|
|
283
|
+
fallbackModels: ["command-a-03-2025"],
|
|
284
|
+
hostname: "api.cohere.ai"
|
|
285
|
+
});
|
|
286
|
+
|
|
287
|
+
// src/internal/providers/builtin/deepinfra.ts
|
|
288
|
+
var DEEPINFRA = openAiCompatibleProfile({
|
|
289
|
+
name: "deepinfra",
|
|
290
|
+
baseUrl: "https://api.deepinfra.com/v1/openai",
|
|
291
|
+
envVars: ["DEEPINFRA_API_KEY"],
|
|
292
|
+
fallbackModels: ["Qwen/Qwen3-32B"],
|
|
293
|
+
hostname: "api.deepinfra.com"
|
|
294
|
+
});
|
|
295
|
+
|
|
296
|
+
// src/internal/providers/builtin/gemini.ts
|
|
297
|
+
var GEMINI = {
|
|
298
|
+
name: "gemini",
|
|
299
|
+
apiMode: "chat_completions",
|
|
300
|
+
envVars: ["OPENROUTER_API_KEY"],
|
|
301
|
+
authType: "api_key",
|
|
302
|
+
baseUrl: "https://openrouter.ai/api",
|
|
303
|
+
hostname: "openrouter.ai",
|
|
304
|
+
fallbackModels: ["google/gemini-2.0-flash-001"]
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
// src/internal/providers/builtin/google.ts
|
|
308
|
+
var GOOGLE = openAiCompatibleProfile({
|
|
309
|
+
name: "google",
|
|
310
|
+
baseUrl: "https://generativelanguage.googleapis.com/v1beta/openai",
|
|
311
|
+
envVars: ["GOOGLE_API_KEY", "GEMINI_API_KEY", "GOOGLE_GENERATIVE_AI_API_KEY"],
|
|
312
|
+
fallbackModels: ["gemini-2.5-pro", "gemini-2.5-flash"],
|
|
313
|
+
hostname: "generativelanguage.googleapis.com"
|
|
314
|
+
});
|
|
315
|
+
|
|
316
|
+
// src/internal/providers/builtin/groq.ts
|
|
317
|
+
var GROQ = openAiCompatibleProfile({
|
|
318
|
+
name: "groq",
|
|
319
|
+
baseUrl: "https://api.groq.com/openai/v1",
|
|
320
|
+
envVars: ["GROQ_API_KEY"],
|
|
321
|
+
fallbackModels: ["llama-3.3-70b-versatile", "llama-3.1-8b-instant"],
|
|
322
|
+
hostname: "api.groq.com"
|
|
323
|
+
});
|
|
324
|
+
|
|
325
|
+
// src/internal/providers/builtin/llamacpp.ts
|
|
326
|
+
var LLAMACPP = {
|
|
327
|
+
name: "llamacpp",
|
|
328
|
+
aliases: ["llama-cpp", "llama.cpp"],
|
|
329
|
+
apiMode: "chat_completions",
|
|
330
|
+
envVars: ["LLAMACPP_API_KEY"],
|
|
331
|
+
authType: "none",
|
|
332
|
+
baseUrl: "http://localhost:8080",
|
|
333
|
+
modelsUrl: "http://localhost:8080/v1/models",
|
|
334
|
+
hostname: "localhost",
|
|
335
|
+
fallbackModels: ["loaded-model"]
|
|
336
|
+
};
|
|
337
|
+
|
|
338
|
+
// src/internal/providers/builtin/lmstudio.ts
|
|
339
|
+
var LMSTUDIO = {
|
|
340
|
+
name: "lmstudio",
|
|
341
|
+
aliases: ["lm-studio", "lm_studio"],
|
|
342
|
+
apiMode: "chat_completions",
|
|
343
|
+
envVars: ["LMSTUDIO_API_KEY"],
|
|
344
|
+
authType: "none",
|
|
345
|
+
baseUrl: "http://localhost:1234",
|
|
346
|
+
modelsUrl: "http://localhost:1234/v1/models",
|
|
347
|
+
hostname: "localhost",
|
|
348
|
+
fallbackModels: ["loaded-model"]
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
// src/internal/providers/builtin/mistral.ts
|
|
352
|
+
var MISTRAL = openAiCompatibleProfile({
|
|
353
|
+
name: "mistral",
|
|
354
|
+
baseUrl: "https://api.mistral.ai/v1",
|
|
355
|
+
envVars: ["MISTRAL_API_KEY"],
|
|
356
|
+
fallbackModels: ["mistral-large-latest", "codestral-latest"],
|
|
357
|
+
hostname: "api.mistral.ai"
|
|
358
|
+
});
|
|
359
|
+
|
|
360
|
+
// src/internal/providers/builtin/ollama.ts
|
|
361
|
+
var OLLAMA = {
|
|
362
|
+
name: "ollama",
|
|
363
|
+
apiMode: "chat_completions",
|
|
364
|
+
envVars: ["OLLAMA_API_KEY"],
|
|
365
|
+
authType: "none",
|
|
366
|
+
baseUrl: "http://localhost:11434",
|
|
367
|
+
modelsUrl: "http://localhost:11434/v1/models",
|
|
368
|
+
hostname: "localhost",
|
|
369
|
+
fallbackModels: ["llama3.2", "qwen2.5", "mistral"]
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
// src/internal/providers/builtin/openai.ts
|
|
373
|
+
var OPENAI = {
|
|
374
|
+
name: "openai",
|
|
375
|
+
apiMode: "chat_completions",
|
|
376
|
+
envVars: ["OPENAI_API_KEY"],
|
|
377
|
+
authType: "api_key",
|
|
378
|
+
baseUrl: "https://api.openai.com",
|
|
379
|
+
modelsUrl: "https://api.openai.com/v1/models",
|
|
380
|
+
hostname: "api.openai.com",
|
|
381
|
+
fallbackModels: ["gpt-4o", "gpt-4o-mini"]
|
|
382
|
+
};
|
|
383
|
+
var DEFAULT_STORE = {
|
|
384
|
+
home: os.homedir(),
|
|
385
|
+
dirName: ".theokit",
|
|
386
|
+
fileName: "auth.json",
|
|
387
|
+
homeEnvVar: "THEOKIT_AUTH_HOME"
|
|
388
|
+
};
|
|
389
|
+
var OPENAI_OAUTH_CONFIG = {
|
|
390
|
+
provider: "openai",
|
|
391
|
+
authorizeEndpoint: "https://auth.openai.com/oauth/authorize",
|
|
392
|
+
tokenEndpoint: "https://auth.openai.com/oauth/token",
|
|
393
|
+
clientId: "app_EMoamEEZ73f0CkXaXp7hrann",
|
|
394
|
+
scopes: ["openid", "profile", "email", "offline_access"],
|
|
395
|
+
redirectUri: "https://auth.openai.com/deviceauth/callback"
|
|
396
|
+
};
|
|
397
|
+
function codexFetch() {
|
|
398
|
+
return (async (input, init) => {
|
|
399
|
+
const env = process.env;
|
|
400
|
+
const resolved = await chunkHFPGOTVF_cjs.resolveCredential({
|
|
401
|
+
provider: "openai",
|
|
402
|
+
store: DEFAULT_STORE,
|
|
403
|
+
oauth: OPENAI_OAUTH_CONFIG,
|
|
404
|
+
env
|
|
405
|
+
});
|
|
406
|
+
if (resolved === void 0) {
|
|
407
|
+
throw new Error(
|
|
408
|
+
'openai-chatgpt: no ChatGPT credential found \u2014 run the OpenAI device login (e.g. "/login openai") first.'
|
|
409
|
+
);
|
|
410
|
+
}
|
|
411
|
+
const accountId = chunkHFPGOTVF_cjs.readStoredOAuth(DEFAULT_STORE, env)?.account_id;
|
|
412
|
+
const headers = new Headers(init?.headers);
|
|
413
|
+
headers.set("authorization", `Bearer ${resolved.apiKey}`);
|
|
414
|
+
if (accountId !== void 0) headers.set("ChatGPT-Account-Id", accountId);
|
|
415
|
+
return fetch(input, { ...init, headers });
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
var OPENAI_CHATGPT = {
|
|
419
|
+
name: "openai-chatgpt",
|
|
420
|
+
apiMode: "responses_api",
|
|
421
|
+
authType: "oauth_device_code",
|
|
422
|
+
baseUrl: "https://chatgpt.com/backend-api/codex",
|
|
423
|
+
envVars: [],
|
|
424
|
+
fallbackModels: [
|
|
425
|
+
"openai-chatgpt/gpt-5.4",
|
|
426
|
+
"openai-chatgpt/gpt-5.4-mini",
|
|
427
|
+
"openai-chatgpt/gpt-5.5"
|
|
428
|
+
],
|
|
429
|
+
extraHeaders: { originator: "codex_cli_rs" },
|
|
430
|
+
transform: {
|
|
431
|
+
// Only `fetch` (async) can await the credential refresh; `headers` is sync and cannot.
|
|
432
|
+
fetch: () => codexFetch()
|
|
433
|
+
}
|
|
434
|
+
};
|
|
435
|
+
|
|
436
|
+
// src/internal/providers/builtin/openrouter.ts
|
|
437
|
+
var OPENROUTER = {
|
|
438
|
+
name: "openrouter",
|
|
439
|
+
apiMode: "chat_completions",
|
|
440
|
+
aliases: ["or"],
|
|
441
|
+
// Ordered fallback (EC-10): OPENROUTER_API_KEY preferred, OPENAI_API_KEY as compat.
|
|
442
|
+
envVars: ["OPENROUTER_API_KEY", "OPENAI_API_KEY"],
|
|
443
|
+
authType: "api_key",
|
|
444
|
+
baseUrl: "https://openrouter.ai/api",
|
|
445
|
+
modelsUrl: "https://openrouter.ai/api/v1/models",
|
|
446
|
+
hostname: "openrouter.ai",
|
|
447
|
+
// M45 — models refreshed (claude-3-haiku retired upstream).
|
|
448
|
+
fallbackModels: ["openai/gpt-4o-mini", "anthropic/claude-haiku-4-5"],
|
|
449
|
+
// M45 — OpenRouter app-attribution headers (mechanism from OpenCode's openrouter plugin, MIT; VALUES are
|
|
450
|
+
// theokit's own — copying another app's referer would misattribute traffic).
|
|
451
|
+
extraHeaders: { "HTTP-Referer": "https://usetheo.dev", "X-Title": "theokit" }
|
|
452
|
+
};
|
|
453
|
+
|
|
454
|
+
// src/internal/providers/builtin/perplexity.ts
|
|
455
|
+
var PERPLEXITY = openAiCompatibleProfile({
|
|
456
|
+
name: "perplexity",
|
|
457
|
+
baseUrl: "https://api.perplexity.ai",
|
|
458
|
+
chatCompletionsPath: "/chat/completions",
|
|
459
|
+
envVars: ["PERPLEXITY_API_KEY"],
|
|
460
|
+
fallbackModels: ["sonar-pro", "sonar"],
|
|
461
|
+
hostname: "api.perplexity.ai"
|
|
462
|
+
});
|
|
463
|
+
|
|
464
|
+
// src/internal/providers/builtin/together.ts
|
|
465
|
+
var TOGETHER = openAiCompatibleProfile({
|
|
466
|
+
name: "together",
|
|
467
|
+
aliases: ["togetherai"],
|
|
468
|
+
baseUrl: "https://api.together.xyz/v1",
|
|
469
|
+
envVars: ["TOGETHER_API_KEY"],
|
|
470
|
+
fallbackModels: ["Qwen/Qwen2.5-7B-Instruct-Turbo"],
|
|
471
|
+
hostname: "api.together.xyz"
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
// src/internal/providers/builtin/vertex.ts
|
|
475
|
+
var VERTEX = {
|
|
476
|
+
name: "vertex",
|
|
477
|
+
apiMode: "anthropic_messages",
|
|
478
|
+
// sub-dispatched in selectTransport by profile.name
|
|
479
|
+
envVars: ["GOOGLE_APPLICATION_CREDENTIALS"],
|
|
480
|
+
authType: "gcp_oauth",
|
|
481
|
+
baseUrl: "https://us-central1-aiplatform.googleapis.com",
|
|
482
|
+
modelsUrl: void 0,
|
|
483
|
+
hostname: "aiplatform.googleapis.com",
|
|
484
|
+
fallbackModels: [
|
|
485
|
+
"vertex/anthropic/claude-sonnet-4-5@20250929",
|
|
486
|
+
"vertex/google/gemini-2.0-flash-001"
|
|
487
|
+
]
|
|
488
|
+
};
|
|
489
|
+
function resolveVertexBaseUrl(opts) {
|
|
490
|
+
const host = opts.location === "global" ? "aiplatform.googleapis.com" : `${opts.location}-aiplatform.googleapis.com`;
|
|
491
|
+
if (opts.modelDialect === "gemini") {
|
|
492
|
+
return `https://${host}/v1/projects/${opts.projectId}/locations/${opts.location}/endpoints/openapi`;
|
|
493
|
+
}
|
|
494
|
+
return `https://${host}/v1/projects/${opts.projectId}/locations/${opts.location}/publishers/anthropic`;
|
|
495
|
+
}
|
|
496
|
+
function inferModelDialect(modelId) {
|
|
497
|
+
if (modelId.includes("/anthropic/")) return "anthropic";
|
|
498
|
+
if (modelId.includes("/google/")) return "gemini";
|
|
499
|
+
return "gemini";
|
|
500
|
+
}
|
|
501
|
+
function stripVertexPrefix(modelId) {
|
|
502
|
+
return modelId.replace(/^vertex\/(anthropic|google)\//, "");
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
// src/internal/providers/builtin/xai.ts
|
|
506
|
+
var XAI = openAiCompatibleProfile({
|
|
507
|
+
name: "xai",
|
|
508
|
+
aliases: ["grok"],
|
|
509
|
+
baseUrl: "https://api.x.ai/v1",
|
|
510
|
+
envVars: ["XAI_API_KEY"],
|
|
511
|
+
fallbackModels: ["grok-4.5", "grok-4.3"],
|
|
512
|
+
hostname: "api.x.ai"
|
|
513
|
+
});
|
|
514
|
+
|
|
515
|
+
// src/internal/providers/builtin/index.ts
|
|
516
|
+
var _registeredState = (() => {
|
|
517
|
+
const g = globalThis;
|
|
518
|
+
const sym = /* @__PURE__ */ Symbol.for("theokit-sdk.providers.builtins-registered");
|
|
519
|
+
if (g[sym] === void 0) g[sym] = { done: false };
|
|
520
|
+
return g[sym];
|
|
521
|
+
})();
|
|
522
|
+
function registerBuiltins() {
|
|
523
|
+
if (_registeredState.done) return;
|
|
524
|
+
_registeredState.done = true;
|
|
525
|
+
registerProvider(ANTHROPIC);
|
|
526
|
+
registerProvider(OPENAI);
|
|
527
|
+
registerProvider(OPENAI_CHATGPT);
|
|
528
|
+
registerProvider(OPENROUTER);
|
|
529
|
+
registerProvider(GEMINI);
|
|
530
|
+
registerProvider(OLLAMA);
|
|
531
|
+
registerProvider(LMSTUDIO);
|
|
532
|
+
registerProvider(LLAMACPP);
|
|
533
|
+
registerProvider(BEDROCK);
|
|
534
|
+
registerProvider(VERTEX);
|
|
535
|
+
registerProvider(GOOGLE);
|
|
536
|
+
registerProvider(MISTRAL);
|
|
537
|
+
registerProvider(GROQ);
|
|
538
|
+
registerProvider(COHERE);
|
|
539
|
+
registerProvider(DEEPINFRA);
|
|
540
|
+
registerProvider(TOGETHER);
|
|
541
|
+
registerProvider(XAI);
|
|
542
|
+
registerProvider(PERPLEXITY);
|
|
543
|
+
registerProvider(CEREBRAS);
|
|
544
|
+
registerCatalogProviders();
|
|
545
|
+
}
|
|
546
|
+
|
|
547
|
+
exports.catalogModelSchema = catalogModelSchema;
|
|
548
|
+
exports.getCatalogCapabilities = getCatalogCapabilities;
|
|
549
|
+
exports.getCatalogModelInfo = getCatalogModelInfo;
|
|
550
|
+
exports.getProviderProfile = getProviderProfile;
|
|
551
|
+
exports.globalSingleton = globalSingleton;
|
|
552
|
+
exports.inferModelDialect = inferModelDialect;
|
|
553
|
+
exports.inferRegionFromModelId = inferRegionFromModelId;
|
|
554
|
+
exports.isPatchedModelKey = isPatchedModelKey;
|
|
555
|
+
exports.listProviders = listProviders;
|
|
556
|
+
exports.loadProviderCatalog = loadProviderCatalog;
|
|
557
|
+
exports.patchModelInfo = patchModelInfo;
|
|
558
|
+
exports.registerBuiltins = registerBuiltins;
|
|
559
|
+
exports.registerProvider = registerProvider;
|
|
560
|
+
exports.resolveBedrockBaseUrl = resolveBedrockBaseUrl;
|
|
561
|
+
exports.resolveVertexBaseUrl = resolveVertexBaseUrl;
|
|
562
|
+
exports.stripBedrockPrefix = stripBedrockPrefix;
|
|
563
|
+
exports.stripVertexPrefix = stripVertexPrefix;
|
|
564
|
+
//# sourceMappingURL=chunk-D42XHI4O.cjs.map
|
|
565
|
+
//# sourceMappingURL=chunk-D42XHI4O.cjs.map
|