@agentrhq/webcmd 0.1.1 → 0.1.2

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 (415) hide show
  1. package/README.md +317 -24
  2. package/dist/src/adapter-shadow.d.ts +11 -0
  3. package/dist/src/adapter-shadow.js +72 -0
  4. package/dist/src/adapter-shadow.test.d.ts +1 -0
  5. package/dist/src/adapter-shadow.test.js +49 -0
  6. package/dist/src/adapter-source.d.ts +11 -0
  7. package/dist/src/adapter-source.js +24 -0
  8. package/dist/src/adapter-source.test.d.ts +1 -0
  9. package/dist/src/adapter-source.test.js +29 -0
  10. package/dist/src/brand.d.ts +9 -0
  11. package/dist/src/brand.js +9 -0
  12. package/dist/src/brand.test.d.ts +1 -0
  13. package/dist/src/brand.test.js +15 -0
  14. package/dist/src/browser/analyze.d.ts +118 -0
  15. package/dist/src/browser/analyze.js +405 -0
  16. package/dist/src/browser/analyze.test.d.ts +1 -0
  17. package/dist/src/browser/analyze.test.js +209 -0
  18. package/dist/src/browser/article-extract.d.ts +57 -0
  19. package/dist/src/browser/article-extract.e2e.test.d.ts +1 -0
  20. package/dist/src/browser/article-extract.e2e.test.js +105 -0
  21. package/dist/src/browser/article-extract.js +169 -0
  22. package/dist/src/browser/article-extract.test.d.ts +1 -0
  23. package/dist/src/browser/article-extract.test.js +94 -0
  24. package/dist/src/browser/ax-snapshot.d.ts +37 -0
  25. package/dist/src/browser/ax-snapshot.js +217 -0
  26. package/dist/src/browser/ax-snapshot.test.d.ts +1 -0
  27. package/dist/src/browser/ax-snapshot.test.js +91 -0
  28. package/dist/src/browser/base-page.d.ts +151 -0
  29. package/dist/src/browser/base-page.js +1060 -0
  30. package/dist/src/browser/base-page.test.d.ts +1 -0
  31. package/dist/src/browser/base-page.test.js +803 -0
  32. package/dist/src/browser/bridge-readiness.d.ts +14 -0
  33. package/dist/src/browser/bridge-readiness.js +24 -0
  34. package/dist/src/browser/bridge-readiness.test.d.ts +1 -0
  35. package/dist/src/browser/bridge-readiness.test.js +58 -0
  36. package/dist/src/browser/bridge.d.ts +26 -0
  37. package/dist/src/browser/bridge.js +58 -0
  38. package/dist/src/browser/cdp-click-fixture.test.d.ts +1 -0
  39. package/dist/src/browser/cdp-click-fixture.test.js +87 -0
  40. package/dist/src/browser/cdp.d.ts +46 -0
  41. package/dist/src/browser/cdp.js +536 -0
  42. package/dist/src/browser/cdp.test.d.ts +1 -0
  43. package/dist/src/browser/cdp.test.js +79 -0
  44. package/dist/src/browser/compound.d.ts +59 -0
  45. package/dist/src/browser/compound.js +112 -0
  46. package/dist/src/browser/compound.test.d.ts +1 -0
  47. package/dist/src/browser/compound.test.js +175 -0
  48. package/dist/src/browser/config.d.ts +2 -0
  49. package/dist/src/browser/config.js +14 -0
  50. package/dist/src/browser/daemon-client.d.ts +32 -0
  51. package/dist/src/browser/daemon-client.js +135 -0
  52. package/dist/src/browser/daemon-client.test.d.ts +1 -0
  53. package/dist/src/browser/daemon-client.test.js +326 -0
  54. package/dist/src/browser/daemon-lifecycle.d.ts +37 -0
  55. package/dist/src/browser/daemon-lifecycle.js +147 -0
  56. package/dist/src/browser/daemon-transport.d.ts +54 -0
  57. package/dist/src/browser/daemon-transport.js +68 -0
  58. package/dist/src/browser/daemon-version.d.ts +4 -0
  59. package/dist/src/browser/daemon-version.js +12 -0
  60. package/dist/src/browser/dom-helpers.d.ts +41 -0
  61. package/dist/src/browser/dom-helpers.js +239 -0
  62. package/dist/src/browser/dom-helpers.test.d.ts +1 -0
  63. package/dist/src/browser/dom-helpers.test.js +106 -0
  64. package/dist/src/browser/dom-snapshot.d.ts +93 -0
  65. package/dist/src/browser/dom-snapshot.js +894 -0
  66. package/dist/src/browser/dom-snapshot.test.d.ts +11 -0
  67. package/dist/src/browser/dom-snapshot.test.js +313 -0
  68. package/dist/src/browser/errors.d.ts +38 -0
  69. package/dist/src/browser/errors.js +79 -0
  70. package/dist/src/browser/errors.test.d.ts +1 -0
  71. package/dist/src/browser/errors.test.js +60 -0
  72. package/dist/src/browser/extract.d.ts +69 -0
  73. package/dist/src/browser/extract.js +132 -0
  74. package/dist/src/browser/extract.test.d.ts +1 -0
  75. package/dist/src/browser/extract.test.js +129 -0
  76. package/dist/src/browser/find.d.ts +84 -0
  77. package/dist/src/browser/find.js +398 -0
  78. package/dist/src/browser/find.test.d.ts +1 -0
  79. package/dist/src/browser/find.test.js +180 -0
  80. package/dist/src/browser/html-tree.d.ts +75 -0
  81. package/dist/src/browser/html-tree.js +112 -0
  82. package/dist/src/browser/html-tree.test.d.ts +1 -0
  83. package/dist/src/browser/html-tree.test.js +181 -0
  84. package/dist/src/browser/index.d.ts +14 -0
  85. package/dist/src/browser/index.js +12 -0
  86. package/dist/src/browser/network-cache.d.ts +49 -0
  87. package/dist/src/browser/network-cache.js +78 -0
  88. package/dist/src/browser/network-cache.test.d.ts +1 -0
  89. package/dist/src/browser/network-cache.test.js +75 -0
  90. package/dist/src/browser/network-interceptor.d.ts +11 -0
  91. package/dist/src/browser/network-interceptor.js +11 -0
  92. package/dist/src/browser/network-key.d.ts +22 -0
  93. package/dist/src/browser/network-key.js +66 -0
  94. package/dist/src/browser/network-key.test.d.ts +1 -0
  95. package/dist/src/browser/network-key.test.js +49 -0
  96. package/dist/src/browser/page.d.ts +83 -0
  97. package/dist/src/browser/page.js +453 -0
  98. package/dist/src/browser/page.test.d.ts +1 -0
  99. package/dist/src/browser/page.test.js +406 -0
  100. package/dist/src/browser/profile.d.ts +14 -0
  101. package/dist/src/browser/profile.js +86 -0
  102. package/dist/src/browser/protocol.d.ts +63 -0
  103. package/dist/src/browser/protocol.js +1 -0
  104. package/dist/src/browser/runtime/local-cloak/actions.d.ts +3 -0
  105. package/dist/src/browser/runtime/local-cloak/actions.js +240 -0
  106. package/dist/src/browser/runtime/local-cloak/downloads.d.ts +3 -0
  107. package/dist/src/browser/runtime/local-cloak/downloads.js +28 -0
  108. package/dist/src/browser/runtime/local-cloak/network.d.ts +28 -0
  109. package/dist/src/browser/runtime/local-cloak/network.js +120 -0
  110. package/dist/src/browser/runtime/local-cloak/network.test.d.ts +1 -0
  111. package/dist/src/browser/runtime/local-cloak/network.test.js +124 -0
  112. package/dist/src/browser/runtime/local-cloak/profiles.d.ts +6 -0
  113. package/dist/src/browser/runtime/local-cloak/profiles.js +17 -0
  114. package/dist/src/browser/runtime/local-cloak/profiles.test.d.ts +1 -0
  115. package/dist/src/browser/runtime/local-cloak/profiles.test.js +19 -0
  116. package/dist/src/browser/runtime/local-cloak/provider.d.ts +15 -0
  117. package/dist/src/browser/runtime/local-cloak/provider.js +27 -0
  118. package/dist/src/browser/runtime/local-cloak/provider.test.d.ts +1 -0
  119. package/dist/src/browser/runtime/local-cloak/provider.test.js +244 -0
  120. package/dist/src/browser/runtime/local-cloak/session-manager.d.ts +77 -0
  121. package/dist/src/browser/runtime/local-cloak/session-manager.js +280 -0
  122. package/dist/src/browser/runtime/local-cloak/session-manager.test.d.ts +1 -0
  123. package/dist/src/browser/runtime/local-cloak/session-manager.test.js +92 -0
  124. package/dist/src/browser/runtime/provider.d.ts +9 -0
  125. package/dist/src/browser/runtime/provider.js +1 -0
  126. package/dist/src/browser/runtime/provider.test.d.ts +2 -0
  127. package/dist/src/browser/runtime/provider.test.js +49 -0
  128. package/dist/src/browser/shape-filter.d.ts +52 -0
  129. package/dist/src/browser/shape-filter.js +101 -0
  130. package/dist/src/browser/shape-filter.test.d.ts +1 -0
  131. package/dist/src/browser/shape-filter.test.js +101 -0
  132. package/dist/src/browser/shape.d.ts +23 -0
  133. package/dist/src/browser/shape.js +95 -0
  134. package/dist/src/browser/shape.test.d.ts +1 -0
  135. package/dist/src/browser/shape.test.js +82 -0
  136. package/dist/src/browser/stealth.d.ts +11 -0
  137. package/dist/src/browser/stealth.js +359 -0
  138. package/dist/src/browser/stealth.test.d.ts +1 -0
  139. package/dist/src/browser/stealth.test.js +134 -0
  140. package/dist/src/browser/tabs.d.ts +13 -0
  141. package/dist/src/browser/tabs.js +70 -0
  142. package/dist/src/browser/target-errors.d.ts +39 -0
  143. package/dist/src/browser/target-errors.js +45 -0
  144. package/dist/src/browser/target-errors.test.d.ts +1 -0
  145. package/dist/src/browser/target-errors.test.js +94 -0
  146. package/dist/src/browser/target-resolver.d.ts +158 -0
  147. package/dist/src/browser/target-resolver.js +570 -0
  148. package/dist/src/browser/target-resolver.test.d.ts +1 -0
  149. package/dist/src/browser/target-resolver.test.js +118 -0
  150. package/dist/src/browser/utils.d.ts +20 -0
  151. package/dist/src/browser/utils.js +64 -0
  152. package/dist/src/browser/utils.test.d.ts +1 -0
  153. package/dist/src/browser/utils.test.js +29 -0
  154. package/dist/src/browser/verify-fixture.d.ts +65 -0
  155. package/dist/src/browser/verify-fixture.js +318 -0
  156. package/dist/src/browser/verify-fixture.test.d.ts +1 -0
  157. package/dist/src/browser/verify-fixture.test.js +219 -0
  158. package/dist/src/browser/visual-refs.d.ts +11 -0
  159. package/dist/src/browser/visual-refs.js +108 -0
  160. package/dist/src/browser.test.d.ts +1 -0
  161. package/dist/src/browser.test.js +297 -0
  162. package/dist/src/build-manifest.d.ts +103 -0
  163. package/dist/src/build-manifest.js +363 -0
  164. package/dist/src/build-manifest.test.d.ts +1 -0
  165. package/dist/src/build-manifest.test.js +341 -0
  166. package/dist/src/capabilityRouting.d.ts +19 -0
  167. package/dist/src/capabilityRouting.js +56 -0
  168. package/dist/src/capabilityRouting.test.d.ts +1 -0
  169. package/dist/src/capabilityRouting.test.js +63 -0
  170. package/dist/src/cli-argv-preprocess.d.ts +63 -0
  171. package/dist/src/cli-argv-preprocess.js +303 -0
  172. package/dist/src/cli-argv-preprocess.test.d.ts +1 -0
  173. package/dist/src/cli-argv-preprocess.test.js +304 -0
  174. package/dist/src/cli.d.ts +79 -0
  175. package/dist/src/cli.js +3350 -0
  176. package/dist/src/cli.test.d.ts +1 -0
  177. package/dist/src/cli.test.js +3041 -0
  178. package/dist/src/commanderAdapter.d.ts +21 -0
  179. package/dist/src/commanderAdapter.js +208 -0
  180. package/dist/src/commanderAdapter.test.d.ts +1 -0
  181. package/dist/src/commanderAdapter.test.js +352 -0
  182. package/dist/src/commands/auth.d.ts +40 -0
  183. package/dist/src/commands/auth.js +434 -0
  184. package/dist/src/commands/auth.test.d.ts +1 -0
  185. package/dist/src/commands/auth.test.js +252 -0
  186. package/dist/src/commands/daemon.d.ts +9 -0
  187. package/dist/src/commands/daemon.js +91 -0
  188. package/dist/src/commands/daemon.test.d.ts +1 -0
  189. package/dist/src/commands/daemon.test.js +293 -0
  190. package/dist/src/completion-fast.d.ts +22 -0
  191. package/dist/src/completion-fast.js +88 -0
  192. package/dist/src/completion-shared.d.ts +13 -0
  193. package/dist/src/completion-shared.js +61 -0
  194. package/dist/src/completion.d.ts +21 -0
  195. package/dist/src/completion.js +68 -0
  196. package/dist/src/completion.test.d.ts +1 -0
  197. package/dist/src/completion.test.js +24 -0
  198. package/dist/src/constants.d.ts +18 -0
  199. package/dist/src/constants.js +41 -0
  200. package/dist/src/convention-audit.d.ts +50 -0
  201. package/dist/src/convention-audit.js +553 -0
  202. package/dist/src/convention-audit.test.d.ts +1 -0
  203. package/dist/src/convention-audit.test.js +255 -0
  204. package/dist/src/daemon/server.d.ts +13 -0
  205. package/dist/src/daemon/server.js +185 -0
  206. package/dist/src/daemon/server.test.d.ts +1 -0
  207. package/dist/src/daemon/server.test.js +132 -0
  208. package/dist/src/daemon-utils.d.ts +18 -0
  209. package/dist/src/daemon-utils.js +37 -0
  210. package/dist/src/daemon.d.ts +1 -0
  211. package/dist/src/daemon.js +27 -0
  212. package/dist/src/daemon.test.d.ts +1 -0
  213. package/dist/src/daemon.test.js +60 -0
  214. package/dist/src/discovery.d.ts +46 -0
  215. package/dist/src/discovery.js +341 -0
  216. package/dist/src/doctor.d.ts +39 -0
  217. package/dist/src/doctor.js +168 -0
  218. package/dist/src/doctor.test.d.ts +1 -0
  219. package/dist/src/doctor.test.js +302 -0
  220. package/dist/src/download/article-download.d.ts +72 -0
  221. package/dist/src/download/article-download.js +305 -0
  222. package/dist/src/download/article-download.test.d.ts +1 -0
  223. package/dist/src/download/article-download.test.js +235 -0
  224. package/dist/src/download/index.d.ts +71 -0
  225. package/dist/src/download/index.js +363 -0
  226. package/dist/src/download/index.test.d.ts +1 -0
  227. package/dist/src/download/index.test.js +174 -0
  228. package/dist/src/download/media-download.d.ts +49 -0
  229. package/dist/src/download/media-download.js +127 -0
  230. package/dist/src/download/media-download.test.d.ts +1 -0
  231. package/dist/src/download/media-download.test.js +112 -0
  232. package/dist/src/download/progress.d.ts +36 -0
  233. package/dist/src/download/progress.js +120 -0
  234. package/dist/src/download/progress.test.d.ts +1 -0
  235. package/dist/src/download/progress.test.js +36 -0
  236. package/dist/src/electron-apps.d.ts +31 -0
  237. package/dist/src/electron-apps.js +91 -0
  238. package/dist/src/electron-apps.test.d.ts +1 -0
  239. package/dist/src/electron-apps.test.js +76 -0
  240. package/dist/src/engine.test.d.ts +1 -0
  241. package/dist/src/engine.test.js +312 -0
  242. package/dist/src/errors.d.ts +114 -0
  243. package/dist/src/errors.js +174 -0
  244. package/dist/src/errors.test.d.ts +1 -0
  245. package/dist/src/errors.test.js +109 -0
  246. package/dist/src/execution.d.ts +24 -0
  247. package/dist/src/execution.js +509 -0
  248. package/dist/src/execution.test.d.ts +1 -0
  249. package/dist/src/execution.test.js +645 -0
  250. package/dist/src/external.d.ts +49 -0
  251. package/dist/src/external.js +211 -0
  252. package/dist/src/external.test.d.ts +1 -0
  253. package/dist/src/external.test.js +110 -0
  254. package/dist/src/help.d.ts +88 -0
  255. package/dist/src/help.js +556 -0
  256. package/dist/src/help.test.d.ts +1 -0
  257. package/dist/src/help.test.js +58 -0
  258. package/dist/src/hooks.d.ts +46 -0
  259. package/dist/src/hooks.js +58 -0
  260. package/dist/src/hooks.test.d.ts +4 -0
  261. package/dist/src/hooks.test.js +92 -0
  262. package/dist/src/interceptor.d.ts +44 -0
  263. package/dist/src/interceptor.js +183 -0
  264. package/dist/src/interceptor.test.d.ts +4 -0
  265. package/dist/src/interceptor.test.js +81 -0
  266. package/dist/src/launcher.d.ts +41 -0
  267. package/dist/src/launcher.js +226 -0
  268. package/dist/src/launcher.test.d.ts +1 -0
  269. package/dist/src/launcher.test.js +153 -0
  270. package/dist/src/logger.d.ts +26 -0
  271. package/dist/src/logger.js +49 -0
  272. package/dist/src/main.d.ts +5 -0
  273. package/dist/src/main.js +177 -0
  274. package/dist/src/manifest-types.d.ts +43 -0
  275. package/dist/src/manifest-types.js +9 -0
  276. package/dist/src/node-network.d.ts +10 -0
  277. package/dist/src/node-network.js +174 -0
  278. package/dist/src/node-network.test.d.ts +1 -0
  279. package/dist/src/node-network.test.js +55 -0
  280. package/dist/src/observation/artifact.d.ts +16 -0
  281. package/dist/src/observation/artifact.js +260 -0
  282. package/dist/src/observation/artifact.test.d.ts +1 -0
  283. package/dist/src/observation/artifact.test.js +121 -0
  284. package/dist/src/observation/events.d.ts +89 -0
  285. package/dist/src/observation/events.js +1 -0
  286. package/dist/src/observation/index.d.ts +7 -0
  287. package/dist/src/observation/index.js +7 -0
  288. package/dist/src/observation/manager.d.ts +9 -0
  289. package/dist/src/observation/manager.js +27 -0
  290. package/dist/src/observation/manager.test.d.ts +1 -0
  291. package/dist/src/observation/manager.test.js +13 -0
  292. package/dist/src/observation/redaction.d.ts +11 -0
  293. package/dist/src/observation/redaction.js +81 -0
  294. package/dist/src/observation/redaction.test.d.ts +1 -0
  295. package/dist/src/observation/redaction.test.js +32 -0
  296. package/dist/src/observation/retention.d.ts +32 -0
  297. package/dist/src/observation/retention.js +160 -0
  298. package/dist/src/observation/retention.test.d.ts +1 -0
  299. package/dist/src/observation/retention.test.js +118 -0
  300. package/dist/src/observation/ring-buffer.d.ts +22 -0
  301. package/dist/src/observation/ring-buffer.js +45 -0
  302. package/dist/src/observation/ring-buffer.test.d.ts +1 -0
  303. package/dist/src/observation/ring-buffer.test.js +22 -0
  304. package/dist/src/observation/session.d.ts +25 -0
  305. package/dist/src/observation/session.js +50 -0
  306. package/dist/src/output.d.ts +14 -0
  307. package/dist/src/output.js +152 -0
  308. package/dist/src/output.test.d.ts +1 -0
  309. package/dist/src/output.test.js +53 -0
  310. package/dist/src/package-exports.test.d.ts +1 -0
  311. package/dist/src/package-exports.test.js +112 -0
  312. package/dist/src/package-paths.d.ts +8 -0
  313. package/dist/src/package-paths.js +41 -0
  314. package/dist/src/pipeline/executor.d.ts +11 -0
  315. package/dist/src/pipeline/executor.js +93 -0
  316. package/dist/src/pipeline/executor.test.d.ts +4 -0
  317. package/dist/src/pipeline/executor.test.js +182 -0
  318. package/dist/src/pipeline/index.d.ts +5 -0
  319. package/dist/src/pipeline/index.js +5 -0
  320. package/dist/src/pipeline/registry.d.ts +28 -0
  321. package/dist/src/pipeline/registry.js +55 -0
  322. package/dist/src/pipeline/steps/browser.d.ts +13 -0
  323. package/dist/src/pipeline/steps/browser.js +86 -0
  324. package/dist/src/pipeline/steps/download.d.ts +18 -0
  325. package/dist/src/pipeline/steps/download.js +252 -0
  326. package/dist/src/pipeline/steps/download.test.d.ts +1 -0
  327. package/dist/src/pipeline/steps/download.test.js +102 -0
  328. package/dist/src/pipeline/steps/fetch.d.ts +5 -0
  329. package/dist/src/pipeline/steps/fetch.js +122 -0
  330. package/dist/src/pipeline/steps/fetch.test.d.ts +1 -0
  331. package/dist/src/pipeline/steps/fetch.test.js +117 -0
  332. package/dist/src/pipeline/steps/intercept.d.ts +5 -0
  333. package/dist/src/pipeline/steps/intercept.js +50 -0
  334. package/dist/src/pipeline/steps/tap.d.ts +12 -0
  335. package/dist/src/pipeline/steps/tap.js +93 -0
  336. package/dist/src/pipeline/steps/transform.d.ts +9 -0
  337. package/dist/src/pipeline/steps/transform.js +70 -0
  338. package/dist/src/pipeline/template.d.ts +17 -0
  339. package/dist/src/pipeline/template.js +344 -0
  340. package/dist/src/pipeline/template.test.d.ts +4 -0
  341. package/dist/src/pipeline/template.test.js +197 -0
  342. package/dist/src/pipeline/transform.test.d.ts +4 -0
  343. package/dist/src/pipeline/transform.test.js +133 -0
  344. package/dist/src/plugin-manifest.d.ts +70 -0
  345. package/dist/src/plugin-manifest.js +160 -0
  346. package/dist/src/plugin-manifest.test.d.ts +4 -0
  347. package/dist/src/plugin-manifest.test.js +179 -0
  348. package/dist/src/plugin-scaffold.d.ts +28 -0
  349. package/dist/src/plugin-scaffold.js +143 -0
  350. package/dist/src/plugin-scaffold.test.d.ts +4 -0
  351. package/dist/src/plugin-scaffold.test.js +83 -0
  352. package/dist/src/plugin.d.ts +146 -0
  353. package/dist/src/plugin.js +1303 -0
  354. package/dist/src/plugin.test.d.ts +4 -0
  355. package/dist/src/plugin.test.js +1363 -0
  356. package/dist/src/registry-api.d.ts +13 -0
  357. package/dist/src/registry-api.js +10 -0
  358. package/dist/src/registry.d.ts +123 -0
  359. package/dist/src/registry.js +125 -0
  360. package/dist/src/registry.test.d.ts +4 -0
  361. package/dist/src/registry.test.js +209 -0
  362. package/dist/src/runtime-copy.test.d.ts +1 -0
  363. package/dist/src/runtime-copy.test.js +29 -0
  364. package/dist/src/runtime-detect.d.ts +31 -0
  365. package/dist/src/runtime-detect.js +47 -0
  366. package/dist/src/runtime-detect.test.d.ts +1 -0
  367. package/dist/src/runtime-detect.test.js +39 -0
  368. package/dist/src/runtime-identity.test.d.ts +1 -0
  369. package/dist/src/runtime-identity.test.js +18 -0
  370. package/dist/src/runtime.d.ts +47 -0
  371. package/dist/src/runtime.js +54 -0
  372. package/dist/src/scripts/framework.d.ts +7 -0
  373. package/dist/src/scripts/framework.js +25 -0
  374. package/dist/src/scripts/interact.d.ts +4 -0
  375. package/dist/src/scripts/interact.js +20 -0
  376. package/dist/src/scripts/store.d.ts +13 -0
  377. package/dist/src/scripts/store.js +48 -0
  378. package/dist/src/serialization.d.ts +42 -0
  379. package/dist/src/serialization.js +103 -0
  380. package/dist/src/serialization.test.d.ts +1 -0
  381. package/dist/src/serialization.test.js +78 -0
  382. package/dist/src/skills.d.ts +14 -0
  383. package/dist/src/skills.js +127 -0
  384. package/dist/src/skills.test.d.ts +1 -0
  385. package/dist/src/skills.test.js +71 -0
  386. package/dist/src/snapshotFormatter.d.ts +11 -0
  387. package/dist/src/snapshotFormatter.js +338 -0
  388. package/dist/src/snapshotFormatter.test.d.ts +7 -0
  389. package/dist/src/snapshotFormatter.test.js +521 -0
  390. package/dist/src/tui.d.ts +28 -0
  391. package/dist/src/tui.js +179 -0
  392. package/dist/src/tui.test.d.ts +1 -0
  393. package/dist/src/tui.test.js +19 -0
  394. package/dist/src/types.d.ts +236 -0
  395. package/dist/src/types.js +7 -0
  396. package/dist/src/update-check.d.ts +66 -0
  397. package/dist/src/update-check.js +206 -0
  398. package/dist/src/update-check.test.d.ts +1 -0
  399. package/dist/src/update-check.test.js +117 -0
  400. package/dist/src/utils.d.ts +57 -0
  401. package/dist/src/utils.js +152 -0
  402. package/dist/src/utils.test.d.ts +1 -0
  403. package/dist/src/utils.test.js +155 -0
  404. package/dist/src/validate.d.ts +21 -0
  405. package/dist/src/validate.js +130 -0
  406. package/dist/src/validate.test.d.ts +9 -0
  407. package/dist/src/validate.test.js +90 -0
  408. package/dist/src/verify.d.ts +26 -0
  409. package/dist/src/verify.js +67 -0
  410. package/dist/src/version.d.ts +4 -0
  411. package/dist/src/version.js +22 -0
  412. package/dist/src/weixin-download.test.d.ts +1 -0
  413. package/dist/src/weixin-download.test.js +45 -0
  414. package/package.json +4 -3
  415. package/scripts/check-package-bin.mjs +95 -0
