remoteclaw 0.0.0 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2113) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/LICENSE +661 -0
  3. package/README.md +492 -0
  4. package/assets/chrome-extension/README.md +23 -0
  5. package/assets/chrome-extension/background-utils.js +48 -0
  6. package/assets/chrome-extension/background.js +899 -0
  7. package/assets/chrome-extension/icons/icon128.png +0 -0
  8. package/assets/chrome-extension/icons/icon16.png +0 -0
  9. package/assets/chrome-extension/icons/icon32.png +0 -0
  10. package/assets/chrome-extension/icons/icon48.png +0 -0
  11. package/assets/chrome-extension/manifest.json +25 -0
  12. package/assets/chrome-extension/options-validation.js +57 -0
  13. package/assets/chrome-extension/options.html +200 -0
  14. package/assets/chrome-extension/options.js +74 -0
  15. package/assets/clawtributor-avatar-placeholder.png +0 -0
  16. package/assets/dmg-background-small.png +0 -0
  17. package/assets/dmg-background.png +0 -0
  18. package/dist/account-lookup-C0ndrpt-.js +11 -0
  19. package/dist/account-lookup-CIY_RKhi.js +11 -0
  20. package/dist/accounts-B1M3fOxL.js +272 -0
  21. package/dist/accounts-B8PGQWQl.js +205 -0
  22. package/dist/accounts-CIVjmTg9.js +270 -0
  23. package/dist/accounts-D1awQXKu.js +36 -0
  24. package/dist/accounts-DHkGVGUR.js +36 -0
  25. package/dist/accounts-DyW1A_l8.js +206 -0
  26. package/dist/accounts-XFgBY644.js +47 -0
  27. package/dist/accounts-_ZuNC5bz.js +47 -0
  28. package/dist/accounts-uVavganx.js +32 -0
  29. package/dist/ack-reactions-B7iqdPZX.js +621 -0
  30. package/dist/ack-reactions-BapxA9fC.js +621 -0
  31. package/dist/acp-cli-7Plvw9pp.js +1316 -0
  32. package/dist/acp-cli-DmtggLxa.js +1311 -0
  33. package/dist/active-listener--jrUO-8L.js +37 -0
  34. package/dist/active-listener-DtU9K0MR.js +37 -0
  35. package/dist/agent-CX8QVdF4.js +688 -0
  36. package/dist/agent-HReIYVG-.js +687 -0
  37. package/dist/agent-helpers-5F0tdxud.js +400 -0
  38. package/dist/agent-helpers-Bs2nBXeI.js +400 -0
  39. package/dist/agent-scope-CWV-U3Ce.js +161 -0
  40. package/dist/agent-scope-FzE2oRm0.js +159 -0
  41. package/dist/agents-D9BWNEQX.js +769 -0
  42. package/dist/agents.config-0v2zcEf7.js +106 -0
  43. package/dist/agents.config-9DL6QCZc.js +106 -0
  44. package/dist/ansi-DtaiOnt1.js +107 -0
  45. package/dist/api-BE4ZCWWB.js +17 -0
  46. package/dist/api-wsk9zRVi.js +17 -0
  47. package/dist/argv-DW4MYBdJ.js +101 -0
  48. package/dist/audio-ClIuKwkl.js +43 -0
  49. package/dist/audio-DqlIYYTb.js +43 -0
  50. package/dist/audit-Bggny6TT.js +3089 -0
  51. package/dist/audit-DpuJ16Rj.js +3089 -0
  52. package/dist/auth-B-QK8JhI.js +315 -0
  53. package/dist/auth-C1zx1O24.js +314 -0
  54. package/dist/auth-DDmNYVMW.js +448 -0
  55. package/dist/auth-DH1wEw0w.js +448 -0
  56. package/dist/banner-BiLVJ0wV.js +294 -0
  57. package/dist/binaries-QJ-UTgL-.js +13 -0
  58. package/dist/bindings-6FvW-Ys9.js +69 -0
  59. package/dist/bindings-SnU_X1kX.js +69 -0
  60. package/dist/bonjour-discovery-AQMJqY4V.js +378 -0
  61. package/dist/bonjour-discovery-BLcPWHFJ.js +378 -0
  62. package/dist/boot/handler.js +1455 -0
  63. package/dist/brew-CBsS-Vq1.js +46 -0
  64. package/dist/brew-V4lMBeE3.js +46 -0
  65. package/dist/browser-cli-B5uW_onK.js +1690 -0
  66. package/dist/browser-cli-ClfZn9_h.js +1694 -0
  67. package/dist/build-info.json +5 -0
  68. package/dist/bundled/boot/HOOK.md +24 -0
  69. package/dist/bundled/command-logger/HOOK.md +122 -0
  70. package/dist/call-DHcgnRYq.js +518 -0
  71. package/dist/call-Wjjo7gwP.js +517 -0
  72. package/dist/canvas-host/a2ui/.bundle.hash +1 -0
  73. package/dist/canvas-host/a2ui/a2ui.bundle.js +17815 -0
  74. package/dist/canvas-host/a2ui/index.html +307 -0
  75. package/dist/catalog-CU0Xn2G1.js +186 -0
  76. package/dist/catalog-DDkwdGfX.js +186 -0
  77. package/dist/channel-account-context-BHIy71Yh.js +133 -0
  78. package/dist/channel-account-context-DXU_-EkJ.js +133 -0
  79. package/dist/channel-activity-BhT7NQ_v.js +94 -0
  80. package/dist/channel-activity-CvjEwpJz.js +94 -0
  81. package/dist/channel-activity-nsL1WwXH.js +292 -0
  82. package/dist/channel-options-B1tMfA9G.js +32 -0
  83. package/dist/channel-options-gEMUQQGy.js +33 -0
  84. package/dist/channel-selection-C3BMbeUs.js +51 -0
  85. package/dist/channel-selection-DHUO7WUa.js +51 -0
  86. package/dist/channel-web-DBCMnF6w.js +2132 -0
  87. package/dist/channel-web-DjD8eqnc.js +2134 -0
  88. package/dist/channels-cli-BfPB163m.js +1436 -0
  89. package/dist/channels-cli-dEMJmZF8.js +1440 -0
  90. package/dist/channels-status-issues-BMadvA0-.js +18 -0
  91. package/dist/channels-status-issues-D5fT2H21.js +18 -0
  92. package/dist/chat-envelope-AJFUAuBM.js +248 -0
  93. package/dist/chat-envelope-BrfcPlDM.js +248 -0
  94. package/dist/chat-type-BP9akbag.js +11 -0
  95. package/dist/chat-type-CH3W-zKy.js +11 -0
  96. package/dist/chrome-BQX0gpUh.js +1732 -0
  97. package/dist/chrome-CIytlE5x.js +1733 -0
  98. package/dist/chunk-BAMyFYtF.js +341 -0
  99. package/dist/chunk-BzVoFUZL.js +341 -0
  100. package/dist/clack-prompter-C6mBTOzE.js +122 -0
  101. package/dist/clack-prompter-DKcYqv3o.js +121 -0
  102. package/dist/cleanup-utils-Cb-leJcy.js +94 -0
  103. package/dist/cleanup-utils-ZC2zvntc.js +94 -0
  104. package/dist/cli/daemon-cli.js +9 -0
  105. package/dist/cli-BErCYGAt.js +131 -0
  106. package/dist/cli-EEZfdXxg.js +135 -0
  107. package/dist/cli-name-BZsYSp9l.js +23 -0
  108. package/dist/cli-name-CRe5Ow_t.js +23 -0
  109. package/dist/cli-utils-BUOtyfnU.js +16 -0
  110. package/dist/cli-utils-CGB3cBZm.js +16 -0
  111. package/dist/client-1TPQCsEe.js +2311 -0
  112. package/dist/client-9dK56xly.js +22 -0
  113. package/dist/client-CBpe99dr.js +2311 -0
  114. package/dist/client-D-R1YdRD.js +22 -0
  115. package/dist/clipboard-A06eV_5C.js +31 -0
  116. package/dist/clipboard-DQBl3coj.js +31 -0
  117. package/dist/command-format-BiiNHkWG.js +18 -0
  118. package/dist/command-format-Dntg_tnC.js +32 -0
  119. package/dist/command-logger/handler.js +57 -0
  120. package/dist/command-options-CnHA4TzR.js +26 -0
  121. package/dist/command-options-D2nN4AXX.js +26 -0
  122. package/dist/command-registry-BnrYqd5P.js +215 -0
  123. package/dist/commands-BrlSPrp8.js +41 -0
  124. package/dist/commands-keXWOHRq.js +41 -0
  125. package/dist/commands-registry-Cz77bvxB.js +887 -0
  126. package/dist/commands-registry-DRX3F4kj.js +888 -0
  127. package/dist/common-CBefYisq.js +156 -0
  128. package/dist/common-D4fL3S2m.js +156 -0
  129. package/dist/completion-cli-CXb-Xk3v.js +452 -0
  130. package/dist/completion-cli-Ca4Y7cQg.js +452 -0
  131. package/dist/config-CqP5tE9Z.js +3317 -0
  132. package/dist/config-cli-BYqebY6-.js +247 -0
  133. package/dist/config-cli-DKXHNFPz.js +243 -0
  134. package/dist/config-eval-BQIR-wSg.js +102 -0
  135. package/dist/config-eval-Bh82JoXK.js +102 -0
  136. package/dist/config-guard-BBPYncEK.js +92 -0
  137. package/dist/config-guard-CTQwNBtb.js +75 -0
  138. package/dist/config-qAZfcdDM.js +3315 -0
  139. package/dist/config-validation-BrjiFbBk.js +18 -0
  140. package/dist/config-validation-DSXKFJHF.js +18 -0
  141. package/dist/configure-C--DXb5y.js +885 -0
  142. package/dist/configure-D7tKM02_.js +883 -0
  143. package/dist/constants-BBVTjb1j.js +75 -0
  144. package/dist/constants-C7j1VA2S.js +12 -0
  145. package/dist/constants-DoYLsBmv.js +12 -0
  146. package/dist/constants-PMRtHBHU.js +75 -0
  147. package/dist/control-auth-BB_AdEQ8.js +397 -0
  148. package/dist/control-auth-Drc3vO7k.js +397 -0
  149. package/dist/control-ui/apple-touch-icon.png +0 -0
  150. package/dist/control-ui/assets/index-DdiU_ccM.css +1 -0
  151. package/dist/control-ui/assets/index-kVUYi64u.js +7723 -0
  152. package/dist/control-ui/assets/index-kVUYi64u.js.map +1 -0
  153. package/dist/control-ui/assets/pt-BR-eq0TfCI7.js +2 -0
  154. package/dist/control-ui/assets/pt-BR-eq0TfCI7.js.map +1 -0
  155. package/dist/control-ui/assets/zh-CN-DmLG2MF9.js +2 -0
  156. package/dist/control-ui/assets/zh-CN-DmLG2MF9.js.map +1 -0
  157. package/dist/control-ui/assets/zh-TW-BLErH0EM.js +2 -0
  158. package/dist/control-ui/assets/zh-TW-BLErH0EM.js.map +1 -0
  159. package/dist/control-ui/favicon-32.png +0 -0
  160. package/dist/control-ui/favicon.ico +0 -0
  161. package/dist/control-ui/favicon.svg +67 -0
  162. package/dist/control-ui/index.html +17 -0
  163. package/dist/control-ui-assets-DO1L6M0S.js +186 -0
  164. package/dist/control-ui-assets-S_TLo6Fs.js +186 -0
  165. package/dist/conversation-label-CDH4rKMG.js +36 -0
  166. package/dist/conversation-label-CMOfgCVl.js +36 -0
  167. package/dist/credentials-C_RoJFmK.js +91 -0
  168. package/dist/credentials-DM_Dj0m8.js +91 -0
  169. package/dist/cron-cli-DrEGbTLF.js +499 -0
  170. package/dist/cron-cli-iMnjEJcP.js +495 -0
  171. package/dist/daemon-cli-BXOrRB0h.js +735 -0
  172. package/dist/daemon-cli-DbOrC1C6.js +737 -0
  173. package/dist/daemon-cli.js +14217 -0
  174. package/dist/daemon-install-LufHc-Sn.js +60 -0
  175. package/dist/daemon-install-WEBvqVOj.js +56 -0
  176. package/dist/daemon-install-helpers-4BLEBjpg.js +504 -0
  177. package/dist/daemon-install-helpers-DVr51zvE.js +504 -0
  178. package/dist/daemon-runtime-9oDBR7YW.js +13 -0
  179. package/dist/daemon-runtime-CzFI2dPw.js +13 -0
  180. package/dist/dangerous-name-matching-BlTBBZns.js +45 -0
  181. package/dist/dangerous-name-matching-CSq9sJDG.js +45 -0
  182. package/dist/dangerous-tools-BRmbBvRf.js +253 -0
  183. package/dist/dangerous-tools-D4jtl72G.js +253 -0
  184. package/dist/deliver-C3Xs-DSE.js +481 -0
  185. package/dist/deliver-D49hWPWI.js +481 -0
  186. package/dist/delivery-queue-BDvalA10.js +244 -0
  187. package/dist/delivery-queue-BLMWPoKl.js +244 -0
  188. package/dist/devices-cli-6XBBb605.js +323 -0
  189. package/dist/devices-cli-BmB_Y5Tj.js +319 -0
  190. package/dist/diagnostics-BzzhTQzK.js +35 -0
  191. package/dist/diagnostics-DILtxtcE.js +35 -0
  192. package/dist/directory-cli-BnVIzNxj.js +225 -0
  193. package/dist/directory-cli-I7RtmvoP.js +221 -0
  194. package/dist/dispatcher-B7Yu14v7.js +173 -0
  195. package/dist/dispatcher-ClUtg8F9.js +174 -0
  196. package/dist/dm-policy-shared-Cd6QFFx6.js +22 -0
  197. package/dist/dm-policy-shared-DqkEp7h7.js +22 -0
  198. package/dist/dns-cli-Cm47-vJu.js +203 -0
  199. package/dist/dns-cli-DW4a6yJH.js +199 -0
  200. package/dist/dock-BFxpyZEm.js +906 -0
  201. package/dist/dock-Hf1acwVy.js +907 -0
  202. package/dist/doctor-completion-CefSDbii.js +92 -0
  203. package/dist/doctor-completion-DuOl6k-Z.js +92 -0
  204. package/dist/doctor-config-flow-DQdWVm5G.js +979 -0
  205. package/dist/doctor-config-flow-DZCCqya1.js +978 -0
  206. package/dist/enable-C3I9dWel.js +59 -0
  207. package/dist/enable-DnwKeWnR.js +59 -0
  208. package/dist/entry.js +2674 -0
  209. package/dist/env-DyyqmxSM.js +60 -0
  210. package/dist/env-vars-CD2_baIP.js +43 -0
  211. package/dist/env-vars-a7S70ba7.js +43 -0
  212. package/dist/errors-0dfGxeYQ.js +35 -0
  213. package/dist/errors-C1kDByVU.js +35 -0
  214. package/dist/exec-CAk1dxq_.js +164 -0
  215. package/dist/exec-epNpA1aU.js +164 -0
  216. package/dist/export-html/template.css +1024 -0
  217. package/dist/export-html/template.html +88 -0
  218. package/dist/export-html/template.js +1766 -0
  219. package/dist/export-html/vendor/highlight.min.js +1213 -0
  220. package/dist/export-html/vendor/marked.min.js +6 -0
  221. package/dist/extensionAPI.js +11699 -0
  222. package/dist/fetch-BMQq41sB.js +281 -0
  223. package/dist/fetch-CduIccDV.js +67 -0
  224. package/dist/fetch-Cky99wYB.js +281 -0
  225. package/dist/fetch-D3tw4B4n.js +67 -0
  226. package/dist/fetch-DTsU2XnC.js +67 -0
  227. package/dist/fetch-timeout-CytN1wiO.js +43 -0
  228. package/dist/fetch-timeout-DBRRPNBi.js +43 -0
  229. package/dist/file-identity-CeRK5CJC.js +12 -0
  230. package/dist/file-lock-DWH0TfVu.js +107 -0
  231. package/dist/file-lock-DXW9h9ek.js +107 -0
  232. package/dist/format-duration-B-Uv5nOi.js +35 -0
  233. package/dist/format-duration-Oj8pTbYL.js +35 -0
  234. package/dist/format-relative-Czf5fUjn.js +55 -0
  235. package/dist/format-relative-zwkkXJvs.js +55 -0
  236. package/dist/fs-safe-BjSd07M4.js +115 -0
  237. package/dist/fs-safe-aWIhCWlb.js +125 -0
  238. package/dist/gateway-cli-BQ5Nrc2v.js +24127 -0
  239. package/dist/gateway-cli-x9Pn-J8m.js +24131 -0
  240. package/dist/gateway-rpc-C9zLj_Sl.js +28 -0
  241. package/dist/gateway-rpc-Cdx4sTh5.js +28 -0
  242. package/dist/gmail-setup-utils-CKyh29_R.js +422 -0
  243. package/dist/gmail-setup-utils-DquflkMR.js +423 -0
  244. package/dist/health-DlRS-gIZ.js +1414 -0
  245. package/dist/health-UZKtVUZc.js +1417 -0
  246. package/dist/health-format-BE5TK5bs.js +28 -0
  247. package/dist/health-format-DF54wvUU.js +28 -0
  248. package/dist/heartbeat-visibility-98-alasQ.js +125 -0
  249. package/dist/heartbeat-visibility-CGSqfsb3.js +125 -0
  250. package/dist/heartbeat-wake-CvHncCjP.js +182 -0
  251. package/dist/heartbeat-wake-DLxQm6-U.js +182 -0
  252. package/dist/help-format-CJQ7APRn.js +17 -0
  253. package/dist/help-format-D3JhWp1E.js +17 -0
  254. package/dist/helpers-703bXVlF.js +25 -0
  255. package/dist/helpers-DAEoFkbn.js +10 -0
  256. package/dist/helpers-n2CtWpm9.js +25 -0
  257. package/dist/helpers-ndPQWl6m.js +10 -0
  258. package/dist/hook-runner-global-nAi_RVmo.js +527 -0
  259. package/dist/hooks-cli-BN23UkSe.js +1221 -0
  260. package/dist/hooks-cli-CCigUQAP.js +1217 -0
  261. package/dist/host-env-security-BGibnCbS.js +106 -0
  262. package/dist/host-env-security-axRnIi8d.js +106 -0
  263. package/dist/image-ops-CX41n0v5.js +354 -0
  264. package/dist/image-ops-DSL3eFfQ.js +354 -0
  265. package/dist/import-BwboAUxS.js +604 -0
  266. package/dist/import-TnR4slPl.js +606 -0
  267. package/dist/inbound-context-BLy-G2Eq.js +68 -0
  268. package/dist/inbound-context-Cuu0thCw.js +68 -0
  269. package/dist/index.js +598 -0
  270. package/dist/input-provenance-gIfDn1ki.js +35 -0
  271. package/dist/input-provenance-wkso1o5V.js +35 -0
  272. package/dist/inspect-BEpFbi0c.js +286 -0
  273. package/dist/inspect-BeNNpWna.js +286 -0
  274. package/dist/installs-BmtDxAA-.js +319 -0
  275. package/dist/installs-DJ188C74.js +319 -0
  276. package/dist/ip-D4VG5EJO.js +200 -0
  277. package/dist/ip-MwCwRA7c.js +200 -0
  278. package/dist/ipv4-DNo9AFDu.js +46 -0
  279. package/dist/ipv4-VfoVR5uR.js +46 -0
  280. package/dist/ir-DRpvvv-1.js +972 -0
  281. package/dist/is-main-BE1Jih91.js +30 -0
  282. package/dist/json-file-BW22hGtf.js +25 -0
  283. package/dist/json-file-DwRAfAAy.js +25 -0
  284. package/dist/json-files-BI20PLIm.js +46 -0
  285. package/dist/json-files-Dy52honG.js +46 -0
  286. package/dist/lanes-1CBKdsiR.js +58 -0
  287. package/dist/lanes-DqVYfPRG.js +58 -0
  288. package/dist/lifecycle-core-BzhjWI2E.js +476 -0
  289. package/dist/lifecycle-core-DctTLBFp.js +474 -0
  290. package/dist/links-CtGBIrG8.js +15 -0
  291. package/dist/links-CwTlzaPe.js +15 -0
  292. package/dist/loader-BLMpE4uG.js +22397 -0
  293. package/dist/loader-C5cQlGXB.js +22400 -0
  294. package/dist/location-BUhzov-a.js +43 -0
  295. package/dist/location-Qo8Ii1zo.js +43 -0
  296. package/dist/logger-ASsO5Nz-.js +49 -0
  297. package/dist/logger-B8BE0PyS.js +12 -0
  298. package/dist/logger-CPvz-aPM.js +47 -0
  299. package/dist/logger-cL0D2DCr.js +12 -0
  300. package/dist/logging-Cd9y2AdQ.js +20 -0
  301. package/dist/logging-DRwtiLIS.js +1 -0
  302. package/dist/logging-DTEoeoa3.js +19 -0
  303. package/dist/logging-fywhKCmE.js +1 -0
  304. package/dist/login-B5TdMKIC.js +61 -0
  305. package/dist/login-Cak5EAvl.js +62 -0
  306. package/dist/login-qr-BuTJwO4R.js +329 -0
  307. package/dist/login-qr-Do-8NFKK.js +325 -0
  308. package/dist/logs-cli-BkCweYSR.js +240 -0
  309. package/dist/logs-cli-CMUTrgGH.js +236 -0
  310. package/dist/markdown-tables-B3sXo71y.js +29 -0
  311. package/dist/markdown-tables-C48ANSSq.js +29 -0
  312. package/dist/media-DcDCPyuW.js +971 -0
  313. package/dist/media-DgxPvn2i.js +9492 -0
  314. package/dist/message-action-names-BwpFcASf.js +2520 -0
  315. package/dist/message-action-names-CH6TDClE.js +2520 -0
  316. package/dist/message-channel-CtcVHawF.js +91 -0
  317. package/dist/message-channel-tuc9CdEw.js +91 -0
  318. package/dist/mime-CAqaK3kp.js +146 -0
  319. package/dist/mime-ViuhRuMM.js +146 -0
  320. package/dist/mutable-allowlist-detectors-BXE7Hr7F.js +64 -0
  321. package/dist/mutable-allowlist-detectors-CtKavajp.js +64 -0
  322. package/dist/net-DSkFMHJ8.js +225 -0
  323. package/dist/net-DTqfFYzt.js +225 -0
  324. package/dist/node-cli-DTp-eCFc.js +1386 -0
  325. package/dist/node-cli-Yd_KvTgV.js +1390 -0
  326. package/dist/node-service-RyMlWp8N.js +67 -0
  327. package/dist/node-service-TL9b6Qfz.js +67 -0
  328. package/dist/nodes-cli-BcXyjWnw.js +1350 -0
  329. package/dist/nodes-cli-DHHf5weG.js +1346 -0
  330. package/dist/nodes-screen-B7HJugJ0.js +250 -0
  331. package/dist/nodes-screen-nCRd71Mk.js +250 -0
  332. package/dist/note-B6142LyJ.js +92 -0
  333. package/dist/note-D-EI0czq.js +92 -0
  334. package/dist/npm-registry-spec-PPyRXSpx.js +786 -0
  335. package/dist/npm-registry-spec-uUmDWe6v.js +786 -0
  336. package/dist/npm-resolution-C-6NY92-.js +86 -0
  337. package/dist/npm-resolution-DSRcDO7P.js +86 -0
  338. package/dist/onboard-D0pXb_02.js +645 -0
  339. package/dist/onboard-DdAR-LF_.js +647 -0
  340. package/dist/onboard-auth-cNtb3FTP.js +211 -0
  341. package/dist/onboard-auth-gwz-0mZ6.js +207 -0
  342. package/dist/onboard-channels-8SAR1gMS.js +2618 -0
  343. package/dist/onboard-channels-tRmXz2Lj.js +2619 -0
  344. package/dist/onboard-config-DOmXYEvJ.js +39 -0
  345. package/dist/onboard-config-JmR21VYa.js +39 -0
  346. package/dist/onboard-helpers-DGVxeLf_.js +358 -0
  347. package/dist/onboard-helpers-DdqoC3w8.js +357 -0
  348. package/dist/onboard-remote-CspZpXS9.js +127 -0
  349. package/dist/onboard-remote-DJcHZQqI.js +127 -0
  350. package/dist/onboarding-BH0siVu3.js +586 -0
  351. package/dist/onboarding-CKmRrgeq.js +588 -0
  352. package/dist/onboarding.finalize-BGyWeNH5.js +402 -0
  353. package/dist/onboarding.finalize-BpVbqIc1.js +404 -0
  354. package/dist/onboarding.gateway-config-B4xt1gtO.js +202 -0
  355. package/dist/onboarding.gateway-config-CT9RcbVE.js +196 -0
  356. package/dist/outbound-B3wlEY-e.js +220 -0
  357. package/dist/outbound-KHig2PTG.js +221 -0
  358. package/dist/outbound-attachment-BZkefkAT.js +18 -0
  359. package/dist/outbound-attachment-D5FMlKjS.js +18 -0
  360. package/dist/outbound-attachment-DjvyU7Oq.js +18 -0
  361. package/dist/pairing-cli-BTwS98JV.js +130 -0
  362. package/dist/pairing-cli-C8jztqm2.js +126 -0
  363. package/dist/pairing-labels-E2eoE9tc.js +9 -0
  364. package/dist/pairing-labels-Ks4ey7DT.js +9 -0
  365. package/dist/pairing-store-C7DF-eCM.js +460 -0
  366. package/dist/pairing-store-CU4_h9xa.js +459 -0
  367. package/dist/parse-log-line-GisaZn5H.js +44 -0
  368. package/dist/parse-log-line-ZsbwG_u7.js +44 -0
  369. package/dist/parse-timeout-BpphuwYl.js +16 -0
  370. package/dist/parse-timeout-CE6BjmGU.js +16 -0
  371. package/dist/path-env-DMKJ1GE3.js +89 -0
  372. package/dist/path-env-Dq-jhL2Z.js +89 -0
  373. package/dist/path-safety-BFE0XmGC.js +14 -0
  374. package/dist/path-safety-BJ8ge6Ho.js +14 -0
  375. package/dist/paths-DHuXVC00.js +229 -0
  376. package/dist/plugin-auto-enable-Bms-lvxW.js +289 -0
  377. package/dist/plugin-auto-enable-fc5IL3zs.js +288 -0
  378. package/dist/plugin-registry-BrQP6X71.js +33 -0
  379. package/dist/plugin-registry-nbb06LsB.js +33 -0
  380. package/dist/plugin-sdk/account-id.d.ts +1 -0
  381. package/dist/plugin-sdk/account-id.js +34 -0
  382. package/dist/plugin-sdk/agents/agent-helpers/errors.d.ts +55 -0
  383. package/dist/plugin-sdk/agents/agent-helpers/google.d.ts +3 -0
  384. package/dist/plugin-sdk/agents/agent-helpers/images.d.ts +21 -0
  385. package/dist/plugin-sdk/agents/agent-helpers/message-sanitization.d.ts +14 -0
  386. package/dist/plugin-sdk/agents/agent-helpers/messaging-dedupe.d.ts +10 -0
  387. package/dist/plugin-sdk/agents/agent-helpers/openai.d.ts +9 -0
  388. package/dist/plugin-sdk/agents/agent-helpers/turns.d.ts +20 -0
  389. package/dist/plugin-sdk/agents/agent-helpers/types.d.ts +1 -0
  390. package/dist/plugin-sdk/agents/agent-helpers.d.ts +10 -0
  391. package/dist/plugin-sdk/agents/agent-messaging.d.ts +8 -0
  392. package/dist/plugin-sdk/agents/agent-scope.d.ts +81 -0
  393. package/dist/plugin-sdk/agents/agent-types.d.ts +73 -0
  394. package/dist/plugin-sdk/agents/agent-utils.d.ts +25 -0
  395. package/dist/plugin-sdk/agents/announce-idempotency.d.ts +11 -0
  396. package/dist/plugin-sdk/agents/block-chunker.d.ts +19 -0
  397. package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
  398. package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
  399. package/dist/plugin-sdk/agents/current-time.d.ts +17 -0
  400. package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
  401. package/dist/plugin-sdk/agents/identity-avatar.d.ts +15 -0
  402. package/dist/plugin-sdk/agents/identity.d.ts +28 -0
  403. package/dist/plugin-sdk/agents/image-sanitization.d.ts +8 -0
  404. package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
  405. package/dist/plugin-sdk/agents/live-auth-keys.d.ts +6 -0
  406. package/dist/plugin-sdk/agents/owner-display.d.ts +19 -0
  407. package/dist/plugin-sdk/agents/provider-utils.d.ts +20 -0
  408. package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
  409. package/dist/plugin-sdk/agents/session-write-lock.d.ts +53 -0
  410. package/dist/plugin-sdk/agents/stable-stringify.d.ts +1 -0
  411. package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +24 -0
  412. package/dist/plugin-sdk/agents/subagent-announce.d.ts +39 -0
  413. package/dist/plugin-sdk/agents/subagent-depth.d.ts +11 -0
  414. package/dist/plugin-sdk/agents/subagent-lifecycle-events.d.ts +18 -0
  415. package/dist/plugin-sdk/agents/subagent-registry-cleanup.d.ts +24 -0
  416. package/dist/plugin-sdk/agents/subagent-registry-completion.d.ts +15 -0
  417. package/dist/plugin-sdk/agents/subagent-registry-queries.d.ts +11 -0
  418. package/dist/plugin-sdk/agents/subagent-registry-state.d.ts +7 -0
  419. package/dist/plugin-sdk/agents/subagent-registry.d.ts +45 -0
  420. package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +4 -0
  421. package/dist/plugin-sdk/agents/subagent-registry.types.d.ts +34 -0
  422. package/dist/plugin-sdk/agents/subagent-spawn.d.ts +46 -0
  423. package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
  424. package/dist/plugin-sdk/agents/tool-call-id.d.ts +27 -0
  425. package/dist/plugin-sdk/agents/tool-display-common.d.ts +32 -0
  426. package/dist/plugin-sdk/agents/tool-display.d.ts +15 -0
  427. package/dist/plugin-sdk/agents/tool-images.d.ts +10 -0
  428. package/dist/plugin-sdk/agents/tools/agent-step.d.ts +15 -0
  429. package/dist/plugin-sdk/agents/tools/common.d.ts +80 -0
  430. package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
  431. package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +6 -0
  432. package/dist/plugin-sdk/agents/tools/discord-actions-moderation-shared.d.ts +13 -0
  433. package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
  434. package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
  435. package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +5 -0
  436. package/dist/plugin-sdk/agents/tools/sessions-access.d.ts +42 -0
  437. package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +51 -0
  438. package/dist/plugin-sdk/agents/tools/sessions-resolution.d.ts +59 -0
  439. package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
  440. package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
  441. package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +7 -0
  442. package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
  443. package/dist/plugin-sdk/agents/tools/whatsapp-target-auth.d.ts +10 -0
  444. package/dist/plugin-sdk/agents/usage.d.ts +49 -0
  445. package/dist/plugin-sdk/agents/workspace.d.ts +1 -0
  446. package/dist/plugin-sdk/auth/api-key-rotation.d.ts +22 -0
  447. package/dist/plugin-sdk/auth/constants.d.ts +15 -0
  448. package/dist/plugin-sdk/auth/display.d.ts +7 -0
  449. package/dist/plugin-sdk/auth/doctor.d.ts +8 -0
  450. package/dist/plugin-sdk/auth/env-injection.d.ts +38 -0
  451. package/dist/plugin-sdk/auth/index.d.ts +10 -0
  452. package/dist/plugin-sdk/auth/oauth.d.ts +13 -0
  453. package/dist/plugin-sdk/auth/order.d.ts +8 -0
  454. package/dist/plugin-sdk/auth/paths.d.ts +3 -0
  455. package/dist/plugin-sdk/auth/profiles.d.ts +11 -0
  456. package/dist/plugin-sdk/auth/provider-auth.d.ts +32 -0
  457. package/dist/plugin-sdk/auth/store.d.ts +7 -0
  458. package/dist/plugin-sdk/auth/types.d.ts +45 -0
  459. package/dist/plugin-sdk/auth/usage.d.ts +80 -0
  460. package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
  461. package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
  462. package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
  463. package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
  464. package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +47 -0
  465. package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
  466. package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
  467. package/dist/plugin-sdk/auto-reply/dispatch.d.ts +32 -0
  468. package/dist/plugin-sdk/auto-reply/envelope.d.ts +58 -0
  469. package/dist/plugin-sdk/auto-reply/fallback-state.d.ts +55 -0
  470. package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
  471. package/dist/plugin-sdk/auto-reply/heartbeat-reply-payload.d.ts +2 -0
  472. package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +16 -0
  473. package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +17 -0
  474. package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
  475. package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
  476. package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +32 -0
  477. package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +58 -0
  478. package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +15 -0
  479. package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +27 -0
  480. package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +119 -0
  481. package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +36 -0
  482. package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
  483. package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
  484. package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
  485. package/dist/plugin-sdk/auto-reply/reply/body.d.ts +10 -0
  486. package/dist/plugin-sdk/auto-reply/reply/command-gates.d.ts +18 -0
  487. package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
  488. package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
  489. package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
  490. package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +13 -0
  491. package/dist/plugin-sdk/auto-reply/reply/commands-export-session.d.ts +3 -0
  492. package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +11 -0
  493. package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
  494. package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +8 -0
  495. package/dist/plugin-sdk/auto-reply/reply/commands-setunset-standard.d.ts +10 -0
  496. package/dist/plugin-sdk/auto-reply/reply/commands-setunset.d.ts +34 -0
  497. package/dist/plugin-sdk/auto-reply/reply/commands-slash-parse.d.ts +24 -0
  498. package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +20 -0
  499. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-agents.d.ts +3 -0
  500. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-focus.d.ts +3 -0
  501. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-help.d.ts +2 -0
  502. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-info.d.ts +3 -0
  503. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-kill.d.ts +3 -0
  504. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-list.d.ts +3 -0
  505. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-log.d.ts +3 -0
  506. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-send.d.ts +3 -0
  507. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-spawn.d.ts +3 -0
  508. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/action-unfocus.d.ts +3 -0
  509. package/dist/plugin-sdk/auto-reply/reply/commands-subagents/shared.d.ts +81 -0
  510. package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +4 -0
  511. package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
  512. package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +49 -0
  513. package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
  514. package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
  515. package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
  516. package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
  517. package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
  518. package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +7 -0
  519. package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +3 -0
  520. package/dist/plugin-sdk/auto-reply/reply/directive-handling.levels.d.ts +11 -0
  521. package/dist/plugin-sdk/auto-reply/reply/directive-handling.params.d.ts +49 -0
  522. package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +37 -0
  523. package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +39 -0
  524. package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
  525. package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +4 -0
  526. package/dist/plugin-sdk/auto-reply/reply/directive-parsing.d.ts +5 -0
  527. package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +19 -0
  528. package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
  529. package/dist/plugin-sdk/auto-reply/reply/dispatcher-registry.d.ts +24 -0
  530. package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
  531. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +55 -0
  532. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
  533. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +102 -0
  534. package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +45 -0
  535. package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +59 -0
  536. package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
  537. package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +26 -0
  538. package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
  539. package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
  540. package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
  541. package/dist/plugin-sdk/auto-reply/reply/inbound-meta.d.ts +3 -0
  542. package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
  543. package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
  544. package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +19 -0
  545. package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +11 -0
  546. package/dist/plugin-sdk/auto-reply/reply/origin-routing.d.ts +13 -0
  547. package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
  548. package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
  549. package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
  550. package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
  551. package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
  552. package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
  553. package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
  554. package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +20 -0
  555. package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +72 -0
  556. package/dist/plugin-sdk/auto-reply/reply/queue-policy.d.ts +8 -0
  557. package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
  558. package/dist/plugin-sdk/auto-reply/reply/reply-delivery.d.ts +27 -0
  559. package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
  560. package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +53 -0
  561. package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
  562. package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +27 -0
  563. package/dist/plugin-sdk/auto-reply/reply/reply-reference.d.ts +20 -0
  564. package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
  565. package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
  566. package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +49 -0
  567. package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
  568. package/dist/plugin-sdk/auto-reply/reply/session-reset-prompt.d.ts +1 -0
  569. package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +4 -0
  570. package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +8 -0
  571. package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +21 -0
  572. package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
  573. package/dist/plugin-sdk/auto-reply/reply/strip-inbound-meta.d.ts +27 -0
  574. package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +26 -0
  575. package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
  576. package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
  577. package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
  578. package/dist/plugin-sdk/auto-reply/reply.d.ts +5 -0
  579. package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
  580. package/dist/plugin-sdk/auto-reply/status.d.ts +50 -0
  581. package/dist/plugin-sdk/auto-reply/templating.d.ts +155 -0
  582. package/dist/plugin-sdk/auto-reply/thinking.d.ts +7 -0
  583. package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
  584. package/dist/plugin-sdk/auto-reply/types.d.ts +79 -0
  585. package/dist/plugin-sdk/channel-web.d.ts +6 -0
  586. package/dist/plugin-sdk/channels/account-summary.d.ts +17 -0
  587. package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
  588. package/dist/plugin-sdk/channels/allow-from.d.ts +11 -0
  589. package/dist/plugin-sdk/channels/allowlist-match.d.ts +16 -0
  590. package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +33 -0
  591. package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
  592. package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
  593. package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
  594. package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
  595. package/dist/plugin-sdk/channels/dock.d.ts +24 -0
  596. package/dist/plugin-sdk/channels/draft-stream-controls.d.ts +54 -0
  597. package/dist/plugin-sdk/channels/draft-stream-loop.d.ts +13 -0
  598. package/dist/plugin-sdk/channels/location.d.ts +21 -0
  599. package/dist/plugin-sdk/channels/logging.d.ts +20 -0
  600. package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
  601. package/dist/plugin-sdk/channels/model-overrides.d.ts +18 -0
  602. package/dist/plugin-sdk/channels/plugins/account-action-gate.d.ts +5 -0
  603. package/dist/plugin-sdk/channels/plugins/account-helpers.d.ts +6 -0
  604. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
  605. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
  606. package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
  607. package/dist/plugin-sdk/channels/plugins/actions/shared.d.ts +7 -0
  608. package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
  609. package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
  610. package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
  611. package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
  612. package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
  613. package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
  614. package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
  615. package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
  616. package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
  617. package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
  618. package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +18 -0
  619. package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
  620. package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
  621. package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
  622. package/dist/plugin-sdk/channels/plugins/media-payload.d.ts +15 -0
  623. package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
  624. package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +14 -0
  625. package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
  626. package/dist/plugin-sdk/channels/plugins/normalize/shared.d.ts +6 -0
  627. package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
  628. package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
  629. package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
  630. package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +3 -0
  631. package/dist/plugin-sdk/channels/plugins/onboarding/channel-access-configure.d.ts +21 -0
  632. package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
  633. package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
  634. package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +177 -0
  635. package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +6 -0
  636. package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +7 -0
  637. package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
  638. package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +4 -0
  639. package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
  640. package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
  641. package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
  642. package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
  643. package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
  644. package/dist/plugin-sdk/channels/plugins/registry-loader.d.ts +5 -0
  645. package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
  646. package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
  647. package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
  648. package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +29 -0
  649. package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
  650. package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
  651. package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +282 -0
  652. package/dist/plugin-sdk/channels/plugins/types.core.d.ts +350 -0
  653. package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
  654. package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
  655. package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
  656. package/dist/plugin-sdk/channels/plugins/whatsapp-shared.d.ts +5 -0
  657. package/dist/plugin-sdk/channels/registry.d.ts +15 -0
  658. package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
  659. package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
  660. package/dist/plugin-sdk/channels/session.d.ts +18 -0
  661. package/dist/plugin-sdk/channels/status-reactions.d.ts +62 -0
  662. package/dist/plugin-sdk/channels/targets.d.ts +42 -0
  663. package/dist/plugin-sdk/channels/telegram/api.d.ts +5 -0
  664. package/dist/plugin-sdk/channels/typing-lifecycle.d.ts +12 -0
  665. package/dist/plugin-sdk/channels/typing.d.ts +13 -0
  666. package/dist/plugin-sdk/channels/voice-credentials.d.ts +26 -0
  667. package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
  668. package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
  669. package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
  670. package/dist/plugin-sdk/cli/deps.d.ts +18 -0
  671. package/dist/plugin-sdk/cli/outbound-send-deps.d.ts +4 -0
  672. package/dist/plugin-sdk/cli/outbound-send-mapping.d.ts +10 -0
  673. package/dist/plugin-sdk/cli/parse-bytes.d.ts +4 -0
  674. package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
  675. package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
  676. package/dist/plugin-sdk/cli/progress.d.ts +24 -0
  677. package/dist/plugin-sdk/cli/wait.d.ts +1 -0
  678. package/dist/plugin-sdk/commands/agent/delivery.d.ts +25 -0
  679. package/dist/plugin-sdk/commands/agent/run-context.d.ts +2 -0
  680. package/dist/plugin-sdk/commands/agent/session-store.d.ts +16 -0
  681. package/dist/plugin-sdk/commands/agent/session.d.ts +32 -0
  682. package/dist/plugin-sdk/commands/agent/types.d.ts +89 -0
  683. package/dist/plugin-sdk/commands/agent.d.ts +14 -0
  684. package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
  685. package/dist/plugin-sdk/commands/health.d.ts +63 -0
  686. package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
  687. package/dist/plugin-sdk/commands/onboard-helpers.d.ts +76 -0
  688. package/dist/plugin-sdk/commands/onboard-types.d.ts +65 -0
  689. package/dist/plugin-sdk/commands/signal-install.d.ts +30 -0
  690. package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
  691. package/dist/plugin-sdk/config/agent-limits.d.ts +6 -0
  692. package/dist/plugin-sdk/config/backup-rotation.d.ts +5 -0
  693. package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
  694. package/dist/plugin-sdk/config/commands.d.ts +20 -0
  695. package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
  696. package/dist/plugin-sdk/config/config.d.ts +7 -0
  697. package/dist/plugin-sdk/config/dangerous-name-matching.d.ts +12 -0
  698. package/dist/plugin-sdk/config/defaults.d.ts +18 -0
  699. package/dist/plugin-sdk/config/discord-preview-streaming.d.ts +25 -0
  700. package/dist/plugin-sdk/config/env-preserve.d.ts +10 -0
  701. package/dist/plugin-sdk/config/env-substitution.d.ts +36 -0
  702. package/dist/plugin-sdk/config/env-vars.d.ts +6 -0
  703. package/dist/plugin-sdk/config/group-policy.d.ts +49 -0
  704. package/dist/plugin-sdk/config/includes.d.ts +32 -0
  705. package/dist/plugin-sdk/config/io.d.ts +60 -0
  706. package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
  707. package/dist/plugin-sdk/config/legacy.d.ts +6 -0
  708. package/dist/plugin-sdk/config/legacy.migrations.d.ts +2 -0
  709. package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
  710. package/dist/plugin-sdk/config/legacy.shared.d.ts +10 -0
  711. package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
  712. package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
  713. package/dist/plugin-sdk/config/merge-patch.d.ts +5 -0
  714. package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
  715. package/dist/plugin-sdk/config/paths.d.ts +57 -0
  716. package/dist/plugin-sdk/config/prototype-keys.d.ts +1 -0
  717. package/dist/plugin-sdk/config/runtime-group-policy.d.ts +56 -0
  718. package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
  719. package/dist/plugin-sdk/config/sessions/artifacts.d.ts +5 -0
  720. package/dist/plugin-sdk/config/sessions/constants.d.ts +2 -0
  721. package/dist/plugin-sdk/config/sessions/delivery-info.d.ts +16 -0
  722. package/dist/plugin-sdk/config/sessions/disk-budget.d.ts +28 -0
  723. package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
  724. package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
  725. package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
  726. package/dist/plugin-sdk/config/sessions/paths.d.ts +21 -0
  727. package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
  728. package/dist/plugin-sdk/config/sessions/session-file.d.ts +15 -0
  729. package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
  730. package/dist/plugin-sdk/config/sessions/store.d.ts +123 -0
  731. package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
  732. package/dist/plugin-sdk/config/sessions/types.d.ts +136 -0
  733. package/dist/plugin-sdk/config/sessions.d.ts +13 -0
  734. package/dist/plugin-sdk/config/talk.d.ts +21 -0
  735. package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
  736. package/dist/plugin-sdk/config/types.agent-defaults.d.ts +168 -0
  737. package/dist/plugin-sdk/config/types.agents-shared.d.ts +43 -0
  738. package/dist/plugin-sdk/config/types.agents.d.ts +66 -0
  739. package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
  740. package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
  741. package/dist/plugin-sdk/config/types.base.d.ts +202 -0
  742. package/dist/plugin-sdk/config/types.browser.d.ts +65 -0
  743. package/dist/plugin-sdk/config/types.channel-messaging-common.d.ts +44 -0
  744. package/dist/plugin-sdk/config/types.channels.d.ts +53 -0
  745. package/dist/plugin-sdk/config/types.cron.d.ts +26 -0
  746. package/dist/plugin-sdk/config/types.d.ts +27 -0
  747. package/dist/plugin-sdk/config/types.discord.d.ts +271 -0
  748. package/dist/plugin-sdk/config/types.gateway.d.ts +335 -0
  749. package/dist/plugin-sdk/config/types.googlechat.d.ts +107 -0
  750. package/dist/plugin-sdk/config/types.hooks.d.ts +123 -0
  751. package/dist/plugin-sdk/config/types.imessage.d.ts +77 -0
  752. package/dist/plugin-sdk/config/types.installs.d.ts +14 -0
  753. package/dist/plugin-sdk/config/types.irc.d.ts +53 -0
  754. package/dist/plugin-sdk/config/types.messages.d.ts +149 -0
  755. package/dist/plugin-sdk/config/types.models.d.ts +41 -0
  756. package/dist/plugin-sdk/config/types.msteams.d.ts +108 -0
  757. package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
  758. package/dist/plugin-sdk/config/types.plugins.d.ts +23 -0
  759. package/dist/plugin-sdk/config/types.queue.d.ts +14 -0
  760. package/dist/plugin-sdk/config/types.remoteclaw.d.ts +119 -0
  761. package/dist/plugin-sdk/config/types.signal.d.ts +46 -0
  762. package/dist/plugin-sdk/config/types.slack.d.ts +179 -0
  763. package/dist/plugin-sdk/config/types.telegram.d.ts +187 -0
  764. package/dist/plugin-sdk/config/types.tools.d.ts +249 -0
  765. package/dist/plugin-sdk/config/types.tts.d.ts +79 -0
  766. package/dist/plugin-sdk/config/types.whatsapp.d.ts +101 -0
  767. package/dist/plugin-sdk/config/validation.d.ts +37 -0
  768. package/dist/plugin-sdk/config/version.d.ts +8 -0
  769. package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +93 -0
  770. package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +302 -0
  771. package/dist/plugin-sdk/config/zod-schema.agents.d.ts +224 -0
  772. package/dist/plugin-sdk/config/zod-schema.allowdeny.d.ts +13 -0
  773. package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
  774. package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
  775. package/dist/plugin-sdk/config/zod-schema.core.d.ts +355 -0
  776. package/dist/plugin-sdk/config/zod-schema.d.ts +3155 -0
  777. package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +85 -0
  778. package/dist/plugin-sdk/config/zod-schema.installs.d.ts +16 -0
  779. package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +3656 -0
  780. package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +235 -0
  781. package/dist/plugin-sdk/config/zod-schema.providers.d.ts +2182 -0
  782. package/dist/plugin-sdk/config/zod-schema.sensitive.d.ts +2 -0
  783. package/dist/plugin-sdk/config/zod-schema.session.d.ts +228 -0
  784. package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
  785. package/dist/plugin-sdk/cron/parse.d.ts +1 -0
  786. package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
  787. package/dist/plugin-sdk/cron/service/jobs.d.ts +21 -0
  788. package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
  789. package/dist/plugin-sdk/cron/service/normalize.d.ts +18 -0
  790. package/dist/plugin-sdk/cron/service/ops.d.ts +81 -0
  791. package/dist/plugin-sdk/cron/service/state.d.ts +125 -0
  792. package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
  793. package/dist/plugin-sdk/cron/service/timer.d.ts +47 -0
  794. package/dist/plugin-sdk/cron/service.d.ts +66 -0
  795. package/dist/plugin-sdk/cron/session-reaper.d.ts +35 -0
  796. package/dist/plugin-sdk/cron/stagger.d.ts +8 -0
  797. package/dist/plugin-sdk/cron/store.d.ts +6 -0
  798. package/dist/plugin-sdk/cron/types.d.ts +131 -0
  799. package/dist/plugin-sdk/cron/webhook-url.d.ts +1 -0
  800. package/dist/plugin-sdk/daemon/constants.d.ts +35 -0
  801. package/dist/plugin-sdk/discord/accounts.d.ts +21 -0
  802. package/dist/plugin-sdk/discord/api.d.ts +11 -0
  803. package/dist/plugin-sdk/discord/audit.d.ts +29 -0
  804. package/dist/plugin-sdk/discord/chunk.d.ts +20 -0
  805. package/dist/plugin-sdk/discord/client.d.ts +21 -0
  806. package/dist/plugin-sdk/discord/components-registry.d.ts +16 -0
  807. package/dist/plugin-sdk/discord/components.d.ts +196 -0
  808. package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
  809. package/dist/plugin-sdk/discord/draft-chunking.d.ts +6 -0
  810. package/dist/plugin-sdk/discord/draft-stream.d.ts +21 -0
  811. package/dist/plugin-sdk/discord/gateway-logging.d.ts +8 -0
  812. package/dist/plugin-sdk/discord/guilds.d.ts +6 -0
  813. package/dist/plugin-sdk/discord/monitor/agent-components.d.ts +55 -0
  814. package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +174 -0
  815. package/dist/plugin-sdk/discord/monitor/commands.d.ts +2 -0
  816. package/dist/plugin-sdk/discord/monitor/format.d.ts +13 -0
  817. package/dist/plugin-sdk/discord/monitor/gateway-plugin.d.ts +8 -0
  818. package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +9 -0
  819. package/dist/plugin-sdk/discord/monitor/listeners.d.ts +44 -0
  820. package/dist/plugin-sdk/discord/monitor/message-handler.d.ts +5 -0
  821. package/dist/plugin-sdk/discord/monitor/message-handler.preflight.d.ts +14 -0
  822. package/dist/plugin-sdk/discord/monitor/message-handler.preflight.types.d.ts +95 -0
  823. package/dist/plugin-sdk/discord/monitor/message-handler.process.d.ts +2 -0
  824. package/dist/plugin-sdk/discord/monitor/message-utils.d.ts +40 -0
  825. package/dist/plugin-sdk/discord/monitor/native-command.d.ts +23 -0
  826. package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +9 -0
  827. package/dist/plugin-sdk/discord/monitor/presence.d.ts +5 -0
  828. package/dist/plugin-sdk/discord/monitor/provider.allowlist.d.ts +14 -0
  829. package/dist/plugin-sdk/discord/monitor/provider.d.ts +28 -0
  830. package/dist/plugin-sdk/discord/monitor/provider.lifecycle.d.ts +23 -0
  831. package/dist/plugin-sdk/discord/monitor/reply-context.d.ts +17 -0
  832. package/dist/plugin-sdk/discord/monitor/reply-delivery.d.ts +22 -0
  833. package/dist/plugin-sdk/discord/monitor/rest-fetch.d.ts +2 -0
  834. package/dist/plugin-sdk/discord/monitor/sender-identity.d.ts +31 -0
  835. package/dist/plugin-sdk/discord/monitor/system-events.d.ts +2 -0
  836. package/dist/plugin-sdk/discord/monitor/thread-bindings.d.ts +5 -0
  837. package/dist/plugin-sdk/discord/monitor/thread-bindings.discord-api.d.ts +36 -0
  838. package/dist/plugin-sdk/discord/monitor/thread-bindings.lifecycle.d.ts +30 -0
  839. package/dist/plugin-sdk/discord/monitor/thread-bindings.manager.d.ts +17 -0
  840. package/dist/plugin-sdk/discord/monitor/thread-bindings.messages.d.ts +17 -0
  841. package/dist/plugin-sdk/discord/monitor/thread-bindings.state.d.ts +61 -0
  842. package/dist/plugin-sdk/discord/monitor/thread-bindings.types.d.ts +64 -0
  843. package/dist/plugin-sdk/discord/monitor/threading.d.ts +106 -0
  844. package/dist/plugin-sdk/discord/monitor/typing.d.ts +5 -0
  845. package/dist/plugin-sdk/discord/monitor.d.ts +10 -0
  846. package/dist/plugin-sdk/discord/monitor.gateway.d.ts +12 -0
  847. package/dist/plugin-sdk/discord/pluralkit.d.ts +26 -0
  848. package/dist/plugin-sdk/discord/probe.d.ts +28 -0
  849. package/dist/plugin-sdk/discord/resolve-channels.d.ts +15 -0
  850. package/dist/plugin-sdk/discord/resolve-users.d.ts +14 -0
  851. package/dist/plugin-sdk/discord/send.channels.d.ts +17 -0
  852. package/dist/plugin-sdk/discord/send.components.d.ts +17 -0
  853. package/dist/plugin-sdk/discord/send.d.ts +10 -0
  854. package/dist/plugin-sdk/discord/send.emojis-stickers.d.ts +4 -0
  855. package/dist/plugin-sdk/discord/send.guild.d.ts +24 -0
  856. package/dist/plugin-sdk/discord/send.messages.d.ts +20 -0
  857. package/dist/plugin-sdk/discord/send.outbound.d.ts +57 -0
  858. package/dist/plugin-sdk/discord/send.permissions.d.ts +20 -0
  859. package/dist/plugin-sdk/discord/send.reactions.d.ts +15 -0
  860. package/dist/plugin-sdk/discord/send.shared.d.ts +85 -0
  861. package/dist/plugin-sdk/discord/send.types.d.ts +144 -0
  862. package/dist/plugin-sdk/discord/targets.d.ts +18 -0
  863. package/dist/plugin-sdk/discord/token.d.ts +11 -0
  864. package/dist/plugin-sdk/discord/voice/command.d.ts +15 -0
  865. package/dist/plugin-sdk/discord/voice/manager.d.ts +52 -0
  866. package/dist/plugin-sdk/discord/voice-message.d.ts +50 -0
  867. package/dist/plugin-sdk/gateway/call.d.ts +65 -0
  868. package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
  869. package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +4 -0
  870. package/dist/plugin-sdk/gateway/client.d.ts +64 -0
  871. package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
  872. package/dist/plugin-sdk/gateway/credentials.d.ts +36 -0
  873. package/dist/plugin-sdk/gateway/device-auth.d.ts +11 -0
  874. package/dist/plugin-sdk/gateway/method-scopes.d.ts +22 -0
  875. package/dist/plugin-sdk/gateway/net.d.ts +77 -0
  876. package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
  877. package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
  878. package/dist/plugin-sdk/gateway/protocol/index.d.ts +490 -0
  879. package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +89 -0
  880. package/dist/plugin-sdk/gateway/protocol/schema/agents-models.d.ts +188 -0
  881. package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +134 -0
  882. package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +53 -0
  883. package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +324 -0
  884. package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +41 -0
  885. package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
  886. package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +168 -0
  887. package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
  888. package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
  889. package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
  890. package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
  891. package/dist/plugin-sdk/gateway/protocol/schema/push.d.ts +15 -0
  892. package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +74 -0
  893. package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +69 -0
  894. package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +120 -0
  895. package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
  896. package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
  897. package/dist/plugin-sdk/gateway/server/ws-types.d.ts +11 -0
  898. package/dist/plugin-sdk/gateway/server-broadcast.d.ts +17 -0
  899. package/dist/plugin-sdk/gateway/server-channels.d.ts +26 -0
  900. package/dist/plugin-sdk/gateway/server-constants.d.ts +10 -0
  901. package/dist/plugin-sdk/gateway/server-methods/types.d.ts +84 -0
  902. package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
  903. package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +48 -0
  904. package/dist/plugin-sdk/gateway/session-utils.types.d.ts +81 -0
  905. package/dist/plugin-sdk/gateway/ws-log.d.ts +5 -0
  906. package/dist/plugin-sdk/gateway/ws-logging.d.ts +4 -0
  907. package/dist/plugin-sdk/globals.d.ts +11 -0
  908. package/dist/plugin-sdk/hooks/internal-hooks.d.ts +140 -0
  909. package/dist/plugin-sdk/hooks/types.d.ts +62 -0
  910. package/dist/plugin-sdk/imessage/accounts.d.ts +16 -0
  911. package/dist/plugin-sdk/imessage/client.d.ts +46 -0
  912. package/dist/plugin-sdk/imessage/constants.d.ts +2 -0
  913. package/dist/plugin-sdk/imessage/monitor/abort-handler.d.ts +9 -0
  914. package/dist/plugin-sdk/imessage/monitor/deliver.d.ts +14 -0
  915. package/dist/plugin-sdk/imessage/monitor/echo-cache.d.ts +9 -0
  916. package/dist/plugin-sdk/imessage/monitor/inbound-processing.d.ts +96 -0
  917. package/dist/plugin-sdk/imessage/monitor/monitor-provider.d.ts +7 -0
  918. package/dist/plugin-sdk/imessage/monitor/parse-notification.d.ts +2 -0
  919. package/dist/plugin-sdk/imessage/monitor/runtime.d.ts +4 -0
  920. package/dist/plugin-sdk/imessage/monitor/types.d.ts +37 -0
  921. package/dist/plugin-sdk/imessage/monitor.d.ts +2 -0
  922. package/dist/plugin-sdk/imessage/probe.d.ts +17 -0
  923. package/dist/plugin-sdk/imessage/send.d.ts +34 -0
  924. package/dist/plugin-sdk/imessage/target-parsing-helpers.d.ts +45 -0
  925. package/dist/plugin-sdk/imessage/targets.d.ts +39 -0
  926. package/dist/plugin-sdk/index.d.ts +1 -0
  927. package/dist/plugin-sdk/index.js +24140 -0
  928. package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
  929. package/dist/plugin-sdk/infra/archive-path.d.ts +12 -0
  930. package/dist/plugin-sdk/infra/archive.d.ts +46 -0
  931. package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
  932. package/dist/plugin-sdk/infra/brew.d.ts +8 -0
  933. package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
  934. package/dist/plugin-sdk/infra/channel-summary.d.ts +6 -0
  935. package/dist/plugin-sdk/infra/dedupe.d.ts +12 -0
  936. package/dist/plugin-sdk/infra/device-auth-store.d.ts +18 -0
  937. package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
  938. package/dist/plugin-sdk/infra/device-pairing.d.ts +101 -0
  939. package/dist/plugin-sdk/infra/diagnostic-events.d.ts +140 -0
  940. package/dist/plugin-sdk/infra/diagnostic-flags.d.ts +4 -0
  941. package/dist/plugin-sdk/infra/dotenv.d.ts +3 -0
  942. package/dist/plugin-sdk/infra/env.d.ts +11 -0
  943. package/dist/plugin-sdk/infra/errors.d.ts +11 -0
  944. package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
  945. package/dist/plugin-sdk/infra/file-identity.d.ts +5 -0
  946. package/dist/plugin-sdk/infra/file-lock.d.ts +2 -0
  947. package/dist/plugin-sdk/infra/format-time/format-datetime.d.ts +35 -0
  948. package/dist/plugin-sdk/infra/format-time/format-duration.d.ts +23 -0
  949. package/dist/plugin-sdk/infra/format-time/format-relative.d.ts +39 -0
  950. package/dist/plugin-sdk/infra/fs-safe.d.ts +25 -0
  951. package/dist/plugin-sdk/infra/gemini-auth.d.ts +16 -0
  952. package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
  953. package/dist/plugin-sdk/infra/git-root.d.ts +7 -0
  954. package/dist/plugin-sdk/infra/heartbeat-active-hours.d.ts +5 -0
  955. package/dist/plugin-sdk/infra/heartbeat-events-filter.d.ts +8 -0
  956. package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
  957. package/dist/plugin-sdk/infra/heartbeat-reason.d.ts +5 -0
  958. package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +45 -0
  959. package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
  960. package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +31 -0
  961. package/dist/plugin-sdk/infra/home-dir.d.ts +7 -0
  962. package/dist/plugin-sdk/infra/host-env-security.d.ts +21 -0
  963. package/dist/plugin-sdk/infra/http-body.d.ts +46 -0
  964. package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
  965. package/dist/plugin-sdk/infra/json-files.d.ts +5 -0
  966. package/dist/plugin-sdk/infra/map-size.d.ts +1 -0
  967. package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +21 -0
  968. package/dist/plugin-sdk/infra/net/hostname.d.ts +1 -0
  969. package/dist/plugin-sdk/infra/net/ssrf.d.ts +35 -0
  970. package/dist/plugin-sdk/infra/outbound/abort.d.ts +8 -0
  971. package/dist/plugin-sdk/infra/outbound/agent-delivery.d.ts +46 -0
  972. package/dist/plugin-sdk/infra/outbound/bound-delivery-router.d.ts +16 -0
  973. package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
  974. package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
  975. package/dist/plugin-sdk/infra/outbound/deliver.d.ts +81 -0
  976. package/dist/plugin-sdk/infra/outbound/delivery-queue.d.ts +78 -0
  977. package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +24 -0
  978. package/dist/plugin-sdk/infra/outbound/envelope.d.ts +16 -0
  979. package/dist/plugin-sdk/infra/outbound/format.d.ts +39 -0
  980. package/dist/plugin-sdk/infra/outbound/identity.d.ts +8 -0
  981. package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
  982. package/dist/plugin-sdk/infra/outbound/payloads.d.ts +18 -0
  983. package/dist/plugin-sdk/infra/outbound/session-binding-service.d.ts +57 -0
  984. package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
  985. package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
  986. package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
  987. package/dist/plugin-sdk/infra/outbound/targets.d.ts +87 -0
  988. package/dist/plugin-sdk/infra/pairing-files.d.ts +23 -0
  989. package/dist/plugin-sdk/infra/pairing-pending.d.ts +13 -0
  990. package/dist/plugin-sdk/infra/pairing-token.d.ts +3 -0
  991. package/dist/plugin-sdk/infra/path-guards.d.ts +5 -0
  992. package/dist/plugin-sdk/infra/path-safety.d.ts +2 -0
  993. package/dist/plugin-sdk/infra/plain-object.d.ts +4 -0
  994. package/dist/plugin-sdk/infra/prototype-keys.d.ts +1 -0
  995. package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +10 -0
  996. package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
  997. package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
  998. package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
  999. package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
  1000. package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +6 -0
  1001. package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
  1002. package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
  1003. package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +12 -0
  1004. package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
  1005. package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
  1006. package/dist/plugin-sdk/infra/provider-usage.load.d.ts +11 -0
  1007. package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
  1008. package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
  1009. package/dist/plugin-sdk/infra/restart.d.ts +70 -0
  1010. package/dist/plugin-sdk/infra/retry-policy.d.ts +25 -0
  1011. package/dist/plugin-sdk/infra/retry.d.ts +21 -0
  1012. package/dist/plugin-sdk/infra/safe-executable-value.d.ts +1 -0
  1013. package/dist/plugin-sdk/infra/scp-host.d.ts +2 -0
  1014. package/dist/plugin-sdk/infra/secure-random.d.ts +2 -0
  1015. package/dist/plugin-sdk/infra/session-cost-usage.d.ts +45 -0
  1016. package/dist/plugin-sdk/infra/session-cost-usage.types.d.ts +153 -0
  1017. package/dist/plugin-sdk/infra/session-maintenance-warning.d.ts +10 -0
  1018. package/dist/plugin-sdk/infra/shell-env.d.ts +34 -0
  1019. package/dist/plugin-sdk/infra/system-events.d.ts +18 -0
  1020. package/dist/plugin-sdk/infra/tailnet.d.ts +8 -0
  1021. package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
  1022. package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
  1023. package/dist/plugin-sdk/infra/tmp-remoteclaw-dir.d.ts +18 -0
  1024. package/dist/plugin-sdk/infra/transport-ready.d.ts +16 -0
  1025. package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
  1026. package/dist/plugin-sdk/infra/ws.d.ts +2 -0
  1027. package/dist/plugin-sdk/infra/wsl.d.ts +11 -0
  1028. package/dist/plugin-sdk/line/accounts.d.ts +10 -0
  1029. package/dist/plugin-sdk/line/actions.d.ts +22 -0
  1030. package/dist/plugin-sdk/line/auto-reply-delivery.d.ts +38 -0
  1031. package/dist/plugin-sdk/line/bot-access.d.ts +17 -0
  1032. package/dist/plugin-sdk/line/bot-handlers.d.ts +13 -0
  1033. package/dist/plugin-sdk/line/bot-message-context.d.ts +118 -0
  1034. package/dist/plugin-sdk/line/bot.d.ts +24 -0
  1035. package/dist/plugin-sdk/line/channel-access-token.d.ts +4 -0
  1036. package/dist/plugin-sdk/line/config-schema.d.ts +62 -0
  1037. package/dist/plugin-sdk/line/download.d.ts +7 -0
  1038. package/dist/plugin-sdk/line/flex-templates/basic-cards.d.ts +46 -0
  1039. package/dist/plugin-sdk/line/flex-templates/common.d.ts +2 -0
  1040. package/dist/plugin-sdk/line/flex-templates/media-control-cards.d.ts +73 -0
  1041. package/dist/plugin-sdk/line/flex-templates/message.d.ts +6 -0
  1042. package/dist/plugin-sdk/line/flex-templates/schedule-cards.d.ts +55 -0
  1043. package/dist/plugin-sdk/line/flex-templates/types.d.ts +19 -0
  1044. package/dist/plugin-sdk/line/flex-templates.d.ts +5 -0
  1045. package/dist/plugin-sdk/line/markdown-to-line.d.ts +72 -0
  1046. package/dist/plugin-sdk/line/monitor.d.ts +28 -0
  1047. package/dist/plugin-sdk/line/probe.d.ts +2 -0
  1048. package/dist/plugin-sdk/line/reply-chunks.d.ts +24 -0
  1049. package/dist/plugin-sdk/line/send.d.ts +91 -0
  1050. package/dist/plugin-sdk/line/signature.d.ts +1 -0
  1051. package/dist/plugin-sdk/line/template-messages.d.ts +100 -0
  1052. package/dist/plugin-sdk/line/types.d.ts +112 -0
  1053. package/dist/plugin-sdk/line/webhook-node.d.ts +15 -0
  1054. package/dist/plugin-sdk/line/webhook-utils.d.ts +3 -0
  1055. package/dist/plugin-sdk/line/webhook.d.ts +19 -0
  1056. package/dist/plugin-sdk/logger.d.ts +6 -0
  1057. package/dist/plugin-sdk/logging/config.d.ts +4 -0
  1058. package/dist/plugin-sdk/logging/console.d.ts +23 -0
  1059. package/dist/plugin-sdk/logging/diagnostic-session-state.d.ts +30 -0
  1060. package/dist/plugin-sdk/logging/diagnostic.d.ts +65 -0
  1061. package/dist/plugin-sdk/logging/env-log-level.d.ts +2 -0
  1062. package/dist/plugin-sdk/logging/levels.d.ts +5 -0
  1063. package/dist/plugin-sdk/logging/logger.d.ts +44 -0
  1064. package/dist/plugin-sdk/logging/node-require.d.ts +1 -0
  1065. package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
  1066. package/dist/plugin-sdk/logging/redact.d.ts +9 -0
  1067. package/dist/plugin-sdk/logging/state.d.ts +19 -0
  1068. package/dist/plugin-sdk/logging/subsystem.d.ts +18 -0
  1069. package/dist/plugin-sdk/logging/timestamps.d.ts +1 -0
  1070. package/dist/plugin-sdk/logging.d.ts +10 -0
  1071. package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
  1072. package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
  1073. package/dist/plugin-sdk/markdown/render.d.ts +18 -0
  1074. package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
  1075. package/dist/plugin-sdk/markdown/whatsapp.d.ts +14 -0
  1076. package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
  1077. package/dist/plugin-sdk/media/audio.d.ts +19 -0
  1078. package/dist/plugin-sdk/media/base64.d.ts +6 -0
  1079. package/dist/plugin-sdk/media/constants.d.ts +7 -0
  1080. package/dist/plugin-sdk/media/fetch.d.ts +23 -0
  1081. package/dist/plugin-sdk/media/image-ops.d.ts +41 -0
  1082. package/dist/plugin-sdk/media/inbound-path-policy.d.ts +18 -0
  1083. package/dist/plugin-sdk/media/local-roots.d.ts +3 -0
  1084. package/dist/plugin-sdk/media/mime.d.ts +16 -0
  1085. package/dist/plugin-sdk/media/outbound-attachment.d.ts +6 -0
  1086. package/dist/plugin-sdk/media/parse.d.ts +8 -0
  1087. package/dist/plugin-sdk/media/png-encode.d.ts +8 -0
  1088. package/dist/plugin-sdk/media/read-response-with-limit.d.ts +7 -0
  1089. package/dist/plugin-sdk/media/store.d.ts +33 -0
  1090. package/dist/plugin-sdk/middleware/auth-key-retry.d.ts +31 -0
  1091. package/dist/plugin-sdk/middleware/channel-bridge.d.ts +43 -0
  1092. package/dist/plugin-sdk/middleware/cli-runtime-base.d.ts +47 -0
  1093. package/dist/plugin-sdk/middleware/delivery-adapter.d.ts +36 -0
  1094. package/dist/plugin-sdk/middleware/error-classifier.d.ts +19 -0
  1095. package/dist/plugin-sdk/middleware/mcp-side-effects.d.ts +20 -0
  1096. package/dist/plugin-sdk/middleware/media-capability.d.ts +21 -0
  1097. package/dist/plugin-sdk/middleware/media-resolver.d.ts +12 -0
  1098. package/dist/plugin-sdk/middleware/runtime-factory.d.ts +6 -0
  1099. package/dist/plugin-sdk/middleware/runtimes/claude.d.ts +37 -0
  1100. package/dist/plugin-sdk/middleware/runtimes/codex.d.ts +79 -0
  1101. package/dist/plugin-sdk/middleware/runtimes/gemini.d.ts +63 -0
  1102. package/dist/plugin-sdk/middleware/runtimes/opencode.d.ts +59 -0
  1103. package/dist/plugin-sdk/middleware/session-map.d.ts +36 -0
  1104. package/dist/plugin-sdk/middleware/system-prompt.d.ts +30 -0
  1105. package/dist/plugin-sdk/middleware/types.d.ts +236 -0
  1106. package/dist/plugin-sdk/pairing/pairing-labels.d.ts +2 -0
  1107. package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
  1108. package/dist/plugin-sdk/pairing/pairing-store.d.ts +48 -0
  1109. package/dist/plugin-sdk/plugin-sdk/account-id.d.ts +1 -0
  1110. package/dist/plugin-sdk/plugin-sdk/agent-media-payload.d.ts +12 -0
  1111. package/dist/plugin-sdk/plugin-sdk/allow-from.d.ts +32 -0
  1112. package/dist/plugin-sdk/plugin-sdk/command-auth.d.ts +25 -0
  1113. package/dist/plugin-sdk/plugin-sdk/config-paths.d.ts +6 -0
  1114. package/dist/plugin-sdk/plugin-sdk/file-lock.d.ts +16 -0
  1115. package/dist/plugin-sdk/plugin-sdk/group-access.d.ts +16 -0
  1116. package/dist/plugin-sdk/plugin-sdk/index.d.ts +166 -0
  1117. package/dist/plugin-sdk/plugin-sdk/json-store.d.ts +5 -0
  1118. package/dist/plugin-sdk/plugin-sdk/onboarding.d.ts +11 -0
  1119. package/dist/plugin-sdk/plugin-sdk/persistent-dedupe.d.ts +20 -0
  1120. package/dist/plugin-sdk/plugin-sdk/reply-payload.d.ts +22 -0
  1121. package/dist/plugin-sdk/plugin-sdk/run-command.d.ts +12 -0
  1122. package/dist/plugin-sdk/plugin-sdk/runtime.d.ts +10 -0
  1123. package/dist/plugin-sdk/plugin-sdk/slack-message-actions.d.ts +11 -0
  1124. package/dist/plugin-sdk/plugin-sdk/status-helpers.d.ts +88 -0
  1125. package/dist/plugin-sdk/plugin-sdk/temp-path.d.ts +12 -0
  1126. package/dist/plugin-sdk/plugin-sdk/text-chunking.d.ts +1 -0
  1127. package/dist/plugin-sdk/plugin-sdk/tool-send.d.ts +4 -0
  1128. package/dist/plugin-sdk/plugin-sdk/webhook-path.d.ts +6 -0
  1129. package/dist/plugin-sdk/plugin-sdk/webhook-targets.d.ts +23 -0
  1130. package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
  1131. package/dist/plugin-sdk/plugins/commands.d.ts +83 -0
  1132. package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
  1133. package/dist/plugin-sdk/plugins/config-state.d.ts +30 -0
  1134. package/dist/plugin-sdk/plugins/discovery.d.ts +24 -0
  1135. package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +37 -0
  1136. package/dist/plugin-sdk/plugins/hooks.d.ts +49 -0
  1137. package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
  1138. package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
  1139. package/dist/plugin-sdk/plugins/manifest-registry.d.ts +35 -0
  1140. package/dist/plugin-sdk/plugins/manifest.d.ts +65 -0
  1141. package/dist/plugin-sdk/plugins/path-safety.d.ts +5 -0
  1142. package/dist/plugin-sdk/plugins/registry.d.ts +148 -0
  1143. package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
  1144. package/dist/plugin-sdk/plugins/runtime/types.d.ts +310 -0
  1145. package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
  1146. package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
  1147. package/dist/plugin-sdk/plugins/types.d.ts +491 -0
  1148. package/dist/plugin-sdk/polls.d.ts +31 -0
  1149. package/dist/plugin-sdk/process/command-queue.d.ts +51 -0
  1150. package/dist/plugin-sdk/process/exec.d.ts +30 -0
  1151. package/dist/plugin-sdk/process/lanes.d.ts +6 -0
  1152. package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
  1153. package/dist/plugin-sdk/routing/account-id.d.ts +3 -0
  1154. package/dist/plugin-sdk/routing/account-lookup.d.ts +1 -0
  1155. package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
  1156. package/dist/plugin-sdk/routing/resolve-route.d.ts +42 -0
  1157. package/dist/plugin-sdk/routing/session-key.d.ts +48 -0
  1158. package/dist/plugin-sdk/runtime.d.ts +7 -0
  1159. package/dist/plugin-sdk/security/channel-metadata.d.ts +6 -0
  1160. package/dist/plugin-sdk/security/dm-policy-shared.d.ts +33 -0
  1161. package/dist/plugin-sdk/security/external-content.d.ts +53 -0
  1162. package/dist/plugin-sdk/security/safe-regex.d.ts +2 -0
  1163. package/dist/plugin-sdk/security/scan-paths.d.ts +5 -0
  1164. package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
  1165. package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
  1166. package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
  1167. package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
  1168. package/dist/plugin-sdk/sessions/session-key-utils.d.ts +16 -0
  1169. package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
  1170. package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
  1171. package/dist/plugin-sdk/shared/avatar-policy.d.ts +16 -0
  1172. package/dist/plugin-sdk/shared/chat-content.d.ts +5 -0
  1173. package/dist/plugin-sdk/shared/chat-envelope.d.ts +2 -0
  1174. package/dist/plugin-sdk/shared/device-auth.d.ts +13 -0
  1175. package/dist/plugin-sdk/shared/gateway-bind-url.d.ts +14 -0
  1176. package/dist/plugin-sdk/shared/net/ip.d.ts +19 -0
  1177. package/dist/plugin-sdk/shared/operator-scope-compat.d.ts +5 -0
  1178. package/dist/plugin-sdk/shared/pid-alive.d.ts +1 -0
  1179. package/dist/plugin-sdk/shared/process-scoped-map.d.ts +1 -0
  1180. package/dist/plugin-sdk/shared/string-normalization.d.ts +4 -0
  1181. package/dist/plugin-sdk/shared/subagents-format.d.ts +15 -0
  1182. package/dist/plugin-sdk/shared/tailscale-status.d.ts +8 -0
  1183. package/dist/plugin-sdk/shared/text/code-regions.d.ts +6 -0
  1184. package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
  1185. package/dist/plugin-sdk/shared/text-chunking.d.ts +1 -0
  1186. package/dist/plugin-sdk/signal/accounts.d.ts +17 -0
  1187. package/dist/plugin-sdk/signal/client.d.ts +32 -0
  1188. package/dist/plugin-sdk/signal/daemon.d.ts +26 -0
  1189. package/dist/plugin-sdk/signal/format.d.ts +17 -0
  1190. package/dist/plugin-sdk/signal/identity.d.ts +24 -0
  1191. package/dist/plugin-sdk/signal/index.d.ts +5 -0
  1192. package/dist/plugin-sdk/signal/monitor/event-handler.d.ts +5 -0
  1193. package/dist/plugin-sdk/signal/monitor/event-handler.types.d.ts +125 -0
  1194. package/dist/plugin-sdk/signal/monitor/mentions.d.ts +2 -0
  1195. package/dist/plugin-sdk/signal/monitor.d.ts +25 -0
  1196. package/dist/plugin-sdk/signal/probe.d.ts +7 -0
  1197. package/dist/plugin-sdk/signal/reaction-level.d.ts +17 -0
  1198. package/dist/plugin-sdk/signal/rpc-context.d.ts +9 -0
  1199. package/dist/plugin-sdk/signal/send-reactions.d.ts +32 -0
  1200. package/dist/plugin-sdk/signal/send.d.ts +25 -0
  1201. package/dist/plugin-sdk/signal/sse-reconnect.d.ts +13 -0
  1202. package/dist/plugin-sdk/slack/accounts.d.ts +32 -0
  1203. package/dist/plugin-sdk/slack/actions.d.ts +56 -0
  1204. package/dist/plugin-sdk/slack/blocks-fallback.d.ts +2 -0
  1205. package/dist/plugin-sdk/slack/blocks-input.d.ts +3 -0
  1206. package/dist/plugin-sdk/slack/channel-migration.d.ts +20 -0
  1207. package/dist/plugin-sdk/slack/client.d.ts +4 -0
  1208. package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
  1209. package/dist/plugin-sdk/slack/draft-stream.d.ts +25 -0
  1210. package/dist/plugin-sdk/slack/format.d.ts +7 -0
  1211. package/dist/plugin-sdk/slack/http/index.d.ts +1 -0
  1212. package/dist/plugin-sdk/slack/http/registry.d.ts +12 -0
  1213. package/dist/plugin-sdk/slack/index.d.ts +6 -0
  1214. package/dist/plugin-sdk/slack/manifest.d.ts +17 -0
  1215. package/dist/plugin-sdk/slack/message-actions.d.ts +4 -0
  1216. package/dist/plugin-sdk/slack/modal-metadata.d.ts +7 -0
  1217. package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +23 -0
  1218. package/dist/plugin-sdk/slack/monitor/auth.d.ts +11 -0
  1219. package/dist/plugin-sdk/slack/monitor/channel-config.d.ts +41 -0
  1220. package/dist/plugin-sdk/slack/monitor/commands.d.ts +9 -0
  1221. package/dist/plugin-sdk/slack/monitor/context.d.ts +104 -0
  1222. package/dist/plugin-sdk/slack/monitor/events/channels.d.ts +4 -0
  1223. package/dist/plugin-sdk/slack/monitor/events/interactions.d.ts +4 -0
  1224. package/dist/plugin-sdk/slack/monitor/events/members.d.ts +4 -0
  1225. package/dist/plugin-sdk/slack/monitor/events/messages.d.ts +6 -0
  1226. package/dist/plugin-sdk/slack/monitor/events/pins.d.ts +4 -0
  1227. package/dist/plugin-sdk/slack/monitor/events/reactions.d.ts +4 -0
  1228. package/dist/plugin-sdk/slack/monitor/events.d.ts +8 -0
  1229. package/dist/plugin-sdk/slack/monitor/external-arg-menu-store.d.ts +18 -0
  1230. package/dist/plugin-sdk/slack/monitor/media.d.ts +66 -0
  1231. package/dist/plugin-sdk/slack/monitor/message-handler/dispatch.d.ts +12 -0
  1232. package/dist/plugin-sdk/slack/monitor/message-handler/prepare.d.ts +13 -0
  1233. package/dist/plugin-sdk/slack/monitor/message-handler/types.d.ts +22 -0
  1234. package/dist/plugin-sdk/slack/monitor/message-handler.d.ts +11 -0
  1235. package/dist/plugin-sdk/slack/monitor/mrkdwn.d.ts +1 -0
  1236. package/dist/plugin-sdk/slack/monitor/policy.d.ts +5 -0
  1237. package/dist/plugin-sdk/slack/monitor/provider.d.ts +7 -0
  1238. package/dist/plugin-sdk/slack/monitor/replies.d.ts +53 -0
  1239. package/dist/plugin-sdk/slack/monitor/room-context.d.ts +14 -0
  1240. package/dist/plugin-sdk/slack/monitor/slash.d.ts +6 -0
  1241. package/dist/plugin-sdk/slack/monitor/thread-resolution.d.ts +12 -0
  1242. package/dist/plugin-sdk/slack/monitor/types.d.ts +97 -0
  1243. package/dist/plugin-sdk/slack/monitor.d.ts +5 -0
  1244. package/dist/plugin-sdk/slack/probe.d.ts +14 -0
  1245. package/dist/plugin-sdk/slack/resolve-channels.d.ts +19 -0
  1246. package/dist/plugin-sdk/slack/resolve-users.d.ts +26 -0
  1247. package/dist/plugin-sdk/slack/send.d.ts +22 -0
  1248. package/dist/plugin-sdk/slack/stream-mode.d.ts +23 -0
  1249. package/dist/plugin-sdk/slack/streaming.d.ts +72 -0
  1250. package/dist/plugin-sdk/slack/targets.d.ts +7 -0
  1251. package/dist/plugin-sdk/slack/threading-tool-context.d.ts +10 -0
  1252. package/dist/plugin-sdk/slack/threading.d.ts +29 -0
  1253. package/dist/plugin-sdk/slack/token.d.ts +3 -0
  1254. package/dist/plugin-sdk/slack/types.d.ts +58 -0
  1255. package/dist/plugin-sdk/stt/defaults.d.ts +2 -0
  1256. package/dist/plugin-sdk/stt/preflight.d.ts +14 -0
  1257. package/dist/plugin-sdk/stt/providers/deepgram/audio.d.ts +4 -0
  1258. package/dist/plugin-sdk/stt/providers/deepgram/index.d.ts +2 -0
  1259. package/dist/plugin-sdk/stt/providers/google/audio.d.ts +3 -0
  1260. package/dist/plugin-sdk/stt/providers/google/index.d.ts +2 -0
  1261. package/dist/plugin-sdk/stt/providers/google/inline-data.d.ts +20 -0
  1262. package/dist/plugin-sdk/stt/providers/groq/index.d.ts +2 -0
  1263. package/dist/plugin-sdk/stt/providers/index.d.ts +4 -0
  1264. package/dist/plugin-sdk/stt/providers/mistral/index.d.ts +2 -0
  1265. package/dist/plugin-sdk/stt/providers/openai/audio.d.ts +3 -0
  1266. package/dist/plugin-sdk/stt/providers/openai/index.d.ts +2 -0
  1267. package/dist/plugin-sdk/stt/providers/shared.d.ts +20 -0
  1268. package/dist/plugin-sdk/stt/stt.d.ts +27 -0
  1269. package/dist/plugin-sdk/stt/types.d.ts +22 -0
  1270. package/dist/plugin-sdk/telegram/accounts.d.ts +21 -0
  1271. package/dist/plugin-sdk/telegram/allowed-updates.d.ts +4 -0
  1272. package/dist/plugin-sdk/telegram/api-logging.d.ts +11 -0
  1273. package/dist/plugin-sdk/telegram/audit.d.ts +29 -0
  1274. package/dist/plugin-sdk/telegram/bot/delivery.d.ts +35 -0
  1275. package/dist/plugin-sdk/telegram/bot/helpers.d.ts +128 -0
  1276. package/dist/plugin-sdk/telegram/bot/types.d.ts +28 -0
  1277. package/dist/plugin-sdk/telegram/bot-access.d.ts +26 -0
  1278. package/dist/plugin-sdk/telegram/bot-handlers.d.ts +2 -0
  1279. package/dist/plugin-sdk/telegram/bot-message-context.d.ts +144 -0
  1280. package/dist/plugin-sdk/telegram/bot-message-dispatch.d.ts +19 -0
  1281. package/dist/plugin-sdk/telegram/bot-message.d.ts +20 -0
  1282. package/dist/plugin-sdk/telegram/bot-native-command-menu.d.ts +33 -0
  1283. package/dist/plugin-sdk/telegram/bot-native-commands.d.ts +59 -0
  1284. package/dist/plugin-sdk/telegram/bot-updates.d.ts +31 -0
  1285. package/dist/plugin-sdk/telegram/bot.d.ts +62 -0
  1286. package/dist/plugin-sdk/telegram/button-types.d.ts +7 -0
  1287. package/dist/plugin-sdk/telegram/caption.d.ts +5 -0
  1288. package/dist/plugin-sdk/telegram/dm-access.d.ts +18 -0
  1289. package/dist/plugin-sdk/telegram/draft-stream.d.ts +37 -0
  1290. package/dist/plugin-sdk/telegram/fetch.d.ts +5 -0
  1291. package/dist/plugin-sdk/telegram/format.d.ts +18 -0
  1292. package/dist/plugin-sdk/telegram/group-access.d.ts +54 -0
  1293. package/dist/plugin-sdk/telegram/group-config-helpers.d.ts +7 -0
  1294. package/dist/plugin-sdk/telegram/group-migration.d.ts +20 -0
  1295. package/dist/plugin-sdk/telegram/inline-buttons.d.ts +11 -0
  1296. package/dist/plugin-sdk/telegram/lane-delivery.d.ts +56 -0
  1297. package/dist/plugin-sdk/telegram/monitor.d.ts +19 -0
  1298. package/dist/plugin-sdk/telegram/network-config.d.ts +33 -0
  1299. package/dist/plugin-sdk/telegram/network-errors.d.ts +5 -0
  1300. package/dist/plugin-sdk/telegram/outbound-params.d.ts +2 -0
  1301. package/dist/plugin-sdk/telegram/probe.d.ts +17 -0
  1302. package/dist/plugin-sdk/telegram/proxy.d.ts +1 -0
  1303. package/dist/plugin-sdk/telegram/reaction-level.d.ts +11 -0
  1304. package/dist/plugin-sdk/telegram/send.d.ts +153 -0
  1305. package/dist/plugin-sdk/telegram/sent-message-cache.d.ts +16 -0
  1306. package/dist/plugin-sdk/telegram/status-reaction-variants.d.ts +21 -0
  1307. package/dist/plugin-sdk/telegram/sticker-cache.d.ts +47 -0
  1308. package/dist/plugin-sdk/telegram/target-writeback.d.ts +7 -0
  1309. package/dist/plugin-sdk/telegram/targets.d.ts +11 -0
  1310. package/dist/plugin-sdk/telegram/token.d.ts +13 -0
  1311. package/dist/plugin-sdk/telegram/update-offset-store.d.ts +15 -0
  1312. package/dist/plugin-sdk/telegram/voice.d.ts +16 -0
  1313. package/dist/plugin-sdk/telegram/webhook.d.ts +20 -0
  1314. package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
  1315. package/dist/plugin-sdk/terminal/health-style.d.ts +1 -0
  1316. package/dist/plugin-sdk/terminal/links.d.ts +6 -0
  1317. package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
  1318. package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
  1319. package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
  1320. package/dist/plugin-sdk/terminal/restore.d.ts +17 -0
  1321. package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
  1322. package/dist/plugin-sdk/tts/providers/edge.d.ts +2 -0
  1323. package/dist/plugin-sdk/tts/providers/elevenlabs.d.ts +2 -0
  1324. package/dist/plugin-sdk/tts/providers/index.d.ts +4 -0
  1325. package/dist/plugin-sdk/tts/providers/openai.d.ts +2 -0
  1326. package/dist/plugin-sdk/tts/tts-core.d.ts +38 -0
  1327. package/dist/plugin-sdk/tts/tts.d.ts +185 -0
  1328. package/dist/plugin-sdk/tts/types.d.ts +21 -0
  1329. package/dist/plugin-sdk/types/agent-types.d.ts +1 -0
  1330. package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
  1331. package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
  1332. package/dist/plugin-sdk/utils/chunk-items.d.ts +1 -0
  1333. package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
  1334. package/dist/plugin-sdk/utils/directive-tags.d.ts +29 -0
  1335. package/dist/plugin-sdk/utils/fetch-timeout.d.ts +13 -0
  1336. package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
  1337. package/dist/plugin-sdk/utils/normalize-secret-input.d.ts +11 -0
  1338. package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
  1339. package/dist/plugin-sdk/utils/queue-helpers.d.ts +80 -0
  1340. package/dist/plugin-sdk/utils/reaction-level.d.ts +15 -0
  1341. package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
  1342. package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
  1343. package/dist/plugin-sdk/utils/with-timeout.d.ts +1 -0
  1344. package/dist/plugin-sdk/utils.d.ts +63 -0
  1345. package/dist/plugin-sdk/version.d.ts +8 -0
  1346. package/dist/plugin-sdk/web/accounts.d.ts +39 -0
  1347. package/dist/plugin-sdk/web/active-listener.d.ts +25 -0
  1348. package/dist/plugin-sdk/web/auth-store.d.ts +26 -0
  1349. package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
  1350. package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +19 -0
  1351. package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
  1352. package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
  1353. package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
  1354. package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
  1355. package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
  1356. package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
  1357. package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
  1358. package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
  1359. package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +33 -0
  1360. package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
  1361. package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
  1362. package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
  1363. package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
  1364. package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
  1365. package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
  1366. package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
  1367. package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
  1368. package/dist/plugin-sdk/web/auto-reply/types.d.ts +30 -0
  1369. package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
  1370. package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
  1371. package/dist/plugin-sdk/web/auto-reply.impl.d.ts +5 -0
  1372. package/dist/plugin-sdk/web/inbound/access-control.d.ts +36 -0
  1373. package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
  1374. package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
  1375. package/dist/plugin-sdk/web/inbound/media.d.ts +7 -0
  1376. package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
  1377. package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
  1378. package/dist/plugin-sdk/web/inbound/types.d.ts +41 -0
  1379. package/dist/plugin-sdk/web/inbound.d.ts +4 -0
  1380. package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
  1381. package/dist/plugin-sdk/web/login.d.ts +3 -0
  1382. package/dist/plugin-sdk/web/media.d.ts +43 -0
  1383. package/dist/plugin-sdk/web/outbound.d.ts +24 -0
  1384. package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
  1385. package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
  1386. package/dist/plugin-sdk/web/session.d.ts +14 -0
  1387. package/dist/plugin-sdk/web/vcard.d.ts +6 -0
  1388. package/dist/plugin-sdk/whatsapp/normalize.d.ts +6 -0
  1389. package/dist/plugin-sdk/whatsapp/resolve-outbound-target.d.ts +12 -0
  1390. package/dist/plugin-sdk/wizard/prompts.d.ts +43 -0
  1391. package/dist/plugin-sdk/wizard/session.d.ts +42 -0
  1392. package/dist/plugins-Ca4Ybd3t.js +254 -0
  1393. package/dist/plugins-Cjhc9NMf.js +255 -0
  1394. package/dist/plugins-allowlist-A38nxBRG.js +15 -0
  1395. package/dist/plugins-allowlist-D2tS9tcu.js +15 -0
  1396. package/dist/plugins-cli-BvgKK5Ww.js +807 -0
  1397. package/dist/plugins-cli-oK0lk1Ku.js +803 -0
  1398. package/dist/polls-BLyT08ZI.js +33 -0
  1399. package/dist/polls-BmymsJEe.js +33 -0
  1400. package/dist/ports-B4hTs4XH.js +96 -0
  1401. package/dist/ports-CZEhYDiS.js +370 -0
  1402. package/dist/ports-DALdfBQy.js +96 -0
  1403. package/dist/ports-gRBeuUtp.js +316 -0
  1404. package/dist/ports-lsof-CDyv5GJd.js +27 -0
  1405. package/dist/preflight-Bq8rimP-.js +667 -0
  1406. package/dist/preflight-DyYbEp9X.js +667 -0
  1407. package/dist/process-scoped-map-BCJR56ZB.js +39 -0
  1408. package/dist/process-scoped-map-Cb1EHPyN.js +39 -0
  1409. package/dist/program-DKWIpFO9.js +250 -0
  1410. package/dist/program-context-Cgy5-iZi.js +474 -0
  1411. package/dist/program-context-DlXnmuB7.js +17 -0
  1412. package/dist/progress-BcwxtM9Q.js +124 -0
  1413. package/dist/progress-DRLmcFiG.js +123 -0
  1414. package/dist/prompt-BRGfic91.js +21 -0
  1415. package/dist/prompt-CZpYe6wn.js +21 -0
  1416. package/dist/prompt-select-styled-CY647QfO.js +1669 -0
  1417. package/dist/prompt-select-styled-pddqKMoY.js +1672 -0
  1418. package/dist/prompt-style-BpUMhEHC.js +9 -0
  1419. package/dist/prompt-style-CUuA6OCy.js +9 -0
  1420. package/dist/provider-auth-B7QgxlKt.js +187 -0
  1421. package/dist/provider-auth-j-EQvvIk.js +187 -0
  1422. package/dist/provider-dispatcher-DX896bb6.js +659 -0
  1423. package/dist/provider-dispatcher-IV_mSji1.js +660 -0
  1424. package/dist/provider-utils-C9kBVF1f.js +79 -0
  1425. package/dist/provider-utils-DiLhkKQp.js +79 -0
  1426. package/dist/proxy-BMJL0Qog.js +16 -0
  1427. package/dist/proxy-D-qGA1vm.js +16 -0
  1428. package/dist/push-apns--nEiZmEN.js +711 -0
  1429. package/dist/push-apns-BtS6B6lb.js +713 -0
  1430. package/dist/pw-ai-DkXUNGEs.js +1908 -0
  1431. package/dist/pw-ai-oQ2VDwbk.js +1911 -0
  1432. package/dist/pw-ai-state--TxTVwRW.js +11 -0
  1433. package/dist/pw-ai-state-CwXeO5d0.js +11 -0
  1434. package/dist/qr-cli-BffaTzZT.js +353 -0
  1435. package/dist/qr-cli-CKHw8aW4.js +349 -0
  1436. package/dist/redact-BW8tobyp.js +191 -0
  1437. package/dist/redact-Ci96Gj0O.js +191 -0
  1438. package/dist/redact-identifier-Bv5SUUw-.js +15 -0
  1439. package/dist/redact-identifier-HyK89Sod.js +15 -0
  1440. package/dist/redact-snapshot-PHeKfwLg.js +1934 -0
  1441. package/dist/redact-snapshot-h25IHbX2.js +1934 -0
  1442. package/dist/register.agent-BhJGcSwi.js +1029 -0
  1443. package/dist/register.agent-DYcLNpJD.js +292 -0
  1444. package/dist/register.configure-V-MeA6h7.js +135 -0
  1445. package/dist/register.configure-oCfJYt2T.js +130 -0
  1446. package/dist/register.import-CROeeohP.js +31 -0
  1447. package/dist/register.import-DrHKMUlv.js +29 -0
  1448. package/dist/register.maintenance-XRDiAiai.js +501 -0
  1449. package/dist/register.maintenance-mHTyzd1l.js +503 -0
  1450. package/dist/register.message-9FClPeyR.js +687 -0
  1451. package/dist/register.message-DigNUgXx.js +691 -0
  1452. package/dist/register.onboard-CF1DK5RO.js +92 -0
  1453. package/dist/register.onboard-Cm2ExJRM.js +96 -0
  1454. package/dist/register.setup-BEV_QLoU.js +114 -0
  1455. package/dist/register.setup-BboalnlO.js +118 -0
  1456. package/dist/register.status-health-sessions-B5flqjtZ.js +666 -0
  1457. package/dist/register.status-health-sessions-DbQPmWOW.js +428 -0
  1458. package/dist/register.subclis-FFHoriVe.js +267 -0
  1459. package/dist/remoteclaw-root-BfPjgewe.js +88 -0
  1460. package/dist/remoteclaw-root-E4-hmb4E.js +88 -0
  1461. package/dist/render-6ahYfPwj.js +104 -0
  1462. package/dist/render-BhKzKdV0.js +104 -0
  1463. package/dist/render-e7fENCYH.js +104 -0
  1464. package/dist/replies-Dc_GFb85.js +136 -0
  1465. package/dist/replies-nkw9sahT.js +136 -0
  1466. package/dist/reply-D0iVkyuP.js +12366 -0
  1467. package/dist/reply-DEPE5T_9.js +12363 -0
  1468. package/dist/reply-directives-Bbyf2UON.js +182 -0
  1469. package/dist/reply-directives-DiRJRT_6.js +182 -0
  1470. package/dist/reply-payloads-DDrMOUKP.js +527 -0
  1471. package/dist/reply-prefix-Buyx2ZZC.js +37 -0
  1472. package/dist/reply-prefix-D7E0w0O2.js +37 -0
  1473. package/dist/resolve-route-BBOsg5KI.js +249 -0
  1474. package/dist/resolve-route-Dyx3ifWH.js +249 -0
  1475. package/dist/response-prefix-template-CZOMBOE6.js +134 -0
  1476. package/dist/response-prefix-template-xsasdq1T.js +134 -0
  1477. package/dist/retry-BWv_fy4u.js +77 -0
  1478. package/dist/retry-D7zwz3HY.js +77 -0
  1479. package/dist/retry-Dar_7pCv.js +77 -0
  1480. package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
  1481. package/dist/run-main-BUSpd6Gy.js +308 -0
  1482. package/dist/runtime-guard-Bhx-pb8_.js +60 -0
  1483. package/dist/runtime-guard-DAHXelsb.js +60 -0
  1484. package/dist/runtime-status-CR9445g5.js +12 -0
  1485. package/dist/runtime-status-hFVEC3wO.js +12 -0
  1486. package/dist/secret-equal-D6AoXne1.js +11 -0
  1487. package/dist/secret-equal-DLnUuWM3.js +11 -0
  1488. package/dist/secure-random-B8v4P_PH.js +44 -0
  1489. package/dist/secure-random-Ba4Y5xG5.js +12 -0
  1490. package/dist/secure-random-CRVHgtmO.js +12 -0
  1491. package/dist/security-cli-C8r-8YZ7.js +488 -0
  1492. package/dist/security-cli-Cy2Jqb0n.js +483 -0
  1493. package/dist/send-B5iWtbNX.js +349 -0
  1494. package/dist/send-BaaCgoKI.js +374 -0
  1495. package/dist/send-Brtl2skD.js +332 -0
  1496. package/dist/send-BuKAbt8a.js +547 -0
  1497. package/dist/send-BxQ1YFYH.js +1178 -0
  1498. package/dist/send-C7xFV4Ul.js +29 -0
  1499. package/dist/send-C9pLn8Zz.js +11 -0
  1500. package/dist/send-CPn9GDbB.js +349 -0
  1501. package/dist/send-DJ5jHNeg.js +1779 -0
  1502. package/dist/send-DLLYgtkJ.js +2245 -0
  1503. package/dist/send-DO4RP5yz.js +1776 -0
  1504. package/dist/send-DYHrHs_8.js +492 -0
  1505. package/dist/send-DZ80jwFi.js +426 -0
  1506. package/dist/send-Dbl0_FNE.js +2245 -0
  1507. package/dist/send-DpaTnM-a.js +492 -0
  1508. package/dist/send-gxeISRd1.js +547 -0
  1509. package/dist/server-BZfrR2D5.js +206 -0
  1510. package/dist/server-CW4QQmFB.js +202 -0
  1511. package/dist/server-lifecycle-CY3Lxtea.js +2437 -0
  1512. package/dist/server-lifecycle-X3AKkvMo.js +2437 -0
  1513. package/dist/server-node-events-q5He8xk5.js +391 -0
  1514. package/dist/server-node-events-udPU4Xlv.js +395 -0
  1515. package/dist/service-C2j81L86.js +670 -0
  1516. package/dist/service-C8a0SXHD.js +670 -0
  1517. package/dist/session-C6VKWvx6.js +170 -0
  1518. package/dist/session-cost-usage-0Vs4hgMe.js +627 -0
  1519. package/dist/session-cost-usage-C-DsaOfN.js +627 -0
  1520. package/dist/session-dirs-CO1f2ArM.js +318 -0
  1521. package/dist/session-dirs-DoboH7Oy.js +318 -0
  1522. package/dist/session-enM9-2If.js +170 -0
  1523. package/dist/session-key-BF-9YzxC.js +235 -0
  1524. package/dist/session-key-CgKWfjoZ.js +235 -0
  1525. package/dist/session-utils-VKfyrS3d.js +621 -0
  1526. package/dist/session-utils-_U6PeQeD.js +621 -0
  1527. package/dist/sessions-Dg3febTj.js +2553 -0
  1528. package/dist/sessions-Fhrpa-qj.js +245 -0
  1529. package/dist/shell-env-DBS5su07.js +163 -0
  1530. package/dist/shell-env-c3j5zcU9.js +163 -0
  1531. package/dist/ssrf-8wNqPNzN.js +183 -0
  1532. package/dist/ssrf-CJIdPXuS.js +183 -0
  1533. package/dist/stagger--wvODnNe.js +56 -0
  1534. package/dist/stagger-BLmTO4cK.js +56 -0
  1535. package/dist/status-1zVD-Clq.js +21 -0
  1536. package/dist/status-B_wW9Vt8.js +1936 -0
  1537. package/dist/status-BtRY0nXQ.js +21 -0
  1538. package/dist/status-D3leIzsB.js +1940 -0
  1539. package/dist/status.update-BmuDZ7E7.js +449 -0
  1540. package/dist/status.update-Mf6HSRvU.js +449 -0
  1541. package/dist/store-BmUyjVdV.js +2555 -0
  1542. package/dist/store-CzhBjUCN.js +64 -0
  1543. package/dist/store-DlqiXmDO.js +53 -0
  1544. package/dist/store-LXf4lUUA.js +64 -0
  1545. package/dist/strip-inbound-meta-zmUXypSS.js +110 -0
  1546. package/dist/strip-inbound-meta-zqtN9FTK.js +110 -0
  1547. package/dist/subagent-registry-BCGOdOC-.js +4839 -0
  1548. package/dist/subagent-registry-Bjx9LVlV.js +4841 -0
  1549. package/dist/subsystem-BAW_f3DI.js +1195 -0
  1550. package/dist/subsystem-DE8w_S23.js +1081 -0
  1551. package/dist/system-cli-CDi0wZXE.js +73 -0
  1552. package/dist/system-cli-CrzLj6XB.js +77 -0
  1553. package/dist/systemd-40Rij3QR.js +547 -0
  1554. package/dist/systemd-5C97CSzd.js +547 -0
  1555. package/dist/systemd-hints-CyQqHq1i.js +278 -0
  1556. package/dist/systemd-hints-Dbpv6gQ1.js +278 -0
  1557. package/dist/systemd-linger-B2rPbnAi.js +75 -0
  1558. package/dist/systemd-linger-DDvkfxH-.js +75 -0
  1559. package/dist/table-DFx25vNb.js +279 -0
  1560. package/dist/table-On3hkCqi.js +278 -0
  1561. package/dist/tables-BFyFqtLB.js +55 -0
  1562. package/dist/tables-Crybi0rV.js +55 -0
  1563. package/dist/tables-Dwxstcvj.js +55 -0
  1564. package/dist/tailnet-Da-_9e8E.js +40 -0
  1565. package/dist/tailnet-xt92Yaop.js +40 -0
  1566. package/dist/tailscale-CnV0JWca.js +230 -0
  1567. package/dist/tailscale-VkEC8dzj.js +230 -0
  1568. package/dist/target-errors-ChjvOMuV.js +26 -0
  1569. package/dist/target-errors-GZXDqlUu.js +26 -0
  1570. package/dist/targets-B46m7u5J.js +45 -0
  1571. package/dist/targets-BegO82oK.js +2614 -0
  1572. package/dist/targets-BpTQ50aN.js +649 -0
  1573. package/dist/targets-BtGRUQMa.js +79 -0
  1574. package/dist/targets-C99szk_e.js +114 -0
  1575. package/dist/targets-CmC5m7Ey.js +53 -0
  1576. package/dist/targets-D01MJGnh.js +79 -0
  1577. package/dist/targets-D3r6Zgic.js +39 -0
  1578. package/dist/targets-D7PT_rdO.js +45 -0
  1579. package/dist/targets-D8Rv_6CT.js +649 -0
  1580. package/dist/targets-DJ_OVcyq.js +220 -0
  1581. package/dist/targets-_UWmnyI9.js +53 -0
  1582. package/dist/targets-felDvoku.js +2613 -0
  1583. package/dist/targets-tDrl_ioQ.js +46 -0
  1584. package/dist/text-format-DarxU3JH.js +9 -0
  1585. package/dist/text-format-Ds92M9UT.js +9 -0
  1586. package/dist/thinking-4nOZPunr.js +60 -0
  1587. package/dist/thinking-ZfH2V9Os.js +60 -0
  1588. package/dist/tokens-Dw7ZdYwT.js +21 -0
  1589. package/dist/tokens-TtJJxzRr.js +21 -0
  1590. package/dist/tool-display-Bxs_1jIn.js +785 -0
  1591. package/dist/tool-display-D9p_Ttkq.js +785 -0
  1592. package/dist/tool-images-9Ron321Q.js +263 -0
  1593. package/dist/tool-images-BWhy6WRN.js +263 -0
  1594. package/dist/trash-BpB96kHe.js +125 -0
  1595. package/dist/trash-De0DLz-t.js +125 -0
  1596. package/dist/tui-M21MnbJp.js +3237 -0
  1597. package/dist/tui-cli-mxjebFIk.js +63 -0
  1598. package/dist/tui-cli-x2aEqskG.js +67 -0
  1599. package/dist/tui-qVJob4mN.js +3237 -0
  1600. package/dist/types.tools-BBb2rl3g.js +23 -0
  1601. package/dist/types.tools-BDJw1yFx.js +23 -0
  1602. package/dist/update-Bv3EwRgy.js +349 -0
  1603. package/dist/update-D2gIPs2g.js +349 -0
  1604. package/dist/update-cli-B_tiAE6B.js +1149 -0
  1605. package/dist/update-cli-DdERWV6b.js +1147 -0
  1606. package/dist/usage-BIzKZ5dT.js +57 -0
  1607. package/dist/usage-BvZOzIC7.js +57 -0
  1608. package/dist/usage-CCU9qNC5.js +5472 -0
  1609. package/dist/usage-format-CmniSPCG.js +31 -0
  1610. package/dist/usage-format-D_KQYQ-w.js +31 -0
  1611. package/dist/utils-DPoNpP7D.js +631 -0
  1612. package/dist/version-3QUZW8EP.js +52 -0
  1613. package/dist/version-CVMnqdzu.js +52 -0
  1614. package/dist/voice-credentials-CxWaO19D.js +46 -0
  1615. package/dist/voice-credentials-DXU-y9z7.js +46 -0
  1616. package/dist/warning-filter.js +48 -0
  1617. package/dist/web-CCN82vao.js +74 -0
  1618. package/dist/web-MFXYQO8v.js +79 -0
  1619. package/dist/web-zotCHj-B.js +3051 -0
  1620. package/dist/webhooks-cli-BB6FZ7La.js +330 -0
  1621. package/dist/webhooks-cli-BoZinXXo.js +334 -0
  1622. package/dist/whatsapp-actions-COMlNQFa.js +126 -0
  1623. package/dist/whatsapp-actions-YZgc7smO.js +131 -0
  1624. package/dist/widearea-dns-CQqZIeu8.js +127 -0
  1625. package/dist/widearea-dns-D01FFYZ8.js +127 -0
  1626. package/dist/workspace-BJCKO8Ns.js +10 -0
  1627. package/dist/workspace-BisvA9oA.js +10 -0
  1628. package/dist/workspace-Bj_uUDJr.js +439 -0
  1629. package/dist/workspace-S9vwEco2.js +441 -0
  1630. package/dist/wsl-PDLKeX04.js +52 -0
  1631. package/dist/wsl-kFaeW76c.js +52 -0
  1632. package/dist/zod-schema-7uqrpeBz.js +2715 -0
  1633. package/dist/zod-schema-CdBaNuxH.js +2715 -0
  1634. package/extensions/bluebubbles/README.md +45 -0
  1635. package/extensions/bluebubbles/index.ts +19 -0
  1636. package/extensions/bluebubbles/package.json +33 -0
  1637. package/extensions/bluebubbles/remoteclaw.plugin.json +9 -0
  1638. package/extensions/bluebubbles/src/account-resolve.ts +35 -0
  1639. package/extensions/bluebubbles/src/accounts.ts +90 -0
  1640. package/extensions/bluebubbles/src/actions.ts +460 -0
  1641. package/extensions/bluebubbles/src/attachments.ts +268 -0
  1642. package/extensions/bluebubbles/src/channel.ts +418 -0
  1643. package/extensions/bluebubbles/src/chat.ts +329 -0
  1644. package/extensions/bluebubbles/src/config-schema.ts +65 -0
  1645. package/extensions/bluebubbles/src/history.ts +177 -0
  1646. package/extensions/bluebubbles/src/media-send.ts +317 -0
  1647. package/extensions/bluebubbles/src/monitor-normalize.ts +825 -0
  1648. package/extensions/bluebubbles/src/monitor-processing.ts +1448 -0
  1649. package/extensions/bluebubbles/src/monitor-reply-cache.ts +185 -0
  1650. package/extensions/bluebubbles/src/monitor-shared.ts +41 -0
  1651. package/extensions/bluebubbles/src/monitor.ts +534 -0
  1652. package/extensions/bluebubbles/src/multipart.ts +32 -0
  1653. package/extensions/bluebubbles/src/onboarding.ts +340 -0
  1654. package/extensions/bluebubbles/src/probe.ts +163 -0
  1655. package/extensions/bluebubbles/src/reactions.ts +182 -0
  1656. package/extensions/bluebubbles/src/request-url.ts +12 -0
  1657. package/extensions/bluebubbles/src/runtime.ts +34 -0
  1658. package/extensions/bluebubbles/src/send-helpers.ts +53 -0
  1659. package/extensions/bluebubbles/src/send.ts +472 -0
  1660. package/extensions/bluebubbles/src/targets.ts +370 -0
  1661. package/extensions/bluebubbles/src/test-harness.ts +79 -0
  1662. package/extensions/bluebubbles/src/test-mocks.ts +11 -0
  1663. package/extensions/bluebubbles/src/types.ts +135 -0
  1664. package/extensions/device-pair/index.ts +529 -0
  1665. package/extensions/device-pair/remoteclaw.plugin.json +20 -0
  1666. package/extensions/diagnostics-otel/index.ts +15 -0
  1667. package/extensions/diagnostics-otel/node_modules/.bin/acorn +21 -0
  1668. package/extensions/diagnostics-otel/package.json +24 -0
  1669. package/extensions/diagnostics-otel/remoteclaw.plugin.json +8 -0
  1670. package/extensions/diagnostics-otel/src/service.ts +682 -0
  1671. package/extensions/discord/index.ts +19 -0
  1672. package/extensions/discord/package.json +11 -0
  1673. package/extensions/discord/remoteclaw.plugin.json +9 -0
  1674. package/extensions/discord/src/channel.ts +451 -0
  1675. package/extensions/discord/src/runtime.ts +14 -0
  1676. package/extensions/discord/src/subagent-hooks.ts +152 -0
  1677. package/extensions/feishu/index.ts +63 -0
  1678. package/extensions/feishu/package.json +34 -0
  1679. package/extensions/feishu/remoteclaw.plugin.json +9 -0
  1680. package/extensions/feishu/skills/feishu-doc/SKILL.md +105 -0
  1681. package/extensions/feishu/skills/feishu-doc/references/block-types.md +103 -0
  1682. package/extensions/feishu/skills/feishu-drive/SKILL.md +97 -0
  1683. package/extensions/feishu/skills/feishu-perm/SKILL.md +119 -0
  1684. package/extensions/feishu/skills/feishu-wiki/SKILL.md +111 -0
  1685. package/extensions/feishu/src/accounts.ts +144 -0
  1686. package/extensions/feishu/src/bitable.ts +739 -0
  1687. package/extensions/feishu/src/bot.ts +1006 -0
  1688. package/extensions/feishu/src/channel.ts +359 -0
  1689. package/extensions/feishu/src/client.ts +118 -0
  1690. package/extensions/feishu/src/config-schema.ts +226 -0
  1691. package/extensions/feishu/src/dedup.ts +54 -0
  1692. package/extensions/feishu/src/directory.ts +177 -0
  1693. package/extensions/feishu/src/doc-schema.ts +47 -0
  1694. package/extensions/feishu/src/docx.ts +536 -0
  1695. package/extensions/feishu/src/drive-schema.ts +46 -0
  1696. package/extensions/feishu/src/drive.ts +227 -0
  1697. package/extensions/feishu/src/dynamic-agent.ts +131 -0
  1698. package/extensions/feishu/src/external-keys.ts +19 -0
  1699. package/extensions/feishu/src/media.ts +441 -0
  1700. package/extensions/feishu/src/mention.ts +133 -0
  1701. package/extensions/feishu/src/monitor.ts +397 -0
  1702. package/extensions/feishu/src/onboarding.ts +351 -0
  1703. package/extensions/feishu/src/outbound.ts +55 -0
  1704. package/extensions/feishu/src/perm-schema.ts +52 -0
  1705. package/extensions/feishu/src/perm.ts +173 -0
  1706. package/extensions/feishu/src/policy.ts +120 -0
  1707. package/extensions/feishu/src/probe.ts +44 -0
  1708. package/extensions/feishu/src/reactions.ts +160 -0
  1709. package/extensions/feishu/src/reply-dispatcher.ts +239 -0
  1710. package/extensions/feishu/src/runtime.ts +14 -0
  1711. package/extensions/feishu/src/send-result.ts +29 -0
  1712. package/extensions/feishu/src/send-target.ts +25 -0
  1713. package/extensions/feishu/src/send.ts +313 -0
  1714. package/extensions/feishu/src/streaming-card.ts +218 -0
  1715. package/extensions/feishu/src/targets.ts +78 -0
  1716. package/extensions/feishu/src/tools-config.ts +21 -0
  1717. package/extensions/feishu/src/types.ts +81 -0
  1718. package/extensions/feishu/src/typing.ts +80 -0
  1719. package/extensions/feishu/src/wiki-schema.ts +55 -0
  1720. package/extensions/feishu/src/wiki.ts +232 -0
  1721. package/extensions/googlechat/index.ts +19 -0
  1722. package/extensions/googlechat/node_modules/.bin/nlc +21 -0
  1723. package/extensions/googlechat/node_modules/.bin/node-llama-cpp +21 -0
  1724. package/extensions/googlechat/node_modules/.bin/remoteclaw +21 -0
  1725. package/extensions/googlechat/node_modules/.bin/tsc +21 -0
  1726. package/extensions/googlechat/node_modules/.bin/tsserver +21 -0
  1727. package/extensions/googlechat/package.json +37 -0
  1728. package/extensions/googlechat/remoteclaw.plugin.json +9 -0
  1729. package/extensions/googlechat/src/accounts.ts +147 -0
  1730. package/extensions/googlechat/src/actions.ts +176 -0
  1731. package/extensions/googlechat/src/api.ts +282 -0
  1732. package/extensions/googlechat/src/auth.ts +137 -0
  1733. package/extensions/googlechat/src/channel.ts +576 -0
  1734. package/extensions/googlechat/src/monitor.ts +965 -0
  1735. package/extensions/googlechat/src/onboarding.ts +270 -0
  1736. package/extensions/googlechat/src/runtime.ts +14 -0
  1737. package/extensions/googlechat/src/targets.ts +65 -0
  1738. package/extensions/googlechat/src/types.config.ts +3 -0
  1739. package/extensions/googlechat/src/types.ts +73 -0
  1740. package/extensions/imessage/index.ts +17 -0
  1741. package/extensions/imessage/package.json +12 -0
  1742. package/extensions/imessage/remoteclaw.plugin.json +9 -0
  1743. package/extensions/imessage/src/channel.ts +304 -0
  1744. package/extensions/imessage/src/runtime.ts +14 -0
  1745. package/extensions/irc/index.ts +17 -0
  1746. package/extensions/irc/package.json +11 -0
  1747. package/extensions/irc/remoteclaw.plugin.json +9 -0
  1748. package/extensions/irc/src/accounts.ts +268 -0
  1749. package/extensions/irc/src/channel.ts +364 -0
  1750. package/extensions/irc/src/client.ts +439 -0
  1751. package/extensions/irc/src/config-schema.ts +91 -0
  1752. package/extensions/irc/src/connect-options.ts +30 -0
  1753. package/extensions/irc/src/control-chars.ts +22 -0
  1754. package/extensions/irc/src/inbound.ts +371 -0
  1755. package/extensions/irc/src/monitor.ts +146 -0
  1756. package/extensions/irc/src/normalize.ts +123 -0
  1757. package/extensions/irc/src/onboarding.ts +479 -0
  1758. package/extensions/irc/src/policy.ts +166 -0
  1759. package/extensions/irc/src/probe.ts +53 -0
  1760. package/extensions/irc/src/protocol.ts +169 -0
  1761. package/extensions/irc/src/runtime.ts +14 -0
  1762. package/extensions/irc/src/send.ts +88 -0
  1763. package/extensions/irc/src/types.ts +98 -0
  1764. package/extensions/line/index.ts +19 -0
  1765. package/extensions/line/package.json +27 -0
  1766. package/extensions/line/remoteclaw.plugin.json +9 -0
  1767. package/extensions/line/src/card-command.ts +344 -0
  1768. package/extensions/line/src/channel.ts +797 -0
  1769. package/extensions/line/src/runtime.ts +14 -0
  1770. package/extensions/matrix/CHANGELOG.md +32 -0
  1771. package/extensions/matrix/index.ts +17 -0
  1772. package/extensions/matrix/node_modules/.bin/markdown-it +21 -0
  1773. package/extensions/matrix/package.json +33 -0
  1774. package/extensions/matrix/remoteclaw.plugin.json +9 -0
  1775. package/extensions/matrix/src/actions.ts +195 -0
  1776. package/extensions/matrix/src/channel.ts +486 -0
  1777. package/extensions/matrix/src/config-schema.ts +63 -0
  1778. package/extensions/matrix/src/directory-live.ts +208 -0
  1779. package/extensions/matrix/src/group-mentions.ts +52 -0
  1780. package/extensions/matrix/src/matrix/accounts.ts +137 -0
  1781. package/extensions/matrix/src/matrix/actions/client.ts +47 -0
  1782. package/extensions/matrix/src/matrix/actions/limits.ts +6 -0
  1783. package/extensions/matrix/src/matrix/actions/messages.ts +126 -0
  1784. package/extensions/matrix/src/matrix/actions/pins.ts +84 -0
  1785. package/extensions/matrix/src/matrix/actions/reactions.ts +102 -0
  1786. package/extensions/matrix/src/matrix/actions/room.ts +85 -0
  1787. package/extensions/matrix/src/matrix/actions/summary.ts +75 -0
  1788. package/extensions/matrix/src/matrix/actions/types.ts +85 -0
  1789. package/extensions/matrix/src/matrix/actions.ts +15 -0
  1790. package/extensions/matrix/src/matrix/active-client.ts +32 -0
  1791. package/extensions/matrix/src/matrix/client/config.ts +219 -0
  1792. package/extensions/matrix/src/matrix/client/create-client.ts +123 -0
  1793. package/extensions/matrix/src/matrix/client/logging.ts +36 -0
  1794. package/extensions/matrix/src/matrix/client/runtime.ts +4 -0
  1795. package/extensions/matrix/src/matrix/client/shared.ts +201 -0
  1796. package/extensions/matrix/src/matrix/client/storage.ts +131 -0
  1797. package/extensions/matrix/src/matrix/client/types.ts +34 -0
  1798. package/extensions/matrix/src/matrix/client-bootstrap.ts +39 -0
  1799. package/extensions/matrix/src/matrix/client.ts +14 -0
  1800. package/extensions/matrix/src/matrix/credentials.ts +125 -0
  1801. package/extensions/matrix/src/matrix/deps.ts +60 -0
  1802. package/extensions/matrix/src/matrix/format.ts +22 -0
  1803. package/extensions/matrix/src/matrix/index.ts +11 -0
  1804. package/extensions/matrix/src/matrix/monitor/allowlist.ts +103 -0
  1805. package/extensions/matrix/src/matrix/monitor/auto-join.ts +71 -0
  1806. package/extensions/matrix/src/matrix/monitor/direct.ts +104 -0
  1807. package/extensions/matrix/src/matrix/monitor/events.ts +148 -0
  1808. package/extensions/matrix/src/matrix/monitor/handler.ts +688 -0
  1809. package/extensions/matrix/src/matrix/monitor/index.ts +358 -0
  1810. package/extensions/matrix/src/matrix/monitor/location.ts +100 -0
  1811. package/extensions/matrix/src/matrix/monitor/media.ts +118 -0
  1812. package/extensions/matrix/src/matrix/monitor/mentions.ts +62 -0
  1813. package/extensions/matrix/src/matrix/monitor/replies.ts +100 -0
  1814. package/extensions/matrix/src/matrix/monitor/room-info.ts +55 -0
  1815. package/extensions/matrix/src/matrix/monitor/rooms.ts +47 -0
  1816. package/extensions/matrix/src/matrix/monitor/threads.ts +68 -0
  1817. package/extensions/matrix/src/matrix/monitor/types.ts +39 -0
  1818. package/extensions/matrix/src/matrix/poll-types.ts +167 -0
  1819. package/extensions/matrix/src/matrix/probe.ts +69 -0
  1820. package/extensions/matrix/src/matrix/send/client.ts +97 -0
  1821. package/extensions/matrix/src/matrix/send/formatting.ts +93 -0
  1822. package/extensions/matrix/src/matrix/send/media.ts +230 -0
  1823. package/extensions/matrix/src/matrix/send/targets.ts +150 -0
  1824. package/extensions/matrix/src/matrix/send/types.ts +109 -0
  1825. package/extensions/matrix/src/matrix/send-queue.ts +44 -0
  1826. package/extensions/matrix/src/matrix/send.ts +265 -0
  1827. package/extensions/matrix/src/onboarding.ts +446 -0
  1828. package/extensions/matrix/src/outbound.ts +55 -0
  1829. package/extensions/matrix/src/resolve-targets.ts +126 -0
  1830. package/extensions/matrix/src/runtime.ts +14 -0
  1831. package/extensions/matrix/src/tool-actions.ts +164 -0
  1832. package/extensions/matrix/src/types.ts +114 -0
  1833. package/extensions/mattermost/index.ts +17 -0
  1834. package/extensions/mattermost/package.json +25 -0
  1835. package/extensions/mattermost/remoteclaw.plugin.json +9 -0
  1836. package/extensions/mattermost/src/channel.ts +439 -0
  1837. package/extensions/mattermost/src/config-schema.ts +62 -0
  1838. package/extensions/mattermost/src/group-mentions.ts +15 -0
  1839. package/extensions/mattermost/src/mattermost/accounts.ts +128 -0
  1840. package/extensions/mattermost/src/mattermost/client.ts +230 -0
  1841. package/extensions/mattermost/src/mattermost/index.ts +9 -0
  1842. package/extensions/mattermost/src/mattermost/monitor-helpers.ts +71 -0
  1843. package/extensions/mattermost/src/mattermost/monitor-onchar.ts +25 -0
  1844. package/extensions/mattermost/src/mattermost/monitor-websocket.ts +221 -0
  1845. package/extensions/mattermost/src/mattermost/monitor.ts +1061 -0
  1846. package/extensions/mattermost/src/mattermost/probe.ts +61 -0
  1847. package/extensions/mattermost/src/mattermost/reactions.test-helpers.ts +83 -0
  1848. package/extensions/mattermost/src/mattermost/reactions.ts +124 -0
  1849. package/extensions/mattermost/src/mattermost/reconnect.ts +103 -0
  1850. package/extensions/mattermost/src/mattermost/send.ts +231 -0
  1851. package/extensions/mattermost/src/normalize.ts +46 -0
  1852. package/extensions/mattermost/src/onboarding-helpers.ts +1 -0
  1853. package/extensions/mattermost/src/onboarding.ts +182 -0
  1854. package/extensions/mattermost/src/runtime.ts +14 -0
  1855. package/extensions/mattermost/src/types.ts +62 -0
  1856. package/extensions/msteams/CHANGELOG.md +35 -0
  1857. package/extensions/msteams/index.ts +17 -0
  1858. package/extensions/msteams/package.json +32 -0
  1859. package/extensions/msteams/remoteclaw.plugin.json +9 -0
  1860. package/extensions/msteams/src/attachments/download.ts +282 -0
  1861. package/extensions/msteams/src/attachments/graph.ts +354 -0
  1862. package/extensions/msteams/src/attachments/html.ts +90 -0
  1863. package/extensions/msteams/src/attachments/payload.ts +14 -0
  1864. package/extensions/msteams/src/attachments/remote-media.ts +42 -0
  1865. package/extensions/msteams/src/attachments/shared.ts +404 -0
  1866. package/extensions/msteams/src/attachments/types.ts +37 -0
  1867. package/extensions/msteams/src/attachments.ts +18 -0
  1868. package/extensions/msteams/src/channel.ts +464 -0
  1869. package/extensions/msteams/src/conversation-store-fs.ts +165 -0
  1870. package/extensions/msteams/src/conversation-store-memory.ts +47 -0
  1871. package/extensions/msteams/src/conversation-store.ts +41 -0
  1872. package/extensions/msteams/src/directory-live.ts +108 -0
  1873. package/extensions/msteams/src/errors.ts +190 -0
  1874. package/extensions/msteams/src/file-consent-helpers.ts +73 -0
  1875. package/extensions/msteams/src/file-consent.ts +126 -0
  1876. package/extensions/msteams/src/file-lock.ts +1 -0
  1877. package/extensions/msteams/src/graph-chat.ts +53 -0
  1878. package/extensions/msteams/src/graph-upload.ts +452 -0
  1879. package/extensions/msteams/src/graph-users.ts +29 -0
  1880. package/extensions/msteams/src/graph.ts +81 -0
  1881. package/extensions/msteams/src/inbound.ts +48 -0
  1882. package/extensions/msteams/src/index.ts +4 -0
  1883. package/extensions/msteams/src/media-helpers.ts +105 -0
  1884. package/extensions/msteams/src/mentions.ts +114 -0
  1885. package/extensions/msteams/src/messenger.ts +484 -0
  1886. package/extensions/msteams/src/monitor-handler/inbound-media.ts +128 -0
  1887. package/extensions/msteams/src/monitor-handler/message-handler.ts +661 -0
  1888. package/extensions/msteams/src/monitor-handler.ts +162 -0
  1889. package/extensions/msteams/src/monitor-types.ts +5 -0
  1890. package/extensions/msteams/src/monitor.ts +305 -0
  1891. package/extensions/msteams/src/onboarding.ts +406 -0
  1892. package/extensions/msteams/src/outbound.ts +46 -0
  1893. package/extensions/msteams/src/pending-uploads.ts +89 -0
  1894. package/extensions/msteams/src/policy.ts +259 -0
  1895. package/extensions/msteams/src/polls-store-memory.ts +32 -0
  1896. package/extensions/msteams/src/polls.ts +315 -0
  1897. package/extensions/msteams/src/probe.ts +94 -0
  1898. package/extensions/msteams/src/reply-dispatcher.ts +132 -0
  1899. package/extensions/msteams/src/resolve-allowlist.ts +198 -0
  1900. package/extensions/msteams/src/runtime.ts +14 -0
  1901. package/extensions/msteams/src/sdk-types.ts +19 -0
  1902. package/extensions/msteams/src/sdk.ts +33 -0
  1903. package/extensions/msteams/src/send-context.ts +164 -0
  1904. package/extensions/msteams/src/send.ts +530 -0
  1905. package/extensions/msteams/src/sent-message-cache.ts +44 -0
  1906. package/extensions/msteams/src/storage.ts +25 -0
  1907. package/extensions/msteams/src/store-fs.ts +44 -0
  1908. package/extensions/msteams/src/test-runtime.ts +16 -0
  1909. package/extensions/msteams/src/token-response.ts +11 -0
  1910. package/extensions/msteams/src/token.ts +19 -0
  1911. package/extensions/nextcloud-talk/index.ts +17 -0
  1912. package/extensions/nextcloud-talk/package.json +30 -0
  1913. package/extensions/nextcloud-talk/remoteclaw.plugin.json +9 -0
  1914. package/extensions/nextcloud-talk/src/accounts.ts +170 -0
  1915. package/extensions/nextcloud-talk/src/channel.ts +416 -0
  1916. package/extensions/nextcloud-talk/src/config-schema.ts +72 -0
  1917. package/extensions/nextcloud-talk/src/format.ts +79 -0
  1918. package/extensions/nextcloud-talk/src/inbound.ts +342 -0
  1919. package/extensions/nextcloud-talk/src/monitor.ts +275 -0
  1920. package/extensions/nextcloud-talk/src/normalize.ts +39 -0
  1921. package/extensions/nextcloud-talk/src/onboarding.ts +349 -0
  1922. package/extensions/nextcloud-talk/src/policy.ts +180 -0
  1923. package/extensions/nextcloud-talk/src/room-info.ts +125 -0
  1924. package/extensions/nextcloud-talk/src/runtime.ts +14 -0
  1925. package/extensions/nextcloud-talk/src/send.ts +215 -0
  1926. package/extensions/nextcloud-talk/src/signature.ts +72 -0
  1927. package/extensions/nextcloud-talk/src/types.ts +184 -0
  1928. package/extensions/nostr/CHANGELOG.md +44 -0
  1929. package/extensions/nostr/README.md +136 -0
  1930. package/extensions/nostr/index.ts +68 -0
  1931. package/extensions/nostr/node_modules/.bin/tsc +21 -0
  1932. package/extensions/nostr/node_modules/.bin/tsserver +21 -0
  1933. package/extensions/nostr/package.json +30 -0
  1934. package/extensions/nostr/remoteclaw.plugin.json +9 -0
  1935. package/extensions/nostr/src/channel.ts +345 -0
  1936. package/extensions/nostr/src/config-schema.ts +90 -0
  1937. package/extensions/nostr/src/metrics.ts +458 -0
  1938. package/extensions/nostr/src/nostr-bus.ts +719 -0
  1939. package/extensions/nostr/src/nostr-profile-http.ts +519 -0
  1940. package/extensions/nostr/src/nostr-profile-import.ts +262 -0
  1941. package/extensions/nostr/src/nostr-profile.ts +277 -0
  1942. package/extensions/nostr/src/nostr-state-store.ts +226 -0
  1943. package/extensions/nostr/src/runtime.ts +14 -0
  1944. package/extensions/nostr/src/seen-tracker.ts +289 -0
  1945. package/extensions/nostr/src/types.ts +101 -0
  1946. package/extensions/phone-control/index.ts +421 -0
  1947. package/extensions/phone-control/remoteclaw.plugin.json +10 -0
  1948. package/extensions/shared/resolve-target-test-helpers.ts +66 -0
  1949. package/extensions/signal/index.ts +17 -0
  1950. package/extensions/signal/package.json +12 -0
  1951. package/extensions/signal/remoteclaw.plugin.json +9 -0
  1952. package/extensions/signal/src/channel.ts +299 -0
  1953. package/extensions/signal/src/runtime.ts +14 -0
  1954. package/extensions/slack/index.ts +17 -0
  1955. package/extensions/slack/package.json +12 -0
  1956. package/extensions/slack/remoteclaw.plugin.json +9 -0
  1957. package/extensions/slack/src/channel.ts +421 -0
  1958. package/extensions/slack/src/runtime.ts +14 -0
  1959. package/extensions/synology-chat/index.ts +17 -0
  1960. package/extensions/synology-chat/package.json +28 -0
  1961. package/extensions/synology-chat/remoteclaw.plugin.json +9 -0
  1962. package/extensions/synology-chat/src/accounts.ts +87 -0
  1963. package/extensions/synology-chat/src/channel.ts +347 -0
  1964. package/extensions/synology-chat/src/client.ts +142 -0
  1965. package/extensions/synology-chat/src/runtime.ts +20 -0
  1966. package/extensions/synology-chat/src/security.ts +140 -0
  1967. package/extensions/synology-chat/src/types.ts +60 -0
  1968. package/extensions/synology-chat/src/webhook-handler.ts +221 -0
  1969. package/extensions/talk-voice/index.ts +150 -0
  1970. package/extensions/talk-voice/remoteclaw.plugin.json +10 -0
  1971. package/extensions/telegram/index.ts +17 -0
  1972. package/extensions/telegram/package.json +12 -0
  1973. package/extensions/telegram/remoteclaw.plugin.json +9 -0
  1974. package/extensions/telegram/src/channel.ts +569 -0
  1975. package/extensions/telegram/src/runtime.ts +14 -0
  1976. package/extensions/test-utils/runtime-env.ts +12 -0
  1977. package/extensions/thread-ownership/index.ts +133 -0
  1978. package/extensions/thread-ownership/remoteclaw.plugin.json +28 -0
  1979. package/extensions/tlon/README.md +5 -0
  1980. package/extensions/tlon/index.ts +17 -0
  1981. package/extensions/tlon/package.json +29 -0
  1982. package/extensions/tlon/remoteclaw.plugin.json +9 -0
  1983. package/extensions/tlon/src/account-fields.ts +25 -0
  1984. package/extensions/tlon/src/channel.ts +384 -0
  1985. package/extensions/tlon/src/config-schema.ts +41 -0
  1986. package/extensions/tlon/src/monitor/discovery.ts +78 -0
  1987. package/extensions/tlon/src/monitor/history.ts +92 -0
  1988. package/extensions/tlon/src/monitor/index.ts +591 -0
  1989. package/extensions/tlon/src/monitor/processed-messages.ts +33 -0
  1990. package/extensions/tlon/src/monitor/utils.ts +106 -0
  1991. package/extensions/tlon/src/onboarding.ts +229 -0
  1992. package/extensions/tlon/src/runtime.ts +14 -0
  1993. package/extensions/tlon/src/targets.ts +89 -0
  1994. package/extensions/tlon/src/types.ts +99 -0
  1995. package/extensions/tlon/src/urbit/auth.ts +48 -0
  1996. package/extensions/tlon/src/urbit/base-url.ts +57 -0
  1997. package/extensions/tlon/src/urbit/channel-client.ts +158 -0
  1998. package/extensions/tlon/src/urbit/channel-ops.ts +164 -0
  1999. package/extensions/tlon/src/urbit/context.ts +47 -0
  2000. package/extensions/tlon/src/urbit/errors.ts +51 -0
  2001. package/extensions/tlon/src/urbit/fetch.ts +39 -0
  2002. package/extensions/tlon/src/urbit/send.ts +131 -0
  2003. package/extensions/tlon/src/urbit/sse-client.ts +431 -0
  2004. package/extensions/twitch/CHANGELOG.md +39 -0
  2005. package/extensions/twitch/README.md +89 -0
  2006. package/extensions/twitch/index.ts +20 -0
  2007. package/extensions/twitch/package.json +17 -0
  2008. package/extensions/twitch/remoteclaw.plugin.json +9 -0
  2009. package/extensions/twitch/src/access-control.ts +166 -0
  2010. package/extensions/twitch/src/actions.ts +174 -0
  2011. package/extensions/twitch/src/client-manager-registry.ts +115 -0
  2012. package/extensions/twitch/src/config-schema.ts +84 -0
  2013. package/extensions/twitch/src/config.ts +116 -0
  2014. package/extensions/twitch/src/monitor.ts +273 -0
  2015. package/extensions/twitch/src/onboarding.ts +417 -0
  2016. package/extensions/twitch/src/outbound.ts +187 -0
  2017. package/extensions/twitch/src/plugin.ts +274 -0
  2018. package/extensions/twitch/src/probe.ts +119 -0
  2019. package/extensions/twitch/src/resolver.ts +137 -0
  2020. package/extensions/twitch/src/runtime.ts +14 -0
  2021. package/extensions/twitch/src/send.ts +136 -0
  2022. package/extensions/twitch/src/status.ts +179 -0
  2023. package/extensions/twitch/src/test-fixtures.ts +30 -0
  2024. package/extensions/twitch/src/token.ts +94 -0
  2025. package/extensions/twitch/src/twitch-client.ts +277 -0
  2026. package/extensions/twitch/src/types.ts +141 -0
  2027. package/extensions/twitch/src/utils/markdown.ts +98 -0
  2028. package/extensions/twitch/src/utils/twitch.ts +80 -0
  2029. package/extensions/voice-call/CHANGELOG.md +49 -0
  2030. package/extensions/voice-call/README.md +181 -0
  2031. package/extensions/voice-call/index.ts +529 -0
  2032. package/extensions/voice-call/package.json +16 -0
  2033. package/extensions/voice-call/remoteclaw.plugin.json +559 -0
  2034. package/extensions/voice-call/src/allowlist.ts +19 -0
  2035. package/extensions/voice-call/src/cli.ts +380 -0
  2036. package/extensions/voice-call/src/config.ts +477 -0
  2037. package/extensions/voice-call/src/core-bridge.ts +170 -0
  2038. package/extensions/voice-call/src/manager/context.ts +41 -0
  2039. package/extensions/voice-call/src/manager/events.ts +242 -0
  2040. package/extensions/voice-call/src/manager/lookup.ts +35 -0
  2041. package/extensions/voice-call/src/manager/outbound.ts +380 -0
  2042. package/extensions/voice-call/src/manager/state.ts +48 -0
  2043. package/extensions/voice-call/src/manager/store.ts +94 -0
  2044. package/extensions/voice-call/src/manager/timers.ts +112 -0
  2045. package/extensions/voice-call/src/manager/twiml.ts +9 -0
  2046. package/extensions/voice-call/src/manager.ts +209 -0
  2047. package/extensions/voice-call/src/media-stream.ts +527 -0
  2048. package/extensions/voice-call/src/providers/base.ts +67 -0
  2049. package/extensions/voice-call/src/providers/index.ts +10 -0
  2050. package/extensions/voice-call/src/providers/mock.ts +165 -0
  2051. package/extensions/voice-call/src/providers/plivo.ts +560 -0
  2052. package/extensions/voice-call/src/providers/stt-openai-realtime.ts +311 -0
  2053. package/extensions/voice-call/src/providers/telnyx.ts +318 -0
  2054. package/extensions/voice-call/src/providers/tts-openai.ts +259 -0
  2055. package/extensions/voice-call/src/providers/twilio/api.ts +42 -0
  2056. package/extensions/voice-call/src/providers/twilio/webhook.ts +33 -0
  2057. package/extensions/voice-call/src/providers/twilio.ts +688 -0
  2058. package/extensions/voice-call/src/response-generator.ts +174 -0
  2059. package/extensions/voice-call/src/runtime.ts +217 -0
  2060. package/extensions/voice-call/src/telephony-audio.ts +90 -0
  2061. package/extensions/voice-call/src/telephony-tts.ts +106 -0
  2062. package/extensions/voice-call/src/tunnel.ts +314 -0
  2063. package/extensions/voice-call/src/types.ts +280 -0
  2064. package/extensions/voice-call/src/utils.ts +14 -0
  2065. package/extensions/voice-call/src/voice-mapping.ts +67 -0
  2066. package/extensions/voice-call/src/webhook-security.ts +880 -0
  2067. package/extensions/voice-call/src/webhook.ts +556 -0
  2068. package/extensions/whatsapp/index.ts +17 -0
  2069. package/extensions/whatsapp/package.json +12 -0
  2070. package/extensions/whatsapp/remoteclaw.plugin.json +9 -0
  2071. package/extensions/whatsapp/src/channel.ts +459 -0
  2072. package/extensions/whatsapp/src/runtime.ts +14 -0
  2073. package/extensions/zalo/CHANGELOG.md +29 -0
  2074. package/extensions/zalo/README.md +50 -0
  2075. package/extensions/zalo/index.ts +19 -0
  2076. package/extensions/zalo/package.json +32 -0
  2077. package/extensions/zalo/remoteclaw.plugin.json +9 -0
  2078. package/extensions/zalo/src/accounts.ts +82 -0
  2079. package/extensions/zalo/src/actions.ts +56 -0
  2080. package/extensions/zalo/src/api.ts +208 -0
  2081. package/extensions/zalo/src/channel.ts +398 -0
  2082. package/extensions/zalo/src/config-schema.ts +27 -0
  2083. package/extensions/zalo/src/group-access.ts +48 -0
  2084. package/extensions/zalo/src/monitor.ts +675 -0
  2085. package/extensions/zalo/src/monitor.webhook.ts +219 -0
  2086. package/extensions/zalo/src/onboarding.ts +398 -0
  2087. package/extensions/zalo/src/probe.ts +45 -0
  2088. package/extensions/zalo/src/proxy.ts +24 -0
  2089. package/extensions/zalo/src/runtime.ts +14 -0
  2090. package/extensions/zalo/src/send.ts +124 -0
  2091. package/extensions/zalo/src/status-issues.ts +53 -0
  2092. package/extensions/zalo/src/token.ts +62 -0
  2093. package/extensions/zalo/src/types.ts +48 -0
  2094. package/extensions/zalouser/CHANGELOG.md +31 -0
  2095. package/extensions/zalouser/README.md +225 -0
  2096. package/extensions/zalouser/index.ts +31 -0
  2097. package/extensions/zalouser/package.json +32 -0
  2098. package/extensions/zalouser/remoteclaw.plugin.json +9 -0
  2099. package/extensions/zalouser/src/accounts.ts +138 -0
  2100. package/extensions/zalouser/src/channel.ts +652 -0
  2101. package/extensions/zalouser/src/config-schema.ts +28 -0
  2102. package/extensions/zalouser/src/monitor.ts +619 -0
  2103. package/extensions/zalouser/src/onboarding.ts +428 -0
  2104. package/extensions/zalouser/src/probe.ts +27 -0
  2105. package/extensions/zalouser/src/runtime.ts +14 -0
  2106. package/extensions/zalouser/src/send.ts +141 -0
  2107. package/extensions/zalouser/src/status-issues.ts +89 -0
  2108. package/extensions/zalouser/src/tool.ts +166 -0
  2109. package/extensions/zalouser/src/types.ts +105 -0
  2110. package/extensions/zalouser/src/zca.ts +198 -0
  2111. package/package.json +250 -15
  2112. package/remoteclaw.mjs +56 -0
  2113. package/index.js +0 -4
