evalution 1.0.5 → 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.
- package/LICENSING.md +15 -1
- package/README.md +1 -0
- package/dist/check-BTg6THHB.d.ts +1925 -0
- package/dist/checks/index.d.ts +71 -0
- package/dist/checks/index.js +2 -0
- package/dist/checks-Cq97JU-h.js +309 -0
- package/dist/cli/index.js +5318 -347
- package/dist/client/assets/DatasetView-BcYR5beY.css +1 -0
- package/dist/client/assets/DatasetView-CyX0mCj8.js +15 -0
- package/dist/client/assets/EvalRunView-5IZp_6Ob.js +2 -0
- package/dist/client/assets/EvalView-DBTK6rCe.js +1 -0
- package/dist/client/assets/abap-BdImnpbu.js +1 -0
- package/dist/client/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/client/assets/ada-bCR0ucgS.js +1 -0
- package/dist/client/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/client/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/client/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/client/assets/apache-Pmp26Uib.js +1 -0
- package/dist/client/assets/apex-D8_7TLub.js +1 -0
- package/dist/client/assets/apl-dKokRX4l.js +1 -0
- package/dist/client/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/client/assets/ara-BRHolxvo.js +1 -0
- package/dist/client/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/client/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/client/assets/astro-CbQHKStN.js +1 -0
- package/dist/client/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/client/assets/awk-DMzUqQB5.js +1 -0
- package/dist/client/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/client/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/client/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/client/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/client/assets/bat-BkioyH1T.js +1 -0
- package/dist/client/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/client/assets/berry-uYugtg8r.js +1 -0
- package/dist/client/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/client/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/client/assets/bird2-DPOp833l.js +1 -0
- package/dist/client/assets/blade-D4QpJJKB.js +1 -0
- package/dist/client/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/client/assets/c-BIGW1oBm.js +1 -0
- package/dist/client/assets/c3-eo99z4R2.js +1 -0
- package/dist/client/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/client/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/client/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/client/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/client/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/client/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/client/assets/clarity-D53aC0YG.js +1 -0
- package/dist/client/assets/clojure-P80f7IUj.js +1 -0
- package/dist/client/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/client/assets/cobol-nwyudZeR.js +1 -0
- package/dist/client/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/client/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/client/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/client/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/client/assets/coq-DkFqJrB1.js +1 -0
- package/dist/client/assets/cpp-CofmeUqb.js +1 -0
- package/dist/client/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/client/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/client/assets/css-DPfMkruS.js +1 -0
- package/dist/client/assets/csv-fuZLfV_i.js +1 -0
- package/dist/client/assets/cue-D82EKSYY.js +1 -0
- package/dist/client/assets/cypher-COkxafJQ.js +1 -0
- package/dist/client/assets/d-85-TOEBH.js +1 -0
- package/dist/client/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/client/assets/dart-CF10PKvl.js +1 -0
- package/dist/client/assets/data-grid-overlay-editor-CBtkQufd.js +1 -0
- package/dist/client/assets/dax-CEL-wOlO.js +1 -0
- package/dist/client/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/client/assets/diff-D97Zzqfu.js +1 -0
- package/dist/client/assets/docker-BcOcwvcX.js +1 -0
- package/dist/client/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/client/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/client/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/client/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/client/assets/edge-BkV0erSs.js +1 -0
- package/dist/client/assets/elixir-CDX3lj18.js +1 -0
- package/dist/client/assets/elm-DbKCFpqz.js +1 -0
- package/dist/client/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/client/assets/erb-B12qg9BL.js +1 -0
- package/dist/client/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/client/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/client/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/client/assets/fennel-BYunw83y.js +1 -0
- package/dist/client/assets/fish-BvzEVeQv.js +1 -0
- package/dist/client/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/client/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/client/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/client/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/client/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/client/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/client/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/client/assets/genie-D0YGMca9.js +1 -0
- package/dist/client/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/client/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/client/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/client/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/client/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/client/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/client/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/client/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/client/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/client/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/client/assets/gleam-BspZqrRM.js +1 -0
- package/dist/client/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/client/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/client/assets/glsl-DplSGwfg.js +1 -0
- package/dist/client/assets/gn-n2N0HUVH.js +1 -0
- package/dist/client/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/client/assets/go-CxLEBnE3.js +1 -0
- package/dist/client/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/client/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/client/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/client/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/client/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/client/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/client/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/client/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/client/assets/hack-CaT9iCJl.js +1 -0
- package/dist/client/assets/haml-B8DHNrY2.js +1 -0
- package/dist/client/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/client/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/client/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/client/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/client/assets/highlighted-body-KPVGNVTW-DyudWmoO.js +1 -0
- package/dist/client/assets/hjson-D5-asLiD.js +1 -0
- package/dist/client/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/client/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/client/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/dist/client/assets/houston-DnULxvSX.js +1 -0
- package/dist/client/assets/html-GMplVEZG.js +1 -0
- package/dist/client/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/client/assets/http-jrhK8wxY.js +1 -0
- package/dist/client/assets/hurl-irOxFIW8.js +1 -0
- package/dist/client/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/client/assets/hy-DFXneXwc.js +1 -0
- package/dist/client/assets/imba-DGztddWO.js +1 -0
- package/dist/client/assets/index-B7OFMd2c.css +32 -0
- package/dist/client/assets/index-aypgoZcG.js +701 -0
- package/dist/client/assets/ini-BEwlwnbL.js +1 -0
- package/dist/client/assets/java-CylS5w8V.js +1 -0
- package/dist/client/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/client/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/client/assets/jison-wvAkD_A8.js +1 -0
- package/dist/client/assets/json-Cp-IABpG.js +1 -0
- package/dist/client/assets/json5-C9tS-k6U.js +1 -0
- package/dist/client/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/client/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/client/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/client/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/client/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/client/assets/julia-CxzCAyBv.js +1 -0
- package/dist/client/assets/just-Cw27pwNe.js +1 -0
- package/dist/client/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/client/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/client/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/client/assets/kdl-DV7GczEv.js +1 -0
- package/dist/client/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/client/assets/kusto-DZf3V79B.js +1 -0
- package/dist/client/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/client/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/client/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/client/assets/less-B1dDrJ26.js +1 -0
- package/dist/client/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/client/assets/liquid-DYVedYrR.js +1 -0
- package/dist/client/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/client/assets/log-2UxHyX5q.js +1 -0
- package/dist/client/assets/logo-BtOb2qkB.js +1 -0
- package/dist/client/assets/lua-BaeVxFsk.js +1 -0
- package/dist/client/assets/luau-C-HG3fhB.js +1 -0
- package/dist/client/assets/make-CHLpvVh8.js +1 -0
- package/dist/client/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/client/assets/marko-CnJfTvn9.js +1 -0
- package/dist/client/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/client/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/client/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/client/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/client/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/client/assets/matlab-D7o27uSR.js +1 -0
- package/dist/client/assets/mdc-BMNejdWA.js +1 -0
- package/dist/client/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/client/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/client/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/client/assets/min-light-CTRr51gU.js +1 -0
- package/dist/client/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/client/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/client/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/client/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/client/assets/move-IF9eRakj.js +1 -0
- package/dist/client/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/client/assets/nextflow-Zz6hmt5N.js +1 -0
- package/dist/client/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/dist/client/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/client/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/client/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/client/assets/nim-CVrawwO9.js +1 -0
- package/dist/client/assets/nix-CwoSXNpI.js +1 -0
- package/dist/client/assets/nord-Ddv68eIx.js +1 -0
- package/dist/client/assets/number-overlay-editor-CXHiTLsp.js +9 -0
- package/dist/client/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/client/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/client/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/client/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/client/assets/odin-BBf5iR-q.js +1 -0
- package/dist/client/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/client/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/client/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/client/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/client/assets/perl-C0TMdlhV.js +1 -0
- package/dist/client/assets/php-Dhbhpdrm.js +1 -0
- package/dist/client/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/client/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/client/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/client/assets/po-BTJTHyun.js +1 -0
- package/dist/client/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/client/assets/polar-C0HS_06l.js +1 -0
- package/dist/client/assets/postcss-CXtECtnM.js +1 -0
- package/dist/client/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/client/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/client/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/client/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/client/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/client/assets/pug-CGlum2m_.js +1 -0
- package/dist/client/assets/puppet-BMWR74SV.js +1 -0
- package/dist/client/assets/purescript-CklMAg4u.js +1 -0
- package/dist/client/assets/python-B6aJPvgy.js +1 -0
- package/dist/client/assets/qml-3beO22l8.js +1 -0
- package/dist/client/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/client/assets/qss-IeuSbFQv.js +1 -0
- package/dist/client/assets/r-Dspwwk_N.js +1 -0
- package/dist/client/assets/racket-BqYA7rlc.js +1 -0
- package/dist/client/assets/raku-DXvB9xmW.js +1 -0
- package/dist/client/assets/razor-Uh8Bk_45.js +1 -0
- package/dist/client/assets/red-bN70gL4F.js +1 -0
- package/dist/client/assets/reg-C-SQnVFl.js +1 -0
- package/dist/client/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/client/assets/rel-C3B-1QV4.js +1 -0
- package/dist/client/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/client/assets/ron-D8l8udqQ.js +1 -0
- package/dist/client/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/client/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/client/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/client/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/client/assets/rst-BrH8l1NY.js +1 -0
- package/dist/client/assets/ruby-Dw2BHqvy.js +1 -0
- package/dist/client/assets/rust-B1yitclQ.js +1 -0
- package/dist/client/assets/sas-cz2c8ADy.js +1 -0
- package/dist/client/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/client/assets/scala-C151Ov-r.js +1 -0
- package/dist/client/assets/scheme-C98Dy4si.js +1 -0
- package/dist/client/assets/scss-OYdSNvt2.js +1 -0
- package/dist/client/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/client/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/client/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/client/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/client/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/client/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/client/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/client/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/client/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/client/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/client/assets/solidity-rGO070M0.js +1 -0
- package/dist/client/assets/soy-Brmx7dQM.js +1 -0
- package/dist/client/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/client/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/client/assets/sql-BLtJtn59.js +1 -0
- package/dist/client/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/client/assets/stata-BH5u7GGu.js +1 -0
- package/dist/client/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/client/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/client/assets/svelte-C_ipcX3V.js +1 -0
- package/dist/client/assets/swift-D82vCrfD.js +1 -0
- package/dist/client/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/client/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/client/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/client/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/client/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/client/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/client/assets/templ-P3uqSqPl.js +1 -0
- package/dist/client/assets/terraform-BETggiCN.js +1 -0
- package/dist/client/assets/tex-idrVyKtj.js +1 -0
- package/dist/client/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/client/assets/toml-vGWfd6FD.js +1 -0
- package/dist/client/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/client/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/client/assets/tsx-COt5Ahok.js +1 -0
- package/dist/client/assets/turtle-BsS91CYL.js +1 -0
- package/dist/client/assets/twig-DNn4PbVi.js +1 -0
- package/dist/client/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/client/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/client/assets/typst-DHCkPAjA.js +1 -0
- package/dist/client/assets/v-BcVCzyr7.js +1 -0
- package/dist/client/assets/vala-CsfeWuGM.js +1 -0
- package/dist/client/assets/vb-D17OF-Vu.js +1 -0
- package/dist/client/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/client/assets/vesper-DU1UobuO.js +1 -0
- package/dist/client/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/client/assets/viml-CJc9bBzg.js +1 -0
- package/dist/client/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/client/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/client/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/client/assets/vue-DN_0RTcg.js +1 -0
- package/dist/client/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/client/assets/vue-vine-CQOfvN7w.js +1 -0
- package/dist/client/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/client/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/client/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/client/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/client/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/client/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/client/assets/wit-5i3qLPDT.js +1 -0
- package/dist/client/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/client/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/client/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/client/assets/yaml-Buea-lGh.js +1 -0
- package/dist/client/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/client/assets/zig-VOosw3JB.js +1 -0
- package/dist/client/index.html +2 -2
- package/dist/dataset-types-CSjbM_Vz.d.ts +564 -0
- package/dist/index.d.ts +3607 -934
- package/dist/index.js +3648 -604
- package/dist/instance-names-pVQxJbtw.js +12 -0
- package/dist/otlp-trace-ingestor-V8_bbpUG.js +12376 -0
- package/dist/runtime-DCNx7dHI.js +302 -0
- package/dist/trace-Dn6Pfcc5.d.ts +200 -0
- package/dist/views/datasets/index.d.ts +68 -0
- package/dist/views/datasets/index.js +237 -0
- package/dist/views/index.d.ts +98 -0
- package/dist/views/index.js +156 -0
- package/dist/views/react/index.d.ts +55 -0
- package/dist/views/react/index.js +246 -0
- package/package.json +60 -9
- package/dist/client/assets/index-BAk2IWAg.js +0 -144
- package/dist/client/assets/index-CHPZsnKo.css +0 -32
- package/dist/vercel-ai-sdk-JhQ1efcg.js +0 -1236
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
//#region src/views/protocol.ts
|
|
2
|
+
/**
|
|
3
|
+
* The messages a view's frame and its host exchange by `postMessage`: a
|
|
4
|
+
* generic envelope, whose payloads each surface narrows. Imported by both
|
|
5
|
+
* sides. See `specs/trace-visualizers.md` §C.1.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* The protocol's version. A host that gets a `ready` with a version it
|
|
9
|
+
* doesn't speak asks for the view to be rebuilt rather than guessing.
|
|
10
|
+
*/
|
|
11
|
+
const PROTOCOL = 1;
|
|
12
|
+
function isRecord(value) {
|
|
13
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
14
|
+
}
|
|
15
|
+
/** `data` as a {@link HostMessage}, or `undefined` if it isn't one. */
|
|
16
|
+
function parseHostMessage(data) {
|
|
17
|
+
if (!isRecord(data) || typeof data.type !== "string") return void 0;
|
|
18
|
+
switch (data.type) {
|
|
19
|
+
case "init":
|
|
20
|
+
case "subject":
|
|
21
|
+
case "event":
|
|
22
|
+
case "context": return typeof data.rev === "number" ? data : void 0;
|
|
23
|
+
case "theme": return isRecord(data.theme) ? data : void 0;
|
|
24
|
+
case "rejected": return typeof data.reason === "string" ? data : void 0;
|
|
25
|
+
default: return;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//#region src/views/view.ts
|
|
30
|
+
/**
|
|
31
|
+
* Marks a definition as a view, and carries the surface it was made for.
|
|
32
|
+
* A global symbol, so a view made by one copy of the runtime is still
|
|
33
|
+
* recognised by another.
|
|
34
|
+
*/
|
|
35
|
+
const VIEW_TAG = Symbol.for("evalution.view");
|
|
36
|
+
/** Whether `value` is a view made by a surface helper. */
|
|
37
|
+
function isView(value) {
|
|
38
|
+
return typeof value === "object" && value !== null && VIEW_TAG in value && typeof value.applies === "function" && typeof value.mount === "function";
|
|
39
|
+
}
|
|
40
|
+
/** Tags `definition` with `surface`. What each surface's helper calls. */
|
|
41
|
+
function defineView(surface, definition) {
|
|
42
|
+
return {
|
|
43
|
+
...definition,
|
|
44
|
+
[VIEW_TAG]: surface
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/views/runtime.ts
|
|
49
|
+
/**
|
|
50
|
+
* The frame side of a view: answers the host's handshake, keeps the subject
|
|
51
|
+
* up to date through the surface's reducer, runs `applies`, and mounts and
|
|
52
|
+
* updates the view with errors caught. Bundled into every view's frame. It
|
|
53
|
+
* imports no framework and knows no surface by name: the view carries its
|
|
54
|
+
* own surface (`VIEW_TAG`). See `specs/trace-visualizers.md` §C.
|
|
55
|
+
*/
|
|
56
|
+
/** The frame's state before `init`. */
|
|
57
|
+
const INITIAL_FRAME_STATE = {
|
|
58
|
+
rev: 0,
|
|
59
|
+
mounted: false
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The frame's handling of one host message, as a pure function: the next
|
|
63
|
+
* state, the messages to send back, and what to do to the view. `applies`
|
|
64
|
+
* is called here, since it's pure; `mount` and `update` are left to the
|
|
65
|
+
* caller as effects.
|
|
66
|
+
*/
|
|
67
|
+
function frameStep(view, state, message) {
|
|
68
|
+
const surface = view[VIEW_TAG];
|
|
69
|
+
const out = [];
|
|
70
|
+
const effects = [];
|
|
71
|
+
/** Re-asks `applies` after the subject changed, and mounts or unmounts. */
|
|
72
|
+
const reevaluate = (next) => {
|
|
73
|
+
let value;
|
|
74
|
+
try {
|
|
75
|
+
value = !!view.applies(next.known.subject);
|
|
76
|
+
} catch (err) {
|
|
77
|
+
out.push({
|
|
78
|
+
type: "error",
|
|
79
|
+
message: errorMessage(err),
|
|
80
|
+
during: "applies"
|
|
81
|
+
});
|
|
82
|
+
value = false;
|
|
83
|
+
}
|
|
84
|
+
if (value !== next.applies) out.push({
|
|
85
|
+
type: "applies",
|
|
86
|
+
value
|
|
87
|
+
});
|
|
88
|
+
if (value && !next.mounted) effects.push({ kind: "mount" });
|
|
89
|
+
else if (value) effects.push({ kind: "update" });
|
|
90
|
+
else if (next.mounted) effects.push({ kind: "unmount" });
|
|
91
|
+
return {
|
|
92
|
+
...next,
|
|
93
|
+
applies: value,
|
|
94
|
+
mounted: value
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
switch (message.type) {
|
|
98
|
+
case "init":
|
|
99
|
+
effects.push({
|
|
100
|
+
kind: "theme",
|
|
101
|
+
theme: message.theme
|
|
102
|
+
});
|
|
103
|
+
return {
|
|
104
|
+
state: reevaluate({
|
|
105
|
+
...state,
|
|
106
|
+
known: {
|
|
107
|
+
subject: message.subject,
|
|
108
|
+
context: message.context
|
|
109
|
+
},
|
|
110
|
+
rev: message.rev
|
|
111
|
+
}),
|
|
112
|
+
out,
|
|
113
|
+
effects
|
|
114
|
+
};
|
|
115
|
+
case "subject":
|
|
116
|
+
case "event": {
|
|
117
|
+
if (!state.known) return {
|
|
118
|
+
state,
|
|
119
|
+
out,
|
|
120
|
+
effects
|
|
121
|
+
};
|
|
122
|
+
const subject = message.type === "subject" ? message.subject : surface.applyEvent ? surface.applyEvent(state.known.subject, message.event) : state.known.subject;
|
|
123
|
+
return {
|
|
124
|
+
state: reevaluate({
|
|
125
|
+
...state,
|
|
126
|
+
known: {
|
|
127
|
+
...state.known,
|
|
128
|
+
subject
|
|
129
|
+
},
|
|
130
|
+
rev: message.rev
|
|
131
|
+
}),
|
|
132
|
+
out,
|
|
133
|
+
effects
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
case "context":
|
|
137
|
+
if (!state.known) return {
|
|
138
|
+
state,
|
|
139
|
+
out,
|
|
140
|
+
effects
|
|
141
|
+
};
|
|
142
|
+
if (state.mounted) effects.push({ kind: "update" });
|
|
143
|
+
return {
|
|
144
|
+
state: {
|
|
145
|
+
...state,
|
|
146
|
+
known: {
|
|
147
|
+
...state.known,
|
|
148
|
+
context: message.context
|
|
149
|
+
},
|
|
150
|
+
rev: message.rev
|
|
151
|
+
},
|
|
152
|
+
out,
|
|
153
|
+
effects
|
|
154
|
+
};
|
|
155
|
+
case "theme":
|
|
156
|
+
effects.push({
|
|
157
|
+
kind: "theme",
|
|
158
|
+
theme: message.theme
|
|
159
|
+
});
|
|
160
|
+
return {
|
|
161
|
+
state,
|
|
162
|
+
out,
|
|
163
|
+
effects
|
|
164
|
+
};
|
|
165
|
+
case "rejected":
|
|
166
|
+
effects.push({
|
|
167
|
+
kind: "rejected",
|
|
168
|
+
name: message.name,
|
|
169
|
+
reason: message.reason
|
|
170
|
+
});
|
|
171
|
+
return {
|
|
172
|
+
state,
|
|
173
|
+
out,
|
|
174
|
+
effects
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
/** The text of whatever was thrown. */
|
|
179
|
+
function errorMessage(err) {
|
|
180
|
+
if (err instanceof Error) return err.message || err.name;
|
|
181
|
+
return String(err);
|
|
182
|
+
}
|
|
183
|
+
/** Where errors reported from inside a view go: the running frame's host. */
|
|
184
|
+
let reportTo;
|
|
185
|
+
/**
|
|
186
|
+
* Tells the host that the view failed to render, for errors the runtime
|
|
187
|
+
* can't catch itself — an adapter's error boundary calls it.
|
|
188
|
+
*/
|
|
189
|
+
function reportViewError(err) {
|
|
190
|
+
reportTo?.(errorMessage(err));
|
|
191
|
+
}
|
|
192
|
+
/** The frame's base styles: full size, themed by the host's tokens. */
|
|
193
|
+
const BASE_CSS = `
|
|
194
|
+
html, body { margin: 0; height: 100%; }
|
|
195
|
+
body {
|
|
196
|
+
background: var(--ev-bg);
|
|
197
|
+
color: var(--ev-fg);
|
|
198
|
+
font: 13px/1.45 var(--ev-font);
|
|
199
|
+
}
|
|
200
|
+
#evalution-view { height: 100%; overflow: auto; box-sizing: border-box; }
|
|
201
|
+
`;
|
|
202
|
+
function applyTheme(root, theme) {
|
|
203
|
+
for (const [name, value] of Object.entries(theme.tokens)) if (name.startsWith("--")) root.style.setProperty(name, value);
|
|
204
|
+
root.style.colorScheme = theme.mode;
|
|
205
|
+
root.dataset.theme = theme.mode;
|
|
206
|
+
}
|
|
207
|
+
/**
|
|
208
|
+
* Runs `value` — a module's default export — as this frame's view on the
|
|
209
|
+
* surface named `surfaceName`. The bundle's entry calls it; a view never
|
|
210
|
+
* does.
|
|
211
|
+
*/
|
|
212
|
+
function start(value, surfaceName) {
|
|
213
|
+
const post = (message) => window.parent.postMessage(message, "*");
|
|
214
|
+
if (!isView(value)) {
|
|
215
|
+
post({
|
|
216
|
+
type: "ready",
|
|
217
|
+
protocol: 1,
|
|
218
|
+
error: value === void 0 ? "This file has no default export. A view is its file's default export, made with its surface's helper, e.g. `export default traceView({ … })`." : "This file's default export isn't a view. Make it with its surface's helper, e.g. `export default traceView({ … })`."
|
|
219
|
+
});
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
const view = value;
|
|
223
|
+
const surface = view[VIEW_TAG];
|
|
224
|
+
if (surface.name !== surfaceName) {
|
|
225
|
+
post({
|
|
226
|
+
type: "ready",
|
|
227
|
+
protocol: 1,
|
|
228
|
+
surface: surface.name,
|
|
229
|
+
error: `This is a ${surface.helper}() view, which belongs in .evalution/views/${surface.name}/, not .evalution/views/${surfaceName}/.`
|
|
230
|
+
});
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
const style = document.createElement("style");
|
|
234
|
+
style.textContent = BASE_CSS;
|
|
235
|
+
document.head.append(style);
|
|
236
|
+
const element = document.createElement("div");
|
|
237
|
+
element.id = "evalution-view";
|
|
238
|
+
document.body.append(element);
|
|
239
|
+
let state = INITIAL_FRAME_STATE;
|
|
240
|
+
let mounted;
|
|
241
|
+
const reportError = (message) => post({
|
|
242
|
+
type: "error",
|
|
243
|
+
message,
|
|
244
|
+
during: "render"
|
|
245
|
+
});
|
|
246
|
+
reportTo = reportError;
|
|
247
|
+
const props = () => surface.props(state.known, (name, args) => post({
|
|
248
|
+
type: "action",
|
|
249
|
+
name,
|
|
250
|
+
args,
|
|
251
|
+
rev: state.rev
|
|
252
|
+
}), { openUrl: (url) => post({
|
|
253
|
+
type: "openUrl",
|
|
254
|
+
url: String(url)
|
|
255
|
+
}) });
|
|
256
|
+
const perform = (effect) => {
|
|
257
|
+
try {
|
|
258
|
+
switch (effect.kind) {
|
|
259
|
+
case "mount":
|
|
260
|
+
case "update":
|
|
261
|
+
if (mounted) mounted.update(props());
|
|
262
|
+
else {
|
|
263
|
+
element.replaceChildren();
|
|
264
|
+
mounted = view.mount(element, props());
|
|
265
|
+
}
|
|
266
|
+
break;
|
|
267
|
+
case "unmount":
|
|
268
|
+
mounted?.unmount?.();
|
|
269
|
+
mounted = void 0;
|
|
270
|
+
element.replaceChildren();
|
|
271
|
+
break;
|
|
272
|
+
case "theme":
|
|
273
|
+
applyTheme(document.documentElement, effect.theme);
|
|
274
|
+
break;
|
|
275
|
+
case "rejected":
|
|
276
|
+
console.warn(`${effect.name} was refused: ${effect.reason}`);
|
|
277
|
+
break;
|
|
278
|
+
}
|
|
279
|
+
} catch (err) {
|
|
280
|
+
reportError(errorMessage(err));
|
|
281
|
+
}
|
|
282
|
+
};
|
|
283
|
+
window.addEventListener("message", (event) => {
|
|
284
|
+
if (event.source !== window.parent) return;
|
|
285
|
+
const message = parseHostMessage(event.data);
|
|
286
|
+
if (!message) return;
|
|
287
|
+
const result = frameStep(view, state, message);
|
|
288
|
+
state = result.state;
|
|
289
|
+
for (const m of result.out) post(m);
|
|
290
|
+
for (const effect of result.effects) perform(effect);
|
|
291
|
+
});
|
|
292
|
+
window.addEventListener("error", (event) => reportError(errorMessage(event.error ?? event.message)));
|
|
293
|
+
window.addEventListener("unhandledrejection", (event) => reportError(errorMessage(event.reason)));
|
|
294
|
+
post({
|
|
295
|
+
type: "ready",
|
|
296
|
+
protocol: 1,
|
|
297
|
+
surface: surface.name,
|
|
298
|
+
...view.label !== void 0 && { label: String(view.label) }
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
//#endregion
|
|
302
|
+
export { isView as a, defineView as i, start as n, PROTOCOL as o, VIEW_TAG as r, reportViewError as t };
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, x as TraceWithSpans } from "./dataset-types-CSjbM_Vz.js";
|
|
2
|
+
|
|
3
|
+
//#region src/views/view.d.ts
|
|
4
|
+
/** What every view is given, whatever its surface. */
|
|
5
|
+
interface ViewProps {
|
|
6
|
+
/**
|
|
7
|
+
* Asks the host to open an http(s) URL in a new tab, which it does after
|
|
8
|
+
* the viewer confirms. A view's frame can't open one itself.
|
|
9
|
+
*/
|
|
10
|
+
openUrl(url: string): void;
|
|
11
|
+
}
|
|
12
|
+
/** A mounted view. */
|
|
13
|
+
interface MountedView<P extends ViewProps> {
|
|
14
|
+
/** Called with the new props whenever the subject or the host's context changes. */
|
|
15
|
+
update(props: P): void;
|
|
16
|
+
/** Called before the view is torn down, or when it stops applying. */
|
|
17
|
+
unmount?(): void;
|
|
18
|
+
}
|
|
19
|
+
/** A view on a surface whose subject is `S`. */
|
|
20
|
+
interface ViewDefinition<S, P extends ViewProps> {
|
|
21
|
+
/** The label the host shows for it (a tab). Defaults to the file name. */
|
|
22
|
+
label?: string;
|
|
23
|
+
/** Whether this subject gets the view. Pure and synchronous: called on every change. */
|
|
24
|
+
applies(subject: S): boolean;
|
|
25
|
+
/** Renders into `element`, which fills the space the host gives it. */
|
|
26
|
+
mount(element: HTMLElement, props: P): MountedView<P>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Marks a definition as a view, and carries the surface it was made for.
|
|
30
|
+
* A global symbol, so a view made by one copy of the runtime is still
|
|
31
|
+
* recognised by another.
|
|
32
|
+
*/
|
|
33
|
+
declare const VIEW_TAG: unique symbol;
|
|
34
|
+
/** A {@link ViewDefinition} tagged with its surface by that surface's helper (`traceView()`, …). */
|
|
35
|
+
interface View<S, P extends ViewProps> extends ViewDefinition<S, P> {
|
|
36
|
+
/** The surface the view was made for. */
|
|
37
|
+
readonly [VIEW_TAG]: Surface<S, unknown, unknown, P>;
|
|
38
|
+
}
|
|
39
|
+
/** Whether `value` is a view made by a surface helper. */
|
|
40
|
+
declare function isView(value: unknown): value is View<unknown, ViewProps>;
|
|
41
|
+
//#endregion
|
|
42
|
+
//#region src/views/surface.d.ts
|
|
43
|
+
/**
|
|
44
|
+
* How a view's request is applied. An *ephemeral* action (select, highlight)
|
|
45
|
+
* is applied directly; an *effectful* one is staged by the host and applied
|
|
46
|
+
* only when the viewer confirms it in host-rendered UI.
|
|
47
|
+
*/
|
|
48
|
+
type ActionEffect = "ephemeral" | "effectful";
|
|
49
|
+
/** What a view on a surface knows: its subject, and the host's context. */
|
|
50
|
+
interface SurfaceState<S, C> {
|
|
51
|
+
subject: S;
|
|
52
|
+
context: C;
|
|
53
|
+
}
|
|
54
|
+
/** One thing a view may ask the host to do. */
|
|
55
|
+
interface SurfaceAction<S, C> {
|
|
56
|
+
/** Whether it's applied directly or staged for the viewer to confirm. */
|
|
57
|
+
effect: ActionEffect;
|
|
58
|
+
/**
|
|
59
|
+
* The host's check of a frame's request, whose `args` are untrusted: why
|
|
60
|
+
* it's refused, or `undefined` to accept it.
|
|
61
|
+
*/
|
|
62
|
+
check(args: unknown, state: SurfaceState<S, C>): string | undefined;
|
|
63
|
+
}
|
|
64
|
+
/** Sends an action from a view to the host. */
|
|
65
|
+
type SendAction = (name: string, args: unknown) => void;
|
|
66
|
+
/**
|
|
67
|
+
* A surface's descriptor: subject `S`, incremental change `E`, host context
|
|
68
|
+
* `C`, and the props `P` its views are given.
|
|
69
|
+
*/
|
|
70
|
+
interface Surface<S, E, C, P extends ViewProps> {
|
|
71
|
+
/** The surface's name, which is also its directory under `.evalution/views/`. */
|
|
72
|
+
readonly name: string;
|
|
73
|
+
/** The helper a view on it is made with (`traceView`), for messages. */
|
|
74
|
+
readonly helper: string;
|
|
75
|
+
/**
|
|
76
|
+
* Applies one incremental change to the subject. A surface whose subject
|
|
77
|
+
* is small leaves it out and has the host resend snapshots instead.
|
|
78
|
+
*/
|
|
79
|
+
applyEvent?(subject: S, event: E): S;
|
|
80
|
+
/**
|
|
81
|
+
* Whether the subject can no longer change, so a view's `applies` answer
|
|
82
|
+
* is final and a frame that doesn't apply can be dropped.
|
|
83
|
+
*/
|
|
84
|
+
isFinal(subject: S): boolean;
|
|
85
|
+
/** What a view may ask the host to do, by name. */
|
|
86
|
+
readonly actions: Readonly<Record<string, SurfaceAction<S, C>>>;
|
|
87
|
+
/**
|
|
88
|
+
* The props a view is given, built in the frame from what it knows.
|
|
89
|
+
* `send` sends one of {@link actions}; `base` carries the actions every
|
|
90
|
+
* view has.
|
|
91
|
+
*/
|
|
92
|
+
props(state: SurfaceState<S, C>, send: SendAction, base: ViewProps): P;
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region src/views/surfaces/datasets.d.ts
|
|
96
|
+
/**
|
|
97
|
+
* What a dataset view's `applies` sees: the dataset and an overview of its
|
|
98
|
+
* rows — never the rows themselves, which are paged and grow without bound.
|
|
99
|
+
*/
|
|
100
|
+
interface DatasetViewSubject {
|
|
101
|
+
dataset: Dataset;
|
|
102
|
+
/** Row count, and what the rows' cells and instances hold. */
|
|
103
|
+
overview: DatasetRowsOverview;
|
|
104
|
+
}
|
|
105
|
+
/** The row a dataset view shows: the one selected in the dataset view. */
|
|
106
|
+
interface SelectedRow {
|
|
107
|
+
/** The row's position, from 0. */
|
|
108
|
+
index: number;
|
|
109
|
+
/** The row, with any unsaved changes the view proposed applied. */
|
|
110
|
+
row: DatasetRow;
|
|
111
|
+
/**
|
|
112
|
+
* The row as it was stored when the view's unsaved changes began. Present
|
|
113
|
+
* only while there are changes (`row` differs from it) and gone once they
|
|
114
|
+
* are saved or discarded, so a view can tell what is unsaved by comparing
|
|
115
|
+
* the two (see `diffRow` in `evalution/views/datasets`).
|
|
116
|
+
*/
|
|
117
|
+
stored?: DatasetRow;
|
|
118
|
+
/** The row's label (`Dataset.rowLabel`), when the dataset names rows. */
|
|
119
|
+
label?: string;
|
|
120
|
+
}
|
|
121
|
+
/** The host state a dataset view is told about. */
|
|
122
|
+
interface DatasetViewContext {
|
|
123
|
+
/** The selected row, or `null` before one is (or when there are none). */
|
|
124
|
+
selected: SelectedRow | null;
|
|
125
|
+
}
|
|
126
|
+
/** What a dataset view is given, on mount and on every update. */
|
|
127
|
+
interface DatasetViewProps extends ViewProps {
|
|
128
|
+
dataset: Dataset;
|
|
129
|
+
overview: DatasetRowsOverview;
|
|
130
|
+
/** The selected row. The host selects one before showing a view's tab. */
|
|
131
|
+
selected: SelectedRow | null;
|
|
132
|
+
/** Asks the host to select another row. */
|
|
133
|
+
selectRow(index: number): void;
|
|
134
|
+
/**
|
|
135
|
+
* Asks the host to show the selected row's resource instance `name` in the
|
|
136
|
+
* details pane — opening the pane if it's closed — scrolled into view and
|
|
137
|
+
* briefly highlighted, as clicking the instance's chip in the pane does.
|
|
138
|
+
* Refused if the stored row declares no such instance.
|
|
139
|
+
*/
|
|
140
|
+
showInstance(name: string): void;
|
|
141
|
+
/**
|
|
142
|
+
* Proposes a change to the selected row. The host stages it in a draft
|
|
143
|
+
* — the view gets the row back with it applied — and saves only when the
|
|
144
|
+
* viewer clicks Save. Build one with `evalution/views/datasets`.
|
|
145
|
+
*/
|
|
146
|
+
proposeUpdate(update: DatasetRowUpdate): void;
|
|
147
|
+
}
|
|
148
|
+
/** A view on the datasets surface. */
|
|
149
|
+
type DatasetViewDefinition = ViewDefinition<DatasetViewSubject, DatasetViewProps>;
|
|
150
|
+
/**
|
|
151
|
+
* Makes a dataset view: a tab beside the Grid for every dataset `applies`
|
|
152
|
+
* says yes to. A file under `.evalution/views/datasets/` default-exports
|
|
153
|
+
* one.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```tsx
|
|
157
|
+
* export default datasetView({
|
|
158
|
+
* label: "Task Hierarchy",
|
|
159
|
+
* applies: ({ overview }) =>
|
|
160
|
+
* Object.values(overview.instances).some(i => i.uri.endsWith("#seededTask")),
|
|
161
|
+
* mount: react(TaskHierarchy),
|
|
162
|
+
* });
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
declare function datasetView(definition: DatasetViewDefinition): View<DatasetViewSubject, DatasetViewProps>;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/views/surfaces/trace.d.ts
|
|
168
|
+
/** The host state a trace view is told about but doesn't own. */
|
|
169
|
+
interface TraceViewContext {
|
|
170
|
+
/** The span selected in the host's details pane, if any. */
|
|
171
|
+
selectedSpanId: string | null;
|
|
172
|
+
}
|
|
173
|
+
/** What a trace view is given, on mount and on every update. */
|
|
174
|
+
interface TraceViewProps extends ViewProps {
|
|
175
|
+
/** The trace so far. Updated as spans arrive while the run is live. */
|
|
176
|
+
trace: TraceWithSpans;
|
|
177
|
+
/** The span selected in the host's details pane, if any. */
|
|
178
|
+
selectedSpanId: string | null;
|
|
179
|
+
/** Asks the host to select a span, which opens it in the details pane. */
|
|
180
|
+
selectSpan(spanId: string): void;
|
|
181
|
+
}
|
|
182
|
+
/** A view on the trace surface. */
|
|
183
|
+
type TraceViewDefinition = ViewDefinition<TraceWithSpans, TraceViewProps>;
|
|
184
|
+
/**
|
|
185
|
+
* Makes a trace view: a tab beside Conversation and Spans for every trace
|
|
186
|
+
* `applies` says yes to. A file under `.evalution/views/traces/` default-
|
|
187
|
+
* exports one.
|
|
188
|
+
*
|
|
189
|
+
* @example
|
|
190
|
+
* ```tsx
|
|
191
|
+
* export default traceView({
|
|
192
|
+
* label: "Tasks",
|
|
193
|
+
* applies: trace => taskChanges(trace).length > 0,
|
|
194
|
+
* mount: react(TaskTree),
|
|
195
|
+
* });
|
|
196
|
+
* ```
|
|
197
|
+
*/
|
|
198
|
+
declare function traceView(definition: TraceViewDefinition): View<TraceWithSpans, TraceViewProps>;
|
|
199
|
+
//#endregion
|
|
200
|
+
export { VIEW_TAG as _, DatasetViewContext as a, ViewProps as b, DatasetViewSubject as c, ActionEffect as d, SendAction as f, MountedView as g, SurfaceState as h, traceView as i, SelectedRow as l, SurfaceAction as m, TraceViewDefinition as n, DatasetViewDefinition as o, Surface as p, TraceViewProps as r, DatasetViewProps as s, TraceViewContext as t, datasetView as u, View as v, isView as x, ViewDefinition as y };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { _ as ResourceInstanceInput, a as ColumnPath, c as PathRow, d as childInputs, f as fieldPath, g as ExecutionInput, h as resolveColumnPath, l as PathValue, m as readColumnPath, n as DatasetRow, o as InstanceArgument, p as instancePath, r as DatasetRowUpdate, s as MAX_REFERENCE_HOPS, u as ResolvedPath } from "../../dataset-types-CSjbM_Vz.js";
|
|
2
|
+
|
|
3
|
+
//#region src/views/datasets/index.d.ts
|
|
4
|
+
/** Where an instance reference sits in a row. */
|
|
5
|
+
type ReferenceSite = /** In a cell, at `path` inside it (empty for the cell itself). */{
|
|
6
|
+
cell: string;
|
|
7
|
+
path: string[];
|
|
8
|
+
} /** In one of an instance's arguments, at `path` inside it. */ | {
|
|
9
|
+
instance: string;
|
|
10
|
+
arg: string;
|
|
11
|
+
path: string[];
|
|
12
|
+
};
|
|
13
|
+
/** One instance reference in a row: from where, to which instance and output. */
|
|
14
|
+
interface Reference {
|
|
15
|
+
from: ReferenceSite;
|
|
16
|
+
/** The instance referred to. */
|
|
17
|
+
to: string;
|
|
18
|
+
/** The output read, if not the instance's value itself. */
|
|
19
|
+
output?: string;
|
|
20
|
+
}
|
|
21
|
+
/** Every instance reference in the row: from where, to which instance and output. */
|
|
22
|
+
declare function references(row: Pick<DatasetRow, "cells" | "resources">): Reference[];
|
|
23
|
+
/** The references in the row to instances it doesn't declare. */
|
|
24
|
+
declare function danglingReferences(row: Pick<DatasetRow, "cells" | "resources">): Reference[];
|
|
25
|
+
/** A reference's site as one line of text, for messages. */
|
|
26
|
+
declare function describeReference(ref: Reference): string;
|
|
27
|
+
/**
|
|
28
|
+
* Adds an instance under a fresh valid name based on `hint` (`"Brand kit"`
|
|
29
|
+
* → `brandKit`, then `brandKit2`, …). Returns the name and the update.
|
|
30
|
+
*/
|
|
31
|
+
declare function addInstance(row: Pick<DatasetRow, "id" | "resources">, instance: ResourceInstanceInput, hint?: string): {
|
|
32
|
+
name: string;
|
|
33
|
+
update: DatasetRowUpdate;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Replaces some of an instance's arguments; `null` removes one.
|
|
37
|
+
*
|
|
38
|
+
* @throws when the row declares no instance `name`.
|
|
39
|
+
*/
|
|
40
|
+
declare function setArgs(row: Pick<DatasetRow, "id" | "resources">, name: string, args: Record<string, ExecutionInput | null>): DatasetRowUpdate;
|
|
41
|
+
/**
|
|
42
|
+
* Removes instances — or, when anything left in the row still refers to
|
|
43
|
+
* one of them (a cell, another instance), reports those references and
|
|
44
|
+
* changes nothing.
|
|
45
|
+
*/
|
|
46
|
+
declare function removeInstances(row: Pick<DatasetRow, "id" | "cells" | "resources">, names: readonly string[]): DatasetRowUpdate | {
|
|
47
|
+
dangling: Reference[];
|
|
48
|
+
};
|
|
49
|
+
/** What differs between two rows for one kind of thing, by name. */
|
|
50
|
+
interface RowChanges {
|
|
51
|
+
/** Names in the new row and not the old one. */
|
|
52
|
+
added: string[];
|
|
53
|
+
/** Names in both whose values differ. */
|
|
54
|
+
changed: string[];
|
|
55
|
+
/** Names in the old row and not the new one. */
|
|
56
|
+
removed: string[];
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* What differs between a row as it's stored and the same row with changes
|
|
60
|
+
* applied (`SelectedRow.stored` and `SelectedRow.row`): its cells, by field
|
|
61
|
+
* id, and its resource instances, by name.
|
|
62
|
+
*/
|
|
63
|
+
declare function diffRow(stored: Pick<DatasetRow, "cells" | "resources">, row: Pick<DatasetRow, "cells" | "resources">): {
|
|
64
|
+
cells: RowChanges;
|
|
65
|
+
resources: RowChanges;
|
|
66
|
+
};
|
|
67
|
+
//#endregion
|
|
68
|
+
export { type ColumnPath, type InstanceArgument, MAX_REFERENCE_HOPS, type PathRow, type PathValue, Reference, ReferenceSite, type ResolvedPath, RowChanges, addInstance, childInputs, danglingReferences, describeReference, diffRow, fieldPath, instancePath, readColumnPath, references, removeInstances, resolveColumnPath, setArgs };
|