evalution 1.0.4 → 1.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (335) hide show
  1. package/LICENSING.md +30 -6
  2. package/README.md +1 -0
  3. package/dist/check-BTg6THHB.d.ts +1925 -0
  4. package/dist/checks/index.d.ts +71 -0
  5. package/dist/checks/index.js +2 -0
  6. package/dist/checks-Cq97JU-h.js +309 -0
  7. package/dist/cli/index.js +5328 -348
  8. package/dist/client/assets/DatasetView-BcYR5beY.css +1 -0
  9. package/dist/client/assets/DatasetView-CyX0mCj8.js +15 -0
  10. package/dist/client/assets/EvalRunView-5IZp_6Ob.js +2 -0
  11. package/dist/client/assets/EvalView-DBTK6rCe.js +1 -0
  12. package/dist/client/assets/abap-BdImnpbu.js +1 -0
  13. package/dist/client/assets/actionscript-3-CoDkCxhg.js +1 -0
  14. package/dist/client/assets/ada-bCR0ucgS.js +1 -0
  15. package/dist/client/assets/andromeeda-C4gqWexZ.js +1 -0
  16. package/dist/client/assets/angular-html-CU67Zn6k.js +1 -0
  17. package/dist/client/assets/angular-ts-BwZT4LLn.js +1 -0
  18. package/dist/client/assets/apache-Pmp26Uib.js +1 -0
  19. package/dist/client/assets/apex-D8_7TLub.js +1 -0
  20. package/dist/client/assets/apl-dKokRX4l.js +1 -0
  21. package/dist/client/assets/applescript-Co6uUVPk.js +1 -0
  22. package/dist/client/assets/ara-BRHolxvo.js +1 -0
  23. package/dist/client/assets/asciidoc-Ve4PFQV2.js +1 -0
  24. package/dist/client/assets/asm-D_Q5rh1f.js +1 -0
  25. package/dist/client/assets/astro-CbQHKStN.js +1 -0
  26. package/dist/client/assets/aurora-x-D-2ljcwZ.js +1 -0
  27. package/dist/client/assets/awk-DMzUqQB5.js +1 -0
  28. package/dist/client/assets/ayu-dark-DYE7WIF3.js +1 -0
  29. package/dist/client/assets/ayu-light-BA47KaF1.js +1 -0
  30. package/dist/client/assets/ayu-mirage-32ctXXKs.js +1 -0
  31. package/dist/client/assets/ballerina-BFfxhgS-.js +1 -0
  32. package/dist/client/assets/bat-BkioyH1T.js +1 -0
  33. package/dist/client/assets/beancount-k_qm7-4y.js +1 -0
  34. package/dist/client/assets/berry-uYugtg8r.js +1 -0
  35. package/dist/client/assets/bibtex-CHM0blh-.js +1 -0
  36. package/dist/client/assets/bicep-Bmn6On1c.js +1 -0
  37. package/dist/client/assets/bird2-DPOp833l.js +1 -0
  38. package/dist/client/assets/blade-D4QpJJKB.js +1 -0
  39. package/dist/client/assets/bsl-BO_Y6i37.js +1 -0
  40. package/dist/client/assets/c-BIGW1oBm.js +1 -0
  41. package/dist/client/assets/c3-eo99z4R2.js +1 -0
  42. package/dist/client/assets/cadence-Bv_4Rxtq.js +1 -0
  43. package/dist/client/assets/cairo-KRGpt6FW.js +1 -0
  44. package/dist/client/assets/catppuccin-frappe-DFWUc33u.js +1 -0
  45. package/dist/client/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
  46. package/dist/client/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
  47. package/dist/client/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
  48. package/dist/client/assets/clarity-D53aC0YG.js +1 -0
  49. package/dist/client/assets/clojure-P80f7IUj.js +1 -0
  50. package/dist/client/assets/cmake-D1j8_8rp.js +1 -0
  51. package/dist/client/assets/cobol-nwyudZeR.js +1 -0
  52. package/dist/client/assets/codeowners-Bp6g37R7.js +1 -0
  53. package/dist/client/assets/codeql-DsOJ9woJ.js +1 -0
  54. package/dist/client/assets/coffee-Ch7k5sss.js +1 -0
  55. package/dist/client/assets/common-lisp-Cg-RD9OK.js +1 -0
  56. package/dist/client/assets/coq-DkFqJrB1.js +1 -0
  57. package/dist/client/assets/cpp-CofmeUqb.js +1 -0
  58. package/dist/client/assets/crystal-tKQVLTB8.js +1 -0
  59. package/dist/client/assets/csharp-COcwbKMJ.js +1 -0
  60. package/dist/client/assets/css-DPfMkruS.js +1 -0
  61. package/dist/client/assets/csv-fuZLfV_i.js +1 -0
  62. package/dist/client/assets/cue-D82EKSYY.js +1 -0
  63. package/dist/client/assets/cypher-COkxafJQ.js +1 -0
  64. package/dist/client/assets/d-85-TOEBH.js +1 -0
  65. package/dist/client/assets/dark-plus-C3mMm8J8.js +1 -0
  66. package/dist/client/assets/dart-CF10PKvl.js +1 -0
  67. package/dist/client/assets/data-grid-overlay-editor-CBtkQufd.js +1 -0
  68. package/dist/client/assets/dax-CEL-wOlO.js +1 -0
  69. package/dist/client/assets/desktop-BmXAJ9_W.js +1 -0
  70. package/dist/client/assets/diff-D97Zzqfu.js +1 -0
  71. package/dist/client/assets/docker-BcOcwvcX.js +1 -0
  72. package/dist/client/assets/dotenv-Da5cRb03.js +1 -0
  73. package/dist/client/assets/dracula-BzJJZx-M.js +1 -0
  74. package/dist/client/assets/dracula-soft-BXkSAIEj.js +1 -0
  75. package/dist/client/assets/dream-maker-BtqSS_iP.js +1 -0
  76. package/dist/client/assets/edge-BkV0erSs.js +1 -0
  77. package/dist/client/assets/elixir-CDX3lj18.js +1 -0
  78. package/dist/client/assets/elm-DbKCFpqz.js +1 -0
  79. package/dist/client/assets/emacs-lisp-C9XAeP06.js +1 -0
  80. package/dist/client/assets/erb-B12qg9BL.js +1 -0
  81. package/dist/client/assets/erlang-DsQrWhSR.js +1 -0
  82. package/dist/client/assets/everforest-dark-BgDCqdQA.js +1 -0
  83. package/dist/client/assets/everforest-light-C8M2exoo.js +1 -0
  84. package/dist/client/assets/fennel-BYunw83y.js +1 -0
  85. package/dist/client/assets/fish-BvzEVeQv.js +1 -0
  86. package/dist/client/assets/fluent-C4IJs8-o.js +1 -0
  87. package/dist/client/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
  88. package/dist/client/assets/fortran-free-form-BxgE0vQu.js +1 -0
  89. package/dist/client/assets/fsharp-CXgrBDvD.js +1 -0
  90. package/dist/client/assets/gdresource-BOOCDP_w.js +1 -0
  91. package/dist/client/assets/gdscript-C5YyOfLZ.js +1 -0
  92. package/dist/client/assets/gdshader-DkwncUOv.js +1 -0
  93. package/dist/client/assets/genie-D0YGMca9.js +1 -0
  94. package/dist/client/assets/gherkin-DyxjwDmM.js +1 -0
  95. package/dist/client/assets/git-commit-F4YmCXRG.js +1 -0
  96. package/dist/client/assets/git-rebase-r7XF79zn.js +1 -0
  97. package/dist/client/assets/github-dark-DHJKELXO.js +1 -0
  98. package/dist/client/assets/github-dark-default-Cuk6v7N8.js +1 -0
  99. package/dist/client/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
  100. package/dist/client/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
  101. package/dist/client/assets/github-light-DAi9KRSo.js +1 -0
  102. package/dist/client/assets/github-light-default-D7oLnXFd.js +1 -0
  103. package/dist/client/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
  104. package/dist/client/assets/gleam-BspZqrRM.js +1 -0
  105. package/dist/client/assets/glimmer-js-Rg0-pVw9.js +1 -0
  106. package/dist/client/assets/glimmer-ts-U6CK756n.js +1 -0
  107. package/dist/client/assets/glsl-DplSGwfg.js +1 -0
  108. package/dist/client/assets/gn-n2N0HUVH.js +1 -0
  109. package/dist/client/assets/gnuplot-DdkO51Og.js +1 -0
  110. package/dist/client/assets/go-CxLEBnE3.js +1 -0
  111. package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
  112. package/dist/client/assets/groovy-gcz8RCvz.js +1 -0
  113. package/dist/client/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
  114. package/dist/client/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
  115. package/dist/client/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
  116. package/dist/client/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
  117. package/dist/client/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
  118. package/dist/client/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
  119. package/dist/client/assets/hack-CaT9iCJl.js +1 -0
  120. package/dist/client/assets/haml-B8DHNrY2.js +1 -0
  121. package/dist/client/assets/handlebars-BL8al0AC.js +1 -0
  122. package/dist/client/assets/haskell-Df6bDoY_.js +1 -0
  123. package/dist/client/assets/haxe-CzTSHFRz.js +1 -0
  124. package/dist/client/assets/hcl-BWvSN4gD.js +1 -0
  125. package/dist/client/assets/highlighted-body-KPVGNVTW-DyudWmoO.js +1 -0
  126. package/dist/client/assets/hjson-D5-asLiD.js +1 -0
  127. package/dist/client/assets/hlsl-D3lLCCz7.js +1 -0
  128. package/dist/client/assets/horizon-BUw7H-hv.js +1 -0
  129. package/dist/client/assets/horizon-bright-Cn-bp-IR.js +1 -0
  130. package/dist/client/assets/houston-DnULxvSX.js +1 -0
  131. package/dist/client/assets/html-GMplVEZG.js +1 -0
  132. package/dist/client/assets/html-derivative-BFtXZ54Q.js +1 -0
  133. package/dist/client/assets/http-jrhK8wxY.js +1 -0
  134. package/dist/client/assets/hurl-irOxFIW8.js +1 -0
  135. package/dist/client/assets/hxml-Bvhsp5Yf.js +1 -0
  136. package/dist/client/assets/hy-DFXneXwc.js +1 -0
  137. package/dist/client/assets/imba-DGztddWO.js +1 -0
  138. package/dist/client/assets/index-B7OFMd2c.css +32 -0
  139. package/dist/client/assets/index-aypgoZcG.js +701 -0
  140. package/dist/client/assets/ini-BEwlwnbL.js +1 -0
  141. package/dist/client/assets/java-CylS5w8V.js +1 -0
  142. package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
  143. package/dist/client/assets/jinja-4LBKfQ-Z.js +1 -0
  144. package/dist/client/assets/jison-wvAkD_A8.js +1 -0
  145. package/dist/client/assets/json-Cp-IABpG.js +1 -0
  146. package/dist/client/assets/json5-C9tS-k6U.js +1 -0
  147. package/dist/client/assets/jsonc-Des-eS-w.js +1 -0
  148. package/dist/client/assets/jsonl-DcaNXYhu.js +1 -0
  149. package/dist/client/assets/jsonnet-DFQXde-d.js +1 -0
  150. package/dist/client/assets/jssm-C2t-YnRu.js +1 -0
  151. package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
  152. package/dist/client/assets/julia-CxzCAyBv.js +1 -0
  153. package/dist/client/assets/just-Cw27pwNe.js +1 -0
  154. package/dist/client/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
  155. package/dist/client/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
  156. package/dist/client/assets/kanagawa-wave-DWedfzmr.js +1 -0
  157. package/dist/client/assets/kdl-DV7GczEv.js +1 -0
  158. package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
  159. package/dist/client/assets/kusto-DZf3V79B.js +1 -0
  160. package/dist/client/assets/laserwave-DUszq2jm.js +1 -0
  161. package/dist/client/assets/latex-CWtU0Tv5.js +1 -0
  162. package/dist/client/assets/lean-BZvkOJ9d.js +1 -0
  163. package/dist/client/assets/less-B1dDrJ26.js +1 -0
  164. package/dist/client/assets/light-plus-B7mTdjB0.js +1 -0
  165. package/dist/client/assets/liquid-DYVedYrR.js +1 -0
  166. package/dist/client/assets/llvm-DjAJT7YJ.js +1 -0
  167. package/dist/client/assets/log-2UxHyX5q.js +1 -0
  168. package/dist/client/assets/logo-BtOb2qkB.js +1 -0
  169. package/dist/client/assets/lua-BaeVxFsk.js +1 -0
  170. package/dist/client/assets/luau-C-HG3fhB.js +1 -0
  171. package/dist/client/assets/make-CHLpvVh8.js +1 -0
  172. package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
  173. package/dist/client/assets/marko-CnJfTvn9.js +1 -0
  174. package/dist/client/assets/material-theme-D5KoaKCx.js +1 -0
  175. package/dist/client/assets/material-theme-darker-BfHTSMKl.js +1 -0
  176. package/dist/client/assets/material-theme-lighter-B0m2ddpp.js +1 -0
  177. package/dist/client/assets/material-theme-ocean-CyktbL80.js +1 -0
  178. package/dist/client/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
  179. package/dist/client/assets/matlab-D7o27uSR.js +1 -0
  180. package/dist/client/assets/mdc-BMNejdWA.js +1 -0
  181. package/dist/client/assets/mdx-Cmh6b_Ma.js +1 -0
  182. package/dist/client/assets/mermaid-mWjccvbQ.js +1 -0
  183. package/dist/client/assets/min-dark-CafNBF8u.js +1 -0
  184. package/dist/client/assets/min-light-CTRr51gU.js +1 -0
  185. package/dist/client/assets/mipsasm-CKIfxQSi.js +1 -0
  186. package/dist/client/assets/mojo-rZm6bMo-.js +1 -0
  187. package/dist/client/assets/monokai-D4h5O-jR.js +1 -0
  188. package/dist/client/assets/moonbit-_H4v1dQx.js +1 -0
  189. package/dist/client/assets/move-IF9eRakj.js +1 -0
  190. package/dist/client/assets/narrat-DRg8JJMk.js +1 -0
  191. package/dist/client/assets/nextflow-Zz6hmt5N.js +1 -0
  192. package/dist/client/assets/nextflow-groovy-BeH2EWoN.js +1 -0
  193. package/dist/client/assets/nginx-BpAMiNFr.js +1 -0
  194. package/dist/client/assets/night-owl-C39BiMTA.js +1 -0
  195. package/dist/client/assets/night-owl-light-CMTm3GFP.js +1 -0
  196. package/dist/client/assets/nim-CVrawwO9.js +1 -0
  197. package/dist/client/assets/nix-CwoSXNpI.js +1 -0
  198. package/dist/client/assets/nord-Ddv68eIx.js +1 -0
  199. package/dist/client/assets/number-overlay-editor-CXHiTLsp.js +9 -0
  200. package/dist/client/assets/nushell-Cz2AlsmD.js +1 -0
  201. package/dist/client/assets/objective-c-DXmwc3jG.js +1 -0
  202. package/dist/client/assets/objective-cpp-CLxacb5B.js +1 -0
  203. package/dist/client/assets/ocaml-C0hk2d4L.js +1 -0
  204. package/dist/client/assets/odin-BBf5iR-q.js +1 -0
  205. package/dist/client/assets/one-dark-pro-DVMEJ2y_.js +1 -0
  206. package/dist/client/assets/one-light-C3Wv6jpd.js +1 -0
  207. package/dist/client/assets/openscad-C4EeE6gA.js +1 -0
  208. package/dist/client/assets/pascal-D93ZcfNL.js +1 -0
  209. package/dist/client/assets/perl-C0TMdlhV.js +1 -0
  210. package/dist/client/assets/php-Dhbhpdrm.js +1 -0
  211. package/dist/client/assets/pkl-u5AG7uiY.js +1 -0
  212. package/dist/client/assets/plastic-3e1v2bzS.js +1 -0
  213. package/dist/client/assets/plsql-ChMvpjG-.js +1 -0
  214. package/dist/client/assets/po-BTJTHyun.js +1 -0
  215. package/dist/client/assets/poimandres-CS3Unz2-.js +1 -0
  216. package/dist/client/assets/polar-C0HS_06l.js +1 -0
  217. package/dist/client/assets/postcss-CXtECtnM.js +1 -0
  218. package/dist/client/assets/powerquery-CEu0bR-o.js +1 -0
  219. package/dist/client/assets/powershell-Dpen1YoG.js +1 -0
  220. package/dist/client/assets/prisma-Dd19v3D-.js +1 -0
  221. package/dist/client/assets/prolog-CbFg5uaA.js +1 -0
  222. package/dist/client/assets/proto-C7zT0LnQ.js +1 -0
  223. package/dist/client/assets/pug-CGlum2m_.js +1 -0
  224. package/dist/client/assets/puppet-BMWR74SV.js +1 -0
  225. package/dist/client/assets/purescript-CklMAg4u.js +1 -0
  226. package/dist/client/assets/python-B6aJPvgy.js +1 -0
  227. package/dist/client/assets/qml-3beO22l8.js +1 -0
  228. package/dist/client/assets/qmldir-C8lEn-DE.js +1 -0
  229. package/dist/client/assets/qss-IeuSbFQv.js +1 -0
  230. package/dist/client/assets/r-Dspwwk_N.js +1 -0
  231. package/dist/client/assets/racket-BqYA7rlc.js +1 -0
  232. package/dist/client/assets/raku-DXvB9xmW.js +1 -0
  233. package/dist/client/assets/razor-Uh8Bk_45.js +1 -0
  234. package/dist/client/assets/red-bN70gL4F.js +1 -0
  235. package/dist/client/assets/reg-C-SQnVFl.js +1 -0
  236. package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
  237. package/dist/client/assets/rel-C3B-1QV4.js +1 -0
  238. package/dist/client/assets/riscv-BM1_JUlF.js +1 -0
  239. package/dist/client/assets/ron-D8l8udqQ.js +1 -0
  240. package/dist/client/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
  241. package/dist/client/assets/rose-pine-moon-D4_iv3hh.js +1 -0
  242. package/dist/client/assets/rose-pine-qdsjHGoJ.js +1 -0
  243. package/dist/client/assets/rosmsg-BJDFO7_C.js +1 -0
  244. package/dist/client/assets/rst-BrH8l1NY.js +1 -0
  245. package/dist/client/assets/ruby-Dw2BHqvy.js +1 -0
  246. package/dist/client/assets/rust-B1yitclQ.js +1 -0
  247. package/dist/client/assets/sas-cz2c8ADy.js +1 -0
  248. package/dist/client/assets/sass-Cj5Yp3dK.js +1 -0
  249. package/dist/client/assets/scala-C151Ov-r.js +1 -0
  250. package/dist/client/assets/scheme-C98Dy4si.js +1 -0
  251. package/dist/client/assets/scss-OYdSNvt2.js +1 -0
  252. package/dist/client/assets/sdbl-DVxCFoDh.js +1 -0
  253. package/dist/client/assets/shaderlab-Dg9Lc6iA.js +1 -0
  254. package/dist/client/assets/shellscript-Yzrsuije.js +1 -0
  255. package/dist/client/assets/shellsession-BADoaaVG.js +1 -0
  256. package/dist/client/assets/slack-dark-BthQWCQV.js +1 -0
  257. package/dist/client/assets/slack-ochin-DqwNpetd.js +1 -0
  258. package/dist/client/assets/smalltalk-BERRCDM3.js +1 -0
  259. package/dist/client/assets/snazzy-light-Bw305WKR.js +1 -0
  260. package/dist/client/assets/solarized-dark-DXbdFlpD.js +1 -0
  261. package/dist/client/assets/solarized-light-L9t79GZl.js +1 -0
  262. package/dist/client/assets/solidity-rGO070M0.js +1 -0
  263. package/dist/client/assets/soy-Brmx7dQM.js +1 -0
  264. package/dist/client/assets/sparql-rVzFXLq3.js +1 -0
  265. package/dist/client/assets/splunk-BtCnVYZw.js +1 -0
  266. package/dist/client/assets/sql-BLtJtn59.js +1 -0
  267. package/dist/client/assets/ssh-config-_ykCGR6B.js +1 -0
  268. package/dist/client/assets/stata-BH5u7GGu.js +1 -0
  269. package/dist/client/assets/stylus-BEDo0Tqx.js +1 -0
  270. package/dist/client/assets/surrealql-Bq5Q-fJD.js +1 -0
  271. package/dist/client/assets/svelte-C_ipcX3V.js +1 -0
  272. package/dist/client/assets/swift-D82vCrfD.js +1 -0
  273. package/dist/client/assets/synthwave-84-CbfX1IO0.js +1 -0
  274. package/dist/client/assets/system-verilog-CnnmHF94.js +1 -0
  275. package/dist/client/assets/systemd-4A_iFExJ.js +1 -0
  276. package/dist/client/assets/talonscript-CkByrt1z.js +1 -0
  277. package/dist/client/assets/tasl-QIJgUcNo.js +1 -0
  278. package/dist/client/assets/tcl-dwOrl1Do.js +1 -0
  279. package/dist/client/assets/templ-P3uqSqPl.js +1 -0
  280. package/dist/client/assets/terraform-BETggiCN.js +1 -0
  281. package/dist/client/assets/tex-idrVyKtj.js +1 -0
  282. package/dist/client/assets/tokyo-night-hegEt444.js +1 -0
  283. package/dist/client/assets/toml-vGWfd6FD.js +1 -0
  284. package/dist/client/assets/ts-tags-zn1MmPIZ.js +1 -0
  285. package/dist/client/assets/tsv-B_m7g4N7.js +1 -0
  286. package/dist/client/assets/tsx-COt5Ahok.js +1 -0
  287. package/dist/client/assets/turtle-BsS91CYL.js +1 -0
  288. package/dist/client/assets/twig-DNn4PbVi.js +1 -0
  289. package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
  290. package/dist/client/assets/typespec-BGHnOYBU.js +1 -0
  291. package/dist/client/assets/typst-DHCkPAjA.js +1 -0
  292. package/dist/client/assets/v-BcVCzyr7.js +1 -0
  293. package/dist/client/assets/vala-CsfeWuGM.js +1 -0
  294. package/dist/client/assets/vb-D17OF-Vu.js +1 -0
  295. package/dist/client/assets/verilog-BQ8w6xss.js +1 -0
  296. package/dist/client/assets/vesper-DU1UobuO.js +1 -0
  297. package/dist/client/assets/vhdl-CeAyd5Ju.js +1 -0
  298. package/dist/client/assets/viml-CJc9bBzg.js +1 -0
  299. package/dist/client/assets/vitesse-black-Bkuqu6BP.js +1 -0
  300. package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
  301. package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
  302. package/dist/client/assets/vue-DN_0RTcg.js +1 -0
  303. package/dist/client/assets/vue-html-AaS7Mt5G.js +1 -0
  304. package/dist/client/assets/vue-vine-CQOfvN7w.js +1 -0
  305. package/dist/client/assets/vyper-CDx5xZoG.js +1 -0
  306. package/dist/client/assets/wasm-CG6Dc4jp.js +1 -0
  307. package/dist/client/assets/wasm-MzD3tlZU.js +1 -0
  308. package/dist/client/assets/wenyan-BV7otONQ.js +1 -0
  309. package/dist/client/assets/wgsl-Dx-B1_4e.js +1 -0
  310. package/dist/client/assets/wikitext-BhOHFoWU.js +1 -0
  311. package/dist/client/assets/wit-5i3qLPDT.js +1 -0
  312. package/dist/client/assets/wolfram-lXgVvXCa.js +1 -0
  313. package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
  314. package/dist/client/assets/xsl-CtQFsRM5.js +1 -0
  315. package/dist/client/assets/yaml-Buea-lGh.js +1 -0
  316. package/dist/client/assets/zenscript-DVFEvuxE.js +1 -0
  317. package/dist/client/assets/zig-VOosw3JB.js +1 -0
  318. package/dist/client/index.html +2 -2
  319. package/dist/dataset-types-CSjbM_Vz.d.ts +564 -0
  320. package/dist/index.d.ts +3806 -894
  321. package/dist/index.js +3653 -578
  322. package/dist/instance-names-pVQxJbtw.js +12 -0
  323. package/dist/otlp-trace-ingestor-V8_bbpUG.js +12376 -0
  324. package/dist/runtime-DCNx7dHI.js +302 -0
  325. package/dist/trace-Dn6Pfcc5.d.ts +200 -0
  326. package/dist/views/datasets/index.d.ts +68 -0
  327. package/dist/views/datasets/index.js +237 -0
  328. package/dist/views/index.d.ts +98 -0
  329. package/dist/views/index.js +156 -0
  330. package/dist/views/react/index.d.ts +55 -0
  331. package/dist/views/react/index.js +246 -0
  332. package/package.json +78 -14
  333. package/dist/client/assets/index-C4XXh0na.js +0 -144
  334. package/dist/client/assets/index-CHPZsnKo.css +0 -32
  335. package/dist/vercel-ai-sdk-B8ivuOzP.js +0 -853
