effect-browser 0.3.0-beta.20 → 0.3.0-beta.22

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 (243) hide show
  1. package/README.md +221 -158
  2. package/dist/Action-24sLOubi.d.mts +110 -0
  3. package/dist/Action.d.mts +2 -0
  4. package/dist/Action.mjs +141 -0
  5. package/dist/Action.mjs.map +1 -0
  6. package/dist/ActionPort.d.mts +15 -0
  7. package/dist/ActionPort.mjs +101 -0
  8. package/dist/ActionPort.mjs.map +1 -0
  9. package/dist/Browser-Cq2K1FEA.mjs +4075 -0
  10. package/dist/Browser-Cq2K1FEA.mjs.map +1 -0
  11. package/dist/Browser-wZhwZSlG.d.mts +167 -0
  12. package/dist/Browser.d.mts +2 -129
  13. package/dist/Browser.mjs +1 -1
  14. package/dist/{BrowserError-Coy7EW1N.d.mts → BrowserError-BlcmLVzn.d.mts} +22 -7
  15. package/dist/BrowserError.d.mts +2 -2
  16. package/dist/BrowserError.mjs +46 -9
  17. package/dist/BrowserError.mjs.map +1 -1
  18. package/dist/{BrowserEvent-dq6FRT8w.d.mts → BrowserEvent-lLqJ3GJS.d.mts} +93 -37
  19. package/dist/BrowserEvent.d.mts +2 -2
  20. package/dist/BrowserEvent.mjs +29 -24
  21. package/dist/BrowserEvent.mjs.map +1 -1
  22. package/dist/{Change-DqING3tr.d.mts → Change-Ba7INmay.d.mts} +4 -6
  23. package/dist/Change.d.mts +2 -2
  24. package/dist/Change.mjs +97 -2
  25. package/dist/Change.mjs.map +1 -0
  26. package/dist/Clock.d.mts +57 -0
  27. package/dist/Clock.mjs +80 -0
  28. package/dist/Clock.mjs.map +1 -0
  29. package/dist/{Frame-DkNdjjjr.d.mts → Frame-UEH2hO5T.d.mts} +10 -3
  30. package/dist/Frame.d.mts +2 -2
  31. package/dist/Frame.mjs +10 -2
  32. package/dist/Frame.mjs.map +1 -1
  33. package/dist/{Motion-DND6I-64.d.mts → Geometry-DJx9qrYy.d.mts} +7 -10
  34. package/dist/Geometry.d.mts +2 -0
  35. package/dist/Geometry.mjs +32 -0
  36. package/dist/Geometry.mjs.map +1 -0
  37. package/dist/LICENSE-jpeg-js +28 -0
  38. package/dist/Matching.d.mts +37 -0
  39. package/dist/{match.inpage-xOe9LNO0.mjs → Matching.mjs} +28 -4
  40. package/dist/Matching.mjs.map +1 -0
  41. package/dist/{Page-CfB6Zn1p.mjs → Page-BF5izr8R.mjs} +216 -31
  42. package/dist/Page-BF5izr8R.mjs.map +1 -0
  43. package/dist/{Page-ku6j5t-v.d.mts → Page-CvsOEorc.d.mts} +158 -185
  44. package/dist/Page.d.mts +2 -2
  45. package/dist/Page.mjs +1 -1
  46. package/dist/Released-tURbFmal.d.mts +15 -0
  47. package/dist/{Snapshot-B34hZ4Jl.d.mts → Snapshot-CtBVOtuu.d.mts} +6 -1
  48. package/dist/Snapshot.d.mts +1 -1
  49. package/dist/Snapshot.mjs.map +1 -1
  50. package/dist/Stillness-CNlvayIo.mjs +136 -0
  51. package/dist/Stillness-CNlvayIo.mjs.map +1 -0
  52. package/dist/Style-AO4V7Czt.mjs +357 -0
  53. package/dist/Style-AO4V7Czt.mjs.map +1 -0
  54. package/dist/Style.d.mts +72 -0
  55. package/dist/Style.mjs +2 -0
  56. package/dist/Url.d.mts +26 -0
  57. package/dist/Url.mjs +74 -0
  58. package/dist/Url.mjs.map +1 -0
  59. package/dist/Window-CMddGMt1.d.mts +34 -0
  60. package/dist/Window.d.mts +2 -0
  61. package/dist/Window.mjs +35 -0
  62. package/dist/Window.mjs.map +1 -0
  63. package/dist/connection-2KHI4_KN.d.mts +41 -0
  64. package/dist/connection-BTeO0Hiz.mjs +68 -0
  65. package/dist/connection-BTeO0Hiz.mjs.map +1 -0
  66. package/dist/index.d.mts +15 -17
  67. package/dist/index.mjs +11 -14
  68. package/dist/moment/Moment.d.mts +86 -0
  69. package/dist/{Moment.mjs → moment/Moment.mjs} +44 -38
  70. package/dist/moment/Moment.mjs.map +1 -0
  71. package/dist/{Plan-DJ4hEEna.d.mts → plan/index.d.mts} +169 -64
  72. package/dist/{Plan-C-d5QYS8.mjs → plan/index.mjs} +122 -155
  73. package/dist/plan/index.mjs.map +1 -0
  74. package/dist/{Policy.d.mts → policy/Policy.d.mts} +5 -9
  75. package/dist/{Policy.mjs → policy/Policy.mjs} +11 -21
  76. package/dist/policy/Policy.mjs.map +1 -0
  77. package/dist/presentation/Motion.d.mts +12 -0
  78. package/dist/{Motion.mjs → presentation/Motion.mjs} +4 -27
  79. package/dist/presentation/Motion.mjs.map +1 -0
  80. package/dist/presentation/Presentation.d.mts +30 -0
  81. package/dist/presentation/Presentation.mjs +105 -0
  82. package/dist/presentation/Presentation.mjs.map +1 -0
  83. package/dist/{Stage.d.mts → presentation/Stage.d.mts} +5 -8
  84. package/dist/{Stage.mjs → presentation/Stage.mjs} +68 -76
  85. package/dist/presentation/Stage.mjs.map +1 -0
  86. package/dist/presentation/feed.d.mts +20 -0
  87. package/dist/presentation/feed.mjs +18 -0
  88. package/dist/presentation/feed.mjs.map +1 -0
  89. package/dist/providers/Cdp.d.mts +9 -0
  90. package/dist/providers/Cdp.mjs +15 -0
  91. package/dist/providers/Cdp.mjs.map +1 -0
  92. package/dist/{Chromium.d.mts → providers/Chromium.d.mts} +6 -7
  93. package/dist/{Chromium.mjs → providers/Chromium.mjs} +7 -16
  94. package/dist/providers/Chromium.mjs.map +1 -0
  95. package/dist/providers/Released.d.mts +2 -0
  96. package/dist/providers/Released.mjs +12 -0
  97. package/dist/providers/Released.mjs.map +1 -0
  98. package/dist/stillness/Stillness.d.mts +12 -0
  99. package/dist/stillness/Stillness.mjs +2 -0
  100. package/dist/supervisor/Supervisor.d.mts +104 -0
  101. package/dist/supervisor/Supervisor.mjs +513 -0
  102. package/dist/supervisor/Supervisor.mjs.map +1 -0
  103. package/dist/testing/index.d.mts +337 -0
  104. package/dist/testing/index.mjs +515 -0
  105. package/dist/testing/index.mjs.map +1 -0
  106. package/dist/workerd/Cdp.d.mts +8 -0
  107. package/dist/workerd/Cdp.mjs +13 -0
  108. package/dist/workerd/Cdp.mjs.map +1 -0
  109. package/package.json +94 -33
  110. package/src/Action.ts +127 -0
  111. package/src/ActionPort.ts +128 -0
  112. package/src/Browser.ts +366 -225
  113. package/src/BrowserError.ts +63 -6
  114. package/src/BrowserEvent.ts +26 -25
  115. package/src/Change.ts +0 -2
  116. package/src/{internal/pictures/clock.ts → Clock.ts} +17 -6
  117. package/src/Frame.ts +14 -0
  118. package/src/Geometry.ts +48 -0
  119. package/src/{internal/reading/match.inpage.ts → Matching.ts} +34 -4
  120. package/src/Page.ts +111 -92
  121. package/src/Snapshot.ts +5 -0
  122. package/src/{internal/input/style.ts → Style.ts} +121 -14
  123. package/src/Window.ts +30 -0
  124. package/src/index.ts +8 -13
  125. package/src/internal/input/actions.ts +61 -119
  126. package/src/internal/input/dispatch.ts +3 -3
  127. package/src/internal/input/gate.ts +21 -18
  128. package/src/internal/input/guard.inpage.ts +25 -58
  129. package/src/internal/input/guard.ts +11 -20
  130. package/src/internal/input/keyboard.ts +12 -3
  131. package/src/internal/input/perform.ts +78 -60
  132. package/src/internal/input/pointer.ts +4 -2
  133. package/src/internal/input/settle.ts +7 -5
  134. package/src/internal/input/targets.inpage.ts +1 -1
  135. package/src/internal/input/targets.ts +4 -9
  136. package/src/internal/page/bridge.ts +210 -114
  137. package/src/internal/page/context.ts +23 -73
  138. package/src/internal/page/dialogs.ts +58 -0
  139. package/src/internal/page/identity.ts +6 -23
  140. package/src/internal/page/lane.ts +14 -15
  141. package/src/internal/page/navigation.ts +50 -42
  142. package/src/internal/page/openings.ts +11 -5
  143. package/src/internal/page/page.ts +44 -81
  144. package/src/internal/page/port.ts +125 -0
  145. package/src/internal/{input → page}/replies.ts +1 -1
  146. package/src/internal/page/request-owner.ts +269 -0
  147. package/src/internal/page/requests.ts +357 -0
  148. package/src/internal/page/scripts.ts +124 -0
  149. package/src/internal/pictures/capture.ts +255 -332
  150. package/src/internal/pictures/dimensions.ts +162 -0
  151. package/src/internal/pictures/frame.ts +68 -0
  152. package/src/internal/pictures/pictures.ts +57 -23
  153. package/src/internal/pictures/quiescence.ts +1 -1
  154. package/src/internal/pictures/state.ts +26 -0
  155. package/src/internal/pictures/transport.ts +21 -4
  156. package/src/internal/reading/controls.inpage.ts +5 -70
  157. package/src/internal/reading/expect.inpage.ts +13 -17
  158. package/src/internal/reading/names.inpage.ts +89 -45
  159. package/src/internal/reading/outline.inpage.ts +6 -7
  160. package/src/internal/reading/reading.ts +144 -176
  161. package/src/internal/reading/ready.inpage.ts +6 -17
  162. package/src/internal/reading/ready.ts +13 -135
  163. package/src/internal/reading/subjects.inpage.ts +83 -43
  164. package/src/internal/reading/walk.inpage.ts +33 -13
  165. package/src/internal/timeline/changes.ts +55 -6
  166. package/src/internal/timeline/events.ts +15 -5
  167. package/src/internal/timeline/history.inpage.ts +1 -1
  168. package/src/internal/timeline/record.inpage.ts +4 -1
  169. package/src/internal/timeline/window.ts +2 -1
  170. package/src/{Moment.ts → moment/Moment.ts} +13 -31
  171. package/src/{internal/timeline → moment}/words.ts +2 -2
  172. package/src/{internal/reading → plan}/choose.ts +3 -3
  173. package/src/plan/data.ts +117 -0
  174. package/src/plan/execute.ts +411 -0
  175. package/src/plan/index.ts +36 -0
  176. package/src/plan/record.ts +71 -0
  177. package/src/plan/targets.ts +71 -0
  178. package/src/{Policy.ts → policy/Policy.ts} +13 -10
  179. package/src/{Motion.ts → presentation/Motion.ts} +12 -46
  180. package/src/presentation/Presentation.ts +176 -0
  181. package/src/{Stage.ts → presentation/Stage.ts} +147 -112
  182. package/src/presentation/feed.ts +21 -0
  183. package/src/providers/Cdp.ts +16 -0
  184. package/src/{Chromium.ts → providers/Chromium.ts} +7 -10
  185. package/src/providers/Released.ts +13 -0
  186. package/src/providers/connection.ts +134 -0
  187. package/src/{internal/pictures/motion.ts → stillness/Pixels.ts} +4 -4
  188. package/src/stillness/Stillness.ts +166 -0
  189. package/src/supervisor/Supervisor.ts +170 -0
  190. package/src/supervisor/contract.ts +105 -0
  191. package/src/supervisor/lifecycle.ts +272 -0
  192. package/src/supervisor/runtime.ts +234 -0
  193. package/src/testing/TestBrowser.ts +115 -0
  194. package/src/testing/TestPage.ts +10 -0
  195. package/src/testing/evidence.ts +154 -0
  196. package/src/testing/index.ts +3 -0
  197. package/src/testing/model.ts +222 -0
  198. package/src/testing/page.ts +360 -0
  199. package/src/workerd/Cdp.ts +11 -0
  200. package/dist/Browser-BwCldIff.mjs +0 -629
  201. package/dist/Browser-BwCldIff.mjs.map +0 -1
  202. package/dist/Cdp.d.mts +0 -32
  203. package/dist/Cdp.mjs +0 -61
  204. package/dist/Cdp.mjs.map +0 -1
  205. package/dist/Change-DNvztNLu.mjs +0 -138
  206. package/dist/Change-DNvztNLu.mjs.map +0 -1
  207. package/dist/Chromium.mjs.map +0 -1
  208. package/dist/Expect.d.mts +0 -62
  209. package/dist/Expect.mjs +0 -114
  210. package/dist/Expect.mjs.map +0 -1
  211. package/dist/Moment.d.mts +0 -2
  212. package/dist/Moment.mjs.map +0 -1
  213. package/dist/Motion.d.mts +0 -2
  214. package/dist/Motion.mjs.map +0 -1
  215. package/dist/Page-CfB6Zn1p.mjs.map +0 -1
  216. package/dist/Plan-C-d5QYS8.mjs.map +0 -1
  217. package/dist/Plan.d.mts +0 -2
  218. package/dist/Plan.mjs +0 -2
  219. package/dist/Policy.mjs.map +0 -1
  220. package/dist/Presentation.d.mts +0 -48
  221. package/dist/Presentation.mjs +0 -118
  222. package/dist/Presentation.mjs.map +0 -1
  223. package/dist/Stage.mjs.map +0 -1
  224. package/dist/Supervisor-2mPjIYYs.mjs +0 -676
  225. package/dist/Supervisor-2mPjIYYs.mjs.map +0 -1
  226. package/dist/Supervisor-mVPeEUp8.d.mts +0 -317
  227. package/dist/Supervisor.d.mts +0 -2
  228. package/dist/Supervisor.mjs +0 -2
  229. package/dist/context-w3NJPRLo.mjs +0 -335
  230. package/dist/context-w3NJPRLo.mjs.map +0 -1
  231. package/dist/match.inpage-xOe9LNO0.mjs.map +0 -1
  232. package/dist/page-BKwfF6z-.mjs +0 -5099
  233. package/dist/page-BKwfF6z-.mjs.map +0 -1
  234. package/dist/url-Cd04Okid.mjs +0 -264
  235. package/dist/url-Cd04Okid.mjs.map +0 -1
  236. package/src/Cdp.ts +0 -101
  237. package/src/Expect.ts +0 -180
  238. package/src/Plan.ts +0 -674
  239. package/src/Presentation.ts +0 -196
  240. package/src/Supervisor.ts +0 -632
  241. package/src/internal/supervisor/lifecycle.ts +0 -484
  242. /package/src/{internal/page/url.ts → Url.ts} +0 -0
  243. /package/src/{internal/pictures → stillness}/utilsBundle.d.ts +0 -0
