@pi-chamber/web 0.1.8
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 +43 -0
- package/bin/cli-entry.js +55 -0
- package/bin/cli-output.js +140 -0
- package/bin/cli-output.test.js +36 -0
- package/bin/cli.js +383 -0
- package/bin/cli.test.js +1065 -0
- package/bin/lib/DOCUMENTATION.md +31 -0
- package/bin/lib/cli-api-target.js +74 -0
- package/bin/lib/cli-args.js +846 -0
- package/bin/lib/cli-errors.js +18 -0
- package/bin/lib/cli-http.js +252 -0
- package/bin/lib/cli-lifecycle.js +421 -0
- package/bin/lib/cli-log-files.js +93 -0
- package/bin/lib/cli-network.js +186 -0
- package/bin/lib/cli-paths.js +128 -0
- package/bin/lib/cli-ports.js +51 -0
- package/bin/lib/cli-process.js +342 -0
- package/bin/lib/cli-startup.js +371 -0
- package/bin/lib/cli-tunnel-capabilities.js +9 -0
- package/bin/lib/cli-tunnel-profiles.js +366 -0
- package/bin/lib/cli-tunnel-utils.js +300 -0
- package/bin/lib/commands-connect-url.js +329 -0
- package/bin/lib/commands-lifecycle.js +396 -0
- package/bin/lib/commands-logs.js +110 -0
- package/bin/lib/commands-serve.js +419 -0
- package/bin/lib/commands-startup.js +64 -0
- package/bin/lib/commands-status.js +114 -0
- package/bin/lib/commands-tunnel.js +1761 -0
- package/bin/lib/commands-update.js +184 -0
- package/bin/lib/commands-update.test.js +98 -0
- package/dist/apple-touch-icon-120x120.png +0 -0
- package/dist/apple-touch-icon-152x152.png +0 -0
- package/dist/apple-touch-icon-167x167.png +0 -0
- package/dist/apple-touch-icon-180x180.png +0 -0
- package/dist/apple-touch-icon.png +0 -0
- package/dist/apple-touch-icon.svg +13 -0
- package/dist/assets/CommitSection-DGGArAb2.js +1 -0
- package/dist/assets/DiagramEditor-ig5nYV6t.js +1 -0
- package/dist/assets/DiagramView-8Qr6pwwI.js +1 -0
- package/dist/assets/DiffView-BHS4m_K7.js +18 -0
- package/dist/assets/FilesView-DmZcdwl-.js +14 -0
- package/dist/assets/GitView-gfHxmc66.js +6 -0
- package/dist/assets/JsonTreeView-DbFqka3P.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/MarkdownRendererImpl-B07lHhBl.js +12 -0
- package/dist/assets/PatchDiff-DD9pAs47.js +1 -0
- package/dist/assets/PierreDiffViewer-Bo0_BCT7.js +136 -0
- package/dist/assets/SessionSwitcherDropdown-t7WZX24f.js +1 -0
- package/dist/assets/SettingsView-CtsS4oDI.js +3 -0
- package/dist/assets/SettingsWindow-DIRGn3eQ.js +1 -0
- package/dist/assets/TerminalView-BV3KOtdA.css +1 -0
- package/dist/assets/TerminalView-DUwO1CCY.js +46 -0
- package/dist/assets/ToolOutputDialog-iZG2ey4T.js +15 -0
- package/dist/assets/ToolPartDiffPreview-FTexlZSz.js +8 -0
- package/dist/assets/VirtualizedFileDiff-DD5IznIe.js +10 -0
- package/dist/assets/Virtualizer-BxW2CJGB.js +1 -0
- package/dist/assets/abap-BdImnpbu.js +1 -0
- package/dist/assets/abap-Dg923wIy.js +1 -0
- package/dist/assets/actionscript-3-8WTK4YD2.js +1 -0
- package/dist/assets/actionscript-3-CoDkCxhg.js +1 -0
- package/dist/assets/ada-CTi7YQtL.js +1 -0
- package/dist/assets/ada-bCR0ucgS.js +1 -0
- package/dist/assets/andromeeda-C4gqWexZ.js +1 -0
- package/dist/assets/andromeeda-CT0vplkN.js +1 -0
- package/dist/assets/angular-html-CU67Zn6k.js +1 -0
- package/dist/assets/angular-html-D2R1pe45.js +1 -0
- package/dist/assets/angular-ts-BDmYQnhm.js +1 -0
- package/dist/assets/angular-ts-BwZT4LLn.js +1 -0
- package/dist/assets/apache-PcO-DBxQ.js +1 -0
- package/dist/assets/apache-Pmp26Uib.js +1 -0
- package/dist/assets/apex-CnCu5_gb.js +1 -0
- package/dist/assets/apex-D8_7TLub.js +1 -0
- package/dist/assets/apl-B4CMkyY2.js +1 -0
- package/dist/assets/apl-DkfyvC6M.js +1 -0
- package/dist/assets/apl-dKokRX4l.js +1 -0
- package/dist/assets/appThemeRegistry-BK0dHKa6.js +1 -0
- package/dist/assets/applescript-Co6uUVPk.js +1 -0
- package/dist/assets/applescript-Ds_W2jPS.js +1 -0
- package/dist/assets/ara-BRHolxvo.js +1 -0
- package/dist/assets/ara-C1--7J61.js +1 -0
- package/dist/assets/asciiarmor-Df11BRmG.js +1 -0
- package/dist/assets/asciidoc-Ve4PFQV2.js +1 -0
- package/dist/assets/asciidoc-nTfEFGxb.js +1 -0
- package/dist/assets/asm-CTFRnVOM.js +1 -0
- package/dist/assets/asm-D_Q5rh1f.js +1 -0
- package/dist/assets/asn1-EdZsLKOL.js +1 -0
- package/dist/assets/asterisk-B-8jnY81.js +1 -0
- package/dist/assets/astro-CbQHKStN.js +1 -0
- package/dist/assets/astro-DtPAdMss.js +1 -0
- package/dist/assets/aurora-x-C0VKFdlO.js +1 -0
- package/dist/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/dist/assets/awk-CrWgQKhV.js +1 -0
- package/dist/assets/awk-DMzUqQB5.js +1 -0
- package/dist/assets/ayu-dark-DYE7WIF3.js +1 -0
- package/dist/assets/ayu-dark-wZ6ORhBL.js +1 -0
- package/dist/assets/ayu-light-BA47KaF1.js +1 -0
- package/dist/assets/ayu-light-xXLJ_Ch1.js +1 -0
- package/dist/assets/ayu-mirage-32ctXXKs.js +1 -0
- package/dist/assets/ayu-mirage-CQckA_sP.js +1 -0
- package/dist/assets/ballerina-BFfxhgS-.js +1 -0
- package/dist/assets/ballerina-a0yOSyc5.js +1 -0
- package/dist/assets/bat-B0cHNp6s.js +1 -0
- package/dist/assets/bat-BkioyH1T.js +1 -0
- package/dist/assets/beancount-dPJi_gci.js +1 -0
- package/dist/assets/beancount-k_qm7-4y.js +1 -0
- package/dist/assets/berry-CVKoklHx.js +1 -0
- package/dist/assets/berry-uYugtg8r.js +1 -0
- package/dist/assets/bibtex-CHM0blh-.js +1 -0
- package/dist/assets/bibtex-DRcCXNgM.js +1 -0
- package/dist/assets/bicep-Bmn6On1c.js +1 -0
- package/dist/assets/bicep-jWz-hQ8I.js +1 -0
- package/dist/assets/bird2-DPOp833l.js +1 -0
- package/dist/assets/bird2-DaGXIRGu.js +1 -0
- package/dist/assets/blade-D4QpJJKB.js +1 -0
- package/dist/assets/blade-QlWdzBxO.js +1 -0
- package/dist/assets/brainfuck-C4LP7Hcl.js +1 -0
- package/dist/assets/bsl-BO_Y6i37.js +1 -0
- package/dist/assets/bsl-jNujDQK2.js +1 -0
- package/dist/assets/c-BG-tZi7o.js +1 -0
- package/dist/assets/c-BIGW1oBm.js +1 -0
- package/dist/assets/c3-Fcb8_HKm.js +1 -0
- package/dist/assets/c3-eo99z4R2.js +1 -0
- package/dist/assets/cadence-BuaeHeSu.js +1 -0
- package/dist/assets/cadence-Bv_4Rxtq.js +1 -0
- package/dist/assets/cairo-BYiDgOF2.js +1 -0
- package/dist/assets/cairo-KRGpt6FW.js +1 -0
- package/dist/assets/catppuccin-frappe-CfssSZMA.js +1 -0
- package/dist/assets/catppuccin-frappe-DFWUc33u.js +1 -0
- package/dist/assets/catppuccin-latte-C9dUb6Cb.js +1 -0
- package/dist/assets/catppuccin-latte-DoBaWTGn.js +1 -0
- package/dist/assets/catppuccin-macchiato-BkAuvdZC.js +1 -0
- package/dist/assets/catppuccin-macchiato-DQyhUUbL.js +1 -0
- package/dist/assets/catppuccin-mocha-D87Tk5Gz.js +1 -0
- package/dist/assets/catppuccin-mocha-D9fcC0iT.js +1 -0
- package/dist/assets/clarity-CC_0IFDj.js +1 -0
- package/dist/assets/clarity-D53aC0YG.js +1 -0
- package/dist/assets/clike-B9uivgTg.js +1 -0
- package/dist/assets/clojure-BMjYHr_A.js +1 -0
- package/dist/assets/clojure-KnfDkB_V.js +1 -0
- package/dist/assets/clojure-P80f7IUj.js +1 -0
- package/dist/assets/cmake-BQqOBYOt.js +1 -0
- package/dist/assets/cmake-D1j8_8rp.js +1 -0
- package/dist/assets/cmake-bh2MLnkv.js +1 -0
- package/dist/assets/cobol-CWcv1MsR.js +1 -0
- package/dist/assets/cobol-dIXRVV9Y.js +1 -0
- package/dist/assets/cobol-nwyudZeR.js +1 -0
- package/dist/assets/codeowners-Bp6g37R7.js +1 -0
- package/dist/assets/codeowners-CtwIM3TN.js +1 -0
- package/dist/assets/codeql-D164juXQ.js +1 -0
- package/dist/assets/codeql-DsOJ9woJ.js +1 -0
- package/dist/assets/coffee-Bk-z6oI_.js +1 -0
- package/dist/assets/coffee-Ch7k5sss.js +1 -0
- package/dist/assets/coffeescript-S37ZYGWr.js +1 -0
- package/dist/assets/collapsible-ODWWxk4f.js +1 -0
- package/dist/assets/common-lisp-Cg-RD9OK.js +1 -0
- package/dist/assets/common-lisp-DXc9XcIM.js +1 -0
- package/dist/assets/commonlisp-DBKNyK5s.js +1 -0
- package/dist/assets/computeVirtualFileMetrics-DdXkLFAD.js +3 -0
- package/dist/assets/contextFileOpenGuard-uC4OerzL.js +1 -0
- package/dist/assets/coq-BBL5-mG4.js +1 -0
- package/dist/assets/coq-DkFqJrB1.js +1 -0
- package/dist/assets/cpp-C0lzDePx.js +1 -0
- package/dist/assets/cpp-CofmeUqb.js +1 -0
- package/dist/assets/crystal-Bhade0k2.js +1 -0
- package/dist/assets/crystal-SjHAIU92.js +1 -0
- package/dist/assets/crystal-tKQVLTB8.js +1 -0
- package/dist/assets/csharp-B7nLXyi8.js +1 -0
- package/dist/assets/csharp-COcwbKMJ.js +1 -0
- package/dist/assets/css-BnMrqG3P.js +1 -0
- package/dist/assets/css-DPfMkruS.js +1 -0
- package/dist/assets/css-PZBBrkI0.js +1 -0
- package/dist/assets/csv-D5aBhKLr.js +1 -0
- package/dist/assets/csv-fuZLfV_i.js +1 -0
- package/dist/assets/cue-D82EKSYY.js +1 -0
- package/dist/assets/cue-WCin6O4e.js +1 -0
- package/dist/assets/cypher-COkxafJQ.js +1 -0
- package/dist/assets/cypher-C_CwsFkJ.js +1 -0
- package/dist/assets/cypher-DYQk2G82.js +1 -0
- package/dist/assets/d-85-TOEBH.js +1 -0
- package/dist/assets/d-DVc-yF-l.js +1 -0
- package/dist/assets/d-pRatUO7H.js +1 -0
- package/dist/assets/dark-plus-C3mMm8J8.js +1 -0
- package/dist/assets/dark-plus-DLU5INA3.js +1 -0
- package/dist/assets/dart-CF10PKvl.js +1 -0
- package/dist/assets/dart-YLd5yyRs.js +1 -0
- package/dist/assets/dax-CEL-wOlO.js +1 -0
- package/dist/assets/dax-oldcCaJg.js +1 -0
- package/dist/assets/desktop-BmXAJ9_W.js +1 -0
- package/dist/assets/desktop-DZfyBMgF.js +1 -0
- package/dist/assets/diff-D97Zzqfu.js +1 -0
- package/dist/assets/diff-DbItnlRl.js +1 -0
- package/dist/assets/diff-jW5kmiru.js +1 -0
- package/dist/assets/docker-BcOcwvcX.js +1 -0
- package/dist/assets/docker-DG9neUKd.js +1 -0
- package/dist/assets/dockerfile-BKs6k2Af.js +1 -0
- package/dist/assets/document-attachments-BslE4Ns7.js +30 -0
- package/dist/assets/dotenv-Bea-FkXq.js +1 -0
- package/dist/assets/dotenv-Da5cRb03.js +1 -0
- package/dist/assets/dracula-BzJJZx-M.js +1 -0
- package/dist/assets/dracula-XcYHBZy6.js +1 -0
- package/dist/assets/dracula-soft-BPeX9gxW.js +1 -0
- package/dist/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/dist/assets/dream-maker-BtqSS_iP.js +1 -0
- package/dist/assets/dream-maker-DAHQwpwp.js +1 -0
- package/dist/assets/dtd-DF_7sFjM.js +1 -0
- package/dist/assets/dylan-DwRh75JA.js +1 -0
- package/dist/assets/ebnf-CDyGwa7X.js +1 -0
- package/dist/assets/ecl-Cabwm37j.js +1 -0
- package/dist/assets/edge-BkV0erSs.js +1 -0
- package/dist/assets/edge-zt3dU95k.js +1 -0
- package/dist/assets/eiffel-CnydiIhH.js +1 -0
- package/dist/assets/elixir-CDX3lj18.js +1 -0
- package/dist/assets/elixir-JolcG37e.js +1 -0
- package/dist/assets/elm-BjIDgKzz.js +1 -0
- package/dist/assets/elm-DbKCFpqz.js +1 -0
- package/dist/assets/elm-vLlmbW-K.js +1 -0
- package/dist/assets/emacs-lisp-C9XAeP06.js +1 -0
- package/dist/assets/emacs-lisp-DMBh55R4.js +1 -0
- package/dist/assets/erb-B12qg9BL.js +1 -0
- package/dist/assets/erb-rsjdL4fB.js +1 -0
- package/dist/assets/erlang-BNw1qcRV.js +1 -0
- package/dist/assets/erlang-DNeY46SW.js +1 -0
- package/dist/assets/erlang-DsQrWhSR.js +1 -0
- package/dist/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/dist/assets/everforest-dark-WOub3wle.js +1 -0
- package/dist/assets/everforest-light-C8M2exoo.js +1 -0
- package/dist/assets/everforest-light-DCUg8VH8.js +1 -0
- package/dist/assets/factor-kuTfRLto.js +1 -0
- package/dist/assets/fcl-Kvtd6kyn.js +1 -0
- package/dist/assets/fennel-BYunw83y.js +1 -0
- package/dist/assets/fennel-DBMsxtrh.js +1 -0
- package/dist/assets/fish-BvzEVeQv.js +1 -0
- package/dist/assets/fish-BxskpYPN.js +1 -0
- package/dist/assets/fluent-Bwo2XpEt.js +1 -0
- package/dist/assets/fluent-C4IJs8-o.js +1 -0
- package/dist/assets/forth-Ffai-XNe.js +1 -0
- package/dist/assets/fortran-DYz_wnZ1.js +1 -0
- package/dist/assets/fortran-fixed-form-CkoXwp7k.js +1 -0
- package/dist/assets/fortran-fixed-form-DFFnVrrY.js +1 -0
- package/dist/assets/fortran-free-form-BxgE0vQu.js +1 -0
- package/dist/assets/fortran-free-form-DB5N_DgY.js +1 -0
- package/dist/assets/fsharp-CXgrBDvD.js +1 -0
- package/dist/assets/fsharp-DRAF1jsN.js +1 -0
- package/dist/assets/gas-Bneqetm1.js +1 -0
- package/dist/assets/gdresource-BD-1uzY7.js +1 -0
- package/dist/assets/gdresource-BOOCDP_w.js +1 -0
- package/dist/assets/gdscript-C3mT4Uym.js +1 -0
- package/dist/assets/gdscript-C5YyOfLZ.js +1 -0
- package/dist/assets/gdshader-DkwncUOv.js +1 -0
- package/dist/assets/gdshader-G7X6ysY3.js +1 -0
- package/dist/assets/genie-D0YGMca9.js +1 -0
- package/dist/assets/genie-DSsjfZMX.js +1 -0
- package/dist/assets/gherkin-Cl2Fw-_0.js +1 -0
- package/dist/assets/gherkin-DyxjwDmM.js +1 -0
- package/dist/assets/gherkin-heZmZLOM.js +1 -0
- package/dist/assets/git-commit-CJPsQObV.js +1 -0
- package/dist/assets/git-commit-F4YmCXRG.js +1 -0
- package/dist/assets/git-rebase-DeZqv4fp.js +1 -0
- package/dist/assets/git-rebase-r7XF79zn.js +1 -0
- package/dist/assets/github-dark-BQV5ugrc.js +1 -0
- package/dist/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/dist/assets/github-dark-default-DLWDM7FH.js +1 -0
- package/dist/assets/github-dark-dimmed-D1FmiR_p.js +1 -0
- package/dist/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/dist/assets/github-dark-high-contrast-BilLoi0o.js +1 -0
- package/dist/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/dist/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/assets/github-light-Rcb2q3L5.js +1 -0
- package/dist/assets/github-light-default-CQ75esMw.js +1 -0
- package/dist/assets/github-light-default-D7oLnXFd.js +1 -0
- package/dist/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/dist/assets/github-light-high-contrast-CRF1wyLy.js +1 -0
- package/dist/assets/gleam-BeBqoPwE.js +1 -0
- package/dist/assets/gleam-BspZqrRM.js +1 -0
- package/dist/assets/glimmer-js-BuyKUjfV.js +1 -0
- package/dist/assets/glimmer-js-Rg0-pVw9.js +1 -0
- package/dist/assets/glimmer-ts-D9iniPFN.js +1 -0
- package/dist/assets/glimmer-ts-U6CK756n.js +1 -0
- package/dist/assets/glsl-BOG9l2nV.js +1 -0
- package/dist/assets/glsl-DplSGwfg.js +1 -0
- package/dist/assets/gn-Dxr0sSUf.js +1 -0
- package/dist/assets/gn-n2N0HUVH.js +1 -0
- package/dist/assets/gnuplot-CtW3R_Hz.js +1 -0
- package/dist/assets/gnuplot-DdkO51Og.js +1 -0
- package/dist/assets/go-BBr2UQCn.js +1 -0
- package/dist/assets/go-CxLEBnE3.js +1 -0
- package/dist/assets/graphql-B6XHM4uj.js +1 -0
- package/dist/assets/graphql-ChdNCCLP.js +1 -0
- package/dist/assets/groovy-D9Dt4D0W.js +1 -0
- package/dist/assets/groovy-DFxE31Qs.js +1 -0
- package/dist/assets/groovy-gcz8RCvz.js +1 -0
- package/dist/assets/gruvbox-dark-hard-C37G1gbc.js +1 -0
- package/dist/assets/gruvbox-dark-hard-CFHQjOhq.js +1 -0
- package/dist/assets/gruvbox-dark-medium-C3G9m3TV.js +1 -0
- package/dist/assets/gruvbox-dark-medium-GsRaNv29.js +1 -0
- package/dist/assets/gruvbox-dark-soft-CVdnzihN.js +1 -0
- package/dist/assets/gruvbox-dark-soft-eZmcmZ9I.js +1 -0
- package/dist/assets/gruvbox-light-hard-BYj-vz_3.js +1 -0
- package/dist/assets/gruvbox-light-hard-CH1njM8p.js +1 -0
- package/dist/assets/gruvbox-light-medium-BdQlDiiF.js +1 -0
- package/dist/assets/gruvbox-light-medium-DRw_LuNl.js +1 -0
- package/dist/assets/gruvbox-light-soft-BGNwjiRh.js +1 -0
- package/dist/assets/gruvbox-light-soft-hJgmCMqR.js +1 -0
- package/dist/assets/hack-CaT9iCJl.js +1 -0
- package/dist/assets/hack-Cxa-FaZ4.js +1 -0
- package/dist/assets/haml-2e0EI6Is.js +1 -0
- package/dist/assets/haml-B8DHNrY2.js +1 -0
- package/dist/assets/handlebars-BL8al0AC.js +1 -0
- package/dist/assets/handlebars-CojHdNmS.js +1 -0
- package/dist/assets/haskell-BfdhR_WN.js +1 -0
- package/dist/assets/haskell-Cw1EW3IL.js +1 -0
- package/dist/assets/haskell-Df6bDoY_.js +1 -0
- package/dist/assets/haxe-CzTSHFRz.js +1 -0
- package/dist/assets/haxe-DVIybFAS.js +1 -0
- package/dist/assets/haxe-H-WmDvRZ.js +1 -0
- package/dist/assets/hcl-B6OePqme.js +1 -0
- package/dist/assets/hcl-BWvSN4gD.js +1 -0
- package/dist/assets/hjson-D2jn7IRw.js +1 -0
- package/dist/assets/hjson-D5-asLiD.js +1 -0
- package/dist/assets/hlsl-D3lLCCz7.js +1 -0
- package/dist/assets/hlsl-MKeth5V9.js +1 -0
- package/dist/assets/horizon-BUw7H-hv.js +1 -0
- package/dist/assets/horizon-bright-Cn-bp-IR.js +1 -0
- package/dist/assets/horizon-bright-CoQRYDvy.js +1 -0
- package/dist/assets/horizon-cslQss18.js +1 -0
- package/dist/assets/houston-DnULxvSX.js +1 -0
- package/dist/assets/houston-RHIKkNfR.js +1 -0
- package/dist/assets/html-DOf0XnR2.js +1 -0
- package/dist/assets/html-GMplVEZG.js +1 -0
- package/dist/assets/html-derivative-BFtXZ54Q.js +1 -0
- package/dist/assets/html-derivative-DfCZ6Hio.js +1 -0
- package/dist/assets/http-CG3jvXcS.js +1 -0
- package/dist/assets/http-DBlCnlav.js +1 -0
- package/dist/assets/http-jrhK8wxY.js +1 -0
- package/dist/assets/hurl-CxQrh4RI.js +1 -0
- package/dist/assets/hurl-irOxFIW8.js +1 -0
- package/dist/assets/hxml-Bvhsp5Yf.js +1 -0
- package/dist/assets/hxml-CkS3Eie7.js +1 -0
- package/dist/assets/hy-DFXneXwc.js +1 -0
- package/dist/assets/hy-DI6mCUnw.js +1 -0
- package/dist/assets/idl-BEugSyMb.js +1 -0
- package/dist/assets/imba-D-Pk5S0X.js +1 -0
- package/dist/assets/imba-DGztddWO.js +1 -0
- package/dist/assets/index-CRB7i1S2.js +8 -0
- package/dist/assets/index-C_Mo87uS.css +1 -0
- package/dist/assets/index-MSKFS67y.js +1 -0
- package/dist/assets/ini-BEwlwnbL.js +1 -0
- package/dist/assets/ini-Dix3pTmg.js +1 -0
- package/dist/assets/isDiffPlainText-CeCQwHA2.js +1 -0
- package/dist/assets/isFilePlainText-BcfhE9FH.js +1 -0
- package/dist/assets/java-BTDmaRNO.js +1 -0
- package/dist/assets/java-CylS5w8V.js +1 -0
- package/dist/assets/javascript-BO_2ioGC.js +1 -0
- package/dist/assets/javascript-WyGyM1wV.js +1 -0
- package/dist/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/assets/jinja-4LBKfQ-Z.js +1 -0
- package/dist/assets/jinja-D0mZ3q2r.js +1 -0
- package/dist/assets/jison-B9XHrcYJ.js +1 -0
- package/dist/assets/jison-wvAkD_A8.js +1 -0
- package/dist/assets/json-B8JryHcM.js +1 -0
- package/dist/assets/json-Cp-IABpG.js +1 -0
- package/dist/assets/json5-C9tS-k6U.js +1 -0
- package/dist/assets/json5-Cdatmj9n.js +1 -0
- package/dist/assets/jsonc-CvUCa1o5.js +1 -0
- package/dist/assets/jsonc-Des-eS-w.js +1 -0
- package/dist/assets/jsonl-9I_GBd5L.js +1 -0
- package/dist/assets/jsonl-DcaNXYhu.js +1 -0
- package/dist/assets/jsonnet-DFQXde-d.js +1 -0
- package/dist/assets/jsonnet-XoenQ2oc.js +1 -0
- package/dist/assets/jssm-C2t-YnRu.js +1 -0
- package/dist/assets/jssm-CWE2S0Z5.js +1 -0
- package/dist/assets/jsx-8cLv2Six.js +1 -0
- package/dist/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/assets/julia-C1oINnwa.js +1 -0
- package/dist/assets/julia-CxzCAyBv.js +1 -0
- package/dist/assets/julia-DuME0IfC.js +1 -0
- package/dist/assets/just-Bo3fV9RY.js +1 -0
- package/dist/assets/just-Cw27pwNe.js +1 -0
- package/dist/assets/kanagawa-dragon-BOvIHJVT.js +1 -0
- package/dist/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/dist/assets/kanagawa-lotus-Bwcd7Bvx.js +1 -0
- package/dist/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/dist/assets/kanagawa-wave-0SAlpf0s.js +1 -0
- package/dist/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/dist/assets/kdl-CMbyIXjQ.js +1 -0
- package/dist/assets/kdl-DV7GczEv.js +1 -0
- package/dist/assets/kimi-for-coding-eVEHug_h.svg +3 -0
- package/dist/assets/kotlin-BQy537ds.js +1 -0
- package/dist/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/assets/kusto-B_y0uMaZ.js +1 -0
- package/dist/assets/kusto-DZf3V79B.js +1 -0
- package/dist/assets/laserwave-DUszq2jm.js +1 -0
- package/dist/assets/laserwave-si7wuSrt.js +1 -0
- package/dist/assets/latex-CWtU0Tv5.js +1 -0
- package/dist/assets/latex-CZAhoKip.js +1 -0
- package/dist/assets/lean-BZvkOJ9d.js +1 -0
- package/dist/assets/lean-C4RHkN41.js +1 -0
- package/dist/assets/less-B1dDrJ26.js +1 -0
- package/dist/assets/less-XNfgnZC7.js +1 -0
- package/dist/assets/light-plus-B7mTdjB0.js +1 -0
- package/dist/assets/light-plus-g_Fi9vkG.js +1 -0
- package/dist/assets/liquid-DFlqVvG0.js +1 -0
- package/dist/assets/liquid-DYVedYrR.js +1 -0
- package/dist/assets/livescript-BwQOo05w.js +1 -0
- package/dist/assets/llmapi-detailed-Pup_107f.svg +28 -0
- package/dist/assets/llvm-BJRUtCev.js +1 -0
- package/dist/assets/llvm-DjAJT7YJ.js +1 -0
- package/dist/assets/log-2UxHyX5q.js +1 -0
- package/dist/assets/log-CcaF_xNv.js +1 -0
- package/dist/assets/logo-BtOb2qkB.js +1 -0
- package/dist/assets/logo-D9WQLoKQ.js +1 -0
- package/dist/assets/lua-8Av-h-ns.js +1 -0
- package/dist/assets/lua-BaeVxFsk.js +1 -0
- package/dist/assets/lua-BgMRiT3U.js +1 -0
- package/dist/assets/luau-BTSFCcFb.js +1 -0
- package/dist/assets/luau-C-HG3fhB.js +1 -0
- package/dist/assets/main-CPygRDd9.js +134 -0
- package/dist/assets/main-DZg4qzOe.js +2 -0
- package/dist/assets/make-CHLpvVh8.js +1 -0
- package/dist/assets/make-DXVx14cr.js +1 -0
- package/dist/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/assets/markdown-DX-TNHnc.js +1 -0
- package/dist/assets/markdown-shiki.worker-DnvH1S1x.js +12 -0
- package/dist/assets/markdownCore-BULtt6Xa.js +2 -0
- package/dist/assets/marko-CnJfTvn9.js +1 -0
- package/dist/assets/marko-DiIoNBFw.js +1 -0
- package/dist/assets/material-theme-CIJ3cGaW.js +1 -0
- package/dist/assets/material-theme-D5KoaKCx.js +1 -0
- package/dist/assets/material-theme-darker-BWg3m1GB.js +1 -0
- package/dist/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/dist/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/dist/assets/material-theme-lighter-DR8HWMN7.js +1 -0
- package/dist/assets/material-theme-ocean-CZf9pk28.js +1 -0
- package/dist/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/dist/assets/material-theme-palenight-BF01YeZy.js +1 -0
- package/dist/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/dist/assets/mathematica-DTrFuWx2.js +1 -0
- package/dist/assets/matlab-D7o27uSR.js +1 -0
- package/dist/assets/matlab-DzreyMvm.js +1 -0
- package/dist/assets/mbox-CNhZ1qSd.js +1 -0
- package/dist/assets/mdc-BMNejdWA.js +1 -0
- package/dist/assets/mdc-D_DpLax5.js +1 -0
- package/dist/assets/mdx-C2fqO2XY.js +1 -0
- package/dist/assets/mdx-Cmh6b_Ma.js +1 -0
- package/dist/assets/mermaid-Cwy4Up_p.js +1 -0
- package/dist/assets/mermaid-mWjccvbQ.js +1 -0
- package/dist/assets/min-dark-CafNBF8u.js +1 -0
- package/dist/assets/min-dark-DhfaepVE.js +1 -0
- package/dist/assets/min-light-6xx0uMgm.js +1 -0
- package/dist/assets/min-light-CTRr51gU.js +1 -0
- package/dist/assets/miniChat-BFotDgpO.js +2 -0
- package/dist/assets/mipsasm-CKIfxQSi.js +1 -0
- package/dist/assets/mipsasm-yE_Aqo9y.js +1 -0
- package/dist/assets/mirc-CjQqDB4T.js +1 -0
- package/dist/assets/mllike-BO34x3tv.js +1 -0
- package/dist/assets/mobile-3LLzhN5Q.js +2 -0
- package/dist/assets/modelica-Dc1JOy9r.js +1 -0
- package/dist/assets/mojo-M6pJPbMk.js +1 -0
- package/dist/assets/mojo-rZm6bMo-.js +1 -0
- package/dist/assets/monokai-BodnsaDQ.js +1 -0
- package/dist/assets/monokai-D4h5O-jR.js +1 -0
- package/dist/assets/moonbit-CR8uFLGd.js +1 -0
- package/dist/assets/moonbit-_H4v1dQx.js +1 -0
- package/dist/assets/move-CyYMWVy5.js +1 -0
- package/dist/assets/move-IF9eRakj.js +1 -0
- package/dist/assets/mscgen-BA5vi2Kp.js +1 -0
- package/dist/assets/mumps-BT43cFF4.js +1 -0
- package/dist/assets/narrat-DRg8JJMk.js +1 -0
- package/dist/assets/narrat-DXUZ_ZkW.js +1 -0
- package/dist/assets/nextflow-BPolriEg.js +1 -0
- package/dist/assets/nextflow-Zz6hmt5N.js +1 -0
- package/dist/assets/nextflow-groovy-BeH2EWoN.js +1 -0
- package/dist/assets/nextflow-groovy-pQRwk_Jg.js +1 -0
- package/dist/assets/nginx-BpAMiNFr.js +1 -0
- package/dist/assets/nginx-DSXkacNc.js +1 -0
- package/dist/assets/nginx-DdIZxoE0.js +1 -0
- package/dist/assets/night-owl-C39BiMTA.js +1 -0
- package/dist/assets/night-owl-EdP2Hztp.js +1 -0
- package/dist/assets/night-owl-light-Bk-lYVyk.js +1 -0
- package/dist/assets/night-owl-light-CMTm3GFP.js +1 -0
- package/dist/assets/nim-CVrawwO9.js +1 -0
- package/dist/assets/nim-e2z2kCcq.js +1 -0
- package/dist/assets/nix-Ckjrpg0r.js +1 -0
- package/dist/assets/nix-CwoSXNpI.js +1 -0
- package/dist/assets/nord-BAu0wM6c.js +1 -0
- package/dist/assets/nord-Ddv68eIx.js +1 -0
- package/dist/assets/nsis-LdVXkNf5.js +1 -0
- package/dist/assets/ntriples-BfvgReVJ.js +1 -0
- package/dist/assets/nushell-Cz2AlsmD.js +1 -0
- package/dist/assets/nushell-DtHLcZf1.js +1 -0
- package/dist/assets/objective-c-BoaBTdtz.js +1 -0
- package/dist/assets/objective-c-DXmwc3jG.js +1 -0
- package/dist/assets/objective-cpp-CLxacb5B.js +1 -0
- package/dist/assets/objective-cpp-DstR8hNy.js +1 -0
- package/dist/assets/ocaml-C0hk2d4L.js +1 -0
- package/dist/assets/ocaml-DTbn2Hv7.js +1 -0
- package/dist/assets/octave-CWZ4xMHY.js +1 -0
- package/dist/assets/odin-BBf5iR-q.js +1 -0
- package/dist/assets/odin-Bxc4S6Xn.js +1 -0
- package/dist/assets/one-dark-pro-DVMEJ2y_.js +1 -0
- package/dist/assets/one-dark-pro-utPxbBbJ.js +1 -0
- package/dist/assets/one-light-BuCQ22aO.js +1 -0
- package/dist/assets/one-light-C3Wv6jpd.js +1 -0
- package/dist/assets/openscad-C4EeE6gA.js +1 -0
- package/dist/assets/openscad-CXHpNBsb.js +1 -0
- package/dist/assets/oz-BzwKVEFT.js +1 -0
- package/dist/assets/pascal--L3eBynH.js +1 -0
- package/dist/assets/pascal-D93ZcfNL.js +1 -0
- package/dist/assets/pascal-Sr-XLSE6.js +1 -0
- package/dist/assets/perl-C0TMdlhV.js +1 -0
- package/dist/assets/perl-C95KruZl.js +1 -0
- package/dist/assets/perl-CdXCOZ3F.js +1 -0
- package/dist/assets/permissionStore-BRcQ9Jgt.js +1 -0
- package/dist/assets/php-B4Kqya17.js +1 -0
- package/dist/assets/php-Dhbhpdrm.js +1 -0
- package/dist/assets/pig-CevX1Tat.js +1 -0
- package/dist/assets/pkl-CRusufhw.js +1 -0
- package/dist/assets/pkl-u5AG7uiY.js +1 -0
- package/dist/assets/plastic-3e1v2bzS.js +1 -0
- package/dist/assets/plastic-CXnNNlFZ.js +1 -0
- package/dist/assets/plsql-ChMvpjG-.js +1 -0
- package/dist/assets/plsql-Dbm3tV2N.js +1 -0
- package/dist/assets/po-BTJTHyun.js +1 -0
- package/dist/assets/po-LG0lFwH4.js +1 -0
- package/dist/assets/poimandres-BrOVMvuE.js +1 -0
- package/dist/assets/poimandres-CS3Unz2-.js +1 -0
- package/dist/assets/polar-C0HS_06l.js +1 -0
- package/dist/assets/polar-DjOs3GWb.js +1 -0
- package/dist/assets/postcss-CXtECtnM.js +1 -0
- package/dist/assets/postcss-GRRkWn2F.js +1 -0
- package/dist/assets/powerquery-CEu0bR-o.js +1 -0
- package/dist/assets/powerquery-DHf-dtTS.js +1 -0
- package/dist/assets/powershell-CFHJl5sT.js +1 -0
- package/dist/assets/powershell-DXrKVo3G.js +1 -0
- package/dist/assets/powershell-Dpen1YoG.js +1 -0
- package/dist/assets/prisma-Dd19v3D-.js +1 -0
- package/dist/assets/prisma-Dgf8IN_C.js +1 -0
- package/dist/assets/prolog-9JcfiY6I.js +1 -0
- package/dist/assets/prolog-CbFg5uaA.js +1 -0
- package/dist/assets/properties-C78fOPTZ.js +1 -0
- package/dist/assets/proto-C7zT0LnQ.js +1 -0
- package/dist/assets/proto-dqx_Sj2i.js +1 -0
- package/dist/assets/protobuf-ChK-085T.js +1 -0
- package/dist/assets/pug-CGlum2m_.js +1 -0
- package/dist/assets/pug-CIGw5rlb.js +1 -0
- package/dist/assets/pug-CoOVtr4u.js +1 -0
- package/dist/assets/puppet-BMWR74SV.js +1 -0
- package/dist/assets/puppet-DMA9R1ak.js +1 -0
- package/dist/assets/puppet-Di57VbSS.js +1 -0
- package/dist/assets/purescript-BgpM7rDH.js +1 -0
- package/dist/assets/purescript-CklMAg4u.js +1 -0
- package/dist/assets/python-B6Ihcp-E.js +1 -0
- package/dist/assets/python-B6aJPvgy.js +1 -0
- package/dist/assets/python-Cso5vRIg.js +1 -0
- package/dist/assets/q-pXgVlZs6.js +1 -0
- package/dist/assets/qml-3beO22l8.js +1 -0
- package/dist/assets/qml-DmGQGbca.js +1 -0
- package/dist/assets/qmldir-C8lEn-DE.js +1 -0
- package/dist/assets/qmldir-DXd9s5XC.js +1 -0
- package/dist/assets/qss-B7NnhfIi.js +1 -0
- package/dist/assets/qss-IeuSbFQv.js +1 -0
- package/dist/assets/r-1ts4xG1r.js +1 -0
- package/dist/assets/r-B6wPVr8A.js +1 -0
- package/dist/assets/r-Dspwwk_N.js +1 -0
- package/dist/assets/racket-BqYA7rlc.js +1 -0
- package/dist/assets/racket-CeDx7KO2.js +1 -0
- package/dist/assets/raku-BMJwmrCS.js +1 -0
- package/dist/assets/raku-DXvB9xmW.js +1 -0
- package/dist/assets/razor-BaMsy-R7.js +1 -0
- package/dist/assets/razor-Uh8Bk_45.js +1 -0
- package/dist/assets/red-DR6ZwibK.js +1 -0
- package/dist/assets/red-bN70gL4F.js +1 -0
- package/dist/assets/reg-C-SQnVFl.js +1 -0
- package/dist/assets/reg-Cvyu2Gnx.js +1 -0
- package/dist/assets/regexp-CDVJQ6XC.js +1 -0
- package/dist/assets/regexp-DK-WlHNu.js +1 -0
- package/dist/assets/registerCustomTheme-BBXUCRnG.js +1 -0
- package/dist/assets/rel-BlqNHz8k.js +1 -0
- package/dist/assets/rel-C3B-1QV4.js +1 -0
- package/dist/assets/renderElectronMiniChatApp-DGmmT9Wf.js +1 -0
- package/dist/assets/renderMobileApp-Dd8P9hvM.js +23 -0
- package/dist/assets/riscv-BM1_JUlF.js +1 -0
- package/dist/assets/riscv-C5dpdlr7.js +1 -0
- package/dist/assets/ron-D8l8udqQ.js +1 -0
- package/dist/assets/ron-j5NfrB3z.js +1 -0
- package/dist/assets/rose-pine-CN2F2lJl.js +1 -0
- package/dist/assets/rose-pine-dawn-0S8NEhsA.js +1 -0
- package/dist/assets/rose-pine-dawn-DHQR4-dF.js +1 -0
- package/dist/assets/rose-pine-moon-D4_iv3hh.js +1 -0
- package/dist/assets/rose-pine-moon-DzBDT4rc.js +1 -0
- package/dist/assets/rose-pine-qdsjHGoJ.js +1 -0
- package/dist/assets/rosmsg-BJDFO7_C.js +1 -0
- package/dist/assets/rosmsg-ZkSIzPhc.js +1 -0
- package/dist/assets/rpm-CTu-6PCP.js +1 -0
- package/dist/assets/rst-BrH8l1NY.js +1 -0
- package/dist/assets/rst-C371KPjr.js +1 -0
- package/dist/assets/ruby-B2Rjki9n.js +1 -0
- package/dist/assets/ruby-DusoydGj.js +1 -0
- package/dist/assets/ruby-Dw2BHqvy.js +1 -0
- package/dist/assets/runtimeSurface-Cnqjhb6Y.js +1 -0
- package/dist/assets/rust-B1yitclQ.js +1 -0
- package/dist/assets/rust-CxuBE0J8.js +1 -0
- package/dist/assets/sas-B4kiWyti.js +1 -0
- package/dist/assets/sas-DtSHuIwI.js +1 -0
- package/dist/assets/sas-cz2c8ADy.js +1 -0
- package/dist/assets/sass-Cj5Yp3dK.js +1 -0
- package/dist/assets/sass-bfEVHPJ8.js +1 -0
- package/dist/assets/scala-C151Ov-r.js +1 -0
- package/dist/assets/scala-Dtw19ca_.js +1 -0
- package/dist/assets/scheme-C41bIUwD.js +1 -0
- package/dist/assets/scheme-C98Dy4si.js +1 -0
- package/dist/assets/scheme-OJppFQF3.js +1 -0
- package/dist/assets/scss-DxBkwadj.js +1 -0
- package/dist/assets/scss-OYdSNvt2.js +1 -0
- package/dist/assets/sdbl-CvZs3G9c.js +1 -0
- package/dist/assets/sdbl-DVxCFoDh.js +1 -0
- package/dist/assets/shaderlab-CEJedz68.js +1 -0
- package/dist/assets/shaderlab-Dg9Lc6iA.js +1 -0
- package/dist/assets/shellscript-DgJyDXW6.js +1 -0
- package/dist/assets/shellscript-Yzrsuije.js +1 -0
- package/dist/assets/shellsession-BADoaaVG.js +1 -0
- package/dist/assets/shellsession-DSlzxnCM.js +1 -0
- package/dist/assets/sieve-C3Gn_uJK.js +1 -0
- package/dist/assets/simple-mode-GW_nhZxv.js +1 -0
- package/dist/assets/slack-dark-BthQWCQV.js +1 -0
- package/dist/assets/slack-dark-CWRQmTmo.js +1 -0
- package/dist/assets/slack-ochin-DO_ok7XK.js +1 -0
- package/dist/assets/slack-ochin-DqwNpetd.js +1 -0
- package/dist/assets/smalltalk-B9IHbYt7.js +1 -0
- package/dist/assets/smalltalk-BERRCDM3.js +1 -0
- package/dist/assets/smalltalk-CnHTOXQT.js +1 -0
- package/dist/assets/snazzy-light-B5llO_gK.js +1 -0
- package/dist/assets/snazzy-light-Bw305WKR.js +1 -0
- package/dist/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/dist/assets/solarized-dark-G9yBjKj_.js +1 -0
- package/dist/assets/solarized-light-DeSzljQz.js +1 -0
- package/dist/assets/solarized-light-L9t79GZl.js +1 -0
- package/dist/assets/solidity-B3CjIuAd.js +1 -0
- package/dist/assets/solidity-rGO070M0.js +1 -0
- package/dist/assets/solr-DehyRSwq.js +1 -0
- package/dist/assets/soy-BSb8SaP0.js +1 -0
- package/dist/assets/soy-Brmx7dQM.js +1 -0
- package/dist/assets/sparql-BJh4JEw-.js +1 -0
- package/dist/assets/sparql-DkYu6x3z.js +1 -0
- package/dist/assets/sparql-rVzFXLq3.js +1 -0
- package/dist/assets/splunk-BtCnVYZw.js +1 -0
- package/dist/assets/splunk-h-bNAnbk.js +1 -0
- package/dist/assets/spreadsheet-BCZA_wO0.js +1 -0
- package/dist/assets/sql-BLtJtn59.js +1 -0
- package/dist/assets/sql-BbONfI8K.js +1 -0
- package/dist/assets/sql-D0XecflT.js +1 -0
- package/dist/assets/ssh-config-CywOjoXH.js +1 -0
- package/dist/assets/ssh-config-_ykCGR6B.js +1 -0
- package/dist/assets/stata-BH5u7GGu.js +1 -0
- package/dist/assets/stata-BKjsT8qe.js +1 -0
- package/dist/assets/stex-C3f8Ysf7.js +1 -0
- package/dist/assets/stylus-B533Al4x.js +1 -0
- package/dist/assets/stylus-BEDo0Tqx.js +1 -0
- package/dist/assets/stylus-CIg617SB.js +1 -0
- package/dist/assets/surrealql-2KNEnAt7.js +1 -0
- package/dist/assets/surrealql-Bq5Q-fJD.js +1 -0
- package/dist/assets/svelte-C_ipcX3V.js +1 -0
- package/dist/assets/svelte-xaxjcSSP.js +1 -0
- package/dist/assets/swift-BzpIVaGY.js +1 -0
- package/dist/assets/swift-D82vCrfD.js +1 -0
- package/dist/assets/swift-tEesUtni.js +1 -0
- package/dist/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/dist/assets/synthwave-84-DRVv-_m_.js +1 -0
- package/dist/assets/system-verilog-CnnmHF94.js +1 -0
- package/dist/assets/system-verilog-Qdm_1g2q.js +1 -0
- package/dist/assets/systemd-4A_iFExJ.js +1 -0
- package/dist/assets/systemd-DKMPPZjB.js +1 -0
- package/dist/assets/talonscript-CkByrt1z.js +1 -0
- package/dist/assets/talonscript-eRuyeYHl.js +1 -0
- package/dist/assets/tasl-B9CVvjfG.js +1 -0
- package/dist/assets/tasl-QIJgUcNo.js +1 -0
- package/dist/assets/tcl-Bq9dbVAF.js +1 -0
- package/dist/assets/tcl-DVfN8rqt.js +1 -0
- package/dist/assets/tcl-dwOrl1Do.js +1 -0
- package/dist/assets/templ-BVTOctZ7.js +1 -0
- package/dist/assets/templ-P3uqSqPl.js +1 -0
- package/dist/assets/terraform-BETggiCN.js +1 -0
- package/dist/assets/terraform-CAp711iT.js +1 -0
- package/dist/assets/tex-BHxF5DMe.js +1 -0
- package/dist/assets/tex-idrVyKtj.js +1 -0
- package/dist/assets/textile-CnDTJFAw.js +1 -0
- package/dist/assets/themeResolver-BmJyTmjJ.js +1 -0
- package/dist/assets/tiddlywiki-DO-Gjzrf.js +1 -0
- package/dist/assets/tiki-DGYXhP31.js +1 -0
- package/dist/assets/tokyo-night-BvwC8l2v.js +1 -0
- package/dist/assets/tokyo-night-hegEt444.js +1 -0
- package/dist/assets/toml-Bm5Em-hy.js +1 -0
- package/dist/assets/toml-Ms459DBw.js +1 -0
- package/dist/assets/toml-vGWfd6FD.js +1 -0
- package/dist/assets/troff-wAsdV37c.js +1 -0
- package/dist/assets/ts-tags-C-gylFal.js +1 -0
- package/dist/assets/ts-tags-zn1MmPIZ.js +1 -0
- package/dist/assets/tsv-BFtm7NXx.js +1 -0
- package/dist/assets/tsv-B_m7g4N7.js +1 -0
- package/dist/assets/tsx-COt5Ahok.js +1 -0
- package/dist/assets/tsx-D6116Ycy.js +1 -0
- package/dist/assets/ttcn-CfJYG6tj.js +1 -0
- package/dist/assets/ttcn-cfg-B9xdYoR4.js +1 -0
- package/dist/assets/turtle-B1tBg_DP.js +1 -0
- package/dist/assets/turtle-BsS91CYL.js +1 -0
- package/dist/assets/turtle-DpRhbQZY.js +1 -0
- package/dist/assets/twig-DNn4PbVi.js +1 -0
- package/dist/assets/twig-DuP5mDZ4.js +1 -0
- package/dist/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/assets/typescript-BqvgUolh.js +1 -0
- package/dist/assets/typespec-BGHnOYBU.js +1 -0
- package/dist/assets/typespec-DhK7u29_.js +1 -0
- package/dist/assets/typst-DHCkPAjA.js +1 -0
- package/dist/assets/typst-Dfd71gQj.js +1 -0
- package/dist/assets/useAppFontEffects-DXASDavv.js +7043 -0
- package/dist/assets/useInlineCommentController-KJFe98HG.js +2 -0
- package/dist/assets/useOpenInAppsStore-DHAeT9zx.js +1 -0
- package/dist/assets/useWindowTitle-BcwmWC0M.js +10 -0
- package/dist/assets/v-BH76v7br.js +1 -0
- package/dist/assets/v-BcVCzyr7.js +1 -0
- package/dist/assets/vala-CsfeWuGM.js +1 -0
- package/dist/assets/vala-z59IxkFd.js +1 -0
- package/dist/assets/vb-4AxSLKIU.js +1 -0
- package/dist/assets/vb-CmGdzxic.js +1 -0
- package/dist/assets/vb-D17OF-Vu.js +1 -0
- package/dist/assets/vbscript-BuJXcnF6.js +1 -0
- package/dist/assets/velocity-D8B20fx6.js +1 -0
- package/dist/assets/vendor-aparajita-capacitor-secure-storage-5IShChL0.js +1 -0
- package/dist/assets/vendor-aria-hidden-DvXkyWUv.js +1 -0
- package/dist/assets/vendor-base-ui-DwfTg5wD.js +1 -0
- package/dist/assets/vendor-beautiful-mermaid-r4GK_usS.js +119 -0
- package/dist/assets/vendor-capacitor-app-BrDJj9I_.js +1 -0
- package/dist/assets/vendor-capacitor-core-B4EWRrHz.js +1 -0
- package/dist/assets/vendor-capacitor-keyboard-CYccoJjr.js +1 -0
- package/dist/assets/vendor-capacitor-push-notifications-KNe1zSBF.js +1 -0
- package/dist/assets/vendor-capacitor-status-bar-B-N0EOVk.js +1 -0
- package/dist/assets/vendor-ccount-c2V3InAJ.js +1 -0
- package/dist/assets/vendor-character-entities-html4-D7taRCQ7.js +1 -0
- package/dist/assets/vendor-character-entities-legacy-BpoLgcEt.js +1 -0
- package/dist/assets/vendor-class-variance-authority-5VPnzWs2.js +1 -0
- package/dist/assets/vendor-clsx-B-dksMZM.js +1 -0
- package/dist/assets/vendor-cmdk-BCEUzcHE.js +1 -0
- package/dist/assets/vendor-codemirror-autocomplete-3xMyV7a2.js +1 -0
- package/dist/assets/vendor-codemirror-commands-Bzf12ODH.js +1 -0
- package/dist/assets/vendor-codemirror-lang-angular-0K6s6cvb.js +1 -0
- package/dist/assets/vendor-codemirror-lang-cpp-B0aL03z-.js +1 -0
- package/dist/assets/vendor-codemirror-lang-css-C4jEScp7.js +1 -0
- package/dist/assets/vendor-codemirror-lang-go-CgrfVBPr.js +7 -0
- package/dist/assets/vendor-codemirror-lang-html-C1Svvdey.js +1 -0
- package/dist/assets/vendor-codemirror-lang-java-DNPz7_Bx.js +1 -0
- package/dist/assets/vendor-codemirror-lang-javascript-CrbeaEAU.js +13 -0
- package/dist/assets/vendor-codemirror-lang-jinja-DL8BR_RG.js +1 -0
- package/dist/assets/vendor-codemirror-lang-json-BTvAjwkJ.js +1 -0
- package/dist/assets/vendor-codemirror-lang-less-CPABt6NZ.js +1 -0
- package/dist/assets/vendor-codemirror-lang-liquid-BLOLOBMg.js +1 -0
- package/dist/assets/vendor-codemirror-lang-markdown-BloD9GN-.js +1 -0
- package/dist/assets/vendor-codemirror-lang-php-FIZMTuWM.js +1 -0
- package/dist/assets/vendor-codemirror-lang-python-CR2g6ukK.js +3 -0
- package/dist/assets/vendor-codemirror-lang-rust-lsPqn4k4.js +1 -0
- package/dist/assets/vendor-codemirror-lang-sass-CtECMwzH.js +1 -0
- package/dist/assets/vendor-codemirror-lang-sql-BtmZrrZH.js +2 -0
- package/dist/assets/vendor-codemirror-lang-vue-Br6DrntY.js +1 -0
- package/dist/assets/vendor-codemirror-lang-wast-DT7IlCnb.js +1 -0
- package/dist/assets/vendor-codemirror-lang-xml-wNr-LZOf.js +1 -0
- package/dist/assets/vendor-codemirror-lang-yaml-BTKFwfc2.js +1 -0
- package/dist/assets/vendor-codemirror-language-BuDklWi8.js +3 -0
- package/dist/assets/vendor-codemirror-language-data-CFVH0pe8.js +2 -0
- package/dist/assets/vendor-codemirror-search-BzyfPoRb.js +2 -0
- package/dist/assets/vendor-codemirror-state-Wdz6Qsow.js +5 -0
- package/dist/assets/vendor-codemirror-view-pXtfpqbT.js +4 -0
- package/dist/assets/vendor-comma-separated-tokens-D8TqSuIK.js +1 -0
- package/dist/assets/vendor-crelt-C8TCjufn.js +1 -0
- package/dist/assets/vendor-detect-node-es-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-diff-C3JhlQdm.js +13 -0
- package/dist/assets/vendor-dijkstrajs-COg3n3zL.js +1 -0
- package/dist/assets/vendor-dnd-kit-accessibility-Cv52zwWT.js +1 -0
- package/dist/assets/vendor-dnd-kit-core-GipZW2tY.js +5 -0
- package/dist/assets/vendor-dnd-kit-sortable-Ct2QxIHb.js +1 -0
- package/dist/assets/vendor-dnd-kit-utilities-CrOcp0Bp.js +1 -0
- package/dist/assets/vendor-dompurify-r8glNMJW.js +2 -0
- package/dist/assets/vendor-elkjs-CRCLNXjf.js +24 -0
- package/dist/assets/vendor-entities-C3BA0AJP.js +1 -0
- package/dist/assets/vendor-fflate-C7GOKjkv.js +1 -0
- package/dist/assets/vendor-floating-ui-core-CXmKXOXc.js +1 -0
- package/dist/assets/vendor-floating-ui-dom-Bkw82kL9.js +1 -0
- package/dist/assets/vendor-floating-ui-react-dom-sVFnuruh.js +1 -0
- package/dist/assets/vendor-floating-ui-utils-BzXdqYpP.js +1 -0
- package/dist/assets/vendor-framer-motion-DJASDzNt.js +1 -0
- package/dist/assets/vendor-fuse.js-Dw8P0qyA.js +1 -0
- package/dist/assets/vendor-get-nonce-C-Z93AgS.js +1 -0
- package/dist/assets/vendor-ghostty-web-CrxinGGH.js +13 -0
- package/dist/assets/vendor-hast-util-to-html-BKBhbTDb.js +9 -0
- package/dist/assets/vendor-hast-util-whitespace-D4Wp6AEg.js +1 -0
- package/dist/assets/vendor-heic2any-L8hyfc24.js +66 -0
- package/dist/assets/vendor-html-to-image-BeoRn2gJ.js +2 -0
- package/dist/assets/vendor-html-void-elements-CkdplsNl.js +1 -0
- package/dist/assets/vendor-katex-CHD9BdDO.js +257 -0
- package/dist/assets/vendor-katex-Cp579UoJ.css +1 -0
- package/dist/assets/vendor-lezer-common-B3-cUCR_.js +1 -0
- package/dist/assets/vendor-lezer-cpp-BleAU9o-.js +1 -0
- package/dist/assets/vendor-lezer-css-C5xB6jxd.js +1 -0
- package/dist/assets/vendor-lezer-go-CXK1UKk8.js +1 -0
- package/dist/assets/vendor-lezer-highlight-CDMHUZ74.js +1 -0
- package/dist/assets/vendor-lezer-html-C0I1p52t.js +1 -0
- package/dist/assets/vendor-lezer-java-D_zzj-NV.js +1 -0
- package/dist/assets/vendor-lezer-javascript-D7Tj24ot.js +1 -0
- package/dist/assets/vendor-lezer-json-Iaex0UN-.js +1 -0
- package/dist/assets/vendor-lezer-lr-bhwg1HMg.js +1 -0
- package/dist/assets/vendor-lezer-markdown-C6g-d6P3.js +6 -0
- package/dist/assets/vendor-lezer-php-_DHrbsZG.js +1 -0
- package/dist/assets/vendor-lezer-python-CvuFxeZl.js +1 -0
- package/dist/assets/vendor-lezer-rust-Lqgd5SAo.js +1 -0
- package/dist/assets/vendor-lezer-sass-Dnm2lY4t.js +1 -0
- package/dist/assets/vendor-lezer-xml-hUDuAyS5.js +1 -0
- package/dist/assets/vendor-lezer-yaml-BNIl6S_O.js +1 -0
- package/dist/assets/vendor-lru_map-B-cPXHXW.js +1 -0
- package/dist/assets/vendor-marijn-find-cluster-break-DXwl3gUT.js +1 -0
- package/dist/assets/vendor-marked-i_gIkIP3.js +59 -0
- package/dist/assets/vendor-morphdom-B7dS_VPB.js +1 -0
- package/dist/assets/vendor-motion-dom-DJLgZh4Q.js +1 -0
- package/dist/assets/vendor-motion-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-motion-utils-BGh8QBgx.js +1 -0
- package/dist/assets/vendor-oniguruma-parser-C0D4_9rT.js +33 -0
- package/dist/assets/vendor-oniguruma-to-es-DLBnFDCE.js +94 -0
- package/dist/assets/vendor-pierre-theme-Bp7SdUL6.js +1 -0
- package/dist/assets/vendor-pierre-theming-C6Z4M5_u.js +1 -0
- package/dist/assets/vendor-property-information-rJCbAzvX.js +1 -0
- package/dist/assets/vendor-qrcode-COsmt6jn.js +8 -0
- package/dist/assets/vendor-radix-ui-primitive-Dc_FVRD7.js +1 -0
- package/dist/assets/vendor-radix-ui-react-compose-refs-D1GnwnP9.js +1 -0
- package/dist/assets/vendor-radix-ui-react-context-CM4yFQ2I.js +1 -0
- package/dist/assets/vendor-radix-ui-react-dialog-jX3Dld8c.js +5 -0
- package/dist/assets/vendor-radix-ui-react-dismissable-layer-M7LsH3yL.js +1 -0
- package/dist/assets/vendor-radix-ui-react-focus-guards-D5MZ0nQs.js +1 -0
- package/dist/assets/vendor-radix-ui-react-focus-scope-C2K7lNPv.js +1 -0
- package/dist/assets/vendor-radix-ui-react-id-BcxRjnbX.js +1 -0
- package/dist/assets/vendor-radix-ui-react-portal-xlJWBfDg.js +1 -0
- package/dist/assets/vendor-radix-ui-react-presence-Btn-Dp7L.js +1 -0
- package/dist/assets/vendor-radix-ui-react-primitive-CfpW6_IT.js +1 -0
- package/dist/assets/vendor-radix-ui-react-slot-BxUc3Pvz.js +1 -0
- package/dist/assets/vendor-radix-ui-react-use-callback-ref-UKEWHtoP.js +1 -0
- package/dist/assets/vendor-radix-ui-react-use-controllable-state-C_ecoh35.js +1 -0
- package/dist/assets/vendor-radix-ui-react-use-effect-event-DkJl_Rn_.js +1 -0
- package/dist/assets/vendor-radix-ui-react-use-escape-keydown-Co13lHGj.js +1 -0
- package/dist/assets/vendor-radix-ui-react-use-layout-effect-0fyGwS2_.js +1 -0
- package/dist/assets/vendor-react-DYyjh7Q0.js +9 -0
- package/dist/assets/vendor-react-drawio-Boqanm0j.js +1 -0
- package/dist/assets/vendor-react-remove-scroll-CfeMe0DL.js +4 -0
- package/dist/assets/vendor-react-remove-scroll-bar-C9YRs2nU.js +38 -0
- package/dist/assets/vendor-react-style-singleton-B1H4bWSG.js +1 -0
- package/dist/assets/vendor-regex-BBWcyTkg.js +16 -0
- package/dist/assets/vendor-regex-recursion-JU4mF-dD.js +1 -0
- package/dist/assets/vendor-regex-utilities-2BQyy0xI.js +1 -0
- package/dist/assets/vendor-remend-BWYYytN3.js +22 -0
- package/dist/assets/vendor-remixicon-react-CzPq62YO.js +1 -0
- package/dist/assets/vendor-replit-codemirror-vim-BUqe2Slv.js +39 -0
- package/dist/assets/vendor-reselect-l0sNRNKZ.js +1 -0
- package/dist/assets/vendor-scheduler-7OC5HNn7.js +1 -0
- package/dist/assets/vendor-shiki-Bbf2GEcE.js +2 -0
- package/dist/assets/vendor-shikijs-core-CGM_jqPK.js +2 -0
- package/dist/assets/vendor-shikijs-engine-javascript-Cme4830A.js +1 -0
- package/dist/assets/vendor-shikijs-engine-oniguruma-DPWuIF1G.js +1 -0
- package/dist/assets/vendor-shikijs-transformers-CZWsLLKm.js +1 -0
- package/dist/assets/vendor-shikijs-types-CPSbSeK6.js +1 -0
- package/dist/assets/vendor-shikijs-vscode-textmate-BgLrS_2D.js +3 -0
- package/dist/assets/vendor-simplewebauthn-browser-VDA66rT_.js +2 -0
- package/dist/assets/vendor-sonner-dWA7qvjr.js +1 -0
- package/dist/assets/vendor-space-separated-tokens-DD3iYX1K.js +1 -0
- package/dist/assets/vendor-stringify-entities-CsH1VEn9.js +1 -0
- package/dist/assets/vendor-style-mod-NZ5MEPvj.js +3 -0
- package/dist/assets/vendor-tailwind-merge-CPcsbTWB.js +1 -0
- package/dist/assets/vendor-tanstack-react-virtual-IrbCBGJ4.js +1 -0
- package/dist/assets/vendor-tanstack-virtual-core-Dubg10g5.js +1 -0
- package/dist/assets/vendor-tslib-De9GV7Vy.js +1 -0
- package/dist/assets/vendor-use-callback-ref-CJB0R85I.js +1 -0
- package/dist/assets/vendor-use-sidecar-C-AuTczP.js +1 -0
- package/dist/assets/vendor-use-sync-external-store-B7OScDIw.js +1 -0
- package/dist/assets/vendor-vite-runtime-DD1OZmLC.js +1 -0
- package/dist/assets/vendor-w3c-keyname-Vcq4gwWv.js +1 -0
- package/dist/assets/vendor-workbox-window-BIl4cyR9.js +2 -0
- package/dist/assets/vendor-zumer-snapdom-Btyu_Xi2.js +8 -0
- package/dist/assets/vendor-zustand-CnsBKjP5.js +6 -0
- package/dist/assets/vendor-zwitch-C2o2j-tx.js +1 -0
- package/dist/assets/verilog-BQ8w6xss.js +1 -0
- package/dist/assets/verilog-C6RDOZhf.js +1 -0
- package/dist/assets/verilog-LfQUkHDc.js +1 -0
- package/dist/assets/vesper--t9w6MWz.js +1 -0
- package/dist/assets/vesper-DU1UobuO.js +1 -0
- package/dist/assets/vhdl-CeAyd5Ju.js +1 -0
- package/dist/assets/vhdl-DJCsFYgn.js +1 -0
- package/dist/assets/vhdl-lSbBsy5d.js +1 -0
- package/dist/assets/viml-CJc9bBzg.js +1 -0
- package/dist/assets/viml-pbKHW3Ia.js +1 -0
- package/dist/assets/vitesse-black-B_BYPdvp.js +1 -0
- package/dist/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/dist/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/dist/assets/vitesse-dark-DOSOf2Sz.js +1 -0
- package/dist/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/dist/assets/vitesse-light-gUX51GpB.js +1 -0
- package/dist/assets/vue-D2k0BAl5.js +1 -0
- package/dist/assets/vue-DN_0RTcg.js +1 -0
- package/dist/assets/vue-html-AaS7Mt5G.js +1 -0
- package/dist/assets/vue-html-zEfNEgpj.js +1 -0
- package/dist/assets/vue-vine-CQOfvN7w.js +1 -0
- package/dist/assets/vue-vine-D9eCaTqi.js +1 -0
- package/dist/assets/vyper-CDx5xZoG.js +1 -0
- package/dist/assets/vyper-DpazWNpx.js +1 -0
- package/dist/assets/wasm-CFi-k9--.js +1 -0
- package/dist/assets/wasm-CG6Dc4jp.js +1 -0
- package/dist/assets/wasm-MzD3tlZU.js +1 -0
- package/dist/assets/web-components-CNPQSzpa.js +1390 -0
- package/dist/assets/webidl-ZXfAyPTL.js +1 -0
- package/dist/assets/wenyan-BV7otONQ.js +1 -0
- package/dist/assets/wenyan-CYFFG9DK.js +1 -0
- package/dist/assets/wgsl-CxjTZs-b.js +1 -0
- package/dist/assets/wgsl-Dx-B1_4e.js +1 -0
- package/dist/assets/wikitext-BhOHFoWU.js +1 -0
- package/dist/assets/wikitext-Bx2qct8O.js +1 -0
- package/dist/assets/wit-5i3qLPDT.js +1 -0
- package/dist/assets/wit-DDW3hD69.js +1 -0
- package/dist/assets/wolfram-lXgVvXCa.js +1 -0
- package/dist/assets/wolfram-pu21K997.js +1 -0
- package/dist/assets/worker-BBk7yuNN.js +153 -0
- package/dist/assets/workerFactory-tw7cIdmV.js +1 -0
- package/dist/assets/xml-BkAJuBCc.js +1 -0
- package/dist/assets/xml-sdJ4AIDG.js +1 -0
- package/dist/assets/xquery-DzFWVndE.js +1 -0
- package/dist/assets/xsl-C6UUWSil.js +1 -0
- package/dist/assets/xsl-CtQFsRM5.js +1 -0
- package/dist/assets/yacas-BJ4BC0dw.js +1 -0
- package/dist/assets/yaml-Bopit2L3.js +1 -0
- package/dist/assets/yaml-Buea-lGh.js +1 -0
- package/dist/assets/z80-Hz9HOZM7.js +1 -0
- package/dist/assets/zenscript-BIAKq-aR.js +1 -0
- package/dist/assets/zenscript-DVFEvuxE.js +1 -0
- package/dist/assets/zig-VOosw3JB.js +1 -0
- package/dist/assets/zig-bSFrHQ7n.js +1 -0
- package/dist/favicon-16.png +0 -0
- package/dist/favicon-32.png +0 -0
- package/dist/favicon.png +0 -0
- package/dist/favicon.svg +13 -0
- package/dist/index.html +658 -0
- package/dist/logo-dark-192x192.png +0 -0
- package/dist/logo-dark-512x512.svg +13 -0
- package/dist/logo-light-192x192.png +0 -0
- package/dist/logo-light-512x512.svg +13 -0
- package/dist/mini-chat.html +121 -0
- package/dist/mobile.html +79 -0
- package/dist/pwa-192.png +0 -0
- package/dist/pwa-512.png +0 -0
- package/dist/pwa-maskable-192.png +0 -0
- package/dist/pwa-maskable-512.png +0 -0
- package/dist/site.webmanifest +21 -0
- package/dist/sw.js +1 -0
- package/package.json +115 -0
- package/public/apple-touch-icon-120x120.png +0 -0
- package/public/apple-touch-icon-152x152.png +0 -0
- package/public/apple-touch-icon-167x167.png +0 -0
- package/public/apple-touch-icon-180x180.png +0 -0
- package/public/apple-touch-icon.png +0 -0
- package/public/apple-touch-icon.svg +13 -0
- package/public/favicon-16.png +0 -0
- package/public/favicon-32.png +0 -0
- package/public/favicon.png +0 -0
- package/public/favicon.svg +13 -0
- package/public/logo-dark-192x192.png +0 -0
- package/public/logo-dark-512x512.svg +13 -0
- package/public/logo-light-192x192.png +0 -0
- package/public/logo-light-512x512.svg +13 -0
- package/public/pwa-192.png +0 -0
- package/public/pwa-512.png +0 -0
- package/public/pwa-maskable-192.png +0 -0
- package/public/pwa-maskable-512.png +0 -0
- package/public/site.webmanifest +21 -0
- package/server/index.d.ts +35 -0
- package/server/index.js +206 -0
- package/server/lib/client-auth/pairing.js +308 -0
- package/server/lib/client-auth/pairing.test.js +142 -0
- package/server/lib/client-auth/remote-clients.js +280 -0
- package/server/lib/client-auth/remote-clients.test.js +158 -0
- package/server/lib/cloudflare-tunnel.js +606 -0
- package/server/lib/fs/DOCUMENTATION.md +39 -0
- package/server/lib/fs/pick-directory.js +236 -0
- package/server/lib/fs/pick-directory.test.js +134 -0
- package/server/lib/fs/routes.js +1543 -0
- package/server/lib/fs/routes.test.js +920 -0
- package/server/lib/fs/search.js +238 -0
- package/server/lib/git/DOCUMENTATION.md +180 -0
- package/server/lib/git/credentials.js +41 -0
- package/server/lib/git/identity-storage.js +113 -0
- package/server/lib/git/index.js +6 -0
- package/server/lib/git/issue-2746-longpaths.test.js +206 -0
- package/server/lib/git/routes.js +1089 -0
- package/server/lib/git/routes.test.js +210 -0
- package/server/lib/git/service.js +4927 -0
- package/server/lib/git/service.test.js +1216 -0
- package/server/lib/inherited-env.js +74 -0
- package/server/lib/inherited-env.test.js +65 -0
- package/server/lib/ngrok-tunnel.js +343 -0
- package/server/lib/ngrok-tunnel.test.js +50 -0
- package/server/lib/package-manager.js +850 -0
- package/server/lib/package-manager.test.js +370 -0
- package/server/lib/path-realpath-cache.js +85 -0
- package/server/lib/path-realpath-cache.test.js +75 -0
- package/server/lib/pi/archive-store.js +52 -0
- package/server/lib/pi/archive-store.test.js +32 -0
- package/server/lib/pi/attachment-store.js +98 -0
- package/server/lib/pi/attachment-store.test.js +40 -0
- package/server/lib/pi/custom-themes.js +33 -0
- package/server/lib/pi/custom-themes.test.js +21 -0
- package/server/lib/pi/legacy-ui-model-defaults.js +57 -0
- package/server/lib/pi/legacy-ui-model-defaults.test.js +65 -0
- package/server/lib/pi/model-config-store.js +173 -0
- package/server/lib/pi/model-config-store.test.js +42 -0
- package/server/lib/pi/routes.js +956 -0
- package/server/lib/pi/routes.test.js +733 -0
- package/server/lib/pi/session-daemon/DOCUMENTATION.md +41 -0
- package/server/lib/pi/session-daemon/daemon-process.js +113 -0
- package/server/lib/pi/session-daemon/ipc-client.js +144 -0
- package/server/lib/pi/session-daemon/runtime-registry.js +149 -0
- package/server/lib/pi/session-daemon/runtime-registry.test.js +109 -0
- package/server/lib/pi/session-daemon/session-daemon.js +1903 -0
- package/server/lib/pi/session-daemon/session-daemon.test.js +1306 -0
- package/server/lib/pi/session-daemon/session-jsonl.js +94 -0
- package/server/lib/pi/session-daemon/session-jsonl.test.js +73 -0
- package/server/lib/pi/session-daemon/supervisor.js +458 -0
- package/server/lib/pi/session-daemon/supervisor.test.js +212 -0
- package/server/lib/pi/session-folders-store.js +74 -0
- package/server/lib/pi/session-folders-store.test.js +45 -0
- package/server/lib/pi/session-lifecycle.integration.test.js +197 -0
- package/server/lib/pi/settings-store.js +133 -0
- package/server/lib/pi/settings-store.test.js +113 -0
- package/server/lib/pi/thinking-levels.js +39 -0
- package/server/lib/pi/thinking-levels.test.js +34 -0
- package/server/lib/pi/ui-settings-store.js +68 -0
- package/server/lib/pi/ui-settings-store.test.js +40 -0
- package/server/lib/pichamber-data-dir.js +78 -0
- package/server/lib/pichamber-data-dir.test.js +105 -0
- package/server/lib/pichamber-data-root-authority.test.js +81 -0
- package/server/lib/preview/proxy-runtime.js +1604 -0
- package/server/lib/preview/proxy-runtime.test.js +528 -0
- package/server/lib/pwa-keys-contract.test.ts +62 -0
- package/server/lib/relay/DOCUMENTATION.md +106 -0
- package/server/lib/relay/cross-compat.test.js +135 -0
- package/server/lib/relay/e2ee.js +341 -0
- package/server/lib/relay/e2ee.test.js +124 -0
- package/server/lib/relay/host-client.js +389 -0
- package/server/lib/relay/host-client.test.js +292 -0
- package/server/lib/relay/identity.js +93 -0
- package/server/lib/relay/identity.test.js +78 -0
- package/server/lib/relay/service.js +9 -0
- package/server/lib/relay/signing-key.js +73 -0
- package/server/lib/relay/tunnel-codec.js +373 -0
- package/server/lib/relay/tunnel-codec.test.js +58 -0
- package/server/lib/relay/tunnel-host.js +465 -0
- package/server/lib/security/bind-host.js +40 -0
- package/server/lib/security/bind-host.test.js +36 -0
- package/server/lib/security/packaged-client-origins.js +11 -0
- package/server/lib/security/request-security.js +122 -0
- package/server/lib/security/request-security.test.js +57 -0
- package/server/lib/server/cli-entry-runtime.js +44 -0
- package/server/lib/server/cli-options.js +132 -0
- package/server/lib/server/core-routes.js +1041 -0
- package/server/lib/server/cors.js +51 -0
- package/server/lib/server/cors.test.js +37 -0
- package/server/lib/server/lan-addresses.js +41 -0
- package/server/lib/server/lan-addresses.test.js +42 -0
- package/server/lib/server/path-utils.js +27 -0
- package/server/lib/server/tunnel-auth.js +586 -0
- package/server/lib/terminal/DOCUMENTATION.md +48 -0
- package/server/lib/terminal/history.js +83 -0
- package/server/lib/terminal/history.test.js +19 -0
- package/server/lib/terminal/runtime.js +391 -0
- package/server/lib/terminal/runtime.test.js +566 -0
- package/server/lib/terminal/shells.js +100 -0
- package/server/lib/terminal/shells.test.js +73 -0
- package/server/lib/terminal/terminal-ws-protocol.js +68 -0
- package/server/lib/terminal/terminal-ws-protocol.test.js +145 -0
- package/server/lib/terminal/theme-response.js +98 -0
- package/server/lib/terminal/theme-response.test.js +70 -0
- package/server/lib/tunnels/DOCUMENTATION.md +33 -0
- package/server/lib/tunnels/executable-search.js +140 -0
- package/server/lib/tunnels/executable-search.test.js +96 -0
- package/server/lib/tunnels/install-help.js +56 -0
- package/server/lib/tunnels/install-help.test.js +31 -0
- package/server/lib/tunnels/providers/cloudflare.js +54 -0
- package/server/lib/tunnels/providers/ngrok.js +32 -0
- package/server/lib/tunnels/types.js +16 -0
- package/server/lib/ui-auth/DOCUMENTATION.md +44 -0
- package/server/lib/ui-auth/ui-auth.js +972 -0
- package/server/lib/ui-auth/ui-auth.test.js +250 -0
- package/server/lib/ui-auth/ui-passkeys.js +543 -0
- package/server/lib/workspace/host.js +91 -0
|
@@ -0,0 +1,1041 @@
|
|
|
1
|
+
const parseLoopbackUrl = (rawUrl) => {
|
|
2
|
+
if (typeof rawUrl !== 'string') {
|
|
3
|
+
return null;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
let url;
|
|
7
|
+
try {
|
|
8
|
+
url = new URL(rawUrl);
|
|
9
|
+
} catch {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
const host = url.hostname;
|
|
18
|
+
if (host !== 'localhost' && host !== '127.0.0.1' && host !== '::1' && host !== '0.0.0.0') {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return url;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const getRequestPathname = (req) => {
|
|
26
|
+
const rawUrl = req?.originalUrl || req?.url || '';
|
|
27
|
+
if (typeof rawUrl !== 'string' || rawUrl.length === 0) return '';
|
|
28
|
+
try {
|
|
29
|
+
return new URL(rawUrl, 'http://localhost').pathname;
|
|
30
|
+
} catch {
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const getQueryParam = (req, name) => {
|
|
36
|
+
const rawUrl = req?.originalUrl || req?.url || '';
|
|
37
|
+
if (typeof rawUrl !== 'string' || rawUrl.length === 0) return '';
|
|
38
|
+
try {
|
|
39
|
+
return new URL(rawUrl, 'http://localhost').searchParams.get(name)?.trim() || '';
|
|
40
|
+
} catch {
|
|
41
|
+
return '';
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const getCookieValue = (req, name) => {
|
|
46
|
+
const cookieHeader = req?.headers?.cookie;
|
|
47
|
+
if (typeof cookieHeader !== 'string' || cookieHeader.length === 0) return '';
|
|
48
|
+
for (const segment of cookieHeader.split(';')) {
|
|
49
|
+
const [rawName, ...rawValueParts] = segment.split('=');
|
|
50
|
+
if (rawName?.trim() !== name) continue;
|
|
51
|
+
return rawValueParts.join('=').trim();
|
|
52
|
+
}
|
|
53
|
+
return '';
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
const hasPreviewProxyCredential = (req) => {
|
|
57
|
+
if (!getRequestPathname(req).startsWith('/api/preview/proxy/')) return false;
|
|
58
|
+
return Boolean(getQueryParam(req, 'oc_preview_token') || getCookieValue(req, 'oc_preview_token'));
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
export const registerServerStatusRoutes = (app, dependencies) => {
|
|
62
|
+
const {
|
|
63
|
+
express,
|
|
64
|
+
process,
|
|
65
|
+
pichamberVersion,
|
|
66
|
+
runtimeName,
|
|
67
|
+
serverStartedAt,
|
|
68
|
+
gracefulShutdown,
|
|
69
|
+
getHealthSnapshot,
|
|
70
|
+
// Port this PiChamber instance serves on and the tunnel public URL (if
|
|
71
|
+
// a tunnel is active). Exposed on /api/system/info so the UI can surface
|
|
72
|
+
// the active instance's service URLs. Optional: older wiring omits them
|
|
73
|
+
// and the endpoint reports null.
|
|
74
|
+
getServerPort = () => null,
|
|
75
|
+
getTunnelUrl = () => null,
|
|
76
|
+
// Stable server identity (hash of the public signing key — not a secret).
|
|
77
|
+
// Exposed on /health and /api/version so a client can verify that a
|
|
78
|
+
// learned/probed address belongs to the expected server BEFORE sending its
|
|
79
|
+
// bearer token there. Optional: older wiring omits it.
|
|
80
|
+
getServerId = async () => null,
|
|
81
|
+
tunnelAuthController = null,
|
|
82
|
+
uiAuthController = null,
|
|
83
|
+
} = dependencies;
|
|
84
|
+
|
|
85
|
+
// The identity is immutable for the process lifetime; resolve once, and never
|
|
86
|
+
// let an identity failure break health reporting.
|
|
87
|
+
let cachedServerId = null;
|
|
88
|
+
const resolveServerId = async () => {
|
|
89
|
+
if (cachedServerId) return cachedServerId;
|
|
90
|
+
try {
|
|
91
|
+
const value = await getServerId();
|
|
92
|
+
cachedServerId = typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
93
|
+
} catch {
|
|
94
|
+
cachedServerId = null;
|
|
95
|
+
}
|
|
96
|
+
return cachedServerId;
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const allocateLoopbackPort = async () => {
|
|
100
|
+
const net = await import('node:net');
|
|
101
|
+
return await new Promise((resolve, reject) => {
|
|
102
|
+
const server = net.createServer();
|
|
103
|
+
server.on('error', reject);
|
|
104
|
+
server.listen(0, '127.0.0.1', () => {
|
|
105
|
+
try {
|
|
106
|
+
const address = server.address();
|
|
107
|
+
const port = address && typeof address === 'object' ? address.port : 0;
|
|
108
|
+
server.close(() => {
|
|
109
|
+
resolve(port);
|
|
110
|
+
});
|
|
111
|
+
} catch (error) {
|
|
112
|
+
try {
|
|
113
|
+
server.close();
|
|
114
|
+
} catch {
|
|
115
|
+
}
|
|
116
|
+
reject(error);
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
const compatibility = {
|
|
123
|
+
apiVersion: 1,
|
|
124
|
+
minClientApiVersion: 1,
|
|
125
|
+
capabilities: [
|
|
126
|
+
'api.health.v1',
|
|
127
|
+
'api.runtime-url.v1',
|
|
128
|
+
'api.raw-file.v1',
|
|
129
|
+
'realtime.sse.v1',
|
|
130
|
+
'realtime.websocket.global-events.v1',
|
|
131
|
+
'terminal.websocket.v1',
|
|
132
|
+
],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const isDevShutdownAllowed = () => {
|
|
136
|
+
// Dev-only escape hatch: allow terminating the whole dev process group.
|
|
137
|
+
// This should never be enabled in production runtimes.
|
|
138
|
+
return process.env.PICHAMBER_DEV_SHUTDOWN === 'true';
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
const isSameOriginRequest = (req) => {
|
|
142
|
+
const rawOrigin = typeof req.get === 'function' ? req.get('origin') : '';
|
|
143
|
+
const rawHost = typeof req.get === 'function' ? req.get('host') : '';
|
|
144
|
+
if (!rawOrigin || !rawHost) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
try {
|
|
148
|
+
const origin = new URL(rawOrigin);
|
|
149
|
+
return origin.host === rawHost;
|
|
150
|
+
} catch {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
const resolveProcessGroupId = async (pid) => {
|
|
156
|
+
if (!pid || typeof pid !== 'number' || !Number.isFinite(pid) || pid <= 0) {
|
|
157
|
+
return null;
|
|
158
|
+
}
|
|
159
|
+
if (process.platform === 'win32') {
|
|
160
|
+
return null;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
try {
|
|
164
|
+
const { execFile } = await import('node:child_process');
|
|
165
|
+
const { promisify } = await import('node:util');
|
|
166
|
+
const execFileAsync = promisify(execFile);
|
|
167
|
+
const result = await execFileAsync('ps', ['-o', 'pgid=', '-p', String(pid)]);
|
|
168
|
+
const raw = String(result.stdout || '').trim();
|
|
169
|
+
const pgid = Number.parseInt(raw, 10);
|
|
170
|
+
return Number.isFinite(pgid) && pgid > 0 ? pgid : null;
|
|
171
|
+
} catch {
|
|
172
|
+
return null;
|
|
173
|
+
}
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
const parseLoopbackPort = (rawUrl) => {
|
|
177
|
+
if (typeof rawUrl !== 'string') {
|
|
178
|
+
return null;
|
|
179
|
+
}
|
|
180
|
+
let url;
|
|
181
|
+
try {
|
|
182
|
+
url = new URL(rawUrl);
|
|
183
|
+
} catch {
|
|
184
|
+
return null;
|
|
185
|
+
}
|
|
186
|
+
if (url.protocol !== 'http:' && url.protocol !== 'https:') {
|
|
187
|
+
return null;
|
|
188
|
+
}
|
|
189
|
+
const host = url.hostname;
|
|
190
|
+
if (host !== 'localhost' && host !== '127.0.0.1' && host !== '::1' && host !== '0.0.0.0') {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
const port = url.port ? Number.parseInt(url.port, 10) : (url.protocol === 'https:' ? 443 : 80);
|
|
194
|
+
if (!Number.isFinite(port) || port <= 0 || port > 65535) {
|
|
195
|
+
return null;
|
|
196
|
+
}
|
|
197
|
+
return port;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
const killListenPort = async (port) => {
|
|
201
|
+
if (!Number.isFinite(port) || port <= 0) {
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
if (process.platform === 'win32') {
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
try {
|
|
209
|
+
const { execFile } = await import('node:child_process');
|
|
210
|
+
const { promisify } = await import('node:util');
|
|
211
|
+
const execFileAsync = promisify(execFile);
|
|
212
|
+
const result = await execFileAsync('lsof', ['-nP', '-t', `-iTCP:${Math.trunc(port)}`, '-sTCP:LISTEN'], {
|
|
213
|
+
timeout: 2500,
|
|
214
|
+
});
|
|
215
|
+
const pids = String(result.stdout || '')
|
|
216
|
+
.split(/\s+/)
|
|
217
|
+
.map((value) => Number.parseInt(value, 10))
|
|
218
|
+
.filter((pid) => Number.isFinite(pid) && pid > 0 && pid !== process.pid);
|
|
219
|
+
|
|
220
|
+
for (const pid of pids) {
|
|
221
|
+
try {
|
|
222
|
+
process.kill(pid, 'SIGTERM');
|
|
223
|
+
} catch {
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
if (pids.length > 0) {
|
|
227
|
+
setTimeout(() => {
|
|
228
|
+
for (const pid of pids) {
|
|
229
|
+
try {
|
|
230
|
+
process.kill(pid, 'SIGKILL');
|
|
231
|
+
} catch {
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}, 1200).unref?.();
|
|
235
|
+
}
|
|
236
|
+
} catch {
|
|
237
|
+
// ignore (no lsof, no permission, etc.)
|
|
238
|
+
}
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
app.get('/health', async (_req, res) => {
|
|
242
|
+
const serverId = await resolveServerId();
|
|
243
|
+
res.json({
|
|
244
|
+
status: 'ok',
|
|
245
|
+
timestamp: new Date().toISOString(),
|
|
246
|
+
pichamberVersion,
|
|
247
|
+
runtime: runtimeName,
|
|
248
|
+
compatibility,
|
|
249
|
+
...(serverId ? { serverId } : {}),
|
|
250
|
+
...getHealthSnapshot(),
|
|
251
|
+
});
|
|
252
|
+
});
|
|
253
|
+
|
|
254
|
+
app.get('/api/version', async (_req, res) => {
|
|
255
|
+
const serverId = await resolveServerId();
|
|
256
|
+
res.json({
|
|
257
|
+
status: 'ok',
|
|
258
|
+
pichamberVersion,
|
|
259
|
+
runtime: runtimeName,
|
|
260
|
+
startedAt: serverStartedAt,
|
|
261
|
+
compatibility,
|
|
262
|
+
...(serverId ? { serverId } : {}),
|
|
263
|
+
});
|
|
264
|
+
});
|
|
265
|
+
|
|
266
|
+
const requireShutdownAuth = async (req, res, next) => {
|
|
267
|
+
if (!uiAuthController || typeof uiAuthController.requireAuth !== 'function') {
|
|
268
|
+
return next();
|
|
269
|
+
}
|
|
270
|
+
const requestScope = typeof tunnelAuthController?.classifyRequestScope === 'function'
|
|
271
|
+
? tunnelAuthController.classifyRequestScope(req)
|
|
272
|
+
: 'local';
|
|
273
|
+
if (
|
|
274
|
+
(requestScope === 'tunnel' || requestScope === 'unknown-public')
|
|
275
|
+
&& typeof tunnelAuthController?.requireTunnelSession === 'function'
|
|
276
|
+
) {
|
|
277
|
+
return tunnelAuthController.requireTunnelSession(req, res, next);
|
|
278
|
+
}
|
|
279
|
+
return uiAuthController.requireAuth(req, res, next);
|
|
280
|
+
};
|
|
281
|
+
|
|
282
|
+
app.post('/api/system/shutdown', async (req, res, next) => {
|
|
283
|
+
try {
|
|
284
|
+
await requireShutdownAuth(req, res, () => {
|
|
285
|
+
res.json({ ok: true });
|
|
286
|
+
gracefulShutdown({ exitProcess: true }).catch((error) => {
|
|
287
|
+
console.error('Shutdown request failed:', error?.message || error);
|
|
288
|
+
});
|
|
289
|
+
});
|
|
290
|
+
} catch (error) {
|
|
291
|
+
next(error);
|
|
292
|
+
}
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
app.post('/api/system/dev-shutdown', express.json({ limit: '64kb' }), async (req, res) => {
|
|
296
|
+
if (!isDevShutdownAllowed()) {
|
|
297
|
+
return res.status(403).json({ ok: false, error: 'Dev shutdown is disabled' });
|
|
298
|
+
}
|
|
299
|
+
if (!isSameOriginRequest(req)) {
|
|
300
|
+
return res.status(403).json({ ok: false, error: 'Invalid origin' });
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
res.json({ ok: true });
|
|
304
|
+
|
|
305
|
+
// Terminate the entire dev process group so `bun run dev` leaves no orphans.
|
|
306
|
+
// Shut down the local Pi runtime before closing the server.
|
|
307
|
+
try {
|
|
308
|
+
const rawPreviewUrls = Array.isArray(req.body?.previewUrls) ? req.body.previewUrls : [];
|
|
309
|
+
const previewPorts = Array.from(new Set(
|
|
310
|
+
rawPreviewUrls
|
|
311
|
+
.map((value) => parseLoopbackPort(value))
|
|
312
|
+
.filter((port) => typeof port === 'number')
|
|
313
|
+
));
|
|
314
|
+
// Attempt to stop preview servers that may have daemonized away from the PTY.
|
|
315
|
+
// This is dev-only and limited to loopback ports supplied by the UI.
|
|
316
|
+
await Promise.all(previewPorts.map((port) => killListenPort(port)));
|
|
317
|
+
|
|
318
|
+
const pgid = await resolveProcessGroupId(process.pid);
|
|
319
|
+
const ppid = typeof process.ppid === 'number' ? process.ppid : null;
|
|
320
|
+
const parentPgid = ppid ? await resolveProcessGroupId(ppid) : null;
|
|
321
|
+
|
|
322
|
+
// Kick off shutdown cleanup first.
|
|
323
|
+
void gracefulShutdown({ exitProcess: false });
|
|
324
|
+
|
|
325
|
+
const pgidsToKill = Array.from(new Set([pgid, parentPgid].filter(Boolean)));
|
|
326
|
+
for (const id of pgidsToKill) {
|
|
327
|
+
try {
|
|
328
|
+
process.kill(-id, 'SIGTERM');
|
|
329
|
+
} catch {
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
setTimeout(() => {
|
|
334
|
+
for (const id of pgidsToKill) {
|
|
335
|
+
try {
|
|
336
|
+
process.kill(-id, 'SIGKILL');
|
|
337
|
+
} catch {
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}, 1500).unref?.();
|
|
341
|
+
|
|
342
|
+
// Ensure the server process itself exits even if the group kill fails.
|
|
343
|
+
setTimeout(() => {
|
|
344
|
+
try {
|
|
345
|
+
process.exit(0);
|
|
346
|
+
} catch {
|
|
347
|
+
}
|
|
348
|
+
}, 2500).unref?.();
|
|
349
|
+
} catch (error) {
|
|
350
|
+
console.error('Dev shutdown request failed:', error?.message || error);
|
|
351
|
+
// As a last resort, exit.
|
|
352
|
+
try {
|
|
353
|
+
process.exit(0);
|
|
354
|
+
} catch {
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
});
|
|
358
|
+
|
|
359
|
+
app.get('/api/system/info', (_req, res) => {
|
|
360
|
+
res.json({
|
|
361
|
+
pichamberVersion,
|
|
362
|
+
runtime: runtimeName,
|
|
363
|
+
pid: process.pid,
|
|
364
|
+
startedAt: serverStartedAt,
|
|
365
|
+
port: getServerPort(),
|
|
366
|
+
tunnelUrl: getTunnelUrl(),
|
|
367
|
+
});
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
// Allocates a best-effort free TCP port hint on 127.0.0.1.
|
|
371
|
+
// Another process can still claim it before the preview server binds.
|
|
372
|
+
app.get('/api/system/free-port', async (_req, res) => {
|
|
373
|
+
try {
|
|
374
|
+
const port = await allocateLoopbackPort();
|
|
375
|
+
if (!Number.isFinite(port) || port <= 0) {
|
|
376
|
+
return res.status(500).json({ error: 'Failed to allocate port' });
|
|
377
|
+
}
|
|
378
|
+
return res.json({ port });
|
|
379
|
+
} catch (error) {
|
|
380
|
+
return res.status(500).json({ error: (error && error.message) || 'Failed to allocate port' });
|
|
381
|
+
}
|
|
382
|
+
});
|
|
383
|
+
|
|
384
|
+
};
|
|
385
|
+
|
|
386
|
+
export const registerAuthAndAccessRoutes = (app, dependencies) => {
|
|
387
|
+
const {
|
|
388
|
+
express,
|
|
389
|
+
tunnelAuthController,
|
|
390
|
+
uiAuthController,
|
|
391
|
+
remoteClientAuthRuntime,
|
|
392
|
+
clientPairingRuntime,
|
|
393
|
+
readSettingsFromDiskMigrated,
|
|
394
|
+
normalizeTunnelSessionTtlMs,
|
|
395
|
+
// Returns the relay pairing candidate ({ type:'relay', relayUrl, serverId,
|
|
396
|
+
// hostEncPubJwk, priority }) when the host relay is enabled, else null.
|
|
397
|
+
// Injected lazily because the relay service is constructed after these routes.
|
|
398
|
+
getRelayPairingCandidate = async () => null,
|
|
399
|
+
// Re-evaluate the relay lifecycle after pairing/device changes.
|
|
400
|
+
reconcileRelay = async () => {},
|
|
401
|
+
// Returns { local, lan, relayAvailable } — the direct transport URLs the
|
|
402
|
+
// server can actually be reached on (LAN derived from the server bind, not
|
|
403
|
+
// the UI origin), for the create-device dialog.
|
|
404
|
+
getPairingTransports = () => ({ local: null, lan: null, relayAvailable: true }),
|
|
405
|
+
// Returns ALL direct LAN URLs the server is currently reachable on (client-
|
|
406
|
+
// reached address first, then interface scan) for the candidates-refresh
|
|
407
|
+
// endpoint. Empty when the server is loopback-only.
|
|
408
|
+
getDirectCandidateUrls = () => [],
|
|
409
|
+
// Stable server identity for client-side verification of learned addresses.
|
|
410
|
+
getServerId = async () => null,
|
|
411
|
+
// Display name a paired device shows for THIS server (issuing machine's
|
|
412
|
+
// hostname), distinct from the per-device pairing label typed by the operator.
|
|
413
|
+
getServerLabel = () => 'PiChamber',
|
|
414
|
+
} = dependencies;
|
|
415
|
+
const PAIRING_REDEEM_RATE_LIMIT_WINDOW_MS = 5 * 60 * 1000;
|
|
416
|
+
const PAIRING_REDEEM_RATE_LIMIT_MAX_ATTEMPTS = 10;
|
|
417
|
+
const pairingRedeemAttempts = new Map();
|
|
418
|
+
|
|
419
|
+
const runWithUiAuth = async (req, res, next, handler, options = {}) => {
|
|
420
|
+
try {
|
|
421
|
+
const requireAuth = options.sessionOnly === true && typeof uiAuthController.requireSessionAuth === 'function'
|
|
422
|
+
? uiAuthController.requireSessionAuth
|
|
423
|
+
: uiAuthController.requireAuth;
|
|
424
|
+
await requireAuth(req, res, async () => {
|
|
425
|
+
await handler();
|
|
426
|
+
});
|
|
427
|
+
} catch (error) {
|
|
428
|
+
next(error);
|
|
429
|
+
}
|
|
430
|
+
};
|
|
431
|
+
|
|
432
|
+
const runWithClientManagementAuth = async (req, res, next, handler) => {
|
|
433
|
+
try {
|
|
434
|
+
if (typeof uiAuthController.resolveAuthContext === 'function') {
|
|
435
|
+
const context = await uiAuthController.resolveAuthContext(req, res, {
|
|
436
|
+
allowClientAuth: true,
|
|
437
|
+
allowUrlToken: false,
|
|
438
|
+
});
|
|
439
|
+
if (context?.type === 'session' || context?.type === 'client') {
|
|
440
|
+
await handler(context);
|
|
441
|
+
return;
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
await runWithUiAuth(req, res, next, async () => {
|
|
446
|
+
await handler({ type: 'session' });
|
|
447
|
+
}, { sessionOnly: true });
|
|
448
|
+
} catch (error) {
|
|
449
|
+
next(error);
|
|
450
|
+
}
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
const runWithClientCreateAuth = async (req, res, next, handler) => {
|
|
454
|
+
try {
|
|
455
|
+
if (typeof uiAuthController.resolveAuthContext === 'function') {
|
|
456
|
+
const context = await uiAuthController.resolveAuthContext(req, res, {
|
|
457
|
+
allowClientAuth: true,
|
|
458
|
+
allowUrlToken: false,
|
|
459
|
+
});
|
|
460
|
+
if (context?.type === 'session') {
|
|
461
|
+
await handler(context);
|
|
462
|
+
return;
|
|
463
|
+
}
|
|
464
|
+
if (context?.type === 'client') {
|
|
465
|
+
const client = await clientRecordFromAuthContext(context);
|
|
466
|
+
if (client?.clientKind === 'desktop-local') {
|
|
467
|
+
await handler({ ...context, client });
|
|
468
|
+
return;
|
|
469
|
+
}
|
|
470
|
+
return res.status(403).json({ error: 'Client tokens cannot create remote clients' });
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
await runWithUiAuth(req, res, next, async () => {
|
|
475
|
+
await handler({ type: 'session' });
|
|
476
|
+
}, { sessionOnly: true });
|
|
477
|
+
} catch (error) {
|
|
478
|
+
next(error);
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
|
|
482
|
+
const clientIdFromAuthContext = (context) => {
|
|
483
|
+
const raw = context?.client?.id || context?.clientId;
|
|
484
|
+
return typeof raw === 'string' && raw.length > 0 ? raw : null;
|
|
485
|
+
};
|
|
486
|
+
|
|
487
|
+
const clientRecordFromAuthContext = async (context) => {
|
|
488
|
+
if (context?.client && typeof context.client === 'object') {
|
|
489
|
+
return context.client;
|
|
490
|
+
}
|
|
491
|
+
const clientId = clientIdFromAuthContext(context);
|
|
492
|
+
if (!clientId) return null;
|
|
493
|
+
const clients = await remoteClientAuthRuntime.listClients();
|
|
494
|
+
return clients.find((client) => client.id === clientId) || null;
|
|
495
|
+
};
|
|
496
|
+
|
|
497
|
+
const requestOrigin = (req) => {
|
|
498
|
+
const forwardedProto = typeof req.headers?.['x-forwarded-proto'] === 'string'
|
|
499
|
+
? req.headers['x-forwarded-proto'].split(',')[0].trim()
|
|
500
|
+
: '';
|
|
501
|
+
const protocol = forwardedProto || (req.socket?.encrypted ? 'https' : 'http');
|
|
502
|
+
const host = typeof req.headers?.host === 'string' ? req.headers.host.trim() : '';
|
|
503
|
+
if (!host) return null;
|
|
504
|
+
return `${protocol}://${host}`;
|
|
505
|
+
};
|
|
506
|
+
|
|
507
|
+
const requestIp = (req) => {
|
|
508
|
+
// Do not use req.ip here: Express rewrites it from X-Forwarded-For when
|
|
509
|
+
// trust proxy is enabled, and redeem is unauthenticated before this limit.
|
|
510
|
+
return req.socket?.remoteAddress || req.connection?.remoteAddress || 'unknown';
|
|
511
|
+
};
|
|
512
|
+
|
|
513
|
+
const pairingIdFromRequest = (req) => {
|
|
514
|
+
const raw = typeof req.body?.pairingId === 'string' ? req.body.pairingId.trim() : '';
|
|
515
|
+
return raw || 'missing';
|
|
516
|
+
};
|
|
517
|
+
|
|
518
|
+
const checkPairingRedeemRateLimit = (req) => {
|
|
519
|
+
const now = Date.now();
|
|
520
|
+
const key = `${requestIp(req)}:${pairingIdFromRequest(req)}`;
|
|
521
|
+
for (const [entryKey, entry] of pairingRedeemAttempts.entries()) {
|
|
522
|
+
if (!entry || now - entry.firstAttemptAt >= PAIRING_REDEEM_RATE_LIMIT_WINDOW_MS) {
|
|
523
|
+
pairingRedeemAttempts.delete(entryKey);
|
|
524
|
+
}
|
|
525
|
+
}
|
|
526
|
+
const entry = pairingRedeemAttempts.get(key);
|
|
527
|
+
if (!entry) {
|
|
528
|
+
pairingRedeemAttempts.set(key, { count: 1, firstAttemptAt: now });
|
|
529
|
+
return { allowed: true, remaining: PAIRING_REDEEM_RATE_LIMIT_MAX_ATTEMPTS - 1, reset: Math.ceil((now + PAIRING_REDEEM_RATE_LIMIT_WINDOW_MS) / 1000) };
|
|
530
|
+
}
|
|
531
|
+
const reset = Math.ceil((entry.firstAttemptAt + PAIRING_REDEEM_RATE_LIMIT_WINDOW_MS) / 1000);
|
|
532
|
+
if (entry.count >= PAIRING_REDEEM_RATE_LIMIT_MAX_ATTEMPTS) {
|
|
533
|
+
return {
|
|
534
|
+
allowed: false,
|
|
535
|
+
remaining: 0,
|
|
536
|
+
reset,
|
|
537
|
+
retryAfter: Math.max(1, Math.ceil((entry.firstAttemptAt + PAIRING_REDEEM_RATE_LIMIT_WINDOW_MS - now) / 1000)),
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
entry.count += 1;
|
|
541
|
+
return { allowed: true, remaining: PAIRING_REDEEM_RATE_LIMIT_MAX_ATTEMPTS - entry.count, reset };
|
|
542
|
+
};
|
|
543
|
+
|
|
544
|
+
const clearPairingRedeemRateLimit = (req) => {
|
|
545
|
+
pairingRedeemAttempts.delete(`${requestIp(req)}:${pairingIdFromRequest(req)}`);
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
const normalizeCandidateUrl = (value) => {
|
|
549
|
+
if (typeof value !== 'string' || !value.trim()) return null;
|
|
550
|
+
try {
|
|
551
|
+
const parsed = new URL(value.trim());
|
|
552
|
+
if (parsed.protocol !== 'http:' && parsed.protocol !== 'https:') return null;
|
|
553
|
+
parsed.hash = '';
|
|
554
|
+
parsed.search = '';
|
|
555
|
+
return parsed.toString().replace(/\/+$/, '');
|
|
556
|
+
} catch {
|
|
557
|
+
return null;
|
|
558
|
+
}
|
|
559
|
+
};
|
|
560
|
+
|
|
561
|
+
// `preferredServerUrl` is the caller-supplied externally reachable URL (the
|
|
562
|
+
// desktop UI reaches its own server over loopback, so the request origin is not
|
|
563
|
+
// scannable — it passes the LAN URL instead). Falls back to the request origin
|
|
564
|
+
// for remote callers where the Host header IS the reachable address.
|
|
565
|
+
//
|
|
566
|
+
// `includeRelay` is the per-link transport choice from the create-link dialog:
|
|
567
|
+
// true → add the relay candidate, enabling the relay host on demand;
|
|
568
|
+
// false → direct only, never relay;
|
|
569
|
+
// undefined → legacy: advertise relay only if it is already enabled.
|
|
570
|
+
// `includeDirect === false` produces a relay-only link (no direct candidate).
|
|
571
|
+
const pairingServerCandidates = async (req, { preferredServerUrl, includeRelay, includeDirect = true } = {}) => {
|
|
572
|
+
const candidates = [];
|
|
573
|
+
if (includeDirect) {
|
|
574
|
+
const direct = normalizeCandidateUrl(preferredServerUrl) || requestOrigin(req);
|
|
575
|
+
if (direct) {
|
|
576
|
+
let type = 'lan';
|
|
577
|
+
try {
|
|
578
|
+
const parsed = new URL(direct);
|
|
579
|
+
type = parsed.protocol === 'https:' ? 'tunnel' : 'lan';
|
|
580
|
+
} catch {
|
|
581
|
+
}
|
|
582
|
+
candidates.push({ type, url: direct, priority: 10 });
|
|
583
|
+
}
|
|
584
|
+
}
|
|
585
|
+
// The client races candidates and falls back to relay only if the direct URL
|
|
586
|
+
// is unreachable (relay carries a higher priority number).
|
|
587
|
+
if (includeRelay !== false) {
|
|
588
|
+
try {
|
|
589
|
+
const relayCandidate = await getRelayPairingCandidate({ ensureEnabled: includeRelay === true });
|
|
590
|
+
if (relayCandidate) candidates.push(relayCandidate);
|
|
591
|
+
} catch {
|
|
592
|
+
// A relay enable/status failure must not break direct pairing.
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
return candidates;
|
|
596
|
+
};
|
|
597
|
+
|
|
598
|
+
const sendPairingRedeemError = (res, error) => {
|
|
599
|
+
const statusCode = typeof error?.statusCode === 'number' ? error.statusCode : 400;
|
|
600
|
+
res.status(statusCode).json({ error: 'Invalid or expired pairing session' });
|
|
601
|
+
};
|
|
602
|
+
|
|
603
|
+
const requireApiAuth = async (req, res, next) => {
|
|
604
|
+
// Preview proxy requests carry a target-scoped capability token that the
|
|
605
|
+
// preview proxy validates against the registered target id/TTL. Let those
|
|
606
|
+
// requests reach that stricter check instead of failing the global UI auth
|
|
607
|
+
// gate when the short-lived browser URL auth token expires.
|
|
608
|
+
if (hasPreviewProxyCredential(req)) {
|
|
609
|
+
return next();
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
613
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
614
|
+
return tunnelAuthController.requireTunnelSession(req, res, next);
|
|
615
|
+
}
|
|
616
|
+
return uiAuthController.requireAuth(req, res, next);
|
|
617
|
+
};
|
|
618
|
+
|
|
619
|
+
app.get('/auth/session', async (req, res) => {
|
|
620
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
621
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
622
|
+
const tunnelSession = tunnelAuthController.getTunnelSessionFromRequest(req);
|
|
623
|
+
if (tunnelSession) {
|
|
624
|
+
return res.json({ authenticated: true, scope: 'tunnel' });
|
|
625
|
+
}
|
|
626
|
+
tunnelAuthController.clearTunnelSessionCookie(req, res);
|
|
627
|
+
return res.status(401).json({ authenticated: false, locked: true, tunnelLocked: true });
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
try {
|
|
631
|
+
await uiAuthController.handleSessionStatus(req, res);
|
|
632
|
+
} catch {
|
|
633
|
+
res.status(500).json({ error: 'Internal server error' });
|
|
634
|
+
}
|
|
635
|
+
});
|
|
636
|
+
|
|
637
|
+
app.post('/auth/session', (req, res) => {
|
|
638
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
639
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
640
|
+
return res.status(403).json({ error: 'Password login is disabled for tunnel scope', tunnelLocked: true });
|
|
641
|
+
}
|
|
642
|
+
return uiAuthController.handleSessionCreate(req, res);
|
|
643
|
+
});
|
|
644
|
+
|
|
645
|
+
app.post('/auth/url-token', async (req, res, next) => {
|
|
646
|
+
try {
|
|
647
|
+
await uiAuthController.handleUrlAuthToken(req, res);
|
|
648
|
+
} catch (error) {
|
|
649
|
+
next(error);
|
|
650
|
+
}
|
|
651
|
+
});
|
|
652
|
+
|
|
653
|
+
app.get('/auth/passkey/status', (req, res) => {
|
|
654
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
655
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
656
|
+
return res.json({ enabled: false, hasPasskeys: false, passkeyCount: 0, rpID: null, tunnelLocked: true });
|
|
657
|
+
}
|
|
658
|
+
return uiAuthController.handlePasskeyStatus(req, res);
|
|
659
|
+
});
|
|
660
|
+
|
|
661
|
+
app.post('/auth/passkey/authenticate/options', (req, res) => {
|
|
662
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
663
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
664
|
+
return res.status(403).json({ error: 'Passkey login is disabled for tunnel scope', tunnelLocked: true });
|
|
665
|
+
}
|
|
666
|
+
return uiAuthController.handlePasskeyAuthenticationOptions(req, res);
|
|
667
|
+
});
|
|
668
|
+
|
|
669
|
+
app.post('/auth/passkey/authenticate/verify', (req, res) => {
|
|
670
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
671
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
672
|
+
return res.status(403).json({ error: 'Passkey login is disabled for tunnel scope', tunnelLocked: true });
|
|
673
|
+
}
|
|
674
|
+
return uiAuthController.handlePasskeyAuthenticationVerify(req, res);
|
|
675
|
+
});
|
|
676
|
+
|
|
677
|
+
app.post('/auth/passkey/register/options', async (req, res, next) => {
|
|
678
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
679
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
680
|
+
return res.status(403).json({ error: 'Passkey setup is disabled for tunnel scope', tunnelLocked: true });
|
|
681
|
+
}
|
|
682
|
+
try {
|
|
683
|
+
await uiAuthController.requireSessionAuth(req, res, async () => {
|
|
684
|
+
await uiAuthController.handlePasskeyRegistrationOptions(req, res);
|
|
685
|
+
});
|
|
686
|
+
} catch (error) {
|
|
687
|
+
next(error);
|
|
688
|
+
}
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
app.post('/auth/passkey/register/verify', async (req, res, next) => {
|
|
692
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
693
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
694
|
+
return res.status(403).json({ error: 'Passkey setup is disabled for tunnel scope', tunnelLocked: true });
|
|
695
|
+
}
|
|
696
|
+
try {
|
|
697
|
+
await uiAuthController.requireSessionAuth(req, res, async () => {
|
|
698
|
+
await uiAuthController.handlePasskeyRegistrationVerify(req, res);
|
|
699
|
+
});
|
|
700
|
+
} catch (error) {
|
|
701
|
+
next(error);
|
|
702
|
+
}
|
|
703
|
+
});
|
|
704
|
+
|
|
705
|
+
app.get('/api/passkeys', async (req, res, next) => {
|
|
706
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
707
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
708
|
+
return res.status(403).json({ error: 'Passkey management is disabled for tunnel scope', tunnelLocked: true });
|
|
709
|
+
}
|
|
710
|
+
try {
|
|
711
|
+
await uiAuthController.requireSessionAuth(req, res, async () => {
|
|
712
|
+
await uiAuthController.handlePasskeyList(req, res);
|
|
713
|
+
});
|
|
714
|
+
} catch (error) {
|
|
715
|
+
next(error);
|
|
716
|
+
}
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
app.delete('/api/passkeys/:id', async (req, res, next) => {
|
|
720
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
721
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
722
|
+
return res.status(403).json({ error: 'Passkey management is disabled for tunnel scope', tunnelLocked: true });
|
|
723
|
+
}
|
|
724
|
+
try {
|
|
725
|
+
await uiAuthController.requireSessionAuth(req, res, async () => {
|
|
726
|
+
await uiAuthController.handlePasskeyRevoke(req, res);
|
|
727
|
+
});
|
|
728
|
+
} catch (error) {
|
|
729
|
+
next(error);
|
|
730
|
+
}
|
|
731
|
+
});
|
|
732
|
+
|
|
733
|
+
app.post('/api/auth/reset', async (req, res, next) => {
|
|
734
|
+
const requestScope = tunnelAuthController.classifyRequestScope(req);
|
|
735
|
+
if (requestScope === 'tunnel' || requestScope === 'unknown-public') {
|
|
736
|
+
return res.status(403).json({ error: 'Global sign-out is disabled for tunnel scope', tunnelLocked: true });
|
|
737
|
+
}
|
|
738
|
+
try {
|
|
739
|
+
await uiAuthController.requireSessionAuth(req, res, async () => {
|
|
740
|
+
await uiAuthController.handleResetAuth(req, res);
|
|
741
|
+
});
|
|
742
|
+
} catch (error) {
|
|
743
|
+
next(error);
|
|
744
|
+
}
|
|
745
|
+
});
|
|
746
|
+
|
|
747
|
+
app.get('/api/client-auth/clients', async (req, res, next) => {
|
|
748
|
+
await runWithClientManagementAuth(req, res, next, async (authContext) => {
|
|
749
|
+
if (authContext.type === 'client') {
|
|
750
|
+
const client = await clientRecordFromAuthContext(authContext);
|
|
751
|
+
// The desktop shell's local client is the trusted operator of this
|
|
752
|
+
// server; it manages devices just like a browser UI session. Every
|
|
753
|
+
// other client token is scoped to its own record.
|
|
754
|
+
if (client?.clientKind !== 'desktop-local') {
|
|
755
|
+
return res.json({ clients: client ? [client] : [] });
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
const clients = await remoteClientAuthRuntime.listClients();
|
|
759
|
+
res.json({ clients });
|
|
760
|
+
});
|
|
761
|
+
});
|
|
762
|
+
|
|
763
|
+
app.post('/api/client-auth/clients', express.json({ limit: '64kb' }), async (req, res, next) => {
|
|
764
|
+
await runWithClientCreateAuth(req, res, next, async () => {
|
|
765
|
+
const result = await remoteClientAuthRuntime.createClient({
|
|
766
|
+
label: req.body?.label,
|
|
767
|
+
clientKind: req.body?.clientKind,
|
|
768
|
+
dedupeKey: req.body?.dedupeKey,
|
|
769
|
+
});
|
|
770
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
771
|
+
res.status(201).json(result);
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
|
|
775
|
+
app.delete('/api/client-auth/clients/:id', async (req, res, next) => {
|
|
776
|
+
await runWithClientManagementAuth(req, res, next, async (authContext) => {
|
|
777
|
+
if (authContext.type === 'client') {
|
|
778
|
+
const actingClient = await clientRecordFromAuthContext(authContext);
|
|
779
|
+
// The desktop shell's local client manages every device; other client
|
|
780
|
+
// tokens may only revoke themselves.
|
|
781
|
+
if (actingClient?.clientKind !== 'desktop-local') {
|
|
782
|
+
const clientId = clientIdFromAuthContext(authContext);
|
|
783
|
+
if (!clientId || clientId !== req.params?.id) {
|
|
784
|
+
return res.status(403).json({ revoked: false, error: 'Client tokens can only revoke themselves' });
|
|
785
|
+
}
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
const result = await remoteClientAuthRuntime.revokeClient(req.params?.id);
|
|
789
|
+
if (!result.revoked) {
|
|
790
|
+
return res.status(404).json({ revoked: false, error: 'Client not found' });
|
|
791
|
+
}
|
|
792
|
+
void reconcileRelay();
|
|
793
|
+
res.json(result);
|
|
794
|
+
});
|
|
795
|
+
});
|
|
796
|
+
|
|
797
|
+
app.delete('/api/client-auth/clients', async (req, res, next) => {
|
|
798
|
+
await runWithClientManagementAuth(req, res, next, async (authContext) => {
|
|
799
|
+
if (authContext.type === 'client') {
|
|
800
|
+
const actingClient = await clientRecordFromAuthContext(authContext);
|
|
801
|
+
// Purging revoked devices is a whole-server management action; only the
|
|
802
|
+
// trusted desktop shell client (or a UI session) may do it.
|
|
803
|
+
if (actingClient?.clientKind !== 'desktop-local') {
|
|
804
|
+
return res.status(403).json({ purged: 0, error: 'Client tokens cannot purge revoked devices' });
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
const result = await remoteClientAuthRuntime.purgeRevokedClients();
|
|
808
|
+
void reconcileRelay();
|
|
809
|
+
res.json(result);
|
|
810
|
+
});
|
|
811
|
+
});
|
|
812
|
+
|
|
813
|
+
app.post('/api/client-auth/pairing/sessions', express.json({ limit: '64kb' }), async (req, res, next) => {
|
|
814
|
+
await runWithClientCreateAuth(req, res, next, async (authContext) => {
|
|
815
|
+
const candidates = await pairingServerCandidates(req, {
|
|
816
|
+
preferredServerUrl: req.body?.serverUrl,
|
|
817
|
+
includeRelay: typeof req.body?.includeRelay === 'boolean' ? req.body.includeRelay : undefined,
|
|
818
|
+
includeDirect: req.body?.includeDirect !== false,
|
|
819
|
+
});
|
|
820
|
+
const usesRelay = candidates.some((candidate) => candidate.type === 'relay');
|
|
821
|
+
const result = await clientPairingRuntime.createPairingSession({
|
|
822
|
+
label: req.body?.label,
|
|
823
|
+
allowedClientKinds: req.body?.allowedClientKinds,
|
|
824
|
+
createdByClientId: clientIdFromAuthContext(authContext),
|
|
825
|
+
usesRelay,
|
|
826
|
+
});
|
|
827
|
+
void reconcileRelay();
|
|
828
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
829
|
+
res.status(201).json({
|
|
830
|
+
...result,
|
|
831
|
+
server: { label: getServerLabel(), candidates },
|
|
832
|
+
});
|
|
833
|
+
});
|
|
834
|
+
});
|
|
835
|
+
|
|
836
|
+
// Current reachable transports for an ALREADY-PAIRED device. Pairing-payload
|
|
837
|
+
// candidates are a snapshot: when DHCP hands this machine a new address, the
|
|
838
|
+
// device's saved LAN candidate goes stale and it is stuck on the relay forever.
|
|
839
|
+
// A client that connected over any live transport calls this to learn the
|
|
840
|
+
// server's present LAN URLs (plus the relay candidate when enabled) and update
|
|
841
|
+
// its saved candidate set. `serverId` lets the client bind the response — and
|
|
842
|
+
// later /health probes of the learned addresses — to this server's identity
|
|
843
|
+
// before trusting them with its bearer token.
|
|
844
|
+
// Auth: UI session or client bearer; never the short-lived URL token.
|
|
845
|
+
app.get('/api/client-auth/connection/candidates', async (req, res, next) => {
|
|
846
|
+
await runWithClientManagementAuth(req, res, next, async () => {
|
|
847
|
+
const candidates = [];
|
|
848
|
+
const directUrls = (() => {
|
|
849
|
+
try {
|
|
850
|
+
const urls = getDirectCandidateUrls(req);
|
|
851
|
+
return Array.isArray(urls) ? urls : [];
|
|
852
|
+
} catch {
|
|
853
|
+
return [];
|
|
854
|
+
}
|
|
855
|
+
})();
|
|
856
|
+
for (const url of directUrls) {
|
|
857
|
+
const normalized = normalizeCandidateUrl(url);
|
|
858
|
+
if (normalized) candidates.push({ type: 'lan', url: normalized, priority: 10 });
|
|
859
|
+
}
|
|
860
|
+
try {
|
|
861
|
+
const relayCandidate = await getRelayPairingCandidate({ ensureEnabled: false });
|
|
862
|
+
if (relayCandidate) candidates.push(relayCandidate);
|
|
863
|
+
} catch {
|
|
864
|
+
// Relay status failure must not break the direct-candidate refresh.
|
|
865
|
+
}
|
|
866
|
+
let serverId = null;
|
|
867
|
+
try {
|
|
868
|
+
const value = await getServerId();
|
|
869
|
+
serverId = typeof value === 'string' && value.trim() ? value.trim() : null;
|
|
870
|
+
} catch {
|
|
871
|
+
serverId = null;
|
|
872
|
+
}
|
|
873
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
874
|
+
res.json({ label: getServerLabel(), ...(serverId ? { serverId } : {}), candidates });
|
|
875
|
+
});
|
|
876
|
+
});
|
|
877
|
+
|
|
878
|
+
// Direct transports the server can be reached on (for the create-device dialog).
|
|
879
|
+
app.get('/api/client-auth/pairing/transports', async (req, res, next) => {
|
|
880
|
+
await runWithClientCreateAuth(req, res, next, async () => {
|
|
881
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
882
|
+
res.json(getPairingTransports(req));
|
|
883
|
+
});
|
|
884
|
+
});
|
|
885
|
+
|
|
886
|
+
// Pending pairing sessions (link created, device not yet connected) for the
|
|
887
|
+
// "pending devices" list. Secrets are never included.
|
|
888
|
+
app.get('/api/client-auth/pairing/sessions', async (req, res, next) => {
|
|
889
|
+
await runWithClientCreateAuth(req, res, next, async () => {
|
|
890
|
+
const pending = await clientPairingRuntime.listPendingSessions();
|
|
891
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
892
|
+
res.json({ pending });
|
|
893
|
+
});
|
|
894
|
+
});
|
|
895
|
+
|
|
896
|
+
app.delete('/api/client-auth/pairing/sessions/:id', async (req, res, next) => {
|
|
897
|
+
await runWithClientCreateAuth(req, res, next, async () => {
|
|
898
|
+
const result = await clientPairingRuntime.cancelPairingSession(req.params?.id);
|
|
899
|
+
if (!result.cancelled) {
|
|
900
|
+
return res.status(404).json({ cancelled: false, error: 'Pairing session not found' });
|
|
901
|
+
}
|
|
902
|
+
void reconcileRelay();
|
|
903
|
+
res.json(result);
|
|
904
|
+
});
|
|
905
|
+
});
|
|
906
|
+
|
|
907
|
+
app.post('/api/client-auth/pairing/redeem', express.json({ limit: '64kb' }), async (req, res, next) => {
|
|
908
|
+
try {
|
|
909
|
+
const rateLimit = checkPairingRedeemRateLimit(req);
|
|
910
|
+
res.setHeader('X-RateLimit-Limit', PAIRING_REDEEM_RATE_LIMIT_MAX_ATTEMPTS);
|
|
911
|
+
res.setHeader('X-RateLimit-Remaining', rateLimit.remaining);
|
|
912
|
+
res.setHeader('X-RateLimit-Reset', rateLimit.reset);
|
|
913
|
+
if (!rateLimit.allowed) {
|
|
914
|
+
res.setHeader('Retry-After', rateLimit.retryAfter);
|
|
915
|
+
return res.status(429).json({ error: 'Invalid or expired pairing session' });
|
|
916
|
+
}
|
|
917
|
+
const result = await clientPairingRuntime.redeemPairingSession({
|
|
918
|
+
pairingId: req.body?.pairingId,
|
|
919
|
+
secret: req.body?.secret,
|
|
920
|
+
clientLabel: req.body?.clientLabel,
|
|
921
|
+
clientKind: req.body?.clientKind,
|
|
922
|
+
deviceName: req.body?.deviceName,
|
|
923
|
+
devicePlatform: req.body?.devicePlatform,
|
|
924
|
+
deviceModel: req.body?.deviceModel,
|
|
925
|
+
appVersion: req.body?.appVersion,
|
|
926
|
+
dedupeKey: req.body?.dedupeKey,
|
|
927
|
+
});
|
|
928
|
+
clearPairingRedeemRateLimit(req);
|
|
929
|
+
// The session became a device: relay demand may have moved from the pending
|
|
930
|
+
// session to the paired device (or a non-relay redeem may drop it).
|
|
931
|
+
void reconcileRelay();
|
|
932
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
933
|
+
res.json({
|
|
934
|
+
ok: true,
|
|
935
|
+
server: {
|
|
936
|
+
label: getServerLabel(),
|
|
937
|
+
url: requestOrigin(req),
|
|
938
|
+
fingerprint: result.pairing?.fingerprint || null,
|
|
939
|
+
},
|
|
940
|
+
client: result.client,
|
|
941
|
+
clientToken: result.token,
|
|
942
|
+
});
|
|
943
|
+
} catch (error) {
|
|
944
|
+
if (error?.message === 'Invalid or expired pairing session') {
|
|
945
|
+
sendPairingRedeemError(res, error);
|
|
946
|
+
return;
|
|
947
|
+
}
|
|
948
|
+
next(error);
|
|
949
|
+
}
|
|
950
|
+
});
|
|
951
|
+
|
|
952
|
+
app.get('/connect', async (req, res) => {
|
|
953
|
+
try {
|
|
954
|
+
const token = typeof req.query?.t === 'string' ? req.query.t : '';
|
|
955
|
+
const settings = await readSettingsFromDiskMigrated();
|
|
956
|
+
const tunnelSessionTtlMs = normalizeTunnelSessionTtlMs(settings?.tunnelSessionTtlMs);
|
|
957
|
+
|
|
958
|
+
const exchange = tunnelAuthController.exchangeBootstrapToken({
|
|
959
|
+
req,
|
|
960
|
+
res,
|
|
961
|
+
token,
|
|
962
|
+
sessionTtlMs: tunnelSessionTtlMs,
|
|
963
|
+
});
|
|
964
|
+
|
|
965
|
+
res.setHeader('Cache-Control', 'no-store');
|
|
966
|
+
|
|
967
|
+
if (!exchange.ok) {
|
|
968
|
+
if (exchange.reason === 'rate-limited') {
|
|
969
|
+
res.setHeader('Retry-After', String(exchange.retryAfter || 60));
|
|
970
|
+
return res.status(429).type('text/plain').send('Too many attempts. Please try again later.');
|
|
971
|
+
}
|
|
972
|
+
return res.status(401).type('text/plain').send('Connection link is invalid or expired.');
|
|
973
|
+
}
|
|
974
|
+
|
|
975
|
+
return res.redirect(302, '/');
|
|
976
|
+
} catch {
|
|
977
|
+
return res.status(500).type('text/plain').send('Failed to process connect request.');
|
|
978
|
+
}
|
|
979
|
+
});
|
|
980
|
+
|
|
981
|
+
app.post('/api/system/probe-url', express.json({ limit: '16kb' }), async (req, res, next) => {
|
|
982
|
+
try {
|
|
983
|
+
await requireApiAuth(req, res, async () => {
|
|
984
|
+
const url = parseLoopbackUrl(req.body?.url);
|
|
985
|
+
if (!url) {
|
|
986
|
+
return res.status(400).json({ ok: false, error: 'Invalid loopback URL' });
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
try {
|
|
990
|
+
const response = await fetch(url.toString(), {
|
|
991
|
+
method: 'GET',
|
|
992
|
+
redirect: 'manual',
|
|
993
|
+
signal: AbortSignal.timeout(1500),
|
|
994
|
+
});
|
|
995
|
+
return res.json({ ok: response.status >= 200 && response.status < 600, status: response.status });
|
|
996
|
+
} catch (error) {
|
|
997
|
+
return res.json({ ok: false, error: error?.message || 'Probe failed' });
|
|
998
|
+
}
|
|
999
|
+
});
|
|
1000
|
+
} catch (error) {
|
|
1001
|
+
next(error);
|
|
1002
|
+
}
|
|
1003
|
+
});
|
|
1004
|
+
|
|
1005
|
+
app.use('/api', async (req, res, next) => {
|
|
1006
|
+
try {
|
|
1007
|
+
await requireApiAuth(req, res, next);
|
|
1008
|
+
} catch (err) {
|
|
1009
|
+
next(err);
|
|
1010
|
+
}
|
|
1011
|
+
});
|
|
1012
|
+
};
|
|
1013
|
+
|
|
1014
|
+
export const registerCommonRequestMiddleware = (app, dependencies) => {
|
|
1015
|
+
const { express, verboseRequestLogs = false } = dependencies;
|
|
1016
|
+
|
|
1017
|
+
app.use((req, res, next) => {
|
|
1018
|
+
if (req.path.startsWith('/api/behavior')) {
|
|
1019
|
+
const contentLength = parseInt(req.headers['content-length'] || '0', 10);
|
|
1020
|
+
if (contentLength > 1024 * 1024) {
|
|
1021
|
+
return res.status(413).json({ error: 'Content exceeds maximum size of 1048576 bytes' });
|
|
1022
|
+
}
|
|
1023
|
+
express.json({ limit: '1mb' })(req, res, next);
|
|
1024
|
+
} else if (req.path.startsWith('/api/pi')) {
|
|
1025
|
+
express.json({ limit: '50mb' })(req, res, next);
|
|
1026
|
+
} else {
|
|
1027
|
+
// Workspace, settings, Git, and Pi adapters all accept JSON bodies.
|
|
1028
|
+
// Route-specific handlers still enforce their narrower payload limits.
|
|
1029
|
+
express.json({ limit: '50mb' })(req, res, next);
|
|
1030
|
+
}
|
|
1031
|
+
});
|
|
1032
|
+
|
|
1033
|
+
app.use(express.urlencoded({ extended: true, limit: '50mb' }));
|
|
1034
|
+
|
|
1035
|
+
app.use((req, _res, next) => {
|
|
1036
|
+
if (verboseRequestLogs) {
|
|
1037
|
+
console.log(`${new Date().toISOString()} - ${req.method} ${req.path}`);
|
|
1038
|
+
}
|
|
1039
|
+
next();
|
|
1040
|
+
});
|
|
1041
|
+
};
|