promptfoo 0.120.27 → 0.121.1

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.
Files changed (352) hide show
  1. package/README.md +1 -1
  2. package/dist/src/{ListApp-8WOe2nT6.js → ListApp-Du7YVwj5.js} +2 -4
  3. package/dist/src/accounts-BgNJDBE6.js +206 -0
  4. package/dist/src/{accounts-Fl2J3_Fu.cjs → accounts-Bx-x3bmW.cjs} +77 -78
  5. package/dist/src/{accounts-DVINui-2.js → accounts-CMqkzrVf.js} +39 -34
  6. package/dist/src/{accounts-CPDRAMND.js → accounts-xrUGFA6n.js} +38 -33
  7. package/dist/src/{agentic-utils-D922n6mm.js → agentic-utils-BKIN5PKu.js} +9 -10
  8. package/dist/src/{agents-BO2n8Z0d.cjs → agents-B0f4HICh.cjs} +37 -40
  9. package/dist/src/{agents-BXLmVsxR.js → agents-C-dDThPK.js} +37 -37
  10. package/dist/src/{agents-DgJf2-ez.cjs → agents-CErsqg5U.cjs} +16 -17
  11. package/dist/src/{agents-BcsN_BgB.js → agents-CVIn-Utx.js} +16 -12
  12. package/dist/src/{agents-hqgSV-3o.js → agents-CXknwsFX.js} +37 -40
  13. package/dist/src/{agents-pMfppv9Z.js → agents-DeH4Gu94.js} +18 -18
  14. package/dist/src/{agents-BdUTAwi-.js → agents-Dy2YpZpa.js} +38 -41
  15. package/dist/src/{agents-DNvSH78i.js → agents-aF4-T121.js} +16 -20
  16. package/dist/src/{aimlapi-DOib86oE.js → aimlapi-BAGZDo5G.js} +16 -18
  17. package/dist/src/{aimlapi-DtgPI0nE.js → aimlapi-BNfTBexL.js} +15 -17
  18. package/dist/src/{aimlapi-DTPACCB1.js → aimlapi-DHRKlBEA.js} +15 -4
  19. package/dist/src/{aimlapi-BE_Tg9Fl.cjs → aimlapi-tg0Gkcvr.cjs} +15 -16
  20. package/dist/src/app/assets/index-BFCZg7hQ.js +439 -0
  21. package/dist/src/app/index.html +1 -1
  22. package/dist/src/{audio-BRYU0BFo.js → audio-BRODU0UK.js} +7 -9
  23. package/dist/src/{audio-Cwo68yZS.cjs → audio-BWeaWovU.cjs} +6 -7
  24. package/dist/src/{audio-BnRUGAm_.js → audio-CHQ4r-RV.js} +6 -5
  25. package/dist/src/{audio-MSRki4JU.js → audio-tf_NBjlC.js} +6 -8
  26. package/dist/src/{base-h961VXYk.js → base-B0tcrnq_.js} +11 -13
  27. package/dist/src/{base-XB2tDJrB.js → base-B4QJRyFS.js} +11 -13
  28. package/dist/src/{base-pGVmXNl4.cjs → base-DBtwl2FR.cjs} +36 -38
  29. package/dist/src/base-fEDN28WM.js +193 -0
  30. package/dist/src/{blobs-BM_e6hCa.js → blobs-BAU-dXan.js} +9 -12
  31. package/dist/src/{blobs-CR5C4Ihh.js → blobs-Bpg5rH6i.js} +9 -12
  32. package/dist/src/{blobs-B-KQAFhX.cjs → blobs-DvS-O6be.cjs} +34 -37
  33. package/dist/src/blobs-qTYm-1PY.js +236 -0
  34. package/dist/src/{cache-CIpsoBZR.js → cache-8XhNqPKW.js} +64 -67
  35. package/dist/src/cache-Bbn1Nyrd.cjs +5 -0
  36. package/dist/src/cache-BwsMSda7.js +6 -0
  37. package/dist/src/{cache-jsiwsAJv.js → cache-CG0SlR1d.js} +64 -66
  38. package/dist/src/{cache-BTVYfbka.cjs → cache-COish3-W.cjs} +114 -117
  39. package/dist/src/cache-D3eqDYGU.js +739 -0
  40. package/dist/src/{chat-D31K7C4u.cjs → chat-2K608PeQ.cjs} +20 -21
  41. package/dist/src/chat-BKm79wib.js +764 -0
  42. package/dist/src/{chat-B84t99NW.js → chat-CM_kyI8B.js} +20 -9
  43. package/dist/src/{chat-BcPjZXIp.js → chat-CRWNNq73.js} +41 -44
  44. package/dist/src/{chat-CcUCysjU.js → chat-CznLWr_D.js} +41 -44
  45. package/dist/src/{chat-DwWifjxi.js → chat-DHMH-N64.js} +20 -22
  46. package/dist/src/{chat-BE44YOc6.cjs → chat-DaqekjFr.cjs} +61 -64
  47. package/dist/src/{chat-DZM2GUHO.js → chat-DxysjBvt.js} +21 -23
  48. package/dist/src/{chatkit-D67HS_0b.js → chatkit-65VXf5SR.js} +58 -58
  49. package/dist/src/{chatkit-DAB_qfzI.js → chatkit-Be-Q-a9F.js} +58 -60
  50. package/dist/src/{chatkit-Biqb_wsD.js → chatkit-BxFvW8KY.js} +58 -60
  51. package/dist/src/{chatkit-PGG4ZYIn.cjs → chatkit-DKyPi1Gs.cjs} +58 -60
  52. package/dist/src/chunk-DEq-mXcV.js +15 -0
  53. package/dist/src/chunk-DRamLcfz.js +16 -0
  54. package/dist/src/{claude-agent-sdk-SVM6AdBu.js → claude-agent-sdk-BLTu0WBO.js} +31 -31
  55. package/dist/src/{claude-agent-sdk-C9SiaQub.cjs → claude-agent-sdk-CJH22shf.cjs} +31 -28
  56. package/dist/src/{claude-agent-sdk-C-IOTPfo.js → claude-agent-sdk-D6_k9FKA.js} +31 -29
  57. package/dist/src/{claude-agent-sdk-CiluSyW1.js → claude-agent-sdk-Dy5lT-Tx.js} +33 -20
  58. package/dist/src/{cloud-CZ-q9Ier.js → cloud-Bc9526yV.js} +7 -9
  59. package/dist/src/cloud-DmE0EwsY.js +4 -0
  60. package/dist/src/{cloudflare-ai-BahKHyhh.js → cloudflare-ai-C9r2sRhw.js} +16 -18
  61. package/dist/src/{cloudflare-ai-Dxyt50Nl.js → cloudflare-ai-CWWJCRim.js} +16 -4
  62. package/dist/src/{cloudflare-ai-Dfahv5SY.cjs → cloudflare-ai-ClWSdor4.cjs} +16 -17
  63. package/dist/src/{cloudflare-ai-v_qZD6_q.js → cloudflare-ai-ICsOuD-z.js} +17 -19
  64. package/dist/src/{cloudflare-gateway-BPWoZIzJ.cjs → cloudflare-gateway-C2_-KG5o.cjs} +21 -22
  65. package/dist/src/{cloudflare-gateway-Bi_FpOFy.js → cloudflare-gateway-D6O7AlYb.js} +23 -23
  66. package/dist/src/{cloudflare-gateway-btS7h1OZ.js → cloudflare-gateway-D6xFc5pa.js} +21 -25
  67. package/dist/src/{cloudflare-gateway-C0guUNwk.js → cloudflare-gateway-pXGHxJ47.js} +26 -14
  68. package/dist/src/{codex-sdk-DSxAnbfT.js → codex-sdk-C6UMlxwV.js} +28 -29
  69. package/dist/src/{codex-sdk-IYVi9fuM.js → codex-sdk-DUwKWezN.js} +28 -27
  70. package/dist/src/{codex-sdk-DulY0ZRq.js → codex-sdk-GGAw0qbD.js} +28 -29
  71. package/dist/src/{codex-sdk-DFKMtAyf.cjs → codex-sdk-fAO0c3yA.cjs} +28 -29
  72. package/dist/src/{cometapi-DkNBMk0G.js → cometapi-BasUi7-_.js} +17 -19
  73. package/dist/src/{cometapi-DzrR3SR_.js → cometapi-Bbjp5V4x.js} +16 -4
  74. package/dist/src/{cometapi-C9EEpJzT.js → cometapi-DkXrKi5z.js} +21 -24
  75. package/dist/src/{cometapi-DIO64tf4.cjs → cometapi-vY6aDZgo.cjs} +21 -22
  76. package/dist/src/{completion-CG29bfKX.js → completion-6Mx_iXxK.js} +11 -13
  77. package/dist/src/{completion-Bgf1VJoq.js → completion-C5rtR_9P.js} +11 -13
  78. package/dist/src/{completion-CCRT4kX1.cjs → completion-CDOouNzq.cjs} +21 -23
  79. package/dist/src/completion-C_P3ypkJ.js +120 -0
  80. package/dist/src/{createHash-Dw_iLu31.js → createHash-CTQmL3G2.js} +2 -3
  81. package/dist/src/{createHash-CYQy4YeL.cjs → createHash-CfZSc0b4.cjs} +13 -14
  82. package/dist/src/{createHash-CJcfskIZ.js → createHash-Da8fMwqB.js} +2 -3
  83. package/dist/src/createHash-DmPQkvBh.js +15 -0
  84. package/dist/src/{docker-D-ayp2FW.js → docker-5KcG-_86.js} +18 -20
  85. package/dist/src/{docker-DNcLR4Ig.cjs → docker-BwsKwxFs.cjs} +18 -19
  86. package/dist/src/{docker-egERKxCF.js → docker-CZnqU1XV.js} +18 -7
  87. package/dist/src/{docker-B81N0t4e.js → docker-DzxyDPIj.js} +19 -21
  88. package/dist/src/entrypoint.js +2 -3
  89. package/dist/src/{errors-DnGCbnx8.js → errors-P6ll7XSJ.js} +2 -2
  90. package/dist/src/{esm-B9dPm_BF.js → esm-C03C-mv3.js} +17 -20
  91. package/dist/src/{esm-D2pZ87fL.js → esm-CaIwzWR5.js} +18 -21
  92. package/dist/src/esm-Cd1AjG1D.js +379 -0
  93. package/dist/src/{esm-Ct-Joyue.cjs → esm-CnNt7sI4.cjs} +47 -49
  94. package/dist/src/eval-17JizQIv.js +15 -0
  95. package/dist/src/{eval-C-Nr6wX_.js → eval-DmFyWU7i.js} +47 -54
  96. package/dist/src/{evalResult-4BzI2tmj.js → evalResult-CDQiuUuf.js} +16 -12
  97. package/dist/src/{evalResult-DXMWJ3sx.js → evalResult-CTG2AHOS.js} +10 -11
  98. package/dist/src/evalResult-Cqj8pldJ.js +12 -0
  99. package/dist/src/{evalResult-CX8wQecI.cjs → evalResult-Dap2CekP.cjs} +20 -21
  100. package/dist/src/evalResult-DvcJAWJU.cjs +10 -0
  101. package/dist/src/evalResult-Hftn-S_i.js +10 -0
  102. package/dist/src/evaluator-B2CFNt-P.js +36 -0
  103. package/dist/src/{evaluator-8aGyV12L.js → evaluator-DPFRbFIL.js} +201 -229
  104. package/dist/src/{extractor-CD5yKL-G.js → extractor-CFG6bcWJ.js} +22 -24
  105. package/dist/src/{extractor-C031XmTA.cjs → extractor-DX36oYEv.cjs} +37 -39
  106. package/dist/src/{extractor-V5x_m1i0.js → extractor-M67RUtg6.js} +22 -24
  107. package/dist/src/extractor-YMU_Gvt8.js +374 -0
  108. package/dist/src/{fetch-D3OHf-lV.js → fetch-4M3YRaqL.js} +40 -45
  109. package/dist/src/fetch-60Gzydls.js +777 -0
  110. package/dist/src/{fetch-CXZI9RRr.js → fetch-BMv0O527.js} +23 -35
  111. package/dist/src/{fetch-BmbD-v1L.cjs → fetch-BxUk8odA.cjs} +244 -277
  112. package/dist/src/fetch-KV5kNASw.js +5 -0
  113. package/dist/src/{fileExtensions-ePDqouxn.js → fileExtensions-DnqA1y9x.js} +2 -2
  114. package/dist/src/{fileExtensions-BpuMmaFL.js → fileExtensions-Ds-foDzt.js} +2 -2
  115. package/dist/src/fileExtensions-LcDYkU4v.js +85 -0
  116. package/dist/src/{fileExtensions-DkJYkWUy.cjs → fileExtensions-bYh77CN8.cjs} +27 -28
  117. package/dist/src/{formatDuration-CdevI3An.js → formatDuration-DgBVMN65.js} +2 -2
  118. package/dist/src/{genaiTracer-Ce19n68P.js → genaiTracer-70Z8BIuV.js} +2 -3
  119. package/dist/src/{genaiTracer-CqNnnXrE.js → genaiTracer-C1rxGO8Q.js} +2 -3
  120. package/dist/src/genaiTracer-D3fD9dNV.js +256 -0
  121. package/dist/src/{genaiTracer-Dres3qrN.cjs → genaiTracer-DN4dQywX.cjs} +13 -14
  122. package/dist/src/graders-Bu0H9nXi.js +32 -0
  123. package/dist/src/{graders-DTeBrzWp.js → graders-CHO8EPM4.js} +349 -397
  124. package/dist/src/graders-Cfhkvx-e.js +34 -0
  125. package/dist/src/{graders--1y2u9HO.js → graders-CpdqD9PI.js} +349 -397
  126. package/dist/src/graders-DClJVpGP.cjs +32 -0
  127. package/dist/src/{graders-DohM2dir.cjs → graders-DOXycdlG.cjs} +684 -732
  128. package/dist/src/graders-DcnJsrMO.js +32 -0
  129. package/dist/src/graders-R9rYUM0d.js +13466 -0
  130. package/dist/src/{image-C3wHC9_h.js → image-BmEZqVmk.js} +9 -10
  131. package/dist/src/{image-O1u4bCFg.js → image-CBBVXWuT.js} +9 -10
  132. package/dist/src/{image-DpKl2F15.cjs → image-CDLQOcqT.cjs} +6 -7
  133. package/dist/src/{image-DmE-niFE.js → image-DJEvKveK.js} +6 -5
  134. package/dist/src/{image-CuKHuccK.cjs → image-DTedmQPg.cjs} +29 -30
  135. package/dist/src/{image-B0U4Hqll.js → image-gvmivTEe.js} +7 -9
  136. package/dist/src/image-pAX56tPG.js +257 -0
  137. package/dist/src/{image-DNEIf_aI.js → image-tL5hIOFh.js} +6 -8
  138. package/dist/src/index.cjs +605 -689
  139. package/dist/src/index.d.cts +11 -7
  140. package/dist/src/index.d.ts +11 -3
  141. package/dist/src/index.js +570 -658
  142. package/dist/src/{interactiveCheck-Bxj1Swex.js → interactiveCheck-BgLZUIt3.js} +7 -8
  143. package/dist/src/{invariant-DT20jrBd.js → invariant-BtWWVVhl.js} +2 -2
  144. package/dist/src/{invariant-1pAf2CD1.js → invariant-Ddh24eXh.js} +2 -2
  145. package/dist/src/{invariant-CKcJAQ6M.cjs → invariant-kfQ8Bu82.cjs} +7 -8
  146. package/dist/src/invariant-vgHWClmd.js +25 -0
  147. package/dist/src/{knowledgeBase-Be_zyW4L.js → knowledgeBase-CLJybhnF.js} +16 -16
  148. package/dist/src/{knowledgeBase-CEzQobWX.js → knowledgeBase-CoU-UQBg.js} +14 -9
  149. package/dist/src/{knowledgeBase-BZ41IFwq.js → knowledgeBase-DjWPVqSb.js} +14 -18
  150. package/dist/src/{knowledgeBase-D-5BMXlr.cjs → knowledgeBase-wkxuRFhA.cjs} +14 -15
  151. package/dist/src/{litellm-DnbRJ2if.js → litellm-B9Hysuri.js} +16 -18
  152. package/dist/src/{litellm-CRDqPhNI.js → litellm-CTfa0hqi.js} +15 -17
  153. package/dist/src/{litellm-hUSNM_M2.cjs → litellm-NYpQ8RQu.cjs} +15 -16
  154. package/dist/src/{litellm-9vR8zpfU.js → litellm-ePxtr9F1.js} +15 -4
  155. package/dist/src/{logger-CG1uZPbQ.js → logger-CT3IKMKA.js} +10 -29
  156. package/dist/src/{logger-B7sBeGa0.cjs → logger-Cp1GPUjj.cjs} +152 -180
  157. package/dist/src/logger-DLcq4dWf.js +713 -0
  158. package/dist/src/{logger-LSBxlt7a.js → logger-KkObSCzq.js} +13 -31
  159. package/dist/src/{luma-ray-Hm3d6VJE.cjs → luma-ray-B0GGNRc1.cjs} +20 -21
  160. package/dist/src/{luma-ray-drvgdpP9.js → luma-ray-BE2mOt6N.js} +20 -13
  161. package/dist/src/{luma-ray-4blv9iZ2.js → luma-ray-BW9IRGIc.js} +22 -21
  162. package/dist/src/{luma-ray-B2__8lYH.js → luma-ray-Cm1KZBhs.js} +20 -23
  163. package/dist/src/main.js +1170 -1321
  164. package/dist/src/{messages-XhiwCbi4.cjs → messages-1JrJs91T.cjs} +32 -34
  165. package/dist/src/{messages-CGPPidQr.js → messages-1x9atZmP.js} +22 -24
  166. package/dist/src/{messages-Uee41Mj5.js → messages-BLbWdsyt.js} +22 -24
  167. package/dist/src/messages-D8EA0oDc.js +240 -0
  168. package/dist/src/{meteor-BYykdXrV.js → meteor-44VjEACX.js} +3 -4
  169. package/dist/src/{meteor-CsopaHrH.js → meteor-D-SotUw9.js} +3 -4
  170. package/dist/src/{meteor-e-E-2vVl.cjs → meteor-DLZZ3osF.cjs} +3 -4
  171. package/dist/src/{meteor-C8lGP6P4.js → meteor-DUiCJRC-.js} +3 -4
  172. package/dist/src/{modelslab-yKz-ZNB4.js → modelslab-C1OLRmVX.js} +17 -10
  173. package/dist/src/{modelslab-E9gO-bYd.js → modelslab-CqXBy3U8.js} +18 -20
  174. package/dist/src/{modelslab-lUVW0cmB.cjs → modelslab-DcOSFwKh.cjs} +17 -18
  175. package/dist/src/{modelslab-ClBkr8_9.js → modelslab-X5-4LroM.js} +17 -19
  176. package/dist/src/{nova-reel-Dk8jNpId.js → nova-reel-BgS1ZWuK.js} +20 -13
  177. package/dist/src/{nova-reel-u2eF2Cxm.js → nova-reel-D2ZkOSyr.js} +22 -21
  178. package/dist/src/{nova-reel-D8CuO6QH.cjs → nova-reel-D9xfaMBs.cjs} +20 -21
  179. package/dist/src/{nova-reel-P9bwvtYX.js → nova-reel-DihqLeol.js} +20 -23
  180. package/dist/src/{nova-sonic-Ds1C-dpm.cjs → nova-sonic-DVu3mMIy.cjs} +30 -31
  181. package/dist/src/{nova-sonic-CK2rAiKi.js → nova-sonic-DezhVUYT.js} +30 -26
  182. package/dist/src/{nova-sonic-BaqWlkds.js → nova-sonic-P-CdUMlV.js} +30 -31
  183. package/dist/src/{nova-sonic-yZapPLv7.js → nova-sonic-Q3BOJeig.js} +31 -32
  184. package/dist/src/{openai-DUFopMrH.cjs → openai-Cuif0GEt.cjs} +8 -9
  185. package/dist/src/{openai-PblZ3jUE.js → openai-DElQ-fPX.js} +3 -4
  186. package/dist/src/{openai-CcN1B8Sb.js → openai-DhbB7eWK.js} +3 -4
  187. package/dist/src/openai-j-sE2O7r.js +44 -0
  188. package/dist/src/{openclaw-A-3_loM7.js → openclaw-BiSZPL7J.js} +20 -14
  189. package/dist/src/{openclaw-COn6QzDi.js → openclaw-Bv1DINsX.js} +20 -27
  190. package/dist/src/{openclaw-a3lylB-V.js → openclaw-D1D_ej1z.js} +21 -28
  191. package/dist/src/{openclaw-B6qqDr_u.cjs → openclaw-DAfWQn-o.cjs} +33 -39
  192. package/dist/src/opencode-sdk-C7m-wRfI.js +560 -0
  193. package/dist/src/opencode-sdk-CfaLN8PY.cjs +564 -0
  194. package/dist/src/opencode-sdk-D95s6SnR.js +562 -0
  195. package/dist/src/opencode-sdk-DxUPkLT7.js +560 -0
  196. package/dist/src/{otlpReceiver-oyf5wLGC.js → otlpReceiver--AIRW_S4.js} +53 -51
  197. package/dist/src/{otlpReceiver-BmmTiMjA.js → otlpReceiver-Bn5wGB1v.js} +53 -55
  198. package/dist/src/{otlpReceiver-lXsYVbpj.cjs → otlpReceiver-Diec4cln.cjs} +53 -55
  199. package/dist/src/{otlpReceiver-94URx7UW.js → otlpReceiver-g3ByGaXs.js} +53 -55
  200. package/dist/src/{providerRegistry-Cq_JK_CJ.js → providerRegistry-B0RUOLI_.js} +7 -8
  201. package/dist/src/{providerRegistry-DSSHjMKf.js → providerRegistry-CD8MEar9.js} +7 -8
  202. package/dist/src/{providerRegistry-CvHEVJad.cjs → providerRegistry-Civky8Ar.cjs} +12 -13
  203. package/dist/src/providerRegistry-DM8rZYol.js +45 -0
  204. package/dist/src/providers-B3HvufyI.js +33246 -0
  205. package/dist/src/{providers-BnFpbY_s.js → providers-BKRJTjBz.js} +1536 -1669
  206. package/dist/src/providers-C1rOSHiR.js +32 -0
  207. package/dist/src/{providers-Iil64vk9.js → providers-CFLy1_ji.js} +1543 -1676
  208. package/dist/src/{providers-DHbjzW2e.cjs → providers-CFu-TZl-.cjs} +1896 -2029
  209. package/dist/src/providers-CxmDwEFf.cjs +31 -0
  210. package/dist/src/providers-Dodakqr0.js +30 -0
  211. package/dist/src/providers-GIQ2TcsA.js +30 -0
  212. package/dist/src/{pythonUtils-CcT5LH1M.js → pythonUtils-C3py6GC1.js} +18 -19
  213. package/dist/src/{pythonUtils-DBbuI3QJ.cjs → pythonUtils-CTU3Y3lw.cjs} +42 -43
  214. package/dist/src/{pythonUtils-hZ8LeQLv.js → pythonUtils-D5nxkQ0P.js} +18 -19
  215. package/dist/src/pythonUtils-D6fwaDSg.js +249 -0
  216. package/dist/src/{quiverai-BuI0tE39.js → quiverai-C2jVwbH1.js} +8 -7
  217. package/dist/src/{quiverai-DCGSZt4U.js → quiverai-CI6gYJVI.js} +8 -10
  218. package/dist/src/{quiverai-DiMVJQDz.cjs → quiverai-CLkWkyZc.cjs} +8 -9
  219. package/dist/src/{quiverai-fQNkExW4.js → quiverai-MHSxbmmZ.js} +9 -11
  220. package/dist/src/{render-Dj1smHEb.js → render-Drod8m7K.js} +4 -5
  221. package/dist/src/{responses-DOAFFENS.js → responses-BKqJmhhc.js} +22 -25
  222. package/dist/src/{responses-CxzoQoBe.js → responses-CGw0DCzh.js} +22 -25
  223. package/dist/src/responses-jxdehPkC.js +660 -0
  224. package/dist/src/{responses-ghR3IOfy.cjs → responses-tD4Bd4dc.cjs} +37 -40
  225. package/dist/src/rubyUtils-BUHu6PhO.js +5 -0
  226. package/dist/src/{rubyUtils-CwbGmgYN.js → rubyUtils-BUVePouc.js} +27 -20
  227. package/dist/src/rubyUtils-BcuGX77l.js +222 -0
  228. package/dist/src/{rubyUtils-DudlFZed.js → rubyUtils-Boc4HZzX.js} +18 -19
  229. package/dist/src/rubyUtils-CP42kMvq.cjs +4 -0
  230. package/dist/src/{rubyUtils-C8MhKGHb.cjs → rubyUtils-DhCAlxZr.cjs} +48 -50
  231. package/dist/src/{sagemaker-gmskuyre.js → sagemaker-BK4Zb993.js} +75 -70
  232. package/dist/src/{sagemaker-DuM71dVU.js → sagemaker-BfiWTmvn.js} +77 -77
  233. package/dist/src/{sagemaker-77zbJ2Q2.cjs → sagemaker-CcQHM1jV.cjs} +75 -76
  234. package/dist/src/{sagemaker-CcxhlOAR.js → sagemaker-D2Q1c-sD.js} +75 -79
  235. package/dist/src/{scanner-DJYiSXQj.js → scanner-J8CA3LsV.js} +100 -121
  236. package/dist/src/server/index.js +5505 -67416
  237. package/dist/src/{server-B5v33lvE.cjs → server-B0PPuDw-.cjs} +57 -67
  238. package/dist/src/server-B1vi21hA.js +7 -0
  239. package/dist/src/{server-RV_i_YX5.js → server-BC7XJFgr.js} +19 -24
  240. package/dist/src/server-Cm9Kai_h.cjs +5 -0
  241. package/dist/src/{server-BJ4m4f1D.js → server-DbFphssR.js} +26 -29
  242. package/dist/src/server-OAs3nBRT.js +229 -0
  243. package/dist/src/{signal-BW33JuId.js → signal-BOTbd53Z.js} +9 -11
  244. package/dist/src/{slack-DEURelTy.cjs → slack-BmVAVGaK.cjs} +7 -8
  245. package/dist/src/{slack-BQYeW9L3.js → slack-DCUPTzS2.js} +8 -8
  246. package/dist/src/{slack-BB6yuZzp.js → slack-DOdy_kyv.js} +7 -8
  247. package/dist/src/{slack-2pRrhhgJ.js → slack-DXMKtA-f.js} +7 -9
  248. package/dist/src/store-BNmZ1KAz.cjs +5 -0
  249. package/dist/src/{store-D7CgQzAR.cjs → store-BSc-TF2w.cjs} +44 -45
  250. package/dist/src/store-BltJg2cd.js +6 -0
  251. package/dist/src/{store-s3SftUwF.js → store-D1tv90v3.js} +34 -35
  252. package/dist/src/{store-DJNsD1iC.js → store-DQLEjuEO.js} +40 -36
  253. package/dist/src/store-Ub2vaGJ1.js +228 -0
  254. package/dist/src/{tables-DfTsNN7X.js → tables-5EvT_Bwn.js} +19 -21
  255. package/dist/src/{tables-BKTmd6u7.cjs → tables-C7K-XKWp.cjs} +89 -91
  256. package/dist/src/{tables-DMegD0Xf.js → tables-D36WTqKX.js} +21 -23
  257. package/dist/src/tables-xKANLRBD.js +288 -0
  258. package/dist/src/telemetry-5BCRNBbe.cjs +5 -0
  259. package/dist/src/{telemetry-BedSm-bZ.js → telemetry-C15ziL8u.js} +17 -14
  260. package/dist/src/{telemetry--WAdAfVi.js → telemetry-C2YDkUQH.js} +11 -13
  261. package/dist/src/{telemetry-DQgVBCAb.cjs → telemetry-CbrnxHp_.cjs} +21 -24
  262. package/dist/src/telemetry-D4W5hboe.js +7 -0
  263. package/dist/src/telemetry-DMb2Mpfm.js +171 -0
  264. package/dist/src/{text-oiSbwSOI.js → text-B_UCRPp2.js} +2 -2
  265. package/dist/src/{text-oKzCBnK6.cjs → text-CW1cyrwj.cjs} +12 -13
  266. package/dist/src/{text-B_IrO4GZ.js → text-Db-Wt2u2.js} +2 -2
  267. package/dist/src/text-TIv0QYnd.js +22 -0
  268. package/dist/src/{tokenUsageUtils-FZd5O_4A.js → tokenUsageUtils-BDGe-iyI.js} +2 -2
  269. package/dist/src/{tokenUsageUtils-DmZSD2eU.js → tokenUsageUtils-DflFMjS0.js} +2 -2
  270. package/dist/src/tokenUsageUtils-NYT-WKS6.js +138 -0
  271. package/dist/src/{tokenUsageUtils-CXhxVj72.cjs → tokenUsageUtils-bVa1ga6f.cjs} +32 -33
  272. package/dist/src/{transcription-BO1AHegO.cjs → transcription-CL78qbOU.cjs} +14 -15
  273. package/dist/src/{transcription-mYS9vd5v.js → transcription-DAtxHhAM.js} +14 -7
  274. package/dist/src/{transcription-X2-B4vkX.js → transcription-LNZTNUUL.js} +14 -16
  275. package/dist/src/{transcription-lzBLiTFJ.js → transcription-QHh3AH6Z.js} +15 -17
  276. package/dist/src/{transform-DeGlxb0D.js → transform-Cgi24fJ7.js} +39 -47
  277. package/dist/src/{transform-B1Hi5lWS.cjs → transform-CzK1Q0zl.cjs} +24 -26
  278. package/dist/src/{transform-CYDILYDe.js → transform-DECvGmzp.js} +15 -13
  279. package/dist/src/{transform-Dfl89yi4.js → transform-DGLazrMm.js} +39 -47
  280. package/dist/src/transform-DGxXocjk.js +1506 -0
  281. package/dist/src/{transform-D5PjiWiZ.cjs → transform-DOcQeLld.cjs} +179 -187
  282. package/dist/src/transform-DTGDnAzW.js +6 -0
  283. package/dist/src/{transform-BEgStbHK.js → transform-DilY9wbS.js} +10 -12
  284. package/dist/src/transform-aa6tmVpZ.js +216 -0
  285. package/dist/src/transform-m3qNw4KP.cjs +5 -0
  286. package/dist/src/{transformersAvailability-SZnTS3pJ.js → transformersAvailability-CEVM2GNQ.js} +2 -2
  287. package/dist/src/{transformersAvailability-D-glmEy7.cjs → transformersAvailability-CwayUSlh.cjs} +2 -3
  288. package/dist/src/{transformersAvailability-CjeFXhuJ.js → transformersAvailability-D6c6ROpT.js} +2 -2
  289. package/dist/src/{types-CXQduE9o.js → types-CH3Ge2sE.js} +30 -90
  290. package/dist/src/{types-C5hEkb-x.js → types-CLKiCBW3.js} +25 -89
  291. package/dist/src/types-CN_TZ2GJ.js +3260 -0
  292. package/dist/src/{types-DWNf48sT.cjs → types-LJ0r3wbR.cjs} +500 -564
  293. package/dist/src/util-5cB-L7U3.js +1430 -0
  294. package/dist/src/util-6-GqIvzS.js +599 -0
  295. package/dist/src/{util-CoQjmE3u.js → util-B7T3SiBS.js} +4 -5
  296. package/dist/src/{util-D9eLdGfa.js → util-Betm42rL.js} +5 -6
  297. package/dist/src/{util-Bm_-UMD_.js → util-C-PPYSMq.js} +5 -6
  298. package/dist/src/{util-CyUdMzV0.cjs → util-CchiqXh_.cjs} +34 -35
  299. package/dist/src/{util-Du96oyYS.js → util-DaWTWKBK.js} +4 -5
  300. package/dist/src/{util-1wWM599Z.cjs → util-Db0a0AFH.cjs} +50 -51
  301. package/dist/src/{util-DQ984syk.js → util-Dlz_Wvgm.js} +37 -48
  302. package/dist/src/{util-_h4pVqrz.js → util-YT5HPZaS.js} +37 -48
  303. package/dist/src/{util-aLhtl3fe.cjs → util-Yz-1aEhW.cjs} +209 -220
  304. package/dist/src/util-ZZH-3QZz.js +293 -0
  305. package/dist/src/{utils-BjLy-Q72.cjs → utils-Cz9qXqII.cjs} +29 -32
  306. package/dist/src/{utils-CFMn2yHW.js → utils-XiOAgly5.js} +4 -7
  307. package/dist/src/utils-dLokC-eR.js +94 -0
  308. package/dist/src/{utils-DvWMzuMx.js → utils-f2-Moju7.js} +4 -7
  309. package/dist/tsconfig.tsbuildinfo +1 -1
  310. package/package.json +30 -30
  311. package/dist/src/app/assets/index-B2D0bCSI.js +0 -439
  312. package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
  313. package/dist/src/cache-ChPcurj7.js +0 -6
  314. package/dist/src/cache-VVu_W-yg.js +0 -8
  315. package/dist/src/cache-YLNCFEM2.cjs +0 -6
  316. package/dist/src/chunk-DHDDz29n.js +0 -22
  317. package/dist/src/chunk-FhC4c-0y.js +0 -21
  318. package/dist/src/cloud-BndfXy4H.js +0 -5
  319. package/dist/src/eval-BhHvMY82.js +0 -17
  320. package/dist/src/evalResult-Dq2gFNQY.js +0 -12
  321. package/dist/src/evalResult-nmcP5VKH.cjs +0 -12
  322. package/dist/src/evalResult-trqZjVYh.js +0 -14
  323. package/dist/src/evaluator-CnfPstzT.js +0 -39
  324. package/dist/src/fetch-IDPDue6F.cjs +0 -4
  325. package/dist/src/fetch-hKJ-It8q.js +0 -6
  326. package/dist/src/fetch-ouKnrWK-.js +0 -4
  327. package/dist/src/graders-CQn7WUsd.cjs +0 -34
  328. package/dist/src/graders-DC6QAbpW.js +0 -35
  329. package/dist/src/graders-DUWz3Y7j.js +0 -37
  330. package/dist/src/opencode-sdk-4bL9n-Gk.js +0 -382
  331. package/dist/src/opencode-sdk-BfC2zWcR.js +0 -376
  332. package/dist/src/opencode-sdk-DMJyuwMg.js +0 -380
  333. package/dist/src/opencode-sdk-Da-9adza.cjs +0 -383
  334. package/dist/src/providers-CsXB2Ix-.js +0 -35
  335. package/dist/src/providers-DO8ltjLC.js +0 -33
  336. package/dist/src/providers-Dtq-xnXd.cjs +0 -33
  337. package/dist/src/rubyUtils-BUbcND2f.js +0 -6
  338. package/dist/src/rubyUtils-Cr55X_KE.js +0 -5
  339. package/dist/src/rubyUtils-DlIiqoYo.cjs +0 -5
  340. package/dist/src/server-C2eQH4Gu.js +0 -6
  341. package/dist/src/server-CXWycu7H.cjs +0 -6
  342. package/dist/src/server-Q6OGlxxT.js +0 -8
  343. package/dist/src/store-B3EDO9Q3.js +0 -7
  344. package/dist/src/store-Dl9F8aw5.js +0 -6
  345. package/dist/src/store-SnrGrlt9.cjs +0 -6
  346. package/dist/src/telemetry-BGhiPZtl.js +0 -8
  347. package/dist/src/telemetry-CFfiYan6.cjs +0 -6
  348. package/dist/src/telemetry-DHzEduxX.js +0 -6
  349. package/dist/src/transform-C1x1ZlMQ.cjs +0 -6
  350. package/dist/src/transform-DYHjFmQu.js +0 -8
  351. package/dist/src/transform-rmwJT5JQ.js +0 -7
  352. package/dist/src/transformersAvailability-eJooj0gX.js +0 -35
