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