effect-browser 0.3.0-beta.23 → 0.3.0-beta.25

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 (348) hide show
  1. package/README.md +437 -142
  2. package/dist/Action.d.mts +1 -1
  3. package/dist/Action.mjs +61 -9
  4. package/dist/Action.mjs.map +1 -1
  5. package/dist/Browser.d.mts +2 -2
  6. package/dist/Browser.mjs +2 -2
  7. package/dist/BrowserError.d.mts +2 -2
  8. package/dist/BrowserError.mjs +194 -41
  9. package/dist/BrowserError.mjs.map +1 -1
  10. package/dist/BrowserEvent.d.mts +2 -2
  11. package/dist/BrowserEvent.mjs +185 -35
  12. package/dist/BrowserEvent.mjs.map +1 -1
  13. package/dist/Cdp.d.mts +15 -0
  14. package/dist/Cdp.mjs +22 -0
  15. package/dist/Cdp.mjs.map +1 -0
  16. package/dist/Change.d.mts +2 -2
  17. package/dist/Change.mjs +40 -7
  18. package/dist/Change.mjs.map +1 -1
  19. package/dist/Frame.d.mts +2 -2
  20. package/dist/Frame.mjs +132 -14
  21. package/dist/Frame.mjs.map +1 -1
  22. package/dist/InputStyle.d.mts +153 -0
  23. package/dist/InputStyle.mjs +2 -0
  24. package/dist/Layout.d.mts +2 -0
  25. package/dist/Layout.mjs +123 -0
  26. package/dist/Layout.mjs.map +1 -0
  27. package/dist/Overlay.d.mts +2 -0
  28. package/dist/Overlay.mjs +58 -0
  29. package/dist/Overlay.mjs.map +1 -0
  30. package/dist/Page.d.mts +2 -2
  31. package/dist/Page.mjs +2 -2
  32. package/dist/PageTime.d.mts +2 -0
  33. package/dist/PageTime.mjs +17 -0
  34. package/dist/PageTime.mjs.map +1 -0
  35. package/dist/Pose.d.mts +2 -0
  36. package/dist/Pose.mjs +65 -0
  37. package/dist/Pose.mjs.map +1 -0
  38. package/dist/Site.d.mts +984 -0
  39. package/dist/Site.mjs +110 -0
  40. package/dist/Site.mjs.map +1 -0
  41. package/dist/Snapshot.d.mts +2 -2
  42. package/dist/Snapshot.mjs +87 -6
  43. package/dist/Snapshot.mjs.map +1 -1
  44. package/dist/Text.d.mts +2 -0
  45. package/dist/Text.mjs +45 -0
  46. package/dist/Text.mjs.map +1 -0
  47. package/dist/Window.d.mts +2 -2
  48. package/dist/Window.mjs +31 -6
  49. package/dist/Window.mjs.map +1 -1
  50. package/dist/ai/BrowserTools.d.mts +4987 -0
  51. package/dist/ai/BrowserTools.mjs +3 -0
  52. package/dist/ai/PageControl.d.mts +286 -0
  53. package/dist/ai/PageControl.mjs +426 -0
  54. package/dist/ai/PageControl.mjs.map +1 -0
  55. package/dist/ai/PromptCache.d.mts +16 -0
  56. package/dist/ai/PromptCache.mjs +72 -0
  57. package/dist/ai/PromptCache.mjs.map +1 -0
  58. package/dist/ai/Tabs.d.mts +2 -0
  59. package/dist/ai/Tabs.mjs +72 -0
  60. package/dist/ai/Tabs.mjs.map +1 -0
  61. package/dist/ai/ToolError.d.mts +34 -0
  62. package/dist/ai/ToolError.mjs +2 -0
  63. package/dist/ai/index.d.mts +6 -0
  64. package/dist/ai/index.mjs +6 -0
  65. package/dist/index.d.mts +7 -15
  66. package/dist/index.mjs +9 -8
  67. package/dist/{Action-24sLOubi.d.mts → internal/Action-CkanNTUw.d.mts} +64 -4
  68. package/dist/{Browser-wZhwZSlG.d.mts → internal/Browser-DD9Vm1c-.d.mts} +80 -10
  69. package/dist/{Browser-BKPAbyys.mjs → internal/Browser-vzD7i2oj.mjs} +658 -495
  70. package/dist/internal/Browser-vzD7i2oj.mjs.map +1 -0
  71. package/dist/{BrowserError-BlcmLVzn.d.mts → internal/BrowserError-CsuRYcDX.d.mts} +187 -28
  72. package/dist/{BrowserEvent-lLqJ3GJS.d.mts → internal/BrowserEvent-tGPYYf6R.d.mts} +197 -18
  73. package/dist/internal/BrowserTools-Yi3lOX4h.mjs +497 -0
  74. package/dist/internal/BrowserTools-Yi3lOX4h.mjs.map +1 -0
  75. package/dist/{Style-AO4V7Czt.mjs → internal/InputStyle-CPzxoN4g.mjs} +94 -16
  76. package/dist/internal/InputStyle-CPzxoN4g.mjs.map +1 -0
  77. package/dist/{moment/Moment.mjs → internal/Moment-CstaX1mR.mjs} +49 -16
  78. package/dist/internal/Moment-CstaX1mR.mjs.map +1 -0
  79. package/dist/{moment/Moment.d.mts → internal/Moment-DOcldBdf.d.mts} +54 -21
  80. package/dist/internal/Page-BfGxn7oN.d.mts +1553 -0
  81. package/dist/{Page-BF5izr8R.mjs → internal/Page-DqF-tuTx.mjs} +62 -72
  82. package/dist/internal/Page-DqF-tuTx.mjs.map +1 -0
  83. package/dist/internal/Release-CFONkPDP.d.mts +39 -0
  84. package/dist/internal/Stage-D5ymSXDT.mjs +298 -0
  85. package/dist/internal/Stage-D5ymSXDT.mjs.map +1 -0
  86. package/dist/internal/Stillness-DCPeAN1a.mjs +1124 -0
  87. package/dist/internal/Stillness-DCPeAN1a.mjs.map +1 -0
  88. package/dist/internal/Supervisor-BcY_QNIY.d.mts +108 -0
  89. package/dist/internal/Supervisor-BcglY23c.mjs +531 -0
  90. package/dist/internal/Supervisor-BcglY23c.mjs.map +1 -0
  91. package/dist/internal/Tabs-dXMscIUQ.d.mts +52 -0
  92. package/dist/internal/TestPage-CYiYbh63.d.mts +159 -0
  93. package/dist/internal/ToolError-DArsRS2m.mjs +117 -0
  94. package/dist/internal/ToolError-DArsRS2m.mjs.map +1 -0
  95. package/dist/{plan/index.d.mts → internal/Walk-BNXcfZ2z.d.mts} +59 -35
  96. package/dist/{plan/index.mjs → internal/Walk-C5ky7uSf.mjs} +83 -51
  97. package/dist/internal/Walk-C5ky7uSf.mjs.map +1 -0
  98. package/dist/{ActionPort.mjs → internal/action-port-B5EkeGOR.mjs} +6 -12
  99. package/dist/internal/action-port-B5EkeGOR.mjs.map +1 -0
  100. package/dist/internal/cdp/workerd.d.mts +13 -0
  101. package/dist/internal/cdp/workerd.mjs +19 -0
  102. package/dist/internal/cdp/workerd.mjs.map +1 -0
  103. package/dist/{Clock.mjs → internal/clock-BKSAEf00.mjs} +13 -13
  104. package/dist/internal/clock-BKSAEf00.mjs.map +1 -0
  105. package/dist/{connection-2KHI4_KN.d.mts → internal/connection-BaB0vp1o.d.mts} +6 -6
  106. package/dist/{connection-CK83pvqP.mjs → internal/connection-C2X4GmXM.mjs} +19 -15
  107. package/dist/internal/connection-C2X4GmXM.mjs.map +1 -0
  108. package/dist/internal/events-DzCrww-y.mjs +72 -0
  109. package/dist/internal/events-DzCrww-y.mjs.map +1 -0
  110. package/dist/internal/fold.inpage-CyVZQHZL.d.mts +49 -0
  111. package/dist/internal/fold.inpage-uhrT-dOB.mjs +49 -0
  112. package/dist/internal/fold.inpage-uhrT-dOB.mjs.map +1 -0
  113. package/dist/internal/functions-jBOs6GKv.mjs +27 -0
  114. package/dist/internal/functions-jBOs6GKv.mjs.map +1 -0
  115. package/dist/{Geometry-DJx9qrYy.d.mts → internal/geometry-Dhj_ztJs.d.mts} +3 -3
  116. package/dist/{Geometry.mjs → internal/geometry-Lxyflb9J.mjs} +3 -12
  117. package/dist/internal/geometry-Lxyflb9J.mjs.map +1 -0
  118. package/dist/{Matching.mjs → internal/matching-Cs-UeOY0.mjs} +24 -19
  119. package/dist/internal/matching-Cs-UeOY0.mjs.map +1 -0
  120. package/dist/internal/page-DFQb-YOK.mjs +436 -0
  121. package/dist/internal/page-DFQb-YOK.mjs.map +1 -0
  122. package/dist/internal/pose.inpage-CBFeWcVa.mjs +1996 -0
  123. package/dist/internal/pose.inpage-CBFeWcVa.mjs.map +1 -0
  124. package/dist/{Url.mjs → internal/url-DB0pQYk6.mjs} +3 -12
  125. package/dist/internal/url-DB0pQYk6.mjs.map +1 -0
  126. package/dist/policy/Policy.d.mts +60 -6
  127. package/dist/policy/Policy.mjs +52 -9
  128. package/dist/policy/Policy.mjs.map +1 -1
  129. package/dist/policy/index.d.mts +2 -0
  130. package/dist/policy/index.mjs +2 -0
  131. package/dist/presentation/Film.d.mts +332 -0
  132. package/dist/presentation/Film.mjs +298 -0
  133. package/dist/presentation/Film.mjs.map +1 -0
  134. package/dist/presentation/Motion.d.mts +5 -1
  135. package/dist/presentation/Motion.mjs +16 -2
  136. package/dist/presentation/Motion.mjs.map +1 -1
  137. package/dist/presentation/Presentation.d.mts +48 -6
  138. package/dist/presentation/Presentation.mjs +28 -9
  139. package/dist/presentation/Presentation.mjs.map +1 -1
  140. package/dist/presentation/Stage.d.mts +40 -6
  141. package/dist/presentation/Stage.mjs +1 -262
  142. package/dist/presentation/index.d.mts +5 -0
  143. package/dist/presentation/index.mjs +5 -0
  144. package/dist/supervisor/Release.d.mts +2 -0
  145. package/dist/supervisor/Release.mjs +40 -0
  146. package/dist/supervisor/Release.mjs.map +1 -0
  147. package/dist/supervisor/Supervisor.d.mts +2 -104
  148. package/dist/supervisor/Supervisor.mjs +2 -515
  149. package/dist/supervisor/index.d.mts +3 -0
  150. package/dist/supervisor/index.mjs +3 -0
  151. package/dist/testing/HttpCassette.d.mts +98 -0
  152. package/dist/testing/HttpCassette.mjs +146 -0
  153. package/dist/testing/HttpCassette.mjs.map +1 -0
  154. package/dist/testing/Story.d.mts +31 -0
  155. package/dist/testing/Story.mjs +76 -0
  156. package/dist/testing/Story.mjs.map +1 -0
  157. package/dist/testing/TestBrowser.d.mts +191 -0
  158. package/dist/testing/TestBrowser.mjs +105 -0
  159. package/dist/testing/TestBrowser.mjs.map +1 -0
  160. package/dist/testing/TestModel.d.mts +133 -0
  161. package/dist/testing/TestModel.mjs +209 -0
  162. package/dist/testing/TestModel.mjs.map +1 -0
  163. package/dist/testing/TestPage.d.mts +2 -0
  164. package/dist/testing/TestPage.mjs +47 -0
  165. package/dist/testing/TestPage.mjs.map +1 -0
  166. package/dist/testing/index.d.mts +6 -337
  167. package/dist/testing/index.mjs +6 -515
  168. package/dist/timeline/Moment.d.mts +3 -0
  169. package/dist/timeline/Moment.mjs +3 -0
  170. package/dist/timeline/Stillness.d.mts +34 -0
  171. package/dist/timeline/Stillness.mjs +2 -0
  172. package/dist/timeline/index.d.mts +3 -0
  173. package/dist/timeline/index.mjs +3 -0
  174. package/dist/walk/Walk.d.mts +2 -0
  175. package/dist/walk/Walk.mjs +2 -0
  176. package/dist/walk/index.d.mts +2 -0
  177. package/dist/walk/index.mjs +2 -0
  178. package/package.json +54 -133
  179. package/src/Action.ts +73 -8
  180. package/src/Browser.ts +85 -14
  181. package/src/BrowserError.ts +258 -63
  182. package/src/BrowserEvent.ts +264 -48
  183. package/src/Cdp.ts +42 -0
  184. package/src/Change.ts +75 -4
  185. package/src/Frame.ts +247 -14
  186. package/src/{Style.ts → InputStyle.ts} +130 -18
  187. package/src/Layout.ts +187 -0
  188. package/src/Overlay.ts +76 -0
  189. package/src/Page.ts +144 -275
  190. package/src/PageTime.ts +72 -0
  191. package/src/Pose.ts +81 -0
  192. package/src/Site.ts +136 -0
  193. package/src/Snapshot.ts +179 -3
  194. package/src/Text.ts +60 -0
  195. package/src/Window.ts +53 -3
  196. package/src/ai/BrowserTools.ts +778 -0
  197. package/src/ai/PageControl.ts +702 -0
  198. package/src/ai/PromptCache.ts +87 -0
  199. package/src/ai/Tabs.ts +84 -0
  200. package/src/ai/ToolError.ts +50 -0
  201. package/src/ai/index.ts +36 -0
  202. package/src/ai/internal/crops.ts +38 -0
  203. package/src/ai/internal/points.ts +57 -0
  204. package/src/ai/internal/receipts.ts +107 -0
  205. package/src/index.ts +87 -6
  206. package/src/{ActionPort.ts → internal/action-port.ts} +3 -3
  207. package/src/{providers → internal/cdp}/connection.ts +19 -12
  208. package/src/internal/cdp/workerd.ts +36 -0
  209. package/src/{Clock.ts → internal/clock.ts} +20 -0
  210. package/src/internal/input/actions.ts +1 -1
  211. package/src/internal/input/dispatch.ts +2 -2
  212. package/src/internal/input/guard.inpage.ts +1 -1
  213. package/src/internal/input/guard.ts +1 -1
  214. package/src/internal/input/perform.ts +35 -7
  215. package/src/internal/input/pointer.ts +9 -6
  216. package/src/internal/input/targets.inpage.ts +3 -3
  217. package/src/internal/input/targets.ts +1 -1
  218. package/src/{Matching.ts → internal/matching.ts} +28 -19
  219. package/src/internal/page/bridge.ts +67 -35
  220. package/src/internal/page/clock.inpage.ts +306 -0
  221. package/src/internal/page/compose.inpage.ts +101 -0
  222. package/src/internal/page/context.ts +4 -2
  223. package/src/internal/page/functions.ts +84 -0
  224. package/src/internal/page/navigation.ts +1 -1
  225. package/src/internal/page/openings.ts +2 -2
  226. package/src/internal/page/overlay.inpage.ts +96 -0
  227. package/src/internal/page/overlay.ts +89 -0
  228. package/src/internal/page/page.ts +39 -29
  229. package/src/internal/page/port.ts +14 -8
  230. package/src/internal/page/pose.inpage.ts +200 -0
  231. package/src/internal/page/pose.ts +80 -0
  232. package/src/internal/page/replies.ts +1 -1
  233. package/src/internal/page/requests.ts +1 -1
  234. package/src/internal/page/scripts.ts +1 -1
  235. package/src/internal/page/time.inpage.ts +49 -0
  236. package/src/internal/page/time.ts +122 -0
  237. package/src/internal/page/viewport.ts +3 -2
  238. package/src/internal/pictures/capture.ts +1 -4
  239. package/src/internal/pictures/dimensions.ts +1 -1
  240. package/src/internal/pictures/frame.ts +1 -1
  241. package/src/internal/pictures/pictures.ts +144 -91
  242. package/src/internal/reading/context.inpage.ts +2 -2
  243. package/src/internal/reading/expect.inpage.ts +1 -1
  244. package/src/internal/reading/layout.inpage.ts +193 -0
  245. package/src/internal/reading/layout.ts +101 -0
  246. package/src/internal/reading/names.inpage.ts +15 -0
  247. package/src/internal/reading/outline.inpage.ts +5 -21
  248. package/src/internal/reading/reading.ts +33 -21
  249. package/src/internal/reading/ready.inpage.ts +21 -26
  250. package/src/internal/reading/ready.ts +26 -5
  251. package/src/internal/reading/subjects.inpage.ts +3 -3
  252. package/src/internal/reading/text.inpage.ts +3 -16
  253. package/src/internal/reading/walk.inpage.ts +1 -1
  254. package/src/internal/timeline/changes.inpage.ts +7 -15
  255. package/src/internal/timeline/changes.ts +17 -5
  256. package/src/internal/timeline/record.inpage.ts +15 -6
  257. package/src/internal/timeline/sight.inpage.ts +2 -2
  258. package/src/internal/timeline/window.ts +3 -4
  259. package/src/policy/Policy.ts +70 -16
  260. package/src/policy/index.ts +12 -0
  261. package/src/presentation/Film.ts +451 -0
  262. package/src/presentation/Motion.ts +45 -3
  263. package/src/presentation/Presentation.ts +60 -14
  264. package/src/presentation/Stage.ts +73 -35
  265. package/src/presentation/index.ts +30 -0
  266. package/src/presentation/{feed.ts → internal/feed.ts} +1 -1
  267. package/src/supervisor/Release.ts +45 -0
  268. package/src/supervisor/Supervisor.ts +80 -5
  269. package/src/supervisor/index.ts +18 -0
  270. package/src/supervisor/{contract.ts → internal/contract.ts} +14 -10
  271. package/src/supervisor/{lifecycle.ts → internal/lifecycle.ts} +7 -7
  272. package/src/supervisor/{runtime.ts → internal/runtime.ts} +7 -7
  273. package/src/testing/HttpCassette.ts +260 -0
  274. package/src/testing/Story.ts +103 -0
  275. package/src/testing/TestBrowser.ts +14 -4
  276. package/src/testing/TestModel.ts +297 -0
  277. package/src/testing/TestPage.ts +92 -4
  278. package/src/testing/index.ts +35 -1
  279. package/src/testing/{evidence.ts → internal/evidence.ts} +19 -11
  280. package/src/testing/{model.ts → internal/model.ts} +14 -8
  281. package/src/testing/{page.ts → internal/page.ts} +55 -51
  282. package/src/{moment → timeline}/Moment.ts +79 -29
  283. package/src/{stillness → timeline}/Stillness.ts +89 -46
  284. package/src/timeline/index.ts +18 -0
  285. package/src/{stillness/Pixels.ts → timeline/internal/pixels.ts} +27 -1
  286. package/src/{moment → timeline/internal}/words.ts +2 -2
  287. package/src/walk/Walk.ts +165 -0
  288. package/src/walk/index.ts +12 -0
  289. package/src/{plan → walk/internal}/choose.ts +23 -14
  290. package/src/{plan → walk/internal}/data.ts +37 -14
  291. package/src/{plan → walk/internal}/execute.ts +79 -36
  292. package/src/{plan → walk/internal}/record.ts +6 -6
  293. package/src/{plan → walk/internal}/targets.ts +35 -25
  294. package/dist/ActionPort.d.mts +0 -15
  295. package/dist/ActionPort.mjs.map +0 -1
  296. package/dist/Browser-BKPAbyys.mjs.map +0 -1
  297. package/dist/Change-Ba7INmay.d.mts +0 -69
  298. package/dist/Clock.d.mts +0 -57
  299. package/dist/Clock.mjs.map +0 -1
  300. package/dist/Frame-UEH2hO5T.d.mts +0 -124
  301. package/dist/Geometry.d.mts +0 -2
  302. package/dist/Geometry.mjs.map +0 -1
  303. package/dist/Matching.d.mts +0 -37
  304. package/dist/Matching.mjs.map +0 -1
  305. package/dist/Page-BF5izr8R.mjs.map +0 -1
  306. package/dist/Page-CvsOEorc.d.mts +0 -566
  307. package/dist/Released-tURbFmal.d.mts +0 -15
  308. package/dist/Snapshot-CtBVOtuu.d.mts +0 -73
  309. package/dist/Stillness-CNlvayIo.mjs +0 -136
  310. package/dist/Stillness-CNlvayIo.mjs.map +0 -1
  311. package/dist/Style-AO4V7Czt.mjs.map +0 -1
  312. package/dist/Style.d.mts +0 -72
  313. package/dist/Style.mjs +0 -2
  314. package/dist/Url.d.mts +0 -26
  315. package/dist/Url.mjs.map +0 -1
  316. package/dist/Window-CMddGMt1.d.mts +0 -34
  317. package/dist/connection-CK83pvqP.mjs.map +0 -1
  318. package/dist/moment/Moment.mjs.map +0 -1
  319. package/dist/plan/index.mjs.map +0 -1
  320. package/dist/presentation/Stage.mjs.map +0 -1
  321. package/dist/presentation/feed.d.mts +0 -20
  322. package/dist/presentation/feed.mjs +0 -18
  323. package/dist/presentation/feed.mjs.map +0 -1
  324. package/dist/providers/Cdp.d.mts +0 -9
  325. package/dist/providers/Cdp.mjs +0 -15
  326. package/dist/providers/Cdp.mjs.map +0 -1
  327. package/dist/providers/Chromium.d.mts +0 -32
  328. package/dist/providers/Chromium.mjs +0 -55
  329. package/dist/providers/Chromium.mjs.map +0 -1
  330. package/dist/providers/Released.d.mts +0 -2
  331. package/dist/providers/Released.mjs +0 -12
  332. package/dist/providers/Released.mjs.map +0 -1
  333. package/dist/stillness/Stillness.d.mts +0 -12
  334. package/dist/stillness/Stillness.mjs +0 -2
  335. package/dist/supervisor/Supervisor.mjs.map +0 -1
  336. package/dist/testing/index.mjs.map +0 -1
  337. package/dist/workerd/Cdp.d.mts +0 -8
  338. package/dist/workerd/Cdp.mjs +0 -13
  339. package/dist/workerd/Cdp.mjs.map +0 -1
  340. package/src/plan/index.ts +0 -36
  341. package/src/providers/Cdp.ts +0 -16
  342. package/src/providers/Chromium.ts +0 -99
  343. package/src/providers/Released.ts +0 -13
  344. package/src/workerd/Cdp.ts +0 -11
  345. /package/dist/{rolldown-runtime-D7D4PA-g.mjs → internal/rolldown-runtime-D7D4PA-g.mjs} +0 -0
  346. /package/src/{Geometry.ts → internal/geometry.ts} +0 -0
  347. /package/src/{Url.ts → internal/url.ts} +0 -0
  348. /package/src/{stillness → timeline/internal}/utilsBundle.d.ts +0 -0
