@noxsoft/anima 2.0.0

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 (1570) hide show
  1. package/CHANGELOG.md +2065 -0
  2. package/LICENSE +23 -0
  3. package/README.md +47 -0
  4. package/anima.mjs +56 -0
  5. package/dist/accounts-Cc5E4IDO.js +260 -0
  6. package/dist/accounts-CcVrwKqv.js +259 -0
  7. package/dist/acp-cli-BbvR4dNz.js +1081 -0
  8. package/dist/acp-cli-CePIi7gD.js +1084 -0
  9. package/dist/agent-CSrGrAg1.js +725 -0
  10. package/dist/agent-NgeWEcBM.js +725 -0
  11. package/dist/agent-events-UF0DxwKS.js +182 -0
  12. package/dist/agent-scope-BVf4aSwY.js +112 -0
  13. package/dist/agent-scope-OZi7lb8S.js +452 -0
  14. package/dist/agent-scope-V1bi9OYL.js +452 -0
  15. package/dist/agents-Bw06WthM.js +809 -0
  16. package/dist/agents.config-Dvo2ULxs.js +182 -0
  17. package/dist/agents.config-d6H0_3oj.js +182 -0
  18. package/dist/argv-DqUHKf0o.js +73 -0
  19. package/dist/audit-Buja3mbS.js +2401 -0
  20. package/dist/audit-CWIz6mM7.js +2401 -0
  21. package/dist/auth-91o2YM96.js +648 -0
  22. package/dist/auth-choice-7dFCqblU.js +2681 -0
  23. package/dist/auth-choice-S_0K9gpl.js +2681 -0
  24. package/dist/auth-health-CctpRTdC.js +149 -0
  25. package/dist/auth-health-DoHai4eD.js +149 -0
  26. package/dist/auth-lZ26wsbN.js +639 -0
  27. package/dist/auth-profiles-Cz2rxrav.js +2690 -0
  28. package/dist/auth-profiles-_5BsNObq.js +1565 -0
  29. package/dist/banner-ieAUufx9.js +294 -0
  30. package/dist/boolean-Ce2-qkSB.js +30 -0
  31. package/dist/boolean-Wzu0-e0P.js +30 -0
  32. package/dist/brew-CVZkr0GU.js +46 -0
  33. package/dist/brew-DAdyX1_1.js +46 -0
  34. package/dist/browser-cli-D_qgYDik.js +1679 -0
  35. package/dist/browser-cli-DldrdaCW.js +1676 -0
  36. package/dist/budget-ChKARYPY.js +132 -0
  37. package/dist/budget-Dspr6N_e.js +132 -0
  38. package/dist/build-info.json +5 -0
  39. package/dist/bundled/boot-md/HOOK.md +19 -0
  40. package/dist/bundled/boot-md/handler.js +861 -0
  41. package/dist/bundled/bootstrap-extra-files/HOOK.md +53 -0
  42. package/dist/bundled/bootstrap-extra-files/handler.js +39 -0
  43. package/dist/bundled/command-logger/HOOK.md +122 -0
  44. package/dist/bundled/command-logger/handler.js +55 -0
  45. package/dist/bundled/session-memory/HOOK.md +109 -0
  46. package/dist/bundled/session-memory/handler.js +128 -0
  47. package/dist/call-DPzNR_Qi.js +282 -0
  48. package/dist/call-ktoEhkOQ.js +282 -0
  49. package/dist/canvas-host/a2ui/.bundle.hash +1 -0
  50. package/dist/canvas-host/a2ui/a2ui.bundle.js +19040 -0
  51. package/dist/canvas-host/a2ui/index.html +307 -0
  52. package/dist/catalog-BAayBt1L.js +185 -0
  53. package/dist/catalog-BNsf97BM.js +185 -0
  54. package/dist/channel-options-C3GV4Fgg.js +33 -0
  55. package/dist/channel-options-DJ4GNfwk.js +32 -0
  56. package/dist/channel-selection-CujyiWGM.js +51 -0
  57. package/dist/channel-selection-DfGpCyh2.js +51 -0
  58. package/dist/channel-web-D42mzlCJ.js +2162 -0
  59. package/dist/channels-cli-BAtARz4A.js +1306 -0
  60. package/dist/channels-cli-Ddo_tIRR.js +1304 -0
  61. package/dist/channels-status-issues-DBc1pU_R.js +18 -0
  62. package/dist/channels-status-issues-DjO9MHIG.js +18 -0
  63. package/dist/chrome-Bi6iZ5sG.js +1601 -0
  64. package/dist/chrome-DNSv7Cpy.js +1629 -0
  65. package/dist/chrome-DScZx4Lk.js +1601 -0
  66. package/dist/chunk-mxPVo000.js +348 -0
  67. package/dist/clack-prompter-B0kl7shw.js +92 -0
  68. package/dist/clack-prompter-B1YxZdRy.js +92 -0
  69. package/dist/cli/daemon-cli.js +9 -0
  70. package/dist/cli-D3hUnL_G.js +101 -0
  71. package/dist/cli-DDwD6VgH.js +99 -0
  72. package/dist/cli-session-CP7ZH2-6.js +5463 -0
  73. package/dist/cli-session-oXJQpenl.js +5408 -0
  74. package/dist/cli-utils-BTBABPX9.js +40 -0
  75. package/dist/cli-utils-DtAxdCte.js +40 -0
  76. package/dist/client-C1avc0vD.js +1692 -0
  77. package/dist/client-CC94YZrT.js +1692 -0
  78. package/dist/clipboard-B2fBy8tG.js +31 -0
  79. package/dist/clipboard-BbGnZskJ.js +31 -0
  80. package/dist/command-format-Clp46jkj.js +38 -0
  81. package/dist/command-format-DELazozB.js +52 -0
  82. package/dist/command-format-SkzzRqR1.js +52 -0
  83. package/dist/command-options-CSbuuqHr.js +8 -0
  84. package/dist/command-options-Cp1tf96a.js +8 -0
  85. package/dist/command-registry-DDGudZEQ.js +248 -0
  86. package/dist/commands-CRcFD5MO.js +509 -0
  87. package/dist/commands-Dh40OpQL.js +509 -0
  88. package/dist/commands-registry-Bd0xbvwG.js +766 -0
  89. package/dist/commands-registry-DYfRSVF3.js +766 -0
  90. package/dist/common-D6bu0zHC.js +287 -0
  91. package/dist/common-zW9Y2P1B.js +287 -0
  92. package/dist/completion-cli-B9Cn374l.js +431 -0
  93. package/dist/completion-cli-BEHghUFx.js +432 -0
  94. package/dist/config-Bmm8tmZF.js +6523 -0
  95. package/dist/config-CHc5qzaI.js +5704 -0
  96. package/dist/config-Co6UXXF5.js +11 -0
  97. package/dist/config-Xm0j9LUa.js +5705 -0
  98. package/dist/config-cli-9ZbCHoV8.js +247 -0
  99. package/dist/config-cli-sxuGl29N.js +244 -0
  100. package/dist/config-guard-BwRD-b9Z.js +93 -0
  101. package/dist/config-guard-Dy7wyhAX.js +76 -0
  102. package/dist/config-sync-Bllc1TJ4.js +89 -0
  103. package/dist/config-sync-mfuOoGHl.js +89 -0
  104. package/dist/configure-CCyVzQZ7.js +1006 -0
  105. package/dist/configure-Nntbxt4t.js +1008 -0
  106. package/dist/constants-BwBn5CGe.js +65 -0
  107. package/dist/constants-O8yBqCBv.js +65 -0
  108. package/dist/context-DKaQYnCH.js +60 -0
  109. package/dist/control-service-BeOtZCCS.js +72 -0
  110. package/dist/control-service-vyKJ-XUp.js +72 -0
  111. package/dist/cron-cli-BasqtsJ0.js +451 -0
  112. package/dist/cron-cli-C8XzIpyX.js +448 -0
  113. package/dist/daemon-cli-cwL2GI5i.js +565 -0
  114. package/dist/daemon-cli-sjDh2xbf.js +566 -0
  115. package/dist/daemon-cli.js +13117 -0
  116. package/dist/daemon-runtime-BuMT6nck.js +460 -0
  117. package/dist/daemon-runtime-CTvi3m4D.js +460 -0
  118. package/dist/dangerous-tools-5ObDWy1N.js +32 -0
  119. package/dist/dangerous-tools-Jwr7jqNw.js +32 -0
  120. package/dist/deliver-D6cdhg5m.js +1097 -0
  121. package/dist/deliver-DlNDKlA4.js +1162 -0
  122. package/dist/deliver-bC6iI_rv.js +1097 -0
  123. package/dist/delivery-queue-B6IHz4Ry.js +220 -0
  124. package/dist/delivery-queue-TnQykYsg.js +220 -0
  125. package/dist/deps-C9kDG-Ru.js +42 -0
  126. package/dist/devices-cli-BE-Nib4Y.js +198 -0
  127. package/dist/devices-cli-GyPlNRyd.js +195 -0
  128. package/dist/diagnostics-Dj75aEHN.js +35 -0
  129. package/dist/diagnostics-DlIw6fqD.js +35 -0
  130. package/dist/directory-cli-BEaIvWkc.js +246 -0
  131. package/dist/directory-cli-CZ_-DP5Z.js +243 -0
  132. package/dist/dispatcher-Bkcui7jz.js +100 -0
  133. package/dist/dispatcher-C1B6cT_7.js +100 -0
  134. package/dist/display-A8k-mxv8.js +171 -0
  135. package/dist/display-BDOsXu8F.js +171 -0
  136. package/dist/dns-cli-BUzpVoMv.js +200 -0
  137. package/dist/dns-cli-DstQOMQt.js +197 -0
  138. package/dist/dock-DbxBBv30.js +753 -0
  139. package/dist/dock-cPBY4qGl.js +753 -0
  140. package/dist/docs-cli-BWp6p-Tq.js +161 -0
  141. package/dist/docs-cli-x22FnZfL.js +159 -0
  142. package/dist/doctor-B5HFw-nC.js +1813 -0
  143. package/dist/doctor-DnEyqGcQ.js +1815 -0
  144. package/dist/doctor-completion-BMEPXgVg.js +92 -0
  145. package/dist/doctor-completion-usPeH2ol.js +92 -0
  146. package/dist/doctor-config-flow-CS0WFnjL.js +1232 -0
  147. package/dist/doctor-config-flow-Cs4O_Kmq.js +1232 -0
  148. package/dist/engine-DgK9s3lk.js +561 -0
  149. package/dist/engine-ZSd5I5JN.js +561 -0
  150. package/dist/entry.js +1560 -0
  151. package/dist/env-0lJfCPsw.js +32 -0
  152. package/dist/errors-A_GqUU6B.js +26 -0
  153. package/dist/errors-CHow2wtt.js +37 -0
  154. package/dist/errors-Cojm0Kl7.js +37 -0
  155. package/dist/exec-BenD3A5l.js +1167 -0
  156. package/dist/exec-BizYYQgP.js +255 -0
  157. package/dist/exec-Bv3pyjeM.js +255 -0
  158. package/dist/exec-approvals-BP9AhCSw.js +1221 -0
  159. package/dist/exec-approvals-CdLmKX2R.js +1221 -0
  160. package/dist/exec-approvals-cli-25CGlFNw.js +368 -0
  161. package/dist/exec-approvals-cli-BXZ-hOlT.js +371 -0
  162. package/dist/extensionAPI.js +8542 -0
  163. package/dist/format-CjKG6raZ.js +20 -0
  164. package/dist/format-Mq6iU0_5.js +20 -0
  165. package/dist/format-duration-Cm3xh8xz.js +58 -0
  166. package/dist/format-duration-DhWzz_5b.js +58 -0
  167. package/dist/format-relative-C6kUHuOj.js +55 -0
  168. package/dist/format-relative-sy9iviQN.js +55 -0
  169. package/dist/frontmatter-YijVi0FQ.js +204 -0
  170. package/dist/gateway-cli-B9uc0RCI.js +19971 -0
  171. package/dist/gateway-cli-D8Qz7kCf.js +19972 -0
  172. package/dist/gateway-rpc-Ch9mCYEB.js +28 -0
  173. package/dist/gateway-rpc-DBhcdLFs.js +28 -0
  174. package/dist/github-copilot-auth-D6ZErYqa.js +1418 -0
  175. package/dist/github-copilot-auth-DGmyWJms.js +1418 -0
  176. package/dist/gmail-setup-utils-BPo_LkKI.js +428 -0
  177. package/dist/gmail-setup-utils-D3Yqgor7.js +428 -0
  178. package/dist/health-DsTZaAzV.js +1258 -0
  179. package/dist/health-V6dGthLA.js +1253 -0
  180. package/dist/health-format-CdP99j3Y.js +208 -0
  181. package/dist/health-format-JEChH08S.js +208 -0
  182. package/dist/heartbeat-visibility-CkL00WRR.js +98 -0
  183. package/dist/heartbeat-visibility-Cmni9671.js +98 -0
  184. package/dist/help-format-DUBI91Ti.js +17 -0
  185. package/dist/help-format-Dl4bsrLI.js +17 -0
  186. package/dist/helpers-9N2Q5aZj.js +25 -0
  187. package/dist/helpers-DLgbkcEn.js +25 -0
  188. package/dist/helpers-ZKNRexvX.js +10 -0
  189. package/dist/helpers-eJFa4K6r.js +10 -0
  190. package/dist/hooks-cli-Cu0D0fPS.js +993 -0
  191. package/dist/hooks-cli-E63uffR6.js +991 -0
  192. package/dist/hooks-status-B-e96dZj.js +356 -0
  193. package/dist/hooks-status-C_9sE0ox.js +356 -0
  194. package/dist/image-ops-Dlt3T7th.js +541 -0
  195. package/dist/image-ops-omlvdfah.js +541 -0
  196. package/dist/index.js +499 -0
  197. package/dist/init-Bm04RagW.js +122 -0
  198. package/dist/init-CaJBf4p1.js +122 -0
  199. package/dist/input-provenance-BgwBljRz.js +35 -0
  200. package/dist/input-provenance-DJBdpeKk.js +35 -0
  201. package/dist/input-provenance-iu26y0GH.js +35 -0
  202. package/dist/installs-C2iMRBVz.js +383 -0
  203. package/dist/installs-D-cPGdCw.js +383 -0
  204. package/dist/internal-hooks-DFTIurVM.js +77 -0
  205. package/dist/ipv4-C5QxzriV.js +1964 -0
  206. package/dist/ipv4-TxR9wQCQ.js +1964 -0
  207. package/dist/is-main-Dt9DTcH1.js +25 -0
  208. package/dist/is-main-cB3p7uob.js +25 -0
  209. package/dist/lanes-CNxj3tit.js +232 -0
  210. package/dist/legacy-names-CKU7tKQR.js +8 -0
  211. package/dist/lifecycle-core-B_7XRcvF.js +388 -0
  212. package/dist/lifecycle-core-By83PVAK.js +387 -0
  213. package/dist/links-BfjHVTB_.js +15 -0
  214. package/dist/links-DPGe0OHw.js +15 -0
  215. package/dist/llm-slug-generator.js +62 -0
  216. package/dist/loader-6Qkyybg1.js +87 -0
  217. package/dist/loader-Dmc0KyQK.js +87 -0
  218. package/dist/logging-54nXj81z.js +1 -0
  219. package/dist/logging-BdnOSVPD.js +1 -0
  220. package/dist/logging-DB6BQmhi.js +15 -0
  221. package/dist/logging-mcb66J0p.js +15 -0
  222. package/dist/login--8D8kyRy.js +61 -0
  223. package/dist/login-C-ugYHKt.js +61 -0
  224. package/dist/login-CX5Q2fYl.js +59 -0
  225. package/dist/login-qr-BLmGvITg.js +321 -0
  226. package/dist/login-qr-BNtuXLKL.js +323 -0
  227. package/dist/login-qr-PcyTC7Ra.js +326 -0
  228. package/dist/logs-cli-BEQVkiXp.js +245 -0
  229. package/dist/logs-cli-CIqiVMkY.js +242 -0
  230. package/dist/manager-Bsy9ifug.js +3244 -0
  231. package/dist/manager-CDgcZ51c.js +3246 -0
  232. package/dist/manager-D7QQ5XrE.js +3244 -0
  233. package/dist/manifest-registry-CW1zCyRF.js +748 -0
  234. package/dist/manifest-registry-D4lM2RdV.js +748 -0
  235. package/dist/markdown-tables-BT1X6jqH.js +347 -0
  236. package/dist/markdown-tables-DHgOK2vI.js +348 -0
  237. package/dist/media-THyainiE.js +1342 -0
  238. package/dist/memory-cli-BmIyAOZm.js +869 -0
  239. package/dist/memory-cli-BoXdfCLT.js +868 -0
  240. package/dist/message-channel-dSTVVCyX.js +110 -0
  241. package/dist/message-channel-w4F2b2F6.js +110 -0
  242. package/dist/migrate-BR6iAIjO.js +157 -0
  243. package/dist/migrate-D0EcMs0f.js +157 -0
  244. package/dist/mime-B1ZoR53M.js +145 -0
  245. package/dist/mime-Bm1xTtpY.js +145 -0
  246. package/dist/mime-C1RlpUSs.js +145 -0
  247. package/dist/model-param-b-C4BL7w0Z.js +16 -0
  248. package/dist/model-param-b-DPwyNGn8.js +16 -0
  249. package/dist/model-selection-BnEobs_z.js +2692 -0
  250. package/dist/models-KLd8Evmq.js +2545 -0
  251. package/dist/models-cli-D4UFQLid.js +258 -0
  252. package/dist/models-cli-DJHs5rJF.js +2739 -0
  253. package/dist/net-B5lXhYLV.js +218 -0
  254. package/dist/net-CDi_lJMH.js +88 -0
  255. package/dist/node-cli-BNCJUkgA.js +1319 -0
  256. package/dist/node-cli-C7S0vk0_.js +1322 -0
  257. package/dist/node-match-8XZnaid6.js +34 -0
  258. package/dist/node-match-B3Osv-5C.js +34 -0
  259. package/dist/node-service-BFxHJsno.js +67 -0
  260. package/dist/node-service-DUnan4uK.js +67 -0
  261. package/dist/nodes-cli-DOXhYgc8.js +1200 -0
  262. package/dist/nodes-cli-wvPZ3HwH.js +1197 -0
  263. package/dist/nodes-screen-1YiLkqr5.js +234 -0
  264. package/dist/nodes-screen-DZeD8hE5.js +234 -0
  265. package/dist/normalize-Dlcj9D3K.js +52 -0
  266. package/dist/normalize-GDK8JTNW.js +52 -0
  267. package/dist/note-Bi8Wb8DV.js +73 -0
  268. package/dist/note-uiuPxhyX.js +73 -0
  269. package/dist/npm-registry-spec-B-XIShkB.js +351 -0
  270. package/dist/npm-registry-spec-za3itb5Y.js +351 -0
  271. package/dist/onboard-DiTRW6CH.js +1165 -0
  272. package/dist/onboard-channels-BgruIpyg.js +672 -0
  273. package/dist/onboard-channels-gyq0VHHp.js +672 -0
  274. package/dist/onboard-helpers-BEaUind0.js +365 -0
  275. package/dist/onboard-helpers-f5Zprayl.js +365 -0
  276. package/dist/onboard-lH3XPWAK.js +1166 -0
  277. package/dist/onboarding-D0FOkXGt.js +910 -0
  278. package/dist/onboarding-kQVgbiIR.js +911 -0
  279. package/dist/openclaw-root-0yHXtO35.js +88 -0
  280. package/dist/openclaw-root-C85WMnVV.js +88 -0
  281. package/dist/orchestrator-CYTk7mq6.js +355 -0
  282. package/dist/orchestrator-J6ELnJXl.js +355 -0
  283. package/dist/outbound-BEq0qbPR.js +214 -0
  284. package/dist/outbound-BSVD-rjk.js +2062 -0
  285. package/dist/outbound-DXijk0db.js +214 -0
  286. package/dist/outbound-send-deps-ANnAhImn.js +14 -0
  287. package/dist/outbound-send-deps-BNGPU7jV.js +55 -0
  288. package/dist/pairing-cli-DKUyb6eK.js +118 -0
  289. package/dist/pairing-cli-ET2p_mXH.js +121 -0
  290. package/dist/pairing-store-CGYSwICJ.js +388 -0
  291. package/dist/pairing-store-DqQPqRMe.js +388 -0
  292. package/dist/parse-6-2MDhdT.js +23 -0
  293. package/dist/parse-CpunmTOS.js +23 -0
  294. package/dist/parse-log-line-Bqh1SSzC.js +44 -0
  295. package/dist/parse-log-line-DUZCjXbl.js +44 -0
  296. package/dist/parse-port-BKB9Exlg.js +12 -0
  297. package/dist/parse-port-DrfvwwiL.js +12 -0
  298. package/dist/parse-timeout-Di_tcEmi.js +16 -0
  299. package/dist/parse-timeout-vVlESvju.js +16 -0
  300. package/dist/path-env-Bu6k0jDQ.js +89 -0
  301. package/dist/path-env-C0zQSjw8.js +89 -0
  302. package/dist/paths-BTc4nk-6.js +126 -0
  303. package/dist/paths-BgUi2Z2G.js +54 -0
  304. package/dist/paths-C6VCWKo3.js +238 -0
  305. package/dist/paths-CCxa0o9c.js +222 -0
  306. package/dist/paths-CxRf2rBG.js +129 -0
  307. package/dist/paths-DcVEkYX5.js +54 -0
  308. package/dist/paths-hcX1Gqg5.js +129 -0
  309. package/dist/pi-auth-json-BzX-qyRo.js +82 -0
  310. package/dist/pi-auth-json-eesA38iW.js +78 -0
  311. package/dist/pi-auth-json-uEDdgg8K.js +80 -0
  312. package/dist/pi-embedded-C1Nl7L89.js +22 -0
  313. package/dist/pi-model-discovery-BkqhoPls.js +20 -0
  314. package/dist/pi-model-discovery-CQOWUAmK.js +3 -0
  315. package/dist/pi-model-discovery-DsRqYJLy.js +20 -0
  316. package/dist/pi-tools.policy-D9AUlreI.js +200 -0
  317. package/dist/pi-tools.policy-DRDm3v-2.js +200 -0
  318. package/dist/plugin-auto-enable-C-JwYMlZ.js +282 -0
  319. package/dist/plugin-auto-enable-DLIDBBfi.js +282 -0
  320. package/dist/plugin-registry-Bp8mivr-.js +32 -0
  321. package/dist/plugin-registry-CP7KgCvC.js +32 -0
  322. package/dist/plugin-sdk/account-id.d.ts +1 -0
  323. package/dist/plugin-sdk/account-id.js +15 -0
  324. package/dist/plugin-sdk/agents/agent-paths.d.ts +6 -0
  325. package/dist/plugin-sdk/agents/agent-scope.d.ts +37 -0
  326. package/dist/plugin-sdk/agents/anima-tools.d.ts +1 -0
  327. package/dist/plugin-sdk/agents/apply-patch-update.d.ts +10 -0
  328. package/dist/plugin-sdk/agents/apply-patch.d.ts +35 -0
  329. package/dist/plugin-sdk/agents/auth-profiles/constants.d.ts +20 -0
  330. package/dist/plugin-sdk/agents/auth-profiles/display.d.ts +7 -0
  331. package/dist/plugin-sdk/agents/auth-profiles/doctor.d.ts +8 -0
  332. package/dist/plugin-sdk/agents/auth-profiles/external-cli-sync.d.ts +7 -0
  333. package/dist/plugin-sdk/agents/auth-profiles/oauth.d.ts +12 -0
  334. package/dist/plugin-sdk/agents/auth-profiles/order.d.ts +8 -0
  335. package/dist/plugin-sdk/agents/auth-profiles/paths.d.ts +4 -0
  336. package/dist/plugin-sdk/agents/auth-profiles/profiles.d.ts +23 -0
  337. package/dist/plugin-sdk/agents/auth-profiles/repair.d.ts +14 -0
  338. package/dist/plugin-sdk/agents/auth-profiles/session-override.d.ts +18 -0
  339. package/dist/plugin-sdk/agents/auth-profiles/store.d.ts +10 -0
  340. package/dist/plugin-sdk/agents/auth-profiles/types.d.ts +60 -0
  341. package/dist/plugin-sdk/agents/auth-profiles/usage.d.ts +47 -0
  342. package/dist/plugin-sdk/agents/auth-profiles.d.ts +11 -0
  343. package/dist/plugin-sdk/agents/bash-process-registry.d.ts +70 -0
  344. package/dist/plugin-sdk/agents/bash-tools.d.ts +4 -0
  345. package/dist/plugin-sdk/agents/bash-tools.exec-runtime.d.ts +73 -0
  346. package/dist/plugin-sdk/agents/bash-tools.exec.d.ts +55 -0
  347. package/dist/plugin-sdk/agents/bash-tools.process.d.ts +7 -0
  348. package/dist/plugin-sdk/agents/bash-tools.shared.d.ts +48 -0
  349. package/dist/plugin-sdk/agents/bedrock-discovery.d.ts +9 -0
  350. package/dist/plugin-sdk/agents/bootstrap-files.d.ts +25 -0
  351. package/dist/plugin-sdk/agents/bootstrap-hooks.d.ts +10 -0
  352. package/dist/plugin-sdk/agents/channel-tools.d.ts +27 -0
  353. package/dist/plugin-sdk/agents/chutes-oauth.d.ts +46 -0
  354. package/dist/plugin-sdk/agents/cli-backends.d.ts +8 -0
  355. package/dist/plugin-sdk/agents/cli-credentials.d.ts +83 -0
  356. package/dist/plugin-sdk/agents/cli-runner/helpers.d.ts +76 -0
  357. package/dist/plugin-sdk/agents/cli-runner.d.ts +41 -0
  358. package/dist/plugin-sdk/agents/cli-session.d.ts +3 -0
  359. package/dist/plugin-sdk/agents/cloudflare-ai-gateway.d.ts +22 -0
  360. package/dist/plugin-sdk/agents/context.d.ts +1 -0
  361. package/dist/plugin-sdk/agents/current-time.d.ts +17 -0
  362. package/dist/plugin-sdk/agents/date-time.d.ts +13 -0
  363. package/dist/plugin-sdk/agents/defaults.d.ts +3 -0
  364. package/dist/plugin-sdk/agents/docs-path.d.ts +6 -0
  365. package/dist/plugin-sdk/agents/failover-error.d.ts +33 -0
  366. package/dist/plugin-sdk/agents/glob-pattern.d.ts +18 -0
  367. package/dist/plugin-sdk/agents/huggingface-models.d.ts +17 -0
  368. package/dist/plugin-sdk/agents/identity-avatar.d.ts +15 -0
  369. package/dist/plugin-sdk/agents/identity-file.d.ts +12 -0
  370. package/dist/plugin-sdk/agents/identity.d.ts +25 -0
  371. package/dist/plugin-sdk/agents/lanes.d.ts +3 -0
  372. package/dist/plugin-sdk/agents/memory-search.d.ts +66 -0
  373. package/dist/plugin-sdk/agents/minimax-vlm.d.ts +7 -0
  374. package/dist/plugin-sdk/agents/model-alias-lines.d.ts +2 -0
  375. package/dist/plugin-sdk/agents/model-auth.d.ts +36 -0
  376. package/dist/plugin-sdk/agents/model-catalog.d.ts +25 -0
  377. package/dist/plugin-sdk/agents/model-fallback.d.ts +40 -0
  378. package/dist/plugin-sdk/agents/model-selection.d.ts +94 -0
  379. package/dist/plugin-sdk/agents/models-config.d.ts +13 -0
  380. package/dist/plugin-sdk/agents/models-config.providers.d.ts +37 -0
  381. package/dist/plugin-sdk/agents/ollama-stream.d.ts +45 -0
  382. package/dist/plugin-sdk/agents/openclaw-tools.d.ts +46 -0
  383. package/dist/plugin-sdk/agents/pi-auth-json.d.ts +14 -0
  384. package/dist/plugin-sdk/agents/pi-embedded-helpers.d.ts +7 -0
  385. package/dist/plugin-sdk/agents/pi-embedded-runner/model.d.ts +1 -0
  386. package/dist/plugin-sdk/agents/pi-embedded-runner/run/params.d.ts +5 -0
  387. package/dist/plugin-sdk/agents/pi-embedded-runner.d.ts +25 -0
  388. package/dist/plugin-sdk/agents/pi-embedded-utils.d.ts +7 -0
  389. package/dist/plugin-sdk/agents/pi-embedded.d.ts +25 -0
  390. package/dist/plugin-sdk/agents/pi-model-discovery.d.ts +4 -0
  391. package/dist/plugin-sdk/agents/pi-settings.d.ts +19 -0
  392. package/dist/plugin-sdk/agents/pi-tools.abort.d.ts +2 -0
  393. package/dist/plugin-sdk/agents/pi-tools.before-tool-call.d.ts +29 -0
  394. package/dist/plugin-sdk/agents/pi-tools.d.ts +69 -0
  395. package/dist/plugin-sdk/agents/pi-tools.policy.d.ts +37 -0
  396. package/dist/plugin-sdk/agents/pi-tools.read.d.ts +44 -0
  397. package/dist/plugin-sdk/agents/pi-tools.schema.d.ts +3 -0
  398. package/dist/plugin-sdk/agents/pi-tools.types.d.ts +2 -0
  399. package/dist/plugin-sdk/agents/pty-dsr.d.ts +5 -0
  400. package/dist/plugin-sdk/agents/pty-keys.d.ts +13 -0
  401. package/dist/plugin-sdk/agents/sandbox/browser-bridges.d.ts +7 -0
  402. package/dist/plugin-sdk/agents/sandbox/browser.d.ts +12 -0
  403. package/dist/plugin-sdk/agents/sandbox/config-hash.d.ts +17 -0
  404. package/dist/plugin-sdk/agents/sandbox/config.d.ts +26 -0
  405. package/dist/plugin-sdk/agents/sandbox/constants.d.ts +19 -0
  406. package/dist/plugin-sdk/agents/sandbox/context.d.ts +12 -0
  407. package/dist/plugin-sdk/agents/sandbox/docker.d.ts +40 -0
  408. package/dist/plugin-sdk/agents/sandbox/fs-bridge.d.ts +56 -0
  409. package/dist/plugin-sdk/agents/sandbox/fs-paths.d.ts +28 -0
  410. package/dist/plugin-sdk/agents/sandbox/manage.d.ts +13 -0
  411. package/dist/plugin-sdk/agents/sandbox/prune.d.ts +3 -0
  412. package/dist/plugin-sdk/agents/sandbox/registry.d.ts +31 -0
  413. package/dist/plugin-sdk/agents/sandbox/runtime-status.d.ts +18 -0
  414. package/dist/plugin-sdk/agents/sandbox/shared.d.ts +4 -0
  415. package/dist/plugin-sdk/agents/sandbox/tool-policy.d.ts +4 -0
  416. package/dist/plugin-sdk/agents/sandbox/types.d.ts +76 -0
  417. package/dist/plugin-sdk/agents/sandbox/types.docker.d.ts +25 -0
  418. package/dist/plugin-sdk/agents/sandbox/workspace.d.ts +1 -0
  419. package/dist/plugin-sdk/agents/sandbox-paths.d.ts +23 -0
  420. package/dist/plugin-sdk/agents/sandbox.d.ts +8 -0
  421. package/dist/plugin-sdk/agents/schema/clean-for-gemini.d.ts +2 -0
  422. package/dist/plugin-sdk/agents/schema/typebox.d.ts +14 -0
  423. package/dist/plugin-sdk/agents/session-slug.d.ts +1 -0
  424. package/dist/plugin-sdk/agents/session-write-lock.d.ts +21 -0
  425. package/dist/plugin-sdk/agents/shell-utils.d.ts +7 -0
  426. package/dist/plugin-sdk/agents/skills/bundled-dir.d.ts +7 -0
  427. package/dist/plugin-sdk/agents/skills/config.d.ts +13 -0
  428. package/dist/plugin-sdk/agents/skills/env-overrides.d.ts +10 -0
  429. package/dist/plugin-sdk/agents/skills/frontmatter.d.ts +6 -0
  430. package/dist/plugin-sdk/agents/skills/plugin-skills.d.ts +5 -0
  431. package/dist/plugin-sdk/agents/skills/refresh.d.ts +19 -0
  432. package/dist/plugin-sdk/agents/skills/serialize.d.ts +1 -0
  433. package/dist/plugin-sdk/agents/skills/types.d.ts +80 -0
  434. package/dist/plugin-sdk/agents/skills/workspace.d.ts +49 -0
  435. package/dist/plugin-sdk/agents/skills.d.ts +7 -0
  436. package/dist/plugin-sdk/agents/subagent-announce-queue.d.ts +23 -0
  437. package/dist/plugin-sdk/agents/subagent-announce.d.ts +34 -0
  438. package/dist/plugin-sdk/agents/subagent-depth.d.ts +11 -0
  439. package/dist/plugin-sdk/agents/subagent-registry.d.ts +62 -0
  440. package/dist/plugin-sdk/agents/subagent-registry.store.d.ts +5 -0
  441. package/dist/plugin-sdk/agents/synthetic-models.d.ts +160 -0
  442. package/dist/plugin-sdk/agents/system-prompt-params.d.ts +30 -0
  443. package/dist/plugin-sdk/agents/system-prompt-report.d.ts +20 -0
  444. package/dist/plugin-sdk/agents/system-prompt.d.ts +78 -0
  445. package/dist/plugin-sdk/agents/timeout.d.ts +8 -0
  446. package/dist/plugin-sdk/agents/together-models.d.ts +4 -0
  447. package/dist/plugin-sdk/agents/tool-images.d.ts +19 -0
  448. package/dist/plugin-sdk/agents/tool-policy-pipeline.d.ts +27 -0
  449. package/dist/plugin-sdk/agents/tool-policy.d.ts +39 -0
  450. package/dist/plugin-sdk/agents/tool-summaries.d.ts +2 -0
  451. package/dist/plugin-sdk/agents/tools/agent-step.d.ts +15 -0
  452. package/dist/plugin-sdk/agents/tools/agents-list-tool.d.ts +6 -0
  453. package/dist/plugin-sdk/agents/tools/browser-tool.d.ts +5 -0
  454. package/dist/plugin-sdk/agents/tools/browser-tool.schema.d.ts +50 -0
  455. package/dist/plugin-sdk/agents/tools/canvas-tool.d.ts +2 -0
  456. package/dist/plugin-sdk/agents/tools/common.d.ts +56 -0
  457. package/dist/plugin-sdk/agents/tools/cron-tool.d.ts +6 -0
  458. package/dist/plugin-sdk/agents/tools/discord-actions-guild.d.ts +4 -0
  459. package/dist/plugin-sdk/agents/tools/discord-actions-messaging.d.ts +4 -0
  460. package/dist/plugin-sdk/agents/tools/discord-actions-moderation.d.ts +4 -0
  461. package/dist/plugin-sdk/agents/tools/discord-actions-presence.d.ts +4 -0
  462. package/dist/plugin-sdk/agents/tools/discord-actions.d.ts +3 -0
  463. package/dist/plugin-sdk/agents/tools/gateway-tool.d.ts +6 -0
  464. package/dist/plugin-sdk/agents/tools/gateway.d.ts +14 -0
  465. package/dist/plugin-sdk/agents/tools/image-tool.d.ts +35 -0
  466. package/dist/plugin-sdk/agents/tools/image-tool.helpers.d.ts +21 -0
  467. package/dist/plugin-sdk/agents/tools/memory-tool.d.ts +10 -0
  468. package/dist/plugin-sdk/agents/tools/message-tool.d.ts +18 -0
  469. package/dist/plugin-sdk/agents/tools/nodes-tool.d.ts +6 -0
  470. package/dist/plugin-sdk/agents/tools/nodes-utils.d.ts +20 -0
  471. package/dist/plugin-sdk/agents/tools/session-status-tool.d.ts +6 -0
  472. package/dist/plugin-sdk/agents/tools/sessions-announce-target.d.ts +5 -0
  473. package/dist/plugin-sdk/agents/tools/sessions-helpers.d.ts +90 -0
  474. package/dist/plugin-sdk/agents/tools/sessions-history-tool.d.ts +5 -0
  475. package/dist/plugin-sdk/agents/tools/sessions-list-tool.d.ts +5 -0
  476. package/dist/plugin-sdk/agents/tools/sessions-send-helpers.d.ts +34 -0
  477. package/dist/plugin-sdk/agents/tools/sessions-send-tool.a2a.d.ts +12 -0
  478. package/dist/plugin-sdk/agents/tools/sessions-send-tool.d.ts +7 -0
  479. package/dist/plugin-sdk/agents/tools/sessions-spawn-tool.d.ts +15 -0
  480. package/dist/plugin-sdk/agents/tools/slack-actions.d.ts +15 -0
  481. package/dist/plugin-sdk/agents/tools/subagents-tool.d.ts +4 -0
  482. package/dist/plugin-sdk/agents/tools/telegram-actions.d.ts +9 -0
  483. package/dist/plugin-sdk/agents/tools/tts-tool.d.ts +7 -0
  484. package/dist/plugin-sdk/agents/tools/web-fetch-utils.d.ts +18 -0
  485. package/dist/plugin-sdk/agents/tools/web-fetch.d.ts +25 -0
  486. package/dist/plugin-sdk/agents/tools/web-search.d.ts +71 -0
  487. package/dist/plugin-sdk/agents/tools/web-shared.d.ts +17 -0
  488. package/dist/plugin-sdk/agents/tools/web-tools.d.ts +2 -0
  489. package/dist/plugin-sdk/agents/tools/whatsapp-actions.d.ts +3 -0
  490. package/dist/plugin-sdk/agents/usage.d.ts +45 -0
  491. package/dist/plugin-sdk/agents/venice-models.d.ts +238 -0
  492. package/dist/plugin-sdk/agents/workspace-dir.d.ts +2 -0
  493. package/dist/plugin-sdk/agents/workspace-run.d.ts +18 -0
  494. package/dist/plugin-sdk/agents/workspace-templates.d.ts +6 -0
  495. package/dist/plugin-sdk/agents/workspace.d.ts +34 -0
  496. package/dist/plugin-sdk/auto-reply/chunk.d.ts +45 -0
  497. package/dist/plugin-sdk/auto-reply/command-auth.d.ts +17 -0
  498. package/dist/plugin-sdk/auto-reply/command-detection.d.ts +13 -0
  499. package/dist/plugin-sdk/auto-reply/commands-args.d.ts +3 -0
  500. package/dist/plugin-sdk/auto-reply/commands-registry.d.ts +54 -0
  501. package/dist/plugin-sdk/auto-reply/commands-registry.data.d.ts +3 -0
  502. package/dist/plugin-sdk/auto-reply/commands-registry.types.d.ts +66 -0
  503. package/dist/plugin-sdk/auto-reply/dispatch.d.ts +32 -0
  504. package/dist/plugin-sdk/auto-reply/envelope.d.ts +58 -0
  505. package/dist/plugin-sdk/auto-reply/group-activation.d.ts +6 -0
  506. package/dist/plugin-sdk/auto-reply/heartbeat-reply-payload.d.ts +2 -0
  507. package/dist/plugin-sdk/auto-reply/heartbeat.d.ts +26 -0
  508. package/dist/plugin-sdk/auto-reply/inbound-debounce.d.ts +16 -0
  509. package/dist/plugin-sdk/auto-reply/media-note.d.ts +2 -0
  510. package/dist/plugin-sdk/auto-reply/model.d.ts +8 -0
  511. package/dist/plugin-sdk/auto-reply/reply/abort.d.ts +22 -0
  512. package/dist/plugin-sdk/auto-reply/reply/agent-runner-execution.d.ts +49 -0
  513. package/dist/plugin-sdk/auto-reply/reply/agent-runner-helpers.d.ts +17 -0
  514. package/dist/plugin-sdk/auto-reply/reply/agent-runner-memory.d.ts +20 -0
  515. package/dist/plugin-sdk/auto-reply/reply/agent-runner-payloads.d.ts +25 -0
  516. package/dist/plugin-sdk/auto-reply/reply/agent-runner-utils.d.ts +30 -0
  517. package/dist/plugin-sdk/auto-reply/reply/agent-runner.d.ts +38 -0
  518. package/dist/plugin-sdk/auto-reply/reply/bash-command.d.ts +19 -0
  519. package/dist/plugin-sdk/auto-reply/reply/block-reply-coalescer.d.ts +15 -0
  520. package/dist/plugin-sdk/auto-reply/reply/block-reply-pipeline.d.ts +31 -0
  521. package/dist/plugin-sdk/auto-reply/reply/block-streaming.d.ts +22 -0
  522. package/dist/plugin-sdk/auto-reply/reply/body.d.ts +10 -0
  523. package/dist/plugin-sdk/auto-reply/reply/commands-allowlist.d.ts +2 -0
  524. package/dist/plugin-sdk/auto-reply/reply/commands-approve.d.ts +2 -0
  525. package/dist/plugin-sdk/auto-reply/reply/commands-bash.d.ts +2 -0
  526. package/dist/plugin-sdk/auto-reply/reply/commands-compact.d.ts +2 -0
  527. package/dist/plugin-sdk/auto-reply/reply/commands-config.d.ts +3 -0
  528. package/dist/plugin-sdk/auto-reply/reply/commands-context-report.d.ts +3 -0
  529. package/dist/plugin-sdk/auto-reply/reply/commands-context.d.ts +12 -0
  530. package/dist/plugin-sdk/auto-reply/reply/commands-core.d.ts +2 -0
  531. package/dist/plugin-sdk/auto-reply/reply/commands-info.d.ts +10 -0
  532. package/dist/plugin-sdk/auto-reply/reply/commands-models.d.ts +23 -0
  533. package/dist/plugin-sdk/auto-reply/reply/commands-plugin.d.ts +13 -0
  534. package/dist/plugin-sdk/auto-reply/reply/commands-session.d.ts +7 -0
  535. package/dist/plugin-sdk/auto-reply/reply/commands-status.d.ts +25 -0
  536. package/dist/plugin-sdk/auto-reply/reply/commands-subagents.d.ts +13 -0
  537. package/dist/plugin-sdk/auto-reply/reply/commands-tts.d.ts +2 -0
  538. package/dist/plugin-sdk/auto-reply/reply/commands-types.d.ts +60 -0
  539. package/dist/plugin-sdk/auto-reply/reply/commands.d.ts +4 -0
  540. package/dist/plugin-sdk/auto-reply/reply/config-commands.d.ts +15 -0
  541. package/dist/plugin-sdk/auto-reply/reply/config-value.d.ts +4 -0
  542. package/dist/plugin-sdk/auto-reply/reply/debug-commands.d.ts +16 -0
  543. package/dist/plugin-sdk/auto-reply/reply/directive-handling.auth.d.ts +19 -0
  544. package/dist/plugin-sdk/auto-reply/reply/directive-handling.d.ts +6 -0
  545. package/dist/plugin-sdk/auto-reply/reply/directive-handling.fast-lane.d.ts +7 -0
  546. package/dist/plugin-sdk/auto-reply/reply/directive-handling.impl.d.ts +3 -0
  547. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model-picker.d.ts +13 -0
  548. package/dist/plugin-sdk/auto-reply/reply/directive-handling.model.d.ts +42 -0
  549. package/dist/plugin-sdk/auto-reply/reply/directive-handling.params.d.ts +51 -0
  550. package/dist/plugin-sdk/auto-reply/reply/directive-handling.parse.d.ts +62 -0
  551. package/dist/plugin-sdk/auto-reply/reply/directive-handling.persist.d.ts +37 -0
  552. package/dist/plugin-sdk/auto-reply/reply/directive-handling.queue-validation.d.ts +10 -0
  553. package/dist/plugin-sdk/auto-reply/reply/directive-handling.shared.d.ts +16 -0
  554. package/dist/plugin-sdk/auto-reply/reply/directive-parsing.d.ts +5 -0
  555. package/dist/plugin-sdk/auto-reply/reply/directives.d.ts +38 -0
  556. package/dist/plugin-sdk/auto-reply/reply/dispatch-from-config.d.ts +16 -0
  557. package/dist/plugin-sdk/auto-reply/reply/dispatcher-registry.d.ts +24 -0
  558. package/dist/plugin-sdk/auto-reply/reply/elevated-unavailable.d.ts +8 -0
  559. package/dist/plugin-sdk/auto-reply/reply/exec/directive.d.ts +20 -0
  560. package/dist/plugin-sdk/auto-reply/reply/exec.d.ts +1 -0
  561. package/dist/plugin-sdk/auto-reply/reply/followup-runner.d.ts +16 -0
  562. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-apply.d.ts +64 -0
  563. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives-utils.d.ts +2 -0
  564. package/dist/plugin-sdk/auto-reply/reply/get-reply-directives.d.ts +92 -0
  565. package/dist/plugin-sdk/auto-reply/reply/get-reply-inline-actions.d.ts +59 -0
  566. package/dist/plugin-sdk/auto-reply/reply/get-reply-run.d.ts +69 -0
  567. package/dist/plugin-sdk/auto-reply/reply/get-reply.d.ts +4 -0
  568. package/dist/plugin-sdk/auto-reply/reply/groups.d.ts +26 -0
  569. package/dist/plugin-sdk/auto-reply/reply/history.d.ts +72 -0
  570. package/dist/plugin-sdk/auto-reply/reply/inbound-context.d.ts +8 -0
  571. package/dist/plugin-sdk/auto-reply/reply/inbound-dedupe.d.ts +8 -0
  572. package/dist/plugin-sdk/auto-reply/reply/inbound-meta.d.ts +3 -0
  573. package/dist/plugin-sdk/auto-reply/reply/inbound-text.d.ts +1 -0
  574. package/dist/plugin-sdk/auto-reply/reply/line-directives.d.ts +22 -0
  575. package/dist/plugin-sdk/auto-reply/reply/memory-flush.d.ts +23 -0
  576. package/dist/plugin-sdk/auto-reply/reply/mentions.d.ts +19 -0
  577. package/dist/plugin-sdk/auto-reply/reply/model-selection.d.ts +64 -0
  578. package/dist/plugin-sdk/auto-reply/reply/normalize-reply.d.ts +13 -0
  579. package/dist/plugin-sdk/auto-reply/reply/provider-dispatcher.d.ts +19 -0
  580. package/dist/plugin-sdk/auto-reply/reply/queue/cleanup.d.ts +6 -0
  581. package/dist/plugin-sdk/auto-reply/reply/queue/directive.d.ts +15 -0
  582. package/dist/plugin-sdk/auto-reply/reply/queue/drain.d.ts +2 -0
  583. package/dist/plugin-sdk/auto-reply/reply/queue/enqueue.d.ts +3 -0
  584. package/dist/plugin-sdk/auto-reply/reply/queue/normalize.d.ts +3 -0
  585. package/dist/plugin-sdk/auto-reply/reply/queue/settings.d.ts +2 -0
  586. package/dist/plugin-sdk/auto-reply/reply/queue/state.d.ts +19 -0
  587. package/dist/plugin-sdk/auto-reply/reply/queue/types.d.ts +84 -0
  588. package/dist/plugin-sdk/auto-reply/reply/queue.d.ts +8 -0
  589. package/dist/plugin-sdk/auto-reply/reply/reply-delivery.d.ts +27 -0
  590. package/dist/plugin-sdk/auto-reply/reply/reply-directives.d.ts +14 -0
  591. package/dist/plugin-sdk/auto-reply/reply/reply-dispatcher.d.ts +52 -0
  592. package/dist/plugin-sdk/auto-reply/reply/reply-elevated.d.ts +16 -0
  593. package/dist/plugin-sdk/auto-reply/reply/reply-inline.d.ts +8 -0
  594. package/dist/plugin-sdk/auto-reply/reply/reply-payloads.d.ts +22 -0
  595. package/dist/plugin-sdk/auto-reply/reply/reply-tags.d.ts +6 -0
  596. package/dist/plugin-sdk/auto-reply/reply/reply-threading.d.ts +9 -0
  597. package/dist/plugin-sdk/auto-reply/reply/response-prefix-template.d.ts +51 -0
  598. package/dist/plugin-sdk/auto-reply/reply/route-reply.d.ts +56 -0
  599. package/dist/plugin-sdk/auto-reply/reply/session-reset-model.d.ts +24 -0
  600. package/dist/plugin-sdk/auto-reply/reply/session-reset-prompt.d.ts +1 -0
  601. package/dist/plugin-sdk/auto-reply/reply/session-run-accounting.d.ts +11 -0
  602. package/dist/plugin-sdk/auto-reply/reply/session-updates.d.ts +34 -0
  603. package/dist/plugin-sdk/auto-reply/reply/session-usage.d.ts +21 -0
  604. package/dist/plugin-sdk/auto-reply/reply/session.d.ts +26 -0
  605. package/dist/plugin-sdk/auto-reply/reply/stage-sandbox-media.d.ts +9 -0
  606. package/dist/plugin-sdk/auto-reply/reply/subagents-utils.d.ts +7 -0
  607. package/dist/plugin-sdk/auto-reply/reply/typing-mode.d.ts +27 -0
  608. package/dist/plugin-sdk/auto-reply/reply/typing.d.ts +18 -0
  609. package/dist/plugin-sdk/auto-reply/reply/untrusted-context.d.ts +1 -0
  610. package/dist/plugin-sdk/auto-reply/reply.d.ts +6 -0
  611. package/dist/plugin-sdk/auto-reply/send-policy.d.ts +6 -0
  612. package/dist/plugin-sdk/auto-reply/skill-commands.d.ts +18 -0
  613. package/dist/plugin-sdk/auto-reply/status.d.ts +55 -0
  614. package/dist/plugin-sdk/auto-reply/templating.d.ts +152 -0
  615. package/dist/plugin-sdk/auto-reply/thinking.d.ts +22 -0
  616. package/dist/plugin-sdk/auto-reply/tokens.d.ts +3 -0
  617. package/dist/plugin-sdk/auto-reply/types.d.ts +61 -0
  618. package/dist/plugin-sdk/browser/bridge-auth-registry.d.ts +8 -0
  619. package/dist/plugin-sdk/browser/bridge-server.d.ts +18 -0
  620. package/dist/plugin-sdk/browser/cdp.d.ts +123 -0
  621. package/dist/plugin-sdk/browser/cdp.helpers.d.ts +13 -0
  622. package/dist/plugin-sdk/browser/chrome.d.ts +20 -0
  623. package/dist/plugin-sdk/browser/chrome.executables.d.ts +9 -0
  624. package/dist/plugin-sdk/browser/chrome.profile-decoration.d.ts +10 -0
  625. package/dist/plugin-sdk/browser/client-actions-core.d.ts +144 -0
  626. package/dist/plugin-sdk/browser/client-actions-observe.d.ts +68 -0
  627. package/dist/plugin-sdk/browser/client-actions-state.d.ts +90 -0
  628. package/dist/plugin-sdk/browser/client-actions-types.d.ts +18 -0
  629. package/dist/plugin-sdk/browser/client-actions.d.ts +4 -0
  630. package/dist/plugin-sdk/browser/client-fetch.d.ts +20 -0
  631. package/dist/plugin-sdk/browser/client.d.ts +147 -0
  632. package/dist/plugin-sdk/browser/config.d.ts +39 -0
  633. package/dist/plugin-sdk/browser/constants.d.ts +8 -0
  634. package/dist/plugin-sdk/browser/control-auth.d.ts +13 -0
  635. package/dist/plugin-sdk/browser/control-service.d.ts +5 -0
  636. package/dist/plugin-sdk/browser/csrf.d.ts +8 -0
  637. package/dist/plugin-sdk/browser/extension-relay.d.ts +15 -0
  638. package/dist/plugin-sdk/browser/http-auth.d.ts +5 -0
  639. package/dist/plugin-sdk/browser/paths.d.ts +27 -0
  640. package/dist/plugin-sdk/browser/profiles-service.d.ts +25 -0
  641. package/dist/plugin-sdk/browser/profiles.d.ts +30 -0
  642. package/dist/plugin-sdk/browser/proxy-files.d.ts +7 -0
  643. package/dist/plugin-sdk/browser/pw-ai-module.d.ts +6 -0
  644. package/dist/plugin-sdk/browser/pw-ai-state.d.ts +2 -0
  645. package/dist/plugin-sdk/browser/pw-ai.d.ts +2 -0
  646. package/dist/plugin-sdk/browser/pw-role-snapshot.d.ts +35 -0
  647. package/dist/plugin-sdk/browser/pw-session.d.ts +160 -0
  648. package/dist/plugin-sdk/browser/pw-tools-core.activity.d.ts +21 -0
  649. package/dist/plugin-sdk/browser/pw-tools-core.d.ts +8 -0
  650. package/dist/plugin-sdk/browser/pw-tools-core.downloads.d.ts +34 -0
  651. package/dist/plugin-sdk/browser/pw-tools-core.interactions.d.ts +114 -0
  652. package/dist/plugin-sdk/browser/pw-tools-core.responses.d.ts +13 -0
  653. package/dist/plugin-sdk/browser/pw-tools-core.shared.d.ts +6 -0
  654. package/dist/plugin-sdk/browser/pw-tools-core.snapshot.d.ts +64 -0
  655. package/dist/plugin-sdk/browser/pw-tools-core.state.d.ts +46 -0
  656. package/dist/plugin-sdk/browser/pw-tools-core.storage.d.ts +47 -0
  657. package/dist/plugin-sdk/browser/pw-tools-core.trace.d.ts +12 -0
  658. package/dist/plugin-sdk/browser/resolved-config-refresh.d.ts +12 -0
  659. package/dist/plugin-sdk/browser/routes/agent.act.d.ts +3 -0
  660. package/dist/plugin-sdk/browser/routes/agent.act.shared.d.ts +10 -0
  661. package/dist/plugin-sdk/browser/routes/agent.d.ts +3 -0
  662. package/dist/plugin-sdk/browser/routes/agent.debug.d.ts +3 -0
  663. package/dist/plugin-sdk/browser/routes/agent.shared.d.ts +9 -0
  664. package/dist/plugin-sdk/browser/routes/agent.snapshot.d.ts +3 -0
  665. package/dist/plugin-sdk/browser/routes/agent.storage.d.ts +3 -0
  666. package/dist/plugin-sdk/browser/routes/basic.d.ts +3 -0
  667. package/dist/plugin-sdk/browser/routes/dispatcher.d.ts +16 -0
  668. package/dist/plugin-sdk/browser/routes/index.d.ts +3 -0
  669. package/dist/plugin-sdk/browser/routes/path-output.d.ts +1 -0
  670. package/dist/plugin-sdk/browser/routes/tabs.d.ts +3 -0
  671. package/dist/plugin-sdk/browser/routes/types.d.ts +20 -0
  672. package/dist/plugin-sdk/browser/routes/utils.d.ts +15 -0
  673. package/dist/plugin-sdk/browser/screenshot.d.ts +9 -0
  674. package/dist/plugin-sdk/browser/server-context.d.ts +4 -0
  675. package/dist/plugin-sdk/browser/server-context.types.d.ts +79 -0
  676. package/dist/plugin-sdk/browser/server-middleware.d.ts +6 -0
  677. package/dist/plugin-sdk/browser/target-id.d.ts +11 -0
  678. package/dist/plugin-sdk/browser/trash.d.ts +1 -0
  679. package/dist/plugin-sdk/channel-web.d.ts +6 -0
  680. package/dist/plugin-sdk/channels/account-summary.d.ts +17 -0
  681. package/dist/plugin-sdk/channels/ack-reactions.d.ts +29 -0
  682. package/dist/plugin-sdk/channels/allowlist-match.d.ts +15 -0
  683. package/dist/plugin-sdk/channels/allowlists/resolve-utils.d.ts +20 -0
  684. package/dist/plugin-sdk/channels/channel-config.d.ts +39 -0
  685. package/dist/plugin-sdk/channels/chat-type.d.ts +2 -0
  686. package/dist/plugin-sdk/channels/command-gating.d.ts +20 -0
  687. package/dist/plugin-sdk/channels/conversation-label.d.ts +2 -0
  688. package/dist/plugin-sdk/channels/dock.d.ts +36 -0
  689. package/dist/plugin-sdk/channels/location.d.ts +21 -0
  690. package/dist/plugin-sdk/channels/logging.d.ts +20 -0
  691. package/dist/plugin-sdk/channels/mention-gating.d.ts +27 -0
  692. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.d.ts +3 -0
  693. package/dist/plugin-sdk/channels/plugins/actions/discord/handle-action.guild-admin.d.ts +9 -0
  694. package/dist/plugin-sdk/channels/plugins/actions/discord.d.ts +2 -0
  695. package/dist/plugin-sdk/channels/plugins/actions/signal.d.ts +2 -0
  696. package/dist/plugin-sdk/channels/plugins/actions/telegram.d.ts +2 -0
  697. package/dist/plugin-sdk/channels/plugins/agent-tools/whatsapp-login.d.ts +2 -0
  698. package/dist/plugin-sdk/channels/plugins/allowlist-match.d.ts +2 -0
  699. package/dist/plugin-sdk/channels/plugins/bluebubbles-actions.d.ts +48 -0
  700. package/dist/plugin-sdk/channels/plugins/channel-config.d.ts +2 -0
  701. package/dist/plugin-sdk/channels/plugins/config-helpers.d.ts +14 -0
  702. package/dist/plugin-sdk/channels/plugins/config-schema.d.ts +3 -0
  703. package/dist/plugin-sdk/channels/plugins/config-writes.d.ts +7 -0
  704. package/dist/plugin-sdk/channels/plugins/directory-config.d.ts +16 -0
  705. package/dist/plugin-sdk/channels/plugins/group-mentions.d.ts +28 -0
  706. package/dist/plugin-sdk/channels/plugins/helpers.d.ts +8 -0
  707. package/dist/plugin-sdk/channels/plugins/index.d.ts +8 -0
  708. package/dist/plugin-sdk/channels/plugins/media-limits.d.ts +9 -0
  709. package/dist/plugin-sdk/channels/plugins/message-action-names.d.ts +2 -0
  710. package/dist/plugin-sdk/channels/plugins/message-actions.d.ts +7 -0
  711. package/dist/plugin-sdk/channels/plugins/normalize/discord.d.ts +2 -0
  712. package/dist/plugin-sdk/channels/plugins/normalize/imessage.d.ts +2 -0
  713. package/dist/plugin-sdk/channels/plugins/normalize/signal.d.ts +2 -0
  714. package/dist/plugin-sdk/channels/plugins/normalize/slack.d.ts +2 -0
  715. package/dist/plugin-sdk/channels/plugins/normalize/telegram.d.ts +2 -0
  716. package/dist/plugin-sdk/channels/plugins/normalize/whatsapp.d.ts +2 -0
  717. package/dist/plugin-sdk/channels/plugins/onboarding/channel-access.d.ts +31 -0
  718. package/dist/plugin-sdk/channels/plugins/onboarding/discord.d.ts +2 -0
  719. package/dist/plugin-sdk/channels/plugins/onboarding/helpers.d.ts +3 -0
  720. package/dist/plugin-sdk/channels/plugins/onboarding/imessage.d.ts +2 -0
  721. package/dist/plugin-sdk/channels/plugins/onboarding/signal.d.ts +3 -0
  722. package/dist/plugin-sdk/channels/plugins/onboarding/slack.d.ts +2 -0
  723. package/dist/plugin-sdk/channels/plugins/onboarding/telegram.d.ts +2 -0
  724. package/dist/plugin-sdk/channels/plugins/onboarding/whatsapp.d.ts +2 -0
  725. package/dist/plugin-sdk/channels/plugins/onboarding-types.d.ts +77 -0
  726. package/dist/plugin-sdk/channels/plugins/outbound/load.d.ts +2 -0
  727. package/dist/plugin-sdk/channels/plugins/pairing-message.d.ts +1 -0
  728. package/dist/plugin-sdk/channels/plugins/pairing.d.ts +16 -0
  729. package/dist/plugin-sdk/channels/plugins/setup-helpers.d.ts +13 -0
  730. package/dist/plugin-sdk/channels/plugins/status-issues/bluebubbles.d.ts +2 -0
  731. package/dist/plugin-sdk/channels/plugins/status-issues/discord.d.ts +2 -0
  732. package/dist/plugin-sdk/channels/plugins/status-issues/shared.d.ts +11 -0
  733. package/dist/plugin-sdk/channels/plugins/status-issues/telegram.d.ts +2 -0
  734. package/dist/plugin-sdk/channels/plugins/status-issues/whatsapp.d.ts +2 -0
  735. package/dist/plugin-sdk/channels/plugins/types.adapters.d.ts +297 -0
  736. package/dist/plugin-sdk/channels/plugins/types.core.d.ts +329 -0
  737. package/dist/plugin-sdk/channels/plugins/types.d.ts +6 -0
  738. package/dist/plugin-sdk/channels/plugins/types.plugin.d.ts +53 -0
  739. package/dist/plugin-sdk/channels/plugins/whatsapp-heartbeat.d.ts +11 -0
  740. package/dist/plugin-sdk/channels/registry.d.ts +16 -0
  741. package/dist/plugin-sdk/channels/reply-prefix.d.ts +24 -0
  742. package/dist/plugin-sdk/channels/sender-label.d.ts +9 -0
  743. package/dist/plugin-sdk/channels/session.d.ts +18 -0
  744. package/dist/plugin-sdk/channels/typing.d.ts +12 -0
  745. package/dist/plugin-sdk/channels/web/index.d.ts +1 -0
  746. package/dist/plugin-sdk/cli/cli-name.d.ts +3 -0
  747. package/dist/plugin-sdk/cli/cli-utils.d.ts +19 -0
  748. package/dist/plugin-sdk/cli/command-format.d.ts +1 -0
  749. package/dist/plugin-sdk/cli/deps.d.ts +18 -0
  750. package/dist/plugin-sdk/cli/memory-cli.d.ts +12 -0
  751. package/dist/plugin-sdk/cli/nodes-camera.d.ts +32 -0
  752. package/dist/plugin-sdk/cli/nodes-canvas.d.ts +10 -0
  753. package/dist/plugin-sdk/cli/nodes-run.d.ts +3 -0
  754. package/dist/plugin-sdk/cli/nodes-screen.d.ts +18 -0
  755. package/dist/plugin-sdk/cli/parse-bytes.d.ts +4 -0
  756. package/dist/plugin-sdk/cli/parse-duration.d.ts +4 -0
  757. package/dist/plugin-sdk/cli/parse-timeout.d.ts +1 -0
  758. package/dist/plugin-sdk/cli/profile-utils.d.ts +2 -0
  759. package/dist/plugin-sdk/cli/progress.d.ts +24 -0
  760. package/dist/plugin-sdk/cli/prompt.d.ts +1 -0
  761. package/dist/plugin-sdk/cli/wait.d.ts +1 -0
  762. package/dist/plugin-sdk/commands/agent/types.d.ts +77 -0
  763. package/dist/plugin-sdk/commands/daemon-runtime.d.ts +8 -0
  764. package/dist/plugin-sdk/commands/health.d.ts +63 -0
  765. package/dist/plugin-sdk/commands/oauth-flow.d.ts +21 -0
  766. package/dist/plugin-sdk/commands/onboard-helpers.d.ts +82 -0
  767. package/dist/plugin-sdk/commands/onboard-types.d.ts +76 -0
  768. package/dist/plugin-sdk/commands/signal-install.d.ts +30 -0
  769. package/dist/plugin-sdk/compat/legacy-names.d.ts +8 -0
  770. package/dist/plugin-sdk/config/agent-dirs.d.ts +14 -0
  771. package/dist/plugin-sdk/config/agent-limits.d.ts +5 -0
  772. package/dist/plugin-sdk/config/backup-rotation.d.ts +5 -0
  773. package/dist/plugin-sdk/config/cache-utils.d.ts +6 -0
  774. package/dist/plugin-sdk/config/config-paths.d.ts +10 -0
  775. package/dist/plugin-sdk/config/config.d.ts +7 -0
  776. package/dist/plugin-sdk/config/defaults.d.ts +18 -0
  777. package/dist/plugin-sdk/config/env-preserve.d.ts +25 -0
  778. package/dist/plugin-sdk/config/env-substitution.d.ts +36 -0
  779. package/dist/plugin-sdk/config/env-vars.d.ts +3 -0
  780. package/dist/plugin-sdk/config/group-policy.d.ts +47 -0
  781. package/dist/plugin-sdk/config/includes.d.ts +32 -0
  782. package/dist/plugin-sdk/config/io.d.ts +55 -0
  783. package/dist/plugin-sdk/config/legacy-migrate.d.ts +5 -0
  784. package/dist/plugin-sdk/config/legacy.d.ts +6 -0
  785. package/dist/plugin-sdk/config/legacy.migrations.d.ts +1 -0
  786. package/dist/plugin-sdk/config/legacy.migrations.part-1.d.ts +2 -0
  787. package/dist/plugin-sdk/config/legacy.migrations.part-2.d.ts +2 -0
  788. package/dist/plugin-sdk/config/legacy.migrations.part-3.d.ts +2 -0
  789. package/dist/plugin-sdk/config/legacy.rules.d.ts +2 -0
  790. package/dist/plugin-sdk/config/legacy.shared.d.ts +19 -0
  791. package/dist/plugin-sdk/config/markdown-tables.d.ts +7 -0
  792. package/dist/plugin-sdk/config/merge-config.d.ts +7 -0
  793. package/dist/plugin-sdk/config/merge-patch.d.ts +5 -0
  794. package/dist/plugin-sdk/config/normalize-paths.d.ts +8 -0
  795. package/dist/plugin-sdk/config/paths.d.ts +57 -0
  796. package/dist/plugin-sdk/config/port-defaults.d.ts +13 -0
  797. package/dist/plugin-sdk/config/runtime-overrides.d.ts +15 -0
  798. package/dist/plugin-sdk/config/sessions/delivery-info.d.ts +12 -0
  799. package/dist/plugin-sdk/config/sessions/group.d.ts +11 -0
  800. package/dist/plugin-sdk/config/sessions/main-session.d.ts +43 -0
  801. package/dist/plugin-sdk/config/sessions/metadata.d.ts +16 -0
  802. package/dist/plugin-sdk/config/sessions/paths.d.ts +21 -0
  803. package/dist/plugin-sdk/config/sessions/reset.d.ts +43 -0
  804. package/dist/plugin-sdk/config/sessions/session-key.d.ts +8 -0
  805. package/dist/plugin-sdk/config/sessions/store.d.ts +99 -0
  806. package/dist/plugin-sdk/config/sessions/transcript.d.ts +18 -0
  807. package/dist/plugin-sdk/config/sessions/types.d.ts +156 -0
  808. package/dist/plugin-sdk/config/sessions.d.ts +10 -0
  809. package/dist/plugin-sdk/config/talk.d.ts +11 -0
  810. package/dist/plugin-sdk/config/telegram-custom-commands.d.ts +24 -0
  811. package/dist/plugin-sdk/config/types.agent-defaults.d.ts +260 -0
  812. package/dist/plugin-sdk/config/types.agents.d.ts +80 -0
  813. package/dist/plugin-sdk/config/types.anima.d.ts +1 -0
  814. package/dist/plugin-sdk/config/types.approvals.d.ts +26 -0
  815. package/dist/plugin-sdk/config/types.auth.d.ts +28 -0
  816. package/dist/plugin-sdk/config/types.base.d.ts +172 -0
  817. package/dist/plugin-sdk/config/types.browser.d.ts +41 -0
  818. package/dist/plugin-sdk/config/types.channels.d.ts +48 -0
  819. package/dist/plugin-sdk/config/types.cron.d.ts +11 -0
  820. package/dist/plugin-sdk/config/types.d.ts +30 -0
  821. package/dist/plugin-sdk/config/types.discord.d.ts +188 -0
  822. package/dist/plugin-sdk/config/types.gateway.d.ts +288 -0
  823. package/dist/plugin-sdk/config/types.googlechat.d.ts +100 -0
  824. package/dist/plugin-sdk/config/types.hooks.d.ts +128 -0
  825. package/dist/plugin-sdk/config/types.imessage.d.ts +71 -0
  826. package/dist/plugin-sdk/config/types.irc.d.ts +96 -0
  827. package/dist/plugin-sdk/config/types.memory.d.ts +45 -0
  828. package/dist/plugin-sdk/config/types.messages.d.ts +121 -0
  829. package/dist/plugin-sdk/config/types.models.d.ts +54 -0
  830. package/dist/plugin-sdk/config/types.msteams.d.ts +101 -0
  831. package/dist/plugin-sdk/config/types.node-host.d.ts +10 -0
  832. package/dist/plugin-sdk/config/types.openclaw.d.ts +114 -0
  833. package/dist/plugin-sdk/config/types.plugins.d.ts +32 -0
  834. package/dist/plugin-sdk/config/types.queue.d.ts +14 -0
  835. package/dist/plugin-sdk/config/types.sandbox.d.ts +78 -0
  836. package/dist/plugin-sdk/config/types.signal.d.ts +86 -0
  837. package/dist/plugin-sdk/config/types.skills.d.ts +28 -0
  838. package/dist/plugin-sdk/config/types.slack.d.ts +150 -0
  839. package/dist/plugin-sdk/config/types.telegram.d.ts +163 -0
  840. package/dist/plugin-sdk/config/types.tools.d.ts +467 -0
  841. package/dist/plugin-sdk/config/types.tts.d.ts +78 -0
  842. package/dist/plugin-sdk/config/types.whatsapp.d.ts +142 -0
  843. package/dist/plugin-sdk/config/validation.d.ts +37 -0
  844. package/dist/plugin-sdk/config/version.d.ts +8 -0
  845. package/dist/plugin-sdk/config/zod-schema.agent-defaults.d.ts +249 -0
  846. package/dist/plugin-sdk/config/zod-schema.agent-runtime.d.ts +856 -0
  847. package/dist/plugin-sdk/config/zod-schema.agents.d.ts +504 -0
  848. package/dist/plugin-sdk/config/zod-schema.allowdeny.d.ts +13 -0
  849. package/dist/plugin-sdk/config/zod-schema.approvals.d.ts +15 -0
  850. package/dist/plugin-sdk/config/zod-schema.channels.d.ts +6 -0
  851. package/dist/plugin-sdk/config/zod-schema.core.d.ts +683 -0
  852. package/dist/plugin-sdk/config/zod-schema.d.ts +3401 -0
  853. package/dist/plugin-sdk/config/zod-schema.hooks.d.ts +79 -0
  854. package/dist/plugin-sdk/config/zod-schema.providers-core.d.ts +3233 -0
  855. package/dist/plugin-sdk/config/zod-schema.providers-whatsapp.d.ts +231 -0
  856. package/dist/plugin-sdk/config/zod-schema.providers.d.ts +1900 -0
  857. package/dist/plugin-sdk/config/zod-schema.sensitive.d.ts +2 -0
  858. package/dist/plugin-sdk/config/zod-schema.session.d.ts +203 -0
  859. package/dist/plugin-sdk/cron/delivery.d.ts +9 -0
  860. package/dist/plugin-sdk/cron/normalize.d.ts +9 -0
  861. package/dist/plugin-sdk/cron/parse.d.ts +1 -0
  862. package/dist/plugin-sdk/cron/payload-migration.d.ts +3 -0
  863. package/dist/plugin-sdk/cron/schedule.d.ts +2 -0
  864. package/dist/plugin-sdk/cron/service/jobs.d.ts +21 -0
  865. package/dist/plugin-sdk/cron/service/locked.d.ts +2 -0
  866. package/dist/plugin-sdk/cron/service/normalize.d.ts +17 -0
  867. package/dist/plugin-sdk/cron/service/ops.d.ts +43 -0
  868. package/dist/plugin-sdk/cron/service/state.d.ts +121 -0
  869. package/dist/plugin-sdk/cron/service/store.d.ts +9 -0
  870. package/dist/plugin-sdk/cron/service/timer.d.ts +25 -0
  871. package/dist/plugin-sdk/cron/service.d.ts +48 -0
  872. package/dist/plugin-sdk/cron/session-reaper.d.ts +35 -0
  873. package/dist/plugin-sdk/cron/store.d.ts +6 -0
  874. package/dist/plugin-sdk/cron/types.d.ts +95 -0
  875. package/dist/plugin-sdk/daemon/constants.d.ts +30 -0
  876. package/dist/plugin-sdk/discord/accounts.d.ts +9 -0
  877. package/dist/plugin-sdk/discord/audit.d.ts +2 -0
  878. package/dist/plugin-sdk/discord/directory-live.d.ts +4 -0
  879. package/dist/plugin-sdk/discord/monitor/allow-list.d.ts +1 -0
  880. package/dist/plugin-sdk/discord/monitor/gateway-registry.d.ts +3 -0
  881. package/dist/plugin-sdk/discord/monitor/presence-cache.d.ts +1 -0
  882. package/dist/plugin-sdk/discord/monitor.d.ts +3 -0
  883. package/dist/plugin-sdk/discord/pluralkit.d.ts +1 -0
  884. package/dist/plugin-sdk/discord/probe.d.ts +3 -0
  885. package/dist/plugin-sdk/discord/resolve-channels.d.ts +1 -0
  886. package/dist/plugin-sdk/discord/resolve-users.d.ts +1 -0
  887. package/dist/plugin-sdk/discord/send.d.ts +6 -0
  888. package/dist/plugin-sdk/discord/targets.d.ts +2 -0
  889. package/dist/plugin-sdk/gateway/auth-rate-limit.d.ts +59 -0
  890. package/dist/plugin-sdk/gateway/auth.d.ts +48 -0
  891. package/dist/plugin-sdk/gateway/call.d.ts +51 -0
  892. package/dist/plugin-sdk/gateway/chat-abort.d.ts +44 -0
  893. package/dist/plugin-sdk/gateway/chat-sanitize.d.ts +4 -0
  894. package/dist/plugin-sdk/gateway/client.d.ts +63 -0
  895. package/dist/plugin-sdk/gateway/control-ui-shared.d.ts +9 -0
  896. package/dist/plugin-sdk/gateway/device-auth.d.ts +12 -0
  897. package/dist/plugin-sdk/gateway/exec-approval-manager.d.ts +44 -0
  898. package/dist/plugin-sdk/gateway/net.d.ts +57 -0
  899. package/dist/plugin-sdk/gateway/node-registry.d.ts +60 -0
  900. package/dist/plugin-sdk/gateway/protocol/client-info.d.ts +58 -0
  901. package/dist/plugin-sdk/gateway/protocol/index.d.ts +661 -0
  902. package/dist/plugin-sdk/gateway/protocol/schema/agent.d.ts +86 -0
  903. package/dist/plugin-sdk/gateway/protocol/schema/agents-models-skills.d.ts +152 -0
  904. package/dist/plugin-sdk/gateway/protocol/schema/channels.d.ts +126 -0
  905. package/dist/plugin-sdk/gateway/protocol/schema/config.d.ts +51 -0
  906. package/dist/plugin-sdk/gateway/protocol/schema/cron.d.ts +353 -0
  907. package/dist/plugin-sdk/gateway/protocol/schema/devices.d.ts +38 -0
  908. package/dist/plugin-sdk/gateway/protocol/schema/error-codes.d.ts +14 -0
  909. package/dist/plugin-sdk/gateway/protocol/schema/exec-approvals.d.ts +163 -0
  910. package/dist/plugin-sdk/gateway/protocol/schema/frames.d.ts +164 -0
  911. package/dist/plugin-sdk/gateway/protocol/schema/logs-chat.d.ts +45 -0
  912. package/dist/plugin-sdk/gateway/protocol/schema/nodes.d.ts +64 -0
  913. package/dist/plugin-sdk/gateway/protocol/schema/primitives.d.ts +4 -0
  914. package/dist/plugin-sdk/gateway/protocol/schema/protocol-schemas.d.ts +3 -0
  915. package/dist/plugin-sdk/gateway/protocol/schema/sessions.d.ts +76 -0
  916. package/dist/plugin-sdk/gateway/protocol/schema/snapshot.d.ts +64 -0
  917. package/dist/plugin-sdk/gateway/protocol/schema/types.d.ts +124 -0
  918. package/dist/plugin-sdk/gateway/protocol/schema/wizard.d.ts +86 -0
  919. package/dist/plugin-sdk/gateway/protocol/schema.d.ts +16 -0
  920. package/dist/plugin-sdk/gateway/server/ws-types.d.ts +9 -0
  921. package/dist/plugin-sdk/gateway/server-channels.d.ts +24 -0
  922. package/dist/plugin-sdk/gateway/server-methods/types.d.ts +98 -0
  923. package/dist/plugin-sdk/gateway/server-shared.d.ts +7 -0
  924. package/dist/plugin-sdk/gateway/session-utils.d.ts +71 -0
  925. package/dist/plugin-sdk/gateway/session-utils.fs.d.ts +33 -0
  926. package/dist/plugin-sdk/gateway/session-utils.types.d.ts +84 -0
  927. package/dist/plugin-sdk/globals.d.ts +11 -0
  928. package/dist/plugin-sdk/hooks/internal-hooks.d.ts +95 -0
  929. package/dist/plugin-sdk/hooks/types.d.ts +62 -0
  930. package/dist/plugin-sdk/imessage/accounts.d.ts +8 -0
  931. package/dist/plugin-sdk/imessage/monitor.d.ts +3 -0
  932. package/dist/plugin-sdk/imessage/probe.d.ts +3 -0
  933. package/dist/plugin-sdk/imessage/send.d.ts +1 -0
  934. package/dist/plugin-sdk/imessage/target-parsing-helpers.d.ts +4 -0
  935. package/dist/plugin-sdk/imessage/targets.d.ts +2 -0
  936. package/dist/plugin-sdk/index.d.ts +1 -0
  937. package/dist/plugin-sdk/index.js +27570 -0
  938. package/dist/plugin-sdk/infra/agent-events.d.ts +21 -0
  939. package/dist/plugin-sdk/infra/anima-root.d.ts +1 -0
  940. package/dist/plugin-sdk/infra/archive.d.ts +41 -0
  941. package/dist/plugin-sdk/infra/backoff.d.ts +8 -0
  942. package/dist/plugin-sdk/infra/binaries.d.ts +3 -0
  943. package/dist/plugin-sdk/infra/brew.d.ts +8 -0
  944. package/dist/plugin-sdk/infra/channel-activity.d.ts +18 -0
  945. package/dist/plugin-sdk/infra/channel-summary.d.ts +6 -0
  946. package/dist/plugin-sdk/infra/dedupe.d.ts +11 -0
  947. package/dist/plugin-sdk/infra/device-auth-store.d.ts +18 -0
  948. package/dist/plugin-sdk/infra/device-identity.d.ts +11 -0
  949. package/dist/plugin-sdk/infra/device-pairing.d.ts +96 -0
  950. package/dist/plugin-sdk/infra/diagnostic-events.d.ts +121 -0
  951. package/dist/plugin-sdk/infra/dotenv.d.ts +3 -0
  952. package/dist/plugin-sdk/infra/env.d.ts +11 -0
  953. package/dist/plugin-sdk/infra/errors.d.ts +11 -0
  954. package/dist/plugin-sdk/infra/exec-approvals-allowlist.d.ts +45 -0
  955. package/dist/plugin-sdk/infra/exec-approvals-analysis.d.ts +78 -0
  956. package/dist/plugin-sdk/infra/exec-approvals.d.ts +107 -0
  957. package/dist/plugin-sdk/infra/exec-safety.d.ts +1 -0
  958. package/dist/plugin-sdk/infra/fetch.d.ts +2 -0
  959. package/dist/plugin-sdk/infra/file-lock.d.ts +2 -0
  960. package/dist/plugin-sdk/infra/format-time/format-datetime.d.ts +35 -0
  961. package/dist/plugin-sdk/infra/format-time/format-duration.d.ts +23 -0
  962. package/dist/plugin-sdk/infra/format-time/format-relative.d.ts +39 -0
  963. package/dist/plugin-sdk/infra/git-commit.d.ts +4 -0
  964. package/dist/plugin-sdk/infra/heartbeat-active-hours.d.ts +5 -0
  965. package/dist/plugin-sdk/infra/heartbeat-events-filter.d.ts +3 -0
  966. package/dist/plugin-sdk/infra/heartbeat-events.d.ts +21 -0
  967. package/dist/plugin-sdk/infra/heartbeat-runner.d.ts +45 -0
  968. package/dist/plugin-sdk/infra/heartbeat-visibility.d.ts +17 -0
  969. package/dist/plugin-sdk/infra/heartbeat-wake.d.ts +27 -0
  970. package/dist/plugin-sdk/infra/home-dir.d.ts +7 -0
  971. package/dist/plugin-sdk/infra/http-body.d.ts +46 -0
  972. package/dist/plugin-sdk/infra/json-file.d.ts +2 -0
  973. package/dist/plugin-sdk/infra/net/fetch-guard.d.ts +21 -0
  974. package/dist/plugin-sdk/infra/net/ssrf.d.ts +32 -0
  975. package/dist/plugin-sdk/infra/node-pairing.d.ts +62 -0
  976. package/dist/plugin-sdk/infra/node-shell.d.ts +1 -0
  977. package/dist/plugin-sdk/infra/openclaw-root.d.ts +10 -0
  978. package/dist/plugin-sdk/infra/outbound/abort.d.ts +8 -0
  979. package/dist/plugin-sdk/infra/outbound/channel-adapters.d.ts +6 -0
  980. package/dist/plugin-sdk/infra/outbound/channel-selection.d.ts +11 -0
  981. package/dist/plugin-sdk/infra/outbound/channel-target.d.ts +6 -0
  982. package/dist/plugin-sdk/infra/outbound/deliver.d.ts +77 -0
  983. package/dist/plugin-sdk/infra/outbound/delivery-queue.d.ts +103 -0
  984. package/dist/plugin-sdk/infra/outbound/directory-cache.d.ts +24 -0
  985. package/dist/plugin-sdk/infra/outbound/identity.d.ts +8 -0
  986. package/dist/plugin-sdk/infra/outbound/message-action-params.d.ts +47 -0
  987. package/dist/plugin-sdk/infra/outbound/message-action-runner.d.ts +74 -0
  988. package/dist/plugin-sdk/infra/outbound/message-action-spec.d.ts +5 -0
  989. package/dist/plugin-sdk/infra/outbound/message.d.ts +85 -0
  990. package/dist/plugin-sdk/infra/outbound/outbound-policy.d.ts +31 -0
  991. package/dist/plugin-sdk/infra/outbound/outbound-send-service.d.ts +64 -0
  992. package/dist/plugin-sdk/infra/outbound/outbound-session.d.ts +31 -0
  993. package/dist/plugin-sdk/infra/outbound/payloads.d.ts +16 -0
  994. package/dist/plugin-sdk/infra/outbound/target-errors.d.ts +6 -0
  995. package/dist/plugin-sdk/infra/outbound/target-normalization.d.ts +4 -0
  996. package/dist/plugin-sdk/infra/outbound/target-resolver.d.ts +53 -0
  997. package/dist/plugin-sdk/infra/outbound/targets.d.ts +65 -0
  998. package/dist/plugin-sdk/infra/outbound/tool-payload.d.ts +2 -0
  999. package/dist/plugin-sdk/infra/pairing-files.d.ts +11 -0
  1000. package/dist/plugin-sdk/infra/pairing-token.d.ts +3 -0
  1001. package/dist/plugin-sdk/infra/path-prepend.d.ts +5 -0
  1002. package/dist/plugin-sdk/infra/ports-format.d.ts +5 -0
  1003. package/dist/plugin-sdk/infra/ports-inspect.d.ts +2 -0
  1004. package/dist/plugin-sdk/infra/ports-lsof.d.ts +2 -0
  1005. package/dist/plugin-sdk/infra/ports-types.d.ts +17 -0
  1006. package/dist/plugin-sdk/infra/ports.d.ts +14 -0
  1007. package/dist/plugin-sdk/infra/provider-usage.auth.d.ts +11 -0
  1008. package/dist/plugin-sdk/infra/provider-usage.d.ts +4 -0
  1009. package/dist/plugin-sdk/infra/provider-usage.fetch.antigravity.d.ts +2 -0
  1010. package/dist/plugin-sdk/infra/provider-usage.fetch.claude.d.ts +2 -0
  1011. package/dist/plugin-sdk/infra/provider-usage.fetch.codex.d.ts +2 -0
  1012. package/dist/plugin-sdk/infra/provider-usage.fetch.copilot.d.ts +2 -0
  1013. package/dist/plugin-sdk/infra/provider-usage.fetch.d.ts +7 -0
  1014. package/dist/plugin-sdk/infra/provider-usage.fetch.gemini.d.ts +2 -0
  1015. package/dist/plugin-sdk/infra/provider-usage.fetch.minimax.d.ts +2 -0
  1016. package/dist/plugin-sdk/infra/provider-usage.fetch.shared.d.ts +1 -0
  1017. package/dist/plugin-sdk/infra/provider-usage.fetch.zai.d.ts +2 -0
  1018. package/dist/plugin-sdk/infra/provider-usage.format.d.ts +13 -0
  1019. package/dist/plugin-sdk/infra/provider-usage.load.d.ts +12 -0
  1020. package/dist/plugin-sdk/infra/provider-usage.shared.d.ts +8 -0
  1021. package/dist/plugin-sdk/infra/provider-usage.types.d.ts +17 -0
  1022. package/dist/plugin-sdk/infra/restart-sentinel.d.ts +50 -0
  1023. package/dist/plugin-sdk/infra/restart.d.ts +61 -0
  1024. package/dist/plugin-sdk/infra/retry.d.ts +21 -0
  1025. package/dist/plugin-sdk/infra/session-cost-usage.d.ts +45 -0
  1026. package/dist/plugin-sdk/infra/session-cost-usage.types.d.ts +153 -0
  1027. package/dist/plugin-sdk/infra/session-maintenance-warning.d.ts +10 -0
  1028. package/dist/plugin-sdk/infra/shell-env.d.ts +33 -0
  1029. package/dist/plugin-sdk/infra/skills-remote.d.ts +25 -0
  1030. package/dist/plugin-sdk/infra/system-events.d.ts +18 -0
  1031. package/dist/plugin-sdk/infra/tailnet.d.ts +7 -0
  1032. package/dist/plugin-sdk/infra/tailscale.d.ts +34 -0
  1033. package/dist/plugin-sdk/infra/tls/fingerprint.d.ts +1 -0
  1034. package/dist/plugin-sdk/infra/tls/gateway.d.ts +16 -0
  1035. package/dist/plugin-sdk/infra/tmp-anima-dir.d.ts +1 -0
  1036. package/dist/plugin-sdk/infra/tmp-openclaw-dir.d.ts +18 -0
  1037. package/dist/plugin-sdk/infra/unhandled-rejections.d.ts +15 -0
  1038. package/dist/plugin-sdk/infra/warning-filter.d.ts +7 -0
  1039. package/dist/plugin-sdk/infra/ws.d.ts +2 -0
  1040. package/dist/plugin-sdk/infra/wsl.d.ts +11 -0
  1041. package/dist/plugin-sdk/line/accounts.d.ts +9 -0
  1042. package/dist/plugin-sdk/line/config-schema.d.ts +1 -0
  1043. package/dist/plugin-sdk/line/flex-templates.d.ts +14 -0
  1044. package/dist/plugin-sdk/line/markdown-to-line.d.ts +6 -0
  1045. package/dist/plugin-sdk/line/monitor.d.ts +3 -0
  1046. package/dist/plugin-sdk/line/probe.d.ts +3 -0
  1047. package/dist/plugin-sdk/line/send.d.ts +14 -0
  1048. package/dist/plugin-sdk/line/template-messages.d.ts +1 -0
  1049. package/dist/plugin-sdk/line/types.d.ts +6 -0
  1050. package/dist/plugin-sdk/link-understanding/apply.d.ts +10 -0
  1051. package/dist/plugin-sdk/link-understanding/defaults.d.ts +2 -0
  1052. package/dist/plugin-sdk/link-understanding/detect.d.ts +3 -0
  1053. package/dist/plugin-sdk/link-understanding/format.d.ts +4 -0
  1054. package/dist/plugin-sdk/link-understanding/runner.d.ts +11 -0
  1055. package/dist/plugin-sdk/logger.d.ts +6 -0
  1056. package/dist/plugin-sdk/logging/config.d.ts +4 -0
  1057. package/dist/plugin-sdk/logging/console.d.ts +23 -0
  1058. package/dist/plugin-sdk/logging/diagnostic-session-state.d.ts +17 -0
  1059. package/dist/plugin-sdk/logging/diagnostic.d.ts +56 -0
  1060. package/dist/plugin-sdk/logging/levels.d.ts +4 -0
  1061. package/dist/plugin-sdk/logging/logger.d.ts +42 -0
  1062. package/dist/plugin-sdk/logging/redact-identifier.d.ts +4 -0
  1063. package/dist/plugin-sdk/logging/redact.d.ts +9 -0
  1064. package/dist/plugin-sdk/logging/state.d.ts +18 -0
  1065. package/dist/plugin-sdk/logging/subsystem.d.ts +18 -0
  1066. package/dist/plugin-sdk/logging.d.ts +10 -0
  1067. package/dist/plugin-sdk/markdown/fences.d.ts +10 -0
  1068. package/dist/plugin-sdk/markdown/frontmatter.d.ts +2 -0
  1069. package/dist/plugin-sdk/markdown/ir.d.ts +32 -0
  1070. package/dist/plugin-sdk/markdown/render.d.ts +18 -0
  1071. package/dist/plugin-sdk/markdown/tables.d.ts +2 -0
  1072. package/dist/plugin-sdk/markdown/whatsapp.d.ts +14 -0
  1073. package/dist/plugin-sdk/media/audio-tags.d.ts +10 -0
  1074. package/dist/plugin-sdk/media/audio.d.ts +19 -0
  1075. package/dist/plugin-sdk/media/base64.d.ts +1 -0
  1076. package/dist/plugin-sdk/media/constants.d.ts +7 -0
  1077. package/dist/plugin-sdk/media/fetch.d.ts +23 -0
  1078. package/dist/plugin-sdk/media/image-ops.d.ts +39 -0
  1079. package/dist/plugin-sdk/media/input-files.d.ts +81 -0
  1080. package/dist/plugin-sdk/media/mime.d.ts +16 -0
  1081. package/dist/plugin-sdk/media/parse.d.ts +8 -0
  1082. package/dist/plugin-sdk/media/png-encode.d.ts +8 -0
  1083. package/dist/plugin-sdk/media/read-response-with-limit.d.ts +7 -0
  1084. package/dist/plugin-sdk/media/sniff-mime-from-base64.d.ts +1 -0
  1085. package/dist/plugin-sdk/media/store.d.ts +28 -0
  1086. package/dist/plugin-sdk/media-understanding/apply.d.ts +19 -0
  1087. package/dist/plugin-sdk/media-understanding/attachments.d.ts +43 -0
  1088. package/dist/plugin-sdk/media-understanding/concurrency.d.ts +1 -0
  1089. package/dist/plugin-sdk/media-understanding/defaults.d.ts +14 -0
  1090. package/dist/plugin-sdk/media-understanding/errors.d.ts +6 -0
  1091. package/dist/plugin-sdk/media-understanding/format.d.ts +7 -0
  1092. package/dist/plugin-sdk/media-understanding/output-extract.d.ts +2 -0
  1093. package/dist/plugin-sdk/media-understanding/providers/image.d.ts +1 -0
  1094. package/dist/plugin-sdk/media-understanding/providers/index.d.ts +8 -0
  1095. package/dist/plugin-sdk/media-understanding/providers/shared.d.ts +4 -0
  1096. package/dist/plugin-sdk/media-understanding/resolve.d.ts +44 -0
  1097. package/dist/plugin-sdk/media-understanding/runner.d.ts +35 -0
  1098. package/dist/plugin-sdk/media-understanding/runner.entries.d.ts +33 -0
  1099. package/dist/plugin-sdk/media-understanding/scope.d.ts +9 -0
  1100. package/dist/plugin-sdk/media-understanding/types.d.ts +93 -0
  1101. package/dist/plugin-sdk/media-understanding/video.d.ts +2 -0
  1102. package/dist/plugin-sdk/memory/backend-config.d.ts +49 -0
  1103. package/dist/plugin-sdk/memory/batch-gemini.d.ts +55 -0
  1104. package/dist/plugin-sdk/memory/batch-http.d.ts +6 -0
  1105. package/dist/plugin-sdk/memory/batch-openai.d.ts +45 -0
  1106. package/dist/plugin-sdk/memory/batch-output.d.ts +23 -0
  1107. package/dist/plugin-sdk/memory/batch-voyage.d.ts +46 -0
  1108. package/dist/plugin-sdk/memory/embedding-chunk-limits.d.ts +3 -0
  1109. package/dist/plugin-sdk/memory/embedding-input-limits.d.ts +2 -0
  1110. package/dist/plugin-sdk/memory/embedding-model-limits.d.ts +2 -0
  1111. package/dist/plugin-sdk/memory/embeddings-gemini.d.ts +13 -0
  1112. package/dist/plugin-sdk/memory/embeddings-openai.d.ts +13 -0
  1113. package/dist/plugin-sdk/memory/embeddings-voyage.d.ts +13 -0
  1114. package/dist/plugin-sdk/memory/embeddings.d.ts +44 -0
  1115. package/dist/plugin-sdk/memory/hybrid.d.ts +34 -0
  1116. package/dist/plugin-sdk/memory/index.d.ts +3 -0
  1117. package/dist/plugin-sdk/memory/internal.d.ts +38 -0
  1118. package/dist/plugin-sdk/memory/manager-embedding-ops.d.ts +32 -0
  1119. package/dist/plugin-sdk/memory/manager-search.d.ts +60 -0
  1120. package/dist/plugin-sdk/memory/manager-sync-ops.d.ts +40 -0
  1121. package/dist/plugin-sdk/memory/manager.d.ts +75 -0
  1122. package/dist/plugin-sdk/memory/memory-schema.d.ts +10 -0
  1123. package/dist/plugin-sdk/memory/node-llama.d.ts +8 -0
  1124. package/dist/plugin-sdk/memory/qmd-manager.d.ts +109 -0
  1125. package/dist/plugin-sdk/memory/qmd-query-parser.d.ts +8 -0
  1126. package/dist/plugin-sdk/memory/qmd-scope.d.ts +4 -0
  1127. package/dist/plugin-sdk/memory/search-manager.d.ts +11 -0
  1128. package/dist/plugin-sdk/memory/session-files.d.ts +14 -0
  1129. package/dist/plugin-sdk/memory/sqlite-vec.d.ts +9 -0
  1130. package/dist/plugin-sdk/memory/sqlite.d.ts +1 -0
  1131. package/dist/plugin-sdk/memory/types.d.ts +94 -0
  1132. package/dist/plugin-sdk/pairing/pairing-messages.d.ts +6 -0
  1133. package/dist/plugin-sdk/pairing/pairing-store.d.ts +46 -0
  1134. package/dist/plugin-sdk/pi-model-discovery-Dw3A6oXH.js +37 -0
  1135. package/dist/plugin-sdk/plugin-sdk/account-id.d.ts +1 -0
  1136. package/dist/plugin-sdk/plugin-sdk/allow-from.d.ts +4 -0
  1137. package/dist/plugin-sdk/plugin-sdk/config-paths.d.ts +6 -0
  1138. package/dist/plugin-sdk/plugin-sdk/file-lock.d.ts +16 -0
  1139. package/dist/plugin-sdk/plugin-sdk/index.d.ts +123 -0
  1140. package/dist/plugin-sdk/plugin-sdk/onboarding.d.ts +11 -0
  1141. package/dist/plugin-sdk/plugin-sdk/text-chunking.d.ts +1 -0
  1142. package/dist/plugin-sdk/plugins/bundled-dir.d.ts +1 -0
  1143. package/dist/plugin-sdk/plugins/commands.d.ts +83 -0
  1144. package/dist/plugin-sdk/plugins/config-schema.d.ts +2 -0
  1145. package/dist/plugin-sdk/plugins/config-state.d.ts +33 -0
  1146. package/dist/plugin-sdk/plugins/discovery.d.ts +22 -0
  1147. package/dist/plugin-sdk/plugins/hook-runner-global.d.ts +37 -0
  1148. package/dist/plugin-sdk/plugins/hooks.d.ts +42 -0
  1149. package/dist/plugin-sdk/plugins/http-path.d.ts +1 -0
  1150. package/dist/plugin-sdk/plugins/http-registry.d.ts +13 -0
  1151. package/dist/plugin-sdk/plugins/loader.d.ts +14 -0
  1152. package/dist/plugin-sdk/plugins/manifest-registry.d.ts +33 -0
  1153. package/dist/plugin-sdk/plugins/manifest.d.ts +64 -0
  1154. package/dist/plugin-sdk/plugins/registry.d.ts +130 -0
  1155. package/dist/plugin-sdk/plugins/runtime/index.d.ts +3 -0
  1156. package/dist/plugin-sdk/plugins/runtime/native-deps.d.ts +8 -0
  1157. package/dist/plugin-sdk/plugins/runtime/types.d.ts +317 -0
  1158. package/dist/plugin-sdk/plugins/runtime.d.ts +5 -0
  1159. package/dist/plugin-sdk/plugins/schema-validator.d.ts +10 -0
  1160. package/dist/plugin-sdk/plugins/slots.d.ts +24 -0
  1161. package/dist/plugin-sdk/plugins/tools.d.ts +13 -0
  1162. package/dist/plugin-sdk/plugins/types.d.ts +411 -0
  1163. package/dist/plugin-sdk/polls.d.ts +31 -0
  1164. package/dist/plugin-sdk/process/command-queue.d.ts +51 -0
  1165. package/dist/plugin-sdk/process/exec.d.ts +26 -0
  1166. package/dist/plugin-sdk/process/lanes.d.ts +6 -0
  1167. package/dist/plugin-sdk/process/spawn-utils.d.ts +26 -0
  1168. package/dist/plugin-sdk/providers/github-copilot-token.d.ts +8 -0
  1169. package/dist/plugin-sdk/providers/qwen-portal-oauth.d.ts +8 -0
  1170. package/dist/plugin-sdk/routing/bindings.d.ts +11 -0
  1171. package/dist/plugin-sdk/routing/resolve-route.d.ts +42 -0
  1172. package/dist/plugin-sdk/routing/session-key.d.ts +48 -0
  1173. package/dist/plugin-sdk/runtime.d.ts +7 -0
  1174. package/dist/plugin-sdk/security/external-content.d.ts +67 -0
  1175. package/dist/plugin-sdk/security/secret-equal.d.ts +1 -0
  1176. package/dist/plugin-sdk/sessions/input-provenance.d.ts +16 -0
  1177. package/dist/plugin-sdk/sessions/level-overrides.d.ts +10 -0
  1178. package/dist/plugin-sdk/sessions/model-overrides.d.ts +14 -0
  1179. package/dist/plugin-sdk/sessions/send-policy.d.ts +11 -0
  1180. package/dist/plugin-sdk/sessions/session-key-utils.d.ts +11 -0
  1181. package/dist/plugin-sdk/sessions/session-label.d.ts +9 -0
  1182. package/dist/plugin-sdk/sessions/transcript-events.d.ts +7 -0
  1183. package/dist/plugin-sdk/shared/chat-envelope.d.ts +2 -0
  1184. package/dist/plugin-sdk/shared/config-eval.d.ts +5 -0
  1185. package/dist/plugin-sdk/shared/device-auth.d.ts +13 -0
  1186. package/dist/plugin-sdk/shared/frontmatter.d.ts +7 -0
  1187. package/dist/plugin-sdk/shared/node-match.d.ts +8 -0
  1188. package/dist/plugin-sdk/shared/subagents-format.d.ts +15 -0
  1189. package/dist/plugin-sdk/shared/text/reasoning-tags.d.ts +6 -0
  1190. package/dist/plugin-sdk/signal/accounts.d.ts +9 -0
  1191. package/dist/plugin-sdk/signal/format.d.ts +9 -0
  1192. package/dist/plugin-sdk/signal/identity.d.ts +3 -0
  1193. package/dist/plugin-sdk/signal/index.d.ts +3 -0
  1194. package/dist/plugin-sdk/signal/probe.d.ts +3 -0
  1195. package/dist/plugin-sdk/signal/reaction-level.d.ts +1 -0
  1196. package/dist/plugin-sdk/signal/send-reactions.d.ts +2 -0
  1197. package/dist/plugin-sdk/signal/send.d.ts +1 -0
  1198. package/dist/plugin-sdk/slack/accounts.d.ts +11 -0
  1199. package/dist/plugin-sdk/slack/actions.d.ts +17 -0
  1200. package/dist/plugin-sdk/slack/client.d.ts +1 -0
  1201. package/dist/plugin-sdk/slack/directory-live.d.ts +4 -0
  1202. package/dist/plugin-sdk/slack/index.d.ts +3 -0
  1203. package/dist/plugin-sdk/slack/message-actions.d.ts +2 -0
  1204. package/dist/plugin-sdk/slack/monitor/allow-list.d.ts +1 -0
  1205. package/dist/plugin-sdk/slack/probe.d.ts +3 -0
  1206. package/dist/plugin-sdk/slack/resolve-channels.d.ts +1 -0
  1207. package/dist/plugin-sdk/slack/resolve-users.d.ts +1 -0
  1208. package/dist/plugin-sdk/slack/send.d.ts +5 -0
  1209. package/dist/plugin-sdk/slack/targets.d.ts +2 -0
  1210. package/dist/plugin-sdk/slack/threading-tool-context.d.ts +1 -0
  1211. package/dist/plugin-sdk/telegram/accounts.d.ts +9 -0
  1212. package/dist/plugin-sdk/telegram/audit.d.ts +4 -0
  1213. package/dist/plugin-sdk/telegram/bot/helpers.d.ts +1 -0
  1214. package/dist/plugin-sdk/telegram/bot/types.d.ts +5 -0
  1215. package/dist/plugin-sdk/telegram/inline-buttons.d.ts +2 -0
  1216. package/dist/plugin-sdk/telegram/model-buttons.d.ts +5 -0
  1217. package/dist/plugin-sdk/telegram/monitor.d.ts +3 -0
  1218. package/dist/plugin-sdk/telegram/outbound-params.d.ts +2 -0
  1219. package/dist/plugin-sdk/telegram/probe.d.ts +6 -0
  1220. package/dist/plugin-sdk/telegram/reaction-level.d.ts +1 -0
  1221. package/dist/plugin-sdk/telegram/send.d.ts +10 -0
  1222. package/dist/plugin-sdk/telegram/sticker-cache.d.ts +2 -0
  1223. package/dist/plugin-sdk/telegram/targets.d.ts +1 -0
  1224. package/dist/plugin-sdk/telegram/token.d.ts +1 -0
  1225. package/dist/plugin-sdk/terminal/ansi.d.ts +2 -0
  1226. package/dist/plugin-sdk/terminal/health-style.d.ts +1 -0
  1227. package/dist/plugin-sdk/terminal/links.d.ts +6 -0
  1228. package/dist/plugin-sdk/terminal/palette.d.ts +10 -0
  1229. package/dist/plugin-sdk/terminal/progress-line.d.ts +3 -0
  1230. package/dist/plugin-sdk/terminal/prompt-style.d.ts +3 -0
  1231. package/dist/plugin-sdk/terminal/restore.d.ts +17 -0
  1232. package/dist/plugin-sdk/terminal/theme.d.ts +15 -0
  1233. package/dist/plugin-sdk/tts/tts-core.d.ts +52 -0
  1234. package/dist/plugin-sdk/tts/tts.d.ts +179 -0
  1235. package/dist/plugin-sdk/utils/account-id.d.ts +1 -0
  1236. package/dist/plugin-sdk/utils/boolean.d.ts +5 -0
  1237. package/dist/plugin-sdk/utils/delivery-context.d.ts +29 -0
  1238. package/dist/plugin-sdk/utils/directive-tags.d.ts +16 -0
  1239. package/dist/plugin-sdk/utils/fetch-timeout.d.ts +13 -0
  1240. package/dist/plugin-sdk/utils/message-channel.d.ts +27 -0
  1241. package/dist/plugin-sdk/utils/normalize-secret-input.d.ts +11 -0
  1242. package/dist/plugin-sdk/utils/provider-utils.d.ts +9 -0
  1243. package/dist/plugin-sdk/utils/queue-helpers.d.ts +41 -0
  1244. package/dist/plugin-sdk/utils/shell-argv.d.ts +1 -0
  1245. package/dist/plugin-sdk/utils/transcript-tools.d.ts +8 -0
  1246. package/dist/plugin-sdk/utils/usage-format.d.ts +26 -0
  1247. package/dist/plugin-sdk/utils.d.ts +67 -0
  1248. package/dist/plugin-sdk/version.d.ts +4 -0
  1249. package/dist/plugin-sdk/web/accounts.d.ts +39 -0
  1250. package/dist/plugin-sdk/web/active-listener.d.ts +25 -0
  1251. package/dist/plugin-sdk/web/auth-store.d.ts +25 -0
  1252. package/dist/plugin-sdk/web/auto-reply/constants.d.ts +1 -0
  1253. package/dist/plugin-sdk/web/auto-reply/deliver-reply.d.ts +18 -0
  1254. package/dist/plugin-sdk/web/auto-reply/heartbeat-runner.d.ts +20 -0
  1255. package/dist/plugin-sdk/web/auto-reply/loggers.d.ts +4 -0
  1256. package/dist/plugin-sdk/web/auto-reply/mentions.d.ts +19 -0
  1257. package/dist/plugin-sdk/web/auto-reply/monitor/ack-reaction.d.ts +13 -0
  1258. package/dist/plugin-sdk/web/auto-reply/monitor/broadcast.d.ts +16 -0
  1259. package/dist/plugin-sdk/web/auto-reply/monitor/commands.d.ts +2 -0
  1260. package/dist/plugin-sdk/web/auto-reply/monitor/echo.d.ts +17 -0
  1261. package/dist/plugin-sdk/web/auto-reply/monitor/group-activation.d.ts +9 -0
  1262. package/dist/plugin-sdk/web/auto-reply/monitor/group-gating.d.ts +29 -0
  1263. package/dist/plugin-sdk/web/auto-reply/monitor/group-members.d.ts +6 -0
  1264. package/dist/plugin-sdk/web/auto-reply/monitor/last-route.d.ts +15 -0
  1265. package/dist/plugin-sdk/web/auto-reply/monitor/message-line.d.ts +11 -0
  1266. package/dist/plugin-sdk/web/auto-reply/monitor/on-message.d.ts +24 -0
  1267. package/dist/plugin-sdk/web/auto-reply/monitor/peer.d.ts +2 -0
  1268. package/dist/plugin-sdk/web/auto-reply/monitor/process-message.d.ts +40 -0
  1269. package/dist/plugin-sdk/web/auto-reply/monitor.d.ts +5 -0
  1270. package/dist/plugin-sdk/web/auto-reply/session-snapshot.d.ts +17 -0
  1271. package/dist/plugin-sdk/web/auto-reply/types.d.ts +28 -0
  1272. package/dist/plugin-sdk/web/auto-reply/util.d.ts +2 -0
  1273. package/dist/plugin-sdk/web/auto-reply.d.ts +1 -0
  1274. package/dist/plugin-sdk/web/auto-reply.impl.d.ts +6 -0
  1275. package/dist/plugin-sdk/web/inbound/access-control.d.ts +24 -0
  1276. package/dist/plugin-sdk/web/inbound/dedupe.d.ts +2 -0
  1277. package/dist/plugin-sdk/web/inbound/extract.d.ts +13 -0
  1278. package/dist/plugin-sdk/web/inbound/media.d.ts +7 -0
  1279. package/dist/plugin-sdk/web/inbound/monitor.d.ts +30 -0
  1280. package/dist/plugin-sdk/web/inbound/send-api.d.ts +22 -0
  1281. package/dist/plugin-sdk/web/inbound/types.d.ts +41 -0
  1282. package/dist/plugin-sdk/web/inbound.d.ts +4 -0
  1283. package/dist/plugin-sdk/web/login-qr.d.ts +19 -0
  1284. package/dist/plugin-sdk/web/login.d.ts +3 -0
  1285. package/dist/plugin-sdk/web/media.d.ts +38 -0
  1286. package/dist/plugin-sdk/web/outbound.d.ts +23 -0
  1287. package/dist/plugin-sdk/web/qr-image.d.ts +4 -0
  1288. package/dist/plugin-sdk/web/reconnect.d.ts +12 -0
  1289. package/dist/plugin-sdk/web/session.d.ts +14 -0
  1290. package/dist/plugin-sdk/web/vcard.d.ts +6 -0
  1291. package/dist/plugin-sdk/whatsapp/normalize.d.ts +2 -0
  1292. package/dist/plugin-sdk/whatsapp/resolve-outbound-target.d.ts +1 -0
  1293. package/dist/plugin-sdk/wizard/prompts.d.ts +42 -0
  1294. package/dist/plugin-sdk/wizard/session.d.ts +42 -0
  1295. package/dist/plugins-B362e77G.js +168 -0
  1296. package/dist/plugins-CDJw924T.js +38 -0
  1297. package/dist/plugins-CmSUIUNi.js +38 -0
  1298. package/dist/plugins-cli-CtFRTC2I.js +734 -0
  1299. package/dist/plugins-cli-D1lvqLG9.js +736 -0
  1300. package/dist/polls-CItfB1H8.js +1343 -0
  1301. package/dist/ports-BVLMN1Sr.js +96 -0
  1302. package/dist/ports-CqLSlU6Z.js +317 -0
  1303. package/dist/ports-D94CwCrv.js +344 -0
  1304. package/dist/ports-D_NHthOz.js +96 -0
  1305. package/dist/program-Bve7k4jO.js +176 -0
  1306. package/dist/program-context-8lqacY-M.js +496 -0
  1307. package/dist/program-context-Bvn8046-.js +17 -0
  1308. package/dist/progress-Bek_GyWS.js +133 -0
  1309. package/dist/progress-CbZ2D53A.js +133 -0
  1310. package/dist/prompt-style-DKy6qQxR.js +9 -0
  1311. package/dist/prompt-style-lu0clOOE.js +9 -0
  1312. package/dist/prompts-BI__va99.js +10 -0
  1313. package/dist/prompts-_dDWkCAz.js +10 -0
  1314. package/dist/pw-ai-BLVMuSLv.js +1867 -0
  1315. package/dist/pw-ai-DZJWEF_f.js +1865 -0
  1316. package/dist/pw-ai-dzf-ptcn.js +1868 -0
  1317. package/dist/qmd-manager-B0FWDi1x.js +938 -0
  1318. package/dist/qmd-manager-CrDrpgh3.js +937 -0
  1319. package/dist/qmd-manager-DepEoASu.js +935 -0
  1320. package/dist/queue-2CW7pnm1.js +209 -0
  1321. package/dist/queue-DhjMEG_Q.js +209 -0
  1322. package/dist/redact-BHmk44DI.js +97 -0
  1323. package/dist/redact-ClVwO7Nn.js +97 -0
  1324. package/dist/register.agent-CE_8JbTE.js +265 -0
  1325. package/dist/register.agent-CGRdcftb.js +1003 -0
  1326. package/dist/register.anima-B4NPeesF.js +167 -0
  1327. package/dist/register.anima-hNCtQ_jl.js +167 -0
  1328. package/dist/register.configure-3prVPXwx.js +101 -0
  1329. package/dist/register.configure-Dqm2IveL.js +103 -0
  1330. package/dist/register.maintenance-BSIx4eNS.js +543 -0
  1331. package/dist/register.maintenance-DDeG6CHa.js +543 -0
  1332. package/dist/register.message-DcYPDzYr.js +657 -0
  1333. package/dist/register.message-RbFrjbch.js +660 -0
  1334. package/dist/register.onboard-BBJK_0_C.js +170 -0
  1335. package/dist/register.onboard-BrcWHC9j.js +170 -0
  1336. package/dist/register.setup-ByvEHxYQ.js +175 -0
  1337. package/dist/register.setup-CNwO5Yq3.js +175 -0
  1338. package/dist/register.status-health-sessions-CGT7bn4C.js +142 -0
  1339. package/dist/register.status-health-sessions-QK6iQSJc.js +313 -0
  1340. package/dist/register.subclis-Bd8eE94r.js +255 -0
  1341. package/dist/registry-BiekeB9q.js +116 -0
  1342. package/dist/registry-qI6V4gqU.js +116 -0
  1343. package/dist/reply-Clj5jcM5.js +32212 -0
  1344. package/dist/reply-DnH1Ueoz.js +32212 -0
  1345. package/dist/reply-prefix-D2NxVzGZ.js +100 -0
  1346. package/dist/reply-prefix-DPpz_mEi.js +100 -0
  1347. package/dist/requirements-BzZxj2Wu.js +107 -0
  1348. package/dist/requirements-DIW1svgA.js +107 -0
  1349. package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
  1350. package/dist/routes-CXpne1-p.js +1820 -0
  1351. package/dist/routes-DtRwwTy6.js +1820 -0
  1352. package/dist/rpc-BBB_Fbes.js +70 -0
  1353. package/dist/rpc-CMEWfcci.js +70 -0
  1354. package/dist/run-main-DOXNrnL2.js +371 -0
  1355. package/dist/runtime-guard-BSUFiAQV.js +60 -0
  1356. package/dist/runtime-guard-DeOXA_86.js +60 -0
  1357. package/dist/sandbox-Bk0ZXcag.js +859 -0
  1358. package/dist/sandbox-D3CFkNeF.js +858 -0
  1359. package/dist/sandbox-cli-BCnnmQ03.js +458 -0
  1360. package/dist/sandbox-cli-Ctpa2Isy.js +461 -0
  1361. package/dist/secret-equal-B268kALC.js +13 -0
  1362. package/dist/secret-equal-Dghy3xsA.js +13 -0
  1363. package/dist/security-cli-BiiLLcQV.js +462 -0
  1364. package/dist/security-cli-DOZmLENS.js +465 -0
  1365. package/dist/send-BTA6qupx.js +10 -0
  1366. package/dist/send-BhAfdGII.js +10 -0
  1367. package/dist/send-C2t9xpXI.js +10 -0
  1368. package/dist/send-C6ccOW_U.js +10 -0
  1369. package/dist/send-CP74DxzJ.js +28 -0
  1370. package/dist/send-CS3G_YWr.js +10 -0
  1371. package/dist/send-D5JnqErc.js +10 -0
  1372. package/dist/send-DEMhcauI.js +32 -0
  1373. package/dist/send-DF8KJImx.js +28 -0
  1374. package/dist/send-DVW0CcHX.js +32 -0
  1375. package/dist/send-DigO-i9j.js +28 -0
  1376. package/dist/send-DqMLjD9Z.js +10 -0
  1377. package/dist/send-Dz2BDHll.js +32 -0
  1378. package/dist/send-ga9udK1_.js +10 -0
  1379. package/dist/send-oDz9NATu.js +10 -0
  1380. package/dist/server-context-BznDS2td.js +824 -0
  1381. package/dist/server-context-CXnE2F7d.js +824 -0
  1382. package/dist/server-node-events-Cu6Qkjor.js +231 -0
  1383. package/dist/server-node-events-Cv8MuF1g.js +233 -0
  1384. package/dist/service-BNVpYcQe.js +642 -0
  1385. package/dist/service-D56aMXUB.js +642 -0
  1386. package/dist/service-audit-DBsygs7y.js +488 -0
  1387. package/dist/service-audit-DKWJcTu4.js +488 -0
  1388. package/dist/session-CXcl3Xrp.js +181 -0
  1389. package/dist/session-DUFuU29j.js +179 -0
  1390. package/dist/session-M_uCxF0U.js +181 -0
  1391. package/dist/session-cost-usage-BwiTZuKl.js +600 -0
  1392. package/dist/session-cost-usage-DT9YNXTJ.js +600 -0
  1393. package/dist/session-key-BGiG_JcT.js +198 -0
  1394. package/dist/session-key-DxcgHezu.js +198 -0
  1395. package/dist/sessions-B8GUAiF6.js +1296 -0
  1396. package/dist/sessions-D0Zd1CND.js +1296 -0
  1397. package/dist/sessions-D0spLCm7.js +187 -0
  1398. package/dist/sessions-XvkHLXt4.js +2038 -0
  1399. package/dist/shared-CEHU0exQ.js +77 -0
  1400. package/dist/shared-Cgly1vPb.js +66 -0
  1401. package/dist/shared-DAHxpviD.js +77 -0
  1402. package/dist/shared-JOo05hST.js +66 -0
  1403. package/dist/shell-argv-CAq1mLa2.js +72 -0
  1404. package/dist/shell-argv-Ce41guJv.js +72 -0
  1405. package/dist/skill-scanner-CkaVLABv.js +263 -0
  1406. package/dist/skill-scanner-Coo4QoCd.js +263 -0
  1407. package/dist/skills-B-G7UHOa.js +808 -0
  1408. package/dist/skills-B5LQx4lT.js +807 -0
  1409. package/dist/skills-cli-DF9XJ2_0.js +286 -0
  1410. package/dist/skills-cli-eLBluVoD.js +289 -0
  1411. package/dist/skills-status-Clq9ZnYu.js +166 -0
  1412. package/dist/skills-status-JQluhU-P.js +166 -0
  1413. package/dist/sqlite-BukcjdJa.js +321 -0
  1414. package/dist/sqlite-CGcOZZ0C.js +368 -0
  1415. package/dist/sqlite-Ck6f9KWc.js +453 -0
  1416. package/dist/start-BvsoGNHJ.js +354 -0
  1417. package/dist/start-CF_Cp6YC.js +353 -0
  1418. package/dist/status-BKGJ7VPQ.js +27 -0
  1419. package/dist/status-BZip7mx9.js +27 -0
  1420. package/dist/status-BqYq_J5J.js +2132 -0
  1421. package/dist/status-CMnlcBVc.js +21 -0
  1422. package/dist/status-CXQrTLri.js +2137 -0
  1423. package/dist/status-tDZPwewW.js +21 -0
  1424. package/dist/status.update-CWiod7o_.js +79 -0
  1425. package/dist/status.update-D1PyrhoB.js +79 -0
  1426. package/dist/subagent-registry-CpSZ2RSO.js +2760 -0
  1427. package/dist/subagent-registry-DkCXRdwf.js +2759 -0
  1428. package/dist/subagent-registry-MPrTYaEB.js +14 -0
  1429. package/dist/subsystem-Dowf8fSU.js +860 -0
  1430. package/dist/system-cli-4Urk9KV1.js +79 -0
  1431. package/dist/system-cli-CgMzkg8R.js +82 -0
  1432. package/dist/system-run-command-DGk7dwQP.js +93 -0
  1433. package/dist/system-run-command-X9lDJIy0.js +93 -0
  1434. package/dist/systemd-BSrHDyeU.js +452 -0
  1435. package/dist/systemd-By5xdSB4.js +452 -0
  1436. package/dist/systemd-hints-BtjL_5Rh.js +36 -0
  1437. package/dist/systemd-hints-sJmr6cjb.js +36 -0
  1438. package/dist/systemd-linger-BNz8PXPF.js +75 -0
  1439. package/dist/systemd-linger-D5vLilKH.js +75 -0
  1440. package/dist/table-BL0lJzsm.js +279 -0
  1441. package/dist/table-DoiRPsn0.js +279 -0
  1442. package/dist/tailnet-CuiNECdL.js +42 -0
  1443. package/dist/tailnet-__ODlBOT.js +42 -0
  1444. package/dist/templates-DJ0ii6X2.js +47 -0
  1445. package/dist/templates-DPTs18po.js +47 -0
  1446. package/dist/thinking-BLU0jXR8.js +204 -0
  1447. package/dist/thinking-BXEswx1X.js +204 -0
  1448. package/dist/timeout-CswI_K-U.js +232 -0
  1449. package/dist/tokens-C-X7wDKj.js +14 -0
  1450. package/dist/tokens-DkvqA72p.js +14 -0
  1451. package/dist/transcript-events-C1hdue6u.js +17 -0
  1452. package/dist/transcript-events-C8Tqw4td.js +17 -0
  1453. package/dist/transcript-events-DW_H__a1.js +17 -0
  1454. package/dist/transcript-tools-DtE5di1q.js +108 -0
  1455. package/dist/transcript-tools-DuyYOkUq.js +108 -0
  1456. package/dist/trash-BJLK1vMn.js +23 -0
  1457. package/dist/trash-_x5UZ94k.js +23 -0
  1458. package/dist/tui-Cj25a9wc.js +3894 -0
  1459. package/dist/tui-Iv4T-9gg.js +3894 -0
  1460. package/dist/tui-cli-BkJxFa_n.js +50 -0
  1461. package/dist/tui-cli-DeFmBtZ7.js +47 -0
  1462. package/dist/update-DZRKbMjq.js +317 -0
  1463. package/dist/update-LFgxHHPd.js +317 -0
  1464. package/dist/update-check-CWc7YXmc.js +400 -0
  1465. package/dist/update-check-IhlWaui6.js +400 -0
  1466. package/dist/update-cli-qGGlL5Lg.js +1105 -0
  1467. package/dist/update-cli-rMqhSUMc.js +1105 -0
  1468. package/dist/update-runner-BT77y3bz.js +894 -0
  1469. package/dist/update-runner-DvzFqFJf.js +894 -0
  1470. package/dist/usage-BeZuVAY4.js +4516 -0
  1471. package/dist/usage-format-BAirWUSO.js +36 -0
  1472. package/dist/usage-format-CpORtVCG.js +36 -0
  1473. package/dist/utils-Bsw__U-F.js +243 -0
  1474. package/dist/utils-C9sj30YY.js +239 -0
  1475. package/dist/warning-filter.js +48 -0
  1476. package/dist/web-DEx7MMYq.js +2203 -0
  1477. package/dist/web-DHSoj6bL.js +46842 -0
  1478. package/dist/web-DI0g5K4c.js +63 -0
  1479. package/dist/webhooks-cli-sfLRE89X.js +319 -0
  1480. package/dist/webhooks-cli-xtZBlaD1.js +316 -0
  1481. package/dist/whatsapp-actions-DIREhxrq.js +49 -0
  1482. package/dist/whatsapp-actions-TGHl9p4i.js +45 -0
  1483. package/dist/whatsapp-actions-dBHozeuk.js +53 -0
  1484. package/dist/widearea-dns-B6ocX23x.js +127 -0
  1485. package/dist/widearea-dns-NsEUNYwz.js +127 -0
  1486. package/dist/workspace-Dcfoy5JJ.js +649 -0
  1487. package/dist/ws-COSqlEPx.js +218 -0
  1488. package/dist/ws-log-N8R5MvGE.js +267 -0
  1489. package/dist/ws-log-gwFxPxj5.js +267 -0
  1490. package/dist/wsl-CqyuRvtM.js +26 -0
  1491. package/dist/wsl-ymJYvc9Q.js +26 -0
  1492. package/package.json +209 -0
  1493. package/skills/1password/SKILL.md +70 -0
  1494. package/skills/1password/references/cli-examples.md +29 -0
  1495. package/skills/1password/references/get-started.md +17 -0
  1496. package/skills/animahub/SKILL.md +77 -0
  1497. package/skills/apple-notes/SKILL.md +77 -0
  1498. package/skills/apple-reminders/SKILL.md +96 -0
  1499. package/skills/audit/SKILL.md +68 -0
  1500. package/skills/bear-notes/SKILL.md +107 -0
  1501. package/skills/blogwatcher/SKILL.md +69 -0
  1502. package/skills/blucli/SKILL.md +47 -0
  1503. package/skills/bluebubbles/SKILL.md +131 -0
  1504. package/skills/camsnap/SKILL.md +45 -0
  1505. package/skills/canvas/SKILL.md +198 -0
  1506. package/skills/coding-agent/SKILL.md +284 -0
  1507. package/skills/deploy/SKILL.md +45 -0
  1508. package/skills/discord/SKILL.md +160 -0
  1509. package/skills/eightctl/SKILL.md +50 -0
  1510. package/skills/food-order/SKILL.md +48 -0
  1511. package/skills/gemini/SKILL.md +43 -0
  1512. package/skills/gifgrep/SKILL.md +79 -0
  1513. package/skills/github/SKILL.md +77 -0
  1514. package/skills/gog/SKILL.md +116 -0
  1515. package/skills/goplaces/SKILL.md +52 -0
  1516. package/skills/healthcheck/SKILL.md +245 -0
  1517. package/skills/himalaya/SKILL.md +257 -0
  1518. package/skills/himalaya/references/configuration.md +184 -0
  1519. package/skills/himalaya/references/message-composition.md +199 -0
  1520. package/skills/imsg/SKILL.md +74 -0
  1521. package/skills/mcporter/SKILL.md +61 -0
  1522. package/skills/model-usage/SKILL.md +69 -0
  1523. package/skills/model-usage/references/codexbar-cli.md +33 -0
  1524. package/skills/model-usage/scripts/model_usage.py +310 -0
  1525. package/skills/nano-banana-pro/SKILL.md +58 -0
  1526. package/skills/nano-banana-pro/scripts/generate_image.py +184 -0
  1527. package/skills/nano-pdf/SKILL.md +38 -0
  1528. package/skills/notion/SKILL.md +172 -0
  1529. package/skills/obsidian/SKILL.md +81 -0
  1530. package/skills/openai-image-gen/SKILL.md +89 -0
  1531. package/skills/openai-image-gen/scripts/gen.py +240 -0
  1532. package/skills/openai-whisper/SKILL.md +38 -0
  1533. package/skills/openai-whisper-api/SKILL.md +52 -0
  1534. package/skills/openai-whisper-api/scripts/transcribe.sh +85 -0
  1535. package/skills/openhue/SKILL.md +51 -0
  1536. package/skills/oracle/SKILL.md +125 -0
  1537. package/skills/ordercli/SKILL.md +78 -0
  1538. package/skills/peekaboo/SKILL.md +190 -0
  1539. package/skills/review/SKILL.md +58 -0
  1540. package/skills/sag/SKILL.md +87 -0
  1541. package/skills/session-logs/SKILL.md +115 -0
  1542. package/skills/sherpa-onnx-tts/SKILL.md +103 -0
  1543. package/skills/sherpa-onnx-tts/bin/sherpa-onnx-tts +178 -0
  1544. package/skills/skill-creator/SKILL.md +370 -0
  1545. package/skills/skill-creator/license.txt +202 -0
  1546. package/skills/skill-creator/scripts/init_skill.py +378 -0
  1547. package/skills/skill-creator/scripts/package_skill.py +111 -0
  1548. package/skills/skill-creator/scripts/quick_validate.py +101 -0
  1549. package/skills/slack/SKILL.md +144 -0
  1550. package/skills/songsee/SKILL.md +49 -0
  1551. package/skills/sonoscli/SKILL.md +46 -0
  1552. package/skills/spotify-player/SKILL.md +64 -0
  1553. package/skills/summarize/SKILL.md +87 -0
  1554. package/skills/things-mac/SKILL.md +86 -0
  1555. package/skills/tmux/SKILL.md +135 -0
  1556. package/skills/tmux/scripts/find-sessions.sh +112 -0
  1557. package/skills/tmux/scripts/wait-for-text.sh +83 -0
  1558. package/skills/trello/SKILL.md +95 -0
  1559. package/skills/video-frames/SKILL.md +46 -0
  1560. package/skills/video-frames/scripts/frame.sh +81 -0
  1561. package/skills/voice-call/SKILL.md +45 -0
  1562. package/skills/wacli/SKILL.md +72 -0
  1563. package/skills/weather/SKILL.md +54 -0
  1564. package/templates/BRAIN.md +65 -0
  1565. package/templates/GUT.md +44 -0
  1566. package/templates/HEART.md +51 -0
  1567. package/templates/MEMORY.md +66 -0
  1568. package/templates/SHADOW.md +68 -0
  1569. package/templates/SOUL.md +38 -0
  1570. package/templates/SPIRIT.md +43 -0