@@ -1,39 +1,36 @@
1
- import { t as BrowserError } from "./BrowserError-Coy7EW1N.mjs";
2
- import { b as Subject, i as BrowserEvent } from "./BrowserEvent-dq6FRT8w.mjs";
3
- import { m as ReadyOptions, o as Found, u as Page } from "./Page-ku6j5t-v.mjs";
1
+ import { t as BrowserError } from "../BrowserError-BlcmLVzn.mjs";
2
+ import { b as Subject, r as BrowserEvent } from "../BrowserEvent-lLqJ3GJS.mjs";
3
+ import { c as Found, f as Page, g as ReadyOptions } from "../Page-CvsOEorc.mjs";
4
4
  import { Duration, Effect, Schema } from "effect";
5
- //#region src/internal/reading/choose.d.ts
5
+ //#region src/plan/choose.d.ts
6
6
  declare const Missing_base: Schema.Class<Missing, Schema.TaggedStruct<"Missing", {}>, import("effect/Cause").YieldableError>;
7
7
  /** Nothing on the page has the step's role and name. */
8
- declare class Missing extends Missing_base {
8
+ export declare class Missing extends Missing_base {
9
9
  get message(): string;
10
10
  }
11
11
  declare const Ambiguous_base: Schema.Class<Ambiguous, Schema.TaggedStruct<"Ambiguous", {
12
12
  readonly count: Schema.Int;
13
13
  }>, import("effect/Cause").YieldableError>;
14
14
  /** Several elements match the step's subject equally well, and nothing tells them apart. */
15
- declare class Ambiguous extends Ambiguous_base {
15
+ export declare class Ambiguous extends Ambiguous_base {
16
16
  get message(): string;
17
17
  }
18
18
  declare const Drifted_base: Schema.Class<Drifted, Schema.TaggedStruct<"Drifted", {
19
19
  readonly detail: Schema.String;
20
20
  }>, import("effect/Cause").YieldableError>;
21
21
  /** The page is not where the recording was: another site, or no element with its context. */
22
- declare class Drifted extends Drifted_base {
22
+ export declare class Drifted extends Drifted_base {
23
23
  get message(): string;
24
24
  }
25
- declare namespace Plan_d_exports {
26
- export { Ambiguous, Drifted, Expected, Missing, Plan, Receipt, ReplayError, ReplayOptions, Step, StepAction, Stopped, TakeOptions, Uncertain, fromEvents, locate, repeatable, replay, restore, take };
27
- }
28
- declare const StepAction: Schema.Literals<readonly ["navigate", "back", "reload", "click", "hover", "drag", "type", "press", "scroll", "select"]>;
29
- type StepAction = typeof StepAction.Type;
25
+ //#endregion
26
+ //#region src/plan/data.d.ts
30
27
  /**
31
28
  * What a step leaves. `durable` asserts an author-chosen, lasting read-back of this operation,
32
29
  * such as its uniquely named saved receipt or exact operation URL. Only Appeared and an exact
33
30
  * Navigated URL allow it; a toast, absence or relative navigation cannot establish recovery.
34
31
  * Relative navigation measures observed change from dispatch, without asserting causality.
35
32
  */
36
- declare const Expected: Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
33
+ export declare const Expected: Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
37
34
  readonly checked: Schema.Boolean;
38
35
  }>, Schema.TaggedStruct<"Appeared", {
39
36
  readonly query: Schema.Struct<{
@@ -56,53 +53,155 @@ declare const Expected: Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
56
53
  readonly url: Schema.optional<Schema.Never>;
57
54
  readonly durable: Schema.optional<Schema.Never>;
58
55
  }>]>;
59
- type Expected = typeof Expected.Type;
56
+ export type Expected = typeof Expected.Type;
60
57
  declare const Step_base: Schema.Class<Step, Schema.Struct<{
61
- readonly action: Schema.Literals<readonly ["navigate", "back", "reload", "click", "hover", "drag", "type", "press", "scroll", "select"]>;
62
- /**
63
- * The ending address, or a later recorded navigation before the next action began. Empty when
64
- * unknown; a delayed navigation can be stronger arrival evidence than the action's ending URL.
65
- */
58
+ readonly action: Schema.refine<{
59
+ readonly _tag: "Back";
60
+ } | {
61
+ readonly _tag: "Click";
62
+ readonly target: string | {
63
+ readonly x: number;
64
+ readonly y: number;
65
+ };
66
+ readonly options?: {
67
+ readonly button?: "left" | "middle" | "right" | undefined;
68
+ readonly clickCount?: number | undefined;
69
+ readonly holdMillis?: number | undefined;
70
+ } | undefined;
71
+ } | {
72
+ readonly _tag: "Drag";
73
+ readonly from: string | {
74
+ readonly x: number;
75
+ readonly y: number;
76
+ };
77
+ readonly to: string | {
78
+ readonly x: number;
79
+ readonly y: number;
80
+ };
81
+ } | {
82
+ readonly _tag: "Goto";
83
+ readonly url: string;
84
+ } | {
85
+ readonly _tag: "Hover";
86
+ readonly target: string | {
87
+ readonly x: number;
88
+ readonly y: number;
89
+ };
90
+ } | {
91
+ readonly _tag: "Press";
92
+ readonly keys: string;
93
+ readonly options?: {
94
+ readonly on?: string | undefined;
95
+ readonly times?: number | undefined;
96
+ readonly holdMillis?: number | undefined;
97
+ } | undefined;
98
+ } | {
99
+ readonly _tag: "Reload";
100
+ } | {
101
+ readonly _tag: "Scroll";
102
+ readonly options?: {
103
+ readonly at?: string | {
104
+ readonly x: number;
105
+ readonly y: number;
106
+ } | undefined;
107
+ readonly dx?: number | undefined;
108
+ readonly dy?: number | undefined;
109
+ } | undefined;
110
+ } | {
111
+ readonly _tag: "Select";
112
+ readonly ref: string;
113
+ readonly values: readonly string[];
114
+ } | {
115
+ readonly _tag: "Type";
116
+ readonly text: string;
117
+ readonly options?: {
118
+ readonly into?: string | undefined;
119
+ readonly replace?: boolean | undefined;
120
+ readonly submit?: boolean | undefined;
121
+ readonly secret?: boolean | undefined;
122
+ } | undefined;
123
+ }, Schema.TaggedUnion<{
124
+ readonly Act: Schema.TaggedStruct<"Act", {
125
+ readonly document: Schema.Int;
126
+ }>;
127
+ readonly Back: Schema.TaggedStruct<"Back", {}>;
128
+ readonly Click: Schema.TaggedStruct<"Click", {
129
+ readonly target: Schema.Union<readonly [Schema.String, Schema.Struct<{
130
+ readonly x: Schema.Finite;
131
+ readonly y: Schema.Finite;
132
+ }>]>;
133
+ readonly options: Schema.optional<Schema.Struct<{
134
+ readonly button: Schema.optional<Schema.Literals<readonly ["left", "right", "middle"]>>;
135
+ readonly clickCount: Schema.optional<Schema.Finite>;
136
+ readonly holdMillis: Schema.optional<Schema.Finite>;
137
+ }>>;
138
+ }>;
139
+ readonly Drag: Schema.TaggedStruct<"Drag", {
140
+ readonly from: Schema.Union<readonly [Schema.String, Schema.Struct<{
141
+ readonly x: Schema.Finite;
142
+ readonly y: Schema.Finite;
143
+ }>]>;
144
+ readonly to: Schema.Union<readonly [Schema.String, Schema.Struct<{
145
+ readonly x: Schema.Finite;
146
+ readonly y: Schema.Finite;
147
+ }>]>;
148
+ }>;
149
+ readonly Goto: Schema.TaggedStruct<"Goto", {
150
+ readonly url: Schema.String;
151
+ }>;
152
+ readonly Hover: Schema.TaggedStruct<"Hover", {
153
+ readonly target: Schema.Union<readonly [Schema.String, Schema.Struct<{
154
+ readonly x: Schema.Finite;
155
+ readonly y: Schema.Finite;
156
+ }>]>;
157
+ }>;
158
+ readonly Press: Schema.TaggedStruct<"Press", {
159
+ readonly keys: Schema.String;
160
+ readonly options: Schema.optional<Schema.Struct<{
161
+ readonly on: Schema.optional<Schema.String>;
162
+ readonly times: Schema.optional<Schema.Finite>;
163
+ readonly holdMillis: Schema.optional<Schema.Finite>;
164
+ }>>;
165
+ }>;
166
+ readonly Reload: Schema.TaggedStruct<"Reload", {}>;
167
+ readonly Scroll: Schema.TaggedStruct<"Scroll", {
168
+ readonly options: Schema.optional<Schema.Struct<{
169
+ readonly at: Schema.optional<Schema.Union<readonly [Schema.String, Schema.Struct<{
170
+ readonly x: Schema.Finite;
171
+ readonly y: Schema.Finite;
172
+ }>]>>;
173
+ readonly dx: Schema.optional<Schema.Finite>;
174
+ readonly dy: Schema.optional<Schema.Finite>;
175
+ }>>;
176
+ }>;
177
+ readonly Select: Schema.TaggedStruct<"Select", {
178
+ readonly ref: Schema.String;
179
+ readonly values: Schema.$Array<Schema.String>;
180
+ }>;
181
+ readonly Type: Schema.TaggedStruct<"Type", {
182
+ readonly text: Schema.String;
183
+ readonly options: Schema.optional<Schema.Struct<{
184
+ readonly into: Schema.optional<Schema.String>;
185
+ readonly replace: Schema.optional<Schema.Boolean>;
186
+ readonly submit: Schema.optional<Schema.Boolean>;
187
+ readonly secret: Schema.optional<Schema.Boolean>;
188
+ }>>;
189
+ }>;
190
+ }>>;
191
+ /** The address reached, including a delayed navigation before the next action began. */
66
192
  readonly url: Schema.String;
67
- /** A navigation's requested address, or the keys a press pressed. */
68
- readonly target: Schema.optional<Schema.String>;
69
193
  readonly subject: Schema.optional<typeof Subject>;
70
194
  /** Where a drag ended. */
71
195
  readonly to: Schema.optional<typeof Subject>;
72
- /** The viewport point a step aimed at, when it aimed at a point, and a drag's end point. */
73
- readonly point: Schema.optional<Schema.Struct<{
74
- readonly x: Schema.Finite;
75
- readonly y: Schema.Finite;
76
- }>>;
77
- readonly toPoint: Schema.optional<Schema.Struct<{
78
- readonly x: Schema.Finite;
79
- readonly y: Schema.Finite;
80
- }>>;
81
- /** The box of what a step aimed at by point found there, so replay aims at the same place in it. */
196
+ /** The recorded box keeps a point at the same relative position within its subject. */
82
197
  readonly box: Schema.optional<Schema.Struct<{
83
198
  readonly x: Schema.Finite;
84
199
  readonly y: Schema.Finite;
85
200
  readonly width: Schema.Finite;
86
201
  readonly height: Schema.Finite;
87
202
  }>>;
88
- /**
89
- * The input slot whose text a `type` step types, or whose address a `navigate` step goes to, as
90
- * its recorded address had a credential withheld.
91
- */
203
+ /** A slot replaces recorded typing text or a navigation address with withheld credentials. */
92
204
  readonly input: Schema.optional<Schema.String>;
93
- /** The slot's text went into a secret field, so replay types it into nothing else. */
94
- readonly secret: Schema.optional<Schema.Literal<true>>;
95
- readonly options: Schema.optional<Schema.Struct<{
96
- readonly button: Schema.optional<Schema.Literals<readonly ["left", "right", "middle"]>>;
97
- readonly clickCount: Schema.optional<Schema.Finite>;
98
- readonly holdMillis: Schema.optional<Schema.Finite>;
99
- readonly replace: Schema.optional<Schema.Boolean>;
100
- readonly submit: Schema.optional<Schema.Boolean>;
101
- readonly times: Schema.optional<Schema.Finite>;
102
- readonly dx: Schema.optional<Schema.Finite>;
103
- readonly dy: Schema.optional<Schema.Finite>;
104
- readonly values: Schema.optional<Schema.$Array<Schema.String>>;
105
- }>>;
106
205
  readonly expect: Schema.optional<Schema.Union<readonly [Schema.TaggedStruct<"Checked", {
107
206
  readonly checked: Schema.Boolean;
108
207
  }>, Schema.TaggedStruct<"Appeared", {
@@ -128,13 +227,13 @@ declare const Step_base: Schema.Class<Step, Schema.Struct<{
128
227
  }>]>>;
129
228
  }>, {}>;
130
229
  /** One recorded step: the action, what it acted on, and what else it was asked. */
131
- declare class Step extends Step_base {}
230
+ export declare class Step extends Step_base {}
132
231
  declare const Plan_base: Schema.Class<Plan, Schema.Struct<{
133
- readonly version: Schema.Literals<readonly [1, 2]>;
232
+ readonly version: Schema.Literal<3>;
134
233
  readonly steps: Schema.$Array<typeof Step>;
135
234
  }>, {}>;
136
- declare class Plan extends Plan_base {
137
- /** Choose the encoding version from the steps; simple recordings remain version 1. */
235
+ export declare class Plan extends Plan_base {
236
+ /** Version 3 carries canonical typed Actions; prior string-action encodings are rejected. */
138
237
  static new(steps: ReadonlyArray<Step>): Plan;
139
238
  /** The input slots its steps type, in order; replay needs text for each. */
140
239
  get inputs(): ReadonlyArray<string>;
@@ -146,18 +245,18 @@ declare const Receipt_base: Schema.Class<Receipt, Schema.Struct<{
146
245
  readonly at: Schema.Finite;
147
246
  }>, {}>;
148
247
  /** One completed step, on the page's host clock. `verified` means its expected effect was seen. */
149
- declare class Receipt extends Receipt_base {}
248
+ export declare class Receipt extends Receipt_base {}
150
249
  declare const Stopped_base: Schema.Class<Stopped, Schema.Struct<{
151
250
  readonly step: Schema.Int;
152
251
  readonly input: Schema.Literals<readonly ["unsent", "unknown"]>;
153
252
  }>, {}>;
154
253
  /** Durable stopping data. A begun step without a receipt must be restored as `unknown`. */
155
- declare class Stopped extends Stopped_base {}
254
+ export declare class Stopped extends Stopped_base {}
156
255
  declare const Uncertain_base: Schema.Class<Uncertain, Schema.TaggedStruct<"Uncertain", {
157
256
  readonly detail: Schema.String;
158
257
  }>, import("effect/Cause").YieldableError>;
159
258
  /** Repeating this step could repeat an unresolved effect; the consumer must reconcile it. */
160
- declare class Uncertain extends Uncertain_base {
259
+ export declare class Uncertain extends Uncertain_base {
161
260
  get message(): string;
162
261
  }
163
262
  declare const ReplayError_base: Schema.Class<ReplayError, Schema.TaggedStruct<"ReplayError", {
@@ -167,20 +266,26 @@ declare const ReplayError_base: Schema.Class<ReplayError, Schema.TaggedStruct<"R
167
266
  readonly receipts: Schema.$Array<typeof Receipt>;
168
267
  }>, import("effect/Cause").YieldableError>;
169
268
  /** Where replay stopped, counting steps from 0, why, and the steps that completed before it. */
170
- declare class ReplayError extends ReplayError_base {
269
+ export declare class ReplayError extends ReplayError_base {
171
270
  get stopped(): Stopped;
172
271
  get message(): string;
173
272
  }
273
+ //#endregion
274
+ //#region src/plan/record.d.ts
174
275
  /**
175
276
  * The walk one page's events record: the completed actions of the page that acted first, in
176
277
  * order. `page.recentEvents` gives them, or `browser.events()` read until the walk ends.
177
278
  */
178
- declare const fromEvents: (events: Iterable<BrowserEvent>) => Plan;
279
+ export declare const fromEvents: (events: Iterable<BrowserEvent>) => Plan;
280
+ //#endregion
281
+ //#region src/plan/targets.d.ts
179
282
  /**
180
283
  * The one element on the page that a subject names, by role, name and context (see `Plan`),
181
284
  * looking again for two seconds while the page may still be drawing it.
182
285
  */
183
- declare const locate: (page: Page, subject: Subject) => Effect.Effect<Found, Ambiguous | BrowserError | Drifted | Missing, never>;
286
+ export declare const locate: (page: Page, subject: Subject) => Effect.Effect<Found, Ambiguous | BrowserError | Drifted | Missing, never>;
287
+ //#endregion
288
+ //#region src/plan/execute.d.ts
184
289
  interface TakeOptions {
185
290
  /** How each step waits first, except an opening navigation, or false. No final-step wait. */
186
291
  readonly settle?: ReadyOptions | false | undefined;
@@ -198,19 +303,19 @@ interface ReplayOptions extends TakeOptions {
198
303
  * Input that can be repeated without repeating a commitment. `take` also validates a Checked
199
304
  * target's boolean state before input. Back/reload can resubmit a form.
200
305
  */
201
- declare const repeatable: (step: Step) => boolean;
306
+ export declare const repeatable: (step: Step) => boolean;
202
307
  /**
203
308
  * Take one step. Unknown non-repeatable input is never resent: only positive durable read-back
204
309
  * can skip it. An interrupted call remains interrupted; persist begun-before-call in the consumer
205
310
  * and treat a missing receipt as Stopped{input: "unknown"}, including after process restart.
206
311
  */
207
- declare const take: (page: Page, plan: Plan, at: number | Stopped, options?: TakeOptions | undefined) => Effect.Effect<Receipt, ReplayError, never>;
312
+ export declare const take: (page: Page, plan: Plan, at: number | Stopped, options?: TakeOptions | undefined) => Effect.Effect<Receipt, ReplayError, never>;
208
313
  /** Take a plan's steps from a fresh index or durable stopping point, returning completed receipts. */
209
- declare const replay: (page: Page, plan: Plan, options?: ReplayOptions) => Effect.Effect<Receipt[], ReplayError, never>;
314
+ export declare const replay: (page: Page, plan: Plan, options?: ReplayOptions) => Effect.Effect<Receipt[], ReplayError, never>;
210
315
  /** Restore prior steps on a fresh page; unresolved commitments require positive durable evidence. */
211
- declare const restore: (page: Page, plan: Plan, options?: TakeOptions & {
316
+ export declare const restore: (page: Page, plan: Plan, options?: TakeOptions & {
212
317
  readonly upTo?: number | undefined;
213
318
  }) => Effect.Effect<Receipt[], ReplayError, never>;
214
319
  //#endregion
215
- export { take as _, ReplayError as a, Missing as b, StepAction as c, Uncertain as d, fromEvents as f, restore as g, replay as h, Receipt as i, Stopped as l, repeatable as m, Plan as n, ReplayOptions as o, locate as p, Plan_d_exports as r, Step as s, Expected as t, TakeOptions as u, Ambiguous as v, Drifted as y };
216
- //# sourceMappingURL=Plan-DJ4hEEna.d.mts.map
320
+ export type { ReplayOptions, TakeOptions };
321
+ //# sourceMappingURL=index.d.mts.map