@reticlehq/core 3.5.0 → 3.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/artifacts/artifacts-entry.d.ts +2 -0
  2. package/dist/artifacts/artifacts-entry.js +2 -0
  3. package/dist/artifacts/drive-script.d.ts +1298 -0
  4. package/dist/artifacts/drive-script.js +197 -0
  5. package/dist/artifacts/flow-constants.d.ts +1 -0
  6. package/dist/artifacts/flow-constants.js +1 -0
  7. package/dist/artifacts/flow-types.d.ts +60 -0
  8. package/dist/artifacts/flow-types.js +10 -0
  9. package/dist/artifacts/hud-notices.d.ts +134 -0
  10. package/dist/artifacts/hud-notices.js +124 -0
  11. package/dist/artifacts/impact.d.ts +135 -44
  12. package/dist/artifacts/impact.js +25 -0
  13. package/dist/artifacts/journal.d.ts +49 -0
  14. package/dist/artifacts/journal.js +15 -0
  15. package/dist/artifacts/prompt-context.d.ts +105 -0
  16. package/dist/artifacts/prompt-context.js +108 -0
  17. package/dist/desktop-contract.cjs +1 -0
  18. package/dist/desktop-contract.d.cts +1 -0
  19. package/dist/hud-entry.d.ts +1 -0
  20. package/dist/hud-entry.js +2 -0
  21. package/dist/identity/contract-fingerprint.d.ts +9 -0
  22. package/dist/identity/contract-fingerprint.js +12 -0
  23. package/dist/identity/testid-attribute.d.ts +18 -0
  24. package/dist/identity/testid-attribute.js +24 -0
  25. package/dist/index.d.ts +4 -1
  26. package/dist/index.js +4 -1
  27. package/dist/onboarding.d.ts +2 -2
  28. package/dist/schema/command-message.json +6 -0
  29. package/dist/schema/command-name.json +3 -1
  30. package/dist/schema/event-payloads.json +16 -0
  31. package/dist/schema/reticle-message.json +6 -0
  32. package/dist/telemetry-refusal.d.ts +3 -2
  33. package/dist/telemetry-session.d.ts +5 -1
  34. package/dist/telemetry-session.js +3 -1
  35. package/dist/telemetry.d.ts +36 -28
  36. package/dist/tour.d.ts +1 -0
  37. package/dist/tour.js +13 -5
  38. package/dist/verdict/consequence.d.ts +3 -0
  39. package/dist/verdict/findings.d.ts +5 -0
  40. package/dist/verdict/findings.js +7 -0
  41. package/dist/verdict/predicate.d.ts +14 -0
  42. package/dist/verdict/predicate.js +7 -12
  43. package/dist/verdict/verdict-attribution.js +1 -0
  44. package/dist/verdict/verification-run.d.ts +18 -0
  45. package/dist/verdict/verification-run.js +8 -0
  46. package/dist/verdict/verified-constants.d.ts +19 -0
  47. package/dist/verdict/verified-constants.js +22 -0
  48. package/dist/wire/constants/constants.d.ts +44 -15
  49. package/dist/wire/constants/constants.js +44 -15
  50. package/dist/wire/constants/hud-controls.d.ts +1 -1
  51. package/dist/wire/constants/hud-controls.js +21 -0
  52. package/dist/wire/constants/hud-use.d.ts +64 -1
  53. package/dist/wire/constants/hud-use.js +40 -1
  54. package/dist/wire/constants/session-constants.d.ts +8 -0
  55. package/dist/wire/constants/session-constants.js +8 -0
  56. package/dist/wire/desktop-contract.d.ts +3 -0
  57. package/dist/wire/desktop-contract.js +3 -0
  58. package/dist/wire/event-payloads.d.ts +25 -4
  59. package/dist/wire/event-payloads.js +10 -0
  60. package/dist/wire/global-press.d.ts +34 -3
  61. package/dist/wire/global-press.js +91 -3
  62. package/dist/wire/hold.d.ts +14 -0
  63. package/dist/wire/hold.js +18 -0
  64. package/dist/wire/messages.d.ts +42 -18
  65. package/dist/wire/messages.js +8 -0
  66. package/dist/wire/platform-link.d.ts +161 -0
  67. package/dist/wire/platform-link.js +189 -0
  68. package/dist/wire/types.d.ts +7 -0
  69. package/dist/words/no-session-reason.d.ts +7 -0
  70. package/dist/words/no-session-reason.js +7 -0
  71. package/dist/words/notices.js +4 -2
  72. package/package.json +1 -1
