promptfoo 0.121.7 → 0.121.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/{accounts-CmWzeD2d.cjs → accounts-BVz5gHLK.cjs} +4 -4
- package/dist/src/{accounts-DanM1wq_.js → accounts-BWjqwsrf.js} +4 -4
- package/dist/src/{accounts-CjFnOPmb.js → accounts-D6IBfEE0.js} +5 -5
- package/dist/src/{accounts-Ca7WIoPY.js → accounts-DAv_0iE7.js} +4 -4
- package/dist/src/{agentic-utils-DDEGRV9v.js → agentic-utils-BJKAkz2e.js} +2 -2
- package/dist/src/{agentic-utils-DvPWSUpb.cjs → agentic-utils-C-A92xhn.cjs} +2 -2
- package/dist/src/{agentic-utils-TxUEMPYS.js → agentic-utils-DmoS_S4B.js} +2 -2
- package/dist/src/{agentic-utils-CJ0j3fBi.js → agentic-utils-GdToujHu.js} +2 -2
- package/dist/src/{agents-CBgJvRkB.js → agents-2C8NN6I1.js} +4 -4
- package/dist/src/{agents-CYn2n3QP.js → agents-BMAiSR2o.js} +2 -2
- package/dist/src/{agents-LrHuQqr1.js → agents-C-PGaxwj.js} +4 -4
- package/dist/src/{agents-D-vDNFx4.js → agents-C98cz5pl.js} +4 -4
- package/dist/src/{agents-B4sRuXg3.cjs → agents-DB8Ub2Ld.cjs} +2 -2
- package/dist/src/{agents-B8q7h_ek.js → agents-Dwshy2H8.js} +2 -2
- package/dist/src/{agents-QGg76OF-.js → agents-mlKjx-cK.js} +2 -2
- package/dist/src/{agents-eHZ9nlgA.cjs → agents-n2ej-c4H.cjs} +4 -4
- package/dist/src/{aimlapi-D5HXzZ0s.js → aimlapi-Bi-laUlp.js} +6 -6
- package/dist/src/{aimlapi-T6HGNxNe.cjs → aimlapi-D0OFV4Vj.cjs} +6 -6
- package/dist/src/{aimlapi-eYv3a_DK.js → aimlapi-WyUK0wYy.js} +6 -6
- package/dist/src/{aimlapi-CJEbQ0o6.js → aimlapi-v-63ZjEI.js} +6 -6
- package/dist/src/app/assets/Report-sCXUfaWo.js +1 -0
- package/dist/src/app/assets/{index-BnT6P6sF.js → index-BopgkZEh.js} +2 -2
- package/dist/src/app/index.html +1 -1
- package/dist/src/{audio-DyiebVB3.js → audio-DnEIHWZR.js} +3 -3
- package/dist/src/{audio-BqnRvcWG.js → audio-heR0mu0n.js} +3 -3
- package/dist/src/{audio-CPMtV1yR.js → audio-wafFO1wn.js} +3 -3
- package/dist/src/{audio-FnxbEnSE.cjs → audio-x44tsxIo.cjs} +3 -3
- package/dist/src/{authoritativeMarkupInjection-F2gBw0lN.cjs → authoritativeMarkupInjection-2G3Be6oL.cjs} +6 -6
- package/dist/src/{authoritativeMarkupInjection-DyAXAsSr.js → authoritativeMarkupInjection-81PPynHR.js} +6 -6
- package/dist/src/{authoritativeMarkupInjection-QEQmFS83.js → authoritativeMarkupInjection-D9O70HPi.js} +6 -6
- package/dist/src/{authoritativeMarkupInjection-BZIywVjG.js → authoritativeMarkupInjection-PxSf3Rh8.js} +5 -5
- package/dist/src/{base-E9I8zXjz.js → base-0Gzzue9Z.js} +2 -2
- package/dist/src/{base-Co80MMCi.js → base-Bp4c52YZ.js} +2 -2
- package/dist/src/{base-CKLo890h.js → base-BuNn-YBX.js} +2 -2
- package/dist/src/{base-DGJW48uz.cjs → base-BzdS8tod.cjs} +2 -2
- package/dist/src/{bestOfN-_kTi8Bxe.js → bestOfN-BHiOjeaq.js} +7 -7
- package/dist/src/{bestOfN-BBsO41z4.js → bestOfN-CdkNPPbX.js} +6 -6
- package/dist/src/{bestOfN-B3wNzjSB.js → bestOfN-ClUSOhN0.js} +7 -7
- package/dist/src/{bestOfN-CAwmg5UL.cjs → bestOfN-DWwXEg1h.cjs} +7 -7
- package/dist/src/cache-BKYi3kAA.js +3 -0
- package/dist/src/{cache-DpPWrkTE.js → cache-BR77mdIR.js} +3 -3
- package/dist/src/{cache-roFAE0cI.js → cache-CrioYnaa.js} +2 -2
- package/dist/src/{cache-DIXbtkNO.js → cache-DdriHsNX.js} +2 -2
- package/dist/src/{cache-CPGUA4Yl.cjs → cache-h5MWOBZI.cjs} +2 -2
- package/dist/src/{chat-Dabu84Br.js → chat-BBEnnpQk.js} +6 -6
- package/dist/src/{chat-CUCorGiL.js → chat-BSos6PvZ.js} +6 -6
- package/dist/src/{chat-TP8Qifkh.js → chat-Bnt7ieO0.js} +2 -2
- package/dist/src/{chat-DxTDQ83C.cjs → chat-DSyYuTYT.cjs} +6 -6
- package/dist/src/{chat-DqUFcWI0.js → chat-DTdf-J5Q.js} +6 -6
- package/dist/src/{chat-DG1wG4w0.cjs → chat-Dq3DomYU.cjs} +2 -2
- package/dist/src/{chat-GmlolEwo.js → chat-g5QLeLOo.js} +2 -2
- package/dist/src/{chat-iwaM5UTQ.js → chat-mTTuUAYb.js} +2 -2
- package/dist/src/{claude-agent-sdk-x1XJ1-pU.js → claude-agent-sdk-BGUac_kS.js} +7 -5
- package/dist/src/{claude-agent-sdk-D5Jl0SDh.js → claude-agent-sdk-BP__YGfK.js} +7 -5
- package/dist/src/{claude-agent-sdk-BQNp_y-F.js → claude-agent-sdk-Ddgx5BIQ.js} +7 -5
- package/dist/src/{claude-agent-sdk-DH416NBD.cjs → claude-agent-sdk-n2XcEclh.cjs} +7 -5
- package/dist/src/cloud-DiWbUiVP.js +3 -0
- package/dist/src/{cloud-D3DiFqH6.js → cloud-DqF5N1aJ.js} +2 -2
- package/dist/src/{cloudflare-ai-B6NVI3ax.js → cloudflare-ai-BGamMotN.js} +4 -4
- package/dist/src/{cloudflare-ai-r4tbYmWU.js → cloudflare-ai-BwW8W-w7.js} +4 -4
- package/dist/src/{cloudflare-ai-CEAW-xQa.cjs → cloudflare-ai-DCRGnsyL.cjs} +4 -4
- package/dist/src/{cloudflare-ai-RFSojyXG.js → cloudflare-ai-sD26nP6V.js} +4 -4
- package/dist/src/{cloudflare-gateway-BaZ4insB.js → cloudflare-gateway-2lnOT4qM.js} +3 -3
- package/dist/src/{cloudflare-gateway-BCkLouto.js → cloudflare-gateway-B1-8KNCt.js} +3 -3
- package/dist/src/{cloudflare-gateway-TJMLBj6I.cjs → cloudflare-gateway-CCC1DFrC.cjs} +3 -3
- package/dist/src/{cloudflare-gateway-CF-Vb-2Z.js → cloudflare-gateway-DOghiU6r.js} +3 -3
- package/dist/src/{codex-app-server-DIXZ230V.js → codex-app-server-BWeWamEb.js} +17 -2
- package/dist/src/{codex-app-server-B8KHEiF4.js → codex-app-server-DyQB1P0p.js} +17 -2
- package/dist/src/{codex-app-server-CnrLBCeA.cjs → codex-app-server-R9u_G7W9.cjs} +17 -2
- package/dist/src/{codex-app-server-Dd22dC_N.js → codex-app-server-ZQRJSJjU.js} +17 -2
- package/dist/src/{codex-sdk-CmQABzV3.js → codex-sdk-B62H0fe7.js} +14 -3
- package/dist/src/{codex-sdk-CFF6gUyi.cjs → codex-sdk-BRPUvJG8.cjs} +14 -3
- package/dist/src/{codex-sdk-B6Wah8Pa.js → codex-sdk-Dio1zJBS.js} +14 -3
- package/dist/src/codex-sdk-DxukZs_K.js +3 -0
- package/dist/src/{codex-sdk-D2d54RL8.js → codex-sdk-iEmW1eS2.js} +14 -3
- package/dist/src/{cometapi-Bu9B8NUY.js → cometapi--hh7dESS.js} +7 -7
- package/dist/src/{cometapi-OBILPLlu.js → cometapi-C7yWNGqt.js} +7 -7
- package/dist/src/{cometapi-CtzNCHKu.js → cometapi-CSIi16a0.js} +7 -7
- package/dist/src/{cometapi-DHCDlQUI.cjs → cometapi-sZgBZtbU.cjs} +7 -7
- package/dist/src/{completion-CSYfl2cd.cjs → completion-CWtqdn3z.cjs} +4 -4
- package/dist/src/{completion-CO2e1_62.js → completion-DT8cxo9T.js} +4 -4
- package/dist/src/{completion-DZNxcyfG.js → completion-DUScduXp.js} +4 -4
- package/dist/src/{completion-sNvCLTAP.js → completion-D_2IOAoS.js} +4 -4
- package/dist/src/{crescendo-QiaSLW0d.js → crescendo-B41TwUHM.js} +39 -18
- package/dist/src/{crescendo-J1Xx4_zb.js → crescendo-Bfic7KC4.js} +41 -20
- package/dist/src/{crescendo-BXEJK_bi.cjs → crescendo-DXFB7rHP.cjs} +41 -20
- package/dist/src/{crescendo-CU_Y2i-m.js → crescendo-DvvYxMLA.js} +41 -20
- package/dist/src/{custom-BJfP00Bh.js → custom-BdzuqFTN.js} +10 -10
- package/dist/src/{custom-notggYVl.js → custom-Cf5Q6r-P.js} +8 -8
- package/dist/src/{custom-CZVn-1-r.js → custom-DLgufezC.js} +10 -10
- package/dist/src/{custom-Cqia7M0D.cjs → custom-LEXHCRe3.cjs} +10 -10
- package/dist/src/{docker-4D1eL6Gq.js → docker-BOSO_6hK.js} +5 -5
- package/dist/src/{docker-D06JUoe2.cjs → docker-D0h2vFrc.cjs} +5 -5
- package/dist/src/{docker-DdJQBxK9.js → docker-D2TWGyTP.js} +5 -5
- package/dist/src/{docker-BBv1WUDu.js → docker-Vj_4_cPg.js} +5 -5
- package/dist/src/{embedding-BbrwopfX.cjs → embedding-BQIApR18.cjs} +4 -4
- package/dist/src/{embedding-Bi3rxrZF.js → embedding-CStK0TV6.js} +4 -4
- package/dist/src/{embedding--UZVe4_7.js → embedding-CU78FMnw.js} +4 -4
- package/dist/src/{embedding-C251p1-8.js → embedding-CV8lmCnU.js} +4 -4
- package/dist/src/{eval-0VRANImH.js → eval-B3BaNBbO.js} +4 -4
- package/dist/src/{eval-DscR5iOM.js → eval-DfR9885C.js} +1 -1
- package/dist/src/evalResult-BtZSUgQv.js +3 -0
- package/dist/src/{evalResult-eUkJv9Ko.js → evalResult-CcSqNl_Y.js} +3 -3
- package/dist/src/{evalResult-CvtS8h8u.cjs → evalResult-DHXs-9TL.cjs} +3 -3
- package/dist/src/{evalResult-2RRJvFyB.js → evalResult-PGqEbasb.js} +3 -3
- package/dist/src/evaluator-B9LGbKI8.js +3 -0
- package/dist/src/{evaluator-DRoiYB2q.js → evaluator-n_dEb00o.js} +20 -20
- package/dist/src/{evaluatorHelpers-DuqFFfq7.js → evaluatorHelpers-CrRObe2z.js} +4 -4
- package/dist/src/{evaluatorHelpers-CRqTvSux.cjs → evaluatorHelpers-D06I9WFL.cjs} +4 -4
- package/dist/src/{evaluatorHelpers-BsYP_muT.js → evaluatorHelpers-D1_kwvyp.js} +4 -4
- package/dist/src/{extractor-CIW3iN-b.js → extractor-BVkZtk4R.js} +4 -4
- package/dist/src/{extractor-CxRtnaHl.js → extractor-D3Fv_Tdh.js} +4 -4
- package/dist/src/{extractor-BR7XAzAL.js → extractor-Jp53vs-6.js} +4 -4
- package/dist/src/{extractor-BdxEtt3J.cjs → extractor-bV_NOoaz.cjs} +4 -4
- package/dist/src/{fetch-BufrQtvR.js → fetch-BSSAcMxf.js} +2 -2
- package/dist/src/fetch-BodQTrMU.js +3 -0
- package/dist/src/{fetch-Dw4XZHjj.cjs → fetch-Cfm4EuOB.cjs} +2 -2
- package/dist/src/{fetch-DXUnXkVU.js → fetch-Cpf1U1nO.js} +3 -3
- package/dist/src/{fetch-It34O8Ur.js → fetch-Doks14zQ.js} +2 -2
- package/dist/src/{goat-Qgurm-NP.js → goat-Ba7Gznzq.js} +18 -17
- package/dist/src/{goat-Ckd3q3AY.js → goat-CJngS-WU.js} +18 -17
- package/dist/src/{goat-ghadEDdy.js → goat-CwsbfQeu.js} +16 -15
- package/dist/src/{goat-una6pZGP.cjs → goat-DOMbozoX.cjs} +18 -17
- package/dist/src/graders-B3D7kCcD.js +3 -0
- package/dist/src/{graders-BGP99PdK.js → graders-BQt1BaQe.js} +18 -18
- package/dist/src/{graders-ClrU2fnd.cjs → graders-CBQ2s6gz.cjs} +18 -18
- package/dist/src/{graders-C0nXU_ZP.js → graders-DaRU98zs.js} +18 -18
- package/dist/src/{graders-BX0f2tvS.js → graders-KXzjnIim.js} +18 -18
- package/dist/src/{hydra-DE4xWwyc.js → hydra-BU6GjYoQ.js} +35 -17
- package/dist/src/{hydra-BxdG4nkg.js → hydra-BmXHxlyl.js} +33 -15
- package/dist/src/{hydra-BSNZZm2M.js → hydra-CR0KyYDb.js} +35 -17
- package/dist/src/{hydra-DrJttnvw.cjs → hydra-RO9jBks7.cjs} +35 -17
- package/dist/src/{image-B_fPIwdg.js → image-BBmZdKO3.js} +3 -3
- package/dist/src/{image-QzmydkiG.js → image-B_PFG7IG.js} +3 -3
- package/dist/src/{image-BvUAW344.js → image-BtODOZjh.js} +4 -4
- package/dist/src/{image-Cvjwx1uY.js → image-CYuNJIqd.js} +4 -4
- package/dist/src/{image-DfVCGPbI.cjs → image-E00WFZkq.cjs} +3 -3
- package/dist/src/{image-X0oY4350.cjs → image-HK2Cfqb1.cjs} +4 -4
- package/dist/src/{image-BN-hjLL9.js → image-LGj8dTcr.js} +3 -3
- package/dist/src/{image-B4oBtu6J.js → image-YMKejC0r.js} +4 -4
- package/dist/src/index.cjs +112 -115
- package/dist/src/index.d.cts +13 -0
- package/dist/src/index.d.ts +13 -0
- package/dist/src/index.js +113 -116
- package/dist/src/{indirectWebPwn-DBQhOjoD.js → indirectWebPwn-B80dLlFC.js} +5 -5
- package/dist/src/{indirectWebPwn-uyWdHx04.js → indirectWebPwn-BMTXXznx.js} +4 -4
- package/dist/src/{indirectWebPwn-tNx9OZ35.js → indirectWebPwn-BZFPV7Q9.js} +4 -4
- package/dist/src/{indirectWebPwn-CfQJt3gk.cjs → indirectWebPwn-BaEQEOIO.cjs} +5 -5
- package/dist/src/{indirectWebPwn-OsXnKejv.js → indirectWebPwn-BzpyMnFS.js} +5 -5
- package/dist/src/{indirectWebPwn-CbjUG0rh.js → indirectWebPwn-CiWB-vVH.js} +4 -4
- package/dist/src/{indirectWebPwn-BJ22AbQa.cjs → indirectWebPwn-D7NA9Nsv.cjs} +4 -4
- package/dist/src/{indirectWebPwn-02ZIghCS.js → indirectWebPwn-o_bEFMjP.js} +5 -5
- package/dist/src/{iterative-DJQEQpG3.js → iterative-B-l0syBV.js} +25 -15
- package/dist/src/{iterative-DQBuWM-j.cjs → iterative-BACUeCCz.cjs} +25 -15
- package/dist/src/{iterative-FTS4Bz67.js → iterative-CVwoExo8.js} +25 -15
- package/dist/src/{iterative-CpU6i2As.js → iterative-QDrGSyss.js} +23 -13
- package/dist/src/{iterativeImage-BUABMVOA.js → iterativeImage-BQg2OwA6.js} +3 -3
- package/dist/src/{iterativeImage-Doz8mgxF.js → iterativeImage-Bwn0fM75.js} +4 -4
- package/dist/src/{iterativeImage-ByFWkxax.cjs → iterativeImage-CcgVyASo.cjs} +4 -4
- package/dist/src/{iterativeImage-BzUapOUi.js → iterativeImage-D_UbQXg4.js} +4 -4
- package/dist/src/{iterativeMeta-C7APE_P1.js → iterativeMeta-CIu-CHRS.js} +36 -16
- package/dist/src/{iterativeMeta-B3YiAOc8.js → iterativeMeta-CN8CNjFA.js} +36 -16
- package/dist/src/{iterativeMeta-DgoQ7bLh.js → iterativeMeta-DN6BTjpq.js} +34 -14
- package/dist/src/{iterativeMeta-CSS8M6Ds.cjs → iterativeMeta-DlqY3BsS.cjs} +36 -16
- package/dist/src/{iterativeTree-DvZ7GBwt.js → iterativeTree-CJ8a8G9T.js} +78 -28
- package/dist/src/{iterativeTree-B5zxBBSW.js → iterativeTree-DcuFXnjL.js} +78 -28
- package/dist/src/{iterativeTree-CNyIk0Yn.js → iterativeTree-FrDDYAN0.js} +76 -26
- package/dist/src/{iterativeTree-CPMF10ve.cjs → iterativeTree-LOgAi0nU.cjs} +78 -28
- package/dist/src/{knowledgeBase-DUh34xba.cjs → knowledgeBase-CdbcGBZF.cjs} +4 -4
- package/dist/src/{knowledgeBase-Bi_8sV-H.js → knowledgeBase-CjOXp6Lr.js} +4 -4
- package/dist/src/{knowledgeBase-BadkINlJ.js → knowledgeBase-DxAq4n4z.js} +4 -4
- package/dist/src/{knowledgeBase-CkMljjdg.js → knowledgeBase-o_wTLzrt.js} +4 -4
- package/dist/src/{litellm-BKBo0jpC.js → litellm-B2gHwya_.js} +4 -4
- package/dist/src/{litellm-CtAr7bKG.cjs → litellm-CPpdlO7n.cjs} +4 -4
- package/dist/src/{litellm-BXyn5kZK.js → litellm-CYfgxLrM.js} +4 -4
- package/dist/src/{litellm-CNcfbCfa.js → litellm-ojWBKU3C.js} +4 -4
- package/dist/src/{luma-ray-D3FUc2K3.cjs → luma-ray-BCCO9XXG.cjs} +3 -3
- package/dist/src/{luma-ray-BMX1iEB6.js → luma-ray-BPrdihAb.js} +3 -3
- package/dist/src/{luma-ray-CR5TSpp4.js → luma-ray-DP5N79lB.js} +3 -3
- package/dist/src/{luma-ray-OEMmS1RB.js → luma-ray-DTDyoAlM.js} +3 -3
- package/dist/src/main.js +116 -119
- package/dist/src/{memoryPoisoning-Dp-btinn.cjs → memoryPoisoning-B6N3us35.cjs} +6 -6
- package/dist/src/{memoryPoisoning-D8h9gXJF.js → memoryPoisoning-Bc_BK_k2.js} +6 -6
- package/dist/src/{memoryPoisoning-CM83NWYl.js → memoryPoisoning-D375zwSX.js} +6 -6
- package/dist/src/{memoryPoisoning-cLuCoTuJ.js → memoryPoisoning-DJA0YjJT.js} +6 -6
- package/dist/src/{messages-BabO-cX8.js → messages-Bg29Nbit.js} +7 -7
- package/dist/src/{messages-DBPir0TQ.cjs → messages-BrZEnHsV.cjs} +7 -7
- package/dist/src/{messages-vsE_-Lv0.js → messages-CBulRaud.js} +7 -7
- package/dist/src/{messages-DGUlSNU7.js → messages-K9A8RxBM.js} +7 -7
- package/dist/src/{mischievousUser-0l8GD7Dp.js → mischievousUser-BDLwSGN0.js} +5 -5
- package/dist/src/{mischievousUser-frFYKxu6.js → mischievousUser-Blx-OtT3.js} +5 -5
- package/dist/src/{mischievousUser-BUOP9W5r.js → mischievousUser-CHuTTvBg.js} +5 -5
- package/dist/src/{mischievousUser-olGgHIVR.cjs → mischievousUser-CSUrH3fq.cjs} +5 -5
- package/dist/src/{modelslab-Cogmu4mG.js → modelslab-BjEk7yCP.js} +4 -4
- package/dist/src/{modelslab-EyDczZ5A.js → modelslab-CBCrdIBc.js} +4 -4
- package/dist/src/{modelslab-Dzst7VTU.js → modelslab-CrGpXuhv.js} +4 -4
- package/dist/src/{modelslab-CNV5bMSk.cjs → modelslab-Cvh0klQx.cjs} +4 -4
- package/dist/src/{nova-reel-BGPNBOMS.js → nova-reel-CUDDZcSA.js} +3 -3
- package/dist/src/{nova-reel-B_5NKFu1.js → nova-reel-CyDESu5J.js} +3 -3
- package/dist/src/{nova-reel-CjJRxI1X.cjs → nova-reel-DH_Ksu6X.cjs} +3 -3
- package/dist/src/{nova-reel-C4eUJGse.js → nova-reel-YQAqUYJY.js} +3 -3
- package/dist/src/{nova-sonic-ChPlh5na.js → nova-sonic-BVFFB7JZ.js} +2 -2
- package/dist/src/{nova-sonic-DuOG9Aun.cjs → nova-sonic-Bg3cxMMu.cjs} +2 -2
- package/dist/src/{nova-sonic-CrV0iaY_.js → nova-sonic-BhmnRGyh.js} +2 -2
- package/dist/src/{nova-sonic-BNGmgfFz.js → nova-sonic-DxmK95c1.js} +2 -2
- package/dist/src/{openclaw-Dphc01BY.cjs → openclaw-CHQaZi_-.cjs} +6 -6
- package/dist/src/{openclaw-zIJAsz3P.js → openclaw-CWOm2eOr.js} +6 -6
- package/dist/src/{openclaw-CF7fMido.js → openclaw-Cdk9JKfY.js} +6 -6
- package/dist/src/{openclaw-BIHlu_36.js → openclaw-DhF8rUpI.js} +6 -6
- package/dist/src/{opencode-sdk-B3vlPLsp.js → opencode-sdk-BRjiPV-g.js} +2 -2
- package/dist/src/{opencode-sdk-DoY6GbWw.cjs → opencode-sdk-CPFMw0ed.cjs} +2 -2
- package/dist/src/{opencode-sdk-sRKYHGoI.js → opencode-sdk-CaSOCsBA.js} +2 -2
- package/dist/src/{opencode-sdk-D05JSgMQ.js → opencode-sdk-CqkyG8De.js} +2 -2
- package/dist/src/{promptfoo-Rjp-MeBb.js → promptfoo-BU4_0J85.js} +64 -7
- package/dist/src/{promptfoo-BDrfT30-.js → promptfoo-CReYAtfb.js} +64 -7
- package/dist/src/{promptfoo-b-baRMj-.cjs → promptfoo-ClChwT74.cjs} +93 -6
- package/dist/src/{promptfoo-Cm4hiy1Y.js → promptfoo-CqEpj6Sr.js} +64 -7
- package/dist/src/{providers-B9KzWxAX.js → providers-B7TyByfj.js} +94 -50
- package/dist/src/{providers-DVYRZP4E.js → providers-BGc7tDtQ.js} +93 -49
- package/dist/src/{providers-BYAn82cf.js → providers-CSOp-bCm.js} +1 -1
- package/dist/src/{providers-BDVVIQM6.cjs → providers-V6RBuieY.cjs} +93 -49
- package/dist/src/{providers-BCCz6_IX.js → providers-iH3Sw1yo.js} +93 -49
- package/dist/src/{quiverai-BvIhI_0l.js → quiverai-58BtRRet.js} +3 -3
- package/dist/src/{quiverai-Cv7rJKDz.js → quiverai-C1dYu5MW.js} +3 -3
- package/dist/src/{quiverai-CdTWPe-A.js → quiverai-CNMIpZQg.js} +3 -3
- package/dist/src/{quiverai-BAp6iTZD.cjs → quiverai-fmSfU43k.cjs} +3 -3
- package/dist/src/{registry-KCVF1CFC.cjs → registry-6Jw6ebor.cjs} +14 -14
- package/dist/src/{registry-BUJrgjwv.js → registry-BTGk2ZkB.js} +14 -14
- package/dist/src/{registry-DXm1t_x0.js → registry-BTNqmP5o.js} +14 -14
- package/dist/src/{registry-Dp5EqoXc.js → registry-NGnOG2xa.js} +14 -14
- package/dist/src/{remoteGeneration-COpWcmWd.js → remoteGeneration--D6WjzUm.js} +4 -4
- package/dist/src/{remoteGeneration-DS9N3pgB.cjs → remoteGeneration-BpIYlb_O.cjs} +4 -4
- package/dist/src/{remoteGeneration-DsaSwmG2.js → remoteGeneration-CJC3E0aW.js} +4 -4
- package/dist/src/{remoteGeneration-B1_XsKXU.js → remoteGeneration-D6UjE2JT.js} +4 -4
- package/dist/src/{responses-B6ktc3Ra.js → responses-5Gf5HNOi.js} +9 -5
- package/dist/src/{responses-URRzV8qE.js → responses-BVi7xIdv.js} +9 -5
- package/dist/src/{responses-1UFFF9N_.cjs → responses-CUARGrhY.cjs} +9 -5
- package/dist/src/{responses-B3W2JvOQ.js → responses-CrmWv6iz.js} +9 -5
- package/dist/src/{sagemaker-DzffAqo_.cjs → sagemaker-BeVTKfrv.cjs} +9 -9
- package/dist/src/{sagemaker-yr1QKeBs.js → sagemaker-BwbV5U7_.js} +9 -9
- package/dist/src/{sagemaker-vhtSV7JI.js → sagemaker-ClAZ6Qwc.js} +9 -9
- package/dist/src/{sagemaker-CujrzP1a.js → sagemaker-DY2qrOpq.js} +9 -9
- package/dist/src/{scanner-DS0109SS.js → scanner-BS-iFIp3.js} +5 -5
- package/dist/src/server/index.js +111 -114
- package/dist/src/{server-B8rqV126.cjs → server-BHOEL8p8.cjs} +3 -3
- package/dist/src/{server-CMJD10J4.js → server-CbiJppij.js} +3 -3
- package/dist/src/server-D18AAlAc.js +3 -0
- package/dist/src/{server-DhMHosWj.js → server-DLYjSFm2.js} +5 -5
- package/dist/src/{server-Ddp8GNMp.js → server-JQYD_Nws.js} +5 -5
- package/dist/src/{shared-7pmVZLNO.js → shared-CRq0gGVf.js} +8 -8
- package/dist/src/{shared-D6IjElRI.js → shared-CSIGeGLl.js} +8 -8
- package/dist/src/{shared-9WHQ1oNE.js → shared-DNvim54U.js} +7 -7
- package/dist/src/{shared-WkgnDkcg.cjs → shared-aHWko3P1.cjs} +8 -8
- package/dist/src/{simulatedUser-U_qAHnuB.js → simulatedUser-C7sOFSF6.js} +5 -5
- package/dist/src/{simulatedUser-C9aQObBI.js → simulatedUser-DH_7RzEQ.js} +5 -5
- package/dist/src/{simulatedUser-p3tACcmw.js → simulatedUser-lgMMmniD.js} +5 -5
- package/dist/src/{simulatedUser-Cu601Dd4.cjs → simulatedUser-mnCUS9Bm.cjs} +5 -5
- package/dist/src/{storage-QdU-SmvD.js → storage-95htjpLs.js} +3 -3
- package/dist/src/{storage-CA-v9V2v.cjs → storage-A4WnAeN3.cjs} +3 -3
- package/dist/src/{storage-CD-GWAdx.js → storage-B2Ql_oq4.js} +3 -3
- package/dist/src/{storage-BU4qcnOb.js → storage-EKVWZBNY.js} +4 -4
- package/dist/src/{strategies-DRJjGTIY.js → strategies-CBI1brSy.js} +10 -10
- package/dist/src/{strategies-7CS3Alao.cjs → strategies-CCcnEbFO.cjs} +9 -9
- package/dist/src/{strategies-CiSeroPH.js → strategies-CD1gHeeQ.js} +9 -9
- package/dist/src/telemetry-BUm_krVX.js +3 -0
- package/dist/src/{telemetry-DmXYcJNV.js → telemetry-BbpmrenM.js} +4 -4
- package/dist/src/{telemetry-DwX9XUN5.js → telemetry-C4bX-6Sr.js} +4 -4
- package/dist/src/{telemetry-CJ7FnCsc.cjs → telemetry-C_ImlCOk.cjs} +4 -4
- package/dist/src/{telemetry-00ezXr_t.js → telemetry-DOE567Wj.js} +4 -4
- package/dist/src/{tracingOptions-ji2OuXbT.js → tracingOptions-BOP1FsRt.js} +2 -2
- package/dist/src/{tracingOptions-Chi74lOD.js → tracingOptions-BvmDa_jH.js} +2 -2
- package/dist/src/{tracingOptions-DrbSFaKy.cjs → tracingOptions-DFBoE8O0.cjs} +2 -2
- package/dist/src/{tracingOptions-BnwKCkSB.js → tracingOptions-xhjOg2b1.js} +2 -2
- package/dist/src/{transcription-Dkd22_4K.js → transcription-BOXDoehT.js} +4 -4
- package/dist/src/{transcription-CfU5loSq.js → transcription-CpVdKc4P.js} +4 -4
- package/dist/src/{transcription-mzuf18Mq.cjs → transcription-D8kkPXg_.cjs} +4 -4
- package/dist/src/{transcription-B8uIgCYX.js → transcription-Z94eV9LR.js} +4 -4
- package/dist/src/{transform-BIMynQsA.js → transform-BufxPIQL.js} +3 -3
- package/dist/src/{transform-DhNkAUs8.cjs → transform-DJkt81VY.cjs} +3 -3
- package/dist/src/{transform-EtD4jAWi.js → transform-DtTfiGoh.js} +3 -3
- package/dist/src/{transform-DmvYBRll.js → transform-Wp6s_5QE.js} +3 -3
- package/dist/src/{util-IYzs5Y04.cjs → util-BHCAeuXx.cjs} +3 -3
- package/dist/src/{util--WMgw7wM.js → util-CMrHV35u.js} +3 -3
- package/dist/src/{util-SPsvFONY.cjs → util-COnzevXE.cjs} +3 -3
- package/dist/src/{util-LKTmNsMQ.js → util-CYev3d-r.js} +16 -3
- package/dist/src/{util-Df8YMvS1.js → util-DGqkTb2-.js} +4 -4
- package/dist/src/{util-CN8om2rz.cjs → util-DNtUsus_.cjs} +4 -4
- package/dist/src/{util-Bx677_k2.js → util-DRfqa4xz.js} +3 -3
- package/dist/src/{util-DiQ3QvBB.js → util-DTq3jq2z.js} +3 -3
- package/dist/src/{util-5WnCSb0h.js → util-DeY58psG.js} +16 -3
- package/dist/src/{util-DNl96nNs.js → util-DpV6KT5i.js} +4 -4
- package/dist/src/{util-I-Rf-KaD.js → util-DwNJzqOV.js} +3 -3
- package/dist/src/{util-kDURhgJW.js → util-ETfU_sS9.js} +4 -4
- package/dist/src/{util-BSIuSLVK.cjs → util-NYQvo1C7.cjs} +16 -3
- package/dist/src/{util-CoQWM76y.js → util-X4KQgyVD.js} +3 -3
- package/dist/src/{util-DURocbYR.js → util-jZRrXe1P.js} +3 -3
- package/dist/src/{util-efByNxcr.js → util-o2Qg5rZv.js} +16 -3
- package/dist/src/{version-BK20a4sw.js → version-CHR-EFec.js} +2 -2
- package/dist/src/{version-eRkNuGv8.js → version-F0YDgb7J.js} +2 -2
- package/dist/src/{version-BWCSaByA.cjs → version-VzUqOBZk.cjs} +2 -2
- package/dist/src/{version-lpHV_53E.js → version-qVEN5qCm.js} +2 -2
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/dist/src/app/assets/Report-BNHJKN35.js +0 -1
- package/dist/src/cache-Cf7b4pWE.js +0 -3
- package/dist/src/cloud-p96PA4MH.js +0 -3
- package/dist/src/codex-sdk-BGjVAk23.js +0 -3
- package/dist/src/evalResult-DqzsS6_W.js +0 -3
- package/dist/src/evaluator-DNdJF1Gv.js +0 -3
- package/dist/src/fetch-_YgGd2qv.js +0 -3
- package/dist/src/graders-BDT7dif6.js +0 -3
- package/dist/src/server-BaLytskk.js +0 -3
- package/dist/src/telemetry-ByPqDcKC.js +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { N as state, O as getEnvString, n as getLogLevel, s as logger } from "./logger-BbY6ypFL.js";
|
|
3
3
|
import { r as importModule } from "./esm-Bexx2PFc.js";
|
|
4
|
-
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-
|
|
4
|
+
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-BJKAkz2e.js";
|
|
5
5
|
import { createRequire } from "node:module";
|
|
6
6
|
import fs from "fs";
|
|
7
7
|
import path from "path";
|
|
@@ -591,4 +591,4 @@ var OpenCodeSDKProvider = class {
|
|
|
591
591
|
//#endregion
|
|
592
592
|
export { OpenCodeSDKProvider };
|
|
593
593
|
|
|
594
|
-
//# sourceMappingURL=opencode-sdk-
|
|
594
|
+
//# sourceMappingURL=opencode-sdk-CqkyG8De.js.map
|
|
@@ -1,10 +1,62 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { s as logger } from "./logger-BbY6ypFL.js";
|
|
3
|
-
import { _ as REQUEST_TIMEOUT_MS, r as fetchWithRetries } from "./fetch-
|
|
4
|
-
import { n as VERSION } from "./version-
|
|
5
|
-
import { o as getUserEmail } from "./accounts-
|
|
6
|
-
import {
|
|
3
|
+
import { _ as REQUEST_TIMEOUT_MS, r as fetchWithRetries } from "./fetch-Cpf1U1nO.js";
|
|
4
|
+
import { n as VERSION } from "./version-F0YDgb7J.js";
|
|
5
|
+
import { o as getUserEmail } from "./accounts-D6IBfEE0.js";
|
|
6
|
+
import { wt as getInputType } from "./types-BFevViUY.js";
|
|
7
|
+
import { c as neverGenerateRemoteForRegularEvals, i as getRemoteGenerationUrlForUnaligned, r as getRemoteGenerationUrl, s as neverGenerateRemote } from "./remoteGeneration-D6UjE2JT.js";
|
|
7
8
|
import dedent from "dedent";
|
|
9
|
+
//#region src/redteam/remoteMaterialization.ts
|
|
10
|
+
const REMOTE_MATERIALIZATION_CONTEXT_VAR = "__promptfooRemoteMaterialization";
|
|
11
|
+
function filterMaterializedVarsToInputs(vars, inputs, options) {
|
|
12
|
+
if (!inputs || Object.keys(inputs).length === 0) return vars;
|
|
13
|
+
return Object.fromEntries(Object.entries(vars).filter(([key]) => {
|
|
14
|
+
if (!Object.prototype.hasOwnProperty.call(inputs, key)) return false;
|
|
15
|
+
if (!options?.textOnly) return true;
|
|
16
|
+
return getInputType(inputs[key]) === "text";
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
function buildRemoteMaterializedInputVariables(response, fallbackVars, inputs) {
|
|
20
|
+
const filteredFallbackVars = filterMaterializedVarsToInputs(fallbackVars, inputs, { textOnly: true });
|
|
21
|
+
const filteredMaterializedVars = filterMaterializedVarsToInputs(response.materializedVars ?? {}, inputs);
|
|
22
|
+
return {
|
|
23
|
+
...response.inputMaterialization ? { metadata: response.inputMaterialization } : {},
|
|
24
|
+
vars: {
|
|
25
|
+
...filteredFallbackVars,
|
|
26
|
+
...filteredMaterializedVars
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
function getRemoteMaterializationHost() {
|
|
31
|
+
const remoteUrl = getRemoteGenerationUrl();
|
|
32
|
+
try {
|
|
33
|
+
return new URL(remoteUrl).origin;
|
|
34
|
+
} catch {
|
|
35
|
+
return remoteUrl;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function buildRemoteMaterializationContextVars(context) {
|
|
39
|
+
return { [REMOTE_MATERIALIZATION_CONTEXT_VAR]: context };
|
|
40
|
+
}
|
|
41
|
+
function getRemoteMaterializationContextFromVars(vars) {
|
|
42
|
+
const raw = vars?.[REMOTE_MATERIALIZATION_CONTEXT_VAR];
|
|
43
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
44
|
+
return raw;
|
|
45
|
+
}
|
|
46
|
+
function requiresRemoteMaterialization(inputs) {
|
|
47
|
+
return Boolean(inputs && Object.keys(inputs).length > 0);
|
|
48
|
+
}
|
|
49
|
+
function getRemoteMaterializationUpgradeError(operation) {
|
|
50
|
+
return `${operation} requires remote multi-input materialization support from a newer Promptfoo server. Current remote endpoint: ${getRemoteMaterializationHost()}. Upgrade the Promptfoo server you are connected to and try again.`;
|
|
51
|
+
}
|
|
52
|
+
function isRemoteMaterializationUpgradeError(error) {
|
|
53
|
+
return error instanceof Error && error.message.includes("requires remote multi-input materialization support from a newer");
|
|
54
|
+
}
|
|
55
|
+
function assertRemoteMaterializationHandled(response, operation) {
|
|
56
|
+
if (response?.materializationHandled === true) return;
|
|
57
|
+
throw new Error(getRemoteMaterializationUpgradeError(operation));
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
8
60
|
//#region src/providers/promptfoo.ts
|
|
9
61
|
/**
|
|
10
62
|
* Provider for generating harmful/adversarial content using Promptfoo's unaligned models.
|
|
@@ -88,6 +140,7 @@ var PromptfooChatCompletionProvider = class {
|
|
|
88
140
|
|
|
89
141
|
Learn more: https://www.promptfoo.dev/docs/red-team/configuration#remote-generation
|
|
90
142
|
` };
|
|
143
|
+
const materializationContext = getRemoteMaterializationContextFromVars(context?.vars);
|
|
91
144
|
const body = {
|
|
92
145
|
jsonOnly: this.options.jsonOnly,
|
|
93
146
|
preferSmallModel: this.options.preferSmallModel,
|
|
@@ -95,7 +148,8 @@ var PromptfooChatCompletionProvider = class {
|
|
|
95
148
|
step: context?.prompt.label,
|
|
96
149
|
task: this.options.task,
|
|
97
150
|
email: getUserEmail(),
|
|
98
|
-
...this.options.inputs && { inputs: this.options.inputs }
|
|
151
|
+
...this.options.inputs && { inputs: this.options.inputs },
|
|
152
|
+
...materializationContext ? { materializationContext } : {}
|
|
99
153
|
};
|
|
100
154
|
try {
|
|
101
155
|
const response = await fetchWithRetries(getRemoteGenerationUrl(), {
|
|
@@ -110,6 +164,9 @@ var PromptfooChatCompletionProvider = class {
|
|
|
110
164
|
return { error: "LLM did not return a result, likely refusal" };
|
|
111
165
|
}
|
|
112
166
|
return {
|
|
167
|
+
inputMaterialization: data.inputMaterialization,
|
|
168
|
+
materializationHandled: data.materializationHandled,
|
|
169
|
+
materializedVars: data.materializedVars,
|
|
113
170
|
output: data.result,
|
|
114
171
|
tokenUsage: data.tokenUsage
|
|
115
172
|
};
|
|
@@ -176,6 +233,6 @@ var PromptfooSimulatedUserProvider = class {
|
|
|
176
233
|
}
|
|
177
234
|
};
|
|
178
235
|
//#endregion
|
|
179
|
-
export { REDTEAM_SIMULATED_USER_TASK_ID as i, PromptfooHarmfulCompletionProvider as n, PromptfooSimulatedUserProvider as r, PromptfooChatCompletionProvider as t };
|
|
236
|
+
export { assertRemoteMaterializationHandled as a, isRemoteMaterializationUpgradeError as c, REDTEAM_SIMULATED_USER_TASK_ID as i, requiresRemoteMaterialization as l, PromptfooHarmfulCompletionProvider as n, buildRemoteMaterializationContextVars as o, PromptfooSimulatedUserProvider as r, buildRemoteMaterializedInputVariables as s, PromptfooChatCompletionProvider as t };
|
|
180
237
|
|
|
181
|
-
//# sourceMappingURL=promptfoo-
|
|
238
|
+
//# sourceMappingURL=promptfoo-BU4_0J85.js.map
|
|
@@ -1,9 +1,61 @@
|
|
|
1
1
|
import { a as logger } from "./logger-KD8JjCRJ.js";
|
|
2
|
-
import { n as fetchWithRetries, v as REQUEST_TIMEOUT_MS } from "./fetch-
|
|
3
|
-
import { n as VERSION } from "./version-
|
|
4
|
-
import { o as getUserEmail } from "./accounts-
|
|
5
|
-
import { c as neverGenerateRemoteForRegularEvals, i as getRemoteGenerationUrlForUnaligned, r as getRemoteGenerationUrl, s as neverGenerateRemote } from "./remoteGeneration
|
|
2
|
+
import { n as fetchWithRetries, v as REQUEST_TIMEOUT_MS } from "./fetch-BSSAcMxf.js";
|
|
3
|
+
import { n as VERSION } from "./version-CHR-EFec.js";
|
|
4
|
+
import { o as getUserEmail } from "./accounts-BWjqwsrf.js";
|
|
5
|
+
import { c as neverGenerateRemoteForRegularEvals, i as getRemoteGenerationUrlForUnaligned, r as getRemoteGenerationUrl, s as neverGenerateRemote } from "./remoteGeneration--D6WjzUm.js";
|
|
6
|
+
import { bt as getInputType } from "./types-BJQBBPTP.js";
|
|
6
7
|
import dedent from "dedent";
|
|
8
|
+
//#region src/redteam/remoteMaterialization.ts
|
|
9
|
+
const REMOTE_MATERIALIZATION_CONTEXT_VAR = "__promptfooRemoteMaterialization";
|
|
10
|
+
function filterMaterializedVarsToInputs(vars, inputs, options) {
|
|
11
|
+
if (!inputs || Object.keys(inputs).length === 0) return vars;
|
|
12
|
+
return Object.fromEntries(Object.entries(vars).filter(([key]) => {
|
|
13
|
+
if (!Object.prototype.hasOwnProperty.call(inputs, key)) return false;
|
|
14
|
+
if (!options?.textOnly) return true;
|
|
15
|
+
return getInputType(inputs[key]) === "text";
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function buildRemoteMaterializedInputVariables(response, fallbackVars, inputs) {
|
|
19
|
+
const filteredFallbackVars = filterMaterializedVarsToInputs(fallbackVars, inputs, { textOnly: true });
|
|
20
|
+
const filteredMaterializedVars = filterMaterializedVarsToInputs(response.materializedVars ?? {}, inputs);
|
|
21
|
+
return {
|
|
22
|
+
...response.inputMaterialization ? { metadata: response.inputMaterialization } : {},
|
|
23
|
+
vars: {
|
|
24
|
+
...filteredFallbackVars,
|
|
25
|
+
...filteredMaterializedVars
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function getRemoteMaterializationHost() {
|
|
30
|
+
const remoteUrl = getRemoteGenerationUrl();
|
|
31
|
+
try {
|
|
32
|
+
return new URL(remoteUrl).origin;
|
|
33
|
+
} catch {
|
|
34
|
+
return remoteUrl;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function buildRemoteMaterializationContextVars(context) {
|
|
38
|
+
return { [REMOTE_MATERIALIZATION_CONTEXT_VAR]: context };
|
|
39
|
+
}
|
|
40
|
+
function getRemoteMaterializationContextFromVars(vars) {
|
|
41
|
+
const raw = vars?.[REMOTE_MATERIALIZATION_CONTEXT_VAR];
|
|
42
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
function requiresRemoteMaterialization(inputs) {
|
|
46
|
+
return Boolean(inputs && Object.keys(inputs).length > 0);
|
|
47
|
+
}
|
|
48
|
+
function getRemoteMaterializationUpgradeError(operation) {
|
|
49
|
+
return `${operation} requires remote multi-input materialization support from a newer Promptfoo server. Current remote endpoint: ${getRemoteMaterializationHost()}. Upgrade the Promptfoo server you are connected to and try again.`;
|
|
50
|
+
}
|
|
51
|
+
function isRemoteMaterializationUpgradeError(error) {
|
|
52
|
+
return error instanceof Error && error.message.includes("requires remote multi-input materialization support from a newer");
|
|
53
|
+
}
|
|
54
|
+
function assertRemoteMaterializationHandled(response, operation) {
|
|
55
|
+
if (response?.materializationHandled === true) return;
|
|
56
|
+
throw new Error(getRemoteMaterializationUpgradeError(operation));
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
7
59
|
//#region src/providers/promptfoo.ts
|
|
8
60
|
/**
|
|
9
61
|
* Provider for generating harmful/adversarial content using Promptfoo's unaligned models.
|
|
@@ -87,6 +139,7 @@ var PromptfooChatCompletionProvider = class {
|
|
|
87
139
|
|
|
88
140
|
Learn more: https://www.promptfoo.dev/docs/red-team/configuration#remote-generation
|
|
89
141
|
` };
|
|
142
|
+
const materializationContext = getRemoteMaterializationContextFromVars(context?.vars);
|
|
90
143
|
const body = {
|
|
91
144
|
jsonOnly: this.options.jsonOnly,
|
|
92
145
|
preferSmallModel: this.options.preferSmallModel,
|
|
@@ -94,7 +147,8 @@ var PromptfooChatCompletionProvider = class {
|
|
|
94
147
|
step: context?.prompt.label,
|
|
95
148
|
task: this.options.task,
|
|
96
149
|
email: getUserEmail(),
|
|
97
|
-
...this.options.inputs && { inputs: this.options.inputs }
|
|
150
|
+
...this.options.inputs && { inputs: this.options.inputs },
|
|
151
|
+
...materializationContext ? { materializationContext } : {}
|
|
98
152
|
};
|
|
99
153
|
try {
|
|
100
154
|
const response = await fetchWithRetries(getRemoteGenerationUrl(), {
|
|
@@ -109,6 +163,9 @@ var PromptfooChatCompletionProvider = class {
|
|
|
109
163
|
return { error: "LLM did not return a result, likely refusal" };
|
|
110
164
|
}
|
|
111
165
|
return {
|
|
166
|
+
inputMaterialization: data.inputMaterialization,
|
|
167
|
+
materializationHandled: data.materializationHandled,
|
|
168
|
+
materializedVars: data.materializedVars,
|
|
112
169
|
output: data.result,
|
|
113
170
|
tokenUsage: data.tokenUsage
|
|
114
171
|
};
|
|
@@ -175,6 +232,6 @@ var PromptfooSimulatedUserProvider = class {
|
|
|
175
232
|
}
|
|
176
233
|
};
|
|
177
234
|
//#endregion
|
|
178
|
-
export { REDTEAM_SIMULATED_USER_TASK_ID as i, PromptfooHarmfulCompletionProvider as n, PromptfooSimulatedUserProvider as r, PromptfooChatCompletionProvider as t };
|
|
235
|
+
export { assertRemoteMaterializationHandled as a, isRemoteMaterializationUpgradeError as c, REDTEAM_SIMULATED_USER_TASK_ID as i, requiresRemoteMaterialization as l, PromptfooHarmfulCompletionProvider as n, buildRemoteMaterializationContextVars as o, PromptfooSimulatedUserProvider as r, buildRemoteMaterializedInputVariables as s, PromptfooChatCompletionProvider as t };
|
|
179
236
|
|
|
180
|
-
//# sourceMappingURL=promptfoo-
|
|
237
|
+
//# sourceMappingURL=promptfoo-CReYAtfb.js.map
|
|
@@ -1,11 +1,63 @@
|
|
|
1
1
|
const require_rolldown_runtime = require("./rolldown-runtime-D_mwlA32.cjs");
|
|
2
2
|
const require_logger = require("./logger-cfNpzI4o.cjs");
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
3
|
+
const require_types = require("./types-CxJvaY2S.cjs");
|
|
4
|
+
const require_fetch = require("./fetch-Cfm4EuOB.cjs");
|
|
5
|
+
const require_version = require("./version-VzUqOBZk.cjs");
|
|
6
|
+
const require_accounts = require("./accounts-BVz5gHLK.cjs");
|
|
7
|
+
const require_remoteGeneration = require("./remoteGeneration-BpIYlb_O.cjs");
|
|
7
8
|
let dedent = require("dedent");
|
|
8
9
|
dedent = require_rolldown_runtime.__toESM(dedent, 1);
|
|
10
|
+
//#region src/redteam/remoteMaterialization.ts
|
|
11
|
+
const REMOTE_MATERIALIZATION_CONTEXT_VAR = "__promptfooRemoteMaterialization";
|
|
12
|
+
function filterMaterializedVarsToInputs(vars, inputs, options) {
|
|
13
|
+
if (!inputs || Object.keys(inputs).length === 0) return vars;
|
|
14
|
+
return Object.fromEntries(Object.entries(vars).filter(([key]) => {
|
|
15
|
+
if (!Object.prototype.hasOwnProperty.call(inputs, key)) return false;
|
|
16
|
+
if (!options?.textOnly) return true;
|
|
17
|
+
return require_types.getInputType(inputs[key]) === "text";
|
|
18
|
+
}));
|
|
19
|
+
}
|
|
20
|
+
function buildRemoteMaterializedInputVariables(response, fallbackVars, inputs) {
|
|
21
|
+
const filteredFallbackVars = filterMaterializedVarsToInputs(fallbackVars, inputs, { textOnly: true });
|
|
22
|
+
const filteredMaterializedVars = filterMaterializedVarsToInputs(response.materializedVars ?? {}, inputs);
|
|
23
|
+
return {
|
|
24
|
+
...response.inputMaterialization ? { metadata: response.inputMaterialization } : {},
|
|
25
|
+
vars: {
|
|
26
|
+
...filteredFallbackVars,
|
|
27
|
+
...filteredMaterializedVars
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function getRemoteMaterializationHost() {
|
|
32
|
+
const remoteUrl = require_remoteGeneration.getRemoteGenerationUrl();
|
|
33
|
+
try {
|
|
34
|
+
return new URL(remoteUrl).origin;
|
|
35
|
+
} catch {
|
|
36
|
+
return remoteUrl;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
function buildRemoteMaterializationContextVars(context) {
|
|
40
|
+
return { [REMOTE_MATERIALIZATION_CONTEXT_VAR]: context };
|
|
41
|
+
}
|
|
42
|
+
function getRemoteMaterializationContextFromVars(vars) {
|
|
43
|
+
const raw = vars?.[REMOTE_MATERIALIZATION_CONTEXT_VAR];
|
|
44
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
45
|
+
return raw;
|
|
46
|
+
}
|
|
47
|
+
function requiresRemoteMaterialization(inputs) {
|
|
48
|
+
return Boolean(inputs && Object.keys(inputs).length > 0);
|
|
49
|
+
}
|
|
50
|
+
function getRemoteMaterializationUpgradeError(operation) {
|
|
51
|
+
return `${operation} requires remote multi-input materialization support from a newer Promptfoo server. Current remote endpoint: ${getRemoteMaterializationHost()}. Upgrade the Promptfoo server you are connected to and try again.`;
|
|
52
|
+
}
|
|
53
|
+
function isRemoteMaterializationUpgradeError(error) {
|
|
54
|
+
return error instanceof Error && error.message.includes("requires remote multi-input materialization support from a newer");
|
|
55
|
+
}
|
|
56
|
+
function assertRemoteMaterializationHandled(response, operation) {
|
|
57
|
+
if (response?.materializationHandled === true) return;
|
|
58
|
+
throw new Error(getRemoteMaterializationUpgradeError(operation));
|
|
59
|
+
}
|
|
60
|
+
//#endregion
|
|
9
61
|
//#region src/providers/promptfoo.ts
|
|
10
62
|
/**
|
|
11
63
|
* Provider for generating harmful/adversarial content using Promptfoo's unaligned models.
|
|
@@ -89,6 +141,7 @@ var PromptfooChatCompletionProvider = class {
|
|
|
89
141
|
|
|
90
142
|
Learn more: https://www.promptfoo.dev/docs/red-team/configuration#remote-generation
|
|
91
143
|
` };
|
|
144
|
+
const materializationContext = getRemoteMaterializationContextFromVars(context?.vars);
|
|
92
145
|
const body = {
|
|
93
146
|
jsonOnly: this.options.jsonOnly,
|
|
94
147
|
preferSmallModel: this.options.preferSmallModel,
|
|
@@ -96,7 +149,8 @@ var PromptfooChatCompletionProvider = class {
|
|
|
96
149
|
step: context?.prompt.label,
|
|
97
150
|
task: this.options.task,
|
|
98
151
|
email: require_accounts.getUserEmail(),
|
|
99
|
-
...this.options.inputs && { inputs: this.options.inputs }
|
|
152
|
+
...this.options.inputs && { inputs: this.options.inputs },
|
|
153
|
+
...materializationContext ? { materializationContext } : {}
|
|
100
154
|
};
|
|
101
155
|
try {
|
|
102
156
|
const response = await require_fetch.fetchWithRetries(require_remoteGeneration.getRemoteGenerationUrl(), {
|
|
@@ -111,6 +165,9 @@ var PromptfooChatCompletionProvider = class {
|
|
|
111
165
|
return { error: "LLM did not return a result, likely refusal" };
|
|
112
166
|
}
|
|
113
167
|
return {
|
|
168
|
+
inputMaterialization: data.inputMaterialization,
|
|
169
|
+
materializationHandled: data.materializationHandled,
|
|
170
|
+
materializedVars: data.materializedVars,
|
|
114
171
|
output: data.result,
|
|
115
172
|
tokenUsage: data.tokenUsage
|
|
116
173
|
};
|
|
@@ -201,5 +258,35 @@ Object.defineProperty(exports, "REDTEAM_SIMULATED_USER_TASK_ID", {
|
|
|
201
258
|
return REDTEAM_SIMULATED_USER_TASK_ID;
|
|
202
259
|
}
|
|
203
260
|
});
|
|
261
|
+
Object.defineProperty(exports, "assertRemoteMaterializationHandled", {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function() {
|
|
264
|
+
return assertRemoteMaterializationHandled;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
Object.defineProperty(exports, "buildRemoteMaterializationContextVars", {
|
|
268
|
+
enumerable: true,
|
|
269
|
+
get: function() {
|
|
270
|
+
return buildRemoteMaterializationContextVars;
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
Object.defineProperty(exports, "buildRemoteMaterializedInputVariables", {
|
|
274
|
+
enumerable: true,
|
|
275
|
+
get: function() {
|
|
276
|
+
return buildRemoteMaterializedInputVariables;
|
|
277
|
+
}
|
|
278
|
+
});
|
|
279
|
+
Object.defineProperty(exports, "isRemoteMaterializationUpgradeError", {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
get: function() {
|
|
282
|
+
return isRemoteMaterializationUpgradeError;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
285
|
+
Object.defineProperty(exports, "requiresRemoteMaterialization", {
|
|
286
|
+
enumerable: true,
|
|
287
|
+
get: function() {
|
|
288
|
+
return requiresRemoteMaterialization;
|
|
289
|
+
}
|
|
290
|
+
});
|
|
204
291
|
|
|
205
|
-
//# sourceMappingURL=promptfoo-
|
|
292
|
+
//# sourceMappingURL=promptfoo-ClChwT74.cjs.map
|
|
@@ -1,9 +1,61 @@
|
|
|
1
1
|
import { a as logger } from "./logger-Ct2S6Yx-.js";
|
|
2
|
-
import {
|
|
3
|
-
import { n as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import { Vt as getInputType } from "./types-D6glLbdF.js";
|
|
3
|
+
import { n as fetchWithRetries, p as REQUEST_TIMEOUT_MS } from "./fetch-Doks14zQ.js";
|
|
4
|
+
import { n as VERSION } from "./version-qVEN5qCm.js";
|
|
5
|
+
import { i as getUserEmail } from "./accounts-DAv_0iE7.js";
|
|
6
|
+
import { c as neverGenerateRemoteForRegularEvals, i as getRemoteGenerationUrlForUnaligned, r as getRemoteGenerationUrl, s as neverGenerateRemote } from "./remoteGeneration-CJC3E0aW.js";
|
|
6
7
|
import dedent from "dedent";
|
|
8
|
+
//#region src/redteam/remoteMaterialization.ts
|
|
9
|
+
const REMOTE_MATERIALIZATION_CONTEXT_VAR = "__promptfooRemoteMaterialization";
|
|
10
|
+
function filterMaterializedVarsToInputs(vars, inputs, options) {
|
|
11
|
+
if (!inputs || Object.keys(inputs).length === 0) return vars;
|
|
12
|
+
return Object.fromEntries(Object.entries(vars).filter(([key]) => {
|
|
13
|
+
if (!Object.prototype.hasOwnProperty.call(inputs, key)) return false;
|
|
14
|
+
if (!options?.textOnly) return true;
|
|
15
|
+
return getInputType(inputs[key]) === "text";
|
|
16
|
+
}));
|
|
17
|
+
}
|
|
18
|
+
function buildRemoteMaterializedInputVariables(response, fallbackVars, inputs) {
|
|
19
|
+
const filteredFallbackVars = filterMaterializedVarsToInputs(fallbackVars, inputs, { textOnly: true });
|
|
20
|
+
const filteredMaterializedVars = filterMaterializedVarsToInputs(response.materializedVars ?? {}, inputs);
|
|
21
|
+
return {
|
|
22
|
+
...response.inputMaterialization ? { metadata: response.inputMaterialization } : {},
|
|
23
|
+
vars: {
|
|
24
|
+
...filteredFallbackVars,
|
|
25
|
+
...filteredMaterializedVars
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function getRemoteMaterializationHost() {
|
|
30
|
+
const remoteUrl = getRemoteGenerationUrl();
|
|
31
|
+
try {
|
|
32
|
+
return new URL(remoteUrl).origin;
|
|
33
|
+
} catch {
|
|
34
|
+
return remoteUrl;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
function buildRemoteMaterializationContextVars(context) {
|
|
38
|
+
return { [REMOTE_MATERIALIZATION_CONTEXT_VAR]: context };
|
|
39
|
+
}
|
|
40
|
+
function getRemoteMaterializationContextFromVars(vars) {
|
|
41
|
+
const raw = vars?.[REMOTE_MATERIALIZATION_CONTEXT_VAR];
|
|
42
|
+
if (!raw || typeof raw !== "object" || Array.isArray(raw)) return;
|
|
43
|
+
return raw;
|
|
44
|
+
}
|
|
45
|
+
function requiresRemoteMaterialization(inputs) {
|
|
46
|
+
return Boolean(inputs && Object.keys(inputs).length > 0);
|
|
47
|
+
}
|
|
48
|
+
function getRemoteMaterializationUpgradeError(operation) {
|
|
49
|
+
return `${operation} requires remote multi-input materialization support from a newer Promptfoo server. Current remote endpoint: ${getRemoteMaterializationHost()}. Upgrade the Promptfoo server you are connected to and try again.`;
|
|
50
|
+
}
|
|
51
|
+
function isRemoteMaterializationUpgradeError(error) {
|
|
52
|
+
return error instanceof Error && error.message.includes("requires remote multi-input materialization support from a newer");
|
|
53
|
+
}
|
|
54
|
+
function assertRemoteMaterializationHandled(response, operation) {
|
|
55
|
+
if (response?.materializationHandled === true) return;
|
|
56
|
+
throw new Error(getRemoteMaterializationUpgradeError(operation));
|
|
57
|
+
}
|
|
58
|
+
//#endregion
|
|
7
59
|
//#region src/providers/promptfoo.ts
|
|
8
60
|
/**
|
|
9
61
|
* Provider for generating harmful/adversarial content using Promptfoo's unaligned models.
|
|
@@ -87,6 +139,7 @@ var PromptfooChatCompletionProvider = class {
|
|
|
87
139
|
|
|
88
140
|
Learn more: https://www.promptfoo.dev/docs/red-team/configuration#remote-generation
|
|
89
141
|
` };
|
|
142
|
+
const materializationContext = getRemoteMaterializationContextFromVars(context?.vars);
|
|
90
143
|
const body = {
|
|
91
144
|
jsonOnly: this.options.jsonOnly,
|
|
92
145
|
preferSmallModel: this.options.preferSmallModel,
|
|
@@ -94,7 +147,8 @@ var PromptfooChatCompletionProvider = class {
|
|
|
94
147
|
step: context?.prompt.label,
|
|
95
148
|
task: this.options.task,
|
|
96
149
|
email: getUserEmail(),
|
|
97
|
-
...this.options.inputs && { inputs: this.options.inputs }
|
|
150
|
+
...this.options.inputs && { inputs: this.options.inputs },
|
|
151
|
+
...materializationContext ? { materializationContext } : {}
|
|
98
152
|
};
|
|
99
153
|
try {
|
|
100
154
|
const response = await fetchWithRetries(getRemoteGenerationUrl(), {
|
|
@@ -109,6 +163,9 @@ var PromptfooChatCompletionProvider = class {
|
|
|
109
163
|
return { error: "LLM did not return a result, likely refusal" };
|
|
110
164
|
}
|
|
111
165
|
return {
|
|
166
|
+
inputMaterialization: data.inputMaterialization,
|
|
167
|
+
materializationHandled: data.materializationHandled,
|
|
168
|
+
materializedVars: data.materializedVars,
|
|
112
169
|
output: data.result,
|
|
113
170
|
tokenUsage: data.tokenUsage
|
|
114
171
|
};
|
|
@@ -175,6 +232,6 @@ var PromptfooSimulatedUserProvider = class {
|
|
|
175
232
|
}
|
|
176
233
|
};
|
|
177
234
|
//#endregion
|
|
178
|
-
export { REDTEAM_SIMULATED_USER_TASK_ID as i, PromptfooHarmfulCompletionProvider as n, PromptfooSimulatedUserProvider as r, PromptfooChatCompletionProvider as t };
|
|
235
|
+
export { assertRemoteMaterializationHandled as a, isRemoteMaterializationUpgradeError as c, REDTEAM_SIMULATED_USER_TASK_ID as i, requiresRemoteMaterialization as l, PromptfooHarmfulCompletionProvider as n, buildRemoteMaterializationContextVars as o, PromptfooSimulatedUserProvider as r, buildRemoteMaterializedInputVariables as s, PromptfooChatCompletionProvider as t };
|
|
179
236
|
|
|
180
|
-
//# sourceMappingURL=promptfoo-
|
|
237
|
+
//# sourceMappingURL=promptfoo-CqEpj6Sr.js.map
|