@@ -0,0 +1,249 @@
1
+ import { _ as getEnvBool, b as getEnvString, i as logger, m as safeJsonStringify } from "./logger-DLcq4dWf.js";
2
+ import { n as getWrapperDir } from "./esm-CaIwzWR5.js";
3
+ import fs from "fs";
4
+ import path from "path";
5
+ import os from "os";
6
+ import { promisify } from "util";
7
+ import { execFile } from "child_process";
8
+ import { PythonShell } from "python-shell";
9
+ //#region src/python/pythonUtils.ts
10
+ const execFileAsync = promisify(execFile);
11
+ /**
12
+ * Gets an integer value from an environment variable.
13
+ * @param key - The environment variable name
14
+ * @returns The parsed integer value, or undefined if not set or not a valid integer
15
+ */
16
+ function getEnvInt(key) {
17
+ const value = process.env[key];
18
+ if (value === void 0) return;
19
+ const parsed = parseInt(value, 10);
20
+ return isNaN(parsed) ? void 0 : parsed;
21
+ }
22
+ /**
23
+ * Resolves the Python executable path from explicit config and environment.
24
+ * This centralizes the fallback logic: configPath > PROMPTFOO_PYTHON env var.
25
+ *
26
+ * Note: Does NOT apply the final 'python' default - that's handled by
27
+ * validatePythonPath. This preserves the distinction between "explicitly
28
+ * configured" (should fail if invalid) and "using system default" (should
29
+ * try fallback detection).
30
+ *
31
+ * @param configPath - Explicitly configured Python path from provider config
32
+ * @returns The configured path, or undefined if neither config nor env var is set
33
+ */
34
+ function getConfiguredPythonPath(configPath) {
35
+ if (configPath) return configPath;
36
+ return getEnvString("PROMPTFOO_PYTHON") || void 0;
37
+ }
38
+ const state = {
39
+ cachedPythonPath: null,
40
+ validationPromise: null
41
+ };
42
+ /**
43
+ * Try to find Python using Windows 'where' command, filtering out Microsoft Store stubs.
44
+ */
45
+ async function tryWindowsWhere() {
46
+ try {
47
+ const output = (await execFileAsync("where", ["python"])).stdout.trim();
48
+ if (!output) {
49
+ logger.debug("Windows 'where python' returned empty output");
50
+ return null;
51
+ }
52
+ const paths = output.split("\n").filter((path) => path.trim());
53
+ for (const pythonPath of paths) {
54
+ const trimmedPath = pythonPath.trim();
55
+ if (trimmedPath.includes("WindowsApps") || !trimmedPath.endsWith(".exe")) continue;
56
+ const validated = await tryPath(trimmedPath);
57
+ if (validated) return validated;
58
+ }
59
+ } catch (error) {
60
+ const errorMsg = error instanceof Error ? error.message : String(error);
61
+ logger.debug(`Windows 'where python' failed: ${errorMsg}`);
62
+ if (errorMsg.includes("Access is denied") || errorMsg.includes("EACCES")) logger.warn(`Permission denied when searching for Python: ${errorMsg}`);
63
+ }
64
+ return null;
65
+ }
66
+ /**
67
+ * Try Python commands to get sys.executable path.
68
+ */
69
+ async function tryPythonCommands(commands) {
70
+ for (const cmd of commands) try {
71
+ const executablePath = (await execFileAsync(cmd, ["-c", "import sys; print(sys.executable)"])).stdout.trim();
72
+ if (executablePath && executablePath !== "None") {
73
+ if (process.platform === "win32" && !executablePath.toLowerCase().endsWith(".exe")) {
74
+ if (executablePath.includes("\\") || /^[A-Za-z]:/.test(executablePath)) return executablePath + ".exe";
75
+ }
76
+ return executablePath;
77
+ }
78
+ } catch (error) {
79
+ const errorMsg = error instanceof Error ? error.message : String(error);
80
+ logger.debug(`Python command "${cmd}" failed: ${errorMsg}`);
81
+ if (errorMsg.includes("Access is denied") || errorMsg.includes("EACCES") || errorMsg.includes("EPERM")) logger.warn(`Permission denied when trying Python command "${cmd}": ${errorMsg}`);
82
+ }
83
+ return null;
84
+ }
85
+ /**
86
+ * Try direct command validation as final fallback.
87
+ */
88
+ async function tryDirectCommands(commands) {
89
+ for (const cmd of commands) try {
90
+ const validated = await tryPath(cmd);
91
+ if (validated) return validated;
92
+ } catch (error) {
93
+ const errorMsg = error instanceof Error ? error.message : String(error);
94
+ logger.debug(`Direct command "${cmd}" failed: ${errorMsg}`);
95
+ if (errorMsg.includes("Access is denied") || errorMsg.includes("EACCES") || errorMsg.includes("EPERM")) logger.warn(`Permission denied when trying Python command "${cmd}": ${errorMsg}`);
96
+ }
97
+ return null;
98
+ }
99
+ /**
100
+ * Attempts to get the Python executable path using platform-appropriate strategies.
101
+ * @returns The Python executable path if successful, or null if failed.
102
+ */
103
+ async function getSysExecutable() {
104
+ if (process.platform === "win32") {
105
+ const whereResult = await tryWindowsWhere();
106
+ if (whereResult) return whereResult;
107
+ const sysResult = await tryPythonCommands(["py", "py -3"]);
108
+ if (sysResult) return sysResult;
109
+ return await tryDirectCommands(["python"]);
110
+ } else return await tryPythonCommands(["python3", "python"]);
111
+ }
112
+ /**
113
+ * Attempts to validate a Python executable path.
114
+ * @param path - The path to the Python executable to test.
115
+ * @returns The validated path if successful, or null if invalid.
116
+ */
117
+ async function tryPath(path) {
118
+ let timeoutId;
119
+ try {
120
+ const timeoutPromise = new Promise((_, reject) => {
121
+ timeoutId = setTimeout(() => reject(/* @__PURE__ */ new Error("Command timed out")), 2500);
122
+ });
123
+ const result = await Promise.race([execFileAsync(path, ["--version"]), timeoutPromise]);
124
+ if (timeoutId) clearTimeout(timeoutId);
125
+ if (result.stdout.trim().startsWith("Python")) return path;
126
+ return null;
127
+ } catch {
128
+ if (timeoutId) clearTimeout(timeoutId);
129
+ return null;
130
+ }
131
+ }
132
+ /**
133
+ * Validates and caches the Python executable path.
134
+ *
135
+ * @param pythonPath - Path to the Python executable.
136
+ * @param isExplicit - If true, only tries the provided path.
137
+ * @returns Validated Python executable path.
138
+ * @throws {Error} If no valid Python executable is found.
139
+ */
140
+ async function validatePythonPath(pythonPath, isExplicit) {
141
+ if (state.cachedPythonPath) return state.cachedPythonPath;
142
+ if (!state.validationPromise) state.validationPromise = (async () => {
143
+ try {
144
+ const primaryPath = await tryPath(pythonPath);
145
+ if (primaryPath) {
146
+ state.cachedPythonPath = primaryPath;
147
+ state.validationPromise = null;
148
+ return primaryPath;
149
+ }
150
+ if (isExplicit) {
151
+ const error = /* @__PURE__ */ new Error(`Python 3 not found. Tried "${pythonPath}" Please ensure Python 3 is installed and set the PROMPTFOO_PYTHON environment variable to your Python 3 executable path (e.g., '${process.platform === "win32" ? "C:\\Python39\\python.exe" : "/usr/bin/python3"}').`);
152
+ state.validationPromise = null;
153
+ throw error;
154
+ }
155
+ const detectedPath = await getSysExecutable();
156
+ if (detectedPath) {
157
+ state.cachedPythonPath = detectedPath;
158
+ state.validationPromise = null;
159
+ return detectedPath;
160
+ }
161
+ const error = /* @__PURE__ */ new Error(`Python 3 not found. Tried "${pythonPath}", sys.executable detection, and fallback commands. Please ensure Python 3 is installed and set the PROMPTFOO_PYTHON environment variable to your Python 3 executable path (e.g., '${process.platform === "win32" ? "C:\\Python39\\python.exe" : "/usr/bin/python3"}').`);
162
+ state.validationPromise = null;
163
+ throw error;
164
+ } catch (error) {
165
+ state.validationPromise = null;
166
+ throw error;
167
+ }
168
+ })();
169
+ return state.validationPromise;
170
+ }
171
+ /**
172
+ * Runs a Python script with the specified method and arguments.
173
+ *
174
+ * @param scriptPath - The path to the Python script to run.
175
+ * @param method - The name of the method to call in the Python script.
176
+ * @param args - An array of arguments to pass to the Python script.
177
+ * @param options - Optional settings for running the Python script.
178
+ * @param options.pythonExecutable - Optional path to the Python executable.
179
+ * @returns A promise that resolves to the output of the Python script.
180
+ * @throws An error if there's an issue running the Python script or parsing its output.
181
+ */
182
+ async function runPython(scriptPath, method, args, options = {}) {
183
+ const absPath = path.resolve(scriptPath);
184
+ const tempJsonPath = path.join(os.tmpdir(), `promptfoo-python-input-json-${Date.now()}-${Math.random().toString(16).slice(2)}.json`);
185
+ const outputPath = path.join(os.tmpdir(), `promptfoo-python-output-json-${Date.now()}-${Math.random().toString(16).slice(2)}.json`);
186
+ const customPath = getConfiguredPythonPath(options.pythonExecutable);
187
+ let pythonPath = customPath || "python";
188
+ pythonPath = await validatePythonPath(pythonPath, typeof customPath === "string");
189
+ const pythonOptions = {
190
+ args: [
191
+ absPath,
192
+ method,
193
+ tempJsonPath,
194
+ outputPath
195
+ ],
196
+ env: process.env,
197
+ mode: "binary",
198
+ pythonPath,
199
+ scriptPath: getWrapperDir("python"),
200
+ ...getEnvBool("PROMPTFOO_PYTHON_DEBUG_ENABLED") && { stdio: "inherit" }
201
+ };
202
+ try {
203
+ fs.writeFileSync(tempJsonPath, safeJsonStringify(args), "utf-8");
204
+ logger.debug(`Running Python wrapper with args: ${safeJsonStringify(args)}`);
205
+ await new Promise((resolve, reject) => {
206
+ try {
207
+ const pyshell = new PythonShell("wrapper.py", pythonOptions);
208
+ pyshell.stdout?.on("data", (chunk) => {
209
+ logger.debug(chunk.toString("utf-8").trim());
210
+ });
211
+ pyshell.stderr?.on("data", (chunk) => {
212
+ logger.error(chunk.toString("utf-8").trim());
213
+ });
214
+ pyshell.end((err) => {
215
+ if (err) reject(err);
216
+ else resolve();
217
+ });
218
+ } catch (error) {
219
+ reject(error);
220
+ }
221
+ });
222
+ const output = fs.readFileSync(outputPath, "utf-8");
223
+ logger.debug(`Python script ${absPath} returned: ${output}`);
224
+ let result;
225
+ try {
226
+ result = JSON.parse(output);
227
+ logger.debug(`Python script ${absPath} parsed output type: ${typeof result}, structure: ${result ? JSON.stringify(Object.keys(result)) : "undefined"}`);
228
+ } catch (error) {
229
+ throw new Error(`Invalid JSON: ${error.message} when parsing result: ${output}\nStack Trace: ${error.stack}`);
230
+ }
231
+ if (result?.type !== "final_result") throw new Error("The Python script `call_api` function must return a dict with an `output`");
232
+ return result.data;
233
+ } catch (error) {
234
+ logger.error(`Error running Python script: ${error.message}\nStack Trace: ${error.stack?.replace("--- Python Traceback ---", "Python Traceback: ") || "No Python traceback available"}`);
235
+ throw new Error(`Error running Python script: ${error.message}\nStack Trace: ${error.stack?.replace("--- Python Traceback ---", "Python Traceback: ") || "No Python traceback available"}`);
236
+ } finally {
237
+ [tempJsonPath, outputPath].forEach((file) => {
238
+ try {
239
+ fs.unlinkSync(file);
240
+ } catch (error) {
241
+ logger.error(`Error removing ${file}: ${error}`);
242
+ }
243
+ });
244
+ }
245
+ }
246
+ //#endregion
247
+ export { validatePythonPath as i, getEnvInt as n, runPython as r, getConfiguredPythonPath as t };
248
+
249
+ //# sourceMappingURL=pythonUtils-D6fwaDSg.js.map
@@ -1,5 +1,6 @@
1
- import { A as fetchWithProxy, M as REQUEST_TIMEOUT_MS, P as logger_default, y as fetchWithCache, z as getEnvString } from "./server/index.js";
2
-
1
+ import { b as getEnvString, i as logger } from "./logger-DLcq4dWf.js";
2
+ import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-4M3YRaqL.js";
3
+ import { r as fetchWithCache } from "./cache-D3eqDYGU.js";
3
4
  //#region src/providers/quiverai.ts
