effect-browser 0.2.0-beta.7 → 0.2.0-beta.8
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 +486 -152
- package/dist/Browser-n-bKgBNN.d.mts +372 -0
- package/dist/Browser.d.mts +3 -200
- package/dist/Browser.mjs +9 -1
- package/dist/Browser.mjs.map +1 -1
- package/dist/{BrowserData-KHk4o__c.d.mts → BrowserData-CPIIIHol.d.mts} +81 -7
- package/dist/BrowserData.d.mts +2 -2
- package/dist/BrowserData.mjs +104 -6
- package/dist/BrowserData.mjs.map +1 -1
- package/dist/{BrowserRuntime-hxkTNlRa.d.mts → BrowserRuntime-CFe9uUTv.d.mts} +16 -11
- package/dist/{BrowserRuntime-Cr76CN4I.mjs → BrowserRuntime-HJ1yYlFS.mjs} +4990 -4309
- package/dist/BrowserRuntime-HJ1yYlFS.mjs.map +1 -0
- package/dist/BrowserRuntime.d.mts +2 -2
- package/dist/BrowserRuntime.mjs +2 -1
- package/dist/Capture.d.mts +9 -7
- package/dist/Capture.mjs +157 -32
- package/dist/Capture.mjs.map +1 -1
- package/dist/{CaptureData-Dys0Ko9d.mjs → CaptureData-CYriZHX1.mjs} +25 -6
- package/dist/CaptureData-CYriZHX1.mjs.map +1 -0
- package/dist/CaptureData.d.mts +62 -3
- package/dist/CaptureData.mjs +2 -2
- package/dist/Chromium.d.mts +2 -2
- package/dist/Chromium.mjs +19 -10
- package/dist/Chromium.mjs.map +1 -1
- package/dist/Errors.d.mts +66 -17
- package/dist/Errors.mjs +47 -5
- package/dist/Errors.mjs.map +1 -1
- package/dist/Images-CaaPNeed.mjs +76 -0
- package/dist/Images-CaaPNeed.mjs.map +1 -0
- package/dist/OperationOptions-DAeRS6O9.mjs +55 -0
- package/dist/OperationOptions-DAeRS6O9.mjs.map +1 -0
- package/dist/PageControl.d.mts +6 -6
- package/dist/PageControl.mjs +16 -10
- package/dist/PageControl.mjs.map +1 -1
- package/dist/PageRegistry-B3q9DS3g.mjs +164 -0
- package/dist/PageRegistry-B3q9DS3g.mjs.map +1 -0
- package/dist/Plan-D8qQ48Ic.mjs +512 -0
- package/dist/Plan-D8qQ48Ic.mjs.map +1 -0
- package/dist/Plan.d.mts +3 -0
- package/dist/Plan.mjs +2 -0
- package/dist/PlanData-B668RxbQ.d.mts +4831 -0
- package/dist/PlanData.d.mts +3 -0
- package/dist/PlanData.mjs +268 -0
- package/dist/PlanData.mjs.map +1 -0
- package/dist/PlanInput-BJcPPncs.mjs +75 -0
- package/dist/PlanInput-BJcPPncs.mjs.map +1 -0
- package/dist/PublicSession-Bs61Eal8.mjs +5601 -0
- package/dist/PublicSession-Bs61Eal8.mjs.map +1 -0
- package/dist/Testing.d.mts +48 -6
- package/dist/Testing.mjs +651 -113
- package/dist/Testing.mjs.map +1 -1
- package/dist/Timeline-fV22Xk-S.d.mts +29 -0
- package/dist/Timeline.d.mts +4 -0
- package/dist/Timeline.mjs +20 -0
- package/dist/Timeline.mjs.map +1 -0
- package/dist/TimelineData-BsOn-YGZ.d.mts +3818 -0
- package/dist/TimelineData.d.mts +3 -0
- package/dist/TimelineData.mjs +482 -0
- package/dist/TimelineData.mjs.map +1 -0
- package/dist/index.d.mts +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +17 -1
- package/dist/Association-CH3kPHXE.mjs +0 -167
- package/dist/Association-CH3kPHXE.mjs.map +0 -1
- package/dist/BrowserRuntime-Cr76CN4I.mjs.map +0 -1
- package/dist/CaptureData-Dys0Ko9d.mjs.map +0 -1
- package/dist/PageControlAssociation-DabEg5AR.mjs +0 -10
- package/dist/PageControlAssociation-DabEg5AR.mjs.map +0 -1
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import { BrowserError, Reasons } from "./Errors.mjs";
|
|
2
|
+
import { CheckpointOptions, Identifier, TypeRequest } from "./BrowserData.mjs";
|
|
3
|
+
import { Descriptor, InputBindings, InputValue, Limits, LivePlan, Performed, Plan, RecordedAction, ResolveGuard, SettledOptions } from "./PlanData.mjs";
|
|
4
|
+
import { t as guardedDecode } from "./PlanInput-BJcPPncs.mjs";
|
|
5
|
+
import { n as FiniteDurationInput, r as OperationOptionsSchema } from "./OperationOptions-DAeRS6O9.mjs";
|
|
6
|
+
import { Data, Duration, Effect, Schema } from "effect";
|
|
7
|
+
//#region src/internal/browser/SchemaPath.ts
|
|
8
|
+
/** Report only a top-level key declared by the failed schema, never an input key or value. */
|
|
9
|
+
const schemaPath = (error) => {
|
|
10
|
+
let issue = error.issue;
|
|
11
|
+
let remaining = 32;
|
|
12
|
+
while (remaining-- > 0 && (issue._tag === "Encoding" || issue._tag === "Filter")) issue = issue.issue;
|
|
13
|
+
if (issue._tag !== "Composite" || issue.ast._tag !== "Objects") return {};
|
|
14
|
+
const first = issue.issues[0];
|
|
15
|
+
if (first._tag !== "Pointer" || first.path.length === 0) return {};
|
|
16
|
+
const key = first.path[0];
|
|
17
|
+
if (typeof key !== "string" || key.length > 512) return {};
|
|
18
|
+
return issue.ast.propertySignatures.find((property) => property.name === key) === void 0 ? {} : { path: key };
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
//#region src/internal/browser/PlanOptions.ts
|
|
22
|
+
const durationPrototype = Object.getPrototypeOf(Duration.zero);
|
|
23
|
+
/** Inspect data descriptors, rather than evaluating caller-supplied getters. */
|
|
24
|
+
const ownFields = (value, keys) => {
|
|
25
|
+
if (value === null || typeof value !== "object" || Array.isArray(value)) throw new Error("Expected host option data");
|
|
26
|
+
const prototype = Object.getPrototypeOf(value);
|
|
27
|
+
if (prototype !== Object.prototype && prototype !== null) throw new Error("Expected plain host option data");
|
|
28
|
+
const fields = {};
|
|
29
|
+
const names = Reflect.ownKeys(value);
|
|
30
|
+
if (names.length > keys.length) throw new Error("Unexpected host option");
|
|
31
|
+
for (const name of names) {
|
|
32
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, name);
|
|
33
|
+
if (typeof name !== "string" || !keys.includes(name) || descriptor === void 0 || !descriptor.enumerable || !("value" in descriptor)) throw new Error("Expected declared host option data");
|
|
34
|
+
fields[name] = descriptor.value;
|
|
35
|
+
}
|
|
36
|
+
return fields;
|
|
37
|
+
};
|
|
38
|
+
const configuration = (operation) => BrowserError.make({
|
|
39
|
+
operation,
|
|
40
|
+
reason: Reasons.Configuration.make({}),
|
|
41
|
+
outcome: "undispatched"
|
|
42
|
+
});
|
|
43
|
+
const hostFields = (value, keys, operation) => Effect.try({
|
|
44
|
+
try: () => ownFields(value === void 0 ? {} : value, keys),
|
|
45
|
+
catch: () => configuration(operation)
|
|
46
|
+
});
|
|
47
|
+
const checkedData = (schema, value, operation) => guardedDecode(schema)(value, { onExcessProperty: "error" }).pipe(Effect.mapError((error) => BrowserError.make({
|
|
48
|
+
operation,
|
|
49
|
+
reason: Reasons.Configuration.make(schemaPath(error)),
|
|
50
|
+
outcome: "undispatched"
|
|
51
|
+
})));
|
|
52
|
+
const durationData = (value, depth = 0) => {
|
|
53
|
+
if (typeof value === "string" && value.length > Limits.encodedBytes) throw new Error("Duration input is too large");
|
|
54
|
+
if (value === null || typeof value !== "object") return;
|
|
55
|
+
if (depth > 2) throw new Error("Duration input is too deep");
|
|
56
|
+
const prototype = Object.getPrototypeOf(value);
|
|
57
|
+
if (prototype !== Object.prototype && prototype !== null && prototype !== Array.prototype && prototype !== durationPrototype) throw new Error("Expected duration data");
|
|
58
|
+
const keys = Reflect.ownKeys(value);
|
|
59
|
+
if (keys.length > 10) throw new Error("Duration input has too many fields");
|
|
60
|
+
for (const key of keys) {
|
|
61
|
+
const descriptor = Object.getOwnPropertyDescriptor(value, key);
|
|
62
|
+
if (descriptor === void 0 || !("value" in descriptor)) throw new Error("Expected duration data");
|
|
63
|
+
durationData(descriptor.value, depth + 1);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
const millis = (value, positive, operation) => Effect.try({
|
|
67
|
+
try: () => {
|
|
68
|
+
durationData(value);
|
|
69
|
+
return value;
|
|
70
|
+
},
|
|
71
|
+
catch: () => configuration(operation)
|
|
72
|
+
}).pipe(Effect.flatMap((value) => Schema.decodeUnknownEffect(FiniteDurationInput)(value, { onExcessProperty: "error" }).pipe(Effect.mapError(() => configuration(operation)))), Effect.map((value) => Duration.toMillis(Duration.fromInputUnsafe(value))), Effect.filterOrFail((value) => !positive || value > 0, () => configuration(operation)));
|
|
73
|
+
const operationData = (fields, operation) => Effect.gen(function* () {
|
|
74
|
+
const admission = fields.admission === void 0 ? void 0 : yield* hostFields(fields.admission, ["queue"], operation);
|
|
75
|
+
const queue = admission?.queue === void 0 ? void 0 : yield* millis(admission.queue, false, operation);
|
|
76
|
+
return yield* checkedData(OperationOptionsSchema, {
|
|
77
|
+
...fields.timeoutMillis === void 0 ? {} : { timeoutMillis: fields.timeoutMillis },
|
|
78
|
+
...admission === void 0 ? {} : { admission: queue === void 0 ? {} : { queue } }
|
|
79
|
+
}, operation);
|
|
80
|
+
});
|
|
81
|
+
const RunData = Schema.Struct({
|
|
82
|
+
style: Schema.optionalKey(Schema.Union([Schema.Literal("plain"), Performed])),
|
|
83
|
+
through: Schema.optionalKey(Identifier),
|
|
84
|
+
inputs: Schema.optionalKey(InputBindings),
|
|
85
|
+
checkpoint: Schema.optionalKey(CheckpointOptions)
|
|
86
|
+
});
|
|
87
|
+
const AdmissionFunction = Schema.declare((value) => typeof value === "function");
|
|
88
|
+
const checkedRunOptions = (value) => Effect.gen(function* () {
|
|
89
|
+
const fields = yield* hostFields(value, [
|
|
90
|
+
"style",
|
|
91
|
+
"startAt",
|
|
92
|
+
"within",
|
|
93
|
+
"through",
|
|
94
|
+
"inputs",
|
|
95
|
+
"policy",
|
|
96
|
+
"checkpoint",
|
|
97
|
+
"timeoutMillis",
|
|
98
|
+
"admission"
|
|
99
|
+
], "run");
|
|
100
|
+
const operation = yield* operationData(fields, "run");
|
|
101
|
+
const withinMillis = fields.within === void 0 ? void 0 : yield* millis(fields.within, true, "run");
|
|
102
|
+
const startAt = fields.startAt === void 0 ? void 0 : yield* Schema.decodeUnknownEffect(Schema.BigInt.check(Schema.makeFilter((value) => Number.isFinite(Number(value)) && Math.abs(Number(value) / 1e6) <= Number.MAX_SAFE_INTEGER, { title: "finite runtime monotonic instant" })))(fields.startAt).pipe(Effect.mapError(() => configuration("run")));
|
|
103
|
+
let policy;
|
|
104
|
+
if (fields.policy !== void 0) {
|
|
105
|
+
const fieldsOfPolicy = yield* hostFields(fields.policy, ["admit"], "run");
|
|
106
|
+
const admit = yield* Schema.decodeUnknownEffect(AdmissionFunction)(fieldsOfPolicy.admit).pipe(Effect.mapError(() => configuration("run")));
|
|
107
|
+
policy = Object.freeze({ admit });
|
|
108
|
+
}
|
|
109
|
+
const data = yield* checkedData(RunData, {
|
|
110
|
+
...fields.style === void 0 ? {} : { style: fields.style },
|
|
111
|
+
...fields.through === void 0 ? {} : { through: fields.through },
|
|
112
|
+
...fields.inputs === void 0 ? {} : { inputs: fields.inputs },
|
|
113
|
+
...fields.checkpoint === void 0 ? {} : { checkpoint: fields.checkpoint }
|
|
114
|
+
}, "run");
|
|
115
|
+
return Object.freeze({
|
|
116
|
+
...operation,
|
|
117
|
+
...withinMillis === void 0 ? {} : {
|
|
118
|
+
within: withinMillis,
|
|
119
|
+
withinMillis
|
|
120
|
+
},
|
|
121
|
+
...data.style === void 0 ? {} : { style: data.style === "plain" ? "plain" : Object.freeze({
|
|
122
|
+
...data.style,
|
|
123
|
+
motion: Object.freeze({
|
|
124
|
+
...data.style.motion,
|
|
125
|
+
pointer: Object.freeze({
|
|
126
|
+
...data.style.motion.pointer,
|
|
127
|
+
duration: Object.freeze({ ...data.style.motion.pointer.duration })
|
|
128
|
+
}),
|
|
129
|
+
keys: Object.freeze({
|
|
130
|
+
interval: Object.freeze({ ...data.style.motion.keys.interval }),
|
|
131
|
+
hold: Object.freeze({ ...data.style.motion.keys.hold })
|
|
132
|
+
}),
|
|
133
|
+
scroll: Object.freeze({
|
|
134
|
+
...data.style.motion.scroll,
|
|
135
|
+
duration: Object.freeze({ ...data.style.motion.scroll.duration })
|
|
136
|
+
})
|
|
137
|
+
}),
|
|
138
|
+
slips: Object.freeze({ ...data.style.slips })
|
|
139
|
+
}) },
|
|
140
|
+
...startAt === void 0 ? {} : { startAt },
|
|
141
|
+
...operation.admission?.queue === void 0 ? {} : { queueMillis: Duration.toMillis(Duration.fromInputUnsafe(operation.admission.queue)) },
|
|
142
|
+
...data.through === void 0 ? {} : { through: data.through },
|
|
143
|
+
...data.inputs === void 0 ? {} : { inputs: Object.freeze({ ...data.inputs }) },
|
|
144
|
+
...data.checkpoint === void 0 ? {} : { checkpoint: Object.freeze({ ...data.checkpoint }) },
|
|
145
|
+
...policy === void 0 ? {} : { policy }
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
const checkedLivePlan = (value) => checkedData(LivePlan, value, "run");
|
|
149
|
+
const checkedDescriptor = (value) => checkedData(Descriptor, value, "resolve");
|
|
150
|
+
const checkedResolveOptions = (value) => Effect.gen(function* () {
|
|
151
|
+
const fields = yield* hostFields(value, [
|
|
152
|
+
"guard",
|
|
153
|
+
"timeoutMillis",
|
|
154
|
+
"admission"
|
|
155
|
+
], "resolve");
|
|
156
|
+
return {
|
|
157
|
+
operationOptions: yield* operationData(fields, "resolve"),
|
|
158
|
+
guard: yield* checkedData(ResolveGuard, fields.guard === void 0 ? { _tag: "Strict" } : fields.guard, "resolve")
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
const checkedSettled = (value) => Effect.gen(function* () {
|
|
162
|
+
const fields = yield* hostFields(value, ["quiet", "within"], "settled");
|
|
163
|
+
const quietMillis = yield* millis(fields.quiet, true, "settled");
|
|
164
|
+
const withinMillis = yield* millis(fields.within, true, "settled");
|
|
165
|
+
return yield* checkedData(SettledOptions, {
|
|
166
|
+
quietMillis,
|
|
167
|
+
withinMillis
|
|
168
|
+
}, "settled");
|
|
169
|
+
});
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region src/internal/browser/Recording.ts
|
|
172
|
+
/** The same ordered inventory serves exact-node group resolution and capture correlation. */
|
|
173
|
+
const actionTargets = (action) => {
|
|
174
|
+
switch (action._tag) {
|
|
175
|
+
case "Click":
|
|
176
|
+
case "Hover":
|
|
177
|
+
case "Fill": return [{
|
|
178
|
+
target: action.target,
|
|
179
|
+
path: ["target"]
|
|
180
|
+
}];
|
|
181
|
+
case "Type":
|
|
182
|
+
case "Press": return action.target === void 0 ? [] : [{
|
|
183
|
+
target: action.target,
|
|
184
|
+
path: ["target"]
|
|
185
|
+
}];
|
|
186
|
+
case "Select": return [{
|
|
187
|
+
target: action.target,
|
|
188
|
+
path: ["target"]
|
|
189
|
+
}, ...action.options.map((target, index) => ({
|
|
190
|
+
target,
|
|
191
|
+
path: ["options", String(index)],
|
|
192
|
+
parent: 0
|
|
193
|
+
}))];
|
|
194
|
+
case "FillForm": {
|
|
195
|
+
const inventory = [];
|
|
196
|
+
action.fields.forEach((field, index) => {
|
|
197
|
+
const parent = inventory.length;
|
|
198
|
+
inventory.push({
|
|
199
|
+
target: field.target,
|
|
200
|
+
path: [
|
|
201
|
+
"fields",
|
|
202
|
+
String(index),
|
|
203
|
+
"target"
|
|
204
|
+
]
|
|
205
|
+
});
|
|
206
|
+
if (field._tag === "Options") field.options.forEach((target, option) => inventory.push({
|
|
207
|
+
target,
|
|
208
|
+
path: [
|
|
209
|
+
"fields",
|
|
210
|
+
String(index),
|
|
211
|
+
"options",
|
|
212
|
+
String(option)
|
|
213
|
+
],
|
|
214
|
+
parent
|
|
215
|
+
}));
|
|
216
|
+
});
|
|
217
|
+
if (action.submit !== void 0) inventory.push({
|
|
218
|
+
target: action.submit,
|
|
219
|
+
path: ["submit"]
|
|
220
|
+
});
|
|
221
|
+
return inventory;
|
|
222
|
+
}
|
|
223
|
+
case "Scroll": return action.mode._tag === "To" ? [{
|
|
224
|
+
target: action.mode.target,
|
|
225
|
+
path: ["mode", "target"]
|
|
226
|
+
}] : [];
|
|
227
|
+
case "Wait": return action.mode._tag === "Element" ? [{
|
|
228
|
+
target: action.mode.target,
|
|
229
|
+
path: ["mode", "target"],
|
|
230
|
+
captureInitial: true
|
|
231
|
+
}] : [];
|
|
232
|
+
case "Navigate":
|
|
233
|
+
case "PointerMove":
|
|
234
|
+
case "Wheel": return [];
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
const inputPaths = (action) => {
|
|
238
|
+
switch (action._tag) {
|
|
239
|
+
case "Fill": return [{
|
|
240
|
+
value: action.value,
|
|
241
|
+
path: ["value"],
|
|
242
|
+
typed: false
|
|
243
|
+
}];
|
|
244
|
+
case "Type": return [{
|
|
245
|
+
value: action.text,
|
|
246
|
+
path: ["text"],
|
|
247
|
+
typed: true
|
|
248
|
+
}];
|
|
249
|
+
case "FillForm": return action.fields.flatMap((field, index) => field._tag === "Value" ? [{
|
|
250
|
+
value: field.value,
|
|
251
|
+
path: [
|
|
252
|
+
"fields",
|
|
253
|
+
String(index),
|
|
254
|
+
"value"
|
|
255
|
+
],
|
|
256
|
+
typed: false
|
|
257
|
+
}] : []);
|
|
258
|
+
case "Click":
|
|
259
|
+
case "Hover":
|
|
260
|
+
case "Navigate":
|
|
261
|
+
case "PointerMove":
|
|
262
|
+
case "Press":
|
|
263
|
+
case "Scroll":
|
|
264
|
+
case "Select":
|
|
265
|
+
case "Wait":
|
|
266
|
+
case "Wheel": return [];
|
|
267
|
+
}
|
|
268
|
+
};
|
|
269
|
+
/** Every named input the steps read, in step and action order; literal values are not inputs. */
|
|
270
|
+
const namedInputs = (steps) => Object.freeze(steps.flatMap((step) => inputPaths(step.action).flatMap((input) => input.value._tag === "Input" ? [Object.freeze({
|
|
271
|
+
name: input.value.name,
|
|
272
|
+
stepId: step.id,
|
|
273
|
+
path: Object.freeze([...input.path]),
|
|
274
|
+
kind: input.typed ? "text" : "value"
|
|
275
|
+
})] : [])));
|
|
276
|
+
/** Length-prefixed segments cannot alias another step/path, including nested form values. */
|
|
277
|
+
const pathKey = (path) => path.map((part) => `${part.length}_${part}`).join("_");
|
|
278
|
+
const inputSlots$1 = (plan) => {
|
|
279
|
+
const names = /* @__PURE__ */ new Set();
|
|
280
|
+
const slots = /* @__PURE__ */ new Map();
|
|
281
|
+
for (const step of plan.steps) for (const input of inputPaths(step.action)) if (input.value._tag === "Input") names.add(input.value.name);
|
|
282
|
+
for (const step of plan.steps) {
|
|
283
|
+
const values = /* @__PURE__ */ new Map();
|
|
284
|
+
for (const input of inputPaths(step.action)) {
|
|
285
|
+
if (input.value._tag === "Input") continue;
|
|
286
|
+
const base = `record_${pathKey([step.id, ...input.path])}`;
|
|
287
|
+
let name = base;
|
|
288
|
+
let collision = 0;
|
|
289
|
+
while (names.has(name)) name = `${base}_${++collision}`;
|
|
290
|
+
names.add(name);
|
|
291
|
+
values.set(pathKey(input.path), name);
|
|
292
|
+
}
|
|
293
|
+
slots.set(step.id, values);
|
|
294
|
+
}
|
|
295
|
+
return slots;
|
|
296
|
+
};
|
|
297
|
+
/** Even a later step's missing or invalid binding refuses the walk before its first dispatch. */
|
|
298
|
+
const validateInputs = (plan, inputs) => Effect.forEach(plan.steps, (step) => Effect.forEach(inputPaths(step.action), (input) => {
|
|
299
|
+
const value = input.value._tag === "Literal" ? input.value.value : inputs[input.value.name];
|
|
300
|
+
return Schema.decodeUnknownEffect(input.typed ? TypeRequest.fields.text : InputValue)(value).pipe(Effect.mapError(() => BrowserError.make({
|
|
301
|
+
operation: "run",
|
|
302
|
+
reason: Reasons.Malformed.make({ path: `${step.id}/${input.path.join("/")}` }),
|
|
303
|
+
outcome: "undispatched"
|
|
304
|
+
})));
|
|
305
|
+
}, { discard: true }), { discard: true });
|
|
306
|
+
const incomplete = (path, sample, reason) => ({
|
|
307
|
+
_tag: "Incomplete",
|
|
308
|
+
facts: {
|
|
309
|
+
path,
|
|
310
|
+
...sample === void 0 ? {} : { matchScope: sample.scope },
|
|
311
|
+
...sample === void 0 ? {} : { facts: sample.facts }
|
|
312
|
+
},
|
|
313
|
+
reason
|
|
314
|
+
});
|
|
315
|
+
const descriptor = (sample) => {
|
|
316
|
+
const completeness = sample.completeness;
|
|
317
|
+
const facts = sample.facts;
|
|
318
|
+
if (completeness === void 0) return "FactsUnavailable";
|
|
319
|
+
if (completeness.label !== "complete") return "LabelOmitted";
|
|
320
|
+
if (completeness.destination === "omitted") return "DestinationOmitted";
|
|
321
|
+
if (completeness.inputType === "omitted" || completeness.autocomplete === "omitted" || completeness.formMethod === "omitted") return "IdentityOmitted";
|
|
322
|
+
for (const field of [
|
|
323
|
+
"destination",
|
|
324
|
+
"inputType",
|
|
325
|
+
"autocomplete",
|
|
326
|
+
"formMethod"
|
|
327
|
+
]) if (completeness[field] === "complete" !== (facts[field] !== void 0)) return "FactsUnavailable";
|
|
328
|
+
if (!sample.frameComplete || !facts.mainFrame && sample.frame === void 0) return "FrameUnavailable";
|
|
329
|
+
const identity = {
|
|
330
|
+
...facts.inputType === void 0 ? {} : { inputType: facts.inputType },
|
|
331
|
+
...facts.autocomplete === void 0 ? {} : { autocomplete: facts.autocomplete },
|
|
332
|
+
...facts.formMethod === void 0 ? {} : { formMethod: facts.formMethod }
|
|
333
|
+
};
|
|
334
|
+
return {
|
|
335
|
+
kind: facts.kind,
|
|
336
|
+
label: facts.label,
|
|
337
|
+
matchScope: sample.scope,
|
|
338
|
+
...facts.destination === void 0 ? {} : { destination: facts.destination },
|
|
339
|
+
...Object.keys(identity).length === 0 ? {} : { identity },
|
|
340
|
+
...sample.ordinal === void 0 ? {} : { ordinal: sample.ordinal },
|
|
341
|
+
...sample.frame === void 0 ? {} : { frame: sample.frame }
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
/** No authored descriptor substitutes for the facts of the exact node this attempt checked. */
|
|
345
|
+
const capture = (step, samples, slots, overflow) => {
|
|
346
|
+
if (overflow) return Effect.succeed(incomplete([], void 0, "EvidenceLimit"));
|
|
347
|
+
const targets = /* @__PURE__ */ new Map();
|
|
348
|
+
for (const entry of actionTargets(step.action)) {
|
|
349
|
+
const sample = samples.get(pathKey(entry.path))?.sample;
|
|
350
|
+
if (sample === void 0) return Effect.succeed(incomplete(entry.path, sample, "TargetUnavailable"));
|
|
351
|
+
const recorded = descriptor(sample);
|
|
352
|
+
if (typeof recorded === "string") return Effect.succeed(incomplete(entry.path, sample, recorded));
|
|
353
|
+
targets.set(pathKey(entry.path), {
|
|
354
|
+
_tag: "Descriptor",
|
|
355
|
+
descriptor: recorded
|
|
356
|
+
});
|
|
357
|
+
}
|
|
358
|
+
const target = (path) => targets.get(pathKey(path));
|
|
359
|
+
const value = (source, path) => source._tag === "Input" ? source : {
|
|
360
|
+
_tag: "Input",
|
|
361
|
+
name: slots.get(step.id)?.get(pathKey(path))
|
|
362
|
+
};
|
|
363
|
+
const action = step.action;
|
|
364
|
+
const project = () => {
|
|
365
|
+
switch (action._tag) {
|
|
366
|
+
case "Click":
|
|
367
|
+
case "Hover": return {
|
|
368
|
+
...action,
|
|
369
|
+
target: target(["target"])
|
|
370
|
+
};
|
|
371
|
+
case "Fill": return {
|
|
372
|
+
...action,
|
|
373
|
+
target: target(["target"]),
|
|
374
|
+
value: value(action.value, ["value"])
|
|
375
|
+
};
|
|
376
|
+
case "Type": return {
|
|
377
|
+
...action,
|
|
378
|
+
...action.target === void 0 ? {} : { target: target(["target"]) },
|
|
379
|
+
text: value(action.text, ["text"])
|
|
380
|
+
};
|
|
381
|
+
case "Press": return {
|
|
382
|
+
...action,
|
|
383
|
+
...action.target === void 0 ? {} : { target: target(["target"]) }
|
|
384
|
+
};
|
|
385
|
+
case "Select": return {
|
|
386
|
+
...action,
|
|
387
|
+
target: target(["target"]),
|
|
388
|
+
options: action.options.map((_, index) => target(["options", String(index)]))
|
|
389
|
+
};
|
|
390
|
+
case "FillForm": return {
|
|
391
|
+
...action,
|
|
392
|
+
fields: action.fields.map((field, index) => ({
|
|
393
|
+
...field,
|
|
394
|
+
target: target([
|
|
395
|
+
"fields",
|
|
396
|
+
String(index),
|
|
397
|
+
"target"
|
|
398
|
+
]),
|
|
399
|
+
...field._tag === "Value" ? { value: value(field.value, [
|
|
400
|
+
"fields",
|
|
401
|
+
String(index),
|
|
402
|
+
"value"
|
|
403
|
+
]) } : {},
|
|
404
|
+
...field._tag === "Options" ? { options: field.options.map((_, option) => target([
|
|
405
|
+
"fields",
|
|
406
|
+
String(index),
|
|
407
|
+
"options",
|
|
408
|
+
String(option)
|
|
409
|
+
])) } : {}
|
|
410
|
+
})),
|
|
411
|
+
...action.submit === void 0 ? {} : { submit: target(["submit"]) }
|
|
412
|
+
};
|
|
413
|
+
case "Scroll": return action.mode._tag === "To" ? {
|
|
414
|
+
...action,
|
|
415
|
+
mode: {
|
|
416
|
+
...action.mode,
|
|
417
|
+
target: target(["mode", "target"])
|
|
418
|
+
}
|
|
419
|
+
} : action;
|
|
420
|
+
case "Wait": return action.mode._tag === "Element" ? {
|
|
421
|
+
...action,
|
|
422
|
+
mode: {
|
|
423
|
+
...action.mode,
|
|
424
|
+
target: target(["mode", "target"])
|
|
425
|
+
}
|
|
426
|
+
} : action;
|
|
427
|
+
case "Navigate":
|
|
428
|
+
case "PointerMove":
|
|
429
|
+
case "Wheel": return action;
|
|
430
|
+
}
|
|
431
|
+
};
|
|
432
|
+
return Schema.decodeUnknownEffect(RecordedAction)(project(), { onExcessProperty: "error" }).pipe(Effect.map((action) => ({
|
|
433
|
+
_tag: "Complete",
|
|
434
|
+
action
|
|
435
|
+
})), Effect.orElseSucceed(() => incomplete([], void 0, "FactsUnavailable")));
|
|
436
|
+
};
|
|
437
|
+
//#endregion
|
|
438
|
+
//#region src/Plan.ts
|
|
439
|
+
/**
|
|
440
|
+
* Check and normalize host run options exactly as `page.start` and `page.run` will, without
|
|
441
|
+
* exposing private deadline/queue accounting fields. A caller that builds options from untrusted
|
|
442
|
+
* configuration can fail early with the same `Configuration` refusal.
|
|
443
|
+
*/
|
|
444
|
+
const checkRunOptions = (value) => checkedRunOptions(value).pipe(Effect.map(({ withinMillis: _withinMillis, queueMillis: _queueMillis, ...options }) => options));
|
|
445
|
+
/**
|
|
446
|
+
* Live host failure evidence is not a durable plan or a serialization schema. Its message names
|
|
447
|
+
* only the stage, step and reason; the evidence fields can retain authored literal values, so
|
|
448
|
+
* log the message rather than the whole value.
|
|
449
|
+
*/
|
|
450
|
+
var StepFailed = class extends Data.TaggedError("StepFailed") {
|
|
451
|
+
constructor(failure) {
|
|
452
|
+
const { operation, reason, outcome } = failure.error;
|
|
453
|
+
const where = failure.stage === "PreparationFailed" ? "Plan preparation failed" : `Step ${failure.stepId ?? "(unknown)"} failed`;
|
|
454
|
+
super({
|
|
455
|
+
...failure,
|
|
456
|
+
message: `${where}: ${operation} ${reason._tag} (${outcome})`
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
var RecordingIncomplete = class extends Data.TaggedError("RecordingIncomplete") {};
|
|
461
|
+
/** Validate and normalize authored data, including explicit document/Strict defaults. */
|
|
462
|
+
const make = (value) => guardedDecode(LivePlan)(value, { onExcessProperty: "error" });
|
|
463
|
+
/** Descriptor-only ingress for stored intent; it never decodes a live Ref. */
|
|
464
|
+
const decode = (value) => guardedDecode(Plan)(value, { onExcessProperty: "error" });
|
|
465
|
+
/** The normalized scope and guards are always included in encoded durable intent. */
|
|
466
|
+
const encode = (value) => guardedDecode(Plan)(value, { onExcessProperty: "error" }).pipe(Effect.flatMap(Schema.encodeEffect(Plan)));
|
|
467
|
+
/**
|
|
468
|
+
* The named inputs a stored or live plan reads, in step order. A recorded plan's literal fill and
|
|
469
|
+
* type values are such slots; bind each `name` in `inputs` to replay it.
|
|
470
|
+
*/
|
|
471
|
+
const inputSlots = (plan) => namedInputs(plan.steps);
|
|
472
|
+
/**
|
|
473
|
+
* Project only acknowledged, faithfully captured intent. An explicitly chosen completed prefix
|
|
474
|
+
* can be retained after a later failure by passing the operation's host snapshot and `through`.
|
|
475
|
+
* Literal input values are replaced during capture with deterministic named input slots.
|
|
476
|
+
*/
|
|
477
|
+
const recorded = (value, options) => Effect.gen(function* () {
|
|
478
|
+
const steps = "steps" in value ? value.steps : value.completed;
|
|
479
|
+
const through = options?.through;
|
|
480
|
+
const last = through === void 0 ? steps.length - 1 : steps.findIndex((step) => step.id === through);
|
|
481
|
+
if (through !== void 0 && last < 0) return yield* new RecordingIncomplete({
|
|
482
|
+
stepId: through,
|
|
483
|
+
reason: "InvalidThrough"
|
|
484
|
+
});
|
|
485
|
+
if (steps.length === 0) return yield* new RecordingIncomplete({ reason: "NoCompletedSteps" });
|
|
486
|
+
if (!("steps" in value) && through === void 0) return yield* new RecordingIncomplete({ reason: "Unacknowledged" });
|
|
487
|
+
const selected = steps.slice(0, last + 1);
|
|
488
|
+
for (const step of selected) {
|
|
489
|
+
if (!step.attempt.completed || step.attempt.outcome === "unknown" || step.attempt.outcome === "rejected" || step.receipt !== void 0 && typeof step.receipt === "object" && "stopped" in step.receipt && step.receipt.stopped !== void 0) return yield* new RecordingIncomplete({
|
|
490
|
+
stepId: step.id,
|
|
491
|
+
reason: "Unacknowledged"
|
|
492
|
+
});
|
|
493
|
+
if (step.recorded._tag === "Incomplete") return yield* new RecordingIncomplete({
|
|
494
|
+
stepId: step.id,
|
|
495
|
+
reason: "IncompleteCapture"
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
const projected = {
|
|
499
|
+
version: 1,
|
|
500
|
+
steps: selected.map((step) => ({
|
|
501
|
+
id: step.id,
|
|
502
|
+
action: step.recorded._tag === "Complete" ? step.recorded.action : void 0,
|
|
503
|
+
...step.sourceStep.expect === void 0 ? {} : { expect: step.sourceStep.expect },
|
|
504
|
+
resolution: step.sourceStep.resolution
|
|
505
|
+
}))
|
|
506
|
+
};
|
|
507
|
+
return yield* guardedDecode(Plan)(projected, { onExcessProperty: "error" }).pipe(Effect.mapError(() => new RecordingIncomplete({ reason: "IncompleteCapture" })));
|
|
508
|
+
});
|
|
509
|
+
//#endregion
|
|
510
|
+
export { checkedRunOptions as _, encode as a, recorded as c, inputSlots$1 as d, pathKey as f, checkedResolveOptions as g, checkedLivePlan as h, decode as i, actionTargets as l, checkedDescriptor as m, StepFailed as n, inputSlots as o, validateInputs as p, checkRunOptions as r, make as s, RecordingIncomplete as t, capture as u, checkedSettled as v, schemaPath as y };
|
|
511
|
+
|
|
512
|
+
//# sourceMappingURL=Plan-D8qQ48Ic.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Plan-D8qQ48Ic.mjs","names":["inputSlots"],"sources":["../src/internal/browser/SchemaPath.ts","../src/internal/browser/PlanOptions.ts","../src/internal/browser/Recording.ts","../src/Plan.ts"],"sourcesContent":["import type { Schema, SchemaIssue } from \"effect\";\n\n/** Report only a top-level key declared by the failed schema, never an input key or value. */\nexport const schemaPath = (error: Schema.SchemaError): { readonly path?: string } => {\n let issue: SchemaIssue.Issue = error.issue;\n let remaining = 32;\n\n while (remaining-- > 0 && (issue._tag === \"Encoding\" || issue._tag === \"Filter\")) {\n issue = issue.issue;\n }\n if (issue._tag !== \"Composite\" || issue.ast._tag !== \"Objects\") return {};\n const first = issue.issues[0];\n\n if (first._tag !== \"Pointer\" || first.path.length === 0) return {};\n const key = first.path[0];\n\n if (typeof key !== \"string\" || key.length > 512) return {};\n const declared = issue.ast.propertySignatures.find((property) => property.name === key);\n\n return declared === undefined ? {} : { path: key };\n};\n","import { Duration, Effect, Schema } from \"effect\";\n\nimport type {\n ElementAdmission,\n OperationOptions,\n ResolveOptions,\n SettledRequest,\n} from \"../../Browser.ts\";\nimport { CheckpointOptions, Identifier } from \"../../BrowserData.ts\";\nimport { BrowserError, Reasons, type BrowserOperation } from \"../../Errors.ts\";\nimport type { RunOptions } from \"../../Plan.ts\";\nimport {\n Descriptor,\n InputBindings,\n Limits,\n LivePlan,\n Performed,\n ResolveGuard,\n SettledOptions,\n} from \"../../PlanData.ts\";\nimport { FiniteDurationInput, OperationOptionsSchema } from \"./OperationOptions.ts\";\nimport { guardedDecode } from \"./PlanInput.ts\";\nimport { schemaPath } from \"./SchemaPath.ts\";\n\n/** Frozen host durations, never model-facing inputs or native authority. */\nexport interface PlanExecutionOptions extends RunOptions {\n readonly style?: \"plain\" | Performed;\n readonly withinMillis?: number;\n readonly queueMillis?: number;\n}\n\nconst durationPrototype: unknown = Object.getPrototypeOf(Duration.zero);\n\n/** Inspect data descriptors, rather than evaluating caller-supplied getters. */\nconst ownFields = (value: unknown, keys: ReadonlyArray<string>): Record<string, unknown> => {\n if (value === null || typeof value !== \"object\" || Array.isArray(value))\n throw new Error(\"Expected host option data\");\n const prototype: unknown = Object.getPrototypeOf(value);\n\n if (prototype !== Object.prototype && prototype !== null)\n throw new Error(\"Expected plain host option data\");\n const fields: Record<string, unknown> = {};\n const names = Reflect.ownKeys(value);\n\n if (names.length > keys.length) throw new Error(\"Unexpected host option\");\n for (const name of names) {\n const descriptor = Object.getOwnPropertyDescriptor(value, name);\n\n if (\n typeof name !== \"string\" ||\n !keys.includes(name) ||\n descriptor === undefined ||\n !descriptor.enumerable ||\n !(\"value\" in descriptor)\n )\n throw new Error(\"Expected declared host option data\");\n fields[name] = descriptor.value;\n }\n\n return fields;\n};\n\nconst configuration = (operation: BrowserOperation) =>\n BrowserError.make({\n operation,\n reason: Reasons.Configuration.make({}),\n outcome: \"undispatched\",\n });\n\nconst hostFields = (value: unknown, keys: ReadonlyArray<string>, operation: BrowserOperation) =>\n Effect.try({\n try: () => ownFields(value === undefined ? {} : value, keys),\n catch: () => configuration(operation),\n });\n\nconst checkedData = <S extends Schema.Constraint>(\n schema: S,\n value: unknown,\n operation: BrowserOperation,\n) =>\n guardedDecode(schema)(value, { onExcessProperty: \"error\" }).pipe(\n Effect.mapError((error) =>\n BrowserError.make({\n operation,\n reason: Reasons.Configuration.make(schemaPath(error)),\n outcome: \"undispatched\",\n }),\n ),\n );\n\nconst durationData = (value: unknown, depth = 0): void => {\n if (typeof value === \"string\" && value.length > Limits.encodedBytes)\n throw new Error(\"Duration input is too large\");\n if (value === null || typeof value !== \"object\") return;\n if (depth > 2) throw new Error(\"Duration input is too deep\");\n const prototype: unknown = Object.getPrototypeOf(value);\n\n if (\n prototype !== Object.prototype &&\n prototype !== null &&\n prototype !== Array.prototype &&\n prototype !== durationPrototype\n )\n throw new Error(\"Expected duration data\");\n const keys = Reflect.ownKeys(value);\n\n if (keys.length > 10) throw new Error(\"Duration input has too many fields\");\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n\n if (descriptor === undefined || !(\"value\" in descriptor))\n throw new Error(\"Expected duration data\");\n durationData(descriptor.value, depth + 1);\n }\n};\n\nconst millis = (value: unknown, positive: boolean, operation: BrowserOperation) =>\n Effect.try({\n try: () => {\n durationData(value);\n\n return value;\n },\n catch: () => configuration(operation),\n }).pipe(\n Effect.flatMap((value) =>\n Schema.decodeUnknownEffect(FiniteDurationInput)(value, {\n onExcessProperty: \"error\",\n }).pipe(Effect.mapError(() => configuration(operation))),\n ),\n Effect.map((value) => Duration.toMillis(Duration.fromInputUnsafe(value))),\n Effect.filterOrFail(\n (value) => !positive || value > 0,\n () => configuration(operation),\n ),\n );\n\nconst operationData = (fields: Record<string, unknown>, operation: BrowserOperation) =>\n Effect.gen(function* () {\n const admission =\n fields.admission === undefined\n ? undefined\n : yield* hostFields(fields.admission, [\"queue\"], operation);\n\n const queue =\n admission?.queue === undefined ? undefined : yield* millis(admission.queue, false, operation);\n\n return yield* checkedData(\n OperationOptionsSchema,\n {\n ...(fields.timeoutMillis === undefined ? {} : { timeoutMillis: fields.timeoutMillis }),\n ...(admission === undefined ? {} : { admission: queue === undefined ? {} : { queue } }),\n },\n operation,\n );\n });\n\nconst RunData = Schema.Struct({\n style: Schema.optionalKey(Schema.Union([Schema.Literal(\"plain\"), Performed])),\n through: Schema.optionalKey(Identifier),\n inputs: Schema.optionalKey(InputBindings),\n checkpoint: Schema.optionalKey(CheckpointOptions),\n});\n\nconst AdmissionFunction = Schema.declare<ElementAdmission[\"admit\"]>(\n (value): value is ElementAdmission[\"admit\"] => typeof value === \"function\",\n);\n\nexport const checkedRunOptions = (\n value: unknown,\n): Effect.Effect<PlanExecutionOptions, BrowserError> =>\n Effect.gen(function* () {\n const fields = yield* hostFields(\n value,\n [\n \"style\",\n \"startAt\",\n \"within\",\n \"through\",\n \"inputs\",\n \"policy\",\n \"checkpoint\",\n \"timeoutMillis\",\n \"admission\",\n ],\n \"run\",\n );\n\n const operation = yield* operationData(fields, \"run\");\n\n const withinMillis =\n fields.within === undefined ? undefined : yield* millis(fields.within, true, \"run\");\n\n const startAt =\n fields.startAt === undefined\n ? undefined\n : yield* Schema.decodeUnknownEffect(\n Schema.BigInt.check(\n Schema.makeFilter(\n (value) =>\n Number.isFinite(Number(value)) &&\n Math.abs(Number(value) / 1_000_000) <= Number.MAX_SAFE_INTEGER,\n { title: \"finite runtime monotonic instant\" },\n ),\n ),\n )(fields.startAt).pipe(Effect.mapError(() => configuration(\"run\")));\n\n let policy: ElementAdmission | undefined;\n\n if (fields.policy !== undefined) {\n const fieldsOfPolicy = yield* hostFields(fields.policy, [\"admit\"], \"run\");\n\n const admit = yield* Schema.decodeUnknownEffect(AdmissionFunction)(fieldsOfPolicy.admit).pipe(\n Effect.mapError(() => configuration(\"run\")),\n );\n\n policy = Object.freeze({ admit });\n }\n\n const data = yield* checkedData(\n RunData,\n {\n ...(fields.style === undefined ? {} : { style: fields.style }),\n ...(fields.through === undefined ? {} : { through: fields.through }),\n ...(fields.inputs === undefined ? {} : { inputs: fields.inputs }),\n ...(fields.checkpoint === undefined ? {} : { checkpoint: fields.checkpoint }),\n },\n \"run\",\n );\n\n return Object.freeze({\n ...operation,\n ...(withinMillis === undefined ? {} : { within: withinMillis, withinMillis }),\n ...(data.style === undefined\n ? {}\n : {\n style:\n data.style === \"plain\"\n ? \"plain\"\n : Object.freeze({\n ...data.style,\n motion: Object.freeze({\n ...data.style.motion,\n pointer: Object.freeze({\n ...data.style.motion.pointer,\n duration: Object.freeze({ ...data.style.motion.pointer.duration }),\n }),\n keys: Object.freeze({\n interval: Object.freeze({ ...data.style.motion.keys.interval }),\n hold: Object.freeze({ ...data.style.motion.keys.hold }),\n }),\n scroll: Object.freeze({\n ...data.style.motion.scroll,\n duration: Object.freeze({ ...data.style.motion.scroll.duration }),\n }),\n }),\n slips: Object.freeze({ ...data.style.slips }),\n }),\n }),\n ...(startAt === undefined ? {} : { startAt }),\n ...(operation.admission?.queue === undefined\n ? {}\n : { queueMillis: Duration.toMillis(Duration.fromInputUnsafe(operation.admission.queue)) }),\n ...(data.through === undefined ? {} : { through: data.through }),\n ...(data.inputs === undefined ? {} : { inputs: Object.freeze({ ...data.inputs }) }),\n ...(data.checkpoint === undefined\n ? {}\n : { checkpoint: Object.freeze({ ...data.checkpoint }) }),\n ...(policy === undefined ? {} : { policy }),\n });\n });\n\nexport const checkedLivePlan = (value: unknown) => checkedData(LivePlan, value, \"run\");\nexport const checkedDescriptor = (value: unknown) => checkedData(Descriptor, value, \"resolve\");\n\nexport const checkedResolveOptions = (value: ResolveOptions | undefined) =>\n Effect.gen(function* () {\n const fields = yield* hostFields(value, [\"guard\", \"timeoutMillis\", \"admission\"], \"resolve\");\n const operationOptions: OperationOptions = yield* operationData(fields, \"resolve\");\n\n const guard = yield* checkedData(\n ResolveGuard,\n fields.guard === undefined ? { _tag: \"Strict\" } : fields.guard,\n \"resolve\",\n );\n\n return { operationOptions, guard };\n });\n\nexport const checkedSettled = (value: SettledRequest) =>\n Effect.gen(function* () {\n const fields = yield* hostFields(value, [\"quiet\", \"within\"], \"settled\");\n const quietMillis = yield* millis(fields.quiet, true, \"settled\");\n const withinMillis = yield* millis(fields.within, true, \"settled\");\n\n return yield* checkedData(SettledOptions, { quietMillis, withinMillis }, \"settled\");\n });\n","import { Effect, Schema } from \"effect\";\n\nimport { TypeRequest } from \"../../BrowserData.ts\";\nimport { BrowserError, Reasons } from \"../../Errors.ts\";\nimport {\n type Action,\n type ActionTarget,\n type CaptureIncompleteReason,\n type Descriptor,\n type DescriptorCapture,\n type InputBindings,\n InputValue,\n type LivePlan,\n RecordedAction,\n type RecordedTarget,\n type Step,\n type ValueSource,\n} from \"../../PlanData.ts\";\nimport type { DescriptorSample } from \"./Descriptor.ts\";\n\nexport interface ActionTargetPath {\n readonly target: ActionTarget;\n readonly path: ReadonlyArray<string>;\n readonly parent?: number;\n /** Passive Ref waits have no later input admission that could supply fresh recording facts. */\n readonly captureInitial?: boolean;\n}\n\n/** The same ordered inventory serves exact-node group resolution and capture correlation. */\nexport const actionTargets = (action: Action): ReadonlyArray<ActionTargetPath> => {\n switch (action._tag) {\n case \"Click\":\n case \"Hover\":\n case \"Fill\":\n return [{ target: action.target, path: [\"target\"] }];\n case \"Type\":\n case \"Press\":\n return action.target === undefined ? [] : [{ target: action.target, path: [\"target\"] }];\n case \"Select\":\n return [\n { target: action.target, path: [\"target\"] },\n ...action.options.map((target, index) => ({\n target,\n path: [\"options\", String(index)],\n parent: 0,\n })),\n ];\n case \"FillForm\": {\n const inventory: Array<ActionTargetPath> = [];\n\n action.fields.forEach((field, index) => {\n const parent = inventory.length;\n\n inventory.push({ target: field.target, path: [\"fields\", String(index), \"target\"] });\n if (field._tag === \"Options\")\n field.options.forEach((target, option) =>\n inventory.push({\n target,\n path: [\"fields\", String(index), \"options\", String(option)],\n parent,\n }),\n );\n });\n if (action.submit !== undefined) inventory.push({ target: action.submit, path: [\"submit\"] });\n\n return inventory;\n }\n case \"Scroll\":\n return action.mode._tag === \"To\"\n ? [{ target: action.mode.target, path: [\"mode\", \"target\"] }]\n : [];\n case \"Wait\":\n return action.mode._tag === \"Element\"\n ? [{ target: action.mode.target, path: [\"mode\", \"target\"], captureInitial: true }]\n : [];\n case \"Navigate\":\n case \"PointerMove\":\n case \"Wheel\":\n return [];\n }\n};\n\ninterface InputPath {\n readonly value: ValueSource;\n readonly path: ReadonlyArray<string>;\n readonly typed: boolean;\n}\n\nconst inputPaths = (action: Action): ReadonlyArray<InputPath> => {\n switch (action._tag) {\n case \"Fill\":\n return [{ value: action.value, path: [\"value\"], typed: false }];\n case \"Type\":\n return [{ value: action.text, path: [\"text\"], typed: true }];\n case \"FillForm\":\n return action.fields.flatMap((field, index) =>\n field._tag === \"Value\"\n ? [{ value: field.value, path: [\"fields\", String(index), \"value\"], typed: false }]\n : [],\n );\n case \"Click\":\n case \"Hover\":\n case \"Navigate\":\n case \"PointerMove\":\n case \"Press\":\n case \"Scroll\":\n case \"Select\":\n case \"Wait\":\n case \"Wheel\":\n return [];\n }\n};\n\n/** One named input use: the step and action path that read it, and how its value is used. */\nexport interface NamedInput {\n readonly name: string;\n readonly stepId: string;\n readonly path: ReadonlyArray<string>;\n readonly kind: \"text\" | \"value\";\n}\n\n/** Every named input the steps read, in step and action order; literal values are not inputs. */\nexport const namedInputs = (\n steps: ReadonlyArray<{ readonly id: string; readonly action: Action }>,\n): ReadonlyArray<NamedInput> =>\n Object.freeze(\n steps.flatMap((step) =>\n inputPaths(step.action).flatMap((input) =>\n input.value._tag === \"Input\"\n ? [\n Object.freeze({\n name: input.value.name,\n stepId: step.id,\n path: Object.freeze([...input.path]),\n kind: input.typed ? (\"text\" as const) : (\"value\" as const),\n }),\n ]\n : [],\n ),\n ),\n );\n\n/** Length-prefixed segments cannot alias another step/path, including nested form values. */\nexport const pathKey = (path: ReadonlyArray<string>): string =>\n path.map((part) => `${part.length}_${part}`).join(\"_\");\n\nexport type InputSlots = ReadonlyMap<string, ReadonlyMap<string, string>>;\n\nexport const inputSlots = (plan: LivePlan): InputSlots => {\n const names = new Set<string>();\n const slots = new Map<string, ReadonlyMap<string, string>>();\n\n for (const step of plan.steps)\n for (const input of inputPaths(step.action))\n if (input.value._tag === \"Input\") names.add(input.value.name);\n for (const step of plan.steps) {\n const values = new Map<string, string>();\n\n for (const input of inputPaths(step.action)) {\n if (input.value._tag === \"Input\") continue;\n const base = `record_${pathKey([step.id, ...input.path])}`;\n let name = base;\n let collision = 0;\n\n while (names.has(name)) name = `${base}_${++collision}`;\n names.add(name);\n values.set(pathKey(input.path), name);\n }\n slots.set(step.id, values);\n }\n\n return slots;\n};\n\n/** Even a later step's missing or invalid binding refuses the walk before its first dispatch. */\nexport const validateInputs = (plan: LivePlan, inputs: InputBindings) =>\n Effect.forEach(\n plan.steps,\n (step) =>\n Effect.forEach(\n inputPaths(step.action),\n (input) => {\n const value =\n input.value._tag === \"Literal\" ? input.value.value : inputs[input.value.name];\n\n return Schema.decodeUnknownEffect(input.typed ? TypeRequest.fields.text : InputValue)(\n value,\n ).pipe(\n Effect.mapError(() =>\n BrowserError.make({\n operation: \"run\",\n reason: Reasons.Malformed.make({ path: `${step.id}/${input.path.join(\"/\")}` }),\n outcome: \"undispatched\",\n }),\n ),\n );\n },\n { discard: true },\n ),\n { discard: true },\n );\n\nexport interface TargetSample {\n readonly path: ReadonlyArray<string>;\n readonly sample?: DescriptorSample;\n}\n\nconst incomplete = (\n path: ReadonlyArray<string>,\n sample: DescriptorSample | undefined,\n reason: CaptureIncompleteReason,\n): DescriptorCapture => ({\n _tag: \"Incomplete\",\n facts: {\n path,\n ...(sample === undefined ? {} : { matchScope: sample.scope }),\n ...(sample === undefined ? {} : { facts: sample.facts }),\n },\n reason,\n});\n\nconst descriptor = (sample: DescriptorSample): Descriptor | CaptureIncompleteReason => {\n const completeness = sample.completeness;\n const facts = sample.facts;\n\n if (completeness === undefined) return \"FactsUnavailable\";\n if (completeness.label !== \"complete\") return \"LabelOmitted\";\n if (completeness.destination === \"omitted\") return \"DestinationOmitted\";\n if (\n completeness.inputType === \"omitted\" ||\n completeness.autocomplete === \"omitted\" ||\n completeness.formMethod === \"omitted\"\n )\n return \"IdentityOmitted\";\n for (const field of [\"destination\", \"inputType\", \"autocomplete\", \"formMethod\"] as const)\n if ((completeness[field] === \"complete\") !== (facts[field] !== undefined))\n return \"FactsUnavailable\";\n if (!sample.frameComplete || (!facts.mainFrame && sample.frame === undefined))\n return \"FrameUnavailable\";\n\n const identity = {\n ...(facts.inputType === undefined ? {} : { inputType: facts.inputType }),\n ...(facts.autocomplete === undefined ? {} : { autocomplete: facts.autocomplete }),\n ...(facts.formMethod === undefined ? {} : { formMethod: facts.formMethod }),\n };\n\n return {\n kind: facts.kind,\n label: facts.label,\n matchScope: sample.scope,\n ...(facts.destination === undefined ? {} : { destination: facts.destination }),\n ...(Object.keys(identity).length === 0 ? {} : { identity }),\n ...(sample.ordinal === undefined ? {} : { ordinal: sample.ordinal }),\n ...(sample.frame === undefined ? {} : { frame: sample.frame }),\n };\n};\n\n/** No authored descriptor substitutes for the facts of the exact node this attempt checked. */\nexport const capture = (\n step: Step,\n samples: ReadonlyMap<string, TargetSample>,\n slots: InputSlots,\n overflow: boolean,\n): Effect.Effect<DescriptorCapture> => {\n if (overflow) return Effect.succeed(incomplete([], undefined, \"EvidenceLimit\"));\n const targets = new Map<string, RecordedTarget>();\n\n for (const entry of actionTargets(step.action)) {\n const sampled = samples.get(pathKey(entry.path));\n const sample = sampled?.sample;\n\n if (sample === undefined)\n return Effect.succeed(incomplete(entry.path, sample, \"TargetUnavailable\"));\n const recorded = descriptor(sample);\n\n if (typeof recorded === \"string\")\n return Effect.succeed(incomplete(entry.path, sample, recorded));\n targets.set(pathKey(entry.path), { _tag: \"Descriptor\", descriptor: recorded });\n }\n\n const target = (path: ReadonlyArray<string>): RecordedTarget | undefined =>\n targets.get(pathKey(path));\n\n const value = (source: ValueSource, path: ReadonlyArray<string>) =>\n source._tag === \"Input\"\n ? source\n : { _tag: \"Input\", name: slots.get(step.id)?.get(pathKey(path)) };\n\n const action = step.action;\n\n const project = (): unknown => {\n switch (action._tag) {\n case \"Click\":\n case \"Hover\":\n return { ...action, target: target([\"target\"]) };\n case \"Fill\":\n return { ...action, target: target([\"target\"]), value: value(action.value, [\"value\"]) };\n case \"Type\":\n return {\n ...action,\n ...(action.target === undefined ? {} : { target: target([\"target\"]) }),\n text: value(action.text, [\"text\"]),\n };\n case \"Press\":\n return {\n ...action,\n ...(action.target === undefined ? {} : { target: target([\"target\"]) }),\n };\n case \"Select\":\n return {\n ...action,\n target: target([\"target\"]),\n options: action.options.map((_, index) => target([\"options\", String(index)])),\n };\n case \"FillForm\":\n return {\n ...action,\n fields: action.fields.map((field, index) => ({\n ...field,\n target: target([\"fields\", String(index), \"target\"]),\n ...(field._tag === \"Value\"\n ? { value: value(field.value, [\"fields\", String(index), \"value\"]) }\n : {}),\n ...(field._tag === \"Options\"\n ? {\n options: field.options.map((_, option) =>\n target([\"fields\", String(index), \"options\", String(option)]),\n ),\n }\n : {}),\n })),\n ...(action.submit === undefined ? {} : { submit: target([\"submit\"]) }),\n };\n case \"Scroll\":\n return action.mode._tag === \"To\"\n ? { ...action, mode: { ...action.mode, target: target([\"mode\", \"target\"]) } }\n : action;\n case \"Wait\":\n return action.mode._tag === \"Element\"\n ? { ...action, mode: { ...action.mode, target: target([\"mode\", \"target\"]) } }\n : action;\n case \"Navigate\":\n case \"PointerMove\":\n case \"Wheel\":\n return action;\n }\n };\n\n return Schema.decodeUnknownEffect(RecordedAction)(project(), { onExcessProperty: \"error\" }).pipe(\n Effect.map((action): DescriptorCapture => ({ _tag: \"Complete\", action })),\n Effect.orElseSucceed(() => incomplete([], undefined, \"FactsUnavailable\")),\n );\n};\n","import { Data, type Duration, Effect, Schema, type Scope } from \"effect\";\n\nimport type { ElementAdmission, OperationOptions } from \"./Browser.ts\";\nimport type { CheckpointOptions } from \"./BrowserData.ts\";\nimport type { BrowserError } from \"./Errors.ts\";\nimport { guardedDecode } from \"./internal/browser/PlanInput.ts\";\nimport { checkedRunOptions } from \"./internal/browser/PlanOptions.ts\";\nimport { namedInputs } from \"./internal/browser/Recording.ts\";\nimport {\n type AttemptSnapshot,\n type InputBindings,\n LivePlan,\n type LivePlanEncoded,\n Plan,\n type PlanEncoded,\n type PerformedEncoded,\n type Ran,\n type RanStep,\n type StepAttempt,\n} from \"./PlanData.ts\";\n\n/** All execution stays on the issued Page/Frame and its original scoped owner. */\nexport interface RunOptions extends OperationOptions {\n readonly style?: \"plain\" | PerformedEncoded;\n /** Intended boundary in this owner's original monotonic runtime, measured when executed. */\n readonly startAt?: bigint;\n readonly within?: Duration.Input;\n readonly through?: string;\n readonly inputs?: InputBindings;\n readonly policy?: ElementAdmission;\n readonly checkpoint?: CheckpointOptions;\n}\n\n/**\n * Check and normalize host run options exactly as `page.start` and `page.run` will, without\n * exposing private deadline/queue accounting fields. A caller that builds options from untrusted\n * configuration can fail early with the same `Configuration` refusal.\n */\nexport const checkRunOptions = (value: unknown): Effect.Effect<RunOptions, BrowserError> =>\n checkedRunOptions(value).pipe(\n Effect.map(({ withinMillis: _withinMillis, queueMillis: _queueMillis, ...options }) => options),\n );\n\ninterface StepFailure {\n readonly stage: \"PreparationFailed\" | \"AttemptFailed\";\n readonly stepId?: string;\n readonly completed: ReadonlyArray<RanStep>;\n readonly attempt?: StepAttempt;\n readonly error: BrowserError;\n}\n\n/**\n * Live host failure evidence is not a durable plan or a serialization schema. Its message names\n * only the stage, step and reason; the evidence fields can retain authored literal values, so\n * log the message rather than the whole value.\n */\nexport class StepFailed extends Data.TaggedError(\"StepFailed\")<\n StepFailure & { readonly message: string }\n> {\n constructor(failure: StepFailure) {\n const { operation, reason, outcome } = failure.error;\n\n const where =\n failure.stage === \"PreparationFailed\"\n ? \"Plan preparation failed\"\n : `Step ${failure.stepId ?? \"(unknown)\"} failed`;\n\n super({ ...failure, message: `${where}: ${operation} ${reason._tag} (${outcome})` });\n }\n}\n\nexport class RecordingIncomplete extends Data.TaggedError(\"RecordingIncomplete\")<{\n readonly stepId?: string;\n readonly reason: \"InvalidThrough\" | \"NoCompletedSteps\" | \"IncompleteCapture\" | \"Unacknowledged\";\n}> {}\n\n/** A retained value keeps its evidence after interruption; joining never submits another walk. */\nexport interface RunOperation {\n readonly id: string;\n readonly attempts: Effect.Effect<AttemptSnapshot>;\n readonly completed: Effect.Effect<Ran, StepFailed>;\n readonly cancel: Effect.Effect<void>;\n}\n\nexport interface PlanOperations {\n readonly start: (\n plan: LivePlanEncoded | PlanEncoded,\n options?: RunOptions,\n ) => Effect.Effect<RunOperation, StepFailed, Scope.Scope>;\n readonly run: (\n plan: LivePlanEncoded | PlanEncoded,\n options?: RunOptions,\n ) => Effect.Effect<Ran, StepFailed>;\n}\n\n/** Validate and normalize authored data, including explicit document/Strict defaults. */\nexport const make = (value: LivePlanEncoded): Effect.Effect<LivePlan, Schema.SchemaError> =>\n guardedDecode(LivePlan)(value, { onExcessProperty: \"error\" });\n\n/** Descriptor-only ingress for stored intent; it never decodes a live Ref. */\nexport const decode = (value: unknown): Effect.Effect<Plan, Schema.SchemaError> =>\n guardedDecode(Plan)(value, { onExcessProperty: \"error\" });\n\n/** The normalized scope and guards are always included in encoded durable intent. */\nexport const encode = (value: Plan): Effect.Effect<PlanEncoded, Schema.SchemaError> =>\n guardedDecode(Plan)(value, { onExcessProperty: \"error\" }).pipe(\n Effect.flatMap(Schema.encodeEffect(Plan)),\n );\n\n/** A named input a plan reads: the step and action path that read it, and how it is used. */\nexport interface InputSlot {\n readonly name: string;\n readonly stepId: string;\n readonly path: ReadonlyArray<string>;\n /** `text` is typed key by key into focus; `value` replaces a field's whole contents. */\n readonly kind: \"text\" | \"value\";\n}\n\n/**\n * The named inputs a stored or live plan reads, in step order. A recorded plan's literal fill and\n * type values are such slots; bind each `name` in `inputs` to replay it.\n */\nexport const inputSlots = (plan: Plan | LivePlan): ReadonlyArray<InputSlot> =>\n namedInputs(plan.steps);\n\n/**\n * Project only acknowledged, faithfully captured intent. An explicitly chosen completed prefix\n * can be retained after a later failure by passing the operation's host snapshot and `through`.\n * Literal input values are replaced during capture with deterministic named input slots.\n */\nexport const recorded = (\n value: Ran | AttemptSnapshot,\n options?: { readonly through?: string },\n): Effect.Effect<Plan, RecordingIncomplete> =>\n Effect.gen(function* () {\n const steps = \"steps\" in value ? value.steps : value.completed;\n const through = options?.through;\n\n const last =\n through === undefined ? steps.length - 1 : steps.findIndex((step) => step.id === through);\n\n if (through !== undefined && last < 0)\n return yield* new RecordingIncomplete({ stepId: through, reason: \"InvalidThrough\" });\n if (steps.length === 0) return yield* new RecordingIncomplete({ reason: \"NoCompletedSteps\" });\n if (!(\"steps\" in value) && through === undefined)\n return yield* new RecordingIncomplete({ reason: \"Unacknowledged\" });\n const selected = steps.slice(0, last + 1);\n\n for (const step of selected) {\n if (\n !step.attempt.completed ||\n step.attempt.outcome === \"unknown\" ||\n step.attempt.outcome === \"rejected\" ||\n (step.receipt !== undefined &&\n typeof step.receipt === \"object\" &&\n \"stopped\" in step.receipt &&\n step.receipt.stopped !== undefined)\n )\n return yield* new RecordingIncomplete({ stepId: step.id, reason: \"Unacknowledged\" });\n if (step.recorded._tag === \"Incomplete\")\n return yield* new RecordingIncomplete({ stepId: step.id, reason: \"IncompleteCapture\" });\n }\n\n const projected = {\n version: 1,\n steps: selected.map((step) => ({\n id: step.id,\n action: step.recorded._tag === \"Complete\" ? step.recorded.action : undefined,\n ...(step.sourceStep.expect === undefined ? {} : { expect: step.sourceStep.expect }),\n resolution: step.sourceStep.resolution,\n })),\n };\n\n return yield* guardedDecode(Plan)(projected, { onExcessProperty: \"error\" }).pipe(\n Effect.mapError(() => new RecordingIncomplete({ reason: \"IncompleteCapture\" })),\n );\n });\n"],"mappings":";;;;;;;;AAGA,MAAa,cAAc,UAA0D;CACnF,IAAI,QAA2B,MAAM;CACrC,IAAI,YAAY;CAEhB,OAAO,cAAc,MAAM,MAAM,SAAS,cAAc,MAAM,SAAS,WACrE,QAAQ,MAAM;CAEhB,IAAI,MAAM,SAAS,eAAe,MAAM,IAAI,SAAS,WAAW,OAAO,CAAC;CACxE,MAAM,QAAQ,MAAM,OAAO;CAE3B,IAAI,MAAM,SAAS,aAAa,MAAM,KAAK,WAAW,GAAG,OAAO,CAAC;CACjE,MAAM,MAAM,MAAM,KAAK;CAEvB,IAAI,OAAO,QAAQ,YAAY,IAAI,SAAS,KAAK,OAAO,CAAC;CAGzD,OAFiB,MAAM,IAAI,mBAAmB,MAAM,aAAa,SAAS,SAAS,GAErE,MAAM,KAAA,IAAY,CAAC,IAAI,EAAE,MAAM,IAAI;AACnD;;;ACWA,MAAM,oBAA6B,OAAO,e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CAChF;AACF,CAAC"}
|
package/dist/Plan.d.mts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { C as StepFailed, D as inputSlots, E as encode, O as make, S as RunOptions, T as decode, b as RecordingIncomplete, k as recorded, v as InputSlot, w as checkRunOptions, x as RunOperation, y as PlanOperations } from "./Browser-n-bKgBNN.mjs";
|
|
2
|
+
export { InputSlot, PlanOperations, RecordingIncomplete, RunOperation, RunOptions, StepFailed, checkRunOptions, decode, encode, inputSlots, make, recorded };
|
|
3
|
+
export {};
|
package/dist/Plan.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { a as encode, c as recorded, i as decode, n as StepFailed, o as inputSlots, r as checkRunOptions, s as make, t as RecordingIncomplete } from "./Plan-D8qQ48Ic.mjs";
|
|
2
|
+
export { RecordingIncomplete, StepFailed, checkRunOptions, decode, encode, inputSlots, make, recorded };
|