@@ -0,0 +1,1820 @@
1
+ import { _ as resolveConfigDir } from "./utils-Bsw__U-F.js";
2
+ import { t as parseBooleanValue } from "./boolean-Wzu0-e0P.js";
3
+ import { i as loadConfig, l as writeConfigFile } from "./config-Xm0j9LUa.js";
4
+ import { a as resizeToJpeg, n as getImageMetadata } from "./image-ops-omlvdfah.js";
5
+ import { n as extensionForMime, t as detectMime } from "./mime-C1RlpUSs.js";
6
+ import { T as DEFAULT_BROWSER_DEFAULT_PROFILE_NAME, a as resolveAnimaUserDataDir, b as DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS, c as captureScreenshot, f as snapshotAria, s as resolveBrowserExecutableForPlatform, x as DEFAULT_AI_SNAPSHOT_MAX_CHARS, y as DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH } from "./chrome-DScZx4Lk.js";
7
+ import { a as resolveProfile, c as getUsedColors, d as deriveDefaultBrowserCdpPortRange, f as getPwAiModule$1, l as getUsedPorts, o as allocateCdpPort, r as parseHttpUrl, s as allocateColor, u as isValidProfileName } from "./server-context-CXnE2F7d.js";
8
+ import { a as resolvePathsWithinRoot, i as resolvePathWithinRoot, n as DEFAULT_TRACE_DIR, r as DEFAULT_UPLOAD_DIR, t as DEFAULT_DOWNLOAD_DIR } from "./paths-BgUi2Z2G.js";
9
+ import { t as movePathToTrash } from "./trash-_x5UZ94k.js";
10
+ import fs, { createWriteStream } from "node:fs";
11
+ import path from "node:path";
12
+ import fs$1 from "node:fs/promises";
13
+ import crypto from "node:crypto";
14
+ import { pipeline } from "node:stream/promises";
15
+
16
+ //#region src/browser/routes/agent.act.shared.ts
17
+ const ACT_KINDS = [
18
+ "click",
19
+ "close",
20
+ "drag",
21
+ "evaluate",
22
+ "fill",
23
+ "hover",
24
+ "scrollIntoView",
25
+ "press",
26
+ "resize",
27
+ "select",
28
+ "type",
29
+ "wait"
30
+ ];
31
+ function isActKind(value) {
32
+ if (typeof value !== "string") return false;
33
+ return ACT_KINDS.includes(value);
34
+ }
35
+ const ALLOWED_CLICK_MODIFIERS = new Set([
36
+ "Alt",
37
+ "Control",
38
+ "ControlOrMeta",
39
+ "Meta",
40
+ "Shift"
41
+ ]);
42
+ function parseClickButton(raw) {
43
+ if (raw === "left" || raw === "right" || raw === "middle") return raw;
44
+ }
45
+ function parseClickModifiers(raw) {
46
+ if (raw.filter((m) => !ALLOWED_CLICK_MODIFIERS.has(m)).length) return { error: "modifiers must be Alt|Control|ControlOrMeta|Meta|Shift" };
47
+ return { modifiers: raw.length ? raw : void 0 };
48
+ }
49
+
50
+ //#endregion
51
+ //#region src/browser/routes/utils.ts
52
+ /**
53
+ * Extract profile name from query string or body and get profile context.
54
+ * Query string takes precedence over body for consistency with GET routes.
55
+ */
56
+ function getProfileContext(req, ctx) {
57
+ let profileName;
58
+ if (typeof req.query.profile === "string") profileName = req.query.profile.trim() || void 0;
59
+ if (!profileName && req.body && typeof req.body === "object") {
60
+ const body = req.body;
61
+ if (typeof body.profile === "string") profileName = body.profile.trim() || void 0;
62
+ }
63
+ try {
64
+ return ctx.forProfile(profileName);
65
+ } catch (err) {
66
+ return {
67
+ error: String(err),
68
+ status: 404
69
+ };
70
+ }
71
+ }
72
+ function jsonError(res, status, message) {
73
+ res.status(status).json({ error: message });
74
+ }
75
+ function toStringOrEmpty(value) {
76
+ if (typeof value === "string") return value.trim();
77
+ if (typeof value === "number" || typeof value === "boolean") return String(value).trim();
78
+ return "";
79
+ }
80
+ function toNumber(value) {
81
+ if (typeof value === "number" && Number.isFinite(value)) return value;
82
+ if (typeof value === "string" && value.trim()) {
83
+ const parsed = Number(value);
84
+ return Number.isFinite(parsed) ? parsed : void 0;
85
+ }
86
+ }
87
+ function toBoolean(value) {
88
+ return parseBooleanValue(value, {
89
+ truthy: [
90
+ "true",
91
+ "1",
92
+ "yes"
93
+ ],
94
+ falsy: [
95
+ "false",
96
+ "0",
97
+ "no"
98
+ ]
99
+ });
100
+ }
101
+ function toStringArray(value) {
102
+ if (!Array.isArray(value)) return;
103
+ const strings = value.map((v) => toStringOrEmpty(v)).filter(Boolean);
104
+ return strings.length ? strings : void 0;
105
+ }
106
+
107
+ //#endregion
108
+ //#region src/browser/routes/agent.shared.ts
109
+ const SELECTOR_UNSUPPORTED_MESSAGE = [
110
+ "Error: 'selector' is not supported. Use 'ref' from snapshot instead.",
111
+ "",
112
+ "Example workflow:",
113
+ "1. snapshot action to get page state with refs",
114
+ "2. act with ref: \"e123\" to interact with element",
115
+ "",
116
+ "This is more reliable for modern SPAs."
117
+ ].join("\n");
118
+ function readBody(req) {
119
+ const body = req.body;
120
+ if (!body || typeof body !== "object" || Array.isArray(body)) return {};
121
+ return body;
122
+ }
123
+ function handleRouteError(ctx, res, err) {
124
+ const mapped = ctx.mapTabError(err);
125
+ if (mapped) return jsonError(res, mapped.status, mapped.message);
126
+ jsonError(res, 500, String(err));
127
+ }
128
+ function resolveProfileContext(req, res, ctx) {
129
+ const profileCtx = getProfileContext(req, ctx);
130
+ if ("error" in profileCtx) {
131
+ jsonError(res, profileCtx.status, profileCtx.error);
132
+ return null;
133
+ }
134
+ return profileCtx;
135
+ }
136
+ async function getPwAiModule() {
137
+ return await getPwAiModule$1({ mode: "soft" });
138
+ }
139
+ async function requirePwAi(res, feature) {
140
+ const mod = await getPwAiModule();
141
+ if (mod) return mod;
142
+ jsonError(res, 501, [
143
+ `Playwright is not available in this gateway build; '${feature}' is unsupported.`,
144
+ "Install the full Playwright package (not playwright-core) and restart the gateway, or reinstall with browser support.",
145
+ "Docs: /tools/browser#playwright-requirement"
146
+ ].join("\n"));
147
+ return null;
148
+ }
149
+
150
+ //#endregion
151
+ //#region src/browser/routes/agent.act.ts
152
+ function registerBrowserAgentActRoutes(app, ctx) {
153
+ app.post("/act", async (req, res) => {
154
+ const profileCtx = resolveProfileContext(req, res, ctx);
155
+ if (!profileCtx) return;
156
+ const body = readBody(req);
157
+ const kindRaw = toStringOrEmpty(body.kind);
158
+ if (!isActKind(kindRaw)) return jsonError(res, 400, "kind is required");
159
+ const kind = kindRaw;
160
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
161
+ if (Object.hasOwn(body, "selector") && kind !== "wait") return jsonError(res, 400, SELECTOR_UNSUPPORTED_MESSAGE);
162
+ try {
163
+ const tab = await profileCtx.ensureTabAvailable(targetId);
164
+ const cdpUrl = profileCtx.profile.cdpUrl;
165
+ const pw = await requirePwAi(res, `act:${kind}`);
166
+ if (!pw) return;
167
+ const evaluateEnabled = ctx.state().resolved.evaluateEnabled;
168
+ switch (kind) {
169
+ case "click": {
170
+ const ref = toStringOrEmpty(body.ref);
171
+ if (!ref) return jsonError(res, 400, "ref is required");
172
+ const doubleClick = toBoolean(body.doubleClick) ?? false;
173
+ const timeoutMs = toNumber(body.timeoutMs);
174
+ const buttonRaw = toStringOrEmpty(body.button) || "";
175
+ const button = buttonRaw ? parseClickButton(buttonRaw) : void 0;
176
+ if (buttonRaw && !button) return jsonError(res, 400, "button must be left|right|middle");
177
+ const parsedModifiers = parseClickModifiers(toStringArray(body.modifiers) ?? []);
178
+ if (parsedModifiers.error) return jsonError(res, 400, parsedModifiers.error);
179
+ const modifiers = parsedModifiers.modifiers;
180
+ const clickRequest = {
181
+ cdpUrl,
182
+ targetId: tab.targetId,
183
+ ref,
184
+ doubleClick
185
+ };
186
+ if (button) clickRequest.button = button;
187
+ if (modifiers) clickRequest.modifiers = modifiers;
188
+ if (timeoutMs) clickRequest.timeoutMs = timeoutMs;
189
+ await pw.clickViaPlaywright(clickRequest);
190
+ return res.json({
191
+ ok: true,
192
+ targetId: tab.targetId,
193
+ url: tab.url
194
+ });
195
+ }
196
+ case "type": {
197
+ const ref = toStringOrEmpty(body.ref);
198
+ if (!ref) return jsonError(res, 400, "ref is required");
199
+ if (typeof body.text !== "string") return jsonError(res, 400, "text is required");
200
+ const text = body.text;
201
+ const submit = toBoolean(body.submit) ?? false;
202
+ const slowly = toBoolean(body.slowly) ?? false;
203
+ const timeoutMs = toNumber(body.timeoutMs);
204
+ const typeRequest = {
205
+ cdpUrl,
206
+ targetId: tab.targetId,
207
+ ref,
208
+ text,
209
+ submit,
210
+ slowly
211
+ };
212
+ if (timeoutMs) typeRequest.timeoutMs = timeoutMs;
213
+ await pw.typeViaPlaywright(typeRequest);
214
+ return res.json({
215
+ ok: true,
216
+ targetId: tab.targetId
217
+ });
218
+ }
219
+ case "press": {
220
+ const key = toStringOrEmpty(body.key);
221
+ if (!key) return jsonError(res, 400, "key is required");
222
+ const delayMs = toNumber(body.delayMs);
223
+ await pw.pressKeyViaPlaywright({
224
+ cdpUrl,
225
+ targetId: tab.targetId,
226
+ key,
227
+ delayMs: delayMs ?? void 0
228
+ });
229
+ return res.json({
230
+ ok: true,
231
+ targetId: tab.targetId
232
+ });
233
+ }
234
+ case "hover": {
235
+ const ref = toStringOrEmpty(body.ref);
236
+ if (!ref) return jsonError(res, 400, "ref is required");
237
+ const timeoutMs = toNumber(body.timeoutMs);
238
+ await pw.hoverViaPlaywright({
239
+ cdpUrl,
240
+ targetId: tab.targetId,
241
+ ref,
242
+ timeoutMs: timeoutMs ?? void 0
243
+ });
244
+ return res.json({
245
+ ok: true,
246
+ targetId: tab.targetId
247
+ });
248
+ }
249
+ case "scrollIntoView": {
250
+ const ref = toStringOrEmpty(body.ref);
251
+ if (!ref) return jsonError(res, 400, "ref is required");
252
+ const timeoutMs = toNumber(body.timeoutMs);
253
+ const scrollRequest = {
254
+ cdpUrl,
255
+ targetId: tab.targetId,
256
+ ref
257
+ };
258
+ if (timeoutMs) scrollRequest.timeoutMs = timeoutMs;
259
+ await pw.scrollIntoViewViaPlaywright(scrollRequest);
260
+ return res.json({
261
+ ok: true,
262
+ targetId: tab.targetId
263
+ });
264
+ }
265
+ case "drag": {
266
+ const startRef = toStringOrEmpty(body.startRef);
267
+ const endRef = toStringOrEmpty(body.endRef);
268
+ if (!startRef || !endRef) return jsonError(res, 400, "startRef and endRef are required");
269
+ const timeoutMs = toNumber(body.timeoutMs);
270
+ await pw.dragViaPlaywright({
271
+ cdpUrl,
272
+ targetId: tab.targetId,
273
+ startRef,
274
+ endRef,
275
+ timeoutMs: timeoutMs ?? void 0
276
+ });
277
+ return res.json({
278
+ ok: true,
279
+ targetId: tab.targetId
280
+ });
281
+ }
282
+ case "select": {
283
+ const ref = toStringOrEmpty(body.ref);
284
+ const values = toStringArray(body.values);
285
+ if (!ref || !values?.length) return jsonError(res, 400, "ref and values are required");
286
+ const timeoutMs = toNumber(body.timeoutMs);
287
+ await pw.selectOptionViaPlaywright({
288
+ cdpUrl,
289
+ targetId: tab.targetId,
290
+ ref,
291
+ values,
292
+ timeoutMs: timeoutMs ?? void 0
293
+ });
294
+ return res.json({
295
+ ok: true,
296
+ targetId: tab.targetId
297
+ });
298
+ }
299
+ case "fill": {
300
+ const fields = (Array.isArray(body.fields) ? body.fields : []).map((field) => {
301
+ if (!field || typeof field !== "object") return null;
302
+ const rec = field;
303
+ const ref = toStringOrEmpty(rec.ref);
304
+ const type = toStringOrEmpty(rec.type);
305
+ if (!ref || !type) return null;
306
+ const value = typeof rec.value === "string" || typeof rec.value === "number" || typeof rec.value === "boolean" ? rec.value : void 0;
307
+ return value === void 0 ? {
308
+ ref,
309
+ type
310
+ } : {
311
+ ref,
312
+ type,
313
+ value
314
+ };
315
+ }).filter((field) => field !== null);
316
+ if (!fields.length) return jsonError(res, 400, "fields are required");
317
+ const timeoutMs = toNumber(body.timeoutMs);
318
+ await pw.fillFormViaPlaywright({
319
+ cdpUrl,
320
+ targetId: tab.targetId,
321
+ fields,
322
+ timeoutMs: timeoutMs ?? void 0
323
+ });
324
+ return res.json({
325
+ ok: true,
326
+ targetId: tab.targetId
327
+ });
328
+ }
329
+ case "resize": {
330
+ const width = toNumber(body.width);
331
+ const height = toNumber(body.height);
332
+ if (!width || !height) return jsonError(res, 400, "width and height are required");
333
+ await pw.resizeViewportViaPlaywright({
334
+ cdpUrl,
335
+ targetId: tab.targetId,
336
+ width,
337
+ height
338
+ });
339
+ return res.json({
340
+ ok: true,
341
+ targetId: tab.targetId,
342
+ url: tab.url
343
+ });
344
+ }
345
+ case "wait": {
346
+ const timeMs = toNumber(body.timeMs);
347
+ const text = toStringOrEmpty(body.text) || void 0;
348
+ const textGone = toStringOrEmpty(body.textGone) || void 0;
349
+ const selector = toStringOrEmpty(body.selector) || void 0;
350
+ const url = toStringOrEmpty(body.url) || void 0;
351
+ const loadStateRaw = toStringOrEmpty(body.loadState);
352
+ const loadState = loadStateRaw === "load" || loadStateRaw === "domcontentloaded" || loadStateRaw === "networkidle" ? loadStateRaw : void 0;
353
+ const fn = toStringOrEmpty(body.fn) || void 0;
354
+ const timeoutMs = toNumber(body.timeoutMs) ?? void 0;
355
+ if (fn && !evaluateEnabled) return jsonError(res, 403, ["wait --fn is disabled by config (browser.evaluateEnabled=false).", "Docs: /gateway/configuration#browser-anima-managed-browser"].join("\n"));
356
+ if (timeMs === void 0 && !text && !textGone && !selector && !url && !loadState && !fn) return jsonError(res, 400, "wait requires at least one of: timeMs, text, textGone, selector, url, loadState, fn");
357
+ await pw.waitForViaPlaywright({
358
+ cdpUrl,
359
+ targetId: tab.targetId,
360
+ timeMs,
361
+ text,
362
+ textGone,
363
+ selector,
364
+ url,
365
+ loadState,
366
+ fn,
367
+ timeoutMs
368
+ });
369
+ return res.json({
370
+ ok: true,
371
+ targetId: tab.targetId
372
+ });
373
+ }
374
+ case "evaluate": {
375
+ if (!evaluateEnabled) return jsonError(res, 403, ["act:evaluate is disabled by config (browser.evaluateEnabled=false).", "Docs: /gateway/configuration#browser-anima-managed-browser"].join("\n"));
376
+ const fn = toStringOrEmpty(body.fn);
377
+ if (!fn) return jsonError(res, 400, "fn is required");
378
+ const ref = toStringOrEmpty(body.ref) || void 0;
379
+ const evalTimeoutMs = toNumber(body.timeoutMs);
380
+ const evalRequest = {
381
+ cdpUrl,
382
+ targetId: tab.targetId,
383
+ fn,
384
+ ref,
385
+ signal: req.signal
386
+ };
387
+ if (evalTimeoutMs !== void 0) evalRequest.timeoutMs = evalTimeoutMs;
388
+ const result = await pw.evaluateViaPlaywright(evalRequest);
389
+ return res.json({
390
+ ok: true,
391
+ targetId: tab.targetId,
392
+ url: tab.url,
393
+ result
394
+ });
395
+ }
396
+ case "close":
397
+ await pw.closePageViaPlaywright({
398
+ cdpUrl,
399
+ targetId: tab.targetId
400
+ });
401
+ return res.json({
402
+ ok: true,
403
+ targetId: tab.targetId
404
+ });
405
+ default: return jsonError(res, 400, "unsupported kind");
406
+ }
407
+ } catch (err) {
408
+ handleRouteError(ctx, res, err);
409
+ }
410
+ });
411
+ app.post("/hooks/file-chooser", async (req, res) => {
412
+ const profileCtx = resolveProfileContext(req, res, ctx);
413
+ if (!profileCtx) return;
414
+ const body = readBody(req);
415
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
416
+ const ref = toStringOrEmpty(body.ref) || void 0;
417
+ const inputRef = toStringOrEmpty(body.inputRef) || void 0;
418
+ const element = toStringOrEmpty(body.element) || void 0;
419
+ const paths = toStringArray(body.paths) ?? [];
420
+ const timeoutMs = toNumber(body.timeoutMs);
421
+ if (!paths.length) return jsonError(res, 400, "paths are required");
422
+ try {
423
+ const uploadPathsResult = resolvePathsWithinRoot({
424
+ rootDir: DEFAULT_UPLOAD_DIR,
425
+ requestedPaths: paths,
426
+ scopeLabel: `uploads directory (${DEFAULT_UPLOAD_DIR})`
427
+ });
428
+ if (!uploadPathsResult.ok) {
429
+ res.status(400).json({ error: uploadPathsResult.error });
430
+ return;
431
+ }
432
+ const resolvedPaths = uploadPathsResult.paths;
433
+ const tab = await profileCtx.ensureTabAvailable(targetId);
434
+ const pw = await requirePwAi(res, "file chooser hook");
435
+ if (!pw) return;
436
+ if (inputRef || element) {
437
+ if (ref) return jsonError(res, 400, "ref cannot be combined with inputRef/element");
438
+ await pw.setInputFilesViaPlaywright({
439
+ cdpUrl: profileCtx.profile.cdpUrl,
440
+ targetId: tab.targetId,
441
+ inputRef,
442
+ element,
443
+ paths: resolvedPaths
444
+ });
445
+ } else {
446
+ await pw.armFileUploadViaPlaywright({
447
+ cdpUrl: profileCtx.profile.cdpUrl,
448
+ targetId: tab.targetId,
449
+ paths: resolvedPaths,
450
+ timeoutMs: timeoutMs ?? void 0
451
+ });
452
+ if (ref) await pw.clickViaPlaywright({
453
+ cdpUrl: profileCtx.profile.cdpUrl,
454
+ targetId: tab.targetId,
455
+ ref
456
+ });
457
+ }
458
+ res.json({ ok: true });
459
+ } catch (err) {
460
+ handleRouteError(ctx, res, err);
461
+ }
462
+ });
463
+ app.post("/hooks/dialog", async (req, res) => {
464
+ const profileCtx = resolveProfileContext(req, res, ctx);
465
+ if (!profileCtx) return;
466
+ const body = readBody(req);
467
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
468
+ const accept = toBoolean(body.accept);
469
+ const promptText = toStringOrEmpty(body.promptText) || void 0;
470
+ const timeoutMs = toNumber(body.timeoutMs);
471
+ if (accept === void 0) return jsonError(res, 400, "accept is required");
472
+ try {
473
+ const tab = await profileCtx.ensureTabAvailable(targetId);
474
+ const pw = await requirePwAi(res, "dialog hook");
475
+ if (!pw) return;
476
+ await pw.armDialogViaPlaywright({
477
+ cdpUrl: profileCtx.profile.cdpUrl,
478
+ targetId: tab.targetId,
479
+ accept,
480
+ promptText,
481
+ timeoutMs: timeoutMs ?? void 0
482
+ });
483
+ res.json({ ok: true });
484
+ } catch (err) {
485
+ handleRouteError(ctx, res, err);
486
+ }
487
+ });
488
+ app.post("/wait/download", async (req, res) => {
489
+ const profileCtx = resolveProfileContext(req, res, ctx);
490
+ if (!profileCtx) return;
491
+ const body = readBody(req);
492
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
493
+ const out = toStringOrEmpty(body.path) || "";
494
+ const timeoutMs = toNumber(body.timeoutMs);
495
+ try {
496
+ const tab = await profileCtx.ensureTabAvailable(targetId);
497
+ const pw = await requirePwAi(res, "wait for download");
498
+ if (!pw) return;
499
+ let downloadPath;
500
+ if (out.trim()) {
501
+ const downloadPathResult = resolvePathWithinRoot({
502
+ rootDir: DEFAULT_DOWNLOAD_DIR,
503
+ requestedPath: out,
504
+ scopeLabel: "downloads directory"
505
+ });
506
+ if (!downloadPathResult.ok) {
507
+ res.status(400).json({ error: downloadPathResult.error });
508
+ return;
509
+ }
510
+ downloadPath = downloadPathResult.path;
511
+ }
512
+ const result = await pw.waitForDownloadViaPlaywright({
513
+ cdpUrl: profileCtx.profile.cdpUrl,
514
+ targetId: tab.targetId,
515
+ path: downloadPath,
516
+ timeoutMs: timeoutMs ?? void 0
517
+ });
518
+ res.json({
519
+ ok: true,
520
+ targetId: tab.targetId,
521
+ download: result
522
+ });
523
+ } catch (err) {
524
+ handleRouteError(ctx, res, err);
525
+ }
526
+ });
527
+ app.post("/download", async (req, res) => {
528
+ const profileCtx = resolveProfileContext(req, res, ctx);
529
+ if (!profileCtx) return;
530
+ const body = readBody(req);
531
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
532
+ const ref = toStringOrEmpty(body.ref);
533
+ const out = toStringOrEmpty(body.path);
534
+ const timeoutMs = toNumber(body.timeoutMs);
535
+ if (!ref) return jsonError(res, 400, "ref is required");
536
+ if (!out) return jsonError(res, 400, "path is required");
537
+ try {
538
+ const downloadPathResult = resolvePathWithinRoot({
539
+ rootDir: DEFAULT_DOWNLOAD_DIR,
540
+ requestedPath: out,
541
+ scopeLabel: "downloads directory"
542
+ });
543
+ if (!downloadPathResult.ok) {
544
+ res.status(400).json({ error: downloadPathResult.error });
545
+ return;
546
+ }
547
+ const tab = await profileCtx.ensureTabAvailable(targetId);
548
+ const pw = await requirePwAi(res, "download");
549
+ if (!pw) return;
550
+ const result = await pw.downloadViaPlaywright({
551
+ cdpUrl: profileCtx.profile.cdpUrl,
552
+ targetId: tab.targetId,
553
+ ref,
554
+ path: downloadPathResult.path,
555
+ timeoutMs: timeoutMs ?? void 0
556
+ });
557
+ res.json({
558
+ ok: true,
559
+ targetId: tab.targetId,
560
+ download: result
561
+ });
562
+ } catch (err) {
563
+ handleRouteError(ctx, res, err);
564
+ }
565
+ });
566
+ app.post("/response/body", async (req, res) => {
567
+ const profileCtx = resolveProfileContext(req, res, ctx);
568
+ if (!profileCtx) return;
569
+ const body = readBody(req);
570
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
571
+ const url = toStringOrEmpty(body.url);
572
+ const timeoutMs = toNumber(body.timeoutMs);
573
+ const maxChars = toNumber(body.maxChars);
574
+ if (!url) return jsonError(res, 400, "url is required");
575
+ try {
576
+ const tab = await profileCtx.ensureTabAvailable(targetId);
577
+ const pw = await requirePwAi(res, "response body");
578
+ if (!pw) return;
579
+ const result = await pw.responseBodyViaPlaywright({
580
+ cdpUrl: profileCtx.profile.cdpUrl,
581
+ targetId: tab.targetId,
582
+ url,
583
+ timeoutMs: timeoutMs ?? void 0,
584
+ maxChars: maxChars ?? void 0
585
+ });
586
+ res.json({
587
+ ok: true,
588
+ targetId: tab.targetId,
589
+ response: result
590
+ });
591
+ } catch (err) {
592
+ handleRouteError(ctx, res, err);
593
+ }
594
+ });
595
+ app.post("/highlight", async (req, res) => {
596
+ const profileCtx = resolveProfileContext(req, res, ctx);
597
+ if (!profileCtx) return;
598
+ const body = readBody(req);
599
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
600
+ const ref = toStringOrEmpty(body.ref);
601
+ if (!ref) return jsonError(res, 400, "ref is required");
602
+ try {
603
+ const tab = await profileCtx.ensureTabAvailable(targetId);
604
+ const pw = await requirePwAi(res, "highlight");
605
+ if (!pw) return;
606
+ await pw.highlightViaPlaywright({
607
+ cdpUrl: profileCtx.profile.cdpUrl,
608
+ targetId: tab.targetId,
609
+ ref
610
+ });
611
+ res.json({
612
+ ok: true,
613
+ targetId: tab.targetId
614
+ });
615
+ } catch (err) {
616
+ handleRouteError(ctx, res, err);
617
+ }
618
+ });
619
+ }
620
+
621
+ //#endregion
622
+ //#region src/browser/routes/agent.debug.ts
623
+ function registerBrowserAgentDebugRoutes(app, ctx) {
624
+ app.get("/console", async (req, res) => {
625
+ const profileCtx = resolveProfileContext(req, res, ctx);
626
+ if (!profileCtx) return;
627
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
628
+ const level = typeof req.query.level === "string" ? req.query.level : "";
629
+ try {
630
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
631
+ const pw = await requirePwAi(res, "console messages");
632
+ if (!pw) return;
633
+ const messages = await pw.getConsoleMessagesViaPlaywright({
634
+ cdpUrl: profileCtx.profile.cdpUrl,
635
+ targetId: tab.targetId,
636
+ level: level.trim() || void 0
637
+ });
638
+ res.json({
639
+ ok: true,
640
+ messages,
641
+ targetId: tab.targetId
642
+ });
643
+ } catch (err) {
644
+ handleRouteError(ctx, res, err);
645
+ }
646
+ });
647
+ app.get("/errors", async (req, res) => {
648
+ const profileCtx = resolveProfileContext(req, res, ctx);
649
+ if (!profileCtx) return;
650
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
651
+ const clear = toBoolean(req.query.clear) ?? false;
652
+ try {
653
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
654
+ const pw = await requirePwAi(res, "page errors");
655
+ if (!pw) return;
656
+ const result = await pw.getPageErrorsViaPlaywright({
657
+ cdpUrl: profileCtx.profile.cdpUrl,
658
+ targetId: tab.targetId,
659
+ clear
660
+ });
661
+ res.json({
662
+ ok: true,
663
+ targetId: tab.targetId,
664
+ ...result
665
+ });
666
+ } catch (err) {
667
+ handleRouteError(ctx, res, err);
668
+ }
669
+ });
670
+ app.get("/requests", async (req, res) => {
671
+ const profileCtx = resolveProfileContext(req, res, ctx);
672
+ if (!profileCtx) return;
673
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
674
+ const filter = typeof req.query.filter === "string" ? req.query.filter : "";
675
+ const clear = toBoolean(req.query.clear) ?? false;
676
+ try {
677
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
678
+ const pw = await requirePwAi(res, "network requests");
679
+ if (!pw) return;
680
+ const result = await pw.getNetworkRequestsViaPlaywright({
681
+ cdpUrl: profileCtx.profile.cdpUrl,
682
+ targetId: tab.targetId,
683
+ filter: filter.trim() || void 0,
684
+ clear
685
+ });
686
+ res.json({
687
+ ok: true,
688
+ targetId: tab.targetId,
689
+ ...result
690
+ });
691
+ } catch (err) {
692
+ handleRouteError(ctx, res, err);
693
+ }
694
+ });
695
+ app.post("/trace/start", async (req, res) => {
696
+ const profileCtx = resolveProfileContext(req, res, ctx);
697
+ if (!profileCtx) return;
698
+ const body = readBody(req);
699
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
700
+ const screenshots = toBoolean(body.screenshots) ?? void 0;
701
+ const snapshots = toBoolean(body.snapshots) ?? void 0;
702
+ const sources = toBoolean(body.sources) ?? void 0;
703
+ try {
704
+ const tab = await profileCtx.ensureTabAvailable(targetId);
705
+ const pw = await requirePwAi(res, "trace start");
706
+ if (!pw) return;
707
+ await pw.traceStartViaPlaywright({
708
+ cdpUrl: profileCtx.profile.cdpUrl,
709
+ targetId: tab.targetId,
710
+ screenshots,
711
+ snapshots,
712
+ sources
713
+ });
714
+ res.json({
715
+ ok: true,
716
+ targetId: tab.targetId
717
+ });
718
+ } catch (err) {
719
+ handleRouteError(ctx, res, err);
720
+ }
721
+ });
722
+ app.post("/trace/stop", async (req, res) => {
723
+ const profileCtx = resolveProfileContext(req, res, ctx);
724
+ if (!profileCtx) return;
725
+ const body = readBody(req);
726
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
727
+ const out = toStringOrEmpty(body.path) || "";
728
+ try {
729
+ const tab = await profileCtx.ensureTabAvailable(targetId);
730
+ const pw = await requirePwAi(res, "trace stop");
731
+ if (!pw) return;
732
+ const id = crypto.randomUUID();
733
+ const dir = DEFAULT_TRACE_DIR;
734
+ await fs$1.mkdir(dir, { recursive: true });
735
+ const tracePathResult = resolvePathWithinRoot({
736
+ rootDir: dir,
737
+ requestedPath: out,
738
+ scopeLabel: "trace directory",
739
+ defaultFileName: `browser-trace-${id}.zip`
740
+ });
741
+ if (!tracePathResult.ok) {
742
+ res.status(400).json({ error: tracePathResult.error });
743
+ return;
744
+ }
745
+ const tracePath = tracePathResult.path;
746
+ await pw.traceStopViaPlaywright({
747
+ cdpUrl: profileCtx.profile.cdpUrl,
748
+ targetId: tab.targetId,
749
+ path: tracePath
750
+ });
751
+ res.json({
752
+ ok: true,
753
+ targetId: tab.targetId,
754
+ path: path.resolve(tracePath)
755
+ });
756
+ } catch (err) {
757
+ handleRouteError(ctx, res, err);
758
+ }
759
+ });
760
+ }
761
+
762
+ //#endregion
763
+ //#region src/media/store.ts
764
+ const resolveMediaDir = () => path.join(resolveConfigDir(), "media");
765
+ const MEDIA_MAX_BYTES = 5 * 1024 * 1024;
766
+ const MAX_BYTES = MEDIA_MAX_BYTES;
767
+ const DEFAULT_TTL_MS = 120 * 1e3;
768
+ /**
769
+ * Sanitize a filename for cross-platform safety.
770
+ * Removes chars unsafe on Windows/SharePoint/all platforms.
771
+ * Keeps: alphanumeric, dots, hyphens, underscores, Unicode letters/numbers.
772
+ */
773
+ function sanitizeFilename(name) {
774
+ const trimmed = name.trim();
775
+ if (!trimmed) return "";
776
+ return trimmed.replace(/[^\p{L}\p{N}._-]+/gu, "_").replace(/_+/g, "_").replace(/^_|_$/g, "").slice(0, 60);
777
+ }
778
+ function getMediaDir() {
779
+ return resolveMediaDir();
780
+ }
781
+ async function ensureMediaDir() {
782
+ const mediaDir = resolveMediaDir();
783
+ await fs$1.mkdir(mediaDir, {
784
+ recursive: true,
785
+ mode: 448
786
+ });
787
+ return mediaDir;
788
+ }
789
+ async function saveMediaBuffer(buffer, contentType, subdir = "inbound", maxBytes = MAX_BYTES, originalFilename) {
790
+ if (buffer.byteLength > maxBytes) throw new Error(`Media exceeds ${(maxBytes / (1024 * 1024)).toFixed(0)}MB limit`);
791
+ const dir = path.join(resolveMediaDir(), subdir);
792
+ await fs$1.mkdir(dir, {
793
+ recursive: true,
794
+ mode: 448
795
+ });
796
+ const uuid = crypto.randomUUID();
797
+ const headerExt = extensionForMime(contentType?.split(";")[0]?.trim() ?? void 0);
798
+ const mime = await detectMime({
799
+ buffer,
800
+ headerMime: contentType
801
+ });
802
+ const ext = headerExt ?? extensionForMime(mime) ?? "";
803
+ let id;
804
+ if (originalFilename) {
805
+ const base = path.parse(originalFilename).name;
806
+ const sanitized = sanitizeFilename(base);
807
+ id = sanitized ? `${sanitized}---${uuid}${ext}` : `${uuid}${ext}`;
808
+ } else id = ext ? `${uuid}${ext}` : uuid;
809
+ const dest = path.join(dir, id);
810
+ await fs$1.writeFile(dest, buffer, { mode: 384 });
811
+ return {
812
+ id,
813
+ path: dest,
814
+ size: buffer.byteLength,
815
+ contentType: mime
816
+ };
817
+ }
818
+
819
+ //#endregion
820
+ //#region src/browser/screenshot.ts
821
+ const DEFAULT_BROWSER_SCREENSHOT_MAX_SIDE = 2e3;
822
+ const DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES = 5 * 1024 * 1024;
823
+ async function normalizeBrowserScreenshot(buffer, opts) {
824
+ const maxSide = Math.max(1, Math.round(opts?.maxSide ?? DEFAULT_BROWSER_SCREENSHOT_MAX_SIDE));
825
+ const maxBytes = Math.max(1, Math.round(opts?.maxBytes ?? DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES));
826
+ const meta = await getImageMetadata(buffer);
827
+ const width = Number(meta?.width ?? 0);
828
+ const height = Number(meta?.height ?? 0);
829
+ const maxDim = Math.max(width, height);
830
+ if (buffer.byteLength <= maxBytes && (maxDim === 0 || width <= maxSide && height <= maxSide)) return { buffer };
831
+ const qualities = [
832
+ 85,
833
+ 75,
834
+ 65,
835
+ 55,
836
+ 45,
837
+ 35
838
+ ];
839
+ const sideGrid = [
840
+ maxDim > 0 ? Math.min(maxSide, maxDim) : maxSide,
841
+ 1800,
842
+ 1600,
843
+ 1400,
844
+ 1200,
845
+ 1e3,
846
+ 800
847
+ ].map((v) => Math.min(maxSide, v)).filter((v, i, arr) => v > 0 && arr.indexOf(v) === i).toSorted((a, b) => b - a);
848
+ let smallest = null;
849
+ for (const side of sideGrid) for (const quality of qualities) {
850
+ const out = await resizeToJpeg({
851
+ buffer,
852
+ maxSide: side,
853
+ quality,
854
+ withoutEnlargement: true
855
+ });
856
+ if (!smallest || out.byteLength < smallest.size) smallest = {
857
+ buffer: out,
858
+ size: out.byteLength
859
+ };
860
+ if (out.byteLength <= maxBytes) return {
861
+ buffer: out,
862
+ contentType: "image/jpeg"
863
+ };
864
+ }
865
+ const best = smallest?.buffer ?? buffer;
866
+ throw new Error(`Browser screenshot could not be reduced below ${(maxBytes / (1024 * 1024)).toFixed(0)}MB (got ${(best.byteLength / (1024 * 1024)).toFixed(2)}MB)`);
867
+ }
868
+
869
+ //#endregion
870
+ //#region src/browser/routes/agent.snapshot.ts
871
+ function registerBrowserAgentSnapshotRoutes(app, ctx) {
872
+ app.post("/navigate", async (req, res) => {
873
+ const profileCtx = resolveProfileContext(req, res, ctx);
874
+ if (!profileCtx) return;
875
+ const body = readBody(req);
876
+ const url = toStringOrEmpty(body.url);
877
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
878
+ if (!url) return jsonError(res, 400, "url is required");
879
+ try {
880
+ const tab = await profileCtx.ensureTabAvailable(targetId);
881
+ const pw = await requirePwAi(res, "navigate");
882
+ if (!pw) return;
883
+ const result = await pw.navigateViaPlaywright({
884
+ cdpUrl: profileCtx.profile.cdpUrl,
885
+ targetId: tab.targetId,
886
+ url
887
+ });
888
+ res.json({
889
+ ok: true,
890
+ targetId: tab.targetId,
891
+ ...result
892
+ });
893
+ } catch (err) {
894
+ handleRouteError(ctx, res, err);
895
+ }
896
+ });
897
+ app.post("/pdf", async (req, res) => {
898
+ const profileCtx = resolveProfileContext(req, res, ctx);
899
+ if (!profileCtx) return;
900
+ const targetId = toStringOrEmpty(readBody(req).targetId) || void 0;
901
+ try {
902
+ const tab = await profileCtx.ensureTabAvailable(targetId);
903
+ const pw = await requirePwAi(res, "pdf");
904
+ if (!pw) return;
905
+ const pdf = await pw.pdfViaPlaywright({
906
+ cdpUrl: profileCtx.profile.cdpUrl,
907
+ targetId: tab.targetId
908
+ });
909
+ await ensureMediaDir();
910
+ const saved = await saveMediaBuffer(pdf.buffer, "application/pdf", "browser", pdf.buffer.byteLength);
911
+ res.json({
912
+ ok: true,
913
+ path: path.resolve(saved.path),
914
+ targetId: tab.targetId,
915
+ url: tab.url
916
+ });
917
+ } catch (err) {
918
+ handleRouteError(ctx, res, err);
919
+ }
920
+ });
921
+ app.post("/screenshot", async (req, res) => {
922
+ const profileCtx = resolveProfileContext(req, res, ctx);
923
+ if (!profileCtx) return;
924
+ const body = readBody(req);
925
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
926
+ const fullPage = toBoolean(body.fullPage) ?? false;
927
+ const ref = toStringOrEmpty(body.ref) || void 0;
928
+ const element = toStringOrEmpty(body.element) || void 0;
929
+ const type = body.type === "jpeg" ? "jpeg" : "png";
930
+ if (fullPage && (ref || element)) return jsonError(res, 400, "fullPage is not supported for element screenshots");
931
+ try {
932
+ const tab = await profileCtx.ensureTabAvailable(targetId);
933
+ let buffer;
934
+ if (profileCtx.profile.driver === "extension" || !tab.wsUrl || Boolean(ref) || Boolean(element)) {
935
+ const pw = await requirePwAi(res, "screenshot");
936
+ if (!pw) return;
937
+ buffer = (await pw.takeScreenshotViaPlaywright({
938
+ cdpUrl: profileCtx.profile.cdpUrl,
939
+ targetId: tab.targetId,
940
+ ref,
941
+ element,
942
+ fullPage,
943
+ type
944
+ })).buffer;
945
+ } else buffer = await captureScreenshot({
946
+ wsUrl: tab.wsUrl ?? "",
947
+ fullPage,
948
+ format: type,
949
+ quality: type === "jpeg" ? 85 : void 0
950
+ });
951
+ const normalized = await normalizeBrowserScreenshot(buffer, {
952
+ maxSide: DEFAULT_BROWSER_SCREENSHOT_MAX_SIDE,
953
+ maxBytes: DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES
954
+ });
955
+ await ensureMediaDir();
956
+ const saved = await saveMediaBuffer(normalized.buffer, normalized.contentType ?? `image/${type}`, "browser", DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES);
957
+ res.json({
958
+ ok: true,
959
+ path: path.resolve(saved.path),
960
+ targetId: tab.targetId,
961
+ url: tab.url
962
+ });
963
+ } catch (err) {
964
+ handleRouteError(ctx, res, err);
965
+ }
966
+ });
967
+ app.get("/snapshot", async (req, res) => {
968
+ const profileCtx = resolveProfileContext(req, res, ctx);
969
+ if (!profileCtx) return;
970
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
971
+ const mode = req.query.mode === "efficient" ? "efficient" : void 0;
972
+ const labels = toBoolean(req.query.labels) ?? void 0;
973
+ const format = (req.query.format === "aria" ? "aria" : req.query.format === "ai" ? "ai" : void 0) ?? (mode ? "ai" : await getPwAiModule() ? "ai" : "aria");
974
+ const limitRaw = typeof req.query.limit === "string" ? Number(req.query.limit) : void 0;
975
+ const hasMaxChars = Object.hasOwn(req.query, "maxChars");
976
+ const maxCharsRaw = typeof req.query.maxChars === "string" ? Number(req.query.maxChars) : void 0;
977
+ const limit = Number.isFinite(limitRaw) ? limitRaw : void 0;
978
+ const resolvedMaxChars = format === "ai" ? hasMaxChars ? typeof maxCharsRaw === "number" && Number.isFinite(maxCharsRaw) && maxCharsRaw > 0 ? Math.floor(maxCharsRaw) : void 0 : mode === "efficient" ? DEFAULT_AI_SNAPSHOT_EFFICIENT_MAX_CHARS : DEFAULT_AI_SNAPSHOT_MAX_CHARS : void 0;
979
+ const interactiveRaw = toBoolean(req.query.interactive);
980
+ const compactRaw = toBoolean(req.query.compact);
981
+ const depthRaw = toNumber(req.query.depth);
982
+ const refsModeRaw = toStringOrEmpty(req.query.refs).trim();
983
+ const refsMode = refsModeRaw === "aria" ? "aria" : refsModeRaw === "role" ? "role" : void 0;
984
+ const interactive = interactiveRaw ?? (mode === "efficient" ? true : void 0);
985
+ const compact = compactRaw ?? (mode === "efficient" ? true : void 0);
986
+ const depth = depthRaw ?? (mode === "efficient" ? DEFAULT_AI_SNAPSHOT_EFFICIENT_DEPTH : void 0);
987
+ const selector = toStringOrEmpty(req.query.selector);
988
+ const frameSelector = toStringOrEmpty(req.query.frame);
989
+ try {
990
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
991
+ if ((labels || mode === "efficient") && format === "aria") return jsonError(res, 400, "labels/mode=efficient require format=ai");
992
+ if (format === "ai") {
993
+ const pw = await requirePwAi(res, "ai snapshot");
994
+ if (!pw) return;
995
+ const snap = labels === true || mode === "efficient" || interactive === true || compact === true || depth !== void 0 || Boolean(selector.trim()) || Boolean(frameSelector.trim()) ? await pw.snapshotRoleViaPlaywright({
996
+ cdpUrl: profileCtx.profile.cdpUrl,
997
+ targetId: tab.targetId,
998
+ selector: selector.trim() || void 0,
999
+ frameSelector: frameSelector.trim() || void 0,
1000
+ refsMode,
1001
+ options: {
1002
+ interactive: interactive ?? void 0,
1003
+ compact: compact ?? void 0,
1004
+ maxDepth: depth ?? void 0
1005
+ }
1006
+ }) : await pw.snapshotAiViaPlaywright({
1007
+ cdpUrl: profileCtx.profile.cdpUrl,
1008
+ targetId: tab.targetId,
1009
+ ...typeof resolvedMaxChars === "number" ? { maxChars: resolvedMaxChars } : {}
1010
+ }).catch(async (err) => {
1011
+ if (String(err).toLowerCase().includes("_snapshotforai")) return await pw.snapshotRoleViaPlaywright({
1012
+ cdpUrl: profileCtx.profile.cdpUrl,
1013
+ targetId: tab.targetId,
1014
+ selector: selector.trim() || void 0,
1015
+ frameSelector: frameSelector.trim() || void 0,
1016
+ refsMode,
1017
+ options: {
1018
+ interactive: interactive ?? void 0,
1019
+ compact: compact ?? void 0,
1020
+ maxDepth: depth ?? void 0
1021
+ }
1022
+ });
1023
+ throw err;
1024
+ });
1025
+ if (labels) {
1026
+ const labeled = await pw.screenshotWithLabelsViaPlaywright({
1027
+ cdpUrl: profileCtx.profile.cdpUrl,
1028
+ targetId: tab.targetId,
1029
+ refs: "refs" in snap ? snap.refs : {},
1030
+ type: "png"
1031
+ });
1032
+ const normalized = await normalizeBrowserScreenshot(labeled.buffer, {
1033
+ maxSide: DEFAULT_BROWSER_SCREENSHOT_MAX_SIDE,
1034
+ maxBytes: DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES
1035
+ });
1036
+ await ensureMediaDir();
1037
+ const saved = await saveMediaBuffer(normalized.buffer, normalized.contentType ?? "image/png", "browser", DEFAULT_BROWSER_SCREENSHOT_MAX_BYTES);
1038
+ const imageType = normalized.contentType?.includes("jpeg") ? "jpeg" : "png";
1039
+ return res.json({
1040
+ ok: true,
1041
+ format,
1042
+ targetId: tab.targetId,
1043
+ url: tab.url,
1044
+ labels: true,
1045
+ labelsCount: labeled.labels,
1046
+ labelsSkipped: labeled.skipped,
1047
+ imagePath: path.resolve(saved.path),
1048
+ imageType,
1049
+ ...snap
1050
+ });
1051
+ }
1052
+ return res.json({
1053
+ ok: true,
1054
+ format,
1055
+ targetId: tab.targetId,
1056
+ url: tab.url,
1057
+ ...snap
1058
+ });
1059
+ }
1060
+ const snap = profileCtx.profile.driver === "extension" || !tab.wsUrl ? requirePwAi(res, "aria snapshot").then(async (pw) => {
1061
+ if (!pw) return null;
1062
+ return await pw.snapshotAriaViaPlaywright({
1063
+ cdpUrl: profileCtx.profile.cdpUrl,
1064
+ targetId: tab.targetId,
1065
+ limit
1066
+ });
1067
+ }) : snapshotAria({
1068
+ wsUrl: tab.wsUrl ?? "",
1069
+ limit
1070
+ });
1071
+ const resolved = await Promise.resolve(snap);
1072
+ if (!resolved) return;
1073
+ return res.json({
1074
+ ok: true,
1075
+ format,
1076
+ targetId: tab.targetId,
1077
+ url: tab.url,
1078
+ ...resolved
1079
+ });
1080
+ } catch (err) {
1081
+ handleRouteError(ctx, res, err);
1082
+ }
1083
+ });
1084
+ }
1085
+
1086
+ //#endregion
1087
+ //#region src/browser/routes/agent.storage.ts
1088
+ function registerBrowserAgentStorageRoutes(app, ctx) {
1089
+ app.get("/cookies", async (req, res) => {
1090
+ const profileCtx = resolveProfileContext(req, res, ctx);
1091
+ if (!profileCtx) return;
1092
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
1093
+ try {
1094
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
1095
+ const pw = await requirePwAi(res, "cookies");
1096
+ if (!pw) return;
1097
+ const result = await pw.cookiesGetViaPlaywright({
1098
+ cdpUrl: profileCtx.profile.cdpUrl,
1099
+ targetId: tab.targetId
1100
+ });
1101
+ res.json({
1102
+ ok: true,
1103
+ targetId: tab.targetId,
1104
+ ...result
1105
+ });
1106
+ } catch (err) {
1107
+ handleRouteError(ctx, res, err);
1108
+ }
1109
+ });
1110
+ app.post("/cookies/set", async (req, res) => {
1111
+ const profileCtx = resolveProfileContext(req, res, ctx);
1112
+ if (!profileCtx) return;
1113
+ const body = readBody(req);
1114
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1115
+ const cookie = body.cookie && typeof body.cookie === "object" && !Array.isArray(body.cookie) ? body.cookie : null;
1116
+ if (!cookie) return jsonError(res, 400, "cookie is required");
1117
+ try {
1118
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1119
+ const pw = await requirePwAi(res, "cookies set");
1120
+ if (!pw) return;
1121
+ await pw.cookiesSetViaPlaywright({
1122
+ cdpUrl: profileCtx.profile.cdpUrl,
1123
+ targetId: tab.targetId,
1124
+ cookie: {
1125
+ name: toStringOrEmpty(cookie.name),
1126
+ value: toStringOrEmpty(cookie.value),
1127
+ url: toStringOrEmpty(cookie.url) || void 0,
1128
+ domain: toStringOrEmpty(cookie.domain) || void 0,
1129
+ path: toStringOrEmpty(cookie.path) || void 0,
1130
+ expires: toNumber(cookie.expires) ?? void 0,
1131
+ httpOnly: toBoolean(cookie.httpOnly) ?? void 0,
1132
+ secure: toBoolean(cookie.secure) ?? void 0,
1133
+ sameSite: cookie.sameSite === "Lax" || cookie.sameSite === "None" || cookie.sameSite === "Strict" ? cookie.sameSite : void 0
1134
+ }
1135
+ });
1136
+ res.json({
1137
+ ok: true,
1138
+ targetId: tab.targetId
1139
+ });
1140
+ } catch (err) {
1141
+ handleRouteError(ctx, res, err);
1142
+ }
1143
+ });
1144
+ app.post("/cookies/clear", async (req, res) => {
1145
+ const profileCtx = resolveProfileContext(req, res, ctx);
1146
+ if (!profileCtx) return;
1147
+ const targetId = toStringOrEmpty(readBody(req).targetId) || void 0;
1148
+ try {
1149
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1150
+ const pw = await requirePwAi(res, "cookies clear");
1151
+ if (!pw) return;
1152
+ await pw.cookiesClearViaPlaywright({
1153
+ cdpUrl: profileCtx.profile.cdpUrl,
1154
+ targetId: tab.targetId
1155
+ });
1156
+ res.json({
1157
+ ok: true,
1158
+ targetId: tab.targetId
1159
+ });
1160
+ } catch (err) {
1161
+ handleRouteError(ctx, res, err);
1162
+ }
1163
+ });
1164
+ app.get("/storage/:kind", async (req, res) => {
1165
+ const profileCtx = resolveProfileContext(req, res, ctx);
1166
+ if (!profileCtx) return;
1167
+ const kind = toStringOrEmpty(req.params.kind);
1168
+ if (kind !== "local" && kind !== "session") return jsonError(res, 400, "kind must be local|session");
1169
+ const targetId = typeof req.query.targetId === "string" ? req.query.targetId.trim() : "";
1170
+ const key = typeof req.query.key === "string" ? req.query.key : "";
1171
+ try {
1172
+ const tab = await profileCtx.ensureTabAvailable(targetId || void 0);
1173
+ const pw = await requirePwAi(res, "storage get");
1174
+ if (!pw) return;
1175
+ const result = await pw.storageGetViaPlaywright({
1176
+ cdpUrl: profileCtx.profile.cdpUrl,
1177
+ targetId: tab.targetId,
1178
+ kind,
1179
+ key: key.trim() || void 0
1180
+ });
1181
+ res.json({
1182
+ ok: true,
1183
+ targetId: tab.targetId,
1184
+ ...result
1185
+ });
1186
+ } catch (err) {
1187
+ handleRouteError(ctx, res, err);
1188
+ }
1189
+ });
1190
+ app.post("/storage/:kind/set", async (req, res) => {
1191
+ const profileCtx = resolveProfileContext(req, res, ctx);
1192
+ if (!profileCtx) return;
1193
+ const kind = toStringOrEmpty(req.params.kind);
1194
+ if (kind !== "local" && kind !== "session") return jsonError(res, 400, "kind must be local|session");
1195
+ const body = readBody(req);
1196
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1197
+ const key = toStringOrEmpty(body.key);
1198
+ if (!key) return jsonError(res, 400, "key is required");
1199
+ const value = typeof body.value === "string" ? body.value : "";
1200
+ try {
1201
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1202
+ const pw = await requirePwAi(res, "storage set");
1203
+ if (!pw) return;
1204
+ await pw.storageSetViaPlaywright({
1205
+ cdpUrl: profileCtx.profile.cdpUrl,
1206
+ targetId: tab.targetId,
1207
+ kind,
1208
+ key,
1209
+ value
1210
+ });
1211
+ res.json({
1212
+ ok: true,
1213
+ targetId: tab.targetId
1214
+ });
1215
+ } catch (err) {
1216
+ handleRouteError(ctx, res, err);
1217
+ }
1218
+ });
1219
+ app.post("/storage/:kind/clear", async (req, res) => {
1220
+ const profileCtx = resolveProfileContext(req, res, ctx);
1221
+ if (!profileCtx) return;
1222
+ const kind = toStringOrEmpty(req.params.kind);
1223
+ if (kind !== "local" && kind !== "session") return jsonError(res, 400, "kind must be local|session");
1224
+ const targetId = toStringOrEmpty(readBody(req).targetId) || void 0;
1225
+ try {
1226
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1227
+ const pw = await requirePwAi(res, "storage clear");
1228
+ if (!pw) return;
1229
+ await pw.storageClearViaPlaywright({
1230
+ cdpUrl: profileCtx.profile.cdpUrl,
1231
+ targetId: tab.targetId,
1232
+ kind
1233
+ });
1234
+ res.json({
1235
+ ok: true,
1236
+ targetId: tab.targetId
1237
+ });
1238
+ } catch (err) {
1239
+ handleRouteError(ctx, res, err);
1240
+ }
1241
+ });
1242
+ app.post("/set/offline", async (req, res) => {
1243
+ const profileCtx = resolveProfileContext(req, res, ctx);
1244
+ if (!profileCtx) return;
1245
+ const body = readBody(req);
1246
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1247
+ const offline = toBoolean(body.offline);
1248
+ if (offline === void 0) return jsonError(res, 400, "offline is required");
1249
+ try {
1250
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1251
+ const pw = await requirePwAi(res, "offline");
1252
+ if (!pw) return;
1253
+ await pw.setOfflineViaPlaywright({
1254
+ cdpUrl: profileCtx.profile.cdpUrl,
1255
+ targetId: tab.targetId,
1256
+ offline
1257
+ });
1258
+ res.json({
1259
+ ok: true,
1260
+ targetId: tab.targetId
1261
+ });
1262
+ } catch (err) {
1263
+ handleRouteError(ctx, res, err);
1264
+ }
1265
+ });
1266
+ app.post("/set/headers", async (req, res) => {
1267
+ const profileCtx = resolveProfileContext(req, res, ctx);
1268
+ if (!profileCtx) return;
1269
+ const body = readBody(req);
1270
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1271
+ const headers = body.headers && typeof body.headers === "object" && !Array.isArray(body.headers) ? body.headers : null;
1272
+ if (!headers) return jsonError(res, 400, "headers is required");
1273
+ const parsed = {};
1274
+ for (const [k, v] of Object.entries(headers)) if (typeof v === "string") parsed[k] = v;
1275
+ try {
1276
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1277
+ const pw = await requirePwAi(res, "headers");
1278
+ if (!pw) return;
1279
+ await pw.setExtraHTTPHeadersViaPlaywright({
1280
+ cdpUrl: profileCtx.profile.cdpUrl,
1281
+ targetId: tab.targetId,
1282
+ headers: parsed
1283
+ });
1284
+ res.json({
1285
+ ok: true,
1286
+ targetId: tab.targetId
1287
+ });
1288
+ } catch (err) {
1289
+ handleRouteError(ctx, res, err);
1290
+ }
1291
+ });
1292
+ app.post("/set/credentials", async (req, res) => {
1293
+ const profileCtx = resolveProfileContext(req, res, ctx);
1294
+ if (!profileCtx) return;
1295
+ const body = readBody(req);
1296
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1297
+ const clear = toBoolean(body.clear) ?? false;
1298
+ const username = toStringOrEmpty(body.username) || void 0;
1299
+ const password = typeof body.password === "string" ? body.password : void 0;
1300
+ try {
1301
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1302
+ const pw = await requirePwAi(res, "http credentials");
1303
+ if (!pw) return;
1304
+ await pw.setHttpCredentialsViaPlaywright({
1305
+ cdpUrl: profileCtx.profile.cdpUrl,
1306
+ targetId: tab.targetId,
1307
+ username,
1308
+ password,
1309
+ clear
1310
+ });
1311
+ res.json({
1312
+ ok: true,
1313
+ targetId: tab.targetId
1314
+ });
1315
+ } catch (err) {
1316
+ handleRouteError(ctx, res, err);
1317
+ }
1318
+ });
1319
+ app.post("/set/geolocation", async (req, res) => {
1320
+ const profileCtx = resolveProfileContext(req, res, ctx);
1321
+ if (!profileCtx) return;
1322
+ const body = readBody(req);
1323
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1324
+ const clear = toBoolean(body.clear) ?? false;
1325
+ const latitude = toNumber(body.latitude);
1326
+ const longitude = toNumber(body.longitude);
1327
+ const accuracy = toNumber(body.accuracy) ?? void 0;
1328
+ const origin = toStringOrEmpty(body.origin) || void 0;
1329
+ try {
1330
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1331
+ const pw = await requirePwAi(res, "geolocation");
1332
+ if (!pw) return;
1333
+ await pw.setGeolocationViaPlaywright({
1334
+ cdpUrl: profileCtx.profile.cdpUrl,
1335
+ targetId: tab.targetId,
1336
+ latitude,
1337
+ longitude,
1338
+ accuracy,
1339
+ origin,
1340
+ clear
1341
+ });
1342
+ res.json({
1343
+ ok: true,
1344
+ targetId: tab.targetId
1345
+ });
1346
+ } catch (err) {
1347
+ handleRouteError(ctx, res, err);
1348
+ }
1349
+ });
1350
+ app.post("/set/media", async (req, res) => {
1351
+ const profileCtx = resolveProfileContext(req, res, ctx);
1352
+ if (!profileCtx) return;
1353
+ const body = readBody(req);
1354
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1355
+ const schemeRaw = toStringOrEmpty(body.colorScheme);
1356
+ const colorScheme = schemeRaw === "dark" || schemeRaw === "light" || schemeRaw === "no-preference" ? schemeRaw : schemeRaw === "none" ? null : void 0;
1357
+ if (colorScheme === void 0) return jsonError(res, 400, "colorScheme must be dark|light|no-preference|none");
1358
+ try {
1359
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1360
+ const pw = await requirePwAi(res, "media emulation");
1361
+ if (!pw) return;
1362
+ await pw.emulateMediaViaPlaywright({
1363
+ cdpUrl: profileCtx.profile.cdpUrl,
1364
+ targetId: tab.targetId,
1365
+ colorScheme
1366
+ });
1367
+ res.json({
1368
+ ok: true,
1369
+ targetId: tab.targetId
1370
+ });
1371
+ } catch (err) {
1372
+ handleRouteError(ctx, res, err);
1373
+ }
1374
+ });
1375
+ app.post("/set/timezone", async (req, res) => {
1376
+ const profileCtx = resolveProfileContext(req, res, ctx);
1377
+ if (!profileCtx) return;
1378
+ const body = readBody(req);
1379
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1380
+ const timezoneId = toStringOrEmpty(body.timezoneId);
1381
+ if (!timezoneId) return jsonError(res, 400, "timezoneId is required");
1382
+ try {
1383
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1384
+ const pw = await requirePwAi(res, "timezone");
1385
+ if (!pw) return;
1386
+ await pw.setTimezoneViaPlaywright({
1387
+ cdpUrl: profileCtx.profile.cdpUrl,
1388
+ targetId: tab.targetId,
1389
+ timezoneId
1390
+ });
1391
+ res.json({
1392
+ ok: true,
1393
+ targetId: tab.targetId
1394
+ });
1395
+ } catch (err) {
1396
+ handleRouteError(ctx, res, err);
1397
+ }
1398
+ });
1399
+ app.post("/set/locale", async (req, res) => {
1400
+ const profileCtx = resolveProfileContext(req, res, ctx);
1401
+ if (!profileCtx) return;
1402
+ const body = readBody(req);
1403
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1404
+ const locale = toStringOrEmpty(body.locale);
1405
+ if (!locale) return jsonError(res, 400, "locale is required");
1406
+ try {
1407
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1408
+ const pw = await requirePwAi(res, "locale");
1409
+ if (!pw) return;
1410
+ await pw.setLocaleViaPlaywright({
1411
+ cdpUrl: profileCtx.profile.cdpUrl,
1412
+ targetId: tab.targetId,
1413
+ locale
1414
+ });
1415
+ res.json({
1416
+ ok: true,
1417
+ targetId: tab.targetId
1418
+ });
1419
+ } catch (err) {
1420
+ handleRouteError(ctx, res, err);
1421
+ }
1422
+ });
1423
+ app.post("/set/device", async (req, res) => {
1424
+ const profileCtx = resolveProfileContext(req, res, ctx);
1425
+ if (!profileCtx) return;
1426
+ const body = readBody(req);
1427
+ const targetId = toStringOrEmpty(body.targetId) || void 0;
1428
+ const name = toStringOrEmpty(body.name);
1429
+ if (!name) return jsonError(res, 400, "name is required");
1430
+ try {
1431
+ const tab = await profileCtx.ensureTabAvailable(targetId);
1432
+ const pw = await requirePwAi(res, "device emulation");
1433
+ if (!pw) return;
1434
+ await pw.setDeviceViaPlaywright({
1435
+ cdpUrl: profileCtx.profile.cdpUrl,
1436
+ targetId: tab.targetId,
1437
+ name
1438
+ });
1439
+ res.json({
1440
+ ok: true,
1441
+ targetId: tab.targetId
1442
+ });
1443
+ } catch (err) {
1444
+ handleRouteError(ctx, res, err);
1445
+ }
1446
+ });
1447
+ }
1448
+
1449
+ //#endregion
1450
+ //#region src/browser/routes/agent.ts
1451
+ function registerBrowserAgentRoutes(app, ctx) {
1452
+ registerBrowserAgentSnapshotRoutes(app, ctx);
1453
+ registerBrowserAgentActRoutes(app, ctx);
1454
+ registerBrowserAgentDebugRoutes(app, ctx);
1455
+ registerBrowserAgentStorageRoutes(app, ctx);
1456
+ }
1457
+
1458
+ //#endregion
1459
+ //#region src/browser/profiles-service.ts
1460
+ const HEX_COLOR_RE = /^#[0-9A-Fa-f]{6}$/;
1461
+ function createBrowserProfilesService(ctx) {
1462
+ const listProfiles = async () => {
1463
+ return await ctx.listProfiles();
1464
+ };
1465
+ const createProfile = async (params) => {
1466
+ const name = params.name.trim();
1467
+ const rawCdpUrl = params.cdpUrl?.trim() || void 0;
1468
+ const driver = params.driver === "extension" ? "extension" : void 0;
1469
+ if (!isValidProfileName(name)) throw new Error("invalid profile name: use lowercase letters, numbers, and hyphens only");
1470
+ const state = ctx.state();
1471
+ const resolvedProfiles = state.resolved.profiles;
1472
+ if (name in resolvedProfiles) throw new Error(`profile "${name}" already exists`);
1473
+ const cfg = loadConfig();
1474
+ const rawProfiles = cfg.browser?.profiles ?? {};
1475
+ if (name in rawProfiles) throw new Error(`profile "${name}" already exists`);
1476
+ const usedColors = getUsedColors(resolvedProfiles);
1477
+ const profileColor = params.color && HEX_COLOR_RE.test(params.color) ? params.color : allocateColor(usedColors);
1478
+ let profileConfig;
1479
+ if (rawCdpUrl) profileConfig = {
1480
+ cdpUrl: parseHttpUrl(rawCdpUrl, "browser.profiles.cdpUrl").normalized,
1481
+ ...driver ? { driver } : {},
1482
+ color: profileColor
1483
+ };
1484
+ else {
1485
+ const cdpPort = allocateCdpPort(getUsedPorts(resolvedProfiles), deriveDefaultBrowserCdpPortRange(state.resolved.controlPort));
1486
+ if (cdpPort === null) throw new Error("no available CDP ports in range");
1487
+ profileConfig = {
1488
+ cdpPort,
1489
+ ...driver ? { driver } : {},
1490
+ color: profileColor
1491
+ };
1492
+ }
1493
+ await writeConfigFile({
1494
+ ...cfg,
1495
+ browser: {
1496
+ ...cfg.browser,
1497
+ profiles: {
1498
+ ...rawProfiles,
1499
+ [name]: profileConfig
1500
+ }
1501
+ }
1502
+ });
1503
+ state.resolved.profiles[name] = profileConfig;
1504
+ const resolved = resolveProfile(state.resolved, name);
1505
+ if (!resolved) throw new Error(`profile "${name}" not found after creation`);
1506
+ return {
1507
+ ok: true,
1508
+ profile: name,
1509
+ cdpPort: resolved.cdpPort,
1510
+ cdpUrl: resolved.cdpUrl,
1511
+ color: resolved.color,
1512
+ isRemote: !resolved.cdpIsLoopback
1513
+ };
1514
+ };
1515
+ const deleteProfile = async (nameRaw) => {
1516
+ const name = nameRaw.trim();
1517
+ if (!name) throw new Error("profile name is required");
1518
+ if (!isValidProfileName(name)) throw new Error("invalid profile name");
1519
+ const cfg = loadConfig();
1520
+ const profiles = cfg.browser?.profiles ?? {};
1521
+ if (!(name in profiles)) throw new Error(`profile "${name}" not found`);
1522
+ if (name === (cfg.browser?.defaultProfile ?? DEFAULT_BROWSER_DEFAULT_PROFILE_NAME)) throw new Error(`cannot delete the default profile "${name}"; change browser.defaultProfile first`);
1523
+ let deleted = false;
1524
+ const state = ctx.state();
1525
+ if (resolveProfile(state.resolved, name)?.cdpIsLoopback) {
1526
+ try {
1527
+ await ctx.forProfile(name).stopRunningBrowser();
1528
+ } catch {}
1529
+ const userDataDir = resolveAnimaUserDataDir(name);
1530
+ const profileDir = path.dirname(userDataDir);
1531
+ if (fs.existsSync(profileDir)) {
1532
+ await movePathToTrash(profileDir);
1533
+ deleted = true;
1534
+ }
1535
+ }
1536
+ const { [name]: _removed, ...remainingProfiles } = profiles;
1537
+ await writeConfigFile({
1538
+ ...cfg,
1539
+ browser: {
1540
+ ...cfg.browser,
1541
+ profiles: remainingProfiles
1542
+ }
1543
+ });
1544
+ delete state.resolved.profiles[name];
1545
+ state.profiles.delete(name);
1546
+ return {
1547
+ ok: true,
1548
+ profile: name,
1549
+ deleted
1550
+ };
1551
+ };
1552
+ return {
1553
+ listProfiles,
1554
+ createProfile,
1555
+ deleteProfile
1556
+ };
1557
+ }
1558
+
1559
+ //#endregion
1560
+ //#region src/browser/routes/basic.ts
1561
+ function registerBrowserBasicRoutes(app, ctx) {
1562
+ app.get("/profiles", async (_req, res) => {
1563
+ try {
1564
+ const profiles = await createBrowserProfilesService(ctx).listProfiles();
1565
+ res.json({ profiles });
1566
+ } catch (err) {
1567
+ jsonError(res, 500, String(err));
1568
+ }
1569
+ });
1570
+ app.get("/", async (req, res) => {
1571
+ let current;
1572
+ try {
1573
+ current = ctx.state();
1574
+ } catch {
1575
+ return jsonError(res, 503, "browser server not started");
1576
+ }
1577
+ const profileCtx = getProfileContext(req, ctx);
1578
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1579
+ const [cdpHttp, cdpReady] = await Promise.all([profileCtx.isHttpReachable(300), profileCtx.isReachable(600)]);
1580
+ const profileState = current.profiles.get(profileCtx.profile.name);
1581
+ let detectedBrowser = null;
1582
+ let detectedExecutablePath = null;
1583
+ let detectError = null;
1584
+ try {
1585
+ const detected = resolveBrowserExecutableForPlatform(current.resolved, process.platform);
1586
+ if (detected) {
1587
+ detectedBrowser = detected.kind;
1588
+ detectedExecutablePath = detected.path;
1589
+ }
1590
+ } catch (err) {
1591
+ detectError = String(err);
1592
+ }
1593
+ res.json({
1594
+ enabled: current.resolved.enabled,
1595
+ profile: profileCtx.profile.name,
1596
+ running: cdpReady,
1597
+ cdpReady,
1598
+ cdpHttp,
1599
+ pid: profileState?.running?.pid ?? null,
1600
+ cdpPort: profileCtx.profile.cdpPort,
1601
+ cdpUrl: profileCtx.profile.cdpUrl,
1602
+ chosenBrowser: profileState?.running?.exe.kind ?? null,
1603
+ detectedBrowser,
1604
+ detectedExecutablePath,
1605
+ detectError,
1606
+ userDataDir: profileState?.running?.userDataDir ?? null,
1607
+ color: profileCtx.profile.color,
1608
+ headless: current.resolved.headless,
1609
+ noSandbox: current.resolved.noSandbox,
1610
+ executablePath: current.resolved.executablePath ?? null,
1611
+ attachOnly: current.resolved.attachOnly
1612
+ });
1613
+ });
1614
+ app.post("/start", async (req, res) => {
1615
+ const profileCtx = getProfileContext(req, ctx);
1616
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1617
+ try {
1618
+ await profileCtx.ensureBrowserAvailable();
1619
+ res.json({
1620
+ ok: true,
1621
+ profile: profileCtx.profile.name
1622
+ });
1623
+ } catch (err) {
1624
+ jsonError(res, 500, String(err));
1625
+ }
1626
+ });
1627
+ app.post("/stop", async (req, res) => {
1628
+ const profileCtx = getProfileContext(req, ctx);
1629
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1630
+ try {
1631
+ const result = await profileCtx.stopRunningBrowser();
1632
+ res.json({
1633
+ ok: true,
1634
+ stopped: result.stopped,
1635
+ profile: profileCtx.profile.name
1636
+ });
1637
+ } catch (err) {
1638
+ jsonError(res, 500, String(err));
1639
+ }
1640
+ });
1641
+ app.post("/reset-profile", async (req, res) => {
1642
+ const profileCtx = getProfileContext(req, ctx);
1643
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1644
+ try {
1645
+ const result = await profileCtx.resetProfile();
1646
+ res.json({
1647
+ ok: true,
1648
+ profile: profileCtx.profile.name,
1649
+ ...result
1650
+ });
1651
+ } catch (err) {
1652
+ jsonError(res, 500, String(err));
1653
+ }
1654
+ });
1655
+ app.post("/profiles/create", async (req, res) => {
1656
+ const name = toStringOrEmpty(req.body?.name);
1657
+ const color = toStringOrEmpty(req.body?.color);
1658
+ const cdpUrl = toStringOrEmpty(req.body?.cdpUrl);
1659
+ const driver = toStringOrEmpty(req.body?.driver);
1660
+ if (!name) return jsonError(res, 400, "name is required");
1661
+ try {
1662
+ const result = await createBrowserProfilesService(ctx).createProfile({
1663
+ name,
1664
+ color: color || void 0,
1665
+ cdpUrl: cdpUrl || void 0,
1666
+ driver: driver === "extension" ? "extension" : void 0
1667
+ });
1668
+ res.json(result);
1669
+ } catch (err) {
1670
+ const msg = String(err);
1671
+ if (msg.includes("already exists")) return jsonError(res, 409, msg);
1672
+ if (msg.includes("invalid profile name")) return jsonError(res, 400, msg);
1673
+ if (msg.includes("no available CDP ports")) return jsonError(res, 507, msg);
1674
+ if (msg.includes("cdpUrl")) return jsonError(res, 400, msg);
1675
+ jsonError(res, 500, msg);
1676
+ }
1677
+ });
1678
+ app.delete("/profiles/:name", async (req, res) => {
1679
+ const name = toStringOrEmpty(req.params.name);
1680
+ if (!name) return jsonError(res, 400, "profile name is required");
1681
+ try {
1682
+ const result = await createBrowserProfilesService(ctx).deleteProfile(name);
1683
+ res.json(result);
1684
+ } catch (err) {
1685
+ const msg = String(err);
1686
+ if (msg.includes("invalid profile name")) return jsonError(res, 400, msg);
1687
+ if (msg.includes("default profile")) return jsonError(res, 400, msg);
1688
+ if (msg.includes("not found")) return jsonError(res, 404, msg);
1689
+ jsonError(res, 500, msg);
1690
+ }
1691
+ });
1692
+ }
1693
+
1694
+ //#endregion
1695
+ //#region src/browser/routes/tabs.ts
1696
+ function registerBrowserTabRoutes(app, ctx) {
1697
+ app.get("/tabs", async (req, res) => {
1698
+ const profileCtx = getProfileContext(req, ctx);
1699
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1700
+ try {
1701
+ if (!await profileCtx.isReachable(300)) return res.json({
1702
+ running: false,
1703
+ tabs: []
1704
+ });
1705
+ const tabs = await profileCtx.listTabs();
1706
+ res.json({
1707
+ running: true,
1708
+ tabs
1709
+ });
1710
+ } catch (err) {
1711
+ jsonError(res, 500, String(err));
1712
+ }
1713
+ });
1714
+ app.post("/tabs/open", async (req, res) => {
1715
+ const profileCtx = getProfileContext(req, ctx);
1716
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1717
+ const url = toStringOrEmpty(req.body?.url);
1718
+ if (!url) return jsonError(res, 400, "url is required");
1719
+ try {
1720
+ await profileCtx.ensureBrowserAvailable();
1721
+ const tab = await profileCtx.openTab(url);
1722
+ res.json(tab);
1723
+ } catch (err) {
1724
+ jsonError(res, 500, String(err));
1725
+ }
1726
+ });
1727
+ app.post("/tabs/focus", async (req, res) => {
1728
+ const profileCtx = getProfileContext(req, ctx);
1729
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1730
+ const targetId = toStringOrEmpty(req.body?.targetId);
1731
+ if (!targetId) return jsonError(res, 400, "targetId is required");
1732
+ try {
1733
+ if (!await profileCtx.isReachable(300)) return jsonError(res, 409, "browser not running");
1734
+ await profileCtx.focusTab(targetId);
1735
+ res.json({ ok: true });
1736
+ } catch (err) {
1737
+ const mapped = ctx.mapTabError(err);
1738
+ if (mapped) return jsonError(res, mapped.status, mapped.message);
1739
+ jsonError(res, 500, String(err));
1740
+ }
1741
+ });
1742
+ app.delete("/tabs/:targetId", async (req, res) => {
1743
+ const profileCtx = getProfileContext(req, ctx);
1744
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1745
+ const targetId = toStringOrEmpty(req.params.targetId);
1746
+ if (!targetId) return jsonError(res, 400, "targetId is required");
1747
+ try {
1748
+ if (!await profileCtx.isReachable(300)) return jsonError(res, 409, "browser not running");
1749
+ await profileCtx.closeTab(targetId);
1750
+ res.json({ ok: true });
1751
+ } catch (err) {
1752
+ const mapped = ctx.mapTabError(err);
1753
+ if (mapped) return jsonError(res, mapped.status, mapped.message);
1754
+ jsonError(res, 500, String(err));
1755
+ }
1756
+ });
1757
+ app.post("/tabs/action", async (req, res) => {
1758
+ const profileCtx = getProfileContext(req, ctx);
1759
+ if ("error" in profileCtx) return jsonError(res, profileCtx.status, profileCtx.error);
1760
+ const action = toStringOrEmpty(req.body?.action);
1761
+ const index = toNumber(req.body?.index);
1762
+ try {
1763
+ if (action === "list") {
1764
+ if (!await profileCtx.isReachable(300)) return res.json({
1765
+ ok: true,
1766
+ tabs: []
1767
+ });
1768
+ const tabs = await profileCtx.listTabs();
1769
+ return res.json({
1770
+ ok: true,
1771
+ tabs
1772
+ });
1773
+ }
1774
+ if (action === "new") {
1775
+ await profileCtx.ensureBrowserAvailable();
1776
+ const tab = await profileCtx.openTab("about:blank");
1777
+ return res.json({
1778
+ ok: true,
1779
+ tab
1780
+ });
1781
+ }
1782
+ if (action === "close") {
1783
+ const tabs = await profileCtx.listTabs();
1784
+ const target = typeof index === "number" ? tabs[index] : tabs.at(0);
1785
+ if (!target) return jsonError(res, 404, "tab not found");
1786
+ await profileCtx.closeTab(target.targetId);
1787
+ return res.json({
1788
+ ok: true,
1789
+ targetId: target.targetId
1790
+ });
1791
+ }
1792
+ if (action === "select") {
1793
+ if (typeof index !== "number") return jsonError(res, 400, "index is required");
1794
+ const target = (await profileCtx.listTabs())[index];
1795
+ if (!target) return jsonError(res, 404, "tab not found");
1796
+ await profileCtx.focusTab(target.targetId);
1797
+ return res.json({
1798
+ ok: true,
1799
+ targetId: target.targetId
1800
+ });
1801
+ }
1802
+ return jsonError(res, 400, "unknown tab action");
1803
+ } catch (err) {
1804
+ const mapped = ctx.mapTabError(err);
1805
+ if (mapped) return jsonError(res, mapped.status, mapped.message);
1806
+ jsonError(res, 500, String(err));
1807
+ }
1808
+ });
1809
+ }
1810
+
1811
+ //#endregion
1812
+ //#region src/browser/routes/index.ts
1813
+ function registerBrowserRoutes(app, ctx) {
1814
+ registerBrowserBasicRoutes(app, ctx);
1815
+ registerBrowserTabRoutes(app, ctx);
1816
+ registerBrowserAgentRoutes(app, ctx);
1817
+ }
1818
+
1819
+ //#endregion
1820
+ export { getMediaDir as n, saveMediaBuffer as r, registerBrowserRoutes as t };