4
5
  const QUIVERAI_API_BASE_URL = "https://api.quiver.ai/v1";
5
6
  const QUIVERAI_DEFAULT_MODEL = "arrow-preview";
@@ -61,7 +62,7 @@ var QuiverAiProvider = class {
61
62
  if (useStream) return await this.callApiStreaming(body);
62
63
  return await this.callApiNonStreaming(body, context);
63
64
  } catch (error) {
64
- logger_default.error(`QuiverAI API call error: ${error}`);
65
+ logger.error(`QuiverAI API call error: ${error}`);
65
66
  return { error: `QuiverAI API call error: ${error}` };
66
67
  }
67
68
  }
@@ -98,7 +99,7 @@ var QuiverAiProvider = class {
98
99
  });
99
100
  if (lastResp.status === 429 && attempt < maxRetries) {
100
101
  const waitMs = getRetryAfterMs(lastResp.headers, attempt);
101
- logger_default.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
102
+ logger.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
102
103
  await lastResp.body?.cancel();
103
104
  await new Promise((resolve) => setTimeout(resolve, waitMs));
104
105
  continue;
@@ -187,7 +188,7 @@ function parseSSELine(line) {
187
188
  usage: event.usage
188
189
  };
189
190
  } catch {
190
- logger_default.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
191
+ logger.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
191
192
  return {};
192
193
  }
