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.
Files changed (315) hide show
  1. package/README.md +2 -0
  2. package/dist/src/{accounts-CiBLOnA7.js → accounts-B2XmGjty.js} +5 -5
  3. package/dist/src/{accounts-gtkH-5KX.cjs → accounts-BPyfpSeU.cjs} +5 -5
  4. package/dist/src/{accounts-Bm2D8Db9.js → accounts-CFLK3mnD.js} +6 -6
  5. package/dist/src/{accounts-B0pgC1oV.js → accounts-Xatc0RYb.js} +5 -5
  6. package/dist/src/{agentic-utils-DS1g3GLF.js → agentic-utils-36epdqwB.js} +3 -3
  7. package/dist/src/{cometapi-CUQq3H_a.js → agentic-utils-D8yXo5Lm.js} +4 -61
  8. package/dist/src/{cometapi-C4xSqeID.cjs → agentic-utils-DAVsChuB.cjs} +24 -62
  9. package/dist/src/agentic-utils-DIYAAYE7.js +153 -0
  10. package/dist/src/{agents-CBr9A01V.js → agents-BBVJCIYr.js} +226 -13
  11. package/dist/src/{agents-Di9DKPzn.cjs → agents-BBWxKSM0.cjs} +7 -7
  12. package/dist/src/{agents-DgF2zDag.js → agents-Bqgfdokm.js} +228 -13
  13. package/dist/src/{agents-DbRtpYxR.cjs → agents-CAYbM7qD.cjs} +226 -13
  14. package/dist/src/{agents-9qiOy0ho.js → agents-CLQ-P15P.js} +7 -7
  15. package/dist/src/{agents-cLXA8a_8.js → agents-CgBniSlI.js} +8 -8
  16. package/dist/src/{agents-D__IdAlg.js → agents-DSSTV4bv.js} +226 -15
  17. package/dist/src/{agents-CmvBq8LV.js → agents-wg3ohknq.js} +7 -7
  18. package/dist/src/{aimlapi-BvlNH0gr.cjs → aimlapi-Bv8Fmc-b.cjs} +14 -14
  19. package/dist/src/{aimlapi-DHJU_kcV.js → aimlapi-BwGC1TtS.js} +13 -13
  20. package/dist/src/{aimlapi-CnkC2HqE.js → aimlapi-DaC3qZ-o.js} +14 -14
  21. package/dist/src/{aimlapi-B4rcnZgv.js → aimlapi-MgSLdvy7.js} +13 -13
  22. package/dist/src/app/assets/index-B6l9CVVb.js +439 -0
  23. package/dist/src/app/assets/index-DyZ0Ep37.css +1 -0
  24. package/dist/src/app/assets/sync-CStkzc6u.js +4 -0
  25. package/dist/src/app/assets/vendor-markdown-Bz7N-ca6.js +29 -0
  26. package/dist/src/app/index.html +3 -3
  27. package/dist/src/{audio-Bkv46et0.js → audio-Bn44pQxv.js} +4 -4
  28. package/dist/src/{audio-ClI_AFre.js → audio-DDA5WHdx.js} +4 -4
  29. package/dist/src/{audio-CGMyULza.cjs → audio-DVFjQ67_.cjs} +4 -4
  30. package/dist/src/{audio-Dz3z7s3J.js → audio-DjU9GswO.js} +5 -5
  31. package/dist/src/{base-CGrhspbK.cjs → base-BboXIF_0.cjs} +3 -3
  32. package/dist/src/{base-Dy1V8--Z.js → base-CKjwebIH.js} +3 -3
  33. package/dist/src/{base-DLKtKMFh.js → base-CqzQ4K8j.js} +3 -3
  34. package/dist/src/{base-CpjcHe4e.js → base-Cz2ZC_iA.js} +3 -3
  35. package/dist/src/{blobs-CMHN0Qcz.js → blobs-B1JriOyi.js} +3 -3
  36. package/dist/src/{blobs-BDbfYdrJ.js → blobs-BUWmKWzo.js} +3 -3
  37. package/dist/src/{blobs-D23XLin-.cjs → blobs-C6j0bvFz.cjs} +3 -3
  38. package/dist/src/{blobs-CBO20krR.js → blobs-DXTl6J3H.js} +3 -3
  39. package/dist/src/{cache-Dh5WtQps.cjs → cache-C5yFZ4gC.cjs} +3 -3
  40. package/dist/src/{cache-C4Nxf52C.js → cache-CaT5tPgo.js} +3 -3
  41. package/dist/src/cache-CyCanoMu.js +6 -0
  42. package/dist/src/{cache-BVeDlD87.js → cache-DSqR6ezl.js} +3 -3
  43. package/dist/src/cache-Df_QFDNu.cjs +5 -0
  44. package/dist/src/{cache-i1P6crbO.js → cache-HP0NP4k3.js} +3 -3
  45. package/dist/src/{chat-CzkrVDfz.js → chat-B-52XYI1.js} +12 -12
  46. package/dist/src/{chat-DJIw17u0.js → chat-B0iaWhoh.js} +14 -14
  47. package/dist/src/{chat-qmatte1u.js → chat-BE0qTA8e.js} +13 -13
  48. package/dist/src/{chat-BiKyneZl.js → chat-BEwdgGEg.js} +14 -14
  49. package/dist/src/{chat-C1Qst7jL.cjs → chat-BtIKkLKx.cjs} +13 -13
  50. package/dist/src/{chat-CgF-J-Jj.cjs → chat-CM8qWR3_.cjs} +15 -15
  51. package/dist/src/{chat-C2jrdPMx.js → chat-DK1U-eZ-.js} +12 -12
  52. package/dist/src/{chat-DqxYYtWA.js → chat-pxmiVpWe.js} +14 -14
  53. package/dist/src/{chatkit-65VXf5SR.js → chatkit-BYGQlHlV.js} +4 -4
  54. package/dist/src/{chatkit-DKyPi1Gs.cjs → chatkit-Cx174XI3.cjs} +4 -4
  55. package/dist/src/{chatkit-BxFvW8KY.js → chatkit-_8eJqKcD.js} +4 -4
  56. package/dist/src/{chatkit-Be-Q-a9F.js → chatkit-a2D6mY6s.js} +4 -4
  57. package/dist/src/{claude-agent-sdk-D9Z5Pr9X.cjs → claude-agent-sdk-8ddRp1L2.cjs} +35 -17
  58. package/dist/src/{claude-agent-sdk-DfCoW0E6.js → claude-agent-sdk-Bq5EArsX.js} +33 -15
  59. package/dist/src/{claude-agent-sdk-Apiy0iaz.js → claude-agent-sdk-CMjh4LFH.js} +33 -15
  60. package/dist/src/{claude-agent-sdk-D2bJee9S.js → claude-agent-sdk-HgbFioFw.js} +33 -15
  61. package/dist/src/cloud-DE3t1-ZI.js +4 -0
  62. package/dist/src/{cloud-C0dlstV_.js → cloud-z8KZpUoa.js} +3 -3
  63. package/dist/src/{cloudflare-ai-g7PB6VHR.js → cloudflare-ai-BGyXlpXJ.js} +13 -13
  64. package/dist/src/{cloudflare-ai-8TDxHR0x.js → cloudflare-ai-Bbp26N0L.js} +13 -13
  65. package/dist/src/{cloudflare-ai-CknbZ5LJ.cjs → cloudflare-ai-C62x6MQG.cjs} +14 -14
  66. package/dist/src/{cloudflare-ai-BxAGvfju.js → cloudflare-ai-DdKP9TKT.js} +14 -14
  67. package/dist/src/{cloudflare-gateway-CP9QEWYS.js → cloudflare-gateway-BwAaUgeW.js} +14 -14
  68. package/dist/src/{cloudflare-gateway-B9HWA5wf.js → cloudflare-gateway-D-e9i1Sn.js} +15 -15
  69. package/dist/src/{cloudflare-gateway-CKDb4dJ8.js → cloudflare-gateway-DXhtXDRb.js} +15 -163
  70. package/dist/src/{cloudflare-gateway-BSnDmHYo.cjs → cloudflare-gateway-Dx36ftqF.cjs} +15 -15
  71. package/dist/src/{codex-sdk-DUwKWezN.js → codex-sdk-BQEw16R_.js} +180 -11
  72. package/dist/src/{codex-sdk-C6UMlxwV.js → codex-sdk-C_07GuVS.js} +180 -11
  73. package/dist/src/{codex-sdk-GGAw0qbD.js → codex-sdk-DE5G18dx.js} +180 -11
  74. package/dist/src/{codex-sdk-fAO0c3yA.cjs → codex-sdk-ZLKfDjqP.cjs} +181 -12
  75. package/dist/src/cometapi-BDyV-NNm.js +62 -0
  76. package/dist/src/cometapi-C3hOlM7-.cjs +62 -0
  77. package/dist/src/{cometapi-BL9yvj_f.js → cometapi-hhL4TAh3.js} +14 -14
  78. package/dist/src/{cometapi-DFNiKmSz.js → cometapi-sp7sJpBD.js} +15 -15
  79. package/dist/src/{completion-5MzrpJxT.js → completion-BCimtq-h.js} +6 -6
  80. package/dist/src/{completion-qRoZAYRB.js → completion-DCjv7RZ3.js} +6 -6
  81. package/dist/src/{completion-CM6oK8PS.cjs → completion-DlXUhj5c.cjs} +6 -6
  82. package/dist/src/{completion-DZ083F31.js → completion-DoYy49ti.js} +6 -6
  83. package/dist/src/{createHash-CfZSc0b4.cjs → createHash-BYwImsYv.cjs} +2 -2
  84. package/dist/src/{docker-DcF2pRrj.cjs → docker-Cqj2-QVi.cjs} +14 -14
  85. package/dist/src/{docker-Bb5dcxr8.js → docker-CxCkwMzc.js} +13 -13
  86. package/dist/src/{docker-BvfL2BrW.js → docker-DpguQj-w.js} +14 -14
  87. package/dist/src/{docker-ExVyLp0S.js → docker-FeBni2dw.js} +13 -13
  88. package/dist/src/{esm-C03C-mv3.js → esm-7UIl0pPM.js} +2 -2
  89. package/dist/src/{esm-Cd1AjG1D.js → esm-CKWP3u_P.js} +3 -3
  90. package/dist/src/{esm-CnNt7sI4.cjs → esm-CipptfDu.cjs} +2 -2
  91. package/dist/src/{esm-CaIwzWR5.js → esm-SUNIX1x3.js} +3 -3
  92. package/dist/src/eval-7aEqoMs3.js +15 -0
  93. package/dist/src/{eval-Dg2nG4v2.js → eval-BTqTn7lb.js} +10 -10
  94. package/dist/src/{evalResult-BDMqrapS.js → evalResult-BkIhRdTe.js} +7 -7
  95. package/dist/src/evalResult-CYNHkk5A.js +12 -0
  96. package/dist/src/evalResult-CuvJeNiM.js +10 -0
  97. package/dist/src/{evalResult-BBRNtX4I.js → evalResult-DUDShQrm.js} +7 -7
  98. package/dist/src/{evalResult-fuaI8HkH.cjs → evalResult-DpARzUCb.cjs} +7 -7
  99. package/dist/src/evalResult-tGdilrWt.cjs +10 -0
  100. package/dist/src/evaluator-BBUqRhz1.js +36 -0
  101. package/dist/src/{evaluator-BhoWwp5b.js → evaluator-BcvOGaam.js} +823 -73
  102. package/dist/src/{extractor-D25qpmGX.js → extractor-C8XwivI9.js} +6 -6
  103. package/dist/src/{extractor-DReVID0K.js → extractor-CAZ2G3Kh.js} +6 -6
  104. package/dist/src/{extractor-pYLLi3wS.cjs → extractor-DG3sSfXE.cjs} +6 -6
  105. package/dist/src/{extractor-C0EVHewb.js → extractor-D_wd8jxt.js} +6 -6
  106. package/dist/src/{fetch-HaqdX7U1.js → fetch-BiYv2BZc.js} +3 -3
  107. package/dist/src/{fetch-BPkYtG8K.cjs → fetch-BnR9wSnm.cjs} +3 -3
  108. package/dist/src/{fetch-Cwxnd8zz.js → fetch-CVAtKnI3.js} +3 -3
  109. package/dist/src/{fetch-Dxpd4_sr.js → fetch-DoVRJZhJ.js} +4 -4
  110. package/dist/src/fetch-UWU706qb.js +5 -0
  111. package/dist/src/{genaiTracer-DN4dQywX.cjs → genaiTracer-BfxrvSUb.cjs} +2 -2
  112. package/dist/src/{graders-DU49_J8Y.cjs → graders-BElhu9ZY.cjs} +126 -55
  113. package/dist/src/{graders-DP7KFFo-.js → graders-BXAJ0sbS.js} +120 -55
  114. package/dist/src/graders-BxfEguVY.js +32 -0
  115. package/dist/src/graders-CzVMbEnv.js +34 -0
  116. package/dist/src/{graders-BTeBGqjJ.js → graders-DG7mhg-b.js} +120 -55
  117. package/dist/src/graders-DjCXfj0l.cjs +32 -0
  118. package/dist/src/{graders-Bj_Odv7c.js → graders-RjHF8VfG.js} +120 -55
  119. package/dist/src/graders-kHzIWOKu.js +32 -0
  120. package/dist/src/{image-BLmROtN3.cjs → image--F58eEIn.cjs} +6 -6
  121. package/dist/src/{image-B0h9VEMc.js → image-6WQXK8m8.js} +4 -4
  122. package/dist/src/{image-Dpxa1Jt6.js → image-B8b6f36E.js} +6 -6
  123. package/dist/src/{image-CHfWvljl.js → image-CoxZp9PZ.js} +6 -6
  124. package/dist/src/{image-B02ogr_b.js → image-DO0RYnjH.js} +5 -5
  125. package/dist/src/{image-DS-o-0ph.js → image-PoF6DN3x.js} +6 -6
  126. package/dist/src/{image-C1madmKh.cjs → image-fza3zuKs.cjs} +4 -4
  127. package/dist/src/{image-Bb4vWQLM.js → image-xNbw5ph2.js} +4 -4
  128. package/dist/src/index.cjs +853 -104
  129. package/dist/src/index.d.cts +573 -60
  130. package/dist/src/index.d.ts +573 -60
  131. package/dist/src/index.js +850 -102
  132. package/dist/src/{interactiveCheck-BgLZUIt3.js → interactiveCheck-BnMYOjMu.js} +2 -2
  133. package/dist/src/{knowledgeBase-B3OoKIej.js → knowledgeBase-Bi7CmDbx.js} +7 -7
  134. package/dist/src/{knowledgeBase-CYTLHOt1.js → knowledgeBase-Ce3ofVan.js} +8 -8
  135. package/dist/src/{knowledgeBase-D33Ty2l6.js → knowledgeBase-DFRXPZl_.js} +7 -7
  136. package/dist/src/{knowledgeBase-DOO_BM9b.cjs → knowledgeBase-DqrLX8fy.cjs} +7 -7
  137. package/dist/src/{litellm-AaeZcZQF.js → litellm-Bo2gQXpo.js} +14 -14
  138. package/dist/src/{litellm-NbjknEh6.js → litellm-CKiAxnoM.js} +13 -13
  139. package/dist/src/{litellm-I_hbp_dc.cjs → litellm-CnHI69aj.cjs} +14 -14
  140. package/dist/src/{litellm-TrljxD9G.js → litellm-Tc294Jhj.js} +13 -13
  141. package/dist/src/{logger-KkObSCzq.js → logger-BcJBzSSA.js} +10 -14
  142. package/dist/src/{logger-DLcq4dWf.js → logger-BnkjG2jt.js} +10 -14
  143. package/dist/src/{logger-Cp1GPUjj.cjs → logger-D5iKBpu_.cjs} +27 -13
  144. package/dist/src/{logger-CT3IKMKA.js → logger-DO8_zM18.js} +10 -14
  145. package/dist/src/{luma-ray-BS2_tY8L.js → luma-ray-0ehMPt5N.js} +10 -10
  146. package/dist/src/{luma-ray-DDsjcgZZ.js → luma-ray-C9q8rdQe.js} +9 -9
  147. package/dist/src/{luma-ray-f6I2fft-.js → luma-ray-DP0QA9qn.js} +9 -9
  148. package/dist/src/{luma-ray-Due0n7di.cjs → luma-ray-m9Ku2meV.cjs} +9 -9
  149. package/dist/src/main.js +69 -71
  150. package/dist/src/{messages-D0lx5qK7.js → messages-DJNo37Ko.js} +14 -9
  151. package/dist/src/{messages-BS17jdMx.js → messages-Dy9QecMs.js} +14 -9
  152. package/dist/src/{messages-Bs1kC7P4.cjs → messages-HJsyEh4o.cjs} +15 -10
  153. package/dist/src/{messages-ZJk778GH.js → messages-biC_ex-p.js} +14 -9
  154. package/dist/src/{modelslab-DRb74SP4.js → modelslab-B5J-ZM5c.js} +9 -9
  155. package/dist/src/{modelslab-Bx9IrZfS.js → modelslab-BI458moT.js} +10 -10
  156. package/dist/src/{modelslab-Bmni6skY.js → modelslab-BTOT8FUO.js} +9 -9
  157. package/dist/src/{modelslab-CoUX6Jc_.cjs → modelslab-IQbNg-r7.cjs} +9 -9
  158. package/dist/src/{nova-reel-bgjxilYW.js → nova-reel-BZ9y-Y5s.js} +9 -9
  159. package/dist/src/{nova-reel-C_QM18Xn.cjs → nova-reel-CE5etkv9.cjs} +9 -9
  160. package/dist/src/{nova-reel-D_W1tjMH.js → nova-reel-DEeQlnOJ.js} +10 -10
  161. package/dist/src/{nova-reel-BfPq-0Yk.js → nova-reel-Xw1SXLpg.js} +9 -9
  162. package/dist/src/{nova-sonic-De1HW5fD.js → nova-sonic-DWswpN1E.js} +7 -7
  163. package/dist/src/{nova-sonic-CFb5GYhg.js → nova-sonic-DXTLpi-r.js} +6 -6
  164. package/dist/src/{nova-sonic-zfcljeRp.cjs → nova-sonic-N0yCm0vb.cjs} +6 -6
  165. package/dist/src/{nova-sonic-DIGQNR07.js → nova-sonic-Ogqf-csn.js} +6 -6
  166. package/dist/src/{openai-DhbB7eWK.js → openai-BMcwgD5C.js} +2 -2
  167. package/dist/src/{openai-j-sE2O7r.js → openai-BcB5KlTk.js} +2 -2
  168. package/dist/src/{openai-Cuif0GEt.cjs → openai-CoxGAQwn.cjs} +2 -2
  169. package/dist/src/{openai-DElQ-fPX.js → openai-D6wITiVn.js} +2 -2
  170. package/dist/src/{openclaw-tiVYRtr-.js → openclaw-0Sv7AK3O.js} +13 -13
  171. package/dist/src/{openclaw-CSugPYAr.cjs → openclaw-CXxbKgDH.cjs} +14 -14
  172. package/dist/src/{openclaw-DuvJKEW5.js → openclaw-D1FSCps-.js} +13 -13
  173. package/dist/src/{openclaw-DiSz3I5L.js → openclaw-D2ENvu7a.js} +14 -14
  174. package/dist/src/{opencode-sdk-0j6rTWNb.js → opencode-sdk-C71Z0ehR.js} +13 -13
  175. package/dist/src/{opencode-sdk-B3CWY9h_.js → opencode-sdk-CHCs7dEb.js} +12 -12
  176. package/dist/src/{opencode-sdk-C2y6UkP2.js → opencode-sdk-DDxj4QqH.js} +12 -12
  177. package/dist/src/{opencode-sdk-BL764Jdi.cjs → opencode-sdk-WWJhnbKr.cjs} +16 -16
  178. package/dist/src/{otlpReceiver-C99PPb48.js → otlpReceiver-C9KlUtxh.js} +6 -6
  179. package/dist/src/{otlpReceiver-CdNBdbsk.js → otlpReceiver-CZL48YfC.js} +6 -6
  180. package/dist/src/{otlpReceiver-D89fR-rC.js → otlpReceiver-CavGAA6k.js} +6 -6
  181. package/dist/src/{otlpReceiver-CGq6LspY.cjs → otlpReceiver-DHKqJlsz.cjs} +6 -6
  182. package/dist/src/{providerRegistry-B0RUOLI_.js → providerRegistry-B9lh-_tx.js} +2 -2
  183. package/dist/src/{providerRegistry-Civky8Ar.cjs → providerRegistry-BTDgfV5h.cjs} +2 -2
  184. package/dist/src/{providerRegistry-CD8MEar9.js → providerRegistry-BkzVH5Ba.js} +2 -2
  185. package/dist/src/{providerRegistry-DM8rZYol.js → providerRegistry-CUWki5mQ.js} +2 -2
  186. package/dist/src/providers-BSLEaIQG.js +32 -0
  187. package/dist/src/{providers-CgKOSgTR.cjs → providers-CScd1wN6.cjs} +733 -464
  188. package/dist/src/{providers-BlqUifFg.js → providers-Ch6Mr0gn.js} +795 -526
  189. package/dist/src/{providers-Dk_6ocUX.js → providers-Cn73d5sr.js} +795 -526
  190. package/dist/src/providers-D-FnDg8k.cjs +31 -0
  191. package/dist/src/providers-DEYiFVAo.js +30 -0
  192. package/dist/src/{providers-D8lF1sqW.js → providers-DvddrgxL.js} +795 -526
  193. package/dist/src/providers-sS2WI8YD.js +30 -0
  194. package/dist/src/{pythonUtils-D6fwaDSg.js → pythonUtils-Bzwbgpbg.js} +3 -3
  195. package/dist/src/{pythonUtils-D5nxkQ0P.js → pythonUtils-Cpo0Ez1p.js} +3 -3
  196. package/dist/src/{pythonUtils-CTU3Y3lw.cjs → pythonUtils-dAVigVK-.cjs} +3 -3
  197. package/dist/src/{pythonUtils-C3py6GC1.js → pythonUtils-wIqk7zAf.js} +3 -3
  198. package/dist/src/{quiverai-CIaELU_m.js → quiverai-BeofbLVc.js} +4 -4
  199. package/dist/src/{quiverai-uH-dcTIr.js → quiverai-CCQn73lq.js} +5 -5
  200. package/dist/src/{quiverai-PdShCPox.cjs → quiverai-CcUhPIBg.cjs} +4 -4
  201. package/dist/src/{quiverai-BbOUOn2L.js → quiverai-DVSEqJiq.js} +4 -4
  202. package/dist/src/{render-Drod8m7K.js → render-BHl6QVq9.js} +3 -3
  203. package/dist/src/{responses-WNGNYe3K.js → responses-BKP_WYis.js} +14 -10
  204. package/dist/src/{responses-DIR9Ud3j.js → responses-CQb1Tj69.js} +14 -10
  205. package/dist/src/{responses-CB2jwoAr.js → responses-CgNyTPsY.js} +14 -10
  206. package/dist/src/{responses-D8SBTL64.cjs → responses-mo0KQDbu.cjs} +14 -10
  207. package/dist/src/rubyUtils-B1HXG4ej.cjs +4 -0
  208. package/dist/src/{rubyUtils-DhCAlxZr.cjs → rubyUtils-CGeUtCfW.cjs} +3 -3
  209. package/dist/src/{rubyUtils-Boc4HZzX.js → rubyUtils-CiVfln3g.js} +3 -3
  210. package/dist/src/{rubyUtils-BcuGX77l.js → rubyUtils-DECSbsfY.js} +3 -3
  211. package/dist/src/{rubyUtils-BUVePouc.js → rubyUtils-PgU-gHmx.js} +3 -3
  212. package/dist/src/rubyUtils-Rt6pKA96.js +5 -0
  213. package/dist/src/{sagemaker-CNBxx5CJ.js → sagemaker-CVv8W7so.js} +17 -17
  214. package/dist/src/{sagemaker-CemTFp2h.js → sagemaker-CqeASYE5.js} +17 -17
  215. package/dist/src/{sagemaker-YSyBXQQh.js → sagemaker-MUbD5V3v.js} +18 -18
  216. package/dist/src/{sagemaker-Cl28mZU2.cjs → sagemaker-jiw1wQa-.cjs} +17 -17
  217. package/dist/src/{scanner-BsBlNXNn.js → scanner-DVDeUz1r.js} +10 -10
  218. package/dist/src/server/index.js +854 -106
  219. package/dist/src/server-B0Xh1Gx-.js +7 -0
  220. package/dist/src/{server-C_7Ax-hA.cjs → server-BtoCXeXI.cjs} +4 -4
  221. package/dist/src/{server-VWgWb00X.js → server-CP9qKM40.js} +4 -4
  222. package/dist/src/{server-CuxBbeSY.js → server-Cns05F1j.js} +5 -5
  223. package/dist/src/server-DJTKu9IR.cjs +5 -0
  224. package/dist/src/{server-CqzrVGpF.js → server-DZ9MtCn0.js} +6 -6
  225. package/dist/src/{signal-4U3mfRvL.js → signal-C3ZTsUgi.js} +3 -3
  226. package/dist/src/{slack-DOdy_kyv.js → slack-2sdpGzbt.js} +2 -2
  227. package/dist/src/{slack-BmVAVGaK.cjs → slack-94iG3T0s.cjs} +2 -2
  228. package/dist/src/{slack-DCUPTzS2.js → slack-BR0HtO3K.js} +2 -2
  229. package/dist/src/{slack-DXMKtA-f.js → slack-DCEV-vWP.js} +2 -2
  230. package/dist/src/store-C5u6MgC8.js +6 -0
  231. package/dist/src/{store-DLlFCC4h.cjs → store-CLyU7AtI.cjs} +17 -5
  232. package/dist/src/store-CNHk-De4.cjs +5 -0
  233. package/dist/src/{store-DXilxTl-.js → store-Cj258DgL.js} +17 -5
  234. package/dist/src/{store-Dim__MDd.js → store-P8OKm19S.js} +17 -5
  235. package/dist/src/{store-CXGFv4aR.js → store-VB0GP46K.js} +17 -5
  236. package/dist/src/{tables-DLJPUdUE.js → tables-BEIFz2tM.js} +3 -3
  237. package/dist/src/{tables-DPi7wKeM.cjs → tables-BdZQEpRz.cjs} +3 -3
  238. package/dist/src/{tables-gftXzE9I.js → tables-DmzvLbeZ.js} +3 -3
  239. package/dist/src/{tables-6YKwjN9-.js → tables-kC7R5kiK.js} +3 -3
  240. package/dist/src/{telemetry-CMrFgtPB.js → telemetry-BnH5VJAU.js} +4 -4
  241. package/dist/src/{telemetry-Dthj_BbD.js → telemetry-BugWqKiu.js} +4 -4
  242. package/dist/src/{telemetry-Cps3mIU-.js → telemetry-DPXLd7UE.js} +4 -4
  243. package/dist/src/telemetry-Yig0Tino.js +7 -0
  244. package/dist/src/telemetry-p8Pwqm1i.cjs +5 -0
  245. package/dist/src/{telemetry-DaX14Chu.cjs → telemetry-re627Lre.cjs} +4 -4
  246. package/dist/src/{transcription-NLVG9MT1.cjs → transcription-BvtsrzRG.cjs} +13 -13
  247. package/dist/src/{transcription-BNYURcXg.js → transcription-CaMivnjG.js} +13 -13
  248. package/dist/src/{transcription-s6A-bNrZ.js → transcription-DOMMTu01.js} +14 -14
  249. package/dist/src/{transcription-B_OdaHp7.js → transcription-Hb3VnC4M.js} +13 -13
  250. package/dist/src/{transform-DuHvhZpj.cjs → transform-0BwoBsvO.cjs} +19 -5
  251. package/dist/src/{transform-uAytVuyX.js → transform-B2-jIv68.js} +8 -6
  252. package/dist/src/{transform-DECvGmzp.js → transform-BqPkNPYm.js} +4 -4
  253. package/dist/src/{transform-aa6tmVpZ.js → transform-BzK09Q_9.js} +4 -4
  254. package/dist/src/transform-ChNIpHz7.js +6 -0
  255. package/dist/src/{transform-D5HsjduX.js → transform-DrleutM3.js} +8 -6
  256. package/dist/src/{transform-vNucnNr0.js → transform-DyDAwEpE.js} +8 -6
  257. package/dist/src/transform-PtQ6rAE3.cjs +5 -0
  258. package/dist/src/{transform-CzK1Q0zl.cjs → transform-ZrG2dvlo.cjs} +4 -4
  259. package/dist/src/{transform-DilY9wbS.js → transform-ljLYHEPh.js} +4 -4
  260. package/dist/src/{transformersAvailability-CEVM2GNQ.js → transformersAvailability-BGkzavwb.js} +1 -1
  261. package/dist/src/{transformersAvailability-CwayUSlh.cjs → transformersAvailability-DKoRtQLy.cjs} +1 -1
  262. package/dist/src/{types-Cbd8uOMq.js → types-CIhFeUC4.js} +7 -1
  263. package/dist/src/{types-CzW2QFyi.js → types-Cd3ygw8W.js} +7 -1
  264. package/dist/src/{types-C_7nyzr1.cjs → types-D8cGDZbL.cjs} +8 -2
  265. package/dist/src/{types-DmyIJ-sR.js → types-q8GXGF65.js} +7 -1
  266. package/dist/src/{util-DGNOS1db.cjs → util--9u9UVCt.cjs} +3 -3
  267. package/dist/src/{util-ZzmqNPlg.js → util-BLvy9qfE.js} +7 -7
  268. package/dist/src/{util-C1CeHl-P.js → util-Bm3E9jpK.js} +7 -7
  269. package/dist/src/{util-BV4XUC0n.js → util-BtoGs5Cb.js} +18 -4
  270. package/dist/src/{util-BzMcevZc.cjs → util-CFj4YKIn.cjs} +18 -4
  271. package/dist/src/{util-BRYkYPTd.js → util-CMMkIxfU.js} +7 -7
  272. package/dist/src/{util-Dnmk2mBQ.js → util-CgDCK4KI.js} +18 -4
  273. package/dist/src/{util-B9vlHIIh.cjs → util-CuLo2pMR.cjs} +7 -7
  274. package/dist/src/{util-CMy69ZgQ.js → util-DM2rTn_6.js} +18 -4
  275. package/dist/src/{util-B3xGByQh.js → util-DMFeUvLz.js} +3 -3
  276. package/dist/src/{util-BHGHw5G1.js → util-DbVG-yZU.js} +3 -3
  277. package/dist/src/{util-Bv6uGDfH.js → util-vNmDL5DT.js} +3 -3
  278. package/dist/src/{utils-XiOAgly5.js → utils-CFxO9KGo.js} +2 -2
  279. package/dist/src/{utils-f2-Moju7.js → utils-DEuL4VNB.js} +2 -2
  280. package/dist/src/{utils-Cz9qXqII.cjs → utils-DKw8mrgr.cjs} +3 -3
  281. package/dist/src/{utils-dLokC-eR.js → utils-DOjD4dTC.js} +2 -2
  282. package/dist/tsconfig.tsbuildinfo +1 -1
  283. package/package.json +32 -32
  284. package/dist/src/app/assets/index-4LKxG2CG.js +0 -439
  285. package/dist/src/app/assets/index-C3zcsZFQ.css +0 -1
  286. package/dist/src/app/assets/sync-9qqYcY-B.js +0 -4
  287. package/dist/src/app/assets/vendor-markdown-0tekx3KX.js +0 -29
  288. package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
  289. package/dist/src/cache-CeUpFm3M.cjs +0 -5
  290. package/dist/src/cache-n-RCJ-hL.js +0 -6
  291. package/dist/src/cloud-BBh91EUK.js +0 -4
  292. package/dist/src/eval-B3r2CVXr.js +0 -15
  293. package/dist/src/evalResult-5xwYnECe.js +0 -12
  294. package/dist/src/evalResult-71lY93Kj.cjs +0 -10
  295. package/dist/src/evalResult-Dx5P5cIv.js +0 -10
  296. package/dist/src/evaluator-Jx6bRZV6.js +0 -36
  297. package/dist/src/fetch-BxNb_Lp3.js +0 -5
  298. package/dist/src/graders-B_pgMLS2.js +0 -34
  299. package/dist/src/graders-DErokPDO.cjs +0 -32
  300. package/dist/src/graders-DR_uNe54.js +0 -32
  301. package/dist/src/graders-w3176Wz-.js +0 -32
  302. package/dist/src/providers-B7V0njNs.js +0 -32
  303. package/dist/src/providers-BEwbhv0X.js +0 -30
  304. package/dist/src/providers-CH3C7zf7.js +0 -30
  305. package/dist/src/providers-zyB6k_38.cjs +0 -31
  306. package/dist/src/rubyUtils-BUHu6PhO.js +0 -5
  307. package/dist/src/rubyUtils-CP42kMvq.cjs +0 -4
  308. package/dist/src/server-DA4Cyrrq.js +0 -7
  309. package/dist/src/server-Dulb-4-K.cjs +0 -5
  310. package/dist/src/store-CXS-Q_91.js +0 -6
  311. package/dist/src/store-eYkaKMwq.cjs +0 -5
  312. package/dist/src/telemetry-BpMfhthR.cjs +0 -5
  313. package/dist/src/telemetry-Dw38hanS.js +0 -7
  314. package/dist/src/transform-DTGDnAzW.js +0 -6
  315. package/dist/src/transform-m3qNw4KP.cjs +0 -5