@@ -0,0 +1,112 @@
1
+ /**
2
+ * Compound-component expansion for high-agent-failure form controls.
3
+ *
4
+ * Agents burn turns on three recurring input categories because the raw
5
+ * attribute dump from `browser state` under-specifies them:
6
+ *
7
+ * - date / time / datetime-local / month / week — agents type
8
+ * free-form strings and the browser silently ignores mismatched formats.
9
+ * - select — the snapshot caps visible options at ~6; agents don't know
10
+ * the full option set, can't match by label, and waste turns clicking
11
+ * to open the dropdown just to read options.
12
+ * - file — the snapshot shows current filenames but not `accept` or
13
+ * `multiple`; agents re-upload or pick unsupported MIME types.
14
+ *
15
+ * `compoundInfoOf(el)` returns a structured JSON summary agents can rely
16
+ * on. Included in `browser find --css` envelope so the agent gets the
17
+ * rich view without extra round-trips.
18
+ *
19
+ * Emitted as a JS source string (`COMPOUND_INFO_JS`) so it can be inlined
20
+ * into the generated evaluate scripts under find / snapshot / eval.
21
+ */
22
+ /** Max options included in a SelectCompound.options[]. Above this, `options_total` still reflects the true count. */
23
+ export const COMPOUND_SELECT_OPTIONS_CAP = 50;
24
+ /** Max characters per option label / file name. */
25
+ export const COMPOUND_LABEL_CAP = 80;
26
+ /**
27
+ * JavaScript source declaring `compoundInfoOf(el)`. Inlined into the JS
28
+ * emitted by `buildFindJs` (and any other evaluate script that needs the
29
+ * rich compound view). Returns a `CompoundInfo` object or `null`.
30
+ */
31
+ export const COMPOUND_INFO_JS = `
32
+ function compoundInfoOf(el) {
33
+ if (!el || !el.tagName) return null;
34
+ const tag = el.tagName;
35
+ const LABEL_CAP = ${COMPOUND_LABEL_CAP};
36
+ const OPTS_CAP = ${COMPOUND_SELECT_OPTIONS_CAP};
37
+ if (tag === 'INPUT') {
38
+ const type = (el.getAttribute('type') || 'text').toLowerCase();
39
+ const FORMATS = {
40
+ 'date': 'YYYY-MM-DD',
41
+ 'time': 'HH:MM',
42
+ 'datetime-local': 'YYYY-MM-DDTHH:MM',
43
+ 'month': 'YYYY-MM',
44
+ 'week': 'YYYY-W##',
45
+ };
46
+ if (FORMATS[type]) {
47
+ const info = {
48
+ control: type,
49
+ format: FORMATS[type],
50
+ current: (el.value == null ? '' : String(el.value)),
51
+ };
52
+ const min = el.getAttribute('min');
53
+ if (min) info.min = min;
54
+ const max = el.getAttribute('max');
55
+ if (max) info.max = max;
56
+ return info;
57
+ }
58
+ if (type === 'file') {
59
+ const info = {
60
+ control: 'file',
61
+ multiple: !!el.multiple,
62
+ current: [],
63
+ };
64
+ const accept = el.getAttribute('accept');
65
+ if (accept) info.accept = accept;
66
+ try {
67
+ if (el.files && el.files.length) {
68
+ for (let i = 0; i < el.files.length; i++) {
69
+ const name = (el.files[i].name || '').slice(0, LABEL_CAP);
70
+ info.current.push(name);
71
+ }
72
+ }
73
+ } catch (_) {}
74
+ return info;
75
+ }
76
+ return null;
77
+ }
78
+ if (tag === 'SELECT') {
79
+ const multiple = !!el.multiple;
80
+ const options = [];
81
+ const selectedLabels = [];
82
+ let total = 0;
83
+ try {
84
+ const opts = el.options || [];
85
+ total = opts.length;
86
+ // Walk ALL options so \`current\` reflects selections that sit beyond the
87
+ // serialization cap. Only the first OPTS_CAP entries get pushed into
88
+ // options[]; anything past the cap still contributes to selectedLabels
89
+ // so agents see the true current state of big dropdowns.
90
+ for (let i = 0; i < opts.length; i++) {
91
+ const o = opts[i];
92
+ const labelRaw = (o.label != null && o.label !== '') ? o.label : (o.text || '');
93
+ const label = String(labelRaw).trim().slice(0, LABEL_CAP);
94
+ if (i < OPTS_CAP) {
95
+ const entry = { label: label, value: o.value, selected: !!o.selected };
96
+ if (o.disabled) entry.disabled = true;
97
+ options.push(entry);
98
+ }
99
+ if (o.selected) selectedLabels.push(label);
100
+ }
101
+ } catch (_) {}
102
+ return {
103
+ control: 'select',
104
+ multiple: multiple,
105
+ current: multiple ? selectedLabels : (selectedLabels[0] || ''),
106
+ options: options,
107
+ options_total: total,
108
+ };
109
+ }
110
+ return null;
111
+ }
112
+ `;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,175 @@
1
+ import { describe, expect, it } from 'vitest';
2
+ import { COMPOUND_INFO_JS, COMPOUND_LABEL_CAP, COMPOUND_SELECT_OPTIONS_CAP, } from './compound.js';
3
+ /**
4
+ * Tests run the JS source in a sandbox via `new Function`, feeding it
5
+ * minimal mock elements shaped like the DOM elements the real code sees
6
+ * at runtime. Avoids a full jsdom setup while still exercising the logic
7
+ * end-to-end instead of only snapshotting string markers.
8
+ */
9
+ function runCompound(mockEl) {
10
+ const fn = new Function('el', `${COMPOUND_INFO_JS}\nreturn compoundInfoOf(el);`);
11
+ return fn(mockEl);
12
+ }
13
+ function mockInput(attrs, extras = {}) {
14
+ return {
15
+ tagName: 'INPUT',
16
+ value: extras.value,
17
+ multiple: extras.multiple,
18
+ files: extras.files,
19
+ getAttribute(name) {
20
+ return attrs[name] ?? null;
21
+ },
22
+ };
23
+ }
24
+ function mockSelect(options, multiple = false) {
25
+ const opts = options.map(o => ({ ...o, selected: !!o.selected }));
26
+ return {
27
+ tagName: 'SELECT',
28
+ multiple,
29
+ options: opts,
30
+ getAttribute: () => null,
31
+ };
32
+ }
33
+ describe('compoundInfoOf — date-like inputs', () => {
34
+ it('returns { control, format, current } for <input type=date>', () => {
35
+ const info = runCompound(mockInput({ type: 'date' }, { value: '2026-04-21' }));
36
+ expect(info).toEqual({ control: 'date', format: 'YYYY-MM-DD', current: '2026-04-21' });
37
+ });
38
+ it('surfaces min + max when present', () => {
39
+ const info = runCompound(mockInput({ type: 'date', min: '2026-01-01', max: '2026-12-31' }, { value: '2026-04-21' }));
40
+ expect(info).toMatchObject({ min: '2026-01-01', max: '2026-12-31' });
41
+ });
42
+ it('handles time / datetime-local / month / week with correct format strings', () => {
43
+ const formats = {
44
+ time: 'HH:MM',
45
+ 'datetime-local': 'YYYY-MM-DDTHH:MM',
46
+ month: 'YYYY-MM',
47
+ week: 'YYYY-W##',
48
+ };
49
+ for (const [type, fmt] of Object.entries(formats)) {
50
+ const info = runCompound(mockInput({ type }, { value: '' }));
51
+ expect(info.format).toBe(fmt);
52
+ }
53
+ });
54
+ it('coerces null value into empty string instead of crashing', () => {
55
+ const info = runCompound(mockInput({ type: 'date' }));
56
+ expect(info).toMatchObject({ control: 'date', current: '' });
57
+ });
58
+ });
59
+ describe('compoundInfoOf — file inputs', () => {
60
+ it('returns { control: file, multiple, current[] }', () => {
61
+ const info = runCompound(mockInput({ type: 'file' }, {
62
+ multiple: true,
63
+ files: [{ name: 'a.png' }, { name: 'b.jpg' }],
64
+ }));
65
+ expect(info).toEqual({ control: 'file', multiple: true, current: ['a.png', 'b.jpg'] });
66
+ });
67
+ it('includes accept when present', () => {
68
+ const info = runCompound(mockInput({ type: 'file', accept: 'image/*' }, { multiple: false }));
69
+ expect(info).toMatchObject({ control: 'file', accept: 'image/*' });
70
+ });
71
+ it('returns empty current[] when nothing uploaded', () => {
72
+ const info = runCompound(mockInput({ type: 'file' }, { multiple: false }));
73
+ expect(info).toEqual({ control: 'file', multiple: false, current: [] });
74
+ });
75
+ it('caps file name at COMPOUND_LABEL_CAP', () => {
76
+ const longName = 'x'.repeat(COMPOUND_LABEL_CAP + 50);
77
+ const info = runCompound(mockInput({ type: 'file' }, { multiple: false, files: [{ name: longName }] }));
78
+ expect(info.current[0].length).toBe(COMPOUND_LABEL_CAP);
79
+ });
80
+ });
81
+ describe('compoundInfoOf — select', () => {
82
+ it('returns full options list with labels, values, selected flag', () => {
83
+ const info = runCompound(mockSelect([
84
+ { value: 'us', label: 'United States', selected: true },
85
+ { value: 'ca', label: 'Canada' },
86
+ { value: 'fr', label: 'France' },
87
+ ]));
88
+ expect(info.options).toHaveLength(3);
89
+ expect(info.options[0]).toEqual({ label: 'United States', value: 'us', selected: true });
90
+ expect(info.options[2]).toEqual({ label: 'France', value: 'fr', selected: false });
91
+ });
92
+ it('sets current to the selected label (single-select)', () => {
93
+ const info = runCompound(mockSelect([
94
+ { value: 'a', label: 'Alpha' },
95
+ { value: 'b', label: 'Bravo', selected: true },
96
+ ]));
97
+ expect(info).toMatchObject({ control: 'select', multiple: false, current: 'Bravo' });
98
+ });
99
+ it('sets current to an array of labels when multiple=true', () => {
100
+ const info = runCompound(mockSelect([
101
+ { value: 'a', label: 'Alpha', selected: true },
102
+ { value: 'b', label: 'Bravo' },
103
+ { value: 'c', label: 'Charlie', selected: true },
104
+ ], true));
105
+ expect(info).toMatchObject({ control: 'select', multiple: true, current: ['Alpha', 'Charlie'] });
106
+ });
107
+ it('falls back from option.label to option.text', () => {
108
+ const info = runCompound(mockSelect([
109
+ { value: 'a', text: 'FromText' },
110
+ { value: 'b', label: '', text: 'EmptyLabelFallback' },
111
+ ]));
112
+ expect(info.options[0].label).toBe('FromText');
113
+ expect(info.options[1].label).toBe('EmptyLabelFallback');
114
+ });
115
+ it('marks disabled options', () => {
116
+ const info = runCompound(mockSelect([
117
+ { value: 'a', label: 'A' },
118
+ { value: 'b', label: 'B', disabled: true },
119
+ ]));
120
+ expect(info.options[0].disabled).toBeUndefined();
121
+ expect(info.options[1].disabled).toBe(true);
122
+ });
123
+ it('caps options[] at COMPOUND_SELECT_OPTIONS_CAP but keeps true options_total', () => {
124
+ const big = Array.from({ length: COMPOUND_SELECT_OPTIONS_CAP + 25 }, (_, i) => ({
125
+ value: 'v' + i,
126
+ label: 'L' + i,
127
+ }));
128
+ const info = runCompound(mockSelect(big));
129
+ expect(info.options.length).toBe(COMPOUND_SELECT_OPTIONS_CAP);
130
+ expect(info.options_total).toBe(COMPOUND_SELECT_OPTIONS_CAP + 25);
131
+ });
132
+ it('returns "" for current on single-select with no selected option', () => {
133
+ const info = runCompound(mockSelect([
134
+ { value: 'a', label: 'A' },
135
+ { value: 'b', label: 'B' },
136
+ ]));
137
+ expect(info).toMatchObject({ current: '' });
138
+ });
139
+ // Regression: the previous loop stopped walking options once it hit
140
+ // COMPOUND_SELECT_OPTIONS_CAP, so a long country dropdown with the
141
+ // selected country sitting at index 80 would be reported with current="".
142
+ // Agents then thought nothing was selected and picked another country.
143
+ it('populates current even when the selected option sits past the serialization cap', () => {
144
+ const big = Array.from({ length: COMPOUND_SELECT_OPTIONS_CAP + 25 }, (_, i) => ({
145
+ value: 'v' + i,
146
+ label: 'L' + i,
147
+ selected: i === COMPOUND_SELECT_OPTIONS_CAP + 10,
148
+ }));
149
+ const info = runCompound(mockSelect(big));
150
+ expect(info.current).toBe('L' + (COMPOUND_SELECT_OPTIONS_CAP + 10));
151
+ expect(info.options.length).toBe(COMPOUND_SELECT_OPTIONS_CAP);
152
+ expect(info.options_total).toBe(COMPOUND_SELECT_OPTIONS_CAP + 25);
153
+ });
154
+ it('multi-select: current[] includes labels for selected options beyond the cap', () => {
155
+ const big = Array.from({ length: COMPOUND_SELECT_OPTIONS_CAP + 10 }, (_, i) => ({
156
+ value: 'v' + i,
157
+ label: 'L' + i,
158
+ selected: i === 3 || i === COMPOUND_SELECT_OPTIONS_CAP + 5,
159
+ }));
160
+ const info = runCompound(mockSelect(big, true));
161
+ expect(info.current).toEqual(['L3', 'L' + (COMPOUND_SELECT_OPTIONS_CAP + 5)]);
162
+ });
163
+ });
164
+ describe('compoundInfoOf — unsupported shapes', () => {
165
+ it('returns null for plain text input', () => {
166
+ expect(runCompound(mockInput({ type: 'text' }, { value: 'hi' }))).toBeNull();
167
+ });
168
+ it('returns null for non-form tags', () => {
169
+ expect(runCompound({ tagName: 'DIV', getAttribute: () => null })).toBeNull();
170
+ });
171
+ it('returns null for null / missing element', () => {
172
+ expect(runCompound(null)).toBeNull();
173
+ expect(runCompound({})).toBeNull();
174
+ });
175
+ });
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_BROWSER_CONNECT_TIMEOUT: number;
2
+ export declare const DEFAULT_BROWSER_COMMAND_TIMEOUT: number;
@@ -0,0 +1,14 @@
1
+ import { log } from '../logger.js';
2
+ function parseEnvTimeout(envVar, fallback) {
3
+ const raw = process.env[envVar];
4
+ if (raw === undefined)
5
+ return fallback;
6
+ const parsed = parseInt(raw, 10);
7
+ if (Number.isNaN(parsed) || parsed <= 0) {
8
+ log.warn(`[runtime] Invalid ${envVar}="${raw}", using default ${fallback}s`);
9
+ return fallback;
10
+ }
11
+ return parsed;
12
+ }
13
+ export const DEFAULT_BROWSER_CONNECT_TIMEOUT = parseEnvTimeout('WEBCMD_BROWSER_CONNECT_TIMEOUT', 45);
14
+ export const DEFAULT_BROWSER_COMMAND_TIMEOUT = parseEnvTimeout('WEBCMD_BROWSER_COMMAND_TIMEOUT', 60);
@@ -0,0 +1,32 @@
1
+ /**
2
+ * HTTP client for communicating with the webcmd daemon.
3
+ *
4
+ * Provides a typed send() function that posts a Command and returns a Result.
5
+ */
6
+ import { fetchDaemonStatus, getDaemonHealth, requestDaemonShutdown, type BrowserProfileStatus, type DaemonHealth, type DaemonStatus } from './daemon-transport.js';
7
+ import type { BrowserRuntimeCommand, BrowserRuntimeResult } from './protocol.js';
8
+ export type DaemonCommand = BrowserRuntimeCommand;
9
+ export type DaemonResult = BrowserRuntimeResult;
10
+ export declare class BrowserCommandError extends Error {
11
+ readonly code?: string | undefined;
12
+ readonly hint?: string | undefined;
13
+ constructor(message: string, code?: string | undefined, hint?: string | undefined);
14
+ }
15
+ export { fetchDaemonStatus, getDaemonHealth, requestDaemonShutdown, type BrowserProfileStatus, type DaemonHealth, type DaemonStatus, };
16
+ /**
17
+ * Send a command to the daemon and return the result data.
18
+ */
19
+ export declare function sendCommand(action: DaemonCommand['action'], params?: Omit<DaemonCommand, 'id' | 'action'>): Promise<unknown>;
20
+ /**
21
+ * Like sendCommand, but returns both data and page identity (targetId).
22
+ * Use this for page-scoped commands where the caller needs the page identity.
23
+ */
24
+ export declare function sendCommandFull(action: DaemonCommand['action'], params?: Omit<DaemonCommand, 'id' | 'action'>): Promise<{
25
+ data: unknown;
26
+ page?: string;
27
+ }>;
28
+ export declare function bindTab(session: string, opts?: {
29
+ contextId?: string;
30
+ page?: string;
31
+ index?: number;
32
+ }): Promise<unknown>;
@@ -0,0 +1,135 @@
1
+ /**
2
+ * HTTP client for communicating with the webcmd daemon.
3
+ *
4
+ * Provides a typed send() function that posts a Command and returns a Result.
5
+ */
6
+ import { sleep } from '../utils.js';
7
+ import { BrowserConnectError } from '../errors.js';
8
+ import { classifyBrowserError } from './errors.js';
9
+ import { resolveProfileContextId } from './profile.js';
10
+ import { DEFAULT_BROWSER_CONNECT_TIMEOUT } from './config.js';
11
+ import { ensureBrowserBridgeReady } from './daemon-lifecycle.js';
12
+ import { isPreDispatchError } from './bridge-readiness.js';
13
+ import { fetchDaemonStatus, getDaemonHealth, requestDaemon, requestDaemonShutdown, } from './daemon-transport.js';
14
+ let _idCounter = 0;
15
+ function generateId() {
16
+ return `cmd_${process.pid}_${Date.now()}_${++_idCounter}`;
17
+ }
18
+ export class BrowserCommandError extends Error {
19
+ code;
20
+ hint;
21
+ constructor(message, code, hint) {
22
+ super(message);
23
+ this.code = code;
24
+ this.hint = hint;
25
+ this.name = 'BrowserCommandError';
26
+ }
27
+ }
28
+ export { fetchDaemonStatus, getDaemonHealth, requestDaemonShutdown, };
29
+ /**
30
+ * Internal: send a command to the daemon and return the raw `DaemonResult`.
31
+ *
32
+ * Retry policy is explicit:
33
+ * - pre-dispatch bridge/profile errors: run the full daemon/runtime ensure
34
+ * path, then resend with a fresh transport id;
35
+ * - local TypeError before dispatch: same full ensure path, because the daemon
36
+ * may be stopped/stale and needs spawn/replacement, not just polling;
37
+ * - `command_result_unknown` and AbortError: never retry automatically.
38
+ */
39
+ async function sendCommandRaw(action, params) {
40
+ const maxAttempts = 4;
41
+ let dispatchRecoveryUsed = false;
42
+ let duplicateIdRetryUsed = false;
43
+ let transientRetryUsed = false;
44
+ for (let attempt = 1; attempt <= maxAttempts; attempt++) {
45
+ const id = generateId();
46
+ const rawWindowMode = process.env.WEBCMD_WINDOW;
47
+ const envWindowMode = rawWindowMode === 'foreground' || rawWindowMode === 'background'
48
+ ? rawWindowMode
49
+ : undefined;
50
+ const contextId = params.contextId ?? resolveProfileContextId();
51
+ const windowMode = params.windowMode ?? envWindowMode;
52
+ const command = { id, action, ...params, ...(contextId && { contextId }), ...(windowMode && { windowMode }) };
53
+ try {
54
+ const res = await requestDaemon('/command', {
55
+ method: 'POST',
56
+ headers: { 'Content-Type': 'application/json' },
57
+ body: JSON.stringify(command),
58
+ timeout: 30000,
59
+ });
60
+ const result = (await res.json());
61
+ if (result.ok)
62
+ return result;
63
+ if (result.errorCode === 'command_result_unknown') {
64
+ throw new BrowserCommandError(result.error ?? 'Browser command result is unknown', result.errorCode, result.errorHint);
65
+ }
66
+ if (!dispatchRecoveryUsed && isPreDispatchError(result.errorCode)) {
67
+ dispatchRecoveryUsed = true;
68
+ await ensureBrowserBridgeReady({
69
+ timeoutSeconds: DEFAULT_BROWSER_CONNECT_TIMEOUT,
70
+ contextId,
71
+ verbose: false,
72
+ });
73
+ continue;
74
+ }
75
+ const isDuplicateCommandId = res.status === 409
76
+ && !result.errorCode
77
+ && (result.error ?? '').includes('Duplicate command id');
78
+ if (isDuplicateCommandId && !duplicateIdRetryUsed) {
79
+ duplicateIdRetryUsed = true;
80
+ continue;
81
+ }
82
+ const advice = classifyBrowserError(new Error(result.error ?? ''));
83
+ if (advice.retryable && !transientRetryUsed) {
84
+ transientRetryUsed = true;
85
+ await sleep(advice.delayMs);
86
+ continue;
87
+ }
88
+ throw new BrowserCommandError(result.error ?? 'Daemon command failed', result.errorCode, result.errorHint);
89
+ }
90
+ catch (err) {
91
+ if (err instanceof BrowserCommandError || err instanceof BrowserConnectError)
92
+ throw err;
93
+ if (err instanceof Error && err.name === 'AbortError') {
94
+ throw new BrowserCommandError('Browser command timed out client-side; the page may still have applied it.', 'command_result_unknown', 'Inspect the page state before retrying. Idempotent reads are safe to retry; non-idempotent writes may have already happened.');
95
+ }
96
+ if (!dispatchRecoveryUsed && err instanceof TypeError) {
97
+ dispatchRecoveryUsed = true;
98
+ await ensureBrowserBridgeReady({
99
+ timeoutSeconds: DEFAULT_BROWSER_CONNECT_TIMEOUT,
100
+ contextId,
101
+ verbose: false,
102
+ });
103
+ continue;
104
+ }
105
+ if (err instanceof Error) {
106
+ const advice = classifyBrowserError(err);
107
+ if (advice.retryable && !transientRetryUsed) {
108
+ transientRetryUsed = true;
109
+ await sleep(advice.delayMs);
110
+ continue;
111
+ }
112
+ }
113
+ throw err;
114
+ }
115
+ }
116
+ throw new BrowserCommandError('sendCommand: max attempts exhausted', 'max_attempts_exhausted');
117
+ }
118
+ /**
119
+ * Send a command to the daemon and return the result data.
120
+ */
121
+ export async function sendCommand(action, params = {}) {
122
+ const result = await sendCommandRaw(action, params);
123
+ return result.data;
124
+ }
125
+ /**
126
+ * Like sendCommand, but returns both data and page identity (targetId).
127
+ * Use this for page-scoped commands where the caller needs the page identity.
128
+ */
129
+ export async function sendCommandFull(action, params = {}) {
130
+ const result = await sendCommandRaw(action, params);
131
+ return { data: result.data, page: result.page };
132
+ }
133
+ export async function bindTab(session, opts = {}) {
134
+ return sendCommand('bind', { session, surface: 'browser', ...opts });
135
+ }
@@ -0,0 +1 @@
1
+ export {};