193
194
  }
@@ -206,7 +207,7 @@ function createQuiverAiProvider(providerPath, providerOptions = {}, env) {
206
207
  env: providerOptions.env ?? env
207
208
  });
208
209
  }
209
-
210
210
  //#endregion
211
211
  export { createQuiverAiProvider };
212
- //# sourceMappingURL=quiverai-BuI0tE39.js.map
212
+
213
+ //# sourceMappingURL=quiverai-C2jVwbH1.js.map
@@ -1,8 +1,6 @@
1
- import "./chunk-FhC4c-0y.js";
2
- import { b as getEnvString, i as logger_default } from "./logger-CG1uZPbQ.js";
3
- import { h as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-D3OHf-lV.js";
4
- import { a as fetchWithCache } from "./cache-CIpsoBZR.js";
5
-
1
+ import { b as getEnvString, i as logger } from "./logger-CT3IKMKA.js";
2
+ import { p as REQUEST_TIMEOUT_MS, t as fetchWithProxy } from "./fetch-60Gzydls.js";
3
+ import { r as fetchWithCache } from "./cache-8XhNqPKW.js";
6
4
  //#region src/providers/quiverai.ts
7
5
  const QUIVERAI_API_BASE_URL = "https://api.quiver.ai/v1";
8
6
  const QUIVERAI_DEFAULT_MODEL = "arrow-preview";
@@ -64,7 +62,7 @@ var QuiverAiProvider = class {
64
62
  if (useStream) return await this.callApiStreaming(body);
65
63
  return await this.callApiNonStreaming(body, context);
66
64
  } catch (error) {
67
- logger_default.error(`QuiverAI API call error: ${error}`);
65
+ logger.error(`QuiverAI API call error: ${error}`);
68
66
  return { error: `QuiverAI API call error: ${error}` };
69
67
  }
70
68
  }
