@hanzo/bot 2026.3.7 → 2026.3.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (450) hide show
  1. package/dist/{accounts-D-CXitCL.js → accounts-BVV0eCmx.js} +2 -2
  2. package/dist/{accounts-Da-TWEIc.js → accounts-C04lw_uh.js} +4 -4
  3. package/dist/{accounts-DRUpcCkN.js → accounts-CtzU1wJb.js} +2 -2
  4. package/dist/{acp-cli-DYkqqqaJ.js → acp-cli-CDUVvPjD.js} +28 -24
  5. package/dist/{active-listener-DlziGqIg.js → active-listener-NprMzFx6.js} +2 -2
  6. package/dist/{agent-scope-C5bklqr1.js → agent-scope-BcruZHHR.js} +5 -5
  7. package/dist/{agents-CH9da9zi.js → agents-D8rH1P3g.js} +20 -19
  8. package/dist/{agents.config-BQ8I8wuY.js → agents.config-OuZqDEe6.js} +4 -4
  9. package/dist/{api-0IJLBHQk.js → api-Bgrt1pfd.js} +1 -1
  10. package/dist/{api-key-rotation-DuxfwUin.js → api-key-rotation-C0toONXd.js} +2 -2
  11. package/dist/{audio-preflight-CpAXC_Ct.js → audio-preflight-BEc8i-bS.js} +4 -4
  12. package/dist/{audio-preflight-BnfuyvxO.js → audio-preflight-D_s-peid.js} +4 -4
  13. package/dist/audio-preflight-d9iZknwY.js +102 -0
  14. package/dist/{audio-transcription-runner-GcMnO6sT.js → audio-transcription-runner-BePCnZfw.js} +1 -1
  15. package/dist/{audio-transcription-runner-CAOjjGxN.js → audio-transcription-runner-X1KzI7dF.js} +1 -1
  16. package/dist/{audio-transcription-runner-DCsEpXgz.js → audio-transcription-runner-bvBQs8UB.js} +13 -13
  17. package/dist/{audit-DCJbont3.js → audit-BWNRwu8g.js} +28 -28
  18. package/dist/{audit-membership-runtime-BIZ4bigJ.js → audit-membership-runtime-Bki8LzkA.js} +7 -6
  19. package/dist/{auth-CqlFkBrB.js → auth-CWHo884l.js} +5 -5
  20. package/dist/{auth-choice-9obtL17m.js → auth-choice-DUtpqOiw.js} +25 -22
  21. package/dist/{auth-choice-w2mL3d_M.js → auth-choice-n72qSpix.js} +15 -14
  22. package/dist/{auth-choice-options-DMoNPDm6.js → auth-choice-options-D13GahL8.js} +1 -1
  23. package/dist/{auth-choice-prompt-Btp8AqFI.js → auth-choice-prompt-8z7z_AUr.js} +1 -1
  24. package/dist/{auth-choice.apply-helpers-JU7nAiWC.js → auth-choice.apply-helpers-DMhFdoYH.js} +3 -3
  25. package/dist/{auth-mode-policy-slU2Nkgr.js → auth-mode-policy-BopOhrK8.js} +1 -1
  26. package/dist/{auth-profiles-BCHBDrea.js → auth-profiles-BtxyXCZY.js} +48 -925
  27. package/dist/{auth-token-BfzDARSk.js → auth-token-zcumGtdt.js} +3 -3
  28. package/dist/{banner-C4sx0Vaf.js → banner-C1G_GtAz.js} +3 -3
  29. package/dist/{bonjour-discovery-CzNIGZ7K.js → bonjour-discovery-C1SH2QqR.js} +3 -3
  30. package/dist/{browser-cli-qPNZkfDX.js → browser-cli-Bd81bwqM.js} +36 -32
  31. package/dist/build-info.json +3 -3
  32. package/dist/bundled/boot-md/handler.js +6 -6
  33. package/dist/bundled/session-memory/handler.js +6 -6
  34. package/dist/{call-C4z2LJrI.js → call-DL23sPxF.js} +9 -8
  35. package/dist/canvas-host/a2ui/.bundle.hash +1 -1
  36. package/dist/{channel-account-context-DyLW8OD1.js → channel-account-context-DGbGZhGz.js} +3 -3
  37. package/dist/{channel-activity-Bch3Rz78.js → channel-activity-DItBzFyQ.js} +3 -3
  38. package/dist/{channel-options-ChtPFPQx.js → channel-options-DU65sVdF.js} +4 -4
  39. package/dist/{channel-selection-CXz2aSCs.js → channel-selection-BnXQH0vV.js} +2 -2
  40. package/dist/{channel-web-Bok0lFvq.js → channel-web-BbWnfun7.js} +25 -24
  41. package/dist/{channels-cli-B5oDUpEB.js → channels-cli-B8LCe0vu.js} +142 -135
  42. package/dist/{channels-status-issues-BAy-21Cb.js → channels-status-issues-DXNaEL8i.js} +1 -1
  43. package/dist/{chrome--CFg5C_H.js → chrome-B24-8NDM.js} +8 -8
  44. package/dist/{chrome-jCt9JCU8.js → chrome-C7OwLtx9.js} +8 -8
  45. package/dist/{chrome-TWq_09_a.js → chrome-D4EfbMKb.js} +7 -7
  46. package/dist/{clack-prompter-0Rux0QKP.js → clack-prompter-CNKAp_jq.js} +5 -5
  47. package/dist/clawbot-cli-Bv8oZgvA.js +36 -0
  48. package/dist/cli/daemon-cli.js +1 -1
  49. package/dist/cli-DXbYdTNH.js +162 -0
  50. package/dist/{client-DWdu7Vc_.js → client-Bvvecv3V.js} +25 -142
  51. package/dist/{clipboard-Bfhk9cp3.js → clipboard-DwO9zZBK.js} +1 -1
  52. package/dist/{cloud-connect-BERMG0cQ.js → cloud-connect-CknfBF39.js} +89 -52
  53. package/dist/cloud-launch-7mm4ZKXy.js +172 -0
  54. package/dist/{command-poll-backoff.runtime-COz7plyi.js → command-poll-backoff.runtime-ClRAZFDL.js} +1 -1
  55. package/dist/{command-registry-DTMuq-Fw.js → command-registry-CTaJSsqV.js} +11 -11
  56. package/dist/{command-secret-targets-B2OuvZQf.js → command-secret-targets-C382v6Qd.js} +6 -6
  57. package/dist/{commands-BAjCW6P6.js → commands-BoGUirwW.js} +2 -2
  58. package/dist/{commands-registry-bwa5zMJ1.js → commands-registry-Dn_5_JYs.js} +6 -6
  59. package/dist/{compact-CenE94cW.js → compact-CuLMew-8.js} +141 -910
  60. package/dist/{completion-cli-spiS5-xU.js → completion-cli-CixfDHo4.js} +6 -6
  61. package/dist/{config-cli-w-RlQ3jB.js → config-cli-Bu2Eakz-.js} +22 -19
  62. package/dist/{config-guard-rlTIXCSD.js → config-guard-Bt2BdsMd.js} +5 -5
  63. package/dist/{config-validation-B3rr-h3d.js → config-validation-WdHwRX05.js} +6 -6
  64. package/dist/{configure-YxPFskRy.js → configure-ClIJiVqS.js} +32 -31
  65. package/dist/{control-ui-assets-CvLJNwEr.js → control-ui-assets-Co9rmXkB.js} +3 -3
  66. package/dist/{credentials-DVX7Krq5.js → credentials-SIFZMlmo.js} +1 -1
  67. package/dist/{cron-cli-DI9DN0vu.js → cron-cli-DR13ajr7.js} +32 -28
  68. package/dist/{daemon-cli-OBRBnIhu.js → daemon-cli-C6ZVajFI.js} +28 -28
  69. package/dist/{daemon-install-CGk2QyeB.js → daemon-install-DsDcMh2v.js} +43 -39
  70. package/dist/{daemon-install-helpers-C1QLEGFF.js → daemon-install-helpers-BtOiCRD1.js} +7 -35
  71. package/dist/{deliver-DPkEY6xb.js → deliver-Bge0HwrF.js} +13 -13
  72. package/dist/{deliver-BVtVDxwX.js → deliver-D8dBbzpu.js} +1 -1
  73. package/dist/{deliver-DmfS4khs.js → deliver-DudaV86i.js} +1 -1
  74. package/dist/{deliver-runtime-G0G5orrZ.js → deliver-runtime-C76IMU4W.js} +3 -3
  75. package/dist/{deliver-runtime-PxJvVUhh.js → deliver-runtime-qDmQqiF-.js} +3 -3
  76. package/dist/deliver-runtime-s0eLCemL.js +63 -0
  77. package/dist/{delivery-queue-DgdE_Ifa.js → delivery-queue-BVKd_xSI.js} +1 -1
  78. package/dist/deps-send-discord.runtime-C8HKp3uO.js +37 -0
  79. package/dist/deps-send-imessage.runtime-ECy162Cs.js +36 -0
  80. package/dist/deps-send-signal.runtime-XbioSg-_.js +35 -0
  81. package/dist/deps-send-slack.runtime-BM7Vp8vX.js +33 -0
  82. package/dist/deps-send-telegram.runtime-IFD4dAk7.js +39 -0
  83. package/dist/deps-send-whatsapp.runtime-BHuShWkA.js +124 -0
  84. package/dist/{deps-send-whatsapp.runtime-CrzuaVhC.js → deps-send-whatsapp.runtime-Cq-TLsJw.js} +7 -7
  85. package/dist/{deps-send-whatsapp.runtime-8bLqjmui.js → deps-send-whatsapp.runtime-Cv_awFtm.js} +7 -7
  86. package/dist/device-identity-DtdLP7QQ.js +148 -0
  87. package/dist/{devices-cli-C7xKmiR9.js → devices-cli-DZRtpqol.js} +25 -21
  88. package/dist/{diagnostic-DCevSIi3.js → diagnostic-CXxZq_XY.js} +3 -3
  89. package/dist/{diagnostics-vhe8iPOe.js → diagnostics-GQuagqCt.js} +1 -1
  90. package/dist/{directory-cli-BrLvL2oD.js → directory-cli-Tqim_rB9.js} +24 -21
  91. package/dist/{dns-cli-Dcytc0em.js → dns-cli-AcAZnW-T.js} +19 -16
  92. package/dist/{dock-D1Nz-RwP.js → dock-nMBfeGKa.js} +7 -7
  93. package/dist/{docs-cli-CjnLrTzs.js → docs-cli-C6mNYtxD.js} +17 -16
  94. package/dist/{doctor-completion-BKaFgAAN.js → doctor-completion-Dg6AJY6Q.js} +4 -4
  95. package/dist/{doctor-config-flow-Bp3eehAS.js → doctor-config-flow-CKY6Mr3X.js} +19 -19
  96. package/dist/{enable-pUSco1cm.js → enable-BWraNcrd.js} +2 -2
  97. package/dist/entry.js +6 -5
  98. package/dist/{errors-Dh5KARaE.js → errors-ClLWB67m.js} +1 -1
  99. package/dist/{exec-B45rafWZ.js → exec-B8Hv4Nkd.js} +1 -1
  100. package/dist/{exec-approvals-B5leCM6K.js → exec-approvals-Bh1osORd.js} +1 -1
  101. package/dist/{exec-approvals-allowlist-CSlk-iUy.js → exec-approvals-allowlist-dlIMsRq0.js} +1 -1
  102. package/dist/{exec-approvals-cli-B722kWhJ.js → exec-approvals-cli-B2V935Or.js} +33 -29
  103. package/dist/{exec-safe-bin-runtime-policy-C4OXhXIe.js → exec-safe-bin-runtime-policy-Ds-cMyOt.js} +2 -2
  104. package/dist/extensionAPI.js +6 -6
  105. package/dist/{fetch-COQIeEVX.js → fetch-BPh3R9xH.js} +3 -3
  106. package/dist/{fetch-TlhZeXdg.js → fetch-DyJnPUwL.js} +1 -1
  107. package/dist/{fetch-guard-BiNciKHu.js → fetch-guard-hL-C2yQz.js} +3 -3
  108. package/dist/{frontmatter-BIwJR052.js → frontmatter-B0viix_h.js} +2 -2
  109. package/dist/{fs-safe-DtMJsayp.js → fs-safe-CFIinCN2.js} +3 -3
  110. package/dist/gateway-cli-DjWebqxe.js +1436 -0
  111. package/dist/{gateway-install-token-tifgQqTq.js → gateway-install-token-olAkdWwV.js} +6 -6
  112. package/dist/gateway-lock-DNpln_70.js +192 -0
  113. package/dist/{gateway-rpc--AYNXZQF.js → gateway-rpc-B37zbuoK.js} +3 -3
  114. package/dist/{github-copilot-token-Byc_YVYE.js → github-copilot-token-BKQ4nXAw.js} +2 -23
  115. package/dist/{gmail-setup-utils-B1wEc-nz.js → gmail-setup-utils-DuoBM8ed.js} +3 -3
  116. package/dist/{health-DTtmaQPz.js → health-Cs-k6kLT.js} +18 -16
  117. package/dist/{helpers-CIEbwEWl.js → helpers-DDBxLojl.js} +1 -1
  118. package/dist/{hooks-cli-DJDBpL-Z.js → hooks-cli-Zqdxhm6M.js} +123 -116
  119. package/dist/{hooks-status-CFT0VML6.js → hooks-status-DqCwY9M6.js} +4 -4
  120. package/dist/{image-DSK1hSSV.js → image-BOybyCis.js} +1 -1
  121. package/dist/{image-DFnt4Uwg.js → image-m1GU1uco.js} +7 -7
  122. package/dist/{image-BdZcUz8M.js → image-nUHQF6BX.js} +1 -1
  123. package/dist/{image-ops-DBPCaLYI.js → image-ops-Bnk-bI_x.js} +1 -1
  124. package/dist/{image-runtime-ueqmfx1a.js → image-runtime-B5M_-diF.js} +3 -3
  125. package/dist/image-runtime-CesErRak.js +57 -0
  126. package/dist/{image-runtime-xqxW2PQA.js → image-runtime-y4msd5bn.js} +3 -3
  127. package/dist/{inspect-BVm4U2OP.js → inspect-CMuOPXUf.js} +2 -2
  128. package/dist/{install-safe-path-Df97RWiJ.js → install-safe-path-BxdyoAni.js} +3 -3
  129. package/dist/{installs-BGMsioU1.js → installs-c4kWJSG4.js} +8 -8
  130. package/dist/ip-C7WWCRN7.js +204 -0
  131. package/dist/{ipv4-Difv_P0_.js → ipv4-DcjwXncJ.js} +2 -2
  132. package/dist/{ir-CaGizvli.js → ir-BjnGKA2N.js} +8 -8
  133. package/dist/{issue-format-DjqrcimU.js → issue-format-BMPYbT1P.js} +1 -1
  134. package/dist/json-file-CNp4GTiH.js +25 -0
  135. package/dist/{lifecycle-core-BXWGDU3R.js → lifecycle-core-fN_BonzB.js} +10 -10
  136. package/dist/{links-C7eMwu1P.js → links-DZZ9QxWA.js} +1 -1
  137. package/dist/llm-slug-generator.js +6 -6
  138. package/dist/local-launch-C2RER-G3.js +126 -0
  139. package/dist/{logger-DB-PHqB2.js → logger-DyQjakwH.js} +2 -1
  140. package/dist/{logging-CS4C9VwV.js → logging--bXnY6uw.js} +1 -1
  141. package/dist/{login-B8HwtO61.js → login-DTK-M8Is.js} +6 -6
  142. package/dist/{login-qr-amd1X6Dw.js → login-qr-CmnyPjTv.js} +29 -16
  143. package/dist/{logs-cli-BH8DNgo2.js → logs-cli-BSlzurlM.js} +27 -23
  144. package/dist/machine-name-BWZ0tBHk.js +41 -0
  145. package/dist/{manager-BYSXh-I3.js → manager-BVqjeGyT.js} +11 -11
  146. package/dist/manager-runtime-CBdUM6c8.js +27 -0
  147. package/dist/{manifest-registry-9oWnIuht.js → manifest-registry-m_hXBIk-.js} +4 -4
  148. package/dist/{memory-cli-C6ocXZHW.js → memory-cli-yvsbLFgi.js} +15 -14
  149. package/dist/{message-channel-7mpcAPwa.js → message-channel-DOpIvru6.js} +34 -2
  150. package/dist/{model-catalog-B3fDLVsV.js → model-catalog-DtjVcDuN.js} +11 -5
  151. package/dist/{model-picker-V0gt2kzq.js → model-picker-oa-NsQXX.js} +5 -4
  152. package/dist/{models-D9CovevI.js → models-Bi78FQeE.js} +26 -25
  153. package/dist/{models-cli-CQBq_lri.js → models-cli-DUkH_80R.js} +126 -119
  154. package/dist/{models-config-Tnpb1ctj.js → models-config-D_IvpQGa.js} +3 -2
  155. package/dist/{node-cli-Cy9sSHy5.js → node-cli-B1iGQlR9.js} +61 -54
  156. package/dist/{node-command-policy-C9mK2tft.js → node-command-policy-CeKPGmlP.js} +2 -2
  157. package/dist/node-commands-sMomb3e1.js +20 -0
  158. package/dist/{node-service-DB36GYv5.js → node-service-BLMp6VWJ.js} +2 -2
  159. package/dist/{nodes-cli-DEtlooE3.js → nodes-cli-CD9qv7k5.js} +39 -35
  160. package/dist/{nodes-screen-DmJ2G431.js → nodes-screen-X8daVm8e.js} +5 -5
  161. package/dist/{note-DI9vedAF.js → note-C3wyXRP2.js} +2 -2
  162. package/dist/{npm-pack-install-_OjtFm2J.js → npm-pack-install-B0X6q-Co.js} +3 -3
  163. package/dist/{npm-resolution-DzmQqopk.js → npm-resolution-CavQ2ST5.js} +5 -5
  164. package/dist/{oauth-env-DKoO0B8-.js → oauth-env-9SRuwpTK.js} +1 -1
  165. package/dist/{oauth-tls-preflight-Dzh0FiLy.js → oauth-tls-preflight-C_9v9ytQ.js} +2 -2
  166. package/dist/{onboard-B_1mmscr.js → onboard-Dgav6iT6.js} +17 -17
  167. package/dist/{onboard-auth.credentials-CtuA7DuT.js → onboard-auth.credentials-CMsut-0h.js} +4 -3
  168. package/dist/{onboard-channels-C1ZeD4r3.js → onboard-channels-oAN4ja4v.js} +26 -25
  169. package/dist/{onboard-custom-BU2l3aiF.js → onboard-custom-B3RIFmaw.js} +7 -7
  170. package/dist/{onboard-helpers-Dtu3-e93.js → onboard-helpers-BkwNJPNU.js} +12 -12
  171. package/dist/{onboard-hooks-w-a3FVVK.js → onboard-hooks-BRCGmt7Q.js} +12 -11
  172. package/dist/{onboard-remote-C-HD7hQU.js → onboard-remote-CE5v5J2R.js} +5 -5
  173. package/dist/{onboard-skills-DvgdlwqH.js → onboard-skills-DD5L2MsA.js} +5 -5
  174. package/dist/{onboarding-DozRyXTe.js → onboarding-gbgi-zx9.js} +23 -23
  175. package/dist/{onboarding.finalize-BfSNnhpS.js → onboarding.finalize-dk1j3ozb.js} +135 -128
  176. package/dist/{onboarding.gateway-config-C02W81hD.js → onboarding.gateway-config-DNQfWDVc.js} +39 -34
  177. package/dist/{onboarding.secret-input-BO32ZliB.js → onboarding.secret-input-BDId1_5K.js} +2 -2
  178. package/dist/{openai-codex-model-default-gJryyHmS.js → openai-codex-model-default-EWrFsdir.js} +5 -5
  179. package/dist/{openai-model-default-D2LuX7D-.js → openai-model-default-CcOzYsIQ.js} +3 -3
  180. package/dist/{outbound-CXQEMm6n.js → outbound-DCuHHD3G.js} +8 -8
  181. package/dist/{outbound-attachment-D7sOzAQn.js → outbound-attachment-Bm82Qbyl.js} +3 -3
  182. package/dist/{pairing-cli-BkbpM3Mt.js → pairing-cli-dXCvRk1U.js} +23 -20
  183. package/dist/{pairing-labels-CjKrz2C9.js → pairing-labels-B_3GjgjR.js} +1 -1
  184. package/dist/{pairing-store-nyK6CFoT.js → pairing-store-CXFEv3Gr.js} +5 -5
  185. package/dist/{pairing-token-Tb0YsOGr.js → pairing-token-BIAdQuAM.js} +1 -1
  186. package/dist/{path-alias-guards-CUaIvLOE.js → path-alias-guards-Bz8AnRb7.js} +1 -1
  187. package/dist/{path-env-LTMy-Xkk.js → path-env-CgmdxEc7.js} +1 -1
  188. package/dist/{path-safety-DwIbN_B2.js → path-safety-EkGa1GqP.js} +1 -1
  189. package/dist/{paths-Dr0uMr7v.js → paths-BBXgPm_n.js} +2 -2
  190. package/dist/{paths-0GcCtgXm.js → paths-gTdorMgW.js} +1 -1
  191. package/dist/{pi-embedded-DBn841N-.js → pi-embedded-BHXPs-Ix.js} +24 -24
  192. package/dist/{pi-embedded-DYc6emwb.js → pi-embedded-DvWHP6Nn.js} +24 -24
  193. package/dist/{pi-embedded-helpers-BMC2HFyB.js → pi-embedded-helpers-CCkKNz_h.js} +5 -5
  194. package/dist/{pi-embedded-helpers-DLm1Mtr2.js → pi-embedded-helpers-Ck1qEeMH.js} +3 -3
  195. package/dist/{pi-embedded-helpers-BtnBVL-4.js → pi-embedded-helpers-xIXwvwuE.js} +3 -3
  196. package/dist/{pi-model-discovery-BUP6uy2Q.js → pi-model-discovery-6_opNECD.js} +2 -1
  197. package/dist/pi-model-discovery-runtime-8K2F-Fkl.js +20 -0
  198. package/dist/{pi-tools.before-tool-call.runtime-r5_UoU-W.js → pi-tools.before-tool-call.runtime-BrFKAhWX.js} +16 -13
  199. package/dist/{pi-tools.policy-C_cbrlt5.js → pi-tools.policy-U1G3dAzL.js} +9 -9
  200. package/dist/{plugin-auto-enable-DdGdWKDo.js → plugin-auto-enable-3v7X3qMK.js} +6 -6
  201. package/dist/{plugin-registry-FdOZQF3c.js → plugin-registry-Brz1ypl9.js} +5 -5
  202. package/dist/{plugins-D3Wuignn.js → plugins-CCkC0dRo.js} +7 -6
  203. package/dist/{plugins-cli-CV4ilsn4.js → plugins-cli-DGfFRLeo.js} +123 -116
  204. package/dist/{ports-BZsa4E0e.js → ports-BG0KrTF5.js} +3 -2
  205. package/dist/{ports-B8DmvnDT.js → ports-BxwhTkI2.js} +5 -29
  206. package/dist/ports-lsof-C-KFQ3hh.js +27 -0
  207. package/dist/{probe-D23qt8BT.js → probe-AK77B0YW.js} +4 -4
  208. package/dist/{program-GusnXq4M.js → program-DfJJCEJW.js} +125 -118
  209. package/dist/{progress-DLHMb9Nz.js → progress-DB5E2Y0L.js} +1 -1
  210. package/dist/{prompt-select-styled-B8L90ha2.js → prompt-select-styled-Cm8h3ln5.js} +50 -49
  211. package/dist/{provider-auth-helpers-DCzPHYBh.js → provider-auth-helpers-BWFf-ICH.js} +9 -8
  212. package/dist/{proxy-env-CKBWNd19.js → proxy-env-a_fwG5uV.js} +1 -1
  213. package/dist/{proxy-fetch-CuomJeW8.js → proxy-fetch-B-9MM6tH.js} +1 -1
  214. package/dist/{push-apns-BNjpWCK5.js → push-apns-D7Kl5IlU.js} +6 -6
  215. package/dist/{pw-ai-DbzNFC8m.js → pw-ai-BuJLXHSR.js} +28 -24
  216. package/dist/{pw-ai-pJMhS79V.js → pw-ai-DsYmOxCp.js} +1 -1
  217. package/dist/{pw-ai-C-Sy12jT.js → pw-ai-DweqbnMJ.js} +1 -1
  218. package/dist/{qmd-manager-BuqPkrhL.js → qmd-manager-ChOTfdZQ.js} +14 -13
  219. package/dist/{qr-cli-DCqr6_WR.js → qr-cli-CNV3ou88.js} +8 -7
  220. package/dist/{redact-snapshot-COg8NLLO.js → redact-snapshot-DDgxiqE4.js} +3 -3
  221. package/dist/{register.agent-yjg7wijd.js → register.agent-B6lw56u_.js} +147 -140
  222. package/dist/register.configure-A26LOYA5.js +173 -0
  223. package/dist/{register.maintenance-B1tKJXP8.js → register.maintenance-Bv41DKCC.js} +144 -136
  224. package/dist/{register.message-BJm9UQ1U.js → register.message-BTZUaOa_.js} +119 -112
  225. package/dist/{register.onboard-Si5PW3Ke.js → register.onboard-Cla_XQtJ.js} +47 -43
  226. package/dist/{register.setup-Dgd21xa5.js → register.setup-BO3qmf_4.js} +46 -42
  227. package/dist/{register.status-health-sessions-DijNX4q2.js → register.status-health-sessions-DQxR8MS5.js} +134 -127
  228. package/dist/{register.subclis-RfmNwdNw.js → register.subclis-CasWzZR5.js} +32 -32
  229. package/dist/{registry-CxLUHPLp.js → registry-DnJ84ILp.js} +6 -83
  230. package/dist/{resolve-configured-secret-input-string-ySbc3h26.js → resolve-configured-secret-input-string-D9uWNIsN.js} +2 -2
  231. package/dist/restart-D97MOP8K.js +782 -0
  232. package/dist/{rpc-DaYUgLOy.js → rpc-DyZoASXQ.js} +4 -4
  233. package/dist/run-loop-Zvh_699t.js +224 -0
  234. package/dist/{run-main-t3x2kkjY.js → run-main-CgFUs81l.js} +148 -133
  235. package/dist/{runtime-BkR9qMZk.js → runtime-BBknab-X.js} +6 -5
  236. package/dist/runtime-CvdZtNmJ.js +100 -0
  237. package/dist/{runtime-config-collectors-CCkqshyY.js → runtime-config-collectors-CML7zUqZ.js} +2 -2
  238. package/dist/{runtime-guard-BMUPc-7K.js → runtime-guard-jpG1v0SY.js} +1 -1
  239. package/dist/runtime-whatsapp-login.runtime-COI7KRKp.js +23 -0
  240. package/dist/runtime-whatsapp-outbound.runtime-la1XDkPQ.js +33 -0
  241. package/dist/{sandbox-DN9CY7lp.js → sandbox-DKscghPx.js} +19 -18
  242. package/dist/{sandbox-cli-BoXV0LgP.js → sandbox-cli-CPwPZJBq.js} +52 -48
  243. package/dist/{secrets-cli-CyF7PIF1.js → secrets-cli-BY0IyBZM.js} +31 -26
  244. package/dist/{security-cli-Dyvx1GHA.js → security-cli-CG6OlQ29.js} +66 -61
  245. package/dist/{send-7T5wUQDt.js → send-BSbPEzn5.js} +7 -7
  246. package/dist/{send-Ge3BmrKO.js → send-C2xEPjDg.js} +8 -8
  247. package/dist/{send-DGbx1H-1.js → send-CFNNbHEA.js} +11 -11
  248. package/dist/{send-rLuC3ZNP.js → send-CIW-foVz.js} +7 -7
  249. package/dist/{send-CGAq-Ure.js → send-CZtdjq0Y.js} +20 -20
  250. package/dist/{gateway-cli-D7jJhAZQ.js → server-CG9eco0N.js} +122 -1835
  251. package/dist/{server-BM8Bplbe.js → server-DfSS2w17.js} +36 -32
  252. package/dist/{server-context-B1j20KiF.js → server-context-CcW_Z5sB.js} +15 -15
  253. package/dist/{server-lifecycle-D8uRbSiN.js → server-lifecycle-DWK8vMXD.js} +2 -2
  254. package/dist/{server-middleware-C0e-wReR.js → server-middleware-BtyTo4hI.js} +2 -2
  255. package/dist/{server-node-events-C876mSJD.js → server-node-events-Ck1bPPa5.js} +117 -110
  256. package/dist/{service-BJxGQl0h.js → service-DnXLOpYd.js} +2 -2
  257. package/dist/{session-1LXasKCO.js → session-Dnt2qKJU.js} +4 -4
  258. package/dist/{session-cost-usage-BKD6u4HD.js → session-cost-usage-CBHvFXhD.js} +3 -3
  259. package/dist/{session-utils-CigqosOc.js → session-utils-t4ZmEDMj.js} +9 -8
  260. package/dist/{sessions-Db2DF_68.js → sessions-BkKVGWHa.js} +13 -12
  261. package/dist/{sessions-CwRdJvxU.js → sessions-D6VEpJTN.js} +7 -7
  262. package/dist/{shared-DcKZdze7.js → shared-DKj9yygb.js} +4 -4
  263. package/dist/{skill-commands-BFUWbeCU.js → skill-commands-Dyi0nIIE.js} +8 -8
  264. package/dist/{skill-scanner-B5APVdka.js → skill-scanner-C6efDeWr.js} +2 -2
  265. package/dist/{skills-DjMDgmlj.js → skills-Cp-zTGor.js} +8 -8
  266. package/dist/{skills-cli-CvDeA9Mz.js → skills-cli-BcLVYbwo.js} +19 -16
  267. package/dist/{skills-install-jLz2vwvm.js → skills-install-LXdiRh5j.js} +10 -10
  268. package/dist/{skills-status-CeHRbTXe.js → skills-status-NIhVZfqm.js} +5 -5
  269. package/dist/slash-commands.runtime-Bq0XWi2w.js +28 -0
  270. package/dist/slash-dispatch.runtime-7RhcnuYY.js +119 -0
  271. package/dist/{slash-dispatch.runtime-DLP2IeNv.js → slash-dispatch.runtime-D28-UnsO.js} +6 -6
  272. package/dist/{slash-dispatch.runtime-Vp6IDoCc.js → slash-dispatch.runtime-DzpJjr3K.js} +6 -6
  273. package/dist/slash-skill-commands.runtime-HWFM7WtA.js +34 -0
  274. package/dist/{sqlite-C0jSdAfK.js → sqlite-BOrw_KhN.js} +4 -4
  275. package/dist/stable-node-path-BghYt81T.js +32 -0
  276. package/dist/{status-D3cIxG_a.js → status-DN8lRmcz.js} +40 -40
  277. package/dist/{status-pXeXDUup.js → status-DNPn0STZ.js} +1 -1
  278. package/dist/{status.update-DeJopD-c.js → status.update-Cd4sMxYz.js} +4 -4
  279. package/dist/store-D8F_4CRR.js +701 -0
  280. package/dist/{store-BgCLFtxS.js → store-DCoVH3mG.js} +2 -2
  281. package/dist/{subagent-registry-runtime-COKZwsHd.js → subagent-registry-runtime-Bt-LYyrB.js} +6 -6
  282. package/dist/subagent-registry-runtime-DVd9wO_D.js +119 -0
  283. package/dist/{subagent-registry-runtime-BlAI3eqU.js → subagent-registry-runtime-a7xfwPB8.js} +6 -6
  284. package/dist/{subsystem-Cfn2Pryx.js → subsystem-C6poMade.js} +2 -94
  285. package/dist/{system-cli-GQBIKMxE.js → system-cli-Zu5LiJFn.js} +25 -21
  286. package/dist/{system-run-command-ZDr-0-G2.js → system-run-command-Kw0jxir0.js} +1 -1
  287. package/dist/{systemd-hints-CLH4_-IK.js → systemd-hints-Da4Q7Orc.js} +5 -5
  288. package/dist/{systemd-linger-PnO8ebUK.js → systemd-linger-NLcFYPEu.js} +2 -2
  289. package/dist/{systemd-tpTWQ79a.js → systemd-tjVNbfBk.js} +2 -2
  290. package/dist/{table-D9z5aFl9.js → table-BP6N5EYA.js} +2 -2
  291. package/dist/{tables-Bb1hkkgV.js → tables-D4LxfXpk.js} +2 -2
  292. package/dist/{tailnet-B-wq8YXh.js → tailnet-CInGXmk9.js} +1 -1
  293. package/dist/{tailscale-DOG3cjSj.js → tailscale-DRFhBuh-.js} +1 -1
  294. package/dist/{target-errors-D41KLMCY.js → target-errors-CkcKdefZ.js} +2 -2
  295. package/dist/{tokens-g3GBx2U9.js → tokens-C3eENCf9.js} +1 -1
  296. package/dist/{tool-display-CpQNRadF.js → tool-display-qTfeZx-b.js} +2 -2
  297. package/dist/{tool-images-Bkv3er-8.js → tool-images-BwtNIRsT.js} +2 -2
  298. package/dist/{trash-ChZlaria.js → trash-DHZNy01S.js} +2 -2
  299. package/dist/{tui-BdX0dbMg.js → tui-CW9for1h.js} +18 -18
  300. package/dist/tui-cli-ChrtbCqc.js +91 -0
  301. package/dist/types.secrets-CpVqMFti.js +81 -0
  302. package/dist/{update-BLXj6ysD.js → update-Bb-g7rqr.js} +4 -4
  303. package/dist/{update-cli-lYpdoDyw.js → update-cli-DHGCFiKY.js} +155 -148
  304. package/dist/{update-runner-DtN1XGSv.js → update-runner-BDHtvoca.js} +6 -6
  305. package/dist/web-CCim-JL4.js +123 -0
  306. package/dist/{web-BEuMJbx-.js → web-CREcqhe9.js} +6 -6
  307. package/dist/{web-BvId86u4.js → web-IBqHOVI2.js} +6 -6
  308. package/dist/{webhooks-cli-CvPAdGDn.js → webhooks-cli-C32h-6dI.js} +21 -18
  309. package/dist/{whatsapp-actions-DSjBUB00.js → whatsapp-actions-BZRxKavO.js} +31 -28
  310. package/dist/{widearea-dns-Blh7W-0q.js → widearea-dns-9PZLZ6zk.js} +1 -1
  311. package/dist/{with-timeout-BVwCWUvY.js → with-timeout-DKgjtZv2.js} +6 -43
  312. package/dist/{workspace-BrC46nbq.js → workspace-CedZZfvJ.js} +5 -5
  313. package/dist/{workspace-dirs-Cb43onAl.js → workspace-dirs-BgwJ2Axm.js} +1 -1
  314. package/dist/{ws-ChEZbUss.js → ws-BwH2d97O.js} +2 -2
  315. package/docs/es/concepts/sessions.md +1 -1
  316. package/docs/pt-BR/concepts/sessions.md +1 -1
  317. package/extensions/acpx/package.json +1 -1
  318. package/extensions/bluebubbles/package.json +1 -1
  319. package/extensions/ci-fix-loop/package.json +1 -1
  320. package/extensions/continuous-learning/package.json +1 -1
  321. package/extensions/copilot-proxy/package.json +1 -1
  322. package/extensions/diagnostics-otel/package.json +1 -1
  323. package/extensions/diffs/package.json +1 -1
  324. package/extensions/discord/package.json +1 -1
  325. package/extensions/feishu/package.json +1 -1
  326. package/extensions/flow/package.json +1 -1
  327. package/extensions/google-antigravity-auth/package.json +1 -1
  328. package/extensions/google-gemini-cli-auth/package.json +1 -1
  329. package/extensions/googlechat/node_modules/.bin/openclaw +2 -2
  330. package/extensions/googlechat/package.json +2 -2
  331. package/extensions/imessage/package.json +1 -1
  332. package/extensions/irc/package.json +1 -1
  333. package/extensions/line/package.json +1 -1
  334. package/extensions/llm-task/package.json +1 -1
  335. package/extensions/lobster/package.json +1 -1
  336. package/extensions/matrix/CHANGELOG.md +5 -0
  337. package/extensions/matrix/package.json +1 -1
  338. package/extensions/mattermost/package.json +1 -1
  339. package/extensions/memory-core/node_modules/.bin/openclaw +2 -2
  340. package/extensions/memory-core/package.json +2 -2
  341. package/extensions/memory-lancedb/package.json +1 -1
  342. package/extensions/minimax-portal-auth/package.json +1 -1
  343. package/extensions/msteams/CHANGELOG.md +5 -0
  344. package/extensions/msteams/package.json +1 -1
  345. package/extensions/nextcloud-talk/package.json +1 -1
  346. package/extensions/nostr/CHANGELOG.md +5 -0
  347. package/extensions/nostr/package.json +1 -1
  348. package/extensions/open-prose/package.json +1 -1
  349. package/extensions/self-improvement/package.json +1 -1
  350. package/extensions/signal/package.json +1 -1
  351. package/extensions/slack/package.json +1 -1
  352. package/extensions/synology-chat/package.json +1 -1
  353. package/extensions/telegram/package.json +1 -1
  354. package/extensions/tlon/package.json +1 -1
  355. package/extensions/twitch/CHANGELOG.md +5 -0
  356. package/extensions/twitch/package.json +1 -1
  357. package/extensions/voice-call/CHANGELOG.md +5 -0
  358. package/extensions/voice-call/package.json +1 -1
  359. package/extensions/whatsapp/package.json +1 -1
  360. package/extensions/zalo/CHANGELOG.md +5 -0
  361. package/extensions/zalo/package.json +1 -1
  362. package/extensions/zalouser/CHANGELOG.md +5 -0
  363. package/extensions/zalouser/package.json +1 -1
  364. package/package.json +2 -2
  365. package/dist/audio-preflight-Bk3KZQei.js +0 -98
  366. package/dist/clawbot-cli-DpO-ZwmI.js +0 -32
  367. package/dist/cli-1p9b3pE_.js +0 -155
  368. package/dist/deliver-runtime-CESEQ4NM.js +0 -59
  369. package/dist/deps-send-discord.runtime-dTfY4NLn.js +0 -34
  370. package/dist/deps-send-imessage.runtime-Cm_XDGKz.js +0 -33
  371. package/dist/deps-send-signal.runtime-9WH9ir2Z.js +0 -32
  372. package/dist/deps-send-slack.runtime-Cx_x379p.js +0 -30
  373. package/dist/deps-send-telegram.runtime-BFHbiOeI.js +0 -36
  374. package/dist/deps-send-whatsapp.runtime-BeJLvpI1.js +0 -117
  375. package/dist/image-runtime-Bq51vNRb.js +0 -53
  376. package/dist/manager-runtime-D2MqM9iK.js +0 -24
  377. package/dist/node-commands-DYz_oQFz.js +0 -12
  378. package/dist/pi-model-discovery-runtime-IFYIuVfT.js +0 -17
  379. package/dist/register.configure-a0uTvfCu.js +0 -166
  380. package/dist/runtime-whatsapp-login.runtime-CQLsSWjA.js +0 -20
  381. package/dist/runtime-whatsapp-outbound.runtime-DoZi3gnM.js +0 -40
  382. package/dist/slash-commands.runtime-Ckcj6TnD.js +0 -25
  383. package/dist/slash-dispatch.runtime-B5ykjP8B.js +0 -112
  384. package/dist/slash-skill-commands.runtime-DbzbD-ZQ.js +0 -31
  385. package/dist/subagent-registry-runtime-Bjh1H1uK.js +0 -112
  386. package/dist/tui-cli-C9UujwTv.js +0 -86
  387. package/dist/web-C14E8nHS.js +0 -116
  388. /package/dist/{allow-from-Do0aB7F6.js → allow-from-D5r7UcQr.js} +0 -0
  389. /package/dist/{boolean-DtWR5bt3.js → boolean-ydSOedIP.js} +0 -0
  390. /package/dist/{brew-sUdeII-D.js → brew-Djs-Lc5s.js} +0 -0
  391. /package/dist/{chat-envelope-CrWMMV_a.js → chat-envelope-DVKDDTSu.js} +0 -0
  392. /package/dist/{cli-utils-DK6017OO.js → cli-utils-CCaEbxAz.js} +0 -0
  393. /package/dist/{command-format-CLEQe4bk.js → command-format-MESnUO9S.js} +0 -0
  394. /package/dist/{command-options-j8s8APBQ.js → command-options-ZvhOayEd.js} +0 -0
  395. /package/dist/{command-poll-backoff-Cse56OCv.js → command-poll-backoff-Dal4OaUV.js} +0 -0
  396. /package/dist/{constants-BgSj-mRP.js → constants-CkIxhEvX.js} +0 -0
  397. /package/dist/{context-window-guard-BgcfPYTd.js → context-window-guard-BUJ2pfYi.js} +0 -0
  398. /package/dist/{daemon-runtime-VfkpXuRu.js → daemon-runtime-CbyS9Xgu.js} +0 -0
  399. /package/dist/{dangerous-name-matching-BAJAZtyB.js → dangerous-name-matching-PRkNIyQj.js} +0 -0
  400. /package/dist/{dangerous-tools-DjOwyW3J.js → dangerous-tools-B9LIt3MU.js} +0 -0
  401. /package/dist/{entry-status-DVwZos2N.js → entry-status-4cDL0OcK.js} +0 -0
  402. /package/dist/{fetch-timeout-BL0dTnkh.js → fetch-timeout-EpWPz-Eu.js} +0 -0
  403. /package/dist/{format-C-890_pY.js → format-DVLB9DNB.js} +0 -0
  404. /package/dist/{format-duration-BvkrOKhT.js → format-duration-CrBESKOT.js} +0 -0
  405. /package/dist/{format-relative-8cNYQsqb.js → format-relative-BsYuWm-Q.js} +0 -0
  406. /package/dist/{health-format-CqfOHMzL.js → health-format-BIotQmMH.js} +0 -0
  407. /package/dist/{heartbeat-visibility-_K4bnQDH.js → heartbeat-visibility-C_P1yurK.js} +0 -0
  408. /package/dist/{help-format-ncfKj8zq.js → help-format-Ce4Xueed.js} +0 -0
  409. /package/dist/{helpers-5EH85AYF.js → helpers-CpIyUra4.js} +0 -0
  410. /package/dist/{input-provenance-ByYWugDu.js → input-provenance-qgaZGYuK.js} +0 -0
  411. /package/dist/{json-files-UKlMS7yU.js → json-files-BH1UBATr.js} +0 -0
  412. /package/dist/{kill-tree-CeEi7v61.js → kill-tree-W9BwtYuE.js} +0 -0
  413. /package/dist/{legacy-names-D3aIn6ij.js → legacy-names-DV-6rguu.js} +0 -0
  414. /package/dist/{load-options-CLMiD1a9.js → load-options-BuY2PXsl.js} +0 -0
  415. /package/dist/{logging-DRwtiLIS.js → logging-kuFzZMsG.js} +0 -0
  416. /package/dist/{model-param-b-NJsgH2EF.js → model-param-b-4PN786ZX.js} +0 -0
  417. /package/dist/{mutable-allowlist-detectors-DiZDtmlZ.js → mutable-allowlist-detectors-TCG6mnbz.js} +0 -0
  418. /package/dist/{node-resolve-C8bjtxQk.js → node-resolve-DSu0lzHd.js} +0 -0
  419. /package/dist/{onboard-config-DFLATNN1.js → onboard-config-YMJ1PLAF.js} +0 -0
  420. /package/dist/{onboard-provider-auth-flags-CpVNpwzI.js → onboard-provider-auth-flags-DHzbi9kj.js} +0 -0
  421. /package/dist/{openclaw-root-BFfBQ6FD.js → openclaw-root-T5G2ldGE.js} +0 -0
  422. /package/dist/{parse-log-line-DxFrnzNo.js → parse-log-line-BrrE4onI.js} +0 -0
  423. /package/dist/{parse-port-CboE2EQm.js → parse-port-DjjWDROB.js} +0 -0
  424. /package/dist/{parse-timeout-uTDpUWKR.js → parse-timeout-BS3EWcf6.js} +0 -0
  425. /package/dist/{polls-D86s6oEI.js → polls-QrTzhQf5.js} +0 -0
  426. /package/dist/{program-context-DQD9Uf8U.js → program-context-BqyLhTGk.js} +0 -0
  427. /package/dist/{prompt-style-C1jf_-k5.js → prompt-style-DB_OyH4q.js} +0 -0
  428. /package/dist/{prompts-GoDC3iAV.js → prompts-DomsZukd.js} +0 -0
  429. /package/dist/{provider-env-vars-D3-Jf8PX.js → provider-env-vars-DYZiYet-.js} +0 -0
  430. /package/dist/{proxy-BNFyBgvu.js → proxy-CUsDSClP.js} +0 -0
  431. /package/dist/{redact-BsCSVGmT.js → redact-B1GVGbib.js} +0 -0
  432. /package/dist/{render-scQFEkLe.js → render-CUAKPmvZ.js} +0 -0
  433. /package/dist/{run-with-concurrency-CzLnwXXV.js → run-with-concurrency-CLARJMM7.js} +0 -0
  434. /package/dist/{runtime-status-CL_bKfj_.js → runtime-status-Fmu5gNYW.js} +0 -0
  435. /package/dist/{secret-equal-DxKrAcRs.js → secret-equal-BN0idTaZ.js} +0 -0
  436. /package/dist/{secure-random-CruxVpoI.js → secure-random-B2UrD2xa.js} +0 -0
  437. /package/dist/{session-key-k6urs9r-.js → session-key-CC77ya0a.js} +0 -0
  438. /package/dist/{stagger-DW-U0kcV.js → stagger-Cek4Eizw.js} +0 -0
  439. /package/dist/{targets-CwCifSLG.js → targets-CD5AQXRB.js} +0 -0
  440. /package/dist/{targets-xSi-e-_L.js → targets-DPUt073v.js} +0 -0
  441. /package/dist/{text-format-CFm4X8Ze.js → text-format-DarxU3JH.js} +0 -0
  442. /package/dist/{thinking-RV_E8HFV.js → thinking-C0gzzPsv.js} +0 -0
  443. /package/dist/{timeouts-G9Yto-nj.js → timeouts-DEnpCqGd.js} +0 -0
  444. /package/dist/{tool-catalog-omkiks3D.js → tool-catalog-3w4XiWhy.js} +0 -0
  445. /package/dist/{transcript-events-CtWhopMu.js → transcript-events-CdWLIofg.js} +0 -0
  446. /package/dist/{usage-format-BMWvYDjj.js → usage-format-zuuFSdkg.js} +0 -0
  447. /package/dist/{utils-cwpAMi-t.js → utils-BnC3HGtm.js} +0 -0
  448. /package/dist/{version-DdJhsIqk.js → version-DT-JIO28.js} +0 -0
  449. /package/dist/{windows-spawn-CsdZOQMr.js → windows-spawn-CVnPunjY.js} +0 -0
  450. /package/dist/{wsl-Cx5T6MYb.js → wsl-DLw4LET-.js} +0 -0