@@ -0,0 +1,1298 @@
1
+ /**
2
+ * A drive script: the Harness's plan, written down before it drives, in a language small enough to
3
+ * check.
4
+ *
5
+ * Journeys say WHAT to drive: replay a saved flow (deterministic, no model), act and wait on one
6
+ * exact control, hand an open goal to the model, assert a consequence. Lanes say HOW: each lane is
7
+ * one browser context driven in order, and lanes run side by side. A journey that needs another one
8
+ * either follows it in the same lane (and inherits its page) or waits on it from a later lane (a
9
+ * barrier: it starts once that journey passed, and is blocked if it failed).
10
+ *
11
+ * A checkpoint names a point a journey can come back to, and how: replay a flow up to a step. A
12
+ * branch drives several cases from that point; every case after the first re-enters it first, so
13
+ * each case starts from the same page and not from wherever the previous case left it.
14
+ *
15
+ * Daemon-side only: the HUD draws a plan from a flat view of it (`PlanView`), never this schema.
16
+ */
17
+ import { z } from 'zod';
18
+ export declare const ScriptStepKind: {
19
+ readonly REPLAY: "replay";
20
+ readonly ACT: "act";
21
+ readonly ASSERT: "assert";
22
+ readonly CHECKPOINT: "checkpoint";
23
+ readonly BRANCH: "branch";
24
+ };
25
+ export declare const ScriptSource: {
26
+ readonly LOCAL: "local";
27
+ readonly PLATFORM: "platform";
28
+ };
29
+ declare const LeafStep: z.ZodUnion<[z.ZodObject<{
30
+ kind: z.ZodLiteral<"replay">;
31
+ flow: z.ZodString;
32
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
33
+ at: z.ZodOptional<z.ZodNumber>;
34
+ /** Stop before this step. Absent: the whole flow. */
35
+ to: z.ZodOptional<z.ZodNumber>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ kind: "replay";
38
+ flow: string;
39
+ at?: number | undefined;
40
+ to?: number | undefined;
41
+ }, {
42
+ kind: "replay";
43
+ flow: string;
44
+ at?: number | undefined;
45
+ to?: number | undefined;
46
+ }>, z.ZodEffects<z.ZodObject<{
47
+ kind: z.ZodLiteral<"act">;
48
+ /** Exact: a target, an action and the consequence that must follow. */
49
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
50
+ action: z.ZodOptional<z.ZodString>;
51
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
52
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
53
+ /** Open: what the model should accomplish, in plain words. */
54
+ goal: z.ZodOptional<z.ZodString>;
55
+ maxSteps: z.ZodOptional<z.ZodNumber>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ kind: "act";
58
+ target?: Record<string, unknown> | undefined;
59
+ action?: string | undefined;
60
+ args?: Record<string, unknown> | undefined;
61
+ until?: import("../index.js").Predicate | undefined;
62
+ maxSteps?: number | undefined;
63
+ goal?: string | undefined;
64
+ }, {
65
+ kind: "act";
66
+ target?: Record<string, unknown> | undefined;
67
+ action?: string | undefined;
68
+ args?: Record<string, unknown> | undefined;
69
+ until?: import("../index.js").Predicate | undefined;
70
+ maxSteps?: number | undefined;
71
+ goal?: string | undefined;
72
+ }>, {
73
+ kind: "act";
74
+ target?: Record<string, unknown> | undefined;
75
+ action?: string | undefined;
76
+ args?: Record<string, unknown> | undefined;
77
+ until?: import("../index.js").Predicate | undefined;
78
+ maxSteps?: number | undefined;
79
+ goal?: string | undefined;
80
+ }, {
81
+ kind: "act";
82
+ target?: Record<string, unknown> | undefined;
83
+ action?: string | undefined;
84
+ args?: Record<string, unknown> | undefined;
85
+ until?: import("../index.js").Predicate | undefined;
86
+ maxSteps?: number | undefined;
87
+ goal?: string | undefined;
88
+ }>, z.ZodObject<{
89
+ kind: z.ZodLiteral<"assert">;
90
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ kind: "assert";
93
+ predicate: import("../index.js").Predicate;
94
+ }, {
95
+ kind: "assert";
96
+ predicate: import("../index.js").Predicate;
97
+ }>]>;
98
+ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
99
+ kind: z.ZodLiteral<"replay">;
100
+ flow: z.ZodString;
101
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
102
+ at: z.ZodOptional<z.ZodNumber>;
103
+ /** Stop before this step. Absent: the whole flow. */
104
+ to: z.ZodOptional<z.ZodNumber>;
105
+ }, "strip", z.ZodTypeAny, {
106
+ kind: "replay";
107
+ flow: string;
108
+ at?: number | undefined;
109
+ to?: number | undefined;
110
+ }, {
111
+ kind: "replay";
112
+ flow: string;
113
+ at?: number | undefined;
114
+ to?: number | undefined;
115
+ }>, z.ZodEffects<z.ZodObject<{
116
+ kind: z.ZodLiteral<"act">;
117
+ /** Exact: a target, an action and the consequence that must follow. */
118
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
119
+ action: z.ZodOptional<z.ZodString>;
120
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
121
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
122
+ /** Open: what the model should accomplish, in plain words. */
123
+ goal: z.ZodOptional<z.ZodString>;
124
+ maxSteps: z.ZodOptional<z.ZodNumber>;
125
+ }, "strip", z.ZodTypeAny, {
126
+ kind: "act";
127
+ target?: Record<string, unknown> | undefined;
128
+ action?: string | undefined;
129
+ args?: Record<string, unknown> | undefined;
130
+ until?: import("../index.js").Predicate | undefined;
131
+ maxSteps?: number | undefined;
132
+ goal?: string | undefined;
133
+ }, {
134
+ kind: "act";
135
+ target?: Record<string, unknown> | undefined;
136
+ action?: string | undefined;
137
+ args?: Record<string, unknown> | undefined;
138
+ until?: import("../index.js").Predicate | undefined;
139
+ maxSteps?: number | undefined;
140
+ goal?: string | undefined;
141
+ }>, {
142
+ kind: "act";
143
+ target?: Record<string, unknown> | undefined;
144
+ action?: string | undefined;
145
+ args?: Record<string, unknown> | undefined;
146
+ until?: import("../index.js").Predicate | undefined;
147
+ maxSteps?: number | undefined;
148
+ goal?: string | undefined;
149
+ }, {
150
+ kind: "act";
151
+ target?: Record<string, unknown> | undefined;
152
+ action?: string | undefined;
153
+ args?: Record<string, unknown> | undefined;
154
+ until?: import("../index.js").Predicate | undefined;
155
+ maxSteps?: number | undefined;
156
+ goal?: string | undefined;
157
+ }>, z.ZodObject<{
158
+ kind: z.ZodLiteral<"assert">;
159
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
160
+ }, "strip", z.ZodTypeAny, {
161
+ kind: "assert";
162
+ predicate: import("../index.js").Predicate;
163
+ }, {
164
+ kind: "assert";
165
+ predicate: import("../index.js").Predicate;
166
+ }>]>, z.ZodObject<{
167
+ kind: z.ZodLiteral<"checkpoint">;
168
+ id: z.ZodString;
169
+ /** How to get back here: replay this flow up to (not including) step `to`. */
170
+ reenter: z.ZodObject<{
171
+ flow: z.ZodString;
172
+ to: z.ZodNumber;
173
+ }, "strip", z.ZodTypeAny, {
174
+ flow: string;
175
+ to: number;
176
+ }, {
177
+ flow: string;
178
+ to: number;
179
+ }>;
180
+ }, "strip", z.ZodTypeAny, {
181
+ kind: "checkpoint";
182
+ id: string;
183
+ reenter: {
184
+ flow: string;
185
+ to: number;
186
+ };
187
+ }, {
188
+ kind: "checkpoint";
189
+ id: string;
190
+ reenter: {
191
+ flow: string;
192
+ to: number;
193
+ };
194
+ }>, z.ZodObject<{
195
+ kind: z.ZodLiteral<"branch">;
196
+ /** The checkpoint every case starts from. */
197
+ at: z.ZodString;
198
+ cases: z.ZodArray<z.ZodObject<{
199
+ label: z.ZodString;
200
+ /** Taken only when this holds once the checkpoint is re-entered. Absent: always taken. */
201
+ when: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
202
+ steps: z.ZodArray<z.ZodUnion<[z.ZodObject<{
203
+ kind: z.ZodLiteral<"replay">;
204
+ flow: z.ZodString;
205
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
206
+ at: z.ZodOptional<z.ZodNumber>;
207
+ /** Stop before this step. Absent: the whole flow. */
208
+ to: z.ZodOptional<z.ZodNumber>;
209
+ }, "strip", z.ZodTypeAny, {
210
+ kind: "replay";
211
+ flow: string;
212
+ at?: number | undefined;
213
+ to?: number | undefined;
214
+ }, {
215
+ kind: "replay";
216
+ flow: string;
217
+ at?: number | undefined;
218
+ to?: number | undefined;
219
+ }>, z.ZodEffects<z.ZodObject<{
220
+ kind: z.ZodLiteral<"act">;
221
+ /** Exact: a target, an action and the consequence that must follow. */
222
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
223
+ action: z.ZodOptional<z.ZodString>;
224
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
225
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
226
+ /** Open: what the model should accomplish, in plain words. */
227
+ goal: z.ZodOptional<z.ZodString>;
228
+ maxSteps: z.ZodOptional<z.ZodNumber>;
229
+ }, "strip", z.ZodTypeAny, {
230
+ kind: "act";
231
+ target?: Record<string, unknown> | undefined;
232
+ action?: string | undefined;
233
+ args?: Record<string, unknown> | undefined;
234
+ until?: import("../index.js").Predicate | undefined;
235
+ maxSteps?: number | undefined;
236
+ goal?: string | undefined;
237
+ }, {
238
+ kind: "act";
239
+ target?: Record<string, unknown> | undefined;
240
+ action?: string | undefined;
241
+ args?: Record<string, unknown> | undefined;
242
+ until?: import("../index.js").Predicate | undefined;
243
+ maxSteps?: number | undefined;
244
+ goal?: string | undefined;
245
+ }>, {
246
+ kind: "act";
247
+ target?: Record<string, unknown> | undefined;
248
+ action?: string | undefined;
249
+ args?: Record<string, unknown> | undefined;
250
+ until?: import("../index.js").Predicate | undefined;
251
+ maxSteps?: number | undefined;
252
+ goal?: string | undefined;
253
+ }, {
254
+ kind: "act";
255
+ target?: Record<string, unknown> | undefined;
256
+ action?: string | undefined;
257
+ args?: Record<string, unknown> | undefined;
258
+ until?: import("../index.js").Predicate | undefined;
259
+ maxSteps?: number | undefined;
260
+ goal?: string | undefined;
261
+ }>, z.ZodObject<{
262
+ kind: z.ZodLiteral<"assert">;
263
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
264
+ }, "strip", z.ZodTypeAny, {
265
+ kind: "assert";
266
+ predicate: import("../index.js").Predicate;
267
+ }, {
268
+ kind: "assert";
269
+ predicate: import("../index.js").Predicate;
270
+ }>]>, "many">;
271
+ }, "strip", z.ZodTypeAny, {
272
+ label: string;
273
+ steps: ({
274
+ kind: "replay";
275
+ flow: string;
276
+ at?: number | undefined;
277
+ to?: number | undefined;
278
+ } | {
279
+ kind: "act";
280
+ target?: Record<string, unknown> | undefined;
281
+ action?: string | undefined;
282
+ args?: Record<string, unknown> | undefined;
283
+ until?: import("../index.js").Predicate | undefined;
284
+ maxSteps?: number | undefined;
285
+ goal?: string | undefined;
286
+ } | {
287
+ kind: "assert";
288
+ predicate: import("../index.js").Predicate;
289
+ })[];
290
+ when?: import("../index.js").Predicate | undefined;
291
+ }, {
292
+ label: string;
293
+ steps: ({
294
+ kind: "replay";
295
+ flow: string;
296
+ at?: number | undefined;
297
+ to?: number | undefined;
298
+ } | {
299
+ kind: "act";
300
+ target?: Record<string, unknown> | undefined;
301
+ action?: string | undefined;
302
+ args?: Record<string, unknown> | undefined;
303
+ until?: import("../index.js").Predicate | undefined;
304
+ maxSteps?: number | undefined;
305
+ goal?: string | undefined;
306
+ } | {
307
+ kind: "assert";
308
+ predicate: import("../index.js").Predicate;
309
+ })[];
310
+ when?: import("../index.js").Predicate | undefined;
311
+ }>, "many">;
312
+ }, "strip", z.ZodTypeAny, {
313
+ kind: "branch";
314
+ at: string;
315
+ cases: {
316
+ label: string;
317
+ steps: ({
318
+ kind: "replay";
319
+ flow: string;
320
+ at?: number | undefined;
321
+ to?: number | undefined;
322
+ } | {
323
+ kind: "act";
324
+ target?: Record<string, unknown> | undefined;
325
+ action?: string | undefined;
326
+ args?: Record<string, unknown> | undefined;
327
+ until?: import("../index.js").Predicate | undefined;
328
+ maxSteps?: number | undefined;
329
+ goal?: string | undefined;
330
+ } | {
331
+ kind: "assert";
332
+ predicate: import("../index.js").Predicate;
333
+ })[];
334
+ when?: import("../index.js").Predicate | undefined;
335
+ }[];
336
+ }, {
337
+ kind: "branch";
338
+ at: string;
339
+ cases: {
340
+ label: string;
341
+ steps: ({
342
+ kind: "replay";
343
+ flow: string;
344
+ at?: number | undefined;
345
+ to?: number | undefined;
346
+ } | {
347
+ kind: "act";
348
+ target?: Record<string, unknown> | undefined;
349
+ action?: string | undefined;
350
+ args?: Record<string, unknown> | undefined;
351
+ until?: import("../index.js").Predicate | undefined;
352
+ maxSteps?: number | undefined;
353
+ goal?: string | undefined;
354
+ } | {
355
+ kind: "assert";
356
+ predicate: import("../index.js").Predicate;
357
+ })[];
358
+ when?: import("../index.js").Predicate | undefined;
359
+ }[];
360
+ }>]>;
361
+ export declare const JourneySchema: z.ZodObject<{
362
+ id: z.ZodString;
363
+ title: z.ZodString;
364
+ persona: z.ZodOptional<z.ZodString>;
365
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
366
+ steps: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
367
+ kind: z.ZodLiteral<"replay">;
368
+ flow: z.ZodString;
369
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
370
+ at: z.ZodOptional<z.ZodNumber>;
371
+ /** Stop before this step. Absent: the whole flow. */
372
+ to: z.ZodOptional<z.ZodNumber>;
373
+ }, "strip", z.ZodTypeAny, {
374
+ kind: "replay";
375
+ flow: string;
376
+ at?: number | undefined;
377
+ to?: number | undefined;
378
+ }, {
379
+ kind: "replay";
380
+ flow: string;
381
+ at?: number | undefined;
382
+ to?: number | undefined;
383
+ }>, z.ZodEffects<z.ZodObject<{
384
+ kind: z.ZodLiteral<"act">;
385
+ /** Exact: a target, an action and the consequence that must follow. */
386
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
387
+ action: z.ZodOptional<z.ZodString>;
388
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
389
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
390
+ /** Open: what the model should accomplish, in plain words. */
391
+ goal: z.ZodOptional<z.ZodString>;
392
+ maxSteps: z.ZodOptional<z.ZodNumber>;
393
+ }, "strip", z.ZodTypeAny, {
394
+ kind: "act";
395
+ target?: Record<string, unknown> | undefined;
396
+ action?: string | undefined;
397
+ args?: Record<string, unknown> | undefined;
398
+ until?: import("../index.js").Predicate | undefined;
399
+ maxSteps?: number | undefined;
400
+ goal?: string | undefined;
401
+ }, {
402
+ kind: "act";
403
+ target?: Record<string, unknown> | undefined;
404
+ action?: string | undefined;
405
+ args?: Record<string, unknown> | undefined;
406
+ until?: import("../index.js").Predicate | undefined;
407
+ maxSteps?: number | undefined;
408
+ goal?: string | undefined;
409
+ }>, {
410
+ kind: "act";
411
+ target?: Record<string, unknown> | undefined;
412
+ action?: string | undefined;
413
+ args?: Record<string, unknown> | undefined;
414
+ until?: import("../index.js").Predicate | undefined;
415
+ maxSteps?: number | undefined;
416
+ goal?: string | undefined;
417
+ }, {
418
+ kind: "act";
419
+ target?: Record<string, unknown> | undefined;
420
+ action?: string | undefined;
421
+ args?: Record<string, unknown> | undefined;
422
+ until?: import("../index.js").Predicate | undefined;
423
+ maxSteps?: number | undefined;
424
+ goal?: string | undefined;
425
+ }>, z.ZodObject<{
426
+ kind: z.ZodLiteral<"assert">;
427
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
428
+ }, "strip", z.ZodTypeAny, {
429
+ kind: "assert";
430
+ predicate: import("../index.js").Predicate;
431
+ }, {
432
+ kind: "assert";
433
+ predicate: import("../index.js").Predicate;
434
+ }>]>, z.ZodObject<{
435
+ kind: z.ZodLiteral<"checkpoint">;
436
+ id: z.ZodString;
437
+ /** How to get back here: replay this flow up to (not including) step `to`. */
438
+ reenter: z.ZodObject<{
439
+ flow: z.ZodString;
440
+ to: z.ZodNumber;
441
+ }, "strip", z.ZodTypeAny, {
442
+ flow: string;
443
+ to: number;
444
+ }, {
445
+ flow: string;
446
+ to: number;
447
+ }>;
448
+ }, "strip", z.ZodTypeAny, {
449
+ kind: "checkpoint";
450
+ id: string;
451
+ reenter: {
452
+ flow: string;
453
+ to: number;
454
+ };
455
+ }, {
456
+ kind: "checkpoint";
457
+ id: string;
458
+ reenter: {
459
+ flow: string;
460
+ to: number;
461
+ };
462
+ }>, z.ZodObject<{
463
+ kind: z.ZodLiteral<"branch">;
464
+ /** The checkpoint every case starts from. */
465
+ at: z.ZodString;
466
+ cases: z.ZodArray<z.ZodObject<{
467
+ label: z.ZodString;
468
+ /** Taken only when this holds once the checkpoint is re-entered. Absent: always taken. */
469
+ when: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
470
+ steps: z.ZodArray<z.ZodUnion<[z.ZodObject<{
471
+ kind: z.ZodLiteral<"replay">;
472
+ flow: z.ZodString;
473
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
474
+ at: z.ZodOptional<z.ZodNumber>;
475
+ /** Stop before this step. Absent: the whole flow. */
476
+ to: z.ZodOptional<z.ZodNumber>;
477
+ }, "strip", z.ZodTypeAny, {
478
+ kind: "replay";
479
+ flow: string;
480
+ at?: number | undefined;
481
+ to?: number | undefined;
482
+ }, {
483
+ kind: "replay";
484
+ flow: string;
485
+ at?: number | undefined;
486
+ to?: number | undefined;
487
+ }>, z.ZodEffects<z.ZodObject<{
488
+ kind: z.ZodLiteral<"act">;
489
+ /** Exact: a target, an action and the consequence that must follow. */
490
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
491
+ action: z.ZodOptional<z.ZodString>;
492
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
493
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
494
+ /** Open: what the model should accomplish, in plain words. */
495
+ goal: z.ZodOptional<z.ZodString>;
496
+ maxSteps: z.ZodOptional<z.ZodNumber>;
497
+ }, "strip", z.ZodTypeAny, {
498
+ kind: "act";
499
+ target?: Record<string, unknown> | undefined;
500
+ action?: string | undefined;
501
+ args?: Record<string, unknown> | undefined;
502
+ until?: import("../index.js").Predicate | undefined;
503
+ maxSteps?: number | undefined;
504
+ goal?: string | undefined;
505
+ }, {
506
+ kind: "act";
507
+ target?: Record<string, unknown> | undefined;
508
+ action?: string | undefined;
509
+ args?: Record<string, unknown> | undefined;
510
+ until?: import("../index.js").Predicate | undefined;
511
+ maxSteps?: number | undefined;
512
+ goal?: string | undefined;
513
+ }>, {
514
+ kind: "act";
515
+ target?: Record<string, unknown> | undefined;
516
+ action?: string | undefined;
517
+ args?: Record<string, unknown> | undefined;
518
+ until?: import("../index.js").Predicate | undefined;
519
+ maxSteps?: number | undefined;
520
+ goal?: string | undefined;
521
+ }, {
522
+ kind: "act";
523
+ target?: Record<string, unknown> | undefined;
524
+ action?: string | undefined;
525
+ args?: Record<string, unknown> | undefined;
526
+ until?: import("../index.js").Predicate | undefined;
527
+ maxSteps?: number | undefined;
528
+ goal?: string | undefined;
529
+ }>, z.ZodObject<{
530
+ kind: z.ZodLiteral<"assert">;
531
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
532
+ }, "strip", z.ZodTypeAny, {
533
+ kind: "assert";
534
+ predicate: import("../index.js").Predicate;
535
+ }, {
536
+ kind: "assert";
537
+ predicate: import("../index.js").Predicate;
538
+ }>]>, "many">;
539
+ }, "strip", z.ZodTypeAny, {
540
+ label: string;
541
+ steps: ({
542
+ kind: "replay";
543
+ flow: string;
544
+ at?: number | undefined;
545
+ to?: number | undefined;
546
+ } | {
547
+ kind: "act";
548
+ target?: Record<string, unknown> | undefined;
549
+ action?: string | undefined;
550
+ args?: Record<string, unknown> | undefined;
551
+ until?: import("../index.js").Predicate | undefined;
552
+ maxSteps?: number | undefined;
553
+ goal?: string | undefined;
554
+ } | {
555
+ kind: "assert";
556
+ predicate: import("../index.js").Predicate;
557
+ })[];
558
+ when?: import("../index.js").Predicate | undefined;
559
+ }, {
560
+ label: string;
561
+ steps: ({
562
+ kind: "replay";
563
+ flow: string;
564
+ at?: number | undefined;
565
+ to?: number | undefined;
566
+ } | {
567
+ kind: "act";
568
+ target?: Record<string, unknown> | undefined;
569
+ action?: string | undefined;
570
+ args?: Record<string, unknown> | undefined;
571
+ until?: import("../index.js").Predicate | undefined;
572
+ maxSteps?: number | undefined;
573
+ goal?: string | undefined;
574
+ } | {
575
+ kind: "assert";
576
+ predicate: import("../index.js").Predicate;
577
+ })[];
578
+ when?: import("../index.js").Predicate | undefined;
579
+ }>, "many">;
580
+ }, "strip", z.ZodTypeAny, {
581
+ kind: "branch";
582
+ at: string;
583
+ cases: {
584
+ label: string;
585
+ steps: ({
586
+ kind: "replay";
587
+ flow: string;
588
+ at?: number | undefined;
589
+ to?: number | undefined;
590
+ } | {
591
+ kind: "act";
592
+ target?: Record<string, unknown> | undefined;
593
+ action?: string | undefined;
594
+ args?: Record<string, unknown> | undefined;
595
+ until?: import("../index.js").Predicate | undefined;
596
+ maxSteps?: number | undefined;
597
+ goal?: string | undefined;
598
+ } | {
599
+ kind: "assert";
600
+ predicate: import("../index.js").Predicate;
601
+ })[];
602
+ when?: import("../index.js").Predicate | undefined;
603
+ }[];
604
+ }, {
605
+ kind: "branch";
606
+ at: string;
607
+ cases: {
608
+ label: string;
609
+ steps: ({
610
+ kind: "replay";
611
+ flow: string;
612
+ at?: number | undefined;
613
+ to?: number | undefined;
614
+ } | {
615
+ kind: "act";
616
+ target?: Record<string, unknown> | undefined;
617
+ action?: string | undefined;
618
+ args?: Record<string, unknown> | undefined;
619
+ until?: import("../index.js").Predicate | undefined;
620
+ maxSteps?: number | undefined;
621
+ goal?: string | undefined;
622
+ } | {
623
+ kind: "assert";
624
+ predicate: import("../index.js").Predicate;
625
+ })[];
626
+ when?: import("../index.js").Predicate | undefined;
627
+ }[];
628
+ }>]>, "many">;
629
+ }, "strip", z.ZodTypeAny, {
630
+ steps: ({
631
+ kind: "replay";
632
+ flow: string;
633
+ at?: number | undefined;
634
+ to?: number | undefined;
635
+ } | {
636
+ kind: "act";
637
+ target?: Record<string, unknown> | undefined;
638
+ action?: string | undefined;
639
+ args?: Record<string, unknown> | undefined;
640
+ until?: import("../index.js").Predicate | undefined;
641
+ maxSteps?: number | undefined;
642
+ goal?: string | undefined;
643
+ } | {
644
+ kind: "assert";
645
+ predicate: import("../index.js").Predicate;
646
+ } | {
647
+ kind: "checkpoint";
648
+ id: string;
649
+ reenter: {
650
+ flow: string;
651
+ to: number;
652
+ };
653
+ } | {
654
+ kind: "branch";
655
+ at: string;
656
+ cases: {
657
+ label: string;
658
+ steps: ({
659
+ kind: "replay";
660
+ flow: string;
661
+ at?: number | undefined;
662
+ to?: number | undefined;
663
+ } | {
664
+ kind: "act";
665
+ target?: Record<string, unknown> | undefined;
666
+ action?: string | undefined;
667
+ args?: Record<string, unknown> | undefined;
668
+ until?: import("../index.js").Predicate | undefined;
669
+ maxSteps?: number | undefined;
670
+ goal?: string | undefined;
671
+ } | {
672
+ kind: "assert";
673
+ predicate: import("../index.js").Predicate;
674
+ })[];
675
+ when?: import("../index.js").Predicate | undefined;
676
+ }[];
677
+ })[];
678
+ id: string;
679
+ title: string;
680
+ dependsOn: string[];
681
+ persona?: string | undefined;
682
+ }, {
683
+ steps: ({
684
+ kind: "replay";
685
+ flow: string;
686
+ at?: number | undefined;
687
+ to?: number | undefined;
688
+ } | {
689
+ kind: "act";
690
+ target?: Record<string, unknown> | undefined;
691
+ action?: string | undefined;
692
+ args?: Record<string, unknown> | undefined;
693
+ until?: import("../index.js").Predicate | undefined;
694
+ maxSteps?: number | undefined;
695
+ goal?: string | undefined;
696
+ } | {
697
+ kind: "assert";
698
+ predicate: import("../index.js").Predicate;
699
+ } | {
700
+ kind: "checkpoint";
701
+ id: string;
702
+ reenter: {
703
+ flow: string;
704
+ to: number;
705
+ };
706
+ } | {
707
+ kind: "branch";
708
+ at: string;
709
+ cases: {
710
+ label: string;
711
+ steps: ({
712
+ kind: "replay";
713
+ flow: string;
714
+ at?: number | undefined;
715
+ to?: number | undefined;
716
+ } | {
717
+ kind: "act";
718
+ target?: Record<string, unknown> | undefined;
719
+ action?: string | undefined;
720
+ args?: Record<string, unknown> | undefined;
721
+ until?: import("../index.js").Predicate | undefined;
722
+ maxSteps?: number | undefined;
723
+ goal?: string | undefined;
724
+ } | {
725
+ kind: "assert";
726
+ predicate: import("../index.js").Predicate;
727
+ })[];
728
+ when?: import("../index.js").Predicate | undefined;
729
+ }[];
730
+ })[];
731
+ id: string;
732
+ title: string;
733
+ persona?: string | undefined;
734
+ dependsOn?: string[] | undefined;
735
+ }>;
736
+ export declare const LaneSchema: z.ZodObject<{
737
+ id: z.ZodString;
738
+ /** Driven in this order, in one browser context. */
739
+ journeys: z.ZodArray<z.ZodString, "many">;
740
+ }, "strip", z.ZodTypeAny, {
741
+ id: string;
742
+ journeys: string[];
743
+ }, {
744
+ id: string;
745
+ journeys: string[];
746
+ }>;
747
+ export declare const DriveScriptSchema: z.ZodObject<{
748
+ version: z.ZodLiteral<1>;
749
+ source: z.ZodEnum<["local", "platform"]>;
750
+ personas: z.ZodDefault<z.ZodArray<z.ZodObject<{
751
+ name: z.ZodString;
752
+ journey: z.ZodString;
753
+ }, "strip", z.ZodTypeAny, {
754
+ name: string;
755
+ journey: string;
756
+ }, {
757
+ name: string;
758
+ journey: string;
759
+ }>, "many">>;
760
+ journeys: z.ZodArray<z.ZodObject<{
761
+ id: z.ZodString;
762
+ title: z.ZodString;
763
+ persona: z.ZodOptional<z.ZodString>;
764
+ dependsOn: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
765
+ steps: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
766
+ kind: z.ZodLiteral<"replay">;
767
+ flow: z.ZodString;
768
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
769
+ at: z.ZodOptional<z.ZodNumber>;
770
+ /** Stop before this step. Absent: the whole flow. */
771
+ to: z.ZodOptional<z.ZodNumber>;
772
+ }, "strip", z.ZodTypeAny, {
773
+ kind: "replay";
774
+ flow: string;
775
+ at?: number | undefined;
776
+ to?: number | undefined;
777
+ }, {
778
+ kind: "replay";
779
+ flow: string;
780
+ at?: number | undefined;
781
+ to?: number | undefined;
782
+ }>, z.ZodEffects<z.ZodObject<{
783
+ kind: z.ZodLiteral<"act">;
784
+ /** Exact: a target, an action and the consequence that must follow. */
785
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
786
+ action: z.ZodOptional<z.ZodString>;
787
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
788
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
789
+ /** Open: what the model should accomplish, in plain words. */
790
+ goal: z.ZodOptional<z.ZodString>;
791
+ maxSteps: z.ZodOptional<z.ZodNumber>;
792
+ }, "strip", z.ZodTypeAny, {
793
+ kind: "act";
794
+ target?: Record<string, unknown> | undefined;
795
+ action?: string | undefined;
796
+ args?: Record<string, unknown> | undefined;
797
+ until?: import("../index.js").Predicate | undefined;
798
+ maxSteps?: number | undefined;
799
+ goal?: string | undefined;
800
+ }, {
801
+ kind: "act";
802
+ target?: Record<string, unknown> | undefined;
803
+ action?: string | undefined;
804
+ args?: Record<string, unknown> | undefined;
805
+ until?: import("../index.js").Predicate | undefined;
806
+ maxSteps?: number | undefined;
807
+ goal?: string | undefined;
808
+ }>, {
809
+ kind: "act";
810
+ target?: Record<string, unknown> | undefined;
811
+ action?: string | undefined;
812
+ args?: Record<string, unknown> | undefined;
813
+ until?: import("../index.js").Predicate | undefined;
814
+ maxSteps?: number | undefined;
815
+ goal?: string | undefined;
816
+ }, {
817
+ kind: "act";
818
+ target?: Record<string, unknown> | undefined;
819
+ action?: string | undefined;
820
+ args?: Record<string, unknown> | undefined;
821
+ until?: import("../index.js").Predicate | undefined;
822
+ maxSteps?: number | undefined;
823
+ goal?: string | undefined;
824
+ }>, z.ZodObject<{
825
+ kind: z.ZodLiteral<"assert">;
826
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
827
+ }, "strip", z.ZodTypeAny, {
828
+ kind: "assert";
829
+ predicate: import("../index.js").Predicate;
830
+ }, {
831
+ kind: "assert";
832
+ predicate: import("../index.js").Predicate;
833
+ }>]>, z.ZodObject<{
834
+ kind: z.ZodLiteral<"checkpoint">;
835
+ id: z.ZodString;
836
+ /** How to get back here: replay this flow up to (not including) step `to`. */
837
+ reenter: z.ZodObject<{
838
+ flow: z.ZodString;
839
+ to: z.ZodNumber;
840
+ }, "strip", z.ZodTypeAny, {
841
+ flow: string;
842
+ to: number;
843
+ }, {
844
+ flow: string;
845
+ to: number;
846
+ }>;
847
+ }, "strip", z.ZodTypeAny, {
848
+ kind: "checkpoint";
849
+ id: string;
850
+ reenter: {
851
+ flow: string;
852
+ to: number;
853
+ };
854
+ }, {
855
+ kind: "checkpoint";
856
+ id: string;
857
+ reenter: {
858
+ flow: string;
859
+ to: number;
860
+ };
861
+ }>, z.ZodObject<{
862
+ kind: z.ZodLiteral<"branch">;
863
+ /** The checkpoint every case starts from. */
864
+ at: z.ZodString;
865
+ cases: z.ZodArray<z.ZodObject<{
866
+ label: z.ZodString;
867
+ /** Taken only when this holds once the checkpoint is re-entered. Absent: always taken. */
868
+ when: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
869
+ steps: z.ZodArray<z.ZodUnion<[z.ZodObject<{
870
+ kind: z.ZodLiteral<"replay">;
871
+ flow: z.ZodString;
872
+ /** Continue at this step on the page as it is: a branch case picking up at its checkpoint. */
873
+ at: z.ZodOptional<z.ZodNumber>;
874
+ /** Stop before this step. Absent: the whole flow. */
875
+ to: z.ZodOptional<z.ZodNumber>;
876
+ }, "strip", z.ZodTypeAny, {
877
+ kind: "replay";
878
+ flow: string;
879
+ at?: number | undefined;
880
+ to?: number | undefined;
881
+ }, {
882
+ kind: "replay";
883
+ flow: string;
884
+ at?: number | undefined;
885
+ to?: number | undefined;
886
+ }>, z.ZodEffects<z.ZodObject<{
887
+ kind: z.ZodLiteral<"act">;
888
+ /** Exact: a target, an action and the consequence that must follow. */
889
+ target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
890
+ action: z.ZodOptional<z.ZodString>;
891
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
892
+ until: z.ZodOptional<z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>>;
893
+ /** Open: what the model should accomplish, in plain words. */
894
+ goal: z.ZodOptional<z.ZodString>;
895
+ maxSteps: z.ZodOptional<z.ZodNumber>;
896
+ }, "strip", z.ZodTypeAny, {
897
+ kind: "act";
898
+ target?: Record<string, unknown> | undefined;
899
+ action?: string | undefined;
900
+ args?: Record<string, unknown> | undefined;
901
+ until?: import("../index.js").Predicate | undefined;
902
+ maxSteps?: number | undefined;
903
+ goal?: string | undefined;
904
+ }, {
905
+ kind: "act";
906
+ target?: Record<string, unknown> | undefined;
907
+ action?: string | undefined;
908
+ args?: Record<string, unknown> | undefined;
909
+ until?: import("../index.js").Predicate | undefined;
910
+ maxSteps?: number | undefined;
911
+ goal?: string | undefined;
912
+ }>, {
913
+ kind: "act";
914
+ target?: Record<string, unknown> | undefined;
915
+ action?: string | undefined;
916
+ args?: Record<string, unknown> | undefined;
917
+ until?: import("../index.js").Predicate | undefined;
918
+ maxSteps?: number | undefined;
919
+ goal?: string | undefined;
920
+ }, {
921
+ kind: "act";
922
+ target?: Record<string, unknown> | undefined;
923
+ action?: string | undefined;
924
+ args?: Record<string, unknown> | undefined;
925
+ until?: import("../index.js").Predicate | undefined;
926
+ maxSteps?: number | undefined;
927
+ goal?: string | undefined;
928
+ }>, z.ZodObject<{
929
+ kind: z.ZodLiteral<"assert">;
930
+ predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
931
+ }, "strip", z.ZodTypeAny, {
932
+ kind: "assert";
933
+ predicate: import("../index.js").Predicate;
934
+ }, {
935
+ kind: "assert";
936
+ predicate: import("../index.js").Predicate;
937
+ }>]>, "many">;
938
+ }, "strip", z.ZodTypeAny, {
939
+ label: string;
940
+ steps: ({
941
+ kind: "replay";
942
+ flow: string;
943
+ at?: number | undefined;
944
+ to?: number | undefined;
945
+ } | {
946
+ kind: "act";
947
+ target?: Record<string, unknown> | undefined;
948
+ action?: string | undefined;
949
+ args?: Record<string, unknown> | undefined;
950
+ until?: import("../index.js").Predicate | undefined;
951
+ maxSteps?: number | undefined;
952
+ goal?: string | undefined;
953
+ } | {
954
+ kind: "assert";
955
+ predicate: import("../index.js").Predicate;
956
+ })[];
957
+ when?: import("../index.js").Predicate | undefined;
958
+ }, {
959
+ label: string;
960
+ steps: ({
961
+ kind: "replay";
962
+ flow: string;
963
+ at?: number | undefined;
964
+ to?: number | undefined;
965
+ } | {
966
+ kind: "act";
967
+ target?: Record<string, unknown> | undefined;
968
+ action?: string | undefined;
969
+ args?: Record<string, unknown> | undefined;
970
+ until?: import("../index.js").Predicate | undefined;
971
+ maxSteps?: number | undefined;
972
+ goal?: string | undefined;
973
+ } | {
974
+ kind: "assert";
975
+ predicate: import("../index.js").Predicate;
976
+ })[];
977
+ when?: import("../index.js").Predicate | undefined;
978
+ }>, "many">;
979
+ }, "strip", z.ZodTypeAny, {
980
+ kind: "branch";
981
+ at: string;
982
+ cases: {
983
+ label: string;
984
+ steps: ({
985
+ kind: "replay";
986
+ flow: string;
987
+ at?: number | undefined;
988
+ to?: number | undefined;
989
+ } | {
990
+ kind: "act";
991
+ target?: Record<string, unknown> | undefined;
992
+ action?: string | undefined;
993
+ args?: Record<string, unknown> | undefined;
994
+ until?: import("../index.js").Predicate | undefined;
995
+ maxSteps?: number | undefined;
996
+ goal?: string | undefined;
997
+ } | {
998
+ kind: "assert";
999
+ predicate: import("../index.js").Predicate;
1000
+ })[];
1001
+ when?: import("../index.js").Predicate | undefined;
1002
+ }[];
1003
+ }, {
1004
+ kind: "branch";
1005
+ at: string;
1006
+ cases: {
1007
+ label: string;
1008
+ steps: ({
1009
+ kind: "replay";
1010
+ flow: string;
1011
+ at?: number | undefined;
1012
+ to?: number | undefined;
1013
+ } | {
1014
+ kind: "act";
1015
+ target?: Record<string, unknown> | undefined;
1016
+ action?: string | undefined;
1017
+ args?: Record<string, unknown> | undefined;
1018
+ until?: import("../index.js").Predicate | undefined;
1019
+ maxSteps?: number | undefined;
1020
+ goal?: string | undefined;
1021
+ } | {
1022
+ kind: "assert";
1023
+ predicate: import("../index.js").Predicate;
1024
+ })[];
1025
+ when?: import("../index.js").Predicate | undefined;
1026
+ }[];
1027
+ }>]>, "many">;
1028
+ }, "strip", z.ZodTypeAny, {
1029
+ steps: ({
1030
+ kind: "replay";
1031
+ flow: string;
1032
+ at?: number | undefined;
1033
+ to?: number | undefined;
1034
+ } | {
1035
+ kind: "act";
1036
+ target?: Record<string, unknown> | undefined;
1037
+ action?: string | undefined;
1038
+ args?: Record<string, unknown> | undefined;
1039
+ until?: import("../index.js").Predicate | undefined;
1040
+ maxSteps?: number | undefined;
1041
+ goal?: string | undefined;
1042
+ } | {
1043
+ kind: "assert";
1044
+ predicate: import("../index.js").Predicate;
1045
+ } | {
1046
+ kind: "checkpoint";
1047
+ id: string;
1048
+ reenter: {
1049
+ flow: string;
1050
+ to: number;
1051
+ };
1052
+ } | {
1053
+ kind: "branch";
1054
+ at: string;
1055
+ cases: {
1056
+ label: string;
1057
+ steps: ({
1058
+ kind: "replay";
1059
+ flow: string;
1060
+ at?: number | undefined;
1061
+ to?: number | undefined;
1062
+ } | {
1063
+ kind: "act";
1064
+ target?: Record<string, unknown> | undefined;
1065
+ action?: string | undefined;
1066
+ args?: Record<string, unknown> | undefined;
1067
+ until?: import("../index.js").Predicate | undefined;
1068
+ maxSteps?: number | undefined;
1069
+ goal?: string | undefined;
1070
+ } | {
1071
+ kind: "assert";
1072
+ predicate: import("../index.js").Predicate;
1073
+ })[];
1074
+ when?: import("../index.js").Predicate | undefined;
1075
+ }[];
1076
+ })[];
1077
+ id: string;
1078
+ title: string;
1079
+ dependsOn: string[];
1080
+ persona?: string | undefined;
1081
+ }, {
1082
+ steps: ({
1083
+ kind: "replay";
1084
+ flow: string;
1085
+ at?: number | undefined;
1086
+ to?: number | undefined;
1087
+ } | {
1088
+ kind: "act";
1089
+ target?: Record<string, unknown> | undefined;
1090
+ action?: string | undefined;
1091
+ args?: Record<string, unknown> | undefined;
1092
+ until?: import("../index.js").Predicate | undefined;
1093
+ maxSteps?: number | undefined;
1094
+ goal?: string | undefined;
1095
+ } | {
1096
+ kind: "assert";
1097
+ predicate: import("../index.js").Predicate;
1098
+ } | {
1099
+ kind: "checkpoint";
1100
+ id: string;
1101
+ reenter: {
1102
+ flow: string;
1103
+ to: number;
1104
+ };
1105
+ } | {
1106
+ kind: "branch";
1107
+ at: string;
1108
+ cases: {
1109
+ label: string;
1110
+ steps: ({
1111
+ kind: "replay";
1112
+ flow: string;
1113
+ at?: number | undefined;
1114
+ to?: number | undefined;
1115
+ } | {
1116
+ kind: "act";
1117
+ target?: Record<string, unknown> | undefined;
1118
+ action?: string | undefined;
1119
+ args?: Record<string, unknown> | undefined;
1120
+ until?: import("../index.js").Predicate | undefined;
1121
+ maxSteps?: number | undefined;
1122
+ goal?: string | undefined;
1123
+ } | {
1124
+ kind: "assert";
1125
+ predicate: import("../index.js").Predicate;
1126
+ })[];
1127
+ when?: import("../index.js").Predicate | undefined;
1128
+ }[];
1129
+ })[];
1130
+ id: string;
1131
+ title: string;
1132
+ persona?: string | undefined;
1133
+ dependsOn?: string[] | undefined;
1134
+ }>, "many">;
1135
+ lanes: z.ZodArray<z.ZodObject<{
1136
+ id: z.ZodString;
1137
+ /** Driven in this order, in one browser context. */
1138
+ journeys: z.ZodArray<z.ZodString, "many">;
1139
+ }, "strip", z.ZodTypeAny, {
1140
+ id: string;
1141
+ journeys: string[];
1142
+ }, {
1143
+ id: string;
1144
+ journeys: string[];
1145
+ }>, "many">;
1146
+ /** At most this many lanes at once. Absent: as many as the browser pool can lease. */
1147
+ maxParallel: z.ZodOptional<z.ZodNumber>;
1148
+ }, "strip", z.ZodTypeAny, {
1149
+ source: "local" | "platform";
1150
+ version: 1;
1151
+ journeys: {
1152
+ steps: ({
1153
+ kind: "replay";
1154
+ flow: string;
1155
+ at?: number | undefined;
1156
+ to?: number | undefined;
1157
+ } | {
1158
+ kind: "act";
1159
+ target?: Record<string, unknown> | undefined;
1160
+ action?: string | undefined;
1161
+ args?: Record<string, unknown> | undefined;
1162
+ until?: import("../index.js").Predicate | undefined;
1163
+ maxSteps?: number | undefined;
1164
+ goal?: string | undefined;
1165
+ } | {
1166
+ kind: "assert";
1167
+ predicate: import("../index.js").Predicate;
1168
+ } | {
1169
+ kind: "checkpoint";
1170
+ id: string;
1171
+ reenter: {
1172
+ flow: string;
1173
+ to: number;
1174
+ };
1175
+ } | {
1176
+ kind: "branch";
1177
+ at: string;
1178
+ cases: {
1179
+ label: string;
1180
+ steps: ({
1181
+ kind: "replay";
1182
+ flow: string;
1183
+ at?: number | undefined;
1184
+ to?: number | undefined;
1185
+ } | {
1186
+ kind: "act";
1187
+ target?: Record<string, unknown> | undefined;
1188
+ action?: string | undefined;
1189
+ args?: Record<string, unknown> | undefined;
1190
+ until?: import("../index.js").Predicate | undefined;
1191
+ maxSteps?: number | undefined;
1192
+ goal?: string | undefined;
1193
+ } | {
1194
+ kind: "assert";
1195
+ predicate: import("../index.js").Predicate;
1196
+ })[];
1197
+ when?: import("../index.js").Predicate | undefined;
1198
+ }[];
1199
+ })[];
1200
+ id: string;
1201
+ title: string;
1202
+ dependsOn: string[];
1203
+ persona?: string | undefined;
1204
+ }[];
1205
+ personas: {
1206
+ name: string;
1207
+ journey: string;
1208
+ }[];
1209
+ lanes: {
1210
+ id: string;
1211
+ journeys: string[];
1212
+ }[];
1213
+ maxParallel?: number | undefined;
1214
+ }, {
1215
+ source: "local" | "platform";
1216
+ version: 1;
1217
+ journeys: {
1218
+ steps: ({
1219
+ kind: "replay";
1220
+ flow: string;
1221
+ at?: number | undefined;
1222
+ to?: number | undefined;
1223
+ } | {
1224
+ kind: "act";
1225
+ target?: Record<string, unknown> | undefined;
1226
+ action?: string | undefined;
1227
+ args?: Record<string, unknown> | undefined;
1228
+ until?: import("../index.js").Predicate | undefined;
1229
+ maxSteps?: number | undefined;
1230
+ goal?: string | undefined;
1231
+ } | {
1232
+ kind: "assert";
1233
+ predicate: import("../index.js").Predicate;
1234
+ } | {
1235
+ kind: "checkpoint";
1236
+ id: string;
1237
+ reenter: {
1238
+ flow: string;
1239
+ to: number;
1240
+ };
1241
+ } | {
1242
+ kind: "branch";
1243
+ at: string;
1244
+ cases: {
1245
+ label: string;
1246
+ steps: ({
1247
+ kind: "replay";
1248
+ flow: string;
1249
+ at?: number | undefined;
1250
+ to?: number | undefined;
1251
+ } | {
1252
+ kind: "act";
1253
+ target?: Record<string, unknown> | undefined;
1254
+ action?: string | undefined;
1255
+ args?: Record<string, unknown> | undefined;
1256
+ until?: import("../index.js").Predicate | undefined;
1257
+ maxSteps?: number | undefined;
1258
+ goal?: string | undefined;
1259
+ } | {
1260
+ kind: "assert";
1261
+ predicate: import("../index.js").Predicate;
1262
+ })[];
1263
+ when?: import("../index.js").Predicate | undefined;
1264
+ }[];
1265
+ })[];
1266
+ id: string;
1267
+ title: string;
1268
+ persona?: string | undefined;
1269
+ dependsOn?: string[] | undefined;
1270
+ }[];
1271
+ lanes: {
1272
+ id: string;
1273
+ journeys: string[];
1274
+ }[];
1275
+ personas?: {
1276
+ name: string;
1277
+ journey: string;
1278
+ }[] | undefined;
1279
+ maxParallel?: number | undefined;
1280
+ }>;
1281
+ export type ScriptStep = z.infer<typeof ScriptStepSchema>;
1282
+ export type ScriptLeafStep = z.infer<typeof LeafStep>;
1283
+ export type Journey = z.infer<typeof JourneySchema>;
1284
+ export type Lane = z.infer<typeof LaneSchema>;
1285
+ export type DriveScript = z.infer<typeof DriveScriptSchema>;
1286
+ /**
1287
+ * Every reason this script cannot run as written, or none.
1288
+ *
1289
+ * A dependency is honoured one of two ways: earlier in the same lane, or in an EARLIER lane (a
1290
+ * barrier). Pointing only backwards is what makes a script acyclic and a barrier unable to wait on
1291
+ * a lane that has not started, so no separate cycle check is needed.
1292
+ */
1293
+ export declare function checkScript(script: DriveScript): string[];
1294
+ /** The lane barrier a journey waits on: its dependencies that are not earlier in its own lane. */
1295
+ export declare function barriersOf(script: DriveScript, laneId: string, journeyId: string): string[];
1296
+ /** One line a person reads for a step: what it drives, in the plan's own words. */
1297
+ export declare function stepLabel(step: ScriptStep): string;
1298
+ export {};