@@ -101,7 +99,7 @@ var QuiverAiProvider = class {
101
99
  });
102
100
  if (lastResp.status === 429 && attempt < maxRetries) {
103
101
  const waitMs = getRetryAfterMs(lastResp.headers, attempt);
104
- logger_default.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
102
+ logger.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
105
103
  await lastResp.body?.cancel();
106
104
  await new Promise((resolve) => setTimeout(resolve, waitMs));
107
105
  continue;
@@ -190,7 +188,7 @@ function parseSSELine(line) {
190
188
  usage: event.usage
191
189
  };
192
190
  } catch {
193
- logger_default.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
191
+ logger.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
194
192
  return {};
195
193
  }
196
194
  }
@@ -209,7 +207,7 @@ function createQuiverAiProvider(providerPath, providerOptions = {}, env) {
209
207
  env: providerOptions.env ?? env
210
208
  });
211
209
  }
212
-
213
210
  //#endregion
214
211
  export { createQuiverAiProvider };
215
- //# sourceMappingURL=quiverai-DCGSZt4U.js.map
212
+
213
+ //# sourceMappingURL=quiverai-CI6gYJVI.js.map
@@ -1,7 +1,6 @@
1
- const require_logger = require('./logger-B7sBeGa0.cjs');
2
- const require_fetch = require('./fetch-BmbD-v1L.cjs');
3
- const require_cache = require('./cache-BTVYfbka.cjs');
4
-
1
+ const require_logger = require("./logger-Cp1GPUjj.cjs");
2
+ const require_fetch = require("./fetch-BxUk8odA.cjs");
3
+ const require_cache = require("./cache-COish3-W.cjs");
5
4
  //#region src/providers/quiverai.ts
