@reticlehq/core 3.7.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 (138) hide show
  1. package/dist/activation-entry.d.ts +9 -0
  2. package/dist/activation-entry.js +9 -0
  3. package/dist/artifacts/drive-script.d.ts +84 -1217
  4. package/dist/artifacts/drive-script.js +1 -1
  5. package/dist/artifacts/flow-constants.d.ts +15 -0
  6. package/dist/artifacts/flow-constants.js +15 -0
  7. package/dist/artifacts/flow-expect-flat.d.ts +8 -192
  8. package/dist/artifacts/flow-expect-flat.js +2 -2
  9. package/dist/artifacts/flow-results.d.ts +26 -0
  10. package/dist/artifacts/flow-types.d.ts +212 -2295
  11. package/dist/artifacts/flow-types.js +14 -2
  12. package/dist/artifacts/harness-credits.d.ts +6 -3
  13. package/dist/artifacts/harness-credits.js +9 -6
  14. package/dist/artifacts/harness-map.d.ts +8 -69
  15. package/dist/artifacts/harness-map.js +1 -1
  16. package/dist/artifacts/hud-notices.d.ts +8 -82
  17. package/dist/artifacts/hud-notices.js +1 -1
  18. package/dist/artifacts/impact.d.ts +104 -1665
  19. package/dist/artifacts/impact.js +38 -21
  20. package/dist/artifacts/journal.d.ts +15 -231
  21. package/dist/artifacts/journal.js +15 -2
  22. package/dist/artifacts/prompt-context.d.ts +7 -33
  23. package/dist/artifacts/prompt-context.js +15 -4
  24. package/dist/artifacts/screenshot-upload.d.ts +3 -26
  25. package/dist/artifacts/screenshot-upload.js +1 -1
  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 +15 -171
  29. package/dist/hooks/hook-events.js +1 -1
  30. package/dist/hud-entry.js +1 -1
  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 +10 -0
  36. package/dist/index.js +10 -0
  37. package/dist/onboarding.d.ts +23 -52
  38. package/dist/onboarding.js +20 -1
  39. package/dist/registry/daemon-registry.d.ts +2 -14
  40. package/dist/registry/daemon-registry.js +1 -1
  41. package/dist/registry/dev-server-registry.d.ts +2 -31
  42. package/dist/registry/dev-server-registry.js +1 -1
  43. package/dist/registry/project-registry.d.ts +4 -32
  44. package/dist/registry/project-registry.js +1 -1
  45. package/dist/schema/command-message.json +65 -68
  46. package/dist/schema/command-name.json +29 -33
  47. package/dist/schema/command-result.json +25 -30
  48. package/dist/schema/event-message.json +104 -101
  49. package/dist/schema/event-payloads.json +246 -108
  50. package/dist/schema/event-type.json +47 -48
  51. package/dist/schema/hello-message.json +150 -133
  52. package/dist/schema/reticle-event.json +98 -94
  53. package/dist/schema/reticle-message.json +338 -310
  54. package/dist/telemetry-bug.d.ts +4 -75
  55. package/dist/telemetry-bug.js +1 -1
  56. package/dist/telemetry-entry.d.ts +1 -1
  57. package/dist/telemetry-entry.js +1 -1
  58. package/dist/telemetry-feedback.d.ts +17 -91
  59. package/dist/telemetry-feedback.js +20 -1
  60. package/dist/telemetry-refusal.d.ts +4 -31
  61. package/dist/telemetry-refusal.js +1 -1
  62. package/dist/telemetry-session.d.ts +45 -624
  63. package/dist/telemetry-session.js +25 -12
  64. package/dist/telemetry-signals.d.ts +211 -86
  65. package/dist/telemetry-signals.js +100 -2
  66. package/dist/telemetry.d.ts +321 -1691
  67. package/dist/telemetry.js +72 -6
  68. package/dist/verdict/check-sentence.d.ts +34 -0
  69. package/dist/verdict/check-sentence.js +228 -0
  70. package/dist/verdict/compare-source.d.ts +1 -1
  71. package/dist/verdict/compare-source.js +1 -1
  72. package/dist/verdict/consequence.d.ts +15 -0
  73. package/dist/verdict/consequence.js +11 -0
  74. package/dist/verdict/disparity.d.ts +8 -56
  75. package/dist/verdict/disparity.js +1 -1
  76. package/dist/verdict/findings.d.ts +10 -0
  77. package/dist/verdict/findings.js +13 -0
  78. package/dist/verdict/instrumentation-coverage.d.ts +6 -37
  79. package/dist/verdict/instrumentation-coverage.js +15 -59
  80. package/dist/verdict/instrumentation-gap.d.ts +72 -0
  81. package/dist/verdict/instrumentation-gap.js +64 -0
  82. package/dist/verdict/intent.d.ts +25 -224
  83. package/dist/verdict/intent.js +1 -1
  84. package/dist/verdict/predicate-tree.d.ts +2 -0
  85. package/dist/verdict/predicate-tree.js +16 -0
  86. package/dist/verdict/predicate.d.ts +3 -2
  87. package/dist/verdict/predicate.js +107 -16
  88. package/dist/verdict/property-assertion.d.ts +23 -101
  89. package/dist/verdict/property-assertion.js +1 -1
  90. package/dist/verdict/run-report.d.ts +71 -0
  91. package/dist/verdict/run-report.js +53 -0
  92. package/dist/verdict/security.d.ts +48 -2
  93. package/dist/verdict/security.js +185 -18
  94. package/dist/verdict/verification-run.d.ts +124 -1623
  95. package/dist/verdict/verification-run.js +37 -6
  96. package/dist/verdict/verify-progress.d.ts +22 -64
  97. package/dist/verdict/verify-progress.js +1 -1
  98. package/dist/wire/constants/constants.d.ts +56 -141
  99. package/dist/wire/constants/constants.js +64 -144
  100. package/dist/wire/constants/discovery.d.ts +4 -4
  101. package/dist/wire/constants/discovery.js +4 -4
  102. package/dist/wire/constants/event-types.d.ts +37 -1
  103. package/dist/wire/constants/event-types.js +35 -1
  104. package/dist/wire/constants/hud-controls.js +0 -2
  105. package/dist/wire/constants/hud-use.d.ts +4 -0
  106. package/dist/wire/constants/hud-use.js +4 -0
  107. package/dist/wire/constants/mcp-wire.d.ts +16 -0
  108. package/dist/wire/constants/mcp-wire.js +16 -0
  109. package/dist/wire/constants/response-body-reason.d.ts +19 -0
  110. package/dist/wire/constants/response-body-reason.js +18 -0
  111. package/dist/wire/constants/reticle-env.d.ts +140 -0
  112. package/dist/wire/constants/reticle-env.js +140 -0
  113. package/dist/wire/constants/session-constants.d.ts +11 -0
  114. package/dist/wire/constants/session-constants.js +11 -0
  115. package/dist/wire/event-payloads.d.ts +173 -629
  116. package/dist/wire/event-payloads.js +107 -23
  117. package/dist/wire/event-priority.js +1 -0
  118. package/dist/wire/messages.d.ts +90 -713
  119. package/dist/wire/messages.js +19 -3
  120. package/dist/wire/narrow.d.ts +6 -0
  121. package/dist/wire/narrow.js +26 -0
  122. package/dist/wire/next-step.d.ts +50 -0
  123. package/dist/wire/next-step.js +37 -0
  124. package/dist/wire/platform-link.d.ts +7 -0
  125. package/dist/wire/platform-link.js +14 -8
  126. package/dist/wire/production/activation-ticket.d.ts +64 -0
  127. package/dist/wire/production/activation-ticket.js +148 -0
  128. package/dist/wire/production/hello-mode.d.ts +35 -0
  129. package/dist/wire/production/hello-mode.js +32 -0
  130. package/dist/wire/production/production-policy.d.ts +92 -0
  131. package/dist/wire/production/production-policy.js +133 -0
  132. package/dist/wire/tool-names.d.ts +2 -0
  133. package/dist/wire/tool-names.js +2 -0
  134. package/dist/wire/types.d.ts +102 -700
  135. package/dist/wire/types.js +5 -5
  136. package/dist/words/upgrade.d.ts +3 -13
  137. package/dist/words/upgrade.js +1 -1
  138. package/package.json +7 -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
