@reticlehq/core 3.6.0 → 3.8.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 (133) hide show
  1. package/dist/activation-entry.d.ts +9 -0
  2. package/dist/activation-entry.js +9 -0
  3. package/dist/artifacts/artifacts-entry.d.ts +2 -0
  4. package/dist/artifacts/artifacts-entry.js +2 -0
  5. package/dist/artifacts/drive-script.d.ts +222 -116
  6. package/dist/artifacts/drive-script.js +24 -1
  7. package/dist/artifacts/flow-constants.d.ts +33 -0
  8. package/dist/artifacts/flow-constants.js +35 -0
  9. package/dist/artifacts/flow-expect-flat.d.ts +8 -8
  10. package/dist/artifacts/flow-results.d.ts +461 -0
  11. package/dist/artifacts/flow-results.js +1 -0
  12. package/dist/artifacts/flow-types.d.ts +177 -543
  13. package/dist/artifacts/flow-types.js +17 -2
  14. package/dist/artifacts/harness-credits.d.ts +42 -0
  15. package/dist/artifacts/harness-credits.js +72 -0
  16. package/dist/artifacts/harness-map.d.ts +98 -0
  17. package/dist/artifacts/harness-map.js +36 -0
  18. package/dist/artifacts/impact.d.ts +355 -149
  19. package/dist/artifacts/impact.js +84 -49
  20. package/dist/artifacts/journal.d.ts +81 -11
  21. package/dist/artifacts/journal.js +39 -0
  22. package/dist/artifacts/prompt-context.d.ts +12 -0
  23. package/dist/artifacts/prompt-context.js +14 -3
  24. package/dist/artifacts/screenshot-upload.d.ts +51 -0
  25. package/dist/artifacts/screenshot-upload.js +26 -0
  26. package/dist/graph/app-graph.d.ts +137 -0
  27. package/dist/graph/app-graph.js +498 -0
  28. package/dist/hooks/hook-events.d.ts +26 -26
  29. package/dist/hud-entry.d.ts +1 -0
  30. package/dist/hud-entry.js +2 -0
  31. package/dist/identity/checkout.d.ts +41 -0
  32. package/dist/identity/checkout.js +118 -0
  33. package/dist/identity/state-dir.d.ts +23 -0
  34. package/dist/identity/state-dir.js +43 -0
  35. package/dist/index.d.ts +15 -0
  36. package/dist/index.js +15 -0
  37. package/dist/onboarding.d.ts +30 -1
  38. package/dist/onboarding.js +25 -0
  39. package/dist/realm/registry.js +19 -1
  40. package/dist/registry/dev-server-registry.d.ts +2 -2
  41. package/dist/schema/command-message.json +30 -0
  42. package/dist/schema/command-name.json +3 -1
  43. package/dist/schema/event-message.json +3 -1
  44. package/dist/schema/event-payloads.json +156 -3
  45. package/dist/schema/event-type.json +3 -1
  46. package/dist/schema/hello-message.json +21 -0
  47. package/dist/schema/reticle-event.json +3 -1
  48. package/dist/schema/reticle-message.json +54 -1
  49. package/dist/telemetry-bug.d.ts +169 -0
  50. package/dist/telemetry-bug.js +123 -0
  51. package/dist/telemetry-entry.d.ts +2 -1
  52. package/dist/telemetry-entry.js +2 -1
  53. package/dist/telemetry-feedback.d.ts +16 -2
  54. package/dist/telemetry-feedback.js +19 -0
  55. package/dist/telemetry-session.d.ts +91 -2
  56. package/dist/telemetry-session.js +65 -0
  57. package/dist/telemetry-signals.d.ts +557 -0
  58. package/dist/telemetry-signals.js +225 -0
  59. package/dist/telemetry.d.ts +649 -296
  60. package/dist/telemetry.js +110 -119
  61. package/dist/verdict/check-sentence.d.ts +34 -0
  62. package/dist/verdict/check-sentence.js +228 -0
  63. package/dist/verdict/consequence.d.ts +15 -0
  64. package/dist/verdict/consequence.js +11 -0
  65. package/dist/verdict/disparity.d.ts +105 -0
  66. package/dist/verdict/disparity.js +40 -0
  67. package/dist/verdict/findings.d.ts +16 -0
  68. package/dist/verdict/findings.js +22 -0
  69. package/dist/verdict/instrumentation-coverage.d.ts +84 -0
  70. package/dist/verdict/instrumentation-coverage.js +182 -0
  71. package/dist/verdict/instrumentation-gap.d.ts +79 -0
  72. package/dist/verdict/instrumentation-gap.js +65 -1
  73. package/dist/verdict/intent.d.ts +19 -5
  74. package/dist/verdict/intent.js +13 -1
  75. package/dist/verdict/predicate-tree.d.ts +17 -0
  76. package/dist/verdict/predicate-tree.js +37 -0
  77. package/dist/verdict/predicate.d.ts +16 -1
  78. package/dist/verdict/predicate.js +188 -13
  79. package/dist/verdict/property-assertion.d.ts +2 -2
  80. package/dist/verdict/run-report.d.ts +166 -0
  81. package/dist/verdict/run-report.js +53 -0
  82. package/dist/verdict/security.d.ts +60 -1
  83. package/dist/verdict/security.js +174 -12
  84. package/dist/verdict/verification-run.d.ts +713 -68
  85. package/dist/verdict/verification-run.js +113 -0
  86. package/dist/verdict/verify-progress.d.ts +6 -6
  87. package/dist/wire/constants/constants.d.ts +69 -155
  88. package/dist/wire/constants/constants.js +78 -159
  89. package/dist/wire/constants/discovery.d.ts +4 -4
  90. package/dist/wire/constants/discovery.js +4 -4
  91. package/dist/wire/constants/event-types.d.ts +35 -1
  92. package/dist/wire/constants/event-types.js +33 -1
  93. package/dist/wire/constants/hud-controls.js +15 -5
  94. package/dist/wire/constants/hud-use.d.ts +33 -4
  95. package/dist/wire/constants/hud-use.js +30 -4
  96. package/dist/wire/constants/mcp-wire.d.ts +26 -0
  97. package/dist/wire/constants/mcp-wire.js +26 -0
  98. package/dist/wire/constants/response-body-reason.d.ts +19 -0
  99. package/dist/wire/constants/response-body-reason.js +18 -0
  100. package/dist/wire/constants/reticle-chrome.d.ts +19 -0
  101. package/dist/wire/constants/reticle-chrome.js +19 -0
  102. package/dist/wire/constants/reticle-env.d.ts +138 -0
  103. package/dist/wire/constants/reticle-env.js +138 -0
  104. package/dist/wire/constants/session-constants.d.ts +26 -2
  105. package/dist/wire/constants/session-constants.js +26 -2
  106. package/dist/wire/desktop-contract.d.ts +8 -0
  107. package/dist/wire/desktop-contract.js +11 -0
  108. package/dist/wire/event-payloads.d.ts +202 -36
  109. package/dist/wire/event-payloads.js +100 -16
  110. package/dist/wire/messages.d.ts +193 -54
  111. package/dist/wire/messages.js +25 -1
  112. package/dist/wire/narrow.d.ts +6 -0
  113. package/dist/wire/narrow.js +26 -0
  114. package/dist/wire/next-step.d.ts +90 -0
  115. package/dist/wire/next-step.js +37 -0
  116. package/dist/wire/platform-link.d.ts +84 -0
  117. package/dist/wire/platform-link.js +57 -6
  118. package/dist/wire/production/activation-ticket.d.ts +64 -0
  119. package/dist/wire/production/activation-ticket.js +148 -0
  120. package/dist/wire/production/hello-mode.d.ts +35 -0
  121. package/dist/wire/production/hello-mode.js +32 -0
  122. package/dist/wire/production/production-policy.d.ts +138 -0
  123. package/dist/wire/production/production-policy.js +133 -0
  124. package/dist/wire/tool-names.d.ts +4 -0
  125. package/dist/wire/tool-names.js +4 -0
  126. package/dist/wire/types.d.ts +90 -52
  127. package/dist/wire/types.js +5 -0
  128. package/dist/words/notices.d.ts +1 -1
  129. package/dist/words/notices.js +1 -1
  130. package/dist/words/upgrade.js +1 -1
  131. package/dist/words/writing-rule.d.ts +14 -0
  132. package/dist/words/writing-rule.js +17 -0
  133. package/package.json +5 -1
