promptfoo 0.121.2 → 0.121.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/dist/src/{ListApp-Du7YVwj5.js → ListApp-DQkFNqE9.js} +1 -1
- package/dist/src/{accounts-B0pgC1oV.js → accounts-DdJ2pHMI.js} +5 -5
- package/dist/src/{accounts-CiBLOnA7.js → accounts-DhMYUUbu.js} +5 -5
- package/dist/src/{accounts-gtkH-5KX.cjs → accounts-Dy17bs4D.cjs} +5 -5
- package/dist/src/{accounts-Bm2D8Db9.js → accounts-F9d_5sMC.js} +6 -6
- package/dist/src/{cometapi-C4xSqeID.cjs → agentic-utils-BpX5b23w.cjs} +24 -62
- package/dist/src/{cometapi-CUQq3H_a.js → agentic-utils-P172hM8B.js} +4 -61
- package/dist/src/agentic-utils-qFlm6zes.js +153 -0
- package/dist/src/{agentic-utils-DS1g3GLF.js → agentic-utils-w68v6_Dz.js} +3 -3
- package/dist/src/{agents-CmvBq8LV.js → agents-8FDnTriG.js} +6 -7
- package/dist/src/{agents-DbRtpYxR.cjs → agents-BahDpe5G.cjs} +255 -20
- package/dist/src/{agents-DgF2zDag.js → agents-C-R_jfzI.js} +255 -20
- package/dist/src/{agents-9qiOy0ho.js → agents-CgaMXvLM.js} +5 -7
- package/dist/src/{agents-Di9DKPzn.cjs → agents-D7-HGxUj.cjs} +5 -7
- package/dist/src/{agents-CBr9A01V.js → agents-DJ35I3Nt.js} +255 -20
- package/dist/src/{agents-cLXA8a_8.js → agents-aYPQLf8W.js} +5 -9
- package/dist/src/{agents-D__IdAlg.js → agents-pQeBEXMm.js} +255 -21
- package/dist/src/{aimlapi-B4rcnZgv.js → aimlapi-BCq3MHeL.js} +8 -14
- package/dist/src/{aimlapi-DHJU_kcV.js → aimlapi-BD6J9oKt.js} +7 -14
- package/dist/src/{aimlapi-BvlNH0gr.cjs → aimlapi-qcK4OT55.cjs} +8 -15
- package/dist/src/{aimlapi-CnkC2HqE.js → aimlapi-sgYnkE54.js} +7 -16
- package/dist/src/app/app/tsconfig.app.tsbuildinfo +1 -0
- package/dist/src/app/assets/Report-CQYFezYu.js +1 -0
- package/dist/src/app/assets/index-BXGkeMwh.css +1 -0
- package/dist/src/app/assets/index-BzJt18Jz.js +385 -0
- package/dist/src/app/assets/rolldown-runtime-COnpUsM8.js +1 -0
- package/dist/src/app/assets/scroll-timeline-D9IT_e8Z.js +1 -0
- package/dist/src/app/assets/sync-IjzpWrOE.js +4 -0
- package/dist/src/app/assets/vendor-charts-BNdH8TCw.js +36 -0
- package/dist/src/app/assets/vendor-markdown-Ch00wnNI.js +29 -0
- package/dist/src/app/assets/vendor-react-CVvmk1UB.js +9 -0
- package/dist/src/app/assets/vendor-utils-BnEYbx2Q.js +37 -0
- package/dist/src/app/index.html +7 -7
- package/dist/src/{audio-Dz3z7s3J.js → audio-B7izf48x.js} +4 -5
- package/dist/src/{audio-CGMyULza.cjs → audio-BQtNuYBj.cjs} +4 -4
- package/dist/src/{audio-Bkv46et0.js → audio-COrn8rM6.js} +4 -4
- package/dist/src/{audio-ClI_AFre.js → audio-DcVKoInv.js} +4 -4
- package/dist/src/{base-CGrhspbK.cjs → base-D-670DX8.cjs} +3 -3
- package/dist/src/{base-CpjcHe4e.js → base-PYJvBE1i.js} +3 -3
- package/dist/src/{base-Dy1V8--Z.js → base-fZ9wgg50.js} +3 -3
- package/dist/src/{base-DLKtKMFh.js → base-yrI1Yal4.js} +3 -3
- package/dist/src/{blobs-BDbfYdrJ.js → blobs-BCZavS8s.js} +4 -4
- package/dist/src/{blobs-CMHN0Qcz.js → blobs-BQWqnnvL.js} +4 -4
- package/dist/src/{blobs-CBO20krR.js → blobs-C-F78Kfn.js} +3 -3
- package/dist/src/{blobs-D23XLin-.cjs → blobs-D2FAd1Q5.cjs} +3 -3
- package/dist/src/cache-BIyPcp5v.cjs +376 -0
- package/dist/src/cache-C4Xb-hNb.js +310 -0
- package/dist/src/cache-Cr9oLMUa.js +3 -0
- package/dist/src/cache-D5NZmMiT.js +310 -0
- package/dist/src/cache-DbLsVWB2.cjs +3 -0
- package/dist/src/cache-mb7c8hbp.js +280 -0
- package/dist/src/{chat-C2jrdPMx.js → chat-0bwXjVP0.js} +3 -13
- package/dist/src/{chat-C1Qst7jL.cjs → chat-BPXSW8Bv.cjs} +3 -13
- package/dist/src/{chat-DJIw17u0.js → chat-BfPaS15_.js} +68 -42
- package/dist/src/{chat-CgF-J-Jj.cjs → chat-CclRbxGf.cjs} +68 -42
- package/dist/src/{chat-BiKyneZl.js → chat-Dr3DUQ0D.js} +68 -42
- package/dist/src/{chat-DqxYYtWA.js → chat-I9izLm49.js} +67 -41
- package/dist/src/{chat-CzkrVDfz.js → chat-MKxMnZJZ.js} +3 -13
- package/dist/src/{chat-qmatte1u.js → chat-mW0ORo8G.js} +3 -14
- package/dist/src/{chatkit-DKyPi1Gs.cjs → chatkit-BoWoSgXl.cjs} +4 -4
- package/dist/src/{chatkit-65VXf5SR.js → chatkit-CJnHRRMM.js} +4 -4
- package/dist/src/{chatkit-Be-Q-a9F.js → chatkit-Cv6AhukM.js} +4 -4
- package/dist/src/{chatkit-BxFvW8KY.js → chatkit-zUIVoDos.js} +4 -4
- package/dist/src/{claude-agent-sdk-Apiy0iaz.js → claude-agent-sdk-BQNuLaAK.js} +41 -18
- package/dist/src/{claude-agent-sdk-D9Z5Pr9X.cjs → claude-agent-sdk-CPJo3dBQ.cjs} +45 -22
- package/dist/src/{claude-agent-sdk-D2bJee9S.js → claude-agent-sdk-Dtq_L-Sc.js} +40 -17
- package/dist/src/{claude-agent-sdk-DfCoW0E6.js → claude-agent-sdk-nfAIcxNf.js} +42 -20
- package/dist/src/{cloud-C0dlstV_.js → cloud-DQZ5sVjW.js} +25 -13
- package/dist/src/cloud-Hphvo8kr.js +3 -0
- package/dist/src/{cloudflare-ai-8TDxHR0x.js → cloudflare-ai-BIB567w6.js} +5 -14
- package/dist/src/{cloudflare-ai-g7PB6VHR.js → cloudflare-ai-DGLte7Py.js} +5 -14
- package/dist/src/{cloudflare-ai-CknbZ5LJ.cjs → cloudflare-ai-Dl3N9OVD.cjs} +6 -15
- package/dist/src/{cloudflare-ai-BxAGvfju.js → cloudflare-ai-DlKr0rY7.js} +5 -15
- package/dist/src/{cloudflare-gateway-B9HWA5wf.js → cloudflare-gateway-BDZrYydE.js} +4 -16
- package/dist/src/{cloudflare-gateway-BSnDmHYo.cjs → cloudflare-gateway-BYDp495F.cjs} +4 -15
- package/dist/src/{cloudflare-gateway-CKDb4dJ8.js → cloudflare-gateway-CiIZHU0Q.js} +5 -164
- package/dist/src/{cloudflare-gateway-CP9QEWYS.js → cloudflare-gateway-DI1HNP5F.js} +4 -15
- package/dist/src/codex-sdk-BAmYE7qy.js +3 -0
- package/dist/src/codex-sdk-C2_M2pl_.cjs +1172 -0
- package/dist/src/codex-sdk-CErXn7qh.js +1165 -0
- package/dist/src/codex-sdk-CWEnH70W.cjs +2 -0
- package/dist/src/codex-sdk-CpqiOqDO.js +1164 -0
- package/dist/src/codex-sdk-Rtky3M4I.js +1165 -0
- package/dist/src/{cometapi-BL9yvj_f.js → cometapi-BUlt_ELa.js} +8 -15
- package/dist/src/{cometapi-DFNiKmSz.js → cometapi-CtJ-mS8R.js} +8 -16
- package/dist/src/cometapi-DT-jlVCB.js +55 -0
- package/dist/src/cometapi-UVOryo4W.cjs +55 -0
- package/dist/src/{completion-CM6oK8PS.cjs → completion-BozdoXba.cjs} +7 -62
- package/dist/src/{completion-5MzrpJxT.js → completion-Dnxn7E-j.js} +8 -57
- package/dist/src/{completion-qRoZAYRB.js → completion-HUe8wDhZ.js} +8 -57
- package/dist/src/{completion-DZ083F31.js → completion-x0a_c2y1.js} +8 -57
- package/dist/src/{createHash-CTQmL3G2.js → createHash-4gFQpDDv.js} +3 -3
- package/dist/src/{createHash-CfZSc0b4.cjs → createHash-B7KvgoOD.cjs} +4 -4
- package/dist/src/{createHash-Da8fMwqB.js → createHash-ChI45QR1.js} +3 -3
- package/dist/src/{createHash-DmPQkvBh.js → createHash-CwDVU5xr.js} +3 -3
- package/dist/src/{docker-ExVyLp0S.js → docker-CQmlA2NU.js} +7 -14
- package/dist/src/{docker-Bb5dcxr8.js → docker-ClnmCf1Z.js} +6 -14
- package/dist/src/{docker-BvfL2BrW.js → docker-DCgsveLD.js} +6 -16
- package/dist/src/{docker-DcF2pRrj.cjs → docker-DS4_Osau.cjs} +7 -15
- package/dist/src/embedding-D3xTseo7.js +59 -0
- package/dist/src/embedding-DD9wa3ae.js +58 -0
- package/dist/src/embedding-I45KG3o7.cjs +63 -0
- package/dist/src/embedding-nFbumxcv.js +58 -0
- package/dist/src/entrypoint.js +69 -6
- package/dist/src/{errors-P6ll7XSJ.js → errors-Cw810C93.js} +1 -1
- package/dist/src/{esm-CaIwzWR5.js → esm-C7PnfdF8.js} +16 -7
- package/dist/src/{esm-CnNt7sI4.cjs → esm-CtEPLdAj.cjs} +15 -6
- package/dist/src/{esm-Cd1AjG1D.js → esm-Dh4dOLlt.js} +15 -6
- package/dist/src/{esm-C03C-mv3.js → esm-tVgYPY-f.js} +27 -18
- package/dist/src/eval-CzJFfFO9.js +3 -0
- package/dist/src/{eval-Dg2nG4v2.js → eval-u4UVafl6.js} +49 -20
- package/dist/src/{evalResult-BDMqrapS.js → evalResult-Bgm9ZH31.js} +7 -7
- package/dist/src/{evalResult-BBRNtX4I.js → evalResult-D3hVYFis.js} +7 -7
- package/dist/src/evalResult-D8MT9p0s.js +3 -0
- package/dist/src/evalResult-DElBuddX.js +2 -0
- package/dist/src/evalResult-Dvc-iucu.cjs +2 -0
- package/dist/src/{evalResult-fuaI8HkH.cjs → evalResult-KZqXl4XP.cjs} +7 -7
- package/dist/src/evaluator-CVessDWe.js +3 -0
- package/dist/src/{evaluator-BhoWwp5b.js → evaluator-IvuDYSvQ.js} +3080 -1254
- package/dist/src/{extractor-D25qpmGX.js → extractor-CAfTSraf.js} +6 -6
- package/dist/src/{extractor-DReVID0K.js → extractor-DNSeBVOJ.js} +6 -6
- package/dist/src/{extractor-C0EVHewb.js → extractor-Dk6bRWkv.js} +6 -6
- package/dist/src/{extractor-pYLLi3wS.cjs → extractor-WVPOrH43.cjs} +6 -6
- package/dist/src/{fetch-HaqdX7U1.js → fetch-B0Z3Oe4k.js} +218 -55
- package/dist/src/{fetch-Dxpd4_sr.js → fetch-BEWnXrrG.js} +195 -45
- package/dist/src/fetch-C7bGKDlQ.js +3 -0
- package/dist/src/{fetch-BPkYtG8K.cjs → fetch-CJU5ELPa.cjs} +223 -48
- package/dist/src/{fetch-Cwxnd8zz.js → fetch-Di00EQrc.js} +218 -55
- package/dist/src/{fileExtensions-Ds-foDzt.js → fileExtensions-AWa2ZML4.js} +1 -1
- package/dist/src/{fileExtensions-LcDYkU4v.js → fileExtensions-BArZuxsI.js} +1 -1
- package/dist/src/{formatDuration-DgBVMN65.js → formatDuration-DZzPsexs.js} +1 -1
- package/dist/src/{genaiTracer-D3fD9dNV.js → genaiTracer-COYDi-tC.js} +6 -2
- package/dist/src/{genaiTracer-C1rxGO8Q.js → genaiTracer-DWdZ28hY.js} +6 -2
- package/dist/src/{genaiTracer-70Z8BIuV.js → genaiTracer-XnrcgDCe.js} +6 -2
- package/dist/src/{genaiTracer-DN4dQywX.cjs → genaiTracer-yRuxj9-L.cjs} +7 -3
- package/dist/src/golang/wrapper.go +1 -1
- package/dist/src/{graders-DU49_J8Y.cjs → graders--zknU_uk.cjs} +5747 -3206
- package/dist/src/graders-BOAzQEUe.cjs +2 -0
- package/dist/src/graders-D4BTsZdG2.js +3 -0
- package/dist/src/graders-DOJK1XpV.js +2 -0
- package/dist/src/graders-NAv9LcBn.js +2 -0
- package/dist/src/{graders-BTeBGqjJ.js → graders-Zy3x0zqX.js} +5727 -3218
- package/dist/src/{graders-Bj_Odv7c.js → graders-eIHhRqoC.js} +5719 -3210
- package/dist/src/{graders-DP7KFFo-.js → graders-pvbReLLn.js} +5728 -3219
- package/dist/src/{image-B0h9VEMc.js → image-9302QVqR.js} +4 -4
- package/dist/src/{image-CHfWvljl.js → image-B5Mv-Z3h.js} +8 -8
- package/dist/src/{image-DS-o-0ph.js → image-DVz2RiMF.js} +8 -8
- package/dist/src/{image-C1madmKh.cjs → image-De2FBmYV.cjs} +4 -4
- package/dist/src/{image-B02ogr_b.js → image-dnoUgPrC.js} +4 -5
- package/dist/src/{image-Dpxa1Jt6.js → image-qUpPvmNZ.js} +8 -8
- package/dist/src/{image-Bb4vWQLM.js → image-u7-rKnYU.js} +4 -4
- package/dist/src/{image-BLmROtN3.cjs → image-x6KqLQl4.cjs} +8 -8
- package/dist/src/index.cjs +3728 -1482
- package/dist/src/index.d.cts +3232 -79
- package/dist/src/index.d.ts +3232 -79
- package/dist/src/index.js +3735 -1490
- package/dist/src/{interactiveCheck-BgLZUIt3.js → interactiveCheck-CLERUB0c.js} +2 -2
- package/dist/src/{knowledgeBase-DOO_BM9b.cjs → knowledgeBase-Bpoe_nLu.cjs} +6 -8
- package/dist/src/{knowledgeBase-D33Ty2l6.js → knowledgeBase-Dgc7CBWF.js} +6 -8
- package/dist/src/{knowledgeBase-B3OoKIej.js → knowledgeBase-RhFPGWDc.js} +6 -8
- package/dist/src/{knowledgeBase-CYTLHOt1.js → knowledgeBase-lm9RXSAm.js} +6 -9
- package/dist/src/{litellm-NbjknEh6.js → litellm-C2kqjxqp.js} +6 -14
- package/dist/src/{litellm-I_hbp_dc.cjs → litellm-CoyI4IAl.cjs} +6 -15
- package/dist/src/{litellm-TrljxD9G.js → litellm-DRjpcSa7.js} +5 -14
- package/dist/src/{litellm-AaeZcZQF.js → litellm-p37R1dzQ.js} +5 -16
- package/dist/src/{logger-DLcq4dWf.js → logger-B88EkIn6.js} +48 -23
- package/dist/src/{logger-Cp1GPUjj.cjs → logger-COuQb2xB.cjs} +77 -22
- package/dist/src/{logger-CT3IKMKA.js → logger-Ct2S6Yx-.js} +48 -23
- package/dist/src/{logger-KkObSCzq.js → logger-DksKw1Qc.js} +48 -23
- package/dist/src/{luma-ray-f6I2fft-.js → luma-ray-B863CmuZ.js} +6 -10
- package/dist/src/{luma-ray-DDsjcgZZ.js → luma-ray-BTTLtqQ8.js} +7 -10
- package/dist/src/{luma-ray-Due0n7di.cjs → luma-ray-BxVKaW2a.cjs} +6 -10
- package/dist/src/{luma-ray-BS2_tY8L.js → luma-ray-KgTCXrZC.js} +6 -12
- package/dist/src/main.d.ts +1 -26
- package/dist/src/main.js +1011 -548
- package/dist/src/{messages-Bs1kC7P4.cjs → messages-811uVVW5.cjs} +74 -19
- package/dist/src/{messages-BS17jdMx.js → messages-BTQz42fn.js} +74 -19
- package/dist/src/{messages-ZJk778GH.js → messages-MYTQ2TWp.js} +74 -19
- package/dist/src/{messages-D0lx5qK7.js → messages-zWbkLLHz.js} +74 -19
- package/dist/src/{meteor-D-SotUw9.js → meteor-CU5UAE-H.js} +1 -1
- package/dist/src/{meteor-DLZZ3osF.cjs → meteor-Co1VQ1u5.cjs} +1 -1
- package/dist/src/{meteor-44VjEACX.js → meteor-DHdzY1Ss.js} +1 -1
- package/dist/src/{meteor-DUiCJRC-.js → meteor-DuAFv6gF.js} +1 -1
- package/dist/src/{modelslab-Bmni6skY.js → modelslab-D0erNWKe.js} +7 -10
- package/dist/src/{modelslab-DRb74SP4.js → modelslab-DIq-6y7x.js} +7 -10
- package/dist/src/{modelslab-CoUX6Jc_.cjs → modelslab-Dk1JAtVo.cjs} +7 -10
- package/dist/src/{modelslab-Bx9IrZfS.js → modelslab-wu9yi5GE.js} +7 -11
- package/dist/src/{nova-reel-BfPq-0Yk.js → nova-reel-CCFRfeRb.js} +7 -10
- package/dist/src/{nova-reel-C_QM18Xn.cjs → nova-reel-CrLXVKQf.cjs} +6 -10
- package/dist/src/{nova-reel-bgjxilYW.js → nova-reel-DQrm74ng.js} +6 -10
- package/dist/src/{nova-reel-D_W1tjMH.js → nova-reel-gr11WG7f.js} +6 -12
- package/dist/src/{nova-sonic-DIGQNR07.js → nova-sonic-BYdp-QLs.js} +5 -7
- package/dist/src/{nova-sonic-CFb5GYhg.js → nova-sonic-B_ZXcUJB.js} +4 -7
- package/dist/src/{nova-sonic-De1HW5fD.js → nova-sonic-TDgrlTk7.js} +4 -9
- package/dist/src/{nova-sonic-zfcljeRp.cjs → nova-sonic-i5tUvXKn.cjs} +4 -7
- package/dist/src/{openai-DElQ-fPX.js → openai-DhVEmgeZ.js} +6 -3
- package/dist/src/{openai-DhbB7eWK.js → openai-Qsvz25mV.js} +6 -3
- package/dist/src/{openai-Cuif0GEt.cjs → openai-URNyItar.cjs} +6 -3
- package/dist/src/{openai-j-sE2O7r.js → openai-iYtrXzOX.js} +6 -3
- package/dist/src/openclaw-CLWrW03k.js +1200 -0
- package/dist/src/openclaw-CnQ363Wi.js +1199 -0
- package/dist/src/openclaw-CwzlQSQX.js +1199 -0
- package/dist/src/openclaw-wX9rtfke.cjs +1205 -0
- package/dist/src/{opencode-sdk-B3CWY9h_.js → opencode-sdk-BUu5Nevv.js} +12 -14
- package/dist/src/{opencode-sdk-BL764Jdi.cjs → opencode-sdk-BZ2idgYA.cjs} +16 -18
- package/dist/src/{opencode-sdk-0j6rTWNb.js → opencode-sdk-BxD8vXp_.js} +12 -15
- package/dist/src/{opencode-sdk-C2y6UkP2.js → opencode-sdk-GI2KaAXq.js} +12 -14
- package/dist/src/{otlpReceiver-C99PPb48.js → otlpReceiver-B2z58l4e.js} +154 -98
- package/dist/src/{otlpReceiver-CGq6LspY.cjs → otlpReceiver-BfcVq2Nq.cjs} +154 -98
- package/dist/src/{otlpReceiver-D89fR-rC.js → otlpReceiver-BntK801g.js} +154 -98
- package/dist/src/{otlpReceiver-CdNBdbsk.js → otlpReceiver-DmVulbhC.js} +154 -98
- package/dist/src/{providerRegistry-CD8MEar9.js → providerRegistry-Bvh8mv85.js} +2 -2
- package/dist/src/{providerRegistry-DM8rZYol.js → providerRegistry-CPQ_CmVO.js} +2 -2
- package/dist/src/{providerRegistry-Civky8Ar.cjs → providerRegistry-CQMdTmHP.cjs} +2 -2
- package/dist/src/{providerRegistry-B0RUOLI_.js → providerRegistry-CWoPjKFZ.js} +2 -2
- package/dist/src/{providers-CgKOSgTR.cjs → providers-1eKkXBKp.cjs} +1435 -930
- package/dist/src/{providers-BlqUifFg.js → providers-BV_KMZje.js} +1419 -944
- package/dist/src/providers-Bp4S-FvO.js +2 -0
- package/dist/src/providers-DV3ax9e_.cjs +3 -0
- package/dist/src/{providers-D8lF1sqW.js → providers-Domz_llv.js} +1427 -952
- package/dist/src/{providers-Dk_6ocUX.js → providers-DruaQfwu.js} +1424 -949
- package/dist/src/providers-iUt5fbAN.js +3 -0
- package/dist/src/providers-u9Enmfok.js +2 -0
- package/dist/src/python/persistent_wrapper.py +0 -5
- package/dist/src/{pythonUtils-D6fwaDSg.js → pythonUtils-C2UQ30Rz.js} +4 -4
- package/dist/src/{pythonUtils-D5nxkQ0P.js → pythonUtils-Cldx7huE.js} +4 -4
- package/dist/src/{pythonUtils-C3py6GC1.js → pythonUtils-CnndUbW-.js} +3 -3
- package/dist/src/{pythonUtils-CTU3Y3lw.cjs → pythonUtils-tAJvvpS-.cjs} +3 -3
- package/dist/src/{quiverai-CIaELU_m.js → quiverai-CtWi6x_g.js} +4 -4
- package/dist/src/{quiverai-PdShCPox.cjs → quiverai-DFotyafY.cjs} +4 -4
- package/dist/src/{quiverai-BbOUOn2L.js → quiverai-DR0SnIQV.js} +4 -4
- package/dist/src/{quiverai-uH-dcTIr.js → quiverai-aPPvXOgn.js} +4 -5
- package/dist/src/render-CH-62LbA.js +135 -0
- package/dist/src/render-CMEpfLaO.js +136 -0
- package/dist/src/{render-Drod8m7K.js → render-CgVDrJmM.js} +2 -3
- package/dist/src/render-DHIZ6_k8.js +135 -0
- package/dist/src/render-DfQSFxGE.cjs +165 -0
- package/dist/src/{responses-DIR9Ud3j.js → responses--OsX2aYW.js} +23 -14
- package/dist/src/{responses-D8SBTL64.cjs → responses-Bi9vBuW_.cjs} +24 -15
- package/dist/src/{responses-CB2jwoAr.js → responses-C-flexAY.js} +24 -15
- package/dist/src/{responses-WNGNYe3K.js → responses-DL9m8CyY.js} +24 -15
- package/dist/src/{rubyUtils-DhCAlxZr.cjs → rubyUtils-B6eljPuh.cjs} +3 -3
- package/dist/src/{rubyUtils-BcuGX77l.js → rubyUtils-CYSQEG4a.js} +3 -3
- package/dist/src/rubyUtils-D1L2d3jb.js +3 -0
- package/dist/src/rubyUtils-DUbq4tff.cjs +2 -0
- package/dist/src/{rubyUtils-BUVePouc.js → rubyUtils-DVLeA2jg.js} +3 -3
- package/dist/src/{rubyUtils-Boc4HZzX.js → rubyUtils-DsGrTx8R.js} +3 -3
- package/dist/src/{sagemaker-CNBxx5CJ.js → sagemaker-BVkaG2-l.js} +14 -18
- package/dist/src/{sagemaker-CemTFp2h.js → sagemaker-BveBvuxm.js} +14 -18
- package/dist/src/{sagemaker-YSyBXQQh.js → sagemaker-D67yzMzs.js} +14 -19
- package/dist/src/{sagemaker-Cl28mZU2.cjs → sagemaker-XnfhheQv.cjs} +14 -18
- package/dist/src/{scanner-BsBlNXNn.js → scanner-1DqWi1Ej.js} +130 -35
- package/dist/src/server/golang/wrapper.go +1 -1
- package/dist/src/server/index.js +3757 -1511
- package/dist/src/server/python/persistent_wrapper.py +0 -5
- package/dist/src/{server-CqzrVGpF.js → server-BNYztJkh.js} +128 -9
- package/dist/src/{server-CuxBbeSY.js → server-BSB45Nt9.js} +127 -8
- package/dist/src/{server-VWgWb00X.js → server-D6Il2Sob.js} +126 -7
- package/dist/src/server-DCtHUqlp.js +3 -0
- package/dist/src/server-DaA2eR26.cjs +2 -0
- package/dist/src/{server-C_7Ax-hA.cjs → server-Dx2TyCH2.cjs} +140 -6
- package/dist/src/{signal-4U3mfRvL.js → signal-CE5G3a7x.js} +3 -3
- package/dist/src/{slack-BmVAVGaK.cjs → slack-1Rhq0EoV.cjs} +2 -2
- package/dist/src/{slack-DCUPTzS2.js → slack-D5Wpy8LM.js} +2 -2
- package/dist/src/{slack-DXMKtA-f.js → slack-DDUe-5MC.js} +2 -2
- package/dist/src/{slack-DOdy_kyv.js → slack-acRb0IqQ.js} +2 -2
- package/dist/src/store-CWOSz6D_.cjs +2 -0
- package/dist/src/{store-Dim__MDd.js → store-CYEy5J2D.js} +17 -5
- package/dist/src/{store-DLlFCC4h.cjs → store-DAAyxcy6.cjs} +17 -5
- package/dist/src/store-DCDBhv7B.js +3 -0
- package/dist/src/{store-CXGFv4aR.js → store-Dn9HUkdW.js} +17 -5
- package/dist/src/{store-DXilxTl-.js → store-M0b1WfYb.js} +17 -5
- package/dist/src/{tables-gftXzE9I.js → tables-C4CH3zRr.js} +3 -3
- package/dist/src/{tables-DLJPUdUE.js → tables-CsWou1Bx.js} +3 -3
- package/dist/src/{tables-6YKwjN9-.js → tables-DQ4WU5tX.js} +3 -3
- package/dist/src/{tables-DPi7wKeM.cjs → tables-DUfh1F7Z.cjs} +3 -3
- package/dist/src/telemetry-C1IqxcdW.js +3 -0
- package/dist/src/telemetry-C4ZEa_es.cjs +2 -0
- package/dist/src/{telemetry-CMrFgtPB.js → telemetry-CQPez_Jp.js} +4 -4
- package/dist/src/{telemetry-DaX14Chu.cjs → telemetry-Dsw_faFj.cjs} +4 -4
- package/dist/src/{telemetry-Dthj_BbD.js → telemetry-Dvqxv3YC.js} +4 -4
- package/dist/src/{telemetry-Cps3mIU-.js → telemetry-dbaJ0E98.js} +4 -4
- package/dist/src/{text-CW1cyrwj.cjs → text-BVi-cLPJ.cjs} +1 -1
- package/dist/src/{text-B_UCRPp2.js → text-CZr46tp_.js} +1 -1
- package/dist/src/{text-TIv0QYnd.js → text-DHxdyQqT.js} +1 -1
- package/dist/src/{text-Db-Wt2u2.js → text-KvuD2Iko.js} +1 -1
- package/dist/src/{tokenUsageUtils-bVa1ga6f.cjs → tokenUsageUtils-Bb7DkZPz.cjs} +7 -3
- package/dist/src/{tokenUsageUtils-NYT-WKS6.js → tokenUsageUtils-C-bmyHoE.js} +7 -3
- package/dist/src/{tokenUsageUtils-DflFMjS0.js → tokenUsageUtils-CXrvO-wA.js} +7 -3
- package/dist/src/{transcription-NLVG9MT1.cjs → transcription-BvjmiYB1.cjs} +12 -16
- package/dist/src/{transcription-BNYURcXg.js → transcription-CJspiD2c.js} +11 -14
- package/dist/src/{transcription-B_OdaHp7.js → transcription-DuWDupG7.js} +10 -14
- package/dist/src/{transcription-s6A-bNrZ.js → transcription-V2HaAmy2.js} +10 -16
- package/dist/src/{transform-DECvGmzp.js → transform-Bbg6A8Jk.js} +4 -4
- package/dist/src/{transform-vNucnNr0.js → transform-CG0ehZNG.js} +11 -7
- package/dist/src/{transform-DuHvhZpj.cjs → transform-CTeuTR3S.cjs} +31 -9
- package/dist/src/{transform-CzK1Q0zl.cjs → transform-CUnzlsbn.cjs} +4 -4
- package/dist/src/{transform-aa6tmVpZ.js → transform-DYX1_Xnh.js} +5 -5
- package/dist/src/transform-DgKlRr73.cjs +2 -0
- package/dist/src/transform-M6ITAESf.js +3 -0
- package/dist/src/{transform-DilY9wbS.js → transform-UN5UGu8U.js} +5 -5
- package/dist/src/{transform-uAytVuyX.js → transform-lQrDE1BQ.js} +11 -7
- package/dist/src/{transform-D5HsjduX.js → transform-zDhMmzwX.js} +11 -7
- package/dist/src/{transformersAvailability-CEVM2GNQ.js → transformersAvailability-CcHusyhw.js} +1 -1
- package/dist/src/{transformersAvailability-CwayUSlh.cjs → transformersAvailability-Cju9mHgR.cjs} +1 -1
- package/dist/src/{transformersAvailability-D6c6ROpT.js → transformersAvailability-DLlROWhg.js} +1 -1
- package/dist/src/{types-DmyIJ-sR.js → types-BGQDAP8i.js} +357 -22
- package/dist/src/{types-CzW2QFyi.js → types-Bgh5SOn6.js} +358 -24
- package/dist/src/{types-C_7nyzr1.cjs → types-CeaeaZdP.cjs} +393 -22
- package/dist/src/{types-Cbd8uOMq.js → types-Dm9JM6Vb.js} +368 -23
- package/dist/src/{util-BHGHw5G1.js → util-BYvQUPp7.js} +138 -36
- package/dist/src/{util-B9vlHIIh.cjs → util-Bxn8emtE.cjs} +15 -168
- package/dist/src/{util-ZzmqNPlg.js → util-C8e5uydV.js} +19 -142
- package/dist/src/{util-CMy69ZgQ.js → util-C9J8ahRn.js} +18 -4
- package/dist/src/{util-BzMcevZc.cjs → util-CN3SrLT4.cjs} +18 -4
- package/dist/src/{util-BV4XUC0n.js → util-D3q0WQ-0.js} +18 -4
- package/dist/src/{util-Dnmk2mBQ.js → util-D9TisOyk.js} +18 -4
- package/dist/src/{util-B3xGByQh.js → util-DDs-7g6-.js} +138 -36
- package/dist/src/{util-Bv6uGDfH.js → util-DvU2Pw8c.js} +138 -36
- package/dist/src/{util-C1CeHl-P.js → util-DxWpWjhc.js} +13 -136
- package/dist/src/{util-BRYkYPTd.js → util-oGMLA7vc.js} +17 -140
- package/dist/src/{util-DGNOS1db.cjs → util-olYL5C6N.cjs} +143 -35
- package/dist/src/{utils-Cz9qXqII.cjs → utils-B05gLxER.cjs} +6 -4
- package/dist/src/{utils-f2-Moju7.js → utils-BLJKfv0y.js} +6 -4
- package/dist/src/{utils-dLokC-eR.js → utils-DJfvjyMj.js} +6 -4
- package/dist/src/{utils-XiOAgly5.js → utils-hXtCYanr.js} +6 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +66 -57
- package/dist/src/app/assets/index-4LKxG2CG.js +0 -439
- package/dist/src/app/assets/index-C3zcsZFQ.css +0 -1
- package/dist/src/app/assets/scroll-timeline-BdJZVXlz.js +0 -1
- package/dist/src/app/assets/sync-9qqYcY-B.js +0 -4
- package/dist/src/app/assets/vendor-charts-BnDWwBlI.js +0 -36
- package/dist/src/app/assets/vendor-markdown-0tekx3KX.js +0 -29
- package/dist/src/app/assets/vendor-react-AtKqiNEf.js +0 -4
- package/dist/src/app/assets/vendor-syntax-D06x6TQF.js +0 -2
- package/dist/src/app/assets/vendor-utils-BvMHZmO7.js +0 -37
- package/dist/src/app/tsconfig.app.tsbuildinfo +0 -1
- package/dist/src/cache-BVeDlD87.js +0 -726
- package/dist/src/cache-C4Nxf52C.js +0 -756
- package/dist/src/cache-CeUpFm3M.cjs +0 -5
- package/dist/src/cache-Dh5WtQps.cjs +0 -816
- package/dist/src/cache-i1P6crbO.js +0 -756
- package/dist/src/cache-n-RCJ-hL.js +0 -6
- package/dist/src/cloud-BBh91EUK.js +0 -4
- package/dist/src/codex-sdk-C6UMlxwV.js +0 -665
- package/dist/src/codex-sdk-DUwKWezN.js +0 -665
- package/dist/src/codex-sdk-GGAw0qbD.js +0 -666
- package/dist/src/codex-sdk-fAO0c3yA.cjs +0 -669
- package/dist/src/eval-B3r2CVXr.js +0 -15
- package/dist/src/evalResult-5xwYnECe.js +0 -12
- package/dist/src/evalResult-71lY93Kj.cjs +0 -10
- package/dist/src/evalResult-Dx5P5cIv.js +0 -10
- package/dist/src/evaluator-Jx6bRZV6.js +0 -36
- package/dist/src/fetch-BxNb_Lp3.js +0 -5
- package/dist/src/graders-B_pgMLS2.js +0 -34
- package/dist/src/graders-DErokPDO.cjs +0 -32
- package/dist/src/graders-DR_uNe54.js +0 -32
- package/dist/src/graders-w3176Wz-.js +0 -32
- package/dist/src/openclaw-CSugPYAr.cjs +0 -586
- package/dist/src/openclaw-DiSz3I5L.js +0 -582
- package/dist/src/openclaw-DuvJKEW5.js +0 -580
- package/dist/src/openclaw-tiVYRtr-.js +0 -580
- package/dist/src/providers-B7V0njNs.js +0 -32
- package/dist/src/providers-BEwbhv0X.js +0 -30
- package/dist/src/providers-CH3C7zf7.js +0 -30
- package/dist/src/providers-zyB6k_38.cjs +0 -31
- package/dist/src/rubyUtils-BUHu6PhO.js +0 -5
- package/dist/src/rubyUtils-CP42kMvq.cjs +0 -4
- package/dist/src/server-DA4Cyrrq.js +0 -7
- package/dist/src/server-Dulb-4-K.cjs +0 -5
- package/dist/src/store-CXS-Q_91.js +0 -6
- package/dist/src/store-eYkaKMwq.cjs +0 -5
- package/dist/src/telemetry-BpMfhthR.cjs +0 -5
- package/dist/src/telemetry-Dw38hanS.js +0 -7
- package/dist/src/tokenUsageUtils-BDGe-iyI.js +0 -138
- package/dist/src/transform-DTGDnAzW.js +0 -6
- package/dist/src/transform-m3qNw4KP.cjs +0 -5
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { r as importModule } from "./esm-
|
|
3
|
-
import "./
|
|
4
|
-
import "./cache-C4Nxf52C.js";
|
|
5
|
-
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./cometapi-CUQq3H_a.js";
|
|
1
|
+
import { T as getEnvString, a as logger, k as state, t as getLogLevel } from "./logger-B88EkIn6.js";
|
|
2
|
+
import { r as importModule } from "./esm-Dh4dOLlt.js";
|
|
3
|
+
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-qFlm6zes.js";
|
|
6
4
|
import { createRequire } from "node:module";
|
|
7
5
|
import fs from "fs";
|
|
8
6
|
import path from "path";
|
|
@@ -49,8 +47,8 @@ function resolveEsmPackage(packageName, exportPath, basePath) {
|
|
|
49
47
|
return path.join(packageDir, esmEntry);
|
|
50
48
|
}
|
|
51
49
|
function unwrapOpenCodeResult(result) {
|
|
52
|
-
if (
|
|
53
|
-
if (typeof result === "object" &&
|
|
50
|
+
if (result === void 0 || result === null) return;
|
|
51
|
+
if (typeof result === "object" && "data" in result) return result.data;
|
|
54
52
|
return result;
|
|
55
53
|
}
|
|
56
54
|
function getSessionPath(sessionId) {
|
|
@@ -287,10 +285,10 @@ var OpenCodeSDKProvider = class {
|
|
|
287
285
|
warnOnIgnoredBaseUrlConfig(config) {
|
|
288
286
|
if (!config.baseUrl) return;
|
|
289
287
|
const ignoredSettings = [
|
|
290
|
-
config.hostname
|
|
291
|
-
config.port
|
|
292
|
-
config.timeout
|
|
293
|
-
config.log_level
|
|
288
|
+
config.hostname === void 0 ? void 0 : "hostname",
|
|
289
|
+
config.port === void 0 ? void 0 : "port",
|
|
290
|
+
config.timeout === void 0 ? void 0 : "timeout",
|
|
291
|
+
config.log_level === void 0 ? void 0 : "log_level",
|
|
294
292
|
config.mcp ? "mcp" : void 0,
|
|
295
293
|
config.custom_agent ? "custom_agent" : void 0,
|
|
296
294
|
config.apiKey ? "apiKey" : void 0
|
|
@@ -464,8 +462,8 @@ var OpenCodeSDKProvider = class {
|
|
|
464
462
|
const parts = responseData?.parts ?? [];
|
|
465
463
|
let output = "";
|
|
466
464
|
for (const part of parts) if (part.type === "text" && part.text) output += (output ? "\n" : "") + part.text;
|
|
467
|
-
if (config.format?.type === "json_schema") if (assistantMessage?.structured
|
|
468
|
-
else output =
|
|
465
|
+
if (config.format?.type === "json_schema") if (assistantMessage?.structured === void 0) output = normalizeStructuredText(output) ?? output;
|
|
466
|
+
else output = JSON.stringify(assistantMessage.structured);
|
|
469
467
|
const tokens = assistantMessage?.tokens;
|
|
470
468
|
return {
|
|
471
469
|
output,
|
|
@@ -557,4 +555,4 @@ var OpenCodeSDKProvider = class {
|
|
|
557
555
|
//#endregion
|
|
558
556
|
export { OpenCodeSDKProvider };
|
|
559
557
|
|
|
560
|
-
//# sourceMappingURL=opencode-sdk-
|
|
558
|
+
//# sourceMappingURL=opencode-sdk-BUu5Nevv.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
const require_logger = require("./logger-
|
|
2
|
-
const require_esm = require("./esm-
|
|
3
|
-
require("./
|
|
4
|
-
require("./cache-Dh5WtQps.cjs");
|
|
5
|
-
const require_cometapi = require("./cometapi-C4xSqeID.cjs");
|
|
1
|
+
const require_logger = require("./logger-COuQb2xB.cjs");
|
|
2
|
+
const require_esm = require("./esm-CtEPLdAj.cjs");
|
|
3
|
+
const require_agentic_utils = require("./agentic-utils-BpX5b23w.cjs");
|
|
6
4
|
let fs = require("fs");
|
|
7
5
|
fs = require_logger.__toESM(fs);
|
|
8
6
|
let path = require("path");
|
|
@@ -53,8 +51,8 @@ function resolveEsmPackage(packageName, exportPath, basePath) {
|
|
|
53
51
|
return path.default.join(packageDir, esmEntry);
|
|
54
52
|
}
|
|
55
53
|
function unwrapOpenCodeResult(result) {
|
|
56
|
-
if (
|
|
57
|
-
if (typeof result === "object" &&
|
|
54
|
+
if (result === void 0 || result === null) return;
|
|
55
|
+
if (typeof result === "object" && "data" in result) return result.data;
|
|
58
56
|
return result;
|
|
59
57
|
}
|
|
60
58
|
function getSessionPath(sessionId) {
|
|
@@ -218,7 +216,7 @@ var OpenCodeSDKProvider = class {
|
|
|
218
216
|
return Object.keys(query).length > 0 ? query : void 0;
|
|
219
217
|
}
|
|
220
218
|
buildSessionKey(config, workingDir) {
|
|
221
|
-
return
|
|
219
|
+
return require_agentic_utils.generateCacheKey("opencode:sdk:session", {
|
|
222
220
|
baseUrl: config.baseUrl,
|
|
223
221
|
workingDir: config.working_dir ? workingDir : void 0,
|
|
224
222
|
workspace: config.workspace,
|
|
@@ -291,10 +289,10 @@ var OpenCodeSDKProvider = class {
|
|
|
291
289
|
warnOnIgnoredBaseUrlConfig(config) {
|
|
292
290
|
if (!config.baseUrl) return;
|
|
293
291
|
const ignoredSettings = [
|
|
294
|
-
config.hostname
|
|
295
|
-
config.port
|
|
296
|
-
config.timeout
|
|
297
|
-
config.log_level
|
|
292
|
+
config.hostname === void 0 ? void 0 : "hostname",
|
|
293
|
+
config.port === void 0 ? void 0 : "port",
|
|
294
|
+
config.timeout === void 0 ? void 0 : "timeout",
|
|
295
|
+
config.log_level === void 0 ? void 0 : "log_level",
|
|
298
296
|
config.mcp ? "mcp" : void 0,
|
|
299
297
|
config.custom_agent ? "custom_agent" : void 0,
|
|
300
298
|
config.apiKey ? "apiKey" : void 0
|
|
@@ -468,8 +466,8 @@ var OpenCodeSDKProvider = class {
|
|
|
468
466
|
const parts = responseData?.parts ?? [];
|
|
469
467
|
let output = "";
|
|
470
468
|
for (const part of parts) if (part.type === "text" && part.text) output += (output ? "\n" : "") + part.text;
|
|
471
|
-
if (config.format?.type === "json_schema") if (assistantMessage?.structured
|
|
472
|
-
else output =
|
|
469
|
+
if (config.format?.type === "json_schema") if (assistantMessage?.structured === void 0) output = normalizeStructuredText(output) ?? output;
|
|
470
|
+
else output = JSON.stringify(assistantMessage.structured);
|
|
473
471
|
const tokens = assistantMessage?.tokens;
|
|
474
472
|
return {
|
|
475
473
|
output,
|
|
@@ -507,7 +505,7 @@ var OpenCodeSDKProvider = class {
|
|
|
507
505
|
async callApi(prompt, context, callOptions) {
|
|
508
506
|
const { config, isTempDir, workingDir } = this.prepareCall(context);
|
|
509
507
|
const mcpConfig = config.mcp && Object.keys(config.mcp).length > 0 ? config.mcp : void 0;
|
|
510
|
-
const cacheResult = await
|
|
508
|
+
const cacheResult = await require_agentic_utils.initializeAgenticCache({
|
|
511
509
|
cacheKeyPrefix: "opencode:sdk",
|
|
512
510
|
workingDir: config.working_dir ? workingDir : void 0,
|
|
513
511
|
bustCache: context?.bustCache,
|
|
@@ -525,7 +523,7 @@ var OpenCodeSDKProvider = class {
|
|
|
525
523
|
format: config.format,
|
|
526
524
|
variant: config.variant
|
|
527
525
|
});
|
|
528
|
-
const cachedResponse = await
|
|
526
|
+
const cachedResponse = await require_agentic_utils.getCachedResponse(cacheResult, "OpenCode SDK");
|
|
529
527
|
if (cachedResponse) return cachedResponse;
|
|
530
528
|
if (callOptions?.abortSignal?.aborted) return { error: "OpenCode SDK call aborted before it started" };
|
|
531
529
|
let ephemeralSession;
|
|
@@ -540,7 +538,7 @@ var OpenCodeSDKProvider = class {
|
|
|
540
538
|
const response = await client.session.prompt(promptOptions);
|
|
541
539
|
require_logger.logger.debug(`OpenCode SDK response received`);
|
|
542
540
|
const providerResponse = this.buildProviderResponse(config, response, session.sessionId);
|
|
543
|
-
await
|
|
541
|
+
await require_agentic_utils.cacheResponse(cacheResult, providerResponse, "OpenCode SDK");
|
|
544
542
|
require_logger.logger.debug(`OpenCode SDK response: ${providerResponse.output.slice(0, 100)}...`);
|
|
545
543
|
return providerResponse;
|
|
546
544
|
} catch (error) {
|
|
@@ -561,4 +559,4 @@ var OpenCodeSDKProvider = class {
|
|
|
561
559
|
//#endregion
|
|
562
560
|
exports.OpenCodeSDKProvider = OpenCodeSDKProvider;
|
|
563
561
|
|
|
564
|
-
//# sourceMappingURL=opencode-sdk-
|
|
562
|
+
//# sourceMappingURL=opencode-sdk-BZ2idgYA.cjs.map
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {
|
|
3
|
-
import "./
|
|
4
|
-
import "./
|
|
5
|
-
import "./cache-BVeDlD87.js";
|
|
6
|
-
import { r as importModule } from "./esm-C03C-mv3.js";
|
|
7
|
-
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-DS1g3GLF.js";
|
|
2
|
+
import { N as state, O as getEnvString, n as getLogLevel, s as logger } from "./logger-DksKw1Qc.js";
|
|
3
|
+
import { r as importModule } from "./esm-tVgYPY-f.js";
|
|
4
|
+
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-w68v6_Dz.js";
|
|
8
5
|
import { createRequire } from "node:module";
|
|
9
6
|
import fs from "fs";
|
|
10
7
|
import path from "path";
|
|
@@ -51,8 +48,8 @@ function resolveEsmPackage(packageName, exportPath, basePath) {
|
|
|
51
48
|
return path.join(packageDir, esmEntry);
|
|
52
49
|
}
|
|
53
50
|
function unwrapOpenCodeResult(result) {
|
|
54
|
-
if (
|
|
55
|
-
if (typeof result === "object" &&
|
|
51
|
+
if (result === void 0 || result === null) return;
|
|
52
|
+
if (typeof result === "object" && "data" in result) return result.data;
|
|
56
53
|
return result;
|
|
57
54
|
}
|
|
58
55
|
function getSessionPath(sessionId) {
|
|
@@ -289,10 +286,10 @@ var OpenCodeSDKProvider = class {
|
|
|
289
286
|
warnOnIgnoredBaseUrlConfig(config) {
|
|
290
287
|
if (!config.baseUrl) return;
|
|
291
288
|
const ignoredSettings = [
|
|
292
|
-
config.hostname
|
|
293
|
-
config.port
|
|
294
|
-
config.timeout
|
|
295
|
-
config.log_level
|
|
289
|
+
config.hostname === void 0 ? void 0 : "hostname",
|
|
290
|
+
config.port === void 0 ? void 0 : "port",
|
|
291
|
+
config.timeout === void 0 ? void 0 : "timeout",
|
|
292
|
+
config.log_level === void 0 ? void 0 : "log_level",
|
|
296
293
|
config.mcp ? "mcp" : void 0,
|
|
297
294
|
config.custom_agent ? "custom_agent" : void 0,
|
|
298
295
|
config.apiKey ? "apiKey" : void 0
|
|
@@ -466,8 +463,8 @@ var OpenCodeSDKProvider = class {
|
|
|
466
463
|
const parts = responseData?.parts ?? [];
|
|
467
464
|
let output = "";
|
|
468
465
|
for (const part of parts) if (part.type === "text" && part.text) output += (output ? "\n" : "") + part.text;
|
|
469
|
-
if (config.format?.type === "json_schema") if (assistantMessage?.structured
|
|
470
|
-
else output =
|
|
466
|
+
if (config.format?.type === "json_schema") if (assistantMessage?.structured === void 0) output = normalizeStructuredText(output) ?? output;
|
|
467
|
+
else output = JSON.stringify(assistantMessage.structured);
|
|
471
468
|
const tokens = assistantMessage?.tokens;
|
|
472
469
|
return {
|
|
473
470
|
output,
|
|
@@ -559,4 +556,4 @@ var OpenCodeSDKProvider = class {
|
|
|
559
556
|
//#endregion
|
|
560
557
|
export { OpenCodeSDKProvider };
|
|
561
558
|
|
|
562
|
-
//# sourceMappingURL=opencode-sdk-
|
|
559
|
+
//# sourceMappingURL=opencode-sdk-BxD8vXp_.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import { r as
|
|
4
|
-
import "./cache-i1P6crbO.js";
|
|
5
|
-
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./cloudflare-gateway-CKDb4dJ8.js";
|
|
1
|
+
import { T as getEnvString, a as logger, k as state, t as getLogLevel } from "./logger-Ct2S6Yx-.js";
|
|
2
|
+
import { r as importModule } from "./esm-C7PnfdF8.js";
|
|
3
|
+
import { i as initializeAgenticCache, n as generateCacheKey, r as getCachedResponse, t as cacheResponse } from "./agentic-utils-P172hM8B.js";
|
|
6
4
|
import { createRequire } from "node:module";
|
|
7
5
|
import fs from "fs";
|
|
8
6
|
import path from "path";
|
|
@@ -49,8 +47,8 @@ function resolveEsmPackage(packageName, exportPath, basePath) {
|
|
|
49
47
|
return path.join(packageDir, esmEntry);
|
|
50
48
|
}
|
|
51
49
|
function unwrapOpenCodeResult(result) {
|
|
52
|
-
if (
|
|
53
|
-
if (typeof result === "object" &&
|
|
50
|
+
if (result === void 0 || result === null) return;
|
|
51
|
+
if (typeof result === "object" && "data" in result) return result.data;
|
|
54
52
|
return result;
|
|
55
53
|
}
|
|
56
54
|
function getSessionPath(sessionId) {
|
|
@@ -287,10 +285,10 @@ var OpenCodeSDKProvider = class {
|
|
|
287
285
|
warnOnIgnoredBaseUrlConfig(config) {
|
|
288
286
|
if (!config.baseUrl) return;
|
|
289
287
|
const ignoredSettings = [
|
|
290
|
-
config.hostname
|
|
291
|
-
config.port
|
|
292
|
-
config.timeout
|
|
293
|
-
config.log_level
|
|
288
|
+
config.hostname === void 0 ? void 0 : "hostname",
|
|
289
|
+
config.port === void 0 ? void 0 : "port",
|
|
290
|
+
config.timeout === void 0 ? void 0 : "timeout",
|
|
291
|
+
config.log_level === void 0 ? void 0 : "log_level",
|
|
294
292
|
config.mcp ? "mcp" : void 0,
|
|
295
293
|
config.custom_agent ? "custom_agent" : void 0,
|
|
296
294
|
config.apiKey ? "apiKey" : void 0
|
|
@@ -464,8 +462,8 @@ var OpenCodeSDKProvider = class {
|
|
|
464
462
|
const parts = responseData?.parts ?? [];
|
|
465
463
|
let output = "";
|
|
466
464
|
for (const part of parts) if (part.type === "text" && part.text) output += (output ? "\n" : "") + part.text;
|
|
467
|
-
if (config.format?.type === "json_schema") if (assistantMessage?.structured
|
|
468
|
-
else output =
|
|
465
|
+
if (config.format?.type === "json_schema") if (assistantMessage?.structured === void 0) output = normalizeStructuredText(output) ?? output;
|
|
466
|
+
else output = JSON.stringify(assistantMessage.structured);
|
|
469
467
|
const tokens = assistantMessage?.tokens;
|
|
470
468
|
return {
|
|
471
469
|
output,
|
|
@@ -557,4 +555,4 @@ var OpenCodeSDKProvider = class {
|
|
|
557
555
|
//#endregion
|
|
558
556
|
export { OpenCodeSDKProvider };
|
|
559
557
|
|
|
560
|
-
//# sourceMappingURL=opencode-sdk-
|
|
558
|
+
//# sourceMappingURL=opencode-sdk-GI2KaAXq.js.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./
|
|
3
|
-
import { t as
|
|
4
|
-
import "./types-CzW2QFyi.js";
|
|
5
|
-
import { t as getTraceStore } from "./store-CXGFv4aR.js";
|
|
1
|
+
import { a as logger } from "./logger-Ct2S6Yx-.js";
|
|
2
|
+
import { t as getDirectory } from "./esm-C7PnfdF8.js";
|
|
3
|
+
import { t as getTraceStore } from "./store-M0b1WfYb.js";
|
|
6
4
|
import path from "path";
|
|
7
5
|
import express from "express";
|
|
8
6
|
import protobuf from "protobufjs";
|
|
@@ -92,28 +90,57 @@ const SPAN_KIND_MAP = {
|
|
|
92
90
|
4: "producer",
|
|
93
91
|
5: "consumer"
|
|
94
92
|
};
|
|
93
|
+
const DEFAULT_ACCEPT_FORMATS = ["json", "protobuf"];
|
|
94
|
+
const OTLP_CONTENT_TYPES = {
|
|
95
|
+
json: "application/json",
|
|
96
|
+
protobuf: "application/x-protobuf"
|
|
97
|
+
};
|
|
98
|
+
function normalizeAcceptFormats(acceptFormats) {
|
|
99
|
+
const normalized = [...new Set(acceptFormats ?? DEFAULT_ACCEPT_FORMATS)];
|
|
100
|
+
return normalized.length > 0 ? normalized : [...DEFAULT_ACCEPT_FORMATS];
|
|
101
|
+
}
|
|
102
|
+
function getRequestFormat(contentType) {
|
|
103
|
+
const mimeType = (Array.isArray(contentType) ? contentType[0] : contentType)?.split(";", 1)[0]?.trim().toLowerCase();
|
|
104
|
+
if (mimeType === OTLP_CONTENT_TYPES.json) return "json";
|
|
105
|
+
if (mimeType === OTLP_CONTENT_TYPES.protobuf) return "protobuf";
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
95
108
|
var OTLPReceiver = class {
|
|
96
109
|
app;
|
|
110
|
+
acceptFormats;
|
|
97
111
|
traceStore;
|
|
98
112
|
port;
|
|
99
113
|
server;
|
|
100
|
-
constructor() {
|
|
114
|
+
constructor(options = {}) {
|
|
101
115
|
this.app = express();
|
|
116
|
+
this.acceptFormats = normalizeAcceptFormats(options.acceptFormats);
|
|
102
117
|
this.traceStore = getTraceStore();
|
|
103
118
|
logger.debug("[OtlpReceiver] Initializing OTLP receiver");
|
|
104
119
|
this.setupMiddleware();
|
|
105
120
|
this.setupRoutes();
|
|
106
121
|
}
|
|
107
122
|
setupMiddleware() {
|
|
108
|
-
this.app.use(
|
|
123
|
+
this.app.use("/v1/traces", (req, res, next) => {
|
|
124
|
+
if (req.method !== "POST") {
|
|
125
|
+
next();
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const format = getRequestFormat(req.headers["content-type"]);
|
|
129
|
+
if (!format || !this.acceptFormats.includes(format)) {
|
|
130
|
+
res.status(415).json({ error: "Unsupported content type" });
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
next();
|
|
134
|
+
});
|
|
135
|
+
this.app.use("/v1/traces", express.json({
|
|
109
136
|
limit: "10mb",
|
|
110
|
-
type: "
|
|
137
|
+
type: (req) => this.acceptFormats.includes("json") && getRequestFormat(req.headers["content-type"]) === "json"
|
|
111
138
|
}));
|
|
112
|
-
this.app.use(express.raw({
|
|
113
|
-
|
|
114
|
-
|
|
139
|
+
this.app.use("/v1/traces", express.raw({
|
|
140
|
+
limit: "10mb",
|
|
141
|
+
type: (req) => this.acceptFormats.includes("protobuf") && getRequestFormat(req.headers["content-type"]) === "protobuf"
|
|
115
142
|
}));
|
|
116
|
-
logger.debug("[OtlpReceiver] Middleware configured for
|
|
143
|
+
logger.debug("[OtlpReceiver] Middleware configured for accepted OTLP formats");
|
|
117
144
|
}
|
|
118
145
|
setupRoutes() {
|
|
119
146
|
this.app.post("/v1/traces", async (req, res) => {
|
|
@@ -121,64 +148,19 @@ var OTLPReceiver = class {
|
|
|
121
148
|
const bodySize = req.body ? JSON.stringify(req.body).length : 0;
|
|
122
149
|
logger.debug(`[OtlpReceiver] Received trace request: ${req.headers["content-type"]} with ${bodySize} bytes`);
|
|
123
150
|
logger.debug("[OtlpReceiver] Starting to process traces");
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
if (!isJson && !isProtobuf) {
|
|
151
|
+
const format = getRequestFormat(contentType);
|
|
152
|
+
if (!format || !this.acceptFormats.includes(format)) {
|
|
127
153
|
res.status(415).json({ error: "Unsupported content type" });
|
|
128
154
|
return;
|
|
129
155
|
}
|
|
130
156
|
try {
|
|
131
|
-
|
|
132
|
-
if (isJson) {
|
|
133
|
-
logger.debug("[OtlpReceiver] Parsing OTLP JSON request");
|
|
134
|
-
logger.debug(`[OtlpReceiver] Request body: ${JSON.stringify(req.body).substring(0, 500)}...`);
|
|
135
|
-
traces = this.parseOTLPJSONRequest(req.body);
|
|
136
|
-
} else if (isProtobuf) {
|
|
137
|
-
logger.debug("[OtlpReceiver] Parsing OTLP protobuf request");
|
|
138
|
-
logger.debug(`[OtlpReceiver] Request body size: ${req.body?.length || 0} bytes`);
|
|
139
|
-
traces = await this.parseOTLPProtobufRequest(req.body);
|
|
140
|
-
}
|
|
157
|
+
const traces = await this.parseIncomingRequest(format, req.body);
|
|
141
158
|
logger.debug(`[OtlpReceiver] Parsed ${traces.length} traces from request`);
|
|
142
|
-
|
|
143
|
-
const traceInfoById = /* @__PURE__ */ new Map();
|
|
144
|
-
for (const trace of traces) {
|
|
145
|
-
if (!spansByTrace.has(trace.traceId)) {
|
|
146
|
-
spansByTrace.set(trace.traceId, []);
|
|
147
|
-
const evaluationId = trace.span.attributes?.["evaluation.id"];
|
|
148
|
-
const testCaseId = trace.span.attributes?.["test.case.id"];
|
|
149
|
-
const info = traceInfoById.get(trace.traceId) ?? {};
|
|
150
|
-
if (evaluationId) info.evaluationId = evaluationId;
|
|
151
|
-
if (testCaseId) info.testCaseId = testCaseId;
|
|
152
|
-
traceInfoById.set(trace.traceId, info);
|
|
153
|
-
}
|
|
154
|
-
spansByTrace.get(trace.traceId).push(trace.span);
|
|
155
|
-
}
|
|
156
|
-
logger.debug(`[OtlpReceiver] Grouped spans into ${spansByTrace.size} traces`);
|
|
157
|
-
for (const [traceId, info] of traceInfoById) try {
|
|
158
|
-
logger.debug(`[OtlpReceiver] Creating trace record for ${traceId}`);
|
|
159
|
-
await this.traceStore.createTrace({
|
|
160
|
-
traceId,
|
|
161
|
-
evaluationId: info.evaluationId || "",
|
|
162
|
-
testCaseId: info.testCaseId || ""
|
|
163
|
-
});
|
|
164
|
-
} catch (error) {
|
|
165
|
-
logger.debug(`[OtlpReceiver] Trace ${traceId} may already exist: ${error}`);
|
|
166
|
-
}
|
|
167
|
-
for (const [traceId, spans] of spansByTrace) {
|
|
168
|
-
logger.debug(`[OtlpReceiver] Storing ${spans.length} spans for trace ${traceId}`);
|
|
169
|
-
await this.traceStore.addSpans(traceId, spans, { skipTraceCheck: true });
|
|
170
|
-
}
|
|
159
|
+
await this.persistTraces(this.groupTraces(traces));
|
|
171
160
|
res.status(200).json({ partialSuccess: {} });
|
|
172
161
|
logger.debug("[OtlpReceiver] Successfully processed traces");
|
|
173
162
|
} catch (error) {
|
|
174
|
-
|
|
175
|
-
logger.error(`[OtlpReceiver] Error stack: ${error instanceof Error ? error.stack : "No stack"}`);
|
|
176
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
177
|
-
if (errorMessage.toLowerCase().includes("invalid protobuf")) {
|
|
178
|
-
res.status(400).json({ error: errorMessage });
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
res.status(500).json({ error: "Internal server error" });
|
|
163
|
+
this.handleProcessingError(error, res);
|
|
182
164
|
}
|
|
183
165
|
});
|
|
184
166
|
this.app.get("/health", (_req, res) => {
|
|
@@ -189,7 +171,7 @@ var OTLPReceiver = class {
|
|
|
189
171
|
res.status(200).json({
|
|
190
172
|
service: "promptfoo-otlp-receiver",
|
|
191
173
|
version: "1.0.0",
|
|
192
|
-
supported_formats:
|
|
174
|
+
supported_formats: this.acceptFormats
|
|
193
175
|
});
|
|
194
176
|
});
|
|
195
177
|
this.app.get("/debug/status", async (_req, res) => {
|
|
@@ -210,6 +192,71 @@ var OTLPReceiver = class {
|
|
|
210
192
|
res.status(500).json({ error: "Internal server error" });
|
|
211
193
|
});
|
|
212
194
|
}
|
|
195
|
+
async parseIncomingRequest(format, body) {
|
|
196
|
+
if (format === "json") {
|
|
197
|
+
logger.debug("[OtlpReceiver] Parsing OTLP JSON request");
|
|
198
|
+
logger.debug(`[OtlpReceiver] Request body: ${JSON.stringify(body).substring(0, 500)}...`);
|
|
199
|
+
return this.parseOTLPJSONRequest(body);
|
|
200
|
+
}
|
|
201
|
+
logger.debug("[OtlpReceiver] Parsing OTLP protobuf request");
|
|
202
|
+
logger.debug(`[OtlpReceiver] Request body size: ${body?.length || 0} bytes`);
|
|
203
|
+
return this.parseOTLPProtobufRequest(body);
|
|
204
|
+
}
|
|
205
|
+
groupTraces(traces) {
|
|
206
|
+
const spansByTrace = /* @__PURE__ */ new Map();
|
|
207
|
+
const traceInfoById = /* @__PURE__ */ new Map();
|
|
208
|
+
for (const trace of traces) {
|
|
209
|
+
const spans = spansByTrace.get(trace.traceId) ?? [];
|
|
210
|
+
spans.push(trace.span);
|
|
211
|
+
spansByTrace.set(trace.traceId, spans);
|
|
212
|
+
this.recordTraceInfo(traceInfoById, trace);
|
|
213
|
+
}
|
|
214
|
+
logger.debug(`[OtlpReceiver] Grouped spans into ${spansByTrace.size} traces`);
|
|
215
|
+
return {
|
|
216
|
+
spansByTrace,
|
|
217
|
+
traceInfoById
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
recordTraceInfo(traceInfoById, trace) {
|
|
221
|
+
const evaluationId = trace.span.attributes?.["evaluation.id"];
|
|
222
|
+
const testCaseId = trace.span.attributes?.["test.case.id"];
|
|
223
|
+
const info = traceInfoById.get(trace.traceId) ?? {};
|
|
224
|
+
if (evaluationId) info.evaluationId = evaluationId;
|
|
225
|
+
if (testCaseId) info.testCaseId = testCaseId;
|
|
226
|
+
traceInfoById.set(trace.traceId, info);
|
|
227
|
+
}
|
|
228
|
+
async persistTraces({ spansByTrace, traceInfoById }) {
|
|
229
|
+
await this.createTraceRecords(traceInfoById);
|
|
230
|
+
await this.storeSpans(spansByTrace);
|
|
231
|
+
}
|
|
232
|
+
async createTraceRecords(traceInfoById) {
|
|
233
|
+
for (const [traceId, info] of traceInfoById) try {
|
|
234
|
+
logger.debug(`[OtlpReceiver] Creating trace record for ${traceId}`);
|
|
235
|
+
await this.traceStore.createTrace({
|
|
236
|
+
traceId,
|
|
237
|
+
evaluationId: info.evaluationId || "",
|
|
238
|
+
testCaseId: info.testCaseId || ""
|
|
239
|
+
});
|
|
240
|
+
} catch (error) {
|
|
241
|
+
logger.debug(`[OtlpReceiver] Trace ${traceId} may already exist: ${error}`);
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
async storeSpans(spansByTrace) {
|
|
245
|
+
for (const [traceId, spans] of spansByTrace) {
|
|
246
|
+
logger.debug(`[OtlpReceiver] Storing ${spans.length} spans for trace ${traceId}`);
|
|
247
|
+
await this.traceStore.addSpans(traceId, spans, { skipTraceCheck: true });
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
handleProcessingError(error, res) {
|
|
251
|
+
logger.error(`[OtlpReceiver] Failed to process OTLP traces: ${error}`);
|
|
252
|
+
logger.error(`[OtlpReceiver] Error stack: ${error instanceof Error ? error.stack : "No stack"}`);
|
|
253
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
254
|
+
if (errorMessage.toLowerCase().includes("invalid protobuf")) {
|
|
255
|
+
res.status(400).json({ error: errorMessage });
|
|
256
|
+
return;
|
|
257
|
+
}
|
|
258
|
+
res.status(500).json({ error: "Internal server error" });
|
|
259
|
+
}
|
|
213
260
|
parseOTLPJSONRequest(body) {
|
|
214
261
|
const traces = [];
|
|
215
262
|
logger.debug(`[OtlpReceiver] Parsing request with ${body.resourceSpans?.length || 0} resource spans`);
|
|
@@ -248,44 +295,42 @@ var OTLPReceiver = class {
|
|
|
248
295
|
return traces;
|
|
249
296
|
}
|
|
250
297
|
async parseOTLPProtobufRequest(body) {
|
|
251
|
-
const traces = [];
|
|
252
298
|
const decoded = await decodeExportTraceServiceRequest(body);
|
|
253
299
|
logger.debug(`[OtlpReceiver] Parsing protobuf request with ${decoded.resourceSpans?.length || 0} resource spans`);
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
300
|
+
return (decoded.resourceSpans || []).flatMap((resourceSpan) => this.parseDecodedResourceSpan(resourceSpan));
|
|
301
|
+
}
|
|
302
|
+
parseDecodedResourceSpan(resourceSpan) {
|
|
303
|
+
const resourceAttributes = this.parseDecodedAttributes(resourceSpan.resource?.attributes);
|
|
304
|
+
logger.debug(`[OtlpReceiver] Parsed ${Object.keys(resourceAttributes).length} resource attributes from protobuf`);
|
|
305
|
+
return (resourceSpan.scopeSpans || []).flatMap((scopeSpan) => (scopeSpan.spans || []).map((span) => this.createDecodedParsedTrace(resourceAttributes, scopeSpan, span)));
|
|
306
|
+
}
|
|
307
|
+
createDecodedParsedTrace(resourceAttributes, scopeSpan, span) {
|
|
308
|
+
const traceId = bytesToHex(span.traceId, 32);
|
|
309
|
+
const spanId = bytesToHex(span.spanId, 16);
|
|
310
|
+
const parentSpanId = span.parentSpanId?.length ? bytesToHex(span.parentSpanId, 16) : void 0;
|
|
311
|
+
logger.debug(`[OtlpReceiver] Processing protobuf span: ${span.name} (${spanId}) in trace ${traceId}`);
|
|
312
|
+
const spanKindCode = span.kind ?? 0;
|
|
313
|
+
const spanKindName = SPAN_KIND_MAP[spanKindCode] ?? "unspecified";
|
|
314
|
+
return {
|
|
315
|
+
traceId,
|
|
316
|
+
span: {
|
|
317
|
+
spanId,
|
|
318
|
+
parentSpanId,
|
|
319
|
+
name: span.name,
|
|
320
|
+
startTime: this.toMilliseconds(span.startTimeUnixNano) ?? 0,
|
|
321
|
+
endTime: this.toMilliseconds(span.endTimeUnixNano),
|
|
322
|
+
attributes: {
|
|
264
323
|
...resourceAttributes,
|
|
265
324
|
...this.parseDecodedAttributes(span.attributes),
|
|
266
325
|
"otel.scope.name": scopeSpan.scope?.name,
|
|
267
326
|
"otel.scope.version": scopeSpan.scope?.version,
|
|
268
327
|
"otel.span.kind": spanKindName,
|
|
269
|
-
"otel.span.kind_code":
|
|
270
|
-
}
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
traces.push({
|
|
274
|
-
traceId,
|
|
275
|
-
span: {
|
|
276
|
-
spanId,
|
|
277
|
-
parentSpanId,
|
|
278
|
-
name: span.name,
|
|
279
|
-
startTime: startTimeNano / 1e6,
|
|
280
|
-
endTime: endTimeNano ? endTimeNano / 1e6 : void 0,
|
|
281
|
-
attributes,
|
|
282
|
-
statusCode: span.status?.code,
|
|
283
|
-
statusMessage: span.status?.message
|
|
284
|
-
}
|
|
285
|
-
});
|
|
328
|
+
"otel.span.kind_code": spanKindCode
|
|
329
|
+
},
|
|
330
|
+
statusCode: span.status?.code,
|
|
331
|
+
statusMessage: span.status?.message
|
|
286
332
|
}
|
|
287
|
-
}
|
|
288
|
-
return traces;
|
|
333
|
+
};
|
|
289
334
|
}
|
|
290
335
|
parseDecodedAttributes(attributes) {
|
|
291
336
|
if (!attributes) return {};
|
|
@@ -386,15 +431,26 @@ var OTLPReceiver = class {
|
|
|
386
431
|
getApp() {
|
|
387
432
|
return this.app;
|
|
388
433
|
}
|
|
434
|
+
setAcceptFormats(acceptFormats) {
|
|
435
|
+
this.acceptFormats = normalizeAcceptFormats(acceptFormats);
|
|
436
|
+
}
|
|
437
|
+
toMilliseconds(value) {
|
|
438
|
+
if (value === void 0) return;
|
|
439
|
+
return Number(value) / 1e6;
|
|
440
|
+
}
|
|
389
441
|
};
|
|
390
442
|
let otlpReceiver = null;
|
|
391
|
-
function getOTLPReceiver() {
|
|
392
|
-
if (
|
|
443
|
+
function getOTLPReceiver(options) {
|
|
444
|
+
if (otlpReceiver) {
|
|
445
|
+
otlpReceiver.setAcceptFormats(options?.acceptFormats);
|
|
446
|
+
return otlpReceiver;
|
|
447
|
+
}
|
|
448
|
+
otlpReceiver = new OTLPReceiver(options);
|
|
393
449
|
return otlpReceiver;
|
|
394
450
|
}
|
|
395
|
-
async function startOTLPReceiver(port, host) {
|
|
451
|
+
async function startOTLPReceiver(port, host, acceptFormats) {
|
|
396
452
|
logger.debug("[OtlpReceiver] Starting receiver through startOTLPReceiver function");
|
|
397
|
-
await getOTLPReceiver().listen(port, host);
|
|
453
|
+
await getOTLPReceiver({ acceptFormats }).listen(port, host);
|
|
398
454
|
}
|
|
399
455
|
async function stopOTLPReceiver() {
|
|
400
456
|
logger.debug("[OtlpReceiver] Stopping receiver through stopOTLPReceiver function");
|
|
@@ -406,4 +462,4 @@ async function stopOTLPReceiver() {
|
|
|
406
462
|
//#endregion
|
|
407
463
|
export { startOTLPReceiver, stopOTLPReceiver };
|
|
408
464
|
|
|
409
|
-
//# sourceMappingURL=otlpReceiver-
|
|
465
|
+
//# sourceMappingURL=otlpReceiver-B2z58l4e.js.map
|