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,237 @@
|
|
|
1
|
+
import { t as isValidInstanceName } from "../../instance-names-pVQxJbtw.js";
|
|
2
|
+
//#region src/shared/same-json.ts
|
|
3
|
+
/**
|
|
4
|
+
* Comparing JSON values by what they say, not how they're spelled: two
|
|
5
|
+
* objects with the same keys in another order are the same value.
|
|
6
|
+
*/
|
|
7
|
+
/** Whether `a` and `b` are the same JSON value, whatever their key order. */
|
|
8
|
+
function sameJson(a, b) {
|
|
9
|
+
if (a === b) return true;
|
|
10
|
+
if (typeof a !== "object" || typeof b !== "object" || !a || !b) return false;
|
|
11
|
+
if (Array.isArray(a) !== Array.isArray(b)) return false;
|
|
12
|
+
const ak = Object.keys(a);
|
|
13
|
+
if (ak.length !== Object.keys(b).length) return false;
|
|
14
|
+
return ak.every((k) => Object.hasOwn(b, k) && sameJson(a[k], b[k]));
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
//#region src/shared/column-paths.ts
|
|
18
|
+
/**
|
|
19
|
+
* How many instance references a path may step through before it gives up.
|
|
20
|
+
* A row whose references form a cycle can't run, but nothing stops one from
|
|
21
|
+
* being stored.
|
|
22
|
+
*/
|
|
23
|
+
const MAX_REFERENCE_HOPS = 16;
|
|
24
|
+
/** A field's whole column. */
|
|
25
|
+
function fieldPath(field, keys = []) {
|
|
26
|
+
return {
|
|
27
|
+
root: { field },
|
|
28
|
+
keys
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** An instance's column. */
|
|
32
|
+
function instancePath(instance, keys = []) {
|
|
33
|
+
return {
|
|
34
|
+
root: { instance },
|
|
35
|
+
keys
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The inputs one step inward from `input`, by name, in order — what a path
|
|
40
|
+
* can step to next:
|
|
41
|
+
*
|
|
42
|
+
* - a `value` holding an object `PropValue`: its properties, each wrapped as
|
|
43
|
+
* the value cell it would be on its own;
|
|
44
|
+
* - an `object` cell: its properties;
|
|
45
|
+
* - an `instance` reference: that instance's arguments, in the same row. Its
|
|
46
|
+
* `output` is ignored, since a step names an argument, not an output.
|
|
47
|
+
*
|
|
48
|
+
* Anything else — a template, a primitive, an array, a `dataset` or `input`
|
|
49
|
+
* reference, an instance the row doesn't declare — has nothing inside it.
|
|
50
|
+
*/
|
|
51
|
+
function childInputs(row, input) {
|
|
52
|
+
switch (input.kind) {
|
|
53
|
+
case "value": return input.value.kind === "object" ? Object.entries(input.value.properties).map(([key, value]) => [key, {
|
|
54
|
+
kind: "value",
|
|
55
|
+
value
|
|
56
|
+
}]) : [];
|
|
57
|
+
case "object": return Object.entries(input.properties);
|
|
58
|
+
case "instance": return Object.entries(row.resources?.[input.name]?.args ?? {});
|
|
59
|
+
default: return [];
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* The input at a path's root: the field's cell, or a reference to the
|
|
64
|
+
* instance — which the next step then reads the arguments of. `"absent"`
|
|
65
|
+
* when the row has neither.
|
|
66
|
+
*/
|
|
67
|
+
function rootInput(row, path) {
|
|
68
|
+
if ("field" in path.root) return row.cells[path.root.field] ?? "absent";
|
|
69
|
+
const { instance } = path.root;
|
|
70
|
+
return row.resources && Object.hasOwn(row.resources, instance) ? {
|
|
71
|
+
kind: "instance",
|
|
72
|
+
name: instance
|
|
73
|
+
} : "absent";
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What `path` reads in `row`, and — when its last step read an instance's
|
|
77
|
+
* argument — which one, so an edit can be sent back there. Each step is
|
|
78
|
+
* taken by {@link childInputs}'s rules; a step that can't be taken reads as
|
|
79
|
+
* `"n/a"`, as does a path that steps through more than
|
|
80
|
+
* {@link MAX_REFERENCE_HOPS} instance references.
|
|
81
|
+
*/
|
|
82
|
+
function resolveColumnPath(row, path) {
|
|
83
|
+
const root = rootInput(row, path);
|
|
84
|
+
if (root === "absent") return { value: root };
|
|
85
|
+
let value = root;
|
|
86
|
+
let argument;
|
|
87
|
+
let hops = 0;
|
|
88
|
+
for (const key of path.keys) {
|
|
89
|
+
argument = void 0;
|
|
90
|
+
if (value.kind === "instance") {
|
|
91
|
+
if (++hops > 16) return { value: "n/a" };
|
|
92
|
+
argument = {
|
|
93
|
+
instance: value.name,
|
|
94
|
+
arg: key
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
const next = childInputs(row, value).find(([k]) => k === key);
|
|
98
|
+
if (!next) return { value: "n/a" };
|
|
99
|
+
value = next[1];
|
|
100
|
+
}
|
|
101
|
+
return argument ? {
|
|
102
|
+
value,
|
|
103
|
+
argument
|
|
104
|
+
} : { value };
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* What `path` reads in `row`: the input there, `"absent"` when the row has
|
|
108
|
+
* nothing at its root, or `"n/a"` when a step can't be taken. See
|
|
109
|
+
* {@link resolveColumnPath}.
|
|
110
|
+
*/
|
|
111
|
+
function readColumnPath(row, path) {
|
|
112
|
+
return resolveColumnPath(row, path).value;
|
|
113
|
+
}
|
|
114
|
+
//#endregion
|
|
115
|
+
//#region src/views/datasets/index.ts
|
|
116
|
+
/** Every instance reference inside `input`, with the path to it. */
|
|
117
|
+
function referencesIn(input, path, site, out) {
|
|
118
|
+
switch (input.kind) {
|
|
119
|
+
case "instance":
|
|
120
|
+
out.push({
|
|
121
|
+
from: site(path),
|
|
122
|
+
to: input.name,
|
|
123
|
+
...input.output !== void 0 && { output: input.output }
|
|
124
|
+
});
|
|
125
|
+
break;
|
|
126
|
+
case "object":
|
|
127
|
+
for (const [key, child] of Object.entries(input.properties)) referencesIn(child, [...path, key], site, out);
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
/** Every instance reference in the row: from where, to which instance and output. */
|
|
132
|
+
function references(row) {
|
|
133
|
+
const out = [];
|
|
134
|
+
for (const [cell, input] of Object.entries(row.cells)) referencesIn(input, [], (path) => ({
|
|
135
|
+
cell,
|
|
136
|
+
path
|
|
137
|
+
}), out);
|
|
138
|
+
for (const [instance, spec] of Object.entries(row.resources ?? {})) for (const [arg, input] of Object.entries(spec.args ?? {})) referencesIn(input, [], (path) => ({
|
|
139
|
+
instance,
|
|
140
|
+
arg,
|
|
141
|
+
path
|
|
142
|
+
}), out);
|
|
143
|
+
return out;
|
|
144
|
+
}
|
|
145
|
+
/** The references in the row to instances it doesn't declare. */
|
|
146
|
+
function danglingReferences(row) {
|
|
147
|
+
const declared = row.resources ?? {};
|
|
148
|
+
return references(row).filter((r) => !Object.hasOwn(declared, r.to));
|
|
149
|
+
}
|
|
150
|
+
/** A reference's site as one line of text, for messages. */
|
|
151
|
+
function describeReference(ref) {
|
|
152
|
+
const inside = ref.from.path.length ? ` › ${ref.from.path.join(" › ")}` : "";
|
|
153
|
+
return `${"cell" in ref.from ? `cell ${ref.from.cell}${inside}` : `${ref.from.instance}'s ${ref.from.arg}${inside}`} → ${ref.to}${ref.output ? `.${ref.output}` : ""}`;
|
|
154
|
+
}
|
|
155
|
+
/** `hint` as an instance name: camelCased words, or `instance` if none survive. */
|
|
156
|
+
function nameFromHint(hint) {
|
|
157
|
+
const name = hint.normalize("NFKD").replace(/[^A-Za-z0-9]+/g, " ").trim().split(" ").filter(Boolean).slice(0, 4).map((w, i) => i === 0 ? w.charAt(0).toLowerCase() + w.slice(1) : w.charAt(0).toUpperCase() + w.slice(1).toLowerCase()).join("");
|
|
158
|
+
return isValidInstanceName(name) ? name : `instance${name}`;
|
|
159
|
+
}
|
|
160
|
+
/**
|
|
161
|
+
* Adds an instance under a fresh valid name based on `hint` (`"Brand kit"`
|
|
162
|
+
* → `brandKit`, then `brandKit2`, …). Returns the name and the update.
|
|
163
|
+
*/
|
|
164
|
+
function addInstance(row, instance, hint = "instance") {
|
|
165
|
+
const base = nameFromHint(hint);
|
|
166
|
+
const taken = row.resources ?? {};
|
|
167
|
+
let name = base;
|
|
168
|
+
for (let n = 2; Object.hasOwn(taken, name); n++) name = `${base}${n}`;
|
|
169
|
+
return {
|
|
170
|
+
name,
|
|
171
|
+
update: {
|
|
172
|
+
rowId: row.id,
|
|
173
|
+
cells: {},
|
|
174
|
+
resources: { [name]: instance }
|
|
175
|
+
}
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Replaces some of an instance's arguments; `null` removes one.
|
|
180
|
+
*
|
|
181
|
+
* @throws when the row declares no instance `name`.
|
|
182
|
+
*/
|
|
183
|
+
function setArgs(row, name, args) {
|
|
184
|
+
const spec = row.resources?.[name];
|
|
185
|
+
if (!spec) throw new Error(`This row has no instance '${name}'`);
|
|
186
|
+
const next = { ...spec.args };
|
|
187
|
+
for (const [arg, value] of Object.entries(args)) if (value === null) delete next[arg];
|
|
188
|
+
else next[arg] = value;
|
|
189
|
+
const { args: _, receipt: __, ...rest } = spec;
|
|
190
|
+
return {
|
|
191
|
+
rowId: row.id,
|
|
192
|
+
cells: {},
|
|
193
|
+
resources: { [name]: {
|
|
194
|
+
...rest,
|
|
195
|
+
...Object.keys(next).length > 0 && { args: next }
|
|
196
|
+
} }
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Removes instances — or, when anything left in the row still refers to
|
|
201
|
+
* one of them (a cell, another instance), reports those references and
|
|
202
|
+
* changes nothing.
|
|
203
|
+
*/
|
|
204
|
+
function removeInstances(row, names) {
|
|
205
|
+
const removing = new Set(names);
|
|
206
|
+
const dangling = references(row).filter((r) => removing.has(r.to) && !("instance" in r.from && removing.has(r.from.instance)));
|
|
207
|
+
if (dangling.length > 0) return { dangling };
|
|
208
|
+
return {
|
|
209
|
+
rowId: row.id,
|
|
210
|
+
cells: {},
|
|
211
|
+
resources: Object.fromEntries(names.map((n) => [n, null]))
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* What differs between a row as it's stored and the same row with changes
|
|
216
|
+
* applied (`SelectedRow.stored` and `SelectedRow.row`): its cells, by field
|
|
217
|
+
* id, and its resource instances, by name.
|
|
218
|
+
*/
|
|
219
|
+
function diffRow(stored, row) {
|
|
220
|
+
return {
|
|
221
|
+
cells: diffNamed(stored.cells, row.cells),
|
|
222
|
+
resources: diffNamed(stored.resources ?? {}, row.resources ?? {})
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function diffNamed(before, after) {
|
|
226
|
+
const changes = {
|
|
227
|
+
added: [],
|
|
228
|
+
changed: [],
|
|
229
|
+
removed: []
|
|
230
|
+
};
|
|
231
|
+
for (const [name, value] of Object.entries(after)) if (!Object.hasOwn(before, name)) changes.added.push(name);
|
|
232
|
+
else if (!sameJson(before[name], value)) changes.changed.push(name);
|
|
233
|
+
for (const name of Object.keys(before)) if (!Object.hasOwn(after, name)) changes.removed.push(name);
|
|
234
|
+
return changes;
|
|
235
|
+
}
|
|
236
|
+
//#endregion
|
|
237
|
+
export { MAX_REFERENCE_HOPS, addInstance, childInputs, danglingReferences, describeReference, diffRow, fieldPath, instancePath, readColumnPath, references, removeInstances, resolveColumnPath, setArgs };
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { _ as ResourceInstanceInput, b as Trace, g as ExecutionInput, i as DatasetRowsOverview, n as DatasetRow, r as DatasetRowUpdate, t as Dataset, v as RunResources, x as TraceWithSpans, y as Span } from "../dataset-types-CSjbM_Vz.js";
|
|
2
|
+
import { _ as VIEW_TAG, a as DatasetViewContext, b as ViewProps, c as DatasetViewSubject, d as ActionEffect, f as SendAction, g as MountedView, h as SurfaceState, i as traceView, l as SelectedRow, m as SurfaceAction, n as TraceViewDefinition, o as DatasetViewDefinition, p as Surface, r as TraceViewProps, s as DatasetViewProps, t as TraceViewContext, u as datasetView, v as View, x as isView, y as ViewDefinition } from "../trace-Dn6Pfcc5.js";
|
|
3
|
+
|
|
4
|
+
//#region src/views/protocol.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* The messages a view's frame and its host exchange by `postMessage`: a
|
|
7
|
+
* generic envelope, whose payloads each surface narrows. Imported by both
|
|
8
|
+
* sides. See `specs/trace-visualizers.md` §C.1.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* The protocol's version. A host that gets a `ready` with a version it
|
|
12
|
+
* doesn't speak asks for the view to be rebuilt rather than guessing.
|
|
13
|
+
*/
|
|
14
|
+
declare const PROTOCOL = 1;
|
|
15
|
+
/**
|
|
16
|
+
* The host's theme, as CSS custom properties the runtime sets on the frame's
|
|
17
|
+
* `:root` — so a view matches light and dark mode whatever it's written in.
|
|
18
|
+
*/
|
|
19
|
+
interface ViewTheme {
|
|
20
|
+
/** The resolved color scheme. */
|
|
21
|
+
mode: "light" | "dark";
|
|
22
|
+
/** Custom property name (`--ev-bg`) → value. */
|
|
23
|
+
tokens: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Host → frame. Every message that changes what the view knows carries a
|
|
27
|
+
* host-assigned `rev`, which an effectful action names so a stale one can be
|
|
28
|
+
* refused.
|
|
29
|
+
*/
|
|
30
|
+
type HostMessage<S = unknown, E = unknown, C = unknown> = /** In reply to `ready`: everything the view needs to start. */{
|
|
31
|
+
type: "init";
|
|
32
|
+
subject: S;
|
|
33
|
+
rev: number;
|
|
34
|
+
context: C;
|
|
35
|
+
theme: ViewTheme;
|
|
36
|
+
} /** A fresh snapshot of the subject. */ | {
|
|
37
|
+
type: "subject";
|
|
38
|
+
subject: S;
|
|
39
|
+
rev: number;
|
|
40
|
+
} /** One incremental change, for a surface with `applyEvent`. */ | {
|
|
41
|
+
type: "event";
|
|
42
|
+
event: E;
|
|
43
|
+
rev: number;
|
|
44
|
+
} /** The host's context changed. */ | {
|
|
45
|
+
type: "context";
|
|
46
|
+
context: C;
|
|
47
|
+
rev: number;
|
|
48
|
+
} /** The host's theme changed. */ | {
|
|
49
|
+
type: "theme";
|
|
50
|
+
theme: ViewTheme;
|
|
51
|
+
} /** An action was refused. */ | {
|
|
52
|
+
type: "rejected";
|
|
53
|
+
name: string;
|
|
54
|
+
reason: string;
|
|
55
|
+
};
|
|
56
|
+
/** Frame → host. Untrusted: the host checks each one. */
|
|
57
|
+
type FrameMessage =
|
|
58
|
+
/**
|
|
59
|
+
* The runtime has loaded the view, or found it isn't one for this
|
|
60
|
+
* surface (`error`).
|
|
61
|
+
*/
|
|
62
|
+
{
|
|
63
|
+
type: "ready";
|
|
64
|
+
protocol: number;
|
|
65
|
+
surface?: string;
|
|
66
|
+
label?: string;
|
|
67
|
+
error?: string;
|
|
68
|
+
} /** Whether the view applies; after `init`, and whenever it changes. */ | {
|
|
69
|
+
type: "applies";
|
|
70
|
+
value: boolean;
|
|
71
|
+
} /** The view asked for one of its surface's actions, as of `rev`. */ | {
|
|
72
|
+
type: "action";
|
|
73
|
+
name: string;
|
|
74
|
+
args: unknown;
|
|
75
|
+
rev: number;
|
|
76
|
+
} /** The view asked for a URL to be opened. */ | {
|
|
77
|
+
type: "openUrl";
|
|
78
|
+
url: string;
|
|
79
|
+
} /** `applies`, `mount`, or `update` threw, or the view reported an error. */ | {
|
|
80
|
+
type: "error";
|
|
81
|
+
message: string;
|
|
82
|
+
during?: "applies" | "render";
|
|
83
|
+
};
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/views/runtime.d.ts
|
|
86
|
+
/**
|
|
87
|
+
* Tells the host that the view failed to render, for errors the runtime
|
|
88
|
+
* can't catch itself — an adapter's error boundary calls it.
|
|
89
|
+
*/
|
|
90
|
+
declare function reportViewError(err: unknown): void;
|
|
91
|
+
/**
|
|
92
|
+
* Runs `value` — a module's default export — as this frame's view on the
|
|
93
|
+
* surface named `surfaceName`. The bundle's entry calls it; a view never
|
|
94
|
+
* does.
|
|
95
|
+
*/
|
|
96
|
+
declare function start(value: unknown, surfaceName: string): void;
|
|
97
|
+
//#endregion
|
|
98
|
+
export { type ActionEffect, type Dataset, type DatasetRow, type DatasetRowUpdate, type DatasetRowsOverview, type DatasetViewContext, type DatasetViewDefinition, type DatasetViewProps, type DatasetViewSubject, type ExecutionInput, type FrameMessage, type HostMessage, type MountedView, PROTOCOL, type ResourceInstanceInput, type RunResources, type SelectedRow, type SendAction, type Span, type Surface, type SurfaceAction, type SurfaceState, type Trace, type TraceViewContext, type TraceViewDefinition, type TraceViewProps, type TraceWithSpans, VIEW_TAG, type View, type ViewDefinition, type ViewProps, type ViewTheme, datasetView, isView, reportViewError, start, traceView };
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { a as isView, i as defineView, n as start, o as PROTOCOL, r as VIEW_TAG, t as reportViewError } from "../runtime-DCNx7dHI.js";
|
|
2
|
+
import { t as isValidInstanceName } from "../instance-names-pVQxJbtw.js";
|
|
3
|
+
//#region src/views/surfaces/datasets.ts
|
|
4
|
+
function isRecord(value) {
|
|
5
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
6
|
+
}
|
|
7
|
+
/** Why `value` isn't a {@link DatasetRowUpdate}, or `undefined` if it is one. */
|
|
8
|
+
function updateProblem(value) {
|
|
9
|
+
if (!isRecord(value)) return "an update must be an object";
|
|
10
|
+
if (typeof value.rowId !== "string") return "an update needs a rowId";
|
|
11
|
+
if (!isRecord(value.cells)) return "an update needs cells (use {} for none)";
|
|
12
|
+
for (const [field, cell] of Object.entries(value.cells)) if (cell !== null && !(isRecord(cell) && typeof cell.kind === "string")) return `cell ${field} must be an input or null`;
|
|
13
|
+
if (value.resources !== void 0) {
|
|
14
|
+
if (!isRecord(value.resources)) return "resources must be an object";
|
|
15
|
+
for (const [name, spec] of Object.entries(value.resources)) {
|
|
16
|
+
if (!isValidInstanceName(name)) return `'${name}' isn't a valid instance name`;
|
|
17
|
+
if (spec === null) continue;
|
|
18
|
+
if (!isRecord(spec) || typeof spec.uri !== "string") return `instance ${name} needs a resource uri`;
|
|
19
|
+
if (spec.args !== void 0 && !isRecord(spec.args)) return `instance ${name}'s args must be an object`;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** The datasets surface's descriptor. */
|
|
24
|
+
const datasetSurface = {
|
|
25
|
+
name: "datasets",
|
|
26
|
+
helper: "datasetView",
|
|
27
|
+
isFinal: () => true,
|
|
28
|
+
actions: {
|
|
29
|
+
selectRow: {
|
|
30
|
+
effect: "ephemeral",
|
|
31
|
+
check(args, { subject }) {
|
|
32
|
+
const index = args?.index;
|
|
33
|
+
return Number.isInteger(index) && index >= 0 && index < subject.overview.rowCount ? void 0 : `no row ${String(index)}`;
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
showInstance: {
|
|
37
|
+
effect: "ephemeral",
|
|
38
|
+
check(args, { context }) {
|
|
39
|
+
const name = args?.name;
|
|
40
|
+
if (typeof name !== "string") return "an instance needs a name";
|
|
41
|
+
const { resources } = context.selected?.row ?? {};
|
|
42
|
+
return resources && Object.hasOwn(resources, name) ? void 0 : `the selected row has no instance ${name}`;
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
proposeUpdate: {
|
|
46
|
+
effect: "effectful",
|
|
47
|
+
check(args, { context }) {
|
|
48
|
+
const update = args?.update;
|
|
49
|
+
const problem = updateProblem(update);
|
|
50
|
+
if (problem) return problem;
|
|
51
|
+
const { rowId } = update;
|
|
52
|
+
return rowId === context.selected?.row.id ? void 0 : "a view can only change the row it's showing";
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
props: ({ subject, context }, send, base) => ({
|
|
57
|
+
...base,
|
|
58
|
+
dataset: subject.dataset,
|
|
59
|
+
overview: subject.overview,
|
|
60
|
+
selected: context.selected,
|
|
61
|
+
selectRow: (index) => send("selectRow", { index }),
|
|
62
|
+
showInstance: (name) => send("showInstance", { name }),
|
|
63
|
+
proposeUpdate: (update) => send("proposeUpdate", { update })
|
|
64
|
+
})
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Makes a dataset view: a tab beside the Grid for every dataset `applies`
|
|
68
|
+
* says yes to. A file under `.evalution/views/datasets/` default-exports
|
|
69
|
+
* one.
|
|
70
|
+
*
|
|
71
|
+
* @example
|
|
72
|
+
* ```tsx
|
|
73
|
+
* export default datasetView({
|
|
74
|
+
* label: "Task Hierarchy",
|
|
75
|
+
* applies: ({ overview }) =>
|
|
76
|
+
* Object.values(overview.instances).some(i => i.uri.endsWith("#seededTask")),
|
|
77
|
+
* mount: react(TaskHierarchy),
|
|
78
|
+
* });
|
|
79
|
+
* ```
|
|
80
|
+
*/
|
|
81
|
+
function datasetView(definition) {
|
|
82
|
+
return defineView(datasetSurface, definition);
|
|
83
|
+
}
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region src/shared/trace-stream.ts
|
|
86
|
+
/**
|
|
87
|
+
* `prev` with `event` applied: a span event adds or replaces its span, and a
|
|
88
|
+
* trace event replaces the trace. Anything else leaves it as it was.
|
|
89
|
+
*/
|
|
90
|
+
function applyStreamEvent(prev, event) {
|
|
91
|
+
const e = event;
|
|
92
|
+
switch (e.type) {
|
|
93
|
+
case "span-start":
|
|
94
|
+
case "span-end":
|
|
95
|
+
case "span-update": {
|
|
96
|
+
const existing = prev.spans.findIndex((s) => s.id === e.span.id);
|
|
97
|
+
const spans = existing >= 0 ? prev.spans.map((s, i) => i === existing ? e.span : s) : [...prev.spans, e.span];
|
|
98
|
+
return {
|
|
99
|
+
...prev,
|
|
100
|
+
spans
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
case "trace-update":
|
|
104
|
+
case "trace-end": return {
|
|
105
|
+
...prev,
|
|
106
|
+
trace: e.trace
|
|
107
|
+
};
|
|
108
|
+
default: return prev;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/views/surfaces/trace.ts
|
|
113
|
+
/**
|
|
114
|
+
* The trace surface: views shown as tabs beside the trace view's
|
|
115
|
+
* Conversation and Spans. See `specs/trace-visualizers.md` §A.1.
|
|
116
|
+
*/
|
|
117
|
+
/** The trace surface's descriptor. */
|
|
118
|
+
const traceSurface = {
|
|
119
|
+
name: "traces",
|
|
120
|
+
helper: "traceView",
|
|
121
|
+
applyEvent: (subject, event) => applyStreamEvent(subject, event),
|
|
122
|
+
isFinal: ({ trace }) => trace.endTime !== void 0 && trace.status !== "running",
|
|
123
|
+
actions: { selectSpan: {
|
|
124
|
+
effect: "ephemeral",
|
|
125
|
+
check(args, { subject }) {
|
|
126
|
+
const spanId = args?.spanId;
|
|
127
|
+
if (typeof spanId !== "string") return "selectSpan needs a span id";
|
|
128
|
+
return subject.spans.some((s) => s.id === spanId) ? void 0 : `no span ${spanId} in this trace`;
|
|
129
|
+
}
|
|
130
|
+
} },
|
|
131
|
+
props: ({ subject, context }, send, base) => ({
|
|
132
|
+
...base,
|
|
133
|
+
trace: subject,
|
|
134
|
+
selectedSpanId: context.selectedSpanId,
|
|
135
|
+
selectSpan: (spanId) => send("selectSpan", { spanId })
|
|
136
|
+
})
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* Makes a trace view: a tab beside Conversation and Spans for every trace
|
|
140
|
+
* `applies` says yes to. A file under `.evalution/views/traces/` default-
|
|
141
|
+
* exports one.
|
|
142
|
+
*
|
|
143
|
+
* @example
|
|
144
|
+
* ```tsx
|
|
145
|
+
* export default traceView({
|
|
146
|
+
* label: "Tasks",
|
|
147
|
+
* applies: trace => taskChanges(trace).length > 0,
|
|
148
|
+
* mount: react(TaskTree),
|
|
149
|
+
* });
|
|
150
|
+
* ```
|
|
151
|
+
*/
|
|
152
|
+
function traceView(definition) {
|
|
153
|
+
return defineView(traceSurface, definition);
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { PROTOCOL, VIEW_TAG, datasetView, isView, reportViewError, start, traceView };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { b as ViewProps, g as MountedView, l as SelectedRow, r as TraceViewProps, s as DatasetViewProps } from "../../trace-Dn6Pfcc5.js";
|
|
2
|
+
import { ComponentType, ReactNode } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/views/react/index.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* A view's `mount`, rendering `component` with the view's props into a
|
|
7
|
+
* React root, inside an error boundary that shows a render error in the
|
|
8
|
+
* view and reports it to the host.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* export default traceView({ label: "Tasks", applies, mount: react(TaskTree) });
|
|
13
|
+
* ```
|
|
14
|
+
*/
|
|
15
|
+
declare function react<P extends ViewProps>(component: ComponentType<P>): (element: HTMLElement, props: P) => MountedView<P>;
|
|
16
|
+
/** The view's current props, from anywhere inside a {@link react} view. */
|
|
17
|
+
declare function useViewProps<P extends ViewProps = ViewProps>(): P;
|
|
18
|
+
/** Props of {@link SpanLink}. */
|
|
19
|
+
interface SpanLinkProps {
|
|
20
|
+
/** The span to select. */
|
|
21
|
+
spanId: string;
|
|
22
|
+
children: ReactNode;
|
|
23
|
+
className?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A link that selects a span in the trace view's details pane. Marked
|
|
28
|
+
* `data-selected` while that span is the selected one. Trace views only.
|
|
29
|
+
*/
|
|
30
|
+
declare function SpanLink({
|
|
31
|
+
spanId,
|
|
32
|
+
children,
|
|
33
|
+
className,
|
|
34
|
+
title
|
|
35
|
+
}: SpanLinkProps): import("react").JSX.Element;
|
|
36
|
+
/** Props of {@link TextDiff}. */
|
|
37
|
+
interface TextDiffProps {
|
|
38
|
+
before: string;
|
|
39
|
+
after: string;
|
|
40
|
+
}
|
|
41
|
+
/** `before` and `after` as one word-level diff: removed words struck out, added ones marked. */
|
|
42
|
+
declare function TextDiff({
|
|
43
|
+
before,
|
|
44
|
+
after
|
|
45
|
+
}: TextDiffProps): import("react").JSX.Element;
|
|
46
|
+
/** Props of {@link JsonView}. */
|
|
47
|
+
interface JsonViewProps {
|
|
48
|
+
value: unknown;
|
|
49
|
+
}
|
|
50
|
+
/** A value as indented JSON. */
|
|
51
|
+
declare function JsonView({
|
|
52
|
+
value
|
|
53
|
+
}: JsonViewProps): import("react").JSX.Element;
|
|
54
|
+
//#endregion
|
|
55
|
+
export { type DatasetViewProps, JsonView, JsonViewProps, type SelectedRow, SpanLink, SpanLinkProps, TextDiff, TextDiffProps, type TraceViewProps, type ViewProps, react, useViewProps };
|