@@ -1,117 +1,120 @@
1
1
  import { t as __exportAll } from "./rolldown-runtime-Cbj13DAv.js";
2
2
  import { E as normalizeLogLevel, a as logVerbose, c as shouldLogVerbose, k as resolvePreferredOpenClawTmpDir, m as getChildLogger, p as theme, t as danger, u as warn } from "./globals-d3aR1MYC.js";
3
3
  import { g as resolveStateDir, r as STATE_DIR, u as resolveGatewayPort, y as resolveRequiredHomeDir } from "./paths-BMo6kTge.js";
4
- import { d as defaultRuntime, t as createSubsystemLogger, u as createNonExitingRuntime } from "./subsystem-Cfn2Pryx.js";
5
- import { t as parseBooleanValue$1 } from "./boolean-DtWR5bt3.js";
4
+ import { n as defaultRuntime, t as createNonExitingRuntime } from "./runtime-CvdZtNmJ.js";
5
+ import { t as createSubsystemLogger } from "./subsystem-C6poMade.js";
6
+ import { t as parseBooleanValue$1 } from "./boolean-ydSOedIP.js";
6
7
  import { r as isTruthyEnvValue } from "./entry.js";
7
- import { $r as retryAsync, At as AVATAR_MAX_BYTES, Bi as resolveAuthProfileDisplayLabel, Dn as applyMergePatch, Fn as resolveSlackNativeStreaming, Fr as resolveThinkingDefault, Ft as isSupportedLocalAvatarExtension, G as writeConfigFile, Gt as getConfigValueAtPath, Ht as resetConfigOverrides, Ii as splitTrailingAuthProfile, In as resolveSlackStreamingMode, J as TELEGRAM_COMMAND_NAME_PATTERN, Jt as unsetConfigValueAtPath, K as validateConfigObjectWithPlugins, Kt as parseConfigPath, Li as DEFAULT_CONTEXT_TOKENS, Mr as resolveReasoningDefault, Mt as isAvatarHttpUrl, Ni as normalizeSecretInput, Nn as mapStreamingModeToSlackLegacyDraftStreamMode, Or as resolveConfiguredModelRef, Pn as resolveDiscordPreviewStreamMode, Pr as resolveSubagentSpawnModelSelection, Pt as isPathWithinRoot, Q as isInboundPathAllowed, Qr as resolveRetryConfig, Ri as DEFAULT_MODEL, Si as resolveShellEnvFallbackTimeoutMs, Sr as normalizeModelRef$2, U as resolveConfigSnapshotHash, Un as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Ut as setConfigOverride, V as readConfigFileSnapshot, Vt as getConfigOverrides, Wn as resolveAgentMaxConcurrent, Wt as unsetConfigOverride, X as resolveTelegramCustomCommands, Xn as listProfilesForProvider, Y as normalizeTelegramCommandName, Yn as dedupeProfileIds, Zn as markAuthProfileGood, _r as findNormalizedProviderValue, a as getSoonestCooldownExpiry, br as isCliProvider, c as markAuthProfileUsed, ci as createOllamaStreamFn, cr as resolveAuthStorePathForDisplay, d as resolveApiKeyForProfile, di as buildStreamErrorAssistantMessage, et as resolveIMessageAttachmentRoots, f as evaluateStoredCredentialEligibility, fi as buildUsageWithNoCost, gi as resolveApiKeyForProvider, gr as buildModelAliasIndex, hi as requireApiKey, hr as buildConfiguredAllowlistKeys, i as clearExpiredCooldowns, jr as resolveModelRefFromString, jt as isAvatarDataUrl, kr as resolveDefaultModelForAgent, li as buildAssistantMessage, lr as resolveOpenClawAgentDir, mi as getCustomProviderApiKey, mr as buildAllowedModelSet, nn as buildEnforcedShellCommand, nr as ensureAuthProfileStore, nt as normalizeScpRemoteHost, o as isProfileInCooldown, p as resolveTokenExpiryState, pi as getApiKeyForModel, pt as parseDurationMs, qn as resolveOwnerDisplaySetting, qt as setConfigValueAtPath, r as resolveAuthProfileOrder, rt as parseNonNegativeByteSize, s as markAuthProfileFailure, si as OLLAMA_NATIVE_BASE_URL, tt as resolveIMessageRemoteAttachmentRoots, u as resolveProfilesUnavailableReason, ui as buildAssistantMessageWithZeroUsage, ur as withFileLock, vi as resolveEnvApiKey, wr as normalizeProviderId, xi as getShellPathFromLoginShell, xr as modelKey, yi as resolveModelAuthMode, z as loadConfig, zi as DEFAULT_PROVIDER, zt as validateJsonSchemaValue } from "./auth-profiles-BCHBDrea.js";
8
- import { t as formatCliCommand } from "./command-format-CLEQe4bk.js";
9
- import { D as filterBootstrapFilesForSession, E as ensureAgentWorkspace, M as resolveAgentModelFallbackValues, N as resolveAgentModelPrimaryValue, P as toAgentModelListLike, _ as DEFAULT_AGENT_WORKSPACE_DIR, a as resolveAgentDir, b as DEFAULT_IDENTITY_FILENAME, d as resolveDefaultAgentId, f as resolveEffectiveModelFallbacks, h as resolveSessionAgentIds, i as resolveAgentConfig, k as loadWorkspaceBootstrapFiles, l as resolveAgentSkillsFilter, m as resolveSessionAgentId, p as resolveRunModelFallbacksOverride, r as listAgentIds, t as hasConfiguredModelFallbacks, u as resolveAgentWorkspaceDir, v as DEFAULT_BOOTSTRAP_FILENAME } from "./agent-scope-C5bklqr1.js";
10
- import { D as resolveThreadParentSessionKey, E as parseAgentSessionKey, S as isAcpSessionKey, T as isSubagentSessionKey, _ as normalizeAccountId$2, b as deriveSessionChatType, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, l as normalizeMainKey, n as DEFAULT_MAIN_KEY, o as classifySessionKeyShape, p as scopedHeartbeatWakeOptions, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as normalizeOptionalAccountId, w as isCronSessionKey, x as getSubagentDepth, y as isBlockedObjectKey } from "./session-key-k6urs9r-.js";
11
- import { C as sliceUtf16Safe, E as isPlainObject, S as sleep$1, T as truncateUtf16Safe, b as shortenHomeInString, c as escapeRegExp, p as normalizeE164, r as clampInt, t as CONFIG_DIR, u as isRecord$1, v as resolveUserPath, x as shortenHomePath } from "./utils-cwpAMi-t.js";
12
- import { a as openBoundaryFileSync, h as normalizeWindowsPathForComparison, i as openBoundaryFile, t as resolveOpenClawPackageRoot } from "./openclaw-root-BFfBQ6FD.js";
13
- import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-DB-PHqB2.js";
14
- import { n as runExec, r as spawnWithFallback, t as runCommandWithTimeout } from "./exec-B45rafWZ.js";
15
- import { D as registerContextEngine, E as triggerInternalHook, O as resolveContextEngine, P as coerceSecretRef, R as normalizeResolvedSecretInputString, S as matchPluginCommand, _ as normalizePluginHttpPath, b as getPluginCommandSpecs, c as normalizeChannelId$1, d as getActivePluginRegistryKey, g as createPluginRegistry, m as setActivePluginRegistry, n as CHAT_CHANNEL_ORDER, p as requireActivePluginRegistry, s as normalizeAnyChannelId, u as getActivePluginRegistry, v as clearPluginCommands, w as createInternalHookEvent, x as listPluginCommands, y as executePluginCommand } from "./registry-CxLUHPLp.js";
16
- import { a as saveJsonFile, i as loadJsonFile } from "./github-copilot-token-Byc_YVYE.js";
17
- import { a as safeStatSync, d as normalizePluginsConfig, f as resolveEffectiveEnableState, h as isDangerousHostEnvVarName, i as isPathInside, l as applyTestPluginDefaults, n as loadPluginManifestRegistry, p as resolveMemorySlotDecision, r as discoverOpenClawPlugins } from "./manifest-registry-9oWnIuht.js";
18
- import { t as VERSION } from "./version-DdJhsIqk.js";
19
- import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-D1Nz-RwP.js";
20
- import { t as runTasksWithConcurrency } from "./run-with-concurrency-CzLnwXXV.js";
21
- import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Cse56OCv.js";
22
- import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-g3GBx2U9.js";
23
- import { _ as webAuthExists, c as logWebSelfId, i as resolveWhatsAppAccount, l as logoutWeb, p as readWebSelfId, s as getWebAuthAgeMs, y as resolveAccountEntry } from "./accounts-Da-TWEIc.js";
24
- import { A as resolveSlackBotToken, D as resolveSlackAccount, F as listEnabledDiscordAccounts, L as resolveDiscordAccount, M as inspectDiscordAccount, N as createDiscordActionGate, O as resolveSlackReplyToMode, R as normalizeDiscordToken, S as listAcpBindings, a as isWhatsAppGroupJid, c as createTelegramActionGate, f as resolveTelegramAccount, j as normalizeChatType, k as resolveSlackAppToken, l as listEnabledTelegramAccounts, m as resolveTelegramToken, n as listChannelPlugins, o as normalizeWhatsAppTarget, p as resolveTelegramPollActionGateState, r as normalizeChannelId$2, t as getChannelPlugin, u as listTelegramAccountIds, v as buildChannelAccountBindings, y as listBindings } from "./plugins-D3Wuignn.js";
25
- import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-rLuC3ZNP.js";
26
- import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveChannelEntryMatchWithFallback, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as applyChannelMatchMeta, E as listThreadsDiscord, Et as fetchDiscord, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as buildChannelKeyCandidates, P as fetchChannelInfoDiscord, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as DiscordApiError, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, k as searchMessagesDiscord, kt as normalizeChannelSlug, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-DGbx1H-1.js";
27
- import { a as getMachineDisplayName, i as startBrowserControlServiceFromConfig, n as createBrowserRouteDispatcher, r as createBrowserControlContext, t as withTimeout$4 } from "./with-timeout-BVwCWUvY.js";
28
- import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-CruxVpoI.js";
29
- import { A as initializeGlobalHookRunner, C as resolveReplyToMode, D as parseReplyDirectives, E as normalizeTargetForProvider, M as joinPresentTextSegments, O as splitMediaFromOutput, S as createReplyToModeFilterForChannel, T as normalizeChannelTargetInput, _ as filterMessagingToolDuplicates, a as normalizeOutboundPayloadsForJson, b as shouldSuppressMessagingToolReplies, c as deriveInboundMessageHookContext, d as toInternalMessageTranscribedContext, f as toPluginMessageContext, g as applyReplyThreading, h as applyReplyTagsToPayload, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as toInternalMessagePreprocessedContext, m as fireAndForgetHook, o as normalizeReplyPayloadsForDelivery, p as toPluginMessageReceivedEvent, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as toInternalMessageReceivedContext, v as filterMessagingToolMediaDuplicates, w as buildTargetResolverSignature, x as shouldSuppressReasoningPayload, y as isRenderablePayload } from "./deliver-DPkEY6xb.js";
30
- import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, n as logLaneDequeue, o as logSessionStateChange, p as getDiagnosticSessionState, r as logLaneEnqueue, t as diag, u as logWebhookReceived } from "./diagnostic-DCevSIi3.js";
31
- import { i as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-DRUpcCkN.js";
32
- import { i as resolveTelegramTargetChatType, r as parseTelegramTarget } from "./targets-xSi-e-_L.js";
33
- import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-DBPCaLYI.js";
34
- import { A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as isVoiceCompatibleAudio, K as formatLocationText, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, _ as splitTelegramCaption, a as reactMessageTelegram, b as resolveCronStorePath, c as sendStickerTelegram, d as isRecoverableTelegramNetworkError, f as markdownToTelegramChunks, g as resolveTelegramFetch, h as wrapFileReferencesInHtml, i as editMessageTelegram, j as expandTextLinks, k as buildTypingThreadParams, l as resolveTelegramVoiceSend, m as renderTelegramHtmlText, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramHtml, q as toLocationContext, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, u as wasSentByBot, v as withTelegramApiErrorLogging, w as buildSenderName, y as loadCronStore, z as resolveTelegramReplyId } from "./send-CGAq-Ure.js";
35
- import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-BUP6uy2Q.js";
36
- import { a as isInternalMessageChannel, c as listDeliverableMessageChannels, d as resolveMessageChannel, h as GATEWAY_CLIENT_NAMES, i as isGatewayMessageChannel, l as normalizeMessageChannel, m as GATEWAY_CLIENT_MODES, n as isDeliverableMessageChannel, o as isMarkdownCapableMessageChannel, p as GATEWAY_CLIENT_IDS, t as INTERNAL_MESSAGE_CHANNEL, u as resolveGatewayMessageChannel } from "./message-channel-7mpcAPwa.js";
37
- import { A as isRawApiErrorPayload, B as resolveBootstrapTotalMaxChars, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as isTimeoutErrorMessage, I as buildBootstrapContextFiles, L as ensureSessionHeader, M as parseImageDimensionError, N as parseImageSizeError, O as isLikelyContextOverflowError, P as sanitizeUserFacingText, R as resolveBootstrapMaxChars, S as isBillingAssistantError, T as isContextOverflowError, V as sanitizeGoogleTurnOrdering, _ as formatAssistantErrorText, a as isMessagingToolDuplicateNormalized, b as getApiErrorPayloadFingerprint, c as extractToolCallsFromAssistant, d as downgradeOpenAIFunctionCallReasoningPairs, f as downgradeOpenAIReasoningBlocks, g as classifyFailoverReasonFromHttpStatus, h as classifyFailoverReason, j as isTransientHttpError, k as isRateLimitAssistantError, l as extractToolResultId, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, o as normalizeTextForComparison, p as isGoogleModelApi, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as sanitizeToolCallIdsForCloudCodeAssist, v as formatBillingErrorMessage, w as isCompactionFailureError, x as isAuthAssistantError, y as formatRawAssistantErrorForUi, z as resolveBootstrapPromptTruncationWarningMode } from "./pi-embedded-helpers-BMC2HFyB.js";
38
- import { C as resolveToolProfilePolicy, S as normalizeToolName, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as stripPluginOnlyAllowlist, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, f as resolveSandboxConfigForAgent, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, y as mergeAlsoAllowPolicy } from "./sandbox-DN9CY7lp.js";
39
- import { j as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-TWq_09_a.js";
40
- import { i as isLoopbackHost } from "./ws-ChEZbUss.js";
41
- import { i as trimToUndefined, n as resolveGatewayCredentialsFromConfig } from "./credentials-DVX7Krq5.js";
42
- import { c as resolveBrowserControlAuth, i as resolveBrowserConfig } from "./server-context-B1j20KiF.js";
43
- import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-DjMDgmlj.js";
44
- import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-CUaIvLOE.js";
45
- import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-Dr0uMr7v.js";
46
- import { a as testRegexWithBoundedInput, i as compileSafeRegex, n as redactSensitiveText } from "./redact-BsCSVGmT.js";
47
- import { i as formatUncaughtError, r as formatErrorMessage, s as readErrorName } from "./errors-Dh5KARaE.js";
48
- import { i as openFileWithinRoot, l as writeFileWithinRoot, n as copyFileWithinRoot, o as readFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-DtMJsayp.js";
49
- import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-CKBWNd19.js";
50
- import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-BgCLFtxS.js";
51
- import { i as resolveLsofCommandSync } from "./ports-B8DmvnDT.js";
52
- import { r as writeJsonAtomic } from "./json-files-UKlMS7yU.js";
53
- import { B as evaluateSessionFreshness, C as normalizeSessionDeliveryFields, D as capArrayByJsonBytes, E as archiveSessionTranscripts, F as parseInlineDirectives$1, G as DEFAULT_RESET_TRIGGERS, H as resolveSessionResetPolicy, J as setSessionRuntimeModel, K as mergeSessionEntry, Q as resolveMainSessionKey, R as jsonUtf8Bytes, S as normalizeDeliveryContext, U as resolveSessionResetType, V as resolveChannelResetConfig, W as resolveThreadFlag, Z as resolveExplicitAgentSessionKey, _ as isCacheEnabled, a as resolveAndPersistSessionFile, b as deliveryContextKey, c as recordSessionMetaFromInbound, d as updateSessionStore, et as deriveSessionMetaPatch, f as updateSessionStoreEntry, lt as resolveSessionLockMaxHoldFromTimeout, n as parseSessionThreadInfo, nt as resolveConversationLabel, o as loadSessionStore, ot as resolveGroupSessionKey, q as resolveFreshSessionTotalTokens, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, st as acquireSessionWriteLock, t as extractDeliveryInfo, u as updateLastRoute, v as resolveCacheTtlMs$1, w as normalizeAccountId$3, x as mergeDeliveryContext, y as deliveryContextFromSession, z as resolveSessionKey } from "./sessions-Db2DF_68.js";
54
- import { r as resolveIMessageAccount } from "./accounts-D-CXitCL.js";
55
- import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, t as resolveDefaultSessionStorePath } from "./paths-0GcCtgXm.js";
56
- import { i as normalizeInputProvenance, n as applyInputProvenanceToUserMessage, r as hasInterSessionUserProvenance } from "./input-provenance-ByYWugDu.js";
57
- import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-CtWhopMu.js";
58
- import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-Bkv3er-8.js";
59
- import { a as normalizeElevatedLevel, c as normalizeUsageDisplay, d as supportsXHighThinking, l as normalizeVerboseLevel, n as formatXHighModelHint, o as normalizeReasoningLevel, s as normalizeThinkLevel, t as formatThinkingLevels, u as resolveResponseUsageMode } from "./thinking-RV_E8HFV.js";
60
- import { i as resolveContextWindowInfo, n as CONTEXT_WINDOW_WARN_BELOW_TOKENS, r as evaluateContextWindowGuard, t as CONTEXT_WINDOW_HARD_MIN_TOKENS } from "./context-window-guard-BgcfPYTd.js";
61
- import { t as ensureOpenClawModelsJson } from "./models-config-Tnpb1ctj.js";
62
- import { n as evaluateShellAllowlist, r as resolveAllowAlwaysPatterns } from "./exec-approvals-allowlist-CSlk-iUy.js";
63
- import { n as resolveExecSafeBinRuntimePolicy, r as resolveMergedSafeBinProfileFixtures } from "./exec-safe-bin-runtime-policy-C4OXhXIe.js";
64
- import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-B3fDLVsV.js";
65
- import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-COQIeEVX.js";
66
- import { a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, g as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$1, v as resolveAttachmentKind } from "./audio-transcription-runner-DCsEpXgz.js";
67
- import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-BL0dTnkh.js";
68
- import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-BiNciKHu.js";
69
- import { _ as stripReasoningTagsFromText, a as resolveProviderVisionModelFromConfig, b as extractTextFromChatContent, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as findCodeRegions, x as minimaxUnderstandImage, y as isInsideCode } from "./image-DFnt4Uwg.js";
70
- import { n as formatToolSummary, r as resolveToolDisplay } from "./tool-display-CpQNRadF.js";
71
- import { t as makeProxyFetch } from "./proxy-fetch-CuomJeW8.js";
72
- import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-CaGizvli.js";
73
- import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-D41KLMCY.js";
74
- import { a as resolveNativeSkillsEnabled, i as resolveNativeCommandsEnabled, n as isNativeCommandsExplicitlyDisabled, r as isRestartEnabled, t as isCommandFlagEnabled } from "./commands-BAjCW6P6.js";
75
- import { a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs } from "./commands-registry-bwa5zMJ1.js";
76
- import { c as hasNonzeroUsage, l as makeZeroUsageSnapshot, n as loadCostUsageSummary, o as derivePromptTokens, r as loadSessionCostSummary, s as deriveSessionTotalTokens, u as normalizeUsage } from "./session-cost-usage-BKD6u4HD.js";
77
- import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-DlziGqIg.js";
78
- import { v as extractKeywords, y as isQueryStopWordToken } from "./sqlite-C0jSdAfK.js";
79
- import { Lt as SESSION_LABEL_MAX_LENGTH, t as GatewayClient } from "./client-DWdu7Vc_.js";
80
- import { a as randomIdempotencyKey, f as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege, t as buildGatewayConnectionDetails } from "./call-C4z2LJrI.js";
81
- import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-TlhZeXdg.js";
82
- import { n as formatTimeAgo } from "./format-relative-8cNYQsqb.js";
83
- import { c as readJsonFileWithFallback, d as listPairingChannels, i as readChannelAllowFromStore, l as writeJsonFileAtomically, o as removeChannelAllowFromStoreEntry, s as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-nyK6CFoT.js";
84
- import { d as resolveExecApprovals, f as resolveExecApprovalsFromFile, i as maxAsk, l as recordAllowlistUse, n as addAllowlistEntry, o as minSecurity, u as requiresExecApproval } from "./exec-approvals-B5leCM6K.js";
85
- import { C as mergePathPrepend, S as findPathKey, a as canvasSnapshotTempPath, b as buildNodeShellCommand, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeCameraPayloadToFile, i as parseEnvPairs, l as parseCameraSnapPayload, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as parsePreparedSystemRunPayload, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile, w as normalizePathPrepend, x as applyPathPrepend } from "./nodes-screen-DmJ2G431.js";
86
- import { t as killProcessTree$1 } from "./kill-tree-CeEi7v61.js";
87
- import { t as formatExecCommand } from "./system-run-command-ZDr-0-G2.js";
88
- import { i as parsePairingList, n as resolveNodeIdFromNodeList, r as parseNodeList, t as resolveNodeFromNodeList } from "./node-resolve-C8bjtxQk.js";
89
- import { i as formatDurationSeconds, r as formatDurationPrecise, t as formatDurationCompact$1 } from "./format-duration-BvkrOKhT.js";
90
- import { a as loadCombinedSessionStoreForGateway, d as resolveContextTokensForModel, f as computeBackoff, p as sleepWithAbort, u as lookupContextTokens } from "./session-utils-CigqosOc.js";
91
- import { i as resolveModelCostConfig, n as formatTokenCount$2, r as formatUsd, t as estimateUsageCost } from "./usage-format-BMWvYDjj.js";
92
- import { a as getRemoteSkillEligibility, b as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames, y as ensureSkillsWatcher } from "./skill-commands-BFUWbeCU.js";
93
- import { _ as hasResolvedCredentialValue, a as resolveSubagentToolPolicy, c as readStoreAllowFromForDmPolicy, d as resolveDmGroupAccessWithLists, f as resolvePinnedMainDmOwnerFromAllowlist, g as hasConfiguredUnavailableCredentialStatus, h as inspectReadOnlyChannelAccount, i as resolveGroupToolPolicy, m as resolveControlCommandGate, n as isToolAllowedByPolicies, p as resolveCommandAuthorizedFromAuthorizers, r as resolveEffectiveToolPolicy, s as DM_GROUP_ACCESS_REASON, t as filterToolsByPolicy, v as projectSafeChannelAccountSnapshotFields } from "./pi-tools.policy-C_cbrlt5.js";
94
- import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-Bch3Rz78.js";
95
- import { t as buildOutboundMediaLoadOptions } from "./load-options-CLMiD1a9.js";
96
- import { n as normalizePollInput, r as resolvePollMaxSelections } from "./polls-D86s6oEI.js";
97
- import { t as convertMarkdownTables } from "./tables-Bb1hkkgV.js";
98
- import { f as resolveGatewaySystemdServiceName, l as resolveGatewayLaunchAgentLabel } from "./constants-BgSj-mRP.js";
99
- import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-DW-U0kcV.js";
100
- import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-CXz2aSCs.js";
101
- import { t as applyPluginAutoEnable } from "./plugin-auto-enable-DdGdWKDo.js";
102
- import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-Ge3BmrKO.js";
103
- import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, r as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-7T5wUQDt.js";
104
- import { n as isSenderIdAllowed, r as mergeDmAllowFromSources, t as firstDefined$1 } from "./allow-from-Do0aB7F6.js";
105
- import { t as parseTimeoutMs } from "./parse-timeout-uTDpUWKR.js";
106
- import { a as runDiscordTaskWithTimeout, i as normalizeDiscordListenerTimeoutMs, r as normalizeDiscordInboundWorkerTimeoutMs } from "./timeouts-G9Yto-nj.js";
107
- import { n as isDangerousNameMatchingEnabled } from "./dangerous-name-matching-BAJAZtyB.js";
108
- import { s as resolveCommandSecretRefsViaGateway, t as getAgentRuntimeCommandSecretTargetIds } from "./command-secret-targets-B2OuvZQf.js";
109
- import { r as detectBinary } from "./onboard-helpers-Dtu3-e93.js";
110
- import { t as resolvePairingIdLabel } from "./pairing-labels-CjKrz2C9.js";
111
- import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-C6ocXZHW.js";
112
- import { i as resolveMemorySearchConfig } from "./manager-BYSXh-I3.js";
8
+ import { d as resolveAuthStorePathForDisplay, f as resolveOpenClawAgentDir, n as ensureAuthProfileStore, p as withFileLock } from "./store-D8F_4CRR.js";
9
+ import { At as getConfigValueAtPath, Bn as buildAllowedModelSet, Br as getCustomProviderApiKey, Dt as resetConfigOverrides, Et as getConfigOverrides, Fn as listProfilesForProvider, Fr as buildAssistantMessage, G as writeConfigFile, Gr as resolveModelAuthMode, Hn as buildModelAliasIndex, Hr as resolveApiKeyForProvider, In as markAuthProfileGood, Ir as buildAssistantMessageWithZeroUsage, J as TELEGRAM_COMMAND_NAME_PATTERN, Jn as normalizeModelRef$2, Jr as resolveShellEnvFallbackTimeoutMs, K as validateConfigObjectWithPlugins, Kn as isCliProvider, Lr as buildStreamErrorAssistantMessage, Mn as resolveOwnerDisplaySetting, Mt as setConfigValueAtPath, Nr as OLLAMA_NATIVE_BASE_URL, Nt as unsetConfigValueAtPath, On as DEFAULT_SUBAGENT_MAX_SPAWN_DEPTH, Ot as setConfigOverride, Pn as dedupeProfileIds, Pr as createOllamaStreamFn, Q as isInboundPathAllowed, Rr as buildUsageWithNoCost, Tr as retryAsync, U as resolveConfigSnapshotHash, Un as findNormalizedProviderValue, V as readConfigFileSnapshot, Vn as buildConfiguredAllowlistKeys, Vr as requireApiKey, Vt as buildEnforcedShellCommand, Wr as resolveEnvApiKey, X as resolveTelegramCustomCommands, Xn as normalizeProviderId, Y as normalizeTelegramCommandName, _t as isAvatarHttpUrl, a as getSoonestCooldownExpiry, ai as normalizeSecretInput, bn as resolveSlackNativeStreaming, bt as isSupportedLocalAvatarExtension, c as markAuthProfileUsed, ci as splitTrailingAuthProfile, d as resolveApiKeyForProfile, di as DEFAULT_PROVIDER, er as resolveConfiguredModelRef, et as resolveIMessageAttachmentRoots, f as evaluateStoredCredentialEligibility, fi as resolveAuthProfileDisplayLabel, fn as applyMergePatch, gt as isAvatarDataUrl, ht as AVATAR_MAX_BYTES, i as clearExpiredCooldowns, ir as resolveReasoningDefault, jt as parseConfigPath, kn as resolveAgentMaxConcurrent, kt as unsetConfigOverride, li as DEFAULT_CONTEXT_TOKENS, nt as normalizeScpRemoteHost, o as isProfileInCooldown, or as resolveSubagentSpawnModelSelection, p as resolveTokenExpiryState, pt as parseDurationMs, qn as modelKey, qr as getShellPathFromLoginShell, r as resolveAuthProfileOrder, rr as resolveModelRefFromString, rt as parseNonNegativeByteSize, s as markAuthProfileFailure, sr as resolveThinkingDefault, tr as resolveDefaultModelForAgent, tt as resolveIMessageRemoteAttachmentRoots, u as resolveProfilesUnavailableReason, ui as DEFAULT_MODEL, vn as mapStreamingModeToSlackLegacyDraftStreamMode, wr as resolveRetryConfig, wt as validateJsonSchemaValue, xn as resolveSlackStreamingMode, yn as resolveDiscordPreviewStreamMode, yt as isPathWithinRoot, z as loadConfig, zr as getApiKeyForModel } from "./auth-profiles-BtxyXCZY.js";
10
+ import { t as formatCliCommand } from "./command-format-MESnUO9S.js";
11
+ import { D as filterBootstrapFilesForSession, E as ensureAgentWorkspace, M as resolveAgentModelFallbackValues, N as resolveAgentModelPrimaryValue, P as toAgentModelListLike, _ as DEFAULT_AGENT_WORKSPACE_DIR, a as resolveAgentDir, b as DEFAULT_IDENTITY_FILENAME, d as resolveDefaultAgentId, f as resolveEffectiveModelFallbacks, h as resolveSessionAgentIds, i as resolveAgentConfig, k as loadWorkspaceBootstrapFiles, l as resolveAgentSkillsFilter, m as resolveSessionAgentId, p as resolveRunModelFallbacksOverride, r as listAgentIds, t as hasConfiguredModelFallbacks, u as resolveAgentWorkspaceDir, v as DEFAULT_BOOTSTRAP_FILENAME } from "./agent-scope-BcruZHHR.js";
12
+ import { D as resolveThreadParentSessionKey, E as parseAgentSessionKey, S as isAcpSessionKey, T as isSubagentSessionKey, _ as normalizeAccountId$2, b as deriveSessionChatType, c as normalizeAgentId, d as resolveThreadSessionKeys, f as sanitizeAgentId, g as DEFAULT_ACCOUNT_ID, i as buildAgentPeerSessionKey, l as normalizeMainKey, n as DEFAULT_MAIN_KEY, o as classifySessionKeyShape, p as scopedHeartbeatWakeOptions, r as buildAgentMainSessionKey, s as isValidAgentId, t as DEFAULT_AGENT_ID, u as resolveAgentIdFromSessionKey, v as normalizeOptionalAccountId, w as isCronSessionKey, x as getSubagentDepth, y as isBlockedObjectKey } from "./session-key-CC77ya0a.js";
13
+ import { C as sliceUtf16Safe, E as isPlainObject, S as sleep$1, T as truncateUtf16Safe, b as shortenHomeInString, c as escapeRegExp, p as normalizeE164, r as clampInt, t as CONFIG_DIR, u as isRecord$1, v as resolveUserPath, x as shortenHomePath } from "./utils-BnC3HGtm.js";
14
+ import { a as openBoundaryFileSync, h as normalizeWindowsPathForComparison, i as openBoundaryFile, t as resolveOpenClawPackageRoot } from "./openclaw-root-T5G2ldGE.js";
15
+ import { i as logWarn, n as logError, r as logInfo, t as logDebug } from "./logger-DyQjakwH.js";
16
+ import { n as runExec, r as spawnWithFallback, t as runCommandWithTimeout } from "./exec-B8Hv4Nkd.js";
17
+ import { c as normalizeResolvedSecretInputString, i as coerceSecretRef } from "./types.secrets-CpVqMFti.js";
18
+ import { n as saveJsonFile, t as loadJsonFile } from "./json-file-CNp4GTiH.js";
19
+ import { a as safeStatSync, d as normalizePluginsConfig, f as resolveEffectiveEnableState, h as isDangerousHostEnvVarName, i as isPathInside, l as applyTestPluginDefaults, n as loadPluginManifestRegistry, p as resolveMemorySlotDecision, r as discoverOpenClawPlugins } from "./manifest-registry-m_hXBIk-.js";
20
+ import { t as VERSION } from "./version-DT-JIO28.js";
21
+ import { C as matchPluginCommand, D as triggerInternalHook, O as registerContextEngine, S as listPluginCommands, T as createInternalHookEvent, _ as createPluginRegistry, b as executePluginCommand, c as normalizeAnyChannelId, d as getActivePluginRegistry, f as getActivePluginRegistryKey, h as setActivePluginRegistry, k as resolveContextEngine, l as normalizeChannelId$1, m as requireActivePluginRegistry, n as CHAT_CHANNEL_ORDER, v as normalizePluginHttpPath, x as getPluginCommandSpecs, y as clearPluginCommands } from "./registry-DnJ84ILp.js";
22
+ import { a as resolveChannelGroupRequireMention, c as normalizeHyphenSlug, i as resolveChannelGroupPolicy, l as normalizeStringEntries, n as listChannelDocks, r as normalizeSignalMessagingTarget, s as normalizeAtHashSlug, t as getChannelDock, u as normalizeStringEntriesLower } from "./dock-nMBfeGKa.js";
23
+ import { t as runTasksWithConcurrency } from "./run-with-concurrency-CLARJMM7.js";
24
+ import { n as recordCommandPoll, r as resetCommandPollCount } from "./command-poll-backoff-Dal4OaUV.js";
25
+ import { a as stripSilentToken, i as isSilentReplyText, n as SILENT_REPLY_TOKEN, r as isSilentReplyPrefixText, t as HEARTBEAT_TOKEN } from "./tokens-C3eENCf9.js";
26
+ import { _ as webAuthExists, c as logWebSelfId, i as resolveWhatsAppAccount, l as logoutWeb, p as readWebSelfId, s as getWebAuthAgeMs, y as resolveAccountEntry } from "./accounts-C04lw_uh.js";
27
+ import { A as resolveSlackBotToken, D as resolveSlackAccount, F as listEnabledDiscordAccounts, L as resolveDiscordAccount, M as inspectDiscordAccount, N as createDiscordActionGate, O as resolveSlackReplyToMode, R as normalizeDiscordToken, S as listAcpBindings, a as isWhatsAppGroupJid, c as createTelegramActionGate, f as resolveTelegramAccount, j as normalizeChatType, k as resolveSlackAppToken, l as listEnabledTelegramAccounts, m as resolveTelegramToken, n as listChannelPlugins, o as normalizeWhatsAppTarget, p as resolveTelegramPollActionGateState, r as normalizeChannelId$2, t as getChannelPlugin, u as listTelegramAccountIds, v as buildChannelAccountBindings, y as listBindings } from "./plugins-CCkC0dRo.js";
28
+ import { a as resolveSlackWebClientOptions, c as buildSlackBlocksFallbackText, i as createSlackWebClient, l as parseSlackTarget, n as markdownToSlackMrkdwnChunks, o as parseSlackBlocksInput, r as normalizeSlackOutboundText, s as validateSlackBlocksArray, t as sendMessageSlack, u as resolveSlackChannelId } from "./send-CIW-foVz.js";
29
+ import { $ as stripUndefinedFields, A as unpinMessageDiscord, At as resolveChannelEntryMatchWithFallback, B as listScheduledEventsDiscord, C as editMessageDiscord, Ct as resolveDiscordSystemLocation, D as pinMessageDiscord, Dt as applyChannelMatchMeta, E as listThreadsDiscord, Et as fetchDiscord, F as fetchMemberInfoDiscord, G as uploadStickerDiscord, H as timeoutMemberDiscord, I as fetchRoleInfoDiscord, J as editChannelDiscord, K as createChannelDiscord, L as fetchVoiceStatusDiscord, M as banMemberDiscord, N as createScheduledEventDiscord, O as readMessagesDiscord, Ot as buildChannelKeyCandidates, P as fetchChannelInfoDiscord, Q as sendDiscordText, R as kickMemberDiscord, S as deleteMessageDiscord, St as formatDiscordUserTag, T as listPinsDiscord, Tt as DiscordApiError, U as listGuildEmojisDiscord, V as removeRoleDiscord, W as uploadEmojiDiscord, X as removeChannelPermissionDiscord, Y as moveChannelDiscord, Z as setChannelPermissionDiscord, _ as sendStickerDiscord, _t as resolveDiscordOwnerAllowFrom, a as sendDiscordComponentMessage, at as parseDiscordTarget, b as formatMention, bt as shouldEmitDiscordReactionNotification, c as parseDiscordComponentCustomId, ct as listDiscordDirectoryPeersLive, d as parseDiscordModalCustomIdForCarbon, dt as normalizeDiscordSlug, et as fetchChannelPermissionsDiscord, f as readDiscordComponentSpec, ft as resolveDiscordAllowListMatch, g as sendPollDiscord, gt as resolveDiscordOwnerAccess, h as sendMessageDiscord, ht as resolveDiscordMemberAccessState, i as removeReactionDiscord, it as createDiscordRestClient, j as addRoleDiscord, k as searchMessagesDiscord, kt as normalizeChannelSlug, l as parseDiscordComponentCustomIdForCarbon, lt as isDiscordGroupAllowedByPolicy, m as resolveDiscordModalEntry, mt as resolveDiscordGuildEntry, n as reactMessageDiscord, nt as chunkDiscordTextWithMode, o as createDiscordFormModal, ot as resolveDiscordChannelId, p as resolveDiscordComponentEntry, pt as resolveDiscordChannelConfigWithFallback, q as deleteChannelDiscord, r as removeOwnReactionsDiscord, rt as createDiscordClient, s as formatDiscordComponentEventText, st as listDiscordDirectoryGroupsLive, t as fetchReactionsDiscord, tt as hasAnyGuildPermissionDiscord, u as parseDiscordModalCustomId, ut as normalizeDiscordAllowList, v as sendVoiceMessageDiscord, vt as resolveDiscordShouldRequireMention, w as fetchMessageDiscord, wt as resolveTimestampMs, x as createThreadDiscord, xt as formatDiscordReactionEmoji, y as sendWebhookMessageDiscord, yt as resolveGroupDmAllow, z as listGuildChannelsDiscord } from "./send-CFNNbHEA.js";
30
+ import { t as getMachineDisplayName } from "./machine-name-BWZ0tBHk.js";
31
+ import { n as generateSecureUuid, t as generateSecureToken } from "./secure-random-B2UrD2xa.js";
32
+ import { A as initializeGlobalHookRunner, C as resolveReplyToMode, D as parseReplyDirectives, E as normalizeTargetForProvider, M as joinPresentTextSegments, O as splitMediaFromOutput, S as createReplyToModeFilterForChannel, T as normalizeChannelTargetInput, _ as filterMessagingToolDuplicates, a as normalizeOutboundPayloadsForJson, b as shouldSuppressMessagingToolReplies, c as deriveInboundMessageHookContext, d as toInternalMessageTranscribedContext, f as toPluginMessageContext, g as applyReplyThreading, h as applyReplyTagsToPayload, i as normalizeOutboundPayloads, k as getGlobalHookRunner, l as toInternalMessagePreprocessedContext, m as fireAndForgetHook, o as normalizeReplyPayloadsForDelivery, p as toPluginMessageReceivedEvent, r as formatOutboundPayloadLog, s as throwIfAborted, t as deliverOutboundPayloads, u as toInternalMessageReceivedContext, v as filterMessagingToolMediaDuplicates, w as buildTargetResolverSignature, x as shouldSuppressReasoningPayload, y as isRenderablePayload } from "./deliver-Bge0HwrF.js";
33
+ import { a as logMessageQueued, c as logWebhookError, d as startDiagnosticHeartbeat, f as stopDiagnosticHeartbeat, h as isDiagnosticsEnabled, i as logMessageProcessed, l as logWebhookProcessed, m as emitDiagnosticEvent, o as logSessionStateChange, p as getDiagnosticSessionState, t as diag, u as logWebhookReceived } from "./diagnostic-CXxZq_XY.js";
34
+ import { d as enqueueCommandInLane, l as triggerOpenClawRestart, o as scheduleGatewaySigusr1Restart, p as getQueueSize, u as clearCommandLane, y as CommandLane } from "./restart-D97MOP8K.js";
35
+ import { i as resolveSignalAccount, t as listEnabledSignalAccounts } from "./accounts-CtzU1wJb.js";
36
+ import { i as resolveTelegramTargetChatType, r as parseTelegramTarget } from "./targets-DPUt073v.js";
37
+ import { c as detectMime, d as imageMimeFromFormat, f as isAudioFileName, g as MAX_IMAGE_BYTES, i as getImageMetadata, l as extensionForMime, m as kindFromMime, p as isGifMedia, s as resizeToJpeg, v as mediaKindFromMime } from "./image-ops-Bnk-bI_x.js";
38
+ import { A as describeReplyTarget, B as resolveTelegramStreamMode, C as buildSenderLabel, D as buildTelegramParentPeer, E as buildTelegramGroupPeerId, F as resolveTelegramDirectPeerId, G as resolveSenderAllowMatch$1, H as isSenderAllowed$1, I as resolveTelegramForumThreadId, J as isVoiceCompatibleAudio, K as formatLocationText, L as resolveTelegramGroupAllowFromContext, M as extractTelegramLocation, N as hasBotMention, O as buildTelegramThreadParams, P as normalizeForwardedContext, R as resolveTelegramMediaPlaceholder, S as buildGroupLabel, T as buildTelegramGroupFrom, U as normalizeAllowFrom$2, V as resolveTelegramThreadSpec, W as normalizeDmAllowFromWithStore$1, _ as splitTelegramCaption, a as reactMessageTelegram, b as resolveCronStorePath, c as sendStickerTelegram, d as isRecoverableTelegramNetworkError, f as markdownToTelegramChunks, g as resolveTelegramFetch, h as wrapFileReferencesInHtml, i as editMessageTelegram, j as expandTextLinks, k as buildTypingThreadParams, l as resolveTelegramVoiceSend, m as renderTelegramHtmlText, n as createForumTopicTelegram, o as sendMessageTelegram, p as markdownToTelegramHtml, q as toLocationContext, r as deleteMessageTelegram, s as sendPollTelegram, t as buildInlineKeyboard, u as wasSentByBot, v as withTelegramApiErrorLogging, w as buildSenderName, y as loadCronStore, z as resolveTelegramReplyId } from "./send-CZtdjq0Y.js";
39
+ import { n as discoverModels, t as discoverAuthStorage } from "./pi-model-discovery-6_opNECD.js";
40
+ import { a as isInternalMessageChannel, c as listDeliverableMessageChannels, d as resolveGatewayMessageChannel, f as resolveMessageChannel, g as GATEWAY_CLIENT_NAMES, h as GATEWAY_CLIENT_MODES, i as isGatewayMessageChannel, m as GATEWAY_CLIENT_IDS, n as isDeliverableMessageChannel, o as isMarkdownCapableMessageChannel, t as INTERNAL_MESSAGE_CHANNEL, u as normalizeMessageChannel } from "./message-channel-DOpIvru6.js";
41
+ import { A as isRawApiErrorPayload, B as resolveBootstrapTotalMaxChars, C as isCloudCodeAssistFormatError, D as isFailoverErrorMessage, E as isFailoverAssistantError, F as isTimeoutErrorMessage, I as buildBootstrapContextFiles, L as ensureSessionHeader, M as parseImageDimensionError, N as parseImageSizeError, O as isLikelyContextOverflowError, P as sanitizeUserFacingText, R as resolveBootstrapMaxChars, S as isBillingAssistantError, T as isContextOverflowError, V as sanitizeGoogleTurnOrdering, _ as formatAssistantErrorText, a as isMessagingToolDuplicateNormalized, b as getApiErrorPayloadFingerprint, c as extractToolCallsFromAssistant, d as downgradeOpenAIFunctionCallReasoningPairs, f as downgradeOpenAIReasoningBlocks, g as classifyFailoverReasonFromHttpStatus, h as classifyFailoverReason, j as isTransientHttpError, k as isRateLimitAssistantError, l as extractToolResultId, m as BILLING_ERROR_USER_MESSAGE, n as validateGeminiTurns, o as normalizeTextForComparison, p as isGoogleModelApi, r as pickFallbackThinkingLevel, s as sanitizeSessionMessagesImages, t as validateAnthropicTurns, u as sanitizeToolCallIdsForCloudCodeAssist, v as formatBillingErrorMessage, w as isCompactionFailureError, x as isAuthAssistantError, y as formatRawAssistantErrorForUi, z as resolveBootstrapPromptTruncationWarningMode } from "./pi-embedded-helpers-CCkKNz_h.js";
42
+ import { C as resolveToolProfilePolicy, S as normalizeToolName, T as matchesAnyGlobPattern, _ as collectExplicitAllowlist, a as ensureSandboxWorkspaceForSession, b as stripPluginOnlyAllowlist, c as resolveSandboxRuntimeStatus, d as getBridgeAuthForPort, f as resolveSandboxConfigForAgent, g as buildPluginToolGroups, h as applyOwnerOnlyToolPolicy, o as resolveSandboxContext, v as expandPolicyWithPluginGroups, w as compileGlobPatterns, y as mergeAlsoAllowPolicy } from "./sandbox-DKscghPx.js";
43
+ import { j as DEFAULT_AI_SNAPSHOT_MAX_CHARS } from "./chrome-D4EfbMKb.js";
44
+ import { i as isLoopbackHost } from "./ws-BwH2d97O.js";
45
+ import { i as trimToUndefined, n as resolveGatewayCredentialsFromConfig } from "./credentials-SIFZMlmo.js";
46
+ import { c as resolveBrowserControlAuth, i as resolveBrowserConfig } from "./server-context-CcW_Z5sB.js";
47
+ import { a as resolveSkillsPromptForRun, d as resolveSandboxInputPath, h as applySkillEnvOverridesFromSnapshot, i as loadWorkspaceSkillEntries, l as assertMediaNotDataUrl, m as applySkillEnvOverrides, p as resolveSandboxedMediaSource, r as buildWorkspaceSkillSnapshot, u as assertSandboxPath } from "./skills-Cp-zTGor.js";
48
+ import { t as PATH_ALIAS_POLICIES } from "./path-alias-guards-Bz8AnRb7.js";
49
+ import { i as resolveExistingPathsWithinRoot, r as DEFAULT_UPLOAD_DIR } from "./paths-BBXgPm_n.js";
50
+ import { a as testRegexWithBoundedInput, i as compileSafeRegex, n as redactSensitiveText } from "./redact-B1GVGbib.js";
51
+ import { i as formatUncaughtError, r as formatErrorMessage, s as readErrorName } from "./errors-ClLWB67m.js";
52
+ import { i as openFileWithinRoot, l as writeFileWithinRoot, n as copyFileWithinRoot, o as readFileWithinRoot, r as createRootScopedReadFile, t as SafeOpenError } from "./fs-safe-CFIinCN2.js";
53
+ import { a as isBlockedHostnameOrIp, c as normalizeHostname, n as SsrFBlockedError } from "./proxy-env-a_fwG5uV.js";
54
+ import { i as saveMediaBuffer, r as getMediaDir, t as MEDIA_MAX_BYTES } from "./store-DCoVH3mG.js";
55
+ import { r as writeJsonAtomic } from "./json-files-BH1UBATr.js";
56
+ import { B as evaluateSessionFreshness, C as normalizeSessionDeliveryFields, D as capArrayByJsonBytes, E as archiveSessionTranscripts, F as parseInlineDirectives$1, G as DEFAULT_RESET_TRIGGERS, H as resolveSessionResetPolicy, J as setSessionRuntimeModel, K as mergeSessionEntry, Q as resolveMainSessionKey, R as jsonUtf8Bytes, S as normalizeDeliveryContext, U as resolveSessionResetType, V as resolveChannelResetConfig, W as resolveThreadFlag, Z as resolveExplicitAgentSessionKey, _ as isCacheEnabled, a as resolveAndPersistSessionFile, b as deliveryContextKey, c as recordSessionMetaFromInbound, d as updateSessionStore, et as deriveSessionMetaPatch, f as updateSessionStoreEntry, lt as resolveSessionLockMaxHoldFromTimeout, n as parseSessionThreadInfo, nt as resolveConversationLabel, o as loadSessionStore, ot as resolveGroupSessionKey, q as resolveFreshSessionTotalTokens, r as appendAssistantMessageToSessionTranscript, s as readSessionUpdatedAt, st as acquireSessionWriteLock, t as extractDeliveryInfo, u as updateLastRoute, v as resolveCacheTtlMs$1, w as normalizeAccountId$3, x as mergeDeliveryContext, y as deliveryContextFromSession, z as resolveSessionKey } from "./sessions-BkKVGWHa.js";
57
+ import { r as resolveIMessageAccount } from "./accounts-BVV0eCmx.js";
58
+ import { c as resolveStorePath, i as resolveSessionTranscriptPath, n as resolveSessionFilePath, r as resolveSessionFilePathOptions, t as resolveDefaultSessionStorePath } from "./paths-gTdorMgW.js";
59
+ import { i as normalizeInputProvenance, n as applyInputProvenanceToUserMessage, r as hasInterSessionUserProvenance } from "./input-provenance-qgaZGYuK.js";
60
+ import { n as onSessionTranscriptUpdate, t as emitSessionTranscriptUpdate } from "./transcript-events-CdWLIofg.js";
61
+ import { a as canonicalizeBase64, i as resolveImageSanitizationLimits, n as sanitizeImageBlocks, o as estimateBase64DecodedBytes, r as sanitizeToolResultImages } from "./tool-images-BwtNIRsT.js";
62
+ import { a as normalizeElevatedLevel, c as normalizeUsageDisplay, d as supportsXHighThinking, l as normalizeVerboseLevel, n as formatXHighModelHint, o as normalizeReasoningLevel, s as normalizeThinkLevel, t as formatThinkingLevels, u as resolveResponseUsageMode } from "./thinking-C0gzzPsv.js";
63
+ import { i as resolveContextWindowInfo, n as CONTEXT_WINDOW_WARN_BELOW_TOKENS, r as evaluateContextWindowGuard, t as CONTEXT_WINDOW_HARD_MIN_TOKENS } from "./context-window-guard-BUJ2pfYi.js";
64
+ import { t as ensureOpenClawModelsJson } from "./models-config-D_IvpQGa.js";
65
+ import { n as evaluateShellAllowlist, r as resolveAllowAlwaysPatterns } from "./exec-approvals-allowlist-dlIMsRq0.js";
66
+ import { n as resolveExecSafeBinRuntimePolicy, r as resolveMergedSafeBinProfileFixtures } from "./exec-safe-bin-runtime-policy-Ds-cMyOt.js";
67
+ import { n as loadModelCatalog, r as modelSupportsVision, t as findModelInCatalog } from "./model-catalog-DtjVcDuN.js";
68
+ import { a as getDefaultMediaLocalRoots, i as getAgentScopedMediaLocalRoots, n as fetchRemoteMedia, r as readResponseWithLimit, t as MediaFetchError } from "./fetch-BPh3R9xH.js";
69
+ import { a as resolveAutoImageModel, c as applyTemplate, d as normalizeMediaUnderstandingChatType, f as resolveMediaUnderstandingScope, g as registerUnhandledRejectionHandler, i as normalizeMediaAttachments, l as resolveConcurrency, m as buildRandomTempFilePath, n as buildProviderRegistry, o as resolveMediaAttachmentLocalRoots, p as CLI_OUTPUT_MAX_BUFFER, r as createMediaAttachmentCache, s as runCapability, t as runAudioTranscription, u as resolveTimeoutMs$1, v as resolveAttachmentKind } from "./audio-transcription-runner-bvBQs8UB.js";
70
+ import { n as fetchWithTimeout, t as bindAbortRelay } from "./fetch-timeout-EpWPz-Eu.js";
71
+ import { n as withStrictGuardedFetchMode, r as withTrustedEnvProxyGuardedFetchMode, t as fetchWithSsrFGuard } from "./fetch-guard-hL-C2yQz.js";
72
+ import { _ as stripReasoningTagsFromText, a as resolveProviderVisionModelFromConfig, b as extractTextFromChatContent, c as extractThinkingFromTaggedStream, d as inferToolMetaFromArgs, f as isAssistantMessage, g as stripThinkingTagsFromText, h as stripMinimaxToolCallXml, i as decodeDataUrl, l as extractThinkingFromTaggedText, m as stripDowngradedToolCallText, n as coerceImageAssistantText, o as extractAssistantText$1, p as promoteThinkingTagsToBlocks, r as coerceImageModelConfig, s as extractAssistantThinking, u as formatReasoningMessage, v as findCodeRegions, x as minimaxUnderstandImage, y as isInsideCode } from "./image-m1GU1uco.js";
73
+ import { n as formatToolSummary, r as resolveToolDisplay } from "./tool-display-qTfeZx-b.js";
74
+ import { t as makeProxyFetch } from "./proxy-fetch-B-9MM6tH.js";
75
+ import { _ as isSafeFenceBreak, a as loadWebMedia, c as chunkByNewline, d as chunkMarkdownTextWithMode, f as chunkText, g as findFenceSpanAt, h as resolveTextChunkLimit, i as getDefaultLocalRoots, m as resolveChunkMode, o as loadWebMediaRaw, p as chunkTextWithMode, s as resolveMarkdownTableMode, u as chunkMarkdownText, v as parseFenceSpans } from "./ir-BjnGKA2N.js";
76
+ import { a as ToolInputError, c as imageResultFromFile, d as readNumberParam, f as readReactionParams, h as readStringParam, l as jsonResult, m as readStringOrNumberParam, n as missingTargetError, o as createActionGate, p as readStringArrayParam, r as unknownTargetError, s as imageResult, t as ambiguousTargetError, u as parseAvailableTags } from "./target-errors-CkcKdefZ.js";
77
+ import { a as resolveNativeSkillsEnabled, i as resolveNativeCommandsEnabled, n as isNativeCommandsExplicitlyDisabled, r as isRestartEnabled, t as isCommandFlagEnabled } from "./commands-BoGUirwW.js";
78
+ import { a as listChatCommandsForConfig, c as maybeResolveTextAlias, d as resolveCommandArgChoices, f as resolveCommandArgMenu, i as listChatCommands, l as normalizeCommandBody, m as shouldHandleTextCommands, n as findCommandByNativeName, o as listNativeCommandSpecs, p as serializeCommandArgs, r as isCommandEnabled, s as listNativeCommandSpecsForConfig, t as buildCommandTextFromArgs, u as parseCommandArgs } from "./commands-registry-Dn_5_JYs.js";
79
+ import { c as hasNonzeroUsage, l as makeZeroUsageSnapshot, n as loadCostUsageSummary, o as derivePromptTokens, r as loadSessionCostSummary, s as deriveSessionTotalTokens, u as normalizeUsage } from "./session-cost-usage-CBHvFXhD.js";
80
+ import { i as redactIdentifier, t as getActiveWebListener } from "./active-listener-NprMzFx6.js";
81
+ import { v as extractKeywords, y as isQueryStopWordToken } from "./sqlite-BOrw_KhN.js";
82
+ import { Rt as SESSION_LABEL_MAX_LENGTH, t as GatewayClient } from "./client-Bvvecv3V.js";
83
+ import { a as randomIdempotencyKey, f as resolveLeastPrivilegeOperatorScopesForMethod, n as callGateway, r as callGatewayLeastPrivilege, t as buildGatewayConnectionDetails } from "./call-DL23sPxF.js";
84
+ import { n as wrapFetchWithAbortSignal, t as resolveFetch } from "./fetch-DyJnPUwL.js";
85
+ import { n as formatTimeAgo } from "./format-relative-BsYuWm-Q.js";
86
+ import { c as readJsonFileWithFallback, d as listPairingChannels, i as readChannelAllowFromStore, l as writeJsonFileAtomically, o as removeChannelAllowFromStoreEntry, s as upsertChannelPairingRequest, t as addChannelAllowFromStoreEntry } from "./pairing-store-CXFEv3Gr.js";
87
+ import { d as resolveExecApprovals, f as resolveExecApprovalsFromFile, i as maxAsk, l as recordAllowlistUse, n as addAllowlistEntry, o as minSecurity, u as requiresExecApproval } from "./exec-approvals-Bh1osORd.js";
88
+ import { C as mergePathPrepend, S as findPathKey, a as canvasSnapshotTempPath, b as buildNodeShellCommand, c as parseCameraClipPayload, d as writeCameraClipPayloadToFile, f as writeCameraPayloadToFile, i as parseEnvPairs, l as parseCameraSnapPayload, n as screenRecordTempPath, o as parseCanvasSnapshotPayload, p as parsePreparedSystemRunPayload, r as writeScreenRecordToFile, s as cameraTempPath, t as parseScreenRecordPayload, u as writeBase64ToFile, w as normalizePathPrepend, x as applyPathPrepend } from "./nodes-screen-X8daVm8e.js";
89
+ import { t as killProcessTree$1 } from "./kill-tree-W9BwtYuE.js";
90
+ import { t as formatExecCommand } from "./system-run-command-Kw0jxir0.js";
91
+ import { i as parsePairingList, n as resolveNodeIdFromNodeList, r as parseNodeList, t as resolveNodeFromNodeList } from "./node-resolve-DSu0lzHd.js";
92
+ import { i as formatDurationSeconds, r as formatDurationPrecise, t as formatDurationCompact$1 } from "./format-duration-CrBESKOT.js";
93
+ import { a as loadCombinedSessionStoreForGateway, d as resolveContextTokensForModel, f as computeBackoff, p as sleepWithAbort, u as lookupContextTokens } from "./session-utils-t4ZmEDMj.js";
94
+ import { i as resolveModelCostConfig, n as formatTokenCount$2, r as formatUsd, t as estimateUsageCost } from "./usage-format-zuuFSdkg.js";
95
+ import { a as getRemoteSkillEligibility, b as getSkillsSnapshotVersion, i as resolveSkillCommandInvocation, n as listSkillCommandsForAgents, r as listSkillCommandsForWorkspace, t as listReservedChatSlashCommandNames, y as ensureSkillsWatcher } from "./skill-commands-Dyi0nIIE.js";
96
+ import { _ as hasResolvedCredentialValue, a as resolveSubagentToolPolicy, c as readStoreAllowFromForDmPolicy, d as resolveDmGroupAccessWithLists, f as resolvePinnedMainDmOwnerFromAllowlist, g as hasConfiguredUnavailableCredentialStatus, h as inspectReadOnlyChannelAccount, i as resolveGroupToolPolicy, m as resolveControlCommandGate, n as isToolAllowedByPolicies, p as resolveCommandAuthorizedFromAuthorizers, r as resolveEffectiveToolPolicy, s as DM_GROUP_ACCESS_REASON, t as filterToolsByPolicy, v as projectSafeChannelAccountSnapshotFields } from "./pi-tools.policy-U1G3dAzL.js";
97
+ import { n as recordChannelActivity, r as createDiscordRetryRunner, t as getChannelActivity } from "./channel-activity-DItBzFyQ.js";
98
+ import { t as buildOutboundMediaLoadOptions } from "./load-options-BuY2PXsl.js";
99
+ import { n as normalizePollInput, r as resolvePollMaxSelections } from "./polls-QrTzhQf5.js";
100
+ import { t as convertMarkdownTables } from "./tables-D4LxfXpk.js";
101
+ import { i as startBrowserControlServiceFromConfig, n as createBrowserRouteDispatcher, r as createBrowserControlContext, t as withTimeout$4 } from "./with-timeout-DKgjtZv2.js";
102
+ import { i as parseAbsoluteTimeMs, r as resolveDefaultCronStaggerMs, t as normalizeCronStaggerMs } from "./stagger-Cek4Eizw.js";
103
+ import { n as resolveMessageChannelSelection, t as listConfiguredMessageChannels } from "./channel-selection-BnXQH0vV.js";
104
+ import { t as applyPluginAutoEnable } from "./plugin-auto-enable-3v7X3qMK.js";
105
+ import { a as signalCheck, i as resolveSignalRpcContext, n as sendReadReceiptSignal, o as signalRpcRequest, r as sendTypingSignal, s as streamSignalEvents, t as sendMessageSignal } from "./send-C2xEPjDg.js";
106
+ import { a as isAllowedIMessageSender, i as formatIMessageChatTarget, n as createIMessageRpcClient, o as normalizeIMessageHandle, r as DEFAULT_IMESSAGE_PROBE_TIMEOUT_MS, s as parseIMessageTarget, t as sendMessageIMessage } from "./send-BSbPEzn5.js";
107
+ import { n as isSenderIdAllowed, r as mergeDmAllowFromSources, t as firstDefined$1 } from "./allow-from-D5r7UcQr.js";
108
+ import { t as parseTimeoutMs } from "./parse-timeout-BS3EWcf6.js";
109
+ import { a as runDiscordTaskWithTimeout, i as normalizeDiscordListenerTimeoutMs, r as normalizeDiscordInboundWorkerTimeoutMs } from "./timeouts-DEnpCqGd.js";
110
+ import { n as isDangerousNameMatchingEnabled } from "./dangerous-name-matching-PRkNIyQj.js";
111
+ import { s as resolveCommandSecretRefsViaGateway, t as getAgentRuntimeCommandSecretTargetIds } from "./command-secret-targets-C382v6Qd.js";
112
+ import { r as detectBinary } from "./onboard-helpers-BkwNJPNU.js";
113
+ import { t as resolvePairingIdLabel } from "./pairing-labels-B_3GjgjR.js";
114
+ import { i as resolveMemoryBackendConfig, n as registerMemoryCli, r as getMemorySearchManager } from "./memory-cli-yvsbLFgi.js";
115
+ import { i as resolveMemorySearchConfig } from "./manager-BVqjeGyT.js";
113
116
  import { createRequire } from "node:module";
114
- import { execFileSync, spawn, spawnSync } from "node:child_process";
117
+ import { execFileSync, spawn } from "node:child_process";
115
118
  import { fileURLToPath } from "node:url";
116
119
  import os, { homedir } from "node:os";
117
120
  import path, { isAbsolute } from "node:path";
@@ -399,234 +402,6 @@ function ensureContextEnginesInitialized() {
399
402
  registerLegacyContextEngine();
400
403
  }
401
404
 
402
- //#endregion
403
- //#region src/process/lanes.ts
404
- let CommandLane = /* @__PURE__ */ function(CommandLane) {
405
- CommandLane["Main"] = "main";
406
- CommandLane["Cron"] = "cron";
407
- CommandLane["Subagent"] = "subagent";
408
- CommandLane["Nested"] = "nested";
409
- return CommandLane;
410
- }({});
411
-
412
- //#endregion
413
- //#region src/process/command-queue.ts
414
- /**
415
- * Dedicated error type thrown when a queued command is rejected because
416
- * its lane was cleared. Callers that fire-and-forget enqueued tasks can
417
- * catch (or ignore) this specific type to avoid unhandled-rejection noise.
418
- */
419
- var CommandLaneClearedError = class extends Error {
420
- constructor(lane) {
421
- super(lane ? `Command lane "${lane}" cleared` : "Command lane cleared");
422
- this.name = "CommandLaneClearedError";
423
- }
424
- };
425
- /**
426
- * Dedicated error type thrown when a new command is rejected because the
427
- * gateway is currently draining for restart.
428
- */
429
- var GatewayDrainingError = class extends Error {
430
- constructor() {
431
- super("Gateway is draining for restart; new tasks are not accepted");
432
- this.name = "GatewayDrainingError";
433
- }
434
- };
435
- let gatewayDraining = false;
436
- const lanes = /* @__PURE__ */ new Map();
437
- let nextTaskId = 1;
438
- function getLaneState(lane) {
439
- const existing = lanes.get(lane);
440
- if (existing) return existing;
441
- const created = {
442
- lane,
443
- queue: [],
444
- activeTaskIds: /* @__PURE__ */ new Set(),
445
- maxConcurrent: 1,
446
- draining: false,
447
- generation: 0
448
- };
449
- lanes.set(lane, created);
450
- return created;
451
- }
452
- function completeTask(state, taskId, taskGeneration) {
453
- if (taskGeneration !== state.generation) return false;
454
- state.activeTaskIds.delete(taskId);
455
- return true;
456
- }
457
- function drainLane(lane) {
458
- const state = getLaneState(lane);
459
- if (state.draining) {
460
- if (state.activeTaskIds.size === 0 && state.queue.length > 0) diag.warn(`drainLane blocked: lane=${lane} draining=true active=0 queue=${state.queue.length}`);
461
- return;
462
- }
463
- state.draining = true;
464
- const pump = () => {
465
- try {
466
- while (state.activeTaskIds.size < state.maxConcurrent && state.queue.length > 0) {
467
- const entry = state.queue.shift();
468
- const waitedMs = Date.now() - entry.enqueuedAt;
469
- if (waitedMs >= entry.warnAfterMs) {
470
- try {
471
- entry.onWait?.(waitedMs, state.queue.length);
472
- } catch (err) {
473
- diag.error(`lane onWait callback failed: lane=${lane} error="${String(err)}"`);
474
- }
475
- diag.warn(`lane wait exceeded: lane=${lane} waitedMs=${waitedMs} queueAhead=${state.queue.length}`);
476
- }
477
- logLaneDequeue(lane, waitedMs, state.queue.length);
478
- const taskId = nextTaskId++;
479
- const taskGeneration = state.generation;
480
- state.activeTaskIds.add(taskId);
481
- (async () => {
482
- const startTime = Date.now();
483
- try {
484
- const result = await entry.task();
485
- if (completeTask(state, taskId, taskGeneration)) {
486
- diag.debug(`lane task done: lane=${lane} durationMs=${Date.now() - startTime} active=${state.activeTaskIds.size} queued=${state.queue.length}`);
487
- pump();
488
- }
489
- entry.resolve(result);
490
- } catch (err) {
491
- const completedCurrentGeneration = completeTask(state, taskId, taskGeneration);
492
- if (!(lane.startsWith("auth-probe:") || lane.startsWith("session:probe-"))) diag.error(`lane task error: lane=${lane} durationMs=${Date.now() - startTime} error="${String(err)}"`);
493
- if (completedCurrentGeneration) pump();
494
- entry.reject(err);
495
- }
496
- })();
497
- }
498
- } finally {
499
- state.draining = false;
500
- }
501
- };
502
- pump();
503
- }
504
- /**
505
- * Mark gateway as draining for restart so new enqueues fail fast with
506
- * `GatewayDrainingError` instead of being silently killed on shutdown.
507
- */
508
- function markGatewayDraining() {
509
- gatewayDraining = true;
510
- }
511
- function setCommandLaneConcurrency(lane, maxConcurrent) {
512
- const cleaned = lane.trim() || CommandLane.Main;
513
- const state = getLaneState(cleaned);
514
- state.maxConcurrent = Math.max(1, Math.floor(maxConcurrent));
515
- drainLane(cleaned);
516
- }
517
- function enqueueCommandInLane(lane, task, opts) {
518
- if (gatewayDraining) return Promise.reject(new GatewayDrainingError());
519
- const cleaned = lane.trim() || CommandLane.Main;
520
- const warnAfterMs = opts?.warnAfterMs ?? 2e3;
521
- const state = getLaneState(cleaned);
522
- return new Promise((resolve, reject) => {
523
- state.queue.push({
524
- task: () => task(),
525
- resolve: (value) => resolve(value),
526
- reject,
527
- enqueuedAt: Date.now(),
528
- warnAfterMs,
529
- onWait: opts?.onWait
530
- });
531
- logLaneEnqueue(cleaned, state.queue.length + state.activeTaskIds.size);
532
- drainLane(cleaned);
533
- });
534
- }
535
- function getQueueSize(lane = CommandLane.Main) {
536
- const resolved = lane.trim() || CommandLane.Main;
537
- const state = lanes.get(resolved);
538
- if (!state) return 0;
539
- return state.queue.length + state.activeTaskIds.size;
540
- }
541
- function getTotalQueueSize() {
542
- let total = 0;
543
- for (const s of lanes.values()) total += s.queue.length + s.activeTaskIds.size;
544
- return total;
545
- }
546
- function clearCommandLane(lane = CommandLane.Main) {
547
- const cleaned = lane.trim() || CommandLane.Main;
548
- const state = lanes.get(cleaned);
549
- if (!state) return 0;
550
- const removed = state.queue.length;
551
- const pending = state.queue.splice(0);
552
- for (const entry of pending) entry.reject(new CommandLaneClearedError(cleaned));
553
- return removed;
554
- }
555
- /**
556
- * Reset all lane runtime state to idle. Used after SIGUSR1 in-process
557
- * restarts where interrupted tasks' finally blocks may not run, leaving
558
- * stale active task IDs that permanently block new work from draining.
559
- *
560
- * Bumps lane generation and clears execution counters so stale completions
561
- * from old in-flight tasks are ignored. Queued entries are intentionally
562
- * preserved — they represent pending user work that should still execute
563
- * after restart.
564
- *
565
- * After resetting, drains any lanes that still have queued entries so
566
- * preserved work is pumped immediately rather than waiting for a future
567
- * `enqueueCommandInLane()` call (which may never come).
568
- */
569
- function resetAllLanes() {
570
- gatewayDraining = false;
571
- const lanesToDrain = [];
572
- for (const state of lanes.values()) {
573
- state.generation += 1;
574
- state.activeTaskIds.clear();
575
- state.draining = false;
576
- if (state.queue.length > 0) lanesToDrain.push(state.lane);
577
- }
578
- for (const lane of lanesToDrain) drainLane(lane);
579
- }
580
- /**
581
- * Returns the total number of actively executing tasks across all lanes
582
- * (excludes queued-but-not-started entries).
583
- */
584
- function getActiveTaskCount() {
585
- let total = 0;
586
- for (const s of lanes.values()) total += s.activeTaskIds.size;
587
- return total;
588
- }
589
- /**
590
- * Wait for all currently active tasks across all lanes to finish.
591
- * Polls at a short interval; resolves when no tasks are active or
592
- * when `timeoutMs` elapses (whichever comes first).
593
- *
594
- * New tasks enqueued after this call are ignored — only tasks that are
595
- * already executing are waited on.
596
- */
597
- function waitForActiveTasks(timeoutMs) {
598
- const POLL_INTERVAL_MS = 50;
599
- const deadline = Date.now() + timeoutMs;
600
- const activeAtStart = /* @__PURE__ */ new Set();
601
- for (const state of lanes.values()) for (const taskId of state.activeTaskIds) activeAtStart.add(taskId);
602
- return new Promise((resolve) => {
603
- const check = () => {
604
- if (activeAtStart.size === 0) {
605
- resolve({ drained: true });
606
- return;
607
- }
608
- let hasPending = false;
609
- for (const state of lanes.values()) {
610
- for (const taskId of state.activeTaskIds) if (activeAtStart.has(taskId)) {
611
- hasPending = true;
612
- break;
613
- }
614
- if (hasPending) break;
615
- }
616
- if (!hasPending) {
617
- resolve({ drained: true });
618
- return;
619
- }
620
- if (Date.now() >= deadline) {
621
- resolve({ drained: false });
622
- return;
623
- }
624
- setTimeout(check, POLL_INTERVAL_MS);
625
- };
626
- check();
627
- });
628
- }
629
-
630
405
  //#endregion
631
406
  //#region src/utils/reaction-level.ts
632
407
  const LEVELS = new Set([
@@ -10843,7 +10618,7 @@ const LOOP_WARNING_BUCKET_SIZE = 10;
10843
10618
  const MAX_LOOP_WARNING_KEYS = 256;
10844
10619
  let beforeToolCallRuntimePromise = null;
10845
10620
  function loadBeforeToolCallRuntime() {
10846
- beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-r5_UoU-W.js");
10621
+ beforeToolCallRuntimePromise ??= import("./pi-tools.before-tool-call.runtime-BrFKAhWX.js");
10847
10622
  return beforeToolCallRuntimePromise;
10848
10623
  }
10849
10624
  function buildAdjustedParamsKey(params) {
@@ -17240,7 +17015,7 @@ async function runEmbeddedPiAgent(params) {
17240
17015
  await copilotTokenState.refreshInFlight;
17241
17016
  return;
17242
17017
  }
17243
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Byc_YVYE.js").then((n) => n.n);
17018
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-BKQ4nXAw.js").then((n) => n.n);
17244
17019
  copilotTokenState.refreshInFlight = (async () => {
17245
17020
  const githubToken = copilotTokenState.githubToken.trim();
17246
17021
  if (!githubToken) throw new Error("Copilot refresh requires a GitHub token.");
@@ -17332,7 +17107,7 @@ async function runEmbeddedPiAgent(params) {
17332
17107
  return;
17333
17108
  }
17334
17109
  if (model.provider === "github-copilot") {
17335
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Byc_YVYE.js").then((n) => n.n);
17110
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-BKQ4nXAw.js").then((n) => n.n);
17336
17111
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
17337
17112
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
17338
17113
  if (copilotTokenState) {
@@ -18734,7 +18509,7 @@ function normalizeReplyPayload(payload, opts = {}) {
18734
18509
  //#region src/auto-reply/reply/route-reply.ts
18735
18510
  let deliverRuntimePromise$2 = null;
18736
18511
  function loadDeliverRuntime$2() {
18737
- deliverRuntimePromise$2 ??= import("./deliver-runtime-CESEQ4NM.js");
18512
+ deliverRuntimePromise$2 ??= import("./deliver-runtime-s0eLCemL.js");
18738
18513
  return deliverRuntimePromise$2;
18739
18514
  }
18740
18515
  /**
@@ -20023,7 +19798,7 @@ const DEFAULT_SUBAGENT_ANNOUNCE_TIMEOUT_MS = 6e4;
20023
19798
  const MAX_TIMER_SAFE_TIMEOUT_MS = 2147e6;
20024
19799
  let subagentRegistryRuntimePromise = null;
20025
19800
  function loadSubagentRegistryRuntime() {
20026
- subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-Bjh1H1uK.js");
19801
+ subagentRegistryRuntimePromise ??= import("./subagent-registry-runtime-DVd9wO_D.js");
20027
19802
  return subagentRegistryRuntimePromise;
20028
19803
  }
20029
19804
  const DIRECT_ANNOUNCE_TRANSIENT_RETRY_DELAYS_MS = FAST_TEST_MODE ? [
@@ -23648,7 +23423,7 @@ async function runWithConcurrency(tasks, limit) {
23648
23423
  //#region src/media-understanding/echo-transcript.ts
23649
23424
  let deliverRuntimePromise$1 = null;
23650
23425
  function loadDeliverRuntime$1() {
23651
- deliverRuntimePromise$1 ??= import("./deliver-runtime-CESEQ4NM.js");
23426
+ deliverRuntimePromise$1 ??= import("./deliver-runtime-s0eLCemL.js");
23652
23427
  return deliverRuntimePromise$1;
23653
23428
  }
23654
23429
  const DEFAULT_ECHO_TRANSCRIPT_FORMAT = "📝 \"{transcript}\"";
@@ -36399,550 +36174,6 @@ async function reconcileAcpThreadBindingsOnStartup(params) {
36399
36174
  };
36400
36175
  }
36401
36176
 
36402
- //#endregion
36403
- //#region src/infra/restart-stale-pids.ts
36404
- const SPAWN_TIMEOUT_MS$1 = 2e3;
36405
- const STALE_SIGTERM_WAIT_MS = 600;
36406
- const STALE_SIGKILL_WAIT_MS = 400;
36407
- /**
36408
- * After SIGKILL, the kernel may not release the TCP port immediately.
36409
- * Poll until the port is confirmed free (or until the budget expires) before
36410
- * returning control to the caller (typically `triggerOpenClawRestart` →
36411
- * `systemctl restart`). Without this wait the new process races the dying
36412
- * process for the port and systemd enters an EADDRINUSE restart loop.
36413
- *
36414
- * POLL_SPAWN_TIMEOUT_MS is intentionally much shorter than SPAWN_TIMEOUT_MS
36415
- * so that a single slow or hung lsof invocation does not consume the entire
36416
- * polling budget. At 400 ms per call, up to five independent lsof attempts
36417
- * fit within PORT_FREE_TIMEOUT_MS = 2000 ms, each with a definitive outcome.
36418
- */
36419
- const PORT_FREE_POLL_INTERVAL_MS = 50;
36420
- const PORT_FREE_TIMEOUT_MS = 2e3;
36421
- const POLL_SPAWN_TIMEOUT_MS = 400;
36422
- const restartLog$1 = createSubsystemLogger("restart");
36423
- let sleepSyncOverride = null;
36424
- let dateNowOverride = null;
36425
- function getTimeMs() {
36426
- return dateNowOverride ? dateNowOverride() : Date.now();
36427
- }
36428
- function sleepSync(ms) {
36429
- const timeoutMs = Math.max(0, Math.floor(ms));
36430
- if (timeoutMs <= 0) return;
36431
- if (sleepSyncOverride) {
36432
- sleepSyncOverride(timeoutMs);
36433
- return;
36434
- }
36435
- try {
36436
- const lock = new Int32Array(new SharedArrayBuffer(4));
36437
- Atomics.wait(lock, 0, 0, timeoutMs);
36438
- } catch {
36439
- const start = Date.now();
36440
- while (Date.now() - start < timeoutMs);
36441
- }
36442
- }
36443
- /**
36444
- * Parse openclaw gateway PIDs from lsof -Fpc stdout.
36445
- * Pure function — no I/O. Excludes the current process.
36446
- */
36447
- function parsePidsFromLsofOutput(stdout) {
36448
- const pids = [];
36449
- let currentPid;
36450
- let currentCmd;
36451
- for (const line of stdout.split(/\r?\n/).filter(Boolean)) if (line.startsWith("p")) {
36452
- if (currentPid != null && currentCmd && currentCmd.toLowerCase().includes("openclaw")) pids.push(currentPid);
36453
- const parsed = Number.parseInt(line.slice(1), 10);
36454
- currentPid = Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
36455
- currentCmd = void 0;
36456
- } else if (line.startsWith("c")) currentCmd = line.slice(1);
36457
- if (currentPid != null && currentCmd && currentCmd.toLowerCase().includes("openclaw")) pids.push(currentPid);
36458
- return [...new Set(pids)].filter((pid) => pid !== process.pid);
36459
- }
36460
- /**
36461
- * Find PIDs of gateway processes listening on the given port using synchronous lsof.
36462
- * Returns only PIDs that belong to openclaw gateway processes (not the current process).
36463
- */
36464
- function findGatewayPidsOnPortSync(port, spawnTimeoutMs = SPAWN_TIMEOUT_MS$1) {
36465
- if (process.platform === "win32") return [];
36466
- const res = spawnSync(resolveLsofCommandSync(), [
36467
- "-nP",
36468
- `-iTCP:${port}`,
36469
- "-sTCP:LISTEN",
36470
- "-Fpc"
36471
- ], {
36472
- encoding: "utf8",
36473
- timeout: spawnTimeoutMs
36474
- });
36475
- if (res.error) {
36476
- const code = res.error.code;
36477
- const detail = code && code.trim().length > 0 ? code : res.error instanceof Error ? res.error.message : "unknown error";
36478
- restartLog$1.warn(`lsof failed during initial stale-pid scan for port ${port}: ${detail}`);
36479
- return [];
36480
- }
36481
- if (res.status === 1) return [];
36482
- if (res.status !== 0) {
36483
- restartLog$1.warn(`lsof exited with status ${res.status} during initial stale-pid scan for port ${port}; skipping stale pid check`);
36484
- return [];
36485
- }
36486
- return parsePidsFromLsofOutput(res.stdout);
36487
- }
36488
- function pollPortOnce(port) {
36489
- try {
36490
- const res = spawnSync(resolveLsofCommandSync(), [
36491
- "-nP",
36492
- `-iTCP:${port}`,
36493
- "-sTCP:LISTEN",
36494
- "-Fpc"
36495
- ], {
36496
- encoding: "utf8",
36497
- timeout: POLL_SPAWN_TIMEOUT_MS
36498
- });
36499
- if (res.error) {
36500
- const code = res.error.code;
36501
- return {
36502
- free: null,
36503
- permanent: code === "ENOENT" || code === "EACCES" || code === "EPERM"
36504
- };
36505
- }
36506
- if (res.status === 1) {
36507
- if (res.stdout) return parsePidsFromLsofOutput(res.stdout).length === 0 ? { free: true } : { free: false };
36508
- return { free: true };
36509
- }
36510
- if (res.status !== 0) return {
36511
- free: null,
36512
- permanent: false
36513
- };
36514
- return parsePidsFromLsofOutput(res.stdout).length === 0 ? { free: true } : { free: false };
36515
- } catch {
36516
- return {
36517
- free: null,
36518
- permanent: false
36519
- };
36520
- }
36521
- }
36522
- /**
36523
- * Synchronously terminate stale gateway processes.
36524
- * Callers must pass a non-empty pids array.
36525
- * Sends SIGTERM, waits briefly, then SIGKILL for survivors.
36526
- */
36527
- function terminateStaleProcessesSync(pids) {
36528
- const killed = [];
36529
- for (const pid of pids) try {
36530
- process.kill(pid, "SIGTERM");
36531
- killed.push(pid);
36532
- } catch {}
36533
- if (killed.length === 0) return killed;
36534
- sleepSync(STALE_SIGTERM_WAIT_MS);
36535
- for (const pid of killed) try {
36536
- process.kill(pid, 0);
36537
- process.kill(pid, "SIGKILL");
36538
- } catch {}
36539
- sleepSync(STALE_SIGKILL_WAIT_MS);
36540
- return killed;
36541
- }
36542
- /**
36543
- * Poll the given port until it is confirmed free, lsof is confirmed unavailable,
36544
- * or the wall-clock budget expires.
36545
- *
36546
- * Each poll invocation uses POLL_SPAWN_TIMEOUT_MS (400 ms), which is
36547
- * significantly shorter than PORT_FREE_TIMEOUT_MS (2000 ms). This ensures
36548
- * that a single slow or hung lsof call cannot consume the entire polling
36549
- * budget and cause the function to exit prematurely with an inconclusive
36550
- * result. Up to five independent lsof attempts fit within the budget.
36551
- *
36552
- * Exit conditions:
36553
- * - `pollPortOnce` returns `{ free: true }` → port confirmed free
36554
- * - `pollPortOnce` returns `{ free: null, permanent: true }` → lsof unavailable, bail
36555
- * - `pollPortOnce` returns `{ free: false }` → port busy, sleep + retry
36556
- * - `pollPortOnce` returns `{ free: null, permanent: false }` → transient error, sleep + retry
36557
- * - Wall-clock deadline exceeded → log warning, proceed anyway
36558
- */
36559
- function waitForPortFreeSync(port) {
36560
- const deadline = getTimeMs() + PORT_FREE_TIMEOUT_MS;
36561
- while (getTimeMs() < deadline) {
36562
- const result = pollPortOnce(port);
36563
- if (result.free === true) return;
36564
- if (result.free === null && result.permanent) return;
36565
- sleepSync(PORT_FREE_POLL_INTERVAL_MS);
36566
- }
36567
- restartLog$1.warn(`port ${port} still in use after ${PORT_FREE_TIMEOUT_MS}ms; proceeding anyway`);
36568
- }
36569
- /**
36570
- * Inspect the gateway port and kill any stale gateway processes holding it.
36571
- * Blocks until the port is confirmed free (or the poll budget expires) so
36572
- * the supervisor (systemd / launchctl) does not race a zombie process for
36573
- * the port and enter an EADDRINUSE restart loop.
36574
- *
36575
- * Called before service restart commands to prevent port conflicts.
36576
- */
36577
- function cleanStaleGatewayProcessesSync() {
36578
- try {
36579
- const port = resolveGatewayPort(void 0, process.env);
36580
- const stalePids = findGatewayPidsOnPortSync(port);
36581
- if (stalePids.length === 0) return [];
36582
- restartLog$1.warn(`killing ${stalePids.length} stale gateway process(es) before restart: ${stalePids.join(", ")}`);
36583
- const killed = terminateStaleProcessesSync(stalePids);
36584
- waitForPortFreeSync(port);
36585
- return killed;
36586
- } catch {
36587
- return [];
36588
- }
36589
- }
36590
-
36591
- //#endregion
36592
- //#region src/infra/restart.ts
36593
- const SPAWN_TIMEOUT_MS = 2e3;
36594
- const SIGUSR1_AUTH_GRACE_MS = 5e3;
36595
- const DEFAULT_DEFERRAL_POLL_MS = 500;
36596
- const DEFAULT_DEFERRAL_MAX_WAIT_MS = 3e4;
36597
- const RESTART_COOLDOWN_MS = 3e4;
36598
- const restartLog = createSubsystemLogger("restart");
36599
- let sigusr1AuthorizedCount = 0;
36600
- let sigusr1AuthorizedUntil = 0;
36601
- let sigusr1ExternalAllowed = false;
36602
- let preRestartCheck = null;
36603
- let restartCycleToken = 0;
36604
- let emittedRestartToken = 0;
36605
- let consumedRestartToken = 0;
36606
- let lastRestartEmittedAt = 0;
36607
- let pendingRestartTimer = null;
36608
- let pendingRestartDueAt = 0;
36609
- let pendingRestartReason;
36610
- function hasUnconsumedRestartSignal() {
36611
- return emittedRestartToken > consumedRestartToken;
36612
- }
36613
- function clearPendingScheduledRestart() {
36614
- if (pendingRestartTimer) clearTimeout(pendingRestartTimer);
36615
- pendingRestartTimer = null;
36616
- pendingRestartDueAt = 0;
36617
- pendingRestartReason = void 0;
36618
- }
36619
- function summarizeChangedPaths(paths, maxPaths = 6) {
36620
- if (!Array.isArray(paths) || paths.length === 0) return null;
36621
- if (paths.length <= maxPaths) return paths.join(",");
36622
- return `${paths.slice(0, maxPaths).join(",")},+${paths.length - maxPaths} more`;
36623
- }
36624
- function formatRestartAudit(audit) {
36625
- const actor = typeof audit?.actor === "string" && audit.actor.trim() ? audit.actor.trim() : null;
36626
- const deviceId = typeof audit?.deviceId === "string" && audit.deviceId.trim() ? audit.deviceId.trim() : null;
36627
- const clientIp = typeof audit?.clientIp === "string" && audit.clientIp.trim() ? audit.clientIp.trim() : null;
36628
- const changed = summarizeChangedPaths(audit?.changedPaths);
36629
- const fields = [];
36630
- if (actor) fields.push(`actor=${actor}`);
36631
- if (deviceId) fields.push(`device=${deviceId}`);
36632
- if (clientIp) fields.push(`ip=${clientIp}`);
36633
- if (changed) fields.push(`changedPaths=${changed}`);
36634
- return fields.length > 0 ? fields.join(" ") : "actor=<unknown>";
36635
- }
36636
- /**
36637
- * Register a callback that scheduleGatewaySigusr1Restart checks before emitting SIGUSR1.
36638
- * The callback should return the number of pending items (0 = safe to restart).
36639
- */
36640
- function setPreRestartDeferralCheck(fn) {
36641
- preRestartCheck = fn;
36642
- }
36643
- /**
36644
- * Emit an authorized SIGUSR1 gateway restart, guarded against duplicate emissions.
36645
- * Returns true if SIGUSR1 was emitted, false if a restart was already emitted.
36646
- * Both scheduleGatewaySigusr1Restart and the config watcher should use this
36647
- * to ensure only one restart fires.
36648
- */
36649
- function emitGatewayRestart() {
36650
- if (hasUnconsumedRestartSignal()) {
36651
- clearPendingScheduledRestart();
36652
- return false;
36653
- }
36654
- clearPendingScheduledRestart();
36655
- emittedRestartToken = ++restartCycleToken;
36656
- authorizeGatewaySigusr1Restart();
36657
- try {
36658
- if (process.listenerCount("SIGUSR1") > 0) process.emit("SIGUSR1");
36659
- else process.kill(process.pid, "SIGUSR1");
36660
- } catch {
36661
- emittedRestartToken = consumedRestartToken;
36662
- return false;
36663
- }
36664
- lastRestartEmittedAt = Date.now();
36665
- return true;
36666
- }
36667
- function resetSigusr1AuthorizationIfExpired(now = Date.now()) {
36668
- if (sigusr1AuthorizedCount <= 0) return;
36669
- if (now <= sigusr1AuthorizedUntil) return;
36670
- sigusr1AuthorizedCount = 0;
36671
- sigusr1AuthorizedUntil = 0;
36672
- }
36673
- function setGatewaySigusr1RestartPolicy(opts) {
36674
- sigusr1ExternalAllowed = opts?.allowExternal === true;
36675
- }
36676
- function isGatewaySigusr1RestartExternallyAllowed() {
36677
- return sigusr1ExternalAllowed;
36678
- }
36679
- function authorizeGatewaySigusr1Restart(delayMs = 0) {
36680
- const delay = Math.max(0, Math.floor(delayMs));
36681
- const expiresAt = Date.now() + delay + SIGUSR1_AUTH_GRACE_MS;
36682
- sigusr1AuthorizedCount += 1;
36683
- if (expiresAt > sigusr1AuthorizedUntil) sigusr1AuthorizedUntil = expiresAt;
36684
- }
36685
- function consumeGatewaySigusr1RestartAuthorization() {
36686
- resetSigusr1AuthorizationIfExpired();
36687
- if (sigusr1AuthorizedCount <= 0) return false;
36688
- sigusr1AuthorizedCount -= 1;
36689
- if (sigusr1AuthorizedCount <= 0) sigusr1AuthorizedUntil = 0;
36690
- return true;
36691
- }
36692
- /**
36693
- * Mark the currently emitted SIGUSR1 restart cycle as consumed by the run loop.
36694
- * This explicitly advances the cycle state instead of resetting emit guards inside
36695
- * consumeGatewaySigusr1RestartAuthorization().
36696
- */
36697
- function markGatewaySigusr1RestartHandled() {
36698
- if (hasUnconsumedRestartSignal()) consumedRestartToken = emittedRestartToken;
36699
- }
36700
- /**
36701
- * Poll pending work until it drains (or times out), then emit one restart signal.
36702
- * Shared by both the direct RPC restart path and the config watcher path.
36703
- */
36704
- function deferGatewayRestartUntilIdle(opts) {
36705
- const pollMsRaw = opts.pollMs ?? DEFAULT_DEFERRAL_POLL_MS;
36706
- const pollMs = Math.max(10, Math.floor(pollMsRaw));
36707
- const maxWaitMsRaw = opts.maxWaitMs ?? DEFAULT_DEFERRAL_MAX_WAIT_MS;
36708
- const maxWaitMs = Math.max(pollMs, Math.floor(maxWaitMsRaw));
36709
- let pending;
36710
- try {
36711
- pending = opts.getPendingCount();
36712
- } catch (err) {
36713
- opts.hooks?.onCheckError?.(err);
36714
- emitGatewayRestart();
36715
- return;
36716
- }
36717
- if (pending <= 0) {
36718
- opts.hooks?.onReady?.();
36719
- emitGatewayRestart();
36720
- return;
36721
- }
36722
- opts.hooks?.onDeferring?.(pending);
36723
- const startedAt = Date.now();
36724
- const poll = setInterval(() => {
36725
- let current;
36726
- try {
36727
- current = opts.getPendingCount();
36728
- } catch (err) {
36729
- clearInterval(poll);
36730
- opts.hooks?.onCheckError?.(err);
36731
- emitGatewayRestart();
36732
- return;
36733
- }
36734
- if (current <= 0) {
36735
- clearInterval(poll);
36736
- opts.hooks?.onReady?.();
36737
- emitGatewayRestart();
36738
- return;
36739
- }
36740
- const elapsedMs = Date.now() - startedAt;
36741
- if (elapsedMs >= maxWaitMs) {
36742
- clearInterval(poll);
36743
- opts.hooks?.onTimeout?.(current, elapsedMs);
36744
- emitGatewayRestart();
36745
- }
36746
- }, pollMs);
36747
- }
36748
- function formatSpawnDetail(result) {
36749
- const clean = (value) => {
36750
- return (typeof value === "string" ? value : value ? value.toString() : "").replace(/\s+/g, " ").trim();
36751
- };
36752
- if (result.error) {
36753
- if (result.error instanceof Error) return result.error.message;
36754
- if (typeof result.error === "string") return result.error;
36755
- try {
36756
- return JSON.stringify(result.error);
36757
- } catch {
36758
- return "unknown error";
36759
- }
36760
- }
36761
- const stderr = clean(result.stderr);
36762
- if (stderr) return stderr;
36763
- const stdout = clean(result.stdout);
36764
- if (stdout) return stdout;
36765
- if (typeof result.status === "number") return `exit ${result.status}`;
36766
- return "unknown error";
36767
- }
36768
- function normalizeSystemdUnit(raw, profile) {
36769
- const unit = raw?.trim();
36770
- if (!unit) return `${resolveGatewaySystemdServiceName(profile)}.service`;
36771
- return unit.endsWith(".service") ? unit : `${unit}.service`;
36772
- }
36773
- function triggerOpenClawRestart() {
36774
- if (process.env.VITEST || false) return {
36775
- ok: true,
36776
- method: "supervisor",
36777
- detail: "test mode"
36778
- };
36779
- cleanStaleGatewayProcessesSync();
36780
- const tried = [];
36781
- if (process.platform !== "darwin") {
36782
- if (process.platform === "linux") {
36783
- const unit = normalizeSystemdUnit(process.env.OPENCLAW_SYSTEMD_UNIT, process.env.OPENCLAW_PROFILE);
36784
- const userArgs = [
36785
- "--user",
36786
- "restart",
36787
- unit
36788
- ];
36789
- tried.push(`systemctl ${userArgs.join(" ")}`);
36790
- const userRestart = spawnSync("systemctl", userArgs, {
36791
- encoding: "utf8",
36792
- timeout: SPAWN_TIMEOUT_MS
36793
- });
36794
- if (!userRestart.error && userRestart.status === 0) return {
36795
- ok: true,
36796
- method: "systemd",
36797
- tried
36798
- };
36799
- const systemArgs = ["restart", unit];
36800
- tried.push(`systemctl ${systemArgs.join(" ")}`);
36801
- const systemRestart = spawnSync("systemctl", systemArgs, {
36802
- encoding: "utf8",
36803
- timeout: SPAWN_TIMEOUT_MS
36804
- });
36805
- if (!systemRestart.error && systemRestart.status === 0) return {
36806
- ok: true,
36807
- method: "systemd",
36808
- tried
36809
- };
36810
- return {
36811
- ok: false,
36812
- method: "systemd",
36813
- detail: [`user: ${formatSpawnDetail(userRestart)}`, `system: ${formatSpawnDetail(systemRestart)}`].join("; "),
36814
- tried
36815
- };
36816
- }
36817
- return {
36818
- ok: false,
36819
- method: "supervisor",
36820
- detail: "unsupported platform restart"
36821
- };
36822
- }
36823
- const label = process.env.OPENCLAW_LAUNCHD_LABEL || resolveGatewayLaunchAgentLabel(process.env.OPENCLAW_PROFILE);
36824
- const uid = typeof process.getuid === "function" ? process.getuid() : void 0;
36825
- const domain = uid !== void 0 ? `gui/${uid}` : "gui/501";
36826
- const target = `${domain}/${label}`;
36827
- const args = [
36828
- "kickstart",
36829
- "-k",
36830
- target
36831
- ];
36832
- tried.push(`launchctl ${args.join(" ")}`);
36833
- const res = spawnSync("launchctl", args, {
36834
- encoding: "utf8",
36835
- timeout: SPAWN_TIMEOUT_MS
36836
- });
36837
- if (!res.error && res.status === 0) return {
36838
- ok: true,
36839
- method: "launchctl",
36840
- tried
36841
- };
36842
- const home = process.env.HOME?.trim() || os.homedir();
36843
- const bootstrapArgs = [
36844
- "bootstrap",
36845
- domain,
36846
- path.join(home, "Library", "LaunchAgents", `${label}.plist`)
36847
- ];
36848
- tried.push(`launchctl ${bootstrapArgs.join(" ")}`);
36849
- const boot = spawnSync("launchctl", bootstrapArgs, {
36850
- encoding: "utf8",
36851
- timeout: SPAWN_TIMEOUT_MS
36852
- });
36853
- if (boot.error || boot.status !== 0 && boot.status !== null) return {
36854
- ok: false,
36855
- method: "launchctl",
36856
- detail: formatSpawnDetail(boot),
36857
- tried
36858
- };
36859
- const retryArgs = [
36860
- "kickstart",
36861
- "-k",
36862
- target
36863
- ];
36864
- tried.push(`launchctl ${retryArgs.join(" ")}`);
36865
- const retry = spawnSync("launchctl", retryArgs, {
36866
- encoding: "utf8",
36867
- timeout: SPAWN_TIMEOUT_MS
36868
- });
36869
- if (!retry.error && retry.status === 0) return {
36870
- ok: true,
36871
- method: "launchctl",
36872
- tried
36873
- };
36874
- return {
36875
- ok: false,
36876
- method: "launchctl",
36877
- detail: formatSpawnDetail(retry),
36878
- tried
36879
- };
36880
- }
36881
- function scheduleGatewaySigusr1Restart(opts) {
36882
- const delayMsRaw = typeof opts?.delayMs === "number" && Number.isFinite(opts.delayMs) ? Math.floor(opts.delayMs) : 2e3;
36883
- const delayMs = Math.min(Math.max(delayMsRaw, 0), 6e4);
36884
- const reason = typeof opts?.reason === "string" && opts.reason.trim() ? opts.reason.trim().slice(0, 200) : void 0;
36885
- const mode = process.listenerCount("SIGUSR1") > 0 ? "emit" : "signal";
36886
- const nowMs = Date.now();
36887
- const cooldownMsApplied = Math.max(0, lastRestartEmittedAt + RESTART_COOLDOWN_MS - nowMs);
36888
- const requestedDueAt = nowMs + delayMs + cooldownMsApplied;
36889
- if (hasUnconsumedRestartSignal()) {
36890
- restartLog.warn(`restart request coalesced (already in-flight) reason=${reason ?? "unspecified"} ${formatRestartAudit(opts?.audit)}`);
36891
- return {
36892
- ok: true,
36893
- pid: process.pid,
36894
- signal: "SIGUSR1",
36895
- delayMs: 0,
36896
- reason,
36897
- mode,
36898
- coalesced: true,
36899
- cooldownMsApplied
36900
- };
36901
- }
36902
- if (pendingRestartTimer) {
36903
- const remainingMs = Math.max(0, pendingRestartDueAt - nowMs);
36904
- if (requestedDueAt < pendingRestartDueAt) {
36905
- restartLog.warn(`restart request rescheduled earlier reason=${reason ?? "unspecified"} pendingReason=${pendingRestartReason ?? "unspecified"} oldDelayMs=${remainingMs} newDelayMs=${Math.max(0, requestedDueAt - nowMs)} ${formatRestartAudit(opts?.audit)}`);
36906
- clearPendingScheduledRestart();
36907
- } else {
36908
- restartLog.warn(`restart request coalesced (already scheduled) reason=${reason ?? "unspecified"} pendingReason=${pendingRestartReason ?? "unspecified"} delayMs=${remainingMs} ${formatRestartAudit(opts?.audit)}`);
36909
- return {
36910
- ok: true,
36911
- pid: process.pid,
36912
- signal: "SIGUSR1",
36913
- delayMs: remainingMs,
36914
- reason,
36915
- mode,
36916
- coalesced: true,
36917
- cooldownMsApplied
36918
- };
36919
- }
36920
- }
36921
- pendingRestartDueAt = requestedDueAt;
36922
- pendingRestartReason = reason;
36923
- pendingRestartTimer = setTimeout(() => {
36924
- pendingRestartTimer = null;
36925
- pendingRestartDueAt = 0;
36926
- pendingRestartReason = void 0;
36927
- const pendingCheck = preRestartCheck;
36928
- if (!pendingCheck) {
36929
- emitGatewayRestart();
36930
- return;
36931
- }
36932
- deferGatewayRestartUntilIdle({ getPendingCount: pendingCheck });
36933
- }, Math.max(0, requestedDueAt - nowMs));
36934
- return {
36935
- ok: true,
36936
- pid: process.pid,
36937
- signal: "SIGUSR1",
36938
- delayMs: Math.max(0, requestedDueAt - nowMs),
36939
- reason,
36940
- mode,
36941
- coalesced: false,
36942
- cooldownMsApplied
36943
- };
36944
- }
36945
-
36946
36177
  //#endregion
36947
36178
  //#region src/telegram/thread-bindings.ts
36948
36179
  const DEFAULT_THREAD_BINDING_IDLE_TIMEOUT_MS = 1440 * 60 * 1e3;
@@ -40078,7 +39309,7 @@ async function createModelSelectionState(params) {
40078
39309
  }
40079
39310
  }
40080
39311
  if (sessionEntry && sessionStore && sessionKey && sessionEntry.authProfileOverride) {
40081
- const { ensureAuthProfileStore } = await import("./auth-profiles-BCHBDrea.js").then((n) => n.t);
39312
+ const { ensureAuthProfileStore } = await import("./auth-profiles-BtxyXCZY.js").then((n) => n.t);
40082
39313
  const profile = ensureAuthProfileStore(void 0, { allowKeychainPrompt: false }).profiles[sessionEntry.authProfileOverride];
40083
39314
  const providerKey = normalizeProviderId(provider);
40084
39315
  if (!profile || normalizeProviderId(profile.provider) !== providerKey) await clearSessionAuthProfileOverride({
@@ -58429,7 +57660,7 @@ const warnedContexts = /* @__PURE__ */ new Map();
58429
57660
  const log$4 = createSubsystemLogger("session-maintenance-warning");
58430
57661
  let deliverRuntimePromise = null;
58431
57662
  function loadDeliverRuntime() {
58432
- deliverRuntimePromise ??= import("./deliver-runtime-CESEQ4NM.js");
57663
+ deliverRuntimePromise ??= import("./deliver-runtime-s0eLCemL.js");
58433
57664
  return deliverRuntimePromise;
58434
57665
  }
58435
57666
  function shouldSendWarning() {
@@ -63286,7 +62517,7 @@ const VISION_PROVIDERS = [
63286
62517
  ];
63287
62518
  let imageRuntimePromise = null;
63288
62519
  function loadImageRuntime() {
63289
- imageRuntimePromise ??= import("./image-runtime-Bq51vNRb.js");
62520
+ imageRuntimePromise ??= import("./image-runtime-CesErRak.js");
63290
62521
  return imageRuntimePromise;
63291
62522
  }
63292
62523
  /**
@@ -67253,7 +66484,7 @@ async function resolveDiscordPreflightAudioMentionContext(params) {
67253
66484
  hasTypedText
67254
66485
  };
67255
66486
  try {
67256
- const { transcribeFirstAudio } = await import("./audio-preflight-Bk3KZQei.js");
66487
+ const { transcribeFirstAudio } = await import("./audio-preflight-d9iZknwY.js");
67257
66488
  if (params.abortSignal?.aborted) return {
67258
66489
  hasAudioAttachment,
67259
66490
  hasTypedText
@@ -70276,27 +69507,27 @@ let slackSenderRuntimePromise = null;
70276
69507
  let signalSenderRuntimePromise = null;
70277
69508
  let imessageSenderRuntimePromise = null;
70278
69509
  function loadWhatsAppSenderRuntime() {
70279
- whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-BeJLvpI1.js");
69510
+ whatsappSenderRuntimePromise ??= import("./deps-send-whatsapp.runtime-BHuShWkA.js");
70280
69511
  return whatsappSenderRuntimePromise;
70281
69512
  }
70282
69513
  function loadTelegramSenderRuntime() {
70283
- telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-BFHbiOeI.js");
69514
+ telegramSenderRuntimePromise ??= import("./deps-send-telegram.runtime-IFD4dAk7.js");
70284
69515
  return telegramSenderRuntimePromise;
70285
69516
  }
70286
69517
  function loadDiscordSenderRuntime() {
70287
- discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-dTfY4NLn.js");
69518
+ discordSenderRuntimePromise ??= import("./deps-send-discord.runtime-C8HKp3uO.js");
70288
69519
  return discordSenderRuntimePromise;
70289
69520
  }
70290
69521
  function loadSlackSenderRuntime() {
70291
- slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-Cx_x379p.js");
69522
+ slackSenderRuntimePromise ??= import("./deps-send-slack.runtime-BM7Vp8vX.js");
70292
69523
  return slackSenderRuntimePromise;
70293
69524
  }
70294
69525
  function loadSignalSenderRuntime() {
70295
- signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-9WH9ir2Z.js");
69526
+ signalSenderRuntimePromise ??= import("./deps-send-signal.runtime-XbioSg-_.js");
70296
69527
  return signalSenderRuntimePromise;
70297
69528
  }
70298
69529
  function loadIMessageSenderRuntime() {
70299
- imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-Cm_XDGKz.js");
69530
+ imessageSenderRuntimePromise ??= import("./deps-send-imessage.runtime-ECy162Cs.js");
70300
69531
  return imessageSenderRuntimePromise;
70301
69532
  }
70302
69533
  function createDefaultDeps() {
@@ -83138,15 +82369,15 @@ let slashCommandsRuntimePromise = null;
83138
82369
  let slashDispatchRuntimePromise = null;
83139
82370
  let slashSkillCommandsRuntimePromise = null;
83140
82371
  function loadSlashCommandsRuntime() {
83141
- slashCommandsRuntimePromise ??= import("./slash-commands.runtime-Ckcj6TnD.js");
82372
+ slashCommandsRuntimePromise ??= import("./slash-commands.runtime-Bq0XWi2w.js");
83142
82373
  return slashCommandsRuntimePromise;
83143
82374
  }
83144
82375
  function loadSlashDispatchRuntime() {
83145
- slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-B5ykjP8B.js");
82376
+ slashDispatchRuntimePromise ??= import("./slash-dispatch.runtime-7RhcnuYY.js");
83146
82377
  return slashDispatchRuntimePromise;
83147
82378
  }
83148
82379
  function loadSlashSkillCommandsRuntime() {
83149
- slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-DbzbD-ZQ.js");
82380
+ slashSkillCommandsRuntimePromise ??= import("./slash-skill-commands.runtime-HWFM7WtA.js");
83150
82381
  return slashSkillCommandsRuntimePromise;
83151
82382
  }
83152
82383
  const slackExternalArgMenuStore = createSlackExternalArgMenuStore();
@@ -84136,7 +83367,7 @@ function collectTelegramUnmentionedGroupIds(groups) {
84136
83367
  }
84137
83368
  let auditMembershipRuntimePromise = null;
84138
83369
  function loadAuditMembershipRuntime() {
84139
- auditMembershipRuntimePromise ??= import("./audit-membership-runtime-BIZ4bigJ.js");
83370
+ auditMembershipRuntimePromise ??= import("./audit-membership-runtime-Bki8LzkA.js");
84140
83371
  return auditMembershipRuntimePromise;
84141
83372
  }
84142
83373
  async function auditTelegramGroupMembership(params) {
@@ -86596,7 +85827,7 @@ const buildTelegramMessageContext = async ({ primaryCtx, allMedia, replyMedia =
86596
85827
  const disableAudioPreflight = firstDefined$1(topicConfig?.disableAudioPreflight, groupConfig?.disableAudioPreflight) === true;
86597
85828
  let preflightTranscript;
86598
85829
  if (isGroup && requireMention && hasAudio && !hasUserText && mentionRegexes.length > 0 && !disableAudioPreflight) try {
86599
- const { transcribeFirstAudio } = await import("./audio-preflight-Bk3KZQei.js");
85830
+ const { transcribeFirstAudio } = await import("./audio-preflight-d9iZknwY.js");
86600
85831
  preflightTranscript = await transcribeFirstAudio({
86601
85832
  ctx: {
86602
85833
  MediaPaths: allMedia.length > 0 ? allMedia.map((m) => m.path) : void 0,
@@ -89524,7 +88755,7 @@ function createWhatsAppLoginTool() {
89524
88755
  force: Type.Optional(Type.Boolean())
89525
88756
  }),
89526
88757
  execute: async (_toolCallId, args) => {
89527
- const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-amd1X6Dw.js");
88758
+ const { startWebLoginWithQr, waitForWebLogin } = await import("./login-qr-CmnyPjTv.js");
89528
88759
  if ((args?.action ?? "start") === "wait") {
89529
88760
  const result = await waitForWebLogin({ timeoutMs: typeof args.timeoutMs === "number" ? args.timeoutMs : void 0 });
89530
88761
  return {
@@ -89599,23 +88830,23 @@ let webOutboundPromise = null;
89599
88830
  let webLoginPromise = null;
89600
88831
  let whatsappActionsPromise = null;
89601
88832
  function loadWebOutbound() {
89602
- webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-DoZi3gnM.js");
88833
+ webOutboundPromise ??= import("./runtime-whatsapp-outbound.runtime-la1XDkPQ.js");
89603
88834
  return webOutboundPromise;
89604
88835
  }
89605
88836
  function loadWebLogin() {
89606
- webLoginPromise ??= import("./runtime-whatsapp-login.runtime-CQLsSWjA.js");
88837
+ webLoginPromise ??= import("./runtime-whatsapp-login.runtime-COI7KRKp.js");
89607
88838
  return webLoginPromise;
89608
88839
  }
89609
88840
  function loadWebLoginQr() {
89610
- webLoginQrPromise ??= import("./login-qr-amd1X6Dw.js");
88841
+ webLoginQrPromise ??= import("./login-qr-CmnyPjTv.js");
89611
88842
  return webLoginQrPromise;
89612
88843
  }
89613
88844
  function loadWebChannel() {
89614
- webChannelPromise ??= import("./web-C14E8nHS.js");
88845
+ webChannelPromise ??= import("./web-CCim-JL4.js");
89615
88846
  return webChannelPromise;
89616
88847
  }
89617
88848
  function loadWhatsAppActions() {
89618
- whatsappActionsPromise ??= import("./whatsapp-actions-DSjBUB00.js");
88849
+ whatsappActionsPromise ??= import("./whatsapp-actions-BZRxKavO.js");
89619
88850
  return whatsappActionsPromise;
89620
88851
  }
89621
88852
  function createRuntimeWhatsApp() {
@@ -92656,7 +91887,7 @@ async function compactEmbeddedPiSessionDirect(params) {
92656
91887
  if (!apiKeyInfo.apiKey) {
92657
91888
  if (apiKeyInfo.mode !== "aws-sdk") throw new Error(`No API key resolved for provider "${model.provider}" (auth mode: ${apiKeyInfo.mode}).`);
92658
91889
  } else if (model.provider === "github-copilot") {
92659
- const { resolveCopilotApiToken } = await import("./github-copilot-token-Byc_YVYE.js").then((n) => n.n);
91890
+ const { resolveCopilotApiToken } = await import("./github-copilot-token-BKQ4nXAw.js").then((n) => n.n);
92660
91891
  const copilotToken = await resolveCopilotApiToken({ githubToken: apiKeyInfo.apiKey });
92661
91892
  authStorage.setRuntimeApiKey(model.provider, copilotToken.token);
92662
91893
  } else authStorage.setRuntimeApiKey(model.provider, apiKeyInfo.apiKey);
@@ -93121,4 +92352,4 @@ async function compactEmbeddedPiSession(params) {
93121
92352
  }
93122
92353
 
93123
92354
  //#endregion
93124
- export { getCliSessionId as $, initSubagentRegistry as $n, markGatewayDraining as $r, deferGatewayRestartUntilIdle as $t, resolveAgentAvatar as A, ACP_SESSION_IDENTITY_RENDERER_VERSION as An, resolveEffectiveMessagesConfig as Ar, normalizeRequiredName as At, warnMissingProviderGroupPolicyFallbackOnce as B, resolveInputFileLimits as Bn, resolveTtsAutoMode as Br, isExternalHookSession as Bt, resolveAgentDeliveryPlan as C, peekSystemEventEntries as Cn, analyzeBootstrapBudget as Cr, normalizeCronJobCreate as Ct, createOutboundSendDeps$1 as D, resolveHeartbeatReasonKind as Dn, getAcpSessionManager as Dr, normalizeOptionalSessionKey as Dt, createDefaultDeps as E, setHeartbeatWakeHandler as En, describeFailoverError as Er, normalizeOptionalAgentId$1 as Et, DEFAULT_GROUP_HISTORY_LIMIT as F, DEFAULT_INPUT_MAX_REDIRECTS as Fn, clearBootstrapSnapshot as Fr, CHANNEL_TARGETS_DESCRIPTION as Ft, resolveInboundDebounceMs as G, shouldComputeCommandAuthorized as Gn, setTtsProvider as Gr, maskApiKey as Gt, dispatchReplyWithBufferedBlockDispatcher as H, normalizeSendPolicy as Hn, resolveTtsPrefsPath as Hr, applyBrowserProxyPaths as Ht, buildHistoryContextFromEntries as I, DEFAULT_INPUT_TIMEOUT_MS as In, getTtsProvider as Ir, CHANNEL_TARGET_DESCRIPTION as It, createReplyDispatcher as J, buildMentionRegexes as Jn, OPENAI_TTS_VOICES as Jr, formatRemainingShort as Jt, formatInboundEnvelope as K, isAbortRequestText as Kn, textToSpeech as Kr, DEFAULT_OAUTH_WARN_MS as Kt, recordPendingHistoryEntryIfEnabled as L, extractFileContentFromSource as Ln, isTtsEnabled as Lr, buildSafeExternalPrompt as Lt, loadAgentIdentityFromWorkspace as M, resolveAgentRoute as Mn, resolveMessagePrefix as Mr, buildDeliveryFromLegacyPayload as Mt, parseIdentityMarkdown as N, DEFAULT_INPUT_IMAGE_MAX_BYTES as Nn, resolveUserTimezone as Nr, hasLegacyDeliveryHints as Nt, buildPairingReply as O, resolveSlackUserAllowlist as On, resolveAgentSessionDirs as Or, normalizeOptionalText$1 as Ot, createReplyPrefixOptions as P, DEFAULT_INPUT_IMAGE_MIMES as Pn, resolveBootstrapContextForRun as Pr, stripLegacyDeliveryFields as Pt, buildBareSessionResetPrompt as Q, countPendingDescendantRunsExcludingRun as Qn, getTotalQueueSize as Qr, consumeGatewaySigusr1RestartAuthorization as Qt, resolveDefaultGroupPolicy as R, extractImageContentFromSource as Rn, isTtsProviderConfigured as Rr, detectSuspiciousPatterns as Rt, resolveSessionKeyForRequest as S, isSystemEventContextChanged as Sn, registerAgentRunContext as Sr, normalizeHttpWebhookUrl as St, createOutboundSendDeps as T, requestHeartbeatNow as Tn, resolveBootstrapWarningSignaturesSeen as Tr, inferLegacyName as Tt, dispatchReplyWithDispatcher as U, resolveSendPolicy as Un, resolveTtsProviderOrder as Ur, persistBrowserProxyFiles as Ut, shouldAckReactionForWhatsApp as V, finalizeInboundContext as Vn, resolveTtsConfig as Vr, closeTrackedBrowserTabsForSessions as Vt, createInboundDebouncer as W, hasControlCommand as Wn, setTtsEnabled as Wr, resolveSessionAuthProfileOverride as Wt, createDedupeCache as X, countActiveDescendantRuns as Xn, getActiveTaskCount as Xr, applyVerboseOverride as Xt, getTotalPendingReplies as Y, normalizeMentionText as Yn, resolveModelWithRegistry as Yr, applyModelOverrideToSessionEntry as Yt, getReplyFromConfig as Z, countPendingDescendantRuns as Zn, getQueueSize as Zr, parseVerboseOverride as Zt, requestBodyErrorToText as _, formatChannelAllowFrom as _n, resolveCronStyleNow as _r, formatRestartSentinelMessage as _t, getPluginToolMeta as a, DEFAULT_HEARTBEAT_EVERY as ai, setPreRestartDeferralCheck as an, shouldIgnorePostCompletionAnnounceForSession as ar, resolveOutboundSessionRoute as at, agentCommand as b, resolveCommitHash as bn, getAgentRunContext as br, trimLogTail as bt, loadBotPlugins as c, stripHeartbeatToken as ci, normalizeGroupActivation as cn, resolveAnnounceTargetFromKey as cr, resolveOutboundTarget as ct, recordInboundSessionMetaSafe as d, formatUsageReportLines as dn, buildOutboundSessionContext as dr, formatTargetDisplay as dt, resetAllLanes as ei, emitGatewayRestart as en, isSubagentSessionRunActive as er, setCliSessionId as et, deliverSlackSlashReplies as f, formatUsageWindowSummary as fn, runEmbeddedPiAgent as fr, resetDirectoryCache as ft, readJsonBodyWithLimit as g, buildChannelAccountSnapshot as gn, appendCronStyleCurrentTimeLine as gr, formatDoctorNonInteractiveHint as gt, handleSlackHttpRequest as h, buildChannelSummary as hn, waitForEmbeddedPiRunEnd as hr, consumeRestartSentinel as ht, sniffMimeFromBase64 as i, DEFAULT_HEARTBEAT_ACK_MAX_CHARS as ii, setGatewaySigusr1RestartPolicy as in, resolveRequesterForChildSession as ir, ensureOutboundSessionEntry as it, identityHasValues as j, buildAgentSessionKey as jn, resolveIdentityNamePrefix as jr, migrateLegacyCronPayload as jt, resolveMentionGating as k, resolveDiscordUserAllowlist as kn, resolveAgentIdentity as kr, normalizePayloadToSystemText as kt, createPluginRuntime as l, parseActivationCommand as ln, readLatestAssistantReply as lr, resolveSessionDeliveryTarget as lt, resolveSlackChannelAllowlist as m, formatZonedTimestamp as mn, getActiveEmbeddedRunCount as mr, runWithModelFallback as mt, applyToolPolicyPipeline as n, waitForActiveTasks as ni, markGatewaySigusr1RestartHandled as nn, listSubagentRunsForRequester as nr, createBotTools as nt, resolvePluginTools as o, isHeartbeatContentEffectivelyEmpty as oi, triggerOpenClawRestart as on, resolveAgentTimeoutMs as or, resolveHeartbeatDeliveryTarget as ot, resolveAgentOutboundIdentity as p, resolveUsageProviderId as pn, abortEmbeddedPiRun as pr, CHANNEL_MESSAGE_ACTION_NAMES as pt, dispatchInboundMessage as q, stopSubagentsForRequester as qn, OPENAI_TTS_MODELS as qr, buildAuthHealthSummary as qt, buildDefaultToolPolicyPipelineSteps as r, CommandLane as ri, scheduleGatewaySigusr1Restart as rn, replaceSubagentRunAfterSteer as rr, runMessageAction as rt, createPluginLoaderLogger as s, resolveHeartbeatPrompt as si, unbindThreadBindingsBySessionKey as sn, runSubagentAnnounceFlow as sr, resolveHeartbeatSenderContext as st, compact_exports as t, setCommandLaneConcurrency as ti, isGatewaySigusr1RestartExternallyAllowed as tn, listDescendantRunsForRequester as tr, runCliAgent as tt, deleteTelegramUpdateOffset as u, loadProviderUsageSummary as un, clearSessionQueues as ur, resolveOutboundChannelPlugin as ut, resolveInboundSessionEnvelopeContext as v, resolveChannelAccountConfigured as vn, clearAgentRunContext as vr, readRestartSentinel as vt, resolveAgentOutboundTarget as w, peekSystemEvents as wn, buildBootstrapInjectionStats as wr, normalizeCronJobPatch as wt, agentCommandFromIngress as x, enqueueSystemEvent as xn, onAgentEvent as xr, writeRestartSentinel as xt, resolveDiscordChannelAllowlist as y, resolveChannelAccountEnabled as yn, emitAgentEvent as yr, summarizeRestartSentinel as yt, resolveOpenProviderRuntimeGroupPolicy as z, normalizeMimeList as zn, resolveTtsApiKey as zr, getHookType as zt };
92355
+ export { getCliSessionId as $, resolveAnnounceTargetFromKey as $n, normalizeGroupActivation as $t, resolveAgentAvatar as A, normalizeMimeList as An, resolveTtsApiKey as Ar, normalizeRequiredName as At, warnMissingProviderGroupPolicyFallbackOnce as B, normalizeMentionText as Bn, resolveModelWithRegistry as Br, isExternalHookSession as Bt, resolveAgentDeliveryPlan as C, resolveAgentRoute as Cn, resolveMessagePrefix as Cr, normalizeCronJobCreate as Ct, createOutboundSendDeps$1 as D, DEFAULT_INPUT_TIMEOUT_MS as Dn, getTtsProvider as Dr, normalizeOptionalSessionKey as Dt, createDefaultDeps as E, DEFAULT_INPUT_MAX_REDIRECTS as En, clearBootstrapSnapshot as Er, normalizeOptionalAgentId$1 as Et, DEFAULT_GROUP_HISTORY_LIMIT as F, hasControlCommand as Fn, setTtsEnabled as Fr, CHANNEL_TARGETS_DESCRIPTION as Ft, resolveInboundDebounceMs as G, isSubagentSessionRunActive as Gn, stripHeartbeatToken as Gr, maskApiKey as Gt, dispatchReplyWithBufferedBlockDispatcher as H, countPendingDescendantRuns as Hn, DEFAULT_HEARTBEAT_EVERY as Hr, applyBrowserProxyPaths as Ht, buildHistoryContextFromEntries as I, shouldComputeCommandAuthorized as In, setTtsProvider as Ir, CHANNEL_TARGET_DESCRIPTION as It, createReplyDispatcher as J, replaceSubagentRunAfterSteer as Jn, formatRemainingShort as Jt, formatInboundEnvelope as K, listDescendantRunsForRequester as Kn, DEFAULT_OAUTH_WARN_MS as Kt, recordPendingHistoryEntryIfEnabled as L, isAbortRequestText as Ln, textToSpeech as Lr, buildSafeExternalPrompt as Lt, loadAgentIdentityFromWorkspace as M, finalizeInboundContext as Mn, resolveTtsConfig as Mr, buildDeliveryFromLegacyPayload as Mt, parseIdentityMarkdown as N, normalizeSendPolicy as Nn, resolveTtsPrefsPath as Nr, hasLegacyDeliveryHints as Nt, buildPairingReply as O, extractFileContentFromSource as On, isTtsEnabled as Or, normalizeOptionalText$1 as Ot, createReplyPrefixOptions as P, resolveSendPolicy as Pn, resolveTtsProviderOrder as Pr, stripLegacyDeliveryFields as Pt, buildBareSessionResetPrompt as Q, runSubagentAnnounceFlow as Qn, unbindThreadBindingsBySessionKey as Qt, resolveDefaultGroupPolicy as R, stopSubagentsForRequester as Rn, OPENAI_TTS_MODELS as Rr, detectSuspiciousPatterns as Rt, resolveSessionKeyForRequest as S, buildAgentSessionKey as Sn, resolveIdentityNamePrefix as Sr, normalizeHttpWebhookUrl as St, createOutboundSendDeps as T, DEFAULT_INPUT_IMAGE_MIMES as Tn, resolveBootstrapContextForRun as Tr, inferLegacyName as Tt, dispatchReplyWithDispatcher as U, countPendingDescendantRunsExcludingRun as Un, isHeartbeatContentEffectivelyEmpty as Ur, persistBrowserProxyFiles as Ut, shouldAckReactionForWhatsApp as V, countActiveDescendantRuns as Vn, DEFAULT_HEARTBEAT_ACK_MAX_CHARS as Vr, closeTrackedBrowserTabsForSessions as Vt, createInboundDebouncer as W, initSubagentRegistry as Wn, resolveHeartbeatPrompt as Wr, resolveSessionAuthProfileOverride as Wt, createDedupeCache as X, shouldIgnorePostCompletionAnnounceForSession as Xn, applyVerboseOverride as Xt, getTotalPendingReplies as Y, resolveRequesterForChildSession as Yn, applyModelOverrideToSessionEntry as Yt, getReplyFromConfig as Z, resolveAgentTimeoutMs as Zn, parseVerboseOverride as Zt, requestBodyErrorToText as _, setHeartbeatWakeHandler as _n, describeFailoverError as _r, formatRestartSentinelMessage as _t, getPluginToolMeta as a, formatZonedTimestamp as an, getActiveEmbeddedRunCount as ar, resolveOutboundSessionRoute as at, agentCommand as b, resolveDiscordUserAllowlist as bn, resolveAgentIdentity as br, trimLogTail as bt, loadBotPlugins as c, formatChannelAllowFrom as cn, resolveCronStyleNow as cr, resolveOutboundTarget as ct, recordInboundSessionMetaSafe as d, resolveCommitHash as dn, getAgentRunContext as dr, formatTargetDisplay as dt, parseActivationCommand as en, readLatestAssistantReply as er, setCliSessionId as et, deliverSlackSlashReplies as f, enqueueSystemEvent as fn, onAgentEvent as fr, resetDirectoryCache as ft, readJsonBodyWithLimit as g, requestHeartbeatNow as gn, resolveBootstrapWarningSignaturesSeen as gr, formatDoctorNonInteractiveHint as gt, handleSlackHttpRequest as h, peekSystemEvents as hn, buildBootstrapInjectionStats as hr, consumeRestartSentinel as ht, sniffMimeFromBase64 as i, resolveUsageProviderId as in, abortEmbeddedPiRun as ir, ensureOutboundSessionEntry as it, identityHasValues as j, resolveInputFileLimits as jn, resolveTtsAutoMode as jr, migrateLegacyCronPayload as jt, resolveMentionGating as k, extractImageContentFromSource as kn, isTtsProviderConfigured as kr, normalizePayloadToSystemText as kt, createPluginRuntime as l, resolveChannelAccountConfigured as ln, clearAgentRunContext as lr, resolveSessionDeliveryTarget as lt, resolveSlackChannelAllowlist as m, peekSystemEventEntries as mn, analyzeBootstrapBudget as mr, runWithModelFallback as mt, applyToolPolicyPipeline as n, formatUsageReportLines as nn, buildOutboundSessionContext as nr, createBotTools as nt, resolvePluginTools as o, buildChannelSummary as on, waitForEmbeddedPiRunEnd as or, resolveHeartbeatDeliveryTarget as ot, resolveAgentOutboundIdentity as p, isSystemEventContextChanged as pn, registerAgentRunContext as pr, CHANNEL_MESSAGE_ACTION_NAMES as pt, dispatchInboundMessage as q, listSubagentRunsForRequester as qn, buildAuthHealthSummary as qt, buildDefaultToolPolicyPipelineSteps as r, formatUsageWindowSummary as rn, runEmbeddedPiAgent as rr, runMessageAction as rt, createPluginLoaderLogger as s, buildChannelAccountSnapshot as sn, appendCronStyleCurrentTimeLine as sr, resolveHeartbeatSenderContext as st, compact_exports as t, loadProviderUsageSummary as tn, clearSessionQueues as tr, runCliAgent as tt, deleteTelegramUpdateOffset as u, resolveChannelAccountEnabled as un, emitAgentEvent as ur, resolveOutboundChannelPlugin as ut, resolveInboundSessionEnvelopeContext as v, resolveHeartbeatReasonKind as vn, getAcpSessionManager as vr, readRestartSentinel as vt, resolveAgentOutboundTarget as w, DEFAULT_INPUT_IMAGE_MAX_BYTES as wn, resolveUserTimezone as wr, normalizeCronJobPatch as wt, agentCommandFromIngress as x, ACP_SESSION_IDENTITY_RENDERER_VERSION as xn, resolveEffectiveMessagesConfig as xr, writeRestartSentinel as xt, resolveDiscordChannelAllowlist as y, resolveSlackUserAllowlist as yn, resolveAgentSessionDirs as yr, summarizeRestartSentinel as yt, resolveOpenProviderRuntimeGroupPolicy as z, buildMentionRegexes as zn, OPENAI_TTS_VOICES as zr, getHookType as zt };