effect-browser 0.2.0-beta.1 → 0.2.0-beta.3
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.
- package/README.md +13 -2
- package/dist/Browser.d.mts +1 -1
- package/dist/{BrowserData-CRuxEZcn.d.mts → BrowserData-D_zsf79q.d.mts} +13 -2
- package/dist/BrowserData.d.mts +1 -1
- package/dist/BrowserData.mjs +16 -3
- package/dist/BrowserData.mjs.map +1 -1
- package/dist/{BrowserRuntime-Coz-5DYb.d.mts → BrowserRuntime-e7MXqjOK.d.mts} +2 -2
- package/dist/{BrowserRuntime-DViKNUdD.mjs → BrowserRuntime-xBCLDy_5.mjs} +16 -8
- package/dist/{BrowserRuntime-DViKNUdD.mjs.map → BrowserRuntime-xBCLDy_5.mjs.map} +1 -1
- package/dist/BrowserRuntime.d.mts +1 -1
- package/dist/BrowserRuntime.mjs +1 -1
- package/dist/CaptureData.d.mts +1 -1
- package/dist/Chromium.d.mts +1 -1
- package/dist/Chromium.mjs +1 -1
- package/dist/PageControl.d.mts +1 -1
- package/dist/Testing.d.mts +2 -2
- package/dist/Testing.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -134,7 +134,7 @@ Chromium identity is `{ provider: "chromium", id }`, identifying this ownership
|
|
|
134
134
|
```ts
|
|
135
135
|
const status = yield * session.status;
|
|
136
136
|
const diagnostics = yield * session.diagnostics;
|
|
137
|
-
// status: { phase, reason, generation, busy, unresolvedDispatch }
|
|
137
|
+
// status: { phase, reason, generation, busy, unresolvedDispatch, actions: { used, maximum } }
|
|
138
138
|
// diagnostics: { records, total, dropped, truncated }
|
|
139
139
|
```
|
|
140
140
|
|
|
@@ -147,6 +147,16 @@ new case. `reason` retains the original terminal trigger through later cleanup.
|
|
|
147
147
|
active admission or pending policy cleanup. Action-count or host-read exhaustion leaves the owner
|
|
148
148
|
open and is not a terminal failure.
|
|
149
149
|
|
|
150
|
+
`actions` is the model-reachable allowance as the owner counts it: `maximum` is the policy's
|
|
151
|
+
`maxActions` and `used` the operations admitted against it, whether they then succeeded or not.
|
|
152
|
+
Every step of `fillForm` and its submit is an action, and so is each reading an agent Tool takes
|
|
153
|
+
after its action; a form's verification, `checkpoint`, `controlFacts` and `status` itself are not.
|
|
154
|
+
A refused operation is not counted, so `used` never passes `maximum`, and at `maximum` the next
|
|
155
|
+
action fails `Limit { dimension: "actions" }` undispatched while the owner stays open. A host that
|
|
156
|
+
runs one long session reads `used` instead of counting actions itself. `BrowserPolicy.maxActions`
|
|
157
|
+
accepts 1–1,000,000 (100 by default, like the host-read allowance's bound); a long session raises it
|
|
158
|
+
together with `maxElapsedMillis`.
|
|
159
|
+
|
|
150
160
|
`unresolvedDispatch` is separate from the trigger. Idle expiry records `expired` without inventing
|
|
151
161
|
an unknown dispatch. Expiry or a fail-session callback overlapping native work retains both the
|
|
152
162
|
known trigger and unresolved control. A fence or borrowed disconnection is not acknowledgement
|
|
@@ -469,7 +479,8 @@ Exhaustion reports `Limit { dimension: "host-reads", maximum, observed } / undis
|
|
|
469
479
|
owner stays open. These operations still obey the same lifetime, bytes, deadline and fail-fast
|
|
470
480
|
concurrency bounds: a checkpoint can execute page script and is not unlimited free work.
|
|
471
481
|
`observe`, `readText`, `screenshot` and `waitFor` continue consuming the model-reachable action
|
|
472
|
-
allowance. Neither budget is a tool parameter, and `maxActions`
|
|
482
|
+
allowance, which `status.actions` reports. Neither budget is a tool parameter, and `maxActions`
|
|
483
|
+
has not become mutations-only.
|
|
473
484
|
|
|
474
485
|
### Real pointer and wheel input
|
|
475
486
|
|
package/dist/Browser.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { f as Plan, g as ReadinessOutcome, s as Bootstrap_d_exports, t as BindingDiagnostics } from "./Bootstrap-B9UUXsvF.mjs";
|
|
2
2
|
import { BrowserError, InitializationError } from "./Errors.mjs";
|
|
3
|
-
import { $ as TypeRequest, D as NavigationResult, E as NavigateRequest, F as PointerMoveRequest, H as ScreenshotResult, J as SessionStatus, L as PressRequest, N as PageInfo, O as Observation, Q as TextResult, R as ReadTextRequest, S as InputReceipt, U as ScrollRequest, V as ScreenshotRequest, W as SelectOptions, X as Target, Y as StartNavigationRequest, _ as FrameInfo, at as WheelRequest, c as ClickRequest, d as FillFormRequest, et as Viewport, f as FillFormResult, i as BrowserDiagnostics, it as WaitForElementRequest, j as ObservedElement, k as ObservationOptions, l as ControlFacts, o as Checkpoint, p as FillRequest, s as CheckpointOptions, t as ActionResult, u as FillFormOptions, v as HoverRequest, w as KeyStroke } from "./BrowserData-
|
|
3
|
+
import { $ as TypeRequest, D as NavigationResult, E as NavigateRequest, F as PointerMoveRequest, H as ScreenshotResult, J as SessionStatus, L as PressRequest, N as PageInfo, O as Observation, Q as TextResult, R as ReadTextRequest, S as InputReceipt, U as ScrollRequest, V as ScreenshotRequest, W as SelectOptions, X as Target, Y as StartNavigationRequest, _ as FrameInfo, at as WheelRequest, c as ClickRequest, d as FillFormRequest, et as Viewport, f as FillFormResult, i as BrowserDiagnostics, it as WaitForElementRequest, j as ObservedElement, k as ObservationOptions, l as ControlFacts, o as Checkpoint, p as FillRequest, s as CheckpointOptions, t as ActionResult, u as FillFormOptions, v as HoverRequest, w as KeyStroke } from "./BrowserData-D_zsf79q.mjs";
|
|
4
4
|
import { Effect, Scope } from "effect";
|
|
5
5
|
//#region src/Browser.d.ts
|
|
6
6
|
/**
|
|
@@ -42,6 +42,15 @@ declare const SessionStatus_base: Schema.Class<SessionStatus, Schema.Struct<{
|
|
|
42
42
|
readonly generation: Schema.Natural;
|
|
43
43
|
readonly busy: Schema.Boolean;
|
|
44
44
|
readonly unresolvedDispatch: Schema.Boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Actions admitted against the policy's `maxActions`, as the owner counted them. Host reads
|
|
47
|
+
* (`checkpoint`, `controlFacts`) and uncharged reads such as a form's verification are not
|
|
48
|
+
* actions. `used` equals `maximum` once the allowance is spent; the owner stays open.
|
|
49
|
+
*/
|
|
50
|
+
readonly actions: Schema.Struct<{
|
|
51
|
+
readonly used: Schema.Natural;
|
|
52
|
+
readonly maximum: Schema.Int;
|
|
53
|
+
}>;
|
|
45
54
|
}>, {}>;
|
|
46
55
|
/** Host-only admission evidence. Neither an admission token nor proof of remote termination. */
|
|
47
56
|
declare class SessionStatus extends SessionStatus_base {}
|
|
@@ -164,6 +173,7 @@ declare const PageExecutionState_base: Schema.Class<PageExecutionState, Schema.S
|
|
|
164
173
|
declare class PageExecutionState extends PageExecutionState_base {}
|
|
165
174
|
declare const BrowserPolicy_base: Schema.Class<BrowserPolicy, Schema.Struct<{
|
|
166
175
|
readonly network: Schema.TaggedStruct<"Unrestricted", {}>;
|
|
176
|
+
/** Model-reachable actions for the session's lifetime, 1–1,000,000. `status.actions` reads use. */
|
|
167
177
|
readonly maxActions: Schema.Int;
|
|
168
178
|
readonly maxElapsedMillis: Schema.Int;
|
|
169
179
|
readonly maxReturnedBytes: Schema.Int;
|
|
@@ -173,7 +183,8 @@ declare class BrowserPolicy extends BrowserPolicy_base {
|
|
|
173
183
|
/**
|
|
174
184
|
* Conservative bounds for trusted host code: 100 actions, five minutes, 2 MiB returned.
|
|
175
185
|
* The network choice is spelled out in the name because this runtime cannot prove a
|
|
176
|
-
* narrower one; override any bound, never the network.
|
|
186
|
+
* narrower one; override any bound, never the network. A long session raises `maxActions`
|
|
187
|
+
* (up to 1,000,000) and `maxElapsedMillis` (up to six hours) together.
|
|
177
188
|
*/
|
|
178
189
|
static unrestricted(bounds?: Partial<Pick<BrowserPolicy, "maxActions" | "maxElapsedMillis" | "maxReturnedBytes">>): BrowserPolicy;
|
|
179
190
|
}
|
|
@@ -489,4 +500,4 @@ type AutomationOptions = typeof AutomationOptions.Type;
|
|
|
489
500
|
//#endregion
|
|
490
501
|
export { TypeRequest as $, ObservedControl as A, SafeFilename as B, KeyModifier as C, NavigationResult as D, NavigateRequest as E, PointerMoveRequest as F, Selector as G, ScreenshotResult as H, PositiveInt as I, SessionStatus as J, SessionPhase as K, PressRequest as L, PageExecutionState as M, PageInfo as N, Observation as O, PageSuspension as P, TextResult as Q, ReadTextRequest as R, InputReceipt as S, NamedKey as T, ScrollRequest as U, ScreenshotRequest as V, SelectOptions as W, Target as X, StartNavigationRequest as Y, TargetUrl as Z, FrameInfo as _, BrowserPolicy as a, WheelRequest as at, InlineFile as b, ClickRequest as c, FillFormRequest as d, Viewport as et, FillFormResult as f, FormStop as g, FormFieldResult as h, BrowserDiagnostics as i, WaitForElementRequest as it, ObservedElement as j, ObservationOptions as k, ControlFacts as l, FormField as m, AutomationOptions as n, ViewportPoint as nt, Checkpoint as o, FillRequest as p, SessionReason as q, BrowserDiagnostic as r, ViewportRect as rt, CheckpointOptions as s, ActionResult as t, ViewportEvidence as tt, FillFormOptions as u, HoverRequest as v, KeyStroke as w, InlineFiles as x, Identifier as y, ReadingMatch as z };
|
|
491
502
|
export {};
|
|
492
|
-
//# sourceMappingURL=BrowserData-
|
|
503
|
+
//# sourceMappingURL=BrowserData-D_zsf79q.d.mts.map
|
package/dist/BrowserData.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { $ as TypeRequest, A as ObservedControl, B as SafeFilename, C as KeyModifier, D as NavigationResult, E as NavigateRequest, F as PointerMoveRequest, G as Selector, H as ScreenshotResult, I as PositiveInt, J as SessionStatus, K as SessionPhase, L as PressRequest, M as PageExecutionState, N as PageInfo, O as Observation, P as PageSuspension, Q as TextResult, R as ReadTextRequest, S as InputReceipt, T as NamedKey, U as ScrollRequest, V as ScreenshotRequest, W as SelectOptions, X as Target, Y as StartNavigationRequest, Z as TargetUrl, _ as FrameInfo, a as BrowserPolicy, at as WheelRequest, b as InlineFile, c as ClickRequest, d as FillFormRequest, et as Viewport, f as FillFormResult, g as FormStop, h as FormFieldResult, i as BrowserDiagnostics, it as WaitForElementRequest, j as ObservedElement, k as ObservationOptions, l as ControlFacts, m as FormField, n as AutomationOptions, nt as ViewportPoint, o as Checkpoint, p as FillRequest, q as SessionReason, r as BrowserDiagnostic, rt as ViewportRect, s as CheckpointOptions, t as ActionResult, tt as ViewportEvidence, u as FillFormOptions, v as HoverRequest, w as KeyStroke, x as InlineFiles, y as Identifier, z as ReadingMatch } from "./BrowserData-
|
|
1
|
+
import { $ as TypeRequest, A as ObservedControl, B as SafeFilename, C as KeyModifier, D as NavigationResult, E as NavigateRequest, F as PointerMoveRequest, G as Selector, H as ScreenshotResult, I as PositiveInt, J as SessionStatus, K as SessionPhase, L as PressRequest, M as PageExecutionState, N as PageInfo, O as Observation, P as PageSuspension, Q as TextResult, R as ReadTextRequest, S as InputReceipt, T as NamedKey, U as ScrollRequest, V as ScreenshotRequest, W as SelectOptions, X as Target, Y as StartNavigationRequest, Z as TargetUrl, _ as FrameInfo, a as BrowserPolicy, at as WheelRequest, b as InlineFile, c as ClickRequest, d as FillFormRequest, et as Viewport, f as FillFormResult, g as FormStop, h as FormFieldResult, i as BrowserDiagnostics, it as WaitForElementRequest, j as ObservedElement, k as ObservationOptions, l as ControlFacts, m as FormField, n as AutomationOptions, nt as ViewportPoint, o as Checkpoint, p as FillRequest, q as SessionReason, r as BrowserDiagnostic, rt as ViewportRect, s as CheckpointOptions, t as ActionResult, tt as ViewportEvidence, u as FillFormOptions, v as HoverRequest, w as KeyStroke, x as InlineFiles, y as Identifier, z as ReadingMatch } from "./BrowserData-D_zsf79q.mjs";
|
|
2
2
|
export { ActionResult, AutomationOptions, BrowserDiagnostic, BrowserDiagnostics, BrowserPolicy, Checkpoint, CheckpointOptions, ClickRequest, ControlFacts, FillFormOptions, FillFormRequest, FillFormResult, FillRequest, FormField, FormFieldResult, FormStop, FrameInfo, HoverRequest, Identifier, InlineFile, InlineFiles, InputReceipt, KeyModifier, KeyStroke, NamedKey, NavigateRequest, NavigationResult, Observation, ObservationOptions, ObservedControl, ObservedElement, PageExecutionState, PageInfo, PageSuspension, PointerMoveRequest, PositiveInt, PressRequest, ReadTextRequest, ReadingMatch, SafeFilename, ScreenshotRequest, ScreenshotResult, ScrollRequest, SelectOptions, Selector, SessionPhase, SessionReason, SessionStatus, StartNavigationRequest, Target, TargetUrl, TextResult, TypeRequest, Viewport, ViewportEvidence, ViewportPoint, ViewportRect, WaitForElementRequest, WheelRequest };
|
|
3
3
|
export {};
|
package/dist/BrowserData.mjs
CHANGED
|
@@ -54,13 +54,24 @@ const SessionReason = Schema.Literals([
|
|
|
54
54
|
"closed"
|
|
55
55
|
]);
|
|
56
56
|
const DiagnosticCounter = Schema.Natural.check(Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));
|
|
57
|
+
/** The bound on one session's model-reachable actions, like the host-read allowance's. */
|
|
58
|
+
const ActionAllowance = PositiveInt.check(Schema.isLessThanOrEqualTo(1e6));
|
|
57
59
|
/** Host-only admission evidence. Neither an admission token nor proof of remote termination. */
|
|
58
60
|
var SessionStatus = class extends Schema.Class("BrowserSessionStatus")({
|
|
59
61
|
phase: SessionPhase,
|
|
60
62
|
reason: Schema.NullOr(SessionReason),
|
|
61
63
|
generation: DiagnosticCounter,
|
|
62
64
|
busy: Schema.Boolean,
|
|
63
|
-
unresolvedDispatch: Schema.Boolean
|
|
65
|
+
unresolvedDispatch: Schema.Boolean,
|
|
66
|
+
/**
|
|
67
|
+
* Actions admitted against the policy's `maxActions`, as the owner counted them. Host reads
|
|
68
|
+
* (`checkpoint`, `controlFacts`) and uncharged reads such as a form's verification are not
|
|
69
|
+
* actions. `used` equals `maximum` once the allowance is spent; the owner stays open.
|
|
70
|
+
*/
|
|
71
|
+
actions: Schema.Struct({
|
|
72
|
+
used: Schema.Natural.check(Schema.isLessThanOrEqualTo(1e6)),
|
|
73
|
+
maximum: ActionAllowance
|
|
74
|
+
}).check(Schema.makeFilter((actions) => actions.used <= actions.maximum, { title: "no more actions used than allowed" }))
|
|
64
75
|
}) {};
|
|
65
76
|
/** Bounded host facts only: no target identity, page content, native exception or consumer cause. */
|
|
66
77
|
var BrowserDiagnostic = class extends Schema.Class("BrowserDiagnostic")({
|
|
@@ -196,14 +207,16 @@ var PageExecutionState = class extends Schema.Class("BrowserPageExecutionState")
|
|
|
196
207
|
/** Explicit opt-out: this integration does not claim whole-browser network containment. */
|
|
197
208
|
var BrowserPolicy = class BrowserPolicy extends Schema.Class("BrowserBrowserPolicy")({
|
|
198
209
|
network: Schema.TaggedStruct("Unrestricted", {}),
|
|
199
|
-
|
|
210
|
+
/** Model-reachable actions for the session's lifetime, 1–1,000,000. `status.actions` reads use. */
|
|
211
|
+
maxActions: ActionAllowance,
|
|
200
212
|
maxElapsedMillis: PositiveInt.check(Schema.isLessThanOrEqualTo(216e5)),
|
|
201
213
|
maxReturnedBytes: PositiveInt.check(Schema.isLessThanOrEqualTo(8388608))
|
|
202
214
|
}) {
|
|
203
215
|
/**
|
|
204
216
|
* Conservative bounds for trusted host code: 100 actions, five minutes, 2 MiB returned.
|
|
205
217
|
* The network choice is spelled out in the name because this runtime cannot prove a
|
|
206
|
-
* narrower one; override any bound, never the network.
|
|
218
|
+
* narrower one; override any bound, never the network. A long session raises `maxActions`
|
|
219
|
+
* (up to 1,000,000) and `maxElapsedMillis` (up to six hours) together.
|
|
207
220
|
*/
|
|
208
221
|
static unrestricted(bounds = {}) {
|
|
209
222
|
return BrowserPolicy.make({
|
package/dist/BrowserData.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BrowserData.mjs","names":[],"sources":["../src/BrowserData.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nimport { BrowserError } from \"./Errors.ts\";\n\nexport const Identifier = Schema.NonEmptyString.check(\n Schema.isMaxLength(256),\n Schema.isPattern(/^[A-Za-z0-9_-]+$/),\n);\n\nexport const PositiveInt = Schema.Int.check(Schema.isGreaterThan(0));\n\n/** Portable basename only; never a local or remote filesystem path. */\nexport const SafeFilename = Schema.NonEmptyString.check(\n Schema.isMaxLength(240),\n Schema.makeFilter(\n (value) =>\n value !== \".\" &&\n value !== \"..\" &&\n // oxlint-disable-next-line eslint/no-control-regex -- control characters are what it rejects\n !/[\\x00-\\x1f\\x7f/\\\\:]/.test(value) &&\n !/[. ]$/.test(value) &&\n !/^\\s/.test(value) &&\n !/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\\.|$)/i.test(value),\n { title: \"a portable, non-path download filename\" },\n ),\n);\n\nexport class Viewport extends Schema.Class<Viewport>(\"BrowserViewport\")(\n Schema.Struct({\n width: PositiveInt.check(Schema.isLessThanOrEqualTo(4096)),\n height: PositiveInt.check(Schema.isLessThanOrEqualTo(4096)),\n }).check(\n Schema.makeFilter((v) => v.width * v.height <= 8_388_608, {\n title: \"at most 8,388,608 viewport pixels\",\n }),\n ),\n) {}\n\n/** Page/frame IDs are connection-local; targetId is a separate Chromium identity. */\n\nexport class Target extends Schema.Class<Target>(\"BrowserTarget\")({\n generation: Schema.Natural,\n pageId: Identifier,\n frameId: Identifier,\n}) {}\n\nexport class PageInfo extends Schema.Class<PageInfo>(\"BrowserPageInfo\")({\n pageId: Identifier,\n targetId: Identifier,\n url: Schema.String.check(Schema.isMaxLength(8192)),\n title: Schema.String.check(Schema.isMaxLength(512)),\n selected: Schema.Boolean,\n}) {}\n\nexport class FrameInfo extends Schema.Class<FrameInfo>(\"BrowserFrameInfo\")({\n frameId: Identifier,\n parentFrameId: Schema.NullOr(Identifier),\n url: Schema.String.check(Schema.isMaxLength(8192)),\n name: Schema.String.check(Schema.isMaxLength(256)),\n}) {}\n\nexport const SessionPhase = Schema.Literals([\n \"acquiring\",\n \"open\",\n \"paused\",\n \"detached\",\n \"faulted\",\n \"uncertain\",\n \"closing\",\n \"closed\",\n]);\n\nexport type SessionPhase = typeof SessionPhase.Type;\n\nexport const SessionReason = Schema.Literals([\n \"expired\",\n \"callback-failure\",\n \"registration-failure\",\n \"native-failure\",\n \"disconnected\",\n \"popup-policy\",\n \"dialog-policy\",\n \"popup-overflow\",\n \"dialog-overflow\",\n \"cleanup-capacity\",\n \"handoff\",\n \"detached\",\n \"closed\",\n]);\n\nexport type SessionReason = typeof SessionReason.Type;\n\nconst DiagnosticCounter = Schema.Natural.check(Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));\n\n/** Host-only admission evidence. Neither an admission token nor proof of remote termination. */\nexport class SessionStatus extends Schema.Class<SessionStatus>(\"BrowserSessionStatus\")({\n phase: SessionPhase,\n reason: Schema.NullOr(SessionReason),\n generation: DiagnosticCounter,\n busy: Schema.Boolean,\n unresolvedDispatch: Schema.Boolean,\n}) {}\n\n/** Bounded host facts only: no target identity, page content, native exception or consumer cause. */\nexport class BrowserDiagnostic extends Schema.Class<BrowserDiagnostic>(\"BrowserDiagnostic\")({\n reason: SessionReason,\n disposition: Schema.Literals([\"pending\", \"confirmed\", \"not-dispatched\", \"unknown\"]),\n generation: DiagnosticCounter,\n monotonicNanos: Schema.BigInt.check(Schema.isGreaterThanOrEqualToBigInt(0n)),\n}) {}\n\nexport class BrowserDiagnostics extends Schema.Class<BrowserDiagnostics>(\"BrowserDiagnostics\")({\n records: Schema.Array(BrowserDiagnostic).check(Schema.isMaxLength(32)),\n total: DiagnosticCounter,\n dropped: DiagnosticCounter,\n truncated: Schema.Boolean,\n}) {}\n\nexport class ObservedControl extends Schema.Class<ObservedControl>(\"BrowserObservedControl\")({\n elementId: Identifier,\n kind: Schema.Literals([\"link\", \"button\", \"input\", \"select\", \"textarea\", \"other\"]),\n label: Schema.String.check(Schema.isMaxLength(256)),\n disabled: Schema.Boolean,\n checked: Schema.optionalKey(Schema.Boolean),\n selected: Schema.optionalKey(Schema.Boolean),\n inputType: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(32))),\n required: Schema.optionalKey(Schema.Boolean),\n /** Native select state. A select is never represented by one `selected` boolean. */\n multiple: Schema.optionalKey(Schema.Boolean),\n /** The issued select this native option belongs to, in the same observation. */\n selectElementId: Schema.optionalKey(Identifier),\n /** Some choices could not be issued within this reading's shared control/value bounds. */\n optionsTruncated: Schema.optionalKey(Schema.Boolean),\n}) {}\n\n/**\n * How a viewport reading was bounded and what it left out. These are counts, so they are safe\n * to show a model. Visibility is geometry and hit-testing, never a pixel comparison: text is\n * kept when its line boxes intersect the viewport and the browser finds its own element at a\n * sampled point. Something that takes no pointer events is invisible to that test, so the\n * browser is asked what is on top there with pointer events ignored: a box that paints at the\n * point covers the text, and one that paints nothing there, such as an empty full-screen\n * container, does not. Text that could not be settled that way is left out as uncertain.\n */\nexport class ViewportEvidence extends Schema.Class<ViewportEvidence>(\"BrowserViewportEvidence\")({\n width: Schema.Finite,\n height: Schema.Finite,\n /** Text that crossed a viewport edge; only its lines on screen were kept. */\n clippedText: Schema.Natural,\n /** Left out: another element is on top at the sampled point, or a box there paints over it. */\n coveredText: Schema.Natural,\n /**\n * Left out: something that takes no pointer events lies over it and the browser's own hit test\n * could not settle whether it paints there, for example beneath another such box, in a child\n * frame, or after too many such points in one reading.\n */\n uncertainText: Schema.Natural,\n /** Controls that intersect the viewport but cannot be reached there. */\n unreachableControls: Schema.Natural,\n /** The traversal budget ran out first, so this reading is known to be incomplete. */\n exhausted: Schema.Boolean,\n}) {}\n\n/**\n * Case-insensitive text a reading keeps. It is applied inside the page before any limit, so\n * matching controls are not crowded out by earlier ones. It filters what is read; it never\n * searches for, re-finds or substitutes a node.\n */\nexport const ReadingMatch = Schema.String.check(\n Schema.isMinLength(1),\n Schema.isMaxLength(256),\n Schema.makeFilter((value) => value.trim().length > 0, { title: \"not only whitespace\" }),\n);\n\n/**\n * Revision is admission fencing, not a claim of a complete DOM version or atomic snapshot. A\n * `viewport` reading holds what is on screen and reachable, plus the bounded choices of its\n * native selects. Those choices are not a claim that a closed dropdown's rows were visible.\n * A `document` reading is the whole body, wherever it is. A reading with `match` keeps only\n * matching text lines and controls, so what it leaves out is not evidence of absence. Nothing\n * here carries a destination, a form or a field value.\n */\nexport class Observation extends Schema.Class<Observation>(\"BrowserObservation\")({\n target: Target,\n observationId: Identifier,\n revision: Schema.Natural,\n scope: Schema.Literals([\"document\", \"viewport\"]),\n match: Schema.optionalKey(ReadingMatch),\n url: Schema.String.check(Schema.isMaxLength(8192)),\n text: Schema.String.check(Schema.isMaxLength(131072)),\n controls: Schema.Array(ObservedControl).check(Schema.isMaxLength(64)),\n controlsTruncated: Schema.Boolean,\n textTruncated: Schema.Boolean,\n viewport: ViewportEvidence,\n}) {}\n\nexport class ObservedElement extends Schema.Class<ObservedElement>(\"BrowserObservedElement\")({\n observationId: Identifier,\n elementId: Identifier,\n}) {}\n\n/** Observe a condition of this exact node. A replacement never satisfies the reference. */\nexport class WaitForElementRequest extends Schema.Class<WaitForElementRequest>(\n \"BrowserWaitForElementRequest\",\n)({\n reference: ObservedElement,\n state: Schema.Literals([\"visible\", \"hidden\", \"enabled\", \"disabled\"]),\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 60000 })),\n ),\n}) {}\n\n/** Issued option element IDs from one observed native select; never values, labels or indices. */\nexport const SelectOptions = Schema.Array(Identifier).check(\n Schema.isMinLength(1),\n Schema.isMaxLength(64),\n Schema.makeFilter((ids) => new Set(ids).size === ids.length),\n);\n\nexport type SelectOptions = typeof SelectOptions.Type;\n\n/** Live, connection-owned receipt. It is not a durable promise that remote clocks remain held. */\nexport class PageSuspension extends Schema.Class<PageSuspension>(\"BrowserPageSuspension\")({\n pageId: Identifier,\n targetId: Identifier,\n suspensionId: Identifier,\n}) {}\n\nexport class PageExecutionState extends Schema.Class<PageExecutionState>(\n \"BrowserPageExecutionState\",\n)({\n pageId: Identifier,\n targetId: Identifier,\n state: Schema.Literals([\"running\", \"suspended\", \"unknown\"]),\n suspensionId: Schema.optionalKey(Identifier),\n}) {}\n\n/** Explicit opt-out: this integration does not claim whole-browser network containment. */\nexport class BrowserPolicy extends Schema.Class<BrowserPolicy>(\"BrowserBrowserPolicy\")({\n network: Schema.TaggedStruct(\"Unrestricted\", {}),\n maxActions: PositiveInt.check(Schema.isLessThanOrEqualTo(1000)),\n maxElapsedMillis: PositiveInt.check(Schema.isLessThanOrEqualTo(21_600_000)),\n maxReturnedBytes: PositiveInt.check(Schema.isLessThanOrEqualTo(8 * 1024 * 1024)),\n}) {\n /**\n * Conservative bounds for trusted host code: 100 actions, five minutes, 2 MiB returned.\n * The network choice is spelled out in the name because this runtime cannot prove a\n * narrower one; override any bound, never the network.\n */\n static unrestricted(\n bounds: Partial<\n Pick<BrowserPolicy, \"maxActions\" | \"maxElapsedMillis\" | \"maxReturnedBytes\">\n > = {},\n ): BrowserPolicy {\n return BrowserPolicy.make({\n network: { _tag: \"Unrestricted\" },\n maxActions: bounds.maxActions ?? 100,\n maxElapsedMillis: bounds.maxElapsedMillis ?? 5 * 60_000,\n maxReturnedBytes: bounds.maxReturnedBytes ?? 2 * 1024 * 1024,\n });\n }\n}\n\nexport const TargetUrl = Schema.NonEmptyString.check(\n Schema.isMaxLength(8192),\n Schema.makeFilter((value) => {\n try {\n const url = new URL(value);\n\n return (\n [\"http:\", \"https:\"].includes(url.protocol) &&\n url.hostname !== \"\" &&\n !url.username &&\n !url.password\n );\n } catch {\n return false;\n }\n }),\n);\n\nexport const Selector = Schema.NonEmptyString.check(Schema.isMaxLength(1024));\n\nexport class NavigateRequest extends Schema.Class<NavigateRequest>(\"BrowserNavigateRequest\")({\n url: TargetUrl,\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 600000 })),\n ),\n}) {}\n\n/**\n * A navigation left in flight. `timeoutMillis` is how long the browser may take to reach\n * DOMContentLoaded; omitted, it is the action timeout, as it is for `navigate`.\n */\nexport class StartNavigationRequest extends Schema.Class<StartNavigationRequest>(\n \"BrowserStartNavigationRequest\",\n)({\n url: TargetUrl,\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 600000 })),\n ),\n}) {}\n\nexport class ReadTextRequest extends Schema.Class<ReadTextRequest>(\"BrowserReadTextRequest\")({\n selector: Schema.optionalKey(Selector),\n}) {}\n\nexport class ClickRequest extends Schema.Class<ClickRequest>(\"BrowserClickRequest\")({\n selector: Selector,\n}) {}\n\nexport class FillRequest extends Schema.Class<FillRequest>(\"BrowserFillRequest\")({\n selector: Selector,\n value: Schema.String.check(Schema.isMaxLength(65536)),\n}) {}\n\n/**\n * One observed control and the one state a form gives it: replacement text, the checked state a\n * checkbox, radio or switch should end in (it is clicked only when it differs, and a native radio\n * is never asked to clear itself), or issued option IDs of a native select from the same\n * observation.\n */\nexport const FormField = Schema.Struct({\n elementId: Identifier,\n value: Schema.optionalKey(FillRequest.fields.value),\n checked: Schema.optionalKey(Schema.Boolean),\n options: Schema.optionalKey(SelectOptions),\n}).check(\n Schema.makeFilter(\n (field) =>\n Number(field.value !== undefined) +\n Number(field.checked !== undefined) +\n Number(field.options !== undefined) ===\n 1,\n { title: \"exactly one of value, checked or options\" },\n ),\n);\n\nexport type FormField = typeof FormField.Type;\n\n/** At most 32 distinct fields, and a submit control that is not one of them. */\nexport class FillFormRequest extends Schema.Class<FillFormRequest>(\"BrowserFillFormRequest\")(\n Schema.Struct({\n observationId: Identifier,\n fields: Schema.Array(FormField).check(\n Schema.isMinLength(1),\n Schema.isMaxLength(32),\n Schema.makeFilter(\n (fields) => new Set(fields.map((field) => field.elementId)).size === fields.length,\n { title: \"each field at most once\" },\n ),\n ),\n submit: Schema.optionalKey(Identifier),\n }).check(\n Schema.makeFilter(\n (request) =>\n request.submit === undefined ||\n !request.fields.some((field) => field.elementId === request.submit),\n { title: \"a submit control that is not also a field\" },\n ),\n ),\n) {}\n\n/**\n * Host choices about how a form proceeds. `verify` (default true) re-reads every field before\n * submit and stops when one no longer holds what its own step left there. `settleMillis`\n * (default 50, at most 5000; 0 skips it) is how long each dispatched step lets the page's own\n * handlers run, after at least two rendered frames, before its result is read back.\n */\nexport const FillFormOptions = Schema.Struct({\n verify: Schema.optionalKey(Schema.Boolean),\n settleMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 5000 })),\n ),\n});\n\nexport type FillFormOptions = typeof FillFormOptions.Type;\n\n/** `set` dispatched input; `unchanged` needed none, because a toggle already held its state. */\nexport class FormFieldResult extends Schema.Class<FormFieldResult>(\"BrowserFormFieldResult\")({\n elementId: Identifier,\n status: Schema.Literals([\"set\", \"unchanged\"]),\n}) {}\n\n/**\n * Where a form stopped and why. `error.outcome` says whether this step itself was dispatched;\n * nothing after it was. `elementId` names the control it stopped at, when there is one: a\n * verification that could not read the form at all names none.\n */\nexport class FormStop extends Schema.Class<FormStop>(\"BrowserFormStop\")({\n stage: Schema.Literals([\"field\", \"verify\", \"submit\"]),\n elementId: Schema.optionalKey(Identifier),\n error: BrowserError,\n}) {}\n\n/**\n * What a form did, in order. `stopped` is present when it did not finish: the fields before it\n * stay set, because a form is not a transaction. `submitted` is true only when the submit click\n * completed; a stop at `submit` with an `unknown` outcome may have sent it.\n */\nexport class FillFormResult extends Schema.Class<FillFormResult>(\"BrowserFillFormResult\")({\n fields: Schema.Array(FormFieldResult).check(Schema.isMaxLength(32)),\n submitted: Schema.Boolean,\n url: TargetUrl,\n stopped: Schema.optionalKey(FormStop),\n}) {}\n\nexport class ScrollRequest extends Schema.Class<ScrollRequest>(\"BrowserScrollRequest\")({\n deltaX: Schema.Int.check(Schema.isBetween({ minimum: -100000, maximum: 100000 })),\n deltaY: Schema.Int.check(Schema.isBetween({ minimum: -100000, maximum: 100000 })),\n}) {}\n\n/**\n * CSS pixels in the main frame's viewport, the space Chromium dispatches pointer input in. It\n * is not a document offset, a device pixel, or a coordinate inside a child frame.\n */\nexport class ViewportPoint extends Schema.Class<ViewportPoint>(\"BrowserViewportPoint\")({\n x: Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 16384 })),\n y: Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 16384 })),\n}) {}\n\n/** A box in the viewport of the frame it was read from, in CSS pixels. */\nexport class ViewportRect extends Schema.Class<ViewportRect>(\"BrowserViewportRect\")({\n x: Schema.Finite,\n y: Schema.Finite,\n width: Schema.Finite,\n height: Schema.Finite,\n}) {}\n\n/**\n * What a host needs to decide whether a control may be acted on. Host-only: a destination can\n * carry a token, so none of this is part of the model-facing `Observation`. It never includes a\n * field's value or any markup.\n */\nexport class ControlFacts extends Schema.Class<ControlFacts>(\"BrowserControlFacts\")({\n kind: ObservedControl.fields.kind,\n label: ObservedControl.fields.label,\n disabled: Schema.Boolean,\n checked: Schema.optionalKey(Schema.Boolean),\n selected: Schema.optionalKey(Schema.Boolean),\n required: Schema.optionalKey(Schema.Boolean),\n multiple: Schema.optionalKey(Schema.Boolean),\n editable: Schema.Boolean,\n inputType: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(32))),\n autocomplete: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(128))),\n /** A resolved link target, or where this control submits its form. Absent when over-long. */\n destination: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(2048))),\n formMethod: Schema.optionalKey(Schema.Literals([\"get\", \"post\", \"dialog\"])),\n box: ViewportRect,\n placement: Schema.Literals([\"inside\", \"partial\", \"outside\"]),\n /** `self`: the browser finds this control at its visible centre. Not a pixel comparison. */\n hitTest: Schema.Literals([\"self\", \"covered\", \"uncertain\", \"unsampled\"]),\n /** Only then is `box` in the main frame's viewport, the space pointer input uses. */\n mainFrame: Schema.Boolean,\n}) {}\n\n/**\n * Passive evidence for a recorder: what was on screen, and optionally a picture of it. It issues\n * no element references and never replaces the observation an agent's tools act on, so\n * inspecting, checkpointing and then acting on the inspected node all compose.\n *\n * It is host-only, because it carries control facts. Text and picture are read one after the\n * other, never atomically: the interval says when, and `documentChanged` says the document was\n * replaced in between, so the two may describe different documents.\n */\nexport class Checkpoint extends Schema.Class<Checkpoint>(\"BrowserCheckpoint\")({\n target: Target,\n revision: Schema.Natural,\n url: Schema.String.check(Schema.isMaxLength(8192)),\n text: Schema.String.check(Schema.isMaxLength(131072)),\n textTruncated: Schema.Boolean,\n controls: Schema.Array(ControlFacts).check(Schema.isMaxLength(64)),\n controlsTruncated: Schema.Boolean,\n viewport: ViewportEvidence,\n picture: Schema.optionalKey(\n Schema.Struct({ mediaType: Schema.Literal(\"image/png\"), bytes: Schema.Uint8Array }),\n ),\n documentChanged: Schema.Boolean,\n startedMonotonicNanos: Schema.BigInt,\n completedMonotonicNanos: Schema.BigInt,\n}) {}\n\nconst ReadingBounds = {\n maxTextBytes: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 131072 })),\n ),\n maxControls: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 64 }))),\n};\n\n/** Omitted bounds default at admission; `scope` defaults to the whole document. */\nexport const ObservationOptions = Schema.Struct({\n scope: Schema.optionalKey(Schema.Literals([\"document\", \"viewport\"])),\n match: Schema.optionalKey(ReadingMatch),\n ...ReadingBounds,\n});\n\nexport type ObservationOptions = typeof ObservationOptions.Type;\n\n/** A checkpoint always reads the viewport. `picture` adds a PNG of it, within the byte policy. */\nexport const CheckpointOptions = Schema.Struct({\n ...ReadingBounds,\n picture: Schema.optionalKey(Schema.Boolean),\n});\n\nexport type CheckpointOptions = typeof CheckpointOptions.Type;\n\n/** One native pointer move. Easing and pacing are the caller's: send the points you want. */\nexport class PointerMoveRequest extends Schema.Class<PointerMoveRequest>(\n \"BrowserPointerMoveRequest\",\n)({ to: ViewportPoint }) {}\n\n/** Moves the pointer onto one exact element where it is. It never scrolls to reach it. */\nexport class HoverRequest extends Schema.Class<HoverRequest>(\"BrowserHoverRequest\")({\n selector: Selector,\n}) {}\n\nconst WheelDelta = Schema.Finite.check(Schema.isBetween({ minimum: -100000, maximum: 100000 }));\n\n/**\n * One native wheel event where the pointer is, or at `at` after moving there first. The browser\n * chooses what scrolls, exactly as it would for a person, so a nested scroll container under\n * the pointer scrolls instead of the page.\n */\nexport class WheelRequest extends Schema.Class<WheelRequest>(\"BrowserWheelRequest\")({\n deltaX: WheelDelta,\n deltaY: WheelDelta,\n at: Schema.optionalKey(ViewportPoint),\n}) {}\n\n/**\n * The keys a `press` may name, spelled as the `KeyboardEvent.key` the page will see. The set is\n * closed on purpose: a key name is parsed by the native engine, so none reaches it unreviewed.\n */\nexport const NamedKey = Schema.Literals([\n \"Enter\",\n \"Tab\",\n \"Backspace\",\n \"Delete\",\n \"Escape\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n \"PageUp\",\n \"PageDown\",\n]);\n\nexport type NamedKey = typeof NamedKey.Type;\n\n/** One printable ASCII character, space included: every one is a key on the US layout. */\nconst PrintableKey = Schema.String.check(Schema.isPattern(/^[\\x20-\\x7e]$/));\n\nexport const KeyModifier = Schema.Literals([\"Shift\", \"Control\", \"Alt\", \"Meta\"]);\n\nexport type KeyModifier = typeof KeyModifier.Type;\n\n/** One key, down then up, with any modifiers held around it. */\nexport const KeyStroke = Schema.Struct({\n key: Schema.Union([NamedKey, PrintableKey]),\n modifiers: Schema.optionalKey(\n Schema.Array(KeyModifier).check(\n Schema.makeFilter((held) => new Set(held).size === held.length, {\n title: \"each modifier at most once\",\n }),\n ),\n ),\n});\n\nexport type KeyStroke = typeof KeyStroke.Type;\n\n/**\n * One real key stroke. It goes to whatever has focus in the page, exactly as it would for a\n * person, unless `into` names the one element that must already have it. It never focuses that\n * element, because that would hide a scripted focus inside a native-input operation: click it\n * first.\n */\nexport class PressRequest extends Schema.Class<PressRequest>(\"BrowserPressRequest\")({\n ...KeyStroke.fields,\n into: Schema.optionalKey(Selector),\n}) {}\n\n/** Counted in characters, not UTF-16 units, because that is how many strokes it costs. */\nconst TypedText = Schema.NonEmptyString.check(\n Schema.makeFilter((text) => [...text].length <= 256, { title: \"at most 256 characters\" }),\n Schema.makeFilter(\n (text) =>\n [...text].every((character) => {\n const point = character.codePointAt(0) ?? 0;\n\n // An unpaired surrogate is not a character, and would not survive the wire as one.\n return point > 0x1f && point !== 0x7f && (point < 0xd800 || point > 0xdfff);\n }),\n { title: \"no control characters or unpaired surrogates\" },\n ),\n);\n\n/**\n * Text as the real key strokes that produce it, two native commands for each character, one\n * after another under a single action timeout: send a long passage as several shorter runs.\n * A character the US layout cannot produce is inserted as text, as an input method commits it,\n * and raises no key events. Control characters are refused, so a line break can never press\n * Enter from inside a run of text: a named key is always its own `press`. `into` works as it\n * does for `PressRequest`: a guard on where the text lands, never a focus.\n */\nexport class TypeRequest extends Schema.Class<TypeRequest>(\"BrowserTypeRequest\")({\n text: TypedText,\n into: Schema.optionalKey(Selector),\n}) {}\n\n/**\n * What native input was dispatched, where and when. `position` is the point this owner\n * commanded, or null when it has not yet placed the pointer on this page. The interval is on\n * the host monotonic clock that stamps `CapturedFrame.receivedMonotonicNanos`, so input and\n * pixels share one timeline. A wheel event is dispatched, not awaited: the receipt does not\n * claim the page finished scrolling, or that any frame shows it. A receipt never says which\n * key was pressed or what was typed.\n */\nexport class InputReceipt extends Schema.Class<InputReceipt>(\"BrowserInputReceipt\")({\n target: Target,\n kind: Schema.Literals([\"pointer-move\", \"hover\", \"wheel\", \"press\", \"type\"]),\n position: Schema.NullOr(ViewportPoint),\n delta: Schema.optionalKey(Schema.Struct({ x: WheelDelta, y: WheelDelta })),\n startedMonotonicNanos: Schema.BigInt,\n completedMonotonicNanos: Schema.BigInt,\n}) {}\n\nexport class ScreenshotRequest extends Schema.Class<ScreenshotRequest>(\"BrowserScreenshotRequest\")({\n fullPage: Schema.Boolean,\n}) {}\n\nexport class NavigationResult extends Schema.Class<NavigationResult>(\"BrowserNavigationResult\")({\n url: TargetUrl,\n}) {}\n\nexport class ActionResult extends Schema.Class<ActionResult>(\"BrowserActionResult\")({\n url: TargetUrl,\n}) {}\n\nexport class TextResult extends Schema.Class<TextResult>(\"BrowserTextResult\")({\n text: Schema.String.check(Schema.isMaxLength(8 * 1024 * 1024)),\n}) {}\n\nexport class ScreenshotResult extends Schema.Class<ScreenshotResult>(\"BrowserScreenshotResult\")({\n mediaType: Schema.Literal(\"image/png\"),\n bytes: Schema.Uint8Array,\n}) {}\n\nconst FileMediaType = Schema.NonEmptyString.check(\n Schema.isMaxLength(128),\n Schema.isPattern(/^[a-z0-9][a-z0-9!#$&^_+.-]*\\/[a-z0-9][a-z0-9!#$&^_+.-]*$/),\n);\n\n/** Small selection is in-memory by design: bytes the caller already holds, never a path. */\nexport class InlineFile extends Schema.Class<InlineFile>(\"BrowserInlineFile\")({\n name: SafeFilename,\n mediaType: FileMediaType,\n bytes: Schema.Uint8Array.check(\n Schema.makeFilter((value) => value.byteLength >= 1 && value.byteLength <= 1024 * 1024, {\n title: \"between one byte and one mebibyte\",\n }),\n ),\n}) {}\n\nexport const InlineFiles = Schema.Array(InlineFile).check(\n Schema.isMaxLength(8),\n Schema.makeFilter(\n (files) =>\n files.length > 0 &&\n files.reduce((total, file) => total + file.bytes.byteLength, 0) <= 4 * 1024 * 1024,\n { title: \"at most four mebibytes of in-memory selection\" },\n ),\n);\n\nexport const AutomationOptions = Schema.Struct({\n actionTimeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 60000 })),\n ),\n /** Independent host-only checkpoint/control-facts allowance; normalized to 10,000 by the runtime. */\n maxHostReads: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 1_000_000 })),\n ),\n maxPages: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 32 }))),\n initialPage: Schema.optionalKey(\n Schema.Union([\n Schema.Struct({ targetId: Identifier }),\n Schema.Struct({ newPage: Schema.Literal(true) }),\n ]),\n ),\n popupPolicy: Schema.optionalKey(Schema.Literals([\"retain\", \"close\", \"pause\"])),\n dialogPolicy: Schema.optionalKey(Schema.Literals([\"dismiss\", \"pause\"])),\n pageControl: Schema.optionalKey(Schema.Boolean),\n});\n\nexport type AutomationOptions = typeof AutomationOptions.Type;\n"],"mappings":";;;AAIA,MAAa,aAAa,OAAO,eAAe,MAC9C,OAAO,YAAY,GAAG,GACtB,OAAO,UAAU,kBAAkB,CACrC;AAEA,MAAa,cAAc,OAAO,IAAI,MAAM,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O,YAClB,OAAO,MAAM,CACX,OAAO,OAAO,EAAE,UAAU,WAAW,CAAC,GACtC,OAAO,OAAO,EAAE,SAAS,OAAO,QAAQ,IAAI,EAAE,CAAC,CACjD,CAAC,CACH;CACA,aAAa,OAAO,YAAY,OAAO,SAAS;EAAC;EAAU;EAAS;CAAO,CAAC,CAAC;CAC7E,cAAc,OAAO,YAAY,OAAO,SAAS,CAAC,WAAW,OAAO,CAAC,CAAC;CACtE,aAAa,OAAO,YAAY,OAAO,OAAO;AAChD,CAAC"}
|
|
1
|
+
{"version":3,"file":"BrowserData.mjs","names":[],"sources":["../src/BrowserData.ts"],"sourcesContent":["import { Schema } from \"effect\";\n\nimport { BrowserError } from \"./Errors.ts\";\n\nexport const Identifier = Schema.NonEmptyString.check(\n Schema.isMaxLength(256),\n Schema.isPattern(/^[A-Za-z0-9_-]+$/),\n);\n\nexport const PositiveInt = Schema.Int.check(Schema.isGreaterThan(0));\n\n/** Portable basename only; never a local or remote filesystem path. */\nexport const SafeFilename = Schema.NonEmptyString.check(\n Schema.isMaxLength(240),\n Schema.makeFilter(\n (value) =>\n value !== \".\" &&\n value !== \"..\" &&\n // oxlint-disable-next-line eslint/no-control-regex -- control characters are what it rejects\n !/[\\x00-\\x1f\\x7f/\\\\:]/.test(value) &&\n !/[. ]$/.test(value) &&\n !/^\\s/.test(value) &&\n !/^(con|prn|aux|nul|com[1-9]|lpt[1-9])(?:\\.|$)/i.test(value),\n { title: \"a portable, non-path download filename\" },\n ),\n);\n\nexport class Viewport extends Schema.Class<Viewport>(\"BrowserViewport\")(\n Schema.Struct({\n width: PositiveInt.check(Schema.isLessThanOrEqualTo(4096)),\n height: PositiveInt.check(Schema.isLessThanOrEqualTo(4096)),\n }).check(\n Schema.makeFilter((v) => v.width * v.height <= 8_388_608, {\n title: \"at most 8,388,608 viewport pixels\",\n }),\n ),\n) {}\n\n/** Page/frame IDs are connection-local; targetId is a separate Chromium identity. */\n\nexport class Target extends Schema.Class<Target>(\"BrowserTarget\")({\n generation: Schema.Natural,\n pageId: Identifier,\n frameId: Identifier,\n}) {}\n\nexport class PageInfo extends Schema.Class<PageInfo>(\"BrowserPageInfo\")({\n pageId: Identifier,\n targetId: Identifier,\n url: Schema.String.check(Schema.isMaxLength(8192)),\n title: Schema.String.check(Schema.isMaxLength(512)),\n selected: Schema.Boolean,\n}) {}\n\nexport class FrameInfo extends Schema.Class<FrameInfo>(\"BrowserFrameInfo\")({\n frameId: Identifier,\n parentFrameId: Schema.NullOr(Identifier),\n url: Schema.String.check(Schema.isMaxLength(8192)),\n name: Schema.String.check(Schema.isMaxLength(256)),\n}) {}\n\nexport const SessionPhase = Schema.Literals([\n \"acquiring\",\n \"open\",\n \"paused\",\n \"detached\",\n \"faulted\",\n \"uncertain\",\n \"closing\",\n \"closed\",\n]);\n\nexport type SessionPhase = typeof SessionPhase.Type;\n\nexport const SessionReason = Schema.Literals([\n \"expired\",\n \"callback-failure\",\n \"registration-failure\",\n \"native-failure\",\n \"disconnected\",\n \"popup-policy\",\n \"dialog-policy\",\n \"popup-overflow\",\n \"dialog-overflow\",\n \"cleanup-capacity\",\n \"handoff\",\n \"detached\",\n \"closed\",\n]);\n\nexport type SessionReason = typeof SessionReason.Type;\n\nconst DiagnosticCounter = Schema.Natural.check(Schema.isLessThanOrEqualTo(Number.MAX_SAFE_INTEGER));\n\n/** The bound on one session's model-reachable actions, like the host-read allowance's. */\nconst ActionAllowance = PositiveInt.check(Schema.isLessThanOrEqualTo(1_000_000));\n\n/** Host-only admission evidence. Neither an admission token nor proof of remote termination. */\nexport class SessionStatus extends Schema.Class<SessionStatus>(\"BrowserSessionStatus\")({\n phase: SessionPhase,\n reason: Schema.NullOr(SessionReason),\n generation: DiagnosticCounter,\n busy: Schema.Boolean,\n unresolvedDispatch: Schema.Boolean,\n /**\n * Actions admitted against the policy's `maxActions`, as the owner counted them. Host reads\n * (`checkpoint`, `controlFacts`) and uncharged reads such as a form's verification are not\n * actions. `used` equals `maximum` once the allowance is spent; the owner stays open.\n */\n actions: Schema.Struct({\n used: Schema.Natural.check(Schema.isLessThanOrEqualTo(1_000_000)),\n maximum: ActionAllowance,\n }).check(\n Schema.makeFilter((actions) => actions.used <= actions.maximum, {\n title: \"no more actions used than allowed\",\n }),\n ),\n}) {}\n\n/** Bounded host facts only: no target identity, page content, native exception or consumer cause. */\nexport class BrowserDiagnostic extends Schema.Class<BrowserDiagnostic>(\"BrowserDiagnostic\")({\n reason: SessionReason,\n disposition: Schema.Literals([\"pending\", \"confirmed\", \"not-dispatched\", \"unknown\"]),\n generation: DiagnosticCounter,\n monotonicNanos: Schema.BigInt.check(Schema.isGreaterThanOrEqualToBigInt(0n)),\n}) {}\n\nexport class BrowserDiagnostics extends Schema.Class<BrowserDiagnostics>(\"BrowserDiagnostics\")({\n records: Schema.Array(BrowserDiagnostic).check(Schema.isMaxLength(32)),\n total: DiagnosticCounter,\n dropped: DiagnosticCounter,\n truncated: Schema.Boolean,\n}) {}\n\nexport class ObservedControl extends Schema.Class<ObservedControl>(\"BrowserObservedControl\")({\n elementId: Identifier,\n kind: Schema.Literals([\"link\", \"button\", \"input\", \"select\", \"textarea\", \"other\"]),\n label: Schema.String.check(Schema.isMaxLength(256)),\n disabled: Schema.Boolean,\n checked: Schema.optionalKey(Schema.Boolean),\n selected: Schema.optionalKey(Schema.Boolean),\n inputType: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(32))),\n required: Schema.optionalKey(Schema.Boolean),\n /** Native select state. A select is never represented by one `selected` boolean. */\n multiple: Schema.optionalKey(Schema.Boolean),\n /** The issued select this native option belongs to, in the same observation. */\n selectElementId: Schema.optionalKey(Identifier),\n /** Some choices could not be issued within this reading's shared control/value bounds. */\n optionsTruncated: Schema.optionalKey(Schema.Boolean),\n}) {}\n\n/**\n * How a viewport reading was bounded and what it left out. These are counts, so they are safe\n * to show a model. Visibility is geometry and hit-testing, never a pixel comparison: text is\n * kept when its line boxes intersect the viewport and the browser finds its own element at a\n * sampled point. Something that takes no pointer events is invisible to that test, so the\n * browser is asked what is on top there with pointer events ignored: a box that paints at the\n * point covers the text, and one that paints nothing there, such as an empty full-screen\n * container, does not. Text that could not be settled that way is left out as uncertain.\n */\nexport class ViewportEvidence extends Schema.Class<ViewportEvidence>(\"BrowserViewportEvidence\")({\n width: Schema.Finite,\n height: Schema.Finite,\n /** Text that crossed a viewport edge; only its lines on screen were kept. */\n clippedText: Schema.Natural,\n /** Left out: another element is on top at the sampled point, or a box there paints over it. */\n coveredText: Schema.Natural,\n /**\n * Left out: something that takes no pointer events lies over it and the browser's own hit test\n * could not settle whether it paints there, for example beneath another such box, in a child\n * frame, or after too many such points in one reading.\n */\n uncertainText: Schema.Natural,\n /** Controls that intersect the viewport but cannot be reached there. */\n unreachableControls: Schema.Natural,\n /** The traversal budget ran out first, so this reading is known to be incomplete. */\n exhausted: Schema.Boolean,\n}) {}\n\n/**\n * Case-insensitive text a reading keeps. It is applied inside the page before any limit, so\n * matching controls are not crowded out by earlier ones. It filters what is read; it never\n * searches for, re-finds or substitutes a node.\n */\nexport const ReadingMatch = Schema.String.check(\n Schema.isMinLength(1),\n Schema.isMaxLength(256),\n Schema.makeFilter((value) => value.trim().length > 0, { title: \"not only whitespace\" }),\n);\n\n/**\n * Revision is admission fencing, not a claim of a complete DOM version or atomic snapshot. A\n * `viewport` reading holds what is on screen and reachable, plus the bounded choices of its\n * native selects. Those choices are not a claim that a closed dropdown's rows were visible.\n * A `document` reading is the whole body, wherever it is. A reading with `match` keeps only\n * matching text lines and controls, so what it leaves out is not evidence of absence. Nothing\n * here carries a destination, a form or a field value.\n */\nexport class Observation extends Schema.Class<Observation>(\"BrowserObservation\")({\n target: Target,\n observationId: Identifier,\n revision: Schema.Natural,\n scope: Schema.Literals([\"document\", \"viewport\"]),\n match: Schema.optionalKey(ReadingMatch),\n url: Schema.String.check(Schema.isMaxLength(8192)),\n text: Schema.String.check(Schema.isMaxLength(131072)),\n controls: Schema.Array(ObservedControl).check(Schema.isMaxLength(64)),\n controlsTruncated: Schema.Boolean,\n textTruncated: Schema.Boolean,\n viewport: ViewportEvidence,\n}) {}\n\nexport class ObservedElement extends Schema.Class<ObservedElement>(\"BrowserObservedElement\")({\n observationId: Identifier,\n elementId: Identifier,\n}) {}\n\n/** Observe a condition of this exact node. A replacement never satisfies the reference. */\nexport class WaitForElementRequest extends Schema.Class<WaitForElementRequest>(\n \"BrowserWaitForElementRequest\",\n)({\n reference: ObservedElement,\n state: Schema.Literals([\"visible\", \"hidden\", \"enabled\", \"disabled\"]),\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 60000 })),\n ),\n}) {}\n\n/** Issued option element IDs from one observed native select; never values, labels or indices. */\nexport const SelectOptions = Schema.Array(Identifier).check(\n Schema.isMinLength(1),\n Schema.isMaxLength(64),\n Schema.makeFilter((ids) => new Set(ids).size === ids.length),\n);\n\nexport type SelectOptions = typeof SelectOptions.Type;\n\n/** Live, connection-owned receipt. It is not a durable promise that remote clocks remain held. */\nexport class PageSuspension extends Schema.Class<PageSuspension>(\"BrowserPageSuspension\")({\n pageId: Identifier,\n targetId: Identifier,\n suspensionId: Identifier,\n}) {}\n\nexport class PageExecutionState extends Schema.Class<PageExecutionState>(\n \"BrowserPageExecutionState\",\n)({\n pageId: Identifier,\n targetId: Identifier,\n state: Schema.Literals([\"running\", \"suspended\", \"unknown\"]),\n suspensionId: Schema.optionalKey(Identifier),\n}) {}\n\n/** Explicit opt-out: this integration does not claim whole-browser network containment. */\nexport class BrowserPolicy extends Schema.Class<BrowserPolicy>(\"BrowserBrowserPolicy\")({\n network: Schema.TaggedStruct(\"Unrestricted\", {}),\n /** Model-reachable actions for the session's lifetime, 1–1,000,000. `status.actions` reads use. */\n maxActions: ActionAllowance,\n maxElapsedMillis: PositiveInt.check(Schema.isLessThanOrEqualTo(21_600_000)),\n maxReturnedBytes: PositiveInt.check(Schema.isLessThanOrEqualTo(8 * 1024 * 1024)),\n}) {\n /**\n * Conservative bounds for trusted host code: 100 actions, five minutes, 2 MiB returned.\n * The network choice is spelled out in the name because this runtime cannot prove a\n * narrower one; override any bound, never the network. A long session raises `maxActions`\n * (up to 1,000,000) and `maxElapsedMillis` (up to six hours) together.\n */\n static unrestricted(\n bounds: Partial<\n Pick<BrowserPolicy, \"maxActions\" | \"maxElapsedMillis\" | \"maxReturnedBytes\">\n > = {},\n ): BrowserPolicy {\n return BrowserPolicy.make({\n network: { _tag: \"Unrestricted\" },\n maxActions: bounds.maxActions ?? 100,\n maxElapsedMillis: bounds.maxElapsedMillis ?? 5 * 60_000,\n maxReturnedBytes: bounds.maxReturnedBytes ?? 2 * 1024 * 1024,\n });\n }\n}\n\nexport const TargetUrl = Schema.NonEmptyString.check(\n Schema.isMaxLength(8192),\n Schema.makeFilter((value) => {\n try {\n const url = new URL(value);\n\n return (\n [\"http:\", \"https:\"].includes(url.protocol) &&\n url.hostname !== \"\" &&\n !url.username &&\n !url.password\n );\n } catch {\n return false;\n }\n }),\n);\n\nexport const Selector = Schema.NonEmptyString.check(Schema.isMaxLength(1024));\n\nexport class NavigateRequest extends Schema.Class<NavigateRequest>(\"BrowserNavigateRequest\")({\n url: TargetUrl,\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 600000 })),\n ),\n}) {}\n\n/**\n * A navigation left in flight. `timeoutMillis` is how long the browser may take to reach\n * DOMContentLoaded; omitted, it is the action timeout, as it is for `navigate`.\n */\nexport class StartNavigationRequest extends Schema.Class<StartNavigationRequest>(\n \"BrowserStartNavigationRequest\",\n)({\n url: TargetUrl,\n timeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 600000 })),\n ),\n}) {}\n\nexport class ReadTextRequest extends Schema.Class<ReadTextRequest>(\"BrowserReadTextRequest\")({\n selector: Schema.optionalKey(Selector),\n}) {}\n\nexport class ClickRequest extends Schema.Class<ClickRequest>(\"BrowserClickRequest\")({\n selector: Selector,\n}) {}\n\nexport class FillRequest extends Schema.Class<FillRequest>(\"BrowserFillRequest\")({\n selector: Selector,\n value: Schema.String.check(Schema.isMaxLength(65536)),\n}) {}\n\n/**\n * One observed control and the one state a form gives it: replacement text, the checked state a\n * checkbox, radio or switch should end in (it is clicked only when it differs, and a native radio\n * is never asked to clear itself), or issued option IDs of a native select from the same\n * observation.\n */\nexport const FormField = Schema.Struct({\n elementId: Identifier,\n value: Schema.optionalKey(FillRequest.fields.value),\n checked: Schema.optionalKey(Schema.Boolean),\n options: Schema.optionalKey(SelectOptions),\n}).check(\n Schema.makeFilter(\n (field) =>\n Number(field.value !== undefined) +\n Number(field.checked !== undefined) +\n Number(field.options !== undefined) ===\n 1,\n { title: \"exactly one of value, checked or options\" },\n ),\n);\n\nexport type FormField = typeof FormField.Type;\n\n/** At most 32 distinct fields, and a submit control that is not one of them. */\nexport class FillFormRequest extends Schema.Class<FillFormRequest>(\"BrowserFillFormRequest\")(\n Schema.Struct({\n observationId: Identifier,\n fields: Schema.Array(FormField).check(\n Schema.isMinLength(1),\n Schema.isMaxLength(32),\n Schema.makeFilter(\n (fields) => new Set(fields.map((field) => field.elementId)).size === fields.length,\n { title: \"each field at most once\" },\n ),\n ),\n submit: Schema.optionalKey(Identifier),\n }).check(\n Schema.makeFilter(\n (request) =>\n request.submit === undefined ||\n !request.fields.some((field) => field.elementId === request.submit),\n { title: \"a submit control that is not also a field\" },\n ),\n ),\n) {}\n\n/**\n * Host choices about how a form proceeds. `verify` (default true) re-reads every field before\n * submit and stops when one no longer holds what its own step left there. `settleMillis`\n * (default 50, at most 5000; 0 skips it) is how long each dispatched step lets the page's own\n * handlers run, after at least two rendered frames, before its result is read back.\n */\nexport const FillFormOptions = Schema.Struct({\n verify: Schema.optionalKey(Schema.Boolean),\n settleMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 5000 })),\n ),\n});\n\nexport type FillFormOptions = typeof FillFormOptions.Type;\n\n/** `set` dispatched input; `unchanged` needed none, because a toggle already held its state. */\nexport class FormFieldResult extends Schema.Class<FormFieldResult>(\"BrowserFormFieldResult\")({\n elementId: Identifier,\n status: Schema.Literals([\"set\", \"unchanged\"]),\n}) {}\n\n/**\n * Where a form stopped and why. `error.outcome` says whether this step itself was dispatched;\n * nothing after it was. `elementId` names the control it stopped at, when there is one: a\n * verification that could not read the form at all names none.\n */\nexport class FormStop extends Schema.Class<FormStop>(\"BrowserFormStop\")({\n stage: Schema.Literals([\"field\", \"verify\", \"submit\"]),\n elementId: Schema.optionalKey(Identifier),\n error: BrowserError,\n}) {}\n\n/**\n * What a form did, in order. `stopped` is present when it did not finish: the fields before it\n * stay set, because a form is not a transaction. `submitted` is true only when the submit click\n * completed; a stop at `submit` with an `unknown` outcome may have sent it.\n */\nexport class FillFormResult extends Schema.Class<FillFormResult>(\"BrowserFillFormResult\")({\n fields: Schema.Array(FormFieldResult).check(Schema.isMaxLength(32)),\n submitted: Schema.Boolean,\n url: TargetUrl,\n stopped: Schema.optionalKey(FormStop),\n}) {}\n\nexport class ScrollRequest extends Schema.Class<ScrollRequest>(\"BrowserScrollRequest\")({\n deltaX: Schema.Int.check(Schema.isBetween({ minimum: -100000, maximum: 100000 })),\n deltaY: Schema.Int.check(Schema.isBetween({ minimum: -100000, maximum: 100000 })),\n}) {}\n\n/**\n * CSS pixels in the main frame's viewport, the space Chromium dispatches pointer input in. It\n * is not a document offset, a device pixel, or a coordinate inside a child frame.\n */\nexport class ViewportPoint extends Schema.Class<ViewportPoint>(\"BrowserViewportPoint\")({\n x: Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 16384 })),\n y: Schema.Finite.check(Schema.isBetween({ minimum: 0, maximum: 16384 })),\n}) {}\n\n/** A box in the viewport of the frame it was read from, in CSS pixels. */\nexport class ViewportRect extends Schema.Class<ViewportRect>(\"BrowserViewportRect\")({\n x: Schema.Finite,\n y: Schema.Finite,\n width: Schema.Finite,\n height: Schema.Finite,\n}) {}\n\n/**\n * What a host needs to decide whether a control may be acted on. Host-only: a destination can\n * carry a token, so none of this is part of the model-facing `Observation`. It never includes a\n * field's value or any markup.\n */\nexport class ControlFacts extends Schema.Class<ControlFacts>(\"BrowserControlFacts\")({\n kind: ObservedControl.fields.kind,\n label: ObservedControl.fields.label,\n disabled: Schema.Boolean,\n checked: Schema.optionalKey(Schema.Boolean),\n selected: Schema.optionalKey(Schema.Boolean),\n required: Schema.optionalKey(Schema.Boolean),\n multiple: Schema.optionalKey(Schema.Boolean),\n editable: Schema.Boolean,\n inputType: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(32))),\n autocomplete: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(128))),\n /** A resolved link target, or where this control submits its form. Absent when over-long. */\n destination: Schema.optionalKey(Schema.String.check(Schema.isMaxLength(2048))),\n formMethod: Schema.optionalKey(Schema.Literals([\"get\", \"post\", \"dialog\"])),\n box: ViewportRect,\n placement: Schema.Literals([\"inside\", \"partial\", \"outside\"]),\n /** `self`: the browser finds this control at its visible centre. Not a pixel comparison. */\n hitTest: Schema.Literals([\"self\", \"covered\", \"uncertain\", \"unsampled\"]),\n /** Only then is `box` in the main frame's viewport, the space pointer input uses. */\n mainFrame: Schema.Boolean,\n}) {}\n\n/**\n * Passive evidence for a recorder: what was on screen, and optionally a picture of it. It issues\n * no element references and never replaces the observation an agent's tools act on, so\n * inspecting, checkpointing and then acting on the inspected node all compose.\n *\n * It is host-only, because it carries control facts. Text and picture are read one after the\n * other, never atomically: the interval says when, and `documentChanged` says the document was\n * replaced in between, so the two may describe different documents.\n */\nexport class Checkpoint extends Schema.Class<Checkpoint>(\"BrowserCheckpoint\")({\n target: Target,\n revision: Schema.Natural,\n url: Schema.String.check(Schema.isMaxLength(8192)),\n text: Schema.String.check(Schema.isMaxLength(131072)),\n textTruncated: Schema.Boolean,\n controls: Schema.Array(ControlFacts).check(Schema.isMaxLength(64)),\n controlsTruncated: Schema.Boolean,\n viewport: ViewportEvidence,\n picture: Schema.optionalKey(\n Schema.Struct({ mediaType: Schema.Literal(\"image/png\"), bytes: Schema.Uint8Array }),\n ),\n documentChanged: Schema.Boolean,\n startedMonotonicNanos: Schema.BigInt,\n completedMonotonicNanos: Schema.BigInt,\n}) {}\n\nconst ReadingBounds = {\n maxTextBytes: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 131072 })),\n ),\n maxControls: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 0, maximum: 64 }))),\n};\n\n/** Omitted bounds default at admission; `scope` defaults to the whole document. */\nexport const ObservationOptions = Schema.Struct({\n scope: Schema.optionalKey(Schema.Literals([\"document\", \"viewport\"])),\n match: Schema.optionalKey(ReadingMatch),\n ...ReadingBounds,\n});\n\nexport type ObservationOptions = typeof ObservationOptions.Type;\n\n/** A checkpoint always reads the viewport. `picture` adds a PNG of it, within the byte policy. */\nexport const CheckpointOptions = Schema.Struct({\n ...ReadingBounds,\n picture: Schema.optionalKey(Schema.Boolean),\n});\n\nexport type CheckpointOptions = typeof CheckpointOptions.Type;\n\n/** One native pointer move. Easing and pacing are the caller's: send the points you want. */\nexport class PointerMoveRequest extends Schema.Class<PointerMoveRequest>(\n \"BrowserPointerMoveRequest\",\n)({ to: ViewportPoint }) {}\n\n/** Moves the pointer onto one exact element where it is. It never scrolls to reach it. */\nexport class HoverRequest extends Schema.Class<HoverRequest>(\"BrowserHoverRequest\")({\n selector: Selector,\n}) {}\n\nconst WheelDelta = Schema.Finite.check(Schema.isBetween({ minimum: -100000, maximum: 100000 }));\n\n/**\n * One native wheel event where the pointer is, or at `at` after moving there first. The browser\n * chooses what scrolls, exactly as it would for a person, so a nested scroll container under\n * the pointer scrolls instead of the page.\n */\nexport class WheelRequest extends Schema.Class<WheelRequest>(\"BrowserWheelRequest\")({\n deltaX: WheelDelta,\n deltaY: WheelDelta,\n at: Schema.optionalKey(ViewportPoint),\n}) {}\n\n/**\n * The keys a `press` may name, spelled as the `KeyboardEvent.key` the page will see. The set is\n * closed on purpose: a key name is parsed by the native engine, so none reaches it unreviewed.\n */\nexport const NamedKey = Schema.Literals([\n \"Enter\",\n \"Tab\",\n \"Backspace\",\n \"Delete\",\n \"Escape\",\n \"ArrowLeft\",\n \"ArrowRight\",\n \"ArrowUp\",\n \"ArrowDown\",\n \"Home\",\n \"End\",\n \"PageUp\",\n \"PageDown\",\n]);\n\nexport type NamedKey = typeof NamedKey.Type;\n\n/** One printable ASCII character, space included: every one is a key on the US layout. */\nconst PrintableKey = Schema.String.check(Schema.isPattern(/^[\\x20-\\x7e]$/));\n\nexport const KeyModifier = Schema.Literals([\"Shift\", \"Control\", \"Alt\", \"Meta\"]);\n\nexport type KeyModifier = typeof KeyModifier.Type;\n\n/** One key, down then up, with any modifiers held around it. */\nexport const KeyStroke = Schema.Struct({\n key: Schema.Union([NamedKey, PrintableKey]),\n modifiers: Schema.optionalKey(\n Schema.Array(KeyModifier).check(\n Schema.makeFilter((held) => new Set(held).size === held.length, {\n title: \"each modifier at most once\",\n }),\n ),\n ),\n});\n\nexport type KeyStroke = typeof KeyStroke.Type;\n\n/**\n * One real key stroke. It goes to whatever has focus in the page, exactly as it would for a\n * person, unless `into` names the one element that must already have it. It never focuses that\n * element, because that would hide a scripted focus inside a native-input operation: click it\n * first.\n */\nexport class PressRequest extends Schema.Class<PressRequest>(\"BrowserPressRequest\")({\n ...KeyStroke.fields,\n into: Schema.optionalKey(Selector),\n}) {}\n\n/** Counted in characters, not UTF-16 units, because that is how many strokes it costs. */\nconst TypedText = Schema.NonEmptyString.check(\n Schema.makeFilter((text) => [...text].length <= 256, { title: \"at most 256 characters\" }),\n Schema.makeFilter(\n (text) =>\n [...text].every((character) => {\n const point = character.codePointAt(0) ?? 0;\n\n // An unpaired surrogate is not a character, and would not survive the wire as one.\n return point > 0x1f && point !== 0x7f && (point < 0xd800 || point > 0xdfff);\n }),\n { title: \"no control characters or unpaired surrogates\" },\n ),\n);\n\n/**\n * Text as the real key strokes that produce it, two native commands for each character, one\n * after another under a single action timeout: send a long passage as several shorter runs.\n * A character the US layout cannot produce is inserted as text, as an input method commits it,\n * and raises no key events. Control characters are refused, so a line break can never press\n * Enter from inside a run of text: a named key is always its own `press`. `into` works as it\n * does for `PressRequest`: a guard on where the text lands, never a focus.\n */\nexport class TypeRequest extends Schema.Class<TypeRequest>(\"BrowserTypeRequest\")({\n text: TypedText,\n into: Schema.optionalKey(Selector),\n}) {}\n\n/**\n * What native input was dispatched, where and when. `position` is the point this owner\n * commanded, or null when it has not yet placed the pointer on this page. The interval is on\n * the host monotonic clock that stamps `CapturedFrame.receivedMonotonicNanos`, so input and\n * pixels share one timeline. A wheel event is dispatched, not awaited: the receipt does not\n * claim the page finished scrolling, or that any frame shows it. A receipt never says which\n * key was pressed or what was typed.\n */\nexport class InputReceipt extends Schema.Class<InputReceipt>(\"BrowserInputReceipt\")({\n target: Target,\n kind: Schema.Literals([\"pointer-move\", \"hover\", \"wheel\", \"press\", \"type\"]),\n position: Schema.NullOr(ViewportPoint),\n delta: Schema.optionalKey(Schema.Struct({ x: WheelDelta, y: WheelDelta })),\n startedMonotonicNanos: Schema.BigInt,\n completedMonotonicNanos: Schema.BigInt,\n}) {}\n\nexport class ScreenshotRequest extends Schema.Class<ScreenshotRequest>(\"BrowserScreenshotRequest\")({\n fullPage: Schema.Boolean,\n}) {}\n\nexport class NavigationResult extends Schema.Class<NavigationResult>(\"BrowserNavigationResult\")({\n url: TargetUrl,\n}) {}\n\nexport class ActionResult extends Schema.Class<ActionResult>(\"BrowserActionResult\")({\n url: TargetUrl,\n}) {}\n\nexport class TextResult extends Schema.Class<TextResult>(\"BrowserTextResult\")({\n text: Schema.String.check(Schema.isMaxLength(8 * 1024 * 1024)),\n}) {}\n\nexport class ScreenshotResult extends Schema.Class<ScreenshotResult>(\"BrowserScreenshotResult\")({\n mediaType: Schema.Literal(\"image/png\"),\n bytes: Schema.Uint8Array,\n}) {}\n\nconst FileMediaType = Schema.NonEmptyString.check(\n Schema.isMaxLength(128),\n Schema.isPattern(/^[a-z0-9][a-z0-9!#$&^_+.-]*\\/[a-z0-9][a-z0-9!#$&^_+.-]*$/),\n);\n\n/** Small selection is in-memory by design: bytes the caller already holds, never a path. */\nexport class InlineFile extends Schema.Class<InlineFile>(\"BrowserInlineFile\")({\n name: SafeFilename,\n mediaType: FileMediaType,\n bytes: Schema.Uint8Array.check(\n Schema.makeFilter((value) => value.byteLength >= 1 && value.byteLength <= 1024 * 1024, {\n title: \"between one byte and one mebibyte\",\n }),\n ),\n}) {}\n\nexport const InlineFiles = Schema.Array(InlineFile).check(\n Schema.isMaxLength(8),\n Schema.makeFilter(\n (files) =>\n files.length > 0 &&\n files.reduce((total, file) => total + file.bytes.byteLength, 0) <= 4 * 1024 * 1024,\n { title: \"at most four mebibytes of in-memory selection\" },\n ),\n);\n\nexport const AutomationOptions = Schema.Struct({\n actionTimeoutMillis: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 60000 })),\n ),\n /** Independent host-only checkpoint/control-facts allowance; normalized to 10,000 by the runtime. */\n maxHostReads: Schema.optionalKey(\n Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 1_000_000 })),\n ),\n maxPages: Schema.optionalKey(Schema.Int.check(Schema.isBetween({ minimum: 1, maximum: 32 }))),\n initialPage: Schema.optionalKey(\n Schema.Union([\n Schema.Struct({ targetId: Identifier }),\n Schema.Struct({ newPage: Schema.Literal(true) }),\n ]),\n ),\n popupPolicy: Schema.optionalKey(Schema.Literals([\"retain\", \"close\", \"pause\"])),\n dialogPolicy: Schema.optionalKey(Schema.Literals([\"dismiss\", \"pause\"])),\n pageControl: Schema.optionalKey(Schema.Boolean),\n});\n\nexport type AutomationOptions = typeof AutomationOptions.Type;\n"],"mappings":";;;AAIA,MAAa,aAAa,OAAO,eAAe,MAC9C,OAAO,YAAY,GAAG,GACtB,OAAO,UAAU,kBAAkB,CACrC;AAEA,MAAa,cAAc,OAAO,IAAI,MAAM,OAAO,cAAc,CAAC,CAAC;;AAGnE,MAAa,eAAe,OA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,OAAO,UAAU;EAAE,SAAS;EAAG,SAAS;CAAU,CAAC,CAAC,CACvE;CACA,UAAU,OAAO,YAAY,OAAO,IAAI,MAAM,OAAO,UAAU;EAAE,SAAS;EAAG,SAAS;CAAG,CAAC,CAAC,CAAC;CAC5F,aAAa,OAAO,YAClB,OAAO,MAAM,CACX,OAAO,OAAO,EAAE,UAAU,WAAW,CAAC,GACtC,OAAO,OAAO,EAAE,SAAS,OAAO,QAAQ,IAAI,EAAE,CAAC,CACjD,CAAC,CACH;CACA,aAAa,OAAO,YAAY,OAAO,SAAS;EAAC;EAAU;EAAS;CAAO,CAAC,CAAC;CAC7E,cAAc,OAAO,YAAY,OAAO,SAAS,CAAC,WAAW,OAAO,CAAC,CAAC;CACtE,aAAa,OAAO,YAAY,OAAO,OAAO;AAChD,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { BrowserError, InitializationError } from "./Errors.mjs";
|
|
2
|
-
import { O as Observation, a as BrowserPolicy, b as InlineFile, c as ClickRequest, et as Viewport, n as AutomationOptions, t as ActionResult } from "./BrowserData-
|
|
2
|
+
import { O as Observation, a as BrowserPolicy, b as InlineFile, c as ClickRequest, et as Viewport, n as AutomationOptions, t as ActionResult } from "./BrowserData-D_zsf79q.mjs";
|
|
3
3
|
import { BrowserSession, OpenOptions } from "./Browser.mjs";
|
|
4
4
|
import { Crypto, Effect, Option, Redacted, Schema, Scope } from "effect";
|
|
5
5
|
//#region src/internal/browser/ConnectionCleanup.d.ts
|
|
@@ -140,4 +140,4 @@ declare const make: (options: RuntimeOptions) => Effect.Effect<Runtime, BrowserE
|
|
|
140
140
|
//#endregion
|
|
141
141
|
export { ConnectionCleanup as _, DownloadEvent as a, noConnection as b, Lifetime as c, Runtime as d, RuntimeOptions as f, CleanupStep as g, playwright as h, Connection as i, PlaywrightOptions as l, make as m, Acquisition as n, FileRequest as o, Source as p, BrowserBinding as r, Integration as s, AcquireOptions as t, ResolvedFileSelection as u, ConnectionState as v, reported as x, cleanupStep as y };
|
|
142
142
|
export {};
|
|
143
|
-
//# sourceMappingURL=BrowserRuntime-
|
|
143
|
+
//# sourceMappingURL=BrowserRuntime-e7MXqjOK.d.mts.map
|
|
@@ -4586,13 +4586,21 @@ const makeOwner = Effect.fnUntraced(function* (limits) {
|
|
|
4586
4586
|
nativeUncertainty = false;
|
|
4587
4587
|
policies.clear();
|
|
4588
4588
|
},
|
|
4589
|
-
status: Effect.sync(() =>
|
|
4590
|
-
|
|
4591
|
-
|
|
4592
|
-
|
|
4593
|
-
|
|
4594
|
-
|
|
4595
|
-
|
|
4589
|
+
status: Effect.sync(() => {
|
|
4590
|
+
const status = SessionStatus.make({
|
|
4591
|
+
phase: state.phase,
|
|
4592
|
+
reason: terminalReason ?? pauseReason ?? policies.values().next().value?.reason ?? null,
|
|
4593
|
+
generation: state.generation,
|
|
4594
|
+
busy: holdingPermit || policies.size > 0 || waiting !== void 0,
|
|
4595
|
+
unresolvedDispatch: nativeUncertainty || unresolved.size > 0,
|
|
4596
|
+
actions: {
|
|
4597
|
+
used: state.actions,
|
|
4598
|
+
maximum: limits.maxActions
|
|
4599
|
+
}
|
|
4600
|
+
});
|
|
4601
|
+
Object.freeze(status.actions);
|
|
4602
|
+
return Object.freeze(status);
|
|
4603
|
+
}),
|
|
4596
4604
|
diagnostics: Effect.sync(() => {
|
|
4597
4605
|
const snapshot = BrowserDiagnostics.make({
|
|
4598
4606
|
records: [...records],
|
|
@@ -5779,4 +5787,4 @@ const make = Effect.fnUntraced(function* (options) {
|
|
|
5779
5787
|
//#endregion
|
|
5780
5788
|
export { cleanupStep as a, checked as c, randomUuid as i, fromNativeAttempt as l, make as n, noConnection as o, playwright as r, reported as s, DownloadEvent as t, issueBinding as u };
|
|
5781
5789
|
|
|
5782
|
-
//# sourceMappingURL=BrowserRuntime-
|
|
5790
|
+
//# sourceMappingURL=BrowserRuntime-xBCLDy_5.mjs.map
|