6
5
  const QUIVERAI_API_BASE_URL = "https://api.quiver.ai/v1";
7
6
  const QUIVERAI_DEFAULT_MODEL = "arrow-preview";
@@ -63,7 +62,7 @@ var QuiverAiProvider = class {
63
62
  if (useStream) return await this.callApiStreaming(body);
64
63
  return await this.callApiNonStreaming(body, context);
65
64
  } catch (error) {
66
- require_logger.logger_default.error(`QuiverAI API call error: ${error}`);
65
+ require_logger.logger.error(`QuiverAI API call error: ${error}`);
67
66
  return { error: `QuiverAI API call error: ${error}` };
68
67
  }
69
68
  }
@@ -100,7 +99,7 @@ var QuiverAiProvider = class {
100
99
  });
101
100
  if (lastResp.status === 429 && attempt < maxRetries) {
102
101
  const waitMs = getRetryAfterMs(lastResp.headers, attempt);
103
- require_logger.logger_default.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
102
+ require_logger.logger.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
104
103
  await lastResp.body?.cancel();
105
104
  await new Promise((resolve) => setTimeout(resolve, waitMs));
106
105
  continue;
@@ -189,7 +188,7 @@ function parseSSELine(line) {
189
188
  usage: event.usage
190
189
  };
191
190
  } catch {
192
- require_logger.logger_default.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
191
+ require_logger.logger.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
193
192
  return {};
194
193
  }
