@reticlehq/core 3.8.0 → 3.8.1

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