@neuralnomads/codenomad-dev 0.10.3-dev-20260213-ba418a85
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/README.md +126 -0
- package/dist/api-types.js +1 -0
- package/dist/auth/auth-store.js +134 -0
- package/dist/auth/http-auth.js +37 -0
- package/dist/auth/manager.js +128 -0
- package/dist/auth/password-hash.js +32 -0
- package/dist/auth/session-manager.js +17 -0
- package/dist/auth/token-manager.js +27 -0
- package/dist/background-processes/manager.js +437 -0
- package/dist/bin.js +24 -0
- package/dist/config/binaries.js +148 -0
- package/dist/config/location.js +57 -0
- package/dist/config/schema.js +70 -0
- package/dist/config/store.js +200 -0
- package/dist/events/bus.js +41 -0
- package/dist/filesystem/__tests__/search-cache.test.js +40 -0
- package/dist/filesystem/browser.js +285 -0
- package/dist/filesystem/search-cache.js +43 -0
- package/dist/filesystem/search.js +135 -0
- package/dist/index.js +410 -0
- package/dist/integrations/github/bot-signature.js +11 -0
- package/dist/integrations/github/git-ops.js +133 -0
- package/dist/integrations/github/github-types.js +1 -0
- package/dist/integrations/github/job-runner.js +608 -0
- package/dist/integrations/github/octokit.js +58 -0
- package/dist/integrations/github/sanitize-webhook.js +42 -0
- package/dist/integrations/github/webhook-verify.js +21 -0
- package/dist/integrations/github/workspace-context.js +10 -0
- package/dist/integrations/github/worktree-context.js +15 -0
- package/dist/launcher.js +149 -0
- package/dist/loader.js +21 -0
- package/dist/logger.js +109 -0
- package/dist/opencode/request-context.js +39 -0
- package/dist/opencode/worktree-directory.js +42 -0
- package/dist/opencode-config/README.md +32 -0
- package/dist/opencode-config/opencode.jsonc +3 -0
- package/dist/opencode-config/package.json +9 -0
- package/dist/opencode-config/plugin/codenomad.ts +32 -0
- package/dist/opencode-config/plugin/lib/background-process.ts +253 -0
- package/dist/opencode-config/plugin/lib/client.ts +133 -0
- package/dist/opencode-config/plugin/lib/request.ts +214 -0
- package/dist/opencode-config-template/README.md +32 -0
- package/dist/opencode-config-template/opencode.jsonc +3 -0
- package/dist/opencode-config-template/plugin/codenomad.ts +40 -0
- package/dist/opencode-config-template/plugin/lib/background-process.ts +160 -0
- package/dist/opencode-config-template/plugin/lib/client.ts +165 -0
- package/dist/opencode-config.js +26 -0
- package/dist/plugins/channel.js +40 -0
- package/dist/plugins/handlers.js +17 -0
- package/dist/releases/dev-release-monitor.js +75 -0
- package/dist/releases/release-monitor.js +107 -0
- package/dist/server/http-server.js +547 -0
- package/dist/server/network-addresses.js +72 -0
- package/dist/server/routes/auth-pages/login.html +134 -0
- package/dist/server/routes/auth-pages/token.html +93 -0
- package/dist/server/routes/auth.js +134 -0
- package/dist/server/routes/background-processes.js +60 -0
- package/dist/server/routes/config.js +59 -0
- package/dist/server/routes/events.js +43 -0
- package/dist/server/routes/filesystem.js +43 -0
- package/dist/server/routes/github-plugin.js +215 -0
- package/dist/server/routes/github-webhook.js +32 -0
- package/dist/server/routes/meta.js +47 -0
- package/dist/server/routes/plugin.js +52 -0
- package/dist/server/routes/storage.js +52 -0
- package/dist/server/routes/workspaces.js +89 -0
- package/dist/server/routes/worktrees.js +156 -0
- package/dist/server/tls.js +224 -0
- package/dist/storage/instance-store.js +56 -0
- package/dist/ui/__tests__/remote-ui.test.js +46 -0
- package/dist/ui/remote-ui.js +462 -0
- package/dist/workspaces/git-worktrees.js +199 -0
- package/dist/workspaces/instance-events.js +180 -0
- package/dist/workspaces/manager.js +375 -0
- package/dist/workspaces/opencode-auth.js +16 -0
- package/dist/workspaces/runtime.js +346 -0
- package/dist/workspaces/worktree-map.js +116 -0
- package/package.json +49 -0
- package/public/apple-touch-icon-180x180.png +0 -0
- package/public/assets/CodeNomad-Icon-bmTWNPXy.png +0 -0
- package/public/assets/abap-BdImnpbu.js +1 -0
- package/public/assets/actionscript-3-CfeIJUat.js +1 -0
- package/public/assets/ada-bCR0ucgS.js +1 -0
- package/public/assets/andromeeda-C-Jbm3Hp.js +1 -0
- package/public/assets/angular-html-CU67Zn6k.js +1 -0
- package/public/assets/angular-ts-BwZT4LLn.js +1 -0
- package/public/assets/apache-Pmp26Uib.js +1 -0
- package/public/assets/apex-DhZLUxFE.js +1 -0
- package/public/assets/apl-dKokRX4l.js +1 -0
- package/public/assets/applescript-Co6uUVPk.js +1 -0
- package/public/assets/ara-BRHolxvo.js +1 -0
- package/public/assets/asciidoc-Dv7Oe6Be.js +1 -0
- package/public/assets/asm-D_Q5rh1f.js +1 -0
- package/public/assets/astro-CbQHKStN.js +1 -0
- package/public/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/public/assets/awk-DMzUqQB5.js +1 -0
- package/public/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/public/assets/ballerina-BFfxhgS-.js +1 -0
- package/public/assets/bat-BkioyH1T.js +1 -0
- package/public/assets/beancount-k_qm7-4y.js +1 -0
- package/public/assets/berry-D08WgyRC.js +1 -0
- package/public/assets/bibtex-CHM0blh-.js +1 -0
- package/public/assets/bicep-Bmn6On1c.js +1 -0
- package/public/assets/blade-DVc8C-J4.js +1 -0
- package/public/assets/bsl-BO_Y6i37.js +1 -0
- package/public/assets/c-BIGW1oBm.js +1 -0
- package/public/assets/cadence-Bv_4Rxtq.js +1 -0
- package/public/assets/cairo-KRGpt6FW.js +1 -0
- package/public/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/public/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/public/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/public/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/public/assets/clarity-D53aC0YG.js +1 -0
- package/public/assets/clojure-P80f7IUj.js +1 -0
- package/public/assets/cmake-D1j8_8rp.js +1 -0
- package/public/assets/cobol-nwyudZeR.js +1 -0
- package/public/assets/codeowners-Bp6g37R7.js +1 -0
- package/public/assets/codeql-DsOJ9woJ.js +1 -0
- package/public/assets/coffee-Ch7k5sss.js +1 -0
- package/public/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/public/assets/coq-DkFqJrB1.js +1 -0
- package/public/assets/core-BSTVzpXI.js +1 -0
- package/public/assets/cpp-CofmeUqb.js +1 -0
- package/public/assets/crystal-tKQVLTB8.js +1 -0
- package/public/assets/csharp-CX12Zw3r.js +1 -0
- package/public/assets/css-DPfMkruS.js +1 -0
- package/public/assets/csv-fuZLfV_i.js +1 -0
- package/public/assets/cue-D82EKSYY.js +1 -0
- package/public/assets/cypher-COkxafJQ.js +1 -0
- package/public/assets/d-85-TOEBH.js +1 -0
- package/public/assets/dark-plus-eOWES_5F.js +1 -0
- package/public/assets/dart-CF10PKvl.js +1 -0
- package/public/assets/dax-CEL-wOlO.js +1 -0
- package/public/assets/desktop-BmXAJ9_W.js +1 -0
- package/public/assets/diff-D97Zzqfu.js +1 -0
- package/public/assets/docker-BcOcwvcX.js +1 -0
- package/public/assets/dotenv-Da5cRb03.js +1 -0
- package/public/assets/dracula-BzJJZx-M.js +1 -0
- package/public/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/public/assets/dream-maker-BtqSS_iP.js +1 -0
- package/public/assets/edge-BkV0erSs.js +1 -0
- package/public/assets/elixir-CDX3lj18.js +1 -0
- package/public/assets/elm-DbKCFpqz.js +1 -0
- package/public/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/public/assets/erb-BOJIQeun.js +1 -0
- package/public/assets/erlang-DsQrWhSR.js +1 -0
- package/public/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/public/assets/everforest-light-C8M2exoo.js +1 -0
- package/public/assets/fennel-BYunw83y.js +1 -0
- package/public/assets/fish-BvzEVeQv.js +1 -0
- package/public/assets/fluent-C4IJs8-o.js +1 -0
- package/public/assets/fortran-fixed-form-BZjJHVRy.js +1 -0
- package/public/assets/fortran-free-form-D22FLkUw.js +1 -0
- package/public/assets/fsharp-CXgrBDvD.js +1 -0
- package/public/assets/gdresource-B7Tvp0Sc.js +1 -0
- package/public/assets/gdscript-DTMYz4Jt.js +1 -0
- package/public/assets/gdshader-DkwncUOv.js +1 -0
- package/public/assets/genie-D0YGMca9.js +1 -0
- package/public/assets/gherkin-DyxjwDmM.js +1 -0
- package/public/assets/git-commit-F4YmCXRG.js +1 -0
- package/public/assets/git-rebase-r7XF79zn.js +1 -0
- package/public/assets/github-dark-DHJKELXO.js +1 -0
- package/public/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/public/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/public/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/public/assets/github-light-DAi9KRSo.js +1 -0
- package/public/assets/github-light-default-D7oLnXFd.js +1 -0
- package/public/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/public/assets/gleam-BspZqrRM.js +1 -0
- package/public/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/public/assets/glimmer-ts-U6CK756n.js +1 -0
- package/public/assets/glsl-DplSGwfg.js +1 -0
- package/public/assets/gnuplot-DdkO51Og.js +1 -0
- package/public/assets/go-Dn2_MT6a.js +1 -0
- package/public/assets/graphql-ChdNCCLP.js +1 -0
- package/public/assets/groovy-gcz8RCvz.js +1 -0
- package/public/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/public/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/public/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/public/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/public/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/public/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/public/assets/hack-CaT9iCJl.js +1 -0
- package/public/assets/haml-B8DHNrY2.js +1 -0
- package/public/assets/handlebars-BL8al0AC.js +1 -0
- package/public/assets/haskell-Df6bDoY_.js +1 -0
- package/public/assets/haxe-CzTSHFRz.js +1 -0
- package/public/assets/hcl-BWvSN4gD.js +1 -0
- package/public/assets/hjson-D5-asLiD.js +1 -0
- package/public/assets/hlsl-D3lLCCz7.js +1 -0
- package/public/assets/houston-DnULxvSX.js +1 -0
- package/public/assets/html-GMplVEZG.js +1 -0
- package/public/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/public/assets/http-jrhK8wxY.js +1 -0
- package/public/assets/hurl-irOxFIW8.js +1 -0
- package/public/assets/hxml-Bvhsp5Yf.js +1 -0
- package/public/assets/hy-DFXneXwc.js +1 -0
- package/public/assets/imba-DGztddWO.js +1 -0
- package/public/assets/index-D4PT0yE4.js +1 -0
- package/public/assets/index-DN20ggb1.js +1 -0
- package/public/assets/index-DdQ7zIzB.js +1 -0
- package/public/assets/index-Dl-rJJuP.js +1 -0
- package/public/assets/index-Dlo2gDiy.css +1 -0
- package/public/assets/ini-BEwlwnbL.js +1 -0
- package/public/assets/java-CylS5w8V.js +1 -0
- package/public/assets/javascript-wDzz0qaB.js +1 -0
- package/public/assets/jinja-4LBKfQ-Z.js +1 -0
- package/public/assets/jison-wvAkD_A8.js +1 -0
- package/public/assets/json-Cp-IABpG.js +1 -0
- package/public/assets/json5-C9tS-k6U.js +1 -0
- package/public/assets/jsonc-Des-eS-w.js +1 -0
- package/public/assets/jsonl-DcaNXYhu.js +1 -0
- package/public/assets/jsonnet-DFQXde-d.js +1 -0
- package/public/assets/jssm-C2t-YnRu.js +1 -0
- package/public/assets/jsx-g9-lgVsj.js +1 -0
- package/public/assets/julia-C8NyazO9.js +1 -0
- package/public/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/public/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/public/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/public/assets/kdl-DV7GczEv.js +1 -0
- package/public/assets/kotlin-BdnUsdx6.js +1 -0
- package/public/assets/kusto-BvAqAH-y.js +1 -0
- package/public/assets/laserwave-DUszq2jm.js +1 -0
- package/public/assets/latex-BUKiar2Z.js +1 -0
- package/public/assets/lean-DP1Csr6i.js +1 -0
- package/public/assets/less-B1dDrJ26.js +1 -0
- package/public/assets/light-plus-B7mTdjB0.js +1 -0
- package/public/assets/liquid-DYVedYrR.js +1 -0
- package/public/assets/llvm-BtvRca6l.js +1 -0
- package/public/assets/loading-CmEVQgyj.css +1 -0
- package/public/assets/loading-DgqIiz-T.js +1 -0
- package/public/assets/log-2UxHyX5q.js +1 -0
- package/public/assets/logo-BtOb2qkB.js +1 -0
- package/public/assets/lua-BbnMAYS6.js +1 -0
- package/public/assets/luau-CXu1NL6O.js +1 -0
- package/public/assets/main-CSlDZj4f.js +188 -0
- package/public/assets/main-HAZkIolJ.css +19 -0
- package/public/assets/make-CHLpvVh8.js +1 -0
- package/public/assets/markdown-Cvjx9yec.js +1 -0
- package/public/assets/marko-CPi9NSCl.js +1 -0
- package/public/assets/material-theme-D5KoaKCx.js +1 -0
- package/public/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/public/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/public/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/public/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/public/assets/matlab-D7o27uSR.js +1 -0
- package/public/assets/mdc-DUICxH0z.js +1 -0
- package/public/assets/mdx-Cmh6b_Ma.js +1 -0
- package/public/assets/mermaid-DKYwYmdq.js +1 -0
- package/public/assets/min-dark-CafNBF8u.js +1 -0
- package/public/assets/min-light-CTRr51gU.js +1 -0
- package/public/assets/mipsasm-CKIfxQSi.js +1 -0
- package/public/assets/mojo-1DNp92w6.js +1 -0
- package/public/assets/monokai-D4h5O-jR.js +1 -0
- package/public/assets/move-Bu9oaDYs.js +1 -0
- package/public/assets/narrat-DRg8JJMk.js +1 -0
- package/public/assets/nextflow-CUEJCptM.js +1 -0
- package/public/assets/nginx-DknmC5AR.js +1 -0
- package/public/assets/night-owl-C39BiMTA.js +1 -0
- package/public/assets/nim-CVrawwO9.js +1 -0
- package/public/assets/nix-BbRYJGeE.js +1 -0
- package/public/assets/nord-Ddv68eIx.js +1 -0
- package/public/assets/nushell-C-sUppwS.js +1 -0
- package/public/assets/objective-c-DXmwc3jG.js +1 -0
- package/public/assets/objective-cpp-CLxacb5B.js +1 -0
- package/public/assets/ocaml-C0hk2d4L.js +1 -0
- package/public/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/public/assets/one-light-PoHY5YXO.js +1 -0
- package/public/assets/pascal-D93ZcfNL.js +1 -0
- package/public/assets/perl-C0TMdlhV.js +1 -0
- package/public/assets/php-CDn_0X-4.js +1 -0
- package/public/assets/pkl-u5AG7uiY.js +1 -0
- package/public/assets/plastic-3e1v2bzS.js +1 -0
- package/public/assets/plsql-ChMvpjG-.js +1 -0
- package/public/assets/po-BTJTHyun.js +1 -0
- package/public/assets/poimandres-CS3Unz2-.js +1 -0
- package/public/assets/polar-C0HS_06l.js +1 -0
- package/public/assets/postcss-CXtECtnM.js +1 -0
- package/public/assets/powerquery-CEu0bR-o.js +1 -0
- package/public/assets/powershell-Dpen1YoG.js +1 -0
- package/public/assets/prisma-Dd19v3D-.js +1 -0
- package/public/assets/prolog-CbFg5uaA.js +1 -0
- package/public/assets/proto-DyJlTyXw.js +1 -0
- package/public/assets/pug-CGlum2m_.js +1 -0
- package/public/assets/puppet-BMWR74SV.js +1 -0
- package/public/assets/purescript-CklMAg4u.js +1 -0
- package/public/assets/python-B6aJPvgy.js +1 -0
- package/public/assets/qml-3beO22l8.js +1 -0
- package/public/assets/qmldir-C8lEn-DE.js +1 -0
- package/public/assets/qss-IeuSbFQv.js +1 -0
- package/public/assets/r-DiinP2Uv.js +1 -0
- package/public/assets/racket-BqYA7rlc.js +1 -0
- package/public/assets/raku-DXvB9xmW.js +1 -0
- package/public/assets/razor-WgofotgN.js +1 -0
- package/public/assets/red-bN70gL4F.js +1 -0
- package/public/assets/reg-C-SQnVFl.js +1 -0
- package/public/assets/regexp-CDVJQ6XC.js +1 -0
- package/public/assets/rel-C3B-1QV4.js +1 -0
- package/public/assets/riscv-BM1_JUlF.js +1 -0
- package/public/assets/rose-pine-BHrmToEH.js +1 -0
- package/public/assets/rose-pine-dawn-CnK8MTSM.js +1 -0
- package/public/assets/rose-pine-moon-NleAzG8P.js +1 -0
- package/public/assets/rosmsg-BJDFO7_C.js +1 -0
- package/public/assets/rst-B0xPkSld.js +1 -0
- package/public/assets/ruby-BvKwtOVI.js +1 -0
- package/public/assets/rust-B1yitclQ.js +1 -0
- package/public/assets/sas-cz2c8ADy.js +1 -0
- package/public/assets/sass-Cj5Yp3dK.js +1 -0
- package/public/assets/scala-C151Ov-r.js +1 -0
- package/public/assets/scheme-C98Dy4si.js +1 -0
- package/public/assets/scss-OYdSNvt2.js +1 -0
- package/public/assets/sdbl-DVxCFoDh.js +1 -0
- package/public/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/public/assets/shellscript-Yzrsuije.js +1 -0
- package/public/assets/shellsession-BADoaaVG.js +1 -0
- package/public/assets/slack-dark-BthQWCQV.js +1 -0
- package/public/assets/slack-ochin-DqwNpetd.js +1 -0
- package/public/assets/smalltalk-BERRCDM3.js +1 -0
- package/public/assets/snazzy-light-Bw305WKR.js +1 -0
- package/public/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/public/assets/solarized-light-L9t79GZl.js +1 -0
- package/public/assets/solidity-BbcW6ACK.js +1 -0
- package/public/assets/soy-Brmx7dQM.js +1 -0
- package/public/assets/sparql-rVzFXLq3.js +1 -0
- package/public/assets/splunk-BtCnVYZw.js +1 -0
- package/public/assets/sql-BLtJtn59.js +1 -0
- package/public/assets/ssh-config-_ykCGR6B.js +1 -0
- package/public/assets/stata-BH5u7GGu.js +1 -0
- package/public/assets/stylus-BEDo0Tqx.js +1 -0
- package/public/assets/svelte-3Dk4HxPD.js +1 -0
- package/public/assets/swift-Dg5xB15N.js +1 -0
- package/public/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/public/assets/system-verilog-CnnmHF94.js +1 -0
- package/public/assets/systemd-4A_iFExJ.js +1 -0
- package/public/assets/talonscript-CkByrt1z.js +1 -0
- package/public/assets/tasl-QIJgUcNo.js +1 -0
- package/public/assets/tcl-dwOrl1Do.js +1 -0
- package/public/assets/templ-W15q3VgB.js +1 -0
- package/public/assets/terraform-BETggiCN.js +1 -0
- package/public/assets/tex-Cppo0RY3.js +1 -0
- package/public/assets/tokyo-night-hegEt444.js +1 -0
- package/public/assets/toml-vGWfd6FD.js +1 -0
- package/public/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/public/assets/tsv-B_m7g4N7.js +1 -0
- package/public/assets/tsx-COt5Ahok.js +1 -0
- package/public/assets/turtle-BsS91CYL.js +1 -0
- package/public/assets/twig-CO9l9SDP.js +1 -0
- package/public/assets/typescript-BPQ3VLAy.js +1 -0
- package/public/assets/typespec-Df68jz8_.js +1 -0
- package/public/assets/typst-DHCkPAjA.js +1 -0
- package/public/assets/v-BcVCzyr7.js +1 -0
- package/public/assets/vala-CsfeWuGM.js +1 -0
- package/public/assets/vb-D17OF-Vu.js +1 -0
- package/public/assets/verilog-BQ8w6xss.js +1 -0
- package/public/assets/vesper-DU1UobuO.js +1 -0
- package/public/assets/vhdl-CeAyd5Ju.js +1 -0
- package/public/assets/viml-CJc9bBzg.js +1 -0
- package/public/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/public/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/public/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/public/assets/vue-CCoi5OLL.js +1 -0
- package/public/assets/vue-html-DAAvJJDi.js +1 -0
- package/public/assets/vue-vine-_Ih-lPRR.js +1 -0
- package/public/assets/vyper-CDx5xZoG.js +1 -0
- package/public/assets/wasm-CG6Dc4jp.js +1 -0
- package/public/assets/wasm-MzD3tlZU.js +1 -0
- package/public/assets/wenyan-BV7otONQ.js +1 -0
- package/public/assets/wgsl-Dx-B1_4e.js +1 -0
- package/public/assets/wikitext-BhOHFoWU.js +1 -0
- package/public/assets/wit-5i3qLPDT.js +1 -0
- package/public/assets/wolfram-lXgVvXCa.js +1 -0
- package/public/assets/xml-sdJ4AIDG.js +1 -0
- package/public/assets/xsl-CtQFsRM5.js +1 -0
- package/public/assets/yaml-Buea-lGh.js +1 -0
- package/public/assets/zenscript-DVFEvuxE.js +1 -0
- package/public/assets/zig-VOosw3JB.js +1 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +38 -0
- package/public/loading.html +28 -0
- package/public/logo.png +0 -0
- package/public/manifest.webmanifest +1 -0
- package/public/maskable-icon-512x512.png +0 -0
- package/public/monaco/vs/base/browser/ui/codicons/codicon/codicon.ttf +0 -0
- package/public/monaco/vs/base/worker/workerMain.js +31 -0
- package/public/monaco/vs/basic-languages/cpp/cpp.js +10 -0
- package/public/monaco/vs/basic-languages/kotlin/kotlin.js +10 -0
- package/public/monaco/vs/basic-languages/markdown/markdown.js +10 -0
- package/public/monaco/vs/basic-languages/python/python.js +10 -0
- package/public/monaco/vs/editor/editor.main.css +8 -0
- package/public/monaco/vs/editor/editor.main.js +798 -0
- package/public/monaco/vs/language/css/cssMode.js +13 -0
- package/public/monaco/vs/language/css/cssWorker.js +77 -0
- package/public/monaco/vs/language/html/htmlMode.js +13 -0
- package/public/monaco/vs/language/html/htmlWorker.js +454 -0
- package/public/monaco/vs/language/json/jsonMode.js +19 -0
- package/public/monaco/vs/language/json/jsonWorker.js +42 -0
- package/public/monaco/vs/language/typescript/tsMode.js +20 -0
- package/public/monaco/vs/language/typescript/tsWorker.js +51328 -0
- package/public/monaco/vs/loader.js +11 -0
- package/public/monaco.worker.js +7 -0
- package/public/pwa-192x192.png +0 -0
- package/public/pwa-512x512.png +0 -0
- package/public/pwa-64x64.png +0 -0
- package/public/registerSW.js +1 -0
- package/public/sw.js +1 -0
- package/public/ui-version.json +3 -0
- package/public/workbox-60d14903.js +1 -0
- package/scripts/copy-auth-pages.mjs +22 -0
- package/scripts/copy-opencode-config.mjs +61 -0
- package/scripts/copy-ui-dist.mjs +21 -0
- package/src/api-types.ts +326 -0
- package/src/auth/auth-store.ts +175 -0
- package/src/auth/http-auth.ts +38 -0
- package/src/auth/manager.ts +163 -0
- package/src/auth/password-hash.ts +49 -0
- package/src/auth/session-manager.ts +23 -0
- package/src/auth/token-manager.ts +32 -0
- package/src/background-processes/manager.ts +519 -0
- package/src/bin.ts +29 -0
- package/src/config/binaries.ts +192 -0
- package/src/config/location.ts +78 -0
- package/src/config/schema.ts +104 -0
- package/src/config/store.ts +244 -0
- package/src/events/bus.ts +45 -0
- package/src/filesystem/__tests__/search-cache.test.ts +61 -0
- package/src/filesystem/browser.ts +353 -0
- package/src/filesystem/search-cache.ts +66 -0
- package/src/filesystem/search.ts +184 -0
- package/src/index.ts +540 -0
- package/src/launcher.ts +177 -0
- package/src/loader.ts +21 -0
- package/src/logger.ts +133 -0
- package/src/opencode-config.ts +31 -0
- package/src/plugins/channel.ts +55 -0
- package/src/plugins/handlers.ts +36 -0
- package/src/releases/dev-release-monitor.ts +118 -0
- package/src/releases/release-monitor.ts +149 -0
- package/src/server/http-server.ts +693 -0
- package/src/server/network-addresses.ts +75 -0
- package/src/server/routes/auth-pages/login.html +134 -0
- package/src/server/routes/auth-pages/token.html +93 -0
- package/src/server/routes/auth.ts +164 -0
- package/src/server/routes/background-processes.ts +85 -0
- package/src/server/routes/config.ts +76 -0
- package/src/server/routes/events.ts +61 -0
- package/src/server/routes/filesystem.ts +54 -0
- package/src/server/routes/meta.ts +58 -0
- package/src/server/routes/plugin.ts +75 -0
- package/src/server/routes/storage.ts +66 -0
- package/src/server/routes/workspaces.ts +113 -0
- package/src/server/routes/worktrees.ts +195 -0
- package/src/server/tls.ts +283 -0
- package/src/storage/instance-store.ts +64 -0
- package/src/ui/__tests__/remote-ui.test.ts +58 -0
- package/src/ui/remote-ui.ts +571 -0
- package/src/workspaces/git-worktrees.ts +241 -0
- package/src/workspaces/instance-events.ts +226 -0
- package/src/workspaces/manager.ts +493 -0
- package/src/workspaces/opencode-auth.ts +22 -0
- package/src/workspaces/runtime.ts +428 -0
- package/src/workspaces/worktree-map.ts +129 -0
- package/tsconfig.json +17 -0
|
@@ -0,0 +1,346 @@
|
|
|
1
|
+
import { spawn, spawnSync } from "child_process";
|
|
2
|
+
import { existsSync, statSync } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
export const WINDOWS_CMD_EXTENSIONS = new Set([".cmd", ".bat"]);
|
|
5
|
+
export const WINDOWS_POWERSHELL_EXTENSIONS = new Set([".ps1"]);
|
|
6
|
+
export function buildSpawnSpec(binaryPath, args) {
|
|
7
|
+
if (process.platform !== "win32") {
|
|
8
|
+
return { command: binaryPath, args, options: {} };
|
|
9
|
+
}
|
|
10
|
+
const extension = path.extname(binaryPath).toLowerCase();
|
|
11
|
+
if (WINDOWS_CMD_EXTENSIONS.has(extension)) {
|
|
12
|
+
const comspec = process.env.ComSpec || "cmd.exe";
|
|
13
|
+
// cmd.exe requires the full command as a single string.
|
|
14
|
+
// Using the ""<script> <args>"" pattern ensures paths with spaces are handled.
|
|
15
|
+
const commandLine = `""${binaryPath}" ${args.join(" ")}"`;
|
|
16
|
+
return {
|
|
17
|
+
command: comspec,
|
|
18
|
+
args: ["/d", "/s", "/c", commandLine],
|
|
19
|
+
options: { windowsVerbatimArguments: true },
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (WINDOWS_POWERSHELL_EXTENSIONS.has(extension)) {
|
|
23
|
+
// powershell.exe ships with Windows. (pwsh may not.)
|
|
24
|
+
return {
|
|
25
|
+
command: "powershell.exe",
|
|
26
|
+
args: ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", binaryPath, ...args],
|
|
27
|
+
options: {},
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return { command: binaryPath, args, options: {} };
|
|
31
|
+
}
|
|
32
|
+
const SENSITIVE_ENV_KEY = /(PASSWORD|TOKEN|SECRET)/i;
|
|
33
|
+
function redactEnvironment(env) {
|
|
34
|
+
const redacted = {};
|
|
35
|
+
for (const [key, value] of Object.entries(env)) {
|
|
36
|
+
if (value === undefined) {
|
|
37
|
+
redacted[key] = value;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
redacted[key] = SENSITIVE_ENV_KEY.test(key) ? "[REDACTED]" : value;
|
|
41
|
+
}
|
|
42
|
+
return redacted;
|
|
43
|
+
}
|
|
44
|
+
export class WorkspaceRuntime {
|
|
45
|
+
constructor(eventBus, logger) {
|
|
46
|
+
this.eventBus = eventBus;
|
|
47
|
+
this.logger = logger;
|
|
48
|
+
this.processes = new Map();
|
|
49
|
+
}
|
|
50
|
+
async launch(options) {
|
|
51
|
+
this.validateFolder(options.folder);
|
|
52
|
+
const args = ["serve", "--port", "0", "--print-logs", "--log-level", "DEBUG"];
|
|
53
|
+
const env = { ...process.env, ...(options.environment ?? {}) };
|
|
54
|
+
let exitResolve = null;
|
|
55
|
+
const exitPromise = new Promise((resolveExit) => {
|
|
56
|
+
exitResolve = resolveExit;
|
|
57
|
+
});
|
|
58
|
+
// Store recent output for debugging - keep last 50 lines from each stream
|
|
59
|
+
const MAX_OUTPUT_LINES = 50;
|
|
60
|
+
const recentStdout = [];
|
|
61
|
+
const recentStderr = [];
|
|
62
|
+
const getLastOutput = () => {
|
|
63
|
+
const combined = [];
|
|
64
|
+
if (recentStderr.length > 0) {
|
|
65
|
+
combined.push("Error Stream");
|
|
66
|
+
combined.push(...recentStderr.slice(-10));
|
|
67
|
+
}
|
|
68
|
+
if (recentStdout.length > 0) {
|
|
69
|
+
combined.push("Output Stream");
|
|
70
|
+
combined.push(...recentStdout.slice(-10));
|
|
71
|
+
}
|
|
72
|
+
return combined.join("\n");
|
|
73
|
+
};
|
|
74
|
+
return new Promise((resolve, reject) => {
|
|
75
|
+
const spec = buildSpawnSpec(options.binaryPath, args);
|
|
76
|
+
const commandLine = [spec.command, ...spec.args].join(" ");
|
|
77
|
+
this.logger.info({
|
|
78
|
+
workspaceId: options.workspaceId,
|
|
79
|
+
folder: options.folder,
|
|
80
|
+
binary: options.binaryPath,
|
|
81
|
+
spawnCommand: spec.command,
|
|
82
|
+
commandLine,
|
|
83
|
+
}, "Launching OpenCode process");
|
|
84
|
+
this.logger.debug({
|
|
85
|
+
workspaceId: options.workspaceId,
|
|
86
|
+
spawnArgs: spec.args,
|
|
87
|
+
}, "OpenCode spawn args");
|
|
88
|
+
this.logger.trace({
|
|
89
|
+
workspaceId: options.workspaceId,
|
|
90
|
+
env: redactEnvironment(env),
|
|
91
|
+
}, "OpenCode spawn environment");
|
|
92
|
+
const detached = process.platform !== "win32";
|
|
93
|
+
const child = spawn(spec.command, spec.args, {
|
|
94
|
+
cwd: options.folder,
|
|
95
|
+
env,
|
|
96
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
97
|
+
detached,
|
|
98
|
+
...spec.options,
|
|
99
|
+
});
|
|
100
|
+
const managed = { child, requestedStop: false };
|
|
101
|
+
this.processes.set(options.workspaceId, managed);
|
|
102
|
+
let stdoutBuffer = "";
|
|
103
|
+
let stderrBuffer = "";
|
|
104
|
+
let portFound = false;
|
|
105
|
+
let warningTimer = null;
|
|
106
|
+
const startWarningTimer = () => {
|
|
107
|
+
warningTimer = setInterval(() => {
|
|
108
|
+
this.logger.warn({ workspaceId: options.workspaceId }, "Workspace runtime has not reported a port yet");
|
|
109
|
+
}, 10000);
|
|
110
|
+
};
|
|
111
|
+
const stopWarningTimer = () => {
|
|
112
|
+
if (warningTimer) {
|
|
113
|
+
clearInterval(warningTimer);
|
|
114
|
+
warningTimer = null;
|
|
115
|
+
}
|
|
116
|
+
};
|
|
117
|
+
startWarningTimer();
|
|
118
|
+
const cleanupStreams = () => {
|
|
119
|
+
stopWarningTimer();
|
|
120
|
+
child.stdout?.removeAllListeners();
|
|
121
|
+
child.stderr?.removeAllListeners();
|
|
122
|
+
};
|
|
123
|
+
const handleExit = (code, signal) => {
|
|
124
|
+
this.logger.info({ workspaceId: options.workspaceId, code, signal }, "OpenCode process exited");
|
|
125
|
+
this.processes.delete(options.workspaceId);
|
|
126
|
+
cleanupStreams();
|
|
127
|
+
child.removeListener("error", handleError);
|
|
128
|
+
child.removeListener("exit", handleExit);
|
|
129
|
+
const exitInfo = {
|
|
130
|
+
workspaceId: options.workspaceId,
|
|
131
|
+
code,
|
|
132
|
+
signal,
|
|
133
|
+
requested: managed.requestedStop,
|
|
134
|
+
};
|
|
135
|
+
if (exitResolve) {
|
|
136
|
+
exitResolve(exitInfo);
|
|
137
|
+
exitResolve = null;
|
|
138
|
+
}
|
|
139
|
+
if (!portFound) {
|
|
140
|
+
const recentOutput = getLastOutput().trim();
|
|
141
|
+
const reason = recentOutput || stderrBuffer || `Process exited with code ${code}`;
|
|
142
|
+
reject(new Error(reason));
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
options.onExit?.(exitInfo);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
const handleError = (error) => {
|
|
149
|
+
cleanupStreams();
|
|
150
|
+
child.removeListener("exit", handleExit);
|
|
151
|
+
this.processes.delete(options.workspaceId);
|
|
152
|
+
this.logger.error({ workspaceId: options.workspaceId, err: error }, "Workspace runtime error");
|
|
153
|
+
if (exitResolve) {
|
|
154
|
+
exitResolve({ workspaceId: options.workspaceId, code: null, signal: null, requested: managed.requestedStop });
|
|
155
|
+
exitResolve = null;
|
|
156
|
+
}
|
|
157
|
+
reject(error);
|
|
158
|
+
};
|
|
159
|
+
child.on("error", handleError);
|
|
160
|
+
child.on("exit", handleExit);
|
|
161
|
+
child.stdout?.on("data", (data) => {
|
|
162
|
+
const text = data.toString();
|
|
163
|
+
stdoutBuffer += text;
|
|
164
|
+
const lines = stdoutBuffer.split("\n");
|
|
165
|
+
stdoutBuffer = lines.pop() ?? "";
|
|
166
|
+
for (const line of lines) {
|
|
167
|
+
const trimmed = line.trim();
|
|
168
|
+
if (!trimmed)
|
|
169
|
+
continue;
|
|
170
|
+
recentStdout.push(trimmed);
|
|
171
|
+
if (recentStdout.length > MAX_OUTPUT_LINES) {
|
|
172
|
+
recentStdout.shift();
|
|
173
|
+
}
|
|
174
|
+
this.emitLog(options.workspaceId, "info", line);
|
|
175
|
+
if (!portFound) {
|
|
176
|
+
const portMatch = line.match(/opencode server listening on http:\/\/.+:(\d+)/i);
|
|
177
|
+
if (portMatch) {
|
|
178
|
+
portFound = true;
|
|
179
|
+
stopWarningTimer();
|
|
180
|
+
child.removeListener("error", handleError);
|
|
181
|
+
const port = parseInt(portMatch[1], 10);
|
|
182
|
+
this.logger.info({ workspaceId: options.workspaceId, port }, "Workspace runtime allocated port");
|
|
183
|
+
resolve({ pid: child.pid, port, exitPromise, getLastOutput });
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
});
|
|
188
|
+
child.stderr?.on("data", (data) => {
|
|
189
|
+
const text = data.toString();
|
|
190
|
+
stderrBuffer += text;
|
|
191
|
+
const lines = stderrBuffer.split("\n");
|
|
192
|
+
stderrBuffer = lines.pop() ?? "";
|
|
193
|
+
for (const line of lines) {
|
|
194
|
+
const trimmed = line.trim();
|
|
195
|
+
if (!trimmed)
|
|
196
|
+
continue;
|
|
197
|
+
recentStderr.push(trimmed);
|
|
198
|
+
if (recentStderr.length > MAX_OUTPUT_LINES) {
|
|
199
|
+
recentStderr.shift();
|
|
200
|
+
}
|
|
201
|
+
this.emitLog(options.workspaceId, "error", line);
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
async stop(workspaceId) {
|
|
207
|
+
const managed = this.processes.get(workspaceId);
|
|
208
|
+
if (!managed)
|
|
209
|
+
return;
|
|
210
|
+
managed.requestedStop = true;
|
|
211
|
+
const child = managed.child;
|
|
212
|
+
this.logger.info({ workspaceId }, "Stopping OpenCode process");
|
|
213
|
+
const pid = child.pid;
|
|
214
|
+
if (!pid) {
|
|
215
|
+
this.logger.warn({ workspaceId }, "Workspace process missing PID; cannot stop");
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
const isAlreadyExited = () => child.exitCode !== null || child.signalCode !== null;
|
|
219
|
+
const tryKillPosixGroup = (signal) => {
|
|
220
|
+
try {
|
|
221
|
+
// Negative PID targets the process group (POSIX).
|
|
222
|
+
process.kill(-pid, signal);
|
|
223
|
+
return true;
|
|
224
|
+
}
|
|
225
|
+
catch (error) {
|
|
226
|
+
const err = error;
|
|
227
|
+
if (err?.code === "ESRCH") {
|
|
228
|
+
return true;
|
|
229
|
+
}
|
|
230
|
+
this.logger.debug({ workspaceId, pid, err }, "Failed to signal POSIX process group");
|
|
231
|
+
return false;
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
const tryKillSinglePid = (signal) => {
|
|
235
|
+
try {
|
|
236
|
+
process.kill(pid, signal);
|
|
237
|
+
return true;
|
|
238
|
+
}
|
|
239
|
+
catch (error) {
|
|
240
|
+
const err = error;
|
|
241
|
+
if (err?.code === "ESRCH") {
|
|
242
|
+
return true;
|
|
243
|
+
}
|
|
244
|
+
this.logger.debug({ workspaceId, pid, err }, "Failed to signal workspace PID");
|
|
245
|
+
return false;
|
|
246
|
+
}
|
|
247
|
+
};
|
|
248
|
+
const tryTaskkill = (force) => {
|
|
249
|
+
const args = ["/PID", String(pid), "/T"];
|
|
250
|
+
if (force) {
|
|
251
|
+
args.push("/F");
|
|
252
|
+
}
|
|
253
|
+
try {
|
|
254
|
+
const result = spawnSync("taskkill", args, { encoding: "utf8" });
|
|
255
|
+
const exitCode = result.status;
|
|
256
|
+
if (exitCode === 0) {
|
|
257
|
+
return true;
|
|
258
|
+
}
|
|
259
|
+
// If the PID is already gone, treat it as success.
|
|
260
|
+
const stderr = (result.stderr ?? "").toString().toLowerCase();
|
|
261
|
+
const stdout = (result.stdout ?? "").toString().toLowerCase();
|
|
262
|
+
const combined = `${stdout}\n${stderr}`;
|
|
263
|
+
if (combined.includes("not found") || combined.includes("no running instance") || combined.includes("process") && combined.includes("not")) {
|
|
264
|
+
return true;
|
|
265
|
+
}
|
|
266
|
+
this.logger.debug({ workspaceId, pid, exitCode, stderr: result.stderr, stdout: result.stdout }, "taskkill failed");
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
this.logger.debug({ workspaceId, pid, err: error }, "taskkill failed to execute");
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
};
|
|
274
|
+
const sendStopSignal = (signal) => {
|
|
275
|
+
if (process.platform === "win32") {
|
|
276
|
+
// Best-effort: terminate the whole process tree rooted at pid.
|
|
277
|
+
// Use /F only for escalation.
|
|
278
|
+
tryTaskkill(signal === "SIGKILL");
|
|
279
|
+
return;
|
|
280
|
+
}
|
|
281
|
+
// Prefer process-group signaling so wrapper launchers (bun/node) don't orphan the real server.
|
|
282
|
+
const groupOk = tryKillPosixGroup(signal);
|
|
283
|
+
if (!groupOk) {
|
|
284
|
+
// Fallback to direct PID kill.
|
|
285
|
+
tryKillSinglePid(signal);
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
await new Promise((resolve, reject) => {
|
|
289
|
+
let escalationTimer = null;
|
|
290
|
+
const cleanup = () => {
|
|
291
|
+
child.removeListener("exit", onExit);
|
|
292
|
+
child.removeListener("error", onError);
|
|
293
|
+
if (escalationTimer) {
|
|
294
|
+
clearTimeout(escalationTimer);
|
|
295
|
+
escalationTimer = null;
|
|
296
|
+
}
|
|
297
|
+
};
|
|
298
|
+
const onExit = () => {
|
|
299
|
+
cleanup();
|
|
300
|
+
resolve();
|
|
301
|
+
};
|
|
302
|
+
const onError = (error) => {
|
|
303
|
+
cleanup();
|
|
304
|
+
reject(error);
|
|
305
|
+
};
|
|
306
|
+
if (isAlreadyExited()) {
|
|
307
|
+
this.logger.debug({ workspaceId, exitCode: child.exitCode, signal: child.signalCode }, "Process already exited");
|
|
308
|
+
cleanup();
|
|
309
|
+
resolve();
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
child.once("exit", onExit);
|
|
313
|
+
child.once("error", onError);
|
|
314
|
+
this.logger.debug({ workspaceId, pid, detached: process.platform !== "win32" }, "Sending SIGTERM to workspace process (tree/group)");
|
|
315
|
+
sendStopSignal("SIGTERM");
|
|
316
|
+
escalationTimer = setTimeout(() => {
|
|
317
|
+
escalationTimer = null;
|
|
318
|
+
if (isAlreadyExited()) {
|
|
319
|
+
this.logger.debug({ workspaceId, pid }, "Workspace exited before SIGKILL escalation");
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
this.logger.warn({ workspaceId, pid }, "Process did not stop after SIGTERM, escalating");
|
|
323
|
+
sendStopSignal("SIGKILL");
|
|
324
|
+
}, 2000);
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
emitLog(workspaceId, level, message) {
|
|
328
|
+
const entry = {
|
|
329
|
+
workspaceId,
|
|
330
|
+
timestamp: new Date().toISOString(),
|
|
331
|
+
level,
|
|
332
|
+
message: message.trim(),
|
|
333
|
+
};
|
|
334
|
+
this.eventBus.publish({ type: "workspace.log", entry });
|
|
335
|
+
}
|
|
336
|
+
validateFolder(folder) {
|
|
337
|
+
const resolved = path.resolve(folder);
|
|
338
|
+
if (!existsSync(resolved)) {
|
|
339
|
+
throw new Error(`Folder does not exist: ${resolved}`);
|
|
340
|
+
}
|
|
341
|
+
const stats = statSync(resolved);
|
|
342
|
+
if (!stats.isDirectory()) {
|
|
343
|
+
throw new Error(`Path is not a directory: ${resolved}`);
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import fs from "fs";
|
|
2
|
+
import { promises as fsp } from "fs";
|
|
3
|
+
import path from "path";
|
|
4
|
+
import { resolveRepoRoot } from "./git-worktrees";
|
|
5
|
+
const DEFAULT_MAP = {
|
|
6
|
+
version: 1,
|
|
7
|
+
defaultWorktreeSlug: "root",
|
|
8
|
+
parentSessionWorktreeSlug: {},
|
|
9
|
+
};
|
|
10
|
+
function getMapPath(repoRoot) {
|
|
11
|
+
return path.join(repoRoot, ".codenomad", "worktreeMap.json");
|
|
12
|
+
}
|
|
13
|
+
function getGitExcludePath(repoRoot) {
|
|
14
|
+
return path.join(repoRoot, ".git", "info", "exclude");
|
|
15
|
+
}
|
|
16
|
+
async function ensureGitExclude(repoRoot, logger) {
|
|
17
|
+
const excludePath = getGitExcludePath(repoRoot);
|
|
18
|
+
try {
|
|
19
|
+
await fsp.mkdir(path.dirname(excludePath), { recursive: true });
|
|
20
|
+
}
|
|
21
|
+
catch {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const entries = [
|
|
25
|
+
".codenomad/worktrees/",
|
|
26
|
+
".codenomad/worktreeMap.json",
|
|
27
|
+
];
|
|
28
|
+
let existing = "";
|
|
29
|
+
try {
|
|
30
|
+
existing = await fsp.readFile(excludePath, "utf-8");
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
const code = error.code;
|
|
34
|
+
if (code !== "ENOENT") {
|
|
35
|
+
logger?.debug?.({ err: error, excludePath }, "Failed to read .git/info/exclude");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
existing = "";
|
|
39
|
+
}
|
|
40
|
+
const lines = new Set(existing.split(/\r?\n/).map((l) => l.trim()).filter(Boolean));
|
|
41
|
+
const missing = entries.filter((e) => !lines.has(e));
|
|
42
|
+
if (missing.length === 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
const header = existing.includes("# codenomad") ? "" : (existing.trim() ? "\n" : "") + "# codenomad\n";
|
|
46
|
+
const suffix = missing.map((e) => `${e}\n`).join("");
|
|
47
|
+
await fsp.writeFile(excludePath, `${existing}${header}${suffix}`, "utf-8");
|
|
48
|
+
}
|
|
49
|
+
export async function ensureCodenomadGitExclude(workspaceFolder, logger) {
|
|
50
|
+
const { repoRoot, isGitRepo } = await resolveRepoRoot(workspaceFolder, logger);
|
|
51
|
+
if (!isGitRepo) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
await ensureGitExclude(repoRoot, logger);
|
|
55
|
+
}
|
|
56
|
+
export async function readWorktreeMap(workspaceFolder, logger) {
|
|
57
|
+
const { repoRoot, isGitRepo } = await resolveRepoRoot(workspaceFolder, logger);
|
|
58
|
+
const filePath = getMapPath(repoRoot);
|
|
59
|
+
try {
|
|
60
|
+
const raw = await fsp.readFile(filePath, "utf-8");
|
|
61
|
+
const parsed = JSON.parse(raw);
|
|
62
|
+
if (!parsed || typeof parsed !== "object") {
|
|
63
|
+
return DEFAULT_MAP;
|
|
64
|
+
}
|
|
65
|
+
const version = parsed.version;
|
|
66
|
+
if (version !== 1) {
|
|
67
|
+
return DEFAULT_MAP;
|
|
68
|
+
}
|
|
69
|
+
const defaultWorktreeSlug = typeof parsed.defaultWorktreeSlug === "string" ? parsed.defaultWorktreeSlug : "root";
|
|
70
|
+
const parentSessionWorktreeSlug = parsed.parentSessionWorktreeSlug;
|
|
71
|
+
const mapping = parentSessionWorktreeSlug && typeof parentSessionWorktreeSlug === "object" ? parentSessionWorktreeSlug : {};
|
|
72
|
+
return {
|
|
73
|
+
version: 1,
|
|
74
|
+
defaultWorktreeSlug,
|
|
75
|
+
parentSessionWorktreeSlug: { ...mapping },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
catch (error) {
|
|
79
|
+
const code = error.code;
|
|
80
|
+
if (code === "ENOENT") {
|
|
81
|
+
if (isGitRepo) {
|
|
82
|
+
// Best-effort ignore setup on first use.
|
|
83
|
+
await ensureGitExclude(repoRoot, logger).catch(() => undefined);
|
|
84
|
+
}
|
|
85
|
+
return DEFAULT_MAP;
|
|
86
|
+
}
|
|
87
|
+
logger?.warn?.({ err: error, filePath }, "Failed to read worktree map");
|
|
88
|
+
return DEFAULT_MAP;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
export async function writeWorktreeMap(workspaceFolder, next, logger) {
|
|
92
|
+
const { repoRoot, isGitRepo } = await resolveRepoRoot(workspaceFolder, logger);
|
|
93
|
+
const filePath = getMapPath(repoRoot);
|
|
94
|
+
await fsp.mkdir(path.dirname(filePath), { recursive: true });
|
|
95
|
+
// Ensure ignore rules are present (local-only).
|
|
96
|
+
if (isGitRepo) {
|
|
97
|
+
await ensureGitExclude(repoRoot, logger).catch(() => undefined);
|
|
98
|
+
}
|
|
99
|
+
const payload = {
|
|
100
|
+
version: 1,
|
|
101
|
+
defaultWorktreeSlug: next.defaultWorktreeSlug || "root",
|
|
102
|
+
parentSessionWorktreeSlug: next.parentSessionWorktreeSlug ?? {},
|
|
103
|
+
};
|
|
104
|
+
// Write atomically.
|
|
105
|
+
const tmpPath = `${filePath}.${process.pid}.tmp`;
|
|
106
|
+
await fsp.writeFile(tmpPath, JSON.stringify(payload, null, 2), "utf-8");
|
|
107
|
+
await fsp.rename(tmpPath, filePath);
|
|
108
|
+
}
|
|
109
|
+
export function worktreeMapExists(repoRoot) {
|
|
110
|
+
try {
|
|
111
|
+
return fs.existsSync(getMapPath(repoRoot));
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@neuralnomads/codenomad-dev",
|
|
3
|
+
"version": "0.10.3-dev-20260213-ba418a85",
|
|
4
|
+
"description": "CodeNomad Server",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Neural Nomads",
|
|
8
|
+
"email": "codenomad@neuralnomads.ai"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/NeuralNomadsAI/CodeNomad.git"
|
|
13
|
+
},
|
|
14
|
+
"type": "module",
|
|
15
|
+
"main": "dist/index.js",
|
|
16
|
+
"bin": {
|
|
17
|
+
"codenomad": "dist/bin.js"
|
|
18
|
+
},
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "npm run build:ui && npm run prepare-ui && tsc -p tsconfig.json && node ./scripts/copy-auth-pages.mjs && npm run prepare-config",
|
|
21
|
+
"build:ui": "npm run build --prefix ../ui",
|
|
22
|
+
"prepare-ui": "node ./scripts/copy-ui-dist.mjs",
|
|
23
|
+
"prepare-config": "node ./scripts/copy-opencode-config.mjs",
|
|
24
|
+
"dev": "cross-env CODENOMAD_DEV=1 CODENOMAD_SERVER_PASSWORD=codenomad-dev CLI_UI_DEV_SERVER=http://localhost:3000 CLI_HTTPS=false CLI_HTTP=true tsx src/index.ts",
|
|
25
|
+
"typecheck": "tsc --noEmit -p tsconfig.json"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@fastify/cors": "^8.5.0",
|
|
29
|
+
"@fastify/reply-from": "^9.8.0",
|
|
30
|
+
"@fastify/static": "^7.0.4",
|
|
31
|
+
"commander": "^12.1.0",
|
|
32
|
+
"fastify": "^4.28.1",
|
|
33
|
+
"fuzzysort": "^2.0.4",
|
|
34
|
+
"node-forge": "^1.3.3",
|
|
35
|
+
"pino": "^9.4.0",
|
|
36
|
+
"undici": "^6.19.8",
|
|
37
|
+
"yaml": "^2.4.2",
|
|
38
|
+
"yauzl": "^2.10.0",
|
|
39
|
+
"zod": "^3.23.8"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@types/node-forge": "^1.3.14",
|
|
43
|
+
"@types/yauzl": "^2.10.0",
|
|
44
|
+
"cross-env": "^7.0.3",
|
|
45
|
+
"ts-node": "^10.9.2",
|
|
46
|
+
"tsx": "^4.20.6",
|
|
47
|
+
"typescript": "^5.6.3"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse('{"displayName":"ABAP","fileTypes":["abap","ABAP"],"foldingStartMarker":"/\\\\*\\\\*|\\\\{\\\\s*$","foldingStopMarker":"\\\\*\\\\*/|^\\\\s*}","name":"abap","patterns":[{"captures":{"1":{"name":"punctuation.definition.comment.abap"}},"match":"^\\\\*.*\\\\n?","name":"comment.line.full.abap"},{"captures":{"1":{"name":"punctuation.definition.comment.abap"}},"match":"\\".*\\\\n?","name":"comment.line.partial.abap"},{"match":"(?<!\\\\S)##.*?(?=([,.:\\\\s]))","name":"comment.line.pragma.abap"},{"match":"(?i)(?<=[-~\\\\s])(?<=[-=]>)([/_a-z][/-9_a-z]*)(?=\\\\s+(?:|[-*+/]|&&?)=\\\\s+)","name":"variable.other.abap"},{"match":"\\\\b[0-9]+(\\\\b|[,.])","name":"constant.numeric.abap"},{"match":"(?i)(^|\\\\s+)((P(?:UBLIC|RIVATE|ROTECTED))\\\\sSECTION)(?=\\\\s+|[.:])","name":"storage.modifier.class.abap"},{"begin":"(?<!\\\\\\\\)(\\\\|)(.*?)","beginCaptures":{"1":{"name":"constant.character.escape.abap"}},"end":"(?<!\\\\\\\\)(\\\\||(\\\\\\\\\\\\\\\\\\\\|))","endCaptures":{"1":{"name":"constant.character.escape.abap"}},"name":"string.interpolated.abap","patterns":[{"match":"(\\\\{ )|( })","name":"constant.character.escape"},{"match":"\\\\\\\\\\\\|","name":"constant.character.escape.abap"},{"match":"(?i)(?<=\\\\s)(align|alpha|case|country|currency|date|decimals|exponent|number|pad|sign|style|time|timestamp|timezone|width|xsd|zero)(?=\\\\s=)","name":"entity.name.property.stringtemplate.abap"},{"match":"(?i)(?<==\\\\s)(center|engineering|environment|in|iso|left|leftplus|leftspace|lower|no|out|raw|right|rightplus|rightspace|scale_preserving|scale_preserving_scientific|scientific|scientific_with_leading_zero|sign_as_postfix|simple|space|upper|user|yes)(?=\\\\s)","name":"entity.value.property.stringtemplate.abap"}]},{"begin":"\'","end":"\'","name":"string.quoted.single.abap","patterns":[{"match":"\'\'","name":"constant.character.escape.abap"}]},{"begin":"`","end":"`","name":"string.quoted.single.abap","patterns":[{"match":"``","name":"constant.character.escape.abap"}]},{"begin":"(?i)^\\\\s*(class)\\\\s([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.block.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","name":"meta.block.begin.implementation.abap","patterns":[{"match":"(?i)(^|\\\\s+)(definition|implementation|public|inheriting\\\\s+from|final|deferred|abstract|shared\\\\s+memory\\\\s+enabled|(global|local)*\\\\s*friends|(create\\\\s+(p(?:ublic|rotected|rivate)))|for\\\\s+behavior\\\\s+of|for\\\\s+testing|risk\\\\s+level\\\\s+(critical|dangerous|harmless))|duration\\\\s(short|medium|long)(?=\\\\s+|\\\\.)","name":"storage.modifier.class.abap"},{"begin":"(?=[A-Z_a-z][0-9A-Z_a-z]*)","contentName":"entity.name.type.block.abap","end":"(?![0-9A-Z_a-z])","patterns":[{"include":"#generic_names"}]}]},{"begin":"(?i)^\\\\s*(method)\\\\s(?:([/_a-z][/-9_a-z]*)~)?([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"},"3":{"name":"entity.name.function.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(BY(?:\\\\s+DATABASE(\\\\s+PROCEDURE|\\\\s+FUNCTION|\\\\s+GRAPH\\\\s+WORKSPACE)|\\\\s+KERNEL\\\\s+MODULE))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=^|\\\\s)(FOR\\\\s+(HDB|LLANG))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=\\\\s)(OPTIONS\\\\s+(READ-ONLY|DETERMINISTIC|SUPPRESS\\\\s+SYNTAX\\\\s+ERRORS))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"match":"(?i)(?<=^|\\\\s)(LANGUAGE\\\\s+(SQLSCRIPT|SQL|GRAPH))(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"},{"captures":{"1":{"name":"storage.modifier.method.abap"}},"match":"(?i)(?<=\\\\s)(USING)\\\\s+([/_a-z][/-9=>_a-z]*)+(?=\\\\s+|\\\\.)"},{"begin":"(?=[A-Z_a-z][0-9A-Z_a-z]*)","end":"(?![0-9A-Z_a-z])","patterns":[{"include":"#generic_names"}]}]},{"begin":"(?i)^\\\\s*(INTERFACE)\\\\s([/_a-z][/-9_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(DEFERRED|PUBLIC)(?=\\\\s+|\\\\.)","name":"storage.modifier.method.abap"}]},{"begin":"(?i)^\\\\s*(FORM)\\\\s([/_a-z][-/-9?_a-z]*)","beginCaptures":{"1":{"name":"storage.type.block.abap"},"2":{"name":"entity.name.type.abap"}},"end":"\\\\s*\\\\.\\\\s*\\\\n?","patterns":[{"match":"(?i)(?<=^|\\\\s)(USING|TABLES|CHANGING|RAISING|IMPLEMENTATION|DEFINITION)(?=\\\\s+|\\\\.)","name":"storage.modifier.form.abap"},{"include":"#abaptypes"},{"include":"#keywords_followed_by_braces"}]},{"match":"(?i)(end(?:class|method|form|interface))","name":"storage.type.block.end.abap"},{"match":"(?i)(<[A-Z_a-z][0-9A-Z_a-z]*>)","name":"variable.other.field.symbol.abap"},{"include":"#keywords"},{"include":"#abap_constants"},{"include":"#reserved_names"},{"include":"#operators"},{"include":"#builtin_functions"},{"include":"#abaptypes"},{"include":"#system_fields"},{"include":"#sql_functions"},{"include":"#sql_types"}],"repository":{"abap_constants":{"match":"(?i)(?<=\\\\s)(initial|null|@?space|@?abap_true|@?abap_false|@?abap_undefined|table_line|%_final|%_hints|%_predefined|col_background|col_group|col_heading|col_key|col_negative|col_normal|col_positive|col_total|adabas|as400|db2|db6|hdb|oracle|sybase|mssqlnt|pos_low|pos_high)(?=[,.\\\\s])","name":"constant.language.abap"},"abaptypes":{"patterns":[{"match":"(?i)\\\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|decfloat|decfloat16|decfloat34|utclong|simple|int8|[cdfinptx])(?=[,.\\\\s])","name":"support.type.abap"},{"match":"(?i)\\\\s(TYPE|REF|TO|LIKE|LINE|OF|STRUCTURE|STANDARD|SORTED|HASHED|INDEX|TABLE|WITH|UNIQUE|NON-UNIQUE|SECONDARY|DEFAULT|KEY)(?=[,.\\\\s])","name":"keyword.control.simple.abap"}]},"arithmetic_operator":{"match":"(?i)(?<=\\\\s)([-*+]|\\\\*\\\\*|[%/]|DIV|MOD|BIT-AND|BIT-OR|BIT-XOR|BIT-NOT)(?=\\\\s)","name":"keyword.control.simple.abap"},"builtin_functions":{"match":"(?i)(?<=\\\\s)(abs|sign|ceil|floor|trunc|frac|acos|asin|atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt|strlen|xstrlen|charlen|lines|numofchar|dbmaxlen|round|rescale|nmax|nmin|cmax|cmin|boolc|boolx|xsdbool|contains|contains_any_of|contains_any_not_of|matches|line_exists|ipow|char_off|count|count_any_of|count_any_not_of|distance|condense|concat_lines_of|escape|find|find_end|find_any_of|find_any_not_of|insert|match|repeat|replace|reverse|segment|shift_left|shift_right|substring|substring_after|substring_from|substring_before|substring_to|to_upper|to_lower|to_mixed|from_mixed|translate|bit-set|line_index)(?=\\\\()","name":"entity.name.function.builtin.abap"},"comparison_operator":{"match":"(?i)(?<=\\\\s)([<>]|<=|>=|=|<>|eq|ne|lt|le|gt|ge|cs|cp|co|cn|ca|na|ns|np|byte-co|byte-cn|byte-ca|byte-na|byte-cs|byte-ns|[moz])(?=\\\\s)","name":"keyword.control.simple.abap"},"control_keywords":{"match":"(?i)(^|\\\\s)(at|case|catch|continue|do|elseif|else|endat|endcase|endcatch|enddo|endif|endloop|endon|endtry|endwhile|if|loop|on|raise|try|while)(?=[.:\\\\s])","name":"keyword.control.flow.abap"},"generic_names":{"match":"[A-Z_a-z][0-9A-Z_a-z]*"},"keywords":{"patterns":[{"include":"#main_keywords"},{"include":"#text_symbols"},{"include":"#control_keywords"},{"include":"#keywords_followed_by_braces"}]},"keywords_followed_by_braces":{"captures":{"1":{"name":"keyword.control.simple.abap"},"2":{"name":"variable.other.abap"}},"match":"(?i)\\\\b(data|value|field-symbol|final|reference|resumable)\\\\((<?[/_a-z][/-9_a-z]*>?)\\\\)"},"logical_operator":{"match":"(?i)(?<=\\\\s)(not|or|and)(?=\\\\s)","name":"keyword.control.simple.abap"},"main_keywords":{"match":"(?i)(?<=^|\\\\s)(abap-source|abstract|accept|accepting|access|according|action|activation|actual|add|add-corresponding|adjacent|after|alias|aliases|all|allocate|amdp|analysis|analyzer|append|appending|application|archive|area|arithmetic|as|ascending|assert|assign|assigned|assigning|association|asynchronous|at|attributes|authority|authority-check|authorization|auto|back|background|backward|badi|base|before|begin|behavior|between|binary|bit|blanks??|blocks??|bound|boundaries|bounds|boxed|break|break-point|buffer|by|bypassing|byte|byte-order|call|calling|cast|casting|cds|centered|change|changing|channels|char-to-hex|character|check|checkbox|cid|circular|class|class-data|class-events|class-methods??|class-pool|cleanup|clear|clients??|clock|clone|close|cnt|code|collect|color|column|comments??|commit|common|communication|comparing|components??|compression|compute|concatenate|cond|condense|condition|connection|constants??|contexts??|controls??|conv|conversion|convert|copy|corresponding|count|country|cover|create|currency|current|cursor|customer-function|data|database|datainfo|dataset|date|daylight|ddl|deallocate|decimals|declarations|deep|default|deferred|define|delete|deleting|demand|descending|describe|destination|detail|determine|dialog|did|directory|discarding|display|display-mode|distance|distinct|divide|divide-corresponding|dummy|duplicates??|duration|during|dynpro|edit|editor-call|empty|enabled|enabling|encoding|end|end-enhancement-section|end-of-definition|end-of-page|end-of-selection|end-test-injection|end-test-seam|endenhancement|endexec|endfunction|endian|ending|endmodule|endprovide|endselect|endwith|enhancement|enhancement-point|enhancement-section|enhancements|entities|entity|entries|entry|enum|equiv|errors|escape|escaping|events??|exact|except|exception|exception-table|exceptions|excluding|exec|execute|exists|exit|exit-command|expanding|explicit|exponent|export|exporting|extended|extension|extract|fail|failed|features|fetch|field|field-groups|field-symbols|fields|file|fill|filters??|final|find|first|first-line|fixed-point|flush|following|for|format|forward|found|frames??|free|from|full|function|function-pool|generate|get|giving|graph|groups??|handler??|hashed|having|headers??|heading|help-id|help-request|hide|hint|hold|hotspot|icon|id|identification|identifier|ignore|ignoring|immediately|implemented|implicit|import|importing|in|inactive|incl|includes??|including|increment|index|index-line|indicators|infotypes|inheriting|init|initial|initialization|inner|input|insert|instances??|intensified|interface|interface-pool|interfaces|internal|intervals|into|inverse|inverted-date|is|job|join|keep|keeping|kernel|keys??|keywords|kind|language|last|late|layout|leading|leave|left|left-justified|legacy|length|let|levels??|like|line|line-count|line-selection|line-size|linefeed|lines|link|list|list-processing|listbox|load|load-of-program|locale??|locks??|log-point|logical|lower|mapped|mapping|margin|mark|mask|match|matchcode|maximum|members|memory|mesh|message|message-id|messages|messaging|methods??|mode|modif|modifier|modify|module|move|move-corresponding|multiply|multiply-corresponding|name|nametab|native|nested|nesting|new|new-line|new-page|new-section|next|no-display|no-extension|no-gaps??|no-grouping|no-heading|no-scrolling|no-sign|no-title|no-zero|nodes|non-unicode|non-unique|number|objects??|objmgr|obligatory|occurences??|occurrences??|occurs|of|offset|on|only|open|optional|options??|order|others|out|outer|output|output-length|overflow|overlay|pack|package|padding|page|parameter|parameter-table|parameters|part|partially|pcre|perform|performing|permissions|pf-status|places|pool|position|pragmas|preceding|precompiled|preferred|preserving|primary|print|print-control|private|privileged|procedure|process|program|property|protected|provide|push|pushbutton|put|query|queue-only|queueonly|quickinfo|radiobutton|raising|ranges??|read|read-only|received??|receiving|redefinition|reduce|ref|reference|refresh|regex|reject|renaming|replace|replacement|replacing|report|reported|request|requested|required|reserve|reset|resolution|respecting|response|restore|results??|resumable|resume|retry|return|returning|right|right-justified|rollback|rows|rp-provide-from-last|run|sap|sap-spool|save|saving|scan|screen|scroll|scroll-boundary|scrolling|search|seconds|section|select|select-options|selection|selection-screen|selection-sets??|selection-table|selections|send|separated??|session|set|shared|shift|shortdump|shortdump-id|sign|simple|simulation|single|size|skip|skipping|smart|some|sort|sortable|sorted|source|specified|split|spool|spots|sql|stable|stamp|standard|start-of-selection|starting|state|statements??|statics??|statusinfo|step|step-loop|stop|structures??|style|subkey|submatches|submit|subroutine|subscreen|substring|subtract|subtract-corresponding|suffix|sum|summary|supplied|supply|suppress|switch|symbol|syntax-check|syntax-trace|system-call|system-exceptions|tab|tabbed|tables??|tableview|tabstrip|target|tasks??|test|test-injection|test-seam|testing|text|textpool|then|throw|times??|title|titlebar|to|tokens|top-lines|top-of-page|trace-file|trace-table|trailing|transaction|transfer|transformation|translate|transporting|trmac|truncate|truncation|type|type-pools??|types|uline|unassign|unbounded|under|unicode|union|unique|unit|unix|unpack|until|unwind|up|update|upper|user|user-command|using|utf-8|uuid|valid|validate|value|value-request|values|vary|varying|version|via|visible|wait|when|where|windows??|with|with-heading|with-title|without|word|work|workspace|write|xml|zone)(?=[,.:\\\\s])","name":"keyword.control.simple.abap"},"operators":{"patterns":[{"include":"#other_operator"},{"include":"#arithmetic_operator"},{"include":"#comparison_operator"},{"include":"#logical_operator"}]},"other_operator":{"match":"(?<=\\\\s)(&&?|\\\\?=|\\\\+=|-=|/=|\\\\*=|&&=|&=)(?=\\\\s)","name":"keyword.control.simple.abap"},"reserved_names":{"match":"(?i)(?<=\\\\s)(me|super)(?=[,.\\\\s]|->)","name":"constant.language.abap"},"sql_functions":{"match":"(?i)(?<=\\\\s)(abap_system_timezone|abap_user_timezone|abs|add_days|add_months|allow_precision_loss|as_geo_json|avg|bintohex|cast|ceil|coalesce|concat_with_space|concat|corr_spearman|corr|count|currency_conversion|datn_add_days|datn_add_months|datn_days_between|dats_add_days|dats_add_months|dats_days_between|dats_from_datn|dats_is_valid|dats_tims_to_tstmp|dats_to_datn|dayname|days_between|dense_rank|division|div|extract_day|extract_hour|extract_minute|extract_month|extract_second|extract_year|first_value|floor|grouping|hextobin|initcap|instr|is_valid|lag|last_value|lead|left|length|like_regexpr|locate_regexpr_after|locate_regexpr|locate|lower|lpad|ltrim|max|median|min|mod|monthname|ntile|occurrences_regexpr|over|product|rank|replace_regexpr|replace|rigth|round|row_number|rpad|rtrim|stddev|string_agg|substring_regexpr|substring|sum|tims_from_timn|tims_is_valid|tims_to_timn|to_blob|to_clob|tstmp_add_seconds|tstmp_current_utctimestamp|tstmp_is_valid|tstmp_seconds_between|tstmp_to_dats|tstmp_to_dst|tstmp_to_tims|tstmpl_from_utcl|tstmpl_to_utcl|unit_conversion|upper|utcl_add_seconds|utcl_current|utcl_seconds_between|uuid|var|weekday)(?=\\\\()","name":"entity.name.function.sql.abap"},"sql_types":{"match":"(?i)(?<=\\\\s)(char|clnt|cuky|curr|datn|dats|dec|decfloat16|decfloat34|fltp|int1|int2|int4|int8|lang|numc|quan|raw|sstring|timn|tims|unit|utclong)(?=[()\\\\s])","name":"entity.name.type.sql.abap"},"system_fields":{"captures":{"1":{"name":"variable.language.abap"},"2":{"name":"variable.language.abap"}},"match":"(?i)\\\\b(sy)-(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgli|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=[.\\\\s])"},"text_symbols":{"captures":{"1":{"name":"keyword.control.simple.abap"},"2":{"name":"constant.numeric.abap"}},"match":"(?i)(?<=^|\\\\s)(text)-([0-9A-Z]{1,3})(?=[,.:\\\\s])"}},"scopeName":"source.abap"}')),a=[e];export{a as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=Object.freeze(JSON.parse(`{"displayName":"ActionScript","fileTypes":["as"],"name":"actionscript-3","patterns":[{"include":"#comments"},{"include":"#package"},{"include":"#class"},{"include":"#interface"},{"include":"#namespace_declaration"},{"include":"#import"},{"include":"#mxml"},{"include":"#strings"},{"include":"#regexp"},{"include":"#variable_declaration"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#logical_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#control_keywords"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#functions"}],"repository":{"arithmetic_operators":{"match":"([-%+/]|(?<!:)\\\\*)","name":"keyword.operator.actionscript.3"},"array_access_operators":{"match":"([]\\\\[])","name":"keyword.operator.actionscript.3"},"class":{"begin":"(^|\\\\s+|;)(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(\\\\b(internal|public)\\\\b\\\\s+)?(\\\\b(dynamic|final|abstract)\\\\b\\\\s+)?(?=\\\\bclass\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"},"5":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"}},"end":"}","name":"meta.class.actionscript.3","patterns":[{"include":"#class_declaration"},{"include":"#metadata"},{"include":"#method"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#other_operators"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#arithmetic_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#variable_declaration"},{"include":"#object_literal"}]},"class_declaration":{"begin":"\\\\b(class)\\\\b\\\\s+([$.0-9A-Z_a-z]+|\\\\*)","beginCaptures":{"1":{"name":"storage.type.class.actionscript.3"},"2":{"name":"entity.name.class.actionscript.3"}},"end":"\\\\{","name":"meta.class_declaration.actionscript.3","patterns":[{"include":"#extends"},{"include":"#implements"},{"include":"#comments"}]},"code_block":{"begin":"\\\\{","end":"}","name":"meta.code_block.actionscript.3","patterns":[{"include":"#code_block"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#variable_declaration"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#logical_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#control_keywords"},{"include":"#other_keywords"},{"include":"#use_namespace"},{"include":"#functions"},{"include":"#import"}]},"comments":{"patterns":[{"begin":"/\\\\*\\\\*(?!/)","end":"\\\\*/","name":"comment.block.documentation.actionscript.3","patterns":[{"match":"@(copy|default|eventType|example|exampleText|includeExample|inheritDoc|internal|param|private|return|see|since|throws)\\\\b","name":"keyword.other.documentation.actionscript.3.asdoc"}]},{"begin":"/\\\\*","end":"\\\\*/","name":"comment.block.actionscript.3"},{"match":"//.*","name":"comment.line.actionscript.3"}]},"control_keywords":{"match":"\\\\b(if|else|do|while|for|each|continue|return|switch|case|default|break|try|catch|finally|throw|with)\\\\b","name":"keyword.control.actionscript.3"},"dynamic_type":{"captures":{"1":{"name":"support.type.actionscript.3"}},"match":"(?<=:)\\\\s*(\\\\*)"},"escapes":{"match":"\\\\\\\\(x\\\\h{2}|[012][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)","name":"constant.character.escape.actionscript.3"},"extends":{"captures":{"1":{"name":"keyword.other.actionscript.3"},"2":{"name":"entity.other.inherited-class.actionscript.3"},"3":{"name":"entity.other.inherited-class.actionscript.3"}},"match":"\\\\b(extends)\\\\b\\\\s+([$.0-9A-Z_a-z]+)\\\\s*(?:,\\\\s*([$.0-9A-Z_a-z]+))*\\\\s*","name":"meta.extends.actionscript.3"},"function_arguments":{"begin":"\\\\(","end":"\\\\)","name":"meta.function_arguments.actionscript.3","patterns":[{"include":"#parameters"},{"include":"#comments"}]},"functions":{"begin":"\\\\b(function)\\\\b(?:\\\\s+\\\\b([gs]et)\\\\b\\\\s+)?\\\\s*([$0-9A-Z_a-z]+\\\\b)?","beginCaptures":{"1":{"name":"storage.type.function.actionscript.3"},"2":{"name":"storage.modifier.actionscript.3"},"3":{"name":"entity.name.function.actionscript.3"}},"end":"($|;|(?=\\\\{))","name":"meta.function.actionscript.3","patterns":[{"include":"#function_arguments"},{"include":"#return_type"},{"include":"#comments"}]},"guess_constant":{"captures":{"1":{"name":"constant.other.actionscript.3"}},"match":"\\\\b([$A-Z][0-9A-Z_]+)\\\\b"},"guess_type":{"captures":{"1":{"name":"support.type.actionscript.3"}},"match":"\\\\b((?:[$0-9A-Z_a-z]+\\\\.)*[A-Z][0-9A-Z]*[a-z]+[$0-9A-Z_a-z]*)\\\\b"},"implements":{"captures":{"1":{"name":"keyword.other.actionscript.3"},"2":{"name":"entity.other.inherited-class.actionscript.3"},"3":{"name":"entity.other.inherited-class.actionscript.3"}},"match":"\\\\b(implements)\\\\b\\\\s+([$.0-9A-Z_a-z]+)\\\\s*(?:,\\\\s*([$.0-9A-Z_a-z]+))*\\\\s*","name":"meta.implements.actionscript.3"},"import":{"captures":{"2":{"name":"keyword.control.import.actionscript.3"},"3":{"name":"support.type.actionscript.3"}},"match":"(^|\\\\s+|;)\\\\b(import)\\\\b\\\\s+([$.0-9A-Z_a-z]+(?:\\\\.\\\\*)?)\\\\s*(?=;|$)","name":"meta.import.actionscript.3"},"interface":{"begin":"(^|\\\\s+|;)(\\\\b(internal|public)\\\\b\\\\s+)?(?=\\\\binterface\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"}},"end":"}","name":"meta.interface.actionscript.3","patterns":[{"include":"#interface_declaration"},{"include":"#metadata"},{"include":"#functions"},{"include":"#comments"}]},"interface_declaration":{"begin":"\\\\b(interface)\\\\b\\\\s+([$.0-9A-Z_a-z]+)","beginCaptures":{"1":{"name":"storage.type.interface.actionscript.3"},"2":{"name":"entity.name.class.actionscript.3"}},"end":"\\\\{","name":"meta.class_declaration.actionscript.3","patterns":[{"include":"#extends"},{"include":"#comments"}]},"language_constants":{"match":"\\\\b(true|false|null|Infinity|-Infinity|NaN|undefined)\\\\b","name":"constant.language.actionscript.3"},"language_variables":{"match":"\\\\b(super|this|arguments)\\\\b","name":"variable.language.actionscript.3"},"logical_operators":{"match":"([!\\\\&<>?^|~])","name":"keyword.operator.actionscript.3"},"metadata":{"begin":"(?<=(?:^|[;{}]|\\\\*/)\\\\s*)\\\\[\\\\s*\\\\b([$A-Z_a-z][$0-9A-Z_a-z]+)\\\\b","beginCaptures":{"1":{"name":"keyword.other.actionscript.3"}},"end":"]","name":"meta.metadata_info.actionscript.3","patterns":[{"include":"#metadata_info"}]},"metadata_info":{"begin":"\\\\(","end":"\\\\)","patterns":[{"include":"#strings"},{"captures":{"1":{"name":"variable.parameter.actionscript.3"},"2":{"name":"keyword.operator.actionscript.3"}},"match":"(\\\\w+)\\\\s*(=)"}]},"method":{"begin":"(^|\\\\s+)((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?((\\\\w+)\\\\s+)?(?=\\\\bfunction\\\\b)","beginCaptures":{"3":{"name":"storage.modifier.actionscript.3"},"5":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"},"8":{"name":"storage.modifier.actionscript.3"}},"end":"(?<=([;}]))","name":"meta.method.actionscript.3","patterns":[{"include":"#functions"},{"include":"#code_block"}]},"mxml":{"begin":"<!\\\\[CDATA\\\\[","end":"]]>","name":"meta.cdata.actionscript.3","patterns":[{"include":"#comments"},{"include":"#import"},{"include":"#metadata"},{"include":"#class"},{"include":"#namespace_declaration"},{"include":"#use_namespace"},{"include":"#class_declaration"},{"include":"#method"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#other_keywords"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#other_operators"},{"include":"#arithmetic_operators"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#variable_declaration"}]},"namespace_declaration":{"captures":{"2":{"name":"storage.modifier.actionscript.3"},"3":{"name":"storage.modifier.actionscript.3"}},"match":"((\\\\w+)\\\\s+)?(namespace)\\\\s+[$0-9A-Z_a-z]+","name":"meta.namespace_declaration.actionscript.3"},"numbers":{"match":"\\\\b((0([Xx])\\\\h*)|(([0-9]+\\\\.?[0-9]*)|(\\\\.[0-9]+))(([Ee])([-+])?[0-9]+)?)([Ll]|UL|ul|[FUfu])?\\\\b","name":"constant.numeric.actionscript.3"},"object_literal":{"begin":"\\\\{","end":"}","name":"meta.object_literal.actionscript.3","patterns":[{"include":"#object_literal"},{"include":"#comments"},{"include":"#strings"},{"include":"#regexp"},{"include":"#numbers"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#primitive_functions"},{"include":"#language_constants"},{"include":"#language_variables"},{"include":"#guess_type"},{"include":"#guess_constant"},{"include":"#array_access_operators"},{"include":"#vector_creation_operators"},{"include":"#functions"}]},"other_keywords":{"match":"\\\\b(as|delete|in|instanceof|is|native|new|to|typeof)\\\\b","name":"keyword.other.actionscript.3"},"other_operators":{"match":"([.=])","name":"keyword.operator.actionscript.3"},"package":{"begin":"(^|\\\\s+)(package)\\\\b","beginCaptures":{"2":{"name":"keyword.other.actionscript.3"}},"end":"}","name":"meta.package.actionscript.3","patterns":[{"include":"#package_name"},{"include":"#variable_declaration"},{"include":"#method"},{"include":"#comments"},{"include":"#return_type"},{"include":"#import"},{"include":"#use_namespace"},{"include":"#strings"},{"include":"#numbers"},{"include":"#language_constants"},{"include":"#metadata"},{"include":"#class"},{"include":"#interface"},{"include":"#namespace_declaration"}]},"package_name":{"begin":"(?<=package)\\\\s+([._\\\\w]*)\\\\b","end":"\\\\{","name":"meta.package_name.actionscript.3"},"parameters":{"begin":"(\\\\.\\\\.\\\\.)?\\\\s*([$A-Z_a-z][$0-9A-Z_a-z]*)(?:\\\\s*(:)\\\\s*(?:([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)(?:\\\\.<([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)>)?|(\\\\*)))?(?:\\\\s*(=))?","beginCaptures":{"1":{"name":"keyword.operator.actionscript.3"},"2":{"name":"variable.parameter.actionscript.3"},"3":{"name":"keyword.operator.actionscript.3"},"4":{"name":"support.type.actionscript.3"},"5":{"name":"support.type.actionscript.3"},"6":{"name":"support.type.actionscript.3"},"7":{"name":"keyword.operator.actionscript.3"}},"end":",|(?=\\\\))","patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#language_constants"},{"include":"#comments"},{"include":"#primitive_types"},{"include":"#primitive_error_types"},{"include":"#dynamic_type"},{"include":"#guess_type"},{"include":"#guess_constant"}]},"primitive_error_types":{"captures":{"1":{"name":"support.class.error.actionscript.3"}},"match":"\\\\b((Argument|Definition|Eval|Internal|Range|Reference|Security|Syntax|Type|URI|Verify)?Error)\\\\b"},"primitive_functions":{"captures":{"1":{"name":"support.function.actionscript.3"}},"match":"\\\\b(decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|isFinite|isNaN|isXMLName|parseFloat|parseInt|trace|unescape)(?=\\\\s*\\\\()"},"primitive_types":{"captures":{"1":{"name":"support.class.builtin.actionscript.3"}},"match":"\\\\b(Array|Boolean|Class|Date|Function|int|JSON|Math|Namespace|Number|Object|QName|RegExp|String|uint|Vector|XML|XMLList|\\\\*(?<=a))\\\\b"},"regexp":{"begin":"(?<=[(,:=\\\\[]|^|return|&&|\\\\|\\\\||!)\\\\s*(/)(?![*+/?{}])","end":"$|(/)[gim]*","name":"string.regex.actionscript.3","patterns":[{"match":"\\\\\\\\.","name":"constant.character.escape.actionscript.3"},{"match":"\\\\[(\\\\\\\\]|[^]])*]","name":"constant.character.class.actionscript.3"}]},"return_type":{"captures":{"1":{"name":"keyword.operator.actionscript.3"},"2":{"name":"support.type.actionscript.3"},"3":{"name":"support.type.actionscript.3"},"4":{"name":"support.type.actionscript.3"}},"match":"(:)\\\\s*([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)(?:\\\\.<([$A-Za-z][$0-9A-Z_a-z]+(?:\\\\.[$A-Za-z][$0-9A-Z_a-z]+)*)>)?|(\\\\*)"},"strings":{"patterns":[{"begin":"@\\"","end":"\\"","name":"string.quoted.verbatim.actionscript.3"},{"begin":"\\"","end":"\\"","name":"string.quoted.double.actionscript.3","patterns":[{"include":"#escapes"}]},{"begin":"'","end":"'","name":"string.quoted.single.actionscript.3","patterns":[{"include":"#escapes"}]}]},"use_namespace":{"captures":{"2":{"name":"keyword.other.actionscript.3"},"3":{"name":"keyword.other.actionscript.3"},"4":{"name":"storage.modifier.actionscript.3"}},"match":"(^|\\\\s+|;)(use\\\\s+)?(namespace)\\\\s+(\\\\w+)\\\\s*(;|$)"},"variable_declaration":{"captures":{"2":{"name":"storage.modifier.actionscript.3"},"4":{"name":"storage.modifier.actionscript.3"},"6":{"name":"storage.modifier.actionscript.3"},"7":{"name":"storage.modifier.actionscript.3"},"8":{"name":"keyword.operator.actionscript.3"}},"match":"((static)\\\\s+)?((\\\\w+)\\\\s+)?((static)\\\\s+)?(const|var)\\\\s+[$0-9A-Z_a-z]+(?:\\\\s*(:))?","name":"meta.variable_declaration.actionscript.3"},"vector_creation_operators":{"match":"([<>])","name":"keyword.operator.actionscript.3"}},"scopeName":"source.actionscript.3"}`)),t=[e];export{t as default};
|