@hanzo/bot 2026.3.7 → 2026.3.9
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/dist/{accounts-Cp7zE1zb.js → accounts-B-9Bhdn6.js} +17 -17
- package/dist/{accounts-D-CXitCL.js → accounts-BVV0eCmx.js} +2 -2
- package/dist/{accounts-Da-TWEIc.js → accounts-C04lw_uh.js} +4 -4
- package/dist/{accounts-B4Cft76I.js → accounts-C2vo5fEt.js} +2 -2
- package/dist/{accounts-DRUpcCkN.js → accounts-CtzU1wJb.js} +2 -2
- package/dist/{accounts-C_LXSS3x.js → accounts-DNligSyz.js} +2 -2
- package/dist/{acp-cli-DYkqqqaJ.js → acp-cli-CDUVvPjD.js} +28 -24
- package/dist/{active-listener-DlziGqIg.js → active-listener-NprMzFx6.js} +2 -2
- package/dist/{active-listener-BR7vpJxr.js → active-listener-zLV9i9LQ.js} +2 -2
- package/dist/{agent-scope-C5bklqr1.js → agent-scope-BcruZHHR.js} +5 -5
- package/dist/{agents-CH9da9zi.js → agents-D8rH1P3g.js} +20 -19
- package/dist/{agents.config-BQ8I8wuY.js → agents.config-OuZqDEe6.js} +4 -4
- package/dist/{api-0IJLBHQk.js → api-Bgrt1pfd.js} +1 -1
- package/dist/{api-key-rotation-iYITGuLK.js → api-key-rotation-BENZC8ep.js} +2 -2
- package/dist/{api-key-rotation-DuxfwUin.js → api-key-rotation-C0toONXd.js} +2 -2
- package/dist/{audio-preflight-CpAXC_Ct.js → audio-preflight-Bd44yEnM.js} +32 -32
- package/dist/{audio-preflight-BnfuyvxO.js → audio-preflight-D_s-peid.js} +4 -4
- package/dist/audio-preflight-d9iZknwY.js +102 -0
- package/dist/{audio-transcription-runner-GcMnO6sT.js → audio-transcription-runner-BePCnZfw.js} +1 -1
- package/dist/{audio-transcription-runner-CAOjjGxN.js → audio-transcription-runner-CsXaWVup.js} +12 -12
- package/dist/{audio-transcription-runner-DCsEpXgz.js → audio-transcription-runner-bvBQs8UB.js} +13 -13
- package/dist/{audit-DCJbont3.js → audit-BWNRwu8g.js} +28 -28
- package/dist/{audit-membership-runtime-CVVxrZ7j.js → audit-membership-runtime-BJ149bTU.js} +4 -4
- package/dist/{audit-membership-runtime-BIZ4bigJ.js → audit-membership-runtime-Bki8LzkA.js} +7 -6
- package/dist/{auth-CqlFkBrB.js → auth-CWHo884l.js} +5 -5
- package/dist/{auth-choice-9obtL17m.js → auth-choice-DUtpqOiw.js} +25 -22
- package/dist/{auth-choice-w2mL3d_M.js → auth-choice-n72qSpix.js} +15 -14
- package/dist/{auth-choice-options-DMoNPDm6.js → auth-choice-options-D13GahL8.js} +1 -1
- package/dist/{auth-choice-prompt-Btp8AqFI.js → auth-choice-prompt-8z7z_AUr.js} +1 -1
- package/dist/{auth-choice.apply-helpers-JU7nAiWC.js → auth-choice.apply-helpers-DMhFdoYH.js} +3 -3
- package/dist/{auth-mode-policy-slU2Nkgr.js → auth-mode-policy-BopOhrK8.js} +1 -1
- package/dist/{auth-profiles-BCHBDrea.js → auth-profiles-BtxyXCZY.js} +48 -925
- package/dist/{auth-token-BfzDARSk.js → auth-token-zcumGtdt.js} +3 -3
- package/dist/{banner-C4sx0Vaf.js → banner-C1G_GtAz.js} +3 -3
- package/dist/{bonjour-discovery-CzNIGZ7K.js → bonjour-discovery-C1SH2QqR.js} +3 -3
- package/dist/{browser-cli-qPNZkfDX.js → browser-cli-Bd81bwqM.js} +36 -32
- package/dist/build-info.json +3 -3
- package/dist/bundled/boot-md/handler.js +51 -51
- package/dist/bundled/bootstrap-extra-files/handler.js +6 -6
- package/dist/bundled/command-logger/handler.js +2 -2
- package/dist/bundled/session-memory/handler.js +51 -51
- package/dist/{call-C4z2LJrI.js → call-DL23sPxF.js} +9 -8
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/{channel-account-context-DyLW8OD1.js → channel-account-context-DGbGZhGz.js} +3 -3
- package/dist/{channel-activity-Bch3Rz78.js → channel-activity-DItBzFyQ.js} +3 -3
- package/dist/{channel-activity-DR4SiHcg.js → channel-activity-DO-d_jr4.js} +3 -3
- package/dist/{channel-options-ChtPFPQx.js → channel-options-DU65sVdF.js} +4 -4
- package/dist/{channel-selection-CXz2aSCs.js → channel-selection-BnXQH0vV.js} +2 -2
- package/dist/{channel-web-Bok0lFvq.js → channel-web-BbWnfun7.js} +25 -24
- package/dist/{channels-cli-B5oDUpEB.js → channels-cli-B8LCe0vu.js} +142 -135
- package/dist/{channels-status-issues-BAy-21Cb.js → channels-status-issues-DXNaEL8i.js} +1 -1
- package/dist/{chrome--CFg5C_H.js → chrome-B24-8NDM.js} +8 -8
- package/dist/{chrome-TWq_09_a.js → chrome-D4EfbMKb.js} +7 -7
- package/dist/{chrome-jCt9JCU8.js → chrome-hkgY24uS.js} +18 -18
- package/dist/{clack-prompter-0Rux0QKP.js → clack-prompter-CNKAp_jq.js} +5 -5
- package/dist/clawbot-cli-Bv8oZgvA.js +36 -0
- package/dist/cli/daemon-cli.js +1 -1
- package/dist/cli-DXbYdTNH.js +162 -0
- package/dist/{client-DWdu7Vc_.js → client-Bvvecv3V.js} +25 -142
- package/dist/{clipboard-Bfhk9cp3.js → clipboard-DwO9zZBK.js} +1 -1
- package/dist/{cloud-connect-BERMG0cQ.js → cloud-connect-CknfBF39.js} +89 -52
- package/dist/cloud-launch-7mm4ZKXy.js +172 -0
- package/dist/{command-poll-backoff.runtime-COz7plyi.js → command-poll-backoff.runtime-ClRAZFDL.js} +1 -1
- package/dist/{command-registry-DTMuq-Fw.js → command-registry-CTaJSsqV.js} +11 -11
- package/dist/{command-secret-targets-B2OuvZQf.js → command-secret-targets-C382v6Qd.js} +6 -6
- package/dist/{commands-BAjCW6P6.js → commands-BoGUirwW.js} +2 -2
- package/dist/{commands-registry-Ce7SJnAP.js → commands-registry-C6INZSSX.js} +4 -4
- package/dist/{commands-registry-bwa5zMJ1.js → commands-registry-Dn_5_JYs.js} +6 -6
- package/dist/{compact-CenE94cW.js → compact-CuLMew-8.js} +141 -910
- package/dist/{completion-cli-spiS5-xU.js → completion-cli-CixfDHo4.js} +6 -6
- package/dist/{config-cli-w-RlQ3jB.js → config-cli-Bu2Eakz-.js} +22 -19
- package/dist/{config-guard-rlTIXCSD.js → config-guard-Bt2BdsMd.js} +5 -5
- package/dist/{config-validation-B3rr-h3d.js → config-validation-WdHwRX05.js} +6 -6
- package/dist/{configure-YxPFskRy.js → configure-ClIJiVqS.js} +32 -31
- package/dist/{control-ui-assets-CvLJNwEr.js → control-ui-assets-Co9rmXkB.js} +3 -3
- package/dist/{credentials-DVX7Krq5.js → credentials-SIFZMlmo.js} +1 -1
- package/dist/{cron-cli-DI9DN0vu.js → cron-cli-DR13ajr7.js} +32 -28
- package/dist/{daemon-cli-OBRBnIhu.js → daemon-cli-C6ZVajFI.js} +28 -28
- package/dist/{daemon-install-CGk2QyeB.js → daemon-install-DsDcMh2v.js} +43 -39
- package/dist/{daemon-install-helpers-C1QLEGFF.js → daemon-install-helpers-BtOiCRD1.js} +7 -35
- package/dist/{deliver-BVtVDxwX.js → deliver-B1PE5Kmq.js} +21 -21
- package/dist/{deliver-DPkEY6xb.js → deliver-Bge0HwrF.js} +13 -13
- package/dist/{deliver-DmfS4khs.js → deliver-DudaV86i.js} +1 -1
- package/dist/deliver-runtime-L42k3QaI.js +36 -0
- package/dist/{deliver-runtime-PxJvVUhh.js → deliver-runtime-qDmQqiF-.js} +3 -3
- package/dist/deliver-runtime-s0eLCemL.js +63 -0
- package/dist/{delivery-queue-DgdE_Ifa.js → delivery-queue-BVKd_xSI.js} +1 -1
- package/dist/deps-send-discord.runtime-C8HKp3uO.js +37 -0
- package/dist/deps-send-discord.runtime-DSqcSnN3.js +26 -0
- package/dist/deps-send-imessage.runtime-Ch2ZcE2r.js +25 -0
- package/dist/deps-send-imessage.runtime-ECy162Cs.js +36 -0
- package/dist/deps-send-signal.runtime-XbioSg-_.js +35 -0
- package/dist/deps-send-signal.runtime-c-v7bD8y.js +24 -0
- package/dist/deps-send-slack.runtime-BM7Vp8vX.js +33 -0
- package/dist/deps-send-slack.runtime-xA-JRpSq.js +22 -0
- package/dist/deps-send-telegram.runtime-CO2npp7q.js +27 -0
- package/dist/deps-send-telegram.runtime-IFD4dAk7.js +39 -0
- package/dist/deps-send-whatsapp.runtime-BHuShWkA.js +124 -0
- package/dist/{deps-send-whatsapp.runtime-CrzuaVhC.js → deps-send-whatsapp.runtime-Cq-TLsJw.js} +7 -7
- package/dist/deps-send-whatsapp.runtime-wvdxQphB.js +60 -0
- package/dist/device-identity-DtdLP7QQ.js +148 -0
- package/dist/{devices-cli-C7xKmiR9.js → devices-cli-DZRtpqol.js} +25 -21
- package/dist/{diagnostic-DCevSIi3.js → diagnostic-CXxZq_XY.js} +3 -3
- package/dist/{diagnostic-D1IbJfJM.js → diagnostic-Do7hUiao.js} +2 -2
- package/dist/{diagnostics-vhe8iPOe.js → diagnostics-GQuagqCt.js} +1 -1
- package/dist/{directory-cli-BrLvL2oD.js → directory-cli-Tqim_rB9.js} +24 -21
- package/dist/{dns-cli-Dcytc0em.js → dns-cli-AcAZnW-T.js} +19 -16
- package/dist/{dock-D1Nz-RwP.js → dock-nMBfeGKa.js} +7 -7
- package/dist/{docs-cli-CjnLrTzs.js → docs-cli-C6mNYtxD.js} +17 -16
- package/dist/{doctor-completion-BKaFgAAN.js → doctor-completion-Dg6AJY6Q.js} +4 -4
- package/dist/{doctor-config-flow-Bp3eehAS.js → doctor-config-flow-CKY6Mr3X.js} +19 -19
- package/dist/{enable-pUSco1cm.js → enable-BWraNcrd.js} +2 -2
- package/dist/entry.js +20 -12
- package/dist/{errors-Dh5KARaE.js → errors-ClLWB67m.js} +1 -1
- package/dist/{errors-CHd6Q-vF.js → errors-DDrhcWHi.js} +1 -1
- package/dist/{exec-B45rafWZ.js → exec-B8Hv4Nkd.js} +1 -1
- package/dist/{exec-approvals-B5leCM6K.js → exec-approvals-Bh1osORd.js} +1 -1
- package/dist/{exec-approvals-allowlist-CSlk-iUy.js → exec-approvals-allowlist-dlIMsRq0.js} +1 -1
- package/dist/{exec-approvals-cli-B722kWhJ.js → exec-approvals-cli-B2V935Or.js} +33 -29
- package/dist/{exec-safe-bin-runtime-policy-C4OXhXIe.js → exec-safe-bin-runtime-policy-Ds-cMyOt.js} +2 -2
- package/dist/extensionAPI.js +6 -6
- package/dist/{fetch-C6doVJxZ.js → fetch-BETRLmK8.js} +5 -5
- package/dist/{fetch-COQIeEVX.js → fetch-BPh3R9xH.js} +3 -3
- package/dist/{fetch-TlhZeXdg.js → fetch-DyJnPUwL.js} +1 -1
- package/dist/{fetch-guard-BiNciKHu.js → fetch-guard-hL-C2yQz.js} +3 -3
- package/dist/{fetch-guard-C-neMX4E.js → fetch-guard-pwJ-F5aP.js} +2 -2
- package/dist/{frontmatter-BIwJR052.js → frontmatter-B0viix_h.js} +2 -2
- package/dist/{frontmatter-B6XNqDx2.js → frontmatter-BFHzrAY7.js} +3 -3
- package/dist/{fs-safe-DtMJsayp.js → fs-safe-CFIinCN2.js} +3 -3
- package/dist/{fs-safe-DmeSz0Nd.js → fs-safe-CeZ_BXcn.js} +4 -4
- package/dist/gateway-cli-DjWebqxe.js +1436 -0
- package/dist/{gateway-install-token-tifgQqTq.js → gateway-install-token-olAkdWwV.js} +6 -6
- package/dist/gateway-lock-DNpln_70.js +192 -0
- package/dist/{gateway-rpc--AYNXZQF.js → gateway-rpc-B37zbuoK.js} +3 -3
- package/dist/{github-copilot-token-BDioPmd6.js → github-copilot-token-BKQ4nXAw.js} +3 -24
- package/dist/{github-copilot-token-Byc_YVYE.js → github-copilot-token-D13V9YBz.js} +7 -7
- package/dist/{gmail-setup-utils-B1wEc-nz.js → gmail-setup-utils-DuoBM8ed.js} +3 -3
- package/dist/{health-DTtmaQPz.js → health-Cs-k6kLT.js} +18 -16
- package/dist/{helpers-CIEbwEWl.js → helpers-DDBxLojl.js} +1 -1
- package/dist/{hooks-cli-DJDBpL-Z.js → hooks-cli-Zqdxhm6M.js} +123 -116
- package/dist/{hooks-status-CFT0VML6.js → hooks-status-DqCwY9M6.js} +4 -4
- package/dist/{image-DSK1hSSV.js → image-DJo3nF6e.js} +6 -6
- package/dist/{image-DFnt4Uwg.js → image-m1GU1uco.js} +7 -7
- package/dist/{image-BdZcUz8M.js → image-nUHQF6BX.js} +1 -1
- package/dist/{image-ops-DBPCaLYI.js → image-ops-Bnk-bI_x.js} +1 -1
- package/dist/{image-ops-C-QWxnVw.js → image-ops-CLQ9abCf.js} +2 -2
- package/dist/{image-runtime-ueqmfx1a.js → image-runtime-B5M_-diF.js} +3 -3
- package/dist/image-runtime-Bd2-_2Fa.js +29 -0
- package/dist/image-runtime-CesErRak.js +57 -0
- package/dist/{inspect-BVm4U2OP.js → inspect-CMuOPXUf.js} +2 -2
- package/dist/{install-safe-path-Df97RWiJ.js → install-safe-path-BxdyoAni.js} +3 -3
- package/dist/{installs-BGMsioU1.js → installs-c4kWJSG4.js} +8 -8
- package/dist/ip-C7WWCRN7.js +204 -0
- package/dist/{ipv4-Difv_P0_.js → ipv4-DcjwXncJ.js} +2 -2
- package/dist/{ir-B0iARYlT.js → ir-9Bn85Mqy.js} +8 -8
- package/dist/{ir-CaGizvli.js → ir-BjnGKA2N.js} +8 -8
- package/dist/{issue-format-DjqrcimU.js → issue-format-BMPYbT1P.js} +1 -1
- package/dist/json-file-CNp4GTiH.js +25 -0
- package/dist/{legacy-names-DZdACm3t.js → legacy-names-Bkl4tjN-.js} +1 -1
- package/dist/{lifecycle-core-BXWGDU3R.js → lifecycle-core-fN_BonzB.js} +10 -10
- package/dist/{links-C7eMwu1P.js → links-DZZ9QxWA.js} +1 -1
- package/dist/llm-slug-generator.js +51 -51
- package/dist/local-launch-C2RER-G3.js +126 -0
- package/dist/{logger-LCC1m_20.js → logger-D4RcXHR-.js} +7 -7
- package/dist/{logger-DB-PHqB2.js → logger-DyQjakwH.js} +2 -1
- package/dist/{logging-CS4C9VwV.js → logging--bXnY6uw.js} +1 -1
- package/dist/{login-B8HwtO61.js → login-DTK-M8Is.js} +6 -6
- package/dist/{login-BbBqhgOM.js → login-nNeuyFrd.js} +5 -5
- package/dist/{login-qr-AAX0vgZR.js → login-qr-BEawmd_E.js} +10 -10
- package/dist/{login-qr-amd1X6Dw.js → login-qr-CmnyPjTv.js} +29 -16
- package/dist/{logs-cli-BH8DNgo2.js → logs-cli-BSlzurlM.js} +27 -23
- package/dist/machine-name-BWZ0tBHk.js +41 -0
- package/dist/{manager-BYSXh-I3.js → manager-BVqjeGyT.js} +11 -11
- package/dist/{manager-BOyc7q1-.js → manager-Bq6y1TH8.js} +13 -13
- package/dist/manager-runtime-CBdUM6c8.js +27 -0
- package/dist/manager-runtime-DNkH2nza.js +18 -0
- package/dist/{manifest-registry-9oWnIuht.js → manifest-registry-m_hXBIk-.js} +4 -4
- package/dist/{memory-cli-C6ocXZHW.js → memory-cli-yvsbLFgi.js} +15 -14
- package/dist/{message-channel-7mpcAPwa.js → message-channel-DOpIvru6.js} +34 -2
- package/dist/{model-catalog-B3fDLVsV.js → model-catalog-DtjVcDuN.js} +11 -5
- package/dist/{model-picker-V0gt2kzq.js → model-picker-oa-NsQXX.js} +5 -4
- package/dist/{model-selection-BNMWRHZu.js → model-selection-DQ5NblsF.js} +43 -43
- package/dist/{models-D9CovevI.js → models-Bi78FQeE.js} +26 -25
- package/dist/{models-cli-CQBq_lri.js → models-cli-DUkH_80R.js} +126 -119
- package/dist/{models-config-Tnpb1ctj.js → models-config-D_IvpQGa.js} +3 -2
- package/dist/{node-cli-Cy9sSHy5.js → node-cli-B1iGQlR9.js} +61 -54
- package/dist/{node-command-policy-C9mK2tft.js → node-command-policy-CeKPGmlP.js} +2 -2
- package/dist/node-commands-sMomb3e1.js +20 -0
- package/dist/{node-service-DB36GYv5.js → node-service-BLMp6VWJ.js} +2 -2
- package/dist/{nodes-cli-DEtlooE3.js → nodes-cli-CD9qv7k5.js} +39 -35
- package/dist/{nodes-screen-DmJ2G431.js → nodes-screen-X8daVm8e.js} +5 -5
- package/dist/{note-DI9vedAF.js → note-C3wyXRP2.js} +2 -2
- package/dist/{npm-pack-install-_OjtFm2J.js → npm-pack-install-B0X6q-Co.js} +3 -3
- package/dist/{npm-resolution-DzmQqopk.js → npm-resolution-CavQ2ST5.js} +5 -5
- package/dist/{oauth-env-DKoO0B8-.js → oauth-env-9SRuwpTK.js} +1 -1
- package/dist/{oauth-tls-preflight-Dzh0FiLy.js → oauth-tls-preflight-C_9v9ytQ.js} +2 -2
- package/dist/{onboard-B_1mmscr.js → onboard-Dgav6iT6.js} +17 -17
- package/dist/{onboard-auth.credentials-CtuA7DuT.js → onboard-auth.credentials-CMsut-0h.js} +4 -3
- package/dist/{onboard-channels-C1ZeD4r3.js → onboard-channels-oAN4ja4v.js} +26 -25
- package/dist/{onboard-custom-BU2l3aiF.js → onboard-custom-B3RIFmaw.js} +7 -7
- package/dist/{onboard-helpers-Dtu3-e93.js → onboard-helpers-BkwNJPNU.js} +12 -12
- package/dist/{onboard-hooks-w-a3FVVK.js → onboard-hooks-BRCGmt7Q.js} +12 -11
- package/dist/{onboard-remote-C-HD7hQU.js → onboard-remote-CE5v5J2R.js} +5 -5
- package/dist/{onboard-skills-DvgdlwqH.js → onboard-skills-DD5L2MsA.js} +5 -5
- package/dist/{onboarding-DozRyXTe.js → onboarding-gbgi-zx9.js} +23 -23
- package/dist/{onboarding.finalize-BfSNnhpS.js → onboarding.finalize-dk1j3ozb.js} +135 -128
- package/dist/{onboarding.gateway-config-C02W81hD.js → onboarding.gateway-config-DNQfWDVc.js} +39 -34
- package/dist/{onboarding.secret-input-BO32ZliB.js → onboarding.secret-input-BDId1_5K.js} +2 -2
- package/dist/{openai-codex-model-default-gJryyHmS.js → openai-codex-model-default-EWrFsdir.js} +5 -5
- package/dist/{openai-model-default-D2LuX7D-.js → openai-model-default-CcOzYsIQ.js} +3 -3
- package/dist/{outbound-C72ULCcI.js → outbound-CPL9ID8o.js} +6 -6
- package/dist/{outbound-CXQEMm6n.js → outbound-DCuHHD3G.js} +8 -8
- package/dist/{outbound-attachment-D7sOzAQn.js → outbound-attachment-Bm82Qbyl.js} +3 -3
- package/dist/{outbound-attachment-BF1JVcCB.js → outbound-attachment-BmiVeNLr.js} +2 -2
- package/dist/{pairing-cli-BkbpM3Mt.js → pairing-cli-dXCvRk1U.js} +23 -20
- package/dist/{pairing-labels-CjKrz2C9.js → pairing-labels-B_3GjgjR.js} +1 -1
- package/dist/{pairing-store-nyK6CFoT.js → pairing-store-CXFEv3Gr.js} +5 -5
- package/dist/{pairing-token-Tb0YsOGr.js → pairing-token-BIAdQuAM.js} +1 -1
- package/dist/{path-alias-guards-CUaIvLOE.js → path-alias-guards-Bz8AnRb7.js} +1 -1
- package/dist/{path-alias-guards-BCv18tKc.js → path-alias-guards-DBVdJRcc.js} +1 -1
- package/dist/{path-env-LTMy-Xkk.js → path-env-CgmdxEc7.js} +1 -1
- package/dist/{path-safety-DwIbN_B2.js → path-safety-EkGa1GqP.js} +1 -1
- package/dist/{paths-Dr0uMr7v.js → paths-BBXgPm_n.js} +2 -2
- package/dist/{paths-Cvc9EM8Y.js → paths-C6TxBCvO.js} +5 -5
- package/dist/{paths-l8GkNRRD.js → paths-Cgd1FfOW.js} +4 -4
- package/dist/{paths-0GcCtgXm.js → paths-gTdorMgW.js} +1 -1
- package/dist/{pi-embedded-DBn841N-.js → pi-embedded-BYfpUcIY.js} +159 -159
- package/dist/{pi-embedded-DYc6emwb.js → pi-embedded-DvWHP6Nn.js} +24 -24
- package/dist/{pi-embedded-helpers-BMC2HFyB.js → pi-embedded-helpers-CCkKNz_h.js} +5 -5
- package/dist/{pi-embedded-helpers-DLm1Mtr2.js → pi-embedded-helpers-Ck1qEeMH.js} +3 -3
- package/dist/{pi-embedded-helpers-BtnBVL-4.js → pi-embedded-helpers-_OL4yNw0.js} +52 -52
- package/dist/{pi-model-discovery-BUP6uy2Q.js → pi-model-discovery-6_opNECD.js} +2 -1
- package/dist/{pi-model-discovery-Cucu_uXw.js → pi-model-discovery-DANpv7pw.js} +7 -7
- package/dist/pi-model-discovery-runtime-8K2F-Fkl.js +20 -0
- package/dist/pi-model-discovery-runtime-Dr5-MM2j.js +11 -0
- package/dist/{pi-tools.before-tool-call.runtime-r5_UoU-W.js → pi-tools.before-tool-call.runtime-BrFKAhWX.js} +16 -13
- package/dist/{pi-tools.before-tool-call.runtime-DQ2d5nM_.js → pi-tools.before-tool-call.runtime-CLb1M0uM.js} +9 -9
- package/dist/{pi-tools.policy-C_cbrlt5.js → pi-tools.policy-U1G3dAzL.js} +9 -9
- package/dist/{plugin-auto-enable-DdGdWKDo.js → plugin-auto-enable-3v7X3qMK.js} +6 -6
- package/dist/{plugin-registry-FdOZQF3c.js → plugin-registry-Brz1ypl9.js} +5 -5
- package/dist/plugin-sdk/discord.js +6 -6
- package/dist/{plugins-D3Wuignn.js → plugins-CCkC0dRo.js} +7 -6
- package/dist/{plugins-YJZX7mvv.js → plugins-CeflwBVL.js} +13 -13
- package/dist/{plugins-cli-CV4ilsn4.js → plugins-cli-DGfFRLeo.js} +123 -116
- package/dist/{ports-BZsa4E0e.js → ports-BG0KrTF5.js} +3 -2
- package/dist/{ports-B8DmvnDT.js → ports-BxwhTkI2.js} +5 -29
- package/dist/ports-lsof-C-KFQ3hh.js +27 -0
- package/dist/{probe-D23qt8BT.js → probe-AK77B0YW.js} +4 -4
- package/dist/{program-GusnXq4M.js → program-DfJJCEJW.js} +125 -118
- package/dist/{progress-DLHMb9Nz.js → progress-DB5E2Y0L.js} +1 -1
- package/dist/{prompt-select-styled-B8L90ha2.js → prompt-select-styled-Cm8h3ln5.js} +50 -49
- package/dist/{provider-auth-helpers-DCzPHYBh.js → provider-auth-helpers-BWFf-ICH.js} +9 -8
- package/dist/{proxy-env-CKBWNd19.js → proxy-env-a_fwG5uV.js} +1 -1
- package/dist/{proxy-env-CreSu2Ej.js → proxy-env-zUD967XQ.js} +1 -1
- package/dist/{proxy-fetch-CuomJeW8.js → proxy-fetch-B-9MM6tH.js} +1 -1
- package/dist/{proxy-fetch-lxJGuoUa.js → proxy-fetch-ChfJDZwG.js} +1 -1
- package/dist/{push-apns-BNjpWCK5.js → push-apns-D7Kl5IlU.js} +6 -6
- package/dist/{pw-ai-DbzNFC8m.js → pw-ai-BuJLXHSR.js} +28 -24
- package/dist/{pw-ai-C-Sy12jT.js → pw-ai-DweqbnMJ.js} +1 -1
- package/dist/{pw-ai-pJMhS79V.js → pw-ai-yR5naMge.js} +14 -14
- package/dist/{qmd-manager-5C5L5YNn.js → qmd-manager-CWAXF3Vk.js} +10 -10
- package/dist/{qmd-manager-BuqPkrhL.js → qmd-manager-ChOTfdZQ.js} +14 -13
- package/dist/{qr-cli-DCqr6_WR.js → qr-cli-CNV3ou88.js} +8 -7
- package/dist/{query-expansion-BeRz7_bo.js → query-expansion-Cbd21KuP.js} +6 -6
- package/dist/{redact-DqlKR0-n.js → redact-DGz6yigq.js} +1 -1
- package/dist/{redact-snapshot-COg8NLLO.js → redact-snapshot-DDgxiqE4.js} +3 -3
- package/dist/{register.agent-yjg7wijd.js → register.agent-B6lw56u_.js} +147 -140
- package/dist/register.configure-A26LOYA5.js +173 -0
- package/dist/{register.maintenance-B1tKJXP8.js → register.maintenance-Bv41DKCC.js} +144 -136
- package/dist/{register.message-BJm9UQ1U.js → register.message-BTZUaOa_.js} +119 -112
- package/dist/{register.onboard-Si5PW3Ke.js → register.onboard-Cla_XQtJ.js} +47 -43
- package/dist/{register.setup-Dgd21xa5.js → register.setup-BO3qmf_4.js} +46 -42
- package/dist/{register.status-health-sessions-DijNX4q2.js → register.status-health-sessions-DQxR8MS5.js} +134 -127
- package/dist/{register.subclis-RfmNwdNw.js → register.subclis-CasWzZR5.js} +32 -32
- package/dist/{registry-CxLUHPLp.js → registry-DnJ84ILp.js} +6 -83
- package/dist/{resolve-configured-secret-input-string-ySbc3h26.js → resolve-configured-secret-input-string-D9uWNIsN.js} +2 -2
- package/dist/restart-D97MOP8K.js +782 -0
- package/dist/{rpc-DaYUgLOy.js → rpc-DyZoASXQ.js} +4 -4
- package/dist/run-loop-Zvh_699t.js +224 -0
- package/dist/{run-main-t3x2kkjY.js → run-main-CgFUs81l.js} +148 -133
- package/dist/{run-with-concurrency-ffnO0KnQ.js → run-with-concurrency-kEFC1Fle.js} +4 -4
- package/dist/{runtime-BkR9qMZk.js → runtime-BBknab-X.js} +6 -5
- package/dist/runtime-CvdZtNmJ.js +100 -0
- package/dist/{runtime-config-collectors-CCkqshyY.js → runtime-config-collectors-CML7zUqZ.js} +2 -2
- package/dist/{runtime-guard-BMUPc-7K.js → runtime-guard-jpG1v0SY.js} +1 -1
- package/dist/runtime-whatsapp-login.runtime-BKnJdTKn.js +13 -0
- package/dist/runtime-whatsapp-login.runtime-COI7KRKp.js +23 -0
- package/dist/runtime-whatsapp-outbound.runtime-DZYgfcRc.js +22 -0
- package/dist/runtime-whatsapp-outbound.runtime-la1XDkPQ.js +33 -0
- package/dist/{sandbox-DN9CY7lp.js → sandbox-DKscghPx.js} +19 -18
- package/dist/{sandbox-cli-BoXV0LgP.js → sandbox-cli-CPwPZJBq.js} +52 -48
- package/dist/{secrets-cli-CyF7PIF1.js → secrets-cli-BY0IyBZM.js} +31 -26
- package/dist/{security-cli-Dyvx1GHA.js → security-cli-CG6OlQ29.js} +66 -61
- package/dist/{send-7T5wUQDt.js → send-BSbPEzn5.js} +7 -7
- package/dist/{send-CmVj590_.js → send-Bi_r7Hno.js} +7 -7
- package/dist/{send-Ge3BmrKO.js → send-C2xEPjDg.js} +8 -8
- package/dist/{send-BrlM68Dd.js → send-C4kartXc.js} +6 -6
- package/dist/{send-DGbx1H-1.js → send-CFNNbHEA.js} +11 -11
- package/dist/{send-rLuC3ZNP.js → send-CIW-foVz.js} +7 -7
- package/dist/{send-CGAq-Ure.js → send-CZtdjq0Y.js} +20 -20
- package/dist/{send-Cp6dmr2f.js → send-CisFoCif.js} +28 -28
- package/dist/{send-BXQ1U9Zk.js → send-DKjV2v4c.js} +5 -5
- package/dist/{send-CKIMBFLs.js → send-DqQOo6dv.js} +8 -8
- package/dist/{gateway-cli-D7jJhAZQ.js → server-CG9eco0N.js} +122 -1835
- package/dist/{server-BM8Bplbe.js → server-DfSS2w17.js} +36 -32
- package/dist/{server-context-B1j20KiF.js → server-context-CcW_Z5sB.js} +15 -15
- package/dist/{server-lifecycle-D8uRbSiN.js → server-lifecycle-DWK8vMXD.js} +2 -2
- package/dist/{server-middleware-C0e-wReR.js → server-middleware-BtyTo4hI.js} +2 -2
- package/dist/{server-node-events-C876mSJD.js → server-node-events-Ck1bPPa5.js} +117 -110
- package/dist/{service-BJxGQl0h.js → service-DnXLOpYd.js} +2 -2
- package/dist/{session-1LXasKCO.js → session-Dnt2qKJU.js} +4 -4
- package/dist/{session-DoD05Mm8.js → session-U4Hk8Woy.js} +8 -8
- package/dist/{session-cost-usage-BKD6u4HD.js → session-cost-usage-CBHvFXhD.js} +3 -3
- package/dist/{session-utils-CigqosOc.js → session-utils-t4ZmEDMj.js} +9 -8
- package/dist/{sessions-Db2DF_68.js → sessions-BkKVGWHa.js} +13 -12
- package/dist/{sessions-CwRdJvxU.js → sessions-D6VEpJTN.js} +7 -7
- package/dist/{shared-DcKZdze7.js → shared-DKj9yygb.js} +4 -4
- package/dist/{skill-commands-DGy6Juvb.js → skill-commands-BN9qtrxT.js} +9 -9
- package/dist/{skill-commands-BFUWbeCU.js → skill-commands-Dyi0nIIE.js} +8 -8
- package/dist/{skill-scanner-B5APVdka.js → skill-scanner-C6efDeWr.js} +2 -2
- package/dist/{skills-DjMDgmlj.js → skills-Cp-zTGor.js} +8 -8
- package/dist/{skills-BDJUqEFI.js → skills-DgwotBrr.js} +22 -22
- package/dist/{skills-cli-CvDeA9Mz.js → skills-cli-BcLVYbwo.js} +19 -16
- package/dist/{skills-install-jLz2vwvm.js → skills-install-LXdiRh5j.js} +10 -10
- package/dist/{skills-status-CeHRbTXe.js → skills-status-NIhVZfqm.js} +5 -5
- package/dist/slash-commands.runtime-Bq0XWi2w.js +28 -0
- package/dist/slash-commands.runtime-iBi9rbmg.js +16 -0
- package/dist/slash-dispatch.runtime-7RhcnuYY.js +119 -0
- package/dist/slash-dispatch.runtime-8okSdt7k.js +56 -0
- package/dist/{slash-dispatch.runtime-Vp6IDoCc.js → slash-dispatch.runtime-DzpJjr3K.js} +6 -6
- package/dist/slash-skill-commands.runtime-HWFM7WtA.js +34 -0
- package/dist/slash-skill-commands.runtime-a4qnxIQp.js +20 -0
- package/dist/{sqlite-C0jSdAfK.js → sqlite-BOrw_KhN.js} +4 -4
- package/dist/stable-node-path-BghYt81T.js +32 -0
- package/dist/{status-D3cIxG_a.js → status-DN8lRmcz.js} +40 -40
- package/dist/{status-pXeXDUup.js → status-DNPn0STZ.js} +1 -1
- package/dist/{status.update-DeJopD-c.js → status.update-Cd4sMxYz.js} +4 -4
- package/dist/{store-cJlS-gR6.js → store-CNWtYorN.js} +2 -2
- package/dist/store-D8F_4CRR.js +701 -0
- package/dist/{store-BgCLFtxS.js → store-DCoVH3mG.js} +2 -2
- package/dist/subagent-registry-runtime-C4H5Ofm0.js +56 -0
- package/dist/subagent-registry-runtime-DVd9wO_D.js +119 -0
- package/dist/{subagent-registry-runtime-BlAI3eqU.js → subagent-registry-runtime-a7xfwPB8.js} +6 -6
- package/dist/{subsystem-Cfn2Pryx.js → subsystem-C6poMade.js} +2 -94
- package/dist/{subsystem-CdFYjh2k.js → subsystem-W834z9Wa.js} +14 -14
- package/dist/{system-cli-GQBIKMxE.js → system-cli-Zu5LiJFn.js} +25 -21
- package/dist/{system-run-command-ZDr-0-G2.js → system-run-command-Kw0jxir0.js} +1 -1
- package/dist/{systemd-hints-CLH4_-IK.js → systemd-hints-Da4Q7Orc.js} +5 -5
- package/dist/{systemd-linger-PnO8ebUK.js → systemd-linger-NLcFYPEu.js} +2 -2
- package/dist/{systemd-tpTWQ79a.js → systemd-tjVNbfBk.js} +2 -2
- package/dist/{table-D9z5aFl9.js → table-BP6N5EYA.js} +2 -2
- package/dist/{tables-Bb1hkkgV.js → tables-D4LxfXpk.js} +2 -2
- package/dist/{tables-CgcFNr6G.js → tables-DBZFzS9x.js} +1 -1
- package/dist/{tailnet-B-wq8YXh.js → tailnet-CInGXmk9.js} +1 -1
- package/dist/{tailscale-DOG3cjSj.js → tailscale-DRFhBuh-.js} +1 -1
- package/dist/{target-errors-D41KLMCY.js → target-errors-CkcKdefZ.js} +2 -2
- package/dist/{target-errors-DPj6Es2y.js → target-errors-CxUP9L6c.js} +2 -2
- package/dist/{thinking-C3b10cHs.js → thinking-Xlbm5WNq.js} +7 -7
- package/dist/{tokens-g3GBx2U9.js → tokens-C3eENCf9.js} +1 -1
- package/dist/{tokens-mtgzW7UN.js → tokens-Cyi-NbsV.js} +1 -1
- package/dist/{tool-display-CpQNRadF.js → tool-display-qTfeZx-b.js} +2 -2
- package/dist/{tool-images-Bkv3er-8.js → tool-images-BwtNIRsT.js} +2 -2
- package/dist/{tool-images-D9pdW1gE.js → tool-images-D217wDXi.js} +2 -2
- package/dist/{trash-ChZlaria.js → trash-DHZNy01S.js} +2 -2
- package/dist/{tui-BdX0dbMg.js → tui-CW9for1h.js} +18 -18
- package/dist/tui-cli-ChrtbCqc.js +91 -0
- package/dist/types.secrets-CpVqMFti.js +81 -0
- package/dist/{update-BLXj6ysD.js → update-Bb-g7rqr.js} +4 -4
- package/dist/{update-cli-lYpdoDyw.js → update-cli-DHGCFiKY.js} +155 -148
- package/dist/{update-runner-DtN1XGSv.js → update-runner-BDHtvoca.js} +6 -6
- package/dist/web-CCim-JL4.js +123 -0
- package/dist/{web-BvId86u4.js → web-IBqHOVI2.js} +6 -6
- package/dist/{web-BEuMJbx-.js → web-o9PMPEDK.js} +55 -55
- package/dist/{webhooks-cli-CvPAdGDn.js → webhooks-cli-C32h-6dI.js} +21 -18
- package/dist/{whatsapp-actions-DSjBUB00.js → whatsapp-actions-BZRxKavO.js} +31 -28
- package/dist/{whatsapp-actions-nZnQ4BwK.js → whatsapp-actions-DmKZmCkz.js} +21 -21
- package/dist/{widearea-dns-Blh7W-0q.js → widearea-dns-9PZLZ6zk.js} +1 -1
- package/dist/{with-timeout-BVwCWUvY.js → with-timeout-DKgjtZv2.js} +6 -43
- package/dist/{workspace-BC5WA0Th.js → workspace-CPNwHoy5.js} +20 -20
- package/dist/{workspace-BrC46nbq.js → workspace-CedZZfvJ.js} +5 -5
- package/dist/{workspace-dirs-Cb43onAl.js → workspace-dirs-BgwJ2Axm.js} +1 -1
- package/dist/{ws-ChEZbUss.js → ws-BwH2d97O.js} +2 -2
- package/docs/es/concepts/sessions.md +1 -1
- package/docs/pt-BR/concepts/sessions.md +1 -1
- package/extensions/acpx/package.json +1 -1
- package/extensions/bluebubbles/package.json +1 -1
- package/extensions/ci-fix-loop/package.json +1 -1
- package/extensions/continuous-learning/package.json +1 -1
- package/extensions/copilot-proxy/package.json +1 -1
- package/extensions/diagnostics-otel/package.json +1 -1
- package/extensions/diffs/package.json +1 -1
- package/extensions/discord/package.json +1 -1
- package/extensions/feishu/package.json +1 -1
- package/extensions/flow/package.json +1 -1
- package/extensions/google-antigravity-auth/package.json +1 -1
- package/extensions/google-gemini-cli-auth/package.json +1 -1
- package/extensions/googlechat/node_modules/.bin/openclaw +2 -2
- package/extensions/googlechat/package.json +2 -2
- package/extensions/imessage/package.json +1 -1
- package/extensions/irc/package.json +1 -1
- package/extensions/line/package.json +1 -1
- package/extensions/llm-task/package.json +1 -1
- package/extensions/lobster/package.json +1 -1
- package/extensions/matrix/CHANGELOG.md +10 -0
- package/extensions/matrix/package.json +1 -1
- package/extensions/mattermost/package.json +1 -1
- package/extensions/memory-core/node_modules/.bin/openclaw +2 -2
- package/extensions/memory-core/package.json +2 -2
- package/extensions/memory-lancedb/package.json +1 -1
- package/extensions/minimax-portal-auth/package.json +1 -1
- package/extensions/msteams/CHANGELOG.md +10 -0
- package/extensions/msteams/package.json +1 -1
- package/extensions/nextcloud-talk/package.json +1 -1
- package/extensions/nostr/CHANGELOG.md +10 -0
- package/extensions/nostr/package.json +1 -1
- package/extensions/open-prose/package.json +1 -1
- package/extensions/self-improvement/package.json +1 -1
- package/extensions/signal/package.json +1 -1
- package/extensions/slack/package.json +1 -1
- package/extensions/synology-chat/package.json +1 -1
- package/extensions/telegram/package.json +1 -1
- package/extensions/tlon/package.json +1 -1
- package/extensions/twitch/CHANGELOG.md +10 -0
- package/extensions/twitch/package.json +1 -1
- package/extensions/voice-call/CHANGELOG.md +10 -0
- package/extensions/voice-call/package.json +1 -1
- package/extensions/whatsapp/package.json +1 -1
- package/extensions/zalo/CHANGELOG.md +10 -0
- package/extensions/zalo/package.json +1 -1
- package/extensions/zalouser/CHANGELOG.md +10 -0
- package/extensions/zalouser/package.json +1 -1
- package/package.json +3 -2
- package/dist/audio-preflight-Bk3KZQei.js +0 -98
- package/dist/clawbot-cli-DpO-ZwmI.js +0 -32
- package/dist/cli-1p9b3pE_.js +0 -155
- package/dist/deliver-runtime-CESEQ4NM.js +0 -59
- package/dist/deliver-runtime-G0G5orrZ.js +0 -36
- package/dist/deps-send-discord.runtime-BM3uHet5.js +0 -26
- package/dist/deps-send-discord.runtime-dTfY4NLn.js +0 -34
- package/dist/deps-send-imessage.runtime-CBlUhUeN.js +0 -25
- package/dist/deps-send-imessage.runtime-Cm_XDGKz.js +0 -33
- package/dist/deps-send-signal.runtime-9WH9ir2Z.js +0 -32
- package/dist/deps-send-signal.runtime-DnH0lazO.js +0 -24
- package/dist/deps-send-slack.runtime-Cx_x379p.js +0 -30
- package/dist/deps-send-slack.runtime-Dmq0lsvR.js +0 -22
- package/dist/deps-send-telegram.runtime-33sbp3Ol.js +0 -27
- package/dist/deps-send-telegram.runtime-BFHbiOeI.js +0 -36
- package/dist/deps-send-whatsapp.runtime-8bLqjmui.js +0 -60
- package/dist/deps-send-whatsapp.runtime-BeJLvpI1.js +0 -117
- package/dist/image-runtime-Bq51vNRb.js +0 -53
- package/dist/image-runtime-xqxW2PQA.js +0 -29
- package/dist/manager-runtime-20Upetpf.js +0 -18
- package/dist/manager-runtime-D2MqM9iK.js +0 -24
- package/dist/node-commands-DYz_oQFz.js +0 -12
- package/dist/pi-model-discovery-runtime-BcJAGnf4.js +0 -11
- package/dist/pi-model-discovery-runtime-IFYIuVfT.js +0 -17
- package/dist/register.configure-a0uTvfCu.js +0 -166
- package/dist/runtime-whatsapp-login.runtime-BcbYtLph.js +0 -13
- package/dist/runtime-whatsapp-login.runtime-CQLsSWjA.js +0 -20
- package/dist/runtime-whatsapp-outbound.runtime-DoZi3gnM.js +0 -40
- package/dist/runtime-whatsapp-outbound.runtime-MIKcURpN.js +0 -22
- package/dist/slash-commands.runtime-2kptrdDi.js +0 -16
- package/dist/slash-commands.runtime-Ckcj6TnD.js +0 -25
- package/dist/slash-dispatch.runtime-B5ykjP8B.js +0 -112
- package/dist/slash-dispatch.runtime-DLP2IeNv.js +0 -56
- package/dist/slash-skill-commands.runtime-6jUbSMOW.js +0 -20
- package/dist/slash-skill-commands.runtime-DbzbD-ZQ.js +0 -31
- package/dist/subagent-registry-runtime-Bjh1H1uK.js +0 -112
- package/dist/subagent-registry-runtime-COKZwsHd.js +0 -56
- package/dist/tui-cli-C9UujwTv.js +0 -86
- package/dist/web-C14E8nHS.js +0 -116
- /package/dist/{allow-from-Do0aB7F6.js → allow-from-D5r7UcQr.js} +0 -0
- /package/dist/{boolean-DtWR5bt3.js → boolean-ydSOedIP.js} +0 -0
- /package/dist/{brew-sUdeII-D.js → brew-Djs-Lc5s.js} +0 -0
- /package/dist/{chat-envelope-CrWMMV_a.js → chat-envelope-DVKDDTSu.js} +0 -0
- /package/dist/{cli-utils-DK6017OO.js → cli-utils-CCaEbxAz.js} +0 -0
- /package/dist/{command-format-CLEQe4bk.js → command-format-MESnUO9S.js} +0 -0
- /package/dist/{command-options-j8s8APBQ.js → command-options-ZvhOayEd.js} +0 -0
- /package/dist/{command-poll-backoff-Cse56OCv.js → command-poll-backoff-Dal4OaUV.js} +0 -0
- /package/dist/{constants-BgSj-mRP.js → constants-CkIxhEvX.js} +0 -0
- /package/dist/{context-window-guard-BgcfPYTd.js → context-window-guard-BUJ2pfYi.js} +0 -0
- /package/dist/{daemon-runtime-VfkpXuRu.js → daemon-runtime-CbyS9Xgu.js} +0 -0
- /package/dist/{dangerous-name-matching-BAJAZtyB.js → dangerous-name-matching-PRkNIyQj.js} +0 -0
- /package/dist/{dangerous-tools-DjOwyW3J.js → dangerous-tools-B9LIt3MU.js} +0 -0
- /package/dist/{entry-status-DVwZos2N.js → entry-status-4cDL0OcK.js} +0 -0
- /package/dist/{fetch-timeout-BL0dTnkh.js → fetch-timeout-EpWPz-Eu.js} +0 -0
- /package/dist/{format-C-890_pY.js → format-DVLB9DNB.js} +0 -0
- /package/dist/{format-duration-BvkrOKhT.js → format-duration-CrBESKOT.js} +0 -0
- /package/dist/{format-relative-8cNYQsqb.js → format-relative-BsYuWm-Q.js} +0 -0
- /package/dist/{health-format-CqfOHMzL.js → health-format-BIotQmMH.js} +0 -0
- /package/dist/{heartbeat-visibility-_K4bnQDH.js → heartbeat-visibility-C_P1yurK.js} +0 -0
- /package/dist/{help-format-ncfKj8zq.js → help-format-Ce4Xueed.js} +0 -0
- /package/dist/{helpers-5EH85AYF.js → helpers-CpIyUra4.js} +0 -0
- /package/dist/{input-provenance-ByYWugDu.js → input-provenance-qgaZGYuK.js} +0 -0
- /package/dist/{json-files-UKlMS7yU.js → json-files-BH1UBATr.js} +0 -0
- /package/dist/{kill-tree-CeEi7v61.js → kill-tree-W9BwtYuE.js} +0 -0
- /package/dist/{legacy-names-D3aIn6ij.js → legacy-names-DV-6rguu.js} +0 -0
- /package/dist/{load-options-CLMiD1a9.js → load-options-BuY2PXsl.js} +0 -0
- /package/dist/{logging-DRwtiLIS.js → logging-kuFzZMsG.js} +0 -0
- /package/dist/{model-param-b-NJsgH2EF.js → model-param-b-4PN786ZX.js} +0 -0
- /package/dist/{mutable-allowlist-detectors-DiZDtmlZ.js → mutable-allowlist-detectors-TCG6mnbz.js} +0 -0
- /package/dist/{node-resolve-C8bjtxQk.js → node-resolve-DSu0lzHd.js} +0 -0
- /package/dist/{onboard-config-DFLATNN1.js → onboard-config-YMJ1PLAF.js} +0 -0
- /package/dist/{onboard-provider-auth-flags-CpVNpwzI.js → onboard-provider-auth-flags-DHzbi9kj.js} +0 -0
- /package/dist/{openclaw-root-BFfBQ6FD.js → openclaw-root-T5G2ldGE.js} +0 -0
- /package/dist/{parse-log-line-DxFrnzNo.js → parse-log-line-BrrE4onI.js} +0 -0
- /package/dist/{parse-port-CboE2EQm.js → parse-port-DjjWDROB.js} +0 -0
- /package/dist/{parse-timeout-uTDpUWKR.js → parse-timeout-BS3EWcf6.js} +0 -0
- /package/dist/{polls-D86s6oEI.js → polls-QrTzhQf5.js} +0 -0
- /package/dist/{program-context-DQD9Uf8U.js → program-context-BqyLhTGk.js} +0 -0
- /package/dist/{prompt-style-C1jf_-k5.js → prompt-style-DB_OyH4q.js} +0 -0
- /package/dist/{prompts-GoDC3iAV.js → prompts-DomsZukd.js} +0 -0
- /package/dist/{provider-env-vars-D3-Jf8PX.js → provider-env-vars-DYZiYet-.js} +0 -0
- /package/dist/{proxy-BNFyBgvu.js → proxy-CUsDSClP.js} +0 -0
- /package/dist/{redact-BsCSVGmT.js → redact-B1GVGbib.js} +0 -0
- /package/dist/{render-scQFEkLe.js → render-CUAKPmvZ.js} +0 -0
- /package/dist/{run-with-concurrency-CzLnwXXV.js → run-with-concurrency-CLARJMM7.js} +0 -0
- /package/dist/{runtime-status-CL_bKfj_.js → runtime-status-Fmu5gNYW.js} +0 -0
- /package/dist/{secret-equal-DxKrAcRs.js → secret-equal-BN0idTaZ.js} +0 -0
- /package/dist/{secure-random-CruxVpoI.js → secure-random-B2UrD2xa.js} +0 -0
- /package/dist/{session-key-k6urs9r-.js → session-key-CC77ya0a.js} +0 -0
- /package/dist/{stagger-DW-U0kcV.js → stagger-Cek4Eizw.js} +0 -0
- /package/dist/{targets-CwCifSLG.js → targets-CD5AQXRB.js} +0 -0
- /package/dist/{targets-xSi-e-_L.js → targets-DPUt073v.js} +0 -0
- /package/dist/{text-format-CFm4X8Ze.js → text-format-DarxU3JH.js} +0 -0
- /package/dist/{thinking-RV_E8HFV.js → thinking-C0gzzPsv.js} +0 -0
- /package/dist/{timeouts-G9Yto-nj.js → timeouts-DEnpCqGd.js} +0 -0
- /package/dist/{tool-catalog-omkiks3D.js → tool-catalog-3w4XiWhy.js} +0 -0
- /package/dist/{transcript-events-CtWhopMu.js → transcript-events-CdWLIofg.js} +0 -0
- /package/dist/{usage-format-BMWvYDjj.js → usage-format-zuuFSdkg.js} +0 -0
- /package/dist/{utils-cwpAMi-t.js → utils-BnC3HGtm.js} +0 -0
- /package/dist/{version-DdJhsIqk.js → version-DT-JIO28.js} +0 -0
- /package/dist/{windows-spawn-CsdZOQMr.js → windows-spawn-CVnPunjY.js} +0 -0
- /package/dist/{wsl-Cx5T6MYb.js → wsl-DLw4LET-.js} +0 -0
|
@@ -0,0 +1,782 @@
|
|
|
1
|
+
import { u as resolveGatewayPort } from "./paths-BMo6kTge.js";
|
|
2
|
+
import { t as createSubsystemLogger } from "./subsystem-C6poMade.js";
|
|
3
|
+
import { n as logLaneDequeue, r as logLaneEnqueue, t as diag } from "./diagnostic-CXxZq_XY.js";
|
|
4
|
+
import { n as resolveLsofCommandSync } from "./ports-lsof-C-KFQ3hh.js";
|
|
5
|
+
import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLabel } from "./constants-CkIxhEvX.js";
|
|
6
|
+
import { spawnSync } from "node:child_process";
|
|
7
|
+
import os from "node:os";
|
|
8
|
+
import path from "node:path";
|
|
9
|
+
|
|
10
|
+
//#region src/process/lanes.ts
|
|
11
|
+
let CommandLane = /* @__PURE__ */ function(CommandLane) {
|
|
12
|
+
CommandLane["Main"] = "main";
|
|
13
|
+
CommandLane["Cron"] = "cron";
|
|
14
|
+
CommandLane["Subagent"] = "subagent";
|
|
15
|
+
CommandLane["Nested"] = "nested";
|
|
16
|
+
return CommandLane;
|
|
17
|
+
}({});
|
|
18
|
+
|
|
19
|
+
//#endregion
|
|
20
|
+
//#region src/process/command-queue.ts
|
|
21
|
+
/**
|
|
22
|
+
* Dedicated error type thrown when a queued command is rejected because
|
|
23
|
+
* its lane was cleared. Callers that fire-and-forget enqueued tasks can
|
|
24
|
+
* catch (or ignore) this specific type to avoid unhandled-rejection noise.
|
|
25
|
+
*/
|
|
26
|
+
var CommandLaneClearedError = class extends Error {
|
|
27
|
+
constructor(lane) {
|
|
28
|
+
super(lane ? `Command lane "${lane}" cleared` : "Command lane cleared");
|
|
29
|
+
this.name = "CommandLaneClearedError";
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Dedicated error type thrown when a new command is rejected because the
|
|
34
|
+
* gateway is currently draining for restart.
|
|
35
|
+
*/
|
|
36
|
+
var GatewayDrainingError = class extends Error {
|
|
37
|
+
constructor() {
|
|
38
|
+
super("Gateway is draining for restart; new tasks are not accepted");
|
|
39
|
+
this.name = "GatewayDrainingError";
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
let gatewayDraining = false;
|
|
43
|
+
const lanes = /* @__PURE__ */ new Map();
|
|
44
|
+
let nextTaskId = 1;
|
|
45
|
+
function getLaneState(lane) {
|
|
46
|
+
const existing = lanes.get(lane);
|
|
47
|
+
if (existing) return existing;
|
|
48
|
+
const created = {
|
|
49
|
+
lane,
|
|
50
|
+
queue: [],
|
|
51
|
+
activeTaskIds: /* @__PURE__ */ new Set(),
|
|
52
|
+
maxConcurrent: 1,
|
|
53
|
+
draining: false,
|
|
54
|
+
generation: 0
|
|
55
|
+
};
|
|
56
|
+
lanes.set(lane, created);
|
|
57
|
+
return created;
|
|
58
|
+
}
|
|
59
|
+
function completeTask(state, taskId, taskGeneration) {
|
|
60
|
+
if (taskGeneration !== state.generation) return false;
|
|
61
|
+
state.activeTaskIds.delete(taskId);
|
|
62
|
+
return true;
|
|
63
|
+
}
|
|
64
|
+
function drainLane(lane) {
|
|
65
|
+
const state = getLaneState(lane);
|
|
66
|
+
if (state.draining) {
|
|
67
|
+
if (state.activeTaskIds.size === 0 && state.queue.length > 0) diag.warn(`drainLane blocked: lane=${lane} draining=true active=0 queue=${state.queue.length}`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
state.draining = true;
|
|
71
|
+
const pump = () => {
|
|
72
|
+
try {
|
|
73
|
+
while (state.activeTaskIds.size < state.maxConcurrent && state.queue.length > 0) {
|
|
74
|
+
const entry = state.queue.shift();
|
|
75
|
+
const waitedMs = Date.now() - entry.enqueuedAt;
|
|
76
|
+
if (waitedMs >= entry.warnAfterMs) {
|
|
77
|
+
try {
|
|
78
|
+
entry.onWait?.(waitedMs, state.queue.length);
|
|
79
|
+
} catch (err) {
|
|
80
|
+
diag.error(`lane onWait callback failed: lane=${lane} error="${String(err)}"`);
|
|
81
|
+
}
|
|
82
|
+
diag.warn(`lane wait exceeded: lane=${lane} waitedMs=${waitedMs} queueAhead=${state.queue.length}`);
|
|
83
|
+
}
|
|
84
|
+
logLaneDequeue(lane, waitedMs, state.queue.length);
|
|
85
|
+
const taskId = nextTaskId++;
|
|
86
|
+
const taskGeneration = state.generation;
|
|
87
|
+
state.activeTaskIds.add(taskId);
|
|
88
|
+
(async () => {
|
|
89
|
+
const startTime = Date.now();
|
|
90
|
+
try {
|
|
91
|
+
const result = await entry.task();
|
|
92
|
+
if (completeTask(state, taskId, taskGeneration)) {
|
|
93
|
+
diag.debug(`lane task done: lane=${lane} durationMs=${Date.now() - startTime} active=${state.activeTaskIds.size} queued=${state.queue.length}`);
|
|
94
|
+
pump();
|
|
95
|
+
}
|
|
96
|
+
entry.resolve(result);
|
|
97
|
+
} catch (err) {
|
|
98
|
+
const completedCurrentGeneration = completeTask(state, taskId, taskGeneration);
|
|
99
|
+
if (!(lane.startsWith("auth-probe:") || lane.startsWith("session:probe-"))) diag.error(`lane task error: lane=${lane} durationMs=${Date.now() - startTime} error="${String(err)}"`);
|
|
100
|
+
if (completedCurrentGeneration) pump();
|
|
101
|
+
entry.reject(err);
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
}
|
|
105
|
+
} finally {
|
|
106
|
+
state.draining = false;
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
pump();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Mark gateway as draining for restart so new enqueues fail fast with
|
|
113
|
+
* `GatewayDrainingError` instead of being silently killed on shutdown.
|
|
114
|
+
*/
|
|
115
|
+
function markGatewayDraining() {
|
|
116
|
+
gatewayDraining = true;
|
|
117
|
+
}
|
|
118
|
+
function setCommandLaneConcurrency(lane, maxConcurrent) {
|
|
119
|
+
const cleaned = lane.trim() || CommandLane.Main;
|
|
120
|
+
const state = getLaneState(cleaned);
|
|
121
|
+
state.maxConcurrent = Math.max(1, Math.floor(maxConcurrent));
|
|
122
|
+
drainLane(cleaned);
|
|
123
|
+
}
|
|
124
|
+
function enqueueCommandInLane(lane, task, opts) {
|
|
125
|
+
if (gatewayDraining) return Promise.reject(new GatewayDrainingError());
|
|
126
|
+
const cleaned = lane.trim() || CommandLane.Main;
|
|
127
|
+
const warnAfterMs = opts?.warnAfterMs ?? 2e3;
|
|
128
|
+
const state = getLaneState(cleaned);
|
|
129
|
+
return new Promise((resolve, reject) => {
|
|
130
|
+
state.queue.push({
|
|
131
|
+
task: () => task(),
|
|
132
|
+
resolve: (value) => resolve(value),
|
|
133
|
+
reject,
|
|
134
|
+
enqueuedAt: Date.now(),
|
|
135
|
+
warnAfterMs,
|
|
136
|
+
onWait: opts?.onWait
|
|
137
|
+
});
|
|
138
|
+
logLaneEnqueue(cleaned, state.queue.length + state.activeTaskIds.size);
|
|
139
|
+
drainLane(cleaned);
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
function getQueueSize(lane = CommandLane.Main) {
|
|
143
|
+
const resolved = lane.trim() || CommandLane.Main;
|
|
144
|
+
const state = lanes.get(resolved);
|
|
145
|
+
if (!state) return 0;
|
|
146
|
+
return state.queue.length + state.activeTaskIds.size;
|
|
147
|
+
}
|
|
148
|
+
function getTotalQueueSize() {
|
|
149
|
+
let total = 0;
|
|
150
|
+
for (const s of lanes.values()) total += s.queue.length + s.activeTaskIds.size;
|
|
151
|
+
return total;
|
|
152
|
+
}
|
|
153
|
+
function clearCommandLane(lane = CommandLane.Main) {
|
|
154
|
+
const cleaned = lane.trim() || CommandLane.Main;
|
|
155
|
+
const state = lanes.get(cleaned);
|
|
156
|
+
if (!state) return 0;
|
|
157
|
+
const removed = state.queue.length;
|
|
158
|
+
const pending = state.queue.splice(0);
|
|
159
|
+
for (const entry of pending) entry.reject(new CommandLaneClearedError(cleaned));
|
|
160
|
+
return removed;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Reset all lane runtime state to idle. Used after SIGUSR1 in-process
|
|
164
|
+
* restarts where interrupted tasks' finally blocks may not run, leaving
|
|
165
|
+
* stale active task IDs that permanently block new work from draining.
|
|
166
|
+
*
|
|
167
|
+
* Bumps lane generation and clears execution counters so stale completions
|
|
168
|
+
* from old in-flight tasks are ignored. Queued entries are intentionally
|
|
169
|
+
* preserved — they represent pending user work that should still execute
|
|
170
|
+
* after restart.
|
|
171
|
+
*
|
|
172
|
+
* After resetting, drains any lanes that still have queued entries so
|
|
173
|
+
* preserved work is pumped immediately rather than waiting for a future
|
|
174
|
+
* `enqueueCommandInLane()` call (which may never come).
|
|
175
|
+
*/
|
|
176
|
+
function resetAllLanes() {
|
|
177
|
+
gatewayDraining = false;
|
|
178
|
+
const lanesToDrain = [];
|
|
179
|
+
for (const state of lanes.values()) {
|
|
180
|
+
state.generation += 1;
|
|
181
|
+
state.activeTaskIds.clear();
|
|
182
|
+
state.draining = false;
|
|
183
|
+
if (state.queue.length > 0) lanesToDrain.push(state.lane);
|
|
184
|
+
}
|
|
185
|
+
for (const lane of lanesToDrain) drainLane(lane);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Returns the total number of actively executing tasks across all lanes
|
|
189
|
+
* (excludes queued-but-not-started entries).
|
|
190
|
+
*/
|
|
191
|
+
function getActiveTaskCount() {
|
|
192
|
+
let total = 0;
|
|
193
|
+
for (const s of lanes.values()) total += s.activeTaskIds.size;
|
|
194
|
+
return total;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Wait for all currently active tasks across all lanes to finish.
|
|
198
|
+
* Polls at a short interval; resolves when no tasks are active or
|
|
199
|
+
* when `timeoutMs` elapses (whichever comes first).
|
|
200
|
+
*
|
|
201
|
+
* New tasks enqueued after this call are ignored — only tasks that are
|
|
202
|
+
* already executing are waited on.
|
|
203
|
+
*/
|
|
204
|
+
function waitForActiveTasks(timeoutMs) {
|
|
205
|
+
const POLL_INTERVAL_MS = 50;
|
|
206
|
+
const deadline = Date.now() + timeoutMs;
|
|
207
|
+
const activeAtStart = /* @__PURE__ */ new Set();
|
|
208
|
+
for (const state of lanes.values()) for (const taskId of state.activeTaskIds) activeAtStart.add(taskId);
|
|
209
|
+
return new Promise((resolve) => {
|
|
210
|
+
const check = () => {
|
|
211
|
+
if (activeAtStart.size === 0) {
|
|
212
|
+
resolve({ drained: true });
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
let hasPending = false;
|
|
216
|
+
for (const state of lanes.values()) {
|
|
217
|
+
for (const taskId of state.activeTaskIds) if (activeAtStart.has(taskId)) {
|
|
218
|
+
hasPending = true;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
if (hasPending) break;
|
|
222
|
+
}
|
|
223
|
+
if (!hasPending) {
|
|
224
|
+
resolve({ drained: true });
|
|
225
|
+
return;
|
|
226
|
+
}
|
|
227
|
+
if (Date.now() >= deadline) {
|
|
228
|
+
resolve({ drained: false });
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
setTimeout(check, POLL_INTERVAL_MS);
|
|
232
|
+
};
|
|
233
|
+
check();
|
|
234
|
+
});
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
//#endregion
|
|
238
|
+
//#region src/infra/restart-stale-pids.ts
|
|
239
|
+
const SPAWN_TIMEOUT_MS$1 = 2e3;
|
|
240
|
+
const STALE_SIGTERM_WAIT_MS = 600;
|
|
241
|
+
const STALE_SIGKILL_WAIT_MS = 400;
|
|
242
|
+
/**
|
|
243
|
+
* After SIGKILL, the kernel may not release the TCP port immediately.
|
|
244
|
+
* Poll until the port is confirmed free (or until the budget expires) before
|
|
245
|
+
* returning control to the caller (typically `triggerOpenClawRestart` →
|
|
246
|
+
* `systemctl restart`). Without this wait the new process races the dying
|
|
247
|
+
* process for the port and systemd enters an EADDRINUSE restart loop.
|
|
248
|
+
*
|
|
249
|
+
* POLL_SPAWN_TIMEOUT_MS is intentionally much shorter than SPAWN_TIMEOUT_MS
|
|
250
|
+
* so that a single slow or hung lsof invocation does not consume the entire
|
|
251
|
+
* polling budget. At 400 ms per call, up to five independent lsof attempts
|
|
252
|
+
* fit within PORT_FREE_TIMEOUT_MS = 2000 ms, each with a definitive outcome.
|
|
253
|
+
*/
|
|
254
|
+
const PORT_FREE_POLL_INTERVAL_MS = 50;
|
|
255
|
+
const PORT_FREE_TIMEOUT_MS = 2e3;
|
|
256
|
+
const POLL_SPAWN_TIMEOUT_MS = 400;
|
|
257
|
+
const restartLog$1 = createSubsystemLogger("restart");
|
|
258
|
+
let sleepSyncOverride = null;
|
|
259
|
+
let dateNowOverride = null;
|
|
260
|
+
function getTimeMs() {
|
|
261
|
+
return dateNowOverride ? dateNowOverride() : Date.now();
|
|
262
|
+
}
|
|
263
|
+
function sleepSync(ms) {
|
|
264
|
+
const timeoutMs = Math.max(0, Math.floor(ms));
|
|
265
|
+
if (timeoutMs <= 0) return;
|
|
266
|
+
if (sleepSyncOverride) {
|
|
267
|
+
sleepSyncOverride(timeoutMs);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
try {
|
|
271
|
+
const lock = new Int32Array(new SharedArrayBuffer(4));
|
|
272
|
+
Atomics.wait(lock, 0, 0, timeoutMs);
|
|
273
|
+
} catch {
|
|
274
|
+
const start = Date.now();
|
|
275
|
+
while (Date.now() - start < timeoutMs);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Parse openclaw gateway PIDs from lsof -Fpc stdout.
|
|
280
|
+
* Pure function — no I/O. Excludes the current process.
|
|
281
|
+
*/
|
|
282
|
+
function parsePidsFromLsofOutput(stdout) {
|
|
283
|
+
const pids = [];
|
|
284
|
+
let currentPid;
|
|
285
|
+
let currentCmd;
|
|
286
|
+
for (const line of stdout.split(/\r?\n/).filter(Boolean)) if (line.startsWith("p")) {
|
|
287
|
+
if (currentPid != null && currentCmd && currentCmd.toLowerCase().includes("openclaw")) pids.push(currentPid);
|
|
288
|
+
const parsed = Number.parseInt(line.slice(1), 10);
|
|
289
|
+
currentPid = Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
|
|
290
|
+
currentCmd = void 0;
|
|
291
|
+
} else if (line.startsWith("c")) currentCmd = line.slice(1);
|
|
292
|
+
if (currentPid != null && currentCmd && currentCmd.toLowerCase().includes("openclaw")) pids.push(currentPid);
|
|
293
|
+
return [...new Set(pids)].filter((pid) => pid !== process.pid);
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Find PIDs of gateway processes listening on the given port using synchronous lsof.
|
|
297
|
+
* Returns only PIDs that belong to openclaw gateway processes (not the current process).
|
|
298
|
+
*/
|
|
299
|
+
function findGatewayPidsOnPortSync(port, spawnTimeoutMs = SPAWN_TIMEOUT_MS$1) {
|
|
300
|
+
if (process.platform === "win32") return [];
|
|
301
|
+
const res = spawnSync(resolveLsofCommandSync(), [
|
|
302
|
+
"-nP",
|
|
303
|
+
`-iTCP:${port}`,
|
|
304
|
+
"-sTCP:LISTEN",
|
|
305
|
+
"-Fpc"
|
|
306
|
+
], {
|
|
307
|
+
encoding: "utf8",
|
|
308
|
+
timeout: spawnTimeoutMs
|
|
309
|
+
});
|
|
310
|
+
if (res.error) {
|
|
311
|
+
const code = res.error.code;
|
|
312
|
+
const detail = code && code.trim().length > 0 ? code : res.error instanceof Error ? res.error.message : "unknown error";
|
|
313
|
+
restartLog$1.warn(`lsof failed during initial stale-pid scan for port ${port}: ${detail}`);
|
|
314
|
+
return [];
|
|
315
|
+
}
|
|
316
|
+
if (res.status === 1) return [];
|
|
317
|
+
if (res.status !== 0) {
|
|
318
|
+
restartLog$1.warn(`lsof exited with status ${res.status} during initial stale-pid scan for port ${port}; skipping stale pid check`);
|
|
319
|
+
return [];
|
|
320
|
+
}
|
|
321
|
+
return parsePidsFromLsofOutput(res.stdout);
|
|
322
|
+
}
|
|
323
|
+
function pollPortOnce(port) {
|
|
324
|
+
try {
|
|
325
|
+
const res = spawnSync(resolveLsofCommandSync(), [
|
|
326
|
+
"-nP",
|
|
327
|
+
`-iTCP:${port}`,
|
|
328
|
+
"-sTCP:LISTEN",
|
|
329
|
+
"-Fpc"
|
|
330
|
+
], {
|
|
331
|
+
encoding: "utf8",
|
|
332
|
+
timeout: POLL_SPAWN_TIMEOUT_MS
|
|
333
|
+
});
|
|
334
|
+
if (res.error) {
|
|
335
|
+
const code = res.error.code;
|
|
336
|
+
return {
|
|
337
|
+
free: null,
|
|
338
|
+
permanent: code === "ENOENT" || code === "EACCES" || code === "EPERM"
|
|
339
|
+
};
|
|
340
|
+
}
|
|
341
|
+
if (res.status === 1) {
|
|
342
|
+
if (res.stdout) return parsePidsFromLsofOutput(res.stdout).length === 0 ? { free: true } : { free: false };
|
|
343
|
+
return { free: true };
|
|
344
|
+
}
|
|
345
|
+
if (res.status !== 0) return {
|
|
346
|
+
free: null,
|
|
347
|
+
permanent: false
|
|
348
|
+
};
|
|
349
|
+
return parsePidsFromLsofOutput(res.stdout).length === 0 ? { free: true } : { free: false };
|
|
350
|
+
} catch {
|
|
351
|
+
return {
|
|
352
|
+
free: null,
|
|
353
|
+
permanent: false
|
|
354
|
+
};
|
|
355
|
+
}
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Synchronously terminate stale gateway processes.
|
|
359
|
+
* Callers must pass a non-empty pids array.
|
|
360
|
+
* Sends SIGTERM, waits briefly, then SIGKILL for survivors.
|
|
361
|
+
*/
|
|
362
|
+
function terminateStaleProcessesSync(pids) {
|
|
363
|
+
const killed = [];
|
|
364
|
+
for (const pid of pids) try {
|
|
365
|
+
process.kill(pid, "SIGTERM");
|
|
366
|
+
killed.push(pid);
|
|
367
|
+
} catch {}
|
|
368
|
+
if (killed.length === 0) return killed;
|
|
369
|
+
sleepSync(STALE_SIGTERM_WAIT_MS);
|
|
370
|
+
for (const pid of killed) try {
|
|
371
|
+
process.kill(pid, 0);
|
|
372
|
+
process.kill(pid, "SIGKILL");
|
|
373
|
+
} catch {}
|
|
374
|
+
sleepSync(STALE_SIGKILL_WAIT_MS);
|
|
375
|
+
return killed;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Poll the given port until it is confirmed free, lsof is confirmed unavailable,
|
|
379
|
+
* or the wall-clock budget expires.
|
|
380
|
+
*
|
|
381
|
+
* Each poll invocation uses POLL_SPAWN_TIMEOUT_MS (400 ms), which is
|
|
382
|
+
* significantly shorter than PORT_FREE_TIMEOUT_MS (2000 ms). This ensures
|
|
383
|
+
* that a single slow or hung lsof call cannot consume the entire polling
|
|
384
|
+
* budget and cause the function to exit prematurely with an inconclusive
|
|
385
|
+
* result. Up to five independent lsof attempts fit within the budget.
|
|
386
|
+
*
|
|
387
|
+
* Exit conditions:
|
|
388
|
+
* - `pollPortOnce` returns `{ free: true }` → port confirmed free
|
|
389
|
+
* - `pollPortOnce` returns `{ free: null, permanent: true }` → lsof unavailable, bail
|
|
390
|
+
* - `pollPortOnce` returns `{ free: false }` → port busy, sleep + retry
|
|
391
|
+
* - `pollPortOnce` returns `{ free: null, permanent: false }` → transient error, sleep + retry
|
|
392
|
+
* - Wall-clock deadline exceeded → log warning, proceed anyway
|
|
393
|
+
*/
|
|
394
|
+
function waitForPortFreeSync(port) {
|
|
395
|
+
const deadline = getTimeMs() + PORT_FREE_TIMEOUT_MS;
|
|
396
|
+
while (getTimeMs() < deadline) {
|
|
397
|
+
const result = pollPortOnce(port);
|
|
398
|
+
if (result.free === true) return;
|
|
399
|
+
if (result.free === null && result.permanent) return;
|
|
400
|
+
sleepSync(PORT_FREE_POLL_INTERVAL_MS);
|
|
401
|
+
}
|
|
402
|
+
restartLog$1.warn(`port ${port} still in use after ${PORT_FREE_TIMEOUT_MS}ms; proceeding anyway`);
|
|
403
|
+
}
|
|
404
|
+
/**
|
|
405
|
+
* Inspect the gateway port and kill any stale gateway processes holding it.
|
|
406
|
+
* Blocks until the port is confirmed free (or the poll budget expires) so
|
|
407
|
+
* the supervisor (systemd / launchctl) does not race a zombie process for
|
|
408
|
+
* the port and enter an EADDRINUSE restart loop.
|
|
409
|
+
*
|
|
410
|
+
* Called before service restart commands to prevent port conflicts.
|
|
411
|
+
*/
|
|
412
|
+
function cleanStaleGatewayProcessesSync() {
|
|
413
|
+
try {
|
|
414
|
+
const port = resolveGatewayPort(void 0, process.env);
|
|
415
|
+
const stalePids = findGatewayPidsOnPortSync(port);
|
|
416
|
+
if (stalePids.length === 0) return [];
|
|
417
|
+
restartLog$1.warn(`killing ${stalePids.length} stale gateway process(es) before restart: ${stalePids.join(", ")}`);
|
|
418
|
+
const killed = terminateStaleProcessesSync(stalePids);
|
|
419
|
+
waitForPortFreeSync(port);
|
|
420
|
+
return killed;
|
|
421
|
+
} catch {
|
|
422
|
+
return [];
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/infra/restart.ts
|
|
428
|
+
const SPAWN_TIMEOUT_MS = 2e3;
|
|
429
|
+
const SIGUSR1_AUTH_GRACE_MS = 5e3;
|
|
430
|
+
const DEFAULT_DEFERRAL_POLL_MS = 500;
|
|
431
|
+
const DEFAULT_DEFERRAL_MAX_WAIT_MS = 3e4;
|
|
432
|
+
const RESTART_COOLDOWN_MS = 3e4;
|
|
433
|
+
const restartLog = createSubsystemLogger("restart");
|
|
434
|
+
let sigusr1AuthorizedCount = 0;
|
|
435
|
+
let sigusr1AuthorizedUntil = 0;
|
|
436
|
+
let sigusr1ExternalAllowed = false;
|
|
437
|
+
let preRestartCheck = null;
|
|
438
|
+
let restartCycleToken = 0;
|
|
439
|
+
let emittedRestartToken = 0;
|
|
440
|
+
let consumedRestartToken = 0;
|
|
441
|
+
let lastRestartEmittedAt = 0;
|
|
442
|
+
let pendingRestartTimer = null;
|
|
443
|
+
let pendingRestartDueAt = 0;
|
|
444
|
+
let pendingRestartReason;
|
|
445
|
+
function hasUnconsumedRestartSignal() {
|
|
446
|
+
return emittedRestartToken > consumedRestartToken;
|
|
447
|
+
}
|
|
448
|
+
function clearPendingScheduledRestart() {
|
|
449
|
+
if (pendingRestartTimer) clearTimeout(pendingRestartTimer);
|
|
450
|
+
pendingRestartTimer = null;
|
|
451
|
+
pendingRestartDueAt = 0;
|
|
452
|
+
pendingRestartReason = void 0;
|
|
453
|
+
}
|
|
454
|
+
function summarizeChangedPaths(paths, maxPaths = 6) {
|
|
455
|
+
if (!Array.isArray(paths) || paths.length === 0) return null;
|
|
456
|
+
if (paths.length <= maxPaths) return paths.join(",");
|
|
457
|
+
return `${paths.slice(0, maxPaths).join(",")},+${paths.length - maxPaths} more`;
|
|
458
|
+
}
|
|
459
|
+
function formatRestartAudit(audit) {
|
|
460
|
+
const actor = typeof audit?.actor === "string" && audit.actor.trim() ? audit.actor.trim() : null;
|
|
461
|
+
const deviceId = typeof audit?.deviceId === "string" && audit.deviceId.trim() ? audit.deviceId.trim() : null;
|
|
462
|
+
const clientIp = typeof audit?.clientIp === "string" && audit.clientIp.trim() ? audit.clientIp.trim() : null;
|
|
463
|
+
const changed = summarizeChangedPaths(audit?.changedPaths);
|
|
464
|
+
const fields = [];
|
|
465
|
+
if (actor) fields.push(`actor=${actor}`);
|
|
466
|
+
if (deviceId) fields.push(`device=${deviceId}`);
|
|
467
|
+
if (clientIp) fields.push(`ip=${clientIp}`);
|
|
468
|
+
if (changed) fields.push(`changedPaths=${changed}`);
|
|
469
|
+
return fields.length > 0 ? fields.join(" ") : "actor=<unknown>";
|
|
470
|
+
}
|
|
471
|
+
/**
|
|
472
|
+
* Register a callback that scheduleGatewaySigusr1Restart checks before emitting SIGUSR1.
|
|
473
|
+
* The callback should return the number of pending items (0 = safe to restart).
|
|
474
|
+
*/
|
|
475
|
+
function setPreRestartDeferralCheck(fn) {
|
|
476
|
+
preRestartCheck = fn;
|
|
477
|
+
}
|
|
478
|
+
/**
|
|
479
|
+
* Emit an authorized SIGUSR1 gateway restart, guarded against duplicate emissions.
|
|
480
|
+
* Returns true if SIGUSR1 was emitted, false if a restart was already emitted.
|
|
481
|
+
* Both scheduleGatewaySigusr1Restart and the config watcher should use this
|
|
482
|
+
* to ensure only one restart fires.
|
|
483
|
+
*/
|
|
484
|
+
function emitGatewayRestart() {
|
|
485
|
+
if (hasUnconsumedRestartSignal()) {
|
|
486
|
+
clearPendingScheduledRestart();
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
clearPendingScheduledRestart();
|
|
490
|
+
emittedRestartToken = ++restartCycleToken;
|
|
491
|
+
authorizeGatewaySigusr1Restart();
|
|
492
|
+
try {
|
|
493
|
+
if (process.listenerCount("SIGUSR1") > 0) process.emit("SIGUSR1");
|
|
494
|
+
else process.kill(process.pid, "SIGUSR1");
|
|
495
|
+
} catch {
|
|
496
|
+
emittedRestartToken = consumedRestartToken;
|
|
497
|
+
return false;
|
|
498
|
+
}
|
|
499
|
+
lastRestartEmittedAt = Date.now();
|
|
500
|
+
return true;
|
|
501
|
+
}
|
|
502
|
+
function resetSigusr1AuthorizationIfExpired(now = Date.now()) {
|
|
503
|
+
if (sigusr1AuthorizedCount <= 0) return;
|
|
504
|
+
if (now <= sigusr1AuthorizedUntil) return;
|
|
505
|
+
sigusr1AuthorizedCount = 0;
|
|
506
|
+
sigusr1AuthorizedUntil = 0;
|
|
507
|
+
}
|
|
508
|
+
function setGatewaySigusr1RestartPolicy(opts) {
|
|
509
|
+
sigusr1ExternalAllowed = opts?.allowExternal === true;
|
|
510
|
+
}
|
|
511
|
+
function isGatewaySigusr1RestartExternallyAllowed() {
|
|
512
|
+
return sigusr1ExternalAllowed;
|
|
513
|
+
}
|
|
514
|
+
function authorizeGatewaySigusr1Restart(delayMs = 0) {
|
|
515
|
+
const delay = Math.max(0, Math.floor(delayMs));
|
|
516
|
+
const expiresAt = Date.now() + delay + SIGUSR1_AUTH_GRACE_MS;
|
|
517
|
+
sigusr1AuthorizedCount += 1;
|
|
518
|
+
if (expiresAt > sigusr1AuthorizedUntil) sigusr1AuthorizedUntil = expiresAt;
|
|
519
|
+
}
|
|
520
|
+
function consumeGatewaySigusr1RestartAuthorization() {
|
|
521
|
+
resetSigusr1AuthorizationIfExpired();
|
|
522
|
+
if (sigusr1AuthorizedCount <= 0) return false;
|
|
523
|
+
sigusr1AuthorizedCount -= 1;
|
|
524
|
+
if (sigusr1AuthorizedCount <= 0) sigusr1AuthorizedUntil = 0;
|
|
525
|
+
return true;
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* Mark the currently emitted SIGUSR1 restart cycle as consumed by the run loop.
|
|
529
|
+
* This explicitly advances the cycle state instead of resetting emit guards inside
|
|
530
|
+
* consumeGatewaySigusr1RestartAuthorization().
|
|
531
|
+
*/
|
|
532
|
+
function markGatewaySigusr1RestartHandled() {
|
|
533
|
+
if (hasUnconsumedRestartSignal()) consumedRestartToken = emittedRestartToken;
|
|
534
|
+
}
|
|
535
|
+
/**
|
|
536
|
+
* Poll pending work until it drains (or times out), then emit one restart signal.
|
|
537
|
+
* Shared by both the direct RPC restart path and the config watcher path.
|
|
538
|
+
*/
|
|
539
|
+
function deferGatewayRestartUntilIdle(opts) {
|
|
540
|
+
const pollMsRaw = opts.pollMs ?? DEFAULT_DEFERRAL_POLL_MS;
|
|
541
|
+
const pollMs = Math.max(10, Math.floor(pollMsRaw));
|
|
542
|
+
const maxWaitMsRaw = opts.maxWaitMs ?? DEFAULT_DEFERRAL_MAX_WAIT_MS;
|
|
543
|
+
const maxWaitMs = Math.max(pollMs, Math.floor(maxWaitMsRaw));
|
|
544
|
+
let pending;
|
|
545
|
+
try {
|
|
546
|
+
pending = opts.getPendingCount();
|
|
547
|
+
} catch (err) {
|
|
548
|
+
opts.hooks?.onCheckError?.(err);
|
|
549
|
+
emitGatewayRestart();
|
|
550
|
+
return;
|
|
551
|
+
}
|
|
552
|
+
if (pending <= 0) {
|
|
553
|
+
opts.hooks?.onReady?.();
|
|
554
|
+
emitGatewayRestart();
|
|
555
|
+
return;
|
|
556
|
+
}
|
|
557
|
+
opts.hooks?.onDeferring?.(pending);
|
|
558
|
+
const startedAt = Date.now();
|
|
559
|
+
const poll = setInterval(() => {
|
|
560
|
+
let current;
|
|
561
|
+
try {
|
|
562
|
+
current = opts.getPendingCount();
|
|
563
|
+
} catch (err) {
|
|
564
|
+
clearInterval(poll);
|
|
565
|
+
opts.hooks?.onCheckError?.(err);
|
|
566
|
+
emitGatewayRestart();
|
|
567
|
+
return;
|
|
568
|
+
}
|
|
569
|
+
if (current <= 0) {
|
|
570
|
+
clearInterval(poll);
|
|
571
|
+
opts.hooks?.onReady?.();
|
|
572
|
+
emitGatewayRestart();
|
|
573
|
+
return;
|
|
574
|
+
}
|
|
575
|
+
const elapsedMs = Date.now() - startedAt;
|
|
576
|
+
if (elapsedMs >= maxWaitMs) {
|
|
577
|
+
clearInterval(poll);
|
|
578
|
+
opts.hooks?.onTimeout?.(current, elapsedMs);
|
|
579
|
+
emitGatewayRestart();
|
|
580
|
+
}
|
|
581
|
+
}, pollMs);
|
|
582
|
+
}
|
|
583
|
+
function formatSpawnDetail(result) {
|
|
584
|
+
const clean = (value) => {
|
|
585
|
+
return (typeof value === "string" ? value : value ? value.toString() : "").replace(/\s+/g, " ").trim();
|
|
586
|
+
};
|
|
587
|
+
if (result.error) {
|
|
588
|
+
if (result.error instanceof Error) return result.error.message;
|
|
589
|
+
if (typeof result.error === "string") return result.error;
|
|
590
|
+
try {
|
|
591
|
+
return JSON.stringify(result.error);
|
|
592
|
+
} catch {
|
|
593
|
+
return "unknown error";
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
const stderr = clean(result.stderr);
|
|
597
|
+
if (stderr) return stderr;
|
|
598
|
+
const stdout = clean(result.stdout);
|
|
599
|
+
if (stdout) return stdout;
|
|
600
|
+
if (typeof result.status === "number") return `exit ${result.status}`;
|
|
601
|
+
return "unknown error";
|
|
602
|
+
}
|
|
603
|
+
function normalizeSystemdUnit(raw, profile) {
|
|
604
|
+
const unit = raw?.trim();
|
|
605
|
+
if (!unit) return `${resolveGatewaySystemdServiceName(profile)}.service`;
|
|
606
|
+
return unit.endsWith(".service") ? unit : `${unit}.service`;
|
|
607
|
+
}
|
|
608
|
+
function triggerOpenClawRestart() {
|
|
609
|
+
if (process.env.VITEST || false) return {
|
|
610
|
+
ok: true,
|
|
611
|
+
method: "supervisor",
|
|
612
|
+
detail: "test mode"
|
|
613
|
+
};
|
|
614
|
+
cleanStaleGatewayProcessesSync();
|
|
615
|
+
const tried = [];
|
|
616
|
+
if (process.platform !== "darwin") {
|
|
617
|
+
if (process.platform === "linux") {
|
|
618
|
+
const unit = normalizeSystemdUnit(process.env.OPENCLAW_SYSTEMD_UNIT, process.env.OPENCLAW_PROFILE);
|
|
619
|
+
const userArgs = [
|
|
620
|
+
"--user",
|
|
621
|
+
"restart",
|
|
622
|
+
unit
|
|
623
|
+
];
|
|
624
|
+
tried.push(`systemctl ${userArgs.join(" ")}`);
|
|
625
|
+
const userRestart = spawnSync("systemctl", userArgs, {
|
|
626
|
+
encoding: "utf8",
|
|
627
|
+
timeout: SPAWN_TIMEOUT_MS
|
|
628
|
+
});
|
|
629
|
+
if (!userRestart.error && userRestart.status === 0) return {
|
|
630
|
+
ok: true,
|
|
631
|
+
method: "systemd",
|
|
632
|
+
tried
|
|
633
|
+
};
|
|
634
|
+
const systemArgs = ["restart", unit];
|
|
635
|
+
tried.push(`systemctl ${systemArgs.join(" ")}`);
|
|
636
|
+
const systemRestart = spawnSync("systemctl", systemArgs, {
|
|
637
|
+
encoding: "utf8",
|
|
638
|
+
timeout: SPAWN_TIMEOUT_MS
|
|
639
|
+
});
|
|
640
|
+
if (!systemRestart.error && systemRestart.status === 0) return {
|
|
641
|
+
ok: true,
|
|
642
|
+
method: "systemd",
|
|
643
|
+
tried
|
|
644
|
+
};
|
|
645
|
+
return {
|
|
646
|
+
ok: false,
|
|
647
|
+
method: "systemd",
|
|
648
|
+
detail: [`user: ${formatSpawnDetail(userRestart)}`, `system: ${formatSpawnDetail(systemRestart)}`].join("; "),
|
|
649
|
+
tried
|
|
650
|
+
};
|
|
651
|
+
}
|
|
652
|
+
return {
|
|
653
|
+
ok: false,
|
|
654
|
+
method: "supervisor",
|
|
655
|
+
detail: "unsupported platform restart"
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
const label = process.env.OPENCLAW_LAUNCHD_LABEL || resolveGatewayLaunchAgentLabel(process.env.OPENCLAW_PROFILE);
|
|
659
|
+
const uid = typeof process.getuid === "function" ? process.getuid() : void 0;
|
|
660
|
+
const domain = uid !== void 0 ? `gui/${uid}` : "gui/501";
|
|
661
|
+
const target = `${domain}/${label}`;
|
|
662
|
+
const args = [
|
|
663
|
+
"kickstart",
|
|
664
|
+
"-k",
|
|
665
|
+
target
|
|
666
|
+
];
|
|
667
|
+
tried.push(`launchctl ${args.join(" ")}`);
|
|
668
|
+
const res = spawnSync("launchctl", args, {
|
|
669
|
+
encoding: "utf8",
|
|
670
|
+
timeout: SPAWN_TIMEOUT_MS
|
|
671
|
+
});
|
|
672
|
+
if (!res.error && res.status === 0) return {
|
|
673
|
+
ok: true,
|
|
674
|
+
method: "launchctl",
|
|
675
|
+
tried
|
|
676
|
+
};
|
|
677
|
+
const home = process.env.HOME?.trim() || os.homedir();
|
|
678
|
+
const bootstrapArgs = [
|
|
679
|
+
"bootstrap",
|
|
680
|
+
domain,
|
|
681
|
+
path.join(home, "Library", "LaunchAgents", `${label}.plist`)
|
|
682
|
+
];
|
|
683
|
+
tried.push(`launchctl ${bootstrapArgs.join(" ")}`);
|
|
684
|
+
const boot = spawnSync("launchctl", bootstrapArgs, {
|
|
685
|
+
encoding: "utf8",
|
|
686
|
+
timeout: SPAWN_TIMEOUT_MS
|
|
687
|
+
});
|
|
688
|
+
if (boot.error || boot.status !== 0 && boot.status !== null) return {
|
|
689
|
+
ok: false,
|
|
690
|
+
method: "launchctl",
|
|
691
|
+
detail: formatSpawnDetail(boot),
|
|
692
|
+
tried
|
|
693
|
+
};
|
|
694
|
+
const retryArgs = [
|
|
695
|
+
"kickstart",
|
|
696
|
+
"-k",
|
|
697
|
+
target
|
|
698
|
+
];
|
|
699
|
+
tried.push(`launchctl ${retryArgs.join(" ")}`);
|
|
700
|
+
const retry = spawnSync("launchctl", retryArgs, {
|
|
701
|
+
encoding: "utf8",
|
|
702
|
+
timeout: SPAWN_TIMEOUT_MS
|
|
703
|
+
});
|
|
704
|
+
if (!retry.error && retry.status === 0) return {
|
|
705
|
+
ok: true,
|
|
706
|
+
method: "launchctl",
|
|
707
|
+
tried
|
|
708
|
+
};
|
|
709
|
+
return {
|
|
710
|
+
ok: false,
|
|
711
|
+
method: "launchctl",
|
|
712
|
+
detail: formatSpawnDetail(retry),
|
|
713
|
+
tried
|
|
714
|
+
};
|
|
715
|
+
}
|
|
716
|
+
function scheduleGatewaySigusr1Restart(opts) {
|
|
717
|
+
const delayMsRaw = typeof opts?.delayMs === "number" && Number.isFinite(opts.delayMs) ? Math.floor(opts.delayMs) : 2e3;
|
|
718
|
+
const delayMs = Math.min(Math.max(delayMsRaw, 0), 6e4);
|
|
719
|
+
const reason = typeof opts?.reason === "string" && opts.reason.trim() ? opts.reason.trim().slice(0, 200) : void 0;
|
|
720
|
+
const mode = process.listenerCount("SIGUSR1") > 0 ? "emit" : "signal";
|
|
721
|
+
const nowMs = Date.now();
|
|
722
|
+
const cooldownMsApplied = Math.max(0, lastRestartEmittedAt + RESTART_COOLDOWN_MS - nowMs);
|
|
723
|
+
const requestedDueAt = nowMs + delayMs + cooldownMsApplied;
|
|
724
|
+
if (hasUnconsumedRestartSignal()) {
|
|
725
|
+
restartLog.warn(`restart request coalesced (already in-flight) reason=${reason ?? "unspecified"} ${formatRestartAudit(opts?.audit)}`);
|
|
726
|
+
return {
|
|
727
|
+
ok: true,
|
|
728
|
+
pid: process.pid,
|
|
729
|
+
signal: "SIGUSR1",
|
|
730
|
+
delayMs: 0,
|
|
731
|
+
reason,
|
|
732
|
+
mode,
|
|
733
|
+
coalesced: true,
|
|
734
|
+
cooldownMsApplied
|
|
735
|
+
};
|
|
736
|
+
}
|
|
737
|
+
if (pendingRestartTimer) {
|
|
738
|
+
const remainingMs = Math.max(0, pendingRestartDueAt - nowMs);
|
|
739
|
+
if (requestedDueAt < pendingRestartDueAt) {
|
|
740
|
+
restartLog.warn(`restart request rescheduled earlier reason=${reason ?? "unspecified"} pendingReason=${pendingRestartReason ?? "unspecified"} oldDelayMs=${remainingMs} newDelayMs=${Math.max(0, requestedDueAt - nowMs)} ${formatRestartAudit(opts?.audit)}`);
|
|
741
|
+
clearPendingScheduledRestart();
|
|
742
|
+
} else {
|
|
743
|
+
restartLog.warn(`restart request coalesced (already scheduled) reason=${reason ?? "unspecified"} pendingReason=${pendingRestartReason ?? "unspecified"} delayMs=${remainingMs} ${formatRestartAudit(opts?.audit)}`);
|
|
744
|
+
return {
|
|
745
|
+
ok: true,
|
|
746
|
+
pid: process.pid,
|
|
747
|
+
signal: "SIGUSR1",
|
|
748
|
+
delayMs: remainingMs,
|
|
749
|
+
reason,
|
|
750
|
+
mode,
|
|
751
|
+
coalesced: true,
|
|
752
|
+
cooldownMsApplied
|
|
753
|
+
};
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
pendingRestartDueAt = requestedDueAt;
|
|
757
|
+
pendingRestartReason = reason;
|
|
758
|
+
pendingRestartTimer = setTimeout(() => {
|
|
759
|
+
pendingRestartTimer = null;
|
|
760
|
+
pendingRestartDueAt = 0;
|
|
761
|
+
pendingRestartReason = void 0;
|
|
762
|
+
const pendingCheck = preRestartCheck;
|
|
763
|
+
if (!pendingCheck) {
|
|
764
|
+
emitGatewayRestart();
|
|
765
|
+
return;
|
|
766
|
+
}
|
|
767
|
+
deferGatewayRestartUntilIdle({ getPendingCount: pendingCheck });
|
|
768
|
+
}, Math.max(0, requestedDueAt - nowMs));
|
|
769
|
+
return {
|
|
770
|
+
ok: true,
|
|
771
|
+
pid: process.pid,
|
|
772
|
+
signal: "SIGUSR1",
|
|
773
|
+
delayMs: Math.max(0, requestedDueAt - nowMs),
|
|
774
|
+
reason,
|
|
775
|
+
mode,
|
|
776
|
+
coalesced: false,
|
|
777
|
+
cooldownMsApplied
|
|
778
|
+
};
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
//#endregion
|
|
782
|
+
export { setCommandLaneConcurrency as _, markGatewaySigusr1RestartHandled as a, setPreRestartDeferralCheck as c, enqueueCommandInLane as d, getActiveTaskCount as f, resetAllLanes as g, markGatewayDraining as h, isGatewaySigusr1RestartExternallyAllowed as i, triggerOpenClawRestart as l, getTotalQueueSize as m, deferGatewayRestartUntilIdle as n, scheduleGatewaySigusr1Restart as o, getQueueSize as p, emitGatewayRestart as r, setGatewaySigusr1RestartPolicy as s, consumeGatewaySigusr1RestartAuthorization as t, clearCommandLane as u, waitForActiveTasks as v, CommandLane as y };
|