package/README.md CHANGED
@@ -20,6 +20,8 @@
20
20
  <a href="https://discord.gg/promptfoo">Discord</a>
21
21
  </p>
22
22
 
23
+ > Update (March 16, 2026): Promptfoo has joined OpenAI. Promptfoo remains open source and MIT licensed. Read the [company update](https://www.promptfoo.dev/blog/promptfoo-joining-openai/).
24
+
23
25
  ## Quick Start
24
26
 
25
27
  ```sh
@@ -1,5 +1,5 @@
1
- import { C as isCI, b as getEnvString, i as logger } from "./logger-CT3IKMKA.js";
2
- import { O as TERMINAL_MAX_WIDTH, a as CloudConfig, c as writeGlobalConfig, l as writeGlobalConfigPartial, r as fetchWithTimeout, s as readGlobalConfig } from "./fetch-Cwxnd8zz.js";
1
+ import { C as getEnvString, E as isCI, a as logger } from "./logger-DO8_zM18.js";
2
+ import { O as TERMINAL_MAX_WIDTH, a as CloudConfig, c as writeGlobalConfig, l as writeGlobalConfigPartial, r as fetchWithTimeout, s as readGlobalConfig } from "./fetch-CVAtKnI3.js";
3
3
  import chalk from "chalk";
4
4
  import { z } from "zod";
5
5
  import input from "@inquirer/input";
@@ -76,7 +76,7 @@ function getAuthMethod() {
76
76
  * Used by both CLI and server routes
77
77
  */
78
78
  async function checkEmailStatus(options) {
79
- const { default: telemetry } = await import("./telemetry-Dthj_BbD.js").then((n) => n.n);
79
+ const { default: telemetry } = await import("./telemetry-BugWqKiu.js").then((n) => n.n);
80
80
  const ciMode = isCI();
81
81
  const userEmail = ciMode ? CI_PLACEHOLDER_EMAIL : getUserEmail();
82
82
  if (!userEmail) return {
@@ -125,7 +125,7 @@ async function checkEmailStatus(options) {
125
125
  }
126
126
  }
127
127
  async function promptForEmailUnverified() {
128
- const { default: telemetry } = await import("./telemetry-Dthj_BbD.js").then((n) => n.n);
128
+ const { default: telemetry } = await import("./telemetry-BugWqKiu.js").then((n) => n.n);
129
129
  const ciMode = isCI();
130
130
  const existingEmail = getUserEmail();
131
131
  let email = ciMode ? CI_PLACEHOLDER_EMAIL : existingEmail;
@@ -198,4 +198,4 @@ async function checkEmailStatusAndMaybeExit(options) {
198
198
  //#endregion
199
199
  export { getUserId as a, setUserEmail as c, getUserEmail as i, getAuthMethod as n, isLoggedIntoCloud as o, getAuthor as r, promptForEmailUnverified as s, checkEmailStatusAndMaybeExit as t };
200
200
 
201
- //# sourceMappingURL=accounts-CiBLOnA7.js.map
201
+ //# sourceMappingURL=accounts-B2XmGjty.js.map
@@ -1,5 +1,5 @@
1
- const require_logger = require("./logger-Cp1GPUjj.cjs");
2
- const require_fetch = require("./fetch-BPkYtG8K.cjs");
1
+ const require_logger = require("./logger-D5iKBpu_.cjs");
2
+ const require_fetch = require("./fetch-BnR9wSnm.cjs");
3
3
  let chalk = require("chalk");
4
4
  chalk = require_logger.__toESM(chalk);
5
5
  let zod = require("zod");
@@ -78,7 +78,7 @@ function getAuthMethod() {
78
78
  * Used by both CLI and server routes
79
79
  */
80
80
  async function checkEmailStatus(options) {
81
- const { default: telemetry } = await Promise.resolve().then(() => require("./telemetry-BpMfhthR.cjs"));
81
+ const { default: telemetry } = await Promise.resolve().then(() => require("./telemetry-p8Pwqm1i.cjs"));
82
82
  const ciMode = require_logger.isCI();
83
83
  const userEmail = ciMode ? CI_PLACEHOLDER_EMAIL : getUserEmail();
84
84
  if (!userEmail) return {
@@ -127,7 +127,7 @@ async function checkEmailStatus(options) {
127
127
  }
128
128
  }
129
129
  async function promptForEmailUnverified() {
130
- const { default: telemetry } = await Promise.resolve().then(() => require("./telemetry-BpMfhthR.cjs"));
130
+ const { default: telemetry } = await Promise.resolve().then(() => require("./telemetry-p8Pwqm1i.cjs"));
131
131
  const ciMode = require_logger.isCI();
132
132
  const existingEmail = getUserEmail();
133
133
  let email = ciMode ? CI_PLACEHOLDER_EMAIL : existingEmail;
@@ -247,4 +247,4 @@ Object.defineProperty(exports, "setUserEmail", {
247
247
  }
248
248
  });
249
249
 
250
- //# sourceMappingURL=accounts-gtkH-5KX.cjs.map
250
+ //# sourceMappingURL=accounts-BPyfpSeU.cjs.map
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
- import { C as getEnvString, E as isCI, o as logger } from "./logger-KkObSCzq.js";
3
- import { D as TERMINAL_MAX_WIDTH, i as fetchWithTimeout } from "./fetch-Dxpd4_sr.js";
4
- import { c as writeGlobalConfigPartial, o as readGlobalConfig, r as CloudConfig, s as writeGlobalConfig } from "./cloud-C0dlstV_.js";
2
+ import { E as getEnvString, k as isCI, s as logger } from "./logger-BcJBzSSA.js";
3
+ import { D as TERMINAL_MAX_WIDTH, i as fetchWithTimeout } from "./fetch-DoVRJZhJ.js";
4
+ import { c as writeGlobalConfigPartial, o as readGlobalConfig, r as CloudConfig, s as writeGlobalConfig } from "./cloud-z8KZpUoa.js";
5
5
  import { z } from "zod";
6
6
  import input from "@inquirer/input";
7
7
  import chalk from "chalk";
@@ -83,7 +83,7 @@ function getAuthMethod() {
83
83
  * Used by both CLI and server routes
84
84
  */
85
85
  async function checkEmailStatus(options) {
86
- const { default: telemetry } = await import("./telemetry-Dw38hanS.js");
86
+ const { default: telemetry } = await import("./telemetry-Yig0Tino.js");
87
87
  const ciMode = isCI();
88
88
  const userEmail = ciMode ? CI_PLACEHOLDER_EMAIL : getUserEmail();
89
89
  if (!userEmail) return {
@@ -132,7 +132,7 @@ async function checkEmailStatus(options) {
132
132
  }
133
133
  }
134
134
  async function promptForEmailUnverified() {
135
- const { default: telemetry } = await import("./telemetry-Dw38hanS.js");
135
+ const { default: telemetry } = await import("./telemetry-Yig0Tino.js");
136
136
  const ciMode = isCI();
137
137
  const existingEmail = getUserEmail();
138
138
  let email = ciMode ? CI_PLACEHOLDER_EMAIL : existingEmail;
@@ -205,4 +205,4 @@ async function checkEmailStatusAndMaybeExit(options) {
205
205
  //#endregion
206
206
  export { getAuthor as a, isLoggedIntoCloud as c, getAuthMethod as i, promptForEmailUnverified as l, checkEmailStatusAndMaybeExit as n, getUserEmail as o, clearUserEmail as r, getUserId as s, checkEmailStatus as t, setUserEmail as u };
207
207
 
208
- //# sourceMappingURL=accounts-Bm2D8Db9.js.map
208
+ //# sourceMappingURL=accounts-CFLK3mnD.js.map
@@ -1,5 +1,5 @@
1
- import { C as isCI, b as getEnvString, i as logger } from "./logger-DLcq4dWf.js";
2
- import { O as TERMINAL_MAX_WIDTH, a as CloudConfig, c as writeGlobalConfig, l as writeGlobalConfigPartial, r as fetchWithTimeout, s as readGlobalConfig } from "./fetch-HaqdX7U1.js";
1
+ import { C as getEnvString, E as isCI, a as logger } from "./logger-BnkjG2jt.js";
2
+ import { O as TERMINAL_MAX_WIDTH, a as CloudConfig, c as writeGlobalConfig, l as writeGlobalConfigPartial, r as fetchWithTimeout, s as readGlobalConfig } from "./fetch-BiYv2BZc.js";
3
3
  import chalk from "chalk";
4
4
  import input from "@inquirer/input";
5
5
  import { z } from "zod";
@@ -81,7 +81,7 @@ function getAuthMethod() {
81
81
  * Used by both CLI and server routes
82
82
  */
83
83
  async function checkEmailStatus(options) {
84
- const { default: telemetry } = await import("./telemetry-Cps3mIU-.js").then((n) => n.r);
84
+ const { default: telemetry } = await import("./telemetry-DPXLd7UE.js").then((n) => n.r);
85
85
  const ciMode = isCI();
86
86
  const userEmail = ciMode ? CI_PLACEHOLDER_EMAIL : getUserEmail();
87
87
  if (!userEmail) return {
@@ -130,7 +130,7 @@ async function checkEmailStatus(options) {
130
130
  }
131
131
  }
132
132
  async function promptForEmailUnverified() {
133
- const { default: telemetry } = await import("./telemetry-Cps3mIU-.js").then((n) => n.r);
133
+ const { default: telemetry } = await import("./telemetry-DPXLd7UE.js").then((n) => n.r);
134
134
  const ciMode = isCI();
135
135
  const existingEmail = getUserEmail();
136
136
  let email = ciMode ? CI_PLACEHOLDER_EMAIL : existingEmail;
@@ -203,4 +203,4 @@ async function checkEmailStatusAndMaybeExit(options) {
203
203
  //#endregion
204
204
  export { getAuthor as a, isLoggedIntoCloud as c, getAuthMethod as i, promptForEmailUnverified as l, checkEmailStatusAndMaybeExit as n, getUserEmail as o, clearUserEmail as r, getUserId as s, checkEmailStatus as t, setUserEmail as u };
205
205
 
206
- //# sourceMappingURL=accounts-B0pgC1oV.js.map
206
+ //# sourceMappingURL=accounts-Xatc0RYb.js.map
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { o as logger } from "./logger-KkObSCzq.js";
3
- import { o as getCache, s as isCacheEnabled } from "./cache-BVeDlD87.js";
2
+ import { s as logger } from "./logger-BcJBzSSA.js";
3
+ import { o as getCache, s as isCacheEnabled } from "./cache-DSqR6ezl.js";
4
4
  import fs from "fs";
5
5
  import path from "path";
6
6
  import dedent from "dedent";
@@ -151,4 +151,4 @@ async function cacheResponse(cacheResult, response, debugContext) {
151
151
  //#endregion
152
152
  export { initializeAgenticCache as i, generateCacheKey as n, getCachedResponse as r, cacheResponse as t };
153
153
 
154
- //# sourceMappingURL=agentic-utils-DS1g3GLF.js.map
154
+ //# sourceMappingURL=agentic-utils-36epdqwB.js.map
@@ -1,17 +1,5 @@
1
- import { b as getEnvString, i as logger } from "./logger-CT3IKMKA.js";
2
- import "./esm-Cd1AjG1D.js";
3
- import "./pythonUtils-D5nxkQ0P.js";
4
- import "./types-DmyIJ-sR.js";
5
- import "./util-BRYkYPTd.js";
6
- import "./fetch-Cwxnd8zz.js";
7
- import { a as isCacheEnabled, i as getCache } from "./cache-C4Nxf52C.js";
8
- import "./genaiTracer-D3fD9dNV.js";
9
- import { t as OpenAiChatCompletionProvider } from "./chat-DqxYYtWA.js";
10
- import "./transform-vNucnNr0.js";
11
- import "./openai-DElQ-fPX.js";
12
- import "./util-Dnmk2mBQ.js";
13
- import { n as OpenAiEmbeddingProvider, t as OpenAiCompletionProvider } from "./completion-5MzrpJxT.js";
14
- import { t as OpenAiImageProvider } from "./image-CHfWvljl.js";
1
+ import { a as logger } from "./logger-DO8_zM18.js";
2
+ import { a as isCacheEnabled, i as getCache } from "./cache-CaT5tPgo.js";
15
3
  import fs from "fs";
16
4
  import path from "path";
17
5
  import dedent from "dedent";
@@ -160,51 +148,6 @@ async function cacheResponse(cacheResult, response, debugContext) {
160
148
  }
161
149
  }
162
150
  //#endregion
163
- //#region src/providers/cometapi.ts
164
- /**
165
- * CometAPI Image Provider - extends OpenAI Image Provider for CometAPI's image generation models
166
- */
167
- var CometApiImageProvider = class extends OpenAiImageProvider {
168
- constructor(modelName, options = {}) {
169
- super(modelName, {
170
- ...options,
171
- config: {
172
- ...options.config,
173
- apiKeyEnvar: "COMETAPI_KEY",
174
- apiBaseUrl: "https://api.cometapi.com/v1"
175
- }
176
- });
177
- }
178
- getApiKey() {
179
- if (this.config?.apiKey) return this.config.apiKey;
180
- return getEnvString("COMETAPI_KEY");
181
- }
182
- getApiUrlDefault() {
183
- return "https://api.cometapi.com/v1";
184
- }
185
- };
186
- /**
187
- * Factory for creating CometAPI providers using OpenAI-compatible endpoints.
188
- */
189
- function createCometApiProvider(providerPath, options = {}) {
190
- const splits = providerPath.split(":");
191
- const type = splits[1];
192
- const modelName = splits.slice(2).join(":");
193
- const openaiOptions = {
194
- ...options,
195
- config: {
196
- ...options.config || {},
197
- apiBaseUrl: "https://api.cometapi.com/v1",
198
- apiKeyEnvar: "COMETAPI_KEY"
199
- }
200
- };
201
- if (type === "chat") return new OpenAiChatCompletionProvider(modelName, openaiOptions);
202
- else if (type === "completion") return new OpenAiCompletionProvider(modelName, openaiOptions);
203
- else if (type === "embedding" || type === "embeddings") return new OpenAiEmbeddingProvider(modelName, openaiOptions);
204
- else if (type === "image") return new CometApiImageProvider(modelName, openaiOptions);
205
- return new OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
206
- }
207
- //#endregion
208
- export { createCometApiProvider, initializeAgenticCache as i, generateCacheKey as n, getCachedResponse as r, cacheResponse as t };
151
+ export { initializeAgenticCache as i, generateCacheKey as n, getCachedResponse as r, cacheResponse as t };
209
152
 
210
- //# sourceMappingURL=cometapi-CUQq3H_a.js.map
153
+ //# sourceMappingURL=agentic-utils-D8yXo5Lm.js.map
@@ -1,17 +1,5 @@
1
- const require_logger = require("./logger-Cp1GPUjj.cjs");
2
- require("./esm-CnNt7sI4.cjs");
3
- require("./pythonUtils-CTU3Y3lw.cjs");
4
- require("./types-C_7nyzr1.cjs");
5
- require("./util-B9vlHIIh.cjs");
6
- require("./fetch-BPkYtG8K.cjs");
7
- const require_cache = require("./cache-Dh5WtQps.cjs");
8
- require("./genaiTracer-DN4dQywX.cjs");
9
- const require_chat = require("./chat-CgF-J-Jj.cjs");
10
- require("./transform-DuHvhZpj.cjs");
11
- require("./openai-Cuif0GEt.cjs");
12
- require("./util-BzMcevZc.cjs");
13
- const require_completion = require("./completion-CM6oK8PS.cjs");
14
- const require_image = require("./image-BLmROtN3.cjs");
1
+ const require_logger = require("./logger-D5iKBpu_.cjs");
2
+ const require_cache = require("./cache-C5yFZ4gC.cjs");
15
3
  let fs = require("fs");
16
4
  fs = require_logger.__toESM(fs);
17
5
  let path = require("path");
@@ -164,55 +152,29 @@ async function cacheResponse(cacheResult, response, debugContext) {
164
152
  }
165
153
  }
166
154
  //#endregion
167
- //#region src/providers/cometapi.ts
168
- /**
169
- * CometAPI Image Provider - extends OpenAI Image Provider for CometAPI's image generation models
170
- */
171
- var CometApiImageProvider = class extends require_image.OpenAiImageProvider {
172
- constructor(modelName, options = {}) {
173
- super(modelName, {
174
- ...options,
175
- config: {
176
- ...options.config,
177
- apiKeyEnvar: "COMETAPI_KEY",
178
- apiBaseUrl: "https://api.cometapi.com/v1"
179
- }
180
- });
155
+ Object.defineProperty(exports, "cacheResponse", {
156
+ enumerable: true,
157
+ get: function() {
158
+ return cacheResponse;
181
159
  }
182
- getApiKey() {
183
- if (this.config?.apiKey) return this.config.apiKey;
184
- return require_logger.getEnvString("COMETAPI_KEY");
160
+ });
161
+ Object.defineProperty(exports, "generateCacheKey", {
162
+ enumerable: true,
163
+ get: function() {
164
+ return generateCacheKey;
185
165
  }
186
- getApiUrlDefault() {
187
- return "https://api.cometapi.com/v1";
166
+ });
167
+ Object.defineProperty(exports, "getCachedResponse", {
168
+ enumerable: true,
169
+ get: function() {
170
+ return getCachedResponse;
188
171
  }
189
- };
190
- /**
191
- * Factory for creating CometAPI providers using OpenAI-compatible endpoints.
192
- */
193
- function createCometApiProvider(providerPath, options = {}) {
194
- const splits = providerPath.split(":");
195
- const type = splits[1];
196
- const modelName = splits.slice(2).join(":");
197
- const openaiOptions = {
198
- ...options,
199
- config: {
200
- ...options.config || {},
201
- apiBaseUrl: "https://api.cometapi.com/v1",
202
- apiKeyEnvar: "COMETAPI_KEY"
203
- }
204
- };
205
- if (type === "chat") return new require_chat.OpenAiChatCompletionProvider(modelName, openaiOptions);
206
- else if (type === "completion") return new require_completion.OpenAiCompletionProvider(modelName, openaiOptions);
207
- else if (type === "embedding" || type === "embeddings") return new require_completion.OpenAiEmbeddingProvider(modelName, openaiOptions);
208
- else if (type === "image") return new CometApiImageProvider(modelName, openaiOptions);
209
- return new require_chat.OpenAiChatCompletionProvider(splits.slice(1).join(":"), openaiOptions);
210
- }
211
- //#endregion
212
- exports.cacheResponse = cacheResponse;
213
- exports.createCometApiProvider = createCometApiProvider;
214
- exports.generateCacheKey = generateCacheKey;
215
- exports.getCachedResponse = getCachedResponse;
216
- exports.initializeAgenticCache = initializeAgenticCache;
172
+ });
173
+ Object.defineProperty(exports, "initializeAgenticCache", {
174
+ enumerable: true,
175
+ get: function() {
176
+ return initializeAgenticCache;
177
+ }
178
+ });
217
179
 
218
- //# sourceMappingURL=cometapi-C4xSqeID.cjs.map
180
+ //# sourceMappingURL=agentic-utils-DAVsChuB.cjs.map
@@ -0,0 +1,153 @@
1
+ import { a as logger } from "./logger-BnkjG2jt.js";
2
+ import { a as isCacheEnabled, i as getCache } from "./cache-HP0NP4k3.js";
3
+ import fs from "fs";
4
+ import path from "path";
5
+ import dedent from "dedent";
6
+ import crypto from "crypto";
7
+ //#region src/providers/agentic-utils.ts
8
+ /**
9
+ * Shared utilities for agentic providers (Claude Agent SDK, OpenCode SDK, etc.)
10
+ *
11
+ * These utilities handle common functionality needed by coding agent providers:
12
+ * - Working directory fingerprinting for cache key generation
13
+ * - Response caching with fingerprint support
14
+ */
15
+ /**
16
+ * Timeout for working directory fingerprint generation (ms)
17
+ * Prevents hanging on extremely large directories
18
+ */
19
+ const FINGERPRINT_TIMEOUT_MS = 2e3;
20
+ /**
21
+ * Get a fingerprint for a working directory to use as a cache key.
22
+ * Checks directory mtime and descendant file mtimes recursively.
23
+ *
24
+ * This allows for caching prompts that use the same working directory
25
+ * when the files haven't changed.
26
+ *
27
+ * @param workingDir - Absolute path to the working directory
28
+ * @returns SHA-256 hash fingerprint of the directory state
29
+ * @throws Error if fingerprinting times out or directory is inaccessible
30
+ */
31
+ async function getWorkingDirFingerprint(workingDir) {
32
+ const dirMtime = fs.statSync(workingDir).mtimeMs;
33
+ const startTime = Date.now();
34
+ const getAllFiles = (dir, files = []) => {
35
+ if (Date.now() - startTime > FINGERPRINT_TIMEOUT_MS) throw new Error("Working directory fingerprint timed out");
36
+ const entries = fs.readdirSync(dir, { withFileTypes: true });
37
+ for (const entry of entries) {
38
+ const fullPath = path.join(dir, entry.name);
39
+ if (entry.isDirectory()) getAllFiles(fullPath, files);
40
+ else if (entry.isFile()) files.push(fullPath);
41
+ }
42
+ return files;
43
+ };
44
+ const fingerprintData = `dir:${dirMtime};files:${getAllFiles(workingDir).map((file) => {
45
+ const stat = fs.statSync(file);
46
+ return `${path.relative(workingDir, file)}:${stat.mtimeMs}`;
47
+ }).sort().join(",")}`;
48
+ return crypto.createHash("sha256").update(fingerprintData).digest("hex");
49
+ }
50
+ /**
51
+ * Generate a cache key from arbitrary data using SHA-256 hash
52
+ *
53
+ * @param prefix - Cache key prefix (provider identifier)
54
+ * @param data - Data to hash for the cache key
55
+ * @returns Prefixed SHA-256 hash cache key
56
+ */
57
+ function generateCacheKey(prefix, data) {
58
+ const stringified = JSON.stringify(data);
59
+ return `${prefix}:${crypto.createHash("sha256").update(stringified).digest("hex")}`;
60
+ }
61
+ /**
62
+ * Initialize cache and check for cached response
63
+ *
64
+ * This handles the common caching pattern used by agentic providers:
65
+ * 1. Check if caching is enabled
66
+ * 2. Generate working directory fingerprint if needed
67
+ * 3. Generate cache key
68
+ * 4. Return cache configuration for use by the provider
69
+ *
70
+ * @param options - Cache options including prefix and working directory
71
+ * @param cacheKeyData - Data to include in the cache key
72
+ * @returns Cache configuration and optional cached response
73
+ */
74
+ async function initializeAgenticCache(options, cacheKeyData) {
75
+ if (!isCacheEnabled()) return {
76
+ shouldCache: false,
77
+ shouldReadCache: false,
78
+ shouldWriteCache: false
79
+ };
80
+ if (options.mcp && !options.cacheMcp) return {
81
+ shouldCache: false,
82
+ shouldReadCache: false,
83
+ shouldWriteCache: false
84
+ };
85
+ let workingDirFingerprint = null;
86
+ if (options.workingDir) try {
87
+ workingDirFingerprint = await getWorkingDirFingerprint(options.workingDir);
88
+ } catch (error) {
89
+ logger.error(dedent`Error getting working directory fingerprint for cache key - ${options.workingDir}: ${String(error)}
90
+
91
+ Caching is disabled.`);
92
+ return {
93
+ shouldCache: false,
94
+ shouldReadCache: false,
95
+ shouldWriteCache: false
96
+ };
97
+ }
98
+ const cache = await getCache();
99
+ const cacheKey = generateCacheKey(options.cacheKeyPrefix, {
100
+ ...cacheKeyData,
101
+ workingDirFingerprint,
102
+ ...options.mcp ? { mcp: options.mcp } : {}
103
+ });
104
+ return {
105
+ shouldCache: true,
106
+ shouldReadCache: !options.bustCache,
107
+ shouldWriteCache: true,
108
+ cache,
109
+ cacheKey,
110
+ workingDirFingerprint
111
+ };
112
+ }
113
+ /**
114
+ * Try to get a cached response
115
+ *
116
+ * @param cacheResult - Result from initializeAgenticCache
117
+ * @param debugContext - Context for debug logging (e.g., prompt preview)
118
+ * @returns Cached ProviderResponse if found, undefined otherwise
119
+ */
120
+ async function getCachedResponse(cacheResult, debugContext) {
121
+ if (!cacheResult.shouldReadCache || !cacheResult.cache || !cacheResult.cacheKey) return;
122
+ try {
123
+ const cachedResponse = await cacheResult.cache.get(cacheResult.cacheKey);
124
+ if (cachedResponse) {
125
+ logger.debug(`Returning cached response${debugContext ? ` for ${debugContext}` : ""} (cache key: ${cacheResult.cacheKey})`);
126
+ return {
127
+ ...JSON.parse(cachedResponse),
128
+ cached: true
129
+ };
130
+ }
131
+ } catch (error) {
132
+ logger.error(`Error getting cached response: ${String(error)}`);
133
+ }
134
+ }
135
+ /**
136
+ * Cache a provider response
137
+ *
138
+ * @param cacheResult - Result from initializeAgenticCache
139
+ * @param response - The ProviderResponse to cache
140
+ * @param debugContext - Context for debug logging
141
+ */
142
+ async function cacheResponse(cacheResult, response, debugContext) {
143
+ if (!cacheResult.shouldWriteCache || !cacheResult.cache || !cacheResult.cacheKey) return;
144
+ try {
145
+ await cacheResult.cache.set(cacheResult.cacheKey, JSON.stringify(response));
146
+ } catch (error) {
147
+ logger.error(`Error caching response${debugContext ? ` for ${debugContext}` : ""}: ${String(error)}`);
148
+ }
149
+ }
150
+ //#endregion
151
+ export { initializeAgenticCache as i, generateCacheKey as n, getCachedResponse as r, cacheResponse as t };
152
+
153
+ //# sourceMappingURL=agentic-utils-DIYAAYE7.js.map