@rynx-ai/server 0.1.11-beta.25 → 0.1.11-beta.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/control-api.js +488 -68
- package/dist/control-web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/control-web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/control-web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/control-web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/control-web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/control-web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/control-web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/control-web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/control-web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/control-web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/control-web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/control-web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/control-web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/control-web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/control-web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/control-web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/control-web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/control-web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/control-web/assets/abap-BdImnpbu.js +1 -0
- package/dist/control-web/assets/abnfDiagram-VRR7QNED-COu02MlJ.js +1 -0
- package/dist/control-web/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/control-web/assets/ada-bCR0ucgS.js +1 -0
- package/dist/control-web/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/control-web/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/control-web/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/control-web/assets/apache-Pmp26Uib.js +1 -0
- package/dist/control-web/assets/apex-D8_7TLub.js +1 -0
- package/dist/control-web/assets/apl-dKokRX4l.js +1 -0
- package/dist/control-web/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/control-web/assets/ara-BRHolxvo.js +1 -0
- package/dist/control-web/assets/arc-DqiFeYAM.js +1 -0
- package/dist/control-web/assets/architectureDiagram-ZJ3FMSHR-BWFGgUV4.js +36 -0
- package/dist/control-web/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/control-web/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/control-web/assets/astro-CbQHKStN.js +1 -0
- package/dist/control-web/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/control-web/assets/awk-DMzUqQB5.js +1 -0
- package/dist/control-web/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/control-web/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/control-web/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/control-web/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/control-web/assets/bat-BkioyH1T.js +1 -0
- package/dist/control-web/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/control-web/assets/berry-uYugtg8r.js +1 -0
- package/dist/control-web/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/control-web/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/control-web/assets/bird2-DPOp833l.js +1 -0
- package/dist/control-web/assets/blade-D4QpJJKB.js +1 -0
- package/dist/control-web/assets/blockDiagram-677ZJIJ3-ZC0bXDzB.js +132 -0
- package/dist/control-web/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/control-web/assets/c-BIGW1oBm.js +1 -0
- package/dist/control-web/assets/c3-eo99z4R2.js +1 -0
- package/dist/control-web/assets/c4Diagram-LMCZKHZV-Uupq5I-s.js +10 -0
- package/dist/control-web/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/control-web/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/control-web/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/control-web/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/control-web/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/control-web/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/control-web/assets/channel-3HG15wfa.js +1 -0
- package/dist/control-web/assets/chunk-2Q5K7J3B-C77vwuDM.js +1 -0
- package/dist/control-web/assets/chunk-32BRIVSS-BkfLE_TX.js +1 -0
- package/dist/control-web/assets/chunk-5VM5RSS4-By6zfDWW.js +15 -0
- package/dist/control-web/assets/chunk-EX3LRPZG-CO439p_3.js +231 -0
- package/dist/control-web/assets/chunk-JWPE2WC7-B9BPEwug.js +1 -0
- package/dist/control-web/assets/chunk-MOJQB5TN-CYKygWZz.js +88 -0
- package/dist/control-web/assets/chunk-RYQCIY6F-ug-An4HG.js +1 -0
- package/dist/control-web/assets/chunk-V7JOEXUC-3UFQGnKX.js +206 -0
- package/dist/control-web/assets/chunk-VR4S4FIN-DjspjYUb.js +1 -0
- package/dist/control-web/assets/chunk-XXDRQBXY-3znnutie.js +1 -0
- package/dist/control-web/assets/clarity-D53aC0YG.js +1 -0
- package/dist/control-web/assets/classDiagram-OUVF2IWQ-WmU4L9YT.js +1 -0
- package/dist/control-web/assets/classDiagram-v2-EOCWNBFH-WmU4L9YT.js +1 -0
- package/dist/control-web/assets/clojure-P80f7IUj.js +1 -0
- package/dist/control-web/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/control-web/assets/cobol-nwyudZeR.js +1 -0
- package/dist/control-web/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/control-web/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/control-web/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/control-web/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/control-web/assets/coq-DkFqJrB1.js +1 -0
- package/dist/control-web/assets/cose-bilkent-JH36ORCC-Dr28goCd.js +1 -0
- package/dist/control-web/assets/cpp-CofmeUqb.js +1 -0
- package/dist/control-web/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/control-web/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/control-web/assets/css-DPfMkruS.js +1 -0
- package/dist/control-web/assets/csv-fuZLfV_i.js +1 -0
- package/dist/control-web/assets/cue-D82EKSYY.js +1 -0
- package/dist/control-web/assets/cynefin-VYW2F7L2-Be5uJhnw.js +178 -0
- package/dist/control-web/assets/cynefinDiagram-TSTJHNR4-BLxtSvL6.js +62 -0
- package/dist/control-web/assets/cypher-COkxafJQ.js +1 -0
- package/dist/control-web/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
- package/dist/control-web/assets/d-85-TOEBH.js +1 -0
- package/dist/control-web/assets/dagre-VKFMJZFB-DPRuDV5p.js +4 -0
- package/dist/control-web/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/control-web/assets/dart-CF10PKvl.js +1 -0
- package/dist/control-web/assets/dax-CEL-wOlO.js +1 -0
- package/dist/control-web/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/dist/control-web/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/control-web/assets/diagram-FQU43EPY-Cybg22U0.js +3 -0
- package/dist/control-web/assets/diagram-G47NLZAW-CGeIKUfW.js +24 -0
- package/dist/control-web/assets/diagram-NH7WQ7WH-BJq5MBRm.js +24 -0
- package/dist/control-web/assets/diagram-OA4YK3LP-DquOQGwg.js +30 -0
- package/dist/control-web/assets/diagram-WEI45ONY-Cblb4xP2.js +41 -0
- package/dist/control-web/assets/diff-D97Zzqfu.js +1 -0
- package/dist/control-web/assets/docker-BcOcwvcX.js +1 -0
- package/dist/control-web/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/control-web/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/control-web/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/control-web/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/control-web/assets/ebnfDiagram-CCIWWBDH-CQjHiOqj.js +1 -0
- package/dist/control-web/assets/edge-BkV0erSs.js +1 -0
- package/dist/control-web/assets/elixir-CDX3lj18.js +1 -0
- package/dist/control-web/assets/elm-DbKCFpqz.js +1 -0
- package/dist/control-web/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/control-web/assets/erDiagram-Q63AITRT-Bspr3uKJ.js +85 -0
- package/dist/control-web/assets/erb-B12qg9BL.js +1 -0
- package/dist/control-web/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/control-web/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/control-web/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/control-web/assets/fennel-BYunw83y.js +1 -0
- package/dist/control-web/assets/fish-BvzEVeQv.js +1 -0
- package/dist/control-web/assets/flowDiagram-23GEKE2U-CxcZyBA-.js +156 -0
- package/dist/control-web/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/control-web/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/control-web/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/control-web/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/control-web/assets/ganttDiagram-NO4QXBWP-qBdh7A-P.js +292 -0
- package/dist/control-web/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/control-web/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/control-web/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/control-web/assets/genie-D0YGMca9.js +1 -0
- package/dist/control-web/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/control-web/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/control-web/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/control-web/assets/gitGraphDiagram-IHSO6WYX-BTYub2KT.js +106 -0
- package/dist/control-web/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/control-web/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/control-web/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/control-web/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/control-web/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/control-web/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/control-web/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/control-web/assets/gleam-BspZqrRM.js +1 -0
- package/dist/control-web/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/control-web/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/control-web/assets/glsl-DplSGwfg.js +1 -0
- package/dist/control-web/assets/gn-n2N0HUVH.js +1 -0
- package/dist/control-web/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/control-web/assets/go-CxLEBnE3.js +1 -0
- package/dist/control-web/assets/graph-C9eacEi8.js +1 -0
- package/dist/control-web/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/control-web/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/control-web/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/control-web/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/control-web/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/control-web/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/control-web/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/control-web/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/control-web/assets/hack-CaT9iCJl.js +1 -0
- package/dist/control-web/assets/haml-B8DHNrY2.js +1 -0
- package/dist/control-web/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/control-web/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/control-web/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/control-web/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/control-web/assets/{highlighted-body-OFNGDK62-BBc3aRDM.js → highlighted-body-OFNGDK62-DyksUrwu.js} +1 -1
- package/dist/control-web/assets/hjson-D5-asLiD.js +1 -0
- package/dist/control-web/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/control-web/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/control-web/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/dist/control-web/assets/houston-DnULxvSX.js +1 -0
- package/dist/control-web/assets/html-GMplVEZG.js +1 -0
- package/dist/control-web/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/control-web/assets/http-jrhK8wxY.js +1 -0
- package/dist/control-web/assets/hurl-irOxFIW8.js +1 -0
- package/dist/control-web/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/control-web/assets/hy-DFXneXwc.js +1 -0
- package/dist/control-web/assets/imba-DGztddWO.js +1 -0
- package/dist/control-web/assets/{index-C1ODT189.js → index-B9SAq_63.js} +151 -147
- package/dist/control-web/assets/index-BDaSctIT.js +153 -0
- package/dist/control-web/assets/index-CtaYRNgJ.css +32 -0
- package/dist/control-web/assets/infoDiagram-FWYZ7A6U-ChbQR3Zo.js +2 -0
- package/dist/control-web/assets/ini-BEwlwnbL.js +1 -0
- package/dist/control-web/assets/init-Gi6I4Gst.js +1 -0
- package/dist/control-web/assets/ishikawaDiagram-FXEZZL3T-C-4_qGzn.js +70 -0
- package/dist/control-web/assets/java-CylS5w8V.js +1 -0
- package/dist/control-web/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/control-web/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/control-web/assets/jison-wvAkD_A8.js +1 -0
- package/dist/control-web/assets/journeyDiagram-5HDEW3XC-B090zN18.js +139 -0
- package/dist/control-web/assets/json-Cp-IABpG.js +1 -0
- package/dist/control-web/assets/json5-C9tS-k6U.js +1 -0
- package/dist/control-web/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/control-web/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/control-web/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/control-web/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/control-web/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/control-web/assets/julia-CxzCAyBv.js +1 -0
- package/dist/control-web/assets/just-Cw27pwNe.js +1 -0
- package/dist/control-web/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/control-web/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/control-web/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/control-web/assets/kanban-definition-HUTT4EX6-RlTcRbPs.js +89 -0
- package/dist/control-web/assets/kdl-DV7GczEv.js +1 -0
- package/dist/control-web/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/control-web/assets/kusto-DZf3V79B.js +1 -0
- package/dist/control-web/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/control-web/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/control-web/assets/layout-DEXfKzaS.js +1 -0
- package/dist/control-web/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/control-web/assets/less-B1dDrJ26.js +1 -0
- package/dist/control-web/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/control-web/assets/linear-DTuNxDqu.js +1 -0
- package/dist/control-web/assets/liquid-DYVedYrR.js +1 -0
- package/dist/control-web/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/control-web/assets/log-2UxHyX5q.js +1 -0
- package/dist/control-web/assets/logo-BtOb2qkB.js +1 -0
- package/dist/control-web/assets/lua-BaeVxFsk.js +1 -0
- package/dist/control-web/assets/luau-C-HG3fhB.js +1 -0
- package/dist/control-web/assets/make-CHLpvVh8.js +1 -0
- package/dist/control-web/assets/map-Czzmt4hB.js +1 -0
- package/dist/control-web/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/control-web/assets/marko-CnJfTvn9.js +1 -0
- package/dist/control-web/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/control-web/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/control-web/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/control-web/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/control-web/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/control-web/assets/matlab-D7o27uSR.js +1 -0
- package/dist/control-web/assets/mdc-BMNejdWA.js +1 -0
- package/dist/control-web/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/control-web/assets/mermaid-GHXKKRXX-BYZTj3zW.css +1 -0
- package/dist/control-web/assets/mermaid-GHXKKRXX-BkcV3dgg.js +710 -0
- package/dist/control-web/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/control-web/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/control-web/assets/min-light-CTRr51gU.js +1 -0
- package/dist/control-web/assets/mindmap-definition-LN4V7U3C-DYby41E9.js +96 -0
- package/dist/control-web/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/control-web/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/control-web/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/control-web/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/control-web/assets/move-IF9eRakj.js +1 -0
- package/dist/control-web/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/control-web/assets/nextflow-Zz6hmt5N.js +1 -0
- package/dist/control-web/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/dist/control-web/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/control-web/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/control-web/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/control-web/assets/nim-CVrawwO9.js +1 -0
- package/dist/control-web/assets/nix-CwoSXNpI.js +1 -0
- package/dist/control-web/assets/nord-Ddv68eIx.js +1 -0
- package/dist/control-web/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/control-web/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/control-web/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/control-web/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/control-web/assets/odin-BBf5iR-q.js +1 -0
- package/dist/control-web/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/control-web/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/control-web/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/control-web/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/control-web/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/control-web/assets/pegDiagram-2B236MQR-CPK6GaEv.js +1 -0
- package/dist/control-web/assets/perl-C0TMdlhV.js +1 -0
- package/dist/control-web/assets/php-Dhbhpdrm.js +1 -0
- package/dist/control-web/assets/pieDiagram-ENE6RG2P-DLCmXuji.js +39 -0
- package/dist/control-web/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/control-web/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/control-web/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/control-web/assets/po-BTJTHyun.js +1 -0
- package/dist/control-web/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/control-web/assets/polar-C0HS_06l.js +1 -0
- package/dist/control-web/assets/postcss-CXtECtnM.js +1 -0
- package/dist/control-web/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/control-web/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/control-web/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/control-web/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/control-web/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/control-web/assets/pug-CGlum2m_.js +1 -0
- package/dist/control-web/assets/puppet-BMWR74SV.js +1 -0
- package/dist/control-web/assets/purescript-CklMAg4u.js +1 -0
- package/dist/control-web/assets/python-B6aJPvgy.js +1 -0
- package/dist/control-web/assets/qml-3beO22l8.js +1 -0
- package/dist/control-web/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/control-web/assets/qss-IeuSbFQv.js +1 -0
- package/dist/control-web/assets/quadrantDiagram-ABIIQ3AL-RIS8r7CA.js +7 -0
- package/dist/control-web/assets/r-Dspwwk_N.js +1 -0
- package/dist/control-web/assets/racket-BqYA7rlc.js +1 -0
- package/dist/control-web/assets/railroadDiagram-RFXS5EU6-B1HB7xsg.js +1 -0
- package/dist/control-web/assets/raku-DXvB9xmW.js +1 -0
- package/dist/control-web/assets/razor-Uh8Bk_45.js +1 -0
- package/dist/control-web/assets/red-bN70gL4F.js +1 -0
- package/dist/control-web/assets/reg-C-SQnVFl.js +1 -0
- package/dist/control-web/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/control-web/assets/rel-C3B-1QV4.js +1 -0
- package/dist/control-web/assets/requirementDiagram-TGXJPOKE-Inh_4hU0.js +84 -0
- package/dist/control-web/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/control-web/assets/ron-D8l8udqQ.js +1 -0
- package/dist/control-web/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/control-web/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/control-web/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/control-web/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/control-web/assets/rst-BrH8l1NY.js +1 -0
- package/dist/control-web/assets/ruby-Dw2BHqvy.js +1 -0
- package/dist/control-web/assets/rust-B1yitclQ.js +1 -0
- package/dist/control-web/assets/sankeyDiagram-HTMAVEWB-DPF33kPB.js +40 -0
- package/dist/control-web/assets/sas-cz2c8ADy.js +1 -0
- package/dist/control-web/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/control-web/assets/scala-C151Ov-r.js +1 -0
- package/dist/control-web/assets/scheme-C98Dy4si.js +1 -0
- package/dist/control-web/assets/scss-OYdSNvt2.js +1 -0
- package/dist/control-web/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/control-web/assets/sequenceDiagram-DBY2YBRQ-iywKWoYc.js +162 -0
- package/dist/control-web/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/control-web/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/control-web/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/control-web/assets/sizeCapture-X5ZJPWSS-DlnHubz9.js +1 -0
- package/dist/control-web/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/control-web/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/control-web/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/control-web/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/control-web/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/control-web/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/control-web/assets/solidity-rGO070M0.js +1 -0
- package/dist/control-web/assets/soy-Brmx7dQM.js +1 -0
- package/dist/control-web/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/control-web/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/control-web/assets/sql-BLtJtn59.js +1 -0
- package/dist/control-web/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/control-web/assets/stata-BH5u7GGu.js +1 -0
- package/dist/control-web/assets/stateDiagram-2N3HPSRC-CShzll2N.js +1 -0
- package/dist/control-web/assets/stateDiagram-v2-6OUMAXLB-Cdx0fWna.js +1 -0
- package/dist/control-web/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/control-web/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/control-web/assets/svelte-C_ipcX3V.js +1 -0
- package/dist/control-web/assets/swift-D82vCrfD.js +1 -0
- package/dist/control-web/assets/swimlanes-5IMT3BWC-CxlQpFBv.js +2 -0
- package/dist/control-web/assets/swimlanesDiagram-G3AALYLV-CoX0jnUu.js +8 -0
- package/dist/control-web/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/control-web/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/control-web/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/control-web/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/control-web/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/control-web/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/control-web/assets/templ-P3uqSqPl.js +1 -0
- package/dist/control-web/assets/terraform-BETggiCN.js +1 -0
- package/dist/control-web/assets/tex-idrVyKtj.js +1 -0
- package/dist/control-web/assets/timeline-definition-FHXFAJF6-Dlx59Xc3.js +120 -0
- package/dist/control-web/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/control-web/assets/toml-vGWfd6FD.js +1 -0
- package/dist/control-web/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/control-web/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/control-web/assets/tsx-COt5Ahok.js +1 -0
- package/dist/control-web/assets/turtle-BsS91CYL.js +1 -0
- package/dist/control-web/assets/twig-DNn4PbVi.js +1 -0
- package/dist/control-web/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/control-web/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/control-web/assets/typst-DHCkPAjA.js +1 -0
- package/dist/control-web/assets/v-BcVCzyr7.js +1 -0
- package/dist/control-web/assets/vala-CsfeWuGM.js +1 -0
- package/dist/control-web/assets/vb-D17OF-Vu.js +1 -0
- package/dist/control-web/assets/vennDiagram-L72KCM5P-DLsv4i_t.js +34 -0
- package/dist/control-web/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/control-web/assets/vesper-DU1UobuO.js +1 -0
- package/dist/control-web/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/control-web/assets/viml-CJc9bBzg.js +1 -0
- package/dist/control-web/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/control-web/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/control-web/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/control-web/assets/vue-DN_0RTcg.js +1 -0
- package/dist/control-web/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/control-web/assets/vue-vine-CQOfvN7w.js +1 -0
- package/dist/control-web/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/control-web/assets/wardleyDiagram-EHGQE667-BazV8fpH.js +78 -0
- package/dist/control-web/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/control-web/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/control-web/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/control-web/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/control-web/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/control-web/assets/wit-5i3qLPDT.js +1 -0
- package/dist/control-web/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/control-web/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/control-web/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/control-web/assets/xychartDiagram-FW5EYKEG-Bx9uDlYu.js +7 -0
- package/dist/control-web/assets/yaml-Buea-lGh.js +1 -0
- package/dist/control-web/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/control-web/assets/zig-VOosw3JB.js +1 -0
- package/dist/control-web/index.html +2 -2
- package/dist/machine-session-service.d.ts +58 -7
- package/dist/machine-session-service.js +510 -22
- package/dist/remote-runtime-dispatcher.d.ts +1 -1
- package/dist/remote-runtime-dispatcher.js +8 -0
- package/dist/remote-runtime-session-projection.js +3 -0
- package/dist/server.d.ts +9 -3
- package/dist/server.js +81 -4
- package/dist/session-runtime-index.js +13 -0
- package/package.json +7 -7
- package/dist/control-web/assets/index-DOUyXr2J.css +0 -32
- package/dist/control-web/assets/mermaid-GHXKKRXX-BkqCCgCk.js +0 -131
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
* into a Control Plane database.
|
|
9
9
|
*/
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
11
|
+
import { open, realpath, stat } from "node:fs/promises";
|
|
12
|
+
import { basename, extname, isAbsolute, relative, resolve, sep } from "node:path";
|
|
11
13
|
import { SESSION_PROVIDER_IDS, getRuntimeProfile, isSessionProviderId, newSessionId, normalizeSessionTitle, } from "@rynx-ai/core";
|
|
12
14
|
import { REMOTE_RUNTIME_SESSION_DEFAULT_PAGE_SIZE, REMOTE_RUNTIME_SESSION_MAX_CURSOR_CHARS, REMOTE_RUNTIME_SESSION_MAX_ID_CHARS, REMOTE_RUNTIME_SESSION_MAX_PAGE_SIZE, } from "@rynx-ai/protocol/remote-runtime-rpc";
|
|
13
15
|
const DEFAULT_LIST_LIMIT = REMOTE_RUNTIME_SESSION_DEFAULT_PAGE_SIZE;
|
|
@@ -54,6 +56,7 @@ export class MachineSessionService {
|
|
|
54
56
|
pendingDeliveries = new Map();
|
|
55
57
|
cancelledPendingDeliveries = new Set();
|
|
56
58
|
forkTasks = new Map();
|
|
59
|
+
sessionMutationTails = new Map();
|
|
57
60
|
constructor(ports, options = {}) {
|
|
58
61
|
this.ports = ports;
|
|
59
62
|
this.maxListLimit = boundedInteger(options.maxListLimit ?? MAX_LIST_LIMIT, 1, MAX_LIST_LIMIT, "maxListLimit");
|
|
@@ -218,11 +221,20 @@ export class MachineSessionService {
|
|
|
218
221
|
async updateExecutionSettings(input) {
|
|
219
222
|
const sessionId = validOpaqueToken(input.sessionId, "sessionId", MAX_SESSION_ID_CHARS);
|
|
220
223
|
const modelId = input.model === null ? null : validRequiredText(input.model, "model");
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
const reasoningEffort = input.reasoningEffort === null
|
|
225
|
+
? null
|
|
226
|
+
: validRequiredText(input.reasoningEffort, "reasoningEffort");
|
|
227
|
+
return this.withSessionMutation(sessionId, async () => {
|
|
228
|
+
const meta = this.ports.registry.get(sessionId);
|
|
229
|
+
if (!meta) {
|
|
230
|
+
throw new MachineSessionServiceFailure("not_found", "session not found");
|
|
231
|
+
}
|
|
232
|
+
await this.assertNotForkReserved(sessionId);
|
|
233
|
+
const nextExecution = await this.replaceExecutionSettings(sessionId, meta, { model: modelId, reasoningEffort }, input.collaborationMode);
|
|
234
|
+
return executionSettingsResult(nextExecution);
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
async replaceExecutionSettings(sessionId, meta, selection, collaborationMode) {
|
|
226
238
|
if (meta.execution.provider === "claude") {
|
|
227
239
|
const runtime = this.ports.runtimeState.snapshot(sessionId);
|
|
228
240
|
const pendingMessage = await this.ports.pendingMessages?.get(sessionId);
|
|
@@ -234,18 +246,15 @@ export class MachineSessionService {
|
|
|
234
246
|
}
|
|
235
247
|
}
|
|
236
248
|
const executionPort = this.requireExecution();
|
|
237
|
-
const reasoningEffort = input.reasoningEffort === null
|
|
238
|
-
? null
|
|
239
|
-
: validRequiredText(input.reasoningEffort, "reasoningEffort");
|
|
240
249
|
const nextExecution = {
|
|
241
250
|
...structuredClone(meta.execution),
|
|
242
|
-
model:
|
|
243
|
-
reasoningEffort,
|
|
244
|
-
...(meta.execution.provider !== "claude" &&
|
|
245
|
-
? { collaborationMode
|
|
251
|
+
model: selection.model,
|
|
252
|
+
reasoningEffort: selection.reasoningEffort,
|
|
253
|
+
...(meta.execution.provider !== "claude" && collaborationMode !== undefined
|
|
254
|
+
? { collaborationMode }
|
|
246
255
|
: {}),
|
|
247
256
|
};
|
|
248
|
-
if (meta.execution.provider !== "claude" &&
|
|
257
|
+
if (meta.execution.provider !== "claude" && collaborationMode !== undefined) {
|
|
249
258
|
const updateMode = executionPort.runner.updateCollaborationMode;
|
|
250
259
|
if (!updateMode) {
|
|
251
260
|
const message = "This Runtime does not support live collaboration-mode updates";
|
|
@@ -258,7 +267,7 @@ export class MachineSessionService {
|
|
|
258
267
|
// Omnigent parity: native state is authoritative. Do not make a failed
|
|
259
268
|
// toggle survive reload when the loaded thread rejected it.
|
|
260
269
|
try {
|
|
261
|
-
await updateMode.call(executionPort.runner, sessionId,
|
|
270
|
+
await updateMode.call(executionPort.runner, sessionId, collaborationMode);
|
|
262
271
|
}
|
|
263
272
|
catch (error) {
|
|
264
273
|
const failure = liveSessionFailureFrom(error);
|
|
@@ -270,7 +279,7 @@ export class MachineSessionService {
|
|
|
270
279
|
if (nextExecution.provider === "claude") {
|
|
271
280
|
executionPort.runner.stopRunner(sessionId);
|
|
272
281
|
}
|
|
273
|
-
return
|
|
282
|
+
return nextExecution;
|
|
274
283
|
}
|
|
275
284
|
/** Persist a mode changed from the native TUI before its reflected event is
|
|
276
285
|
* fanned out to Web clients. Unknown/deleted and Claude Sessions are ignored. */
|
|
@@ -490,8 +499,122 @@ export class MachineSessionService {
|
|
|
490
499
|
async sendMessage(sessionIdInput, messageInput) {
|
|
491
500
|
return this.withAdmission(() => this.sendMessageAdmitted(sessionIdInput, messageInput));
|
|
492
501
|
}
|
|
493
|
-
|
|
502
|
+
/** Start a turn and return only that response's canonical event stream. */
|
|
503
|
+
async startRun(sessionIdInput, messageInput, options = {}) {
|
|
504
|
+
return this.withAdmission(async () => {
|
|
505
|
+
const sessionId = validOpaqueToken(sessionIdInput, "sessionId", MAX_SESSION_ID_CHARS);
|
|
506
|
+
const meta = this.ports.registry.get(sessionId);
|
|
507
|
+
if (!meta)
|
|
508
|
+
throw new MachineSessionServiceFailure("not_found", "Session not found");
|
|
509
|
+
const subscription = this.ports.events.subscribe(sessionId)[Symbol.asyncIterator]();
|
|
510
|
+
let unsteer;
|
|
511
|
+
let ownsTurn = false;
|
|
512
|
+
const activateTurn = () => {
|
|
513
|
+
if (ownsTurn)
|
|
514
|
+
return;
|
|
515
|
+
ownsTurn = true;
|
|
516
|
+
if (!options.signal?.aborted) {
|
|
517
|
+
unsteer = options.steer?.subscribe((text) => {
|
|
518
|
+
void this.requireExecution().runner.injectMessage(sessionId, text);
|
|
519
|
+
});
|
|
520
|
+
}
|
|
521
|
+
};
|
|
522
|
+
const interrupt = () => {
|
|
523
|
+
if (ownsTurn)
|
|
524
|
+
void this.ports.interruption.interrupt(sessionId);
|
|
525
|
+
};
|
|
526
|
+
try {
|
|
527
|
+
options.signal?.addEventListener("abort", interrupt, { once: true });
|
|
528
|
+
const result = await this.sendMessageAdmitted(sessionId, messageInput, options.signal, activateTurn, true, options.collaborationMode
|
|
529
|
+
? { collaborationMode: options.collaborationMode }
|
|
530
|
+
: undefined);
|
|
531
|
+
if (!result.responseId) {
|
|
532
|
+
throw new MachineSessionServiceFailure("outcome_unknown", "run was already accepted but its response stream is unavailable");
|
|
533
|
+
}
|
|
534
|
+
const responseId = result.responseId;
|
|
535
|
+
const replayItems = result.replayed
|
|
536
|
+
? (await this.ports.log.snapshot(sessionId)).filter((item) => item.responseId === responseId)
|
|
537
|
+
: [];
|
|
538
|
+
const replayedItemIds = new Set(replayItems.map((item) => item.id));
|
|
539
|
+
const replayWasActive = this.ports.runtimeState
|
|
540
|
+
.snapshot(sessionId)
|
|
541
|
+
.activeResponseIds.includes(responseId);
|
|
542
|
+
if (result.replayed && !replayWasActive) {
|
|
543
|
+
throw new MachineSessionServiceFailure("outcome_unknown", "run was already accepted but its terminal event is no longer available");
|
|
544
|
+
}
|
|
545
|
+
if (result.replayed) {
|
|
546
|
+
activateTurn();
|
|
547
|
+
if (options.signal?.aborted) {
|
|
548
|
+
await this.ports.interruption.interrupt(sessionId).catch(() => false);
|
|
549
|
+
throw abortReason(options.signal);
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
const runExecution = result.operationExecution ?? {
|
|
553
|
+
model: meta.execution.model,
|
|
554
|
+
reasoningEffort: meta.execution.reasoningEffort,
|
|
555
|
+
};
|
|
556
|
+
const model = runExecution.model;
|
|
557
|
+
const generator = (async function* () {
|
|
558
|
+
try {
|
|
559
|
+
if (result.replayed) {
|
|
560
|
+
yield {
|
|
561
|
+
type: "response.created",
|
|
562
|
+
sessionId,
|
|
563
|
+
responseId,
|
|
564
|
+
model: model ?? "unknown",
|
|
565
|
+
};
|
|
566
|
+
for (const item of replayItems)
|
|
567
|
+
yield replaySessionItem(item);
|
|
568
|
+
}
|
|
569
|
+
while (true) {
|
|
570
|
+
const next = await subscription.next();
|
|
571
|
+
if (next.done)
|
|
572
|
+
return;
|
|
573
|
+
const event = next.value;
|
|
574
|
+
if (sessionEventResponseId(event) !== responseId)
|
|
575
|
+
continue;
|
|
576
|
+
const itemId = sessionEventItemId(event);
|
|
577
|
+
if (itemId && replayedItemIds.has(itemId))
|
|
578
|
+
continue;
|
|
579
|
+
yield event;
|
|
580
|
+
if (event.type === "response.completed" || event.type === "response.failed")
|
|
581
|
+
return;
|
|
582
|
+
}
|
|
583
|
+
}
|
|
584
|
+
finally {
|
|
585
|
+
options.signal?.removeEventListener("abort", interrupt);
|
|
586
|
+
unsteer?.();
|
|
587
|
+
await subscription.return?.();
|
|
588
|
+
}
|
|
589
|
+
})();
|
|
590
|
+
const provider = meta.execution.provider;
|
|
591
|
+
return {
|
|
592
|
+
responseId,
|
|
593
|
+
provider,
|
|
594
|
+
model: runExecution.model,
|
|
595
|
+
authSource: provider === "traex"
|
|
596
|
+
? "traex_cli"
|
|
597
|
+
: provider === "claude"
|
|
598
|
+
? "claude_cli"
|
|
599
|
+
: "codex_cli",
|
|
600
|
+
generator,
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
catch (error) {
|
|
604
|
+
options.signal?.removeEventListener("abort", interrupt);
|
|
605
|
+
unsteer?.();
|
|
606
|
+
await subscription.return?.();
|
|
607
|
+
throw error;
|
|
608
|
+
}
|
|
609
|
+
});
|
|
610
|
+
}
|
|
611
|
+
async sendMessageAdmitted(sessionIdInput, messageInput, signal, onTurnOwned, includeResponseId = false, turnOptions) {
|
|
494
612
|
const sessionId = validOpaqueToken(sessionIdInput, "sessionId", MAX_SESSION_ID_CHARS);
|
|
613
|
+
return this.withSessionMutation(sessionId, () => this.sendMessageAdmittedSerial(sessionId, messageInput, signal, onTurnOwned, includeResponseId, turnOptions));
|
|
614
|
+
}
|
|
615
|
+
async sendMessageAdmittedSerial(sessionId, messageInput, signal, onTurnOwned, includeResponseId = false, turnOptions) {
|
|
616
|
+
if (signal?.aborted)
|
|
617
|
+
throw abortReason(signal);
|
|
495
618
|
await this.assertNotForkReserved(sessionId);
|
|
496
619
|
const request = typeof messageInput === "string"
|
|
497
620
|
? { message: messageInput }
|
|
@@ -507,7 +630,24 @@ export class MachineSessionService {
|
|
|
507
630
|
if (hasContent && (!Array.isArray(request.content) || request.content.length === 0)) {
|
|
508
631
|
throw new MachineSessionServiceInputError("content must be a non-empty array");
|
|
509
632
|
}
|
|
510
|
-
|
|
633
|
+
let meta = this.ports.registry.get(sessionId);
|
|
634
|
+
const executionSelection = normalizeRunExecutionSelection(request.execution);
|
|
635
|
+
if (executionSelection && !meta) {
|
|
636
|
+
throw new MachineSessionServiceFailure("not_found", "session not found");
|
|
637
|
+
}
|
|
638
|
+
const requestedOperationExecution = executionSelection && meta
|
|
639
|
+
? {
|
|
640
|
+
selection: executionSelection,
|
|
641
|
+
snapshot: {
|
|
642
|
+
model: executionSelection.model !== undefined
|
|
643
|
+
? executionSelection.model
|
|
644
|
+
: meta.execution.model,
|
|
645
|
+
reasoningEffort: executionSelection.reasoningEffort !== undefined
|
|
646
|
+
? executionSelection.reasoningEffort
|
|
647
|
+
: meta.execution.reasoningEffort,
|
|
648
|
+
},
|
|
649
|
+
}
|
|
650
|
+
: undefined;
|
|
511
651
|
const consoleMeta = meta?.source === "console" ? meta : undefined;
|
|
512
652
|
let prepared;
|
|
513
653
|
const needsPreparedOperation = hasContent || request.clientMessageId !== undefined;
|
|
@@ -523,14 +663,24 @@ export class MachineSessionService {
|
|
|
523
663
|
}
|
|
524
664
|
prepared = await resources.prepareInput(sessionId, hasContent
|
|
525
665
|
? request.content
|
|
526
|
-
: [{ type: "input_text", text: request.message }], request.clientMessageId);
|
|
666
|
+
: [{ type: "input_text", text: request.message }], request.clientMessageId, ...(requestedOperationExecution ? [requestedOperationExecution] : []));
|
|
527
667
|
if (prepared.operationState === "injecting" ||
|
|
528
668
|
prepared.operationState === "outcome_unknown") {
|
|
529
669
|
throw new MachineSessionServiceFailure("outcome_unknown", "message delivery outcome is unknown");
|
|
530
670
|
}
|
|
531
671
|
if (prepared.operationState === "injected" ||
|
|
532
672
|
prepared.operationState === "mirrored") {
|
|
533
|
-
return {
|
|
673
|
+
return {
|
|
674
|
+
ok: true,
|
|
675
|
+
injected: true,
|
|
676
|
+
...(includeResponseId && prepared.responseId
|
|
677
|
+
? { responseId: prepared.responseId }
|
|
678
|
+
: {}),
|
|
679
|
+
...(prepared.operationExecution
|
|
680
|
+
? { operationExecution: prepared.operationExecution }
|
|
681
|
+
: {}),
|
|
682
|
+
replayed: true,
|
|
683
|
+
};
|
|
534
684
|
}
|
|
535
685
|
}
|
|
536
686
|
else {
|
|
@@ -544,10 +694,24 @@ export class MachineSessionService {
|
|
|
544
694
|
title: request.message,
|
|
545
695
|
};
|
|
546
696
|
}
|
|
697
|
+
const operationExecution = prepared.operationExecution ?? requestedOperationExecution?.snapshot;
|
|
698
|
+
if (operationExecution &&
|
|
699
|
+
meta &&
|
|
700
|
+
(operationExecution.model !== meta.execution.model ||
|
|
701
|
+
operationExecution.reasoningEffort !== meta.execution.reasoningEffort)) {
|
|
702
|
+
const nextExecution = await this.replaceExecutionSettings(sessionId, meta, operationExecution);
|
|
703
|
+
meta = { ...meta, execution: nextExecution };
|
|
704
|
+
}
|
|
547
705
|
if (consoleMeta && !consoleMeta.title) {
|
|
548
706
|
this.ports.registry.setTitle(sessionId, synthesizeSessionTitle(prepared.title));
|
|
549
707
|
}
|
|
550
708
|
const resources = this.ports.resources;
|
|
709
|
+
if (signal?.aborted) {
|
|
710
|
+
if (request.clientMessageId) {
|
|
711
|
+
await resources?.markMessageFailedNotStarted(sessionId, request.clientMessageId, "run was cancelled before injection");
|
|
712
|
+
}
|
|
713
|
+
throw abortReason(signal);
|
|
714
|
+
}
|
|
551
715
|
if (request.clientMessageId) {
|
|
552
716
|
await resources?.markMessageInjecting(sessionId, request.clientMessageId);
|
|
553
717
|
}
|
|
@@ -561,9 +725,18 @@ export class MachineSessionService {
|
|
|
561
725
|
}
|
|
562
726
|
throw error;
|
|
563
727
|
}
|
|
728
|
+
if (signal?.aborted) {
|
|
729
|
+
if (request.clientMessageId) {
|
|
730
|
+
await resources?.markMessageFailedNotStarted(sessionId, request.clientMessageId, "run was cancelled before injection");
|
|
731
|
+
}
|
|
732
|
+
throw abortReason(signal);
|
|
733
|
+
}
|
|
564
734
|
let result;
|
|
565
735
|
try {
|
|
566
|
-
|
|
736
|
+
const injectionInput = needsPreparedOperation ? prepared.input : request.message;
|
|
737
|
+
result = turnOptions
|
|
738
|
+
? await execution.runner.injectMessage(sessionId, injectionInput, turnOptions)
|
|
739
|
+
: await execution.runner.injectMessage(sessionId, injectionInput);
|
|
567
740
|
}
|
|
568
741
|
catch (error) {
|
|
569
742
|
const failure = execution.runner.lastLiveSessionFailure?.(sessionId)
|
|
@@ -596,16 +769,48 @@ export class MachineSessionService {
|
|
|
596
769
|
}
|
|
597
770
|
throw new MachineSessionServiceFailure("failed_precondition", `live injection ${outcome}`, reason, failure);
|
|
598
771
|
}
|
|
772
|
+
onTurnOwned?.();
|
|
773
|
+
if (signal?.aborted) {
|
|
774
|
+
await this.ports.interruption.interrupt(sessionId).catch(() => false);
|
|
775
|
+
if (request.clientMessageId) {
|
|
776
|
+
await Promise.resolve(resources?.markMessageInjected(sessionId, request.clientMessageId, result.responseId ? { responseId: result.responseId } : undefined)).catch(() => undefined);
|
|
777
|
+
}
|
|
778
|
+
throw abortReason(signal);
|
|
779
|
+
}
|
|
599
780
|
if (request.clientMessageId) {
|
|
600
781
|
try {
|
|
601
|
-
await resources?.markMessageInjected(sessionId, request.clientMessageId);
|
|
782
|
+
await resources?.markMessageInjected(sessionId, request.clientMessageId, result.responseId ? { responseId: result.responseId } : undefined);
|
|
602
783
|
}
|
|
603
784
|
catch {
|
|
604
785
|
await Promise.resolve(resources?.markMessageOutcomeUnknown(sessionId, request.clientMessageId, "message state could not be persisted after injection")).catch(() => undefined);
|
|
605
786
|
throw new MachineSessionServiceFailure("outcome_unknown", "message was injected but its delivery state could not be persisted");
|
|
606
787
|
}
|
|
607
788
|
}
|
|
608
|
-
return {
|
|
789
|
+
return {
|
|
790
|
+
ok: true,
|
|
791
|
+
injected: true,
|
|
792
|
+
...(includeResponseId && result.responseId ? { responseId: result.responseId } : {}),
|
|
793
|
+
...(operationExecution ? { operationExecution } : {}),
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
async withSessionMutation(sessionId, action) {
|
|
797
|
+
const previous = this.sessionMutationTails.get(sessionId);
|
|
798
|
+
let release;
|
|
799
|
+
const tail = new Promise((resolve) => {
|
|
800
|
+
release = resolve;
|
|
801
|
+
});
|
|
802
|
+
this.sessionMutationTails.set(sessionId, tail);
|
|
803
|
+
if (previous)
|
|
804
|
+
await previous;
|
|
805
|
+
try {
|
|
806
|
+
return await action();
|
|
807
|
+
}
|
|
808
|
+
finally {
|
|
809
|
+
release();
|
|
810
|
+
if (this.sessionMutationTails.get(sessionId) === tail) {
|
|
811
|
+
this.sessionMutationTails.delete(sessionId);
|
|
812
|
+
}
|
|
813
|
+
}
|
|
609
814
|
}
|
|
610
815
|
resourcePolicy(sessionIdInput) {
|
|
611
816
|
const sessionId = this.requireResourceSession(sessionIdInput);
|
|
@@ -635,6 +840,62 @@ export class MachineSessionService {
|
|
|
635
840
|
const sessionId = this.requireResourceSession(input.sessionId);
|
|
636
841
|
return this.requireResources().deleteResource({ ...input, sessionId });
|
|
637
842
|
}
|
|
843
|
+
async resolveResourcePath(sessionIdInput, resourceId) {
|
|
844
|
+
const sessionId = this.requireResourceSession(sessionIdInput);
|
|
845
|
+
const resolve = this.requireResources().resolveCommittedLocalPath;
|
|
846
|
+
if (!resolve) {
|
|
847
|
+
throw new MachineSessionServiceFailure("failed_precondition", "Session resource paths are unavailable");
|
|
848
|
+
}
|
|
849
|
+
return resolve.call(this.requireResources(), sessionId, resourceId);
|
|
850
|
+
}
|
|
851
|
+
async getFile(input) {
|
|
852
|
+
const resolved = await this.resolveSessionItemFile(input);
|
|
853
|
+
return { file: resolved.metadata };
|
|
854
|
+
}
|
|
855
|
+
async readFile(input) {
|
|
856
|
+
const resolved = await this.resolveSessionItemFile(input);
|
|
857
|
+
return this.readResolvedFile(resolved, input);
|
|
858
|
+
}
|
|
859
|
+
async getWorkspaceFile(input) {
|
|
860
|
+
const resolved = await this.resolveSessionWorkspaceFile(input);
|
|
861
|
+
return { file: resolved.metadata };
|
|
862
|
+
}
|
|
863
|
+
async readWorkspaceFile(input) {
|
|
864
|
+
const resolved = await this.resolveSessionWorkspaceFile(input);
|
|
865
|
+
return this.readResolvedFile(resolved, input);
|
|
866
|
+
}
|
|
867
|
+
async readResolvedFile(resolved, input) {
|
|
868
|
+
if (resolved.metadata.version !== input.version) {
|
|
869
|
+
throw new MachineSessionServiceFailure("conflict", "Session file changed while it was being read");
|
|
870
|
+
}
|
|
871
|
+
if (input.offset >= resolved.metadata.byteLength) {
|
|
872
|
+
return { data: "", offset: input.offset, eof: true };
|
|
873
|
+
}
|
|
874
|
+
const length = Math.min(input.length, resolved.metadata.byteLength - input.offset);
|
|
875
|
+
const file = await open(resolved.path, "r");
|
|
876
|
+
try {
|
|
877
|
+
const openedStat = await file.stat();
|
|
878
|
+
if (!openedStat.isFile() ||
|
|
879
|
+
sessionFileVersion(resolved.path, openedStat) !== resolved.metadata.version) {
|
|
880
|
+
throw new MachineSessionServiceFailure("conflict", "Session file changed while it was being read");
|
|
881
|
+
}
|
|
882
|
+
const buffer = Buffer.allocUnsafe(length);
|
|
883
|
+
const { bytesRead } = await file.read(buffer, 0, length, input.offset);
|
|
884
|
+
const completedStat = await file.stat();
|
|
885
|
+
if (sessionFileVersion(resolved.path, completedStat) !== resolved.metadata.version) {
|
|
886
|
+
throw new MachineSessionServiceFailure("conflict", "Session file changed while it was being read");
|
|
887
|
+
}
|
|
888
|
+
const nextOffset = input.offset + bytesRead;
|
|
889
|
+
return {
|
|
890
|
+
data: buffer.subarray(0, bytesRead).toString("base64"),
|
|
891
|
+
offset: nextOffset,
|
|
892
|
+
eof: nextOffset >= resolved.metadata.byteLength,
|
|
893
|
+
};
|
|
894
|
+
}
|
|
895
|
+
finally {
|
|
896
|
+
await file.close();
|
|
897
|
+
}
|
|
898
|
+
}
|
|
638
899
|
/** Persist the first task while login/onboarding owns the Provider TUI. The
|
|
639
900
|
* delivery worker starts the pane now, waits for a real native thread, then
|
|
640
901
|
* injects exactly once. `failed` is fenced as outcome_unknown and never retried. */
|
|
@@ -739,6 +1000,101 @@ export class MachineSessionService {
|
|
|
739
1000
|
}
|
|
740
1001
|
return { ok: true };
|
|
741
1002
|
}
|
|
1003
|
+
async resolveSessionItemFile(input) {
|
|
1004
|
+
const sessionId = this.requireResourceSession(input.sessionId);
|
|
1005
|
+
const item = await this.ports.log.get(sessionId, input.itemId);
|
|
1006
|
+
if (!item) {
|
|
1007
|
+
throw new MachineSessionServiceFailure("not_found", "Session item was not found");
|
|
1008
|
+
}
|
|
1009
|
+
let reference;
|
|
1010
|
+
let type;
|
|
1011
|
+
if (item.type === "message" && item.data.role === "user") {
|
|
1012
|
+
const part = item.data.content[input.partIndex];
|
|
1013
|
+
if (!part || (part.type !== "input_image" && part.type !== "input_file")) {
|
|
1014
|
+
throw new MachineSessionServiceFailure("not_found", "Session item file was not found");
|
|
1015
|
+
}
|
|
1016
|
+
reference = part;
|
|
1017
|
+
type = part.type;
|
|
1018
|
+
}
|
|
1019
|
+
else if (item.type === "function_call_output" && input.partIndex === 0) {
|
|
1020
|
+
if (!item.data.generatedImage) {
|
|
1021
|
+
throw new MachineSessionServiceFailure("not_found", "Session item file was not found");
|
|
1022
|
+
}
|
|
1023
|
+
reference = item.data.generatedImage;
|
|
1024
|
+
type = "generated_image";
|
|
1025
|
+
}
|
|
1026
|
+
else {
|
|
1027
|
+
throw new MachineSessionServiceFailure("not_found", "Session item file was not found");
|
|
1028
|
+
}
|
|
1029
|
+
if (!("path" in reference) || !reference.path || !isAbsolute(reference.path)) {
|
|
1030
|
+
throw new MachineSessionServiceFailure("not_found", "Session item is not path-backed");
|
|
1031
|
+
}
|
|
1032
|
+
try {
|
|
1033
|
+
const canonicalPath = await realpath(reference.path);
|
|
1034
|
+
const fileStat = await stat(canonicalPath);
|
|
1035
|
+
if (!fileStat.isFile() || fileStat.size < 1) {
|
|
1036
|
+
throw new MachineSessionServiceFailure("not_found", "Session item path is not a file");
|
|
1037
|
+
}
|
|
1038
|
+
const modifiedAt = Math.max(0, Math.trunc(fileStat.mtimeMs));
|
|
1039
|
+
const version = sessionFileVersion(canonicalPath, fileStat);
|
|
1040
|
+
return {
|
|
1041
|
+
path: canonicalPath,
|
|
1042
|
+
metadata: {
|
|
1043
|
+
itemId: item.id,
|
|
1044
|
+
partIndex: input.partIndex,
|
|
1045
|
+
type,
|
|
1046
|
+
filename: reference.filename || basename(canonicalPath),
|
|
1047
|
+
mediaType: reference.mediaType,
|
|
1048
|
+
byteLength: fileStat.size,
|
|
1049
|
+
modifiedAt,
|
|
1050
|
+
version,
|
|
1051
|
+
},
|
|
1052
|
+
};
|
|
1053
|
+
}
|
|
1054
|
+
catch (error) {
|
|
1055
|
+
if (error instanceof MachineSessionServiceFailure)
|
|
1056
|
+
throw error;
|
|
1057
|
+
throw new MachineSessionServiceFailure("not_found", "Session item file is unavailable", error instanceof Error ? error.message : String(error));
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
async resolveSessionWorkspaceFile(input) {
|
|
1061
|
+
const sessionId = this.requireResourceSession(input.sessionId);
|
|
1062
|
+
const session = this.ports.registry.get(sessionId);
|
|
1063
|
+
try {
|
|
1064
|
+
const workspaceRoot = await realpath(session.workspace.cwd);
|
|
1065
|
+
const requestedPath = isAbsolute(input.path)
|
|
1066
|
+
? input.path
|
|
1067
|
+
: resolve(workspaceRoot, input.path);
|
|
1068
|
+
const canonicalPath = await realpath(requestedPath);
|
|
1069
|
+
const workspaceRelative = relative(workspaceRoot, canonicalPath);
|
|
1070
|
+
if (!workspaceRelative ||
|
|
1071
|
+
workspaceRelative === ".." ||
|
|
1072
|
+
workspaceRelative.startsWith(`..${sep}`) ||
|
|
1073
|
+
isAbsolute(workspaceRelative)) {
|
|
1074
|
+
throw new MachineSessionServiceFailure("not_found", "Session workspace file was not found");
|
|
1075
|
+
}
|
|
1076
|
+
const fileStat = await stat(canonicalPath);
|
|
1077
|
+
if (!fileStat.isFile()) {
|
|
1078
|
+
throw new MachineSessionServiceFailure("not_found", "Session workspace path is not a file");
|
|
1079
|
+
}
|
|
1080
|
+
return {
|
|
1081
|
+
path: canonicalPath,
|
|
1082
|
+
metadata: {
|
|
1083
|
+
path: input.path,
|
|
1084
|
+
filename: basename(canonicalPath),
|
|
1085
|
+
mediaType: workspaceFileMediaType(canonicalPath),
|
|
1086
|
+
byteLength: fileStat.size,
|
|
1087
|
+
modifiedAt: Math.max(0, Math.trunc(fileStat.mtimeMs)),
|
|
1088
|
+
version: sessionFileVersion(canonicalPath, fileStat),
|
|
1089
|
+
},
|
|
1090
|
+
};
|
|
1091
|
+
}
|
|
1092
|
+
catch (error) {
|
|
1093
|
+
if (error instanceof MachineSessionServiceFailure)
|
|
1094
|
+
throw error;
|
|
1095
|
+
throw new MachineSessionServiceFailure("not_found", "Session workspace file is unavailable", error instanceof Error ? error.message : String(error));
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
742
1098
|
requireAgents() {
|
|
743
1099
|
if (!this.ports.agents) {
|
|
744
1100
|
throw new MachineSessionServiceFailure("failed_precondition", "session agent options are unavailable");
|
|
@@ -1131,6 +1487,9 @@ function cancellableWatch(sessionId, iterator, signal) {
|
|
|
1131
1487
|
function cloneRuntimeSnapshot(snapshot) {
|
|
1132
1488
|
return {
|
|
1133
1489
|
status: snapshot.status,
|
|
1490
|
+
...(snapshot.backgroundTaskCount === undefined
|
|
1491
|
+
? {}
|
|
1492
|
+
: { backgroundTaskCount: snapshot.backgroundTaskCount }),
|
|
1134
1493
|
activeResponseIds: [...snapshot.activeResponseIds],
|
|
1135
1494
|
pendingInteractions: snapshot.pendingInteractions.map((pending) => ({
|
|
1136
1495
|
responseId: pending.responseId,
|
|
@@ -1138,6 +1497,87 @@ function cloneRuntimeSnapshot(snapshot) {
|
|
|
1138
1497
|
})),
|
|
1139
1498
|
};
|
|
1140
1499
|
}
|
|
1500
|
+
function sessionEventResponseId(event) {
|
|
1501
|
+
if ("responseId" in event && typeof event.responseId === "string")
|
|
1502
|
+
return event.responseId;
|
|
1503
|
+
if ("item" in event && event.item && typeof event.item.responseId === "string") {
|
|
1504
|
+
return event.item.responseId;
|
|
1505
|
+
}
|
|
1506
|
+
return undefined;
|
|
1507
|
+
}
|
|
1508
|
+
function sessionEventItemId(event) {
|
|
1509
|
+
return "item" in event && event.item && typeof event.item.id === "string"
|
|
1510
|
+
? event.item.id
|
|
1511
|
+
: undefined;
|
|
1512
|
+
}
|
|
1513
|
+
function replaySessionItem(item) {
|
|
1514
|
+
if (item.type === "message" && item.data.role === "user") {
|
|
1515
|
+
return { type: "session.input.consumed", item };
|
|
1516
|
+
}
|
|
1517
|
+
if (item.type === "interaction_request") {
|
|
1518
|
+
return {
|
|
1519
|
+
type: "session.interaction.requested",
|
|
1520
|
+
sessionId: item.sessionId,
|
|
1521
|
+
responseId: item.responseId,
|
|
1522
|
+
interaction: item.data.interaction,
|
|
1523
|
+
item,
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
if (item.type === "interaction_resolution" &&
|
|
1527
|
+
item.data.status === "resolved" &&
|
|
1528
|
+
item.data.resolution) {
|
|
1529
|
+
return {
|
|
1530
|
+
type: "session.interaction.resolved",
|
|
1531
|
+
sessionId: item.sessionId,
|
|
1532
|
+
responseId: item.responseId,
|
|
1533
|
+
interactionId: item.data.interactionId,
|
|
1534
|
+
resolution: item.data.resolution,
|
|
1535
|
+
item,
|
|
1536
|
+
};
|
|
1537
|
+
}
|
|
1538
|
+
if (item.type === "interaction_resolution" &&
|
|
1539
|
+
(item.data.status === "cancelled" || item.data.status === "expired")) {
|
|
1540
|
+
const reason = item.data.reason ?? (item.data.status === "expired" ? "expired" : undefined);
|
|
1541
|
+
return {
|
|
1542
|
+
type: "session.interaction.cancelled",
|
|
1543
|
+
sessionId: item.sessionId,
|
|
1544
|
+
responseId: item.responseId,
|
|
1545
|
+
interactionId: item.data.interactionId,
|
|
1546
|
+
...(reason ? { reason } : {}),
|
|
1547
|
+
item,
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
return { type: "response.output_item.done", responseId: item.responseId, item };
|
|
1551
|
+
}
|
|
1552
|
+
function normalizeRunExecutionSelection(value) {
|
|
1553
|
+
if (value === undefined)
|
|
1554
|
+
return undefined;
|
|
1555
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) {
|
|
1556
|
+
throw new MachineSessionServiceInputError("execution must be an object");
|
|
1557
|
+
}
|
|
1558
|
+
if (Object.keys(value).some((key) => key !== "model" && key !== "reasoningEffort")) {
|
|
1559
|
+
throw new MachineSessionServiceInputError("execution has unknown fields");
|
|
1560
|
+
}
|
|
1561
|
+
const selection = {};
|
|
1562
|
+
if (Object.prototype.hasOwnProperty.call(value, "model")) {
|
|
1563
|
+
selection.model = value.model === null
|
|
1564
|
+
? null
|
|
1565
|
+
: validRequiredText(value.model, "execution.model");
|
|
1566
|
+
}
|
|
1567
|
+
if (Object.prototype.hasOwnProperty.call(value, "reasoningEffort")) {
|
|
1568
|
+
selection.reasoningEffort = value.reasoningEffort === null
|
|
1569
|
+
? null
|
|
1570
|
+
: validRequiredText(value.reasoningEffort, "execution.reasoningEffort");
|
|
1571
|
+
}
|
|
1572
|
+
return selection;
|
|
1573
|
+
}
|
|
1574
|
+
function abortReason(signal) {
|
|
1575
|
+
if (signal.reason instanceof Error)
|
|
1576
|
+
return signal.reason;
|
|
1577
|
+
const error = new Error("run was cancelled");
|
|
1578
|
+
error.name = "AbortError";
|
|
1579
|
+
return error;
|
|
1580
|
+
}
|
|
1141
1581
|
function liveSessionFailureFrom(error) {
|
|
1142
1582
|
if (!error || typeof error !== "object")
|
|
1143
1583
|
return undefined;
|
|
@@ -1205,6 +1645,54 @@ function timestampFromEpoch(value, field) {
|
|
|
1205
1645
|
}
|
|
1206
1646
|
return new Date(value).toISOString();
|
|
1207
1647
|
}
|
|
1648
|
+
function sessionFileVersion(path, fileStat) {
|
|
1649
|
+
return createHash("sha256")
|
|
1650
|
+
.update(`${path}\0${fileStat.dev}\0${fileStat.ino}\0${fileStat.size}\0${fileStat.mtimeMs}\0${fileStat.ctimeMs}`)
|
|
1651
|
+
.digest("hex");
|
|
1652
|
+
}
|
|
1653
|
+
function workspaceFileMediaType(path) {
|
|
1654
|
+
switch (extname(path).toLowerCase()) {
|
|
1655
|
+
case ".png": return "image/png";
|
|
1656
|
+
case ".jpg":
|
|
1657
|
+
case ".jpeg": return "image/jpeg";
|
|
1658
|
+
case ".webp": return "image/webp";
|
|
1659
|
+
case ".gif": return "image/gif";
|
|
1660
|
+
case ".svg": return "image/svg+xml";
|
|
1661
|
+
case ".pdf": return "application/pdf";
|
|
1662
|
+
case ".json": return "application/json";
|
|
1663
|
+
case ".html":
|
|
1664
|
+
case ".htm": return "text/html";
|
|
1665
|
+
case ".css": return "text/css";
|
|
1666
|
+
case ".js":
|
|
1667
|
+
case ".mjs":
|
|
1668
|
+
case ".cjs": return "text/javascript";
|
|
1669
|
+
case ".md":
|
|
1670
|
+
case ".mdx": return "text/markdown";
|
|
1671
|
+
case ".csv": return "text/csv";
|
|
1672
|
+
case ".tsv": return "text/tab-separated-values";
|
|
1673
|
+
case ".txt":
|
|
1674
|
+
case ".log":
|
|
1675
|
+
case ".ts":
|
|
1676
|
+
case ".tsx":
|
|
1677
|
+
case ".jsx":
|
|
1678
|
+
case ".py":
|
|
1679
|
+
case ".go":
|
|
1680
|
+
case ".rs":
|
|
1681
|
+
case ".java":
|
|
1682
|
+
case ".c":
|
|
1683
|
+
case ".cc":
|
|
1684
|
+
case ".cpp":
|
|
1685
|
+
case ".h":
|
|
1686
|
+
case ".hpp":
|
|
1687
|
+
case ".sh":
|
|
1688
|
+
case ".zsh":
|
|
1689
|
+
case ".bash":
|
|
1690
|
+
case ".yaml":
|
|
1691
|
+
case ".yml":
|
|
1692
|
+
case ".toml": return "text/plain";
|
|
1693
|
+
default: return "application/octet-stream";
|
|
1694
|
+
}
|
|
1695
|
+
}
|
|
1208
1696
|
function jsonByteLength(value) {
|
|
1209
1697
|
return Buffer.byteLength(JSON.stringify(value), "utf8");
|
|
1210
1698
|
}
|