@hienlh/ppm 0.18.5 → 0.18.7
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/.release-run.sh +3 -3
- package/CHANGELOG.md +13 -0
- package/assets/skills/ppm/SKILL.md +1 -1
- package/assets/skills/ppm/references/cli-reference.md +4 -4
- package/assets/skills/ppm/references/http-api.md +1 -1
- package/dist/web/assets/{ai-resource-editor-C5GpzwXP.js → ai-resource-editor-DZQUyrsU.js} +1 -1
- package/dist/web/assets/{angular-html-B7ZS6cwZ.js → angular-html-jfMqUuRd.js} +1 -1
- package/dist/web/assets/{angular-ts-CiibjfLJ.js → angular-ts-wytn9PMm.js} +1 -1
- package/dist/web/assets/{apl-DsChgbBI.js → apl-i-ahKx6O.js} +1 -1
- package/dist/web/assets/architecture-PBZL5I3N-Bs7wzj-W.js +1 -0
- package/dist/web/assets/{astro-CcrkAzRn.js → astro-DVBCJfG6.js} +1 -1
- package/dist/web/assets/{audio-preview-C0m1G-ba.js → audio-preview-GGksv6U8.js} +1 -1
- package/dist/web/assets/{blade-BW0AyHqd.js → blade-BHlL8SqU.js} +1 -1
- package/dist/web/assets/{bsl-D3fsZX-N.js → bsl-D-UOfR1F.js} +1 -1
- package/dist/web/assets/{cairo-BioL0Hpg.js → cairo-Bn6rucli.js} +1 -1
- package/dist/web/assets/chat-tab-Xd2WMjdX.js +15 -0
- package/dist/web/assets/{cobol-SQ7BUEjA.js → cobol-Byn9FYKu.js} +1 -1
- package/dist/web/assets/code-editor-DqXYJWAB.js +10 -0
- package/dist/web/assets/{coffee-BwiA2ABt.js → coffee-DjBl4gm-.js} +1 -1
- package/dist/web/assets/{conflict-editor-CItgFyu9.js → conflict-editor-Dg_JIcKq.js} +1 -1
- package/dist/web/assets/{cpp-CsiyAYfZ.js → cpp-CKzic-3E.js} +1 -1
- package/dist/web/assets/{crystal-new71ISE.js → crystal-Bkg-Ly_g.js} +1 -1
- package/dist/web/assets/{csv-preview-Dz6hI2BO.js → csv-preview-DsJ_a2Op.js} +1 -1
- package/dist/web/assets/data-grid-overlay-editor-B1mTl3KS.js +1 -0
- package/dist/web/assets/data-grid-types-BXwlFMzs.js +1 -0
- package/dist/web/assets/database-viewer-CzjnrnMz.js +1 -0
- package/dist/web/assets/{diff-viewer-B-3Byzuf.js → diff-viewer-DUNkO-ll.js} +1 -1
- package/dist/web/assets/dist-CUPbqNnL.js +11 -0
- package/dist/web/assets/{docx-preview-CM9l_r9q.js → docx-preview-DujpUDkE.js} +1 -1
- package/dist/web/assets/{edge-CtcrJXZt.js → edge-DVbZnd3Y.js} +1 -1
- package/dist/web/assets/{edit-diff-preview-yY096y6H.js → edit-diff-preview-BivQwZMD.js} +1 -1
- package/dist/web/assets/{elixir-vH8AlwfK.js → elixir-Dwi8Wu7W.js} +1 -1
- package/dist/web/assets/{elm-vhtnbbrd.js → elm-DtIv-HXJ.js} +1 -1
- package/dist/web/assets/{erb-xsqc-5NV.js → erb-D3HEDz1x.js} +1 -1
- package/dist/web/assets/{erlang-CqCTsrl7.js → erlang-2MjTCzGz.js} +1 -1
- package/dist/web/assets/esm-CZ8B8Ba2.js +2 -0
- package/dist/web/assets/{explorer-body-DHOiBqiL.js → explorer-body-DSDJUQs7.js} +1 -1
- package/dist/web/assets/{explorer-window-content-CTBHwDgN.js → explorer-window-content-CWYBapkj.js} +1 -1
- package/dist/web/assets/{extension-webview-D3LOkB2x.js → extension-webview-DBTFznQp.js} +1 -1
- package/dist/web/assets/{fortran-fixed-form-Ctm2ZKzo.js → fortran-fixed-form-BLyAtyPM.js} +1 -1
- package/dist/web/assets/{fsharp-DLTMpL2s.js → fsharp-Bxbn_gbr.js} +1 -1
- package/dist/web/assets/{gdresource-D3G0lQVG.js → gdresource-sFMY4D2Q.js} +1 -1
- package/dist/web/assets/{git-commit-CScOErgk.js → git-commit-BzB9Lio5.js} +1 -1
- package/dist/web/assets/{git-log-panel-Bs9ShnYL.js → git-log-panel-D8ZQdoYl.js} +1 -1
- package/dist/web/assets/{git-rebase-C1SMSliG.js → git-rebase-CKSVd848.js} +1 -1
- package/dist/web/assets/gitGraph-HDMCJU4V-D7i54kbM.js +1 -0
- package/dist/web/assets/glide-data-grid-uIjdTT7c.js +138 -0
- package/dist/web/assets/{glimmer-js-DsQZnICF.js → glimmer-js-BY8aExAJ.js} +1 -1
- package/dist/web/assets/{glimmer-ts-DrhpAdWj.js → glimmer-ts-Bak54dBX.js} +1 -1
- package/dist/web/assets/{glsl-eYL0pYVx.js → glsl-nR2eaJQe.js} +1 -1
- package/dist/web/assets/{graphql-DBRFyWue.js → graphql-CGPPFAU6.js} +1 -1
- package/dist/web/assets/{group-chat-tab-CwaKPj6c.js → group-chat-tab-B3sryFdA.js} +1 -1
- package/dist/web/assets/{hack-CMqVlAxr.js → hack-CXIMX-Ol.js} +1 -1
- package/dist/web/assets/{haml-GfSHNbBz.js → haml-tPY-9Pfm.js} +1 -1
- package/dist/web/assets/{handlebars-rg_XF64o.js → handlebars-BuW1LT7T.js} +1 -1
- package/dist/web/assets/{html-BEmGwpcK.js → html-bgVcwZ-t.js} +1 -1
- package/dist/web/assets/{html-derivative-BIu-fSXa.js → html-derivative-D6-IxTgn.js} +1 -1
- package/dist/web/assets/{http-DpxX0ibD.js → http-CJ1zyB-h.js} +1 -1
- package/dist/web/assets/{hurl-DUVEpqRc.js → hurl-CmoT7l3T.js} +1 -1
- package/dist/web/assets/{hxml-BrTwgLjo.js → hxml-CztOsL8o.js} +1 -1
- package/dist/web/assets/{image-preview-BLDXptaD.js → image-preview-B0VXSpYu.js} +1 -1
- package/dist/web/assets/{index-CtGTj9re.js → index-DgbOF3xa.js} +7 -7
- package/dist/web/assets/info-3K5VOQVL-BV41AzR9.js +1 -0
- package/dist/web/assets/{jinja-x3_G86rb.js → jinja-B1pq3jJq.js} +1 -1
- package/dist/web/assets/{jison-4I0KPKa0.js → jison-D8B5pCwA.js} +1 -1
- package/dist/web/assets/{julia-DIztIJlK.js → julia-D0K3bwpU.js} +1 -1
- package/dist/web/assets/{just-CIbbsxt1.js → just-B9Jlddu-.js} +1 -1
- package/dist/web/assets/{keybindings-store-BgBfamMQ.js → keybindings-store-FyolpNND.js} +1 -1
- package/dist/web/assets/{latex-BSW7Iz55.js → latex-BPJSSE6j.js} +1 -1
- package/dist/web/assets/{liquid-DXEQy61g.js → liquid-lv10fo4U.js} +1 -1
- package/dist/web/assets/{lua-mPzZWOOd.js → lua-PNuaIBEF.js} +1 -1
- package/dist/web/assets/{markdown-renderer-IZiQd8mi.js → markdown-renderer-BaBQ6Wm6.js} +3 -3
- package/dist/web/assets/markdown-renderer-feiuhJ9n.js +1 -0
- package/dist/web/assets/{marko-DT4otfeN.js → marko-Du3frD6X.js} +1 -1
- package/dist/web/assets/{mdc-DF7GteQU.js → mdc-BeDVcFRl.js} +1 -1
- package/dist/web/assets/{mobile-explorer-sheet-BQ7FISPT.js → mobile-explorer-sheet-Zxjl-e4c.js} +1 -1
- package/dist/web/assets/{nextflow-inS4q6JA.js → nextflow-DkcXP71s.js} +1 -1
- package/dist/web/assets/{nginx-C4sxDsIU.js → nginx-C5n8N_bt.js} +1 -1
- package/dist/web/assets/{nim-B_KZbdbl.js → nim-CIhyfs-A.js} +1 -1
- package/dist/web/assets/{notification-store-Cd1oQeCL.js → notification-store-DnGpxgkF.js} +1 -1
- package/dist/web/assets/{number-overlay-editor-J9_h14Jy.js → number-overlay-editor-NgOsWJ7x.js} +1 -1
- package/dist/web/assets/packet-RMMSAZCW-CaJoP44m.js +1 -0
- package/dist/web/assets/{pdf-preview-D_QDoRAJ.js → pdf-preview-xzAA4-kD.js} +1 -1
- package/dist/web/assets/{perl-Bzur_Tvg.js → perl-Cf31sZYE.js} +1 -1
- package/dist/web/assets/{php-BjcXxjIr.js → php-Dzl_MDIW.js} +1 -1
- package/dist/web/assets/pie-UPGHQEXC-DSGZmNw2.js +1 -0
- package/dist/web/assets/postgres-viewer-Dkec6GyK.js +3 -0
- package/dist/web/assets/{pug-DFgERppY.js → pug-CxSYHrB3.js} +1 -1
- package/dist/web/assets/{qml-CTl3rUgs.js → qml-DlEjGhwN.js} +1 -1
- package/dist/web/assets/radar-KQ55EAFF-Be4VUTs0.js +1 -0
- package/dist/web/assets/{razor-B8YTmkEh.js → razor-KVt5uW14.js} +1 -1
- package/dist/web/assets/{rst-KkcstADZ.js → rst-D5BwNTnw.js} +1 -1
- package/dist/web/assets/{ruby-BkGX_9bp.js → ruby-D5fejQwd.js} +1 -1
- package/dist/web/assets/{sas-CXAPcIB7.js → sas-Bj7B1CB2.js} +1 -1
- package/dist/web/assets/{scss-BstsOLPG.js → scss-BB0CUoCL.js} +1 -1
- package/dist/web/assets/{settings-store-DQcBuCyF.js → settings-store-C9YT1Hir.js} +2 -2
- package/dist/web/assets/{settings-tab-CsevraI7.js → settings-tab-Bd8e6iqY.js} +1 -1
- package/dist/web/assets/{shaderlab-w3VeqhHk.js → shaderlab-BdjEZUMc.js} +1 -1
- package/dist/web/assets/{shellsession-CM2BxxEn.js → shellsession-Bp1OA1rR.js} +1 -1
- package/dist/web/assets/{soy-1-aTOd4S.js → soy-DlYz3wsC.js} +1 -1
- package/dist/web/assets/{sparql-CqmJ7XJo.js → sparql-CdfII5Jd.js} +1 -1
- package/dist/web/assets/{sql-query-editor-CzOTxy85.js → sql-query-editor-Bz1XrUqI.js} +1 -1
- package/dist/web/assets/sqlite-viewer-D5-NZw6b.js +1 -0
- package/dist/web/assets/{stata-BbcHuOrm.js → stata-BvUA6GUW.js} +1 -1
- package/dist/web/assets/{surrealql-DYt8SBBH.js → surrealql--DLNbTyI.js} +1 -1
- package/dist/web/assets/{svelte-CBrmuJZk.js → svelte-CBfSsG4n.js} +1 -1
- package/dist/web/assets/{system-monitor-tab-CS9DhJrA.js → system-monitor-tab-A0jvt5Qw.js} +1 -1
- package/dist/web/assets/team-member-sheet-5Oaqm8I_.js +2 -0
- package/dist/web/assets/{team-member-window-content-DSlnO1ay.js → team-member-window-content-DSpZ2zhL.js} +1 -1
- package/dist/web/assets/{templ-BWg_73eT.js → templ-Dv8zpKZW.js} +1 -1
- package/dist/web/assets/{terminal-tab-DCOinj6h.js → terminal-tab-DXazqejW.js} +1 -1
- package/dist/web/assets/{tex-ChwnYbaL.js → tex-CsrOiqh1.js} +1 -1
- package/dist/web/assets/{tool-cards-DYQChJ7V.js → tool-cards-Bgp8iceS.js} +3 -3
- package/dist/web/assets/treemap-KZPCXAKY-Cu2zgbxU.js +1 -0
- package/dist/web/assets/{ts-tags-CFZZJcMc.js → ts-tags-3T98k4EJ.js} +1 -1
- package/dist/web/assets/{twig-DbRbrfbf.js → twig-u6QZ45FH.js} +1 -1
- package/dist/web/assets/{use-monaco-theme-DcRjryA0.js → use-monaco-theme-CpF3A7JL.js} +1 -1
- package/dist/web/assets/use-open-team-member-CUvV02fA.js +1 -0
- package/dist/web/assets/{use-websocket-CX3F55gy.js → use-websocket-TnL2I1io.js} +1 -1
- package/dist/web/assets/{vendor-mermaid-Dede75gn.js → vendor-mermaid-Bg4vE8QA.js} +193 -193
- package/dist/web/assets/{video-preview-DaYONH41.js → video-preview-CwtLPELG.js} +1 -1
- package/dist/web/assets/{vue-iynf6DnU.js → vue-CxIsxtwn.js} +1 -1
- package/dist/web/assets/{vue-html-vP_PPbWw.js → vue-html-BGL5qnuH.js} +1 -1
- package/dist/web/assets/{vue-vine-BycfyDpl.js → vue-vine-DHPh_gMr.js} +1 -1
- package/dist/web/assets/{xml-BRgRn6xu.js → xml-C-vM2m7J.js} +1 -1
- package/dist/web/assets/{xsl-CWrfaC1u.js → xsl-DvTXNwuO.js} +1 -1
- package/dist/web/index.html +15 -15
- package/dist/web/monacoeditorwork/css.worker.bundle.js +122 -122
- package/dist/web/monacoeditorwork/editor.worker.bundle.js +78 -78
- package/dist/web/monacoeditorwork/html.worker.bundle.js +110 -110
- package/dist/web/monacoeditorwork/json.worker.bundle.js +108 -108
- package/dist/web/monacoeditorwork/ts.worker.bundle.js +81 -81
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/packages/vscode-compat/node_modules/.bin/tsc.bunx +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsc.exe +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsserver.bunx +0 -0
- package/packages/vscode-compat/node_modules/.bin/tsserver.exe +0 -0
- package/src/services/edge-forwarder.ts +191 -191
- package/src/services/fs-ops/fs-ops-upload.service.ts +17 -1
- package/src/services/windows-process-tree.ts +351 -351
- package/src/web/app.tsx +8 -0
- package/src/web/components/chat/chat-tab.tsx +11 -0
- package/src/web/components/chat/team-activity-panel.tsx +4 -4
- package/src/web/components/chat/team-member-activity-format.ts +38 -0
- package/src/web/components/chat/team-member-activity-row.tsx +1 -29
- package/src/web/components/chat/team-member-sheet.tsx +47 -0
- package/src/web/components/chat/team-working-bar.tsx +62 -0
- package/src/web/components/chat/use-open-team-member.ts +41 -0
- package/src/web/components/os-explorer/actions/explorer-actions-upload.ts +6 -0
- package/dist/web/assets/architecture-PBZL5I3N-9f0Fi2Cw.js +0 -1
- package/dist/web/assets/chat-tab-Ca-jDA8G.js +0 -15
- package/dist/web/assets/click-outside-container-CbfvEfTe.js +0 -1
- package/dist/web/assets/code-editor-Biyx46no.js +0 -10
- package/dist/web/assets/data-grid-overlay-editor-Pq5c1EeR.js +0 -1
- package/dist/web/assets/database-viewer-7oDAd4kH.js +0 -1
- package/dist/web/assets/dist-BbSJO7hs.js +0 -11
- package/dist/web/assets/esm-D3_gA6XW.js +0 -2
- package/dist/web/assets/gitGraph-HDMCJU4V-B25fnH9y.js +0 -1
- package/dist/web/assets/glide-data-grid-DhqJzEAm.js +0 -138
- package/dist/web/assets/info-3K5VOQVL-Dqg_TKq-.js +0 -1
- package/dist/web/assets/markdown-renderer-PTkraBMz.js +0 -1
- package/dist/web/assets/packet-RMMSAZCW-91mSm_sq.js +0 -1
- package/dist/web/assets/pie-UPGHQEXC-D5-d4-hV.js +0 -1
- package/dist/web/assets/postgres-viewer-CHrw1Asz.js +0 -3
- package/dist/web/assets/radar-KQ55EAFF-D_wSb0Qz.js +0 -1
- package/dist/web/assets/sqlite-viewer-COHO7wsr.js +0 -1
- package/dist/web/assets/treemap-KZPCXAKY-DiNFF0Uo.js +0 -1
- /package/dist/web/assets/{abap-aW7-Jvmb.js → abap-C1K0-wzc.js} +0 -0
- /package/dist/web/assets/{actionscript-3-DTKrKcIk.js → actionscript-3-CJhQVjLA.js} +0 -0
- /package/dist/web/assets/{ada-BAPZyMF6.js → ada-Bt8r9fME.js} +0 -0
- /package/dist/web/assets/{andromeeda-B7tKiRbo.js → andromeeda-DF1I8qi3.js} +0 -0
- /package/dist/web/assets/{apache-DzlxyZL6.js → apache-CnlleE6P.js} +0 -0
- /package/dist/web/assets/{apex-YMuKkRzC.js → apex-j0C6Xmk6.js} +0 -0
- /package/dist/web/assets/{api-themes-BEEwU8CU.js → api-themes-8WTH6KpV.js} +0 -0
- /package/dist/web/assets/{applescript-CA5lfLCT.js → applescript-DO7AnO8U.js} +0 -0
- /package/dist/web/assets/{ara--oyOaCyG.js → ara-i83AydZj.js} +0 -0
- /package/dist/web/assets/{asciidoc-DnOF36RG.js → asciidoc-DbBA6-sF.js} +0 -0
- /package/dist/web/assets/{asm-BBlzivHM.js → asm-B5S47Rgr.js} +0 -0
- /package/dist/web/assets/{aurora-x-Vcb-h5c-.js → aurora-x-De_IaSKw.js} +0 -0
- /package/dist/web/assets/{awk-DIGedLLX.js → awk-CfyLHXqS.js} +0 -0
- /package/dist/web/assets/{ayu-dark-CpqJlEms.js → ayu-dark-DTLdZ1Si.js} +0 -0
- /package/dist/web/assets/{ayu-light-C_Ao3JZA.js → ayu-light-DTOfkzhu.js} +0 -0
- /package/dist/web/assets/{ayu-mirage-BYWxo0wh.js → ayu-mirage-DsAECCMv.js} +0 -0
- /package/dist/web/assets/{ballerina-Ba65P_0B.js → ballerina-CumGp9A7.js} +0 -0
- /package/dist/web/assets/{bat-CsJlH9w5.js → bat-Ca2SBbYN.js} +0 -0
- /package/dist/web/assets/{beancount-BPC5j2kY.js → beancount-CqyXBwwF.js} +0 -0
- /package/dist/web/assets/{berry-FDw8JA3_.js → berry-yl-kJr_H.js} +0 -0
- /package/dist/web/assets/{bibtex-7QrVi7O0.js → bibtex-DoFFszjV.js} +0 -0
- /package/dist/web/assets/{bicep-Ch0xl3Bs.js → bicep-CWPi4nfK.js} +0 -0
- /package/dist/web/assets/{bird2-DCEMu9Mp.js → bird2-DXew-ut0.js} +0 -0
- /package/dist/web/assets/{c-CUVHE-5K.js → c-clbySDvd.js} +0 -0
- /package/dist/web/assets/{c3-DSTfto87.js → c3-B65jvSM1.js} +0 -0
- /package/dist/web/assets/{cadence-C7hktLdb.js → cadence-Cm8tQTHN.js} +0 -0
- /package/dist/web/assets/{can-open-in-ppm-C1RSbZ7O.js → can-open-in-ppm-DXGOSUQc.js} +0 -0
- /package/dist/web/assets/{catppuccin-frappe-DkyYFCSH.js → catppuccin-frappe-DLeGslh_.js} +0 -0
- /package/dist/web/assets/{catppuccin-latte-BKnWZFTb.js → catppuccin-latte-CR5GeHws.js} +0 -0
- /package/dist/web/assets/{catppuccin-macchiato-C1Ab5ZLR.js → catppuccin-macchiato-p-XgjxhP.js} +0 -0
- /package/dist/web/assets/{catppuccin-mocha-COMc04WB.js → catppuccin-mocha-B8QOAZLl.js} +0 -0
- /package/dist/web/assets/{clarity-8PE1fP_c.js → clarity-DPulbvKH.js} +0 -0
- /package/dist/web/assets/{clojure-Bz98WDQt.js → clojure-DFuWS20u.js} +0 -0
- /package/dist/web/assets/{cmake-DU6g1qMF.js → cmake-DejCqcu4.js} +0 -0
- /package/dist/web/assets/{codeowners-2Gm3RtID.js → codeowners-BwAyqWIH.js} +0 -0
- /package/dist/web/assets/{codeql-B3FnVaRc.js → codeql-DgSwFjqI.js} +0 -0
- /package/dist/web/assets/{common-lisp-zYi9oKAF.js → common-lisp-CxIVJCtf.js} +0 -0
- /package/dist/web/assets/{coq-W0vNtu9V.js → coq-DLSjSnmf.js} +0 -0
- /package/dist/web/assets/{csharp-DlFGO-Bd.js → csharp-C1HHzXBp.js} +0 -0
- /package/dist/web/assets/{css-BLcoafWU.js → css-VXsMY--y.js} +0 -0
- /package/dist/web/assets/{csv-BpMytiYh.js → csv-BEbcJdHz.js} +0 -0
- /package/dist/web/assets/{csv-parser-JohiZK_a.js → csv-parser-BRtnJCfv.js} +0 -0
- /package/dist/web/assets/{cue-Ckjfj5Fx.js → cue-BkDnFqUD.js} +0 -0
- /package/dist/web/assets/{cypher-D9y8enlA.js → cypher-1cMqojSQ.js} +0 -0
- /package/dist/web/assets/{d-BQt_xM-A.js → d-BnYjRXtH.js} +0 -0
- /package/dist/web/assets/{dark-plus-YVOVVElU.js → dark-plus-XfbaH7kZ.js} +0 -0
- /package/dist/web/assets/{dart-CbQZvIly.js → dart-Ca7s-8hK.js} +0 -0
- /package/dist/web/assets/{dax-U83MmotH.js → dax-CmuOw-mY.js} +0 -0
- /package/dist/web/assets/{desktop-vhxlER7T.js → desktop-C2gJ6Ovb.js} +0 -0
- /package/dist/web/assets/{diff-qIh1K-1r.js → diff-BCEo1Ej7.js} +0 -0
- /package/dist/web/assets/{dist-k8y79TJM.js → dist-DOlBnxFX.js} +0 -0
- /package/dist/web/assets/{docker-CugomxC1.js → docker-DN2jlyAh.js} +0 -0
- /package/dist/web/assets/{dotenv-Bjf6iJkB.js → dotenv-NExMY2kS.js} +0 -0
- /package/dist/web/assets/{dracula-Cz9sO5UW.js → dracula-B9lbE01y.js} +0 -0
- /package/dist/web/assets/{dracula-soft-DY0S2NVH.js → dracula-soft-CMBBfKF_.js} +0 -0
- /package/dist/web/assets/{dream-maker-B8LMBotO.js → dream-maker-DEyDwFsd.js} +0 -0
- /package/dist/web/assets/{emacs-lisp-DuYCGVqQ.js → emacs-lisp-D_qP2zS6.js} +0 -0
- /package/dist/web/assets/{everforest-dark-WezKGzP_.js → everforest-dark-DbHa2U-p.js} +0 -0
- /package/dist/web/assets/{everforest-light-Do7h7sGp.js → everforest-light-BISkJchP.js} +0 -0
- /package/dist/web/assets/{fennel-DPc0PrDK.js → fennel-6B22SfJR.js} +0 -0
- /package/dist/web/assets/{fish-Boq_hlR9.js → fish-CubIIvJD.js} +0 -0
- /package/dist/web/assets/{fluent-LAzaxkrP.js → fluent-DF55zQ09.js} +0 -0
- /package/dist/web/assets/{fortran-free-form-CeCg8jZE.js → fortran-free-form-DvOu8jAt.js} +0 -0
- /package/dist/web/assets/{gdscript-CKnfKnN6.js → gdscript-DCPxdLpq.js} +0 -0
- /package/dist/web/assets/{gdshader-C_ofnb9K.js → gdshader-CTZ381FO.js} +0 -0
- /package/dist/web/assets/{genie-DhagrbXp.js → genie-C_QDtvgU.js} +0 -0
- /package/dist/web/assets/{gherkin-1uujaZW0.js → gherkin-BcvK42tF.js} +0 -0
- /package/dist/web/assets/{github-dark-DIV5FCeV.js → github-dark-C9afs_4w.js} +0 -0
- /package/dist/web/assets/{github-dark-default-CcP66ogT.js → github-dark-default-CKGVrl3Z.js} +0 -0
- /package/dist/web/assets/{github-dark-dimmed-Bj80ZBcI.js → github-dark-dimmed-C3dQZ_LC.js} +0 -0
- /package/dist/web/assets/{github-dark-high-contrast-CyI7oCCT.js → github-dark-high-contrast-DW78QukY.js} +0 -0
- /package/dist/web/assets/{github-light-CqqVK-2E.js → github-light-BnP2dznS.js} +0 -0
- /package/dist/web/assets/{github-light-default-DEhIDABz.js → github-light-default-C2fPZzPG.js} +0 -0
- /package/dist/web/assets/{github-light-high-contrast-BqtUZSo1.js → github-light-high-contrast-BzIuUFR2.js} +0 -0
- /package/dist/web/assets/{gleam-Bv3z0NLi.js → gleam-BpeKwEIO.js} +0 -0
- /package/dist/web/assets/{gn-knjS3hKu.js → gn-nUb_Mit0.js} +0 -0
- /package/dist/web/assets/{gnuplot-g56b7rpz.js → gnuplot-D7I0v20p.js} +0 -0
- /package/dist/web/assets/{go-DX8QO6z_.js → go-D7Qqska7.js} +0 -0
- /package/dist/web/assets/{groovy-DuYa0c1A.js → groovy-DS-pne5-.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-hard-D7IRkjrx.js → gruvbox-dark-hard-C0W01fsq.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-medium-UJ8YMtdx.js → gruvbox-dark-medium-Bqo6fQbg.js} +0 -0
- /package/dist/web/assets/{gruvbox-dark-soft-I2k_O22-.js → gruvbox-dark-soft-D-XSM_fu.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-hard-CAJEeL1I.js → gruvbox-light-hard-IVAwMJRl.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-medium-BzfBTG9R.js → gruvbox-light-medium-38ATiG7i.js} +0 -0
- /package/dist/web/assets/{gruvbox-light-soft-B4lq6YrU.js → gruvbox-light-soft-DnZr3c_0.js} +0 -0
- /package/dist/web/assets/{haskell-BG7xy9_5.js → haskell-uQcywkDH.js} +0 -0
- /package/dist/web/assets/{haxe-CyusqGGx.js → haxe-c6bI4_GT.js} +0 -0
- /package/dist/web/assets/{hcl-BewE7tWl.js → hcl-CQXTiEXq.js} +0 -0
- /package/dist/web/assets/{hjson-Ds8lzmRZ.js → hjson-ChETf2bz.js} +0 -0
- /package/dist/web/assets/{hlsl-ZFwRfL2h.js → hlsl-BMC4JGoE.js} +0 -0
- /package/dist/web/assets/{horizon-VAwIHbzU.js → horizon-BusFlhLW.js} +0 -0
- /package/dist/web/assets/{horizon-bright-wJOIDqMt.js → horizon-bright-2oD0Mz7W.js} +0 -0
- /package/dist/web/assets/{houston-CeohYS24.js → houston-DdbbjqFg.js} +0 -0
- /package/dist/web/assets/{hy-CUv6HDwS.js → hy-D_SOuqw9.js} +0 -0
- /package/dist/web/assets/{image-gallery-CbX4JjyT.js → image-gallery-CrM5fHKy.js} +0 -0
- /package/dist/web/assets/{imba-D8TAYKw4.js → imba-BxLOHO5I.js} +0 -0
- /package/dist/web/assets/{ini-BAKG__sb.js → ini-ox-CFcg0.js} +0 -0
- /package/dist/web/assets/{java-CTxgEFQr.js → java-Bzo8yIal.js} +0 -0
- /package/dist/web/assets/{javascript-CyPQ_iPD.js → javascript-DHuz9VXn.js} +0 -0
- /package/dist/web/assets/{json-atTPgPUT.js → json-0_y80FD5.js} +0 -0
- /package/dist/web/assets/{json5-LGxGeNhP.js → json5-CEQ50pGM.js} +0 -0
- /package/dist/web/assets/{jsonc-Bitk_sll.js → jsonc-CfrLEAKA.js} +0 -0
- /package/dist/web/assets/{jsonl-DdyTPXqv.js → jsonl-fKbrANC2.js} +0 -0
- /package/dist/web/assets/{jsonnet-GniiqKoY.js → jsonnet-DKbkPaQ2.js} +0 -0
- /package/dist/web/assets/{jssm-CW6QRmkd.js → jssm-Dxxx1Hqu.js} +0 -0
- /package/dist/web/assets/{jsx-Cr_EAVnd.js → jsx-DlJL-Oj3.js} +0 -0
- /package/dist/web/assets/{kanagawa-dragon-N1CxlLFc.js → kanagawa-dragon-CwN4SV1c.js} +0 -0
- /package/dist/web/assets/{kanagawa-lotus-DuDdnVEr.js → kanagawa-lotus-BHltayiE.js} +0 -0
- /package/dist/web/assets/{kanagawa-wave-BEcB8wPC.js → kanagawa-wave-D-KXPjw6.js} +0 -0
- /package/dist/web/assets/{kdl-YdJlGKnl.js → kdl-DvtoJdFo.js} +0 -0
- /package/dist/web/assets/{kotlin-D8Ou1-Vz.js → kotlin-CTS4MLcx.js} +0 -0
- /package/dist/web/assets/{kusto-CfNzHOLh.js → kusto-HtSE_sKm.js} +0 -0
- /package/dist/web/assets/{laserwave-Dw-UwgjO.js → laserwave-DaXZG9ge.js} +0 -0
- /package/dist/web/assets/{lean-Cob-4uj9.js → lean-BYtGUfWx.js} +0 -0
- /package/dist/web/assets/{less-D6UGsQ-F.js → less-BoxmU_Mk.js} +0 -0
- /package/dist/web/assets/{lib-D6yys864.js → lib-B1clP4ai.js} +0 -0
- /package/dist/web/assets/{libesm-BNnDqFup.js → libesm-ah-mr-sh.js} +0 -0
- /package/dist/web/assets/{light-plus-g6c1YK9w.js → light-plus-Bt5CyUuo.js} +0 -0
- /package/dist/web/assets/{llvm-BCk7-7xF.js → llvm-CSdk9q9V.js} +0 -0
- /package/dist/web/assets/{log-DyyODQCQ.js → log-B-kp_3CL.js} +0 -0
- /package/dist/web/assets/{logo-z3PSmZ0Q.js → logo-DdIsXFDO.js} +0 -0
- /package/dist/web/assets/{luau-CuwlNMKd.js → luau-DUBpLlzQ.js} +0 -0
- /package/dist/web/assets/{make-B2ZcjXHI.js → make-B3JVjoW_.js} +0 -0
- /package/dist/web/assets/{markdown-Bh7F2dEA.js → markdown-Seon0vHs.js} +0 -0
- /package/dist/web/assets/{material-theme-DIOuD6li.js → material-theme-Nq-ChX1P.js} +0 -0
- /package/dist/web/assets/{material-theme-darker-Cg3vOVsZ.js → material-theme-darker-CPV4ayXJ.js} +0 -0
- /package/dist/web/assets/{material-theme-lighter-B3plW7F5.js → material-theme-lighter-0kyjYqEd.js} +0 -0
- /package/dist/web/assets/{material-theme-ocean-BC3W6Qbp.js → material-theme-ocean-DGpAp5co.js} +0 -0
- /package/dist/web/assets/{material-theme-palenight-cn2b8irZ.js → material-theme-palenight-B0AUn0NG.js} +0 -0
- /package/dist/web/assets/{matlab-CbKDDcme.js → matlab-C2waytxs.js} +0 -0
- /package/dist/web/assets/{mdx-DfoNkGc0.js → mdx-DAis6R6I.js} +0 -0
- /package/dist/web/assets/{media-url-FbGzzFQa.js → media-url-CUpN5vI1.js} +0 -0
- /package/dist/web/assets/{mermaid-BpGcccah.js → mermaid-_rnT2YGD.js} +0 -0
- /package/dist/web/assets/{min-dark-C-1-xt-i.js → min-dark-BSSjchUB.js} +0 -0
- /package/dist/web/assets/{min-light-DkYGd6ZF.js → min-light-DomAFQsa.js} +0 -0
- /package/dist/web/assets/{mipsasm-Dk87orqA.js → mipsasm-bBgtvPyG.js} +0 -0
- /package/dist/web/assets/{mojo-Ctfni3Xg.js → mojo-Cp9BayW0.js} +0 -0
- /package/dist/web/assets/{monokai-dRz4X-9c.js → monokai-CL_9gbmn.js} +0 -0
- /package/dist/web/assets/{moonbit-BenWvd8O.js → moonbit-BS_fcr-P.js} +0 -0
- /package/dist/web/assets/{move-CDhttBEa.js → move-C79AH45U.js} +0 -0
- /package/dist/web/assets/{narrat-2qOoPAIA.js → narrat-CJ5s3BDf.js} +0 -0
- /package/dist/web/assets/{nextflow-groovy-C4CoTM6k.js → nextflow-groovy-ZHa4JrPJ.js} +0 -0
- /package/dist/web/assets/{night-owl-CC7ba6ex.js → night-owl-Jkf9zFQK.js} +0 -0
- /package/dist/web/assets/{night-owl-light-su9bVa5K.js → night-owl-light-DRPeaG5J.js} +0 -0
- /package/dist/web/assets/{nix-BOfpg6oF.js → nix-D2Jet9DN.js} +0 -0
- /package/dist/web/assets/{nord-Cup4UQrN.js → nord-CREVs22j.js} +0 -0
- /package/dist/web/assets/{nushell-CV3Ed_Pd.js → nushell-CAiDi_mR.js} +0 -0
- /package/dist/web/assets/{objective-c-DNKsz1d1.js → objective-c-CVkmJkC1.js} +0 -0
- /package/dist/web/assets/{objective-cpp-BT5L7lhS.js → objective-cpp-DIKDO1Ly.js} +0 -0
- /package/dist/web/assets/{ocaml-Qj-27E4B.js → ocaml-R9qtGQhs.js} +0 -0
- /package/dist/web/assets/{odin-C2scSLLk.js → odin-DTYNQqVr.js} +0 -0
- /package/dist/web/assets/{one-dark-pro-C1HWasX_.js → one-dark-pro-BSLWUJn5.js} +0 -0
- /package/dist/web/assets/{one-light-B3bElFuJ.js → one-light-DbkRXG3t.js} +0 -0
- /package/dist/web/assets/{openscad-C6UAQ5Px.js → openscad-BlPcSnmT.js} +0 -0
- /package/dist/web/assets/{pascal-DICllhaG.js → pascal-B1Y46ZZB.js} +0 -0
- /package/dist/web/assets/{pkl-qghE3sfq.js → pkl-BhJSJbFv.js} +0 -0
- /package/dist/web/assets/{plastic-ClZHBkI2.js → plastic-BzxsCTpi.js} +0 -0
- /package/dist/web/assets/{plsql-CKw-M6SO.js → plsql-DBba7dyP.js} +0 -0
- /package/dist/web/assets/{po-BKro6MCB.js → po-BvgLlnNo.js} +0 -0
- /package/dist/web/assets/{poimandres-Bdo7Kn_m.js → poimandres-DUaI_1JP.js} +0 -0
- /package/dist/web/assets/{polar-B1rAV5le.js → polar-C7uILwJn.js} +0 -0
- /package/dist/web/assets/{postcss-BsA5TXYz.js → postcss-BgJlpFdw.js} +0 -0
- /package/dist/web/assets/{powerquery-hxd8aiZs.js → powerquery-Dn1MIpZu.js} +0 -0
- /package/dist/web/assets/{powershell-D83XmNBi.js → powershell-Bo-DYzOS.js} +0 -0
- /package/dist/web/assets/{prisma-jpc3Lfer.js → prisma-CTLs5IdT.js} +0 -0
- /package/dist/web/assets/{prolog-By7loPcz.js → prolog-QRGun3eG.js} +0 -0
- /package/dist/web/assets/{proto-B03P8I7L.js → proto-B7PI7apn.js} +0 -0
- /package/dist/web/assets/{puppet-BLEutFx-.js → puppet-CBq0tLrP.js} +0 -0
- /package/dist/web/assets/{purescript-DdCIvtj7.js → purescript-DFewOQb2.js} +0 -0
- /package/dist/web/assets/{python-DwlqCvPN.js → python-iWuxKXvT.js} +0 -0
- /package/dist/web/assets/{qmldir-CkEpGrJr.js → qmldir-cXiW3AsF.js} +0 -0
- /package/dist/web/assets/{qss-B6SOQ6U9.js → qss-DASwAbBL.js} +0 -0
- /package/dist/web/assets/{r-Y0KMI7Y5.js → r-TU2eaIPw.js} +0 -0
- /package/dist/web/assets/{racket-BF5spJBc.js → racket-SkRKqrLY.js} +0 -0
- /package/dist/web/assets/{raku-xNANhvUv.js → raku-D31lthkZ.js} +0 -0
- /package/dist/web/assets/{red-DnHsBzi8.js → red-CTcQZevb.js} +0 -0
- /package/dist/web/assets/{reg-CWhYjQ7O.js → reg-D8YAsTGf.js} +0 -0
- /package/dist/web/assets/{regexp-CouLuX6r.js → regexp-CD2uvAWx.js} +0 -0
- /package/dist/web/assets/{rel-Ctf_fx-q.js → rel-CAaI-1fg.js} +0 -0
- /package/dist/web/assets/{riscv-Dji9ndNu.js → riscv-DR-hJVIj.js} +0 -0
- /package/dist/web/assets/{ron-BgHqfYU8.js → ron-CuUCJ0n4.js} +0 -0
- /package/dist/web/assets/{rose-pine-rIa8chEL.js → rose-pine-aFHxW48i.js} +0 -0
- /package/dist/web/assets/{rose-pine-dawn-B5US25HC.js → rose-pine-dawn-Bqz2sBRY.js} +0 -0
- /package/dist/web/assets/{rose-pine-moon-vC-4_Eb_.js → rose-pine-moon-wqyh0an4.js} +0 -0
- /package/dist/web/assets/{rosmsg-Bfxbgaxi.js → rosmsg-CI1ywimO.js} +0 -0
- /package/dist/web/assets/{run-in-terminal-D-Q9wPF_.js → run-in-terminal-CGW6o37_.js} +0 -0
- /package/dist/web/assets/{rust-DSRCI-l0.js → rust-p7Imk4G_.js} +0 -0
- /package/dist/web/assets/{sass-BaMwafsT.js → sass-C8JfaqCV.js} +0 -0
- /package/dist/web/assets/{scala-CnoxeIBD.js → scala-DNxCW1By.js} +0 -0
- /package/dist/web/assets/{scheme-BmSziQ83.js → scheme-BYuUPJoL.js} +0 -0
- /package/dist/web/assets/{sdbl-CGDFOQ4F.js → sdbl-DbPeJPUr.js} +0 -0
- /package/dist/web/assets/{send-to-chat-BPeYO9Pv.js → send-to-chat-YXHdAyLG.js} +0 -0
- /package/dist/web/assets/{shellscript-D3_gthD5.js → shellscript-DMiHlR3q.js} +0 -0
- /package/dist/web/assets/{slack-dark-Cy4dNR2g.js → slack-dark-C4xGcQXI.js} +0 -0
- /package/dist/web/assets/{slack-ochin-B8hNeONl.js → slack-ochin-BzgRt_wm.js} +0 -0
- /package/dist/web/assets/{smalltalk-B5OQnpLF.js → smalltalk-LDeL9PYH.js} +0 -0
- /package/dist/web/assets/{snazzy-light-DDL1ZQgf.js → snazzy-light-CXE7a5j_.js} +0 -0
- /package/dist/web/assets/{solarized-dark-COUdbN1J.js → solarized-dark-DgUhY74x.js} +0 -0
- /package/dist/web/assets/{solarized-light-CLHIejSq.js → solarized-light-DD9C-H-9.js} +0 -0
- /package/dist/web/assets/{solidity-DpQHaveQ.js → solidity-CAbDB4D4.js} +0 -0
- /package/dist/web/assets/{splunk-BGT75_a1.js → splunk-kQREPfIc.js} +0 -0
- /package/dist/web/assets/{sql-ZPjZoKEG.js → sql-CBzeNAD8.js} +0 -0
- /package/dist/web/assets/{ssh-config-B6oU9nqL.js → ssh-config-L1euxrsM.js} +0 -0
- /package/dist/web/assets/{stylus-Bbgm8BDk.js → stylus-DvBnYniP.js} +0 -0
- /package/dist/web/assets/{swift-7OUZlXRr.js → swift-DF5NDQp6.js} +0 -0
- /package/dist/web/assets/{synthwave-84-Dp7xsQqz.js → synthwave-84-DbBhB_Hq.js} +0 -0
- /package/dist/web/assets/{system-verilog-COlHqI_R.js → system-verilog-D8s2ZW_k.js} +0 -0
- /package/dist/web/assets/{systemd-DXL9nsy_.js → systemd-a5-XZJsG.js} +0 -0
- /package/dist/web/assets/{talonscript-Bkpiqjjy.js → talonscript-BLa0URTW.js} +0 -0
- /package/dist/web/assets/{tasl-Bpra97jM.js → tasl-DIoV4XcC.js} +0 -0
- /package/dist/web/assets/{tcl-BcDm6PGE.js → tcl-ztYAdXfQ.js} +0 -0
- /package/dist/web/assets/{terraform-DGQKmd9G.js → terraform-DvpCCiOZ.js} +0 -0
- /package/dist/web/assets/{tokyo-night-CyLasBR5.js → tokyo-night-BkHlYUv0.js} +0 -0
- /package/dist/web/assets/{toml-D-01EUMm.js → toml-acIrxos6.js} +0 -0
- /package/dist/web/assets/{tsv-DlZx-hGD.js → tsv-BJB5EVCT.js} +0 -0
- /package/dist/web/assets/{tsx-Bu211EOh.js → tsx-B1MmXGT3.js} +0 -0
- /package/dist/web/assets/{turtle-CwM--Nm2.js → turtle-DFceTiqd.js} +0 -0
- /package/dist/web/assets/{typescript-wOPax6Gk.js → typescript-Dz9wU5Y1.js} +0 -0
- /package/dist/web/assets/{typespec-C5n5j5Cf.js → typespec-CPuYZijj.js} +0 -0
- /package/dist/web/assets/{typst-DQS-vHSj.js → typst-CfsCIYv8.js} +0 -0
- /package/dist/web/assets/{use-blob-url-DdEfzVb8.js → use-blob-url-BmlYYZ8L.js} +0 -0
- /package/dist/web/assets/{v-BMQHRcJ5.js → v-CGo0jcXA.js} +0 -0
- /package/dist/web/assets/{vala-By6oCVpL.js → vala-AsSR0hrb.js} +0 -0
- /package/dist/web/assets/{vb-BSmHxRqj.js → vb-C7tvbXv1.js} +0 -0
- /package/dist/web/assets/{vendor-xterm-BHWghY3d.js → vendor-xterm-C1diXHJl.js} +0 -0
- /package/dist/web/assets/{verilog-Bt-zbfre.js → verilog--a33ND-p.js} +0 -0
- /package/dist/web/assets/{vesper-Bz7pxhsL.js → vesper-B_Z0h4pn.js} +0 -0
- /package/dist/web/assets/{vhdl-BXjhSHk-.js → vhdl-CWL5dZPN.js} +0 -0
- /package/dist/web/assets/{viml-B4m7rYZk.js → viml-BglmT14Y.js} +0 -0
- /package/dist/web/assets/{vitesse-black-BsmvsuHB.js → vitesse-black-RKFsSqQI.js} +0 -0
- /package/dist/web/assets/{vitesse-dark-Cqnvi8YY.js → vitesse-dark-D7zDWNmc.js} +0 -0
- /package/dist/web/assets/{vitesse-light-KbYJh0ae.js → vitesse-light-MAp87W5b.js} +0 -0
- /package/dist/web/assets/{vyper-BaHPAgL_.js → vyper-CgCBYg1G.js} +0 -0
- /package/dist/web/assets/{wasm-Cfq9I1o-.js → wasm-BOG7ZeTT.js} +0 -0
- /package/dist/web/assets/{wasm-Dpw0fYUw.js → wasm-Bwl4txwp.js} +0 -0
- /package/dist/web/assets/{wenyan-DZsJG8fl.js → wenyan-DpShPKXZ.js} +0 -0
- /package/dist/web/assets/{wgsl-CVc3AdMI.js → wgsl-BakcCblK.js} +0 -0
- /package/dist/web/assets/{wikitext-D9TsdERw.js → wikitext-NroRWVAO.js} +0 -0
- /package/dist/web/assets/{wit-B55b-kBe.js → wit-B5CM2pg6.js} +0 -0
- /package/dist/web/assets/{wolfram-BMCiuBhR.js → wolfram-7MTFBJpR.js} +0 -0
- /package/dist/web/assets/{yaml-T9AUQgxg.js → yaml-Bwr01G2K.js} +0 -0
- /package/dist/web/assets/{zenscript-C2NuU93Q.js → zenscript-Dj8GATvi.js} +0 -0
- /package/dist/web/assets/{zig-B4cWz8iD.js → zig-LAE-fbS-.js} +0 -0
|
@@ -1,191 +1,191 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Edge forwarder — owns the public port and pipes raw TCP to the server's
|
|
3
|
-
* current loopback port.
|
|
4
|
-
*
|
|
5
|
-
* ─── CRITICAL INVARIANT: THIS PROCESS MUST NEVER SPAWN A CHILD ───
|
|
6
|
-
*
|
|
7
|
-
* On Windows a child spawned with fd stdio inherits every inheritable handle,
|
|
8
|
-
* including a listening socket. When such a descendant is orphaned it keeps the
|
|
9
|
-
* socket open, so the port stays in LISTEN under a dead PID and can never be
|
|
10
|
-
* rebound — a "zombie port". The server hits this constantly because it spawns
|
|
11
|
-
* chat/tool/MCP subprocesses; those inherit its listener and wedge its port.
|
|
12
|
-
*
|
|
13
|
-
* The edge exists precisely because it spawns nothing, so its socket cannot be
|
|
14
|
-
* inherited and its port cannot zombie. cloudflared can therefore stay pinned
|
|
15
|
-
* to it forever and the public URL stops rotating. Adding any child-process
|
|
16
|
-
* call to this file reintroduces the exact bug the edge was built to remove.
|
|
17
|
-
*
|
|
18
|
-
* Raw TCP, never HTTP: WebSocket upgrades and SSE streams pass through
|
|
19
|
-
* untouched, and forwarded requests keep the headers cloudflared set.
|
|
20
|
-
*/
|
|
21
|
-
import net from "node:net";
|
|
22
|
-
import { resolveTargetPort, _resetTargetCache } from "./edge-target-resolver.ts";
|
|
23
|
-
|
|
24
|
-
/** Delay between attempts while waiting for the server to come back. */
|
|
25
|
-
const CONNECT_RETRY_MS = 250;
|
|
26
|
-
/**
|
|
27
|
-
* How long a client connection waits for a reachable server before giving up.
|
|
28
|
-
* During an upgrade the server is briefly absent; refusing instantly would
|
|
29
|
-
* surface as a broken page rather than a slow one.
|
|
30
|
-
*/
|
|
31
|
-
const CONNECT_WINDOW_MS = 5000;
|
|
32
|
-
|
|
33
|
-
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
34
|
-
|
|
35
|
-
/** Resolve once the socket is connected; reject on the first connect error. */
|
|
36
|
-
function connectUpstream(port: number): Promise<net.Socket> {
|
|
37
|
-
return new Promise((resolvePromise, reject) => {
|
|
38
|
-
const upstream = net.connect({
|
|
39
|
-
port,
|
|
40
|
-
host: "127.0.0.1", // never taken from status.json — loopback only
|
|
41
|
-
allowHalfOpen: true,
|
|
42
|
-
});
|
|
43
|
-
const onError = (err: Error) => {
|
|
44
|
-
upstream.destroy();
|
|
45
|
-
reject(err);
|
|
46
|
-
};
|
|
47
|
-
upstream.once("error", onError);
|
|
48
|
-
upstream.once("connect", () => {
|
|
49
|
-
upstream.removeListener("error", onError);
|
|
50
|
-
resolvePromise(upstream);
|
|
51
|
-
});
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Largest amount of client data held while waiting for the server. Bounds the
|
|
57
|
-
* memory a slow upload can pin during an upgrade window.
|
|
58
|
-
*/
|
|
59
|
-
const MAX_PENDING_BYTES = 8 * 1024 * 1024;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Pipe one client connection to the server.
|
|
63
|
-
*
|
|
64
|
-
* Resolving the upstream is async, so the first bytes usually arrive before
|
|
65
|
-
* there is anywhere to send them. They must be captured by a `data` listener
|
|
66
|
-
* attached synchronously on this very tick and replayed once the upstream
|
|
67
|
-
* exists.
|
|
68
|
-
*
|
|
69
|
-
* `socket.pause()` is NOT a substitute — verified against Bun 1.3.13: bytes
|
|
70
|
-
* that arrive while paused are lost, and a later `pipe()`/`resume()` does not
|
|
71
|
-
* bring them back. A socket with no `data` listener drops them outright too.
|
|
72
|
-
* Both variants silently swallowed the first request in testing.
|
|
73
|
-
*/
|
|
74
|
-
async function handleConnection(
|
|
75
|
-
client: net.Socket,
|
|
76
|
-
connectWindowMs: number,
|
|
77
|
-
): Promise<void> {
|
|
78
|
-
const pending: Buffer[] = [];
|
|
79
|
-
let pendingBytes = 0;
|
|
80
|
-
let clientEnded = false;
|
|
81
|
-
const onEarlyData = (chunk: Buffer) => {
|
|
82
|
-
pendingBytes += chunk.length;
|
|
83
|
-
if (pendingBytes > MAX_PENDING_BYTES) {
|
|
84
|
-
client.destroy();
|
|
85
|
-
return;
|
|
86
|
-
}
|
|
87
|
-
pending.push(chunk);
|
|
88
|
-
};
|
|
89
|
-
client.on("data", onEarlyData);
|
|
90
|
-
client.once("end", () => { clientEnded = true; });
|
|
91
|
-
|
|
92
|
-
let upstream: net.Socket | null = null;
|
|
93
|
-
let clientGone = false;
|
|
94
|
-
|
|
95
|
-
// A socket error with no listener is an unhandled 'error' event, which would
|
|
96
|
-
// take the whole edge process — and the public port — down with it.
|
|
97
|
-
const teardown = () => {
|
|
98
|
-
upstream?.destroy();
|
|
99
|
-
client.destroy();
|
|
100
|
-
};
|
|
101
|
-
client.on("error", teardown);
|
|
102
|
-
client.once("close", () => { clientGone = true; });
|
|
103
|
-
|
|
104
|
-
const deadline = Date.now() + connectWindowMs;
|
|
105
|
-
while (!clientGone && Date.now() < deadline) {
|
|
106
|
-
const port = resolveTargetPort();
|
|
107
|
-
if (port !== null) {
|
|
108
|
-
try {
|
|
109
|
-
upstream = await connectUpstream(port);
|
|
110
|
-
break;
|
|
111
|
-
} catch {
|
|
112
|
-
// Server not up yet (or moved mid-restart) — re-resolve and retry.
|
|
113
|
-
_resetTargetCache();
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
await sleep(CONNECT_RETRY_MS);
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
if (clientGone) return;
|
|
120
|
-
if (!upstream) {
|
|
121
|
-
client.destroy();
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
upstream.on("error", teardown);
|
|
126
|
-
|
|
127
|
-
// Replay what arrived during the connect, then hand both directions to the
|
|
128
|
-
// stream machinery. Removing the listener and piping happen in the same tick,
|
|
129
|
-
// so no chunk can slip through the gap.
|
|
130
|
-
client.off("data", onEarlyData);
|
|
131
|
-
for (const chunk of pending) upstream.write(chunk);
|
|
132
|
-
pending.length = 0;
|
|
133
|
-
|
|
134
|
-
client.pipe(upstream);
|
|
135
|
-
upstream.pipe(client);
|
|
136
|
-
|
|
137
|
-
// The client may have half-closed while we were still connecting.
|
|
138
|
-
if (clientEnded) upstream.end();
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
export interface EdgeForwarderOptions {
|
|
142
|
-
publicPort: number;
|
|
143
|
-
host?: string;
|
|
144
|
-
/** How long a client waits for a reachable server. Defaults to 5s. */
|
|
145
|
-
connectWindowMs?: number;
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/**
|
|
149
|
-
* Bind the public port and start forwarding. Resolves once listening so the
|
|
150
|
-
* caller can fail fast when the port is unavailable.
|
|
151
|
-
*/
|
|
152
|
-
export function startEdgeForwarder(
|
|
153
|
-
opts: EdgeForwarderOptions,
|
|
154
|
-
): Promise<net.Server> {
|
|
155
|
-
const host = opts.host ?? "0.0.0.0";
|
|
156
|
-
const connectWindowMs = opts.connectWindowMs ?? CONNECT_WINDOW_MS;
|
|
157
|
-
return new Promise((resolvePromise, reject) => {
|
|
158
|
-
// allowHalfOpen keeps the other direction alive when one side sends FIN —
|
|
159
|
-
// long-lived chat WS and SSE streams depend on it.
|
|
160
|
-
const server = net.createServer({ allowHalfOpen: true }, (client) => {
|
|
161
|
-
void handleConnection(client, connectWindowMs);
|
|
162
|
-
});
|
|
163
|
-
server.once("error", reject);
|
|
164
|
-
server.listen(opts.publicPort, host, () => {
|
|
165
|
-
server.removeListener("error", reject);
|
|
166
|
-
resolvePromise(server);
|
|
167
|
-
});
|
|
168
|
-
});
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
// ─── Process entry ─────────────────────────────────────────────────────
|
|
172
|
-
// Mirrors the `__serve__` guard in src/server/index.ts: the supervisor
|
|
173
|
-
// re-invokes the binary as `<bin> __edge__ <publicPort> <host>`.
|
|
174
|
-
if (process.argv.includes("__edge__")) {
|
|
175
|
-
const idx = process.argv.indexOf("__edge__");
|
|
176
|
-
const publicPort = parseInt(process.argv[idx + 1] ?? "", 10);
|
|
177
|
-
const host = process.argv[idx + 2] ?? "0.0.0.0";
|
|
178
|
-
|
|
179
|
-
if (!Number.isInteger(publicPort) || publicPort <= 0 || publicPort > 65535) {
|
|
180
|
-
process.stderr.write(`[edge] Invalid public port: ${process.argv[idx + 1]}\n`);
|
|
181
|
-
process.exit(2);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
try {
|
|
185
|
-
await startEdgeForwarder({ publicPort, host });
|
|
186
|
-
process.stderr.write(`[edge] Listening on ${host}:${publicPort}\n`);
|
|
187
|
-
} catch (err) {
|
|
188
|
-
process.stderr.write(`[edge] Failed to bind ${host}:${publicPort}: ${err}\n`);
|
|
189
|
-
process.exit(1);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Edge forwarder — owns the public port and pipes raw TCP to the server's
|
|
3
|
+
* current loopback port.
|
|
4
|
+
*
|
|
5
|
+
* ─── CRITICAL INVARIANT: THIS PROCESS MUST NEVER SPAWN A CHILD ───
|
|
6
|
+
*
|
|
7
|
+
* On Windows a child spawned with fd stdio inherits every inheritable handle,
|
|
8
|
+
* including a listening socket. When such a descendant is orphaned it keeps the
|
|
9
|
+
* socket open, so the port stays in LISTEN under a dead PID and can never be
|
|
10
|
+
* rebound — a "zombie port". The server hits this constantly because it spawns
|
|
11
|
+
* chat/tool/MCP subprocesses; those inherit its listener and wedge its port.
|
|
12
|
+
*
|
|
13
|
+
* The edge exists precisely because it spawns nothing, so its socket cannot be
|
|
14
|
+
* inherited and its port cannot zombie. cloudflared can therefore stay pinned
|
|
15
|
+
* to it forever and the public URL stops rotating. Adding any child-process
|
|
16
|
+
* call to this file reintroduces the exact bug the edge was built to remove.
|
|
17
|
+
*
|
|
18
|
+
* Raw TCP, never HTTP: WebSocket upgrades and SSE streams pass through
|
|
19
|
+
* untouched, and forwarded requests keep the headers cloudflared set.
|
|
20
|
+
*/
|
|
21
|
+
import net from "node:net";
|
|
22
|
+
import { resolveTargetPort, _resetTargetCache } from "./edge-target-resolver.ts";
|
|
23
|
+
|
|
24
|
+
/** Delay between attempts while waiting for the server to come back. */
|
|
25
|
+
const CONNECT_RETRY_MS = 250;
|
|
26
|
+
/**
|
|
27
|
+
* How long a client connection waits for a reachable server before giving up.
|
|
28
|
+
* During an upgrade the server is briefly absent; refusing instantly would
|
|
29
|
+
* surface as a broken page rather than a slow one.
|
|
30
|
+
*/
|
|
31
|
+
const CONNECT_WINDOW_MS = 5000;
|
|
32
|
+
|
|
33
|
+
const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));
|
|
34
|
+
|
|
35
|
+
/** Resolve once the socket is connected; reject on the first connect error. */
|
|
36
|
+
function connectUpstream(port: number): Promise<net.Socket> {
|
|
37
|
+
return new Promise((resolvePromise, reject) => {
|
|
38
|
+
const upstream = net.connect({
|
|
39
|
+
port,
|
|
40
|
+
host: "127.0.0.1", // never taken from status.json — loopback only
|
|
41
|
+
allowHalfOpen: true,
|
|
42
|
+
});
|
|
43
|
+
const onError = (err: Error) => {
|
|
44
|
+
upstream.destroy();
|
|
45
|
+
reject(err);
|
|
46
|
+
};
|
|
47
|
+
upstream.once("error", onError);
|
|
48
|
+
upstream.once("connect", () => {
|
|
49
|
+
upstream.removeListener("error", onError);
|
|
50
|
+
resolvePromise(upstream);
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Largest amount of client data held while waiting for the server. Bounds the
|
|
57
|
+
* memory a slow upload can pin during an upgrade window.
|
|
58
|
+
*/
|
|
59
|
+
const MAX_PENDING_BYTES = 8 * 1024 * 1024;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Pipe one client connection to the server.
|
|
63
|
+
*
|
|
64
|
+
* Resolving the upstream is async, so the first bytes usually arrive before
|
|
65
|
+
* there is anywhere to send them. They must be captured by a `data` listener
|
|
66
|
+
* attached synchronously on this very tick and replayed once the upstream
|
|
67
|
+
* exists.
|
|
68
|
+
*
|
|
69
|
+
* `socket.pause()` is NOT a substitute — verified against Bun 1.3.13: bytes
|
|
70
|
+
* that arrive while paused are lost, and a later `pipe()`/`resume()` does not
|
|
71
|
+
* bring them back. A socket with no `data` listener drops them outright too.
|
|
72
|
+
* Both variants silently swallowed the first request in testing.
|
|
73
|
+
*/
|
|
74
|
+
async function handleConnection(
|
|
75
|
+
client: net.Socket,
|
|
76
|
+
connectWindowMs: number,
|
|
77
|
+
): Promise<void> {
|
|
78
|
+
const pending: Buffer[] = [];
|
|
79
|
+
let pendingBytes = 0;
|
|
80
|
+
let clientEnded = false;
|
|
81
|
+
const onEarlyData = (chunk: Buffer) => {
|
|
82
|
+
pendingBytes += chunk.length;
|
|
83
|
+
if (pendingBytes > MAX_PENDING_BYTES) {
|
|
84
|
+
client.destroy();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
pending.push(chunk);
|
|
88
|
+
};
|
|
89
|
+
client.on("data", onEarlyData);
|
|
90
|
+
client.once("end", () => { clientEnded = true; });
|
|
91
|
+
|
|
92
|
+
let upstream: net.Socket | null = null;
|
|
93
|
+
let clientGone = false;
|
|
94
|
+
|
|
95
|
+
// A socket error with no listener is an unhandled 'error' event, which would
|
|
96
|
+
// take the whole edge process — and the public port — down with it.
|
|
97
|
+
const teardown = () => {
|
|
98
|
+
upstream?.destroy();
|
|
99
|
+
client.destroy();
|
|
100
|
+
};
|
|
101
|
+
client.on("error", teardown);
|
|
102
|
+
client.once("close", () => { clientGone = true; });
|
|
103
|
+
|
|
104
|
+
const deadline = Date.now() + connectWindowMs;
|
|
105
|
+
while (!clientGone && Date.now() < deadline) {
|
|
106
|
+
const port = resolveTargetPort();
|
|
107
|
+
if (port !== null) {
|
|
108
|
+
try {
|
|
109
|
+
upstream = await connectUpstream(port);
|
|
110
|
+
break;
|
|
111
|
+
} catch {
|
|
112
|
+
// Server not up yet (or moved mid-restart) — re-resolve and retry.
|
|
113
|
+
_resetTargetCache();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
await sleep(CONNECT_RETRY_MS);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (clientGone) return;
|
|
120
|
+
if (!upstream) {
|
|
121
|
+
client.destroy();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
upstream.on("error", teardown);
|
|
126
|
+
|
|
127
|
+
// Replay what arrived during the connect, then hand both directions to the
|
|
128
|
+
// stream machinery. Removing the listener and piping happen in the same tick,
|
|
129
|
+
// so no chunk can slip through the gap.
|
|
130
|
+
client.off("data", onEarlyData);
|
|
131
|
+
for (const chunk of pending) upstream.write(chunk);
|
|
132
|
+
pending.length = 0;
|
|
133
|
+
|
|
134
|
+
client.pipe(upstream);
|
|
135
|
+
upstream.pipe(client);
|
|
136
|
+
|
|
137
|
+
// The client may have half-closed while we were still connecting.
|
|
138
|
+
if (clientEnded) upstream.end();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export interface EdgeForwarderOptions {
|
|
142
|
+
publicPort: number;
|
|
143
|
+
host?: string;
|
|
144
|
+
/** How long a client waits for a reachable server. Defaults to 5s. */
|
|
145
|
+
connectWindowMs?: number;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Bind the public port and start forwarding. Resolves once listening so the
|
|
150
|
+
* caller can fail fast when the port is unavailable.
|
|
151
|
+
*/
|
|
152
|
+
export function startEdgeForwarder(
|
|
153
|
+
opts: EdgeForwarderOptions,
|
|
154
|
+
): Promise<net.Server> {
|
|
155
|
+
const host = opts.host ?? "0.0.0.0";
|
|
156
|
+
const connectWindowMs = opts.connectWindowMs ?? CONNECT_WINDOW_MS;
|
|
157
|
+
return new Promise((resolvePromise, reject) => {
|
|
158
|
+
// allowHalfOpen keeps the other direction alive when one side sends FIN —
|
|
159
|
+
// long-lived chat WS and SSE streams depend on it.
|
|
160
|
+
const server = net.createServer({ allowHalfOpen: true }, (client) => {
|
|
161
|
+
void handleConnection(client, connectWindowMs);
|
|
162
|
+
});
|
|
163
|
+
server.once("error", reject);
|
|
164
|
+
server.listen(opts.publicPort, host, () => {
|
|
165
|
+
server.removeListener("error", reject);
|
|
166
|
+
resolvePromise(server);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ─── Process entry ─────────────────────────────────────────────────────
|
|
172
|
+
// Mirrors the `__serve__` guard in src/server/index.ts: the supervisor
|
|
173
|
+
// re-invokes the binary as `<bin> __edge__ <publicPort> <host>`.
|
|
174
|
+
if (process.argv.includes("__edge__")) {
|
|
175
|
+
const idx = process.argv.indexOf("__edge__");
|
|
176
|
+
const publicPort = parseInt(process.argv[idx + 1] ?? "", 10);
|
|
177
|
+
const host = process.argv[idx + 2] ?? "0.0.0.0";
|
|
178
|
+
|
|
179
|
+
if (!Number.isInteger(publicPort) || publicPort <= 0 || publicPort > 65535) {
|
|
180
|
+
process.stderr.write(`[edge] Invalid public port: ${process.argv[idx + 1]}\n`);
|
|
181
|
+
process.exit(2);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
try {
|
|
185
|
+
await startEdgeForwarder({ publicPort, host });
|
|
186
|
+
process.stderr.write(`[edge] Listening on ${host}:${publicPort}\n`);
|
|
187
|
+
} catch (err) {
|
|
188
|
+
process.stderr.write(`[edge] Failed to bind ${host}:${publicPort}: ${err}\n`);
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
@@ -21,6 +21,22 @@ export interface UploadResult {
|
|
|
21
21
|
*/
|
|
22
22
|
const TMP_SUFFIX = ".ppm-upload-tmp";
|
|
23
23
|
|
|
24
|
+
/**
|
|
25
|
+
* Create the target's parent only when it is actually missing. On Windows, Bun's recursive
|
|
26
|
+
* `mkdir` throws `EEXIST` for a directory that exists with the ReadOnly attribute — which is
|
|
27
|
+
* how Windows marks Desktop, Documents and Downloads — and that `EEXIST` would surface to the
|
|
28
|
+
* client as a "file already exists" collision for a file that was never there. An `EEXIST`
|
|
29
|
+
* from the create itself (the directory appeared meanwhile) is equally not a collision.
|
|
30
|
+
*/
|
|
31
|
+
async function ensureParentDir(parent: string, alreadyExists: boolean): Promise<void> {
|
|
32
|
+
if (alreadyExists) return;
|
|
33
|
+
try {
|
|
34
|
+
await mkdir(parent, { recursive: true });
|
|
35
|
+
} catch (e) {
|
|
36
|
+
if ((e as NodeJS.ErrnoException).code !== "EEXIST") throw e;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
24
40
|
async function lstatOrNull(path: string): Promise<Stats | null> {
|
|
25
41
|
try {
|
|
26
42
|
return await lstat(path);
|
|
@@ -97,7 +113,7 @@ export async function uploadFile(
|
|
|
97
113
|
}
|
|
98
114
|
|
|
99
115
|
const tmpPath = `${target}${TMP_SUFFIX}`;
|
|
100
|
-
await
|
|
116
|
+
await ensureParentDir(dirname(tmpPath), parentStat != null);
|
|
101
117
|
|
|
102
118
|
let size: number;
|
|
103
119
|
try {
|