- goal?: string | undefined;
71
- target?: Record<string, unknown> | undefined;
72
- action?: string | undefined;
73
- args?: Record<string, unknown> | undefined;
74
- until?: import("../index.js").Predicate | undefined;
75
- maxSteps?: number | undefined;
76
- }, {
77
- kind: "act";
78
- goal?: string | undefined;
79
- target?: Record<string, unknown> | undefined;
80
- action?: string | undefined;
81
- args?: Record<string, unknown> | undefined;
82
- until?: import("../index.js").Predicate | undefined;
83
- maxSteps?: number | undefined;
84
- }>, {
85
- kind: "act";
86
- goal?: string | undefined;
87
- target?: Record<string, unknown> | undefined;
88
- action?: string | undefined;
89
- args?: Record<string, unknown> | undefined;
90
- until?: import("../index.js").Predicate | undefined;
91
- maxSteps?: number | undefined;
92
- }, {
93
- kind: "act";
94
- goal?: string | undefined;
95
- target?: Record<string, unknown> | undefined;
96
- action?: string | 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
- goal?: string | undefined;
140
- target?: Record<string, unknown> | undefined;
141
- action?: string | undefined;
142
- args?: Record<string, unknown> | undefined;
143
- until?: import("../index.js").Predicate | undefined;
144
- maxSteps?: number | undefined;
145
- }, {
146
- kind: "act";
147
- goal?: string | undefined;
148
- target?: Record<string, unknown> | undefined;
149
- action?: string | undefined;
150
- args?: Record<string, unknown> | undefined;
151
- until?: import("../index.js").Predicate | undefined;
152
- maxSteps?: number | undefined;
153
- }>, {
154
- kind: "act";
155
- goal?: string | undefined;
156
- target?: Record<string, unknown> | undefined;
157
- action?: string | undefined;
158
- args?: Record<string, unknown> | undefined;
159
- until?: import("../index.js").Predicate | undefined;
160
- maxSteps?: number | undefined;
161
- }, {
162
- kind: "act";
163
- goal?: string | undefined;
164
- target?: Record<string, unknown> | undefined;
165
- action?: string | 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
- goal?: string | undefined;
244
- target?: Record<string, unknown> | undefined;
245
- action?: string | undefined;
246
- args?: Record<string, unknown> | undefined;
247
- until?: import("../index.js").Predicate | undefined;
248
- maxSteps?: number | undefined;
249
- }, {
250
- kind: "act";
251
- goal?: string | undefined;
252
- target?: Record<string, unknown> | undefined;
253
- action?: string | undefined;
254
- args?: Record<string, unknown> | undefined;
255
- until?: import("../index.js").Predicate | undefined;
256
- maxSteps?: number | undefined;
257
- }>, {
258
- kind: "act";
259
- goal?: string | undefined;
260
- target?: Record<string, unknown> | undefined;
261
- action?: string | undefined;
262
- args?: Record<string, unknown> | undefined;
263
- until?: import("../index.js").Predicate | undefined;
264
- maxSteps?: number | undefined;
265
- }, {
266
- kind: "act";
267
- goal?: string | undefined;
268
- target?: Record<string, unknown> | undefined;
269
- action?: string | 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
- goal?: string | undefined;
293
- target?: Record<string, unknown> | undefined;
294
- action?: string | 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
- goal?: string | undefined;
313
- target?: Record<string, unknown> | undefined;
314
- action?: string | 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
- kind: "branch";
326
- at: string;
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
- goal?: string | undefined;
337
- target?: Record<string, unknown> | undefined;
338
- action?: string | 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
- kind: "branch";
350
- at: string;
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
- goal?: string | undefined;
361
- target?: Record<string, unknown> | undefined;
362
- action?: string | 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
- goal?: string | undefined;
422
- target?: Record<string, unknown> | undefined;
423
- action?: string | undefined;
424
- args?: Record<string, unknown> | undefined;
425
- until?: import("../index.js").Predicate | undefined;
426
- maxSteps?: number | undefined;
427
- }, {
428
- kind: "act";
429
- goal?: string | undefined;
430
- target?: Record<string, unknown> | undefined;
431
- action?: string | undefined;
432
- args?: Record<string, unknown> | undefined;
433
- until?: import("../index.js").Predicate | undefined;
434
- maxSteps?: number | undefined;
435
- }>, {
436
- kind: "act";
437
- goal?: string | undefined;
438
- target?: Record<string, unknown> | undefined;
439
- action?: string | undefined;
440
- args?: Record<string, unknown> | undefined;
441
- until?: import("../index.js").Predicate | undefined;
442
- maxSteps?: number | undefined;
443
- }, {
444
- kind: "act";
445
- goal?: string | undefined;
446
- target?: Record<string, unknown> | undefined;
447
- action?: string | 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
- goal?: string | undefined;
526
- target?: Record<string, unknown> | undefined;
527
- action?: string | undefined;
528
- args?: Record<string, unknown> | undefined;
529
- until?: import("../index.js").Predicate | undefined;
530
- maxSteps?: number | undefined;
531
- }, {
532
- kind: "act";
533
- goal?: string | undefined;
534
- target?: Record<string, unknown> | undefined;
535
- action?: string | undefined;
536
- args?: Record<string, unknown> | undefined;
537
- until?: import("../index.js").Predicate | undefined;
538
- maxSteps?: number | undefined;
539
- }>, {
540
- kind: "act";
541
- goal?: string | undefined;
542
- target?: Record<string, unknown> | undefined;
543
- action?: string | undefined;
544
- args?: Record<string, unknown> | undefined;
545
- until?: import("../index.js").Predicate | undefined;
546
- maxSteps?: number | undefined;
547
- }, {
548
- kind: "act";
549
- goal?: string | undefined;
550
- target?: Record<string, unknown> | undefined;
551
- action?: string | 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
- goal?: string | undefined;
575
- target?: Record<string, unknown> | undefined;
576
- action?: string | 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
- goal?: string | undefined;
595
- target?: Record<string, unknown> | undefined;
596
- action?: string | 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
- kind: "branch";
608
- at: string;
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
- goal?: string | undefined;
619
- target?: Record<string, unknown> | undefined;
620
- action?: string | 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
- kind: "branch";
632
- at: string;
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
- goal?: string | undefined;
643
- target?: Record<string, unknown> | undefined;
644
- action?: string | 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
- goal?: string | undefined;
676
- target?: Record<string, unknown> | undefined;
677
- action?: string | 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
- kind: "branch";
693
- at: string;
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
- goal?: string | undefined;
704
- target?: Record<string, unknown> | undefined;
705
- action?: string | 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
- goal?: string | undefined;
736
- target?: Record<string, unknown> | undefined;
737
- action?: string | 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
- kind: "branch";
753
- at: string;
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
- goal?: string | undefined;
764
- target?: Record<string, unknown> | undefined;
765
- action?: string | 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
- goal?: string | undefined;
861
- target?: Record<string, unknown> | undefined;
862
- action?: string | undefined;
863
- args?: Record<string, unknown> | undefined;
864
- until?: import("../index.js").Predicate | undefined;
865
- maxSteps?: number | undefined;
866
- }, {
867
- kind: "act";
868
- goal?: string | undefined;
869
- target?: Record<string, unknown> | undefined;
870
- action?: string | undefined;
871
- args?: Record<string, unknown> | undefined;
872
- until?: import("../index.js").Predicate | undefined;
873
- maxSteps?: number | undefined;
874
- }>, {
875
- kind: "act";
876
- goal?: string | undefined;
877
- target?: Record<string, unknown> | undefined;
878
- action?: string | undefined;
879
- args?: Record<string, unknown> | undefined;
880
- until?: import("../index.js").Predicate | undefined;
881
- maxSteps?: number | undefined;
882
- }, {
883
- kind: "act";
884
- goal?: string | undefined;
885
- target?: Record<string, unknown> | undefined;
886
- action?: string | 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
- goal?: string | undefined;
965
- target?: Record<string, unknown> | undefined;
966
- action?: string | undefined;
967
- args?: Record<string, unknown> | undefined;
968
- until?: import("../index.js").Predicate | undefined;
969
- maxSteps?: number | undefined;
970
- }, {
971
- kind: "act";
972
- goal?: string | undefined;
973
- target?: Record<string, unknown> | undefined;
974
- action?: string | undefined;
975
- args?: Record<string, unknown> | undefined;
976
- until?: import("../index.js").Predicate | undefined;
977
- maxSteps?: number | undefined;
978
- }>, {
979
- kind: "act";
980
- goal?: string | undefined;
981
- target?: Record<string, unknown> | undefined;
982
- action?: string | undefined;
983
- args?: Record<string, unknown> | undefined;
984
- until?: import("../index.js").Predicate | undefined;
985
- maxSteps?: number | undefined;
986
- }, {
987
- kind: "act";
988
- goal?: string | undefined;
989
- target?: Record<string, unknown> | undefined;
990
- action?: string | 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
- goal?: string | undefined;
1014
- target?: Record<string, unknown> | undefined;
1015
- action?: string | 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
- goal?: string | undefined;
1034
- target?: Record<string, unknown> | undefined;
1035
- action?: string | 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
- kind: "branch";
1047
- at: string;
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
- goal?: string | undefined;
1058
- target?: Record<string, unknown> | undefined;
1059
- action?: string | 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
- kind: "branch";
1071
- at: string;
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
- goal?: string | undefined;
1082
- target?: Record<string, unknown> | undefined;
1083
- action?: string | 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
- goal?: string | undefined;
1115
- target?: Record<string, unknown> | undefined;
1116
- action?: string | 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
- kind: "branch";
1132
- at: string;
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
- goal?: string | undefined;
1143
- target?: Record<string, unknown> | undefined;
1144
- action?: string | 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
- goal?: string | undefined;
1175
- target?: Record<string, unknown> | undefined;
1176
- action?: string | 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
- kind: "branch";
1192
- at: string;
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
- goal?: string | undefined;
1203
- target?: Record<string, unknown> | undefined;
1204
- action?: string | 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
- goal?: string | undefined;
1252
- target?: Record<string, unknown> | undefined;
1253
- action?: string | 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
- kind: "branch";
1269
- at: string;
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
- goal?: string | undefined;
1280
- target?: Record<string, unknown> | undefined;
1281
- action?: string | 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
- goal?: string | undefined;
1325
- target?: Record<string, unknown> | undefined;
1326
- action?: string | 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
- kind: "branch";
1342
- at: string;
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
- goal?: string | undefined;
1353
- target?: Record<string, unknown> | undefined;
1354
- action?: string | 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>;