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,1908 @@
1
+ import { Mt as resolvePreferredRemoteClawTmpDir } from "./entry.js";
2
+ import "./config-qAZfcdDM.js";
3
+ import "./host-env-security-axRnIi8d.js";
4
+ import "./shell-env-DBS5su07.js";
5
+ import "./version-3QUZW8EP.js";
6
+ import "./env-vars-CD2_baIP.js";
7
+ import "./agent-scope-FzE2oRm0.js";
8
+ import "./zod-schema-7uqrpeBz.js";
9
+ import { t as formatCliCommand } from "./command-format-BiiNHkWG.js";
10
+ import "./net-DSkFMHJ8.js";
11
+ import "./logger-CPvz-aPM.js";
12
+ import "./ip-MwCwRA7c.js";
13
+ import "./tailnet-xt92Yaop.js";
14
+ import "./exec-epNpA1aU.js";
15
+ import "./redact-BW8tobyp.js";
16
+ import "./ssrf-CJIdPXuS.js";
17
+ import { n as formatErrorMessage } from "./errors-0dfGxeYQ.js";
18
+ import { n as markPwAiLoaded } from "./pw-ai-state-CwXeO5d0.js";
19
+ import { _ as appendCdpPath, b as getHeadersWithAuth, d as normalizeCdpWsUrl, g as withBrowserNavigationPolicy, h as assertBrowserNavigationResultAllowed, m as assertBrowserNavigationAllowed, t as getChromeWebSocketUrl, u as formatAriaSnapshot, v as fetchJson, x as withCdpSocket } from "./chrome-BQX0gpUh.js";
20
+ import "./ports-gRBeuUtp.js";
21
+ import "./ports-lsof-CDyv5GJd.js";
22
+ import path from "node:path";
23
+ import crypto from "node:crypto";
24
+ import fsp from "node:fs/promises";
25
+ import { chromium, devices } from "playwright-core";
26
+
27
+ //#region src/browser/pw-session.ts
28
+ const pageStates = /* @__PURE__ */ new WeakMap();
29
+ const contextStates = /* @__PURE__ */ new WeakMap();
30
+ const observedContexts = /* @__PURE__ */ new WeakSet();
31
+ const observedPages = /* @__PURE__ */ new WeakSet();
32
+ const roleRefsByTarget = /* @__PURE__ */ new Map();
33
+ const MAX_ROLE_REFS_CACHE = 50;
34
+ const MAX_CONSOLE_MESSAGES = 500;
35
+ const MAX_PAGE_ERRORS = 200;
36
+ const MAX_NETWORK_REQUESTS = 500;
37
+ let cached = null;
38
+ let connecting = null;
39
+ function normalizeCdpUrl(raw) {
40
+ return raw.replace(/\/$/, "");
41
+ }
42
+ function findNetworkRequestById(state, id) {
43
+ for (let i = state.requests.length - 1; i >= 0; i -= 1) {
44
+ const candidate = state.requests[i];
45
+ if (candidate && candidate.id === id) return candidate;
46
+ }
47
+ }
48
+ function roleRefsKey(cdpUrl, targetId) {
49
+ return `${normalizeCdpUrl(cdpUrl)}::${targetId}`;
50
+ }
51
+ function rememberRoleRefsForTarget(opts) {
52
+ const targetId = opts.targetId.trim();
53
+ if (!targetId) return;
54
+ roleRefsByTarget.set(roleRefsKey(opts.cdpUrl, targetId), {
55
+ refs: opts.refs,
56
+ ...opts.frameSelector ? { frameSelector: opts.frameSelector } : {},
57
+ ...opts.mode ? { mode: opts.mode } : {}
58
+ });
59
+ while (roleRefsByTarget.size > MAX_ROLE_REFS_CACHE) {
60
+ const first = roleRefsByTarget.keys().next();
61
+ if (first.done) break;
62
+ roleRefsByTarget.delete(first.value);
63
+ }
64
+ }
65
+ function storeRoleRefsForTarget(opts) {
66
+ const state = ensurePageState(opts.page);
67
+ state.roleRefs = opts.refs;
68
+ state.roleRefsFrameSelector = opts.frameSelector;
69
+ state.roleRefsMode = opts.mode;
70
+ if (!opts.targetId?.trim()) return;
71
+ rememberRoleRefsForTarget({
72
+ cdpUrl: opts.cdpUrl,
73
+ targetId: opts.targetId,
74
+ refs: opts.refs,
75
+ frameSelector: opts.frameSelector,
76
+ mode: opts.mode
77
+ });
78
+ }
79
+ function restoreRoleRefsForTarget(opts) {
80
+ const targetId = opts.targetId?.trim() || "";
81
+ if (!targetId) return;
82
+ const cached = roleRefsByTarget.get(roleRefsKey(opts.cdpUrl, targetId));
83
+ if (!cached) return;
84
+ const state = ensurePageState(opts.page);
85
+ if (state.roleRefs) return;
86
+ state.roleRefs = cached.refs;
87
+ state.roleRefsFrameSelector = cached.frameSelector;
88
+ state.roleRefsMode = cached.mode;
89
+ }
90
+ function ensurePageState(page) {
91
+ const existing = pageStates.get(page);
92
+ if (existing) return existing;
93
+ const state = {
94
+ console: [],
95
+ errors: [],
96
+ requests: [],
97
+ requestIds: /* @__PURE__ */ new WeakMap(),
98
+ nextRequestId: 0,
99
+ armIdUpload: 0,
100
+ armIdDialog: 0,
101
+ armIdDownload: 0
102
+ };
103
+ pageStates.set(page, state);
104
+ if (!observedPages.has(page)) {
105
+ observedPages.add(page);
106
+ page.on("console", (msg) => {
107
+ const entry = {
108
+ type: msg.type(),
109
+ text: msg.text(),
110
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
111
+ location: msg.location()
112
+ };
113
+ state.console.push(entry);
114
+ if (state.console.length > MAX_CONSOLE_MESSAGES) state.console.shift();
115
+ });
116
+ page.on("pageerror", (err) => {
117
+ state.errors.push({
118
+ message: err?.message ? String(err.message) : String(err),
119
+ name: err?.name ? String(err.name) : void 0,
120
+ stack: err?.stack ? String(err.stack) : void 0,
121
+ timestamp: (/* @__PURE__ */ new Date()).toISOString()
122
+ });
123
+ if (state.errors.length > MAX_PAGE_ERRORS) state.errors.shift();
124
+ });
125
+ page.on("request", (req) => {
126
+ state.nextRequestId += 1;
127
+ const id = `r${state.nextRequestId}`;
128
+ state.requestIds.set(req, id);
129
+ state.requests.push({
130
+ id,
131
+ timestamp: (/* @__PURE__ */ new Date()).toISOString(),
132
+ method: req.method(),
133
+ url: req.url(),
134
+ resourceType: req.resourceType()
135
+ });
136
+ if (state.requests.length > MAX_NETWORK_REQUESTS) state.requests.shift();
137
+ });
138
+ page.on("response", (resp) => {
139
+ const req = resp.request();
140
+ const id = state.requestIds.get(req);
141
+ if (!id) return;
142
+ const rec = findNetworkRequestById(state, id);
143
+ if (!rec) return;
144
+ rec.status = resp.status();
145
+ rec.ok = resp.ok();
146
+ });
147
+ page.on("requestfailed", (req) => {
148
+ const id = state.requestIds.get(req);
149
+ if (!id) return;
150
+ const rec = findNetworkRequestById(state, id);
151
+ if (!rec) return;
152
+ rec.failureText = req.failure()?.errorText;
153
+ rec.ok = false;
154
+ });
155
+ page.on("close", () => {
156
+ pageStates.delete(page);
157
+ observedPages.delete(page);
158
+ });
159
+ }
160
+ return state;
161
+ }
162
+ function observeContext(context) {
163
+ if (observedContexts.has(context)) return;
164
+ observedContexts.add(context);
165
+ ensureContextState(context);
166
+ for (const page of context.pages()) ensurePageState(page);
167
+ context.on("page", (page) => ensurePageState(page));
168
+ }
169
+ function ensureContextState(context) {
170
+ const existing = contextStates.get(context);
171
+ if (existing) return existing;
172
+ const state = { traceActive: false };
173
+ contextStates.set(context, state);
174
+ return state;
175
+ }
176
+ function observeBrowser(browser) {
177
+ for (const context of browser.contexts()) observeContext(context);
178
+ }
179
+ async function connectBrowser(cdpUrl) {
180
+ const normalized = normalizeCdpUrl(cdpUrl);
181
+ if (cached?.cdpUrl === normalized) return cached;
182
+ if (connecting) return await connecting;
183
+ const connectWithRetry = async () => {
184
+ let lastErr;
185
+ for (let attempt = 0; attempt < 3; attempt += 1) try {
186
+ const timeout = 5e3 + attempt * 2e3;
187
+ const endpoint = await getChromeWebSocketUrl(normalized, timeout).catch(() => null) ?? normalized;
188
+ const headers = getHeadersWithAuth(endpoint);
189
+ const browser = await chromium.connectOverCDP(endpoint, {
190
+ timeout,
191
+ headers
192
+ });
193
+ const onDisconnected = () => {
194
+ if (cached?.browser === browser) cached = null;
195
+ };
196
+ const connected = {
197
+ browser,
198
+ cdpUrl: normalized,
199
+ onDisconnected
200
+ };
201
+ cached = connected;
202
+ browser.on("disconnected", onDisconnected);
203
+ observeBrowser(browser);
204
+ return connected;
205
+ } catch (err) {
206
+ lastErr = err;
207
+ const delay = 250 + attempt * 250;
208
+ await new Promise((r) => setTimeout(r, delay));
209
+ }
210
+ if (lastErr instanceof Error) throw lastErr;
211
+ const message = lastErr ? formatErrorMessage(lastErr) : "CDP connect failed";
212
+ throw new Error(message);
213
+ };
214
+ connecting = connectWithRetry().finally(() => {
215
+ connecting = null;
216
+ });
217
+ return await connecting;
218
+ }
219
+ async function getAllPages(browser) {
220
+ return browser.contexts().flatMap((c) => c.pages());
221
+ }
222
+ async function pageTargetId(page) {
223
+ const session = await page.context().newCDPSession(page);
224
+ try {
225
+ const info = await session.send("Target.getTargetInfo");
226
+ return String(info?.targetInfo?.targetId ?? "").trim() || null;
227
+ } finally {
228
+ await session.detach().catch(() => {});
229
+ }
230
+ }
231
+ async function findPageByTargetId(browser, targetId, cdpUrl) {
232
+ const pages = await getAllPages(browser);
233
+ let resolvedViaCdp = false;
234
+ for (const page of pages) {
235
+ let tid = null;
236
+ try {
237
+ tid = await pageTargetId(page);
238
+ resolvedViaCdp = true;
239
+ } catch {
240
+ tid = null;
241
+ }
242
+ if (tid && tid === targetId) return page;
243
+ }
244
+ if (!resolvedViaCdp && pages.length === 1) return pages[0];
245
+ if (cdpUrl) try {
246
+ const listUrl = `${cdpUrl.replace(/\/+$/, "").replace(/^ws:/, "http:").replace(/\/cdp$/, "")}/json/list`;
247
+ const response = await fetch(listUrl, { headers: getHeadersWithAuth(listUrl) });
248
+ if (response.ok) {
249
+ const targets = await response.json();
250
+ const target = targets.find((t) => t.id === targetId);
251
+ if (target) {
252
+ const urlMatch = pages.filter((p) => p.url() === target.url);
253
+ if (urlMatch.length === 1) return urlMatch[0];
254
+ if (urlMatch.length > 1) {
255
+ const sameUrlTargets = targets.filter((t) => t.url === target.url);
256
+ if (sameUrlTargets.length === urlMatch.length) {
257
+ const idx = sameUrlTargets.findIndex((t) => t.id === targetId);
258
+ if (idx >= 0 && idx < urlMatch.length) return urlMatch[idx];
259
+ }
260
+ }
261
+ }
262
+ }
263
+ } catch {}
264
+ return null;
265
+ }
266
+ async function getPageForTargetId(opts) {
267
+ const { browser } = await connectBrowser(opts.cdpUrl);
268
+ const pages = await getAllPages(browser);
269
+ if (!pages.length) throw new Error("No pages available in the connected browser.");
270
+ const first = pages[0];
271
+ if (!opts.targetId) return first;
272
+ const found = await findPageByTargetId(browser, opts.targetId, opts.cdpUrl);
273
+ if (!found) {
274
+ if (pages.length === 1) return first;
275
+ throw new Error("tab not found");
276
+ }
277
+ return found;
278
+ }
279
+ function refLocator(page, ref) {
280
+ const normalized = ref.startsWith("@") ? ref.slice(1) : ref.startsWith("ref=") ? ref.slice(4) : ref;
281
+ if (/^e\d+$/.test(normalized)) {
282
+ const state = pageStates.get(page);
283
+ if (state?.roleRefsMode === "aria") return (state.roleRefsFrameSelector ? page.frameLocator(state.roleRefsFrameSelector) : page).locator(`aria-ref=${normalized}`);
284
+ const info = state?.roleRefs?.[normalized];
285
+ if (!info) throw new Error(`Unknown ref "${normalized}". Run a new snapshot and use a ref from that snapshot.`);
286
+ const locAny = state?.roleRefsFrameSelector ? page.frameLocator(state.roleRefsFrameSelector) : page;
287
+ const locator = info.name ? locAny.getByRole(info.role, {
288
+ name: info.name,
289
+ exact: true
290
+ }) : locAny.getByRole(info.role);
291
+ return info.nth !== void 0 ? locator.nth(info.nth) : locator;
292
+ }
293
+ return page.locator(`aria-ref=${normalized}`);
294
+ }
295
+ async function closePlaywrightBrowserConnection() {
296
+ const cur = cached;
297
+ cached = null;
298
+ connecting = null;
299
+ if (!cur) return;
300
+ if (cur.onDisconnected && typeof cur.browser.off === "function") cur.browser.off("disconnected", cur.onDisconnected);
301
+ await cur.browser.close().catch(() => {});
302
+ }
303
+ function normalizeCdpHttpBaseForJsonEndpoints(cdpUrl) {
304
+ try {
305
+ const url = new URL(cdpUrl);
306
+ if (url.protocol === "ws:") url.protocol = "http:";
307
+ else if (url.protocol === "wss:") url.protocol = "https:";
308
+ url.pathname = url.pathname.replace(/\/devtools\/browser\/.*$/, "");
309
+ url.pathname = url.pathname.replace(/\/cdp$/, "");
310
+ return url.toString().replace(/\/$/, "");
311
+ } catch {
312
+ return cdpUrl.replace(/^ws:/, "http:").replace(/^wss:/, "https:").replace(/\/devtools\/browser\/.*$/, "").replace(/\/cdp$/, "").replace(/\/$/, "");
313
+ }
314
+ }
315
+ function cdpSocketNeedsAttach(wsUrl) {
316
+ try {
317
+ const pathname = new URL(wsUrl).pathname;
318
+ return pathname === "/cdp" || pathname.endsWith("/cdp") || pathname.includes("/devtools/browser/");
319
+ } catch {
320
+ return false;
321
+ }
322
+ }
323
+ async function tryTerminateExecutionViaCdp(opts) {
324
+ const cdpHttpBase = normalizeCdpHttpBaseForJsonEndpoints(opts.cdpUrl);
325
+ const pages = await fetchJson(appendCdpPath(cdpHttpBase, "/json/list"), 2e3).catch(() => null);
326
+ if (!pages || pages.length === 0) return;
327
+ const target = pages.find((p) => String(p.id ?? "").trim() === opts.targetId);
328
+ const wsUrlRaw = String(target?.webSocketDebuggerUrl ?? "").trim();
329
+ if (!wsUrlRaw) return;
330
+ const wsUrl = normalizeCdpWsUrl(wsUrlRaw, cdpHttpBase);
331
+ const needsAttach = cdpSocketNeedsAttach(wsUrl);
332
+ const runWithTimeout = async (work, ms) => {
333
+ let timer;
334
+ const timeoutPromise = new Promise((_, reject) => {
335
+ timer = setTimeout(() => reject(/* @__PURE__ */ new Error("CDP command timed out")), ms);
336
+ });
337
+ try {
338
+ return await Promise.race([work, timeoutPromise]);
339
+ } finally {
340
+ if (timer) clearTimeout(timer);
341
+ }
342
+ };
343
+ await withCdpSocket(wsUrl, async (send) => {
344
+ let sessionId;
345
+ try {
346
+ if (needsAttach) {
347
+ const attached = await runWithTimeout(send("Target.attachToTarget", {
348
+ targetId: opts.targetId,
349
+ flatten: true
350
+ }), 1500);
351
+ if (typeof attached?.sessionId === "string" && attached.sessionId.trim()) sessionId = attached.sessionId;
352
+ }
353
+ await runWithTimeout(send("Runtime.terminateExecution", void 0, sessionId), 1500);
354
+ if (sessionId) send("Target.detachFromTarget", { sessionId }).catch(() => {});
355
+ } catch {}
356
+ }, { handshakeTimeoutMs: 2e3 }).catch(() => {});
357
+ }
358
+ /**
359
+ * Best-effort cancellation for stuck page operations.
360
+ *
361
+ * Playwright serializes CDP commands per page; a long-running or stuck operation (notably evaluate)
362
+ * can block all subsequent commands. We cannot safely "cancel" an individual command, and we do
363
+ * not want to close the actual Chromium tab. Instead, we disconnect Playwright's CDP connection
364
+ * so in-flight commands fail fast and the next request reconnects transparently.
365
+ *
366
+ * IMPORTANT: We CANNOT call Connection.close() because Playwright shares a single Connection
367
+ * across all objects (BrowserType, Browser, etc.). Closing it corrupts the entire Playwright
368
+ * instance, preventing reconnection.
369
+ *
370
+ * Instead we:
371
+ * 1. Null out `cached` so the next call triggers a fresh connectOverCDP
372
+ * 2. Fire-and-forget browser.close() — it may hang but won't block us
373
+ * 3. The next connectBrowser() creates a completely new CDP WebSocket connection
374
+ *
375
+ * The old browser.close() eventually resolves when the in-browser evaluate timeout fires,
376
+ * or the old connection gets GC'd. Either way, it doesn't affect the fresh connection.
377
+ */
378
+ async function forceDisconnectPlaywrightForTarget(opts) {
379
+ const normalized = normalizeCdpUrl(opts.cdpUrl);
380
+ if (cached?.cdpUrl !== normalized) return;
381
+ const cur = cached;
382
+ cached = null;
383
+ connecting = null;
384
+ if (cur) {
385
+ if (cur.onDisconnected && typeof cur.browser.off === "function") cur.browser.off("disconnected", cur.onDisconnected);
386
+ const targetId = opts.targetId?.trim() || "";
387
+ if (targetId) await tryTerminateExecutionViaCdp({
388
+ cdpUrl: normalized,
389
+ targetId
390
+ }).catch(() => {});
391
+ cur.browser.close().catch(() => {});
392
+ }
393
+ }
394
+ /**
395
+ * List all pages/tabs from the persistent Playwright connection.
396
+ * Used for remote profiles where HTTP-based /json/list is ephemeral.
397
+ */
398
+ async function listPagesViaPlaywright(opts) {
399
+ const { browser } = await connectBrowser(opts.cdpUrl);
400
+ const pages = await getAllPages(browser);
401
+ const results = [];
402
+ for (const page of pages) {
403
+ const tid = await pageTargetId(page).catch(() => null);
404
+ if (tid) results.push({
405
+ targetId: tid,
406
+ title: await page.title().catch(() => ""),
407
+ url: page.url(),
408
+ type: "page"
409
+ });
410
+ }
411
+ return results;
412
+ }
413
+ /**
414
+ * Create a new page/tab using the persistent Playwright connection.
415
+ * Used for remote profiles where HTTP-based /json/new is ephemeral.
416
+ * Returns the new page's targetId and metadata.
417
+ */
418
+ async function createPageViaPlaywright(opts) {
419
+ const { browser } = await connectBrowser(opts.cdpUrl);
420
+ const context = browser.contexts()[0] ?? await browser.newContext();
421
+ ensureContextState(context);
422
+ const page = await context.newPage();
423
+ ensurePageState(page);
424
+ const targetUrl = opts.url.trim() || "about:blank";
425
+ if (targetUrl !== "about:blank") {
426
+ const navigationPolicy = withBrowserNavigationPolicy(opts.ssrfPolicy);
427
+ await assertBrowserNavigationAllowed({
428
+ url: targetUrl,
429
+ ...navigationPolicy
430
+ });
431
+ await page.goto(targetUrl, { timeout: 3e4 }).catch(() => {});
432
+ await assertBrowserNavigationResultAllowed({
433
+ url: page.url(),
434
+ ...navigationPolicy
435
+ });
436
+ }
437
+ const tid = await pageTargetId(page).catch(() => null);
438
+ if (!tid) throw new Error("Failed to get targetId for new page");
439
+ return {
440
+ targetId: tid,
441
+ title: await page.title().catch(() => ""),
442
+ url: page.url(),
443
+ type: "page"
444
+ };
445
+ }
446
+ /**
447
+ * Close a page/tab by targetId using the persistent Playwright connection.
448
+ * Used for remote profiles where HTTP-based /json/close is ephemeral.
449
+ */
450
+ async function closePageByTargetIdViaPlaywright(opts) {
451
+ const { browser } = await connectBrowser(opts.cdpUrl);
452
+ const page = await findPageByTargetId(browser, opts.targetId, opts.cdpUrl);
453
+ if (!page) throw new Error("tab not found");
454
+ await page.close();
455
+ }
456
+ /**
457
+ * Focus a page/tab by targetId using the persistent Playwright connection.
458
+ * Used for remote profiles where HTTP-based /json/activate can be ephemeral.
459
+ */
460
+ async function focusPageByTargetIdViaPlaywright(opts) {
461
+ const { browser } = await connectBrowser(opts.cdpUrl);
462
+ const page = await findPageByTargetId(browser, opts.targetId, opts.cdpUrl);
463
+ if (!page) throw new Error("tab not found");
464
+ try {
465
+ await page.bringToFront();
466
+ } catch (err) {
467
+ const session = await page.context().newCDPSession(page);
468
+ try {
469
+ await session.send("Page.bringToFront");
470
+ return;
471
+ } catch {
472
+ throw err;
473
+ } finally {
474
+ await session.detach().catch(() => {});
475
+ }
476
+ }
477
+ }
478
+
479
+ //#endregion
480
+ //#region src/browser/pw-tools-core.activity.ts
481
+ async function getPageErrorsViaPlaywright(opts) {
482
+ const state = ensurePageState(await getPageForTargetId(opts));
483
+ const errors = [...state.errors];
484
+ if (opts.clear) state.errors = [];
485
+ return { errors };
486
+ }
487
+ async function getNetworkRequestsViaPlaywright(opts) {
488
+ const state = ensurePageState(await getPageForTargetId(opts));
489
+ const raw = [...state.requests];
490
+ const filter = typeof opts.filter === "string" ? opts.filter.trim() : "";
491
+ const requests = filter ? raw.filter((r) => r.url.includes(filter)) : raw;
492
+ if (opts.clear) {
493
+ state.requests = [];
494
+ state.requestIds = /* @__PURE__ */ new WeakMap();
495
+ }
496
+ return { requests };
497
+ }
498
+ function consolePriority(level) {
499
+ switch (level) {
500
+ case "error": return 3;
501
+ case "warning": return 2;
502
+ case "info":
503
+ case "log": return 1;
504
+ case "debug": return 0;
505
+ default: return 1;
506
+ }
507
+ }
508
+ async function getConsoleMessagesViaPlaywright(opts) {
509
+ const state = ensurePageState(await getPageForTargetId(opts));
510
+ if (!opts.level) return [...state.console];
511
+ const min = consolePriority(opts.level);
512
+ return state.console.filter((msg) => consolePriority(msg.type) >= min);
513
+ }
514
+
515
+ //#endregion
516
+ //#region src/browser/pw-role-snapshot.ts
517
+ const INTERACTIVE_ROLES = new Set([
518
+ "button",
519
+ "link",
520
+ "textbox",
521
+ "checkbox",
522
+ "radio",
523
+ "combobox",
524
+ "listbox",
525
+ "menuitem",
526
+ "menuitemcheckbox",
527
+ "menuitemradio",
528
+ "option",
529
+ "searchbox",
530
+ "slider",
531
+ "spinbutton",
532
+ "switch",
533
+ "tab",
534
+ "treeitem"
535
+ ]);
536
+ const CONTENT_ROLES = new Set([
537
+ "heading",
538
+ "cell",
539
+ "gridcell",
540
+ "columnheader",
541
+ "rowheader",
542
+ "listitem",
543
+ "article",
544
+ "region",
545
+ "main",
546
+ "navigation"
547
+ ]);
548
+ const STRUCTURAL_ROLES = new Set([
549
+ "generic",
550
+ "group",
551
+ "list",
552
+ "table",
553
+ "row",
554
+ "rowgroup",
555
+ "grid",
556
+ "treegrid",
557
+ "menu",
558
+ "menubar",
559
+ "toolbar",
560
+ "tablist",
561
+ "tree",
562
+ "directory",
563
+ "document",
564
+ "application",
565
+ "presentation",
566
+ "none"
567
+ ]);
568
+ function getRoleSnapshotStats(snapshot, refs) {
569
+ const interactive = Object.values(refs).filter((r) => INTERACTIVE_ROLES.has(r.role)).length;
570
+ return {
571
+ lines: snapshot.split("\n").length,
572
+ chars: snapshot.length,
573
+ refs: Object.keys(refs).length,
574
+ interactive
575
+ };
576
+ }
577
+ function getIndentLevel(line) {
578
+ const match = line.match(/^(\s*)/);
579
+ return match ? Math.floor(match[1].length / 2) : 0;
580
+ }
581
+ function matchInteractiveSnapshotLine(line, options) {
582
+ const depth = getIndentLevel(line);
583
+ if (options.maxDepth !== void 0 && depth > options.maxDepth) return null;
584
+ const match = line.match(/^(\s*-\s*)(\w+)(?:\s+"([^"]*)")?(.*)$/);
585
+ if (!match) return null;
586
+ const [, , roleRaw, name, suffix] = match;
587
+ if (roleRaw.startsWith("/")) return null;
588
+ return {
589
+ roleRaw,
590
+ role: roleRaw.toLowerCase(),
591
+ ...name ? { name } : {},
592
+ suffix
593
+ };
594
+ }
595
+ function createRoleNameTracker() {
596
+ const counts = /* @__PURE__ */ new Map();
597
+ const refsByKey = /* @__PURE__ */ new Map();
598
+ return {
599
+ counts,
600
+ refsByKey,
601
+ getKey(role, name) {
602
+ return `${role}:${name ?? ""}`;
603
+ },
604
+ getNextIndex(role, name) {
605
+ const key = this.getKey(role, name);
606
+ const current = counts.get(key) ?? 0;
607
+ counts.set(key, current + 1);
608
+ return current;
609
+ },
610
+ trackRef(role, name, ref) {
611
+ const key = this.getKey(role, name);
612
+ const list = refsByKey.get(key) ?? [];
613
+ list.push(ref);
614
+ refsByKey.set(key, list);
615
+ },
616
+ getDuplicateKeys() {
617
+ const out = /* @__PURE__ */ new Set();
618
+ for (const [key, refs] of refsByKey) if (refs.length > 1) out.add(key);
619
+ return out;
620
+ }
621
+ };
622
+ }
623
+ function removeNthFromNonDuplicates(refs, tracker) {
624
+ const duplicates = tracker.getDuplicateKeys();
625
+ for (const [ref, data] of Object.entries(refs)) {
626
+ const key = tracker.getKey(data.role, data.name);
627
+ if (!duplicates.has(key)) delete refs[ref]?.nth;
628
+ }
629
+ }
630
+ function compactTree(tree) {
631
+ const lines = tree.split("\n");
632
+ const result = [];
633
+ for (let i = 0; i < lines.length; i += 1) {
634
+ const line = lines[i];
635
+ if (line.includes("[ref=")) {
636
+ result.push(line);
637
+ continue;
638
+ }
639
+ if (line.includes(":") && !line.trimEnd().endsWith(":")) {
640
+ result.push(line);
641
+ continue;
642
+ }
643
+ const currentIndent = getIndentLevel(line);
644
+ let hasRelevantChildren = false;
645
+ for (let j = i + 1; j < lines.length; j += 1) {
646
+ if (getIndentLevel(lines[j]) <= currentIndent) break;
647
+ if (lines[j]?.includes("[ref=")) {
648
+ hasRelevantChildren = true;
649
+ break;
650
+ }
651
+ }
652
+ if (hasRelevantChildren) result.push(line);
653
+ }
654
+ return result.join("\n");
655
+ }
656
+ function processLine(line, refs, options, tracker, nextRef) {
657
+ const depth = getIndentLevel(line);
658
+ if (options.maxDepth !== void 0 && depth > options.maxDepth) return null;
659
+ const match = line.match(/^(\s*-\s*)(\w+)(?:\s+"([^"]*)")?(.*)$/);
660
+ if (!match) return options.interactive ? null : line;
661
+ const [, prefix, roleRaw, name, suffix] = match;
662
+ if (roleRaw.startsWith("/")) return options.interactive ? null : line;
663
+ const role = roleRaw.toLowerCase();
664
+ const isInteractive = INTERACTIVE_ROLES.has(role);
665
+ const isContent = CONTENT_ROLES.has(role);
666
+ const isStructural = STRUCTURAL_ROLES.has(role);
667
+ if (options.interactive && !isInteractive) return null;
668
+ if (options.compact && isStructural && !name) return null;
669
+ if (!(isInteractive || isContent && name)) return line;
670
+ const ref = nextRef();
671
+ const nth = tracker.getNextIndex(role, name);
672
+ tracker.trackRef(role, name, ref);
673
+ refs[ref] = {
674
+ role,
675
+ name,
676
+ nth
677
+ };
678
+ let enhanced = `${prefix}${roleRaw}`;
679
+ if (name) enhanced += ` "${name}"`;
680
+ enhanced += ` [ref=${ref}]`;
681
+ if (nth > 0) enhanced += ` [nth=${nth}]`;
682
+ if (suffix) enhanced += suffix;
683
+ return enhanced;
684
+ }
685
+ function buildInteractiveSnapshotLines(params) {
686
+ const out = [];
687
+ for (const line of params.lines) {
688
+ const parsed = matchInteractiveSnapshotLine(line, params.options);
689
+ if (!parsed) continue;
690
+ if (!INTERACTIVE_ROLES.has(parsed.role)) continue;
691
+ const resolved = params.resolveRef(parsed);
692
+ if (!resolved?.ref) continue;
693
+ params.recordRef(parsed, resolved.ref, resolved.nth);
694
+ let enhanced = `- ${parsed.roleRaw}`;
695
+ if (parsed.name) enhanced += ` "${parsed.name}"`;
696
+ enhanced += ` [ref=${resolved.ref}]`;
697
+ if ((resolved.nth ?? 0) > 0) enhanced += ` [nth=${resolved.nth}]`;
698
+ if (params.includeSuffix(parsed.suffix)) enhanced += parsed.suffix;
699
+ out.push(enhanced);
700
+ }
701
+ return out;
702
+ }
703
+ function parseRoleRef(raw) {
704
+ const trimmed = raw.trim();
705
+ if (!trimmed) return null;
706
+ const normalized = trimmed.startsWith("@") ? trimmed.slice(1) : trimmed.startsWith("ref=") ? trimmed.slice(4) : trimmed;
707
+ return /^e\d+$/.test(normalized) ? normalized : null;
708
+ }
709
+ function buildRoleSnapshotFromAriaSnapshot(ariaSnapshot, options = {}) {
710
+ const lines = ariaSnapshot.split("\n");
711
+ const refs = {};
712
+ const tracker = createRoleNameTracker();
713
+ let counter = 0;
714
+ const nextRef = () => {
715
+ counter += 1;
716
+ return `e${counter}`;
717
+ };
718
+ if (options.interactive) {
719
+ const result = buildInteractiveSnapshotLines({
720
+ lines,
721
+ options,
722
+ resolveRef: ({ role, name }) => {
723
+ const ref = nextRef();
724
+ const nth = tracker.getNextIndex(role, name);
725
+ tracker.trackRef(role, name, ref);
726
+ return {
727
+ ref,
728
+ nth
729
+ };
730
+ },
731
+ recordRef: ({ role, name }, ref, nth) => {
732
+ refs[ref] = {
733
+ role,
734
+ name,
735
+ nth
736
+ };
737
+ },
738
+ includeSuffix: (suffix) => suffix.includes("[")
739
+ });
740
+ removeNthFromNonDuplicates(refs, tracker);
741
+ return {
742
+ snapshot: result.join("\n") || "(no interactive elements)",
743
+ refs
744
+ };
745
+ }
746
+ const result = [];
747
+ for (const line of lines) {
748
+ const processed = processLine(line, refs, options, tracker, nextRef);
749
+ if (processed !== null) result.push(processed);
750
+ }
751
+ removeNthFromNonDuplicates(refs, tracker);
752
+ const tree = result.join("\n") || "(empty)";
753
+ return {
754
+ snapshot: options.compact ? compactTree(tree) : tree,
755
+ refs
756
+ };
757
+ }
758
+ function parseAiSnapshotRef(suffix) {
759
+ const match = suffix.match(/\[ref=(e\d+)\]/i);
760
+ return match ? match[1] : null;
761
+ }
762
+ /**
763
+ * Build a role snapshot from Playwright's AI snapshot output while preserving Playwright's own
764
+ * aria-ref ids (e.g. ref=e13). This makes the refs self-resolving across calls.
765
+ */
766
+ function buildRoleSnapshotFromAiSnapshot(aiSnapshot, options = {}) {
767
+ const lines = String(aiSnapshot ?? "").split("\n");
768
+ const refs = {};
769
+ if (options.interactive) return {
770
+ snapshot: buildInteractiveSnapshotLines({
771
+ lines,
772
+ options,
773
+ resolveRef: ({ suffix }) => {
774
+ const ref = parseAiSnapshotRef(suffix);
775
+ return ref ? { ref } : null;
776
+ },
777
+ recordRef: ({ role, name }, ref) => {
778
+ refs[ref] = {
779
+ role,
780
+ ...name ? { name } : {}
781
+ };
782
+ },
783
+ includeSuffix: () => true
784
+ }).join("\n") || "(no interactive elements)",
785
+ refs
786
+ };
787
+ const out = [];
788
+ for (const line of lines) {
789
+ const depth = getIndentLevel(line);
790
+ if (options.maxDepth !== void 0 && depth > options.maxDepth) continue;
791
+ const match = line.match(/^(\s*-\s*)(\w+)(?:\s+"([^"]*)")?(.*)$/);
792
+ if (!match) {
793
+ out.push(line);
794
+ continue;
795
+ }
796
+ const [, , roleRaw, name, suffix] = match;
797
+ if (roleRaw.startsWith("/")) {
798
+ out.push(line);
799
+ continue;
800
+ }
801
+ const role = roleRaw.toLowerCase();
802
+ const isStructural = STRUCTURAL_ROLES.has(role);
803
+ if (options.compact && isStructural && !name) continue;
804
+ const ref = parseAiSnapshotRef(suffix);
805
+ if (ref) refs[ref] = {
806
+ role,
807
+ ...name ? { name } : {}
808
+ };
809
+ out.push(line);
810
+ }
811
+ const tree = out.join("\n") || "(empty)";
812
+ return {
813
+ snapshot: options.compact ? compactTree(tree) : tree,
814
+ refs
815
+ };
816
+ }
817
+
818
+ //#endregion
819
+ //#region src/browser/pw-tools-core.shared.ts
820
+ let nextUploadArmId = 0;
821
+ let nextDialogArmId = 0;
822
+ let nextDownloadArmId = 0;
823
+ function bumpUploadArmId() {
824
+ nextUploadArmId += 1;
825
+ return nextUploadArmId;
826
+ }
827
+ function bumpDialogArmId() {
828
+ nextDialogArmId += 1;
829
+ return nextDialogArmId;
830
+ }
831
+ function bumpDownloadArmId() {
832
+ nextDownloadArmId += 1;
833
+ return nextDownloadArmId;
834
+ }
835
+ function requireRef(value) {
836
+ const raw = typeof value === "string" ? value.trim() : "";
837
+ const ref = (raw ? parseRoleRef(raw) : null) ?? (raw.startsWith("@") ? raw.slice(1) : raw);
838
+ if (!ref) throw new Error("ref is required");
839
+ return ref;
840
+ }
841
+ function normalizeTimeoutMs(timeoutMs, fallback) {
842
+ return Math.max(500, Math.min(12e4, timeoutMs ?? fallback));
843
+ }
844
+ function toAIFriendlyError(error, selector) {
845
+ const message = error instanceof Error ? error.message : String(error);
846
+ if (message.includes("strict mode violation")) {
847
+ const countMatch = message.match(/resolved to (\d+) elements/);
848
+ const count = countMatch ? countMatch[1] : "multiple";
849
+ return /* @__PURE__ */ new Error(`Selector "${selector}" matched ${count} elements. Run a new snapshot to get updated refs, or use a different ref.`);
850
+ }
851
+ if ((message.includes("Timeout") || message.includes("waiting for")) && (message.includes("to be visible") || message.includes("not visible"))) return /* @__PURE__ */ new Error(`Element "${selector}" not found or not visible. Run a new snapshot to see current page elements.`);
852
+ if (message.includes("intercepts pointer events") || message.includes("not visible") || message.includes("not receive pointer events")) return /* @__PURE__ */ new Error(`Element "${selector}" is not interactable (hidden or covered). Try scrolling it into view, closing overlays, or re-snapshotting.`);
853
+ return error instanceof Error ? error : new Error(message);
854
+ }
855
+
856
+ //#endregion
857
+ //#region src/browser/pw-tools-core.downloads.ts
858
+ function sanitizeDownloadFileName(fileName) {
859
+ const trimmed = String(fileName ?? "").trim();
860
+ if (!trimmed) return "download.bin";
861
+ let base = path.posix.basename(trimmed);
862
+ base = path.win32.basename(base);
863
+ let cleaned = "";
864
+ for (let i = 0; i < base.length; i++) {
865
+ const code = base.charCodeAt(i);
866
+ if (code < 32 || code === 127) continue;
867
+ cleaned += base[i];
868
+ }
869
+ base = cleaned.trim();
870
+ if (!base || base === "." || base === "..") return "download.bin";
871
+ if (base.length > 200) base = base.slice(0, 200);
872
+ return base;
873
+ }
874
+ function buildTempDownloadPath(fileName) {
875
+ const id = crypto.randomUUID();
876
+ const safeName = sanitizeDownloadFileName(fileName);
877
+ return path.join(resolvePreferredRemoteClawTmpDir(), "downloads", `${id}-${safeName}`);
878
+ }
879
+ function createPageDownloadWaiter(page, timeoutMs) {
880
+ let done = false;
881
+ let timer;
882
+ let handler;
883
+ const cleanup = () => {
884
+ if (timer) clearTimeout(timer);
885
+ timer = void 0;
886
+ if (handler) {
887
+ page.off("download", handler);
888
+ handler = void 0;
889
+ }
890
+ };
891
+ return {
892
+ promise: new Promise((resolve, reject) => {
893
+ handler = (download) => {
894
+ if (done) return;
895
+ done = true;
896
+ cleanup();
897
+ resolve(download);
898
+ };
899
+ page.on("download", handler);
900
+ timer = setTimeout(() => {
901
+ if (done) return;
902
+ done = true;
903
+ cleanup();
904
+ reject(/* @__PURE__ */ new Error("Timeout waiting for download"));
905
+ }, timeoutMs);
906
+ }),
907
+ cancel: () => {
908
+ if (done) return;
909
+ done = true;
910
+ cleanup();
911
+ }
912
+ };
913
+ }
914
+ async function saveDownloadPayload(download, outPath) {
915
+ const suggested = download.suggestedFilename?.() || "download.bin";
916
+ const resolvedOutPath = outPath?.trim() || buildTempDownloadPath(suggested);
917
+ await fsp.mkdir(path.dirname(resolvedOutPath), { recursive: true });
918
+ await download.saveAs?.(resolvedOutPath);
919
+ return {
920
+ url: download.url?.() || "",
921
+ suggestedFilename: suggested,
922
+ path: path.resolve(resolvedOutPath)
923
+ };
924
+ }
925
+ async function awaitDownloadPayload(params) {
926
+ try {
927
+ const download = await params.waiter.promise;
928
+ if (params.state.armIdDownload !== params.armId) throw new Error("Download was superseded by another waiter");
929
+ return await saveDownloadPayload(download, params.outPath ?? "");
930
+ } catch (err) {
931
+ params.waiter.cancel();
932
+ throw err;
933
+ }
934
+ }
935
+ async function armFileUploadViaPlaywright(opts) {
936
+ const page = await getPageForTargetId(opts);
937
+ const state = ensurePageState(page);
938
+ const timeout = Math.max(500, Math.min(12e4, opts.timeoutMs ?? 12e4));
939
+ state.armIdUpload = bumpUploadArmId();
940
+ const armId = state.armIdUpload;
941
+ page.waitForEvent("filechooser", { timeout }).then(async (fileChooser) => {
942
+ if (state.armIdUpload !== armId) return;
943
+ if (!opts.paths?.length) {
944
+ try {
945
+ await page.keyboard.press("Escape");
946
+ } catch {}
947
+ return;
948
+ }
949
+ await fileChooser.setFiles(opts.paths);
950
+ try {
951
+ const input = typeof fileChooser.element === "function" ? await Promise.resolve(fileChooser.element()) : null;
952
+ if (input) await input.evaluate((el) => {
953
+ el.dispatchEvent(new Event("input", { bubbles: true }));
954
+ el.dispatchEvent(new Event("change", { bubbles: true }));
955
+ });
956
+ } catch {}
957
+ }).catch(() => {});
958
+ }
959
+ async function armDialogViaPlaywright(opts) {
960
+ const page = await getPageForTargetId(opts);
961
+ const state = ensurePageState(page);
962
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 12e4);
963
+ state.armIdDialog = bumpDialogArmId();
964
+ const armId = state.armIdDialog;
965
+ page.waitForEvent("dialog", { timeout }).then(async (dialog) => {
966
+ if (state.armIdDialog !== armId) return;
967
+ if (opts.accept) await dialog.accept(opts.promptText);
968
+ else await dialog.dismiss();
969
+ }).catch(() => {});
970
+ }
971
+ async function waitForDownloadViaPlaywright(opts) {
972
+ const page = await getPageForTargetId(opts);
973
+ const state = ensurePageState(page);
974
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 12e4);
975
+ state.armIdDownload = bumpDownloadArmId();
976
+ const armId = state.armIdDownload;
977
+ return await awaitDownloadPayload({
978
+ waiter: createPageDownloadWaiter(page, timeout),
979
+ state,
980
+ armId,
981
+ outPath: opts.path
982
+ });
983
+ }
984
+ async function downloadViaPlaywright(opts) {
985
+ const page = await getPageForTargetId(opts);
986
+ const state = ensurePageState(page);
987
+ restoreRoleRefsForTarget({
988
+ cdpUrl: opts.cdpUrl,
989
+ targetId: opts.targetId,
990
+ page
991
+ });
992
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 12e4);
993
+ const ref = requireRef(opts.ref);
994
+ const outPath = String(opts.path ?? "").trim();
995
+ if (!outPath) throw new Error("path is required");
996
+ state.armIdDownload = bumpDownloadArmId();
997
+ const armId = state.armIdDownload;
998
+ const waiter = createPageDownloadWaiter(page, timeout);
999
+ try {
1000
+ const locator = refLocator(page, ref);
1001
+ try {
1002
+ await locator.click({ timeout });
1003
+ } catch (err) {
1004
+ throw toAIFriendlyError(err, ref);
1005
+ }
1006
+ return await awaitDownloadPayload({
1007
+ waiter,
1008
+ state,
1009
+ armId,
1010
+ outPath
1011
+ });
1012
+ } catch (err) {
1013
+ waiter.cancel();
1014
+ throw err;
1015
+ }
1016
+ }
1017
+
1018
+ //#endregion
1019
+ //#region src/browser/pw-tools-core.interactions.ts
1020
+ async function highlightViaPlaywright(opts) {
1021
+ const page = await getPageForTargetId(opts);
1022
+ ensurePageState(page);
1023
+ restoreRoleRefsForTarget({
1024
+ cdpUrl: opts.cdpUrl,
1025
+ targetId: opts.targetId,
1026
+ page
1027
+ });
1028
+ const ref = requireRef(opts.ref);
1029
+ try {
1030
+ await refLocator(page, ref).highlight();
1031
+ } catch (err) {
1032
+ throw toAIFriendlyError(err, ref);
1033
+ }
1034
+ }
1035
+ async function clickViaPlaywright(opts) {
1036
+ const page = await getPageForTargetId({
1037
+ cdpUrl: opts.cdpUrl,
1038
+ targetId: opts.targetId
1039
+ });
1040
+ ensurePageState(page);
1041
+ restoreRoleRefsForTarget({
1042
+ cdpUrl: opts.cdpUrl,
1043
+ targetId: opts.targetId,
1044
+ page
1045
+ });
1046
+ const ref = requireRef(opts.ref);
1047
+ const locator = refLocator(page, ref);
1048
+ const timeout = Math.max(500, Math.min(6e4, Math.floor(opts.timeoutMs ?? 8e3)));
1049
+ try {
1050
+ if (opts.doubleClick) await locator.dblclick({
1051
+ timeout,
1052
+ button: opts.button,
1053
+ modifiers: opts.modifiers
1054
+ });
1055
+ else await locator.click({
1056
+ timeout,
1057
+ button: opts.button,
1058
+ modifiers: opts.modifiers
1059
+ });
1060
+ } catch (err) {
1061
+ throw toAIFriendlyError(err, ref);
1062
+ }
1063
+ }
1064
+ async function hoverViaPlaywright(opts) {
1065
+ const ref = requireRef(opts.ref);
1066
+ const page = await getPageForTargetId(opts);
1067
+ ensurePageState(page);
1068
+ restoreRoleRefsForTarget({
1069
+ cdpUrl: opts.cdpUrl,
1070
+ targetId: opts.targetId,
1071
+ page
1072
+ });
1073
+ try {
1074
+ await refLocator(page, ref).hover({ timeout: Math.max(500, Math.min(6e4, opts.timeoutMs ?? 8e3)) });
1075
+ } catch (err) {
1076
+ throw toAIFriendlyError(err, ref);
1077
+ }
1078
+ }
1079
+ async function dragViaPlaywright(opts) {
1080
+ const startRef = requireRef(opts.startRef);
1081
+ const endRef = requireRef(opts.endRef);
1082
+ if (!startRef || !endRef) throw new Error("startRef and endRef are required");
1083
+ const page = await getPageForTargetId(opts);
1084
+ ensurePageState(page);
1085
+ restoreRoleRefsForTarget({
1086
+ cdpUrl: opts.cdpUrl,
1087
+ targetId: opts.targetId,
1088
+ page
1089
+ });
1090
+ try {
1091
+ await refLocator(page, startRef).dragTo(refLocator(page, endRef), { timeout: Math.max(500, Math.min(6e4, opts.timeoutMs ?? 8e3)) });
1092
+ } catch (err) {
1093
+ throw toAIFriendlyError(err, `${startRef} -> ${endRef}`);
1094
+ }
1095
+ }
1096
+ async function selectOptionViaPlaywright(opts) {
1097
+ const ref = requireRef(opts.ref);
1098
+ if (!opts.values?.length) throw new Error("values are required");
1099
+ const page = await getPageForTargetId(opts);
1100
+ ensurePageState(page);
1101
+ restoreRoleRefsForTarget({
1102
+ cdpUrl: opts.cdpUrl,
1103
+ targetId: opts.targetId,
1104
+ page
1105
+ });
1106
+ try {
1107
+ await refLocator(page, ref).selectOption(opts.values, { timeout: Math.max(500, Math.min(6e4, opts.timeoutMs ?? 8e3)) });
1108
+ } catch (err) {
1109
+ throw toAIFriendlyError(err, ref);
1110
+ }
1111
+ }
1112
+ async function pressKeyViaPlaywright(opts) {
1113
+ const key = String(opts.key ?? "").trim();
1114
+ if (!key) throw new Error("key is required");
1115
+ const page = await getPageForTargetId(opts);
1116
+ ensurePageState(page);
1117
+ await page.keyboard.press(key, { delay: Math.max(0, Math.floor(opts.delayMs ?? 0)) });
1118
+ }
1119
+ async function typeViaPlaywright(opts) {
1120
+ const text = String(opts.text ?? "");
1121
+ const page = await getPageForTargetId(opts);
1122
+ ensurePageState(page);
1123
+ restoreRoleRefsForTarget({
1124
+ cdpUrl: opts.cdpUrl,
1125
+ targetId: opts.targetId,
1126
+ page
1127
+ });
1128
+ const ref = requireRef(opts.ref);
1129
+ const locator = refLocator(page, ref);
1130
+ const timeout = Math.max(500, Math.min(6e4, opts.timeoutMs ?? 8e3));
1131
+ try {
1132
+ if (opts.slowly) {
1133
+ await locator.click({ timeout });
1134
+ await locator.type(text, {
1135
+ timeout,
1136
+ delay: 75
1137
+ });
1138
+ } else await locator.fill(text, { timeout });
1139
+ if (opts.submit) await locator.press("Enter", { timeout });
1140
+ } catch (err) {
1141
+ throw toAIFriendlyError(err, ref);
1142
+ }
1143
+ }
1144
+ async function fillFormViaPlaywright(opts) {
1145
+ const page = await getPageForTargetId(opts);
1146
+ ensurePageState(page);
1147
+ restoreRoleRefsForTarget({
1148
+ cdpUrl: opts.cdpUrl,
1149
+ targetId: opts.targetId,
1150
+ page
1151
+ });
1152
+ const timeout = Math.max(500, Math.min(6e4, opts.timeoutMs ?? 8e3));
1153
+ for (const field of opts.fields) {
1154
+ const ref = field.ref.trim();
1155
+ const type = field.type.trim();
1156
+ const rawValue = field.value;
1157
+ const value = typeof rawValue === "string" ? rawValue : typeof rawValue === "number" || typeof rawValue === "boolean" ? String(rawValue) : "";
1158
+ if (!ref || !type) continue;
1159
+ const locator = refLocator(page, ref);
1160
+ if (type === "checkbox" || type === "radio") {
1161
+ const checked = rawValue === true || rawValue === 1 || rawValue === "1" || rawValue === "true";
1162
+ try {
1163
+ await locator.setChecked(checked, { timeout });
1164
+ } catch (err) {
1165
+ throw toAIFriendlyError(err, ref);
1166
+ }
1167
+ continue;
1168
+ }
1169
+ try {
1170
+ await locator.fill(value, { timeout });
1171
+ } catch (err) {
1172
+ throw toAIFriendlyError(err, ref);
1173
+ }
1174
+ }
1175
+ }
1176
+ async function evaluateViaPlaywright(opts) {
1177
+ const fnText = String(opts.fn ?? "").trim();
1178
+ if (!fnText) throw new Error("function is required");
1179
+ const page = await getPageForTargetId(opts);
1180
+ ensurePageState(page);
1181
+ restoreRoleRefsForTarget({
1182
+ cdpUrl: opts.cdpUrl,
1183
+ targetId: opts.targetId,
1184
+ page
1185
+ });
1186
+ const outerTimeout = normalizeTimeoutMs(opts.timeoutMs, 2e4);
1187
+ let evaluateTimeout = Math.max(1e3, Math.min(12e4, outerTimeout - 500));
1188
+ evaluateTimeout = Math.min(evaluateTimeout, outerTimeout);
1189
+ const signal = opts.signal;
1190
+ let abortListener;
1191
+ let abortReject;
1192
+ let abortPromise;
1193
+ if (signal) {
1194
+ abortPromise = new Promise((_, reject) => {
1195
+ abortReject = reject;
1196
+ });
1197
+ abortPromise.catch(() => {});
1198
+ }
1199
+ if (signal) {
1200
+ const disconnect = () => {
1201
+ forceDisconnectPlaywrightForTarget({
1202
+ cdpUrl: opts.cdpUrl,
1203
+ targetId: opts.targetId,
1204
+ reason: "evaluate aborted"
1205
+ }).catch(() => {});
1206
+ };
1207
+ if (signal.aborted) {
1208
+ disconnect();
1209
+ throw signal.reason ?? /* @__PURE__ */ new Error("aborted");
1210
+ }
1211
+ abortListener = () => {
1212
+ disconnect();
1213
+ abortReject?.(signal.reason ?? /* @__PURE__ */ new Error("aborted"));
1214
+ };
1215
+ signal.addEventListener("abort", abortListener, { once: true });
1216
+ if (signal.aborted) {
1217
+ abortListener();
1218
+ throw signal.reason ?? /* @__PURE__ */ new Error("aborted");
1219
+ }
1220
+ }
1221
+ try {
1222
+ if (opts.ref) {
1223
+ const locator = refLocator(page, opts.ref);
1224
+ const elementEvaluator = new Function("el", "args", `
1225
+ "use strict";
1226
+ var fnBody = args.fnBody, timeoutMs = args.timeoutMs;
1227
+ try {
1228
+ var candidate = eval("(" + fnBody + ")");
1229
+ var result = typeof candidate === "function" ? candidate(el) : candidate;
1230
+ if (result && typeof result.then === "function") {
1231
+ return Promise.race([
1232
+ result,
1233
+ new Promise(function(_, reject) {
1234
+ setTimeout(function() { reject(new Error("evaluate timed out after " + timeoutMs + "ms")); }, timeoutMs);
1235
+ })
1236
+ ]);
1237
+ }
1238
+ return result;
1239
+ } catch (err) {
1240
+ throw new Error("Invalid evaluate function: " + (err && err.message ? err.message : String(err)));
1241
+ }
1242
+ `);
1243
+ const evalPromise = locator.evaluate(elementEvaluator, {
1244
+ fnBody: fnText,
1245
+ timeoutMs: evaluateTimeout
1246
+ });
1247
+ if (!abortPromise) return await evalPromise;
1248
+ try {
1249
+ return await Promise.race([evalPromise, abortPromise]);
1250
+ } catch (err) {
1251
+ evalPromise.catch(() => {});
1252
+ throw err;
1253
+ }
1254
+ }
1255
+ const browserEvaluator = new Function("args", `
1256
+ "use strict";
1257
+ var fnBody = args.fnBody, timeoutMs = args.timeoutMs;
1258
+ try {
1259
+ var candidate = eval("(" + fnBody + ")");
1260
+ var result = typeof candidate === "function" ? candidate() : candidate;
1261
+ if (result && typeof result.then === "function") {
1262
+ return Promise.race([
1263
+ result,
1264
+ new Promise(function(_, reject) {
1265
+ setTimeout(function() { reject(new Error("evaluate timed out after " + timeoutMs + "ms")); }, timeoutMs);
1266
+ })
1267
+ ]);
1268
+ }
1269
+ return result;
1270
+ } catch (err) {
1271
+ throw new Error("Invalid evaluate function: " + (err && err.message ? err.message : String(err)));
1272
+ }
1273
+ `);
1274
+ const evalPromise = page.evaluate(browserEvaluator, {
1275
+ fnBody: fnText,
1276
+ timeoutMs: evaluateTimeout
1277
+ });
1278
+ if (!abortPromise) return await evalPromise;
1279
+ try {
1280
+ return await Promise.race([evalPromise, abortPromise]);
1281
+ } catch (err) {
1282
+ evalPromise.catch(() => {});
1283
+ throw err;
1284
+ }
1285
+ } finally {
1286
+ if (signal && abortListener) signal.removeEventListener("abort", abortListener);
1287
+ }
1288
+ }
1289
+ async function scrollIntoViewViaPlaywright(opts) {
1290
+ const page = await getPageForTargetId(opts);
1291
+ ensurePageState(page);
1292
+ restoreRoleRefsForTarget({
1293
+ cdpUrl: opts.cdpUrl,
1294
+ targetId: opts.targetId,
1295
+ page
1296
+ });
1297
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 2e4);
1298
+ const ref = requireRef(opts.ref);
1299
+ const locator = refLocator(page, ref);
1300
+ try {
1301
+ await locator.scrollIntoViewIfNeeded({ timeout });
1302
+ } catch (err) {
1303
+ throw toAIFriendlyError(err, ref);
1304
+ }
1305
+ }
1306
+ async function waitForViaPlaywright(opts) {
1307
+ const page = await getPageForTargetId(opts);
1308
+ ensurePageState(page);
1309
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 2e4);
1310
+ if (typeof opts.timeMs === "number" && Number.isFinite(opts.timeMs)) await page.waitForTimeout(Math.max(0, opts.timeMs));
1311
+ if (opts.text) await page.getByText(opts.text).first().waitFor({
1312
+ state: "visible",
1313
+ timeout
1314
+ });
1315
+ if (opts.textGone) await page.getByText(opts.textGone).first().waitFor({
1316
+ state: "hidden",
1317
+ timeout
1318
+ });
1319
+ if (opts.selector) {
1320
+ const selector = String(opts.selector).trim();
1321
+ if (selector) await page.locator(selector).first().waitFor({
1322
+ state: "visible",
1323
+ timeout
1324
+ });
1325
+ }
1326
+ if (opts.url) {
1327
+ const url = String(opts.url).trim();
1328
+ if (url) await page.waitForURL(url, { timeout });
1329
+ }
1330
+ if (opts.loadState) await page.waitForLoadState(opts.loadState, { timeout });
1331
+ if (opts.fn) {
1332
+ const fn = String(opts.fn).trim();
1333
+ if (fn) await page.waitForFunction(fn, { timeout });
1334
+ }
1335
+ }
1336
+ async function takeScreenshotViaPlaywright(opts) {
1337
+ const page = await getPageForTargetId(opts);
1338
+ ensurePageState(page);
1339
+ restoreRoleRefsForTarget({
1340
+ cdpUrl: opts.cdpUrl,
1341
+ targetId: opts.targetId,
1342
+ page
1343
+ });
1344
+ const type = opts.type ?? "png";
1345
+ if (opts.ref) {
1346
+ if (opts.fullPage) throw new Error("fullPage is not supported for element screenshots");
1347
+ return { buffer: await refLocator(page, opts.ref).screenshot({ type }) };
1348
+ }
1349
+ if (opts.element) {
1350
+ if (opts.fullPage) throw new Error("fullPage is not supported for element screenshots");
1351
+ return { buffer: await page.locator(opts.element).first().screenshot({ type }) };
1352
+ }
1353
+ return { buffer: await page.screenshot({
1354
+ type,
1355
+ fullPage: Boolean(opts.fullPage)
1356
+ }) };
1357
+ }
1358
+ async function screenshotWithLabelsViaPlaywright(opts) {
1359
+ const page = await getPageForTargetId(opts);
1360
+ ensurePageState(page);
1361
+ restoreRoleRefsForTarget({
1362
+ cdpUrl: opts.cdpUrl,
1363
+ targetId: opts.targetId,
1364
+ page
1365
+ });
1366
+ const type = opts.type ?? "png";
1367
+ const maxLabels = typeof opts.maxLabels === "number" && Number.isFinite(opts.maxLabels) ? Math.max(1, Math.floor(opts.maxLabels)) : 150;
1368
+ const viewport = await page.evaluate(() => ({
1369
+ scrollX: window.scrollX || 0,
1370
+ scrollY: window.scrollY || 0,
1371
+ width: window.innerWidth || 0,
1372
+ height: window.innerHeight || 0
1373
+ }));
1374
+ const refs = Object.keys(opts.refs ?? {});
1375
+ const boxes = [];
1376
+ let skipped = 0;
1377
+ for (const ref of refs) {
1378
+ if (boxes.length >= maxLabels) {
1379
+ skipped += 1;
1380
+ continue;
1381
+ }
1382
+ try {
1383
+ const box = await refLocator(page, ref).boundingBox();
1384
+ if (!box) {
1385
+ skipped += 1;
1386
+ continue;
1387
+ }
1388
+ const x0 = box.x;
1389
+ const y0 = box.y;
1390
+ const x1 = box.x + box.width;
1391
+ const y1 = box.y + box.height;
1392
+ const vx0 = viewport.scrollX;
1393
+ const vy0 = viewport.scrollY;
1394
+ const vx1 = viewport.scrollX + viewport.width;
1395
+ const vy1 = viewport.scrollY + viewport.height;
1396
+ if (x1 < vx0 || x0 > vx1 || y1 < vy0 || y0 > vy1) {
1397
+ skipped += 1;
1398
+ continue;
1399
+ }
1400
+ boxes.push({
1401
+ ref,
1402
+ x: x0 - viewport.scrollX,
1403
+ y: y0 - viewport.scrollY,
1404
+ w: Math.max(1, box.width),
1405
+ h: Math.max(1, box.height)
1406
+ });
1407
+ } catch {
1408
+ skipped += 1;
1409
+ }
1410
+ }
1411
+ try {
1412
+ if (boxes.length > 0) await page.evaluate((labels) => {
1413
+ document.querySelectorAll("[data-remoteclaw-labels]").forEach((el) => el.remove());
1414
+ const root = document.createElement("div");
1415
+ root.setAttribute("data-remoteclaw-labels", "1");
1416
+ root.style.position = "fixed";
1417
+ root.style.left = "0";
1418
+ root.style.top = "0";
1419
+ root.style.zIndex = "2147483647";
1420
+ root.style.pointerEvents = "none";
1421
+ root.style.fontFamily = "\"SF Mono\",\"SFMono-Regular\",Menlo,Monaco,Consolas,\"Liberation Mono\",\"Courier New\",monospace";
1422
+ const clamp = (value, min, max) => Math.min(max, Math.max(min, value));
1423
+ for (const label of labels) {
1424
+ const box = document.createElement("div");
1425
+ box.setAttribute("data-remoteclaw-labels", "1");
1426
+ box.style.position = "absolute";
1427
+ box.style.left = `${label.x}px`;
1428
+ box.style.top = `${label.y}px`;
1429
+ box.style.width = `${label.w}px`;
1430
+ box.style.height = `${label.h}px`;
1431
+ box.style.border = "2px solid #ffb020";
1432
+ box.style.boxSizing = "border-box";
1433
+ const tag = document.createElement("div");
1434
+ tag.setAttribute("data-remoteclaw-labels", "1");
1435
+ tag.textContent = label.ref;
1436
+ tag.style.position = "absolute";
1437
+ tag.style.left = `${label.x}px`;
1438
+ tag.style.top = `${clamp(label.y - 18, 0, 2e4)}px`;
1439
+ tag.style.background = "#ffb020";
1440
+ tag.style.color = "#1a1a1a";
1441
+ tag.style.fontSize = "12px";
1442
+ tag.style.lineHeight = "14px";
1443
+ tag.style.padding = "1px 4px";
1444
+ tag.style.borderRadius = "3px";
1445
+ tag.style.boxShadow = "0 1px 2px rgba(0,0,0,0.35)";
1446
+ tag.style.whiteSpace = "nowrap";
1447
+ root.appendChild(box);
1448
+ root.appendChild(tag);
1449
+ }
1450
+ document.documentElement.appendChild(root);
1451
+ }, boxes);
1452
+ return {
1453
+ buffer: await page.screenshot({ type }),
1454
+ labels: boxes.length,
1455
+ skipped
1456
+ };
1457
+ } finally {
1458
+ await page.evaluate(() => {
1459
+ document.querySelectorAll("[data-remoteclaw-labels]").forEach((el) => el.remove());
1460
+ }).catch(() => {});
1461
+ }
1462
+ }
1463
+ async function setInputFilesViaPlaywright(opts) {
1464
+ const page = await getPageForTargetId(opts);
1465
+ ensurePageState(page);
1466
+ restoreRoleRefsForTarget({
1467
+ cdpUrl: opts.cdpUrl,
1468
+ targetId: opts.targetId,
1469
+ page
1470
+ });
1471
+ if (!opts.paths.length) throw new Error("paths are required");
1472
+ const inputRef = typeof opts.inputRef === "string" ? opts.inputRef.trim() : "";
1473
+ const element = typeof opts.element === "string" ? opts.element.trim() : "";
1474
+ if (inputRef && element) throw new Error("inputRef and element are mutually exclusive");
1475
+ if (!inputRef && !element) throw new Error("inputRef or element is required");
1476
+ const locator = inputRef ? refLocator(page, inputRef) : page.locator(element).first();
1477
+ try {
1478
+ await locator.setInputFiles(opts.paths);
1479
+ } catch (err) {
1480
+ throw toAIFriendlyError(err, inputRef || element);
1481
+ }
1482
+ try {
1483
+ const handle = await locator.elementHandle();
1484
+ if (handle) await handle.evaluate((el) => {
1485
+ el.dispatchEvent(new Event("input", { bubbles: true }));
1486
+ el.dispatchEvent(new Event("change", { bubbles: true }));
1487
+ });
1488
+ } catch {}
1489
+ }
1490
+
1491
+ //#endregion
1492
+ //#region src/browser/pw-tools-core.responses.ts
1493
+ function matchUrlPattern(pattern, url) {
1494
+ const p = pattern.trim();
1495
+ if (!p) return false;
1496
+ if (p === url) return true;
1497
+ if (p.includes("*")) {
1498
+ const escaped = p.replace(/[|\\{}()[\]^$+?.]/g, "\\$&");
1499
+ return new RegExp(`^${escaped.replace(/\*\*/g, ".*").replace(/\*/g, ".*")}$`).test(url);
1500
+ }
1501
+ return url.includes(p);
1502
+ }
1503
+ async function responseBodyViaPlaywright(opts) {
1504
+ const pattern = String(opts.url ?? "").trim();
1505
+ if (!pattern) throw new Error("url is required");
1506
+ const maxChars = typeof opts.maxChars === "number" && Number.isFinite(opts.maxChars) ? Math.max(1, Math.min(5e6, Math.floor(opts.maxChars))) : 2e5;
1507
+ const timeout = normalizeTimeoutMs(opts.timeoutMs, 2e4);
1508
+ const page = await getPageForTargetId(opts);
1509
+ ensurePageState(page);
1510
+ const resp = await new Promise((resolve, reject) => {
1511
+ let done = false;
1512
+ let timer;
1513
+ let handler;
1514
+ const cleanup = () => {
1515
+ if (timer) clearTimeout(timer);
1516
+ timer = void 0;
1517
+ if (handler) page.off("response", handler);
1518
+ };
1519
+ handler = (resp) => {
1520
+ if (done) return;
1521
+ if (!matchUrlPattern(pattern, resp.url?.() || "")) return;
1522
+ done = true;
1523
+ cleanup();
1524
+ resolve(resp);
1525
+ };
1526
+ page.on("response", handler);
1527
+ timer = setTimeout(() => {
1528
+ if (done) return;
1529
+ done = true;
1530
+ cleanup();
1531
+ reject(/* @__PURE__ */ new Error(`Response not found for url pattern "${pattern}". Run '${formatCliCommand("remoteclaw browser requests")}' to inspect recent network activity.`));
1532
+ }, timeout);
1533
+ });
1534
+ const url = resp.url?.() || "";
1535
+ const status = resp.status?.();
1536
+ const headers = resp.headers?.();
1537
+ let bodyText = "";
1538
+ try {
1539
+ if (typeof resp.text === "function") bodyText = await resp.text();
1540
+ else if (typeof resp.body === "function") {
1541
+ const buf = await resp.body();
1542
+ bodyText = new TextDecoder("utf-8").decode(buf);
1543
+ }
1544
+ } catch (err) {
1545
+ throw new Error(`Failed to read response body for "${url}": ${String(err)}`, { cause: err });
1546
+ }
1547
+ return {
1548
+ url,
1549
+ status,
1550
+ headers,
1551
+ body: bodyText.length > maxChars ? bodyText.slice(0, maxChars) : bodyText,
1552
+ truncated: bodyText.length > maxChars ? true : void 0
1553
+ };
1554
+ }
1555
+
1556
+ //#endregion
1557
+ //#region src/browser/pw-tools-core.snapshot.ts
1558
+ async function snapshotAriaViaPlaywright(opts) {
1559
+ const limit = Math.max(1, Math.min(2e3, Math.floor(opts.limit ?? 500)));
1560
+ const page = await getPageForTargetId({
1561
+ cdpUrl: opts.cdpUrl,
1562
+ targetId: opts.targetId
1563
+ });
1564
+ ensurePageState(page);
1565
+ const session = await page.context().newCDPSession(page);
1566
+ try {
1567
+ await session.send("Accessibility.enable").catch(() => {});
1568
+ const res = await session.send("Accessibility.getFullAXTree");
1569
+ return { nodes: formatAriaSnapshot(Array.isArray(res?.nodes) ? res.nodes : [], limit) };
1570
+ } finally {
1571
+ await session.detach().catch(() => {});
1572
+ }
1573
+ }
1574
+ async function snapshotAiViaPlaywright(opts) {
1575
+ const page = await getPageForTargetId({
1576
+ cdpUrl: opts.cdpUrl,
1577
+ targetId: opts.targetId
1578
+ });
1579
+ ensurePageState(page);
1580
+ const maybe = page;
1581
+ if (!maybe._snapshotForAI) throw new Error("Playwright _snapshotForAI is not available. Upgrade playwright-core.");
1582
+ const result = await maybe._snapshotForAI({
1583
+ timeout: Math.max(500, Math.min(6e4, Math.floor(opts.timeoutMs ?? 5e3))),
1584
+ track: "response"
1585
+ });
1586
+ let snapshot = String(result?.full ?? "");
1587
+ const maxChars = opts.maxChars;
1588
+ const limit = typeof maxChars === "number" && Number.isFinite(maxChars) && maxChars > 0 ? Math.floor(maxChars) : void 0;
1589
+ let truncated = false;
1590
+ if (limit && snapshot.length > limit) {
1591
+ snapshot = `${snapshot.slice(0, limit)}\n\n[...TRUNCATED - page too large]`;
1592
+ truncated = true;
1593
+ }
1594
+ const built = buildRoleSnapshotFromAiSnapshot(snapshot);
1595
+ storeRoleRefsForTarget({
1596
+ page,
1597
+ cdpUrl: opts.cdpUrl,
1598
+ targetId: opts.targetId,
1599
+ refs: built.refs,
1600
+ mode: "aria"
1601
+ });
1602
+ return truncated ? {
1603
+ snapshot,
1604
+ truncated,
1605
+ refs: built.refs
1606
+ } : {
1607
+ snapshot,
1608
+ refs: built.refs
1609
+ };
1610
+ }
1611
+ async function snapshotRoleViaPlaywright(opts) {
1612
+ const page = await getPageForTargetId({
1613
+ cdpUrl: opts.cdpUrl,
1614
+ targetId: opts.targetId
1615
+ });
1616
+ ensurePageState(page);
1617
+ if (opts.refsMode === "aria") {
1618
+ if (opts.selector?.trim() || opts.frameSelector?.trim()) throw new Error("refs=aria does not support selector/frame snapshots yet.");
1619
+ const maybe = page;
1620
+ if (!maybe._snapshotForAI) throw new Error("refs=aria requires Playwright _snapshotForAI support.");
1621
+ const result = await maybe._snapshotForAI({
1622
+ timeout: 5e3,
1623
+ track: "response"
1624
+ });
1625
+ const built = buildRoleSnapshotFromAiSnapshot(String(result?.full ?? ""), opts.options);
1626
+ storeRoleRefsForTarget({
1627
+ page,
1628
+ cdpUrl: opts.cdpUrl,
1629
+ targetId: opts.targetId,
1630
+ refs: built.refs,
1631
+ mode: "aria"
1632
+ });
1633
+ return {
1634
+ snapshot: built.snapshot,
1635
+ refs: built.refs,
1636
+ stats: getRoleSnapshotStats(built.snapshot, built.refs)
1637
+ };
1638
+ }
1639
+ const frameSelector = opts.frameSelector?.trim() || "";
1640
+ const selector = opts.selector?.trim() || "";
1641
+ const ariaSnapshot = await (frameSelector ? selector ? page.frameLocator(frameSelector).locator(selector) : page.frameLocator(frameSelector).locator(":root") : selector ? page.locator(selector) : page.locator(":root")).ariaSnapshot();
1642
+ const built = buildRoleSnapshotFromAriaSnapshot(String(ariaSnapshot ?? ""), opts.options);
1643
+ storeRoleRefsForTarget({
1644
+ page,
1645
+ cdpUrl: opts.cdpUrl,
1646
+ targetId: opts.targetId,
1647
+ refs: built.refs,
1648
+ frameSelector: frameSelector || void 0,
1649
+ mode: "role"
1650
+ });
1651
+ return {
1652
+ snapshot: built.snapshot,
1653
+ refs: built.refs,
1654
+ stats: getRoleSnapshotStats(built.snapshot, built.refs)
1655
+ };
1656
+ }
1657
+ async function navigateViaPlaywright(opts) {
1658
+ const url = String(opts.url ?? "").trim();
1659
+ if (!url) throw new Error("url is required");
1660
+ await assertBrowserNavigationAllowed({
1661
+ url,
1662
+ ...withBrowserNavigationPolicy(opts.ssrfPolicy)
1663
+ });
1664
+ const page = await getPageForTargetId(opts);
1665
+ ensurePageState(page);
1666
+ await page.goto(url, { timeout: Math.max(1e3, Math.min(12e4, opts.timeoutMs ?? 2e4)) });
1667
+ const finalUrl = page.url();
1668
+ await assertBrowserNavigationResultAllowed({
1669
+ url: finalUrl,
1670
+ ...withBrowserNavigationPolicy(opts.ssrfPolicy)
1671
+ });
1672
+ return { url: finalUrl };
1673
+ }
1674
+ async function resizeViewportViaPlaywright(opts) {
1675
+ const page = await getPageForTargetId(opts);
1676
+ ensurePageState(page);
1677
+ await page.setViewportSize({
1678
+ width: Math.max(1, Math.floor(opts.width)),
1679
+ height: Math.max(1, Math.floor(opts.height))
1680
+ });
1681
+ }
1682
+ async function closePageViaPlaywright(opts) {
1683
+ const page = await getPageForTargetId(opts);
1684
+ ensurePageState(page);
1685
+ await page.close();
1686
+ }
1687
+ async function pdfViaPlaywright(opts) {
1688
+ const page = await getPageForTargetId(opts);
1689
+ ensurePageState(page);
1690
+ return { buffer: await page.pdf({ printBackground: true }) };
1691
+ }
1692
+
1693
+ //#endregion
1694
+ //#region src/browser/pw-tools-core.state.ts
1695
+ async function withCdpSession(page, fn) {
1696
+ const session = await page.context().newCDPSession(page);
1697
+ try {
1698
+ return await fn(session);
1699
+ } finally {
1700
+ await session.detach().catch(() => {});
1701
+ }
1702
+ }
1703
+ async function setOfflineViaPlaywright(opts) {
1704
+ const page = await getPageForTargetId(opts);
1705
+ ensurePageState(page);
1706
+ await page.context().setOffline(Boolean(opts.offline));
1707
+ }
1708
+ async function setExtraHTTPHeadersViaPlaywright(opts) {
1709
+ const page = await getPageForTargetId(opts);
1710
+ ensurePageState(page);
1711
+ await page.context().setExtraHTTPHeaders(opts.headers);
1712
+ }
1713
+ async function setHttpCredentialsViaPlaywright(opts) {
1714
+ const page = await getPageForTargetId(opts);
1715
+ ensurePageState(page);
1716
+ if (opts.clear) {
1717
+ await page.context().setHTTPCredentials(null);
1718
+ return;
1719
+ }
1720
+ const username = String(opts.username ?? "");
1721
+ const password = String(opts.password ?? "");
1722
+ if (!username) throw new Error("username is required (or set clear=true)");
1723
+ await page.context().setHTTPCredentials({
1724
+ username,
1725
+ password
1726
+ });
1727
+ }
1728
+ async function setGeolocationViaPlaywright(opts) {
1729
+ const page = await getPageForTargetId(opts);
1730
+ ensurePageState(page);
1731
+ const context = page.context();
1732
+ if (opts.clear) {
1733
+ await context.setGeolocation(null);
1734
+ await context.clearPermissions().catch(() => {});
1735
+ return;
1736
+ }
1737
+ if (typeof opts.latitude !== "number" || typeof opts.longitude !== "number") throw new Error("latitude and longitude are required (or set clear=true)");
1738
+ await context.setGeolocation({
1739
+ latitude: opts.latitude,
1740
+ longitude: opts.longitude,
1741
+ accuracy: typeof opts.accuracy === "number" ? opts.accuracy : void 0
1742
+ });
1743
+ const origin = opts.origin?.trim() || (() => {
1744
+ try {
1745
+ return new URL(page.url()).origin;
1746
+ } catch {
1747
+ return "";
1748
+ }
1749
+ })();
1750
+ if (origin) await context.grantPermissions(["geolocation"], { origin }).catch(() => {});
1751
+ }
1752
+ async function emulateMediaViaPlaywright(opts) {
1753
+ const page = await getPageForTargetId(opts);
1754
+ ensurePageState(page);
1755
+ await page.emulateMedia({ colorScheme: opts.colorScheme });
1756
+ }
1757
+ async function setLocaleViaPlaywright(opts) {
1758
+ const page = await getPageForTargetId(opts);
1759
+ ensurePageState(page);
1760
+ const locale = String(opts.locale ?? "").trim();
1761
+ if (!locale) throw new Error("locale is required");
1762
+ await withCdpSession(page, async (session) => {
1763
+ try {
1764
+ await session.send("Emulation.setLocaleOverride", { locale });
1765
+ } catch (err) {
1766
+ if (String(err).includes("Another locale override is already in effect")) return;
1767
+ throw err;
1768
+ }
1769
+ });
1770
+ }
1771
+ async function setTimezoneViaPlaywright(opts) {
1772
+ const page = await getPageForTargetId(opts);
1773
+ ensurePageState(page);
1774
+ const timezoneId = String(opts.timezoneId ?? "").trim();
1775
+ if (!timezoneId) throw new Error("timezoneId is required");
1776
+ await withCdpSession(page, async (session) => {
1777
+ try {
1778
+ await session.send("Emulation.setTimezoneOverride", { timezoneId });
1779
+ } catch (err) {
1780
+ const msg = String(err);
1781
+ if (msg.includes("Timezone override is already in effect")) return;
1782
+ if (msg.includes("Invalid timezone")) throw new Error(`Invalid timezone ID: ${timezoneId}`, { cause: err });
1783
+ throw err;
1784
+ }
1785
+ });
1786
+ }
1787
+ async function setDeviceViaPlaywright(opts) {
1788
+ const page = await getPageForTargetId(opts);
1789
+ ensurePageState(page);
1790
+ const name = String(opts.name ?? "").trim();
1791
+ if (!name) throw new Error("device name is required");
1792
+ const descriptor = devices[name];
1793
+ if (!descriptor) throw new Error(`Unknown device "${name}".`);
1794
+ if (descriptor.viewport) await page.setViewportSize({
1795
+ width: descriptor.viewport.width,
1796
+ height: descriptor.viewport.height
1797
+ });
1798
+ await withCdpSession(page, async (session) => {
1799
+ if (descriptor.userAgent || descriptor.locale) await session.send("Emulation.setUserAgentOverride", {
1800
+ userAgent: descriptor.userAgent ?? "",
1801
+ acceptLanguage: descriptor.locale ?? void 0
1802
+ });
1803
+ if (descriptor.viewport) await session.send("Emulation.setDeviceMetricsOverride", {
1804
+ mobile: Boolean(descriptor.isMobile),
1805
+ width: descriptor.viewport.width,
1806
+ height: descriptor.viewport.height,
1807
+ deviceScaleFactor: descriptor.deviceScaleFactor ?? 1,
1808
+ screenWidth: descriptor.viewport.width,
1809
+ screenHeight: descriptor.viewport.height
1810
+ });
1811
+ if (descriptor.hasTouch) await session.send("Emulation.setTouchEmulationEnabled", { enabled: true });
1812
+ });
1813
+ }
1814
+
1815
+ //#endregion
1816
+ //#region src/browser/pw-tools-core.storage.ts
1817
+ async function cookiesGetViaPlaywright(opts) {
1818
+ const page = await getPageForTargetId(opts);
1819
+ ensurePageState(page);
1820
+ return { cookies: await page.context().cookies() };
1821
+ }
1822
+ async function cookiesSetViaPlaywright(opts) {
1823
+ const page = await getPageForTargetId(opts);
1824
+ ensurePageState(page);
1825
+ const cookie = opts.cookie;
1826
+ if (!cookie.name || cookie.value === void 0) throw new Error("cookie name and value are required");
1827
+ const hasUrl = typeof cookie.url === "string" && cookie.url.trim();
1828
+ const hasDomainPath = typeof cookie.domain === "string" && cookie.domain.trim() && typeof cookie.path === "string" && cookie.path.trim();
1829
+ if (!hasUrl && !hasDomainPath) throw new Error("cookie requires url, or domain+path");
1830
+ await page.context().addCookies([cookie]);
1831
+ }
1832
+ async function cookiesClearViaPlaywright(opts) {
1833
+ const page = await getPageForTargetId(opts);
1834
+ ensurePageState(page);
1835
+ await page.context().clearCookies();
1836
+ }
1837
+ async function storageGetViaPlaywright(opts) {
1838
+ const page = await getPageForTargetId(opts);
1839
+ ensurePageState(page);
1840
+ const kind = opts.kind;
1841
+ const key = typeof opts.key === "string" ? opts.key : void 0;
1842
+ return { values: await page.evaluate(({ kind: kind2, key: key2 }) => {
1843
+ const store = kind2 === "session" ? window.sessionStorage : window.localStorage;
1844
+ if (key2) {
1845
+ const value = store.getItem(key2);
1846
+ return value === null ? {} : { [key2]: value };
1847
+ }
1848
+ const out = {};
1849
+ for (let i = 0; i < store.length; i += 1) {
1850
+ const k = store.key(i);
1851
+ if (!k) continue;
1852
+ const v = store.getItem(k);
1853
+ if (v !== null) out[k] = v;
1854
+ }
1855
+ return out;
1856
+ }, {
1857
+ kind,
1858
+ key
1859
+ }) ?? {} };
1860
+ }
1861
+ async function storageSetViaPlaywright(opts) {
1862
+ const page = await getPageForTargetId(opts);
1863
+ ensurePageState(page);
1864
+ const key = String(opts.key ?? "");
1865
+ if (!key) throw new Error("key is required");
1866
+ await page.evaluate(({ kind, key: k, value }) => {
1867
+ (kind === "session" ? window.sessionStorage : window.localStorage).setItem(k, value);
1868
+ }, {
1869
+ kind: opts.kind,
1870
+ key,
1871
+ value: String(opts.value ?? "")
1872
+ });
1873
+ }
1874
+ async function storageClearViaPlaywright(opts) {
1875
+ const page = await getPageForTargetId(opts);
1876
+ ensurePageState(page);
1877
+ await page.evaluate(({ kind }) => {
1878
+ (kind === "session" ? window.sessionStorage : window.localStorage).clear();
1879
+ }, { kind: opts.kind });
1880
+ }
1881
+
1882
+ //#endregion
1883
+ //#region src/browser/pw-tools-core.trace.ts
1884
+ async function traceStartViaPlaywright(opts) {
1885
+ const context = (await getPageForTargetId(opts)).context();
1886
+ const ctxState = ensureContextState(context);
1887
+ if (ctxState.traceActive) throw new Error("Trace already running. Stop the current trace before starting a new one.");
1888
+ await context.tracing.start({
1889
+ screenshots: opts.screenshots ?? true,
1890
+ snapshots: opts.snapshots ?? true,
1891
+ sources: opts.sources ?? false
1892
+ });
1893
+ ctxState.traceActive = true;
1894
+ }
1895
+ async function traceStopViaPlaywright(opts) {
1896
+ const context = (await getPageForTargetId(opts)).context();
1897
+ const ctxState = ensureContextState(context);
1898
+ if (!ctxState.traceActive) throw new Error("No active trace. Start a trace before stopping it.");
1899
+ await context.tracing.stop({ path: opts.path });
1900
+ ctxState.traceActive = false;
1901
+ }
1902
+
1903
+ //#endregion
1904
+ //#region src/browser/pw-ai.ts
1905
+ markPwAiLoaded();
1906
+
1907
+ //#endregion
1908
+ export { armDialogViaPlaywright, armFileUploadViaPlaywright, clickViaPlaywright, closePageByTargetIdViaPlaywright, closePageViaPlaywright, closePlaywrightBrowserConnection, cookiesClearViaPlaywright, cookiesGetViaPlaywright, cookiesSetViaPlaywright, createPageViaPlaywright, downloadViaPlaywright, dragViaPlaywright, emulateMediaViaPlaywright, ensurePageState, evaluateViaPlaywright, fillFormViaPlaywright, focusPageByTargetIdViaPlaywright, forceDisconnectPlaywrightForTarget, getConsoleMessagesViaPlaywright, getNetworkRequestsViaPlaywright, getPageErrorsViaPlaywright, getPageForTargetId, highlightViaPlaywright, hoverViaPlaywright, listPagesViaPlaywright, navigateViaPlaywright, pdfViaPlaywright, pressKeyViaPlaywright, refLocator, resizeViewportViaPlaywright, responseBodyViaPlaywright, screenshotWithLabelsViaPlaywright, scrollIntoViewViaPlaywright, selectOptionViaPlaywright, setDeviceViaPlaywright, setExtraHTTPHeadersViaPlaywright, setGeolocationViaPlaywright, setHttpCredentialsViaPlaywright, setInputFilesViaPlaywright, setLocaleViaPlaywright, setOfflineViaPlaywright, setTimezoneViaPlaywright, snapshotAiViaPlaywright, snapshotAriaViaPlaywright, snapshotRoleViaPlaywright, storageClearViaPlaywright, storageGetViaPlaywright, storageSetViaPlaywright, takeScreenshotViaPlaywright, traceStartViaPlaywright, traceStopViaPlaywright, typeViaPlaywright, waitForDownloadViaPlaywright, waitForViaPlaywright };