remote-codex 0.11.0 → 0.11.2
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/apps/supervisor-api/dist/index.js +3056 -753
- package/apps/supervisor-web/dist/assets/core-DIQen2lE.js +12 -0
- package/apps/supervisor-web/dist/assets/{css-DPfMkruS.js → css-CLj8gQPS.js} +1 -1
- package/apps/supervisor-web/dist/assets/engine-javascript-DBd1bXLz.js +141 -0
- package/apps/supervisor-web/dist/assets/graph-vendor-C5ap-Sga.css +1 -0
- package/apps/supervisor-web/dist/assets/graph-vendor-CGzY-MFv.js +23 -0
- package/apps/supervisor-web/dist/assets/{html-GMplVEZG.js → html-pp8916En.js} +1 -1
- package/apps/supervisor-web/dist/assets/index-CbDzXN9T.css +1 -0
- package/apps/supervisor-web/dist/assets/index-DQpHiQXN.js +4 -0
- package/apps/supervisor-web/dist/assets/markdown-vendor-hBDTCSB-.js +291 -0
- package/apps/supervisor-web/dist/assets/react-vendor-o1Xrx7m4.js +60 -0
- package/apps/supervisor-web/dist/assets/{shellscript-Yzrsuije.js → shellscript-CEILq0vU.js} +1 -1
- package/apps/supervisor-web/dist/assets/{sql-BLtJtn59.js → sql-CRqJ_cUM.js} +1 -1
- package/apps/supervisor-web/dist/assets/terminal-vendor-Beg8tuEN.css +32 -0
- package/apps/supervisor-web/dist/assets/{xterm-D4sevve4.js → terminal-vendor-CLGgN91S.js} +17 -6
- package/apps/supervisor-web/dist/assets/thread-ui-BEieA99i.css +1 -0
- package/apps/supervisor-web/dist/assets/thread-ui-CDk3ExRH.js +3516 -0
- package/apps/supervisor-web/dist/assets/ui-vendor-CgOZX1B8.js +425 -0
- package/apps/supervisor-web/dist/index.html +11 -2
- package/apps/supervisor-web/dist/vendor/3Dmol-min.js +2 -0
- package/bin/remote-codex-plugin-mcp.mjs +140 -0
- package/package.json +6 -1
- package/packages/agent-runtime/src/model-pricing.ts +16 -3
- package/packages/agent-runtime/src/types.ts +1 -0
- package/packages/agent-runtime/src/unavailable-runtime.ts +5 -13
- package/packages/claude/src/historyItems.ts +41 -5
- package/packages/claude/src/runtimeAdapter.test.ts +22 -0
- package/packages/claude/src/runtimeAdapter.ts +7 -5
- package/packages/codex/src/appServerManager.ts +3 -3
- package/packages/codex/src/historyItems.test.ts +29 -4
- package/packages/codex/src/historyItems.ts +52 -20
- package/packages/codex/src/modelPricing.test.ts +51 -0
- package/packages/codex/src/runtime-errors.ts +0 -5
- package/packages/codex/src/runtimeAdapter.ts +3 -0
- package/packages/codex/src/types.ts +1 -0
- package/packages/db/migrations/0018_shell_session_label.sql +1 -0
- package/packages/db/src/repositories.ts +12 -0
- package/packages/db/src/schema.ts +1 -0
- package/packages/opencode/src/historyItems.ts +0 -17
- package/packages/opencode/src/runtimeAdapter.test.ts +89 -0
- package/packages/opencode/src/runtimeAdapter.ts +8 -4
- package/packages/plugin-terminal/package.json +17 -0
- package/packages/plugin-terminal/plugin.json +25 -0
- package/packages/plugin-terminal/src/index.ts +2 -0
- package/packages/plugin-terminal/src/manifest.ts +51 -0
- package/packages/shared/src/index.ts +129 -0
- package/apps/supervisor-web/dist/assets/abap-BdImnpbu.js +0 -1
- package/apps/supervisor-web/dist/assets/actionscript-3-CoDkCxhg.js +0 -1
- package/apps/supervisor-web/dist/assets/ada-bCR0ucgS.js +0 -1
- package/apps/supervisor-web/dist/assets/addon-fit-YJmn1quW.js +0 -12
- package/apps/supervisor-web/dist/assets/andromeeda-C4gqWexZ.js +0 -1
- package/apps/supervisor-web/dist/assets/angular-html-CU67Zn6k.js +0 -1
- package/apps/supervisor-web/dist/assets/angular-ts-BwZT4LLn.js +0 -1
- package/apps/supervisor-web/dist/assets/apache-Pmp26Uib.js +0 -1
- package/apps/supervisor-web/dist/assets/apex-D8_7TLub.js +0 -1
- package/apps/supervisor-web/dist/assets/apl-dKokRX4l.js +0 -1
- package/apps/supervisor-web/dist/assets/applescript-Co6uUVPk.js +0 -1
- package/apps/supervisor-web/dist/assets/ara-BRHolxvo.js +0 -1
- package/apps/supervisor-web/dist/assets/asciidoc-Ve4PFQV2.js +0 -1
- package/apps/supervisor-web/dist/assets/asm-D_Q5rh1f.js +0 -1
- package/apps/supervisor-web/dist/assets/astro-CbQHKStN.js +0 -1
- package/apps/supervisor-web/dist/assets/aurora-x-D-2ljcwZ.js +0 -1
- package/apps/supervisor-web/dist/assets/awk-DMzUqQB5.js +0 -1
- package/apps/supervisor-web/dist/assets/ayu-mirage-32ctXXKs.js +0 -1
- package/apps/supervisor-web/dist/assets/ballerina-BFfxhgS-.js +0 -1
- package/apps/supervisor-web/dist/assets/bat-BkioyH1T.js +0 -1
- package/apps/supervisor-web/dist/assets/beancount-k_qm7-4y.js +0 -1
- package/apps/supervisor-web/dist/assets/berry-uYugtg8r.js +0 -1
- package/apps/supervisor-web/dist/assets/bibtex-CHM0blh-.js +0 -1
- package/apps/supervisor-web/dist/assets/bicep-Bmn6On1c.js +0 -1
- package/apps/supervisor-web/dist/assets/bird2-DPOp833l.js +0 -1
- package/apps/supervisor-web/dist/assets/blade-D4QpJJKB.js +0 -1
- package/apps/supervisor-web/dist/assets/bsl-BO_Y6i37.js +0 -1
- package/apps/supervisor-web/dist/assets/c-BIGW1oBm.js +0 -1
- package/apps/supervisor-web/dist/assets/c3-eo99z4R2.js +0 -1
- package/apps/supervisor-web/dist/assets/cadence-Bv_4Rxtq.js +0 -1
- package/apps/supervisor-web/dist/assets/cairo-KRGpt6FW.js +0 -1
- package/apps/supervisor-web/dist/assets/catppuccin-frappe-DFWUc33u.js +0 -1
- package/apps/supervisor-web/dist/assets/catppuccin-latte-C9dUb6Cb.js +0 -1
- package/apps/supervisor-web/dist/assets/catppuccin-macchiato-DQyhUUbL.js +0 -1
- package/apps/supervisor-web/dist/assets/catppuccin-mocha-D87Tk5Gz.js +0 -1
- package/apps/supervisor-web/dist/assets/clarity-D53aC0YG.js +0 -1
- package/apps/supervisor-web/dist/assets/clojure-P80f7IUj.js +0 -1
- package/apps/supervisor-web/dist/assets/cmake-D1j8_8rp.js +0 -1
- package/apps/supervisor-web/dist/assets/cobol-nwyudZeR.js +0 -1
- package/apps/supervisor-web/dist/assets/codeowners-Bp6g37R7.js +0 -1
- package/apps/supervisor-web/dist/assets/codeql-DsOJ9woJ.js +0 -1
- package/apps/supervisor-web/dist/assets/coffee-Ch7k5sss.js +0 -1
- package/apps/supervisor-web/dist/assets/common-lisp-Cg-RD9OK.js +0 -1
- package/apps/supervisor-web/dist/assets/coq-DkFqJrB1.js +0 -1
- package/apps/supervisor-web/dist/assets/cpp-CofmeUqb.js +0 -1
- package/apps/supervisor-web/dist/assets/crystal-tKQVLTB8.js +0 -1
- package/apps/supervisor-web/dist/assets/csharp-COcwbKMJ.js +0 -1
- package/apps/supervisor-web/dist/assets/cue-D82EKSYY.js +0 -1
- package/apps/supervisor-web/dist/assets/cypher-COkxafJQ.js +0 -1
- package/apps/supervisor-web/dist/assets/d-85-TOEBH.js +0 -1
- package/apps/supervisor-web/dist/assets/dark-plus-C3mMm8J8.js +0 -1
- package/apps/supervisor-web/dist/assets/dart-CF10PKvl.js +0 -1
- package/apps/supervisor-web/dist/assets/dax-CEL-wOlO.js +0 -1
- package/apps/supervisor-web/dist/assets/desktop-BmXAJ9_W.js +0 -1
- package/apps/supervisor-web/dist/assets/diff-D97Zzqfu.js +0 -1
- package/apps/supervisor-web/dist/assets/docker-BcOcwvcX.js +0 -1
- package/apps/supervisor-web/dist/assets/dotenv-Da5cRb03.js +0 -1
- package/apps/supervisor-web/dist/assets/dracula-BzJJZx-M.js +0 -1
- package/apps/supervisor-web/dist/assets/dracula-soft-BXkSAIEj.js +0 -1
- package/apps/supervisor-web/dist/assets/dream-maker-BtqSS_iP.js +0 -1
- package/apps/supervisor-web/dist/assets/edge-BkV0erSs.js +0 -1
- package/apps/supervisor-web/dist/assets/elixir-CDX3lj18.js +0 -1
- package/apps/supervisor-web/dist/assets/elm-DbKCFpqz.js +0 -1
- package/apps/supervisor-web/dist/assets/emacs-lisp-C9XAeP06.js +0 -1
- package/apps/supervisor-web/dist/assets/erb-B12qg9BL.js +0 -1
- package/apps/supervisor-web/dist/assets/erlang-DsQrWhSR.js +0 -1
- package/apps/supervisor-web/dist/assets/everforest-dark-BgDCqdQA.js +0 -1
- package/apps/supervisor-web/dist/assets/everforest-light-C8M2exoo.js +0 -1
- package/apps/supervisor-web/dist/assets/fennel-BYunw83y.js +0 -1
- package/apps/supervisor-web/dist/assets/fish-BvzEVeQv.js +0 -1
- package/apps/supervisor-web/dist/assets/fluent-C4IJs8-o.js +0 -1
- package/apps/supervisor-web/dist/assets/fortran-fixed-form-CkoXwp7k.js +0 -1
- package/apps/supervisor-web/dist/assets/fortran-free-form-BxgE0vQu.js +0 -1
- package/apps/supervisor-web/dist/assets/fsharp-CXgrBDvD.js +0 -1
- package/apps/supervisor-web/dist/assets/gdresource-BOOCDP_w.js +0 -1
- package/apps/supervisor-web/dist/assets/gdscript-C5YyOfLZ.js +0 -1
- package/apps/supervisor-web/dist/assets/gdshader-DkwncUOv.js +0 -1
- package/apps/supervisor-web/dist/assets/genie-D0YGMca9.js +0 -1
- package/apps/supervisor-web/dist/assets/gherkin-DyxjwDmM.js +0 -1
- package/apps/supervisor-web/dist/assets/git-commit-F4YmCXRG.js +0 -1
- package/apps/supervisor-web/dist/assets/git-rebase-r7XF79zn.js +0 -1
- package/apps/supervisor-web/dist/assets/github-dark-DHJKELXO.js +0 -1
- package/apps/supervisor-web/dist/assets/github-dark-default-Cuk6v7N8.js +0 -1
- package/apps/supervisor-web/dist/assets/github-dark-dimmed-DH5Ifo-i.js +0 -1
- package/apps/supervisor-web/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +0 -1
- package/apps/supervisor-web/dist/assets/github-light-DAi9KRSo.js +0 -1
- package/apps/supervisor-web/dist/assets/github-light-default-D7oLnXFd.js +0 -1
- package/apps/supervisor-web/dist/assets/github-light-high-contrast-BfjtVDDH.js +0 -1
- package/apps/supervisor-web/dist/assets/gleam-BspZqrRM.js +0 -1
- package/apps/supervisor-web/dist/assets/glimmer-js-Rg0-pVw9.js +0 -1
- package/apps/supervisor-web/dist/assets/glimmer-ts-U6CK756n.js +0 -1
- package/apps/supervisor-web/dist/assets/glsl-DplSGwfg.js +0 -1
- package/apps/supervisor-web/dist/assets/gn-n2N0HUVH.js +0 -1
- package/apps/supervisor-web/dist/assets/gnuplot-DdkO51Og.js +0 -1
- package/apps/supervisor-web/dist/assets/go-CxLEBnE3.js +0 -1
- package/apps/supervisor-web/dist/assets/graphql-ChdNCCLP.js +0 -1
- package/apps/supervisor-web/dist/assets/groovy-gcz8RCvz.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-dark-medium-GsRaNv29.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-dark-soft-CVdnzihN.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-light-hard-CH1njM8p.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-light-medium-DRw_LuNl.js +0 -1
- package/apps/supervisor-web/dist/assets/gruvbox-light-soft-hJgmCMqR.js +0 -1
- package/apps/supervisor-web/dist/assets/hack-CaT9iCJl.js +0 -1
- package/apps/supervisor-web/dist/assets/haml-B8DHNrY2.js +0 -1
- package/apps/supervisor-web/dist/assets/handlebars-BL8al0AC.js +0 -1
- package/apps/supervisor-web/dist/assets/haskell-Df6bDoY_.js +0 -1
- package/apps/supervisor-web/dist/assets/haxe-CzTSHFRz.js +0 -1
- package/apps/supervisor-web/dist/assets/hcl-BWvSN4gD.js +0 -1
- package/apps/supervisor-web/dist/assets/highlighted-body-OFNGDK62-ChrwAL9u.js +0 -1
- package/apps/supervisor-web/dist/assets/hjson-D5-asLiD.js +0 -1
- package/apps/supervisor-web/dist/assets/hlsl-D3lLCCz7.js +0 -1
- package/apps/supervisor-web/dist/assets/horizon-BUw7H-hv.js +0 -1
- package/apps/supervisor-web/dist/assets/horizon-bright-Cn-bp-IR.js +0 -1
- package/apps/supervisor-web/dist/assets/houston-DnULxvSX.js +0 -1
- package/apps/supervisor-web/dist/assets/html-derivative-BFtXZ54Q.js +0 -1
- package/apps/supervisor-web/dist/assets/http-jrhK8wxY.js +0 -1
- package/apps/supervisor-web/dist/assets/hurl-irOxFIW8.js +0 -1
- package/apps/supervisor-web/dist/assets/hxml-Bvhsp5Yf.js +0 -1
- package/apps/supervisor-web/dist/assets/hy-DFXneXwc.js +0 -1
- package/apps/supervisor-web/dist/assets/imba-DGztddWO.js +0 -1
- package/apps/supervisor-web/dist/assets/index-DHf2HOXx.js +0 -381
- package/apps/supervisor-web/dist/assets/index-DpWxXCgt.css +0 -32
- package/apps/supervisor-web/dist/assets/ini-BEwlwnbL.js +0 -1
- package/apps/supervisor-web/dist/assets/java-CylS5w8V.js +0 -1
- package/apps/supervisor-web/dist/assets/jinja-4LBKfQ-Z.js +0 -1
- package/apps/supervisor-web/dist/assets/jison-wvAkD_A8.js +0 -1
- package/apps/supervisor-web/dist/assets/json5-C9tS-k6U.js +0 -1
- package/apps/supervisor-web/dist/assets/jsonc-Des-eS-w.js +0 -1
- package/apps/supervisor-web/dist/assets/jsonl-DcaNXYhu.js +0 -1
- package/apps/supervisor-web/dist/assets/jsonnet-DFQXde-d.js +0 -1
- package/apps/supervisor-web/dist/assets/jssm-C2t-YnRu.js +0 -1
- package/apps/supervisor-web/dist/assets/julia-CxzCAyBv.js +0 -1
- package/apps/supervisor-web/dist/assets/just-Cw27pwNe.js +0 -1
- package/apps/supervisor-web/dist/assets/kanagawa-dragon-CkXjmgJE.js +0 -1
- package/apps/supervisor-web/dist/assets/kanagawa-lotus-CfQXZHmo.js +0 -1
- package/apps/supervisor-web/dist/assets/kanagawa-wave-DWedfzmr.js +0 -1
- package/apps/supervisor-web/dist/assets/kdl-DV7GczEv.js +0 -1
- package/apps/supervisor-web/dist/assets/kotlin-BdnUsdx6.js +0 -1
- package/apps/supervisor-web/dist/assets/kusto-DZf3V79B.js +0 -1
- package/apps/supervisor-web/dist/assets/laserwave-DUszq2jm.js +0 -1
- package/apps/supervisor-web/dist/assets/latex-CWtU0Tv5.js +0 -1
- package/apps/supervisor-web/dist/assets/lean-BZvkOJ9d.js +0 -1
- package/apps/supervisor-web/dist/assets/less-B1dDrJ26.js +0 -1
- package/apps/supervisor-web/dist/assets/light-plus-B7mTdjB0.js +0 -1
- package/apps/supervisor-web/dist/assets/liquid-DYVedYrR.js +0 -1
- package/apps/supervisor-web/dist/assets/llvm-DjAJT7YJ.js +0 -1
- package/apps/supervisor-web/dist/assets/log-2UxHyX5q.js +0 -1
- package/apps/supervisor-web/dist/assets/logo-BtOb2qkB.js +0 -1
- package/apps/supervisor-web/dist/assets/lua-BaeVxFsk.js +0 -1
- package/apps/supervisor-web/dist/assets/luau-C-HG3fhB.js +0 -1
- package/apps/supervisor-web/dist/assets/make-CHLpvVh8.js +0 -1
- package/apps/supervisor-web/dist/assets/marko-CnJfTvn9.js +0 -1
- package/apps/supervisor-web/dist/assets/material-theme-D5KoaKCx.js +0 -1
- package/apps/supervisor-web/dist/assets/material-theme-darker-BfHTSMKl.js +0 -1
- package/apps/supervisor-web/dist/assets/material-theme-lighter-B0m2ddpp.js +0 -1
- package/apps/supervisor-web/dist/assets/material-theme-ocean-CyktbL80.js +0 -1
- package/apps/supervisor-web/dist/assets/material-theme-palenight-Csfq5Kiy.js +0 -1
- package/apps/supervisor-web/dist/assets/matlab-D7o27uSR.js +0 -1
- package/apps/supervisor-web/dist/assets/mdc-BMNejdWA.js +0 -1
- package/apps/supervisor-web/dist/assets/mdx-Cmh6b_Ma.js +0 -1
- package/apps/supervisor-web/dist/assets/mermaid-mWjccvbQ.js +0 -1
- package/apps/supervisor-web/dist/assets/min-dark-CafNBF8u.js +0 -1
- package/apps/supervisor-web/dist/assets/min-light-CTRr51gU.js +0 -1
- package/apps/supervisor-web/dist/assets/mipsasm-CKIfxQSi.js +0 -1
- package/apps/supervisor-web/dist/assets/mojo-rZm6bMo-.js +0 -1
- package/apps/supervisor-web/dist/assets/monokai-D4h5O-jR.js +0 -1
- package/apps/supervisor-web/dist/assets/moonbit-_H4v1dQx.js +0 -1
- package/apps/supervisor-web/dist/assets/move-IF9eRakj.js +0 -1
- package/apps/supervisor-web/dist/assets/narrat-DRg8JJMk.js +0 -1
- package/apps/supervisor-web/dist/assets/nextflow-Zz6hmt5N.js +0 -1
- package/apps/supervisor-web/dist/assets/nextflow-groovy-BeH2EWoN.js +0 -1
- package/apps/supervisor-web/dist/assets/nginx-BpAMiNFr.js +0 -1
- package/apps/supervisor-web/dist/assets/night-owl-C39BiMTA.js +0 -1
- package/apps/supervisor-web/dist/assets/night-owl-light-CMTm3GFP.js +0 -1
- package/apps/supervisor-web/dist/assets/nim-CVrawwO9.js +0 -1
- package/apps/supervisor-web/dist/assets/nix-CwoSXNpI.js +0 -1
- package/apps/supervisor-web/dist/assets/nord-Ddv68eIx.js +0 -1
- package/apps/supervisor-web/dist/assets/nushell-Cz2AlsmD.js +0 -1
- package/apps/supervisor-web/dist/assets/objective-c-DXmwc3jG.js +0 -1
- package/apps/supervisor-web/dist/assets/objective-cpp-CLxacb5B.js +0 -1
- package/apps/supervisor-web/dist/assets/ocaml-C0hk2d4L.js +0 -1
- package/apps/supervisor-web/dist/assets/odin-BBf5iR-q.js +0 -1
- package/apps/supervisor-web/dist/assets/one-dark-pro-DVMEJ2y_.js +0 -1
- package/apps/supervisor-web/dist/assets/one-light-C3Wv6jpd.js +0 -1
- package/apps/supervisor-web/dist/assets/openscad-C4EeE6gA.js +0 -1
- package/apps/supervisor-web/dist/assets/pascal-D93ZcfNL.js +0 -1
- package/apps/supervisor-web/dist/assets/perl-C0TMdlhV.js +0 -1
- package/apps/supervisor-web/dist/assets/php-Dhbhpdrm.js +0 -1
- package/apps/supervisor-web/dist/assets/pkl-u5AG7uiY.js +0 -1
- package/apps/supervisor-web/dist/assets/plastic-3e1v2bzS.js +0 -1
- package/apps/supervisor-web/dist/assets/plsql-ChMvpjG-.js +0 -1
- package/apps/supervisor-web/dist/assets/po-BTJTHyun.js +0 -1
- package/apps/supervisor-web/dist/assets/poimandres-CS3Unz2-.js +0 -1
- package/apps/supervisor-web/dist/assets/polar-C0HS_06l.js +0 -1
- package/apps/supervisor-web/dist/assets/postcss-CXtECtnM.js +0 -1
- package/apps/supervisor-web/dist/assets/powerquery-CEu0bR-o.js +0 -1
- package/apps/supervisor-web/dist/assets/powershell-Dpen1YoG.js +0 -1
- package/apps/supervisor-web/dist/assets/prisma-Dd19v3D-.js +0 -1
- package/apps/supervisor-web/dist/assets/prolog-CbFg5uaA.js +0 -1
- package/apps/supervisor-web/dist/assets/proto-C7zT0LnQ.js +0 -1
- package/apps/supervisor-web/dist/assets/pug-CGlum2m_.js +0 -1
- package/apps/supervisor-web/dist/assets/puppet-BMWR74SV.js +0 -1
- package/apps/supervisor-web/dist/assets/purescript-CklMAg4u.js +0 -1
- package/apps/supervisor-web/dist/assets/qml-3beO22l8.js +0 -1
- package/apps/supervisor-web/dist/assets/qmldir-C8lEn-DE.js +0 -1
- package/apps/supervisor-web/dist/assets/qss-IeuSbFQv.js +0 -1
- package/apps/supervisor-web/dist/assets/r-Dspwwk_N.js +0 -1
- package/apps/supervisor-web/dist/assets/racket-BqYA7rlc.js +0 -1
- package/apps/supervisor-web/dist/assets/raku-DXvB9xmW.js +0 -1
- package/apps/supervisor-web/dist/assets/razor-Uh8Bk_45.js +0 -1
- package/apps/supervisor-web/dist/assets/red-bN70gL4F.js +0 -1
- package/apps/supervisor-web/dist/assets/reg-C-SQnVFl.js +0 -1
- package/apps/supervisor-web/dist/assets/regexp-CDVJQ6XC.js +0 -1
- package/apps/supervisor-web/dist/assets/rel-C3B-1QV4.js +0 -1
- package/apps/supervisor-web/dist/assets/riscv-BM1_JUlF.js +0 -1
- package/apps/supervisor-web/dist/assets/ron-D8l8udqQ.js +0 -1
- package/apps/supervisor-web/dist/assets/rose-pine-dawn-DHQR4-dF.js +0 -1
- package/apps/supervisor-web/dist/assets/rose-pine-moon-D4_iv3hh.js +0 -1
- package/apps/supervisor-web/dist/assets/rose-pine-qdsjHGoJ.js +0 -1
- package/apps/supervisor-web/dist/assets/rosmsg-BJDFO7_C.js +0 -1
- package/apps/supervisor-web/dist/assets/rst-BrH8l1NY.js +0 -1
- package/apps/supervisor-web/dist/assets/ruby-Dw2BHqvy.js +0 -1
- package/apps/supervisor-web/dist/assets/rust-B1yitclQ.js +0 -1
- package/apps/supervisor-web/dist/assets/sas-cz2c8ADy.js +0 -1
- package/apps/supervisor-web/dist/assets/sass-Cj5Yp3dK.js +0 -1
- package/apps/supervisor-web/dist/assets/scala-C151Ov-r.js +0 -1
- package/apps/supervisor-web/dist/assets/scheme-C98Dy4si.js +0 -1
- package/apps/supervisor-web/dist/assets/scss-OYdSNvt2.js +0 -1
- package/apps/supervisor-web/dist/assets/sdbl-DVxCFoDh.js +0 -1
- package/apps/supervisor-web/dist/assets/shaderlab-Dg9Lc6iA.js +0 -1
- package/apps/supervisor-web/dist/assets/shellsession-BADoaaVG.js +0 -1
- package/apps/supervisor-web/dist/assets/slack-dark-BthQWCQV.js +0 -1
- package/apps/supervisor-web/dist/assets/slack-ochin-DqwNpetd.js +0 -1
- package/apps/supervisor-web/dist/assets/smalltalk-BERRCDM3.js +0 -1
- package/apps/supervisor-web/dist/assets/snazzy-light-Bw305WKR.js +0 -1
- package/apps/supervisor-web/dist/assets/solarized-dark-DXbdFlpD.js +0 -1
- package/apps/supervisor-web/dist/assets/solarized-light-L9t79GZl.js +0 -1
- package/apps/supervisor-web/dist/assets/solidity-rGO070M0.js +0 -1
- package/apps/supervisor-web/dist/assets/soy-Brmx7dQM.js +0 -1
- package/apps/supervisor-web/dist/assets/sparql-rVzFXLq3.js +0 -1
- package/apps/supervisor-web/dist/assets/splunk-BtCnVYZw.js +0 -1
- package/apps/supervisor-web/dist/assets/ssh-config-_ykCGR6B.js +0 -1
- package/apps/supervisor-web/dist/assets/stata-BH5u7GGu.js +0 -1
- package/apps/supervisor-web/dist/assets/stylus-BEDo0Tqx.js +0 -1
- package/apps/supervisor-web/dist/assets/surrealql-Bq5Q-fJD.js +0 -1
- package/apps/supervisor-web/dist/assets/svelte-C_ipcX3V.js +0 -1
- package/apps/supervisor-web/dist/assets/swift-D82vCrfD.js +0 -1
- package/apps/supervisor-web/dist/assets/synthwave-84-CbfX1IO0.js +0 -1
- package/apps/supervisor-web/dist/assets/system-verilog-CnnmHF94.js +0 -1
- package/apps/supervisor-web/dist/assets/systemd-4A_iFExJ.js +0 -1
- package/apps/supervisor-web/dist/assets/talonscript-CkByrt1z.js +0 -1
- package/apps/supervisor-web/dist/assets/tasl-QIJgUcNo.js +0 -1
- package/apps/supervisor-web/dist/assets/tcl-dwOrl1Do.js +0 -1
- package/apps/supervisor-web/dist/assets/templ-P3uqSqPl.js +0 -1
- package/apps/supervisor-web/dist/assets/terraform-BETggiCN.js +0 -1
- package/apps/supervisor-web/dist/assets/tex-idrVyKtj.js +0 -1
- package/apps/supervisor-web/dist/assets/tokyo-night-hegEt444.js +0 -1
- package/apps/supervisor-web/dist/assets/ts-tags-zn1MmPIZ.js +0 -1
- package/apps/supervisor-web/dist/assets/tsv-B_m7g4N7.js +0 -1
- package/apps/supervisor-web/dist/assets/turtle-BsS91CYL.js +0 -1
- package/apps/supervisor-web/dist/assets/twig-DNn4PbVi.js +0 -1
- package/apps/supervisor-web/dist/assets/typespec-BGHnOYBU.js +0 -1
- package/apps/supervisor-web/dist/assets/typst-DHCkPAjA.js +0 -1
- package/apps/supervisor-web/dist/assets/v-BcVCzyr7.js +0 -1
- package/apps/supervisor-web/dist/assets/vala-CsfeWuGM.js +0 -1
- package/apps/supervisor-web/dist/assets/vb-D17OF-Vu.js +0 -1
- package/apps/supervisor-web/dist/assets/verilog-BQ8w6xss.js +0 -1
- package/apps/supervisor-web/dist/assets/vesper-DU1UobuO.js +0 -1
- package/apps/supervisor-web/dist/assets/vhdl-CeAyd5Ju.js +0 -1
- package/apps/supervisor-web/dist/assets/viml-CJc9bBzg.js +0 -1
- package/apps/supervisor-web/dist/assets/vitesse-black-Bkuqu6BP.js +0 -1
- package/apps/supervisor-web/dist/assets/vitesse-dark-D0r3Knsf.js +0 -1
- package/apps/supervisor-web/dist/assets/vitesse-light-CVO1_9PV.js +0 -1
- package/apps/supervisor-web/dist/assets/vue-DN_0RTcg.js +0 -1
- package/apps/supervisor-web/dist/assets/vue-html-AaS7Mt5G.js +0 -1
- package/apps/supervisor-web/dist/assets/vue-vine-CQOfvN7w.js +0 -1
- package/apps/supervisor-web/dist/assets/vyper-CDx5xZoG.js +0 -1
- package/apps/supervisor-web/dist/assets/wasm-CG6Dc4jp.js +0 -1
- package/apps/supervisor-web/dist/assets/wasm-MzD3tlZU.js +0 -1
- package/apps/supervisor-web/dist/assets/wenyan-BV7otONQ.js +0 -1
- package/apps/supervisor-web/dist/assets/wgsl-Dx-B1_4e.js +0 -1
- package/apps/supervisor-web/dist/assets/wikitext-BhOHFoWU.js +0 -1
- package/apps/supervisor-web/dist/assets/wit-5i3qLPDT.js +0 -1
- package/apps/supervisor-web/dist/assets/wolfram-lXgVvXCa.js +0 -1
- package/apps/supervisor-web/dist/assets/xml-sdJ4AIDG.js +0 -1
- package/apps/supervisor-web/dist/assets/xsl-CtQFsRM5.js +0 -1
- package/apps/supervisor-web/dist/assets/zenscript-DVFEvuxE.js +0 -1
- package/apps/supervisor-web/dist/assets/zig-VOosw3JB.js +0 -1
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
const MOLECULE_ARTIFACT_TYPE = 'chemistry.molecule3d';
|
|
7
|
+
const XYZ_VIEWER_PLUGIN_ID = 'remote-codex.xyz-viewer';
|
|
8
|
+
|
|
9
|
+
function isFiniteNumberToken(value) {
|
|
10
|
+
return typeof value === 'string' && value.trim() !== '' && Number.isFinite(Number(value));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function looksLikeXyzMolecule(content) {
|
|
14
|
+
const lines = content.split(/\r?\n/).map((line) => line.trim()).filter(Boolean);
|
|
15
|
+
const atomCount = Number(lines[0]);
|
|
16
|
+
if (!Number.isInteger(atomCount) || atomCount <= 0 || atomCount > 100000) {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const atomLines = lines.slice(2);
|
|
21
|
+
if (atomLines.length < atomCount) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
return atomLines.slice(0, atomCount).every((line) => {
|
|
26
|
+
const parts = line.split(/\s+/);
|
|
27
|
+
return (
|
|
28
|
+
parts.length >= 4 &&
|
|
29
|
+
/^([A-Za-z][A-Za-z]?|\d+)$/.test(parts[0] ?? '') &&
|
|
30
|
+
isFiniteNumberToken(parts[1]) &&
|
|
31
|
+
isFiniteNumberToken(parts[2]) &&
|
|
32
|
+
isFiniteNumberToken(parts[3])
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function looksLikePdbMolecule(content) {
|
|
38
|
+
return content.split(/\r?\n/).some((line) => /^(ATOM|HETATM)\s+/i.test(line));
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function looksLikeCifMolecule(content) {
|
|
42
|
+
return /\bdata_[^\s]*/i.test(content) && /_atom_site\./i.test(content);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
function looksLikeMoleculeStructure(content, format) {
|
|
46
|
+
switch (format) {
|
|
47
|
+
case 'xyz':
|
|
48
|
+
case 'extxyz':
|
|
49
|
+
return looksLikeXyzMolecule(content);
|
|
50
|
+
case 'pdb':
|
|
51
|
+
return looksLikePdbMolecule(content);
|
|
52
|
+
case 'cif':
|
|
53
|
+
return looksLikeCifMolecule(content);
|
|
54
|
+
default:
|
|
55
|
+
return false;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function pluginEnabled(pluginId) {
|
|
60
|
+
const enabledIds = process.env.REMOTE_CODEX_ENABLED_PLUGIN_IDS;
|
|
61
|
+
if (!enabledIds) {
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
return enabledIds.split(',').map((entry) => entry.trim()).filter(Boolean).includes(pluginId);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const server = new McpServer({
|
|
68
|
+
name: 'remote-codex-plugin-mcp',
|
|
69
|
+
title: 'Remote Codex Plugin MCP',
|
|
70
|
+
version: '0.1.0',
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
if (pluginEnabled(XYZ_VIEWER_PLUGIN_ID)) {
|
|
74
|
+
server.registerTool(
|
|
75
|
+
'remote_codex_render_molecule',
|
|
76
|
+
{
|
|
77
|
+
title: 'Render 3D Molecule',
|
|
78
|
+
description:
|
|
79
|
+
'Create a Remote Codex 3D molecule artifact from valid xyz, extxyz, cif, or pdb content. Use this when the user asks for a renderable molecular structure. Do not invent coordinates unless the user explicitly asks you to generate an example.',
|
|
80
|
+
inputSchema: {
|
|
81
|
+
title: z.string().trim().min(1).describe('Short display title for the molecule.'),
|
|
82
|
+
format: z.enum(['xyz', 'extxyz', 'cif', 'pdb']).describe('Molecular source format.'),
|
|
83
|
+
content: z.string().trim().min(1).describe('Raw molecule source text in the selected format.'),
|
|
84
|
+
summaryText: z.string().trim().optional().describe('Optional short summary shown in the timeline.'),
|
|
85
|
+
sourceDescription: z.string().trim().optional().describe('Optional note about where the coordinates came from.'),
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
async ({ title, format, content, summaryText, sourceDescription }) => {
|
|
89
|
+
if (!looksLikeMoleculeStructure(content, format)) {
|
|
90
|
+
return {
|
|
91
|
+
isError: true,
|
|
92
|
+
content: [
|
|
93
|
+
{
|
|
94
|
+
type: 'text',
|
|
95
|
+
text: `Unable to create molecule artifact: content does not look like valid ${format} data.`,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const artifact = {
|
|
102
|
+
type: 'remote-codex.artifact',
|
|
103
|
+
artifactType: MOLECULE_ARTIFACT_TYPE,
|
|
104
|
+
title,
|
|
105
|
+
summaryText: summaryText ?? sourceDescription ?? `${format.toUpperCase()} molecule`,
|
|
106
|
+
payload: {
|
|
107
|
+
format,
|
|
108
|
+
content: [content],
|
|
109
|
+
name: title,
|
|
110
|
+
sourceDescription: sourceDescription ?? null,
|
|
111
|
+
},
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
return {
|
|
115
|
+
content: [
|
|
116
|
+
{
|
|
117
|
+
type: 'text',
|
|
118
|
+
text: [
|
|
119
|
+
`Created a 3D molecule artifact for ${title}.`,
|
|
120
|
+
'',
|
|
121
|
+
'```remote-codex-artifact',
|
|
122
|
+
JSON.stringify(artifact, null, 2),
|
|
123
|
+
'```',
|
|
124
|
+
].join('\n'),
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
structuredContent: {
|
|
128
|
+
pluginId: XYZ_VIEWER_PLUGIN_ID,
|
|
129
|
+
artifactType: MOLECULE_ARTIFACT_TYPE,
|
|
130
|
+
title,
|
|
131
|
+
format,
|
|
132
|
+
},
|
|
133
|
+
};
|
|
134
|
+
},
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
139
|
+
await server.connect(new StdioServerTransport());
|
|
140
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "remote-codex",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.2",
|
|
4
4
|
"description": "Local web supervisor for Codex workspaces and threads.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -20,12 +20,16 @@
|
|
|
20
20
|
"packages/opencode/src/",
|
|
21
21
|
"packages/db/src/",
|
|
22
22
|
"packages/db/migrations/*.sql",
|
|
23
|
+
"packages/plugin-terminal/package.json",
|
|
24
|
+
"packages/plugin-terminal/plugin.json",
|
|
25
|
+
"packages/plugin-terminal/src/",
|
|
23
26
|
"packages/shared/src/",
|
|
24
27
|
"README.md"
|
|
25
28
|
],
|
|
26
29
|
"packageManager": "pnpm@10.11.1",
|
|
27
30
|
"pnpm": {
|
|
28
31
|
"onlyBuiltDependencies": [
|
|
32
|
+
"@homebridge/node-pty-prebuilt-multiarch",
|
|
29
33
|
"better-sqlite3",
|
|
30
34
|
"esbuild"
|
|
31
35
|
]
|
|
@@ -56,6 +60,7 @@
|
|
|
56
60
|
"dependencies": {
|
|
57
61
|
"@fastify/multipart": "^9.0.3",
|
|
58
62
|
"@fastify/websocket": "^11.0.2",
|
|
63
|
+
"@homebridge/node-pty-prebuilt-multiarch": "^0.13.1",
|
|
59
64
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
60
65
|
"better-sqlite3": "^12.10.0",
|
|
61
66
|
"fastify": "^5.2.1",
|
|
@@ -197,9 +197,22 @@ function pricingModelKeyForModel(model: string | null | undefined) {
|
|
|
197
197
|
return modelKey;
|
|
198
198
|
}
|
|
199
199
|
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
200
|
+
const providerSeparatorIndex = modelKey.indexOf('/');
|
|
201
|
+
const unqualifiedModelKey = providerSeparatorIndex >= 0
|
|
202
|
+
? modelKey.slice(providerSeparatorIndex + 1)
|
|
203
|
+
: null;
|
|
204
|
+
if (unqualifiedModelKey && models[unqualifiedModelKey]) {
|
|
205
|
+
return unqualifiedModelKey;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
for (const candidate of [modelKey, unqualifiedModelKey]) {
|
|
209
|
+
if (!candidate) {
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
const claudeDateSuffixMatch = candidate.match(/^(claude-[a-z]+-\d+(?:-\d+)?)-20\d{6}$/);
|
|
213
|
+
if (claudeDateSuffixMatch?.[1] && models[claudeDateSuffixMatch[1]]) {
|
|
214
|
+
return claudeDateSuffixMatch[1];
|
|
215
|
+
}
|
|
203
216
|
}
|
|
204
217
|
|
|
205
218
|
return modelKey;
|
|
@@ -259,6 +259,7 @@ export interface StartAgentTurnInput {
|
|
|
259
259
|
sandboxMode?: 'read-only' | 'workspace-write' | 'danger-full-access' | null;
|
|
260
260
|
workspacePath?: string | null;
|
|
261
261
|
performanceMode?: 'standard' | 'fast' | null;
|
|
262
|
+
developerInstructions?: string | null;
|
|
262
263
|
hidden?: boolean;
|
|
263
264
|
displayTurnId?: string | null;
|
|
264
265
|
}
|
|
@@ -14,12 +14,7 @@ import type {
|
|
|
14
14
|
AgentRuntime,
|
|
15
15
|
AgentRuntimeManagementSchema,
|
|
16
16
|
AgentRuntimeStatus,
|
|
17
|
-
InterruptAgentTurnInput,
|
|
18
|
-
ReadAgentSessionOptions,
|
|
19
|
-
ResumeAgentSessionInput,
|
|
20
|
-
StartAgentSessionInput,
|
|
21
17
|
StartAgentSessionResult,
|
|
22
|
-
StartAgentTurnInput,
|
|
23
18
|
} from './types';
|
|
24
19
|
import { AgentRuntimeError } from './types';
|
|
25
20
|
|
|
@@ -136,26 +131,23 @@ export class UnavailableRuntimeAdapter extends EventEmitter implements AgentRunt
|
|
|
136
131
|
return [];
|
|
137
132
|
}
|
|
138
133
|
|
|
139
|
-
async readSession(
|
|
140
|
-
_providerSessionId: string,
|
|
141
|
-
_options?: ReadAgentSessionOptions,
|
|
142
|
-
): Promise<AgentSessionDetail> {
|
|
134
|
+
async readSession(): Promise<AgentSessionDetail> {
|
|
143
135
|
throw this.unavailableError();
|
|
144
136
|
}
|
|
145
137
|
|
|
146
|
-
async startSession(
|
|
138
|
+
async startSession(): Promise<StartAgentSessionResult> {
|
|
147
139
|
throw this.unavailableError();
|
|
148
140
|
}
|
|
149
141
|
|
|
150
|
-
async resumeSession(
|
|
142
|
+
async resumeSession(): Promise<StartAgentSessionResult> {
|
|
151
143
|
throw this.unavailableError();
|
|
152
144
|
}
|
|
153
145
|
|
|
154
|
-
async startTurn(
|
|
146
|
+
async startTurn(): Promise<AgentTurn> {
|
|
155
147
|
throw this.unavailableError();
|
|
156
148
|
}
|
|
157
149
|
|
|
158
|
-
async interruptTurn(
|
|
150
|
+
async interruptTurn(): Promise<AgentTurn | null> {
|
|
159
151
|
throw this.unavailableError();
|
|
160
152
|
}
|
|
161
153
|
|
|
@@ -104,6 +104,40 @@ function readableToolName(toolName: string) {
|
|
|
104
104
|
return toolName;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
+
function projectRelativePathLabel(value: string | null | undefined) {
|
|
108
|
+
const normalized = value?.trim();
|
|
109
|
+
if (!normalized) {
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
const slashNormalized = normalized.replace(/\\/g, '/');
|
|
114
|
+
if (!slashNormalized.startsWith('/')) {
|
|
115
|
+
return slashNormalized.replace(/^\.\//, '');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
const markers = [
|
|
119
|
+
'/apps/',
|
|
120
|
+
'/packages/',
|
|
121
|
+
'/src/',
|
|
122
|
+
'/test/',
|
|
123
|
+
'/tests/',
|
|
124
|
+
'/docs/',
|
|
125
|
+
'/config/',
|
|
126
|
+
'/scripts/',
|
|
127
|
+
'/e2e/',
|
|
128
|
+
'/.agents/',
|
|
129
|
+
'/.codex/',
|
|
130
|
+
];
|
|
131
|
+
for (const marker of markers) {
|
|
132
|
+
const markerIndex = slashNormalized.indexOf(marker);
|
|
133
|
+
if (markerIndex >= 0) {
|
|
134
|
+
return slashNormalized.slice(markerIndex + 1);
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
return slashNormalized;
|
|
139
|
+
}
|
|
140
|
+
|
|
107
141
|
function commandFromInput(input: unknown) {
|
|
108
142
|
if (!isRecord(input)) {
|
|
109
143
|
return null;
|
|
@@ -115,11 +149,13 @@ function pathFromInput(input: unknown) {
|
|
|
115
149
|
if (!isRecord(input)) {
|
|
116
150
|
return null;
|
|
117
151
|
}
|
|
118
|
-
return (
|
|
119
|
-
stringValue(input.
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
152
|
+
return projectRelativePathLabel(
|
|
153
|
+
stringValue(input.relative_path) ??
|
|
154
|
+
stringValue(input.relativePath) ??
|
|
155
|
+
stringValue(input.file_path) ??
|
|
156
|
+
stringValue(input.filePath) ??
|
|
157
|
+
stringValue(input.path) ??
|
|
158
|
+
stringValue(input.notebook_path),
|
|
123
159
|
);
|
|
124
160
|
}
|
|
125
161
|
|
|
@@ -2022,6 +2022,16 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2022
2022
|
file_path: 'packages/claude/src/runtimeAdapter.ts',
|
|
2023
2023
|
},
|
|
2024
2024
|
},
|
|
2025
|
+
{
|
|
2026
|
+
type: 'tool_use',
|
|
2027
|
+
id: 'toolu_edit',
|
|
2028
|
+
name: 'Edit',
|
|
2029
|
+
input: {
|
|
2030
|
+
file_path: '/home/u/dev/remoteCodex/apps/supervisor-api/src/thread-service.ts',
|
|
2031
|
+
old_string: 'before',
|
|
2032
|
+
new_string: 'after',
|
|
2033
|
+
},
|
|
2034
|
+
},
|
|
2025
2035
|
{
|
|
2026
2036
|
type: 'tool_use',
|
|
2027
2037
|
id: 'toolu_skill',
|
|
@@ -2069,6 +2079,11 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2069
2079
|
tool_use_id: 'toolu_read',
|
|
2070
2080
|
content: 'export class ClaudeRuntimeAdapter {}',
|
|
2071
2081
|
},
|
|
2082
|
+
{
|
|
2083
|
+
type: 'tool_result',
|
|
2084
|
+
tool_use_id: 'toolu_edit',
|
|
2085
|
+
content: 'File updated.',
|
|
2086
|
+
},
|
|
2072
2087
|
{
|
|
2073
2088
|
type: 'tool_result',
|
|
2074
2089
|
tool_use_id: 'toolu_skill',
|
|
@@ -2114,6 +2129,13 @@ describe('ClaudeRuntimeAdapter', () => {
|
|
|
2114
2129
|
text: 'Read file: packages/claude/src/runtimeAdapter.ts',
|
|
2115
2130
|
status: 'completed',
|
|
2116
2131
|
}),
|
|
2132
|
+
expect.objectContaining({
|
|
2133
|
+
id: 'toolu_edit',
|
|
2134
|
+
kind: 'fileChange',
|
|
2135
|
+
text: 'apps/supervisor-api/src/thread-service.ts',
|
|
2136
|
+
previewText: 'Edit file: apps/supervisor-api/src/thread-service.ts',
|
|
2137
|
+
status: 'completed',
|
|
2138
|
+
}),
|
|
2117
2139
|
expect.objectContaining({
|
|
2118
2140
|
id: 'toolu_skill',
|
|
2119
2141
|
kind: 'skillToolCall',
|
|
@@ -44,7 +44,6 @@ import {
|
|
|
44
44
|
hiddenInitPrompt,
|
|
45
45
|
isHiddenContinuationMessage,
|
|
46
46
|
isHiddenInitMessage,
|
|
47
|
-
messageContentText,
|
|
48
47
|
partialReasoningDelta,
|
|
49
48
|
partialTextDelta,
|
|
50
49
|
resultForToolUse,
|
|
@@ -172,11 +171,11 @@ interface ClaudeQueryOptions {
|
|
|
172
171
|
allowDangerouslySkipPermissions?: boolean;
|
|
173
172
|
pathToClaudeCodeExecutable?: string;
|
|
174
173
|
}
|
|
175
|
-
|
|
174
|
+
type GetSessionInfoOptions = Record<string, never>;
|
|
176
175
|
interface GetSessionMessagesOptions {
|
|
177
176
|
includeSystemMessages?: boolean;
|
|
178
177
|
}
|
|
179
|
-
|
|
178
|
+
type ListSessionsOptions = Record<string, never>;
|
|
180
179
|
interface McpServerStatus {
|
|
181
180
|
name: string;
|
|
182
181
|
status: string;
|
|
@@ -1471,8 +1470,9 @@ export class ClaudeRuntimeAdapter extends EventEmitter implements AgentRuntime {
|
|
|
1471
1470
|
|
|
1472
1471
|
mapProviderRequest(
|
|
1473
1472
|
request: AgentProviderRequest,
|
|
1474
|
-
|
|
1473
|
+
options: { approvalMode: 'yolo' | 'guarded' },
|
|
1475
1474
|
): AgentProviderRequestMapping | null {
|
|
1475
|
+
void options;
|
|
1476
1476
|
return mapClaudeAskUserQuestionRequest(request);
|
|
1477
1477
|
}
|
|
1478
1478
|
|
|
@@ -1483,7 +1483,9 @@ export class ClaudeRuntimeAdapter extends EventEmitter implements AgentRuntime {
|
|
|
1483
1483
|
return buildClaudeProviderRequestResponse(pending, input);
|
|
1484
1484
|
}
|
|
1485
1485
|
|
|
1486
|
-
respondToProviderRequest(
|
|
1486
|
+
respondToProviderRequest(id: string | number, result: unknown) {
|
|
1487
|
+
void id;
|
|
1488
|
+
void result;
|
|
1487
1489
|
// Claude Code's built-in AskUserQuestion arrives as transcripted tool use in
|
|
1488
1490
|
// this SDK mode. The supervisor records the user's answer locally so the
|
|
1489
1491
|
// interaction matches other backends, but there is no live JSON-RPC request
|
|
@@ -463,13 +463,13 @@ export class CodexAppServerManager extends EventEmitter {
|
|
|
463
463
|
input.serviceTier === undefined ? undefined : input.serviceTier,
|
|
464
464
|
effort: input.effort ?? null,
|
|
465
465
|
sandboxPolicy: input.sandboxPolicy ?? null,
|
|
466
|
-
collaborationMode: input.collaborationMode
|
|
466
|
+
collaborationMode: input.collaborationMode || input.developerInstructions
|
|
467
467
|
? {
|
|
468
|
-
mode: input.collaborationMode,
|
|
468
|
+
mode: input.collaborationMode ?? 'default',
|
|
469
469
|
settings: {
|
|
470
470
|
model: input.model ?? '',
|
|
471
471
|
reasoning_effort: input.effort ?? null,
|
|
472
|
-
developer_instructions: null
|
|
472
|
+
developer_instructions: input.developerInstructions ?? null
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
: null
|
|
@@ -30,9 +30,7 @@ describe('codex history item persistence policy', () => {
|
|
|
30
30
|
text: 'Streaming draft',
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
expect(shouldPersistRuntimeFinalHistoryItem(transientMessage
|
|
34
|
-
false,
|
|
35
|
-
);
|
|
33
|
+
expect(shouldPersistRuntimeFinalHistoryItem(transientMessage)).toBe(false);
|
|
36
34
|
});
|
|
37
35
|
|
|
38
36
|
it('hides transient streamed assistant text once a final assistant message exists', () => {
|
|
@@ -54,7 +52,7 @@ describe('codex history item persistence policy', () => {
|
|
|
54
52
|
error: null,
|
|
55
53
|
items: [transientMessage, finalMessage],
|
|
56
54
|
}).items,
|
|
57
|
-
).toEqual([finalMessage]);
|
|
55
|
+
).toEqual([{ ...finalMessage, transcriptOrder: 0 }]);
|
|
58
56
|
});
|
|
59
57
|
|
|
60
58
|
it('maps Codex collab agent tool calls to dedicated agent tool call items', () => {
|
|
@@ -107,4 +105,31 @@ describe('codex history item persistence policy', () => {
|
|
|
107
105
|
status: 'running',
|
|
108
106
|
});
|
|
109
107
|
});
|
|
108
|
+
|
|
109
|
+
it('shows file changes using project-relative paths when absolute paths are reported', () => {
|
|
110
|
+
const turn = codexTurnToAgentTurn({
|
|
111
|
+
id: 'turn-1',
|
|
112
|
+
status: 'completed',
|
|
113
|
+
error: null,
|
|
114
|
+
items: [
|
|
115
|
+
{
|
|
116
|
+
id: 'file-change-1',
|
|
117
|
+
type: 'fileChange',
|
|
118
|
+
changes: [
|
|
119
|
+
{
|
|
120
|
+
path: '/home/u/dev/remoteCodex/apps/supervisor-web/src/App.tsx',
|
|
121
|
+
additions: 4,
|
|
122
|
+
deletions: 1,
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
expect(turn.items[0]).toMatchObject({
|
|
130
|
+
kind: 'fileChange',
|
|
131
|
+
text: 'apps/supervisor-web/src/App.tsx',
|
|
132
|
+
detailText: '- apps/supervisor-web/src/App.tsx (+4 -1)',
|
|
133
|
+
});
|
|
134
|
+
});
|
|
110
135
|
});
|
|
@@ -78,6 +78,40 @@ function uniqueStrings(values: Array<string | null | undefined>) {
|
|
|
78
78
|
return [...new Set(values.filter((value): value is string => Boolean(value?.trim())))];
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
function projectRelativePathLabel(value: string | null | undefined) {
|
|
82
|
+
const normalized = value?.trim();
|
|
83
|
+
if (!normalized) {
|
|
84
|
+
return null;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const slashNormalized = normalized.replace(/\\/g, '/');
|
|
88
|
+
if (!slashNormalized.startsWith('/')) {
|
|
89
|
+
return slashNormalized.replace(/^\.\//, '');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
const markers = [
|
|
93
|
+
'/apps/',
|
|
94
|
+
'/packages/',
|
|
95
|
+
'/src/',
|
|
96
|
+
'/test/',
|
|
97
|
+
'/tests/',
|
|
98
|
+
'/docs/',
|
|
99
|
+
'/config/',
|
|
100
|
+
'/scripts/',
|
|
101
|
+
'/e2e/',
|
|
102
|
+
'/.agents/',
|
|
103
|
+
'/.codex/',
|
|
104
|
+
];
|
|
105
|
+
for (const marker of markers) {
|
|
106
|
+
const markerIndex = slashNormalized.indexOf(marker);
|
|
107
|
+
if (markerIndex >= 0) {
|
|
108
|
+
return slashNormalized.slice(markerIndex + 1);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return slashNormalized;
|
|
113
|
+
}
|
|
114
|
+
|
|
81
115
|
function normalizeTextLines(text: string) {
|
|
82
116
|
const lines = text.replace(/\r\n/g, '\n').split('\n');
|
|
83
117
|
|
|
@@ -401,7 +435,6 @@ export function shouldPersistFinalHistoryItem(item: ThreadHistoryItemDto) {
|
|
|
401
435
|
|
|
402
436
|
export function shouldPersistRuntimeFinalHistoryItem(
|
|
403
437
|
item: ThreadHistoryItemDto,
|
|
404
|
-
allItems: ThreadHistoryItemDto[],
|
|
405
438
|
) {
|
|
406
439
|
if (item.kind === 'agentMessage' && isTransientAgentHistoryItem(item)) {
|
|
407
440
|
return false;
|
|
@@ -451,18 +484,7 @@ function historyItemSequence(item: ThreadHistoryItemDto) {
|
|
|
451
484
|
}
|
|
452
485
|
|
|
453
486
|
export function sortHistoryItemsBySequence<T extends ThreadHistoryItemDto>(items: T[]): T[] {
|
|
454
|
-
|
|
455
|
-
return items;
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
return items
|
|
459
|
-
.map((item, index) => ({ item, index }))
|
|
460
|
-
.sort((left, right) => {
|
|
461
|
-
const sequenceDelta =
|
|
462
|
-
historyItemSequence(left.item) - historyItemSequence(right.item);
|
|
463
|
-
return sequenceDelta === 0 ? left.index - right.index : sequenceDelta;
|
|
464
|
-
})
|
|
465
|
-
.map((entry) => entry.item);
|
|
487
|
+
return sortTurnItemsByRecordedSequence(items) as T[];
|
|
466
488
|
}
|
|
467
489
|
|
|
468
490
|
function sortTurnItemsByRecordedSequence(items: ThreadHistoryItemDto[]) {
|
|
@@ -602,12 +624,15 @@ function copyPersistedSequence(
|
|
|
602
624
|
item: ThreadHistoryItemDto,
|
|
603
625
|
persistedItem: ThreadHistoryItemDto,
|
|
604
626
|
) {
|
|
605
|
-
|
|
606
|
-
|
|
627
|
+
let nextItem = item;
|
|
628
|
+
if (hasHistoryItemSequence(persistedItem)) {
|
|
629
|
+
const sequence = historyItemSequence(persistedItem);
|
|
630
|
+
if (nextItem.sequence !== sequence) {
|
|
631
|
+
nextItem = { ...nextItem, sequence };
|
|
632
|
+
}
|
|
607
633
|
}
|
|
608
634
|
|
|
609
|
-
|
|
610
|
-
return item.sequence === sequence ? item : { ...item, sequence };
|
|
635
|
+
return nextItem;
|
|
611
636
|
}
|
|
612
637
|
|
|
613
638
|
function shouldAppendPersistedMissingItem(
|
|
@@ -1036,7 +1061,9 @@ function extractFileChangeEntries(item: CodexTurnItem) {
|
|
|
1036
1061
|
'old_path',
|
|
1037
1062
|
]),
|
|
1038
1063
|
),
|
|
1039
|
-
])
|
|
1064
|
+
])
|
|
1065
|
+
.map(projectRelativePathLabel)
|
|
1066
|
+
.find((entry): entry is string => Boolean(entry)) ?? null;
|
|
1040
1067
|
|
|
1041
1068
|
const explicitAdditions =
|
|
1042
1069
|
numberOrNull(
|
|
@@ -1075,7 +1102,8 @@ function extractFileChangeEntries(item: CodexTurnItem) {
|
|
|
1075
1102
|
: null;
|
|
1076
1103
|
const additions = explicitAdditions || diffStats?.additions || 0;
|
|
1077
1104
|
const deletions = explicitDeletions || diffStats?.deletions || 0;
|
|
1078
|
-
const normalizedPath =
|
|
1105
|
+
const normalizedPath =
|
|
1106
|
+
path ?? (diffText ? projectRelativePathLabel(extractPathFromDiffText(diffText)) : null);
|
|
1079
1107
|
|
|
1080
1108
|
if (!normalizedPath && additions === 0 && deletions === 0) {
|
|
1081
1109
|
return null;
|
|
@@ -1299,7 +1327,11 @@ export function agentTurnToThreadTurnDto(
|
|
|
1299
1327
|
startedAt: turn.startedAt ?? parseUuidV7Timestamp(turn.providerTurnId),
|
|
1300
1328
|
status: turn.status,
|
|
1301
1329
|
error: turn.error?.message ?? null,
|
|
1302
|
-
items: visibleRuntimeTurnItems(turn.items),
|
|
1330
|
+
items: visibleRuntimeTurnItems(turn.items).map((item, transcriptIndex) =>
|
|
1331
|
+
item.transcriptOrder === transcriptIndex
|
|
1332
|
+
? item
|
|
1333
|
+
: { ...item, transcriptOrder: transcriptIndex },
|
|
1334
|
+
),
|
|
1303
1335
|
};
|
|
1304
1336
|
|
|
1305
1337
|
return deferredDetails ? deferLargeHistoryItemDetails(baseTurn, deferredDetails) : baseTurn;
|
|
@@ -152,6 +152,57 @@ describe('modelPricing', () => {
|
|
|
152
152
|
});
|
|
153
153
|
});
|
|
154
154
|
|
|
155
|
+
it('normalizes provider-qualified runtime model names to local pricing keys', () => {
|
|
156
|
+
expect(contextWindowForModel('openai/gpt-5.5')).toBe(272000);
|
|
157
|
+
expect(supportsFastMode('openai/gpt-5.5')).toBe(true);
|
|
158
|
+
expect(buildTurnPricingSnapshot('openai/gpt-5.5', false)).toEqual({
|
|
159
|
+
pricingModelKey: 'gpt-5.5',
|
|
160
|
+
pricingTierKey: 'standard',
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
const estimate = estimateTurnPrice(sampleUsage, {
|
|
164
|
+
pricingModelKey: 'openai/gpt-5.5',
|
|
165
|
+
pricingTierKey: 'standard',
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
expect(estimate).toMatchObject({
|
|
169
|
+
pricingModelKey: 'gpt-5.5',
|
|
170
|
+
pricingTierKey: 'standard',
|
|
171
|
+
inputUsd: 0.005,
|
|
172
|
+
cachedInputUsd: 0.00025,
|
|
173
|
+
outputUsd: 0.045,
|
|
174
|
+
});
|
|
175
|
+
});
|
|
176
|
+
|
|
177
|
+
it('normalizes provider-qualified Claude date-stamped model names', () => {
|
|
178
|
+
expect(contextWindowForModel('anthropic/claude-sonnet-4-5-20250929')).toBe(200000);
|
|
179
|
+
expect(buildTurnPricingSnapshot('anthropic/claude-sonnet-4-5-20250929', false)).toEqual({
|
|
180
|
+
pricingModelKey: 'claude-sonnet-4-5',
|
|
181
|
+
pricingTierKey: 'standard',
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
const estimate = estimateTurnPrice(sampleUsage, {
|
|
185
|
+
pricingModelKey: 'anthropic/claude-sonnet-4-5-20250929',
|
|
186
|
+
pricingTierKey: 'standard',
|
|
187
|
+
});
|
|
188
|
+
|
|
189
|
+
expect(estimate).toMatchObject({
|
|
190
|
+
pricingModelKey: 'claude-sonnet-4-5',
|
|
191
|
+
pricingTierKey: 'standard',
|
|
192
|
+
inputUsd: 0.003,
|
|
193
|
+
cachedInputUsd: 0.00015,
|
|
194
|
+
outputUsd: 0.0225,
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
it('leaves unknown provider-qualified models unpriced', () => {
|
|
199
|
+
expect(contextWindowForModel('unknown/not-priced')).toBe(null);
|
|
200
|
+
expect(estimateTurnPrice(sampleUsage, {
|
|
201
|
+
pricingModelKey: 'unknown/not-priced',
|
|
202
|
+
pricingTierKey: 'standard',
|
|
203
|
+
})).toBe(null);
|
|
204
|
+
});
|
|
205
|
+
|
|
155
206
|
it('resolves pricing config from the installed package root when provided', async () => {
|
|
156
207
|
const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), 'remote-codex-pricing-root-'));
|
|
157
208
|
await fs.mkdir(path.join(tempDir, 'config'), { recursive: true });
|
|
@@ -27,11 +27,6 @@ export function unwrapCodexJsonRpcError(error: unknown): JsonRpcClientError | nu
|
|
|
27
27
|
return null;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
function isCodexRemoteError(error: unknown) {
|
|
31
|
-
const codexError = unwrapCodexJsonRpcError(error);
|
|
32
|
-
return codexError?.code === 'remote_error' ? codexError : null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
30
|
export function isCodexRuntimeRequestError(error: unknown) {
|
|
36
31
|
return Boolean(unwrapCodexJsonRpcError(error)) || isRuntimeRequestError(error);
|
|
37
32
|
}
|
|
@@ -667,6 +667,9 @@ export class CodexRuntimeAdapter extends EventEmitter implements AgentRuntime {
|
|
|
667
667
|
if (input.collaborationMode !== undefined) {
|
|
668
668
|
turnInput.collaborationMode = input.collaborationMode;
|
|
669
669
|
}
|
|
670
|
+
if (input.developerInstructions !== undefined) {
|
|
671
|
+
turnInput.developerInstructions = input.developerInstructions;
|
|
672
|
+
}
|
|
670
673
|
const sandboxPolicy = buildSandboxPolicy(input.sandboxMode, input.workspacePath);
|
|
671
674
|
if (sandboxPolicy !== undefined) {
|
|
672
675
|
turnInput.sandboxPolicy = sandboxPolicy;
|
|
@@ -322,6 +322,7 @@ export interface TurnStartInput {
|
|
|
322
322
|
collaborationMode?: CollaborationModeKind | null;
|
|
323
323
|
sandboxPolicy?: SandboxPolicy | null;
|
|
324
324
|
serviceTier?: ServiceTier | null;
|
|
325
|
+
developerInstructions?: string | null;
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
export interface TurnSteerInput {
|