@ai-projector/ide 0.0.0-stage → 0.11.1
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/LICENSE +21 -0
- package/README.md +35 -2
- package/bin/install-desktop +17 -0
- package/bin/install-desktop.cmd +11 -0
- package/bin/projector +22 -0
- package/bin/projector.cmd +11 -0
- package/dist/assets/CodeViewer--WUSmn5i.css +1 -0
- package/dist/assets/CodeViewer-C-C3aibO.js +1 -0
- package/dist/assets/DiscussionView-Cd3exhWx.css +1 -0
- package/dist/assets/DiscussionView-K3YyWE-E.js +2 -0
- package/dist/assets/EditorSettings-DlzJc8cp.js +13 -0
- package/dist/assets/EditorSettings-jSngmpPq.css +1 -0
- package/dist/assets/HtmlViewer-DULKK0_6.js +2 -0
- package/dist/assets/HtmlViewer-XHn9rACG.css +1 -0
- package/dist/assets/ImageViewport-BT_ftU4z.js +1 -0
- package/dist/assets/ImageViewport-JcG9P4B6.css +1 -0
- package/dist/assets/IssueView-ChJFmrTW.js +1 -0
- package/dist/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/assets/MarkdownViewer-C646XbYf.css +1 -0
- package/dist/assets/MarkdownViewer-Dm2MVp3X.js +2 -0
- package/dist/assets/PullRequestView-Cipn5P0H.js +3 -0
- package/dist/assets/PullRequestView-CzZn9mOg.css +1 -0
- package/dist/assets/ReleaseView-Cz6dH4ej.js +2 -0
- package/dist/assets/ReleaseView-VLO9NVfI.css +1 -0
- package/dist/assets/SplitPanes-0-UT7ksm.css +1 -0
- package/dist/assets/SplitPanes-DNDTWIta.js +1 -0
- package/dist/assets/SvgViewer-DP6-1_fw.css +1 -0
- package/dist/assets/SvgViewer-DkoULP8F.js +2 -0
- package/dist/assets/TerminalView-C30_q784.css +1 -0
- package/dist/assets/TerminalView-fWmIbnZn.js +16 -0
- package/dist/assets/TrackerDetail-CBaLycQg.css +1 -0
- package/dist/assets/TrackerDetail-DuzfEwSZ.js +1 -0
- package/dist/assets/UiButton-AkN01P3P.css +1 -0
- package/dist/assets/UiButton-DvucBdmd.js +2 -0
- package/dist/assets/UiPanel-BUDYIo-h.css +1 -0
- package/dist/assets/UiPanel-DtI4DFYT.js +1 -0
- package/dist/assets/UiViewerPage-CMFEzZ2i.css +1 -0
- package/dist/assets/UiViewerPage-aHNgiSjO.js +2 -0
- package/dist/assets/VisualMarkdownEditor-1DNSAYyq.css +1 -0
- package/dist/assets/VisualMarkdownEditor-BHx2olWh.js +1070 -0
- package/dist/assets/_plugin-vue_export-helper-D62Ebo7D.js +3 -0
- package/dist/assets/apl-gfMMiTNf.js +1 -0
- package/dist/assets/asciiarmor-C_eisQCp.js +1 -0
- package/dist/assets/asn1-DCl_8MCW.js +1 -0
- package/dist/assets/asterisk-BEn0Cwpx.js +1 -0
- package/dist/assets/brainfuck-D5EjA2JK.js +1 -0
- package/dist/assets/clike-xvONpD0Z.js +1 -0
- package/dist/assets/clojure-BflJGmDX.js +1 -0
- package/dist/assets/cmake-84nbDH0I.js +1 -0
- package/dist/assets/cobol-DHLQUbN7.js +1 -0
- package/dist/assets/coffeescript-De_zI4J0.js +1 -0
- package/dist/assets/commonlisp-DgAKBe0r.js +1 -0
- package/dist/assets/compiler-dom.esm-bundler-C5a_rSi1.js +9 -0
- package/dist/assets/crystal-Bl6YKCG_.js +1 -0
- package/dist/assets/css-CnaYoQib.js +1 -0
- package/dist/assets/cypher-p9eYesGn.js +1 -0
- package/dist/assets/d-DWkQyNnU.js +1 -0
- package/dist/assets/diff-ChtP43wD.js +1 -0
- package/dist/assets/dist-23D313r2.js +13 -0
- package/dist/assets/dist-9YLT-RM-.js +11 -0
- package/dist/assets/dist-9guQ6tUS.js +1 -0
- package/dist/assets/dist-BA_HKdx1.js +2 -0
- package/dist/assets/dist-BMX-4S0G.js +1 -0
- package/dist/assets/dist-BQmIGtmd.js +6 -0
- package/dist/assets/dist-BVEl6uFx.js +1 -0
- package/dist/assets/dist-BuiJgwGF.js +9 -0
- package/dist/assets/dist-Bzl1vuDO.js +1 -0
- package/dist/assets/dist-C1mn-4rn.js +1 -0
- package/dist/assets/dist-CG79NjMk.js +1 -0
- package/dist/assets/dist-CRLdLpSX.js +2 -0
- package/dist/assets/dist-Coak6JQD.js +1 -0
- package/dist/assets/dist-CpgyHBvu.js +1 -0
- package/dist/assets/dist-CrRIwgTS.js +1 -0
- package/dist/assets/dist-Cu_4z-jQ.js +1 -0
- package/dist/assets/dist-CxoUUhWx.js +1 -0
- package/dist/assets/dist-CzOhSFRQ.js +1 -0
- package/dist/assets/dist-DN5Y0OA5.js +1 -0
- package/dist/assets/dist-Dqsd8MyB.js +1 -0
- package/dist/assets/dist-Dvv0YQ-H.js +23 -0
- package/dist/assets/dist-DzoDV6Eh.js +2 -0
- package/dist/assets/dist-NMUsQt1c.js +1 -0
- package/dist/assets/dist-ZRLBgDFY.js +1 -0
- package/dist/assets/dist-cLGxPfRN.js +1 -0
- package/dist/assets/dist-p1Xy77w3.js +1 -0
- package/dist/assets/dockerfile-DJkHQgkl.js +1 -0
- package/dist/assets/dtd-DTF72YNO.js +1 -0
- package/dist/assets/dylan-S7ucR4pR.js +1 -0
- package/dist/assets/ebnf-D4c0_ac3.js +1 -0
- package/dist/assets/ecl-BVIeWmwY.js +1 -0
- package/dist/assets/editor-theme-ClBxXjSu.js +1 -0
- package/dist/assets/eiffel-BEjRio4Q.js +1 -0
- package/dist/assets/elm-Cshzl8qu.js +1 -0
- package/dist/assets/erlang-BV0c4Hdn.js +1 -0
- package/dist/assets/events.worker-C2Opu9Sc.js +1 -0
- package/dist/assets/external-link-lkcxItwM.js +1 -0
- package/dist/assets/factor-LKH5gN8L.js +1 -0
- package/dist/assets/fcl-ClOhbFR7.js +1 -0
- package/dist/assets/forth-D6RzAl64.js +1 -0
- package/dist/assets/fortran-Bt6PBEDR.js +1 -0
- package/dist/assets/gas-BHEdbvp9.js +1 -0
- package/dist/assets/gherkin-oBAE_ms0.js +1 -0
- package/dist/assets/github-emoji-CXJ5RSZS.js +169 -0
- package/dist/assets/github-emoji-D8dkjuM_.css +1 -0
- package/dist/assets/groovy-CUrWKPia.js +1 -0
- package/dist/assets/haskell-BRsoo5mP.js +1 -0
- package/dist/assets/haxe-DjVOVvNP.js +1 -0
- package/dist/assets/http-CLVgA2GD.js +1 -0
- package/dist/assets/hub-DfPcTPCC.js +1 -0
- package/dist/assets/idl-BUZw3wgd.js +1 -0
- package/dist/assets/javascript-lS2r2ifg.js +1 -0
- package/dist/assets/julia-CQfgDRfP.js +1 -0
- package/dist/assets/livescript-BXxG0Yva.js +1 -0
- package/dist/assets/lua-DPCEkfD_.js +1 -0
- package/dist/assets/main-JoBAi6ol.css +1 -0
- package/dist/assets/main-iz4ud0jC.js +178 -0
- package/dist/assets/mathematica-u8YMmbU0.js +1 -0
- package/dist/assets/mbox-BEMVcqjs.js +1 -0
- package/dist/assets/mirc-C9zpzAZU.js +1 -0
- package/dist/assets/mllike-B45xgp2S.js +1 -0
- package/dist/assets/modelica-CqHI_q-D.js +1 -0
- package/dist/assets/mscgen-qgSLujhx.js +1 -0
- package/dist/assets/mumps-BSzj6Xyz.js +1 -0
- package/dist/assets/nginx-C-ORUuei.js +1 -0
- package/dist/assets/nsis-viPvXFiq.js +1 -0
- package/dist/assets/ntriples-CzMBulkp.js +1 -0
- package/dist/assets/octave-D2Q8cUp1.js +1 -0
- package/dist/assets/oz-BwTct_5T.js +1 -0
- package/dist/assets/pascal-Dp_KdFgX.js +1 -0
- package/dist/assets/perl-BkSkiI9m.js +1 -0
- package/dist/assets/pig-AF4Hwhju.js +1 -0
- package/dist/assets/powershell-D8WpQPaX.js +1 -0
- package/dist/assets/preload-helper-BLdHbfdN.js +1 -0
- package/dist/assets/properties-C357ku5U.js +1 -0
- package/dist/assets/protobuf-D1ij_kNL.js +1 -0
- package/dist/assets/pug-BqCHZ5xT.js +1 -0
- package/dist/assets/puppet-BZyAS7I4.js +1 -0
- package/dist/assets/python-B_1Jd8HM.js +1 -0
- package/dist/assets/q-B9NhS7L_.js +1 -0
- package/dist/assets/r-CxDmU1I4.js +1 -0
- package/dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/dist/assets/rpm-gpDK5sbt.js +1 -0
- package/dist/assets/ruby-ChfNwlCY.js +1 -0
- package/dist/assets/sas-C2OyD2Y6.js +1 -0
- package/dist/assets/scheme-D9qYN0V5.js +1 -0
- package/dist/assets/shared.esm-bundler-DoSbGLUP.js +2 -0
- package/dist/assets/shared.worker-DpKROrNH.js +1 -0
- package/dist/assets/shell-DwuoZtxw.js +1 -0
- package/dist/assets/sieve-tLWDfEkZ.js +1 -0
- package/dist/assets/simple-mode-DXiLM1-G.js +1 -0
- package/dist/assets/smalltalk-BLp5-jwC.js +1 -0
- package/dist/assets/solr-B78wSQJQ.js +1 -0
- package/dist/assets/sparql-Dz-mlCAC.js +1 -0
- package/dist/assets/spreadsheet-CTIncYxj.js +1 -0
- package/dist/assets/sql-DuQMFDvy.js +1 -0
- package/dist/assets/stex-DNzd62Q_.js +1 -0
- package/dist/assets/styles-CCXo2OoQ.css +1 -0
- package/dist/assets/styles-DZDDPlL3.js +1 -0
- package/dist/assets/stylus-BOVgKnng.js +1 -0
- package/dist/assets/swift-DKB6_1j6.js +1 -0
- package/dist/assets/tcl-BGfruO1u.js +1 -0
- package/dist/assets/textile-C4jVoHG1.js +1 -0
- package/dist/assets/tiddlywiki-VlUiK86J.js +1 -0
- package/dist/assets/tiki-CvUEFusT.js +1 -0
- package/dist/assets/toml-BPTmHmyx.js +1 -0
- package/dist/assets/troff-C2dAgh7P.js +1 -0
- package/dist/assets/ttcn-PPSTk1ow.js +1 -0
- package/dist/assets/ttcn-cfg-2b4Gb5sE.js +1 -0
- package/dist/assets/turtle-Cx3rYX2g.js +1 -0
- package/dist/assets/vb-BthdM_4N.js +1 -0
- package/dist/assets/vbscript-D9f6rSsU.js +1 -0
- package/dist/assets/velocity-CqftRsjg.js +1 -0
- package/dist/assets/verilog-CjI9Y6RI.js +1 -0
- package/dist/assets/vhdl-kS471soi.js +1 -0
- package/dist/assets/webidl-D5jiJvOU.js +1 -0
- package/dist/assets/xquery-BKJx4mf9.js +1 -0
- package/dist/assets/yacas-CXXgtw0p.js +1 -0
- package/dist/assets/z80-Co3PbHdE.js +1 -0
- package/dist/favicon.svg +5 -0
- package/dist/file-icons/LICENSE-lucide.txt +43 -0
- package/dist/file-icons/NOTICE.md +8 -0
- package/dist/file-icons/icons/archive.svg +1 -0
- package/dist/file-icons/icons/assets.svg +1 -0
- package/dist/file-icons/icons/audio.svg +1 -0
- package/dist/file-icons/icons/c.svg +1 -0
- package/dist/file-icons/icons/components.svg +1 -0
- package/dist/file-icons/icons/config.svg +1 -0
- package/dist/file-icons/icons/cpp.svg +1 -0
- package/dist/file-icons/icons/css.svg +1 -0
- package/dist/file-icons/icons/database.svg +1 -0
- package/dist/file-icons/icons/docker.svg +1 -0
- package/dist/file-icons/icons/env.svg +1 -0
- package/dist/file-icons/icons/executable.svg +1 -0
- package/dist/file-icons/icons/file.svg +1 -0
- package/dist/file-icons/icons/folder-open.svg +1 -0
- package/dist/file-icons/icons/folder.svg +1 -0
- package/dist/file-icons/icons/font.svg +1 -0
- package/dist/file-icons/icons/git.svg +1 -0
- package/dist/file-icons/icons/go.svg +1 -0
- package/dist/file-icons/icons/graphql.svg +1 -0
- package/dist/file-icons/icons/html.svg +1 -0
- package/dist/file-icons/icons/ignore.svg +1 -0
- package/dist/file-icons/icons/image.svg +1 -0
- package/dist/file-icons/icons/java.svg +1 -0
- package/dist/file-icons/icons/javascript.svg +1 -0
- package/dist/file-icons/icons/json.svg +1 -0
- package/dist/file-icons/icons/kotlin.svg +1 -0
- package/dist/file-icons/icons/license.svg +1 -0
- package/dist/file-icons/icons/lock.svg +1 -0
- package/dist/file-icons/icons/markdown.svg +1 -0
- package/dist/file-icons/icons/package.svg +1 -0
- package/dist/file-icons/icons/php.svg +1 -0
- package/dist/file-icons/icons/python.svg +1 -0
- package/dist/file-icons/icons/react.svg +1 -0
- package/dist/file-icons/icons/ruby.svg +1 -0
- package/dist/file-icons/icons/rust.svg +1 -0
- package/dist/file-icons/icons/sass.svg +1 -0
- package/dist/file-icons/icons/shell.svg +1 -0
- package/dist/file-icons/icons/source.svg +1 -0
- package/dist/file-icons/icons/svelte.svg +1 -0
- package/dist/file-icons/icons/swift.svg +1 -0
- package/dist/file-icons/icons/tests.svg +1 -0
- package/dist/file-icons/icons/toml.svg +1 -0
- package/dist/file-icons/icons/typescript.svg +1 -0
- package/dist/file-icons/icons/video.svg +1 -0
- package/dist/file-icons/icons/vite.svg +1 -0
- package/dist/file-icons/icons/vue.svg +1 -0
- package/dist/file-icons/icons/yaml.svg +1 -0
- package/dist/file-icons/theme.json +572 -0
- package/dist/file-icons/theme.schema.json +137 -0
- package/dist/github.svg +1 -0
- package/dist/gitlab.svg +1 -0
- package/dist/hub.html +21 -0
- package/dist/icons/apple-touch-icon.png +0 -0
- package/dist/icons/icon-192.png +0 -0
- package/dist/icons/icon-512.png +0 -0
- package/dist/icons/maskable-512.png +0 -0
- package/dist/index.html +42 -0
- package/dist/manifest.webmanifest +37 -0
- package/dist/sw.js +81 -0
- package/package.json +62 -4
- package/packages/cli/app/agent-host.js +163 -0
- package/packages/cli/app/desktop.js +77 -0
- package/packages/cli/app/fix-node-pty.js +52 -0
- package/packages/cli/app/import-companion-key.js +57 -0
- package/packages/cli/app/install-desktop.js +4 -0
- package/packages/cli/app/launch.js +134 -0
- package/packages/cli/app/restart.js +32 -0
- package/packages/cli/commands/logs.js +10 -0
- package/packages/cli/commands/open.js +49 -0
- package/packages/cli/commands/projects.js +18 -0
- package/packages/cli/commands/run.js +39 -0
- package/packages/cli/commands/search.js +19 -0
- package/packages/cli/commands/server.js +32 -0
- package/packages/cli/commands/status.js +42 -0
- package/packages/cli/common/output.js +13 -0
- package/packages/cli/modules/api/index.js +60 -0
- package/packages/cli/modules/arguments/index.js +188 -0
- package/packages/cli/modules/command-runtime/index.js +24 -0
- package/packages/cli/modules/projects/index.js +118 -0
- package/packages/cli/modules/server/index.js +226 -0
- package/packages/cli/modules/server-process/index.js +204 -0
- package/packages/core/modules/agent-features/index.js +8 -0
- package/packages/core/modules/agent-judge/index.js +73 -0
- package/packages/core/modules/agent-read/index.js +25 -0
- package/packages/core/modules/agent-role/index.js +187 -0
- package/packages/core/modules/agent-task/contract.js +34 -0
- package/packages/core/modules/agent-task/index.js +1 -0
- package/packages/core/modules/agent-widgets/bars/index.js +11 -0
- package/packages/core/modules/agent-widgets/button/index.js +19 -0
- package/packages/core/modules/agent-widgets/card/index.js +13 -0
- package/packages/core/modules/agent-widgets/checks/index.js +19 -0
- package/packages/core/modules/agent-widgets/chips/index.js +15 -0
- package/packages/core/modules/agent-widgets/columns/index.js +12 -0
- package/packages/core/modules/agent-widgets/donut/index.js +11 -0
- package/packages/core/modules/agent-widgets/field/index.js +39 -0
- package/packages/core/modules/agent-widgets/form/index.js +18 -0
- package/packages/core/modules/agent-widgets/git-info/index.js +29 -0
- package/packages/core/modules/agent-widgets/image/index.js +22 -0
- package/packages/core/modules/agent-widgets/inline-icon/index.js +45 -0
- package/packages/core/modules/agent-widgets/input/index.js +16 -0
- package/packages/core/modules/agent-widgets/intelligent-form/index.js +32 -0
- package/packages/core/modules/agent-widgets/line/index.js +12 -0
- package/packages/core/modules/agent-widgets/row/index.js +11 -0
- package/packages/core/modules/agent-widgets/safe-secret-show/index.js +21 -0
- package/packages/core/modules/agent-widgets/slider/index.js +18 -0
- package/packages/core/modules/agent-widgets/stat/index.js +16 -0
- package/packages/core/modules/agent-widgets/steps/index.js +14 -0
- package/packages/core/modules/agent-widgets/tab/index.js +12 -0
- package/packages/core/modules/agent-widgets/tabs/index.js +24 -0
- package/packages/core/modules/agents-integration/claude/index.js +1 -0
- package/packages/core/modules/agents-integration/codex/index.js +1 -0
- package/packages/core/modules/agents-integration/cursor/index.js +1 -0
- package/packages/core/modules/agents-integration/kimi/index.js +1 -0
- package/packages/core/modules/agents-integration/opencode/index.js +1 -0
- package/packages/core/modules/app-paths/index.js +14 -0
- package/packages/core/modules/app-paths/logs.js +194 -0
- package/packages/core/modules/app-paths/network-mode.js +24 -0
- package/packages/core/modules/app-paths/paths.js +40 -0
- package/packages/core/modules/app-paths/server-mode.js +18 -0
- package/packages/core/modules/appearance/index.js +35 -0
- package/packages/core/modules/browser/index.js +86 -0
- package/packages/core/modules/devcontainer/classify.js +101 -0
- package/packages/core/modules/devcontainer/contract.js +1 -0
- package/packages/core/modules/devcontainer/index.js +1 -0
- package/packages/core/modules/directories/contract.js +1 -0
- package/packages/core/modules/directories/index.js +1 -0
- package/packages/core/modules/docker/contract.js +1 -0
- package/packages/core/modules/docker/index.js +1 -0
- package/packages/core/modules/editor-themes/index.js +17 -0
- package/packages/core/modules/environment/index.js +1 -0
- package/packages/core/modules/file-icons/contract.js +177 -0
- package/packages/core/modules/file-icons/index.js +1 -0
- package/packages/core/modules/github/index.js +23 -0
- package/packages/core/modules/gitlab/index.js +164 -0
- package/packages/core/modules/hub/index.js +1 -0
- package/packages/core/modules/hub/protocol.js +19 -0
- package/packages/core/modules/ide/agent-command.js +48 -0
- package/packages/core/modules/ide/command-help.js +73 -0
- package/packages/core/modules/ide/commands.js +191 -0
- package/packages/core/modules/ide/index.js +6 -0
- package/packages/core/modules/ide/keybinding-editor.js +34 -0
- package/packages/core/modules/ide/keybindings.js +45 -0
- package/packages/core/modules/ide/palette.js +33 -0
- package/packages/core/modules/ide/safety.js +10 -0
- package/packages/core/modules/launcher/actions.js +5 -0
- package/packages/core/modules/launcher/index.js +5 -0
- package/packages/core/modules/launcher/launcher-model.js +236 -0
- package/packages/core/modules/launcher/launcher.js +76 -0
- package/packages/core/modules/launcher/query.js +42 -0
- package/packages/core/modules/network-mode/index.js +3 -0
- package/packages/core/modules/network-mode/network-mode.js +8 -0
- package/packages/core/modules/os/bash.js +11 -0
- package/packages/core/modules/os/contract.js +1 -0
- package/packages/core/modules/os/index.js +3 -0
- package/packages/core/modules/os/modules/darwin/catalog.js +108 -0
- package/packages/core/modules/os/modules/darwin/directories.js +40 -0
- package/packages/core/modules/os/modules/darwin/docker.js +15 -0
- package/packages/core/modules/os/modules/darwin/gtk.js +6 -0
- package/packages/core/modules/os/modules/darwin/helper.swift +172 -0
- package/packages/core/modules/os/modules/darwin/index.js +12 -0
- package/packages/core/modules/os/modules/darwin/install-desktop.js +135 -0
- package/packages/core/modules/os/modules/darwin/processes.js +97 -0
- package/packages/core/modules/os/modules/darwin/resident.js +235 -0
- package/packages/core/modules/os/modules/darwin/secrets.js +53 -0
- package/packages/core/modules/os/modules/darwin/shell.js +105 -0
- package/packages/core/modules/os/modules/darwin/shortcut.js +61 -0
- package/packages/core/modules/os/modules/darwin/tools.js +52 -0
- package/packages/core/modules/os/modules/darwin/windows.js +135 -0
- package/packages/core/modules/os/modules/linux/bus.js +48 -0
- package/packages/core/modules/os/modules/linux/catalog.js +47 -0
- package/packages/core/modules/os/modules/linux/directories.js +49 -0
- package/packages/core/modules/os/modules/linux/docker.js +48 -0
- package/packages/core/modules/os/modules/linux/index.js +53 -0
- package/packages/core/modules/os/modules/linux/install-desktop.js +66 -0
- package/packages/core/modules/os/modules/linux/processes.js +85 -0
- package/packages/core/modules/os/modules/linux/resident.js +139 -0
- package/packages/core/modules/os/modules/linux/secrets.js +118 -0
- package/packages/core/modules/os/modules/linux/shortcut.js +124 -0
- package/packages/core/modules/os/modules/linux/tools.js +14 -0
- package/packages/core/modules/os/modules/linux/tray.js +190 -0
- package/packages/core/modules/os/modules/linux/windows.js +187 -0
- package/packages/core/modules/os/modules/windows/agent-process.js +60 -0
- package/packages/core/modules/os/modules/windows/alert.js +20 -0
- package/packages/core/modules/os/modules/windows/catalog.js +91 -0
- package/packages/core/modules/os/modules/windows/color-scheme.js +26 -0
- package/packages/core/modules/os/modules/windows/directories.js +101 -0
- package/packages/core/modules/os/modules/windows/docker.js +17 -0
- package/packages/core/modules/os/modules/windows/git.js +42 -0
- package/packages/core/modules/os/modules/windows/hwnd.js +275 -0
- package/packages/core/modules/os/modules/windows/index.js +28 -0
- package/packages/core/modules/os/modules/windows/install-desktop.js +140 -0
- package/packages/core/modules/os/modules/windows/kill-tree.js +26 -0
- package/packages/core/modules/os/modules/windows/processes.js +300 -0
- package/packages/core/modules/os/modules/windows/ps.js +73 -0
- package/packages/core/modules/os/modules/windows/resident-pipe.js +206 -0
- package/packages/core/modules/os/modules/windows/resident.js +286 -0
- package/packages/core/modules/os/modules/windows/secrets.js +110 -0
- package/packages/core/modules/os/modules/windows/shell.js +288 -0
- package/packages/core/modules/os/modules/windows/shortcut.js +82 -0
- package/packages/core/modules/os/modules/windows/tools.js +273 -0
- package/packages/core/modules/os/modules/windows/windows.js +133 -0
- package/packages/core/modules/os/os.js +175 -0
- package/packages/core/modules/os/session-env.js +11 -0
- package/packages/core/modules/os-posix/agent-process.js +105 -0
- package/packages/core/modules/os-posix/contract.js +1 -0
- package/packages/core/modules/os-posix/git.js +26 -0
- package/packages/core/modules/os-posix/index.js +4 -0
- package/packages/core/modules/os-posix/tools.js +258 -0
- package/packages/core/modules/os-posix/xdg.js +8 -0
- package/packages/core/modules/project/contract.js +1 -0
- package/packages/core/modules/project/index.js +1 -0
- package/packages/core/modules/project/ref.js +126 -0
- package/packages/core/modules/server-mode/index.js +3 -0
- package/packages/core/modules/server-mode/server-mode.js +13 -0
- package/packages/core/modules/terminal/contract.js +1 -0
- package/packages/core/modules/terminal/index.js +1 -0
- package/packages/core/modules/usage-analytics/index.js +80 -0
- package/packages/core/modules/widget-catalog/guide.js +76 -0
- package/packages/core/modules/widget-catalog/index.js +219 -0
- package/packages/core/modules/workspace/changes.js +114 -0
- package/packages/core/modules/workspace/contract.js +1 -0
- package/packages/core/modules/workspace/file-size.js +12 -0
- package/packages/core/modules/workspace/files-exclude.js +119 -0
- package/packages/core/modules/workspace/git-decorations.js +4 -0
- package/packages/core/modules/workspace/git-graph.js +35 -0
- package/packages/core/modules/workspace/index.js +11 -0
- package/packages/core/modules/workspace/paths.js +16 -0
- package/packages/core/modules/workspace/pipeline-status.js +86 -0
- package/packages/core/modules/workspace/pull-requests.js +1 -0
- package/packages/core/modules/workspace/pull-status.js +56 -0
- package/packages/core/modules/workspace/scope.js +34 -0
- package/packages/core/modules/workspace/search.js +28 -0
- package/packages/core/modules/workspace/tree-page.js +25 -0
- package/packages/server/app/agents.js +30 -0
- package/packages/server/app/api.js +159 -0
- package/packages/server/app/claude-runner.js +17 -0
- package/packages/server/app/dev-plugin.js +76 -0
- package/packages/server/app/dev-runtime.js +119 -0
- package/packages/server/app/features.js +35 -0
- package/packages/server/app/plugin.js +140 -0
- package/packages/server/app/projector-runner.js +15 -0
- package/packages/server/app/runtime-contract.js +1 -0
- package/packages/server/app/standalone.js +42 -0
- package/packages/server/app/static.js +57 -0
- package/packages/server/app/widgets-mcp.js +36 -0
- package/packages/server/app/widgets.js +54 -0
- package/packages/server/middlewares/local-origin.js +4 -0
- package/packages/server/modules/access/access.js +118 -0
- package/packages/server/modules/access/connections.js +36 -0
- package/packages/server/modules/access/http.js +93 -0
- package/packages/server/modules/access/hub.js +19 -0
- package/packages/server/modules/access/index.js +6 -0
- package/packages/server/modules/access/lan-url.js +21 -0
- package/packages/server/modules/access/password.js +68 -0
- package/packages/server/modules/access/session.js +38 -0
- package/packages/server/modules/agent/agent-host.js +46 -0
- package/packages/server/modules/agent/agent-runs.js +162 -0
- package/packages/server/modules/agent/attachments.js +88 -0
- package/packages/server/modules/agent/backend.js +1 -0
- package/packages/server/modules/agent/chat-archive.js +67 -0
- package/packages/server/modules/agent/command-bridge.js +94 -0
- package/packages/server/modules/agent/controls.js +10 -0
- package/packages/server/modules/agent/event-streams.js +40 -0
- package/packages/server/modules/agent/history-store.js +320 -0
- package/packages/server/modules/agent/history.js +160 -0
- package/packages/server/modules/agent/hosted-process.js +279 -0
- package/packages/server/modules/agent/hosted-run.js +85 -0
- package/packages/server/modules/agent/hosted-runner.js +126 -0
- package/packages/server/modules/agent/index.js +35 -0
- package/packages/server/modules/agent/injection.js +14 -0
- package/packages/server/modules/agent/jobs-diff.js +114 -0
- package/packages/server/modules/agent/jobs-files.js +65 -0
- package/packages/server/modules/agent/jobs-followup.js +66 -0
- package/packages/server/modules/agent/jobs-live.js +180 -0
- package/packages/server/modules/agent/jobs-store.js +59 -0
- package/packages/server/modules/agent/jobs-worktree.js +161 -0
- package/packages/server/modules/agent/jobs.js +316 -0
- package/packages/server/modules/agent/judge-store.js +21 -0
- package/packages/server/modules/agent/lens-request.js +34 -0
- package/packages/server/modules/agent/queue-store.js +21 -0
- package/packages/server/modules/agent/recent-chats.js +63 -0
- package/packages/server/modules/agent/registry.js +108 -0
- package/packages/server/modules/agent/replay.js +84 -0
- package/packages/server/modules/agent/request.js +132 -0
- package/packages/server/modules/agent/role-store.js +21 -0
- package/packages/server/modules/agent/run-hub.js +105 -0
- package/packages/server/modules/agent/run-request.js +208 -0
- package/packages/server/modules/agent/secret-show.js +108 -0
- package/packages/server/modules/agent/side-request.js +142 -0
- package/packages/server/modules/agent/usage-history.js +62 -0
- package/packages/server/modules/agent/worktrees.js +136 -0
- package/packages/server/modules/agent-features/catalog.js +18 -0
- package/packages/server/modules/agent-features/index.js +2 -0
- package/packages/server/modules/agent-features/store.js +172 -0
- package/packages/server/modules/agent-mcp/index.js +106 -0
- package/packages/server/modules/agent-roles/index.js +3 -0
- package/packages/server/modules/agent-roles/project.js +231 -0
- package/packages/server/modules/agent-roles/runtime.js +68 -0
- package/packages/server/modules/agent-roles/store.js +190 -0
- package/packages/server/modules/agents/acp/acp-backend.js +320 -0
- package/packages/server/modules/agents/acp/acp-client.js +153 -0
- package/packages/server/modules/agents/acp/acp-controls.js +179 -0
- package/packages/server/modules/agents/acp/acp-dialect.js +82 -0
- package/packages/server/modules/agents/acp/acp-elicitation.js +135 -0
- package/packages/server/modules/agents/acp/acp-events.js +340 -0
- package/packages/server/modules/agents/acp/acp-process.js +78 -0
- package/packages/server/modules/agents/acp/acp-programs.js +11 -0
- package/packages/server/modules/agents/acp/acp-tools.js +208 -0
- package/packages/server/modules/agents/acp/index.js +4 -0
- package/packages/server/modules/agents/acp/mcp-config.js +100 -0
- package/packages/server/modules/agents/claude-code/claude-code-backend.js +342 -0
- package/packages/server/modules/agents/claude-code/claude-code-checkpoints.js +97 -0
- package/packages/server/modules/agents/claude-code/claude-code-env.js +46 -0
- package/packages/server/modules/agents/claude-code/claude-code-events.js +299 -0
- package/packages/server/modules/agents/claude-code/claude-code-input.js +97 -0
- package/packages/server/modules/agents/claude-code/claude-code-replay.js +71 -0
- package/packages/server/modules/agents/claude-code/claude-code-sessions.js +207 -0
- package/packages/server/modules/agents/claude-code/claude-code-times.js +42 -0
- package/packages/server/modules/agents/claude-code/index.js +2 -0
- package/packages/server/modules/agents/claude-code/questions.js +51 -0
- package/packages/server/modules/agents/codex/dialect.js +130 -0
- package/packages/server/modules/agents/codex/forms.js +24 -0
- package/packages/server/modules/agents/codex/index.js +17 -0
- package/packages/server/modules/agents/cursor/dialect.js +66 -0
- package/packages/server/modules/agents/cursor/images.js +12 -0
- package/packages/server/modules/agents/cursor/index.js +30 -0
- package/packages/server/modules/agents/cursor/plan.js +44 -0
- package/packages/server/modules/agents/cursor/questions.js +37 -0
- package/packages/server/modules/agents/cursor/selection.js +29 -0
- package/packages/server/modules/agents/cursor/task.js +32 -0
- package/packages/server/modules/agents/cursor/todos.js +69 -0
- package/packages/server/modules/agents/ide-mcp/config.js +40 -0
- package/packages/server/modules/agents/ide-mcp/index.js +1 -0
- package/packages/server/modules/agents/ide-mcp/server.js +154 -0
- package/packages/server/modules/agents/kimi/dialect.js +18 -0
- package/packages/server/modules/agents/kimi/index.js +11 -0
- package/packages/server/modules/agents/opencode/dialect.js +232 -0
- package/packages/server/modules/agents/opencode/index.js +21 -0
- package/packages/server/modules/agents/opencode/read.js +46 -0
- package/packages/server/modules/agents/opencode/sessions.js +69 -0
- package/packages/server/modules/agents/projector/agent-lens.js +110 -0
- package/packages/server/modules/agents/projector/agent-tools.js +290 -0
- package/packages/server/modules/agents/projector/answer-doctor.js +32 -0
- package/packages/server/modules/agents/projector/form-doctor.js +33 -0
- package/packages/server/modules/agents/projector/index.js +12 -0
- package/packages/server/modules/agents/projector/project-instructions.js +34 -0
- package/packages/server/modules/agents/projector/projector-backend.js +350 -0
- package/packages/server/modules/agents/projector/projector-budget.js +70 -0
- package/packages/server/modules/agents/projector/projector-compaction.js +128 -0
- package/packages/server/modules/agents/projector/projector-controls.js +70 -0
- package/packages/server/modules/agents/projector/projector-guard.js +196 -0
- package/packages/server/modules/agents/projector/projector-history.js +87 -0
- package/packages/server/modules/agents/projector/projector-hooks.js +201 -0
- package/packages/server/modules/agents/projector/projector-input.js +40 -0
- package/packages/server/modules/agents/projector/projector-mcp-config.js +1 -0
- package/packages/server/modules/agents/projector/projector-mcp.js +119 -0
- package/packages/server/modules/agents/projector/projector-memory.js +92 -0
- package/packages/server/modules/agents/projector/projector-retry.js +52 -0
- package/packages/server/modules/agents/projector/projector-review.js +40 -0
- package/packages/server/modules/agents/projector/projector-side.js +56 -0
- package/packages/server/modules/agents/projector/projector-skills.js +143 -0
- package/packages/server/modules/agents/projector/projector-task.js +235 -0
- package/packages/server/modules/agents/projector/projector-usage.js +19 -0
- package/packages/server/modules/agents/projector/projector-web-search.js +76 -0
- package/packages/server/modules/agents/projector/projector-web.js +172 -0
- package/packages/server/modules/agents/projector/prompts.js +46 -0
- package/packages/server/modules/agents/projector/secrets/secret-destination.js +226 -0
- package/packages/server/modules/agents/projector/secrets/secret-show.js +23 -0
- package/packages/server/modules/agents/projector/secrets/secret-tools.js +124 -0
- package/packages/server/modules/agents/projector/tool-spec.js +4 -0
- package/packages/server/modules/agents/projector/tool-specs.js +167 -0
- package/packages/server/modules/agents/projector/widgets.js +4 -0
- package/packages/server/modules/agents/widgets-mcp/config.js +34 -0
- package/packages/server/modules/agents/widgets-mcp/index.js +1 -0
- package/packages/server/modules/agents-integration/_/usage-cache.js +19 -0
- package/packages/server/modules/agents-integration/claude/client.js +33 -0
- package/packages/server/modules/agents-integration/claude/index.js +1 -0
- package/packages/server/modules/agents-integration/claude/usage.js +49 -0
- package/packages/server/modules/agents-integration/codex/cli.js +86 -0
- package/packages/server/modules/agents-integration/codex/index.js +1 -0
- package/packages/server/modules/agents-integration/codex/usage.js +45 -0
- package/packages/server/modules/agents-integration/cursor/client.js +40 -0
- package/packages/server/modules/agents-integration/cursor/credentials.js +34 -0
- package/packages/server/modules/agents-integration/cursor/index.js +1 -0
- package/packages/server/modules/agents-integration/cursor/usage.js +59 -0
- package/packages/server/modules/agents-integration/kimi/client.js +48 -0
- package/packages/server/modules/agents-integration/kimi/credential-config.js +167 -0
- package/packages/server/modules/agents-integration/kimi/credentials.js +261 -0
- package/packages/server/modules/agents-integration/kimi/index.js +1 -0
- package/packages/server/modules/agents-integration/kimi/usage.js +149 -0
- package/packages/server/modules/agents-integration/opencode/client.js +30 -0
- package/packages/server/modules/agents-integration/opencode/credentials.js +36 -0
- package/packages/server/modules/agents-integration/opencode/index.js +1 -0
- package/packages/server/modules/agents-integration/opencode/usage.js +47 -0
- package/packages/server/modules/appearance/index.js +38 -0
- package/packages/server/modules/browser/cookies.js +112 -0
- package/packages/server/modules/browser/guard.js +55 -0
- package/packages/server/modules/browser/index.js +2 -0
- package/packages/server/modules/browser/key.js +34 -0
- package/packages/server/modules/browser/proxy.js +255 -0
- package/packages/server/modules/browser/rewrite.js +82 -0
- package/packages/server/modules/devcontainer/discovery.js +85 -0
- package/packages/server/modules/devcontainer/exec.js +81 -0
- package/packages/server/modules/devcontainer/index.js +4 -0
- package/packages/server/modules/devcontainer/launch.js +51 -0
- package/packages/server/modules/devcontainer/state.js +68 -0
- package/packages/server/modules/devcontainer/trust.js +41 -0
- package/packages/server/modules/directories/directories.js +34 -0
- package/packages/server/modules/directories/index.js +1 -0
- package/packages/server/modules/docker/actions.js +121 -0
- package/packages/server/modules/docker/daemon.js +72 -0
- package/packages/server/modules/docker/index.js +4 -0
- package/packages/server/modules/docker/settings.js +127 -0
- package/packages/server/modules/docker/snapshot.js +105 -0
- package/packages/server/modules/environments/execution.js +125 -0
- package/packages/server/modules/environments/index.js +3 -0
- package/packages/server/modules/environments/reconcile.js +62 -0
- package/packages/server/modules/environments/settings.js +58 -0
- package/packages/server/modules/events/implementation.js +85 -0
- package/packages/server/modules/events/index.js +1 -0
- package/packages/server/modules/folder-picker/index.js +1 -0
- package/packages/server/modules/folder-picker/pick-folder.js +2 -0
- package/packages/server/modules/git-import/clone.js +47 -0
- package/packages/server/modules/git-import/container.js +57 -0
- package/packages/server/modules/git-import/import.js +82 -0
- package/packages/server/modules/git-import/index.js +4 -0
- package/packages/server/modules/git-import/jobs.js +68 -0
- package/packages/server/modules/github/api.js +260 -0
- package/packages/server/modules/github/browser.js +185 -0
- package/packages/server/modules/github/clone.js +55 -0
- package/packages/server/modules/github/container.js +15 -0
- package/packages/server/modules/github/discussions.js +141 -0
- package/packages/server/modules/github/emojis.js +14 -0
- package/packages/server/modules/github/history.js +205 -0
- package/packages/server/modules/github/index.js +11 -0
- package/packages/server/modules/github/issues.js +81 -0
- package/packages/server/modules/github/navigation.js +35 -0
- package/packages/server/modules/github/pipelines.js +266 -0
- package/packages/server/modules/github/pulls.js +111 -0
- package/packages/server/modules/github/releases.js +241 -0
- package/packages/server/modules/gitlab/api.js +257 -0
- package/packages/server/modules/gitlab/base.js +24 -0
- package/packages/server/modules/gitlab/blob-search.js +110 -0
- package/packages/server/modules/gitlab/browser.js +296 -0
- package/packages/server/modules/gitlab/clone.js +78 -0
- package/packages/server/modules/gitlab/compare.js +68 -0
- package/packages/server/modules/gitlab/connection.js +55 -0
- package/packages/server/modules/gitlab/container.js +15 -0
- package/packages/server/modules/gitlab/history.js +127 -0
- package/packages/server/modules/gitlab/icon.js +67 -0
- package/packages/server/modules/gitlab/index.js +14 -0
- package/packages/server/modules/gitlab/issues.js +61 -0
- package/packages/server/modules/gitlab/merge-requests.js +287 -0
- package/packages/server/modules/gitlab/navigation.js +187 -0
- package/packages/server/modules/gitlab/oauth.js +250 -0
- package/packages/server/modules/gitlab/pipelines.js +240 -0
- package/packages/server/modules/gitlab/releases.js +226 -0
- package/packages/server/modules/gitlab/search.js +75 -0
- package/packages/server/modules/gitlab/trackers.js +96 -0
- package/packages/server/modules/http/download.js +50 -0
- package/packages/server/modules/http/http.js +8 -0
- package/packages/server/modules/http/index.js +2 -0
- package/packages/server/modules/hub/connector.js +114 -0
- package/packages/server/modules/hub/hub.js +142 -0
- package/packages/server/modules/hub/index.js +1 -0
- package/packages/server/modules/ide/editor-settings.js +37 -0
- package/packages/server/modules/ide/index.js +3 -0
- package/packages/server/modules/ide/keybindings.js +37 -0
- package/packages/server/modules/ide/mcp-bridge.js +150 -0
- package/packages/server/modules/instance/index.js +2 -0
- package/packages/server/modules/instance/instance.js +50 -0
- package/packages/server/modules/integration-store/index.js +2 -0
- package/packages/server/modules/integration-store/list.js +12 -0
- package/packages/server/modules/integration-store/store.js +141 -0
- package/packages/server/modules/judge/approval.js +35 -0
- package/packages/server/modules/judge/index.js +3 -0
- package/packages/server/modules/judge/settings.js +35 -0
- package/packages/server/modules/judge/verdict.js +141 -0
- package/packages/server/modules/launcher/browse.js +29 -0
- package/packages/server/modules/launcher/folders.js +138 -0
- package/packages/server/modules/launcher/hosted-search.js +43 -0
- package/packages/server/modules/launcher/index.js +12 -0
- package/packages/server/modules/launcher/launcher.js +352 -0
- package/packages/server/modules/launcher/potential.js +70 -0
- package/packages/server/modules/launcher/project-entries.js +165 -0
- package/packages/server/modules/network/eu-context.js +29 -0
- package/packages/server/modules/network/index.js +1 -0
- package/packages/server/modules/openai-gateway/config.js +125 -0
- package/packages/server/modules/openai-gateway/gateway.js +178 -0
- package/packages/server/modules/openai-gateway/index.js +7 -0
- package/packages/server/modules/preferences/index.js +7 -0
- package/packages/server/modules/preferences/preferences.js +142 -0
- package/packages/server/modules/processes/index.js +6 -0
- package/packages/server/modules/processes/processes.js +174 -0
- package/packages/server/modules/project-presentation/implementation.js +130 -0
- package/packages/server/modules/project-presentation/index.js +1 -0
- package/packages/server/modules/project-widgets/index.js +210 -0
- package/packages/server/modules/projects/discovery.js +179 -0
- package/packages/server/modules/projects/favicon.js +180 -0
- package/packages/server/modules/projects/index.js +11 -0
- package/packages/server/modules/projects/inspect.js +148 -0
- package/packages/server/modules/projects/remote-icon.js +39 -0
- package/packages/server/modules/projects/store.js +41 -0
- package/packages/server/modules/projects/types.js +1 -0
- package/packages/server/modules/providers/atomic-file.js +29 -0
- package/packages/server/modules/providers/balance.js +125 -0
- package/packages/server/modules/providers/index.js +15 -0
- package/packages/server/modules/providers/kinds.js +24 -0
- package/packages/server/modules/providers/model-list.js +16 -0
- package/packages/server/modules/providers/models.js +124 -0
- package/packages/server/modules/providers/openai-client.js +40 -0
- package/packages/server/modules/providers/provider-seeds.js +39 -0
- package/packages/server/modules/providers/provider-store.js +317 -0
- package/packages/server/modules/providers/quiet-model.js +36 -0
- package/packages/server/modules/providers/secret-obfuscation.js +48 -0
- package/packages/server/modules/providers/thinking.js +105 -0
- package/packages/server/modules/providers/types.js +1 -0
- package/packages/server/modules/restart/index.js +1 -0
- package/packages/server/modules/restart/restart.js +56 -0
- package/packages/server/modules/secrets/index.js +1 -0
- package/packages/server/modules/secrets/vault.js +51 -0
- package/packages/server/modules/spend/index.js +2 -0
- package/packages/server/modules/spend/ledger.js +82 -0
- package/packages/server/modules/spend/store.js +92 -0
- package/packages/server/modules/terminal/drop-files.js +42 -0
- package/packages/server/modules/terminal/index.js +15 -0
- package/packages/server/modules/terminal/link-files.js +44 -0
- package/packages/server/modules/terminal/scenario-folder.js +20 -0
- package/packages/server/modules/terminal/session-state.js +85 -0
- package/packages/server/modules/terminal/socket.js +159 -0
- package/packages/server/modules/terminal/terminal-activity.js +56 -0
- package/packages/server/modules/terminal/terminal-file.js +32 -0
- package/packages/server/modules/terminal/terminal-mouse.js +29 -0
- package/packages/server/modules/terminal/terminal.js +308 -0
- package/packages/server/modules/terminal/terminate.js +68 -0
- package/packages/server/modules/terminal-control/control.js +75 -0
- package/packages/server/modules/terminal-control/handlers.js +10 -0
- package/packages/server/modules/terminal-control/index.js +3 -0
- package/packages/server/modules/terminal-control/shared-socket.js +319 -0
- package/packages/server/modules/terminal-control/socket.js +153 -0
- package/packages/server/modules/transport/implementation.js +24 -0
- package/packages/server/modules/transport/index.js +2 -0
- package/packages/server/modules/transport/router.js +16 -0
- package/packages/server/modules/transport/types.js +1 -0
- package/packages/server/modules/usage-analytics/index.js +4 -0
- package/packages/server/modules/usage-analytics/limits.js +144 -0
- package/packages/server/modules/usage-analytics/overview.js +117 -0
- package/packages/server/modules/usage-analytics/providers.js +120 -0
- package/packages/server/modules/usage-analytics/store.js +152 -0
- package/packages/server/modules/window/desktop.js +24 -0
- package/packages/server/modules/window/index.js +8 -0
- package/packages/server/modules/window/window.js +86 -0
- package/packages/server/modules/workspace/archive.py +109 -0
- package/packages/server/modules/workspace/external-files.js +22 -0
- package/packages/server/modules/workspace/files-exclude.js +73 -0
- package/packages/server/modules/workspace/files.js +332 -0
- package/packages/server/modules/workspace/find-paths.js +92 -0
- package/packages/server/modules/workspace/git-branches.js +159 -0
- package/packages/server/modules/workspace/git-compare.js +121 -0
- package/packages/server/modules/workspace/git-history.js +182 -0
- package/packages/server/modules/workspace/git-sync.js +245 -0
- package/packages/server/modules/workspace/git-tree.js +126 -0
- package/packages/server/modules/workspace/git.js +276 -0
- package/packages/server/modules/workspace/ignored.js +23 -0
- package/packages/server/modules/workspace/import.js +190 -0
- package/packages/server/modules/workspace/index.js +15 -0
- package/packages/server/modules/workspace/paths.js +38 -0
- package/packages/server/modules/workspace/reveal.js +14 -0
- package/packages/server/modules/workspace/search.js +136 -0
- package/packages/server/modules/workspace/site.js +62 -0
- package/packages/server/modules/workspace/watcher.js +176 -0
- package/packages/server/routes/api/agent-answer-repair.js +35 -0
- package/packages/server/routes/api/agent-chats.js +77 -0
- package/packages/server/routes/api/agent-features.js +36 -0
- package/packages/server/routes/api/agent-form-repair.js +35 -0
- package/packages/server/routes/api/agent-hooks.js +35 -0
- package/packages/server/routes/api/agent-jobs.js +322 -0
- package/packages/server/routes/api/agent-judge.js +33 -0
- package/packages/server/routes/api/agent-lens.js +27 -0
- package/packages/server/routes/api/agent-mcp.js +41 -0
- package/packages/server/routes/api/agent-memory.js +33 -0
- package/packages/server/routes/api/agent-project-roles.js +112 -0
- package/packages/server/routes/api/agent-project-widgets.js +67 -0
- package/packages/server/routes/api/agent-roles.js +106 -0
- package/packages/server/routes/api/agent-secret-show.js +87 -0
- package/packages/server/routes/api/agent-side.js +70 -0
- package/packages/server/routes/api/agent-skills.js +31 -0
- package/packages/server/routes/api/agent-web.js +27 -0
- package/packages/server/routes/api/agent-worktrees.js +49 -0
- package/packages/server/routes/api/agent.js +269 -0
- package/packages/server/routes/api/analytics.js +21 -0
- package/packages/server/routes/api/app/hide.js +12 -0
- package/packages/server/routes/api/app/mode.js +49 -0
- package/packages/server/routes/api/app/network.js +54 -0
- package/packages/server/routes/api/app/open.js +33 -0
- package/packages/server/routes/api/app/quit.js +14 -0
- package/packages/server/routes/api/app/restart.js +18 -0
- package/packages/server/routes/api/appearance.js +70 -0
- package/packages/server/routes/api/browser.js +27 -0
- package/packages/server/routes/api/claude.js +15 -0
- package/packages/server/routes/api/codex.js +15 -0
- package/packages/server/routes/api/cursor.js +15 -0
- package/packages/server/routes/api/directories.js +16 -0
- package/packages/server/routes/api/docker.js +74 -0
- package/packages/server/routes/api/events.js +25 -0
- package/packages/server/routes/api/health.js +20 -0
- package/packages/server/routes/api/hub.js +26 -0
- package/packages/server/routes/api/ide/commands.js +72 -0
- package/packages/server/routes/api/ide/editor.js +37 -0
- package/packages/server/routes/api/ide/files-exclude.js +37 -0
- package/packages/server/routes/api/ide/keybindings.js +37 -0
- package/packages/server/routes/api/inspect.js +21 -0
- package/packages/server/routes/api/integrations/[...action].js +201 -0
- package/packages/server/routes/api/integrations/github-browse.js +190 -0
- package/packages/server/routes/api/kimi.js +15 -0
- package/packages/server/routes/api/launcher/icon.js +16 -0
- package/packages/server/routes/api/launcher/launch.js +27 -0
- package/packages/server/routes/api/launcher/search.js +20 -0
- package/packages/server/routes/api/launcher/settings.js +68 -0
- package/packages/server/routes/api/openai.js +94 -0
- package/packages/server/routes/api/opencode.js +15 -0
- package/packages/server/routes/api/pick-folder.js +12 -0
- package/packages/server/routes/api/preview-icon.js +21 -0
- package/packages/server/routes/api/projects/[id]/index.js +240 -0
- package/packages/server/routes/api/projects/[id]/site.js +59 -0
- package/packages/server/routes/api/projects/[id]/terminals.js +38 -0
- package/packages/server/routes/api/projects/[id]/workspace-read.js +126 -0
- package/packages/server/routes/api/projects/[id]/workspace.js +147 -0
- package/packages/server/routes/api/projects/index.js +62 -0
- package/packages/server/routes/api/providers/active.js +12 -0
- package/packages/server/routes/api/providers/balance.js +15 -0
- package/packages/server/routes/api/providers/models.js +19 -0
- package/packages/server/routes/api/providers.js +23 -0
- package/packages/server/routes/api/status.js +11 -0
- package/resources/icons/128.png +0 -0
- package/resources/icons/16.png +0 -0
- package/resources/icons/256.png +0 -0
- package/resources/icons/32.png +0 -0
- package/resources/icons/48.png +0 -0
- package/resources/icons/512.png +0 -0
- package/resources/icons/64.png +0 -0
- package/resources/icons/projector.svg +5 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import dbus from "dbus-next";
|
|
2
|
+
export function sessionBus() {
|
|
3
|
+
const bus = dbus.sessionBus();
|
|
4
|
+
// Surface errors without an unhandled EventEmitter error terminating GTK.
|
|
5
|
+
bus.on("error", (error) => console.error("D-Bus:", error.message));
|
|
6
|
+
return bus;
|
|
7
|
+
}
|
|
8
|
+
export async function call(bus, destination, path, iface, member, signature = "", body = []) {
|
|
9
|
+
const message = new dbus.Message({
|
|
10
|
+
destination,
|
|
11
|
+
path,
|
|
12
|
+
interface: iface,
|
|
13
|
+
member,
|
|
14
|
+
signature,
|
|
15
|
+
body,
|
|
16
|
+
flags: dbus.MessageFlag.NO_AUTO_START,
|
|
17
|
+
});
|
|
18
|
+
let timer;
|
|
19
|
+
try {
|
|
20
|
+
return await Promise.race([
|
|
21
|
+
bus.call(message),
|
|
22
|
+
new Promise((_, reject) => {
|
|
23
|
+
timer = setTimeout(() => reject(new Error(`D-Bus: ${member} не ответил`)), 3000);
|
|
24
|
+
}),
|
|
25
|
+
]);
|
|
26
|
+
}
|
|
27
|
+
finally {
|
|
28
|
+
clearTimeout(timer);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Watch service restarts (Plasma or kglobalaccel), and its initial presence. */
|
|
32
|
+
export async function watchName(bus, name, appeared) {
|
|
33
|
+
const proxy = await bus.getProxyObject("org.freedesktop.DBus", "/org/freedesktop/DBus");
|
|
34
|
+
const daemon = proxy.getInterface("org.freedesktop.DBus");
|
|
35
|
+
const invoke = () => {
|
|
36
|
+
void appeared().catch((error) => console.error(`${name}:`, error.message));
|
|
37
|
+
};
|
|
38
|
+
const changed = (changedName, _old, owner) => {
|
|
39
|
+
if (changedName === name && owner)
|
|
40
|
+
invoke();
|
|
41
|
+
};
|
|
42
|
+
daemon.on("NameOwnerChanged", changed);
|
|
43
|
+
if (await daemon.NameHasOwner(name))
|
|
44
|
+
await appeared();
|
|
45
|
+
return () => {
|
|
46
|
+
daemon.off("NameOwnerChanged", changed);
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import Gio from "gi:Gio-2.0";
|
|
2
|
+
import GioUnix from "gi:GioUnix-2.0";
|
|
3
|
+
export function desktopApp(id) {
|
|
4
|
+
const app = GioUnix.DesktopAppInfo.new(id);
|
|
5
|
+
if (!app || !app.shouldShow())
|
|
6
|
+
throw new Error("Приложение больше не доступно");
|
|
7
|
+
return app;
|
|
8
|
+
}
|
|
9
|
+
export function listApplications() {
|
|
10
|
+
return Gio.AppInfo.getAll()
|
|
11
|
+
.filter((app) => app.shouldShow() && app.getId())
|
|
12
|
+
.map((app) => {
|
|
13
|
+
const id = app.getId();
|
|
14
|
+
const desktop = GioUnix.DesktopAppInfo.new(id);
|
|
15
|
+
// GLib 2.80 moved this class from Gio; older typelibs incorrectly expose
|
|
16
|
+
// its instance methods as static in generated GioUnix declarations.
|
|
17
|
+
const keywordApp = desktop;
|
|
18
|
+
return {
|
|
19
|
+
id: `app:${id}`,
|
|
20
|
+
name: app.getDisplayName(),
|
|
21
|
+
description: app.getDescription() || "приложение",
|
|
22
|
+
keywords: [app.getExecutable() || "", ...(keywordApp?.getKeywords() || [])].join(" "),
|
|
23
|
+
kind: "application",
|
|
24
|
+
icon: `/api/launcher/icon?id=${encodeURIComponent(id)}`,
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export function launchApplication(id) {
|
|
29
|
+
// GIO handles Exec field codes, Terminal=true and D-Bus activation.
|
|
30
|
+
if (!desktopApp(id).launch([], new Gio.AppLaunchContext()))
|
|
31
|
+
throw new Error("Не удалось запустить приложение");
|
|
32
|
+
}
|
|
33
|
+
export async function applicationIcon(id) {
|
|
34
|
+
const icon = desktopApp(id).getIcon();
|
|
35
|
+
if (icon instanceof Gio.FileIcon)
|
|
36
|
+
return icon.getFile().getPath() || "";
|
|
37
|
+
const { default: Gtk } = await import("gi:Gtk-4.0");
|
|
38
|
+
const { default: Gdk } = await import("gi:Gdk-4.0");
|
|
39
|
+
Gtk.init();
|
|
40
|
+
const display = Gdk.Display.getDefault();
|
|
41
|
+
if (!display || !icon)
|
|
42
|
+
return "";
|
|
43
|
+
return (Gtk.IconTheme.getForDisplay(display)
|
|
44
|
+
.lookupByGicon(icon, 48, 1, Gtk.TextDirection.NONE, Gtk.IconLookupFlags.PRELOAD)
|
|
45
|
+
.getFile()
|
|
46
|
+
?.getPath() || "");
|
|
47
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { homedir } from "node:os";
|
|
2
|
+
import { join } from "node:path";
|
|
3
|
+
import { execFile } from "node:child_process";
|
|
4
|
+
import { promisify } from "node:util";
|
|
5
|
+
const execute = promisify(execFile);
|
|
6
|
+
export { xdgDataHome as dataHome, configHome } from "../../../os-posix/index.js";
|
|
7
|
+
import { xdgDataHome as dataHome } from "../../../os-posix/index.js";
|
|
8
|
+
export function shell() {
|
|
9
|
+
return process.env.SHELL || "/bin/bash";
|
|
10
|
+
}
|
|
11
|
+
export function shellLaunch(spec) {
|
|
12
|
+
const file = shell();
|
|
13
|
+
if (spec.kind === "command")
|
|
14
|
+
return { file, args: ["-c", spec.command] };
|
|
15
|
+
if (spec.kind === "program")
|
|
16
|
+
return { file, args: ["-i", "-c", `exec ${spec.executable}`] };
|
|
17
|
+
return { file, args: ["-i"] };
|
|
18
|
+
}
|
|
19
|
+
export function desktopPaths() {
|
|
20
|
+
return {
|
|
21
|
+
applications: join(dataHome(), "applications"),
|
|
22
|
+
icons: join(dataHome(), "icons/hicolor"),
|
|
23
|
+
bin: join(homedir(), ".local/bin"),
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export async function pickFolder() {
|
|
27
|
+
const dialogs = [
|
|
28
|
+
{ bin: "zenity", args: ["--file-selection", "--directory", "--title=Выберите проект"] },
|
|
29
|
+
{ bin: "yad", args: ["--file-selection", "--directory", "--title=Выберите проект"] },
|
|
30
|
+
{ bin: "kdialog", args: ["--getexistingdirectory", homedir(), "Выберите проект"] },
|
|
31
|
+
];
|
|
32
|
+
for (const dialog of dialogs) {
|
|
33
|
+
try {
|
|
34
|
+
const { stdout } = await execute(dialog.bin, dialog.args, {
|
|
35
|
+
timeout: 180000,
|
|
36
|
+
env: process.env,
|
|
37
|
+
});
|
|
38
|
+
return stdout.trim() || null;
|
|
39
|
+
}
|
|
40
|
+
catch (error) {
|
|
41
|
+
const code = error.code;
|
|
42
|
+
if (String(code) === "1")
|
|
43
|
+
return null;
|
|
44
|
+
if (code !== "ENOENT")
|
|
45
|
+
throw error;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
throw new Error("Нет zenity / yad / kdialog для выбора папки");
|
|
49
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { execFileSync } from "node:child_process";
|
|
2
|
+
import { commandExists } from "../../../os-posix/index.js";
|
|
3
|
+
function unitExists(unit) {
|
|
4
|
+
try {
|
|
5
|
+
execFileSync("systemctl", ["--user", "cat", unit], { stdio: "ignore", timeout: 3000 });
|
|
6
|
+
return true;
|
|
7
|
+
}
|
|
8
|
+
catch {
|
|
9
|
+
return false;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
/** Rootless Docker and Docker Desktop are user units; the system daemon needs root rights. */
|
|
13
|
+
export function dockerStartPlan() {
|
|
14
|
+
if (!commandExists("docker"))
|
|
15
|
+
return {
|
|
16
|
+
label: "Docker не установлен",
|
|
17
|
+
manual: "Установите Docker Engine: https://docs.docker.com/engine/install/",
|
|
18
|
+
};
|
|
19
|
+
if (!commandExists("systemctl"))
|
|
20
|
+
return {
|
|
21
|
+
label: "Запустить daemon",
|
|
22
|
+
manual: "Запустите daemon вручную: sudo service docker start",
|
|
23
|
+
};
|
|
24
|
+
if (unitExists("docker.service"))
|
|
25
|
+
return {
|
|
26
|
+
label: "systemctl --user start docker",
|
|
27
|
+
command: "systemctl",
|
|
28
|
+
args: ["--user", "start", "docker"],
|
|
29
|
+
};
|
|
30
|
+
if (unitExists("docker-desktop.service"))
|
|
31
|
+
return {
|
|
32
|
+
label: "systemctl --user start docker-desktop",
|
|
33
|
+
command: "systemctl",
|
|
34
|
+
args: ["--user", "start", "docker-desktop"],
|
|
35
|
+
};
|
|
36
|
+
if (process.getuid?.() === 0)
|
|
37
|
+
return { label: "systemctl start docker", command: "systemctl", args: ["start", "docker"] };
|
|
38
|
+
if (commandExists("pkexec"))
|
|
39
|
+
return {
|
|
40
|
+
label: "systemctl start docker (запросит пароль)",
|
|
41
|
+
command: "pkexec",
|
|
42
|
+
args: ["systemctl", "start", "docker"],
|
|
43
|
+
};
|
|
44
|
+
return {
|
|
45
|
+
label: "Запустить daemon",
|
|
46
|
+
manual: "Выполните в терминале: sudo systemctl start docker",
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
export { processInfo, signalProcess, processIdentity, listProcesses, listProcesses as snapshotProcesses, recentProcesses, trackConsole, untrackConsole, descendants, descendants as descendantsSync, workingDirectory, workingDirectories, } from "./processes.js";
|
|
2
|
+
export { moveNoReplace, runPython, searchFiles, runBash, runDocker, runDockerSync, runNodeScript, commandExists, ptyCommand, spawnProcess, isExecutableFile, restrictToOwner, restrictToOwnerSync, } from "./tools.js";
|
|
3
|
+
export { dockerStartPlan } from "./docker.js";
|
|
4
|
+
export { configHome, dataHome, shell, shellLaunch, desktopPaths, pickFolder, } from "./directories.js";
|
|
5
|
+
export { focusAppWindow, openWindow, openBrowser, revealInFileManager, openOrFocusApp, hidePalette, openWebPalette, closePalette, activateWindow, activateSurface, } from "./windows.js";
|
|
6
|
+
export const catalog = () => import(new URL("./catalog.js", import.meta.url).href);
|
|
7
|
+
export const resident = () => import(new URL("./resident.js", import.meta.url).href);
|
|
8
|
+
export async function desktopPid(service) {
|
|
9
|
+
if (!process.env.DBUS_SESSION_BUS_ADDRESS)
|
|
10
|
+
return;
|
|
11
|
+
const { sessionBus, call } = await import(new URL("./bus.js", import.meta.url).href);
|
|
12
|
+
const bus = sessionBus();
|
|
13
|
+
try {
|
|
14
|
+
const reply = await call(bus, "org.freedesktop.DBus", "/org/freedesktop/DBus", "org.freedesktop.DBus", "GetConnectionUnixProcessID", "s", [service]);
|
|
15
|
+
return reply?.body[0];
|
|
16
|
+
}
|
|
17
|
+
catch {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
finally {
|
|
21
|
+
bus.disconnect();
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
export async function shortcutStatus() {
|
|
25
|
+
const { shortcutStatus } = await import(new URL("./shortcut.js", import.meta.url).href);
|
|
26
|
+
const { sessionBus } = await import(new URL("./bus.js", import.meta.url).href);
|
|
27
|
+
const bus = sessionBus();
|
|
28
|
+
try {
|
|
29
|
+
return await shortcutStatus(bus);
|
|
30
|
+
}
|
|
31
|
+
finally {
|
|
32
|
+
bus.disconnect();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
export async function shortcutAvailable(shortcut) {
|
|
36
|
+
const { available } = await import(new URL("./shortcut.js", import.meta.url).href);
|
|
37
|
+
const { sessionBus } = await import(new URL("./bus.js", import.meta.url).href);
|
|
38
|
+
const bus = sessionBus();
|
|
39
|
+
try {
|
|
40
|
+
return await available(bus, shortcut);
|
|
41
|
+
}
|
|
42
|
+
finally {
|
|
43
|
+
bus.disconnect();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export { gitAskpass, publishDirectory, removeAgentHostAddress } from "../../../os-posix/index.js";
|
|
47
|
+
export { installDesktop } from "./install-desktop.js";
|
|
48
|
+
export { agentEnv, agentLaunch, agentHostAddress, killAgentTree, spawnAgentHost, spawnAgentProcess, } from "../../../os-posix/index.js";
|
|
49
|
+
const secrets = () => import(new URL("./secrets.js", import.meta.url).href);
|
|
50
|
+
export const secretsAvailable = async () => (await secrets()).secretsAvailable();
|
|
51
|
+
export const getSecret = async (...args) => (await secrets()).getSecret(...args);
|
|
52
|
+
export const setSecret = async (...args) => (await secrets()).setSecret(...args);
|
|
53
|
+
export const deleteSecret = async (...args) => (await secrets()).deleteSecret(...args);
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { copyFileSync, mkdirSync, chmodSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { execFileSync } from "node:child_process";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { desktopPaths } from "./directories.js";
|
|
5
|
+
export function installDesktop(root) {
|
|
6
|
+
const BIN = join(root, "bin/projector");
|
|
7
|
+
const ICON_SRC = join(root, "resources/icons");
|
|
8
|
+
const { applications: APPLICATIONS, icons: ICONS, bin: LOCAL_BIN } = desktopPaths();
|
|
9
|
+
function ensureDir(path) {
|
|
10
|
+
mkdirSync(path, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
function tryExec(bin, args) {
|
|
13
|
+
try {
|
|
14
|
+
execFileSync(bin, args, { stdio: "ignore" });
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
/* optional */
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function installIcons() {
|
|
21
|
+
const svg = join(ICON_SRC, "projector.svg");
|
|
22
|
+
ensureDir(join(ICONS, "scalable/apps"));
|
|
23
|
+
copyFileSync(svg, join(ICONS, "scalable/apps/projector.svg"));
|
|
24
|
+
for (const size of [16, 32, 48, 64, 128, 256, 512]) {
|
|
25
|
+
const png = join(ICON_SRC, `${size}.png`);
|
|
26
|
+
const destDir = join(ICONS, `${size}x${size}/apps`);
|
|
27
|
+
ensureDir(destDir);
|
|
28
|
+
copyFileSync(png, join(destDir, "projector.png"));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function installDesktopEntry() {
|
|
32
|
+
ensureDir(APPLICATIONS);
|
|
33
|
+
const icon = join(ICONS, "512x512/apps/projector.png");
|
|
34
|
+
const body = `[Desktop Entry]
|
|
35
|
+
Type=Application
|
|
36
|
+
Version=1.0
|
|
37
|
+
Name=Projector
|
|
38
|
+
Comment=Поиск и запуск приложений и проектов
|
|
39
|
+
Exec="${BIN.replace(/([\\"`$])/g, "\\$1").replace(/%/g, "%%")}"
|
|
40
|
+
TryExec=${BIN}
|
|
41
|
+
Icon=${icon}
|
|
42
|
+
Terminal=false
|
|
43
|
+
Categories=Utility;Development;
|
|
44
|
+
Keywords=applications;search;vite;pnpm;projects;launcher;
|
|
45
|
+
StartupNotify=true
|
|
46
|
+
StartupWMClass=Projector
|
|
47
|
+
SingleMainWindow=true
|
|
48
|
+
X-GNOME-SingleWindow=true
|
|
49
|
+
DBusActivatable=false
|
|
50
|
+
`;
|
|
51
|
+
writeFileSync(join(APPLICATIONS, "projector.desktop"), body);
|
|
52
|
+
}
|
|
53
|
+
function installBin() {
|
|
54
|
+
chmodSync(BIN, 0o755);
|
|
55
|
+
ensureDir(LOCAL_BIN);
|
|
56
|
+
execFileSync("ln", ["-sfn", BIN, join(LOCAL_BIN, "projector")]);
|
|
57
|
+
}
|
|
58
|
+
installIcons();
|
|
59
|
+
installDesktopEntry();
|
|
60
|
+
installBin();
|
|
61
|
+
tryExec("update-desktop-database", [APPLICATIONS]);
|
|
62
|
+
tryExec("gtk-update-icon-cache", ["-f", ICONS]);
|
|
63
|
+
console.log(`пункт меню: ${join(APPLICATIONS, "projector.desktop")}`);
|
|
64
|
+
console.log(`команда: ${join(LOCAL_BIN, "projector")}`);
|
|
65
|
+
console.log("можно закрепить Projector в меню пуска");
|
|
66
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { readdirSync, readFileSync } from "node:fs";
|
|
2
|
+
import { readlink } from "node:fs/promises";
|
|
3
|
+
export function processInfo(pid) {
|
|
4
|
+
if (!Number.isSafeInteger(pid) || pid <= 0)
|
|
5
|
+
return null;
|
|
6
|
+
try {
|
|
7
|
+
const stat = readFileSync(`/proc/${pid}/stat`, "utf8");
|
|
8
|
+
const end = stat.lastIndexOf(")");
|
|
9
|
+
const fields = stat.slice(end + 2).split(" ");
|
|
10
|
+
return {
|
|
11
|
+
pid,
|
|
12
|
+
parent: Number(fields[1]),
|
|
13
|
+
name: stat.slice(stat.indexOf("(") + 1, end),
|
|
14
|
+
started: fields[19],
|
|
15
|
+
state: fields[0],
|
|
16
|
+
group: Number(fields[2]),
|
|
17
|
+
foreground: Number(fields[5]),
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
if (["ENOENT", "ESRCH", "EACCES"].includes(error.code ?? ""))
|
|
22
|
+
return null;
|
|
23
|
+
throw error;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
export function processIdentity(pid) {
|
|
27
|
+
const info = processInfo(pid);
|
|
28
|
+
return info && info.state !== "Z" ? info.started : null;
|
|
29
|
+
}
|
|
30
|
+
export function listProcesses() {
|
|
31
|
+
try {
|
|
32
|
+
return readdirSync("/proc")
|
|
33
|
+
.filter((name) => /^\d+$/.test(name))
|
|
34
|
+
.flatMap((name) => {
|
|
35
|
+
try {
|
|
36
|
+
const info = processInfo(Number(name));
|
|
37
|
+
return info ? [info] : [];
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
return [];
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch {
|
|
45
|
+
return null;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
export function descendants(pid) {
|
|
49
|
+
const processes = listProcesses() ?? [];
|
|
50
|
+
const family = new Set([pid]);
|
|
51
|
+
let changed = true;
|
|
52
|
+
while (changed) {
|
|
53
|
+
changed = false;
|
|
54
|
+
for (const entry of processes)
|
|
55
|
+
if (family.has(entry.parent) && !family.has(entry.pid)) {
|
|
56
|
+
family.add(entry.pid);
|
|
57
|
+
changed = true;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return processes.filter((entry) => family.has(entry.pid));
|
|
61
|
+
}
|
|
62
|
+
export async function workingDirectory(pid, fallback) {
|
|
63
|
+
const foreground = processInfo(pid)?.foreground ?? 0;
|
|
64
|
+
try {
|
|
65
|
+
return await readlink(`/proc/${foreground > 0 ? foreground : pid}/cwd`);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
try {
|
|
69
|
+
return await readlink(`/proc/${pid}/cwd`);
|
|
70
|
+
}
|
|
71
|
+
catch {
|
|
72
|
+
return fallback;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
export function signalProcess(pid, signal) {
|
|
77
|
+
process.kill(pid, signal);
|
|
78
|
+
}
|
|
79
|
+
/** Linux parents every program to its shell; nothing needs tracking. */
|
|
80
|
+
export function trackConsole(_pid) { }
|
|
81
|
+
export function untrackConsole(_pid) { }
|
|
82
|
+
export const recentProcesses = (_maxAgeMs) => listProcesses();
|
|
83
|
+
export async function workingDirectories(pid, fallback) {
|
|
84
|
+
return [await workingDirectory(pid, fallback)];
|
|
85
|
+
}
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import dbus from "dbus-next";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import { join } from "node:path";
|
|
4
|
+
import { sessionBus, call } from "./bus.js";
|
|
5
|
+
import { Shortcut } from "./shortcut.js";
|
|
6
|
+
import { startTray } from "./tray.js";
|
|
7
|
+
const name = "dev.projector.Launcher";
|
|
8
|
+
const path = "/dev/projector/Launcher";
|
|
9
|
+
const iface = "dev.projector.Launcher.Control";
|
|
10
|
+
const actions = ["show", "toggle", "tray", "quit"];
|
|
11
|
+
class Control extends dbus.interface.Interface {
|
|
12
|
+
dispatch;
|
|
13
|
+
constructor(dispatch) {
|
|
14
|
+
super(iface);
|
|
15
|
+
this.dispatch = dispatch;
|
|
16
|
+
}
|
|
17
|
+
async Command(action) {
|
|
18
|
+
if (!actions.includes(action))
|
|
19
|
+
throw new dbus.DBusError(`${iface}.Error`, "Неизвестная команда");
|
|
20
|
+
await this.dispatch(action);
|
|
21
|
+
return "READY";
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
Control.configureMembers({ methods: { Command: { inSignature: "s", outSignature: "s" } } });
|
|
25
|
+
export async function runResident(baseUrl, action, options) {
|
|
26
|
+
if (!actions.includes(action))
|
|
27
|
+
throw new Error("Неизвестная команда");
|
|
28
|
+
const bus = sessionBus();
|
|
29
|
+
const owner = await bus.requestName(name, dbus.NameFlag.DO_NOT_QUEUE);
|
|
30
|
+
if (owner !== dbus.RequestNameReply.PRIMARY_OWNER) {
|
|
31
|
+
try {
|
|
32
|
+
// A concurrent first invocation may own the name before exporting Control.
|
|
33
|
+
for (let attempt = 0;; attempt++) {
|
|
34
|
+
try {
|
|
35
|
+
await call(bus, name, path, iface, "Command", "s", [action]);
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
catch (error) {
|
|
39
|
+
if (!(error instanceof dbus.DBusError) ||
|
|
40
|
+
![
|
|
41
|
+
"org.freedesktop.DBus.Error.UnknownObject",
|
|
42
|
+
"org.freedesktop.DBus.Error.UnknownMethod",
|
|
43
|
+
].includes(error.type) ||
|
|
44
|
+
attempt >= 40)
|
|
45
|
+
throw error;
|
|
46
|
+
await new Promise((resolve) => setTimeout(resolve, 50));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
console.log("READY");
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
bus.disconnect();
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (action === "quit") {
|
|
57
|
+
console.log("READY");
|
|
58
|
+
bus.disconnect();
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
let palette;
|
|
62
|
+
let pulse;
|
|
63
|
+
const getPalette = () => (palette ??= createPalette());
|
|
64
|
+
async function createPalette() {
|
|
65
|
+
if (!options.webPalette) {
|
|
66
|
+
const { default: Gtk } = await import("gi:Gtk-4.0");
|
|
67
|
+
const { default: GLib } = await import("gi:GLib-2.0");
|
|
68
|
+
Gtk.init();
|
|
69
|
+
const context = GLib.MainContext.default();
|
|
70
|
+
let lastActive = Date.now();
|
|
71
|
+
const pump = () => {
|
|
72
|
+
for (let step = 0; step < 64 && context.iteration(false); step++)
|
|
73
|
+
lastActive = Date.now();
|
|
74
|
+
pulse = setTimeout(pump, Date.now() - lastActive < 2000 ? 10 : 50);
|
|
75
|
+
};
|
|
76
|
+
pump();
|
|
77
|
+
}
|
|
78
|
+
return options.createPalette(baseUrl);
|
|
79
|
+
}
|
|
80
|
+
const invoke = (run) => {
|
|
81
|
+
void getPalette()
|
|
82
|
+
.then(run)
|
|
83
|
+
.catch((error) => console.error("Палитра:", error.message));
|
|
84
|
+
};
|
|
85
|
+
let stopping = false;
|
|
86
|
+
const shortcut = new Shortcut(bus, async () => {
|
|
87
|
+
try {
|
|
88
|
+
return (JSON.parse(await readFile(join(options.dataDirectory, "launcher.json"), "utf8"))
|
|
89
|
+
.shortcut ?? "Ctrl+Alt+Space");
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return "Ctrl+Alt+Space";
|
|
93
|
+
}
|
|
94
|
+
}, () => {
|
|
95
|
+
invoke((item) => item.invokeSelected(true));
|
|
96
|
+
});
|
|
97
|
+
const removeTray = await startTray(bus, () => {
|
|
98
|
+
invoke((item) => item.invokeSelected());
|
|
99
|
+
}, (path) => invoke((item) => item.openPage(path)), () => {
|
|
100
|
+
invoke((item) => item.quitProjector());
|
|
101
|
+
}, () => {
|
|
102
|
+
invoke((item) => item.restartProjector());
|
|
103
|
+
});
|
|
104
|
+
await shortcut.start().catch((error) => console.error("Хоткей:", error.message));
|
|
105
|
+
async function stop() {
|
|
106
|
+
if (stopping)
|
|
107
|
+
return;
|
|
108
|
+
stopping = true;
|
|
109
|
+
await shortcut.stop();
|
|
110
|
+
if (palette)
|
|
111
|
+
(await palette.catch(() => undefined))?.dispose();
|
|
112
|
+
clearTimeout(pulse);
|
|
113
|
+
removeTray();
|
|
114
|
+
bus.disconnect();
|
|
115
|
+
}
|
|
116
|
+
const dispatch = async (requested) => {
|
|
117
|
+
if (requested === "quit") {
|
|
118
|
+
// Send the D-Bus reply before closing its connection.
|
|
119
|
+
setTimeout(() => {
|
|
120
|
+
void stop();
|
|
121
|
+
}, 50);
|
|
122
|
+
}
|
|
123
|
+
else if (requested === "tray")
|
|
124
|
+
await shortcut.configure();
|
|
125
|
+
else if (requested === "toggle")
|
|
126
|
+
await (await getPalette()).toggle();
|
|
127
|
+
else
|
|
128
|
+
await (await getPalette()).show();
|
|
129
|
+
};
|
|
130
|
+
bus.export(path, new Control(dispatch));
|
|
131
|
+
process.once("SIGTERM", () => {
|
|
132
|
+
void stop();
|
|
133
|
+
});
|
|
134
|
+
process.once("SIGINT", () => {
|
|
135
|
+
void stop();
|
|
136
|
+
});
|
|
137
|
+
await dispatch(action);
|
|
138
|
+
console.log("READY");
|
|
139
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import dbus from "dbus-next";
|
|
2
|
+
const SERVICE = "org.freedesktop.secrets";
|
|
3
|
+
const ROOT = "/org/freedesktop/secrets";
|
|
4
|
+
const PROMPT_TIMEOUT = 120_000;
|
|
5
|
+
const CALL_TIMEOUT = 5_000;
|
|
6
|
+
const attributes = ({ service, account }) => ({
|
|
7
|
+
application: "projector",
|
|
8
|
+
service,
|
|
9
|
+
account,
|
|
10
|
+
});
|
|
11
|
+
function withTimeout(promise, ms, what) {
|
|
12
|
+
let timer;
|
|
13
|
+
return Promise.race([
|
|
14
|
+
promise,
|
|
15
|
+
new Promise((_, reject) => {
|
|
16
|
+
timer = setTimeout(() => reject(new Error(`Secret Service: ${what} не ответил`)), ms);
|
|
17
|
+
}),
|
|
18
|
+
]).finally(() => clearTimeout(timer));
|
|
19
|
+
}
|
|
20
|
+
/** Waits for the user to answer a keyring unlock/confirmation dialog. */
|
|
21
|
+
async function runPrompt(bus, path) {
|
|
22
|
+
if (path === "/")
|
|
23
|
+
return true;
|
|
24
|
+
const object = await bus.getProxyObject(SERVICE, path);
|
|
25
|
+
const prompt = object.getInterface("org.freedesktop.Secret.Prompt");
|
|
26
|
+
const done = new Promise((resolve) => {
|
|
27
|
+
prompt.once("Completed", (dismissed) => resolve(!dismissed));
|
|
28
|
+
});
|
|
29
|
+
await prompt.Prompt("");
|
|
30
|
+
return withTimeout(done, PROMPT_TIMEOUT, "диалог разблокировки");
|
|
31
|
+
}
|
|
32
|
+
async function withService(action) {
|
|
33
|
+
if (!process.env.DBUS_SESSION_BUS_ADDRESS)
|
|
34
|
+
throw new Error("Session D-Bus недоступна");
|
|
35
|
+
const bus = dbus.sessionBus();
|
|
36
|
+
bus.on("error", () => { });
|
|
37
|
+
try {
|
|
38
|
+
const object = await withTimeout(bus.getProxyObject(SERVICE, ROOT), CALL_TIMEOUT, "подключение");
|
|
39
|
+
const service = object.getInterface("org.freedesktop.Secret.Service");
|
|
40
|
+
// `plain` keeps the secret off disk; the transport is the user's private session bus.
|
|
41
|
+
const opened = await withTimeout(service.OpenSession("plain", new dbus.Variant("s", "")), CALL_TIMEOUT, "OpenSession");
|
|
42
|
+
const session = opened[1];
|
|
43
|
+
return await action({ bus, service, session });
|
|
44
|
+
}
|
|
45
|
+
finally {
|
|
46
|
+
bus.disconnect();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function defaultCollection(bus, service) {
|
|
50
|
+
const path = await service.ReadAlias("default");
|
|
51
|
+
if (path === "/")
|
|
52
|
+
throw new Error("В системном хранилище нет коллекции по умолчанию");
|
|
53
|
+
const object = await bus.getProxyObject(SERVICE, path);
|
|
54
|
+
const properties = object.getInterface("org.freedesktop.DBus.Properties");
|
|
55
|
+
const locked = (await properties.Get("org.freedesktop.Secret.Collection", "Locked")).value;
|
|
56
|
+
if (locked) {
|
|
57
|
+
const [, prompt] = await service.Unlock([path]);
|
|
58
|
+
if (!(await runPrompt(bus, prompt)))
|
|
59
|
+
throw new Error("Хранилище секретов не разблокировано");
|
|
60
|
+
}
|
|
61
|
+
return { path, collection: object.getInterface("org.freedesktop.Secret.Collection") };
|
|
62
|
+
}
|
|
63
|
+
async function find(service, key) {
|
|
64
|
+
const [unlocked, locked] = await service.SearchItems(attributes(key));
|
|
65
|
+
return { unlocked, locked };
|
|
66
|
+
}
|
|
67
|
+
async function unlockItems(bus, service, items) {
|
|
68
|
+
if (!items.length)
|
|
69
|
+
return;
|
|
70
|
+
const [, prompt] = await service.Unlock(items);
|
|
71
|
+
if (!(await runPrompt(bus, prompt)))
|
|
72
|
+
throw new Error("Хранилище секретов не разблокировано");
|
|
73
|
+
}
|
|
74
|
+
export async function secretsAvailable() {
|
|
75
|
+
try {
|
|
76
|
+
return await withService(async ({ service }) => (await service.ReadAlias("default")) !== "/");
|
|
77
|
+
}
|
|
78
|
+
catch {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export function getSecret(key) {
|
|
83
|
+
return withService(async ({ bus, service, session }) => {
|
|
84
|
+
const { unlocked, locked } = await find(service, key);
|
|
85
|
+
let item = unlocked[0];
|
|
86
|
+
if (!item && locked[0]) {
|
|
87
|
+
await unlockItems(bus, service, [locked[0]]);
|
|
88
|
+
item = locked[0];
|
|
89
|
+
}
|
|
90
|
+
if (!item)
|
|
91
|
+
return undefined;
|
|
92
|
+
const proxy = await bus.getProxyObject(SERVICE, item);
|
|
93
|
+
const secret = await proxy.getInterface("org.freedesktop.Secret.Item").GetSecret(session);
|
|
94
|
+
return Buffer.from(secret[2]).toString("utf8");
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
export function setSecret(key, label, value) {
|
|
98
|
+
return withService(async ({ bus, service, session }) => {
|
|
99
|
+
const { collection } = await defaultCollection(bus, service);
|
|
100
|
+
const [, prompt] = await collection.CreateItem({
|
|
101
|
+
"org.freedesktop.Secret.Item.Label": new dbus.Variant("s", label),
|
|
102
|
+
"org.freedesktop.Secret.Item.Attributes": new dbus.Variant("a{ss}", attributes(key)),
|
|
103
|
+
}, [session, [], Buffer.from(value, "utf8"), "text/plain"], true);
|
|
104
|
+
if (!(await runPrompt(bus, prompt)))
|
|
105
|
+
throw new Error("Сохранение секрета отклонено");
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
export function deleteSecret(key) {
|
|
109
|
+
return withService(async ({ bus, service }) => {
|
|
110
|
+
const { unlocked, locked } = await find(service, key);
|
|
111
|
+
await unlockItems(bus, service, locked);
|
|
112
|
+
for (const path of [...unlocked, ...locked]) {
|
|
113
|
+
const proxy = await bus.getProxyObject(SERVICE, path);
|
|
114
|
+
const prompt = await proxy.getInterface("org.freedesktop.Secret.Item").Delete();
|
|
115
|
+
await runPrompt(bus, prompt);
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
}
|