promptfoo 0.121.2 → 0.121.3
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/README.md +2 -0
- package/dist/src/{accounts-CiBLOnA7.js → accounts-B2XmGjty.js} +5 -5
- package/dist/src/{accounts-gtkH-5KX.cjs → accounts-BPyfpSeU.cjs} +5 -5
- package/dist/src/{accounts-Bm2D8Db9.js → accounts-CFLK3mnD.js} +6 -6
- package/dist/src/{accounts-B0pgC1oV.js → accounts-Xatc0RYb.js} +5 -5
- package/dist/src/{agentic-utils-DS1g3GLF.js → agentic-utils-36epdqwB.js} +3 -3
- package/dist/src/{cometapi-CUQq3H_a.js → agentic-utils-D8yXo5Lm.js} +4 -61
- package/dist/src/{cometapi-C4xSqeID.cjs → agentic-utils-DAVsChuB.cjs} +24 -62
- package/dist/src/agentic-utils-DIYAAYE7.js +153 -0
- package/dist/src/{agents-CBr9A01V.js → agents-BBVJCIYr.js} +226 -13
- package/dist/src/{agents-Di9DKPzn.cjs → agents-BBWxKSM0.cjs} +7 -7
- package/dist/src/{agents-DgF2zDag.js → agents-Bqgfdokm.js} +228 -13
- package/dist/src/{agents-DbRtpYxR.cjs → agents-CAYbM7qD.cjs} +226 -13
- package/dist/src/{agents-9qiOy0ho.js → agents-CLQ-P15P.js} +7 -7
- package/dist/src/{agents-cLXA8a_8.js → agents-CgBniSlI.js} +8 -8
- package/dist/src/{agents-D__IdAlg.js → agents-DSSTV4bv.js} +226 -15
- package/dist/src/{agents-CmvBq8LV.js → agents-wg3ohknq.js} +7 -7
- package/dist/src/{aimlapi-BvlNH0gr.cjs → aimlapi-Bv8Fmc-b.cjs} +14 -14
- package/dist/src/{aimlapi-DHJU_kcV.js → aimlapi-BwGC1TtS.js} +13 -13
- package/dist/src/{aimlapi-CnkC2HqE.js → aimlapi-DaC3qZ-o.js} +14 -14
- package/dist/src/{aimlapi-B4rcnZgv.js → aimlapi-MgSLdvy7.js} +13 -13
- package/dist/src/app/assets/index-B6l9CVVb.js +439 -0
- package/dist/src/app/assets/index-DyZ0Ep37.css +1 -0
- package/dist/src/app/assets/sync-CStkzc6u.js +4 -0
- package/dist/src/app/assets/vendor-markdown-Bz7N-ca6.js +29 -0
- package/dist/src/app/index.html +3 -3
- package/dist/src/{audio-Bkv46et0.js → audio-Bn44pQxv.js} +4 -4
- package/dist/src/{audio-ClI_AFre.js → audio-DDA5WHdx.js} +4 -4
- package/dist/src/{audio-CGMyULza.cjs → audio-DVFjQ67_.cjs} +4 -4
- package/dist/src/{audio-Dz3z7s3J.js → audio-DjU9GswO.js} +5 -5
- package/dist/src/{base-CGrhspbK.cjs → base-BboXIF_0.cjs} +3 -3
- package/dist/src/{base-Dy1V8--Z.js → base-CKjwebIH.js} +3 -3
- package/dist/src/{base-DLKtKMFh.js → base-CqzQ4K8j.js} +3 -3
- package/dist/src/{base-CpjcHe4e.js → base-Cz2ZC_iA.js} +3 -3
- package/dist/src/{blobs-CMHN0Qcz.js → blobs-B1JriOyi.js} +3 -3
- package/dist/src/{blobs-BDbfYdrJ.js → blobs-BUWmKWzo.js} +3 -3
- package/dist/src/{blobs-D23XLin-.cjs → blobs-C6j0bvFz.cjs} +3 -3
- package/dist/src/{blobs-CBO20krR.js → blobs-DXTl6J3H.js} +3 -3
- package/dist/src/{cache-Dh5WtQps.cjs → cache-C5yFZ4gC.cjs} +3 -3
- package/dist/src/{cache-C4Nxf52C.js → cache-CaT5tPgo.js} +3 -3
- package/dist/src/cache-CyCanoMu.js +6 -0
- package/dist/src/{cache-BVeDlD87.js → cache-DSqR6ezl.js} +3 -3
- package/dist/src/cache-Df_QFDNu.cjs +5 -0
- package/dist/src/{cache-i1P6crbO.js → cache-HP0NP4k3.js} +3 -3
- package/dist/src/{chat-CzkrVDfz.js → chat-B-52XYI1.js} +12 -12
- package/dist/src/{chat-DJIw17u0.js → chat-B0iaWhoh.js} +14 -14
- package/dist/src/{chat-qmatte1u.js → chat-BE0qTA8e.js} +13 -13
- package/dist/src/{chat-BiKyneZl.js → chat-BEwdgGEg.js} +14 -14
- package/dist/src/{chat-C1Qst7jL.cjs → chat-BtIKkLKx.cjs} +13 -13
- package/dist/src/{chat-CgF-J-Jj.cjs → chat-CM8qWR3_.cjs} +15 -15
- package/dist/src/{chat-C2jrdPMx.js → chat-DK1U-eZ-.js} +12 -12
- package/dist/src/{chat-DqxYYtWA.js → chat-pxmiVpWe.js} +14 -14
- package/dist/src/{chatkit-65VXf5SR.js → chatkit-BYGQlHlV.js} +4 -4
- package/dist/src/{chatkit-DKyPi1Gs.cjs → chatkit-Cx174XI3.cjs} +4 -4
- package/dist/src/{chatkit-BxFvW8KY.js → chatkit-_8eJqKcD.js} +4 -4
- package/dist/src/{chatkit-Be-Q-a9F.js → chatkit-a2D6mY6s.js} +4 -4
- package/dist/src/{claude-agent-sdk-D9Z5Pr9X.cjs → claude-agent-sdk-8ddRp1L2.cjs} +35 -17
- package/dist/src/{claude-agent-sdk-DfCoW0E6.js → claude-agent-sdk-Bq5EArsX.js} +33 -15
- package/dist/src/{claude-agent-sdk-Apiy0iaz.js → claude-agent-sdk-CMjh4LFH.js} +33 -15
- package/dist/src/{claude-agent-sdk-D2bJee9S.js → claude-agent-sdk-HgbFioFw.js} +33 -15
- package/dist/src/cloud-DE3t1-ZI.js +4 -0
- package/dist/src/{cloud-C0dlstV_.js → cloud-z8KZpUoa.js} +3 -3
- package/dist/src/{cloudflare-ai-g7PB6VHR.js → cloudflare-ai-BGyXlpXJ.js} +13 -13
- package/dist/src/{cloudflare-ai-8TDxHR0x.js → cloudflare-ai-Bbp26N0L.js} +13 -13
- package/dist/src/{cloudflare-ai-CknbZ5LJ.cjs → cloudflare-ai-C62x6MQG.cjs} +14 -14
- package/dist/src/{cloudflare-ai-BxAGvfju.js → cloudflare-ai-DdKP9TKT.js} +14 -14
- package/dist/src/{cloudflare-gateway-CP9QEWYS.js → cloudflare-gateway-BwAaUgeW.js} +14 -14
- package/dist/src/{cloudflare-gateway-B9HWA5wf.js → cloudflare-gateway-D-e9i1Sn.js} +15 -15
- package/dist/src/{cloudflare-gateway-CKDb4dJ8.js → cloudflare-gateway-DXhtXDRb.js} +15 -163
- package/dist/src/{cloudflare-gateway-BSnDmHYo.cjs → cloudflare-gateway-Dx36ftqF.cjs} +15 -15
- package/dist/src/{codex-sdk-DUwKWezN.js → codex-sdk-BQEw16R_.js} +180 -11
- package/dist/src/{codex-sdk-C6UMlxwV.js → codex-sdk-C_07GuVS.js} +180 -11
- package/dist/src/{codex-sdk-GGAw0qbD.js → codex-sdk-DE5G18dx.js} +180 -11
- package/dist/src/{codex-sdk-fAO0c3yA.cjs → codex-sdk-ZLKfDjqP.cjs} +181 -12
- package/dist/src/cometapi-BDyV-NNm.js +62 -0
- package/dist/src/cometapi-C3hOlM7-.cjs +62 -0
- package/dist/src/{cometapi-BL9yvj_f.js → cometapi-hhL4TAh3.js} +14 -14
- package/dist/src/{cometapi-DFNiKmSz.js → cometapi-sp7sJpBD.js} +15 -15
- package/dist/src/{completion-5MzrpJxT.js → completion-BCimtq-h.js} +6 -6
- package/dist/src/{completion-qRoZAYRB.js → completion-DCjv7RZ3.js} +6 -6
- package/dist/src/{completion-CM6oK8PS.cjs → completion-DlXUhj5c.cjs} +6 -6
- package/dist/src/{completion-DZ083F31.js → completion-DoYy49ti.js} +6 -6
- package/dist/src/{createHash-CfZSc0b4.cjs → createHash-BYwImsYv.cjs} +2 -2
- package/dist/src/{docker-DcF2pRrj.cjs → docker-Cqj2-QVi.cjs} +14 -14
- package/dist/src/{docker-Bb5dcxr8.js → docker-CxCkwMzc.js} +13 -13
- package/dist/src/{docker-BvfL2BrW.js → docker-DpguQj-w.js} +14 -14
- package/dist/src/{docker-ExVyLp0S.js → docker-FeBni2dw.js} +13 -13
- package/dist/src/{esm-C03C-mv3.js → esm-7UIl0pPM.js} +2 -2
- package/dist/src/{esm-Cd1AjG1D.js → esm-CKWP3u_P.js} +3 -3
- package/dist/src/{esm-CnNt7sI4.cjs → esm-CipptfDu.cjs} +2 -2
- package/dist/src/{esm-CaIwzWR5.js → esm-SUNIX1x3.js} +3 -3
- package/dist/src/eval-7aEqoMs3.js +15 -0
- package/dist/src/{eval-Dg2nG4v2.js → eval-BTqTn7lb.js} +10 -10
- package/dist/src/{evalResult-BDMqrapS.js → evalResult-BkIhRdTe.js} +7 -7
- package/dist/src/evalResult-CYNHkk5A.js +12 -0
- package/dist/src/evalResult-CuvJeNiM.js +10 -0
- package/dist/src/{evalResult-BBRNtX4I.js → evalResult-DUDShQrm.js} +7 -7
- package/dist/src/{evalResult-fuaI8HkH.cjs → evalResult-DpARzUCb.cjs} +7 -7
- package/dist/src/evalResult-tGdilrWt.cjs +10 -0
- package/dist/src/evaluator-BBUqRhz1.js +36 -0
- package/dist/src/{evaluator-BhoWwp5b.js → evaluator-BcvOGaam.js} +823 -73
- package/dist/src/{extractor-D25qpmGX.js → extractor-C8XwivI9.js} +6 -6
- package/dist/src/{extractor-DReVID0K.js → extractor-CAZ2G3Kh.js} +6 -6
- package/dist/src/{extractor-pYLLi3wS.cjs → extractor-DG3sSfXE.cjs} +6 -6
- package/dist/src/{extractor-C0EVHewb.js → extractor-D_wd8jxt.js} +6 -6
- package/dist/src/{fetch-HaqdX7U1.js → fetch-BiYv2BZc.js} +3 -3
- package/dist/src/{fetch-BPkYtG8K.cjs → fetch-BnR9wSnm.cjs} +3 -3
- package/dist/src/{fetch-Cwxnd8zz.js → fetch-CVAtKnI3.js} +3 -3
- package/dist/src/{fetch-Dxpd4_sr.js → fetch-DoVRJZhJ.js} +4 -4
- package/dist/src/fetch-UWU706qb.js +5 -0
- package/dist/src/{genaiTracer-DN4dQywX.cjs → genaiTracer-BfxrvSUb.cjs} +2 -2
- package/dist/src/{graders-DU49_J8Y.cjs → graders-BElhu9ZY.cjs} +126 -55
- package/dist/src/{graders-DP7KFFo-.js → graders-BXAJ0sbS.js} +120 -55
- package/dist/src/graders-BxfEguVY.js +32 -0
- package/dist/src/graders-CzVMbEnv.js +34 -0
- package/dist/src/{graders-BTeBGqjJ.js → graders-DG7mhg-b.js} +120 -55
- package/dist/src/graders-DjCXfj0l.cjs +32 -0
- package/dist/src/{graders-Bj_Odv7c.js → graders-RjHF8VfG.js} +120 -55
- package/dist/src/graders-kHzIWOKu.js +32 -0
- package/dist/src/{image-BLmROtN3.cjs → image--F58eEIn.cjs} +6 -6
- package/dist/src/{image-B0h9VEMc.js → image-6WQXK8m8.js} +4 -4
- package/dist/src/{image-Dpxa1Jt6.js → image-B8b6f36E.js} +6 -6
- package/dist/src/{image-CHfWvljl.js → image-CoxZp9PZ.js} +6 -6
- package/dist/src/{image-B02ogr_b.js → image-DO0RYnjH.js} +5 -5
- package/dist/src/{image-DS-o-0ph.js → image-PoF6DN3x.js} +6 -6
- package/dist/src/{image-C1madmKh.cjs → image-fza3zuKs.cjs} +4 -4
- package/dist/src/{image-Bb4vWQLM.js → image-xNbw5ph2.js} +4 -4
- package/dist/src/index.cjs +853 -104
- package/dist/src/index.d.cts +573 -60
- package/dist/src/index.d.ts +573 -60
- package/dist/src/index.js +850 -102
- package/dist/src/{interactiveCheck-BgLZUIt3.js → interactiveCheck-BnMYOjMu.js} +2 -2
- package/dist/src/{knowledgeBase-B3OoKIej.js → knowledgeBase-Bi7CmDbx.js} +7 -7
- package/dist/src/{knowledgeBase-CYTLHOt1.js → knowledgeBase-Ce3ofVan.js} +8 -8
- package/dist/src/{knowledgeBase-D33Ty2l6.js → knowledgeBase-DFRXPZl_.js} +7 -7
- package/dist/src/{knowledgeBase-DOO_BM9b.cjs → knowledgeBase-DqrLX8fy.cjs} +7 -7
- package/dist/src/{litellm-AaeZcZQF.js → litellm-Bo2gQXpo.js} +14 -14
- package/dist/src/{litellm-NbjknEh6.js → litellm-CKiAxnoM.js} +13 -13
- package/dist/src/{litellm-I_hbp_dc.cjs → litellm-CnHI69aj.cjs} +14 -14
- package/dist/src/{litellm-TrljxD9G.js → litellm-Tc294Jhj.js} +13 -13
- package/dist/src/{logger-KkObSCzq.js → logger-BcJBzSSA.js} +10 -14
- package/dist/src/{logger-DLcq4dWf.js → logger-BnkjG2jt.js} +10 -14
- package/dist/src/{logger-Cp1GPUjj.cjs → logger-D5iKBpu_.cjs} +27 -13
- package/dist/src/{logger-CT3IKMKA.js → logger-DO8_zM18.js} +10 -14
- package/dist/src/{luma-ray-BS2_tY8L.js → luma-ray-0ehMPt5N.js} +10 -10
- package/dist/src/{luma-ray-DDsjcgZZ.js → luma-ray-C9q8rdQe.js} +9 -9
- package/dist/src/{luma-ray-f6I2fft-.js → luma-ray-DP0QA9qn.js} +9 -9
- package/dist/src/{luma-ray-Due0n7di.cjs → luma-ray-m9Ku2meV.cjs} +9 -9
- package/dist/src/main.js +69 -71
- package/dist/src/{messages-D0lx5qK7.js → messages-DJNo37Ko.js} +14 -9
- package/dist/src/{messages-BS17jdMx.js → messages-Dy9QecMs.js} +14 -9
- package/dist/src/{messages-Bs1kC7P4.cjs → messages-HJsyEh4o.cjs} +15 -10
- package/dist/src/{messages-ZJk778GH.js → messages-biC_ex-p.js} +14 -9
- package/dist/src/{modelslab-DRb74SP4.js → modelslab-B5J-ZM5c.js} +9 -9
- package/dist/src/{modelslab-Bx9IrZfS.js → modelslab-BI458moT.js} +10 -10
- package/dist/src/{modelslab-Bmni6skY.js → modelslab-BTOT8FUO.js} +9 -9
- package/dist/src/{modelslab-CoUX6Jc_.cjs → modelslab-IQbNg-r7.cjs} +9 -9
- package/dist/src/{nova-reel-bgjxilYW.js → nova-reel-BZ9y-Y5s.js} +9 -9
- package/dist/src/{nova-reel-C_QM18Xn.cjs → nova-reel-CE5etkv9.cjs} +9 -9
- package/dist/src/{nova-reel-D_W1tjMH.js → nova-reel-DEeQlnOJ.js} +10 -10
- package/dist/src/{nova-reel-BfPq-0Yk.js → nova-reel-Xw1SXLpg.js} +9 -9
- package/dist/src/{nova-sonic-De1HW5fD.js → nova-sonic-DWswpN1E.js} +7 -7
- package/dist/src/{nova-sonic-CFb5GYhg.js → nova-sonic-DXTLpi-r.js} +6 -6
- package/dist/src/{nova-sonic-zfcljeRp.cjs → nova-sonic-N0yCm0vb.cjs} +6 -6
- package/dist/src/{nova-sonic-DIGQNR07.js → nova-sonic-Ogqf-csn.js} +6 -6
- package/dist/src/{openai-DhbB7eWK.js → openai-BMcwgD5C.js} +2 -2
- package/dist/src/{openai-j-sE2O7r.js → openai-BcB5KlTk.js} +2 -2
- package/dist/src/{openai-Cuif0GEt.cjs → openai-CoxGAQwn.cjs} +2 -2
- package/dist/src/{openai-DElQ-fPX.js → openai-D6wITiVn.js} +2 -2
- package/dist/src/{openclaw-tiVYRtr-.js → openclaw-0Sv7AK3O.js} +13 -13
- package/dist/src/{openclaw-CSugPYAr.cjs → openclaw-CXxbKgDH.cjs} +14 -14
- package/dist/src/{openclaw-DuvJKEW5.js → openclaw-D1FSCps-.js} +13 -13
- package/dist/src/{openclaw-DiSz3I5L.js → openclaw-D2ENvu7a.js} +14 -14
- package/dist/src/{opencode-sdk-0j6rTWNb.js → opencode-sdk-C71Z0ehR.js} +13 -13
- package/dist/src/{opencode-sdk-B3CWY9h_.js → opencode-sdk-CHCs7dEb.js} +12 -12
- package/dist/src/{opencode-sdk-C2y6UkP2.js → opencode-sdk-DDxj4QqH.js} +12 -12
- package/dist/src/{opencode-sdk-BL764Jdi.cjs → opencode-sdk-WWJhnbKr.cjs} +16 -16
- package/dist/src/{otlpReceiver-C99PPb48.js → otlpReceiver-C9KlUtxh.js} +6 -6
- package/dist/src/{otlpReceiver-CdNBdbsk.js → otlpReceiver-CZL48YfC.js} +6 -6
- package/dist/src/{otlpReceiver-D89fR-rC.js → otlpReceiver-CavGAA6k.js} +6 -6
- package/dist/src/{otlpReceiver-CGq6LspY.cjs → otlpReceiver-DHKqJlsz.cjs} +6 -6
- package/dist/src/{providerRegistry-B0RUOLI_.js → providerRegistry-B9lh-_tx.js} +2 -2
- package/dist/src/{providerRegistry-Civky8Ar.cjs → providerRegistry-BTDgfV5h.cjs} +2 -2
- package/dist/src/{providerRegistry-CD8MEar9.js → providerRegistry-BkzVH5Ba.js} +2 -2
- package/dist/src/{providerRegistry-DM8rZYol.js → providerRegistry-CUWki5mQ.js} +2 -2
- package/dist/src/providers-BSLEaIQG.js +32 -0
- package/dist/src/{providers-CgKOSgTR.cjs → providers-CScd1wN6.cjs} +733 -464
- package/dist/src/{providers-BlqUifFg.js → providers-Ch6Mr0gn.js} +795 -526
- package/dist/src/{providers-Dk_6ocUX.js → providers-Cn73d5sr.js} +795 -526
- package/dist/src/providers-D-FnDg8k.cjs +31 -0
- package/dist/src/providers-DEYiFVAo.js +30 -0
- package/dist/src/{providers-D8lF1sqW.js → providers-DvddrgxL.js} +795 -526
- package/dist/src/providers-sS2WI8YD.js +30 -0
- package/dist/src/{pythonUtils-D6fwaDSg.js → pythonUtils-Bzwbgpbg.js} +3 -3
- package/dist/src/{pythonUtils-D5nxkQ0P.js → pythonUtils-Cpo0Ez1p.js} +3 -3
- package/dist/src/{pythonUtils-CTU3Y3lw.cjs → pythonUtils-dAVigVK-.cjs} +3 -3
- package/dist/src/{pythonUtils-C3py6GC1.js → pythonUtils-wIqk7zAf.js} +3 -3
- package/dist/src/{quiverai-CIaELU_m.js → quiverai-BeofbLVc.js} +4 -4
- package/dist/src/{quiverai-uH-dcTIr.js → quiverai-CCQn73lq.js} +5 -5
- package/dist/src/{quiverai-PdShCPox.cjs → quiverai-CcUhPIBg.cjs} +4 -4
- package/dist/src/{quiverai-BbOUOn2L.js → quiverai-DVSEqJiq.js} +4 -4
- package/dist/src/{render-Drod8m7K.js → render-BHl6QVq9.js} +3 -3
- package/dist/src/{responses-WNGNYe3K.js → responses-BKP_WYis.js} +14 -10
- package/dist/src/{responses-DIR9Ud3j.js → responses-CQb1Tj69.js} +14 -10
- package/dist/src/{responses-CB2jwoAr.js → responses-CgNyTPsY.js} +14 -10
- package/dist/src/{responses-D8SBTL64.cjs → responses-mo0KQDbu.cjs} +14 -10
- package/dist/src/rubyUtils-B1HXG4ej.cjs +4 -0
- package/dist/src/{rubyUtils-DhCAlxZr.cjs → rubyUtils-CGeUtCfW.cjs} +3 -3
- package/dist/src/{rubyUtils-Boc4HZzX.js → rubyUtils-CiVfln3g.js} +3 -3
- package/dist/src/{rubyUtils-BcuGX77l.js → rubyUtils-DECSbsfY.js} +3 -3
- package/dist/src/{rubyUtils-BUVePouc.js → rubyUtils-PgU-gHmx.js} +3 -3
- package/dist/src/rubyUtils-Rt6pKA96.js +5 -0
- package/dist/src/{sagemaker-CNBxx5CJ.js → sagemaker-CVv8W7so.js} +17 -17
- package/dist/src/{sagemaker-CemTFp2h.js → sagemaker-CqeASYE5.js} +17 -17
- package/dist/src/{sagemaker-YSyBXQQh.js → sagemaker-MUbD5V3v.js} +18 -18
- package/dist/src/{sagemaker-Cl28mZU2.cjs → sagemaker-jiw1wQa-.cjs} +17 -17
- package/dist/src/{scanner-BsBlNXNn.js → scanner-DVDeUz1r.js} +10 -10
- package/dist/src/server/index.js +854 -106
- package/dist/src/server-B0Xh1Gx-.js +7 -0
- package/dist/src/{server-C_7Ax-hA.cjs → server-BtoCXeXI.cjs} +4 -4
- package/dist/src/{server-VWgWb00X.js → server-CP9qKM40.js} +4 -4
- package/dist/src/{server-CuxBbeSY.js → server-Cns05F1j.js} +5 -5
- package/dist/src/server-DJTKu9IR.cjs +5 -0
- package/dist/src/{server-CqzrVGpF.js → server-DZ9MtCn0.js} +6 -6
- package/dist/src/{signal-4U3mfRvL.js → signal-C3ZTsUgi.js} +3 -3
- package/dist/src/{slack-DOdy_kyv.js → slack-2sdpGzbt.js} +2 -2
- package/dist/src/{slack-BmVAVGaK.cjs → slack-94iG3T0s.cjs} +2 -2
- package/dist/src/{slack-DCUPTzS2.js → slack-BR0HtO3K.js} +2 -2
- package/dist/src/{slack-DXMKtA-f.js → slack-DCEV-vWP.js} +2 -2
- package/dist/src/store-C5u6MgC8.js +6 -0
- package/dist/src/{store-DLlFCC4h.cjs → store-CLyU7AtI.cjs} +17 -5
- package/dist/src/store-CNHk-De4.cjs +5 -0
- package/dist/src/{store-DXilxTl-.js → store-Cj258DgL.js} +17 -5
- package/dist/src/{store-Dim__MDd.js → store-P8OKm19S.js} +17 -5
- package/dist/src/{store-CXGFv4aR.js → store-VB0GP46K.js} +17 -5
- package/dist/src/{tables-DLJPUdUE.js → tables-BEIFz2tM.js} +3 -3
- package/dist/src/{tables-DPi7wKeM.cjs → tables-BdZQEpRz.cjs} +3 -3
- package/dist/src/{tables-gftXzE9I.js → tables-DmzvLbeZ.js} +3 -3
- package/dist/src/{tables-6YKwjN9-.js → tables-kC7R5kiK.js} +3 -3
- package/dist/src/{telemetry-CMrFgtPB.js → telemetry-BnH5VJAU.js} +4 -4
- package/dist/src/{telemetry-Dthj_BbD.js → telemetry-BugWqKiu.js} +4 -4
- package/dist/src/{telemetry-Cps3mIU-.js → telemetry-DPXLd7UE.js} +4 -4
- package/dist/src/telemetry-Yig0Tino.js +7 -0
- package/dist/src/telemetry-p8Pwqm1i.cjs +5 -0
- package/dist/src/{telemetry-DaX14Chu.cjs → telemetry-re627Lre.cjs} +4 -4
- package/dist/src/{transcription-NLVG9MT1.cjs → transcription-BvtsrzRG.cjs} +13 -13
- package/dist/src/{transcription-BNYURcXg.js → transcription-CaMivnjG.js} +13 -13
- package/dist/src/{transcription-s6A-bNrZ.js → transcription-DOMMTu01.js} +14 -14
- package/dist/src/{transcription-B_OdaHp7.js → transcription-Hb3VnC4M.js} +13 -13
- package/dist/src/{transform-DuHvhZpj.cjs → transform-0BwoBsvO.cjs} +19 -5
- package/dist/src/{transform-uAytVuyX.js → transform-B2-jIv68.js} +8 -6
- package/dist/src/{transform-DECvGmzp.js → transform-BqPkNPYm.js} +4 -4
- package/dist/src/{transform-aa6tmVpZ.js → transform-BzK09Q_9.js} +4 -4
- package/dist/src/transform-ChNIpHz7.js +6 -0
- package/dist/src/{transform-D5HsjduX.js → transform-DrleutM3.js} +8 -6
- package/dist/src/{transform-vNucnNr0.js → transform-DyDAwEpE.js} +8 -6
- package/dist/src/transform-PtQ6rAE3.cjs +5 -0
- package/dist/src/{transform-CzK1Q0zl.cjs → transform-ZrG2dvlo.cjs} +4 -4
- package/dist/src/{transform-DilY9wbS.js → transform-ljLYHEPh.js} +4 -4
- package/dist/src/{transformersAvailability-CEVM2GNQ.js → transformersAvailability-BGkzavwb.js} +1 -1
- package/dist/src/{transformersAvailability-CwayUSlh.cjs → transformersAvailability-DKoRtQLy.cjs} +1 -1
- package/dist/src/{types-Cbd8uOMq.js → types-CIhFeUC4.js} +7 -1
- package/dist/src/{types-CzW2QFyi.js → types-Cd3ygw8W.js} +7 -1
- package/dist/src/{types-C_7nyzr1.cjs → types-D8cGDZbL.cjs} +8 -2
- package/dist/src/{types-DmyIJ-sR.js → types-q8GXGF65.js} +7 -1
- package/dist/src/{util-DGNOS1db.cjs → util--9u9UVCt.cjs} +3 -3
- package/dist/src/{util-ZzmqNPlg.js → util-BLvy9qfE.js} +7 -7
- package/dist/src/{util-C1CeHl-P.js → util-Bm3E9jpK.js} +7 -7
- package/dist/src/{util-BV4XUC0n.js → util-BtoGs5Cb.js} +18 -4
- package/dist/src/{util-BzMcevZc.cjs → util-CFj4YKIn.cjs} +18 -4
- package/dist/src/{util-BRYkYPTd.js → util-CMMkIxfU.js} +7 -7
- package/dist/src/{util-Dnmk2mBQ.js → util-CgDCK4KI.js} +18 -4
- package/dist/src/{util-B9vlHIIh.cjs → util-CuLo2pMR.cjs} +7 -7
- package/dist/src/{util-CMy69ZgQ.js → util-DM2rTn_6.js} +18 -4
- package/dist/src/{util-B3xGByQh.js → util-DMFeUvLz.js} +3 -3
- package/dist/src/{util-BHGHw5G1.js → util-DbVG-yZU.js} +3 -3
- package/dist/src/{util-Bv6uGDfH.js → util-vNmDL5DT.js} +3 -3
- package/dist/src/{utils-XiOAgly5.js → utils-CFxO9KGo.js} +2 -2
- package/dist/src/{utils-f2-Moju7.js → utils-DEuL4VNB.js} +2 -2
- package/dist/src/{utils-Cz9qXqII.cjs → utils-DKw8mrgr.cjs} +3 -3
- package/dist/src/{utils-dLokC-eR.js → utils-DOjD4dTC.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +32 -32
- package/dist/src/app/assets/index-4LKxG2CG.js +0 -439
- package/dist/src/app/assets/index-C3zcsZFQ.css +0 -1
- package/dist/src/app/assets/sync-9qqYcY-B.js +0 -4
- package/dist/src/app/assets/vendor-markdown-0tekx3KX.js +0 -29
- package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
- package/dist/src/cache-CeUpFm3M.cjs +0 -5
- package/dist/src/cache-n-RCJ-hL.js +0 -6
- package/dist/src/cloud-BBh91EUK.js +0 -4
- package/dist/src/eval-B3r2CVXr.js +0 -15
- package/dist/src/evalResult-5xwYnECe.js +0 -12
- package/dist/src/evalResult-71lY93Kj.cjs +0 -10
- package/dist/src/evalResult-Dx5P5cIv.js +0 -10
- package/dist/src/evaluator-Jx6bRZV6.js +0 -36
- package/dist/src/fetch-BxNb_Lp3.js +0 -5
- package/dist/src/graders-B_pgMLS2.js +0 -34
- package/dist/src/graders-DErokPDO.cjs +0 -32
- package/dist/src/graders-DR_uNe54.js +0 -32
- package/dist/src/graders-w3176Wz-.js +0 -32
- package/dist/src/providers-B7V0njNs.js +0 -32
- package/dist/src/providers-BEwbhv0X.js +0 -30
- package/dist/src/providers-CH3C7zf7.js +0 -30
- package/dist/src/providers-zyB6k_38.cjs +0 -31
- package/dist/src/rubyUtils-BUHu6PhO.js +0 -5
- package/dist/src/rubyUtils-CP42kMvq.cjs +0 -4
- package/dist/src/server-DA4Cyrrq.js +0 -7
- package/dist/src/server-Dulb-4-K.cjs +0 -5
- package/dist/src/store-CXS-Q_91.js +0 -6
- package/dist/src/store-eYkaKMwq.cjs +0 -5
- package/dist/src/telemetry-BpMfhthR.cjs +0 -5
- package/dist/src/telemetry-Dw38hanS.js +0 -7
- package/dist/src/transform-DTGDnAzW.js +0 -6
- package/dist/src/transform-m3qNw4KP.cjs +0 -5
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as importModule } from "./esm-
|
|
1
|
+
import { C as getEnvString, D as state, S as getEnvInt, a as logger, b as getEnvBool, x as getEnvFloat } from "./logger-DO8_zM18.js";
|
|
2
|
+
import { r as importModule } from "./esm-SUNIX1x3.js";
|
|
3
3
|
import { i as isJavascriptFile } from "./fileExtensions-DnqA1y9x.js";
|
|
4
|
-
import { d as maybeLoadToolsFromExternalFile, g as renderVarsInObject, l as maybeLoadFromExternalFileWithVars, u as maybeLoadResponseFormatFromExternalFile } from "./util-
|
|
5
|
-
import { C as transformTools, S as transformToolChoice, b as parseChatPrompt, p as REQUEST_TIMEOUT_MS } from "./fetch-
|
|
6
|
-
import { r as fetchWithCache } from "./cache-
|
|
4
|
+
import { d as maybeLoadToolsFromExternalFile, g as renderVarsInObject, l as maybeLoadFromExternalFileWithVars, u as maybeLoadResponseFormatFromExternalFile } from "./util-CMMkIxfU.js";
|
|
5
|
+
import { C as transformTools, S as transformToolChoice, b as parseChatPrompt, p as REQUEST_TIMEOUT_MS } from "./fetch-CVAtKnI3.js";
|
|
6
|
+
import { r as fetchWithCache } from "./cache-CaT5tPgo.js";
|
|
7
7
|
import { n as withGenAISpan } from "./genaiTracer-D3fD9dNV.js";
|
|
8
|
-
import {
|
|
9
|
-
import { t as OpenAiGenericProvider } from "./openai-
|
|
10
|
-
import { a as calculateOpenAICost, c as getTokenUsage, t as OPENAI_CHAT_MODELS } from "./util-
|
|
8
|
+
import { D as getAuthQueryParams, E as getAuthHeaders, O as getOAuthTokenWithExpiry, T as applyQueryParams, i as transformMCPToolsToOpenAi, k as renderAuthVars } from "./transform-DyDAwEpE.js";
|
|
9
|
+
import { t as OpenAiGenericProvider } from "./openai-BcB5KlTk.js";
|
|
10
|
+
import { a as calculateOpenAICost, c as getTokenUsage, t as OPENAI_CHAT_MODELS } from "./util-CgDCK4KI.js";
|
|
11
11
|
import path from "path";
|
|
12
12
|
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
|
|
13
13
|
//#region src/util/finishReason.ts
|
|
@@ -444,9 +444,9 @@ var OpenAiChatCompletionProvider = class OpenAiChatCompletionProvider extends Op
|
|
|
444
444
|
const isReasoningModel = this.isReasoningModel();
|
|
445
445
|
const isGPT5Model = this.isGPT5Model();
|
|
446
446
|
const maxCompletionTokens = isReasoningModel ? config.max_completion_tokens ?? getEnvInt("OPENAI_MAX_COMPLETION_TOKENS") : void 0;
|
|
447
|
-
const maxTokensDefault = config.omitDefaults ? getEnvString("OPENAI_MAX_TOKENS")
|
|
447
|
+
const maxTokensDefault = config.omitDefaults ? getEnvString("OPENAI_MAX_TOKENS") === void 0 ? void 0 : getEnvInt("OPENAI_MAX_TOKENS") : getEnvInt("OPENAI_MAX_TOKENS", 1024);
|
|
448
448
|
const maxTokens = isReasoningModel || isGPT5Model ? void 0 : config.max_tokens ?? maxTokensDefault;
|
|
449
|
-
const temperatureDefault = config.omitDefaults ? getEnvString("OPENAI_TEMPERATURE")
|
|
449
|
+
const temperatureDefault = config.omitDefaults ? getEnvString("OPENAI_TEMPERATURE") === void 0 ? void 0 : getEnvFloat("OPENAI_TEMPERATURE") : getEnvFloat("OPENAI_TEMPERATURE", 0);
|
|
450
450
|
const temperature = this.supportsTemperature() ? config.temperature ?? temperatureDefault : void 0;
|
|
451
451
|
const reasoningEffort = isReasoningModel ? renderVarsInObject(config.reasoning_effort, context?.vars) : void 0;
|
|
452
452
|
const mcpTools = this.mcpClient ? transformMCPToolsToOpenAi(this.mcpClient.getAllTools()) : [];
|
|
@@ -456,10 +456,10 @@ var OpenAiChatCompletionProvider = class OpenAiChatCompletionProvider extends Op
|
|
|
456
456
|
model: this.modelName,
|
|
457
457
|
messages,
|
|
458
458
|
seed: config.seed,
|
|
459
|
-
...maxTokens
|
|
460
|
-
...maxCompletionTokens
|
|
459
|
+
...maxTokens === void 0 ? {} : { max_tokens: maxTokens },
|
|
460
|
+
...maxCompletionTokens === void 0 ? {} : { max_completion_tokens: maxCompletionTokens },
|
|
461
461
|
...reasoningEffort ? { reasoning_effort: reasoningEffort } : {},
|
|
462
|
-
...temperature
|
|
462
|
+
...temperature === void 0 ? {} : { temperature },
|
|
463
463
|
...config.top_p !== void 0 || getEnvString("OPENAI_TOP_P") ? { top_p: config.top_p ?? getEnvFloat("OPENAI_TOP_P", 1) } : {},
|
|
464
464
|
...config.presence_penalty !== void 0 || getEnvString("OPENAI_PRESENCE_PENALTY") ? { presence_penalty: config.presence_penalty ?? getEnvFloat("OPENAI_PRESENCE_PENALTY", 0) } : {},
|
|
465
465
|
...config.frequency_penalty !== void 0 || getEnvString("OPENAI_FREQUENCY_PENALTY") ? { frequency_penalty: config.frequency_penalty ?? getEnvFloat("OPENAI_FREQUENCY_PENALTY", 0) } : {},
|
|
@@ -763,4 +763,4 @@ var OpenAiChatCompletionProvider = class OpenAiChatCompletionProvider extends Op
|
|
|
763
763
|
//#endregion
|
|
764
764
|
export { normalizeFinishReason as i, MCPClient as n, FINISH_REASON_MAP as r, OpenAiChatCompletionProvider as t };
|
|
765
765
|
|
|
766
|
-
//# sourceMappingURL=chat-
|
|
766
|
+
//# sourceMappingURL=chat-pxmiVpWe.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as OpenAiGenericProvider } from "./openai-
|
|
3
|
-
import { t as providerRegistry } from "./providerRegistry-
|
|
1
|
+
import { a as logger } from "./logger-DO8_zM18.js";
|
|
2
|
+
import { t as OpenAiGenericProvider } from "./openai-BcB5KlTk.js";
|
|
3
|
+
import { t as providerRegistry } from "./providerRegistry-CUWki5mQ.js";
|
|
4
4
|
import * as http$1 from "http";
|
|
5
5
|
import { chromium } from "playwright";
|
|
6
6
|
//#region src/providers/openai/chatkit-pool.ts
|
|
@@ -1154,4 +1154,4 @@ Original error: ${errorMessage}`);
|
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
export { OpenAiChatKitProvider };
|
|
1156
1156
|
|
|
1157
|
-
//# sourceMappingURL=chatkit-
|
|
1157
|
+
//# sourceMappingURL=chatkit-BYGQlHlV.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_openai = require("./openai-
|
|
3
|
-
const require_providerRegistry = require("./providerRegistry-
|
|
1
|
+
const require_logger = require("./logger-D5iKBpu_.cjs");
|
|
2
|
+
const require_openai = require("./openai-CoxGAQwn.cjs");
|
|
3
|
+
const require_providerRegistry = require("./providerRegistry-BTDgfV5h.cjs");
|
|
4
4
|
let http = require("http");
|
|
5
5
|
http = require_logger.__toESM(http);
|
|
6
6
|
let playwright = require("playwright");
|
|
@@ -1155,4 +1155,4 @@ Original error: ${errorMessage}`);
|
|
|
1155
1155
|
//#endregion
|
|
1156
1156
|
exports.OpenAiChatKitProvider = OpenAiChatKitProvider;
|
|
1157
1157
|
|
|
1158
|
-
//# sourceMappingURL=chatkit-
|
|
1158
|
+
//# sourceMappingURL=chatkit-Cx174XI3.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import { t as OpenAiGenericProvider } from "./openai-
|
|
4
|
-
import { t as providerRegistry } from "./providerRegistry-
|
|
2
|
+
import { s as logger } from "./logger-BcJBzSSA.js";
|
|
3
|
+
import { t as OpenAiGenericProvider } from "./openai-BMcwgD5C.js";
|
|
4
|
+
import { t as providerRegistry } from "./providerRegistry-B9lh-_tx.js";
|
|
5
5
|
import * as http$1 from "http";
|
|
6
6
|
import { chromium } from "playwright";
|
|
7
7
|
//#region src/providers/openai/chatkit-pool.ts
|
|
@@ -1155,4 +1155,4 @@ Original error: ${errorMessage}`);
|
|
|
1155
1155
|
//#endregion
|
|
1156
1156
|
export { OpenAiChatKitProvider };
|
|
1157
1157
|
|
|
1158
|
-
//# sourceMappingURL=chatkit-
|
|
1158
|
+
//# sourceMappingURL=chatkit-_8eJqKcD.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as OpenAiGenericProvider } from "./openai-
|
|
3
|
-
import { t as providerRegistry } from "./providerRegistry-
|
|
1
|
+
import { a as logger } from "./logger-BnkjG2jt.js";
|
|
2
|
+
import { t as OpenAiGenericProvider } from "./openai-D6wITiVn.js";
|
|
3
|
+
import { t as providerRegistry } from "./providerRegistry-BkzVH5Ba.js";
|
|
4
4
|
import * as http$1 from "http";
|
|
5
5
|
import { chromium } from "playwright";
|
|
6
6
|
//#region src/providers/openai/chatkit-pool.ts
|
|
@@ -1154,4 +1154,4 @@ Original error: ${errorMessage}`);
|
|
|
1154
1154
|
//#endregion
|
|
1155
1155
|
export { OpenAiChatKitProvider };
|
|
1156
1156
|
|
|
1157
|
-
//# sourceMappingURL=chatkit-
|
|
1157
|
+
//# sourceMappingURL=chatkit-a2D6mY6s.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_esm = require("./esm-
|
|
3
|
-
require("./pythonUtils-
|
|
4
|
-
require("./types-
|
|
5
|
-
require("./util-
|
|
6
|
-
require("./fetch-
|
|
7
|
-
require("./cache-
|
|
8
|
-
const require_transform = require("./transform-
|
|
9
|
-
const require_util$1 = require("./util
|
|
10
|
-
const
|
|
1
|
+
const require_logger = require("./logger-D5iKBpu_.cjs");
|
|
2
|
+
const require_esm = require("./esm-CipptfDu.cjs");
|
|
3
|
+
require("./pythonUtils-dAVigVK-.cjs");
|
|
4
|
+
require("./types-D8cGDZbL.cjs");
|
|
5
|
+
require("./util-CuLo2pMR.cjs");
|
|
6
|
+
require("./fetch-BnR9wSnm.cjs");
|
|
7
|
+
require("./cache-C5yFZ4gC.cjs");
|
|
8
|
+
const require_transform = require("./transform-0BwoBsvO.cjs");
|
|
9
|
+
const require_util$1 = require("./util--9u9UVCt.cjs");
|
|
10
|
+
const require_agentic_utils = require("./agentic-utils-DAVsChuB.cjs");
|
|
11
11
|
let node_fs = require("node:fs");
|
|
12
12
|
node_fs = require_logger.__toESM(node_fs);
|
|
13
13
|
let node_path = require("node:path");
|
|
@@ -17,6 +17,18 @@ dedent = require_logger.__toESM(dedent);
|
|
|
17
17
|
let node_os = require("node:os");
|
|
18
18
|
node_os = require_logger.__toESM(node_os);
|
|
19
19
|
//#region src/providers/claude-agent-sdk.ts
|
|
20
|
+
function deriveSkillCalls(toolCalls) {
|
|
21
|
+
return toolCalls.filter((toolCall) => toolCall.name === "Skill").flatMap((toolCall) => {
|
|
22
|
+
const skillName = toolCall.input && typeof toolCall.input === "object" && typeof toolCall.input.skill === "string" ? toolCall.input.skill.trim() : "";
|
|
23
|
+
if (!skillName) return [];
|
|
24
|
+
return [{
|
|
25
|
+
name: skillName,
|
|
26
|
+
input: toolCall.input,
|
|
27
|
+
is_error: toolCall.is_error,
|
|
28
|
+
source: "tool"
|
|
29
|
+
}];
|
|
30
|
+
});
|
|
31
|
+
}
|
|
20
32
|
/**
|
|
21
33
|
* Claude Agent SDK Provider
|
|
22
34
|
*
|
|
@@ -148,7 +160,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
148
160
|
if (value !== void 0) env[key] = value;
|
|
149
161
|
}
|
|
150
162
|
if (this.apiKey) env.ANTHROPIC_API_KEY = this.apiKey;
|
|
151
|
-
if (!this.apiKey && !(env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent.default`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
163
|
+
if (!this.apiKey && !(config.apiKeyRequired === false || env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent.default`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
152
164
|
|
|
153
165
|
Use CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX environment variables to use Bedrock or Vertex instead.`);
|
|
154
166
|
if (config.allow_all_tools && ("custom_allowed_tools" in config || "append_allowed_tools" in config)) throw new Error("Cannot specify both allow_all_tools and custom_allowed_tools or append_allowed_tools");
|
|
@@ -214,7 +226,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
214
226
|
persistSession: config.persist_session,
|
|
215
227
|
env
|
|
216
228
|
};
|
|
217
|
-
const cacheResult = await
|
|
229
|
+
const cacheResult = await require_agentic_utils.initializeAgenticCache({
|
|
218
230
|
cacheKeyPrefix: "anthropic:claude-agent-sdk",
|
|
219
231
|
workingDir,
|
|
220
232
|
bustCache: context?.bustCache,
|
|
@@ -224,7 +236,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
224
236
|
prompt,
|
|
225
237
|
cacheKeyQueryOptions
|
|
226
238
|
});
|
|
227
|
-
const cachedResponse = await
|
|
239
|
+
const cachedResponse = await require_agentic_utils.getCachedResponse(cacheResult, "Claude Agent SDK");
|
|
228
240
|
if (cachedResponse) return cachedResponse;
|
|
229
241
|
const mcpServers = config.mcp ? await require_transform.transformMCPConfigToClaudeCode(config.mcp) : {};
|
|
230
242
|
if (workingDir) {
|
|
@@ -300,25 +312,27 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
300
312
|
const cost = msg.total_cost_usd ?? 0;
|
|
301
313
|
const sessionId = msg.session_id;
|
|
302
314
|
const toolCallsArray = Array.from(toolCallsMap.values());
|
|
315
|
+
const skillCalls = deriveSkillCalls(toolCallsArray);
|
|
303
316
|
if (msg.subtype === "success") {
|
|
304
317
|
require_logger.logger.debug(`Claude Agent SDK response: ${raw}`);
|
|
305
318
|
const response = {
|
|
306
|
-
output: msg.structured_output
|
|
319
|
+
output: msg.structured_output === void 0 ? msg.result : msg.structured_output,
|
|
307
320
|
tokenUsage,
|
|
308
321
|
cost,
|
|
309
322
|
raw,
|
|
310
323
|
sessionId,
|
|
311
324
|
metadata: {
|
|
325
|
+
skillCalls,
|
|
312
326
|
toolCalls: toolCallsArray,
|
|
313
327
|
numTurns: msg.num_turns,
|
|
314
328
|
durationMs: msg.duration_ms,
|
|
315
329
|
durationApiMs: msg.duration_api_ms,
|
|
316
330
|
modelUsage: msg.modelUsage,
|
|
317
331
|
permissionDenials: msg.permission_denials,
|
|
318
|
-
...msg.structured_output
|
|
332
|
+
...msg.structured_output === void 0 ? {} : { structuredOutput: msg.structured_output }
|
|
319
333
|
}
|
|
320
334
|
};
|
|
321
|
-
await
|
|
335
|
+
await require_agentic_utils.cacheResponse(cacheResult, response, "Claude Agent SDK");
|
|
322
336
|
return response;
|
|
323
337
|
} else return {
|
|
324
338
|
error: `Claude Agent SDK call failed: ${msg.subtype}`,
|
|
@@ -327,6 +341,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
327
341
|
raw,
|
|
328
342
|
sessionId,
|
|
329
343
|
metadata: {
|
|
344
|
+
skillCalls,
|
|
330
345
|
toolCalls: toolCallsArray,
|
|
331
346
|
numTurns: msg.num_turns,
|
|
332
347
|
durationMs: msg.duration_ms,
|
|
@@ -359,6 +374,9 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
359
374
|
* For normal Claude Agent SDK support, just use the Anthropic API key
|
|
360
375
|
* Users can also use Bedrock (with CLAUDE_CODE_USE_BEDROCK env var) or Vertex (with CLAUDE_CODE_USE_VERTEX env var)
|
|
361
376
|
*/
|
|
377
|
+
requiresApiKey() {
|
|
378
|
+
return !(this.env?.CLAUDE_CODE_USE_BEDROCK || this.env?.CLAUDE_CODE_USE_VERTEX || require_logger.getEnvString("CLAUDE_CODE_USE_BEDROCK") || require_logger.getEnvString("CLAUDE_CODE_USE_VERTEX"));
|
|
379
|
+
}
|
|
362
380
|
getApiKey() {
|
|
363
381
|
return this.config?.apiKey || this.env?.ANTHROPIC_API_KEY || require_logger.getEnvString("ANTHROPIC_API_KEY");
|
|
364
382
|
}
|
|
@@ -367,4 +385,4 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
367
385
|
//#endregion
|
|
368
386
|
exports.ClaudeCodeSDKProvider = ClaudeCodeSDKProvider;
|
|
369
387
|
|
|
370
|
-
//# sourceMappingURL=claude-agent-sdk-
|
|
388
|
+
//# sourceMappingURL=claude-agent-sdk-8ddRp1L2.cjs.map
|
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import "./fetch-
|
|
4
|
-
import "./cloud-
|
|
5
|
-
import "./types-
|
|
6
|
-
import "./cache-
|
|
7
|
-
import "./util-
|
|
8
|
-
import { i as resolvePackageEntryPoint, o as safeResolve, r as importModule } from "./esm-
|
|
9
|
-
import "./pythonUtils-
|
|
10
|
-
import { t as transformMCPConfigToClaudeCode } from "./transform-
|
|
11
|
-
import { t as ANTHROPIC_MODELS } from "./util-
|
|
12
|
-
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-
|
|
2
|
+
import { E as getEnvString, j as state, s as logger } from "./logger-BcJBzSSA.js";
|
|
3
|
+
import "./fetch-DoVRJZhJ.js";
|
|
4
|
+
import "./cloud-z8KZpUoa.js";
|
|
5
|
+
import "./types-CIhFeUC4.js";
|
|
6
|
+
import "./cache-DSqR6ezl.js";
|
|
7
|
+
import "./util-Bm3E9jpK.js";
|
|
8
|
+
import { i as resolvePackageEntryPoint, o as safeResolve, r as importModule } from "./esm-7UIl0pPM.js";
|
|
9
|
+
import "./pythonUtils-wIqk7zAf.js";
|
|
10
|
+
import { t as transformMCPConfigToClaudeCode } from "./transform-DrleutM3.js";
|
|
11
|
+
import { t as ANTHROPIC_MODELS } from "./util-DMFeUvLz.js";
|
|
12
|
+
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-36epdqwB.js";
|
|
13
13
|
import fs from "node:fs";
|
|
14
14
|
import path from "node:path";
|
|
15
15
|
import dedent from "dedent";
|
|
16
16
|
import os from "node:os";
|
|
17
17
|
//#region src/providers/claude-agent-sdk.ts
|
|
18
|
+
function deriveSkillCalls(toolCalls) {
|
|
19
|
+
return toolCalls.filter((toolCall) => toolCall.name === "Skill").flatMap((toolCall) => {
|
|
20
|
+
const skillName = toolCall.input && typeof toolCall.input === "object" && typeof toolCall.input.skill === "string" ? toolCall.input.skill.trim() : "";
|
|
21
|
+
if (!skillName) return [];
|
|
22
|
+
return [{
|
|
23
|
+
name: skillName,
|
|
24
|
+
input: toolCall.input,
|
|
25
|
+
is_error: toolCall.is_error,
|
|
26
|
+
source: "tool"
|
|
27
|
+
}];
|
|
28
|
+
});
|
|
29
|
+
}
|
|
18
30
|
/**
|
|
19
31
|
* Claude Agent SDK Provider
|
|
20
32
|
*
|
|
@@ -146,7 +158,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
146
158
|
if (value !== void 0) env[key] = value;
|
|
147
159
|
}
|
|
148
160
|
if (this.apiKey) env.ANTHROPIC_API_KEY = this.apiKey;
|
|
149
|
-
if (!this.apiKey && !(env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
161
|
+
if (!this.apiKey && !(config.apiKeyRequired === false || env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
150
162
|
|
|
151
163
|
Use CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX environment variables to use Bedrock or Vertex instead.`);
|
|
152
164
|
if (config.allow_all_tools && ("custom_allowed_tools" in config || "append_allowed_tools" in config)) throw new Error("Cannot specify both allow_all_tools and custom_allowed_tools or append_allowed_tools");
|
|
@@ -298,22 +310,24 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
298
310
|
const cost = msg.total_cost_usd ?? 0;
|
|
299
311
|
const sessionId = msg.session_id;
|
|
300
312
|
const toolCallsArray = Array.from(toolCallsMap.values());
|
|
313
|
+
const skillCalls = deriveSkillCalls(toolCallsArray);
|
|
301
314
|
if (msg.subtype === "success") {
|
|
302
315
|
logger.debug(`Claude Agent SDK response: ${raw}`);
|
|
303
316
|
const response = {
|
|
304
|
-
output: msg.structured_output
|
|
317
|
+
output: msg.structured_output === void 0 ? msg.result : msg.structured_output,
|
|
305
318
|
tokenUsage,
|
|
306
319
|
cost,
|
|
307
320
|
raw,
|
|
308
321
|
sessionId,
|
|
309
322
|
metadata: {
|
|
323
|
+
skillCalls,
|
|
310
324
|
toolCalls: toolCallsArray,
|
|
311
325
|
numTurns: msg.num_turns,
|
|
312
326
|
durationMs: msg.duration_ms,
|
|
313
327
|
durationApiMs: msg.duration_api_ms,
|
|
314
328
|
modelUsage: msg.modelUsage,
|
|
315
329
|
permissionDenials: msg.permission_denials,
|
|
316
|
-
...msg.structured_output
|
|
330
|
+
...msg.structured_output === void 0 ? {} : { structuredOutput: msg.structured_output }
|
|
317
331
|
}
|
|
318
332
|
};
|
|
319
333
|
await cacheResponse(cacheResult, response, "Claude Agent SDK");
|
|
@@ -325,6 +339,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
325
339
|
raw,
|
|
326
340
|
sessionId,
|
|
327
341
|
metadata: {
|
|
342
|
+
skillCalls,
|
|
328
343
|
toolCalls: toolCallsArray,
|
|
329
344
|
numTurns: msg.num_turns,
|
|
330
345
|
durationMs: msg.duration_ms,
|
|
@@ -357,6 +372,9 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
357
372
|
* For normal Claude Agent SDK support, just use the Anthropic API key
|
|
358
373
|
* Users can also use Bedrock (with CLAUDE_CODE_USE_BEDROCK env var) or Vertex (with CLAUDE_CODE_USE_VERTEX env var)
|
|
359
374
|
*/
|
|
375
|
+
requiresApiKey() {
|
|
376
|
+
return !(this.env?.CLAUDE_CODE_USE_BEDROCK || this.env?.CLAUDE_CODE_USE_VERTEX || getEnvString("CLAUDE_CODE_USE_BEDROCK") || getEnvString("CLAUDE_CODE_USE_VERTEX"));
|
|
377
|
+
}
|
|
360
378
|
getApiKey() {
|
|
361
379
|
return this.config?.apiKey || this.env?.ANTHROPIC_API_KEY || getEnvString("ANTHROPIC_API_KEY");
|
|
362
380
|
}
|
|
@@ -365,4 +383,4 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
365
383
|
//#endregion
|
|
366
384
|
export { ClaudeCodeSDKProvider };
|
|
367
385
|
|
|
368
|
-
//# sourceMappingURL=claude-agent-sdk-
|
|
386
|
+
//# sourceMappingURL=claude-agent-sdk-Bq5EArsX.js.map
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import "./types-
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import { t as transformMCPConfigToClaudeCode } from "./transform-
|
|
9
|
-
import { t as ANTHROPIC_MODELS } from "./util-
|
|
10
|
-
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./
|
|
11
|
-
import fs from "node:fs";
|
|
1
|
+
import { C as getEnvString, D as state, a as logger } from "./logger-DO8_zM18.js";
|
|
2
|
+
import { i as resolvePackageEntryPoint, o as safeResolve, r as importModule } from "./esm-SUNIX1x3.js";
|
|
3
|
+
import "./pythonUtils-Cpo0Ez1p.js";
|
|
4
|
+
import "./types-q8GXGF65.js";
|
|
5
|
+
import "./util-CMMkIxfU.js";
|
|
6
|
+
import "./fetch-CVAtKnI3.js";
|
|
7
|
+
import "./cache-CaT5tPgo.js";
|
|
8
|
+
import { t as transformMCPConfigToClaudeCode } from "./transform-DyDAwEpE.js";
|
|
9
|
+
import { t as ANTHROPIC_MODELS } from "./util-vNmDL5DT.js";
|
|
10
|
+
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-D8yXo5Lm.js";
|
|
12
11
|
import path from "node:path";
|
|
12
|
+
import fs from "node:fs";
|
|
13
13
|
import dedent from "dedent";
|
|
14
14
|
import os from "node:os";
|
|
15
15
|
//#region src/providers/claude-agent-sdk.ts
|
|
16
|
+
function deriveSkillCalls(toolCalls) {
|
|
17
|
+
return toolCalls.filter((toolCall) => toolCall.name === "Skill").flatMap((toolCall) => {
|
|
18
|
+
const skillName = toolCall.input && typeof toolCall.input === "object" && typeof toolCall.input.skill === "string" ? toolCall.input.skill.trim() : "";
|
|
19
|
+
if (!skillName) return [];
|
|
20
|
+
return [{
|
|
21
|
+
name: skillName,
|
|
22
|
+
input: toolCall.input,
|
|
23
|
+
is_error: toolCall.is_error,
|
|
24
|
+
source: "tool"
|
|
25
|
+
}];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
16
28
|
/**
|
|
17
29
|
* Claude Agent SDK Provider
|
|
18
30
|
*
|
|
@@ -144,7 +156,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
144
156
|
if (value !== void 0) env[key] = value;
|
|
145
157
|
}
|
|
146
158
|
if (this.apiKey) env.ANTHROPIC_API_KEY = this.apiKey;
|
|
147
|
-
if (!this.apiKey && !(env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
159
|
+
if (!this.apiKey && !(config.apiKeyRequired === false || env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
148
160
|
|
|
149
161
|
Use CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX environment variables to use Bedrock or Vertex instead.`);
|
|
150
162
|
if (config.allow_all_tools && ("custom_allowed_tools" in config || "append_allowed_tools" in config)) throw new Error("Cannot specify both allow_all_tools and custom_allowed_tools or append_allowed_tools");
|
|
@@ -296,22 +308,24 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
296
308
|
const cost = msg.total_cost_usd ?? 0;
|
|
297
309
|
const sessionId = msg.session_id;
|
|
298
310
|
const toolCallsArray = Array.from(toolCallsMap.values());
|
|
311
|
+
const skillCalls = deriveSkillCalls(toolCallsArray);
|
|
299
312
|
if (msg.subtype === "success") {
|
|
300
313
|
logger.debug(`Claude Agent SDK response: ${raw}`);
|
|
301
314
|
const response = {
|
|
302
|
-
output: msg.structured_output
|
|
315
|
+
output: msg.structured_output === void 0 ? msg.result : msg.structured_output,
|
|
303
316
|
tokenUsage,
|
|
304
317
|
cost,
|
|
305
318
|
raw,
|
|
306
319
|
sessionId,
|
|
307
320
|
metadata: {
|
|
321
|
+
skillCalls,
|
|
308
322
|
toolCalls: toolCallsArray,
|
|
309
323
|
numTurns: msg.num_turns,
|
|
310
324
|
durationMs: msg.duration_ms,
|
|
311
325
|
durationApiMs: msg.duration_api_ms,
|
|
312
326
|
modelUsage: msg.modelUsage,
|
|
313
327
|
permissionDenials: msg.permission_denials,
|
|
314
|
-
...msg.structured_output
|
|
328
|
+
...msg.structured_output === void 0 ? {} : { structuredOutput: msg.structured_output }
|
|
315
329
|
}
|
|
316
330
|
};
|
|
317
331
|
await cacheResponse(cacheResult, response, "Claude Agent SDK");
|
|
@@ -323,6 +337,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
323
337
|
raw,
|
|
324
338
|
sessionId,
|
|
325
339
|
metadata: {
|
|
340
|
+
skillCalls,
|
|
326
341
|
toolCalls: toolCallsArray,
|
|
327
342
|
numTurns: msg.num_turns,
|
|
328
343
|
durationMs: msg.duration_ms,
|
|
@@ -355,6 +370,9 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
355
370
|
* For normal Claude Agent SDK support, just use the Anthropic API key
|
|
356
371
|
* Users can also use Bedrock (with CLAUDE_CODE_USE_BEDROCK env var) or Vertex (with CLAUDE_CODE_USE_VERTEX env var)
|
|
357
372
|
*/
|
|
373
|
+
requiresApiKey() {
|
|
374
|
+
return !(this.env?.CLAUDE_CODE_USE_BEDROCK || this.env?.CLAUDE_CODE_USE_VERTEX || getEnvString("CLAUDE_CODE_USE_BEDROCK") || getEnvString("CLAUDE_CODE_USE_VERTEX"));
|
|
375
|
+
}
|
|
358
376
|
getApiKey() {
|
|
359
377
|
return this.config?.apiKey || this.env?.ANTHROPIC_API_KEY || getEnvString("ANTHROPIC_API_KEY");
|
|
360
378
|
}
|
|
@@ -363,4 +381,4 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
363
381
|
//#endregion
|
|
364
382
|
export { ClaudeCodeSDKProvider };
|
|
365
383
|
|
|
366
|
-
//# sourceMappingURL=claude-agent-sdk-
|
|
384
|
+
//# sourceMappingURL=claude-agent-sdk-CMjh4LFH.js.map
|
|
@@ -1,18 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import "./
|
|
4
|
-
import "./types-
|
|
5
|
-
import "./
|
|
6
|
-
import "./
|
|
7
|
-
import "./
|
|
8
|
-
import { t as transformMCPConfigToClaudeCode } from "./transform-
|
|
9
|
-
import { t as ANTHROPIC_MODELS } from "./util-
|
|
10
|
-
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./
|
|
11
|
-
import path from "node:path";
|
|
1
|
+
import { C as getEnvString, D as state, a as logger } from "./logger-BnkjG2jt.js";
|
|
2
|
+
import "./fetch-BiYv2BZc.js";
|
|
3
|
+
import { i as resolvePackageEntryPoint, o as safeResolve, r as importModule } from "./esm-CKWP3u_P.js";
|
|
4
|
+
import "./types-Cd3ygw8W.js";
|
|
5
|
+
import "./cache-HP0NP4k3.js";
|
|
6
|
+
import "./pythonUtils-Bzwbgpbg.js";
|
|
7
|
+
import "./util-BLvy9qfE.js";
|
|
8
|
+
import { t as transformMCPConfigToClaudeCode } from "./transform-B2-jIv68.js";
|
|
9
|
+
import { t as ANTHROPIC_MODELS } from "./util-DbVG-yZU.js";
|
|
10
|
+
import { i as initializeAgenticCache, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-DIYAAYE7.js";
|
|
12
11
|
import fs from "node:fs";
|
|
12
|
+
import path from "node:path";
|
|
13
13
|
import dedent from "dedent";
|
|
14
14
|
import os from "node:os";
|
|
15
15
|
//#region src/providers/claude-agent-sdk.ts
|
|
16
|
+
function deriveSkillCalls(toolCalls) {
|
|
17
|
+
return toolCalls.filter((toolCall) => toolCall.name === "Skill").flatMap((toolCall) => {
|
|
18
|
+
const skillName = toolCall.input && typeof toolCall.input === "object" && typeof toolCall.input.skill === "string" ? toolCall.input.skill.trim() : "";
|
|
19
|
+
if (!skillName) return [];
|
|
20
|
+
return [{
|
|
21
|
+
name: skillName,
|
|
22
|
+
input: toolCall.input,
|
|
23
|
+
is_error: toolCall.is_error,
|
|
24
|
+
source: "tool"
|
|
25
|
+
}];
|
|
26
|
+
});
|
|
27
|
+
}
|
|
16
28
|
/**
|
|
17
29
|
* Claude Agent SDK Provider
|
|
18
30
|
*
|
|
@@ -144,7 +156,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
144
156
|
if (value !== void 0) env[key] = value;
|
|
145
157
|
}
|
|
146
158
|
if (this.apiKey) env.ANTHROPIC_API_KEY = this.apiKey;
|
|
147
|
-
if (!this.apiKey && !(env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
159
|
+
if (!this.apiKey && !(config.apiKeyRequired === false || env.CLAUDE_CODE_USE_BEDROCK || env.CLAUDE_CODE_USE_VERTEX)) throw new Error(dedent`Anthropic API key is not set. Set the ANTHROPIC_API_KEY environment variable or add "apiKey" to the provider config.
|
|
148
160
|
|
|
149
161
|
Use CLAUDE_CODE_USE_BEDROCK or CLAUDE_CODE_USE_VERTEX environment variables to use Bedrock or Vertex instead.`);
|
|
150
162
|
if (config.allow_all_tools && ("custom_allowed_tools" in config || "append_allowed_tools" in config)) throw new Error("Cannot specify both allow_all_tools and custom_allowed_tools or append_allowed_tools");
|
|
@@ -296,22 +308,24 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
296
308
|
const cost = msg.total_cost_usd ?? 0;
|
|
297
309
|
const sessionId = msg.session_id;
|
|
298
310
|
const toolCallsArray = Array.from(toolCallsMap.values());
|
|
311
|
+
const skillCalls = deriveSkillCalls(toolCallsArray);
|
|
299
312
|
if (msg.subtype === "success") {
|
|
300
313
|
logger.debug(`Claude Agent SDK response: ${raw}`);
|
|
301
314
|
const response = {
|
|
302
|
-
output: msg.structured_output
|
|
315
|
+
output: msg.structured_output === void 0 ? msg.result : msg.structured_output,
|
|
303
316
|
tokenUsage,
|
|
304
317
|
cost,
|
|
305
318
|
raw,
|
|
306
319
|
sessionId,
|
|
307
320
|
metadata: {
|
|
321
|
+
skillCalls,
|
|
308
322
|
toolCalls: toolCallsArray,
|
|
309
323
|
numTurns: msg.num_turns,
|
|
310
324
|
durationMs: msg.duration_ms,
|
|
311
325
|
durationApiMs: msg.duration_api_ms,
|
|
312
326
|
modelUsage: msg.modelUsage,
|
|
313
327
|
permissionDenials: msg.permission_denials,
|
|
314
|
-
...msg.structured_output
|
|
328
|
+
...msg.structured_output === void 0 ? {} : { structuredOutput: msg.structured_output }
|
|
315
329
|
}
|
|
316
330
|
};
|
|
317
331
|
await cacheResponse(cacheResult, response, "Claude Agent SDK");
|
|
@@ -323,6 +337,7 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
323
337
|
raw,
|
|
324
338
|
sessionId,
|
|
325
339
|
metadata: {
|
|
340
|
+
skillCalls,
|
|
326
341
|
toolCalls: toolCallsArray,
|
|
327
342
|
numTurns: msg.num_turns,
|
|
328
343
|
durationMs: msg.duration_ms,
|
|
@@ -355,6 +370,9 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
355
370
|
* For normal Claude Agent SDK support, just use the Anthropic API key
|
|
356
371
|
* Users can also use Bedrock (with CLAUDE_CODE_USE_BEDROCK env var) or Vertex (with CLAUDE_CODE_USE_VERTEX env var)
|
|
357
372
|
*/
|
|
373
|
+
requiresApiKey() {
|
|
374
|
+
return !(this.env?.CLAUDE_CODE_USE_BEDROCK || this.env?.CLAUDE_CODE_USE_VERTEX || getEnvString("CLAUDE_CODE_USE_BEDROCK") || getEnvString("CLAUDE_CODE_USE_VERTEX"));
|
|
375
|
+
}
|
|
358
376
|
getApiKey() {
|
|
359
377
|
return this.config?.apiKey || this.env?.ANTHROPIC_API_KEY || getEnvString("ANTHROPIC_API_KEY");
|
|
360
378
|
}
|
|
@@ -363,4 +381,4 @@ var ClaudeCodeSDKProvider = class ClaudeCodeSDKProvider {
|
|
|
363
381
|
//#endregion
|
|
364
382
|
export { ClaudeCodeSDKProvider };
|
|
365
383
|
|
|
366
|
-
//# sourceMappingURL=claude-agent-sdk-
|
|
384
|
+
//# sourceMappingURL=claude-agent-sdk-HgbFioFw.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
2
|
+
import { E as getEnvString, s as logger, x as getConfigDirectoryPath } from "./logger-BcJBzSSA.js";
|
|
3
3
|
import * as fs$1 from "fs";
|
|
4
4
|
import * as path$1 from "path";
|
|
5
5
|
import yaml from "js-yaml";
|
|
@@ -134,7 +134,7 @@ var CloudConfig = class {
|
|
|
134
134
|
}
|
|
135
135
|
async validateAndSetApiToken(token, apiHost) {
|
|
136
136
|
try {
|
|
137
|
-
const { fetchWithProxy } = await import("./fetch-
|
|
137
|
+
const { fetchWithProxy } = await import("./fetch-UWU706qb.js");
|
|
138
138
|
const response = await fetchWithProxy(`${apiHost}/api/v1/users/me`, { headers: { Authorization: `Bearer ${token}` } });
|
|
139
139
|
if (!response.ok) {
|
|
140
140
|
const errorMessage = await response.text();
|
|
@@ -210,4 +210,4 @@ const cloudConfig = new CloudConfig();
|
|
|
210
210
|
//#endregion
|
|
211
211
|
export { cloudConfig as a, writeGlobalConfigPartial as c, SHARING_CUTOFF_DATE as i, CLOUD_API_HOST as n, readGlobalConfig as o, CloudConfig as r, writeGlobalConfig as s, API_HOST as t };
|
|
212
212
|
|
|
213
|
-
//# sourceMappingURL=cloud-
|
|
213
|
+
//# sourceMappingURL=cloud-z8KZpUoa.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./fetch-
|
|
1
|
+
import { C as getEnvString } from "./logger-BnkjG2jt.js";
|
|
2
|
+
import "./fetch-BiYv2BZc.js";
|
|
3
3
|
import { t as invariant } from "./invariant-vgHWClmd.js";
|
|
4
|
-
import "./esm-
|
|
5
|
-
import "./types-
|
|
6
|
-
import "./cache-
|
|
4
|
+
import "./esm-CKWP3u_P.js";
|
|
5
|
+
import "./types-Cd3ygw8W.js";
|
|
6
|
+
import "./cache-HP0NP4k3.js";
|
|
7
7
|
import "./genaiTracer-70Z8BIuV.js";
|
|
8
|
-
import "./pythonUtils-
|
|
9
|
-
import "./util-
|
|
10
|
-
import { t as OpenAiChatCompletionProvider } from "./chat-
|
|
11
|
-
import "./transform-
|
|
12
|
-
import "./openai-
|
|
13
|
-
import "./util-
|
|
14
|
-
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-
|
|
8
|
+
import "./pythonUtils-Bzwbgpbg.js";
|
|
9
|
+
import "./util-BLvy9qfE.js";
|
|
10
|
+
import { t as OpenAiChatCompletionProvider } from "./chat-B0iaWhoh.js";
|
|
11
|
+
import "./transform-B2-jIv68.js";
|
|
12
|
+
import "./openai-D6wITiVn.js";
|
|
13
|
+
import "./util-BtoGs5Cb.js";
|
|
14
|
+
import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-BCimtq-h.js";
|
|
15
15
|
//#region src/providers/cloudflare-ai.ts
|
|
16
16
|
function getCloudflareApiConfig(config, env) {
|
|
17
17
|
const apiTokenCandidate = config?.apiKey || (config?.apiKeyEnvar ? getEnvString(config.apiKeyEnvar) || env?.[config.apiKeyEnvar] : void 0) || env?.CLOUDFLARE_API_KEY || getEnvString("CLOUDFLARE_API_KEY");
|
|
@@ -168,4 +168,4 @@ function createCloudflareAiProvider(providerPath, options = {}) {
|
|
|
168
168
|
//#endregion
|
|
169
169
|
export { createCloudflareAiProvider };
|
|
170
170
|
|
|
171
|
-
//# sourceMappingURL=cloudflare-ai-
|
|
171
|
+
//# sourceMappingURL=cloudflare-ai-BGyXlpXJ.js.map
|