@@ -1,566 +0,0 @@
1
- import { a as PressOptions$1, o as ScrollOptions$1, r as ClickOptions$1, s as TypeOptions$1, t as Action } from "./Action-24sLOubi.mjs";
2
- import { p as PolicyDenied, t as BrowserError } from "./BrowserError-BlcmLVzn.mjs";
3
- import { b as Subject, f as PageLoaded, n as Box, r as BrowserEvent } from "./BrowserEvent-lLqJ3GJS.mjs";
4
- import { r as Changes } from "./Change-Ba7INmay.mjs";
5
- import { a as Image, n as CaptureStats, o as ScreencastOptions, r as Frame } from "./Frame-UEH2hO5T.mjs";
6
- import { i as Point$1, t as Geometry_d_exports } from "./Geometry-DJx9qrYy.mjs";
7
- import { n as Snapshot, r as SnapshotOptions } from "./Snapshot-CtBVOtuu.mjs";
8
- import { t as Window } from "./Window-CMddGMt1.mjs";
9
- import { Clock, Duration, Effect, Schema, Scope, Stream } from "effect";
10
- declare namespace Page_d_exports {
11
- export { ActOptions, Capture, ChangesOptions, ClickOptions, ElementState, Fact, FindQuery, Found, FrameOptions, InputGuard, InputRequest, Page, Point, PressOptions, ReadyOptions, Region, ResolvedTarget, ScreenshotOptions, ScriptOptions, ScrollOptions, State, Target, Text, TextOptions, TypeOptions, UntilResult, UntilWant, WindowOptions, Zoom, correlate, failFast, redacted };
12
- }
13
- type Point = Point$1;
14
- /** A ref from a snapshot, such as `"e12"`, or a viewport point. */
15
- type Target = string | Point;
16
- declare const Region_base: Schema.Class<Region, Schema.Struct<{
17
- readonly x: Schema.Int;
18
- readonly y: Schema.Int;
19
- readonly width: Schema.Int;
20
- readonly height: Schema.Int;
21
- }>, {}>;
22
- /** An integer rectangle in viewport CSS pixels. */
23
- declare class Region extends Region_base {}
24
- declare const Zoom_base: Schema.Class<Zoom, Schema.Struct<{
25
- readonly page: Schema.String;
26
- readonly region: typeof Region;
27
- readonly image: typeof Image;
28
- }>, {}>;
29
- /** A crop and its viewport origin: add that origin to a point read from the crop. */
30
- declare class Zoom extends Zoom_base {}
31
- declare const ResolvedTarget_base: Schema.Class<ResolvedTarget, Schema.Struct<{
32
- readonly role: Schema.NullOr<Schema.String>;
33
- readonly name: Schema.String;
34
- readonly tag: Schema.String;
35
- readonly context: Schema.Struct<{
36
- readonly row: Schema.optional<Schema.String>;
37
- readonly column: Schema.optional<Schema.String>;
38
- readonly label: Schema.optional<Schema.String>;
39
- readonly heading: Schema.optional<Schema.String>;
40
- }>;
41
- readonly point: Schema.Struct<{
42
- readonly x: Schema.Finite;
43
- readonly y: Schema.Finite;
44
- }>;
45
- readonly element: Schema.String;
46
- /** For a point target, the box of what it found there. */
47
- readonly box: Schema.optional<Schema.Struct<{
48
- readonly x: Schema.Finite;
49
- readonly y: Schema.Finite;
50
- readonly width: Schema.Finite;
51
- readonly height: Schema.Finite;
52
- }>>;
53
- readonly cursor: Schema.String;
54
- readonly href: Schema.optional<Schema.String>;
55
- }>, {}>;
56
- /** The target as it read before input. Point coordinates are never snapped to another position. */
57
- declare class ResolvedTarget extends ResolvedTarget_base {}
58
- /** Action options share the execution codec. */
59
- type ClickOptions = typeof ClickOptions$1.Type;
60
- type TypeOptions = typeof TypeOptions$1.Type;
61
- type PressOptions = typeof PressOptions$1.Type;
62
- type ScrollOptions = typeof ScrollOptions$1.Type;
63
- /**
64
- * How current a picture must be. The newest screencast frame serves when it qualifies, at no cost;
65
- * otherwise a new screenshot is taken.
66
- */
67
- interface FrameOptions {
68
- /**
69
- * The oldest a reused frame may be, from its paint, at the earliest its timing allows, to now.
70
- * Defaults to 250 milliseconds; 0 always takes a new screenshot.
71
- */
72
- readonly maxAge?: Duration.Input | undefined;
73
- /**
74
- * `"input"`: reuse only a frame painted after this page's latest input, including input of an
75
- * interrupted action, and never while an action is changing the page. For a caller that has
76
- * just acted on the page.
77
- */
78
- readonly after?: "input" | undefined;
79
- }
80
- /** A screenshot reuses only a frame painted after the page's latest input, as `after: "input"`. */
81
- interface ScreenshotOptions {
82
- /** The oldest a reused frame may be, as for `frame`. Defaults to 250 milliseconds. */
83
- readonly maxAge?: Duration.Input | undefined;
84
- /** A region of the viewport, captured in CSS pixels at the viewport's own scale; always new. */
85
- readonly clip?: Box | undefined;
86
- /** JPEG quality, 0 to 100. Defaults to 80. */
87
- readonly quality?: number | undefined;
88
- /** `"jpeg"`, the default, or `"png"`, which is always a new picture. */
89
- readonly format?: "jpeg" | "png" | undefined;
90
- /**
91
- * `"css"`, the default, a picture pixel per CSS pixel; `"device"`, the screen's own pixels, as
92
- * many to a CSS pixel as its device scale factor, which is always a new picture.
93
- */
94
- readonly scale?: "css" | "device" | undefined;
95
- }
96
- /**
97
- * What `find` looks for. Every rule given must hold; with none, it finds every element in scope
98
- * that has a role or is a control.
99
- */
100
- interface FindQuery {
101
- /** Narrow matching to this CSS selector. Invalid CSS fails InvalidRequest. */
102
- readonly selector?: string | undefined;
103
- /** Require a visible match, optionally enabled. */
104
- readonly state?: "visible" | "enabled" | undefined;
105
- /** An ARIA role, such as `"button"` or `"heading"`, ignoring case. */
106
- readonly role?: string | undefined;
107
- /**
108
- * The accessible name: a string that reads the same once spaces are collapsed and case folded,
109
- * or a pattern found in it.
110
- */
111
- readonly name?: string | RegExp | undefined;
112
- /**
113
- * Text it shows, ignoring case and spacing, or a pattern. Text inside a control or a heading is
114
- * that control's or heading's, and only the smallest element showing it matches, not every
115
- * element around it.
116
- */
117
- readonly text?: string | RegExp | undefined;
118
- /** Whole words in its context (row, column, label or heading), ignoring case and spacing. */
119
- readonly near?: string | undefined;
120
- /** Only what a point action at this viewport point would reach: the control there, or else what is painted there. */
121
- readonly at?: Point | undefined;
122
- /** The viewport (the default), or the whole document. */
123
- readonly scope?: "viewport" | "document" | undefined;
124
- }
125
- /**
126
- * An element's state as its markup gives it: `checked` for what can be checked, `expanded`,
127
- * `selected` and `pressed` where the page says either way, and `level` for headings.
128
- */
129
- declare const ElementState: Schema.Struct<{
130
- readonly disabled: Schema.Boolean;
131
- readonly focused: Schema.Boolean;
132
- readonly checked: Schema.optional<Schema.Boolean>;
133
- readonly expanded: Schema.optional<Schema.Boolean>;
134
- readonly selected: Schema.optional<Schema.Boolean>;
135
- readonly pressed: Schema.optional<Schema.Boolean>;
136
- readonly level: Schema.optional<Schema.Int>;
137
- }>;
138
- type ElementState = typeof ElementState.Type;
139
- declare const Found_base: Schema.Class<Found, Schema.Struct<{
140
- readonly ref: Schema.String;
141
- readonly subject: typeof Subject;
142
- /** Its box, rounded. Reading the document, it may be out of view. */
143
- readonly box: Schema.Struct<{
144
- readonly x: Schema.Finite;
145
- readonly y: Schema.Finite;
146
- readonly width: Schema.Finite;
147
- readonly height: Schema.Finite;
148
- }>;
149
- readonly inViewport: Schema.Boolean;
150
- readonly state: Schema.Struct<{
151
- readonly disabled: Schema.Boolean;
152
- readonly focused: Schema.Boolean;
153
- readonly checked: Schema.optional<Schema.Boolean>;
154
- readonly expanded: Schema.optional<Schema.Boolean>;
155
- readonly selected: Schema.optional<Schema.Boolean>;
156
- readonly pressed: Schema.optional<Schema.Boolean>;
157
- readonly level: Schema.optional<Schema.Int>;
158
- }>;
159
- }>, {}>;
160
- /** An element `find` found: a ref for the actions, what it is, where it is and its state. */
161
- declare class Found extends Found_base {}
162
- interface TextOptions {
163
- /** `"viewport"` (the default) reads what the viewport shows; a ref reads that element whole. */
164
- readonly scope?: string | undefined;
165
- /** Bound on the text's length, cut at a line. Defaults to 12,000 characters. */
166
- readonly maxChars?: number | undefined;
167
- /** Show what fields hold; a secret field still reads `••••`. Defaults to false. */
168
- readonly unmask?: boolean | undefined;
169
- }
170
- declare const Text_base: Schema.Class<Text, Schema.Struct<{
171
- readonly url: Schema.String;
172
- readonly title: Schema.String;
173
- readonly text: Schema.String;
174
- /** True when `text` was cut at `maxChars`. */
175
- readonly truncated: Schema.Boolean;
176
- /** Host monotonic milliseconds from the browser's captured Effect Clock. */
177
- readonly at: Schema.Finite;
178
- }>, {}>;
179
- /** What a page showed as text: a line per block, with table cells apart by tabs. */
180
- declare class Text extends Text_base {}
181
- interface ReadyOptions {
182
- /** How long recorded content must stay unchanged. Screen stillness is a separate feature. */
183
- readonly quietMillis?: number | undefined;
184
- readonly timeout?: Duration.Input | undefined;
185
- }
186
- /** The window `changes` reads, and whether to show what fields hold. */
187
- interface ChangesOptions {
188
- /**
189
- * Where the window starts: the changes a previous read returned, to continue exactly where they
190
- * ended; a frame, at its paint; or host monotonic milliseconds, which mapped to the page's clock
191
- * may miss or repeat changes near the start if the browser's clock mapping changed since. Defaults
192
- * to the start of the record.
193
- */
194
- readonly since?: Changes | Frame | number | undefined;
195
- /**
196
- * Where it ends: a frame, at its paint, so a delayed frame's window holds nothing it does not
197
- * show; or host monotonic milliseconds. Defaults to now, and is never later.
198
- */
199
- readonly until?: Frame | number | undefined;
200
- /** Show what fields hold; a secret field still reads `••••`. Defaults to false. */
201
- readonly unmask?: boolean | undefined;
202
- }
203
- /** The window `window` reads, and whether to show what fields hold. */
204
- interface WindowOptions {
205
- /**
206
- * Where the window starts: a previous window, to continue exactly where it ended; a frame, at its
207
- * paint; host monotonic milliseconds; or a `Duration` back from `until`. A start after `until`
208
- * leaves the window empty there.
209
- */
210
- readonly since: Window | Frame | Duration.Duration | number;
211
- /**
212
- * Where it ends: a frame, at its paint, such as one a delayed consumer airs now; or host
213
- * monotonic milliseconds. Defaults to now, and is never later.
214
- */
215
- readonly until?: Frame | number | undefined;
216
- /** Show what fields hold in its changes; a secret field still reads `••••`. Defaults to false. */
217
- readonly unmask?: boolean | undefined;
218
- }
219
- declare const State_base: Schema.Class<State, Schema.Struct<{
220
- readonly page: Schema.String;
221
- /** The tracking connection that owns this document counter. */
222
- readonly connection: Schema.String;
223
- /** When this was taken. */
224
- readonly at: Schema.Finite;
225
- /** Where the main frame last committed or moved, without userinfo or known secret parameters. */
226
- readonly url: Schema.String;
227
- /** The page's document, as `Navigated` counts them. */
228
- readonly document: Schema.Int;
229
- /** When the main frame committed it; absent for the one the browser began tracking it with. */
230
- readonly committedAt: Schema.optional<Schema.Finite>;
231
- /** How far that document has loaded, as the page's own session heard; absent until parsed. */
232
- readonly load: Schema.optional<typeof PageLoaded>;
233
- /** The newest screencast frame, of whichever document it names. */
234
- readonly frame: Schema.optional<typeof Frame>;
235
- /** The viewport's text as it was last read, with the page's title then. */
236
- readonly text: Schema.optional<typeof Text>;
237
- }>, {}>;
238
- /**
239
- * What the library knows of a page now, without asking it, each part with when it learned it, in
240
- * host monotonic milliseconds: a part's age is `at` less its time. Text read before the current
241
- * document began is left out, since it tells of a document that has gone.
242
- */
243
- declare class State extends State_base {}
244
- /**
245
- * What the page's structure establishes about an input, or says it cannot establish:
246
- *
247
- * - `form-submit`: it submits a form, which sends the form's fields.
248
- * - `cross-origin`: it navigates or submits to another origin.
249
- * - `download`: it follows a download link.
250
- * - `upload`: it opens a file chooser.
251
- * - `secret`: it types, with `type`, into a field marked as a password, a one-time code or a
252
- * card's number, code or expiry, or submits a form holding a filled one.
253
- * - `scripted`: it activates something the browser gives no effect of its own, such as a
254
- * `type="button"` button, a `role="button"` element or a canvas, so only the page's script
255
- * decides what happens.
256
- * - `opaque`: nothing names what receives it: a canvas, a frame or an unnamed element.
257
- *
258
- * Facts never come from what an element's text says. What an input means, such as a payment
259
- * or a deletion, takes a judge that reads the evidence in the {@link InputRequest}.
260
- */
261
- declare const Fact: Schema.Literals<readonly ["form-submit", "cross-origin", "download", "upload", "secret", "scripted", "opaque"]>;
262
- type Fact = typeof Fact.Type;
263
- declare const InputRequest_base: Schema.Class<InputRequest, Schema.Struct<{
264
- readonly page: Schema.String;
265
- /**
266
- * The page's URL, without a fragment that only names a place on the page. This and the other
267
- * addresses keep no userinfo or known secret parameters.
268
- */
269
- readonly url: Schema.String;
270
- /** The page's title, at most 120 characters. */
271
- readonly title: Schema.String;
272
- readonly action: Schema.TaggedUnion<{
273
- readonly Act: Schema.TaggedStruct<"Act", {
274
- readonly document: Schema.Int;
275
- }>;
276
- readonly Back: Schema.TaggedStruct<"Back", {}>;
277
- readonly Click: Schema.TaggedStruct<"Click", {
278
- readonly target: Schema.Union<readonly [Schema.String, Schema.Struct<{
279
- readonly x: Schema.Finite;
280
- readonly y: Schema.Finite;
281
- }>]>;
282
- readonly options: Schema.optional<Schema.Struct<{
283
- readonly button: Schema.optional<Schema.Literals<readonly ["left", "right", "middle"]>>;
284
- readonly clickCount: Schema.optional<Schema.Finite>;
285
- readonly holdMillis: Schema.optional<Schema.Finite>;
286
- }>>;
287
- }>;
288
- readonly Drag: Schema.TaggedStruct<"Drag", {
289
- readonly from: Schema.Union<readonly [Schema.String, Schema.Struct<{
290
- readonly x: Schema.Finite;
291
- readonly y: Schema.Finite;
292
- }>]>;
293
- readonly to: Schema.Union<readonly [Schema.String, Schema.Struct<{
294
- readonly x: Schema.Finite;
295
- readonly y: Schema.Finite;
296
- }>]>;
297
- }>;
298
- readonly Goto: Schema.TaggedStruct<"Goto", {
299
- readonly url: Schema.String;
300
- }>;
301
- readonly Hover: Schema.TaggedStruct<"Hover", {
302
- readonly target: Schema.Union<readonly [Schema.String, Schema.Struct<{
303
- readonly x: Schema.Finite;
304
- readonly y: Schema.Finite;
305
- }>]>;
306
- }>;
307
- readonly Press: Schema.TaggedStruct<"Press", {
308
- readonly keys: Schema.String;
309
- readonly options: Schema.optional<Schema.Struct<{
310
- readonly on: Schema.optional<Schema.String>;
311
- readonly times: Schema.optional<Schema.Finite>;
312
- readonly holdMillis: Schema.optional<Schema.Finite>;
313
- }>>;
314
- }>;
315
- readonly Reload: Schema.TaggedStruct<"Reload", {}>;
316
- readonly Scroll: Schema.TaggedStruct<"Scroll", {
317
- readonly options: Schema.optional<Schema.Struct<{
318
- readonly at: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
319
- readonly x: Schema.Finite;
320
- readonly y: Schema.Finite;
321
- }>]>>;
322
- readonly dx: Schema.optional<Schema.Finite>;
323
- readonly dy: Schema.optional<Schema.Finite>;
324
- }>>;
325
- }>;
326
- readonly Select: Schema.TaggedStruct<"Select", {
327
- readonly ref: Schema.String;
328
- readonly values: Schema.$Array<Schema.String>;
329
- }>;
330
- readonly Type: Schema.TaggedStruct<"Type", {
331
- readonly text: Schema.String;
332
- readonly options: Schema.optional<Schema.Struct<{
333
- readonly into: Schema.optional<Schema.String>;
334
- readonly replace: Schema.optional<Schema.Boolean>;
335
- readonly submit: Schema.optional<Schema.Boolean>;
336
- readonly secret: Schema.optional<Schema.Boolean>;
337
- }>>;
338
- }>;
339
- }>;
340
- readonly target: Schema.optional<Schema.String>;
341
- readonly element: Schema.optional<Schema.String>;
342
- /** Literal pixel targets only; ref coordinates are resolved after the policy allows them. */
343
- readonly point: Schema.optional<Schema.Struct<{
344
- readonly x: Schema.Finite;
345
- readonly y: Schema.Finite;
346
- }>>;
347
- readonly text: Schema.optional<Schema.String>;
348
- readonly role: Schema.optional<Schema.NullOr<Schema.String>>;
349
- readonly name: Schema.optional<Schema.String>;
350
- /** The target's accessible description, when it says more than its name. */
351
- readonly description: Schema.optional<Schema.String>;
352
- readonly href: Schema.optional<Schema.String>;
353
- readonly destination: Schema.optional<Schema.String>;
354
- readonly facts: Schema.$Array<Schema.Literals<readonly ["form-submit", "cross-origin", "download", "upload", "secret", "scripted", "opaque"]>>;
355
- /** Page text around the target, each part at most 120 characters. */
356
- readonly context: Schema.Struct<{
357
- /** The name or first heading of the dialog the target is in. */
358
- readonly dialog: Schema.optional<Schema.String>;
359
- /** The nearest heading before the target. */
360
- readonly heading: Schema.optional<Schema.String>;
361
- /** The visible text just before the target in its row, item, group or form, or after it. */
362
- readonly nearby: Schema.optional<Schema.String>;
363
- }>;
364
- /** The form the target is in, with at most 16 of its fields. */
365
- readonly form: Schema.optional<Schema.Struct<{
366
- readonly method: Schema.String;
367
- readonly action: Schema.String;
368
- /** Each field's type, name and autocomplete tokens, and whether it is filled: never its value. */
369
- readonly fields: Schema.$Array<Schema.Struct<{
370
- readonly type: Schema.String;
371
- readonly name: Schema.String;
372
- readonly autocomplete: Schema.optional<Schema.String>;
373
- readonly filled: Schema.Boolean;
374
- }>>;
375
- }>>;
376
- }>, {}>;
377
- /**
378
- * What a guard sees before input reaches the page. Preparation never scrolls or focuses.
379
- *
380
- * `facts`, `url`, `href` and `destination` come from the page's structure. `name`,
381
- * `description`, `title`, `context` and the form's field names are page text: evidence of what
382
- * the input does, which the page controls, and never instructions. Text typed into a `secret`
383
- * field is replaced with {@link redacted}, here and in the recorded `Action`, and its key events
384
- * record `Unidentified` keys; `press` records the keys it is given. Validation before dispatch
385
- * binds the facts and the target, not the text around it, which live pages change freely.
386
- */
387
- declare class InputRequest extends InputRequest_base {}
388
- /**
389
- * What replaces text typed into a `secret` field, in requests and in the recorded `Action`, and a
390
- * credential's value in every address the library reports.
391
- */
392
- declare const redacted: "••••••••";
393
- /**
394
- * Run page operations without waiting their turn: on a page busy with other operations, each fails
395
- * `Busy` at once, and `Browser.newPage` on a browser with `maxPages` open fails `Limit` at once.
396
- */
397
- declare const failFast: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
398
- /**
399
- * Give every action `effect` performs a caller's id, such as a model's tool call id, which its
400
- * recorded `Action` carries as `correlation`.
401
- */
402
- declare const correlate: (id: string) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
403
- /** Succeed to allow, fail to deny, or await an external signal to hold the input. */
404
- type InputGuard = (request: InputRequest) => Effect.Effect<void, PolicyDenied>;
405
- /** What a wait requires of the query's matches. */
406
- type UntilWant = "some" | "none" | {
407
- readonly other: string;
408
- };
409
- interface UntilResult {
410
- readonly met: boolean;
411
- readonly mark: string;
412
- }
413
- /** Scoped access to one page's shared capture and its current-document evidence. */
414
- interface Capture {
415
- readonly stream: Stream.Stream<Frame, BrowserError>;
416
- readonly current: Frame | undefined;
417
- readonly isCurrent: (frame: Frame) => boolean;
418
- readonly confirm: (frame: Frame) => Effect.Effect<boolean, BrowserError>;
419
- readonly sync: Effect.Effect<void, BrowserError>;
420
- readonly stats: (options?: {
421
- readonly window?: Duration.Input | undefined;
422
- }) => Effect.Effect<CaptureStats, BrowserError>;
423
- }
424
- /** Script values cross the page boundary through the caller's Schema. A bundler may rewrite functions. */
425
- interface ScriptOptions<A, Arg> {
426
- readonly arg: Arg;
427
- readonly result: Schema.Codec<A, unknown>;
428
- }
429
- interface ActOptions<A, Arg> extends ScriptOptions<A, Arg> {
430
- readonly document: number;
431
- /** Supplying the read's connection also refuses a document counter from another connection. */
432
- readonly connection?: string | undefined;
433
- }
434
- interface Page {
435
- /** Decode and perform a data action through the same policy and lane as the named methods. */
436
- readonly perform: (action: Action) => Effect.Effect<ResolvedTarget | string | void, BrowserError>;
437
- /** Read declared side-effect-free code in the main world, retrying one replaced document. */
438
- readonly read: <A, Arg>(script: (arg: Arg) => unknown, options: ScriptOptions<A, Arg>) => Effect.Effect<{
439
- readonly value: A;
440
- readonly document: number;
441
- readonly connection: string;
442
- }, BrowserError>;
443
- /**
444
- * Run code as a guarded, recorded action bound to the caller's document.
445
- * A timeout or cancellation cannot stop JavaScript already running: later input waits for its
446
- * actual reply. Close the page and open a replacement if the script never settles.
447
- */
448
- readonly act: <A, Arg>(script: (arg: Arg) => unknown, options: ActOptions<A, Arg>) => Effect.Effect<A, BrowserError>;
449
- /** Owning browser clock: deadlines and all frame/event timestamps use this clock. */
450
- readonly clock: Clock.Clock;
451
- /** Wait for admitted input and retain a bounded read turn through effect. */
452
- readonly afterInput: <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E | BrowserError, R>;
453
- /** A scoped lease starts capture immediately, independently of its first frame. */
454
- readonly capture: (options?: ScreencastOptions) => Effect.Effect<Capture, BrowserError, Scope.Scope>;
455
- /** One page-side wait; replaced documents share one deadline. Unmet is met:false; an empty mark means no stable document could be sampled. */
456
- readonly until: (query: FindQuery, want: UntilWant, millis: number) => Effect.Effect<UntilResult, BrowserError>;
457
- /** The page's CDP target id: the same page has it again after a reconnect to its browser. */
458
- readonly id: string;
459
- /** The page's address, without its userinfo or known secret parameters. */
460
- readonly url: Effect.Effect<string>;
461
- /**
462
- * The document's title as the page last set it, empty for an untitled page. The browser answers
463
- * it, in one call, so a page busy with a script cannot hold it up.
464
- */
465
- readonly title: Effect.Effect<string, BrowserError>;
466
- readonly goto: (url: string) => Effect.Effect<void, BrowserError>;
467
- /** The previous history entry, including one only a frame created; `NotFound` when none. */
468
- readonly back: Effect.Effect<void, BrowserError>;
469
- readonly reload: Effect.Effect<void, BrowserError>;
470
- /** Make this the visible tab. Background tabs paint rarely and send few screencast frames. */
471
- readonly bringToFront: Effect.Effect<void, BrowserError>;
472
- /** Close the tab, succeeding once it has closed, or at once when it already had. */
473
- readonly close: Effect.Effect<void, BrowserError>;
474
- readonly snapshot: (options?: SnapshotOptions) => Effect.Effect<Snapshot, BrowserError>;
475
- /**
476
- * A picture of the viewport, in CSS pixels: a screencast frame painted since the page's latest
477
- * input, if one qualifies, or a new one. A caller that has just acted sees what its action did.
478
- */
479
- readonly screenshot: (options?: ScreenshotOptions) => Effect.Effect<Image, BrowserError>;
480
- /**
481
- * The viewport with its timing: the newest screencast frame if it qualifies, else a new
482
- * screenshot timed by the host interval in which it was taken.
483
- */
484
- readonly frame: (options?: FrameOptions) => Effect.Effect<Frame, BrowserError>;
485
- /**
486
- * A crop in CSS pixels, unmagnified, with the origin that keeps later input in viewport pixels.
487
- * With `scale: "device"` its picture has the screen's own pixels, as a screenshot's would.
488
- */
489
- readonly zoom: (region: Region, options?: Pick<ScreenshotOptions, "scale">) => Effect.Effect<Zoom, BrowserError>;
490
- /**
491
- * The viewport's size in CSS pixels, the space of points, crops and page scrolls. Over CDP the
492
- * page reports it, within the action timeout.
493
- */
494
- readonly viewport: Effect.Effect<{
495
- readonly width: number;
496
- readonly height: number;
497
- }, BrowserError>;
498
- /**
499
- * The elements that match a query, in tree order, with refs the actions take, in one call to the
500
- * page. All that match are returned, so a caller tells them apart by their context; none is an
501
- * empty result, not a failure.
502
- */
503
- readonly find: (query?: FindQuery) => Effect.Effect<ReadonlyArray<Found>, BrowserError>;
504
- /**
505
- * The text the viewport shows, or one element whole, in one call to the page. Field values read
506
- * `••••` unless `unmask`, and a secret field's always do, as does one that was secret when the
507
- * library saw it.
508
- */
509
- readonly text: (options?: TextOptions) => Effect.Effect<Text, BrowserError>;
510
- /**
511
- * What visibly changed over a window, in one call to the page. The first read starts the page's
512
- * record, so it finds none; from then the page records, and from the start of each later
513
- * document, until nobody has read it for two minutes. See `Change`.
514
- */
515
- readonly changes: (options?: ChangesOptions) => Effect.Effect<Changes, BrowserError>;
516
- /**
517
- * The page's events, changes and frames over a window: the frames and events it keeps, at no
518
- * call, and its changes, in one call, the first starting its record as `changes` does. A part
519
- * that cannot be read is missing, with why; the window fails only for bounds that are not finite.
520
- */
521
- readonly window: (options: WindowOptions) => Effect.Effect<Window, BrowserError>;
522
- /**
523
- * What the library knows of the page now, at no call and with no wait for its turn: where it is,
524
- * its document and how far it has loaded, its newest frame, and its text and title as last read.
525
- */
526
- readonly state: Effect.Effect<State>;
527
- readonly click: (target: Target, options?: ClickOptions) => Effect.Effect<ResolvedTarget, BrowserError>;
528
- readonly hover: (target: Target) => Effect.Effect<void, BrowserError>;
529
- readonly drag: (from: Target, to: Target) => Effect.Effect<void, BrowserError>;
530
- /** Type into a text field, or to whatever has focus unless a typed key could activate it. */
531
- readonly type: (text: string, options?: TypeOptions) => Effect.Effect<void, BrowserError>;
532
- /** Keys such as `"Enter"`, `"Space"`, `"ArrowLeft"` or `"Control+A"`. */
533
- readonly press: (keys: string, options?: PressOptions) => Effect.Effect<void, BrowserError>;
534
- readonly scroll: (options?: ScrollOptions) => Effect.Effect<void, BrowserError>;
535
- /**
536
- * Choose options of a `<select>` by value or label; returns the chosen labels. A refusal, such
537
- * as no matching option, is undispatched.
538
- */
539
- readonly select: (ref: string, values: ReadonlyArray<string>) => Effect.Effect<string, BrowserError>;
540
- /**
541
- * Wait for document evidence, polling every 50 ms: parsed, painted, visible, fonts and visible
542
- * images loaded, and finite animations finished. Optional quietMillis requires recorded content
543
- * to stay unchanged. Screen or foreground stillness belongs to the Stillness feature.
544
- * Fails Timeout after timeout, 15 seconds by default.
545
- */
546
- readonly ready: (options?: ReadyOptions) => Effect.Effect<void, BrowserError>;
547
- /**
548
- * Screencast frames for as long as the stream runs. Concurrent streams share one screencast and
549
- * its settings; explicit options that differ from a running screencast's fail with InvalidRequest.
550
- */
551
- readonly screencast: (options?: ScreencastOptions) => Stream.Stream<Frame, BrowserError>;
552
- /**
553
- * What this page's captures received, delivered and dropped, over its life or the latest
554
- * `window`, which reaches back at most a minute; a longer one is an `InvalidRequest`.
555
- */
556
- readonly captureStats: (options?: {
557
- readonly window?: Duration.Input | undefined;
558
- }) => Effect.Effect<CaptureStats, BrowserError>;
559
- /** Screencast frames painted within `frameHistory` of the newest, oldest first. */
560
- readonly recentFrames: Effect.Effect<ReadonlyArray<Frame>>;
561
- /** This page's events among the browser's latest `eventHistory`, oldest first. */
562
- readonly recentEvents: Effect.Effect<ReadonlyArray<BrowserEvent>>;
563
- }
564
- //#endregion
565
- export { Zoom as A, Target as C, UntilResult as D, TypeOptions as E, failFast as M, redacted as N, UntilWant as O, State as S, TextOptions as T, Region as _, ElementState as a, ScriptOptions as b, Found as c, InputRequest as d, Page as f, ReadyOptions as g, PressOptions as h, ClickOptions as i, correlate as j, WindowOptions as k, FrameOptions as l, Point as m, Capture as n, Fact as o, Page_d_exports as p, ChangesOptions as r, FindQuery as s, ActOptions as t, InputGuard as u, ResolvedTarget as v, Text as w, ScrollOptions as x, ScreenshotOptions as y };
566
- //# sourceMappingURL=Page-CvsOEorc.d.mts.map
@@ -1,15 +0,0 @@
1
- import { Schema } from "effect";
2
- //#region src/providers/Released.d.ts
3
- declare const Settled_base: Schema.Class<Settled, Schema.TaggedStruct<"Settled", {}>, {}>;
4
- /** The provider confirmed the resource ended. */
5
- declare class Settled extends Settled_base {}
6
- declare const Unconfirmed_base: Schema.Class<Unconfirmed, Schema.TaggedStruct<"Unconfirmed", {
7
- readonly detail: Schema.String;
8
- }>, {}>;
9
- /** The resource may still run, and bill, because its end could not be confirmed. */
10
- declare class Unconfirmed extends Unconfirmed_base {}
11
- declare const Released: Schema.Union<readonly [typeof Settled, typeof Unconfirmed]>;
12
- type Released = typeof Released.Type;
13
- //#endregion
14
- export { Settled as n, Unconfirmed as r, Released as t };
15
- //# sourceMappingURL=Released-tURbFmal.d.mts.map
@@ -1,73 +0,0 @@
1
- import { Schema } from "effect";
2
- declare namespace Snapshot_d_exports {
3
- export { Control, Snapshot, SnapshotOptions };
4
- }
5
- declare const Control_base: Schema.Class<Control, Schema.Struct<{
6
- readonly ref: Schema.String;
7
- /** Its role, such as `button` or `textbox`, or `clickable` for an element without one. */
8
- readonly kind: Schema.String;
9
- /** Its accessible name. */
10
- readonly name: Schema.String;
11
- /** What it holds: a field's text, `••••` for a secret one, or a select's chosen labels. */
12
- readonly value: Schema.String;
13
- /** A select's option labels, at most 64. */
14
- readonly options: Schema.optional<Schema.$Array<Schema.String>>;
15
- /** How many options a select has, when it has options. */
16
- readonly optionCount: Schema.optional<Schema.Int>;
17
- readonly disabled: Schema.optional<Schema.Boolean>;
18
- /** Whether it is checked, for what can be checked. */
19
- readonly checked: Schema.optional<Schema.Boolean>;
20
- /** True for a field that takes typed text. */
21
- readonly editable: Schema.optional<Schema.Boolean>;
22
- }>, {}>;
23
- /** A control the outline shows, as a value: its ref, what it is and what it holds. */
24
- declare class Control extends Control_base {}
25
- declare const Snapshot_base: Schema.Class<Snapshot, Schema.Struct<{
26
- readonly url: Schema.String;
27
- readonly title: Schema.String;
28
- /** One line per control, heading or text block, indented by landmark. */
29
- readonly text: Schema.String;
30
- /** True when `text` was cut at `maxChars`. */
31
- readonly truncated: Schema.Boolean;
32
- /**
33
- * Parts of the page left out because they lie above or below the viewport, each an element out
34
- * of view with all it holds (viewport snapshots only).
35
- */
36
- readonly above: Schema.Finite;
37
- readonly below: Schema.Finite;
38
- readonly viewport: Schema.Struct<{
39
- readonly width: Schema.Finite;
40
- readonly height: Schema.Finite;
41
- }>;
42
- readonly scroll: Schema.Struct<{
43
- readonly y: Schema.Finite;
44
- readonly height: Schema.Finite;
45
- }>;
46
- /** The controls the outline shows, in its order. */
47
- readonly controls: Schema.$Array<typeof Control>;
48
- }>, {}>;
49
- declare class Snapshot extends Snapshot_base {
50
- /** The snapshot as one block of text for a model: header, outline and what was left out. */
51
- get rendered(): string;
52
- }
53
- interface SnapshotOptions {
54
- /** Read the whole page instead of the viewport. Defaults to false. */
55
- readonly full?: boolean | undefined;
56
- /** Keep only lines containing this text (case-insensitive). */
57
- readonly query?: string | undefined;
58
- /**
59
- * Read only inside the elements this CSS selector matches, such as `form` or `#results`. A
60
- * selector that matches nothing reads nothing; one that is not CSS is an `InvalidRequest`.
61
- */
62
- readonly within?: string | undefined;
63
- /** Bound on the outline's length. Defaults to 12,000 characters. */
64
- readonly maxChars?: number | undefined;
65
- /**
66
- * Give every control's box, as `WxH at (x,y)` in viewport CSS pixels, as a canvas's or a frame's
67
- * always has. Defaults to false.
68
- */
69
- readonly boxes?: boolean | undefined;
70
- }
71
- //#endregion
72
- export { Snapshot_d_exports as i, Snapshot as n, SnapshotOptions as r, Control as t };
73
- //# sourceMappingURL=Snapshot-CtBVOtuu.d.mts.map