@@ -22,10 +22,22 @@ export declare const ScriptStepKind: {
22
22
  readonly CHECKPOINT: "checkpoint";
23
23
  readonly BRANCH: "branch";
24
24
  };
25
+ /** How a journey of a plan was answered: its saved flows replayed (no model), or the model drove it. */
26
+ export declare const JourneyBy: {
27
+ readonly REPLAY: "replay";
28
+ readonly MODEL: "model";
29
+ };
30
+ export type JourneyBy = (typeof JourneyBy)[keyof typeof JourneyBy];
25
31
  export declare const ScriptSource: {
26
32
  readonly LOCAL: "local";
27
33
  readonly PLATFORM: "platform";
28
34
  };
35
+ /** How the journey a condition names must have ended for the conditional one to run. */
36
+ export declare const JourneyOutcome: {
37
+ readonly PASSED: "passed";
38
+ readonly FAILED: "failed";
39
+ };
40
+ export type JourneyOutcome = (typeof JourneyOutcome)[keyof typeof JourneyOutcome];
29
41
  declare const LeafStep: z.ZodUnion<[z.ZodObject<{
30
42
  kind: z.ZodLiteral<"replay">;
31
43
  flow: z.ZodString;
@@ -55,36 +67,36 @@ declare const LeafStep: z.ZodUnion<[z.ZodObject<{
55
67
  maxSteps: z.ZodOptional<z.ZodNumber>;
56
68
  }, "strip", z.ZodTypeAny, {
57
69
  kind: "act";
58
- target?: Record<string, unknown> | undefined;
59
70
  action?: string | undefined;
71
+ goal?: string | undefined;
72
+ target?: Record<string, unknown> | undefined;
60
73
  args?: Record<string, unknown> | undefined;
61
74
  until?: import("../index.js").Predicate | undefined;
62
75
  maxSteps?: number | undefined;
63
- goal?: string | undefined;
64
76
  }, {
65
77
  kind: "act";
66
- target?: Record<string, unknown> | undefined;
67
78
  action?: string | undefined;
79
+ goal?: string | undefined;
80
+ target?: Record<string, unknown> | undefined;
68
81
  args?: Record<string, unknown> | undefined;
69
82
  until?: import("../index.js").Predicate | undefined;
70
83
  maxSteps?: number | undefined;
71
- goal?: string | undefined;
72
84
  }>, {
73
85
  kind: "act";
74
- target?: Record<string, unknown> | undefined;
75
86
  action?: string | undefined;
87
+ goal?: string | undefined;
88
+ target?: Record<string, unknown> | undefined;
76
89
  args?: Record<string, unknown> | undefined;
77
90
  until?: import("../index.js").Predicate | undefined;
78
91
  maxSteps?: number | undefined;
79
- goal?: string | undefined;
80
92
  }, {
81
93
  kind: "act";
82
- target?: Record<string, unknown> | undefined;
83
94
  action?: string | undefined;
95
+ goal?: string | undefined;
96
+ target?: Record<string, unknown> | undefined;
84
97
  args?: Record<string, unknown> | undefined;
85
98
  until?: import("../index.js").Predicate | undefined;
86
99
  maxSteps?: number | undefined;
87
- goal?: string | undefined;
88
100
  }>, z.ZodObject<{
89
101
  kind: z.ZodLiteral<"assert">;
90
102
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -124,36 +136,36 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
124
136
  maxSteps: z.ZodOptional<z.ZodNumber>;
125
137
  }, "strip", z.ZodTypeAny, {
126
138
  kind: "act";
127
- target?: Record<string, unknown> | undefined;
128
139
  action?: string | undefined;
140
+ goal?: string | undefined;
141
+ target?: Record<string, unknown> | undefined;
129
142
  args?: Record<string, unknown> | undefined;
130
143
  until?: import("../index.js").Predicate | undefined;
131
144
  maxSteps?: number | undefined;
132
- goal?: string | undefined;
133
145
  }, {
134
146
  kind: "act";
135
- target?: Record<string, unknown> | undefined;
136
147
  action?: string | undefined;
148
+ goal?: string | undefined;
149
+ target?: Record<string, unknown> | undefined;
137
150
  args?: Record<string, unknown> | undefined;
138
151
  until?: import("../index.js").Predicate | undefined;
139
152
  maxSteps?: number | undefined;
140
- goal?: string | undefined;
141
153
  }>, {
142
154
  kind: "act";
143
- target?: Record<string, unknown> | undefined;
144
155
  action?: string | undefined;
156
+ goal?: string | undefined;
157
+ target?: Record<string, unknown> | undefined;
145
158
  args?: Record<string, unknown> | undefined;
146
159
  until?: import("../index.js").Predicate | undefined;
147
160
  maxSteps?: number | undefined;
148
- goal?: string | undefined;
149
161
  }, {
150
162
  kind: "act";
151
- target?: Record<string, unknown> | undefined;
152
163
  action?: string | undefined;
164
+ goal?: string | undefined;
165
+ target?: Record<string, unknown> | undefined;
153
166
  args?: Record<string, unknown> | undefined;
154
167
  until?: import("../index.js").Predicate | undefined;
155
168
  maxSteps?: number | undefined;
156
- goal?: string | undefined;
157
169
  }>, z.ZodObject<{
158
170
  kind: z.ZodLiteral<"assert">;
159
171
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -228,36 +240,36 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
228
240
  maxSteps: z.ZodOptional<z.ZodNumber>;
229
241
  }, "strip", z.ZodTypeAny, {
230
242
  kind: "act";
231
- target?: Record<string, unknown> | undefined;
232
243
  action?: string | undefined;
244
+ goal?: string | undefined;
245
+ target?: Record<string, unknown> | undefined;
233
246
  args?: Record<string, unknown> | undefined;
234
247
  until?: import("../index.js").Predicate | undefined;
235
248
  maxSteps?: number | undefined;
236
- goal?: string | undefined;
237
249
  }, {
238
250
  kind: "act";
239
- target?: Record<string, unknown> | undefined;
240
251
  action?: string | undefined;
252
+ goal?: string | undefined;
253
+ target?: Record<string, unknown> | undefined;
241
254
  args?: Record<string, unknown> | undefined;
242
255
  until?: import("../index.js").Predicate | undefined;
243
256
  maxSteps?: number | undefined;
244
- goal?: string | undefined;
245
257
  }>, {
246
258
  kind: "act";
247
- target?: Record<string, unknown> | undefined;
248
259
  action?: string | undefined;
260
+ goal?: string | undefined;
261
+ target?: Record<string, unknown> | undefined;
249
262
  args?: Record<string, unknown> | undefined;
250
263
  until?: import("../index.js").Predicate | undefined;
251
264
  maxSteps?: number | undefined;
252
- goal?: string | undefined;
253
265
  }, {
254
266
  kind: "act";
255
- target?: Record<string, unknown> | undefined;
256
267
  action?: string | undefined;
268
+ goal?: string | undefined;
269
+ target?: Record<string, unknown> | undefined;
257
270
  args?: Record<string, unknown> | undefined;
258
271
  until?: import("../index.js").Predicate | undefined;
259
272
  maxSteps?: number | undefined;
260
- goal?: string | undefined;
261
273
  }>, z.ZodObject<{
262
274
  kind: z.ZodLiteral<"assert">;
263
275
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -277,12 +289,12 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
277
289
  to?: number | undefined;
278
290
  } | {
279
291
  kind: "act";
280
- target?: Record<string, unknown> | undefined;
281
292
  action?: string | undefined;
293
+ goal?: string | undefined;
294
+ target?: Record<string, unknown> | undefined;
282
295
  args?: Record<string, unknown> | undefined;
283
296
  until?: import("../index.js").Predicate | undefined;
284
297
  maxSteps?: number | undefined;
285
- goal?: string | undefined;
286
298
  } | {
287
299
  kind: "assert";
288
300
  predicate: import("../index.js").Predicate;
@@ -297,12 +309,12 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
297
309
  to?: number | undefined;
298
310
  } | {
299
311
  kind: "act";
300
- target?: Record<string, unknown> | undefined;
301
312
  action?: string | undefined;
313
+ goal?: string | undefined;
314
+ target?: Record<string, unknown> | undefined;
302
315
  args?: Record<string, unknown> | undefined;
303
316
  until?: import("../index.js").Predicate | undefined;
304
317
  maxSteps?: number | undefined;
305
- goal?: string | undefined;
306
318
  } | {
307
319
  kind: "assert";
308
320
  predicate: import("../index.js").Predicate;
@@ -310,8 +322,8 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
310
322
  when?: import("../index.js").Predicate | undefined;
311
323
  }>, "many">;
312
324
  }, "strip", z.ZodTypeAny, {
313
- kind: "branch";
314
325
  at: string;
326
+ kind: "branch";
315
327
  cases: {
316
328
  label: string;
317
329
  steps: ({
@@ -321,12 +333,12 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
321
333
  to?: number | undefined;
322
334
  } | {
323
335
  kind: "act";
324
- target?: Record<string, unknown> | undefined;
325
336
  action?: string | undefined;
337
+ goal?: string | undefined;
338
+ target?: Record<string, unknown> | undefined;
326
339
  args?: Record<string, unknown> | undefined;
327
340
  until?: import("../index.js").Predicate | undefined;
328
341
  maxSteps?: number | undefined;
329
- goal?: string | undefined;
330
342
  } | {
331
343
  kind: "assert";
332
344
  predicate: import("../index.js").Predicate;
@@ -334,8 +346,8 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
334
346
  when?: import("../index.js").Predicate | undefined;
335
347
  }[];
336
348
  }, {
337
- kind: "branch";
338
349
  at: string;
350
+ kind: "branch";
339
351
  cases: {
340
352
  label: string;
341
353
  steps: ({
@@ -345,12 +357,12 @@ export declare const ScriptStepSchema: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
345
357
  to?: number | undefined;
346
358
  } | {
347
359
  kind: "act";
348
- target?: Record<string, unknown> | undefined;
349
360
  action?: string | undefined;
361
+ goal?: string | undefined;
362
+ target?: Record<string, unknown> | undefined;
350
363
  args?: Record<string, unknown> | undefined;
351
364
  until?: import("../index.js").Predicate | undefined;
352
365
  maxSteps?: number | undefined;
353
- goal?: string | undefined;
354
366
  } | {
355
367
  kind: "assert";
356
368
  predicate: import("../index.js").Predicate;
@@ -363,6 +375,20 @@ export declare const JourneySchema: z.ZodObject<{
363
375
  title: z.ZodString;
364
376
  persona: z.ZodOptional<z.ZodString>;
365
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
+ */
382
+ when: z.ZodOptional<z.ZodObject<{
383
+ 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
+ }>>;
366
392
  steps: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
367
393
  kind: z.ZodLiteral<"replay">;
368
394
  flow: z.ZodString;
@@ -392,36 +418,36 @@ export declare const JourneySchema: z.ZodObject<{
392
418
  maxSteps: z.ZodOptional<z.ZodNumber>;
393
419
  }, "strip", z.ZodTypeAny, {
394
420
  kind: "act";
395
- target?: Record<string, unknown> | undefined;
396
421
  action?: string | undefined;
422
+ goal?: string | undefined;
423
+ target?: Record<string, unknown> | undefined;
397
424
  args?: Record<string, unknown> | undefined;
398
425
  until?: import("../index.js").Predicate | undefined;
399
426
  maxSteps?: number | undefined;
400
- goal?: string | undefined;
401
427
  }, {
402
428
  kind: "act";
403
- target?: Record<string, unknown> | undefined;
404
429
  action?: string | undefined;
430
+ goal?: string | undefined;
431
+ target?: Record<string, unknown> | undefined;
405
432
  args?: Record<string, unknown> | undefined;
406
433
  until?: import("../index.js").Predicate | undefined;
407
434
  maxSteps?: number | undefined;
408
- goal?: string | undefined;
409
435
  }>, {
410
436
  kind: "act";
411
- target?: Record<string, unknown> | undefined;
412
437
  action?: string | undefined;
438
+ goal?: string | undefined;
439
+ target?: Record<string, unknown> | undefined;
413
440
  args?: Record<string, unknown> | undefined;
414
441
  until?: import("../index.js").Predicate | undefined;
415
442
  maxSteps?: number | undefined;
416
- goal?: string | undefined;
417
443
  }, {
418
444
  kind: "act";
419
- target?: Record<string, unknown> | undefined;
420
445
  action?: string | undefined;
446
+ goal?: string | undefined;
447
+ target?: Record<string, unknown> | undefined;
421
448
  args?: Record<string, unknown> | undefined;
422
449
  until?: import("../index.js").Predicate | undefined;
423
450
  maxSteps?: number | undefined;
424
- goal?: string | undefined;
425
451
  }>, z.ZodObject<{
426
452
  kind: z.ZodLiteral<"assert">;
427
453
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -496,36 +522,36 @@ export declare const JourneySchema: z.ZodObject<{
496
522
  maxSteps: z.ZodOptional<z.ZodNumber>;
497
523
  }, "strip", z.ZodTypeAny, {
498
524
  kind: "act";
499
- target?: Record<string, unknown> | undefined;
500
525
  action?: string | undefined;
526
+ goal?: string | undefined;
527
+ target?: Record<string, unknown> | undefined;
501
528
  args?: Record<string, unknown> | undefined;
502
529
  until?: import("../index.js").Predicate | undefined;
503
530
  maxSteps?: number | undefined;
504
- goal?: string | undefined;
505
531
  }, {
506
532
  kind: "act";
507
- target?: Record<string, unknown> | undefined;
508
533
  action?: string | undefined;
534
+ goal?: string | undefined;
535
+ target?: Record<string, unknown> | undefined;
509
536
  args?: Record<string, unknown> | undefined;
510
537
  until?: import("../index.js").Predicate | undefined;
511
538
  maxSteps?: number | undefined;
512
- goal?: string | undefined;
513
539
  }>, {
514
540
  kind: "act";
515
- target?: Record<string, unknown> | undefined;
516
541
  action?: string | undefined;
542
+ goal?: string | undefined;
543
+ target?: Record<string, unknown> | undefined;
517
544
  args?: Record<string, unknown> | undefined;
518
545
  until?: import("../index.js").Predicate | undefined;
519
546
  maxSteps?: number | undefined;
520
- goal?: string | undefined;
521
547
  }, {
522
548
  kind: "act";
523
- target?: Record<string, unknown> | undefined;
524
549
  action?: string | undefined;
550
+ goal?: string | undefined;
551
+ target?: Record<string, unknown> | undefined;
525
552
  args?: Record<string, unknown> | undefined;
526
553
  until?: import("../index.js").Predicate | undefined;
527
554
  maxSteps?: number | undefined;
528
- goal?: string | undefined;
529
555
  }>, z.ZodObject<{
530
556
  kind: z.ZodLiteral<"assert">;
531
557
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -545,12 +571,12 @@ export declare const JourneySchema: z.ZodObject<{
545
571
  to?: number | undefined;
546
572
  } | {
547
573
  kind: "act";
548
- target?: Record<string, unknown> | undefined;
549
574
  action?: string | undefined;
575
+ goal?: string | undefined;
576
+ target?: Record<string, unknown> | undefined;
550
577
  args?: Record<string, unknown> | undefined;
551
578
  until?: import("../index.js").Predicate | undefined;
552
579
  maxSteps?: number | undefined;
553
- goal?: string | undefined;
554
580
  } | {
555
581
  kind: "assert";
556
582
  predicate: import("../index.js").Predicate;
@@ -565,12 +591,12 @@ export declare const JourneySchema: z.ZodObject<{
565
591
  to?: number | undefined;
566
592
  } | {
567
593
  kind: "act";
568
- target?: Record<string, unknown> | undefined;
569
594
  action?: string | undefined;
595
+ goal?: string | undefined;
596
+ target?: Record<string, unknown> | undefined;
570
597
  args?: Record<string, unknown> | undefined;
571
598
  until?: import("../index.js").Predicate | undefined;
572
599
  maxSteps?: number | undefined;
573
- goal?: string | undefined;
574
600
  } | {
575
601
  kind: "assert";
576
602
  predicate: import("../index.js").Predicate;
@@ -578,8 +604,8 @@ export declare const JourneySchema: z.ZodObject<{
578
604
  when?: import("../index.js").Predicate | undefined;
579
605
  }>, "many">;
580
606
  }, "strip", z.ZodTypeAny, {
581
- kind: "branch";
582
607
  at: string;
608
+ kind: "branch";
583
609
  cases: {
584
610
  label: string;
585
611
  steps: ({
@@ -589,12 +615,12 @@ export declare const JourneySchema: z.ZodObject<{
589
615
  to?: number | undefined;
590
616
  } | {
591
617
  kind: "act";
592
- target?: Record<string, unknown> | undefined;
593
618
  action?: string | undefined;
619
+ goal?: string | undefined;
620
+ target?: Record<string, unknown> | undefined;
594
621
  args?: Record<string, unknown> | undefined;
595
622
  until?: import("../index.js").Predicate | undefined;
596
623
  maxSteps?: number | undefined;
597
- goal?: string | undefined;
598
624
  } | {
599
625
  kind: "assert";
600
626
  predicate: import("../index.js").Predicate;
@@ -602,8 +628,8 @@ export declare const JourneySchema: z.ZodObject<{
602
628
  when?: import("../index.js").Predicate | undefined;
603
629
  }[];
604
630
  }, {
605
- kind: "branch";
606
631
  at: string;
632
+ kind: "branch";
607
633
  cases: {
608
634
  label: string;
609
635
  steps: ({
@@ -613,12 +639,12 @@ export declare const JourneySchema: z.ZodObject<{
613
639
  to?: number | undefined;
614
640
  } | {
615
641
  kind: "act";
616
- target?: Record<string, unknown> | undefined;
617
642
  action?: string | undefined;
643
+ goal?: string | undefined;
644
+ target?: Record<string, unknown> | undefined;
618
645
  args?: Record<string, unknown> | undefined;
619
646
  until?: import("../index.js").Predicate | undefined;
620
647
  maxSteps?: number | undefined;
621
- goal?: string | undefined;
622
648
  } | {
623
649
  kind: "assert";
624
650
  predicate: import("../index.js").Predicate;
@@ -626,6 +652,18 @@ export declare const JourneySchema: z.ZodObject<{
626
652
  when?: import("../index.js").Predicate | undefined;
627
653
  }[];
628
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
+ */
660
+ fallback: z.ZodOptional<z.ZodObject<{
661
+ goal: z.ZodString;
662
+ }, "strip", z.ZodTypeAny, {
663
+ goal: string;
664
+ }, {
665
+ goal: string;
666
+ }>>;
629
667
  }, "strip", z.ZodTypeAny, {
630
668
  steps: ({
631
669
  kind: "replay";
@@ -634,12 +672,12 @@ export declare const JourneySchema: z.ZodObject<{
634
672
  to?: number | undefined;
635
673
  } | {
636
674
  kind: "act";
637
- target?: Record<string, unknown> | undefined;
638
675
  action?: string | undefined;
676
+ goal?: string | undefined;
677
+ target?: Record<string, unknown> | undefined;
639
678
  args?: Record<string, unknown> | undefined;
640
679
  until?: import("../index.js").Predicate | undefined;
641
680
  maxSteps?: number | undefined;
642
- goal?: string | undefined;
643
681
  } | {
644
682
  kind: "assert";
645
683
  predicate: import("../index.js").Predicate;
@@ -651,8 +689,8 @@ export declare const JourneySchema: z.ZodObject<{
651
689
  to: number;
652
690
  };
653
691
  } | {
654
- kind: "branch";
655
692
  at: string;
693
+ kind: "branch";
656
694
  cases: {
657
695
  label: string;
658
696
  steps: ({
@@ -662,12 +700,12 @@ export declare const JourneySchema: z.ZodObject<{
662
700
  to?: number | undefined;
663
701
  } | {
664
702
  kind: "act";
665
- target?: Record<string, unknown> | undefined;
666
703
  action?: string | undefined;
704
+ goal?: string | undefined;
705
+ target?: Record<string, unknown> | undefined;
667
706
  args?: Record<string, unknown> | undefined;
668
707
  until?: import("../index.js").Predicate | undefined;
669
708
  maxSteps?: number | undefined;
670
- goal?: string | undefined;
671
709
  } | {
672
710
  kind: "assert";
673
711
  predicate: import("../index.js").Predicate;
@@ -679,6 +717,13 @@ export declare const JourneySchema: z.ZodObject<{
679
717
  title: string;
680
718
  dependsOn: string[];
681
719
  persona?: string | undefined;
720
+ when?: {
721
+ is: "passed" | "failed";
722
+ journey: string;
723
+ } | undefined;
724
+ fallback?: {
725
+ goal: string;
726
+ } | undefined;
682
727
  }, {
683
728
  steps: ({
684
729
  kind: "replay";
@@ -687,12 +732,12 @@ export declare const JourneySchema: z.ZodObject<{
687
732
  to?: number | undefined;
688
733
  } | {
689
734
  kind: "act";
690
- target?: Record<string, unknown> | undefined;
691
735
  action?: string | undefined;
736
+ goal?: string | undefined;
737
+ target?: Record<string, unknown> | undefined;
692
738
  args?: Record<string, unknown> | undefined;
693
739
  until?: import("../index.js").Predicate | undefined;
694
740
  maxSteps?: number | undefined;
695
- goal?: string | undefined;
696
741
  } | {
697
742
  kind: "assert";
698
743
  predicate: import("../index.js").Predicate;
@@ -704,8 +749,8 @@ export declare const JourneySchema: z.ZodObject<{
704
749
  to: number;
705
750
  };
706
751
  } | {
707
- kind: "branch";
708
752
  at: string;
753
+ kind: "branch";
709
754
  cases: {
710
755
  label: string;
711
756
  steps: ({
@@ -715,12 +760,12 @@ export declare const JourneySchema: z.ZodObject<{
715
760
  to?: number | undefined;
716
761
  } | {
717
762
  kind: "act";
718
- target?: Record<string, unknown> | undefined;
719
763
  action?: string | undefined;
764
+ goal?: string | undefined;
765
+ target?: Record<string, unknown> | undefined;
720
766
  args?: Record<string, unknown> | undefined;
721
767
  until?: import("../index.js").Predicate | undefined;
722
768
  maxSteps?: number | undefined;
723
- goal?: string | undefined;
724
769
  } | {
725
770
  kind: "assert";
726
771
  predicate: import("../index.js").Predicate;
@@ -731,7 +776,14 @@ export declare const JourneySchema: z.ZodObject<{
731
776
  id: string;
732
777
  title: string;
733
778
  persona?: string | undefined;
779
+ when?: {
780
+ is: "passed" | "failed";
781
+ journey: string;
782
+ } | undefined;
734
783
  dependsOn?: string[] | undefined;
784
+ fallback?: {
785
+ goal: string;
786
+ } | undefined;
735
787
  }>;
736
788
  export declare const LaneSchema: z.ZodObject<{
737
789
  id: z.ZodString;
@@ -762,6 +814,20 @@ export declare const DriveScriptSchema: z.ZodObject<{
762
814
  title: z.ZodString;
763
815
  persona: z.ZodOptional<z.ZodString>;
764
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
+ */
821
+ when: z.ZodOptional<z.ZodObject<{
822
+ 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
+ }>>;
765
831
  steps: z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
766
832
  kind: z.ZodLiteral<"replay">;
767
833
  flow: z.ZodString;
@@ -791,36 +857,36 @@ export declare const DriveScriptSchema: z.ZodObject<{
791
857
  maxSteps: z.ZodOptional<z.ZodNumber>;
792
858
  }, "strip", z.ZodTypeAny, {
793
859
  kind: "act";
794
- target?: Record<string, unknown> | undefined;
795
860
  action?: string | undefined;
861
+ goal?: string | undefined;
862
+ target?: Record<string, unknown> | undefined;
796
863
  args?: Record<string, unknown> | undefined;
797
864
  until?: import("../index.js").Predicate | undefined;
798
865
  maxSteps?: number | undefined;
799
- goal?: string | undefined;
800
866
  }, {
801
867
  kind: "act";
802
- target?: Record<string, unknown> | undefined;
803
868
  action?: string | undefined;
869
+ goal?: string | undefined;
870
+ target?: Record<string, unknown> | undefined;
804
871
  args?: Record<string, unknown> | undefined;
805
872
  until?: import("../index.js").Predicate | undefined;
806
873
  maxSteps?: number | undefined;
807
- goal?: string | undefined;
808
874
  }>, {
809
875
  kind: "act";
810
- target?: Record<string, unknown> | undefined;
811
876
  action?: string | undefined;
877
+ goal?: string | undefined;
878
+ target?: Record<string, unknown> | undefined;
812
879
  args?: Record<string, unknown> | undefined;
813
880
  until?: import("../index.js").Predicate | undefined;
814
881
  maxSteps?: number | undefined;
815
- goal?: string | undefined;
816
882
  }, {
817
883
  kind: "act";
818
- target?: Record<string, unknown> | undefined;
819
884
  action?: string | undefined;
885
+ goal?: string | undefined;
886
+ target?: Record<string, unknown> | undefined;
820
887
  args?: Record<string, unknown> | undefined;
821
888
  until?: import("../index.js").Predicate | undefined;
822
889
  maxSteps?: number | undefined;
823
- goal?: string | undefined;
824
890
  }>, z.ZodObject<{
825
891
  kind: z.ZodLiteral<"assert">;
826
892
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -895,36 +961,36 @@ export declare const DriveScriptSchema: z.ZodObject<{
895
961
  maxSteps: z.ZodOptional<z.ZodNumber>;
896
962
  }, "strip", z.ZodTypeAny, {
897
963
  kind: "act";
898
- target?: Record<string, unknown> | undefined;
899
964
  action?: string | undefined;
965
+ goal?: string | undefined;
966
+ target?: Record<string, unknown> | undefined;
900
967
  args?: Record<string, unknown> | undefined;
901
968
  until?: import("../index.js").Predicate | undefined;
902
969
  maxSteps?: number | undefined;
903
- goal?: string | undefined;
904
970
  }, {
905
971
  kind: "act";
906
- target?: Record<string, unknown> | undefined;
907
972
  action?: string | undefined;
973
+ goal?: string | undefined;
974
+ target?: Record<string, unknown> | undefined;
908
975
  args?: Record<string, unknown> | undefined;
909
976
  until?: import("../index.js").Predicate | undefined;
910
977
  maxSteps?: number | undefined;
911
- goal?: string | undefined;
912
978
  }>, {
913
979
  kind: "act";
914
- target?: Record<string, unknown> | undefined;
915
980
  action?: string | undefined;
981
+ goal?: string | undefined;
982
+ target?: Record<string, unknown> | undefined;
916
983
  args?: Record<string, unknown> | undefined;
917
984
  until?: import("../index.js").Predicate | undefined;
918
985
  maxSteps?: number | undefined;
919
- goal?: string | undefined;
920
986
  }, {
921
987
  kind: "act";
922
- target?: Record<string, unknown> | undefined;
923
988
  action?: string | undefined;
989
+ goal?: string | undefined;
990
+ target?: Record<string, unknown> | undefined;
924
991
  args?: Record<string, unknown> | undefined;
925
992
  until?: import("../index.js").Predicate | undefined;
926
993
  maxSteps?: number | undefined;
927
- goal?: string | undefined;
928
994
  }>, z.ZodObject<{
929
995
  kind: z.ZodLiteral<"assert">;
930
996
  predicate: z.ZodType<import("../index.js").Predicate, z.ZodTypeDef, import("../index.js").Predicate>;
@@ -944,12 +1010,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
944
1010
  to?: number | undefined;
945
1011
  } | {
946
1012
  kind: "act";
947
- target?: Record<string, unknown> | undefined;
948
1013
  action?: string | undefined;
1014
+ goal?: string | undefined;
1015
+ target?: Record<string, unknown> | undefined;
949
1016
  args?: Record<string, unknown> | undefined;
950
1017
  until?: import("../index.js").Predicate | undefined;
951
1018
  maxSteps?: number | undefined;
952
- goal?: string | undefined;
953
1019
  } | {
954
1020
  kind: "assert";
955
1021
  predicate: import("../index.js").Predicate;
@@ -964,12 +1030,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
964
1030
  to?: number | undefined;
965
1031
  } | {
966
1032
  kind: "act";
967
- target?: Record<string, unknown> | undefined;
968
1033
  action?: string | undefined;
1034
+ goal?: string | undefined;
1035
+ target?: Record<string, unknown> | undefined;
969
1036
  args?: Record<string, unknown> | undefined;
970
1037
  until?: import("../index.js").Predicate | undefined;
971
1038
  maxSteps?: number | undefined;
972
- goal?: string | undefined;
973
1039
  } | {
974
1040
  kind: "assert";
975
1041
  predicate: import("../index.js").Predicate;
@@ -977,8 +1043,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
977
1043
  when?: import("../index.js").Predicate | undefined;
978
1044
  }>, "many">;
979
1045
  }, "strip", z.ZodTypeAny, {
980
- kind: "branch";
981
1046
  at: string;
1047
+ kind: "branch";
982
1048
  cases: {
983
1049
  label: string;
984
1050
  steps: ({
@@ -988,12 +1054,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
988
1054
  to?: number | undefined;
989
1055
  } | {
990
1056
  kind: "act";
991
- target?: Record<string, unknown> | undefined;
992
1057
  action?: string | undefined;
1058
+ goal?: string | undefined;
1059
+ target?: Record<string, unknown> | undefined;
993
1060
  args?: Record<string, unknown> | undefined;
994
1061
  until?: import("../index.js").Predicate | undefined;
995
1062
  maxSteps?: number | undefined;
996
- goal?: string | undefined;
997
1063
  } | {
998
1064
  kind: "assert";
999
1065
  predicate: import("../index.js").Predicate;
@@ -1001,8 +1067,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
1001
1067
  when?: import("../index.js").Predicate | undefined;
1002
1068
  }[];
1003
1069
  }, {
1004
- kind: "branch";
1005
1070
  at: string;
1071
+ kind: "branch";
1006
1072
  cases: {
1007
1073
  label: string;
1008
1074
  steps: ({
@@ -1012,12 +1078,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1012
1078
  to?: number | undefined;
1013
1079
  } | {
1014
1080
  kind: "act";
1015
- target?: Record<string, unknown> | undefined;
1016
1081
  action?: string | undefined;
1082
+ goal?: string | undefined;
1083
+ target?: Record<string, unknown> | undefined;
1017
1084
  args?: Record<string, unknown> | undefined;
1018
1085
  until?: import("../index.js").Predicate | undefined;
1019
1086
  maxSteps?: number | undefined;
1020
- goal?: string | undefined;
1021
1087
  } | {
1022
1088
  kind: "assert";
1023
1089
  predicate: import("../index.js").Predicate;
@@ -1025,6 +1091,18 @@ export declare const DriveScriptSchema: z.ZodObject<{
1025
1091
  when?: import("../index.js").Predicate | undefined;
1026
1092
  }[];
1027
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
+ */
1099
+ fallback: z.ZodOptional<z.ZodObject<{
1100
+ goal: z.ZodString;
1101
+ }, "strip", z.ZodTypeAny, {
1102
+ goal: string;
1103
+ }, {
1104
+ goal: string;
1105
+ }>>;
1028
1106
  }, "strip", z.ZodTypeAny, {
1029
1107
  steps: ({
1030
1108
  kind: "replay";
@@ -1033,12 +1111,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1033
1111
  to?: number | undefined;
1034
1112
  } | {
1035
1113
  kind: "act";
1036
- target?: Record<string, unknown> | undefined;
1037
1114
  action?: string | undefined;
1115
+ goal?: string | undefined;
1116
+ target?: Record<string, unknown> | undefined;
1038
1117
  args?: Record<string, unknown> | undefined;
1039
1118
  until?: import("../index.js").Predicate | undefined;
1040
1119
  maxSteps?: number | undefined;
1041
- goal?: string | undefined;
1042
1120
  } | {
1043
1121
  kind: "assert";
1044
1122
  predicate: import("../index.js").Predicate;
@@ -1050,8 +1128,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
1050
1128
  to: number;
1051
1129
  };
1052
1130
  } | {
1053
- kind: "branch";
1054
1131
  at: string;
1132
+ kind: "branch";
1055
1133
  cases: {
1056
1134
  label: string;
1057
1135
  steps: ({
@@ -1061,12 +1139,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1061
1139
  to?: number | undefined;
1062
1140
  } | {
1063
1141
  kind: "act";
1064
- target?: Record<string, unknown> | undefined;
1065
1142
  action?: string | undefined;
1143
+ goal?: string | undefined;
1144
+ target?: Record<string, unknown> | undefined;
1066
1145
  args?: Record<string, unknown> | undefined;
1067
1146
  until?: import("../index.js").Predicate | undefined;
1068
1147
  maxSteps?: number | undefined;
1069
- goal?: string | undefined;
1070
1148
  } | {
1071
1149
  kind: "assert";
1072
1150
  predicate: import("../index.js").Predicate;
@@ -1078,6 +1156,13 @@ export declare const DriveScriptSchema: z.ZodObject<{
1078
1156
  title: string;
1079
1157
  dependsOn: string[];
1080
1158
  persona?: string | undefined;
1159
+ when?: {
1160
+ is: "passed" | "failed";
1161
+ journey: string;
1162
+ } | undefined;
1163
+ fallback?: {
1164
+ goal: string;
1165
+ } | undefined;
1081
1166
  }, {
1082
1167
  steps: ({
1083
1168
  kind: "replay";
@@ -1086,12 +1171,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1086
1171
  to?: number | undefined;
1087
1172
  } | {
1088
1173
  kind: "act";
1089
- target?: Record<string, unknown> | undefined;
1090
1174
  action?: string | undefined;
1175
+ goal?: string | undefined;
1176
+ target?: Record<string, unknown> | undefined;
1091
1177
  args?: Record<string, unknown> | undefined;
1092
1178
  until?: import("../index.js").Predicate | undefined;
1093
1179
  maxSteps?: number | undefined;
1094
- goal?: string | undefined;
1095
1180
  } | {
1096
1181
  kind: "assert";
1097
1182
  predicate: import("../index.js").Predicate;
@@ -1103,8 +1188,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
1103
1188
  to: number;
1104
1189
  };
1105
1190
  } | {
1106
- kind: "branch";
1107
1191
  at: string;
1192
+ kind: "branch";
1108
1193
  cases: {
1109
1194
  label: string;
1110
1195
  steps: ({
@@ -1114,12 +1199,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1114
1199
  to?: number | undefined;
1115
1200
  } | {
1116
1201
  kind: "act";
1117
- target?: Record<string, unknown> | undefined;
1118
1202
  action?: string | undefined;
1203
+ goal?: string | undefined;
1204
+ target?: Record<string, unknown> | undefined;
1119
1205
  args?: Record<string, unknown> | undefined;
1120
1206
  until?: import("../index.js").Predicate | undefined;
1121
1207
  maxSteps?: number | undefined;
1122
- goal?: string | undefined;
1123
1208
  } | {
1124
1209
  kind: "assert";
1125
1210
  predicate: import("../index.js").Predicate;
@@ -1130,7 +1215,14 @@ export declare const DriveScriptSchema: z.ZodObject<{
1130
1215
  id: string;
1131
1216
  title: string;
1132
1217
  persona?: string | undefined;
1218
+ when?: {
1219
+ is: "passed" | "failed";
1220
+ journey: string;
1221
+ } | undefined;
1133
1222
  dependsOn?: string[] | undefined;
1223
+ fallback?: {
1224
+ goal: string;
1225
+ } | undefined;
1134
1226
  }>, "many">;
1135
1227
  lanes: z.ZodArray<z.ZodObject<{
1136
1228
  id: z.ZodString;
@@ -1156,12 +1248,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1156
1248
  to?: number | undefined;
1157
1249
  } | {
1158
1250
  kind: "act";
1159
- target?: Record<string, unknown> | undefined;
1160
1251
  action?: string | undefined;
1252
+ goal?: string | undefined;
1253
+ target?: Record<string, unknown> | undefined;
1161
1254
  args?: Record<string, unknown> | undefined;
1162
1255
  until?: import("../index.js").Predicate | undefined;
1163
1256
  maxSteps?: number | undefined;
1164
- goal?: string | undefined;
1165
1257
  } | {
1166
1258
  kind: "assert";
1167
1259
  predicate: import("../index.js").Predicate;
@@ -1173,8 +1265,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
1173
1265
  to: number;
1174
1266
  };
1175
1267
  } | {
1176
- kind: "branch";
1177
1268
  at: string;
1269
+ kind: "branch";
1178
1270
  cases: {
1179
1271
  label: string;
1180
1272
  steps: ({
@@ -1184,12 +1276,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1184
1276
  to?: number | undefined;
1185
1277
  } | {
1186
1278
  kind: "act";
1187
- target?: Record<string, unknown> | undefined;
1188
1279
  action?: string | undefined;
1280
+ goal?: string | undefined;
1281
+ target?: Record<string, unknown> | undefined;
1189
1282
  args?: Record<string, unknown> | undefined;
1190
1283
  until?: import("../index.js").Predicate | undefined;
1191
1284
  maxSteps?: number | undefined;
1192
- goal?: string | undefined;
1193
1285
  } | {
1194
1286
  kind: "assert";
1195
1287
  predicate: import("../index.js").Predicate;
@@ -1201,6 +1293,13 @@ export declare const DriveScriptSchema: z.ZodObject<{
1201
1293
  title: string;
1202
1294
  dependsOn: string[];
1203
1295
  persona?: string | undefined;
1296
+ when?: {
1297
+ is: "passed" | "failed";
1298
+ journey: string;
1299
+ } | undefined;
1300
+ fallback?: {
1301
+ goal: string;
1302
+ } | undefined;
1204
1303
  }[];
1205
1304
  personas: {
1206
1305
  name: string;
@@ -1222,12 +1321,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1222
1321
  to?: number | undefined;
1223
1322
  } | {
1224
1323
  kind: "act";
1225
- target?: Record<string, unknown> | undefined;
1226
1324
  action?: string | undefined;
1325
+ goal?: string | undefined;
1326
+ target?: Record<string, unknown> | undefined;
1227
1327
  args?: Record<string, unknown> | undefined;
1228
1328
  until?: import("../index.js").Predicate | undefined;
1229
1329
  maxSteps?: number | undefined;
1230
- goal?: string | undefined;
1231
1330
  } | {
1232
1331
  kind: "assert";
1233
1332
  predicate: import("../index.js").Predicate;
@@ -1239,8 +1338,8 @@ export declare const DriveScriptSchema: z.ZodObject<{
1239
1338
  to: number;
1240
1339
  };
1241
1340
  } | {
1242
- kind: "branch";
1243
1341
  at: string;
1342
+ kind: "branch";
1244
1343
  cases: {
1245
1344
  label: string;
1246
1345
  steps: ({
@@ -1250,12 +1349,12 @@ export declare const DriveScriptSchema: z.ZodObject<{
1250
1349
  to?: number | undefined;
1251
1350
  } | {
1252
1351
  kind: "act";
1253
- target?: Record<string, unknown> | undefined;
1254
1352
  action?: string | undefined;
1353
+ goal?: string | undefined;
1354
+ target?: Record<string, unknown> | undefined;
1255
1355
  args?: Record<string, unknown> | undefined;
1256
1356
  until?: import("../index.js").Predicate | undefined;
1257
1357
  maxSteps?: number | undefined;
1258
- goal?: string | undefined;
1259
1358
  } | {
1260
1359
  kind: "assert";
1261
1360
  predicate: import("../index.js").Predicate;
@@ -1266,7 +1365,14 @@ export declare const DriveScriptSchema: z.ZodObject<{
1266
1365
  id: string;
1267
1366
  title: string;
1268
1367
  persona?: string | undefined;
1368
+ when?: {
1369
+ is: "passed" | "failed";
1370
+ journey: string;
1371
+ } | undefined;
1269
1372
  dependsOn?: string[] | undefined;
1373
+ fallback?: {
1374
+ goal: string;
1375
+ } | undefined;
1270
1376
  }[];
1271
1377
  lanes: {
1272
1378
  id: string;