195
194
  }
@@ -208,7 +207,7 @@ function createQuiverAiProvider(providerPath, providerOptions = {}, env) {
208
207
  env: providerOptions.env ?? env
209
208
  });
210
209
  }
211
-
212
210
  //#endregion
213
211
  exports.createQuiverAiProvider = createQuiverAiProvider;
214
- //# sourceMappingURL=quiverai-DiMVJQDz.cjs.map
212
+
213
+ //# sourceMappingURL=quiverai-CLkWkyZc.cjs.map
@@ -1,10 +1,8 @@
1
1
  #!/usr/bin/env node
2
- import "./chunk-DHDDz29n.js";
3
- import { C as getEnvString, o as logger_default } from "./logger-LSBxlt7a.js";
4
- import { f as REQUEST_TIMEOUT_MS, n as fetchWithProxy } from "./fetch-CXZI9RRr.js";
5
- import "./cloud-CZ-q9Ier.js";
6
- import { a as fetchWithCache } from "./cache-jsiwsAJv.js";
7
-
2
+ import { C as getEnvString, o as logger } from "./logger-KkObSCzq.js";
3
+ import { f as REQUEST_TIMEOUT_MS, n as fetchWithProxy } from "./fetch-BMv0O527.js";
4
+ import "./cloud-Bc9526yV.js";
5
+ import { a as fetchWithCache } from "./cache-CG0SlR1d.js";
8
6
  //#region src/providers/quiverai.ts
9
7
  const QUIVERAI_API_BASE_URL = "https://api.quiver.ai/v1";
10
8
  const QUIVERAI_DEFAULT_MODEL = "arrow-preview";
@@ -66,7 +64,7 @@ var QuiverAiProvider = class {
66
64
  if (useStream) return await this.callApiStreaming(body);
67
65
  return await this.callApiNonStreaming(body, context);
68
66
  } catch (error) {
69
- logger_default.error(`QuiverAI API call error: ${error}`);
67
+ logger.error(`QuiverAI API call error: ${error}`);
70
68
  return { error: `QuiverAI API call error: ${error}` };
71
69
  }
72
70
  }
@@ -103,7 +101,7 @@ var QuiverAiProvider = class {
103
101
  });
104
102
  if (lastResp.status === 429 && attempt < maxRetries) {
105
103
  const waitMs = getRetryAfterMs(lastResp.headers, attempt);
106
- logger_default.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
104
+ logger.debug(`QuiverAI: rate limited, retry ${attempt + 1}/${maxRetries} in ${waitMs}ms`);
107
105
  await lastResp.body?.cancel();
108
106
  await new Promise((resolve) => setTimeout(resolve, waitMs));
109
107
  continue;
@@ -192,7 +190,7 @@ function parseSSELine(line) {
192
190
  usage: event.usage
193
191
  };
194
192
  } catch {
195
- logger_default.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
193
+ logger.debug(`QuiverAI: failed to parse SSE data: ${payload}`);
196
194
  return {};
197
195
  }
198
196
  }
@@ -211,7 +209,7 @@ function createQuiverAiProvider(providerPath, providerOptions = {}, env) {
211
209
  env: providerOptions.env ?? env
212
210
  });
213
211
  }
214
-
215
212
  //#endregion
216
213
  export { createQuiverAiProvider };
217
- //# sourceMappingURL=quiverai-fQNkExW4.js.map
214
+
215
+ //# sourceMappingURL=quiverai-MHSxbmmZ.js.map
@@ -1,7 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import "./logger-LSBxlt7a.js";
3
- import { t as canUseInteractiveUI } from "./interactiveCheck-Bxj1Swex.js";
4
-
2
+ import "./logger-KkObSCzq.js";
3
+ import { t as canUseInteractiveUI } from "./interactiveCheck-BgLZUIt3.js";
5
4
  //#region src/ui/render.ts
