remote-codex 0.11.1 → 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 +2271 -773
- 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-D92BViLH.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/types.ts +1 -0
- package/packages/agent-runtime/src/unavailable-runtime.ts +5 -13
- package/packages/claude/src/runtimeAdapter.ts +7 -5
- package/packages/codex/src/appServerManager.ts +3 -3
- package/packages/codex/src/historyItems.test.ts +2 -4
- package/packages/codex/src/historyItems.ts +13 -18
- 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/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 +59 -0
- package/apps/supervisor-api/dist/chunk-6M32PPHZ.js +0 -24507
- package/apps/supervisor-api/dist/chunk-7AA2MFXK.js +0 -24499
- package/apps/supervisor-api/dist/chunk-HKBFCPHH.js +0 -24511
- package/apps/supervisor-api/dist/worker-index.d.ts +0 -2
- package/apps/supervisor-api/dist/worker-index.js +0 -33
- 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-p31aS0f0.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-BiuFei_K.css +0 -32
- package/apps/supervisor-web/dist/assets/index-D1R9CUnx.js +0 -2161
- 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",
|
|
@@ -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
|
|
|
@@ -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', () => {
|
|
@@ -435,7 +435,6 @@ export function shouldPersistFinalHistoryItem(item: ThreadHistoryItemDto) {
|
|
|
435
435
|
|
|
436
436
|
export function shouldPersistRuntimeFinalHistoryItem(
|
|
437
437
|
item: ThreadHistoryItemDto,
|
|
438
|
-
allItems: ThreadHistoryItemDto[],
|
|
439
438
|
) {
|
|
440
439
|
if (item.kind === 'agentMessage' && isTransientAgentHistoryItem(item)) {
|
|
441
440
|
return false;
|
|
@@ -485,18 +484,7 @@ function historyItemSequence(item: ThreadHistoryItemDto) {
|
|
|
485
484
|
}
|
|
486
485
|
|
|
487
486
|
export function sortHistoryItemsBySequence<T extends ThreadHistoryItemDto>(items: T[]): T[] {
|
|
488
|
-
|
|
489
|
-
return items;
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
return items
|
|
493
|
-
.map((item, index) => ({ item, index }))
|
|
494
|
-
.sort((left, right) => {
|
|
495
|
-
const sequenceDelta =
|
|
496
|
-
historyItemSequence(left.item) - historyItemSequence(right.item);
|
|
497
|
-
return sequenceDelta === 0 ? left.index - right.index : sequenceDelta;
|
|
498
|
-
})
|
|
499
|
-
.map((entry) => entry.item);
|
|
487
|
+
return sortTurnItemsByRecordedSequence(items) as T[];
|
|
500
488
|
}
|
|
501
489
|
|
|
502
490
|
function sortTurnItemsByRecordedSequence(items: ThreadHistoryItemDto[]) {
|
|
@@ -636,12 +624,15 @@ function copyPersistedSequence(
|
|
|
636
624
|
item: ThreadHistoryItemDto,
|
|
637
625
|
persistedItem: ThreadHistoryItemDto,
|
|
638
626
|
) {
|
|
639
|
-
|
|
640
|
-
|
|
627
|
+
let nextItem = item;
|
|
628
|
+
if (hasHistoryItemSequence(persistedItem)) {
|
|
629
|
+
const sequence = historyItemSequence(persistedItem);
|
|
630
|
+
if (nextItem.sequence !== sequence) {
|
|
631
|
+
nextItem = { ...nextItem, sequence };
|
|
632
|
+
}
|
|
641
633
|
}
|
|
642
634
|
|
|
643
|
-
|
|
644
|
-
return item.sequence === sequence ? item : { ...item, sequence };
|
|
635
|
+
return nextItem;
|
|
645
636
|
}
|
|
646
637
|
|
|
647
638
|
function shouldAppendPersistedMissingItem(
|
|
@@ -1336,7 +1327,11 @@ export function agentTurnToThreadTurnDto(
|
|
|
1336
1327
|
startedAt: turn.startedAt ?? parseUuidV7Timestamp(turn.providerTurnId),
|
|
1337
1328
|
status: turn.status,
|
|
1338
1329
|
error: turn.error?.message ?? null,
|
|
1339
|
-
items: visibleRuntimeTurnItems(turn.items),
|
|
1330
|
+
items: visibleRuntimeTurnItems(turn.items).map((item, transcriptIndex) =>
|
|
1331
|
+
item.transcriptOrder === transcriptIndex
|
|
1332
|
+
? item
|
|
1333
|
+
: { ...item, transcriptOrder: transcriptIndex },
|
|
1334
|
+
),
|
|
1340
1335
|
};
|
|
1341
1336
|
|
|
1342
1337
|
return deferredDetails ? deferLargeHistoryItemDetails(baseTurn, deferredDetails) : baseTurn;
|
|
@@ -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 {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
ALTER TABLE shell_sessions ADD COLUMN label TEXT;
|
|
@@ -124,12 +124,14 @@ export interface UpsertThreadGoalRecordInput {
|
|
|
124
124
|
export interface CreateShellSessionRecordInput {
|
|
125
125
|
workspaceId: string;
|
|
126
126
|
threadId: string | null;
|
|
127
|
+
label?: string | null;
|
|
127
128
|
tmuxSessionName: string;
|
|
128
129
|
cwd: string;
|
|
129
130
|
status: string;
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
export interface UpdateShellSessionRecordInput {
|
|
134
|
+
label?: string | null;
|
|
133
135
|
tmuxSessionName?: string;
|
|
134
136
|
cwd?: string;
|
|
135
137
|
status?: string;
|
|
@@ -809,6 +811,15 @@ export function getShellSessionRecordByThreadId(db: DatabaseClient, threadId: st
|
|
|
809
811
|
return db.select().from(shellSessions).where(eq(shellSessions.threadId, threadId)).get();
|
|
810
812
|
}
|
|
811
813
|
|
|
814
|
+
export function listShellSessionRecordsByThreadId(db: DatabaseClient, threadId: string) {
|
|
815
|
+
return db
|
|
816
|
+
.select()
|
|
817
|
+
.from(shellSessions)
|
|
818
|
+
.where(eq(shellSessions.threadId, threadId))
|
|
819
|
+
.orderBy(desc(shellSessions.lastActivityAt), desc(shellSessions.createdAt))
|
|
820
|
+
.all();
|
|
821
|
+
}
|
|
822
|
+
|
|
812
823
|
export function createShellSessionRecord(
|
|
813
824
|
db: DatabaseClient,
|
|
814
825
|
input: CreateShellSessionRecordInput,
|
|
@@ -818,6 +829,7 @@ export function createShellSessionRecord(
|
|
|
818
829
|
id: randomUUID(),
|
|
819
830
|
workspaceId: input.workspaceId,
|
|
820
831
|
threadId: input.threadId,
|
|
832
|
+
label: input.label ?? null,
|
|
821
833
|
tmuxSessionName: input.tmuxSessionName,
|
|
822
834
|
cwd: input.cwd,
|
|
823
835
|
status: input.status,
|
|
@@ -51,6 +51,7 @@ export const shellSessions = sqliteTable('shell_sessions', {
|
|
|
51
51
|
id: text('id').primaryKey(),
|
|
52
52
|
workspaceId: text('workspace_id').notNull(),
|
|
53
53
|
threadId: text('thread_id'),
|
|
54
|
+
label: text('label'),
|
|
54
55
|
tmuxSessionName: text('tmux_session_name'),
|
|
55
56
|
cwd: text('cwd').notNull(),
|
|
56
57
|
status: text('status'),
|
|
@@ -266,23 +266,6 @@ function fileChangeStatsFromMetadata(metadata: unknown) {
|
|
|
266
266
|
};
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
function todoSummary(input: unknown, output: string | null) {
|
|
270
|
-
const todos = isRecord(input) && Array.isArray(input.todos)
|
|
271
|
-
? input.todos
|
|
272
|
-
: null;
|
|
273
|
-
if (!todos) {
|
|
274
|
-
return output ?? toolSummary(input);
|
|
275
|
-
}
|
|
276
|
-
const counts = new Map<string, number>();
|
|
277
|
-
todos.forEach((todo) => {
|
|
278
|
-
const status = isRecord(todo) ? stringValue(todo.status) ?? 'unknown' : 'unknown';
|
|
279
|
-
counts.set(status, (counts.get(status) ?? 0) + 1);
|
|
280
|
-
});
|
|
281
|
-
return Array.from(counts.entries())
|
|
282
|
-
.map(([status, count]) => `${count} ${status}`)
|
|
283
|
-
.join(', ');
|
|
284
|
-
}
|
|
285
|
-
|
|
286
269
|
function todoRecordsFromValue(value: unknown): unknown[] | null {
|
|
287
270
|
if (Array.isArray(value)) {
|
|
288
271
|
return value;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@remote-codex/plugin-terminal",
|
|
3
|
+
"private": true,
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"scripts": {
|
|
9
|
+
"build": "tsup src/index.ts --format esm --dts",
|
|
10
|
+
"lint": "eslint src --ext .ts",
|
|
11
|
+
"typecheck": "tsc -p tsconfig.json --noEmit"
|
|
12
|
+
},
|
|
13
|
+
"devDependencies": {
|
|
14
|
+
"tsup": "^8.4.0",
|
|
15
|
+
"typescript": "^5.8.3"
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "remote-codex.terminal",
|
|
3
|
+
"name": "Terminal",
|
|
4
|
+
"version": "0.1.0",
|
|
5
|
+
"description": "Built-in durable terminal panel backed by the supervisor PTY host.",
|
|
6
|
+
"remoteCodex": "^0.11.0",
|
|
7
|
+
"capabilities": {
|
|
8
|
+
"artifactTypes": [],
|
|
9
|
+
"timelineRenderers": [],
|
|
10
|
+
"threadPanels": [
|
|
11
|
+
{
|
|
12
|
+
"id": "terminal",
|
|
13
|
+
"label": "Terminal",
|
|
14
|
+
"kind": "terminal",
|
|
15
|
+
"artifactTypes": []
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"frontend": {
|
|
19
|
+
"entry": "./dist/index.js"
|
|
20
|
+
},
|
|
21
|
+
"backend": {
|
|
22
|
+
"entry": "./dist/backend.js"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
export const TERMINAL_PLUGIN_ID = 'remote-codex.terminal';
|
|
2
|
+
|
|
3
|
+
export interface TerminalPluginManifest {
|
|
4
|
+
id: typeof TERMINAL_PLUGIN_ID;
|
|
5
|
+
name: string;
|
|
6
|
+
version: string;
|
|
7
|
+
description: string;
|
|
8
|
+
remoteCodex: string;
|
|
9
|
+
capabilities: {
|
|
10
|
+
artifactTypes: [];
|
|
11
|
+
timelineRenderers: [];
|
|
12
|
+
threadPanels: Array<{
|
|
13
|
+
id: 'terminal';
|
|
14
|
+
label: string;
|
|
15
|
+
kind: 'terminal';
|
|
16
|
+
artifactTypes: [];
|
|
17
|
+
}>;
|
|
18
|
+
frontend: {
|
|
19
|
+
entry: string;
|
|
20
|
+
};
|
|
21
|
+
backend: {
|
|
22
|
+
entry: string;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export const terminalPluginManifest: TerminalPluginManifest = {
|
|
28
|
+
id: TERMINAL_PLUGIN_ID,
|
|
29
|
+
name: 'Terminal',
|
|
30
|
+
version: '0.1.0',
|
|
31
|
+
description: 'Built-in durable terminal panel backed by the supervisor PTY host.',
|
|
32
|
+
remoteCodex: '^0.11.0',
|
|
33
|
+
capabilities: {
|
|
34
|
+
artifactTypes: [],
|
|
35
|
+
timelineRenderers: [],
|
|
36
|
+
threadPanels: [
|
|
37
|
+
{
|
|
38
|
+
id: 'terminal',
|
|
39
|
+
label: 'Terminal',
|
|
40
|
+
kind: 'terminal',
|
|
41
|
+
artifactTypes: [],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
frontend: {
|
|
45
|
+
entry: './dist/index.js',
|
|
46
|
+
},
|
|
47
|
+
backend: {
|
|
48
|
+
entry: './dist/backend.js',
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
};
|
|
@@ -290,6 +290,40 @@ export interface WorkspaceTreeDto {
|
|
|
290
290
|
nodes: WorkspaceTreeNodeDto[];
|
|
291
291
|
}
|
|
292
292
|
|
|
293
|
+
export interface ThreadWorkspaceTreeNodeDto {
|
|
294
|
+
name: string;
|
|
295
|
+
path: string;
|
|
296
|
+
kind: 'file' | 'directory';
|
|
297
|
+
size?: number;
|
|
298
|
+
children?: ThreadWorkspaceTreeNodeDto[];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
export interface ThreadWorkspaceFilePreviewDto {
|
|
302
|
+
path: string;
|
|
303
|
+
name: string;
|
|
304
|
+
content: string;
|
|
305
|
+
language: string;
|
|
306
|
+
size: number;
|
|
307
|
+
truncated: boolean;
|
|
308
|
+
nextOffset: number;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
export type ThreadWorkspaceUploadResultDto =
|
|
312
|
+
| {
|
|
313
|
+
kind: 'file';
|
|
314
|
+
file: {
|
|
315
|
+
path: string;
|
|
316
|
+
name: string;
|
|
317
|
+
size: number;
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
| {
|
|
321
|
+
kind: 'archive';
|
|
322
|
+
archiveName: string;
|
|
323
|
+
extractedCount: number;
|
|
324
|
+
paths: string[];
|
|
325
|
+
};
|
|
326
|
+
|
|
293
327
|
export type ApprovalMode = 'yolo' | 'guarded';
|
|
294
328
|
export type ReasoningEffortDto = 'none' | 'minimal' | 'low' | 'medium' | 'high' | 'xhigh';
|
|
295
329
|
export type CollaborationModeDto = 'default' | 'plan';
|
|
@@ -421,13 +455,29 @@ export interface PluginArtifactTypeDto {
|
|
|
421
455
|
export interface PluginThreadPanelDto {
|
|
422
456
|
id: string;
|
|
423
457
|
label: string;
|
|
458
|
+
kind?: 'artifact' | 'terminal' | string;
|
|
424
459
|
artifactTypes: string[];
|
|
425
460
|
}
|
|
426
461
|
|
|
462
|
+
export interface PluginModelHintDto {
|
|
463
|
+
id: string;
|
|
464
|
+
text: string;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
export interface PluginMcpServerDto {
|
|
468
|
+
id: string;
|
|
469
|
+
name: string;
|
|
470
|
+
command: string;
|
|
471
|
+
args?: string[];
|
|
472
|
+
env?: Record<string, string>;
|
|
473
|
+
}
|
|
474
|
+
|
|
427
475
|
export interface PluginCapabilitiesDto {
|
|
428
476
|
artifactTypes: PluginArtifactTypeDto[];
|
|
429
477
|
timelineRenderers: string[];
|
|
430
478
|
threadPanels: PluginThreadPanelDto[];
|
|
479
|
+
modelHints?: PluginModelHintDto[];
|
|
480
|
+
mcpServers?: PluginMcpServerDto[];
|
|
431
481
|
frontend?: {
|
|
432
482
|
entry?: string;
|
|
433
483
|
style?: string;
|
|
@@ -812,7 +862,9 @@ export interface ShellSessionDto {
|
|
|
812
862
|
id: string;
|
|
813
863
|
threadId: string;
|
|
814
864
|
workspaceId: string;
|
|
865
|
+
label: string | null;
|
|
815
866
|
tmuxSessionName: string;
|
|
867
|
+
backend: 'pty' | 'tmux' | string;
|
|
816
868
|
cwd: string;
|
|
817
869
|
status: Exclude<ShellStatusDto, 'not_created' | 'workspace_missing'>;
|
|
818
870
|
attachedViewerId: string | null;
|
|
@@ -827,11 +879,18 @@ export interface ThreadShellStateDto {
|
|
|
827
879
|
workspacePathStatus: 'present' | 'missing';
|
|
828
880
|
state: ShellStatusDto;
|
|
829
881
|
shell: ShellSessionDto | null;
|
|
882
|
+
shells: ShellSessionDto[];
|
|
883
|
+
activeShellId: string | null;
|
|
830
884
|
}
|
|
831
885
|
|
|
832
886
|
export interface ShellCreateInput {
|
|
833
887
|
cols?: number;
|
|
834
888
|
rows?: number;
|
|
889
|
+
label?: string;
|
|
890
|
+
}
|
|
891
|
+
|
|
892
|
+
export interface UpdateShellInput {
|
|
893
|
+
label?: string | null;
|
|
835
894
|
}
|
|
836
895
|
|
|
837
896
|
export interface ShellAttachInput {
|