promptfoo 0.122.1 → 0.122.2
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-Jug2Ciel.js → accounts-B8CVRmIl.js} +4 -4
- package/dist/src/{accounts-mch0qw47.js → accounts-BDud3p32.js} +4 -4
- package/dist/src/{accounts-CAjSMkuH.js → accounts-DApS8Gpe.js} +5 -5
- package/dist/src/{accounts-CZFxG3Og.cjs → accounts-DosZWKJy.cjs} +4 -4
- package/dist/src/{agentic-utils-CAL6OL48.js → agentic-utils-B94-_ExD.js} +12 -3
- package/dist/src/{agentic-utils-B3r4NpU-.cjs → agentic-utils-CMewaQ09.cjs} +13 -4
- package/dist/src/{agentic-utils-Cswmio9j.js → agentic-utils-DOMq4mqJ.js} +12 -3
- package/dist/src/{agentic-utils-CR5IyddC.js → agentic-utils-DneHhExJ.js} +12 -3
- package/dist/src/{agents-BYZQa11K.js → agents-99i09OkS.js} +4 -4
- package/dist/src/{agents-CfaaStfu.cjs → agents-BXDQ1xw_.cjs} +2 -2
- package/dist/src/{agents-CUSOo7ly.js → agents-BzOkbtWo.js} +2 -2
- package/dist/src/{agents-DgKZ1aMv.js → agents-CmgJALGp.js} +2 -2
- package/dist/src/{agents-CzaXVlpn.js → agents-CqqOAB9i.js} +4 -4
- package/dist/src/{agents-t29fGe9S.js → agents-CroOVBY1.js} +4 -4
- package/dist/src/{agents-CKOdC5bg.cjs → agents-DtmugJpS.cjs} +4 -4
- package/dist/src/{agents-B2aTR8k4.js → agents-mNkg-c-D.js} +2 -2
- package/dist/src/{ai.studio-DprNFGT7.js → ai.studio-4CqyrhMr.js} +7 -6
- package/dist/src/{ai.studio-BTbBobIe.js → ai.studio-Bw7HGWAy.js} +7 -6
- package/dist/src/{ai.studio-DdDttvQ_.js → ai.studio-BySqRQcL.js} +7 -6
- package/dist/src/{ai.studio-lJHgVtc3.js → ai.studio-CmQz4HRF.js} +1 -1
- package/dist/src/{ai.studio-Cfr1uqJd.cjs → ai.studio-CzWiW2J3.cjs} +11 -10
- package/dist/src/{aimlapi-agQErPC7.cjs → aimlapi-BPLx5bkN.cjs} +6 -6
- package/dist/src/{aimlapi-C7aw_Yci.js → aimlapi-CPHuwytR.js} +6 -6
- package/dist/src/{aimlapi-BbhgeGRG.js → aimlapi-CtFNhGfQ.js} +6 -6
- package/dist/src/{aimlapi-Cj1shS5g.js → aimlapi-DvORJAqy.js} +6 -6
- package/dist/src/{anthropicMessages-DM4fND86.cjs → anthropicMessages-CV6LTNAW.cjs} +2 -2
- package/dist/src/{anthropicMessages-B2lCmO9a.js → anthropicMessages-D7C1kjQD.js} +2 -2
- package/dist/src/{anthropicMessages-B3DWK3KH.js → anthropicMessages-Dnuashu8.js} +2 -2
- package/dist/src/{anthropicMessages-CIzwoHC7.js → anthropicMessages-HcZgERmB.js} +2 -2
- package/dist/src/app/assets/{index-A24J7UxV.css → index-4gjyvw3y.css} +1 -1
- package/dist/src/app/assets/{index-BSBYsw_6.js → index-nyJ_XC0u.js} +55 -55
- package/dist/src/app/index.html +2 -2
- package/dist/src/{audio-FK9OJM6x.js → audio-BdlJQepT.js} +3 -3
- package/dist/src/{audio-DJSX3nfH.cjs → audio-CT31dzi3.cjs} +3 -3
- package/dist/src/{audio-BLydpzg4.js → audio-CZ4800_-.js} +3 -3
- package/dist/src/{audio-BFL3WPG8.js → audio-CuAl9sNH.js} +3 -3
- package/dist/src/{authoritativeMarkupInjection-C79vhK3h.js → authoritativeMarkupInjection-Bk-2UAXm.js} +6 -6
- package/dist/src/{authoritativeMarkupInjection-DSEnwId_.cjs → authoritativeMarkupInjection-BkZvUL3M.cjs} +6 -6
- package/dist/src/{authoritativeMarkupInjection-D7PPkR2H.js → authoritativeMarkupInjection-CO3XuBsw.js} +6 -6
- package/dist/src/{authoritativeMarkupInjection-a2WZAWI8.js → authoritativeMarkupInjection-CsW2Rlxr.js} +6 -6
- package/dist/src/{aws-GuyZqnyf.js → aws-BatJ_yy7.js} +20 -20
- package/dist/src/{aws-BHmi7gOy.cjs → aws-DhQCXH3c.cjs} +20 -20
- package/dist/src/{aws-Bzt3WQU2.js → aws-VLbhCTiT.js} +20 -20
- package/dist/src/{aws-BS8qSHy8.js → aws-iSX9DyrD.js} +20 -20
- package/dist/src/{base-nbJrRpSV.js → base-C6jKTbCS.js} +7 -6
- package/dist/src/{base-CoTAT5vv.cjs → base-CJEf9k2O.cjs} +8 -7
- package/dist/src/{base-DEkuzxBW.js → base-CWyDTNcT.js} +2 -2
- package/dist/src/{base-mEWUSyIi.cjs → base-CeTzVZ7f.cjs} +2 -2
- package/dist/src/{base-CcYX8Sl7.js → base-CnzvtFbT.js} +2 -2
- package/dist/src/{base-BW_ro6TZ.js → base-Dd6PX7qL.js} +7 -6
- package/dist/src/{base-e2pL9Dg2.js → base-IFkEP-f1.js} +2 -2
- package/dist/src/{base-Bya3Xq-l.js → base-wuaktSuM.js} +7 -6
- package/dist/src/{bestOfN-6RYHfbeS.js → bestOfN-B99Kp3n1.js} +7 -7
- package/dist/src/{bestOfN-DsHy4gMF.cjs → bestOfN-BtBlH3Y1.cjs} +7 -7
- package/dist/src/{bestOfN-DDkIdZME.js → bestOfN-C7cPgSak.js} +7 -7
- package/dist/src/{bestOfN-Cbw8nnar.js → bestOfN-YNF3sLNc.js} +7 -7
- package/dist/src/{billing-nlGj2fi4.js → billing-BhTrP4CT.js} +2 -2
- package/dist/src/{billing-_izMSTD8.js → billing-D0eg28TA.js} +2 -2
- package/dist/src/{billing-K5i9I9vT.cjs → billing-Q1c9C5Or.cjs} +2 -2
- package/dist/src/{billing-CXk1T-EF.js → billing-eFe0xWZw.js} +2 -2
- package/dist/src/cache-Cjok8TBD.js +3 -0
- package/dist/src/{cache-Bwj_lNIo.js → cache-DTOVFNqA.js} +10 -4
- package/dist/src/{cache-C41JuZ74.js → cache-ePPAC5hy.js} +10 -4
- package/dist/src/{cache-DU82DyKI.cjs → cache-g3VTrtsd.cjs} +10 -4
- package/dist/src/{cache-NhFSRGTI.js → cache-xL5UULpy.js} +10 -5
- package/dist/src/{chat-Dt05zdU6.js → chat-1nt-gftw.js} +2 -2
- package/dist/src/{chat-Bh-Qkkm0.js → chat-64whAu1x.js} +2 -2
- package/dist/src/{chat-B43K4ZEW.cjs → chat-B5hzLi-1.cjs} +2 -2
- package/dist/src/{chat-6XCdGjXy.js → chat-BNY6oewj.js} +2 -2
- package/dist/src/{chat-Ds6f4gIO.js → chat-BPcmJMS6.js} +3 -3
- package/dist/src/{chat-CsmFtqbm.js → chat-BbVy4fHI.js} +2 -2
- package/dist/src/{chat-BPZNYAci.js → chat-BfWSvpJp.js} +3 -3
- package/dist/src/{chat-g28uolEO.cjs → chat-BuHuQ8dN.cjs} +13 -12
- package/dist/src/{chat-BUPwwei1.js → chat-C9Xi0123.js} +2 -2
- package/dist/src/{chat-D6SUUPHc.js → chat-CQkXljIT.js} +11 -10
- package/dist/src/{chat-BJT_S-0-.cjs → chat-DQfpTnnW.cjs} +2 -2
- package/dist/src/{chat-BjEpVBWz.js → chat-DQhTLvCt.js} +2 -2
- package/dist/src/{chat-b1tvD2yV.js → chat-Dn1Z6reC.js} +3 -3
- package/dist/src/{chat-DYIP7MZz.js → chat-DqUm2XRG.js} +11 -10
- package/dist/src/{chat-ByXWx4Jn.js → chat-WpIdBaCf.js} +11 -10
- package/dist/src/{chat-D9DdQU09.cjs → chat-psXx3S3c.cjs} +3 -3
- package/dist/src/{claude-agent-sdk-BOt139Ms.js → claude-agent-sdk-ByLXefcP.js} +4 -4
- package/dist/src/{claude-agent-sdk-BbO4g2C3.cjs → claude-agent-sdk-CXAxCt84.cjs} +4 -4
- package/dist/src/{claude-agent-sdk-ClB69ybZ.js → claude-agent-sdk-Ccqr4OHD.js} +4 -4
- package/dist/src/{claude-agent-sdk-DDgSb327.js → claude-agent-sdk-DFDGkJC4.js} +4 -4
- package/dist/src/{client-nl7Ghern.js → client-4bErwdpG.js} +3 -3
- package/dist/src/{client-DvRyvBRs.cjs → client-B8cIFzy1.cjs} +3 -3
- package/dist/src/{client-QLK1dAIt.js → client-Bz_qkOt7.js} +3 -3
- package/dist/src/{client-BpIjXLJ0.js → client-C8mYuoRi.js} +3 -3
- package/dist/src/cloud-BzpJioZO.js +3 -0
- package/dist/src/{cloud-D3FRkXX5.js → cloud-D9lRDzlx.js} +43 -7
- package/dist/src/{cloudflare-ai-CerptSv1.js → cloudflare-ai-BduG_WGt.js} +4 -4
- package/dist/src/{cloudflare-ai-BEu-xQ5J.cjs → cloudflare-ai-C0cr71_N.cjs} +4 -4
- package/dist/src/{cloudflare-ai-Cnaag2kZ.js → cloudflare-ai-DNNHsdi_.js} +4 -4
- package/dist/src/{cloudflare-ai-DpwGGVCv.js → cloudflare-ai-GiqeJOW2.js} +4 -4
- package/dist/src/{cloudflare-gateway-yWM6dZYR.js → cloudflare-gateway-BCd15euW.js} +3 -3
- package/dist/src/{cloudflare-gateway-D_M6cCM_.cjs → cloudflare-gateway-CNwgkjWa.cjs} +3 -3
- package/dist/src/{cloudflare-gateway-DC_kOGWf.js → cloudflare-gateway-D6gTnn0M.js} +3 -3
- package/dist/src/{cloudflare-gateway-BDO7Oy1M.js → cloudflare-gateway-j8ioV3mO.js} +3 -3
- package/dist/src/{codex-app-server-CwK6Xbfe.cjs → codex-app-server-CeT18Dkz.cjs} +6 -6
- package/dist/src/{codex-app-server-YZmDON1h.js → codex-app-server-CjOwEU74.js} +1 -1
- package/dist/src/{codex-app-server-Caz528S8.js → codex-app-server-DW77otWv.js} +5 -5
- package/dist/src/{codex-app-server-DK4HYKYU.js → codex-app-server-GlPHXwGV.js} +5 -5
- package/dist/src/{codex-app-server-DTZ30MNj.js → codex-app-server-krirlx9j.js} +5 -5
- package/dist/src/codex-runtime-BjmQ9rWv.js +5 -0
- package/dist/src/codex-runtime-DYQUgTW-.js +4 -0
- package/dist/src/codex-runtime-o7SyHeWu.js +4 -0
- package/dist/src/codex-runtime-sKhQvTow.cjs +3 -0
- package/dist/src/{codex-sdk-C5VGCVuq.js → codex-sdk-B3LZgJqW.js} +6 -5
- package/dist/src/{codex-sdk-Bxihv7gJ.cjs → codex-sdk-BrhzHGrr.cjs} +7 -6
- package/dist/src/{codex-sdk-BRCGs7KO.js → codex-sdk-DZ_mKG21.js} +6 -5
- package/dist/src/codex-sdk-DkbU2gJR.js +3 -0
- package/dist/src/{codex-sdk-AzoGV5xQ.js → codex-sdk-Gv0vgj5a.js} +6 -5
- package/dist/src/codex-security-71xcR7s3.js +382 -0
- package/dist/src/codex-security-A8dTt6Ov.cjs +386 -0
- package/dist/src/codex-security-DSYUnVdR.js +383 -0
- package/dist/src/codex-security-DqVPI2Th.js +382 -0
- package/dist/src/{cometapi-CFOBA79U.js → cometapi-BdmjhPSR.js} +7 -7
- package/dist/src/{cometapi-Dq70nB-i.js → cometapi-Bst9fl8W.js} +7 -7
- package/dist/src/{cometapi-DEVvRD5z.cjs → cometapi-CPjQpopA.cjs} +7 -7
- package/dist/src/{cometapi-C3SQRHPF.js → cometapi-Duei84Pe.js} +7 -7
- package/dist/src/{completion-Ci8l1pSN.js → completion-BwID-cTv.js} +5 -5
- package/dist/src/{completion-CcbYZDub.js → completion-D90cHpyH.js} +5 -5
- package/dist/src/{completion-wKp5JlDu.js → completion-DSVbiAms.js} +5 -5
- package/dist/src/{completion-Ch4qZHiN.cjs → completion-fjqwBQIQ.cjs} +5 -5
- package/dist/src/{crescendo-QA8kgoFA.cjs → crescendo-Cism3YAo.cjs} +18 -18
- package/dist/src/{crescendo-DXTA2eKd.js → crescendo-Cpj-F0iB.js} +13 -13
- package/dist/src/{crescendo-Dgco_cd5.js → crescendo-DJ3dxaZ8.js} +13 -13
- package/dist/src/{crescendo-By5ZfUli.js → crescendo-DiAK4mXf.js} +13 -13
- package/dist/src/{custom-fIO2MwcN.js → custom-BcSQF7OR.js} +11 -11
- package/dist/src/{custom-CobMcSKD.js → custom-CpA8_KgN.js} +11 -11
- package/dist/src/{custom-CPTsrJYI.js → custom-DfeRaakX.js} +11 -11
- package/dist/src/{custom-DQMMH6yL.cjs → custom-WyC-PH98.cjs} +14 -14
- package/dist/src/{docker-Bhb-hDqU.cjs → docker-5g1NcdAE.cjs} +5 -5
- package/dist/src/{docker-bXiMHPBm.js → docker-B97bdCFf.js} +5 -5
- package/dist/src/{docker-CdqlpwxU.js → docker-CgvCV_lT.js} +5 -5
- package/dist/src/{docker-CLatgAgj.js → docker-D2q5yAnA.js} +5 -5
- package/dist/src/{embedding-DMnl5l3W.js → embedding-B3RQXlr7.js} +5 -5
- package/dist/src/{embedding-cJ7sWqTp.cjs → embedding-C2BHs7bs.cjs} +5 -5
- package/dist/src/{embedding-DWeAJwIi.js → embedding-DgjYhcCm.js} +5 -5
- package/dist/src/{embedding-Kx2Jhb7b.js → embedding-qvISOYlD.js} +5 -5
- package/dist/src/{eval-XZjM8PtE.js → eval-BB4Rvl3w.js} +4 -4
- package/dist/src/{eval-yT4SKSzC.js → eval-BFqlPFXm.js} +1 -1
- package/dist/src/{evalResult-CmUmgA2I.js → evalResult-C9ntrv7r.js} +2 -2
- package/dist/src/{evaluator-BNYv5Xws.js → evaluator-BxDpurGf.js} +21 -20
- package/dist/src/evaluator-DxIVNCZm.js +3 -0
- package/dist/src/{evaluatorHelpers-D2ObFR8i.cjs → evaluatorHelpers-B2c1yYV4.cjs} +8 -7
- package/dist/src/{evaluatorHelpers-C60uhMf4.js → evaluatorHelpers-Bd8xun4J.js} +5 -4
- package/dist/src/{evaluatorHelpers-lNii4N30.js → evaluatorHelpers-CZ2p3rWG.js} +5 -4
- package/dist/src/{evaluatorHelpers-G6saWD9g.js → evaluatorHelpers-CgcFRjns.js} +5 -4
- package/dist/src/fetch-BO4sLtRp.js +3 -0
- package/dist/src/{fetch-BCrWkFgb.js → fetch-CKqW5dym.js} +2 -2
- package/dist/src/{fetch-DxQ9oCzS.cjs → fetch-CQfF18HC.cjs} +2 -2
- package/dist/src/{fetch-DDiGmyRM.js → fetch-Cm0VICza.js} +2 -2
- package/dist/src/{fetch-DTnUr1aF.cjs → fetch-D54lzFcD.cjs} +69 -18
- package/dist/src/{fetch-BdWQKDMj.js → fetch-DnDg-Ics.js} +64 -19
- package/dist/src/{fetch-JNQMF9vN.js → fetch-Dwv9LIL3.js} +2 -2
- package/dist/src/{fetch-Bnj1JCJi.js → fetch-KD8O9oZZ.js} +24 -15
- package/dist/src/{fetch-BjXG13jC.js → fetch-tOnj-VPG.js} +64 -19
- package/dist/src/{functionCallbackUtils-Ck1qbh7p.js → functionCallbackUtils-B-fNUZ4T.js} +3 -3
- package/dist/src/{functionCallbackUtils-BJ2I_9tt.js → functionCallbackUtils-B7KGl5xQ.js} +3 -3
- package/dist/src/{functionCallbackUtils-VbcI1Aub.cjs → functionCallbackUtils-BDroEgNs.cjs} +3 -3
- package/dist/src/{functionCallbackUtils-BGXXxhrC.js → functionCallbackUtils-EjWy67uz.js} +3 -3
- package/dist/src/{gemini-image-8YxPzaSx.js → gemini-image-B4vMqMOQ.js} +4 -4
- package/dist/src/{gemini-image-C5qQIQhS.js → gemini-image-B6ZTrDe5.js} +4 -4
- package/dist/src/{gemini-image-DxTRWDFj.cjs → gemini-image-DYd6vsTn.cjs} +4 -4
- package/dist/src/{gemini-image-CfkY7fEx.js → gemini-image-D_-_Yxtw.js} +4 -4
- package/dist/src/{goat-CR4LFL8E.js → goat-B80KUvGW.js} +14 -14
- package/dist/src/{goat-Dg7N-qgd.js → goat-BKhidS2l.js} +14 -14
- package/dist/src/{goat-D_thj1jf.cjs → goat-Dorh32Ub.cjs} +18 -18
- package/dist/src/{goat-BVp2yIw-.js → goat-jg8kFsKP.js} +14 -14
- package/dist/src/{goblin-4D8Nfpnl.cjs → goblin-B_rz0LjO.cjs} +2 -2
- package/dist/src/{goblin-CZAgIkjX.js → goblin-C8-aCrlP.js} +2 -2
- package/dist/src/{goblin-Dlox542E.js → goblin-CqLJeleh.js} +2 -2
- package/dist/src/{goblin-OrBEar64.js → goblin-CuznsHt0.js} +2 -2
- package/dist/src/{google-CC83MIsJ.cjs → google-8szBGwzV.cjs} +11 -11
- package/dist/src/{google-DRsee0nT.js → google-B1v8u6hy.js} +11 -11
- package/dist/src/{google-Dbpyq6la.js → google-B6p_pWxZ.js} +11 -11
- package/dist/src/{google-LtdcKmFu.js → google-DCn7b9au.js} +11 -11
- package/dist/src/graders-B8dB5kSQ.js +3 -0
- package/dist/src/{graders-vHzBsfHT.js → graders-BPmH2YVm.js} +20 -19
- package/dist/src/{graders-C77c5GiF.js → graders-BWtqxJ75.js} +20 -19
- package/dist/src/{graders-43jk_163.js → graders-CS8YkOd5.js} +21 -20
- package/dist/src/{graders-D7xtBg2s.cjs → graders-DpPGnz8u.cjs} +26 -25
- package/dist/src/{hydra-BBkVh274.js → hydra-CXR6iPRp.js} +12 -12
- package/dist/src/{hydra-CvGcOAZn.js → hydra-Cr1WleCi.js} +1 -1
- package/dist/src/{hydra-WACE_1Zb.js → hydra-DCp4JZxW.js} +12 -12
- package/dist/src/{hydra-DlPvPWLB.js → hydra-HgjWEGIf.js} +12 -12
- package/dist/src/{hydra-B0Aqb-zg.cjs → hydra-RlGwrC81.cjs} +12 -12
- package/dist/src/{image-B7HA9bRW.js → image-B4B444eV.js} +3 -3
- package/dist/src/{image-CLljmxcq.cjs → image-Bkns4wpz.cjs} +3 -3
- package/dist/src/{image-D_yzoOlU.js → image-BqF4qDz6.js} +5 -5
- package/dist/src/{image-RxcUfS9c.js → image-C1bIho6n.js} +4 -4
- package/dist/src/{image-BQf2QP3f.js → image-CFtq9j1u.js} +4 -4
- package/dist/src/{image-B-BLrwzM.js → image-CeAMtI2v.js} +5 -5
- package/dist/src/{image-DD9l6-Hi.cjs → image-ChCkFmER.cjs} +5 -5
- package/dist/src/{image-DQB7ft5H.js → image-Cy0nxgir.js} +3 -3
- package/dist/src/{image-HHqjkpmw.js → image-DDJ5HtyW.js} +3 -3
- package/dist/src/{image-N49IDbzx.cjs → image-DSLZ3_9_.cjs} +4 -4
- package/dist/src/{image-C1Tc1hrH.js → image-Dde5ywa6.js} +4 -4
- package/dist/src/{image-Dll064X0.js → image-G65m_Tkp.js} +5 -5
- package/dist/src/index.cjs +37 -35
- package/dist/src/index.d.cts +2 -1
- package/dist/src/index.d.ts +2 -1
- package/dist/src/index.js +26 -24
- package/dist/src/{indirectWebPwn-g-F3__Gp.js → indirectWebPwn-BFdbbs6S.js} +5 -5
- package/dist/src/{indirectWebPwn-Dg4gS14o.js → indirectWebPwn-BeNTvIGX.js} +4 -4
- package/dist/src/{indirectWebPwn-BVsvAUZv.js → indirectWebPwn-BhuZ26Yd.js} +4 -4
- package/dist/src/{indirectWebPwn-DmNLSb0J.js → indirectWebPwn-C-pe6OEr.js} +5 -5
- package/dist/src/{indirectWebPwn-Ch0EQWKt.cjs → indirectWebPwn-CwSQCQGM.cjs} +4 -4
- package/dist/src/{indirectWebPwn-2HDLyS-4.js → indirectWebPwn-DahWlbTc.js} +4 -4
- package/dist/src/{indirectWebPwn-lUx8flGh.cjs → indirectWebPwn-Dcc2nw9e.cjs} +5 -5
- package/dist/src/{indirectWebPwn-P3GLMBT7.js → indirectWebPwn-Dcn8pufK.js} +5 -5
- package/dist/src/{interactions-CqITU8xN.js → interactions-BC_LipMV.js} +5 -5
- package/dist/src/{interactions-vSEfKNox.js → interactions-BUojcIo3.js} +5 -5
- package/dist/src/{interactions-BkHdiUV_.cjs → interactions-CBWiz1sE.cjs} +10 -10
- package/dist/src/{interactions-BwaVVpFQ.js → interactions-FdIt-wCm.js} +5 -5
- package/dist/src/{iterative-CJqvJcCg.cjs → iterative-C03QAXol.cjs} +17 -17
- package/dist/src/{iterative-CmzmX0Ud.js → iterative-C6PvGSZG.js} +13 -13
- package/dist/src/{iterative-BrCMcCPN.js → iterative-C6dOO1pV.js} +13 -13
- package/dist/src/{iterative-Ny9s9zYD.js → iterative-Dm9ed-k9.js} +13 -13
- package/dist/src/{iterativeImage-6UW4D5PR.js → iterativeImage-C1eEEQTU.js} +4 -4
- package/dist/src/{iterativeImage-MQuACdQM.js → iterativeImage-CPdjUydZ.js} +4 -4
- package/dist/src/{iterativeImage-C9ti-N0n.js → iterativeImage-Drxk9690.js} +4 -4
- package/dist/src/{iterativeImage-DrKM797g.cjs → iterativeImage-qpfLOoXo.cjs} +6 -6
- package/dist/src/{iterativeMeta-BFyT65qP.js → iterativeMeta-Bcfzi4sI.js} +12 -12
- package/dist/src/{iterativeMeta-0J6M1Vdv.js → iterativeMeta-CpW_wQO6.js} +12 -12
- package/dist/src/{iterativeMeta-GZVbjagU.cjs → iterativeMeta-DPgnNAss.cjs} +12 -12
- package/dist/src/{iterativeMeta-C1Dh7MxZ.js → iterativeMeta-weggsGV_.js} +12 -12
- package/dist/src/{iterativeTree-BrUcgg6W.js → iterativeTree-CKuB2Z6S.js} +12 -12
- package/dist/src/{iterativeTree-D3_N68uI.js → iterativeTree-Uw3DtvA4.js} +12 -12
- package/dist/src/{iterativeTree-CypPTiqZ.js → iterativeTree-Z5eESQAW.js} +12 -12
- package/dist/src/{iterativeTree-CZMTUJkt.cjs → iterativeTree-sq1SXe1H.cjs} +23 -23
- package/dist/src/{knowledgeBase-oPMm43ZU.js → knowledgeBase-2fh31P8U.js} +4 -4
- package/dist/src/{knowledgeBase-DSmUn4aP.js → knowledgeBase-CZwpvp9c.js} +4 -4
- package/dist/src/{knowledgeBase-BIZW29tN.js → knowledgeBase-Cfr9fuln.js} +4 -4
- package/dist/src/{knowledgeBase-dv8uETfk.cjs → knowledgeBase-Cy5S2dUm.cjs} +4 -4
- package/dist/src/{litellm-CCNfY67w.cjs → litellm-BX6YVwnT.cjs} +4 -4
- package/dist/src/{litellm-CPWGXO61.js → litellm-Bwskx_kf.js} +4 -4
- package/dist/src/{litellm-D2w4bj_z.js → litellm-DG8dC_1P.js} +4 -4
- package/dist/src/{litellm-DB7MRouZ.js → litellm-RtR3zWqA.js} +4 -4
- package/dist/src/{live-CDBvrFTF.cjs → live-BIYLKr6M.cjs} +4 -4
- package/dist/src/{live-BFul3lOj.js → live-BloWTLms.js} +4 -4
- package/dist/src/{live-A1fk8Tl-.js → live-C2hVmTZg.js} +4 -4
- package/dist/src/{live-CRIdbA0o.js → live-CCPXSaYj.js} +4 -4
- package/dist/src/{luma-ray-5CZM_02a.cjs → luma-ray-B3Mt-cN9.cjs} +2 -2
- package/dist/src/{luma-ray-D68mWNcj.js → luma-ray-BGYY3Y9D.js} +2 -2
- package/dist/src/{luma-ray-5Y_J9rjd.js → luma-ray-DTvqEeAb.js} +2 -2
- package/dist/src/{luma-ray-lD3WwDx2.js → luma-ray-Te_YbEBL.js} +2 -2
- package/dist/src/main.js +41 -38
- package/dist/src/{mantleChat-B9O0prU3.js → mantleChat-B7ZGnN3G.js} +2 -2
- package/dist/src/{mantleChat-BRtCbGNb.js → mantleChat-BEwZSACi.js} +2 -2
- package/dist/src/{mantleChat-BNYodgnM.cjs → mantleChat-DRHEiiq7.cjs} +2 -2
- package/dist/src/{mantleChat-aXRLgaar.js → mantleChat-bG3JUmId.js} +2 -2
- package/dist/src/{memoryPoisoning-BP8lqzRR.js → memoryPoisoning-CRCeE8o0.js} +5 -5
- package/dist/src/{memoryPoisoning-CXlBD_-Y.js → memoryPoisoning-DPz_mF21.js} +5 -5
- package/dist/src/{memoryPoisoning-B2dsdKye.cjs → memoryPoisoning-DRIrT0Zv.cjs} +5 -5
- package/dist/src/{memoryPoisoning-C2cyu0C-.js → memoryPoisoning-DUqPlY5F.js} +5 -5
- package/dist/src/{messages-B5cYbsZJ.cjs → messages-BDbtGaqI.cjs} +8 -8
- package/dist/src/{messages-C1diy8zs.js → messages-C306BIuu.js} +8 -8
- package/dist/src/{messages-C9rJcTgf.js → messages-Cqi4nZlY.js} +8 -8
- package/dist/src/{messages-C3_Aa793.js → messages-W898zuCm.js} +8 -8
- package/dist/src/{mischievousUser-BM8LRsDW.js → mischievousUser-4wlyqv76.js} +5 -5
- package/dist/src/{mischievousUser-SPu0AbcD.js → mischievousUser-B1-HU9CD.js} +5 -5
- package/dist/src/{mischievousUser-BVr9ULj0.js → mischievousUser-BJQRmmfP.js} +5 -5
- package/dist/src/{mischievousUser-BDv5f6eO.cjs → mischievousUser-CHIJi5vr.cjs} +5 -5
- package/dist/src/{modelslab-9k-zzEfW.cjs → modelslab-CLDbPmPX.cjs} +3 -3
- package/dist/src/{modelslab-VVi56eHt.js → modelslab-CZ03gaHC.js} +3 -3
- package/dist/src/{modelslab-SFmxkyC5.js → modelslab-Cj0cBlIy.js} +3 -3
- package/dist/src/{modelslab-CvNCpR5m.js → modelslab-DPG6v3Oa.js} +3 -3
- package/dist/src/{nova-reel-DvEcNfJd.js → nova-reel-B401inIg.js} +2 -2
- package/dist/src/{nova-reel-DZRncxke.cjs → nova-reel-D8AFHBH-.cjs} +2 -2
- package/dist/src/{nova-reel-Dtr84O_-.js → nova-reel-RFBr44SY.js} +2 -2
- package/dist/src/{nova-reel-C7RtmR9_.js → nova-reel-sCfu2U7B.js} +2 -2
- package/dist/src/{nova-sonic-B4wexztM.cjs → nova-sonic-B1QLKfJe.cjs} +2 -2
- package/dist/src/{nova-sonic-DXnFfrox.js → nova-sonic-D3CP2Y2f.js} +2 -2
- package/dist/src/{nova-sonic-KyVv4RyY.js → nova-sonic-DPbzYDKH.js} +2 -2
- package/dist/src/{nova-sonic-Doe7LDx_.js → nova-sonic-DlgK5oIa.js} +2 -2
- package/dist/src/{openaiResponses-C3Ml3xst.cjs → openaiResponses-Be2L8u1C.cjs} +2 -2
- package/dist/src/{openaiResponses-CE5BAFhg.js → openaiResponses-CDvzqtsT.js} +2 -2
- package/dist/src/{openaiResponses-CEPZVzZz.js → openaiResponses-CPVWxpRK.js} +2 -2
- package/dist/src/{openaiResponses-DhO4eHg0.js → openaiResponses-sdWTgYPz.js} +2 -2
- package/dist/src/{openclaw-DOZfTvJO.js → openclaw-CKvd8EzM.js} +5 -5
- package/dist/src/{openclaw-XMg8C92z.cjs → openclaw-CSWfAv7N.cjs} +5 -5
- package/dist/src/{openclaw-CbJpj7T8.js → openclaw-Cusi9mm2.js} +5 -5
- package/dist/src/{openclaw-Bugs4BPX.js → openclaw-SY4Ur74P.js} +5 -5
- package/dist/src/{opencode-sdk-CoCVfums.js → opencode-sdk-AGZbtWlq.js} +2 -2
- package/dist/src/{opencode-sdk-Cid8t6m7.cjs → opencode-sdk-B9Dcws4x.cjs} +2 -2
- package/dist/src/{opencode-sdk-CKbY24l_.js → opencode-sdk-ClpPufaf.js} +2 -2
- package/dist/src/{opencode-sdk-mkkCU9O6.js → opencode-sdk-CwBVY4H1.js} +2 -2
- package/dist/src/{openinterpreter-esp9h7Qu.js → openinterpreter-BF1BIP3x.js} +3 -3
- package/dist/src/{openinterpreter-B09Fvndf.js → openinterpreter-Ba9uEUB3.js} +3 -3
- package/dist/src/{openinterpreter-O-8L3wHT.js → openinterpreter-CjAfk7zr.js} +3 -3
- package/dist/src/{openinterpreter-DmCcocbX.cjs → openinterpreter-CjvjRmfR.cjs} +4 -4
- package/dist/src/{promptfoo-BzTq3CZR.cjs → promptfoo-B3EDkr9n.cjs} +4 -4
- package/dist/src/{promptfoo-BnRYCHWo.js → promptfoo-BeCm2WDJ.js} +4 -4
- package/dist/src/{promptfoo-DmLIq1Fg.js → promptfoo-ByMuyN2p.js} +4 -4
- package/dist/src/{promptfoo-DFE6FPtn.js → promptfoo-HD40ugrk.js} +4 -4
- package/dist/src/{providers-YJTtc38R.js → providers-BbgOo13t.js} +68 -48
- package/dist/src/{providers-Dbcg914T.js → providers-BmppqfDI.js} +70 -50
- package/dist/src/{providers-DbRpLhoc.js → providers-C75KcJPJ.js} +68 -48
- package/dist/src/{providers-ASKoKjG0.cjs → providers-CRCoPqQH.cjs} +116 -96
- package/dist/src/{providers-59LpYr3g.js → providers-DI6OXKnh.js} +1 -1
- package/dist/src/{quiverai-BsabGKm2.js → quiverai-8--n-u4s.js} +3 -3
- package/dist/src/{quiverai-dEV-iH9x.cjs → quiverai-CPa-eT-O.cjs} +3 -3
- package/dist/src/{quiverai-CfQpkyAP.js → quiverai-Cyt6JU4X.js} +3 -3
- package/dist/src/{quiverai-D4M0KkyD.js → quiverai-pbddNqGK.js} +3 -3
- package/dist/src/{registry-QpHnWcMr.cjs → registry-3k9Gai1o.cjs} +15 -15
- package/dist/src/{registry-C_cHVcat.js → registry-BdsjaDF0.js} +15 -15
- package/dist/src/{registry-BAiKTqod.js → registry-C63p_cTi.js} +15 -15
- package/dist/src/{registry-BnTKy_CX.js → registry-C842b92A.js} +15 -15
- package/dist/src/{remoteGeneration-PxK1EefI.cjs → remoteGeneration-C0Ev99MO.cjs} +4 -4
- package/dist/src/{remoteGeneration-B0eQSIHo.js → remoteGeneration-Cc78LDjQ.js} +4 -4
- package/dist/src/{remoteGeneration-CwQ0KBdC.js → remoteGeneration-DGJxSMYI.js} +4 -4
- package/dist/src/{remoteGeneration-CopIeiNI.js → remoteGeneration-DnSGqkoH.js} +4 -4
- package/dist/src/render-BRIaR8VG.js +348 -0
- package/dist/src/render-C1VJjFT2.cjs +383 -0
- package/dist/src/render-DIhuKgcQ.js +347 -0
- package/dist/src/render-zarxdXS7.js +347 -0
- package/dist/src/{responses-Cf45MBI8.js → responses-B72c3dpg.js} +8 -7
- package/dist/src/{responses-CB2IgICL.js → responses-DVF5R5Il.js} +8 -7
- package/dist/src/{responses-Doa5xhY1.cjs → responses-DiZCcd1S.cjs} +10 -9
- package/dist/src/{responses-Ci3OK0i0.js → responses-ykcvZ0oE.js} +8 -7
- package/dist/src/{runtimeTransform-BiANYoNE.cjs → runtimeTransform-6aaLbaUN.cjs} +2 -2
- package/dist/src/{runtimeTransform-DCRyBnI7.js → runtimeTransform-Bf5Aif-g.js} +2 -2
- package/dist/src/{runtimeTransform-Dvxqdevg.js → runtimeTransform-DVpy5lDj.js} +2 -2
- package/dist/src/{runtimeTransform-PGM7l51H.js → runtimeTransform-rEgJC2VZ.js} +2 -2
- package/dist/src/{sagemaker-D8O3f2bO.js → sagemaker-BzAkO4HL.js} +9 -9
- package/dist/src/{sagemaker-mlPtR7-q.js → sagemaker-C35al2QN.js} +9 -9
- package/dist/src/{sagemaker-2TZPOS4O.js → sagemaker-D8HnIjWK.js} +9 -9
- package/dist/src/{sagemaker-OlHR8fru.cjs → sagemaker-I0Ei2kNn.cjs} +9 -9
- package/dist/src/{scanner-Dt3oFdeb.js → scanner-De5yM_DC.js} +5 -5
- package/dist/src/server/index.js +31 -29
- package/dist/src/server-B5-TIxn2.js +3 -0
- package/dist/src/{server-MNuRsmJQ.js → server-BaM1Q5gD.js} +4 -4
- package/dist/src/{server-CkrRpgsu.cjs → server-BpmZ1EP0.cjs} +3 -3
- package/dist/src/{server-L884Wtbc.js → server-CqQtEkS_.js} +4 -4
- package/dist/src/{server-lm2H6tXC.js → server-DB1I8Xl3.js} +3 -3
- package/dist/src/{shared-D5rN2VlH.js → shared-BkcgE6vB.js} +14 -14
- package/dist/src/{shared-IP25vMkJ.cjs → shared-Bl84k1Oo.cjs} +14 -14
- package/dist/src/{shared-Dk1AVE9w.js → shared-CkERSpeg.js} +14 -14
- package/dist/src/{shared-yyb3qFQd.js → shared-jcnXW0lA.js} +16 -16
- package/dist/src/{simulatedUser-9Ru_f_dX.js → simulatedUser-BK0F6Lub.js} +5 -4
- package/dist/src/{simulatedUser-6ys8hxx_.js → simulatedUser-BTox0iZp.js} +5 -4
- package/dist/src/{simulatedUser-BQghw48z.cjs → simulatedUser-ByVb7gXp.cjs} +8 -7
- package/dist/src/{simulatedUser-BHmmQ4hb.js → simulatedUser-C8WconFg.js} +5 -4
- package/dist/src/{slack-C--lAIHY.js → slack-7DG3xMM4.js} +2 -2
- package/dist/src/{slack-CxCLWDSi.js → slack-BvWGK3kV.js} +2 -2
- package/dist/src/{slack-6c3iW1pP.cjs → slack-DqFNyAEf.cjs} +2 -2
- package/dist/src/{slack-D_QGURhP.js → slack-spSrgvZu.js} +2 -2
- package/dist/src/{storage-BFmq8CKG.cjs → storage-BX5ws4jD.cjs} +11 -11
- package/dist/src/{storage-J-nYoltq.js → storage-B_t-NiUa.js} +11 -11
- package/dist/src/{storage-BC3GVwPL.js → storage-CVVbTVYC.js} +11 -11
- package/dist/src/{storage-DGeXeJj0.js → storage-CrqPUKqY.js} +12 -12
- package/dist/src/{strategies-C6oBZHYF.js → strategies-CaqOj9gZ.js} +10 -10
- package/dist/src/{strategies-Bn1z2exW.cjs → strategies-DJfqHuoT.cjs} +10 -10
- package/dist/src/{strategies-BMxIs2Jx.js → strategies-DVRYSzm8.js} +10 -10
- package/dist/src/{strategies-cFTP9vSw.js → strategies-DpZ1ydwx.js} +11 -11
- package/dist/src/{telemetry-D64Cj0UR.js → telemetry-BD4xF9d_.js} +3 -3
- package/dist/src/{telemetry-Bqa8fxWp.js → telemetry-BQZTDom3.js} +3 -3
- package/dist/src/{telemetry-CIaL2pmn.js → telemetry-CJdYAcRk.js} +3 -3
- package/dist/src/telemetry-ClfmjQQj.js +3 -0
- package/dist/src/{telemetry-DVYPYBQH.cjs → telemetry-cZi2RTrN.cjs} +3 -3
- package/dist/src/{traceContext-CNp7smkn.js → traceContext-2sZXHY0h.js} +2 -2
- package/dist/src/{traceContext-D7liCnkq.js → traceContext-B3qWxoa7.js} +2 -2
- package/dist/src/{traceContext-BuXw2Yxu.cjs → traceContext-achbslCl.cjs} +2 -2
- package/dist/src/{traceContext-B4vypxe_.js → traceContext-jOhKJ5Ty.js} +2 -2
- package/dist/src/{transcription-SiDe8ogZ.js → transcription-1iEk_fG7.js} +4 -4
- package/dist/src/{transcription-Dq6gB3km.js → transcription-CtogIwZI.js} +4 -4
- package/dist/src/{transcription-BQg4-zD7.cjs → transcription-CuNQgPv9.cjs} +4 -4
- package/dist/src/{transcription-Zq-_5uca.js → transcription-RRwDmQBI.js} +4 -4
- package/dist/src/{transform-CdcZMCo-.js → transform-2ldksCeN.js} +3 -3
- package/dist/src/{transform-BfiH9c1w.js → transform-BesK7nGM.js} +3 -3
- package/dist/src/{transform-CCHDyuc8.cjs → transform-DS2y12jo.cjs} +3 -3
- package/dist/src/{transform-D0QSXU95.js → transform-ciU2euIH.js} +3 -3
- package/dist/src/{util-tlprLsf4.js → util-9K7THVcA2.js} +2 -2
- package/dist/src/{util-BoTwsVvn.js → util-BKfPcBQN.js} +4 -4
- package/dist/src/{util-L5T81aJ0.cjs → util-BPkxeLuk.cjs} +10 -387
- package/dist/src/{util-Ur5TGF_w.js → util-BPlSGvsQ.js} +4 -3
- package/dist/src/{util-uYYKYi7_.js → util-BPtpPW4O.js} +5 -346
- package/dist/src/{util-EBjz-RBV.js → util-BaGd-bCr.js} +2 -2
- package/dist/src/{util-BJ42x4mo.js → util-Bac0h5Sr.js} +2 -2
- package/dist/src/{util-ChbabPn9.cjs → util-Bd8_MhVm.cjs} +2 -2
- package/dist/src/{util-BxmNax2U.js → util-BdN7DdPq.js} +4 -3
- package/dist/src/{util-DdGIEAK_.js → util-BnytsHEr.js} +5 -346
- package/dist/src/{util-COyt9Xaf.cjs → util-BuKoPAn3.cjs} +4 -4
- package/dist/src/{util-BVDvJqrO.js → util-CEecmC3Y.js} +4 -4
- package/dist/src/{util-CZ9shpIL.js → util-CJi6Bgno.js} +3 -3
- package/dist/src/{util-BdAsuWmv.js → util-CZyLhvIk.js} +6 -347
- package/dist/src/{util-CeP1x2P-.cjs → util-Cadd9fGT.cjs} +3 -3
- package/dist/src/{util-DT7Jko3E.js → util-CzWbxb9R.js} +4 -3
- package/dist/src/{util-CVbeMrg1.js → util-DHtnWbEL.js} +3 -3
- package/dist/src/{util-BDDaDhsI.cjs → util-DSwbJPgL.cjs} +7 -6
- package/dist/src/{util-BNvjVvcH.cjs → util-DhtW6BNS.cjs} +5 -4
- package/dist/src/{util-CmRx53hM.js → util-DiVs2Kf-.js} +4 -3
- package/dist/src/{util-DxyypCZC.js → util-DlFpV1xV.js} +4 -4
- package/dist/src/{util-DtOvD10k.js → util-DlT2H1W5.js} +3 -3
- package/dist/src/{util-PX9qBGnk.js → util-InmFNqSw.js} +4 -3
- package/dist/src/{util-CwUz9jYN.js → util-Rbl6Om9L2.js} +4 -3
- package/dist/src/{vertex-BGBoge5t.js → vertex-BJYJC-Tr.js} +8 -7
- package/dist/src/{vertex-BKhWzpAp.js → vertex-CRMbWhh2.js} +8 -7
- package/dist/src/{vertex-BpaCFvPe.js → vertex-DWXywdFu.js} +8 -7
- package/dist/src/{vertex-FM6gcfuB.cjs → vertex-DXmhY_4R.cjs} +10 -9
- package/dist/src/{vertex-DPgy1bci.js → vertex-Xq6Hc4hv.js} +1 -1
- package/dist/src/{video-CLhmUJuz.js → video-1uQOdg9A.js} +3 -3
- package/dist/src/{video-C4hvGFWO.js → video-BMnt4dq9.js} +3 -3
- package/dist/src/{video-DV7VnFDb.js → video-CZ5He3fP.js} +3 -3
- package/dist/src/{video-CFJeZvvL.cjs → video-ChxZLKTs.cjs} +3 -3
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -6
- package/dist/src/cache-Ca6QI7yz.js +0 -3
- package/dist/src/cloud-aeP705RD.js +0 -3
- package/dist/src/codex-sdk-CMTTOSVq.js +0 -3
- package/dist/src/evaluator-CRrA6xHS.js +0 -3
- package/dist/src/fetch-BYe9zZ94.js +0 -3
- package/dist/src/graders-fvvHDb5X.js +0 -3
- package/dist/src/server-DmrHjxNq.js +0 -3
- package/dist/src/telemetry-BvzHQKBp.js +0 -3
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { F as getEnvBool, N as refreshConfigDirectoryPathFromEnv, U as state, b as sanitizeTracingConfigForPersistence, c as logger, j as loadYaml, v as sanitizeObject, x as sanitizeUrl, y as sanitizeRuntimeOptions } from "./logger-YzVIwMVq.js";
|
|
3
|
-
import { A as isApiProvider, i as getResultIndexKey, j as isProviderOptions, r as asEvaluateResult, s as sanitizeResultForJsonlArtifact } from "./evalResult-
|
|
4
|
-
import {
|
|
3
|
+
import { A as isApiProvider, i as getResultIndexKey, j as isProviderOptions, r as asEvaluateResult, s as sanitizeResultForJsonlArtifact } from "./evalResult-C9ntrv7r.js";
|
|
4
|
+
import { W as TERMINAL_MAX_WIDTH, X as VERSION, r as fetchWithProxy } from "./fetch-KD8O9oZZ.js";
|
|
5
5
|
import { t as invariant } from "./invariant-CbHB1xyx.js";
|
|
6
6
|
import { C as OutputFileExtension, w as ResultFailureReason } from "./tables-DpSgejqG.js";
|
|
7
7
|
import { i as isJavascriptFile, t as JAVASCRIPT_EXTENSIONS } from "./fileExtensions-CAc10_Jb.js";
|
|
8
8
|
import { o as safeResolve, r as importModule, t as getDirectory } from "./esm-BK0NNGWz.js";
|
|
9
9
|
import { n as PromptfooAttributes } from "./genaiTracer-BRW5P2xD.js";
|
|
10
10
|
import { r as runPython } from "./pythonUtils-BKRucqaP.js";
|
|
11
|
+
import { n as renderVarsInObject, o as getNunjucksEngine } from "./render-BRIaR8VG.js";
|
|
11
12
|
import "./blobs-Dpyeuxru.js";
|
|
12
13
|
import { o as collectBlobHashes } from "./extractor-8jl9p5Oy.js";
|
|
13
14
|
import dotenv from "dotenv";
|
|
@@ -19,356 +20,14 @@ import * as os$1 from "os";
|
|
|
19
20
|
import * as yaml from "js-yaml";
|
|
20
21
|
import dedent from "dedent";
|
|
21
22
|
import { randomUUID } from "crypto";
|
|
22
|
-
import nunjucks from "nunjucks";
|
|
23
23
|
import * as fsPromises from "fs/promises";
|
|
24
24
|
import { access } from "fs/promises";
|
|
25
25
|
import deepEqual from "fast-deep-equal";
|
|
26
26
|
import { parse as parse$1 } from "csv-parse/sync";
|
|
27
27
|
import { globSync, hasMagic } from "glob";
|
|
28
|
+
import nunjucks from "nunjucks";
|
|
28
29
|
import { XMLBuilder } from "fast-xml-parser";
|
|
29
30
|
import { stringify } from "csv-stringify/sync";
|
|
30
|
-
//#region src/util/templates.ts
|
|
31
|
-
function isNunjucksAstNode(value) {
|
|
32
|
-
return Boolean(value && typeof value === "object" && typeof value.typename === "string");
|
|
33
|
-
}
|
|
34
|
-
function getNunjucksParser() {
|
|
35
|
-
return nunjucks.parser;
|
|
36
|
-
}
|
|
37
|
-
function parseNunjucksTemplate(template) {
|
|
38
|
-
const parser = getNunjucksParser();
|
|
39
|
-
if (!parser || typeof parser.parse !== "function") {
|
|
40
|
-
logger.debug("[templates] nunjucks.parser.parse is not available; falling back to conservative detection");
|
|
41
|
-
return { ok: false };
|
|
42
|
-
}
|
|
43
|
-
try {
|
|
44
|
-
return {
|
|
45
|
-
ok: true,
|
|
46
|
-
ast: parser.parse(template)
|
|
47
|
-
};
|
|
48
|
-
} catch (err) {
|
|
49
|
-
logger.debug("[templates] nunjucks parse failed; falling back to conservative detection", { error: err instanceof Error ? err.message : String(err) });
|
|
50
|
-
return { ok: false };
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
function isNonReferenceSymbol(parent) {
|
|
54
|
-
if (!parent) return false;
|
|
55
|
-
return parent.node.typename === "Pair" && parent.field === "key" || parent.node.typename === "Filter" && parent.field === "name" || parent.node.typename === "Is" && parent.field === "right" || parent.node.typename === "Set" && parent.field === "targets" || isForLikeNode(parent.node) && parent.field === "name" || parent.node.typename === "Macro" && parent.field === "name" || parent.node.typename === "Import" && parent.field === "target" || parent.node.typename === "FromImport" && parent.field === "names";
|
|
56
|
-
}
|
|
57
|
-
function getSymbolName(node) {
|
|
58
|
-
return isNunjucksAstNode(node) && node.typename === "Symbol" && typeof node.value === "string" ? node.value : void 0;
|
|
59
|
-
}
|
|
60
|
-
function collectBindingNames(node) {
|
|
61
|
-
if (Array.isArray(node)) return node.flatMap((item) => collectBindingNames(item));
|
|
62
|
-
const symbolName = getSymbolName(node);
|
|
63
|
-
if (symbolName) return [symbolName];
|
|
64
|
-
if (!isNunjucksAstNode(node) || !Array.isArray(node.children)) return [];
|
|
65
|
-
return node.children.flatMap((child) => collectBindingNames(child));
|
|
66
|
-
}
|
|
67
|
-
function addBindingNames(scope, node) {
|
|
68
|
-
const nextScope = new Set(scope);
|
|
69
|
-
for (const name of collectBindingNames(node)) nextScope.add(name);
|
|
70
|
-
return nextScope;
|
|
71
|
-
}
|
|
72
|
-
function addNamesToScope(scope, names) {
|
|
73
|
-
const nextScope = new Set(scope);
|
|
74
|
-
for (const name of names) nextScope.add(name);
|
|
75
|
-
return nextScope;
|
|
76
|
-
}
|
|
77
|
-
function collectFromImportBindingNames(namesNode) {
|
|
78
|
-
if (!isNunjucksAstNode(namesNode) || !Array.isArray(namesNode.children)) return [];
|
|
79
|
-
const names = [];
|
|
80
|
-
for (const child of namesNode.children) {
|
|
81
|
-
const plainImportName = getSymbolName(child);
|
|
82
|
-
if (plainImportName) {
|
|
83
|
-
names.push(plainImportName);
|
|
84
|
-
continue;
|
|
85
|
-
}
|
|
86
|
-
if (isNunjucksAstNode(child) && child.typename === "Pair") {
|
|
87
|
-
const aliasName = getSymbolName(child.value);
|
|
88
|
-
if (aliasName) names.push(aliasName);
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return names;
|
|
92
|
-
}
|
|
93
|
-
function astNodeListReferencesVariable(nodes, variableName, parent, boundSymbols) {
|
|
94
|
-
let scope = new Set(boundSymbols);
|
|
95
|
-
for (const item of nodes) {
|
|
96
|
-
if (!isNunjucksAstNode(item)) continue;
|
|
97
|
-
if (astReferencesVariable(item, variableName, parent, scope)) return true;
|
|
98
|
-
if (item.typename === "Set") scope = addBindingNames(scope, item.targets);
|
|
99
|
-
else if (item.typename === "Macro") scope = addBindingNames(scope, item.name);
|
|
100
|
-
else if (item.typename === "Import") scope = addBindingNames(scope, item.target);
|
|
101
|
-
else if (item.typename === "FromImport") scope = addNamesToScope(scope, collectFromImportBindingNames(item.names));
|
|
102
|
-
}
|
|
103
|
-
return false;
|
|
104
|
-
}
|
|
105
|
-
function astChildReferencesVariable(node, field, variableName, boundSymbols) {
|
|
106
|
-
const child = node[field];
|
|
107
|
-
if (Array.isArray(child)) return child.some((item) => isNunjucksAstNode(item) && astReferencesVariable(item, variableName, {
|
|
108
|
-
field,
|
|
109
|
-
node
|
|
110
|
-
}, boundSymbols));
|
|
111
|
-
return isNunjucksAstNode(child) && astReferencesVariable(child, variableName, {
|
|
112
|
-
field,
|
|
113
|
-
node
|
|
114
|
-
}, boundSymbols);
|
|
115
|
-
}
|
|
116
|
-
function isForLikeNode(node) {
|
|
117
|
-
return node.typename === "For" || node.typename === "AsyncEach" || node.typename === "AsyncAll";
|
|
118
|
-
}
|
|
119
|
-
function forLikeNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
120
|
-
const loopScope = addBindingNames(boundSymbols, node.name);
|
|
121
|
-
return astChildReferencesVariable(node, "arr", variableName, boundSymbols) || astChildReferencesVariable(node, "body", variableName, loopScope) || astChildReferencesVariable(node, "else_", variableName, boundSymbols);
|
|
122
|
-
}
|
|
123
|
-
/**
|
|
124
|
-
* Walk a Nunjucks macro/caller signature left-to-right. Positional args and
|
|
125
|
-
* earlier keyword defaults are visible to later defaults, but the current
|
|
126
|
-
* keyword is not bound until its own default value has been evaluated.
|
|
127
|
-
*/
|
|
128
|
-
function analyzeSignatureArgs(argsNode, variableName, boundSymbols) {
|
|
129
|
-
const paramNames = [];
|
|
130
|
-
if (!isNunjucksAstNode(argsNode) || !Array.isArray(argsNode.children)) return {
|
|
131
|
-
paramNames,
|
|
132
|
-
referencesVariable: false
|
|
133
|
-
};
|
|
134
|
-
const defaultScope = new Set(boundSymbols);
|
|
135
|
-
for (const child of argsNode.children) {
|
|
136
|
-
if (!isNunjucksAstNode(child)) continue;
|
|
137
|
-
const positionalParamName = getSymbolName(child);
|
|
138
|
-
if (positionalParamName) {
|
|
139
|
-
paramNames.push(positionalParamName);
|
|
140
|
-
defaultScope.add(positionalParamName);
|
|
141
|
-
continue;
|
|
142
|
-
}
|
|
143
|
-
if (child.typename === "KeywordArgs" && Array.isArray(child.children)) {
|
|
144
|
-
for (const pair of child.children) {
|
|
145
|
-
const keywordParamName = isNunjucksAstNode(pair) && pair.typename === "Pair" ? getSymbolName(pair.key) : void 0;
|
|
146
|
-
if (isNunjucksAstNode(pair) && pair.typename === "Pair" && astChildReferencesVariable(pair, "value", variableName, defaultScope)) return {
|
|
147
|
-
paramNames,
|
|
148
|
-
referencesVariable: true
|
|
149
|
-
};
|
|
150
|
-
if (keywordParamName) {
|
|
151
|
-
paramNames.push(keywordParamName);
|
|
152
|
-
defaultScope.add(keywordParamName);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
continue;
|
|
156
|
-
}
|
|
157
|
-
if (astReferencesVariable(child, variableName, {
|
|
158
|
-
field: "children",
|
|
159
|
-
node: argsNode
|
|
160
|
-
}, defaultScope)) return {
|
|
161
|
-
paramNames,
|
|
162
|
-
referencesVariable: true
|
|
163
|
-
};
|
|
164
|
-
}
|
|
165
|
-
return {
|
|
166
|
-
paramNames,
|
|
167
|
-
referencesVariable: false
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function macroNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
171
|
-
const { paramNames, referencesVariable } = analyzeSignatureArgs(node.args, variableName, boundSymbols);
|
|
172
|
-
if (referencesVariable) return true;
|
|
173
|
-
const macroScope = addNamesToScope(boundSymbols, paramNames);
|
|
174
|
-
const macroName = getSymbolName(node.name);
|
|
175
|
-
if (macroName) macroScope.add(macroName);
|
|
176
|
-
return astChildReferencesVariable(node, "body", variableName, macroScope);
|
|
177
|
-
}
|
|
178
|
-
function isNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
179
|
-
if (astChildReferencesVariable(node, "left", variableName, boundSymbols)) return true;
|
|
180
|
-
const right = node.right;
|
|
181
|
-
if (!isNunjucksAstNode(right)) return false;
|
|
182
|
-
if (right.typename === "FunCall") return astChildReferencesVariable(right, "args", variableName, boundSymbols);
|
|
183
|
-
return right.typename !== "Symbol" && astReferencesVariable(right, variableName, {
|
|
184
|
-
field: "right",
|
|
185
|
-
node
|
|
186
|
-
}, boundSymbols);
|
|
187
|
-
}
|
|
188
|
-
function setNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
189
|
-
return astChildReferencesVariable(node, "value", variableName, boundSymbols) || astChildReferencesVariable(node, "body", variableName, boundSymbols);
|
|
190
|
-
}
|
|
191
|
-
function fromImportNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
192
|
-
return astChildReferencesVariable(node, "template", variableName, boundSymbols);
|
|
193
|
-
}
|
|
194
|
-
function blockNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
195
|
-
return astChildReferencesVariable(node, "body", variableName, boundSymbols);
|
|
196
|
-
}
|
|
197
|
-
function callerNodeReferencesVariable(node, variableName, boundSymbols) {
|
|
198
|
-
const { paramNames, referencesVariable } = analyzeSignatureArgs(node.args, variableName, boundSymbols);
|
|
199
|
-
if (referencesVariable) return true;
|
|
200
|
-
return astChildReferencesVariable(node, "body", variableName, addNamesToScope(boundSymbols, paramNames));
|
|
201
|
-
}
|
|
202
|
-
function astFieldsReferenceVariable(node, variableName, boundSymbols) {
|
|
203
|
-
return (node.fields ?? []).some((field) => astChildReferencesVariable(node, field, variableName, boundSymbols));
|
|
204
|
-
}
|
|
205
|
-
function astReferencesVariable(node, variableName, parent, boundSymbols = /* @__PURE__ */ new Set()) {
|
|
206
|
-
if (node.typename === "Symbol" && node.value === variableName) return !boundSymbols.has(variableName) && !isNonReferenceSymbol(parent);
|
|
207
|
-
if ((node.typename === "Root" || node.typename === "NodeList") && Array.isArray(node.children)) return astNodeListReferencesVariable(node.children, variableName, {
|
|
208
|
-
field: "children",
|
|
209
|
-
node
|
|
210
|
-
}, boundSymbols);
|
|
211
|
-
if (isForLikeNode(node)) return forLikeNodeReferencesVariable(node, variableName, boundSymbols);
|
|
212
|
-
if (node.typename === "Macro") return macroNodeReferencesVariable(node, variableName, boundSymbols);
|
|
213
|
-
if (node.typename === "Is") return isNodeReferencesVariable(node, variableName, boundSymbols);
|
|
214
|
-
if (node.typename === "Set") return setNodeReferencesVariable(node, variableName, boundSymbols);
|
|
215
|
-
if (node.typename === "FromImport") return fromImportNodeReferencesVariable(node, variableName, boundSymbols);
|
|
216
|
-
if (node.typename === "Block") return blockNodeReferencesVariable(node, variableName, boundSymbols);
|
|
217
|
-
if (node.typename === "Caller") return callerNodeReferencesVariable(node, variableName, boundSymbols);
|
|
218
|
-
return astFieldsReferenceVariable(node, variableName, boundSymbols);
|
|
219
|
-
}
|
|
220
|
-
/**
|
|
221
|
-
* Get a Nunjucks engine instance with optional filters and configuration.
|
|
222
|
-
* @param filters - Optional map of custom Nunjucks filters.
|
|
223
|
-
* @param throwOnUndefined - Whether to throw an error on undefined variables.
|
|
224
|
-
* @param isGrader - Whether this engine is being used in a grader context.
|
|
225
|
-
* Nunjucks is always enabled in grader mode.
|
|
226
|
-
* @returns A configured Nunjucks environment.
|
|
227
|
-
*/
|
|
228
|
-
function getNunjucksEngine(filters, throwOnUndefined = false, isGrader = false) {
|
|
229
|
-
if (!isGrader && getEnvBool("PROMPTFOO_DISABLE_TEMPLATING")) return { renderString: (template) => template };
|
|
230
|
-
const env = nunjucks.configure({
|
|
231
|
-
autoescape: false,
|
|
232
|
-
throwOnUndefined
|
|
233
|
-
});
|
|
234
|
-
const envGlobals = {
|
|
235
|
-
...getEnvBool("PROMPTFOO_DISABLE_TEMPLATE_ENV_VARS", getEnvBool("PROMPTFOO_SELF_HOSTED", false)) ? {} : process.env,
|
|
236
|
-
...state.config?.env
|
|
237
|
-
};
|
|
238
|
-
env.addGlobal("env", envGlobals);
|
|
239
|
-
env.addFilter("load", function(str) {
|
|
240
|
-
return JSON.parse(str);
|
|
241
|
-
});
|
|
242
|
-
if (filters) for (const [name, filter] of Object.entries(filters)) env.addFilter(name, filter);
|
|
243
|
-
return env;
|
|
244
|
-
}
|
|
245
|
-
/**
|
|
246
|
-
* Parse Nunjucks template to extract variables.
|
|
247
|
-
* @param template - The Nunjucks template string.
|
|
248
|
-
* @returns An array of variables used in the template.
|
|
249
|
-
*/
|
|
250
|
-
function extractVariablesFromTemplate(template) {
|
|
251
|
-
const variableSet = /* @__PURE__ */ new Set();
|
|
252
|
-
const regex = /\{\{[\s]*([^{}\s|]+)[\s]*(?:\|[^}]+)?\}\}|\{%[\s]*(?:if|for)[\s]+([^{}\s]+)[\s]*.*?%\}/g;
|
|
253
|
-
template = template.replace(/\{#[\s\S]*?#\}/g, "");
|
|
254
|
-
let match;
|
|
255
|
-
while ((match = regex.exec(template)) !== null) {
|
|
256
|
-
const variable = match[1] || match[2];
|
|
257
|
-
if (variable) variableSet.add(variable);
|
|
258
|
-
}
|
|
259
|
-
const forLoopRegex = /\{%[\s]*for[\s]+(\w+)[\s]+in[\s]+(\w+)[\s]*%\}/g;
|
|
260
|
-
while ((match = forLoopRegex.exec(template)) !== null) {
|
|
261
|
-
variableSet.delete(match[1]);
|
|
262
|
-
variableSet.add(match[2]);
|
|
263
|
-
}
|
|
264
|
-
return Array.from(variableSet);
|
|
265
|
-
}
|
|
266
|
-
/**
|
|
267
|
-
* Extract variables from multiple Nunjucks templates.
|
|
268
|
-
* @param templates - An array of Nunjucks template strings.
|
|
269
|
-
* @returns An array of variables used in the templates.
|
|
270
|
-
*/
|
|
271
|
-
function extractVariablesFromTemplates(templates) {
|
|
272
|
-
const variableSet = /* @__PURE__ */ new Set();
|
|
273
|
-
for (const template of templates) extractVariablesFromTemplate(template).forEach((variable) => variableSet.add(variable));
|
|
274
|
-
return Array.from(variableSet);
|
|
275
|
-
}
|
|
276
|
-
/**
|
|
277
|
-
* Classify whether a template references `variableName` as a real Nunjucks
|
|
278
|
-
* expression symbol, and surface whether the template parsed successfully.
|
|
279
|
-
*
|
|
280
|
-
* Callers that cache results should avoid caching when `parsed` is `false`,
|
|
281
|
-
* otherwise a transient parse failure would poison the cache for the lifetime
|
|
282
|
-
* of the process.
|
|
283
|
-
*/
|
|
284
|
-
function analyzeTemplateReference(template, variableName) {
|
|
285
|
-
if (!variableName || !template.includes(variableName)) return {
|
|
286
|
-
referenced: false,
|
|
287
|
-
parsed: true
|
|
288
|
-
};
|
|
289
|
-
const parseResult = parseNunjucksTemplate(template);
|
|
290
|
-
if (!parseResult.ok) return {
|
|
291
|
-
referenced: true,
|
|
292
|
-
parsed: false
|
|
293
|
-
};
|
|
294
|
-
return {
|
|
295
|
-
referenced: astReferencesVariable(parseResult.ast, variableName),
|
|
296
|
-
parsed: true
|
|
297
|
-
};
|
|
298
|
-
}
|
|
299
|
-
//#endregion
|
|
300
|
-
//#region src/util/render.ts
|
|
301
|
-
/**
|
|
302
|
-
* Renders ONLY environment variable templates in an object, leaving all other templates untouched.
|
|
303
|
-
* This allows env vars to be resolved at provider load time while preserving runtime var templates.
|
|
304
|
-
*
|
|
305
|
-
* Supports full Nunjucks syntax for env vars including filters and expressions:
|
|
306
|
-
* - {{ env.VAR_NAME }}
|
|
307
|
-
* - {{ env['VAR-NAME'] }}
|
|
308
|
-
* - {{ env["VAR-NAME"] }}
|
|
309
|
-
* - {{ env.VAR | default('fallback') }}
|
|
310
|
-
* - {{ env.VAR | upper }}
|
|
311
|
-
*
|
|
312
|
-
* Preserves non-env templates for runtime rendering:
|
|
313
|
-
* - {{ vars.x }} - preserved as literal
|
|
314
|
-
* - {{ prompt }} - preserved as literal
|
|
315
|
-
*
|
|
316
|
-
* Implementation: Uses regex to find env templates, delegates to Nunjucks for rendering.
|
|
317
|
-
* This ensures full Nunjucks feature support while preserving non-env templates.
|
|
318
|
-
*
|
|
319
|
-
* @param obj - The object to process
|
|
320
|
-
* @param envOverrides - Optional env vars to merge with (or replace) the base env
|
|
321
|
-
* @param replaceBase - If true, envOverrides replaces the base env entirely instead of merging
|
|
322
|
-
* @returns The object with only env templates rendered
|
|
323
|
-
*/
|
|
324
|
-
function renderEnvOnlyInObject(obj, envOverrides, replaceBase) {
|
|
325
|
-
if (getEnvBool("PROMPTFOO_DISABLE_TEMPLATING")) return obj;
|
|
326
|
-
if (typeof obj === "string") {
|
|
327
|
-
const nunjucks = getNunjucksEngine();
|
|
328
|
-
const baseEnvGlobals = nunjucks.getGlobal("env");
|
|
329
|
-
const envGlobals = replaceBase ? envOverrides ?? {} : envOverrides ? {
|
|
330
|
-
...baseEnvGlobals,
|
|
331
|
-
...envOverrides
|
|
332
|
-
} : baseEnvGlobals;
|
|
333
|
-
return obj.replace(/\{\{(?:[^}]|\}(?!\}))*\}\}/g, (match) => {
|
|
334
|
-
if (!match.match(/\benv\.|env\[/)) return match;
|
|
335
|
-
const varMatch = match.match(/env\.(\w+)|env\[['"]([^'"]+)['"]\]/);
|
|
336
|
-
const varName = varMatch?.[1] || varMatch?.[2];
|
|
337
|
-
if (match.includes("|") || varName && varName in envGlobals && envGlobals[varName] !== void 0) try {
|
|
338
|
-
return nunjucks.renderString(match, { env: envGlobals });
|
|
339
|
-
} catch (error) {
|
|
340
|
-
logger.debug(`Failed to render env template "${match}": ${error instanceof Error ? error.message : String(error)}`);
|
|
341
|
-
return match;
|
|
342
|
-
}
|
|
343
|
-
return match;
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
if (Array.isArray(obj)) return obj.map((item) => renderEnvOnlyInObject(item, envOverrides, replaceBase));
|
|
347
|
-
if (typeof obj === "object" && obj !== null) {
|
|
348
|
-
const result = {};
|
|
349
|
-
for (const key in obj) {
|
|
350
|
-
if (key === "_conversation") {
|
|
351
|
-
result[key] = obj[key];
|
|
352
|
-
continue;
|
|
353
|
-
}
|
|
354
|
-
result[key] = renderEnvOnlyInObject(obj[key], envOverrides, replaceBase);
|
|
355
|
-
}
|
|
356
|
-
return result;
|
|
357
|
-
}
|
|
358
|
-
return obj;
|
|
359
|
-
}
|
|
360
|
-
function renderVarsInObject(obj, vars) {
|
|
361
|
-
if (!vars || getEnvBool("PROMPTFOO_DISABLE_TEMPLATING")) return obj;
|
|
362
|
-
if (typeof obj === "string") return getNunjucksEngine().renderString(obj, vars);
|
|
363
|
-
if (Array.isArray(obj)) return obj.map((item) => renderVarsInObject(item, vars));
|
|
364
|
-
if (typeof obj === "object" && obj !== null) {
|
|
365
|
-
const result = {};
|
|
366
|
-
for (const key in obj) result[key] = renderVarsInObject(obj[key], vars);
|
|
367
|
-
return result;
|
|
368
|
-
} else if (typeof obj === "function") return renderVarsInObject(obj({ vars }));
|
|
369
|
-
return obj;
|
|
370
|
-
}
|
|
371
|
-
//#endregion
|
|
372
31
|
//#region src/util/functions/loadFunction.ts
|
|
373
32
|
const functionCache = {};
|
|
374
33
|
/**
|
|
@@ -2720,6 +2379,6 @@ function printBorder() {
|
|
|
2720
2379
|
logger.info(border);
|
|
2721
2380
|
}
|
|
2722
2381
|
//#endregion
|
|
2723
|
-
export {
|
|
2382
|
+
export { sanitizeProviderIdForLog as A, maybeLoadResponseFormatFromExternalFile as B, doesProviderRefMatch as C, isGoogleProvider as D, isAnthropicProvider as E, getNunjucksEngineForFilePath as F, readOutput as G, parsePathOrGlob as H, getResolvedRelativePath as I, loadFunction as J, CallbackPathTraversalError as K, maybeLoadConfigFromExternalFile as L, loadProviderConfigsFromFile as M, normalizeProviderRef as N, isOpenAiProvider as O, readProviderConfigFile as P, maybeLoadFromExternalFile as R, checkProviderApiKeys as S, getProviderIdentifier as T, pathExists as U, maybeLoadToolsFromExternalFile as V, readFilters as W, wrapError as X, parseFileUrl as Y, deduplicateTestCases as _, writeOutput as a, getTestCaseDeduplicationKey as b, ComparisonEvalNotFoundError as c, getEvalTableOutputPromptLocationsBySize as d, getEvalTablePromptStrippedPayload as f, setupEnv as g, isMissingPackageImportError as h, writeMultipleOutputs as i, isProviderConfigFileReference as j, isProviderAllowed as k, evalTableToJson as l, fetchCsvFromGoogleSheet as m, createOutputData as n, SUPPORTED_OUTPUT_FILE_FORMATS as o, mergeComparisonTables as p, loadCallbackFromFileUrl as q, warnOnDegradedJsonlRecovery as r, getOutputFileFormat as s, printBorder as t, generateEvalCsv as u, extractRuntimeVars as v, getProviderDescription as w, resultIsForTestCase as x, filterRuntimeVars as y, maybeLoadFromExternalFileWithVars as z };
|
|
2724
2383
|
|
|
2725
|
-
//# sourceMappingURL=util-
|
|
2384
|
+
//# sourceMappingURL=util-CZyLhvIk.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const require_logger = require("./logger-BN3n9c1R.cjs");
|
|
2
|
-
const require_util = require("./util-
|
|
3
|
-
const require_fetch = require("./fetch-
|
|
2
|
+
const require_util = require("./util-BPkxeLuk.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-D54lzFcD.cjs");
|
|
4
4
|
let openai = require("openai");
|
|
5
5
|
openai = require_logger.__toESM(openai, 1);
|
|
6
6
|
//#region src/providers/openai/util.ts
|
|
@@ -970,4 +970,4 @@ Object.defineProperty(exports, "validateFunctionCall", {
|
|
|
970
970
|
}
|
|
971
971
|
});
|
|
972
972
|
|
|
973
|
-
//# sourceMappingURL=util-
|
|
973
|
+
//# sourceMappingURL=util-Cadd9fGT.cjs.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { c as logger } from "./logger-YzVIwMVq.js";
|
|
3
|
-
import { r as fetchWithProxy } from "./fetch-
|
|
4
|
-
import
|
|
3
|
+
import { r as fetchWithProxy } from "./fetch-KD8O9oZZ.js";
|
|
4
|
+
import "./util-CZyLhvIk.js";
|
|
5
|
+
import { n as renderVarsInObject } from "./render-BRIaR8VG.js";
|
|
5
6
|
//#region src/util/oauth.ts
|
|
6
7
|
/**
|
|
7
8
|
* Buffer time before token expiry to trigger proactive refresh (60 seconds)
|
|
@@ -232,4 +233,4 @@ function requiresAsyncAuth(server) {
|
|
|
232
233
|
//#endregion
|
|
233
234
|
export { getOAuthToken as a, isMcpToolNameFilter as c, TOKEN_REFRESH_BUFFER_MS as d, getMcpErrorMessage as i, renderAuthVars as l, getAuthHeaders as n, getOAuthTokenWithExpiry as o, getAuthQueryParams as r, isMcpErrorResult as s, applyQueryParams as t, requiresAsyncAuth as u };
|
|
234
235
|
|
|
235
|
-
//# sourceMappingURL=util-
|
|
236
|
+
//# sourceMappingURL=util-CzWbxb9R.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { C as getAjv, E as safeJsonStringify, d as looksLikeSecret, v as sanitizeUrl } from "./logger-BKiOczgq.js";
|
|
2
|
-
import { Y as maybeLoadFromExternalFileWithVars } from "./util-
|
|
3
|
-
import {
|
|
2
|
+
import { Y as maybeLoadFromExternalFileWithVars } from "./util-BnytsHEr.js";
|
|
3
|
+
import { w as calculateCost } from "./fetch-tOnj-VPG.js";
|
|
4
4
|
import OpenAI from "openai";
|
|
5
5
|
//#region src/providers/openai/util.ts
|
|
6
6
|
const ajv = getAjv();
|
|
@@ -862,4 +862,4 @@ function formatOpenAiError(data) {
|
|
|
862
862
|
//#endregion
|
|
863
863
|
export { hasSensitiveOpenAiCacheString as _, OPENAI_REALTIME_MODELS as a, appendOpenAiApiPath as c, failApiCall as d, formatOpenAiError as f, hasSensitiveOpenAiCachePath as g, getTokenUsage as h, OPENAI_COMPLETION_MODELS as i, assertOpenAiApiModel as l, getOpenAICompletionTokenDetails as m, OPENAI_BILLING_MODELS as n, OPENAI_TRANSCRIPTION_MODELS as o, getOpenAICacheWriteInputTokens as p, OPENAI_CHAT_MODELS as r, OPENAI_TTS_MODELS as s, NON_CONVERSATIONAL_REALTIME_MODELS as t, calculateOpenAICost as u, validateFunctionCall as v };
|
|
864
864
|
|
|
865
|
-
//# sourceMappingURL=util-
|
|
865
|
+
//# sourceMappingURL=util-DHtnWbEL.js.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
const require_logger = require("./logger-BN3n9c1R.cjs");
|
|
2
|
-
const require_util = require("./util-
|
|
3
|
-
const require_fetch = require("./fetch-
|
|
2
|
+
const require_util = require("./util-BPkxeLuk.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-D54lzFcD.cjs");
|
|
4
4
|
const require_fileExtensions = require("./fileExtensions-BQZEFw03.cjs");
|
|
5
|
+
const require_render = require("./render-C1VJjFT2.cjs");
|
|
5
6
|
const require_dataUrl = require("./dataUrl-DM5cIGrK.cjs");
|
|
6
7
|
let zod = require("zod");
|
|
7
8
|
let crypto = require("crypto");
|
|
@@ -920,7 +921,7 @@ function stripExecutableToolFileReferencesFromValue(tools) {
|
|
|
920
921
|
return tools;
|
|
921
922
|
}
|
|
922
923
|
function stripExecutableToolFileReferences(tools, vars) {
|
|
923
|
-
return stripExecutableToolFileReferencesFromValue(
|
|
924
|
+
return stripExecutableToolFileReferencesFromValue(require_render.renderVarsInObject(tools, vars));
|
|
924
925
|
}
|
|
925
926
|
/**
|
|
926
927
|
* Calculates the cost for a Google API call.
|
|
@@ -1301,7 +1302,7 @@ function normalizeTools(tools) {
|
|
|
1301
1302
|
});
|
|
1302
1303
|
}
|
|
1303
1304
|
function loadFile(config_var, context_vars) {
|
|
1304
|
-
const fileContents = require_util.maybeLoadFromExternalFile(
|
|
1305
|
+
const fileContents = require_util.maybeLoadFromExternalFile(require_render.renderVarsInObject(config_var, context_vars));
|
|
1305
1306
|
if (typeof fileContents === "string") try {
|
|
1306
1307
|
const parsedContents = JSON.parse(fileContents);
|
|
1307
1308
|
return Array.isArray(parsedContents) ? normalizeTools(parsedContents) : parsedContents;
|
|
@@ -1399,7 +1400,7 @@ function parseConfigSystemInstruction(configSystemInstruction, contextVars) {
|
|
|
1399
1400
|
if (typeof configSystemInstruction === "string") configInstruction = loadFile(configSystemInstruction, contextVars);
|
|
1400
1401
|
if (typeof configInstruction === "string") configInstruction = { parts: [{ text: configInstruction }] };
|
|
1401
1402
|
if (contextVars && configInstruction) {
|
|
1402
|
-
const nunjucks =
|
|
1403
|
+
const nunjucks = require_render.getNunjucksEngine();
|
|
1403
1404
|
for (const part of configInstruction.parts) if (part.text) try {
|
|
1404
1405
|
part.text = nunjucks.renderString(part.text, contextVars);
|
|
1405
1406
|
} catch (err) {
|
|
@@ -1766,4 +1767,4 @@ Object.defineProperty(exports, "validateFunctionCall", {
|
|
|
1766
1767
|
}
|
|
1767
1768
|
});
|
|
1768
1769
|
|
|
1769
|
-
//# sourceMappingURL=util-
|
|
1770
|
+
//# sourceMappingURL=util-DSwbJPgL.cjs.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const require_logger = require("./logger-BN3n9c1R.cjs");
|
|
2
|
-
|
|
3
|
-
const require_fetch = require("./fetch-
|
|
2
|
+
require("./util-BPkxeLuk.cjs");
|
|
3
|
+
const require_fetch = require("./fetch-D54lzFcD.cjs");
|
|
4
|
+
const require_render = require("./render-C1VJjFT2.cjs");
|
|
4
5
|
//#region src/util/oauth.ts
|
|
5
6
|
/**
|
|
6
7
|
* Buffer time before token expiry to trigger proactive refresh (60 seconds)
|
|
@@ -74,7 +75,7 @@ function renderAuthVars(server, vars) {
|
|
|
74
75
|
const renderVars = vars || process.env;
|
|
75
76
|
return {
|
|
76
77
|
...server,
|
|
77
|
-
auth:
|
|
78
|
+
auth: require_render.renderVarsInObject(server.auth, renderVars)
|
|
78
79
|
};
|
|
79
80
|
}
|
|
80
81
|
const oauthTokenCache = /* @__PURE__ */ new Map();
|
|
@@ -296,4 +297,4 @@ Object.defineProperty(exports, "requiresAsyncAuth", {
|
|
|
296
297
|
}
|
|
297
298
|
});
|
|
298
299
|
|
|
299
|
-
//# sourceMappingURL=util-
|
|
300
|
+
//# sourceMappingURL=util-DhtW6BNS.cjs.map
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { I as getEnvString, o as logger, w as getAjv } from "./logger-D4ion89i.js";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { ut as maybeLoadFromExternalFile, xt as parseFileUrl } from "./util-BPtpPW4O.js";
|
|
3
|
+
import { A as clampCachedTokens, L as parseChatPrompt, k as calculateCost, z as transformToolChoice } from "./fetch-DnDg-Ics.js";
|
|
4
4
|
import { i as isJavascriptFile } from "./shared-B6FXN6z-.js";
|
|
5
|
+
import { n as renderVarsInObject, o as getNunjucksEngine } from "./render-DIhuKgcQ.js";
|
|
5
6
|
import { n as isDataUrl, r as parseDataUrl, t as extractBase64FromDataUrl } from "./dataUrl-CVhbP_9M.js";
|
|
6
7
|
import { z as z$1 } from "zod";
|
|
7
8
|
import crypto from "crypto";
|
|
@@ -1573,4 +1574,4 @@ function createAuthCacheDiscriminator(headers) {
|
|
|
1573
1574
|
//#endregion
|
|
1574
1575
|
export { hasGoogleDefaultCredentials as A, CHAT_MODELS as C, determineGoogleVertexMode as D, GoogleAuthManager as E, resolveProjectId as M, getGoogleApiKey as O, validateFunctionCall as S, getVertexApiHostForRegion as T, removeDeprecatedGeminiGenerationParams as _, formatCandidateContents as a, sanitizeSchemaForGemini as b, getGoogleAccessToken as c, mergeGoogleCompletionOptions as d, mergeParts as f, parseConfigSystemInstruction as g, normalizeTools as h, createAuthCacheDiscriminator as i, loadCredentials as j, getGoogleClient as k, getLastPromptSafetyRatings as l, normalizeSafetySettings as m, calculateGoogleCostFromUsage as n, geminiFormatAndSystemInstructions as o, normalizeGeminiAudio as p, collectGroundingMetadata as r, getCandidate as s, calculateGoogleCost as t, isNonCandidateStreamChunk as u, removeGoogleFunctionDeclarations as v, GOOGLE_MODELS as w, stripExecutableToolFileReferences as x, resolveGoogleToolConfig as y };
|
|
1575
1576
|
|
|
1576
|
-
//# sourceMappingURL=util-
|
|
1577
|
+
//# sourceMappingURL=util-DiVs2Kf-.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { c as logger, k as safeJsonStringify } from "./logger-YzVIwMVq.js";
|
|
3
|
-
import {
|
|
3
|
+
import { A as getRequestTimeoutMs } from "./fetch-KD8O9oZZ.js";
|
|
4
4
|
import { Y as DATASET_PLUGINS, ot as pluginDescriptions } from "./tables-DpSgejqG.js";
|
|
5
|
-
import { i as fetchWithCache } from "./cache-
|
|
5
|
+
import { i as fetchWithCache } from "./cache-xL5UULpy.js";
|
|
6
6
|
import { d as createEmptyTokenUsage, f as getErrorTokenUsage, s as accumulateResponseTokenUsage } from "./tokenUsageUtils-Cf6nFV6z.js";
|
|
7
|
-
import { c as neverGenerateRemote, i as getRemoteGenerationUrl, p as remoteGenerationContextPayload, r as getRemoteGenerationHeaders } from "./remoteGeneration-
|
|
7
|
+
import { c as neverGenerateRemote, i as getRemoteGenerationUrl, p as remoteGenerationContextPayload, r as getRemoteGenerationHeaders } from "./remoteGeneration-Cc78LDjQ.js";
|
|
8
8
|
import { n as escapeRegExp } from "./text-CV7MmVb_.js";
|
|
9
9
|
import { r as materializeInputVariablesWithMetadata } from "./inputVariables-DpjKHmSc.js";
|
|
10
10
|
//#region src/redteam/generationTokenUsage.ts
|
|
@@ -396,4 +396,4 @@ function getSessionId(response, context) {
|
|
|
396
396
|
//#endregion
|
|
397
397
|
export { extractPromptFromTags as a, isBasicRefusal as c, recordFailedGenerationTokenUsage as d, recordGenerationTokenUsage as f, extractMaterializedVariablesFromJsonWithMetadata as i, isEmptyResponse as l, trackGenerationTokenUsage as m, extractGoalFromPrompt as n, getSessionId as o, trackAdditionalGenerationProvider as p, extractInputVarsFromPrompt as r, getShortPluginId as s, extractAllPromptsFromTags as t, removePrefix as u };
|
|
398
398
|
|
|
399
|
-
//# sourceMappingURL=util-
|
|
399
|
+
//# sourceMappingURL=util-DlFpV1xV.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { E as getAjv, k as safeJsonStringify, p as looksLikeSecret, x as sanitizeUrl } from "./logger-YzVIwMVq.js";
|
|
3
|
-
import {
|
|
4
|
-
import { z as maybeLoadFromExternalFileWithVars } from "./util-
|
|
3
|
+
import { O as calculateCost } from "./fetch-KD8O9oZZ.js";
|
|
4
|
+
import { z as maybeLoadFromExternalFileWithVars } from "./util-CZyLhvIk.js";
|
|
5
5
|
import OpenAI from "openai";
|
|
6
6
|
//#region src/providers/openai/util.ts
|
|
7
7
|
const ajv = getAjv();
|
|
@@ -863,4 +863,4 @@ function formatOpenAiError(data) {
|
|
|
863
863
|
//#endregion
|
|
864
864
|
export { hasSensitiveOpenAiCacheString as _, OPENAI_REALTIME_MODELS as a, appendOpenAiApiPath as c, failApiCall as d, formatOpenAiError as f, hasSensitiveOpenAiCachePath as g, getTokenUsage as h, OPENAI_COMPLETION_MODELS as i, assertOpenAiApiModel as l, getOpenAICompletionTokenDetails as m, OPENAI_BILLING_MODELS as n, OPENAI_TRANSCRIPTION_MODELS as o, getOpenAICacheWriteInputTokens as p, OPENAI_CHAT_MODELS as r, OPENAI_TTS_MODELS as s, NON_CONVERSATIONAL_REALTIME_MODELS as t, calculateOpenAICost as u, validateFunctionCall as v };
|
|
865
865
|
|
|
866
|
-
//# sourceMappingURL=util-
|
|
866
|
+
//# sourceMappingURL=util-DlT2H1W5.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { o as logger } from "./logger-BKiOczgq.js";
|
|
2
|
-
import
|
|
3
|
-
import { t as fetchWithProxy } from "./fetch-
|
|
2
|
+
import "./util-BnytsHEr.js";
|
|
3
|
+
import { t as fetchWithProxy } from "./fetch-tOnj-VPG.js";
|
|
4
|
+
import { n as renderVarsInObject } from "./render-zarxdXS7.js";
|
|
4
5
|
//#region src/util/oauth.ts
|
|
5
6
|
/**
|
|
6
7
|
* Buffer time before token expiry to trigger proactive refresh (60 seconds)
|
|
@@ -231,4 +232,4 @@ function requiresAsyncAuth(server) {
|
|
|
231
232
|
//#endregion
|
|
232
233
|
export { getOAuthToken as a, isMcpToolNameFilter as c, TOKEN_REFRESH_BUFFER_MS as d, getMcpErrorMessage as i, renderAuthVars as l, getAuthHeaders as n, getOAuthTokenWithExpiry as o, getAuthQueryParams as r, isMcpErrorResult as s, applyQueryParams as t, requiresAsyncAuth as u };
|
|
233
234
|
|
|
234
|
-
//# sourceMappingURL=util-
|
|
235
|
+
//# sourceMappingURL=util-InmFNqSw.js.map
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { E as getAjv, R as getEnvString, c as logger } from "./logger-YzVIwMVq.js";
|
|
3
|
-
import {
|
|
3
|
+
import { I as parseChatPrompt, O as calculateCost, R as transformToolChoice, k as clampCachedTokens } from "./fetch-KD8O9oZZ.js";
|
|
4
4
|
import { i as isJavascriptFile } from "./fileExtensions-CAc10_Jb.js";
|
|
5
|
-
import {
|
|
5
|
+
import { R as maybeLoadFromExternalFile, Y as parseFileUrl } from "./util-CZyLhvIk.js";
|
|
6
|
+
import { n as renderVarsInObject, o as getNunjucksEngine } from "./render-BRIaR8VG.js";
|
|
6
7
|
import { n as isDataUrl, r as parseDataUrl, t as extractBase64FromDataUrl } from "./dataUrl-CJlC_-p_.js";
|
|
7
8
|
import { z as z$1 } from "zod";
|
|
8
9
|
import crypto from "crypto";
|
|
@@ -1574,4 +1575,4 @@ function createAuthCacheDiscriminator(headers) {
|
|
|
1574
1575
|
//#endregion
|
|
1575
1576
|
export { getGoogleClient as A, CHAT_MODELS as C, GoogleAuthManager as D, getVertexApiHostForRegion as E, loadCredentials as M, resolveProjectId as N, determineGoogleVertexMode as O, validateFunctionCall as S, GOOGLE_MODELS as T, removeDeprecatedGeminiGenerationParams as _, formatCandidateContents as a, sanitizeSchemaForGemini as b, getGoogleAccessToken as c, mergeGoogleCompletionOptions as d, mergeParts as f, parseConfigSystemInstruction as g, normalizeTools as h, createAuthCacheDiscriminator as i, hasGoogleDefaultCredentials as j, getGoogleApiKey as k, getLastPromptSafetyRatings as l, normalizeSafetySettings as m, calculateGoogleCostFromUsage as n, geminiFormatAndSystemInstructions as o, normalizeGeminiAudio as p, collectGroundingMetadata as r, getCandidate as s, calculateGoogleCost as t, isNonCandidateStreamChunk as u, removeGoogleFunctionDeclarations as v, GEMINI_FLASH_MODELS as w, stripExecutableToolFileReferences as x, resolveGoogleToolConfig as y };
|
|
1576
1577
|
|
|
1577
|
-
//# sourceMappingURL=util-
|
|
1578
|
+
//# sourceMappingURL=util-Rbl6Om9L2.js.map
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { n as __exportAll } from "./processShim-CAJN2mjb.js";
|
|
2
2
|
import { I as getEnvString, M as state, T as isValidJson, k as loadYaml, o as logger } from "./logger-D4ion89i.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { ut as maybeLoadFromExternalFile } from "./util-BPtpPW4O.js";
|
|
4
|
+
import { L as parseChatPrompt, j as getRequestTimeoutMs, t as fetchWithProxy } from "./fetch-DnDg-Ics.js";
|
|
5
5
|
import { f as withGenAISpan } from "./genaiTracer-Cp9O3qLz.js";
|
|
6
|
-
import { a as getCache, l as isCacheEnabled } from "./cache-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
6
|
+
import { a as getCache, l as isCacheEnabled } from "./cache-ePPAC5hy.js";
|
|
7
|
+
import { n as renderVarsInObject } from "./render-DIhuKgcQ.js";
|
|
8
|
+
import { M as resolveProjectId, T as getVertexApiHostForRegion, _ as removeDeprecatedGeminiGenerationParams, a as formatCandidateContents, d as mergeGoogleCompletionOptions, f as mergeParts, g as parseConfigSystemInstruction, j as loadCredentials, k as getGoogleClient, m as normalizeSafetySettings, n as calculateGoogleCostFromUsage, o as geminiFormatAndSystemInstructions, p as normalizeGeminiAudio, r as collectGroundingMetadata, s as getCandidate, v as removeGoogleFunctionDeclarations, y as resolveGoogleToolConfig } from "./util-DiVs2Kf-.js";
|
|
9
|
+
import { C as parseMessages, S as outputFromMessage, _ as isSamplingParamsDeprecatedClaudeModel, i as calculateAnthropicCost, o as clampMaxTokensForThinkingBudget, r as applyClaudeRegionalPremium, s as claudeThinkingConsumesTokens, u as getTokenUsage, x as normalizeClaudeThinkingConfig } from "./util-BaGd-bCr.js";
|
|
10
|
+
import { t as GoogleGenericProvider } from "./base-wuaktSuM.js";
|
|
10
11
|
import { createHmac } from "crypto";
|
|
11
12
|
//#region src/providers/google/vertex.ts
|
|
12
13
|
var vertex_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -789,4 +790,4 @@ function getGoogleVertexProviders(env) {
|
|
|
789
790
|
//#endregion
|
|
790
791
|
export { getGoogleVertexProviders as n, vertex_exports as r, getGoogleVertexEmbeddingProvider as t };
|
|
791
792
|
|
|
792
|
-
//# sourceMappingURL=vertex-
|
|
793
|
+
//# sourceMappingURL=vertex-BJYJC-Tr.js.map
|