@@ -1,853 +0,0 @@
1
- import path from "node:path";
2
- import { SpanStatusCode, trace } from "@opentelemetry/api";
3
- import fs from "node:fs";
4
- import { generateText } from "ai";
5
- import { extractPropertiesFromDeclaration, findTypeDeclaration } from "ts-proppy";
6
- import ts from "typescript";
7
- //#region src/shared/helpers.ts
8
- function otelOperationToSpanKind(operationName) {
9
- switch (operationName) {
10
- case "chat":
11
- case "response":
12
- case "text_completion":
13
- case "generate_content": return "LLM";
14
- case "execute_tool": return "TOOL";
15
- case "create_agent":
16
- case "invoke_agent": return "AGENT";
17
- case "embeddings": return "EMBEDDING";
18
- default: return "DEFAULT";
19
- }
20
- }
21
- /** Whether a property value can be edited in the UI. */
22
- function isEditable(value) {
23
- return value.kind !== "raw" && !(value.kind === "functionCall" && !value.binding);
24
- }
25
- //#endregion
26
- //#region src/trace/prompt-tracer.ts
27
- /**
28
- * Attribute name a span can set to pick one of evalution's span-kind values
29
- * (`'LLM'`, `'TOOL'`, `'AGENT'`, `'EMBEDDING'`, `'DEFAULT'`). Falls back to
30
- * `'DEFAULT'` when absent or unrecognised.
31
- */
32
- const SPAN_KIND_ATTRIBUTE = "evalution.span.type";
33
- /**
34
- * Attribute name a span can set to give a human-readable name to the prompt.
35
- */
36
- const PROMPT_NAME_ATTRIBUTE = "gen_ai.prompt.name";
37
- /**
38
- * Attribute name a span can set to link itself to a specific prompt. The value
39
- * is a globally-unique prompt ID unless {@link PROMPT_PROVIDER_ID_ATTRIBUTE} is
40
- * also set, in which case it is scoped to that provider.
41
- */
42
- const PROMPT_ID_ATTRIBUTE = "evalution.prompt.id";
43
- /**
44
- * Attribute name a span can set to scope its {@link PROMPT_ID_ATTRIBUTE} to a
45
- * specific prompt provider. When absent, the prompt ID is treated as global.
46
- */
47
- const PROMPT_PROVIDER_ID_ATTRIBUTE = "evalution.prompt.provider.id";
48
- /**
49
- * Attribute name a span can set to include an array of input parameters used
50
- * to construct the final prompt.
51
- */
52
- const PROMPT_INPUTS_ATTRIBUTE = "evalution.prompt.inputs";
53
- function getPromptSpanAttributes(prompt, attributes = {}) {
54
- return Object.fromEntries([
55
- [SPAN_KIND_ATTRIBUTE, "LLM"],
56
- [PROMPT_NAME_ATTRIBUTE, prompt.name],
57
- [PROMPT_ID_ATTRIBUTE, prompt.id],
58
- [PROMPT_INPUTS_ATTRIBUTE, prompt.functionParameters],
59
- ...Object.entries(attributes)
60
- ].filter(([, v]) => v !== void 0 && v !== null));
61
- }
62
- /**
63
- * Wraps a {@link Tracer} so that every span it produces is tagged with the
64
- * attributes that associate it with a prompt — the prompt's name
65
- * ({@link PROMPT_NAME_ATTRIBUTE}), an optional global prompt ID
66
- * ({@link PROMPT_ID_ATTRIBUTE}), and an `'LLM'` span kind
67
- * ({@link SPAN_KIND_ATTRIBUTE}). Attributes set explicitly on an individual
68
- * span take precedence over these defaults.
69
- *
70
- * This depends only on `@opentelemetry/api`, so it can be re-used by SDK
71
- * adapter packages (e.g. `@evalution/vercel-ai-sdk`) without pulling in the
72
- * rest of evalution.
73
- *
74
- * @param prompt - The prompt to attribute spans to. `name` is a human-readable
75
- * name; the optional `id` is a globally-unique prompt ID used to resolve
76
- * runtime traces back to the prompt.
77
- * @param tracer - Tracer to wrap. Defaults to a tracer from the globally
78
- * registered tracer provider.
79
- * @returns A tracer that forwards to `tracer` while attaching the prompt
80
- * attributes to each span it creates.
81
- */
82
- function createTracerForPrompt(prompt, tracer) {
83
- const inner = tracer ?? trace.getTracer("evalution");
84
- const withPromptAttributes = (options) => ({
85
- ...options,
86
- attributes: getPromptSpanAttributes(prompt, options?.attributes)
87
- });
88
- return {
89
- startSpan(name, options, context) {
90
- return inner.startSpan(name, withPromptAttributes(options), context);
91
- },
92
- startActiveSpan(name, ...rest) {
93
- if (typeof rest[0] === "function") return inner.startActiveSpan(name, withPromptAttributes(), rest[0]);
94
- if (typeof rest[1] === "function") return inner.startActiveSpan(name, withPromptAttributes(rest[0]), rest[1]);
95
- return inner.startActiveSpan(name, withPromptAttributes(rest[0]), rest[1], rest[2]);
96
- }
97
- };
98
- }
99
- //#endregion
100
- //#region src/trace/base-otel-trace-provider.ts
101
- const KNOWN_KINDS = [
102
- "LLM",
103
- "TOOL",
104
- "AGENT",
105
- "EMBEDDING",
106
- "DEFAULT"
107
- ];
108
- function hrTimeToMs(time) {
109
- return time[0] * 1e3 + time[1] / 1e6;
110
- }
111
- function readKind(attributes) {
112
- const raw = attributes["evalution.span.type"] ?? otelOperationToSpanKind(attributes["gen_ai.operation.name"]);
113
- return typeof raw === "string" && KNOWN_KINDS.includes(raw) ? raw : "DEFAULT";
114
- }
115
- const PARAM_ATTRIBUTES = [
116
- "gen_ai.request.temperature",
117
- "gen_ai.request.max_tokens",
118
- "gen_ai.request.top_k",
119
- "gen_ai.request.top_p",
120
- "gen_ai.request.frequency_penalty",
121
- "gen_ai.request.presence_penalty",
122
- "gen_ai.request.seed",
123
- "gen_ai.request.stop_sequences",
124
- "gen_ai.request.choice.count"
125
- ];
126
- function str(v) {
127
- return typeof v === "string" ? v : void 0;
128
- }
129
- function num(v) {
130
- return typeof v === "number" ? v : void 0;
131
- }
132
- function parseMessages(v) {
133
- if (typeof v !== "string") return void 0;
134
- try {
135
- const parsed = JSON.parse(v);
136
- if (!Array.isArray(parsed)) return void 0;
137
- return parsed.flatMap((msg) => {
138
- if (!msg || typeof msg !== "object") return [];
139
- const m = msg;
140
- const role = str(m.role) ?? "unknown";
141
- const content = m.content;
142
- if (typeof content === "string") return [{
143
- role,
144
- content
145
- }];
146
- if (Array.isArray(content)) {
147
- const text = content.filter((c) => !!c && typeof c === "object").filter((c) => c.type === "text").map((c) => str(c.text) ?? "").join("");
148
- return text ? [{
149
- role,
150
- content: text
151
- }] : [];
152
- }
153
- return [];
154
- });
155
- } catch {
156
- return;
157
- }
158
- }
159
- function parseOutput(v) {
160
- if (typeof v !== "string") return void 0;
161
- try {
162
- const parsed = JSON.parse(v);
163
- if (!Array.isArray(parsed)) return void 0;
164
- return parsed.flatMap((msg) => {
165
- if (!msg || typeof msg !== "object") return [];
166
- const content = msg.content;
167
- if (typeof content === "string") return [content];
168
- if (Array.isArray(content)) return content.filter((c) => !!c && typeof c === "object").filter((c) => c.type === "text").map((c) => str(c.text) ?? "");
169
- return [];
170
- }).join("\n");
171
- } catch {
172
- return;
173
- }
174
- }
175
- function readLLM(attributes) {
176
- const provider = str(attributes["gen_ai.provider.name"]) ?? str(attributes["gen_ai.system"]);
177
- const model = str(attributes["gen_ai.response.model"]) ?? str(attributes["gen_ai.request.model"]);
178
- const promptTokens = num(attributes["gen_ai.usage.input_tokens"]) ?? num(attributes["ai.usage.promptTokens"]);
179
- const completionTokens = num(attributes["gen_ai.usage.output_tokens"]) ?? num(attributes["ai.usage.completionTokens"]);
180
- const messages = parseMessages(attributes["gen_ai.input.messages"] ?? attributes["ai.prompt.messages"]);
181
- const output = parseOutput(attributes["gen_ai.output.messages"]) ?? str(attributes["ai.response.text"]);
182
- const paramEntries = PARAM_ATTRIBUTES.map((key) => [key.replace("gen_ai.request.", ""), attributes[key]]).filter(([, v]) => v !== void 0);
183
- const modelParameters = paramEntries.length > 0 ? Object.fromEntries(paramEntries) : void 0;
184
- const totalTokens = promptTokens !== void 0 && completionTokens !== void 0 ? promptTokens + completionTokens : void 0;
185
- if (!provider && !model && !promptTokens && !completionTokens && !messages && !output && !modelParameters) return;
186
- return {
187
- ...provider && { provider },
188
- ...model && { model },
189
- ...messages && { messages },
190
- ...output && { output },
191
- ...promptTokens !== void 0 && { promptTokens },
192
- ...completionTokens !== void 0 && { completionTokens },
193
- ...totalTokens !== void 0 && { totalTokens },
194
- ...modelParameters && { modelParameters }
195
- };
196
- }
197
- function llmAndPrompt(attributes) {
198
- const llm = readLLM(attributes);
199
- const id = str(attributes["evalution.prompt.id"]);
200
- const providerId = str(attributes["evalution.prompt.provider.id"]);
201
- const prompt = id ? {
202
- id,
203
- ...providerId && { providerId }
204
- } : void 0;
205
- return {
206
- ...llm && { llm },
207
- ...prompt && { prompt }
208
- };
209
- }
210
- function mapStatus(status) {
211
- if (status.code === SpanStatusCode.ERROR) return "error";
212
- if (status.code === SpanStatusCode.OK) return "ok";
213
- }
214
- /**
215
- * Merges a later snapshot of a span into an earlier one.
216
- *
217
- * OpenTelemetry reports each span twice — at `onStart` (creation-time
218
- * attributes only) and at `onEnd` (the full set) — and the two snapshots can
219
- * carry complementary data. This unions their `attributes` and lets any
220
- * *defined* field on `incoming` update `existing`, so nothing recorded at start
221
- * is lost when the span ends, and end-only fields (status, timings, token
222
- * usage, …) are filled in.
223
- */
224
- function mergeSpans(existing, incoming) {
225
- const merged = { ...existing };
226
- for (const [key, value] of Object.entries(incoming)) if (value !== void 0) merged[key] = value;
227
- const result = merged;
228
- if (existing.attributes || incoming.attributes) result.attributes = {
229
- ...existing.attributes,
230
- ...incoming.attributes
231
- };
232
- return result;
233
- }
234
- /**
235
- * Base class for a {@link TraceProvider} populated by OpenTelemetry spans.
236
- *
237
- * Register the processor returned by {@link getSpanProcessor} on a
238
- * `BasicTracerProvider` (from `@opentelemetry/sdk-trace-base`).
239
- */
240
- var BaseOTelTraceProvider = class {
241
- id;
242
- displayName;
243
- description;
244
- subscribers = /* @__PURE__ */ new Map();
245
- watchers = /* @__PURE__ */ new Set();
246
- spanPromises = /* @__PURE__ */ new Map();
247
- constructor(options) {
248
- this.id = options.id;
249
- this.displayName = options.displayName;
250
- this.description = options.description;
251
- }
252
- async getTrace(traceId) {
253
- const trace = await this.getTraceWithoutSpans(traceId);
254
- if (!trace) return void 0;
255
- return {
256
- trace,
257
- spans: await this.getTraceSpans(traceId)
258
- };
259
- }
260
- subscribeTrace(traceId, callback) {
261
- let set = this.subscribers.get(traceId);
262
- if (!set) {
263
- set = /* @__PURE__ */ new Set();
264
- this.subscribers.set(traceId, set);
265
- }
266
- set.add(callback);
267
- return () => {
268
- set.delete(callback);
269
- if (set.size === 0) this.subscribers.delete(traceId);
270
- };
271
- }
272
- watch(callback) {
273
- this.watchers.add(callback);
274
- return () => {
275
- this.watchers.delete(callback);
276
- };
277
- }
278
- /**
279
- * Returns a `SpanProcessor` that funnels every OpenTelemetry span the
280
- * caller's tracer produces into this provider's in-memory store.
281
- */
282
- getSpanProcessor() {
283
- return {
284
- onStart: (span, _parentContext) => {
285
- const spanId = span.spanContext().spanId;
286
- const p = this.handleStart(span).catch(console.error);
287
- this.spanPromises.set(spanId, p);
288
- p.finally(() => this.spanPromises.delete(spanId));
289
- },
290
- onEnd: (span) => {
291
- const spanId = span.spanContext().spanId;
292
- const p = (this.spanPromises.get(spanId) ?? Promise.resolve()).then(() => this.handleEnd(span)).catch(console.error);
293
- this.spanPromises.set(spanId, p);
294
- p.finally(() => this.spanPromises.delete(spanId));
295
- },
296
- forceFlush: async () => {},
297
- shutdown: async () => {}
298
- };
299
- }
300
- async handleStart(span) {
301
- const ctx = span.spanContext();
302
- const traceId = ctx.traceId;
303
- const spanId = ctx.spanId;
304
- const parentCtx = span.parentSpanContext;
305
- if ((!parentCtx || parentCtx.traceId !== traceId) && !await this.hasTrace(traceId)) {
306
- const startTime = hrTimeToMs(span.startTime);
307
- const trace = {
308
- id: traceId,
309
- providerId: this.id,
310
- name: span.name,
311
- startTime,
312
- status: "running",
313
- attributes: { ...span.attributes }
314
- };
315
- await this.addOrUpdateTrace(trace);
316
- this.emitChange({
317
- type: "add",
318
- traceId
319
- });
320
- }
321
- const ourSpan = {
322
- id: spanId,
323
- traceId,
324
- parentId: parentCtx && parentCtx.traceId === traceId ? parentCtx.spanId : void 0,
325
- name: span.name,
326
- kind: readKind(span.attributes),
327
- startTime: hrTimeToMs(span.startTime),
328
- attributes: { ...span.attributes },
329
- ...llmAndPrompt(span.attributes)
330
- };
331
- const stored = await this.addOrUpdateSpan(ourSpan);
332
- this.emitStream(traceId, {
333
- type: "span-start",
334
- span: stored
335
- });
336
- }
337
- async handleEnd(span) {
338
- const ctx = span.spanContext();
339
- const traceId = ctx.traceId;
340
- const ended = {
341
- id: ctx.spanId,
342
- traceId,
343
- parentId: span.parentSpanContext && span.parentSpanContext.traceId === traceId ? span.parentSpanContext.spanId : void 0,
344
- name: span.name,
345
- kind: readKind(span.attributes),
346
- startTime: hrTimeToMs(span.startTime),
347
- endTime: hrTimeToMs(span.endTime),
348
- status: mapStatus(span.status),
349
- errorMessage: span.status.code === SpanStatusCode.ERROR ? span.status.message : void 0,
350
- attributes: { ...span.attributes },
351
- ...llmAndPrompt(span.attributes)
352
- };
353
- const stored = await this.addOrUpdateSpan(ended);
354
- this.emitStream(traceId, {
355
- type: "span-end",
356
- span: stored
357
- });
358
- if (!stored.parentId) {
359
- const existing = await this.getTraceWithoutSpans(traceId);
360
- if (existing) {
361
- const endedTrace = {
362
- ...existing,
363
- endTime: stored.endTime,
364
- status: stored.status === "error" ? "error" : "ok",
365
- attributes: {
366
- ...existing.attributes,
367
- ...stored.attributes
368
- }
369
- };
370
- await this.addOrUpdateTrace(endedTrace);
371
- this.emitStream(traceId, {
372
- type: "trace-end",
373
- trace: endedTrace
374
- });
375
- this.emitChange({
376
- type: "update",
377
- traceId
378
- });
379
- }
380
- }
381
- }
382
- emitStream(traceId, event) {
383
- const set = this.subscribers.get(traceId);
384
- if (!set) return;
385
- for (const cb of set) try {
386
- cb(event);
387
- } catch (err) {
388
- console.error("Trace subscriber threw:", err);
389
- }
390
- }
391
- emitChange(event) {
392
- for (const cb of this.watchers) try {
393
- cb(event);
394
- } catch (err) {
395
- console.error("Trace watcher threw:", err);
396
- }
397
- }
398
- async drainPendingHandlers() {
399
- while (this.spanPromises.size > 0) await Promise.all([...this.spanPromises.values()]);
400
- }
401
- };
402
- //#endregion
403
- //#region src/trace/memory-trace-provider.ts
404
- /**
405
- * In-memory {@link TraceProvider} populated by OpenTelemetry spans.
406
- *
407
- * Register the processor returned by {@link getSpanProcessor} on a
408
- * `BasicTracerProvider` (from `@opentelemetry/sdk-trace-base`).
409
- */
410
- var MemoryTraceProvider = class extends BaseOTelTraceProvider {
411
- traces = /* @__PURE__ */ new Map();
412
- spansByTrace = /* @__PURE__ */ new Map();
413
- constructor({ id = "memory", displayName = "In-Memory Traces", description = "Stores OpenTelemetry spans in memory for the current process." } = {}) {
414
- super({
415
- id,
416
- displayName,
417
- description
418
- });
419
- }
420
- async getAllTraces() {
421
- const summaries = Array.from(this.traces.values()).map((t) => ({
422
- id: t.id,
423
- providerId: this.id,
424
- name: t.name,
425
- startTime: t.startTime,
426
- endTime: t.endTime,
427
- status: t.status,
428
- spanCount: this.spansByTrace.get(t.id)?.length ?? 0
429
- }));
430
- summaries.sort((a, b) => b.startTime - a.startTime);
431
- return summaries;
432
- }
433
- async hasTrace(traceId) {
434
- return this.traces.has(traceId);
435
- }
436
- async getTraceWithoutSpans(traceId) {
437
- return this.traces.get(traceId);
438
- }
439
- async getTraceSpans(traceId) {
440
- return this.spansByTrace.get(traceId) ?? [];
441
- }
442
- async addOrUpdateTrace(trace) {
443
- this.traces.set(trace.id, trace);
444
- }
445
- async addOrUpdateSpan(span) {
446
- let list = this.spansByTrace.get(span.traceId);
447
- if (!list) {
448
- list = [];
449
- this.spansByTrace.set(span.traceId, list);
450
- }
451
- const idx = list.findIndex((s) => s.id === span.id);
452
- if (idx >= 0) {
453
- const merged = mergeSpans(list[idx], span);
454
- list[idx] = merged;
455
- return merged;
456
- }
457
- list.push(span);
458
- return span;
459
- }
460
- };
461
- //#endregion
462
- //#region src/shared/setup-task.ts
463
- /**
464
- * Shared, dependency-free types describing the onboarding "setup tasks" a user
465
- * can run to wire up an AI SDK.
466
- *
467
- * This module is imported by both the browser client (to render the
468
- * manual-setup picker) and the server (to define and execute the tasks), so it
469
- * must stay free of any Node- or DOM-specific imports.
470
- */
471
- /** Path, relative to the project root, where evalution looks for its config. */
472
- const CONFIG_FILE_RELATIVE_PATH = ".evalution/config.ts";
473
- /**
474
- * The shell command a run-style step executes. `install_package` steps map to
475
- * `npm i <package>`; `run_command` steps carry their command verbatim.
476
- */
477
- function setupStepCommand(step) {
478
- return step.kind === "install_package" ? `npm i ${step.package}` : step.command;
479
- }
480
- //#endregion
481
- //#region src/sdk/sdk-adapter.ts
482
- /**
483
- * Walk up the directory tree from both `rootDir` and `process.cwd()` looking
484
- * for `node_modules/<packageName>/<dtsRelPath>`.
485
- */
486
- function findPackageDts(packageName, dtsRelPath, rootDir) {
487
- const seen = /* @__PURE__ */ new Set();
488
- for (const start of [rootDir, process.cwd()]) {
489
- let dir = start;
490
- while (!seen.has(dir)) {
491
- seen.add(dir);
492
- const candidate = path.join(dir, "node_modules", packageName, dtsRelPath);
493
- try {
494
- fs.accessSync(candidate);
495
- return candidate;
496
- } catch {}
497
- const parent = path.dirname(dir);
498
- if (parent === dir) break;
499
- dir = parent;
500
- }
501
- }
502
- return null;
503
- }
504
- //#endregion
505
- //#region src/sdk/vercel-ai-sdk.ts
506
- const MODEL_KEY = "model";
507
- const SYSTEM_KEY = "system";
508
- const MESSAGES_KEY = "messages";
509
- const RESERVED_KEYS = new Set([
510
- MODEL_KEY,
511
- SYSTEM_KEY,
512
- MESSAGES_KEY
513
- ]);
514
- const FALLBACK_CALL_SETTINGS_PARAMS = [
515
- {
516
- name: "maxOutputTokens",
517
- description: "Maximum number of tokens to generate.",
518
- type: {
519
- kind: "primitive",
520
- syntax: "number"
521
- },
522
- optional: true
523
- },
524
- {
525
- name: "temperature",
526
- description: "Temperature setting. The value is passed through to the provider. The range depends on the provider and model.",
527
- type: {
528
- kind: "primitive",
529
- syntax: "number"
530
- },
531
- optional: true
532
- },
533
- {
534
- name: "topP",
535
- description: "Nucleus sampling. The value is passed through to the provider. The range depends on the provider and model.",
536
- type: {
537
- kind: "primitive",
538
- syntax: "number"
539
- },
540
- optional: true
541
- },
542
- {
543
- name: "topK",
544
- description: "Only sample from the top K options for each subsequent token.",
545
- type: {
546
- kind: "primitive",
547
- syntax: "number"
548
- },
549
- optional: true
550
- },
551
- {
552
- name: "presencePenalty",
553
- description: "Presence penalty setting. It affects the likelihood of the model to repeat information that is already in the prompt.",
554
- type: {
555
- kind: "primitive",
556
- syntax: "number"
557
- },
558
- optional: true
559
- },
560
- {
561
- name: "frequencyPenalty",
562
- description: "Frequency penalty setting. It affects the likelihood of the model to repeatedly use the same words or phrases.",
563
- type: {
564
- kind: "primitive",
565
- syntax: "number"
566
- },
567
- optional: true
568
- },
569
- {
570
- name: "stopSequences",
571
- description: "Stop sequences. If set, the model will stop generating text.",
572
- type: {
573
- kind: "array",
574
- syntax: "string[]",
575
- elementType: {
576
- kind: "primitive",
577
- syntax: "string"
578
- }
579
- },
580
- optional: true
581
- },
582
- {
583
- name: "seed",
584
- description: "The seed (integer) to use for random sampling.",
585
- type: {
586
- kind: "primitive",
587
- syntax: "number"
588
- },
589
- optional: true
590
- },
591
- {
592
- name: "maxRetries",
593
- description: "Maximum number of retries. Set to 0 to disable retries.",
594
- type: {
595
- kind: "primitive",
596
- syntax: "number"
597
- },
598
- optional: true
599
- }
600
- ];
601
- /** The `prompts()` factory from `@evalution/vercel-ai-sdk`. */
602
- const PROMPTS_HELPER_CALL = {
603
- callee: "prompts",
604
- import: {
605
- name: "prompts",
606
- from: "@evalution/vercel-ai-sdk"
607
- }
608
- };
609
- /** Build the binding-candidate array for a provider function call. */
610
- function providerBinding(provider) {
611
- return [{
612
- kind: "parameter",
613
- enclosingCall: PROMPTS_HELPER_CALL
614
- }, {
615
- kind: "import",
616
- spec: {
617
- name: provider,
618
- from: `@ai-sdk/${provider}`
619
- }
620
- }];
621
- }
622
- /** Build a {@link ModelInfo} entry from group, label, provider, and model ID. */
623
- function model(group, label, provider, modelId) {
624
- const id = `${provider}/${modelId}`;
625
- return {
626
- id,
627
- label,
628
- group,
629
- values: {
630
- function: {
631
- kind: "functionCall",
632
- callee: provider,
633
- args: [{
634
- kind: "primitive",
635
- value: modelId
636
- }],
637
- binding: providerBinding(provider)
638
- },
639
- string: {
640
- kind: "primitive",
641
- value: id
642
- }
643
- }
644
- };
645
- }
646
- /** Build a custom-value template entry for a provider (used in `groups.{provider}.customValueTemplates.function`). */
647
- function customValueTemplate(provider) {
648
- return {
649
- kind: "functionCall",
650
- callee: provider,
651
- args: [{
652
- kind: "primitive",
653
- value: "$input"
654
- }],
655
- binding: providerBinding(provider)
656
- };
657
- }
658
- /** Starter contents of `.evalution/config.ts` for the Vercel AI SDK. */
659
- const CONFIG_FILE_CONTENTS = `import type { EvalutionConfig } from 'evalution';
660
- import { FilePromptProvider, VercelAISDK } from 'evalution';
661
-
662
- export default {
663
- promptProviders: [
664
- new FilePromptProvider({
665
- sdk: new VercelAISDK(),
666
- }),
667
- ],
668
- } satisfies EvalutionConfig;
669
- `;
670
- /**
671
- * {@link SDKAdapter} implementation for the
672
- * [Vercel AI SDK](https://sdk.vercel.ai/).
673
- *
674
- * - `getModelParameters` reads `CallSettings` from the SDK's `.d.ts` bundle
675
- * and surfaces parameters with simple types that can be edited in the UI.
676
- * - `executeConfig` delegates to `generateText`.
677
- */
678
- var VercelAISDK = class {
679
- promptsHelperImport = PROMPTS_HELPER_CALL.import.from;
680
- /**
681
- * Onboarding task: install the SDK package, then drop a starter config.
682
- * @internal
683
- */
684
- static setupTask = {
685
- id: "vercel-ai-sdk",
686
- label: "AI SDK",
687
- icon: "vercel",
688
- steps: [
689
- {
690
- kind: "install_package",
691
- id: "install-ai",
692
- package: "ai"
693
- },
694
- {
695
- kind: "install_package",
696
- id: "install-evalution-vercel-ai-sdk",
697
- package: "@evalution/vercel-ai-sdk"
698
- },
699
- {
700
- kind: "create_config",
701
- id: "create-config",
702
- path: CONFIG_FILE_RELATIVE_PATH,
703
- contents: CONFIG_FILE_CONTENTS
704
- }
705
- ]
706
- };
707
- getModelCatalog() {
708
- return Promise.resolve({
709
- modelValueTypes: {
710
- function: {
711
- label: "Provider",
712
- description: "Call provider function (e.g. openai(\"gpt-4o\"))"
713
- },
714
- string: {
715
- label: "Gateway",
716
- description: "Use a gateway model string (e.g. \"openai/gpt-4o\")"
717
- }
718
- },
719
- groups: {
720
- OpenAI: { customValueTemplates: { function: customValueTemplate("openai") } },
721
- Anthropic: { customValueTemplates: { function: customValueTemplate("anthropic") } },
722
- Google: { customValueTemplates: { function: customValueTemplate("google") } }
723
- },
724
- models: [
725
- model("OpenAI", "GPT-5.5 Pro", "openai", "gpt-5.5-pro"),
726
- model("OpenAI", "GPT-5.5", "openai", "gpt-5.5"),
727
- model("OpenAI", "GPT-5.4 Pro", "openai", "gpt-5.4-pro"),
728
- model("OpenAI", "GPT-5.4", "openai", "gpt-5.4"),
729
- model("OpenAI", "GPT-5.4 mini", "openai", "gpt-5.4-mini"),
730
- model("OpenAI", "GPT-5.4 nano", "openai", "gpt-5.4-nano"),
731
- model("Anthropic", "Claude Opus 4.8", "anthropic", "claude-opus-4-8"),
732
- model("Anthropic", "Claude Sonnet 4.6", "anthropic", "claude-sonnet-4-6"),
733
- model("Anthropic", "Claude Haiku 4.5", "anthropic", "claude-haiku-4-5"),
734
- model("Google", "Gemini 3.5 Flash", "google", "gemini-3.5-flash"),
735
- model("Google", "Gemini 3.1 Pro Preview", "google", "gemini-3.1-pro-preview"),
736
- model("Google", "Gemini 3.1 Flash-Lite", "google", "gemini-3.1-flash-lite")
737
- ]
738
- });
739
- }
740
- getModelParameters(rootDir) {
741
- try {
742
- const dtsPath = findPackageDts("ai", "dist/index.d.ts", rootDir);
743
- if (dtsPath) {
744
- const sourceText = fs.readFileSync(dtsPath, "utf-8");
745
- const sourceFile = ts.createSourceFile(dtsPath, sourceText, ts.ScriptTarget.Latest, true);
746
- const decl = findTypeDeclaration(sourceFile, "CallSettings");
747
- if (decl) return extractPropertiesFromDeclaration(decl, sourceFile).definitions;
748
- }
749
- } catch {}
750
- return FALLBACK_CALL_SETTINGS_PARAMS;
751
- }
752
- async executeConfig(config) {
753
- await generateText(config);
754
- }
755
- normalizePrompt(prompt) {
756
- const { definitions, values } = prompt.extractedProps;
757
- const modelValue = values?.[MODEL_KEY];
758
- const systemValue = values?.[SYSTEM_KEY];
759
- const messagesValue = values?.[MESSAGES_KEY];
760
- const modelParameters = definitions.filter((d) => !RESERVED_KEYS.has(d.name)).map((def) => {
761
- const value = values?.[def.name];
762
- return {
763
- def,
764
- value,
765
- editable: value ? isEditable(value) : true
766
- };
767
- });
768
- return {
769
- id: prompt.id,
770
- providerId: prompt.providerId,
771
- globalId: prompt.globalId,
772
- name: prompt.name,
773
- functionParameters: prompt.functionParameters,
774
- metadata: prompt.metadata,
775
- treePath: prompt.treePath,
776
- model: modelValue,
777
- modelEditable: modelValue ? isEditable(modelValue) : true,
778
- system: systemValue,
779
- systemEditable: systemValue ? isEditable(systemValue) : true,
780
- messages: extractMessages(messagesValue),
781
- messagesEditable: messagesValue ? isEditable(messagesValue) : true,
782
- modelParameters
783
- };
784
- }
785
- denormalizeUpdates(updates, _currentValues) {
786
- const out = {};
787
- if (MODEL_KEY in updates) out[MODEL_KEY] = updates.model ?? null;
788
- if (SYSTEM_KEY in updates) out[SYSTEM_KEY] = updates.system ?? null;
789
- if (MESSAGES_KEY in updates) out[MESSAGES_KEY] = updates.messages === null || updates.messages === void 0 ? null : messagesToValue(updates.messages);
790
- if (updates.modelParameters) for (const [name, value] of Object.entries(updates.modelParameters)) out[name] = value;
791
- return out;
792
- }
793
- };
794
- function messagesToValue(msgs) {
795
- return {
796
- kind: "array",
797
- elements: msgs.map((msg) => ({
798
- kind: "object",
799
- properties: {
800
- role: {
801
- kind: "primitive",
802
- value: msg.role
803
- },
804
- content: msg.content
805
- }
806
- }))
807
- };
808
- }
809
- const EMPTY_CONTENT = {
810
- kind: "primitive",
811
- value: ""
812
- };
813
- function extractMessages(value) {
814
- if (!value) return [];
815
- if (value.kind !== "array") return [{
816
- role: "user",
817
- content: value
818
- }];
819
- return value.elements.map((el) => {
820
- if (el.kind !== "object") return {
821
- role: "user",
822
- content: el
823
- };
824
- const roleValue = el.properties.role;
825
- const role = roleValue?.kind === "primitive" ? String(roleValue.value) : "user";
826
- const content = el.properties.content ?? EMPTY_CONTENT;
827
- const toolCalls = extractToolCalls(el.properties.toolCalls);
828
- return toolCalls ? {
829
- role,
830
- content,
831
- toolCalls
832
- } : {
833
- role,
834
- content
835
- };
836
- });
837
- }
838
- function extractToolCalls(value) {
839
- if (value?.kind !== "array") return void 0;
840
- const out = [];
841
- for (const el of value.elements) {
842
- if (el.kind !== "object") continue;
843
- const name = el.properties.toolName;
844
- const args = el.properties.args;
845
- out.push({
846
- toolName: name?.kind === "primitive" ? String(name.value) : "",
847
- args: args?.kind === "primitive" ? String(args.value) : ""
848
- });
849
- }
850
- return out.length > 0 ? out : void 0;
851
- }
852
- //#endregion
853
- export { MemoryTraceProvider as a, PROMPT_NAME_ATTRIBUTE as c, createTracerForPrompt as d, getPromptSpanAttributes as f, setupStepCommand as i, PROMPT_PROVIDER_ID_ATTRIBUTE as l, findPackageDts as n, PROMPT_ID_ATTRIBUTE as o, isEditable as p, CONFIG_FILE_RELATIVE_PATH as r, PROMPT_INPUTS_ATTRIBUTE as s, VercelAISDK as t, SPAN_KIND_ATTRIBUTE as u };