6
5
  /**
7
6
  * Process exit codes for signal handling.
@@ -112,7 +111,7 @@ function supportsColor() {
112
111
  if (process.env.FORCE_COLOR) return true;
113
112
  return process.stdout.isTTY && process.stdout.hasColors?.() !== false;
114
113
  }
115
-
116
114
  //#endregion
117
115
  export { canUseInteractiveUI, getTerminalSize, renderInteractive, runInteractive, supportsColor };
118
- //# sourceMappingURL=render-Dj1smHEb.js.map
116
+
117
+ //# sourceMappingURL=render-Drod8m7K.js.map
@@ -1,13 +1,12 @@
1
- import { b as getEnvString, i as logger_default, v as getEnvFloat, w as cliState_default, y as getEnvInt } from "./logger-CG1uZPbQ.js";
2
- import { r as importModule } from "./esm-D2pZ87fL.js";
3
- import { i as isJavascriptFile } from "./fileExtensions-ePDqouxn.js";
4
- import { d as maybeLoadToolsFromExternalFile, g as renderVarsInObject, u as maybeLoadResponseFormatFromExternalFile } from "./util-DQ984syk.js";
5
- import { h as REQUEST_TIMEOUT_MS, m as LONG_RUNNING_MODEL_TIMEOUT_MS } from "./fetch-D3OHf-lV.js";
6
- import { a as fetchWithCache } from "./cache-CIpsoBZR.js";
7
- import { t as OpenAiGenericProvider } from "./openai-PblZ3jUE.js";
8
- import { a as calculateOpenAICost, c as getTokenUsage$1, s as formatOpenAiError } from "./util-D9eLdGfa.js";
1
+ import { b as getEnvString, i as logger, v as getEnvFloat, w as state, y as getEnvInt } from "./logger-CT3IKMKA.js";
2
+ import { r as importModule } from "./esm-Cd1AjG1D.js";
3
+ import { i as isJavascriptFile } from "./fileExtensions-DnqA1y9x.js";
4
+ import { d as maybeLoadToolsFromExternalFile, g as renderVarsInObject, u as maybeLoadResponseFormatFromExternalFile } from "./util-Dlz_Wvgm.js";
5
+ import { f as LONG_RUNNING_MODEL_TIMEOUT_MS, p as REQUEST_TIMEOUT_MS } from "./fetch-60Gzydls.js";
6
+ import { r as fetchWithCache } from "./cache-8XhNqPKW.js";
7
+ import { t as OpenAiGenericProvider } from "./openai-DElQ-fPX.js";
8
+ import { a as calculateOpenAICost, c as getTokenUsage$1, s as formatOpenAiError } from "./util-Betm42rL.js";
9
9
  import path from "path";
10
-
11
10
  //#region src/providers/functionCallbackUtils.ts
12
11
  /**
13
12
  * Handles function callback execution for AI providers.
@@ -45,7 +44,7 @@ var FunctionCallbackHandler = class {
45
44
  isError: false
46
45
  };
47
46
  } catch (error) {
48
- logger_default.debug(`Function callback failed for ${functionInfo.name}: ${error}`);
47
+ logger.debug(`Function callback failed for ${functionInfo.name}: ${error}`);
49
48
  return {
50
49
  output: typeof call === "string" ? call : JSON.stringify(call),
51
50
  isError: true
@@ -115,8 +114,8 @@ var FunctionCallbackHandler = class {
115
114
  if (splits[0] && isJavascriptFile(splits[0])) [filePath, functionName] = splits;
116
115
  }
117
116
  try {
118
- const resolvedPath = path.resolve(cliState_default.basePath || "", filePath);
119
- logger_default.debug(`Loading function from ${resolvedPath}${functionName ? `:${functionName}` : ""}`);
117
+ const resolvedPath = path.resolve(state.basePath || "", filePath);
118
+ logger.debug(`Loading function from ${resolvedPath}${functionName ? `:${functionName}` : ""}`);
120
119
  const mod = await importModule(resolvedPath);
121
120
  const func = functionName && mod[functionName] ? mod[functionName] : mod.default || mod;
122
121
  if (typeof func !== "function") throw new Error(`Expected ${resolvedPath}${functionName ? `:${functionName}` : ""} to export a function, got ${typeof func}`);
@@ -158,7 +157,7 @@ var FunctionCallbackHandler = class {
158
157
  };
159
158
  } catch (error) {
160
159
  const errorMessage = error instanceof Error ? error.message : String(error);
161
- logger_default.debug(`MCP tool execution failed for ${toolName}: ${errorMessage}`);
160
+ logger.debug(`MCP tool execution failed for ${toolName}: ${errorMessage}`);
162
161
  return {
163
162
  output: `MCP Tool Error (${toolName}): ${errorMessage}`,
164
163
  isError: true
@@ -179,7 +178,6 @@ var FunctionCallbackHandler = class {
179
178
  this.loadedCallbacks = {};
180
179
  }
181
180
  };
182
-
183
181
  //#endregion
184
182
  //#region src/providers/responses/processor.ts
185
183
  /**
@@ -231,7 +229,7 @@ var ResponsesProcessor = class {
231
229
  this.config = config;
232
230
  }
233
231
  async processResponseOutput(data, requestConfig, cached) {
234
- logger_default.debug(`Processing ${this.config.providerType} responses output`, {
232
+ logger.debug(`Processing ${this.config.providerType} responses output`, {
235
233
  responseId: data.id,
236
234
  model: data.model
237
235
  });
@@ -256,7 +254,7 @@ var ResponsesProcessor = class {
256
254
  if (requestConfig.response_format?.type === "json_schema" && typeof finalOutput === "string") try {
257
255
  finalOutput = JSON.parse(finalOutput);
258
256
  } catch (error) {
259
- logger_default.error(`Failed to parse JSON output: ${error}`);
257
+ logger.error(`Failed to parse JSON output: ${error}`);
260
258
  }
261
259
  const result = {
262
260
  output: finalOutput,
@@ -276,7 +274,7 @@ var ResponsesProcessor = class {
276
274
  }
277
275
  }
278
276
  async processOutput(output, context) {
279
- if (this.config.modelName.includes("deep-research")) logger_default.debug(`Deep research response structure: ${JSON.stringify(context.data, null, 2)}`);
277
+ if (this.config.modelName.includes("deep-research")) logger.debug(`Deep research response structure: ${JSON.stringify(context.data, null, 2)}`);
280
278
  if (!output || !Array.isArray(output) || output.length === 0) throw new Error("Invalid response format: Missing output array");
281
279
  let result = "";
282
280
  let refusal = "";
@@ -284,7 +282,7 @@ var ResponsesProcessor = class {
284
282
  const annotations = [];
285
283
  for (const item of output) {
286
284
  if (!item || typeof item !== "object") {
287
- logger_default.warn(`Skipping invalid output item: ${JSON.stringify(item)}`);
285
+ logger.warn(`Skipping invalid output item: ${JSON.stringify(item)}`);
288
286
  continue;
289
287
  }
290
288
  const processed = await this.processOutputItem(item, context);
@@ -314,7 +312,7 @@ var ResponsesProcessor = class {
314
312
  case "mcp_call": return this.processMcpCall(item);
315
313
  case "mcp_approval_request": return this.processMcpApprovalRequest(item);
316
314
  default:
317
- logger_default.debug(`Unknown output item type: ${item.type}`);
315
+ logger.debug(`Unknown output item type: ${item.type}`);
318
316
  return {};
319
317
  }
320
318
  }
@@ -337,7 +335,7 @@ var ResponsesProcessor = class {
337
335
  const annotations = [];
338
336
  if (item.content) for (const contentItem of item.content) {
339
337
  if (!contentItem || typeof contentItem !== "object") {
340
- logger_default.warn(`Skipping invalid content item: ${JSON.stringify(contentItem)}`);
338
+ logger.warn(`Skipping invalid content item: ${JSON.stringify(contentItem)}`);
341
339
  continue;
342
340
  }
343
341
  if (contentItem.type === "output_text") {
@@ -398,7 +396,6 @@ var ResponsesProcessor = class {
398
396
  return Promise.resolve({ content });
399
397
  }
400
398
  };
401
-
402
399
  //#endregion
403
400
  //#region src/providers/openai/responses.ts
404
401
  var OpenAiResponsesProvider = class extends OpenAiGenericProvider {
@@ -580,7 +577,7 @@ var OpenAiResponsesProvider = class extends OpenAiGenericProvider {
580
577
  if (isDeepResearchModel || isGpt5ProModel) {
581
578
  const evalTimeout = getEnvInt("PROMPTFOO_EVAL_TIMEOUT_MS", 0);
582
579
  timeout = evalTimeout > 0 ? evalTimeout : LONG_RUNNING_MODEL_TIMEOUT_MS;
583
- logger_default.debug(`Using timeout of ${timeout}ms for long-running model ${this.modelName}`);
580
+ logger.debug(`Using timeout of ${timeout}ms for long-running model ${this.modelName}`);
584
581
  }
585
582
  let data;
586
583
  let status;
@@ -621,7 +618,7 @@ var OpenAiResponsesProvider = class extends OpenAiGenericProvider {
621
618
  };
622
619
  }
623
620
  } catch (err) {
624
- logger_default.error(`API call error: ${String(err)}`);
621
+ logger.error(`API call error: ${String(err)}`);
625
622
  await deleteFromCache?.();
626
623
  return {
627
624
  error: `API call error: ${String(err)}`,
@@ -657,7 +654,7 @@ var OpenAiResponsesProvider = class extends OpenAiGenericProvider {
657
654
  };
658
655
  }
659
656
  };
660
-
661
657
  //#endregion
662
658
  export { ResponsesProcessor as n, FunctionCallbackHandler as r, OpenAiResponsesProvider as t };
663
- //# sourceMappingURL=responses-DOAFFENS.js.map
659
+
660
+ //# sourceMappingURL=responses-BKqJmhhc.js.map