@@ -0,0 +1,1669 @@
1
+ import { Et as getResolvedLoggerSettings, Gt as resolveOAuthDir, Ht as resolveGatewayPort, Kt as resolveStateDir, Nt as CONFIG_PATH, Ut as resolveIsNixMode, _ as defaultRuntime, n as isTruthyEnvValue, ot as shortenHomePath, st as sleep, un as resolveRequiredHomeDir } from "./entry.js";
2
+ import { l as writeConfigFile, o as readConfigFileSnapshot } from "./config-qAZfcdDM.js";
3
+ import { d as resolveDefaultAgentId, l as resolveAgentWorkspaceDir } from "./agent-scope-FzE2oRm0.js";
4
+ import { $ as formatSessionArchiveTimestamp, L as cleanStaleLockFiles, Y as resolveMainSessionKey, et as isPrimarySessionTranscriptFileName, l as loadSessionStore } from "./sessions-Dg3febTj.js";
5
+ import { n as listChannelPlugins } from "./plugins-Ca4Ybd3t.js";
6
+ import { t as formatCliCommand } from "./command-format-BiiNHkWG.js";
7
+ import { t as loadRemoteClawPlugins } from "./loader-BLMpE4uG.js";
8
+ import { c as resolveSessionFilePath, l as resolveSessionFilePathOptions, m as resolveStorePath, p as resolveSessionTranscriptsDirForAgent } from "./chat-envelope-AJFUAuBM.js";
9
+ import { n as callGateway, t as buildGatewayConnectionDetails } from "./call-Wjjo7gwP.js";
10
+ import { r as isLoopbackHost, u as resolveGatewayBindHost } from "./net-DSkFMHJ8.js";
11
+ import { t as runCommandWithTimeout } from "./exec-epNpA1aU.js";
12
+ import { _ as CODEX_CLI_PROFILE_ID, d as updateAuthProfileStoreWithLock, g as CLAUDE_CLI_PROFILE_ID, h as resolveAuthProfileDisplayLabel, l as ensureAuthProfileStore } from "./auth-C1zx1O24.js";
13
+ import { f as resolveGatewaySystemdServiceName, h as resolveNodeLaunchAgentLabel, l as resolveGatewayLaunchAgentLabel, p as resolveGatewayWindowsTaskName } from "./constants-BBVTjb1j.js";
14
+ import { i as formatPortDiagnostics, n as inspectPortUsage } from "./ports-gRBeuUtp.js";
15
+ import { a as resolveGatewayAuth } from "./auth-DH1wEw0w.js";
16
+ import { t as validateVoiceCredentials } from "./voice-credentials-DXU-y9z7.js";
17
+ import { n as stylePromptMessage, r as stylePromptTitle, t as stylePromptHint } from "./prompt-style-CUuA6OCy.js";
18
+ import { t as note$1 } from "./note-D-EI0czq.js";
19
+ import { r as isWSLEnv, t as isWSL } from "./wsl-PDLKeX04.js";
20
+ import { f as printWizardHeader, m as randomToken, o as guardCancel, t as applyWizardMetadata } from "./onboard-helpers-DdqoC3w8.js";
21
+ import { t as collectChannelStatusIssues } from "./channels-status-issues-BMadvA0-.js";
22
+ import { d as resolveSystemNodeInfo, l as renderSystemNodeWarning, n as gatewayInstallErrorHint, t as buildGatewayInstallPlan } from "./daemon-install-helpers-DVr51zvE.js";
23
+ import { n as GATEWAY_DAEMON_RUNTIME_OPTIONS, t as DEFAULT_GATEWAY_DAEMON_RUNTIME } from "./daemon-runtime-CzFI2dPw.js";
24
+ import { l as uninstallLegacySystemdUnits, r as isSystemdUserServiceAvailable } from "./systemd-40Rij3QR.js";
25
+ import { a as launchAgentPlistExists, i as isLaunchAgentLoaded, o as repairLaunchAgentBootstrap, r as isLaunchAgentListed, s as resolveGatewayLogPaths, t as resolveGatewayService } from "./service-C8a0SXHD.js";
26
+ import { i as auditGatewayServiceConfig, n as renderSystemdUnavailableHints, o as needsNodeRuntimeMigration, r as SERVICE_AUDIT_CODES, s as formatRuntimeStatus, t as isSystemdUnavailableDetail } from "./systemd-hints-CyQqHq1i.js";
27
+ import { t as readLastGatewayErrorLine } from "./diagnostics-BzzhTQzK.js";
28
+ import { n as renderGatewayServiceCleanupHints, t as findExtraGatewayServices } from "./inspect-BeNNpWna.js";
29
+ import { r as healthCommand } from "./health-DlRS-gIZ.js";
30
+ import { t as resolveRemoteClawPackageRoot } from "./remoteclaw-root-E4-hmb4E.js";
31
+ import { n as resolveControlUiDistIndexHealth, r as resolveControlUiDistIndexPathForRoot } from "./control-ui-assets-S_TLo6Fs.js";
32
+ import { t as resolveDefaultChannelAccountContext } from "./channel-account-context-BHIy71Yh.js";
33
+ import { t as resolveDmAllowState } from "./dm-policy-shared-DqkEp7h7.js";
34
+ import { n as runGatewayUpdate, t as resolveAgentSessionDirs } from "./session-dirs-DoboH7Oy.js";
35
+ import { n as detectLegacyStateMigrations, r as runLegacyStateMigrations, t as loadAndMaybeMigrateDoctorConfig } from "./doctor-config-flow-DZCCqya1.js";
36
+ import { n as logConfigUpdated } from "./logging-DTEoeoa3.js";
37
+ import { t as ensureSystemdUserLingerInteractive } from "./systemd-linger-DDvkfxH-.js";
38
+ import { t as formatHealthCheckFailure } from "./health-format-DF54wvUU.js";
39
+ import { n as doctorShellCompletion } from "./doctor-completion-CefSDbii.js";
40
+ import { execFile } from "node:child_process";
41
+ import os from "node:os";
42
+ import path from "node:path";
43
+ import fs from "node:fs";
44
+ import { promisify } from "node:util";
45
+ import fsp from "node:fs/promises";
46
+ import { confirm, intro, outro, select } from "@clack/prompts";
47
+
48
+ //#region src/auth/auth-health.ts
49
+ const DEFAULT_OAUTH_WARN_MS = 1440 * 60 * 1e3;
50
+ function resolveAuthProfileSource(_profileId) {
51
+ return "store";
52
+ }
53
+ function buildProfileHealth(params) {
54
+ const { profileId, credential, store, cfg } = params;
55
+ const label = resolveAuthProfileDisplayLabel({
56
+ cfg,
57
+ store,
58
+ profileId
59
+ });
60
+ const source = resolveAuthProfileSource(profileId);
61
+ return {
62
+ profileId,
63
+ provider: credential.provider,
64
+ type: credential.type,
65
+ status: "static",
66
+ source,
67
+ label
68
+ };
69
+ }
70
+ function buildAuthHealthSummary(params) {
71
+ const now = Date.now();
72
+ const warnAfterMs = params.warnAfterMs ?? DEFAULT_OAUTH_WARN_MS;
73
+ const providerFilter = params.providers ? new Set(params.providers.map((p) => p.trim()).filter(Boolean)) : null;
74
+ const profiles = Object.entries(params.store.profiles).filter(([_, cred]) => providerFilter ? providerFilter.has(cred.provider) : true).map(([profileId, credential]) => buildProfileHealth({
75
+ profileId,
76
+ credential,
77
+ store: params.store,
78
+ cfg: params.cfg
79
+ })).toSorted((a, b) => {
80
+ if (a.provider !== b.provider) return a.provider.localeCompare(b.provider);
81
+ return a.profileId.localeCompare(b.profileId);
82
+ });
83
+ const providersMap = /* @__PURE__ */ new Map();
84
+ for (const profile of profiles) {
85
+ const existing = providersMap.get(profile.provider);
86
+ if (!existing) providersMap.set(profile.provider, {
87
+ provider: profile.provider,
88
+ status: "missing",
89
+ profiles: [profile]
90
+ });
91
+ else existing.profiles.push(profile);
92
+ }
93
+ if (providerFilter) {
94
+ for (const provider of providerFilter) if (!providersMap.has(provider)) providersMap.set(provider, {
95
+ provider,
96
+ status: "missing",
97
+ profiles: []
98
+ });
99
+ }
100
+ for (const provider of providersMap.values()) {
101
+ if (provider.profiles.length === 0) {
102
+ provider.status = "missing";
103
+ continue;
104
+ }
105
+ provider.status = "static";
106
+ }
107
+ return {
108
+ now,
109
+ warnAfterMs,
110
+ profiles,
111
+ providers: Array.from(providersMap.values()).toSorted((a, b) => a.provider.localeCompare(b.provider))
112
+ };
113
+ }
114
+
115
+ //#endregion
116
+ //#region src/commands/doctor-auth.ts
117
+ async function maybeRepairAnthropicOAuthProfileId(_cfg, _prompter) {
118
+ return _cfg;
119
+ }
120
+ function pruneAuthProfiles(cfg, profileIds) {
121
+ const profiles = cfg.auth?.profiles;
122
+ const nextProfiles = profiles ? { ...profiles } : void 0;
123
+ let changed = false;
124
+ if (nextProfiles) {
125
+ for (const id of profileIds) if (id in nextProfiles) {
126
+ delete nextProfiles[id];
127
+ changed = true;
128
+ }
129
+ }
130
+ if (!changed) return {
131
+ next: cfg,
132
+ changed: false
133
+ };
134
+ const nextAuth = nextProfiles ? {
135
+ ...cfg.auth,
136
+ profiles: Object.keys(nextProfiles).length > 0 ? nextProfiles : void 0
137
+ } : void 0;
138
+ return {
139
+ next: {
140
+ ...cfg,
141
+ auth: nextAuth
142
+ },
143
+ changed: true
144
+ };
145
+ }
146
+ async function maybeRemoveDeprecatedCliAuthProfiles(cfg, prompter) {
147
+ const store = ensureAuthProfileStore();
148
+ const deprecated = /* @__PURE__ */ new Set();
149
+ if (store.profiles[CLAUDE_CLI_PROFILE_ID] || cfg.auth?.profiles?.[CLAUDE_CLI_PROFILE_ID]) deprecated.add(CLAUDE_CLI_PROFILE_ID);
150
+ if (store.profiles[CODEX_CLI_PROFILE_ID] || cfg.auth?.profiles?.[CODEX_CLI_PROFILE_ID]) deprecated.add(CODEX_CLI_PROFILE_ID);
151
+ if (deprecated.size === 0) return cfg;
152
+ const lines = ["Deprecated external CLI auth profiles detected (no longer supported):"];
153
+ if (deprecated.has(CLAUDE_CLI_PROFILE_ID)) lines.push(`- ${CLAUDE_CLI_PROFILE_ID} (Anthropic): use ${formatCliCommand("remoteclaw configure")}`);
154
+ if (deprecated.has(CODEX_CLI_PROFILE_ID)) lines.push(`- ${CODEX_CLI_PROFILE_ID} (OpenAI Codex): use ${formatCliCommand("remoteclaw configure")}`);
155
+ note$1(lines.join("\n"), "Auth profiles");
156
+ if (!await prompter.confirmRepair({
157
+ message: "Remove deprecated CLI auth profiles now?",
158
+ initialValue: true
159
+ })) return cfg;
160
+ await updateAuthProfileStoreWithLock({ updater: (nextStore) => {
161
+ let mutated = false;
162
+ for (const id of deprecated) if (nextStore.profiles[id]) {
163
+ delete nextStore.profiles[id];
164
+ mutated = true;
165
+ }
166
+ return mutated;
167
+ } });
168
+ const pruned = pruneAuthProfiles(cfg, deprecated);
169
+ if (pruned.changed) note$1(Array.from(deprecated.values()).map((id) => `- removed ${id} from config`).join("\n"), "Doctor changes");
170
+ return pruned.next;
171
+ }
172
+ function formatAuthIssueHint(issue) {
173
+ if (issue.provider === "anthropic" && issue.profileId === CLAUDE_CLI_PROFILE_ID) return `Deprecated profile. Use ${formatCliCommand("remoteclaw configure")}.`;
174
+ if (issue.provider === "openai-codex" && issue.profileId === CODEX_CLI_PROFILE_ID) return `Deprecated profile. Use ${formatCliCommand("remoteclaw configure")}.`;
175
+ return `Re-auth via \`${formatCliCommand("remoteclaw configure")}\` or \`${formatCliCommand("remoteclaw onboard")}\`.`;
176
+ }
177
+ function formatAuthIssueLine(issue) {
178
+ const hint = formatAuthIssueHint(issue);
179
+ return `- ${issue.profileId}: ${issue.status}${hint ? ` — ${hint}` : ""}`;
180
+ }
181
+ async function noteAuthProfileHealth(params) {
182
+ const issues = buildAuthHealthSummary({
183
+ store: ensureAuthProfileStore(),
184
+ cfg: params.cfg
185
+ }).profiles.filter((profile) => profile.status === "missing");
186
+ if (issues.length === 0) return;
187
+ note$1(issues.map((issue) => formatAuthIssueLine({
188
+ profileId: issue.profileId,
189
+ provider: issue.provider,
190
+ status: issue.status
191
+ })).join("\n"), "Model auth");
192
+ }
193
+
194
+ //#endregion
195
+ //#region src/commands/doctor-format.ts
196
+ function formatGatewayRuntimeSummary(runtime) {
197
+ return formatRuntimeStatus(runtime);
198
+ }
199
+ function buildGatewayRuntimeHints(runtime, options = {}) {
200
+ const hints = [];
201
+ if (!runtime) return hints;
202
+ const platform = options.platform ?? process.platform;
203
+ const env = options.env ?? process.env;
204
+ const fileLog = (() => {
205
+ try {
206
+ return getResolvedLoggerSettings().file;
207
+ } catch {
208
+ return null;
209
+ }
210
+ })();
211
+ if (platform === "linux" && isSystemdUnavailableDetail(runtime.detail)) {
212
+ hints.push(...renderSystemdUnavailableHints({ wsl: isWSLEnv() }));
213
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
214
+ return hints;
215
+ }
216
+ if (runtime.cachedLabel && platform === "darwin") {
217
+ const label = resolveGatewayLaunchAgentLabel(env.REMOTECLAW_PROFILE);
218
+ hints.push(`LaunchAgent label cached but plist missing. Clear with: launchctl bootout gui/$UID/${label}`);
219
+ hints.push(`Then reinstall: ${formatCliCommand("remoteclaw gateway install", env)}`);
220
+ }
221
+ if (runtime.missingUnit) {
222
+ hints.push(`Service not installed. Run: ${formatCliCommand("remoteclaw gateway install", env)}`);
223
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
224
+ return hints;
225
+ }
226
+ if (runtime.status === "stopped") {
227
+ hints.push("Service is loaded but not running (likely exited immediately).");
228
+ if (fileLog) hints.push(`File logs: ${fileLog}`);
229
+ if (platform === "darwin") {
230
+ const logs = resolveGatewayLogPaths(env);
231
+ hints.push(`Launchd stdout (if installed): ${logs.stdoutPath}`);
232
+ hints.push(`Launchd stderr (if installed): ${logs.stderrPath}`);
233
+ } else if (platform === "linux") {
234
+ const unit = resolveGatewaySystemdServiceName(env.REMOTECLAW_PROFILE);
235
+ hints.push(`Logs: journalctl --user -u ${unit}.service -n 200 --no-pager`);
236
+ } else if (platform === "win32") {
237
+ const task = resolveGatewayWindowsTaskName(env.REMOTECLAW_PROFILE);
238
+ hints.push(`Logs: schtasks /Query /TN "${task}" /V /FO LIST`);
239
+ }
240
+ }
241
+ return hints;
242
+ }
243
+
244
+ //#endregion
245
+ //#region src/commands/doctor-gateway-daemon-flow.ts
246
+ async function maybeRepairLaunchAgentBootstrap(params) {
247
+ if (process.platform !== "darwin") return false;
248
+ if (!await isLaunchAgentListed({ env: params.env })) return false;
249
+ if (await isLaunchAgentLoaded({ env: params.env })) return false;
250
+ if (!await launchAgentPlistExists(params.env)) return false;
251
+ note$1("LaunchAgent is listed but not loaded in launchd.", `${params.title} LaunchAgent`);
252
+ if (!await params.prompter.confirmSkipInNonInteractive({
253
+ message: `Repair ${params.title} LaunchAgent bootstrap now?`,
254
+ initialValue: true
255
+ })) return false;
256
+ params.runtime.log(`Bootstrapping ${params.title} LaunchAgent...`);
257
+ const repair = await repairLaunchAgentBootstrap({ env: params.env });
258
+ if (!repair.ok) {
259
+ params.runtime.error(`${params.title} LaunchAgent bootstrap failed: ${repair.detail ?? "unknown error"}`);
260
+ return false;
261
+ }
262
+ if (!await isLaunchAgentLoaded({ env: params.env })) {
263
+ params.runtime.error(`${params.title} LaunchAgent still not loaded after repair.`);
264
+ return false;
265
+ }
266
+ note$1(`${params.title} LaunchAgent repaired.`, `${params.title} LaunchAgent`);
267
+ return true;
268
+ }
269
+ async function maybeRepairGatewayDaemon(params) {
270
+ if (params.healthOk) return;
271
+ const service = resolveGatewayService();
272
+ let loaded = false;
273
+ try {
274
+ loaded = await service.isLoaded({ env: process.env });
275
+ } catch {
276
+ loaded = false;
277
+ }
278
+ let serviceRuntime;
279
+ if (loaded) serviceRuntime = await service.readRuntime(process.env).catch(() => void 0);
280
+ if (process.platform === "darwin" && params.cfg.gateway?.mode !== "remote") {
281
+ const gatewayRepaired = await maybeRepairLaunchAgentBootstrap({
282
+ env: process.env,
283
+ title: "Gateway",
284
+ runtime: params.runtime,
285
+ prompter: params.prompter
286
+ });
287
+ await maybeRepairLaunchAgentBootstrap({
288
+ env: {
289
+ ...process.env,
290
+ REMOTECLAW_LAUNCHD_LABEL: resolveNodeLaunchAgentLabel()
291
+ },
292
+ title: "Node",
293
+ runtime: params.runtime,
294
+ prompter: params.prompter
295
+ });
296
+ if (gatewayRepaired) {
297
+ loaded = await service.isLoaded({ env: process.env });
298
+ if (loaded) serviceRuntime = await service.readRuntime(process.env).catch(() => void 0);
299
+ }
300
+ }
301
+ if (params.cfg.gateway?.mode !== "remote") {
302
+ const diagnostics = await inspectPortUsage(resolveGatewayPort(params.cfg, process.env));
303
+ if (diagnostics.status === "busy") note$1(formatPortDiagnostics(diagnostics).join("\n"), "Gateway port");
304
+ else if (loaded && serviceRuntime?.status === "running") {
305
+ const lastError = await readLastGatewayErrorLine(process.env);
306
+ if (lastError) note$1(`Last gateway error: ${lastError}`, "Gateway");
307
+ }
308
+ }
309
+ if (!loaded) {
310
+ if (process.platform === "linux") {
311
+ if (!await isSystemdUserServiceAvailable().catch(() => false)) {
312
+ note$1(renderSystemdUnavailableHints({ wsl: await isWSL() }).join("\n"), "Gateway");
313
+ return;
314
+ }
315
+ }
316
+ note$1("Gateway service not installed.", "Gateway");
317
+ if (params.cfg.gateway?.mode !== "remote") {
318
+ if (await params.prompter.confirmSkipInNonInteractive({
319
+ message: "Install gateway service now?",
320
+ initialValue: true
321
+ })) {
322
+ const daemonRuntime = await params.prompter.select({
323
+ message: "Gateway service runtime",
324
+ options: GATEWAY_DAEMON_RUNTIME_OPTIONS,
325
+ initialValue: DEFAULT_GATEWAY_DAEMON_RUNTIME
326
+ }, DEFAULT_GATEWAY_DAEMON_RUNTIME);
327
+ const port = resolveGatewayPort(params.cfg, process.env);
328
+ const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
329
+ env: process.env,
330
+ port,
331
+ token: params.cfg.gateway?.auth?.token ?? process.env.REMOTECLAW_GATEWAY_TOKEN,
332
+ runtime: daemonRuntime,
333
+ warn: (message, title) => note$1(message, title),
334
+ config: params.cfg
335
+ });
336
+ try {
337
+ await service.install({
338
+ env: process.env,
339
+ stdout: process.stdout,
340
+ programArguments,
341
+ workingDirectory,
342
+ environment
343
+ });
344
+ } catch (err) {
345
+ note$1(`Gateway service install failed: ${String(err)}`, "Gateway");
346
+ note$1(gatewayInstallErrorHint(), "Gateway");
347
+ }
348
+ }
349
+ }
350
+ return;
351
+ }
352
+ const summary = formatGatewayRuntimeSummary(serviceRuntime);
353
+ const hints = buildGatewayRuntimeHints(serviceRuntime, {
354
+ platform: process.platform,
355
+ env: process.env
356
+ });
357
+ if (summary || hints.length > 0) {
358
+ const lines = [];
359
+ if (summary) lines.push(`Runtime: ${summary}`);
360
+ lines.push(...hints);
361
+ note$1(lines.join("\n"), "Gateway");
362
+ }
363
+ if (serviceRuntime?.status !== "running") {
364
+ if (await params.prompter.confirmSkipInNonInteractive({
365
+ message: "Start gateway service now?",
366
+ initialValue: true
367
+ })) {
368
+ await service.restart({
369
+ env: process.env,
370
+ stdout: process.stdout
371
+ });
372
+ await sleep(1500);
373
+ }
374
+ }
375
+ if (process.platform === "darwin") {
376
+ const label = resolveGatewayLaunchAgentLabel(process.env.REMOTECLAW_PROFILE);
377
+ note$1(`LaunchAgent loaded; stopping requires "${formatCliCommand("remoteclaw gateway stop")}" or launchctl bootout gui/$UID/${label}.`, "Gateway");
378
+ }
379
+ if (serviceRuntime?.status === "running") {
380
+ if (await params.prompter.confirmSkipInNonInteractive({
381
+ message: "Restart gateway service now?",
382
+ initialValue: true
383
+ })) {
384
+ await service.restart({
385
+ env: process.env,
386
+ stdout: process.stdout
387
+ });
388
+ await sleep(1500);
389
+ try {
390
+ await healthCommand({
391
+ json: false,
392
+ timeoutMs: 1e4
393
+ }, params.runtime);
394
+ } catch (err) {
395
+ if (String(err).includes("gateway closed")) {
396
+ note$1("Gateway not running.", "Gateway");
397
+ note$1(params.gatewayDetailsMessage, "Gateway connection");
398
+ } else params.runtime.error(formatHealthCheckFailure(err));
399
+ }
400
+ }
401
+ }
402
+ }
403
+
404
+ //#endregion
405
+ //#region src/commands/doctor-gateway-health.ts
406
+ async function checkGatewayHealth(params) {
407
+ const gatewayDetails = buildGatewayConnectionDetails({ config: params.cfg });
408
+ const timeoutMs = typeof params.timeoutMs === "number" && params.timeoutMs > 0 ? params.timeoutMs : 1e4;
409
+ let healthOk = false;
410
+ try {
411
+ await healthCommand({
412
+ json: false,
413
+ timeoutMs,
414
+ config: params.cfg
415
+ }, params.runtime);
416
+ healthOk = true;
417
+ } catch (err) {
418
+ if (String(err).includes("gateway closed")) {
419
+ note$1("Gateway not running.", "Gateway");
420
+ note$1(gatewayDetails.message, "Gateway connection");
421
+ } else params.runtime.error(formatHealthCheckFailure(err));
422
+ }
423
+ if (healthOk) try {
424
+ const issues = collectChannelStatusIssues(await callGateway({
425
+ method: "channels.status",
426
+ params: {
427
+ probe: true,
428
+ timeoutMs: 5e3
429
+ },
430
+ timeoutMs: 6e3
431
+ }));
432
+ if (issues.length > 0) note$1(issues.map((issue) => `- ${issue.channel} ${issue.accountId}: ${issue.message}${issue.fix ? ` (${issue.fix})` : ""}`).join("\n"), "Channel warnings");
433
+ } catch {}
434
+ return { healthOk };
435
+ }
436
+
437
+ //#endregion
438
+ //#region src/commands/doctor-gateway-services.ts
439
+ const execFileAsync$1 = promisify(execFile);
440
+ function detectGatewayRuntime(programArguments) {
441
+ const first = programArguments?.[0];
442
+ if (first) {
443
+ const base = path.basename(first).toLowerCase();
444
+ if (base === "bun" || base === "bun.exe") return "bun";
445
+ if (base === "node" || base === "node.exe") return "node";
446
+ }
447
+ return DEFAULT_GATEWAY_DAEMON_RUNTIME;
448
+ }
449
+ function findGatewayEntrypoint(programArguments) {
450
+ if (!programArguments || programArguments.length === 0) return null;
451
+ const gatewayIndex = programArguments.indexOf("gateway");
452
+ if (gatewayIndex <= 0) return null;
453
+ return programArguments[gatewayIndex - 1] ?? null;
454
+ }
455
+ function normalizeExecutablePath(value) {
456
+ return path.resolve(value);
457
+ }
458
+ function resolveGatewayAuthToken(cfg, env) {
459
+ const configToken = cfg.gateway?.auth?.token?.trim();
460
+ if (configToken) return configToken;
461
+ return (env.REMOTECLAW_GATEWAY_TOKEN ?? env.CLAWDBOT_GATEWAY_TOKEN)?.trim() || void 0;
462
+ }
463
+ function extractDetailPath(detail, prefix) {
464
+ if (!detail.startsWith(prefix)) return null;
465
+ const value = detail.slice(prefix.length).trim();
466
+ return value.length > 0 ? value : null;
467
+ }
468
+ async function cleanupLegacyLaunchdService(params) {
469
+ await execFileAsync$1("launchctl", [
470
+ "bootout",
471
+ typeof process.getuid === "function" ? `gui/${process.getuid()}` : "gui/501",
472
+ params.plistPath
473
+ ]).catch(() => void 0);
474
+ await execFileAsync$1("launchctl", ["unload", params.plistPath]).catch(() => void 0);
475
+ const trashDir = path.join(os.homedir(), ".Trash");
476
+ try {
477
+ await fsp.mkdir(trashDir, { recursive: true });
478
+ } catch {}
479
+ try {
480
+ await fsp.access(params.plistPath);
481
+ } catch {
482
+ return null;
483
+ }
484
+ const dest = path.join(trashDir, `${params.label}-${Date.now()}.plist`);
485
+ try {
486
+ await fsp.rename(params.plistPath, dest);
487
+ return dest;
488
+ } catch {
489
+ return null;
490
+ }
491
+ }
492
+ function classifyLegacyServices(legacyServices) {
493
+ const darwinUserServices = [];
494
+ const linuxUserServices = [];
495
+ const failed = [];
496
+ for (const svc of legacyServices) {
497
+ if (svc.platform === "darwin") {
498
+ if (svc.scope === "user") darwinUserServices.push(svc);
499
+ else failed.push(`${svc.label} (${svc.scope})`);
500
+ continue;
501
+ }
502
+ if (svc.platform === "linux") {
503
+ if (svc.scope === "user") linuxUserServices.push(svc);
504
+ else failed.push(`${svc.label} (${svc.scope})`);
505
+ continue;
506
+ }
507
+ failed.push(`${svc.label} (${svc.platform})`);
508
+ }
509
+ return {
510
+ darwinUserServices,
511
+ linuxUserServices,
512
+ failed
513
+ };
514
+ }
515
+ async function cleanupLegacyDarwinServices(services) {
516
+ const removed = [];
517
+ const failed = [];
518
+ for (const svc of services) {
519
+ const plistPath = extractDetailPath(svc.detail, "plist:");
520
+ if (!plistPath) {
521
+ failed.push(`${svc.label} (missing plist path)`);
522
+ continue;
523
+ }
524
+ const dest = await cleanupLegacyLaunchdService({
525
+ label: svc.label,
526
+ plistPath
527
+ });
528
+ removed.push(dest ? `${svc.label} -> ${dest}` : svc.label);
529
+ }
530
+ return {
531
+ removed,
532
+ failed
533
+ };
534
+ }
535
+ async function cleanupLegacyLinuxUserServices(services, runtime) {
536
+ const removed = [];
537
+ const failed = [];
538
+ try {
539
+ const removedUnits = await uninstallLegacySystemdUnits({
540
+ env: process.env,
541
+ stdout: process.stdout
542
+ });
543
+ const removedByLabel = new Map(removedUnits.map((unit) => [`${unit.name}.service`, unit]));
544
+ for (const svc of services) {
545
+ const removedUnit = removedByLabel.get(svc.label);
546
+ if (!removedUnit) {
547
+ failed.push(`${svc.label} (legacy unit name not recognized)`);
548
+ continue;
549
+ }
550
+ removed.push(`${svc.label} -> ${removedUnit.unitPath}`);
551
+ }
552
+ } catch (err) {
553
+ runtime.error(`Legacy Linux gateway cleanup failed: ${String(err)}`);
554
+ for (const svc of services) failed.push(`${svc.label} (linux cleanup failed)`);
555
+ }
556
+ return {
557
+ removed,
558
+ failed
559
+ };
560
+ }
561
+ async function maybeRepairGatewayServiceConfig(cfg, mode, runtime, prompter) {
562
+ if (resolveIsNixMode(process.env)) {
563
+ note$1("Nix mode detected; skip service updates.", "Gateway");
564
+ return;
565
+ }
566
+ if (mode === "remote") {
567
+ note$1("Gateway mode is remote; skipped local service audit.", "Gateway");
568
+ return;
569
+ }
570
+ const service = resolveGatewayService();
571
+ let command = null;
572
+ try {
573
+ command = await service.readCommand(process.env);
574
+ } catch {
575
+ command = null;
576
+ }
577
+ if (!command) return;
578
+ const expectedGatewayToken = resolveGatewayAuthToken(cfg, process.env);
579
+ const audit = await auditGatewayServiceConfig({
580
+ env: process.env,
581
+ command,
582
+ expectedGatewayToken
583
+ });
584
+ const needsNodeRuntime = needsNodeRuntimeMigration(audit.issues);
585
+ const systemNodeInfo = needsNodeRuntime ? await resolveSystemNodeInfo({ env: process.env }) : null;
586
+ const systemNodePath = systemNodeInfo?.supported ? systemNodeInfo.path : null;
587
+ if (needsNodeRuntime && !systemNodePath) {
588
+ const warning = renderSystemNodeWarning(systemNodeInfo);
589
+ if (warning) note$1(warning, "Gateway runtime");
590
+ note$1("System Node 22+ not found. Install via Homebrew/apt/choco and rerun doctor to migrate off Bun/version managers.", "Gateway runtime");
591
+ }
592
+ const port = resolveGatewayPort(cfg, process.env);
593
+ const runtimeChoice = detectGatewayRuntime(command.programArguments);
594
+ const { programArguments, workingDirectory, environment } = await buildGatewayInstallPlan({
595
+ env: process.env,
596
+ port,
597
+ token: expectedGatewayToken,
598
+ runtime: needsNodeRuntime && systemNodePath ? "node" : runtimeChoice,
599
+ nodePath: systemNodePath ?? void 0,
600
+ warn: (message, title) => note$1(message, title),
601
+ config: cfg
602
+ });
603
+ const expectedEntrypoint = findGatewayEntrypoint(programArguments);
604
+ const currentEntrypoint = findGatewayEntrypoint(command.programArguments);
605
+ if (expectedEntrypoint && currentEntrypoint && normalizeExecutablePath(expectedEntrypoint) !== normalizeExecutablePath(currentEntrypoint)) audit.issues.push({
606
+ code: SERVICE_AUDIT_CODES.gatewayEntrypointMismatch,
607
+ message: "Gateway service entrypoint does not match the current install.",
608
+ detail: `${currentEntrypoint} -> ${expectedEntrypoint}`,
609
+ level: "recommended"
610
+ });
611
+ if (audit.issues.length === 0) return;
612
+ note$1(audit.issues.map((issue) => issue.detail ? `- ${issue.message} (${issue.detail})` : `- ${issue.message}`).join("\n"), "Gateway service config");
613
+ const needsAggressive = audit.issues.filter((issue) => issue.level === "aggressive").length > 0;
614
+ if (needsAggressive && !prompter.shouldForce) note$1("Custom or unexpected service edits detected. Rerun with --force to overwrite.", "Gateway service config");
615
+ if (!(needsAggressive ? await prompter.confirmAggressive({
616
+ message: "Overwrite gateway service config with current defaults now?",
617
+ initialValue: Boolean(prompter.shouldForce)
618
+ }) : await prompter.confirmRepair({
619
+ message: "Update gateway service config to the recommended defaults now?",
620
+ initialValue: true
621
+ }))) return;
622
+ try {
623
+ await service.install({
624
+ env: process.env,
625
+ stdout: process.stdout,
626
+ programArguments,
627
+ workingDirectory,
628
+ environment
629
+ });
630
+ } catch (err) {
631
+ runtime.error(`Gateway service update failed: ${String(err)}`);
632
+ }
633
+ }
634
+ async function maybeScanExtraGatewayServices(options, runtime, prompter) {
635
+ const extraServices = await findExtraGatewayServices(process.env, { deep: options.deep });
636
+ if (extraServices.length === 0) return;
637
+ note$1(extraServices.map((svc) => `- ${svc.label} (${svc.scope}, ${svc.detail})`).join("\n"), "Other gateway-like services detected");
638
+ const legacyServices = extraServices.filter((svc) => svc.legacy === true);
639
+ if (legacyServices.length > 0) {
640
+ if (await prompter.confirmSkipInNonInteractive({
641
+ message: "Remove legacy gateway services (clawdbot/moltbot) now?",
642
+ initialValue: true
643
+ })) {
644
+ const removed = [];
645
+ const { darwinUserServices, linuxUserServices, failed } = classifyLegacyServices(legacyServices);
646
+ if (darwinUserServices.length > 0) {
647
+ const result = await cleanupLegacyDarwinServices(darwinUserServices);
648
+ removed.push(...result.removed);
649
+ failed.push(...result.failed);
650
+ }
651
+ if (linuxUserServices.length > 0) {
652
+ const result = await cleanupLegacyLinuxUserServices(linuxUserServices, runtime);
653
+ removed.push(...result.removed);
654
+ failed.push(...result.failed);
655
+ }
656
+ if (removed.length > 0) note$1(removed.map((line) => `- ${line}`).join("\n"), "Legacy gateway removed");
657
+ if (failed.length > 0) note$1(failed.map((line) => `- ${line}`).join("\n"), "Legacy gateway cleanup skipped");
658
+ if (removed.length > 0) runtime.log("Legacy gateway services removed. Installing RemoteClaw gateway next.");
659
+ }
660
+ }
661
+ const cleanupHints = renderGatewayServiceCleanupHints();
662
+ if (cleanupHints.length > 0) note$1(cleanupHints.map((hint) => `- ${hint}`).join("\n"), "Cleanup hints");
663
+ note$1([
664
+ "Recommendation: run a single gateway per machine for most setups.",
665
+ "One gateway supports multiple agents.",
666
+ "If you need multiple gateways (e.g., a rescue bot on the same host), isolate ports + config/state (see docs: /gateway#multiple-gateways-same-host)."
667
+ ].join("\n"), "Gateway recommendation");
668
+ }
669
+
670
+ //#endregion
671
+ //#region src/commands/doctor-install.ts
672
+ function noteSourceInstallIssues(root) {
673
+ if (!root) return;
674
+ const workspaceMarker = path.join(root, "pnpm-workspace.yaml");
675
+ if (!fs.existsSync(workspaceMarker)) return;
676
+ const warnings = [];
677
+ const nodeModules = path.join(root, "node_modules");
678
+ const pnpmStore = path.join(nodeModules, ".pnpm");
679
+ const tsxBin = path.join(nodeModules, ".bin", "tsx");
680
+ const srcEntry = path.join(root, "src", "entry.ts");
681
+ if (fs.existsSync(nodeModules) && !fs.existsSync(pnpmStore)) warnings.push("- node_modules was not installed by pnpm (missing node_modules/.pnpm). Run: pnpm install");
682
+ if (fs.existsSync(path.join(root, "package-lock.json"))) warnings.push("- package-lock.json present in a pnpm workspace. If you ran npm install, remove it and reinstall with pnpm.");
683
+ if (fs.existsSync(srcEntry) && !fs.existsSync(tsxBin)) warnings.push("- tsx binary is missing for source runs. Run: pnpm install");
684
+ if (warnings.length > 0) note$1(warnings.join("\n"), "Install");
685
+ }
686
+
687
+ //#endregion
688
+ //#region src/commands/doctor-platform-notes.ts
689
+ const execFileAsync = promisify(execFile);
690
+ function resolveHomeDir() {
691
+ return process.env.HOME ?? os.homedir();
692
+ }
693
+ async function noteMacLaunchAgentOverrides() {
694
+ if (process.platform !== "darwin") return;
695
+ const home = resolveHomeDir();
696
+ const markerPath = [path.join(home, ".remoteclaw", "disable-launchagent")].find((candidate) => fs.existsSync(candidate));
697
+ if (!markerPath) return;
698
+ const displayMarkerPath = shortenHomePath(markerPath);
699
+ note$1([
700
+ `- LaunchAgent writes are disabled via ${displayMarkerPath}.`,
701
+ "- To restore default behavior:",
702
+ ` rm ${displayMarkerPath}`
703
+ ].filter((line) => Boolean(line)).join("\n"), "Gateway (macOS)");
704
+ }
705
+ async function launchctlGetenv(name) {
706
+ try {
707
+ const result = await execFileAsync("/bin/launchctl", ["getenv", name], { encoding: "utf8" });
708
+ const value = String(result.stdout ?? "").trim();
709
+ return value.length > 0 ? value : void 0;
710
+ } catch {
711
+ return;
712
+ }
713
+ }
714
+ function hasConfigGatewayCreds(cfg) {
715
+ const localToken = typeof cfg.gateway?.auth?.token === "string" ? cfg.gateway?.auth?.token.trim() : "";
716
+ const localPassword = typeof cfg.gateway?.auth?.password === "string" ? cfg.gateway?.auth?.password.trim() : "";
717
+ const remoteToken = typeof cfg.gateway?.remote?.token === "string" ? cfg.gateway?.remote?.token.trim() : "";
718
+ const remotePassword = typeof cfg.gateway?.remote?.password === "string" ? cfg.gateway?.remote?.password.trim() : "";
719
+ return Boolean(localToken || localPassword || remoteToken || remotePassword);
720
+ }
721
+ async function noteMacLaunchctlGatewayEnvOverrides(cfg, deps) {
722
+ if ((deps?.platform ?? process.platform) !== "darwin") return;
723
+ if (!hasConfigGatewayCreds(cfg)) return;
724
+ const getenv = deps?.getenv ?? launchctlGetenv;
725
+ const deprecatedLaunchctlEntries = [["CLAWDBOT_GATEWAY_TOKEN", await getenv("CLAWDBOT_GATEWAY_TOKEN")], ["CLAWDBOT_GATEWAY_PASSWORD", await getenv("CLAWDBOT_GATEWAY_PASSWORD")]].filter((entry) => Boolean(entry[1]?.trim()));
726
+ if (deprecatedLaunchctlEntries.length > 0) {
727
+ const lines = ["- Deprecated launchctl environment variables detected (ignored).", ...deprecatedLaunchctlEntries.map(([key]) => `- \`${key}\` is set; use \`REMOTECLAW_${key.slice(key.indexOf("_") + 1)}\` instead.`)];
728
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Gateway (macOS)");
729
+ }
730
+ const tokenEntries = [["REMOTECLAW_GATEWAY_TOKEN", await getenv("REMOTECLAW_GATEWAY_TOKEN")]];
731
+ const passwordEntries = [["REMOTECLAW_GATEWAY_PASSWORD", await getenv("REMOTECLAW_GATEWAY_PASSWORD")]];
732
+ const tokenEntry = tokenEntries.find(([, value]) => value?.trim());
733
+ const passwordEntry = passwordEntries.find(([, value]) => value?.trim());
734
+ const envToken = tokenEntry?.[1]?.trim() ?? "";
735
+ const envPassword = passwordEntry?.[1]?.trim() ?? "";
736
+ const envTokenKey = tokenEntry?.[0];
737
+ const envPasswordKey = passwordEntry?.[0];
738
+ if (!envToken && !envPassword) return;
739
+ const lines = [
740
+ "- launchctl environment overrides detected (can cause confusing unauthorized errors).",
741
+ envToken && envTokenKey ? `- \`${envTokenKey}\` is set; it overrides config tokens.` : void 0,
742
+ envPassword ? `- \`${envPasswordKey ?? "REMOTECLAW_GATEWAY_PASSWORD"}\` is set; it overrides config passwords.` : void 0,
743
+ "- Clear overrides and restart the app/gateway:",
744
+ envTokenKey ? ` launchctl unsetenv ${envTokenKey}` : void 0,
745
+ envPasswordKey ? ` launchctl unsetenv ${envPasswordKey}` : void 0
746
+ ].filter((line) => Boolean(line));
747
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Gateway (macOS)");
748
+ }
749
+ function noteDeprecatedLegacyEnvVars(env = process.env, deps) {
750
+ const entries = Object.entries(env).filter(([key, value]) => key.startsWith("CLAWDBOT_") && value?.trim()).map(([key]) => key);
751
+ if (entries.length === 0) return;
752
+ const lines = [
753
+ "- Deprecated legacy environment variables detected (ignored).",
754
+ "- Use REMOTECLAW_* equivalents instead:",
755
+ ...entries.map((key) => {
756
+ return ` ${key} -> REMOTECLAW_${key.slice(key.indexOf("_") + 1)}`;
757
+ })
758
+ ];
759
+ (deps?.noteFn ?? note$1)(lines.join("\n"), "Environment");
760
+ }
761
+
762
+ //#endregion
763
+ //#region src/commands/doctor-prompter.ts
764
+ function createDoctorPrompter(params) {
765
+ const yes = params.options.yes === true;
766
+ const requestedNonInteractive = params.options.nonInteractive === true;
767
+ const shouldRepair = params.options.repair === true || yes;
768
+ const shouldForce = params.options.force === true;
769
+ const isTty = Boolean(process.stdin.isTTY);
770
+ const nonInteractive = requestedNonInteractive || !isTty && !yes;
771
+ const canPrompt = isTty && !yes && !nonInteractive;
772
+ const confirmDefault = async (p) => {
773
+ if (nonInteractive) return false;
774
+ if (shouldRepair) return true;
775
+ if (!canPrompt) return Boolean(p.initialValue ?? false);
776
+ return guardCancel(await confirm({
777
+ ...p,
778
+ message: stylePromptMessage(p.message)
779
+ }), params.runtime);
780
+ };
781
+ return {
782
+ confirm: confirmDefault,
783
+ confirmRepair: async (p) => {
784
+ if (nonInteractive) return false;
785
+ return confirmDefault(p);
786
+ },
787
+ confirmAggressive: async (p) => {
788
+ if (nonInteractive) return false;
789
+ if (shouldRepair && shouldForce) return true;
790
+ if (shouldRepair && !shouldForce) return false;
791
+ if (!canPrompt) return Boolean(p.initialValue ?? false);
792
+ return guardCancel(await confirm({
793
+ ...p,
794
+ message: stylePromptMessage(p.message)
795
+ }), params.runtime);
796
+ },
797
+ confirmSkipInNonInteractive: async (p) => {
798
+ if (nonInteractive) return false;
799
+ if (shouldRepair) return true;
800
+ return confirmDefault(p);
801
+ },
802
+ select: async (p, fallback) => {
803
+ if (!canPrompt || shouldRepair) return fallback;
804
+ return guardCancel(await select({
805
+ ...p,
806
+ message: stylePromptMessage(p.message),
807
+ options: p.options.map((opt) => opt.hint === void 0 ? opt : {
808
+ ...opt,
809
+ hint: stylePromptHint(opt.hint)
810
+ })
811
+ }), params.runtime);
812
+ },
813
+ shouldRepair,
814
+ shouldForce
815
+ };
816
+ }
817
+
818
+ //#endregion
819
+ //#region src/commands/doctor-security.ts
820
+ async function noteSecurityWarnings(cfg) {
821
+ const warnings = [];
822
+ const auditHint = `- Run: ${formatCliCommand("remoteclaw security audit --deep")}`;
823
+ const gatewayBind = cfg.gateway?.bind ?? "loopback";
824
+ const customBindHost = cfg.gateway?.customBindHost?.trim();
825
+ const bindMode = [
826
+ "auto",
827
+ "lan",
828
+ "loopback",
829
+ "custom",
830
+ "tailnet"
831
+ ].includes(gatewayBind) ? gatewayBind : void 0;
832
+ const resolvedBindHost = bindMode ? await resolveGatewayBindHost(bindMode, customBindHost) : "0.0.0.0";
833
+ const isExposed = !isLoopbackHost(resolvedBindHost);
834
+ const resolvedAuth = resolveGatewayAuth({
835
+ authConfig: cfg.gateway?.auth,
836
+ env: process.env,
837
+ tailscaleMode: cfg.gateway?.tailscale?.mode ?? "off"
838
+ });
839
+ const authToken = resolvedAuth.token?.trim() ?? "";
840
+ const authPassword = resolvedAuth.password?.trim() ?? "";
841
+ const hasToken = authToken.length > 0;
842
+ const hasPassword = authPassword.length > 0;
843
+ const hasSharedSecret = resolvedAuth.mode === "token" && hasToken || resolvedAuth.mode === "password" && hasPassword;
844
+ const bindDescriptor = `"${gatewayBind}" (${resolvedBindHost})`;
845
+ const saferRemoteAccessLines = [
846
+ " Safer remote access: keep bind loopback and use Tailscale Serve/Funnel or an SSH tunnel.",
847
+ " Example tunnel: ssh -N -L 18789:127.0.0.1:18789 user@gateway-host",
848
+ " Docs: https://docs.remoteclaw.org/gateway/remote"
849
+ ];
850
+ if (isExposed) if (!hasSharedSecret) {
851
+ const authFixLines = resolvedAuth.mode === "password" ? [` Fix: ${formatCliCommand("remoteclaw configure")} to set a password`, ` Or switch to token: ${formatCliCommand("remoteclaw config set gateway.auth.mode token")}`] : [` Fix: ${formatCliCommand("remoteclaw doctor --fix")} to generate a token`, ` Or set token directly: ${formatCliCommand("remoteclaw config set gateway.auth.mode token")}`];
852
+ warnings.push(`- CRITICAL: Gateway bound to ${bindDescriptor} without authentication.`, ` Anyone on your network (or internet if port-forwarded) can fully control your agent.`, ` Fix: ${formatCliCommand("remoteclaw config set gateway.bind loopback")}`, ...saferRemoteAccessLines, ...authFixLines);
853
+ } else warnings.push(`- WARNING: Gateway bound to ${bindDescriptor} (network-accessible).`, ` Ensure your auth credentials are strong and not exposed.`, ...saferRemoteAccessLines);
854
+ const warnDmPolicy = async (params) => {
855
+ const dmPolicy = params.dmPolicy;
856
+ const policyPath = params.policyPath ?? `${params.allowFromPath}policy`;
857
+ const { hasWildcard, allowCount, isMultiUserDm } = await resolveDmAllowState({
858
+ provider: params.provider,
859
+ allowFrom: params.allowFrom,
860
+ normalizeEntry: params.normalizeEntry
861
+ });
862
+ const dmScope = cfg.session?.dmScope ?? "main";
863
+ if (dmPolicy === "open") {
864
+ const allowFromPath = `${params.allowFromPath}allowFrom`;
865
+ warnings.push(`- ${params.label} DMs: OPEN (${policyPath}="open"). Anyone can DM it.`);
866
+ if (!hasWildcard) warnings.push(`- ${params.label} DMs: config invalid — "open" requires ${allowFromPath} to include "*".`);
867
+ }
868
+ if (dmPolicy === "disabled") {
869
+ warnings.push(`- ${params.label} DMs: disabled (${policyPath}="disabled").`);
870
+ return;
871
+ }
872
+ if (dmPolicy !== "open" && allowCount === 0) {
873
+ warnings.push(`- ${params.label} DMs: locked (${policyPath}="${dmPolicy}") with no allowlist; unknown senders will be blocked / get a pairing code.`);
874
+ warnings.push(` ${params.approveHint}`);
875
+ }
876
+ if (dmScope === "main" && isMultiUserDm) warnings.push(`- ${params.label} DMs: multiple senders share the main session; run: ` + formatCliCommand("remoteclaw config set session.dmScope \"per-channel-peer\"") + " (or \"per-account-channel-peer\" for multi-account channels) to isolate sessions.");
877
+ };
878
+ for (const plugin of listChannelPlugins()) {
879
+ if (!plugin.security) continue;
880
+ const { defaultAccountId, account, enabled, configured } = await resolveDefaultChannelAccountContext(plugin, cfg);
881
+ if (!enabled) continue;
882
+ if (!configured) continue;
883
+ const dmPolicy = plugin.security.resolveDmPolicy?.({
884
+ cfg,
885
+ accountId: defaultAccountId,
886
+ account
887
+ });
888
+ if (dmPolicy) await warnDmPolicy({
889
+ label: plugin.meta.label ?? plugin.id,
890
+ provider: plugin.id,
891
+ dmPolicy: dmPolicy.policy,
892
+ allowFrom: dmPolicy.allowFrom,
893
+ policyPath: dmPolicy.policyPath,
894
+ allowFromPath: dmPolicy.allowFromPath,
895
+ approveHint: dmPolicy.approveHint,
896
+ normalizeEntry: dmPolicy.normalizeEntry
897
+ });
898
+ if (plugin.security.collectWarnings) {
899
+ const extra = await plugin.security.collectWarnings({
900
+ cfg,
901
+ accountId: defaultAccountId,
902
+ account
903
+ });
904
+ if (extra?.length) warnings.push(...extra);
905
+ }
906
+ }
907
+ const lines = warnings.length > 0 ? warnings : ["- No channel security warnings detected."];
908
+ lines.push(auditHint);
909
+ note$1(lines.join("\n"), "Security");
910
+ }
911
+
912
+ //#endregion
913
+ //#region src/commands/doctor-session-locks.ts
914
+ const DEFAULT_STALE_MS = 1800 * 1e3;
915
+ function formatAge(ageMs) {
916
+ if (ageMs === null) return "unknown";
917
+ const seconds = Math.floor(ageMs / 1e3);
918
+ if (seconds < 60) return `${seconds}s`;
919
+ const minutes = Math.floor(seconds / 60);
920
+ const remainingSeconds = seconds % 60;
921
+ if (minutes < 60) return `${minutes}m${remainingSeconds}s`;
922
+ return `${Math.floor(minutes / 60)}h${minutes % 60}m`;
923
+ }
924
+ function formatLockLine(lock) {
925
+ const pidStatus = lock.pid === null ? "pid=missing" : `pid=${lock.pid} (${lock.pidAlive ? "alive" : "dead"})`;
926
+ const ageStatus = `age=${formatAge(lock.ageMs)}`;
927
+ const staleStatus = lock.stale ? `stale=yes (${lock.staleReasons.join(", ") || "unknown"})` : "stale=no";
928
+ const removedStatus = lock.removed ? " [removed]" : "";
929
+ return `- ${shortenHomePath(lock.lockPath)} ${pidStatus} ${ageStatus} ${staleStatus}${removedStatus}`;
930
+ }
931
+ async function noteSessionLockHealth(params) {
932
+ const shouldRepair = params?.shouldRepair === true;
933
+ const staleMs = params?.staleMs ?? DEFAULT_STALE_MS;
934
+ let sessionDirs = [];
935
+ try {
936
+ sessionDirs = await resolveAgentSessionDirs(resolveStateDir(process.env));
937
+ } catch (err) {
938
+ note$1(`- Failed to inspect session lock files: ${String(err)}`, "Session locks");
939
+ return;
940
+ }
941
+ if (sessionDirs.length === 0) return;
942
+ const allLocks = [];
943
+ for (const sessionsDir of sessionDirs) {
944
+ const result = await cleanStaleLockFiles({
945
+ sessionsDir,
946
+ staleMs,
947
+ removeStale: shouldRepair
948
+ });
949
+ allLocks.push(...result.locks);
950
+ }
951
+ if (allLocks.length === 0) return;
952
+ const staleCount = allLocks.filter((lock) => lock.stale).length;
953
+ const removedCount = allLocks.filter((lock) => lock.removed).length;
954
+ const lines = [`- Found ${allLocks.length} session lock file${allLocks.length === 1 ? "" : "s"}.`, ...allLocks.toSorted((a, b) => a.lockPath.localeCompare(b.lockPath)).map(formatLockLine)];
955
+ if (staleCount > 0 && !shouldRepair) {
956
+ lines.push(`- ${staleCount} lock file${staleCount === 1 ? " is" : "s are"} stale.`);
957
+ lines.push("- Run \"remoteclaw doctor --fix\" to remove stale lock files automatically.");
958
+ }
959
+ if (shouldRepair && removedCount > 0) lines.push(`- Removed ${removedCount} stale session lock file${removedCount === 1 ? "" : "s"}.`);
960
+ note$1(lines.join("\n"), "Session locks");
961
+ }
962
+
963
+ //#endregion
964
+ //#region src/commands/doctor-state-integrity.ts
965
+ function existsDir(dir) {
966
+ try {
967
+ return fs.existsSync(dir) && fs.statSync(dir).isDirectory();
968
+ } catch {
969
+ return false;
970
+ }
971
+ }
972
+ function existsFile(filePath) {
973
+ try {
974
+ return fs.existsSync(filePath) && fs.statSync(filePath).isFile();
975
+ } catch {
976
+ return false;
977
+ }
978
+ }
979
+ function canWriteDir(dir) {
980
+ try {
981
+ fs.accessSync(dir, fs.constants.W_OK);
982
+ return true;
983
+ } catch {
984
+ return false;
985
+ }
986
+ }
987
+ function ensureDir(dir) {
988
+ try {
989
+ fs.mkdirSync(dir, { recursive: true });
990
+ return { ok: true };
991
+ } catch (err) {
992
+ return {
993
+ ok: false,
994
+ error: String(err)
995
+ };
996
+ }
997
+ }
998
+ function dirPermissionHint(dir) {
999
+ const uid = typeof process.getuid === "function" ? process.getuid() : null;
1000
+ const gid = typeof process.getgid === "function" ? process.getgid() : null;
1001
+ try {
1002
+ const stat = fs.statSync(dir);
1003
+ if (uid !== null && stat.uid !== uid) return `Owner mismatch (uid ${stat.uid}). Run: sudo chown -R $USER "${dir}"`;
1004
+ if (gid !== null && stat.gid !== gid) return `Group mismatch (gid ${stat.gid}). If access fails, run: sudo chown -R $USER "${dir}"`;
1005
+ } catch {
1006
+ return null;
1007
+ }
1008
+ return null;
1009
+ }
1010
+ function addUserRwx(mode) {
1011
+ return mode & 511 | 448;
1012
+ }
1013
+ function countJsonlLines(filePath) {
1014
+ try {
1015
+ const raw = fs.readFileSync(filePath, "utf-8");
1016
+ if (!raw) return 0;
1017
+ let count = 0;
1018
+ for (let i = 0; i < raw.length; i += 1) if (raw[i] === "\n") count += 1;
1019
+ if (!raw.endsWith("\n")) count += 1;
1020
+ return count;
1021
+ } catch {
1022
+ return 0;
1023
+ }
1024
+ }
1025
+ function findOtherStateDirs(stateDir) {
1026
+ const resolvedState = path.resolve(stateDir);
1027
+ const roots = process.platform === "darwin" ? ["/Users"] : process.platform === "linux" ? ["/home"] : [];
1028
+ const found = [];
1029
+ for (const root of roots) {
1030
+ let entries = [];
1031
+ try {
1032
+ entries = fs.readdirSync(root, { withFileTypes: true });
1033
+ } catch {
1034
+ continue;
1035
+ }
1036
+ for (const entry of entries) {
1037
+ if (!entry.isDirectory()) continue;
1038
+ if (entry.name.startsWith(".")) continue;
1039
+ const candidates = [".remoteclaw"].map((dir) => path.resolve(root, entry.name, dir));
1040
+ for (const candidate of candidates) {
1041
+ if (candidate === resolvedState) continue;
1042
+ if (existsDir(candidate)) found.push(candidate);
1043
+ }
1044
+ }
1045
+ }
1046
+ return found;
1047
+ }
1048
+ function isRecord(value) {
1049
+ return typeof value === "object" && value !== null;
1050
+ }
1051
+ function isPairingPolicy(value) {
1052
+ return typeof value === "string" && value.trim().toLowerCase() === "pairing";
1053
+ }
1054
+ function hasPairingPolicy(value) {
1055
+ if (!isRecord(value)) return false;
1056
+ if (isPairingPolicy(value.dmPolicy)) return true;
1057
+ if (isRecord(value.dm) && isPairingPolicy(value.dm.policy)) return true;
1058
+ if (!isRecord(value.accounts)) return false;
1059
+ for (const accountCfg of Object.values(value.accounts)) if (hasPairingPolicy(accountCfg)) return true;
1060
+ return false;
1061
+ }
1062
+ function shouldRequireOAuthDir(cfg, env) {
1063
+ if (env.REMOTECLAW_OAUTH_DIR?.trim()) return true;
1064
+ const channels = cfg.channels;
1065
+ if (!isRecord(channels)) return false;
1066
+ if (isRecord(channels.whatsapp)) return true;
1067
+ for (const [channelId, channelCfg] of Object.entries(channels)) {
1068
+ if (channelId === "defaults" || channelId === "modelByChannel") continue;
1069
+ if (hasPairingPolicy(channelCfg)) return true;
1070
+ }
1071
+ return false;
1072
+ }
1073
+ async function noteStateIntegrity(cfg, prompter, configPath) {
1074
+ const warnings = [];
1075
+ const changes = [];
1076
+ const env = process.env;
1077
+ const homedir = () => resolveRequiredHomeDir(env, os.homedir);
1078
+ const stateDir = resolveStateDir(env, homedir);
1079
+ const defaultStateDir = path.join(homedir(), ".remoteclaw");
1080
+ const oauthDir = resolveOAuthDir(env, stateDir);
1081
+ const agentId = resolveDefaultAgentId(cfg);
1082
+ const sessionsDir = resolveSessionTranscriptsDirForAgent(agentId, env, homedir);
1083
+ const storePath = resolveStorePath(cfg.session?.store, { agentId });
1084
+ const storeDir = path.dirname(storePath);
1085
+ const absoluteStorePath = path.resolve(storePath);
1086
+ const displayStateDir = shortenHomePath(stateDir);
1087
+ const displayOauthDir = shortenHomePath(oauthDir);
1088
+ const displaySessionsDir = shortenHomePath(sessionsDir);
1089
+ const displayStoreDir = shortenHomePath(storeDir);
1090
+ const displayConfigPath = configPath ? shortenHomePath(configPath) : void 0;
1091
+ const requireOAuthDir = shouldRequireOAuthDir(cfg, env);
1092
+ let stateDirExists = existsDir(stateDir);
1093
+ if (!stateDirExists) {
1094
+ warnings.push(`- CRITICAL: state directory missing (${displayStateDir}). Sessions, credentials, logs, and config are stored there.`);
1095
+ if (cfg.gateway?.mode === "remote") warnings.push("- Gateway is in remote mode; run doctor on the remote host where the gateway runs.");
1096
+ if (await prompter.confirmSkipInNonInteractive({
1097
+ message: `Create ${displayStateDir} now?`,
1098
+ initialValue: false
1099
+ })) {
1100
+ const created = ensureDir(stateDir);
1101
+ if (created.ok) {
1102
+ changes.push(`- Created ${displayStateDir}`);
1103
+ stateDirExists = true;
1104
+ } else warnings.push(`- Failed to create ${displayStateDir}: ${created.error}`);
1105
+ }
1106
+ }
1107
+ if (stateDirExists && !canWriteDir(stateDir)) {
1108
+ warnings.push(`- State directory not writable (${displayStateDir}).`);
1109
+ const hint = dirPermissionHint(stateDir);
1110
+ if (hint) warnings.push(` ${hint}`);
1111
+ if (await prompter.confirmSkipInNonInteractive({
1112
+ message: `Repair permissions on ${displayStateDir}?`,
1113
+ initialValue: true
1114
+ })) try {
1115
+ const target = addUserRwx(fs.statSync(stateDir).mode);
1116
+ fs.chmodSync(stateDir, target);
1117
+ changes.push(`- Repaired permissions on ${displayStateDir}`);
1118
+ } catch (err) {
1119
+ warnings.push(`- Failed to repair ${displayStateDir}: ${String(err)}`);
1120
+ }
1121
+ }
1122
+ if (stateDirExists && process.platform !== "win32") try {
1123
+ const dirLstat = fs.lstatSync(stateDir);
1124
+ const isDirSymlink = dirLstat.isSymbolicLink();
1125
+ const stat = isDirSymlink ? fs.statSync(stateDir) : dirLstat;
1126
+ if (!(isDirSymlink ? fs.realpathSync(stateDir) : stateDir).startsWith("/nix/store/") && (stat.mode & 63) !== 0) {
1127
+ warnings.push(`- State directory permissions are too open (${displayStateDir}). Recommend chmod 700.`);
1128
+ if (await prompter.confirmSkipInNonInteractive({
1129
+ message: `Tighten permissions on ${displayStateDir} to 700?`,
1130
+ initialValue: true
1131
+ })) {
1132
+ fs.chmodSync(stateDir, 448);
1133
+ changes.push(`- Tightened permissions on ${displayStateDir} to 700`);
1134
+ }
1135
+ }
1136
+ } catch (err) {
1137
+ warnings.push(`- Failed to read ${displayStateDir} permissions: ${String(err)}`);
1138
+ }
1139
+ if (configPath && existsFile(configPath) && process.platform !== "win32") try {
1140
+ const configLstat = fs.lstatSync(configPath);
1141
+ const isSymlink = configLstat.isSymbolicLink();
1142
+ const stat = isSymlink ? fs.statSync(configPath) : configLstat;
1143
+ if (!(isSymlink ? fs.realpathSync(configPath) : configPath).startsWith("/nix/store/") && (stat.mode & 63) !== 0) {
1144
+ warnings.push(`- Config file is group/world readable (${displayConfigPath ?? configPath}). Recommend chmod 600.`);
1145
+ if (await prompter.confirmSkipInNonInteractive({
1146
+ message: `Tighten permissions on ${displayConfigPath ?? configPath} to 600?`,
1147
+ initialValue: true
1148
+ })) {
1149
+ fs.chmodSync(configPath, 384);
1150
+ changes.push(`- Tightened permissions on ${displayConfigPath ?? configPath} to 600`);
1151
+ }
1152
+ }
1153
+ } catch (err) {
1154
+ warnings.push(`- Failed to read config permissions (${displayConfigPath ?? configPath}): ${String(err)}`);
1155
+ }
1156
+ if (stateDirExists) {
1157
+ const dirCandidates = /* @__PURE__ */ new Map();
1158
+ dirCandidates.set(sessionsDir, "Sessions dir");
1159
+ dirCandidates.set(storeDir, "Session store dir");
1160
+ if (requireOAuthDir) dirCandidates.set(oauthDir, "OAuth dir");
1161
+ else if (!existsDir(oauthDir)) warnings.push(`- OAuth dir not present (${displayOauthDir}). Skipping create because no WhatsApp/pairing channel config is active.`);
1162
+ const displayDirFor = (dir) => {
1163
+ if (dir === sessionsDir) return displaySessionsDir;
1164
+ if (dir === storeDir) return displayStoreDir;
1165
+ if (dir === oauthDir) return displayOauthDir;
1166
+ return shortenHomePath(dir);
1167
+ };
1168
+ for (const [dir, label] of dirCandidates) {
1169
+ const displayDir = displayDirFor(dir);
1170
+ if (!existsDir(dir)) {
1171
+ warnings.push(`- CRITICAL: ${label} missing (${displayDir}).`);
1172
+ if (await prompter.confirmSkipInNonInteractive({
1173
+ message: `Create ${label} at ${displayDir}?`,
1174
+ initialValue: true
1175
+ })) {
1176
+ const created = ensureDir(dir);
1177
+ if (created.ok) changes.push(`- Created ${label}: ${displayDir}`);
1178
+ else warnings.push(`- Failed to create ${displayDir}: ${created.error}`);
1179
+ }
1180
+ continue;
1181
+ }
1182
+ if (!canWriteDir(dir)) {
1183
+ warnings.push(`- ${label} not writable (${displayDir}).`);
1184
+ const hint = dirPermissionHint(dir);
1185
+ if (hint) warnings.push(` ${hint}`);
1186
+ if (await prompter.confirmSkipInNonInteractive({
1187
+ message: `Repair permissions on ${label}?`,
1188
+ initialValue: true
1189
+ })) try {
1190
+ const target = addUserRwx(fs.statSync(dir).mode);
1191
+ fs.chmodSync(dir, target);
1192
+ changes.push(`- Repaired permissions on ${label}: ${displayDir}`);
1193
+ } catch (err) {
1194
+ warnings.push(`- Failed to repair ${displayDir}: ${String(err)}`);
1195
+ }
1196
+ }
1197
+ }
1198
+ }
1199
+ const extraStateDirs = /* @__PURE__ */ new Set();
1200
+ if (path.resolve(stateDir) !== path.resolve(defaultStateDir)) {
1201
+ if (existsDir(defaultStateDir)) extraStateDirs.add(defaultStateDir);
1202
+ }
1203
+ for (const other of findOtherStateDirs(stateDir)) extraStateDirs.add(other);
1204
+ if (extraStateDirs.size > 0) warnings.push([
1205
+ "- Multiple state directories detected. This can split session history.",
1206
+ ...Array.from(extraStateDirs).map((dir) => ` - ${shortenHomePath(dir)}`),
1207
+ ` Active state dir: ${displayStateDir}`
1208
+ ].join("\n"));
1209
+ const store = loadSessionStore(storePath);
1210
+ const sessionPathOpts = resolveSessionFilePathOptions({
1211
+ agentId,
1212
+ storePath
1213
+ });
1214
+ const entries = Object.entries(store).filter(([, entry]) => entry && typeof entry === "object");
1215
+ if (entries.length > 0) {
1216
+ const recent = entries.slice().toSorted((a, b) => {
1217
+ const aUpdated = typeof a[1].updatedAt === "number" ? a[1].updatedAt : 0;
1218
+ return (typeof b[1].updatedAt === "number" ? b[1].updatedAt : 0) - aUpdated;
1219
+ }).slice(0, 5);
1220
+ const missing = recent.filter(([, entry]) => {
1221
+ const sessionId = entry.sessionId;
1222
+ if (!sessionId) return false;
1223
+ return !existsFile(resolveSessionFilePath(sessionId, entry, sessionPathOpts));
1224
+ });
1225
+ if (missing.length > 0) warnings.push([
1226
+ `- ${missing.length}/${recent.length} recent sessions are missing transcripts.`,
1227
+ ` Verify sessions in store: ${formatCliCommand(`remoteclaw sessions --store "${absoluteStorePath}"`)}`,
1228
+ ` Preview cleanup impact: ${formatCliCommand(`remoteclaw sessions cleanup --store "${absoluteStorePath}" --dry-run`)}`
1229
+ ].join("\n"));
1230
+ const mainEntry = store[resolveMainSessionKey(cfg)];
1231
+ if (mainEntry?.sessionId) {
1232
+ const transcriptPath = resolveSessionFilePath(mainEntry.sessionId, mainEntry, sessionPathOpts);
1233
+ if (!existsFile(transcriptPath)) warnings.push(`- Main session transcript missing (${shortenHomePath(transcriptPath)}). History will appear to reset.`);
1234
+ else {
1235
+ const lineCount = countJsonlLines(transcriptPath);
1236
+ if (lineCount <= 1) warnings.push(`- Main session transcript has only ${lineCount} line. Session history may not be appending.`);
1237
+ }
1238
+ }
1239
+ }
1240
+ if (existsDir(sessionsDir)) {
1241
+ const referencedTranscriptPaths = /* @__PURE__ */ new Set();
1242
+ for (const [, entry] of entries) {
1243
+ if (!entry?.sessionId) continue;
1244
+ try {
1245
+ referencedTranscriptPaths.add(path.resolve(resolveSessionFilePath(entry.sessionId, entry, sessionPathOpts)));
1246
+ } catch {}
1247
+ }
1248
+ const orphanTranscriptPaths = fs.readdirSync(sessionsDir, { withFileTypes: true }).filter((entry) => entry.isFile() && isPrimarySessionTranscriptFileName(entry.name)).map((entry) => path.resolve(path.join(sessionsDir, entry.name))).filter((filePath) => !referencedTranscriptPaths.has(filePath));
1249
+ if (orphanTranscriptPaths.length > 0) {
1250
+ warnings.push(`- Found ${orphanTranscriptPaths.length} orphan transcript file(s) in ${displaySessionsDir}. They are not referenced by sessions.json and can consume disk over time.`);
1251
+ if (await prompter.confirmSkipInNonInteractive({
1252
+ message: `Archive ${orphanTranscriptPaths.length} orphan transcript file(s) in ${displaySessionsDir}?`,
1253
+ initialValue: false
1254
+ })) {
1255
+ let archived = 0;
1256
+ const archivedAt = formatSessionArchiveTimestamp();
1257
+ for (const orphanPath of orphanTranscriptPaths) {
1258
+ const archivedPath = `${orphanPath}.deleted.${archivedAt}`;
1259
+ try {
1260
+ fs.renameSync(orphanPath, archivedPath);
1261
+ archived += 1;
1262
+ } catch (err) {
1263
+ warnings.push(`- Failed to archive orphan transcript ${shortenHomePath(orphanPath)}: ${String(err)}`);
1264
+ }
1265
+ }
1266
+ if (archived > 0) changes.push(`- Archived ${archived} orphan transcript file(s) in ${displaySessionsDir}`);
1267
+ }
1268
+ }
1269
+ }
1270
+ if (warnings.length > 0) note$1(warnings.join("\n"), "State integrity");
1271
+ if (changes.length > 0) note$1(changes.join("\n"), "Doctor changes");
1272
+ }
1273
+ function noteWorkspaceBackupTip(workspaceDir) {
1274
+ if (!existsDir(workspaceDir)) return;
1275
+ const gitMarker = path.join(workspaceDir, ".git");
1276
+ if (fs.existsSync(gitMarker)) return;
1277
+ note$1([
1278
+ "- Tip: back up the workspace in a private git repo (GitHub or GitLab).",
1279
+ "- Keep ~/.remoteclaw out of git; it contains credentials and session history.",
1280
+ "- Details: /concepts/agent-workspace#git-backup-recommended"
1281
+ ].join("\n"), "Workspace");
1282
+ }
1283
+
1284
+ //#endregion
1285
+ //#region src/commands/doctor-ui.ts
1286
+ async function maybeRepairUiProtocolFreshness(_runtime, prompter) {
1287
+ const root = await resolveRemoteClawPackageRoot({
1288
+ moduleUrl: import.meta.url,
1289
+ argv1: process.argv[1],
1290
+ cwd: process.cwd()
1291
+ });
1292
+ if (!root) return;
1293
+ const schemaPath = path.join(root, "src/gateway/protocol/schema.ts");
1294
+ const uiIndexPath = (await resolveControlUiDistIndexHealth({
1295
+ root,
1296
+ argv1: process.argv[1]
1297
+ })).indexPath ?? resolveControlUiDistIndexPathForRoot(root);
1298
+ try {
1299
+ const [schemaStats, uiStats] = await Promise.all([fsp.stat(schemaPath).catch(() => null), fsp.stat(uiIndexPath).catch(() => null)]);
1300
+ if (schemaStats && !uiStats) {
1301
+ note$1(["- Control UI assets are missing.", "- Run: pnpm ui:build"].join("\n"), "UI");
1302
+ const uiSourcesPath = path.join(root, "ui/package.json");
1303
+ if (!await fsp.stat(uiSourcesPath).catch(() => null)) {
1304
+ note$1("Skipping UI build: ui/ sources not present.", "UI");
1305
+ return;
1306
+ }
1307
+ if (await prompter.confirmRepair({
1308
+ message: "Build Control UI assets now?",
1309
+ initialValue: true
1310
+ })) {
1311
+ note$1("Building Control UI assets... (this may take a moment)", "UI");
1312
+ const uiScriptPath = path.join(root, "scripts/ui.js");
1313
+ const buildResult = await runCommandWithTimeout([
1314
+ process.execPath,
1315
+ uiScriptPath,
1316
+ "build"
1317
+ ], {
1318
+ cwd: root,
1319
+ timeoutMs: 12e4,
1320
+ env: {
1321
+ ...process.env,
1322
+ FORCE_COLOR: "1"
1323
+ }
1324
+ });
1325
+ if (buildResult.code === 0) note$1("UI build complete.", "UI");
1326
+ else note$1([`UI build failed (exit ${buildResult.code ?? "unknown"}).`, buildResult.stderr.trim() ? buildResult.stderr.trim() : null].filter(Boolean).join("\n"), "UI");
1327
+ }
1328
+ return;
1329
+ }
1330
+ if (!schemaStats || !uiStats) return;
1331
+ if (schemaStats.mtime > uiStats.mtime) {
1332
+ const gitLog = await runCommandWithTimeout([
1333
+ "git",
1334
+ "-C",
1335
+ root,
1336
+ "log",
1337
+ `--since=${uiStats.mtime.toISOString()}`,
1338
+ "--format=%h %s",
1339
+ "src/gateway/protocol/schema.ts"
1340
+ ], { timeoutMs: 5e3 }).catch(() => null);
1341
+ if (gitLog && gitLog.code === 0 && gitLog.stdout.trim()) {
1342
+ note$1(`UI assets are older than the protocol schema.\nFunctional changes since last build:\n${gitLog.stdout.trim().split("\n").map((l) => `- ${l}`).join("\n")}`, "UI Freshness");
1343
+ if (await prompter.confirmAggressive({
1344
+ message: "Rebuild UI now? (Detected protocol mismatch requiring update)",
1345
+ initialValue: true
1346
+ })) {
1347
+ const uiSourcesPath = path.join(root, "ui/package.json");
1348
+ if (!await fsp.stat(uiSourcesPath).catch(() => null)) {
1349
+ note$1("Skipping UI rebuild: ui/ sources not present.", "UI");
1350
+ return;
1351
+ }
1352
+ note$1("Rebuilding stale UI assets... (this may take a moment)", "UI");
1353
+ const uiScriptPath = path.join(root, "scripts/ui.js");
1354
+ const buildResult = await runCommandWithTimeout([
1355
+ process.execPath,
1356
+ uiScriptPath,
1357
+ "build"
1358
+ ], {
1359
+ cwd: root,
1360
+ timeoutMs: 12e4,
1361
+ env: {
1362
+ ...process.env,
1363
+ FORCE_COLOR: "1"
1364
+ }
1365
+ });
1366
+ if (buildResult.code === 0) note$1("UI rebuild complete.", "UI");
1367
+ else note$1([`UI rebuild failed (exit ${buildResult.code ?? "unknown"}).`, buildResult.stderr.trim() ? buildResult.stderr.trim() : null].filter(Boolean).join("\n"), "UI");
1368
+ }
1369
+ }
1370
+ }
1371
+ } catch {}
1372
+ }
1373
+
1374
+ //#endregion
1375
+ //#region src/commands/doctor-update.ts
1376
+ async function detectRemoteClawGitCheckout(root) {
1377
+ const res = await runCommandWithTimeout([
1378
+ "git",
1379
+ "-C",
1380
+ root,
1381
+ "rev-parse",
1382
+ "--show-toplevel"
1383
+ ], { timeoutMs: 5e3 }).catch(() => null);
1384
+ if (!res) return "unknown";
1385
+ if (res.code !== 0) {
1386
+ if (res.stderr.toLowerCase().includes("not a git repository")) return "not-git";
1387
+ return "unknown";
1388
+ }
1389
+ return res.stdout.trim() === root ? "git" : "not-git";
1390
+ }
1391
+ async function maybeOfferUpdateBeforeDoctor(params) {
1392
+ if (!(!isTruthyEnvValue(process.env.REMOTECLAW_UPDATE_IN_PROGRESS) && params.options.nonInteractive !== true && params.options.yes !== true && params.options.repair !== true && Boolean(process.stdin.isTTY)) || !params.root) return { updated: false };
1393
+ const git = await detectRemoteClawGitCheckout(params.root);
1394
+ if (git === "git") {
1395
+ if (!await params.confirm({
1396
+ message: "Update RemoteClaw from git before running doctor?",
1397
+ initialValue: true
1398
+ })) return { updated: false };
1399
+ note$1("Running update (fetch/rebase/build/ui:build/doctor)…", "Update");
1400
+ const result = await runGatewayUpdate({
1401
+ cwd: params.root,
1402
+ argv1: process.argv[1]
1403
+ });
1404
+ note$1([
1405
+ `Status: ${result.status}`,
1406
+ `Mode: ${result.mode}`,
1407
+ result.root ? `Root: ${result.root}` : null,
1408
+ result.reason ? `Reason: ${result.reason}` : null
1409
+ ].filter(Boolean).join("\n"), "Update result");
1410
+ if (result.status === "ok") {
1411
+ params.outro("Update completed (doctor already ran as part of the update).");
1412
+ return {
1413
+ updated: true,
1414
+ handled: true
1415
+ };
1416
+ }
1417
+ return {
1418
+ updated: true,
1419
+ handled: false
1420
+ };
1421
+ }
1422
+ if (git === "not-git") note$1(["This install is not a git checkout.", `Run \`${formatCliCommand("remoteclaw update")}\` to update via your package manager (npm/pnpm), then rerun doctor.`].join("\n"), "Update");
1423
+ return { updated: false };
1424
+ }
1425
+
1426
+ //#endregion
1427
+ //#region src/commands/doctor-voice.ts
1428
+ function isVoiceCallPluginEnabled(cfg) {
1429
+ const entry = cfg.plugins?.entries?.["voice-call"];
1430
+ if (!entry) return false;
1431
+ return entry.enabled !== false;
1432
+ }
1433
+ async function noteVoiceChannelHealth(cfg) {
1434
+ if (!isVoiceCallPluginEnabled(cfg)) return;
1435
+ const report = await validateVoiceCredentials(cfg);
1436
+ const issues = [];
1437
+ if (!report.stt.available) issues.push(`- STT: no credentials found. Voice channels require a speech-to-text provider (openai, groq, deepgram, google, or mistral).`);
1438
+ if (!report.tts.available) issues.push(`- TTS: no credentials found. Voice channels require a text-to-speech provider (openai, elevenlabs, or edge).`);
1439
+ if (issues.length > 0) {
1440
+ issues.push(`Configure auth via ${formatCliCommand("remoteclaw configure")} or set provider API keys.`);
1441
+ note$1(issues.join("\n"), "Voice channel");
1442
+ }
1443
+ }
1444
+
1445
+ //#endregion
1446
+ //#region src/commands/doctor-workspace.ts
1447
+ function detectLegacyWorkspaceDirs(params) {
1448
+ return {
1449
+ activeWorkspace: path.resolve(params.workspaceDir),
1450
+ legacyDirs: []
1451
+ };
1452
+ }
1453
+ function formatLegacyWorkspaceWarning(detection) {
1454
+ return [
1455
+ "Extra workspace directories detected (may contain old agent files):",
1456
+ ...detection.legacyDirs.map((dir) => `- ${shortenHomePath(dir)}`),
1457
+ `Active workspace: ${shortenHomePath(detection.activeWorkspace)}`,
1458
+ "If unused, archive or move to Trash."
1459
+ ].join("\n");
1460
+ }
1461
+
1462
+ //#endregion
1463
+ //#region src/commands/doctor-workspace-status.ts
1464
+ function noteWorkspaceStatus(cfg) {
1465
+ const workspaceDir = resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg));
1466
+ const legacyWorkspace = detectLegacyWorkspaceDirs({ workspaceDir });
1467
+ if (legacyWorkspace.legacyDirs.length > 0) note$1(formatLegacyWorkspaceWarning(legacyWorkspace), "Extra workspace");
1468
+ const pluginRegistry = loadRemoteClawPlugins({
1469
+ config: cfg,
1470
+ workspaceDir,
1471
+ logger: {
1472
+ info: () => {},
1473
+ warn: () => {},
1474
+ error: () => {},
1475
+ debug: () => {}
1476
+ }
1477
+ });
1478
+ if (pluginRegistry.plugins.length > 0) {
1479
+ const loaded = pluginRegistry.plugins.filter((p) => p.status === "loaded");
1480
+ const disabled = pluginRegistry.plugins.filter((p) => p.status === "disabled");
1481
+ const errored = pluginRegistry.plugins.filter((p) => p.status === "error");
1482
+ note$1([
1483
+ `Loaded: ${loaded.length}`,
1484
+ `Disabled: ${disabled.length}`,
1485
+ `Errors: ${errored.length}`,
1486
+ errored.length > 0 ? `- ${errored.slice(0, 10).map((p) => p.id).join("\n- ")}${errored.length > 10 ? "\n- ..." : ""}` : null
1487
+ ].filter((line) => Boolean(line)).join("\n"), "Plugins");
1488
+ }
1489
+ if (pluginRegistry.diagnostics.length > 0) note$1(pluginRegistry.diagnostics.map((diag) => {
1490
+ const prefix = diag.level.toUpperCase();
1491
+ const plugin = diag.pluginId ? ` ${diag.pluginId}` : "";
1492
+ const source = diag.source ? ` (${diag.source})` : "";
1493
+ return `- ${prefix}${plugin}: ${diag.message}${source}`;
1494
+ }).join("\n"), "Plugin diagnostics");
1495
+ return { workspaceDir };
1496
+ }
1497
+
1498
+ //#endregion
1499
+ //#region src/commands/doctor.ts
1500
+ const intro$1 = (message) => intro(stylePromptTitle(message) ?? message);
1501
+ const outro$1 = (message) => outro(stylePromptTitle(message) ?? message);
1502
+ function resolveMode(cfg) {
1503
+ return cfg.gateway?.mode === "remote" ? "remote" : "local";
1504
+ }
1505
+ async function doctorCommand(runtime = defaultRuntime, options = {}) {
1506
+ const prompter = createDoctorPrompter({
1507
+ runtime,
1508
+ options
1509
+ });
1510
+ printWizardHeader(runtime);
1511
+ intro$1("RemoteClaw doctor");
1512
+ const root = await resolveRemoteClawPackageRoot({
1513
+ moduleUrl: import.meta.url,
1514
+ argv1: process.argv[1],
1515
+ cwd: process.cwd()
1516
+ });
1517
+ if ((await maybeOfferUpdateBeforeDoctor({
1518
+ runtime,
1519
+ options,
1520
+ root,
1521
+ confirm: (p) => prompter.confirm(p),
1522
+ outro: outro$1
1523
+ })).handled) return;
1524
+ await maybeRepairUiProtocolFreshness(runtime, prompter);
1525
+ noteSourceInstallIssues(root);
1526
+ noteDeprecatedLegacyEnvVars();
1527
+ const configResult = await loadAndMaybeMigrateDoctorConfig({
1528
+ options,
1529
+ confirm: (p) => prompter.confirm(p)
1530
+ });
1531
+ let cfg = configResult.cfg;
1532
+ const cfgForPersistence = structuredClone(cfg);
1533
+ const sourceConfigValid = configResult.sourceConfigValid ?? true;
1534
+ const configPath = configResult.path ?? CONFIG_PATH;
1535
+ if (!cfg.gateway?.mode) {
1536
+ const lines = [
1537
+ "gateway.mode is unset; gateway start will be blocked.",
1538
+ `Fix: run ${formatCliCommand("remoteclaw configure")} and set Gateway mode (local/remote).`,
1539
+ `Or set directly: ${formatCliCommand("remoteclaw config set gateway.mode local")}`
1540
+ ];
1541
+ if (!fs.existsSync(configPath)) lines.push(`Missing config: run ${formatCliCommand("remoteclaw setup")} first.`);
1542
+ note$1(lines.join("\n"), "Gateway");
1543
+ }
1544
+ cfg = await maybeRepairAnthropicOAuthProfileId(cfg, prompter);
1545
+ cfg = await maybeRemoveDeprecatedCliAuthProfiles(cfg, prompter);
1546
+ await noteAuthProfileHealth({
1547
+ cfg,
1548
+ prompter,
1549
+ allowKeychainPrompt: options.nonInteractive !== true && Boolean(process.stdin.isTTY)
1550
+ });
1551
+ await noteVoiceChannelHealth(cfg);
1552
+ const gatewayDetails = buildGatewayConnectionDetails({ config: cfg });
1553
+ if (gatewayDetails.remoteFallbackNote) note$1(gatewayDetails.remoteFallbackNote, "Gateway");
1554
+ if (resolveMode(cfg) === "local" && sourceConfigValid) {
1555
+ const auth = resolveGatewayAuth({
1556
+ authConfig: cfg.gateway?.auth,
1557
+ tailscaleMode: cfg.gateway?.tailscale?.mode ?? "off"
1558
+ });
1559
+ if (auth.mode !== "password" && (auth.mode !== "token" || !auth.token)) {
1560
+ note$1("Gateway auth is off or missing a token. Token auth is now the recommended default (including loopback).", "Gateway auth");
1561
+ if (options.generateGatewayToken === true ? true : options.nonInteractive === true ? false : await prompter.confirmRepair({
1562
+ message: "Generate and configure a gateway token now?",
1563
+ initialValue: true
1564
+ })) {
1565
+ const nextToken = randomToken();
1566
+ cfg = {
1567
+ ...cfg,
1568
+ gateway: {
1569
+ ...cfg.gateway,
1570
+ auth: {
1571
+ ...cfg.gateway?.auth,
1572
+ mode: "token",
1573
+ token: nextToken
1574
+ }
1575
+ }
1576
+ };
1577
+ note$1("Gateway token configured.", "Gateway auth");
1578
+ }
1579
+ }
1580
+ }
1581
+ const legacyState = await detectLegacyStateMigrations({ cfg });
1582
+ if (legacyState.preview.length > 0) {
1583
+ note$1(legacyState.preview.join("\n"), "Legacy state detected");
1584
+ if (options.nonInteractive === true ? true : await prompter.confirm({
1585
+ message: "Migrate legacy state (sessions/agent/WhatsApp auth) now?",
1586
+ initialValue: true
1587
+ })) {
1588
+ const migrated = await runLegacyStateMigrations({ detected: legacyState });
1589
+ if (migrated.changes.length > 0) note$1(migrated.changes.join("\n"), "Doctor changes");
1590
+ if (migrated.warnings.length > 0) note$1(migrated.warnings.join("\n"), "Doctor warnings");
1591
+ }
1592
+ }
1593
+ await noteStateIntegrity(cfg, prompter, configResult.path ?? CONFIG_PATH);
1594
+ await noteSessionLockHealth({ shouldRepair: prompter.shouldRepair });
1595
+ await maybeScanExtraGatewayServices(options, runtime, prompter);
1596
+ await maybeRepairGatewayServiceConfig(cfg, resolveMode(cfg), runtime, prompter);
1597
+ await noteMacLaunchAgentOverrides();
1598
+ await noteMacLaunchctlGatewayEnvOverrides(cfg);
1599
+ await noteSecurityWarnings(cfg);
1600
+ if (options.nonInteractive !== true && process.platform === "linux" && resolveMode(cfg) === "local") {
1601
+ const service = resolveGatewayService();
1602
+ let loaded = false;
1603
+ try {
1604
+ loaded = await service.isLoaded({ env: process.env });
1605
+ } catch {
1606
+ loaded = false;
1607
+ }
1608
+ if (loaded) await ensureSystemdUserLingerInteractive({
1609
+ runtime,
1610
+ prompter: {
1611
+ confirm: async (p) => prompter.confirm(p),
1612
+ note: note$1
1613
+ },
1614
+ reason: "Gateway runs as a systemd user service. Without lingering, systemd stops the user session on logout/idle and kills the Gateway.",
1615
+ requireConfirm: true
1616
+ });
1617
+ }
1618
+ noteWorkspaceStatus(cfg);
1619
+ await doctorShellCompletion(runtime, prompter, { nonInteractive: options.nonInteractive });
1620
+ const { healthOk } = await checkGatewayHealth({
1621
+ runtime,
1622
+ cfg,
1623
+ timeoutMs: options.nonInteractive === true ? 3e3 : 1e4
1624
+ });
1625
+ await maybeRepairGatewayDaemon({
1626
+ cfg,
1627
+ runtime,
1628
+ prompter,
1629
+ options,
1630
+ gatewayDetailsMessage: gatewayDetails.message,
1631
+ healthOk
1632
+ });
1633
+ if (configResult.shouldWriteConfig || JSON.stringify(cfg) !== JSON.stringify(cfgForPersistence)) {
1634
+ cfg = applyWizardMetadata(cfg, {
1635
+ command: "doctor",
1636
+ mode: resolveMode(cfg)
1637
+ });
1638
+ await writeConfigFile(cfg);
1639
+ logConfigUpdated(runtime);
1640
+ const backupPath = `${CONFIG_PATH}.bak`;
1641
+ if (fs.existsSync(backupPath)) runtime.log(`Backup: ${shortenHomePath(backupPath)}`);
1642
+ } else if (!prompter.shouldRepair) runtime.log(`Run "${formatCliCommand("remoteclaw doctor --fix")}" to apply changes.`);
1643
+ if (options.workspaceSuggestions !== false) noteWorkspaceBackupTip(resolveAgentWorkspaceDir(cfg, resolveDefaultAgentId(cfg)));
1644
+ const finalSnapshot = await readConfigFileSnapshot();
1645
+ if (finalSnapshot.exists && !finalSnapshot.valid) {
1646
+ runtime.error("Invalid config:");
1647
+ for (const issue of finalSnapshot.issues) {
1648
+ const path = issue.path || "<root>";
1649
+ runtime.error(`- ${path}: ${issue.message}`);
1650
+ }
1651
+ }
1652
+ outro$1("Doctor complete.");
1653
+ }
1654
+
1655
+ //#endregion
1656
+ //#region src/terminal/prompt-select-styled.ts
1657
+ function selectStyled(params) {
1658
+ return select({
1659
+ ...params,
1660
+ message: stylePromptMessage(params.message),
1661
+ options: params.options.map((opt) => opt.hint === void 0 ? opt : {
1662
+ ...opt,
1663
+ hint: stylePromptHint(opt.hint)
1664
+ })
1665
+ });
1666
+ }
1667
+
1668
+ //#endregion
1669
+ export { doctorCommand as n, selectStyled as t };