@junejuly-lockstep/model 0.0.0-stage → 0.1.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.
@@ -0,0 +1,705 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Journey model: an XState v5 compatible machine JSON plus Lockstep metadata.
4
+ * The client repo is the source of truth; the platform mirrors it.
5
+ */
6
+ export declare const JourneyKey: z.ZodString;
7
+ export type JourneyKey = z.infer<typeof JourneyKey>;
8
+ export declare const StateKey: z.ZodString;
9
+ export type StateKey = z.infer<typeof StateKey>;
10
+ /** A single transition target in XState JSON form. */
11
+ export declare const TransitionConfig: z.ZodObject<{
12
+ target: z.ZodString;
13
+ guard: z.ZodOptional<z.ZodString>;
14
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
15
+ description: z.ZodOptional<z.ZodString>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ target: string;
18
+ guard?: string | undefined;
19
+ actions?: string[] | undefined;
20
+ description?: string | undefined;
21
+ }, {
22
+ target: string;
23
+ guard?: string | undefined;
24
+ actions?: string[] | undefined;
25
+ description?: string | undefined;
26
+ }>;
27
+ export type TransitionConfig = z.infer<typeof TransitionConfig>;
28
+ /** XState allows `on: { EVENT: 'target' | { target } | [{ target, guard }] }`. */
29
+ export declare const TransitionValue: z.ZodUnion<[z.ZodString, z.ZodObject<{
30
+ target: z.ZodString;
31
+ guard: z.ZodOptional<z.ZodString>;
32
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ }, "strip", z.ZodTypeAny, {
35
+ target: string;
36
+ guard?: string | undefined;
37
+ actions?: string[] | undefined;
38
+ description?: string | undefined;
39
+ }, {
40
+ target: string;
41
+ guard?: string | undefined;
42
+ actions?: string[] | undefined;
43
+ description?: string | undefined;
44
+ }>, z.ZodArray<z.ZodObject<{
45
+ target: z.ZodString;
46
+ guard: z.ZodOptional<z.ZodString>;
47
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ description: z.ZodOptional<z.ZodString>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ target: string;
51
+ guard?: string | undefined;
52
+ actions?: string[] | undefined;
53
+ description?: string | undefined;
54
+ }, {
55
+ target: string;
56
+ guard?: string | undefined;
57
+ actions?: string[] | undefined;
58
+ description?: string | undefined;
59
+ }>, "many">]>;
60
+ export type TransitionValue = z.infer<typeof TransitionValue>;
61
+ export declare const MachineStateConfig: z.ZodObject<{
62
+ on: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
63
+ target: z.ZodString;
64
+ guard: z.ZodOptional<z.ZodString>;
65
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
66
+ description: z.ZodOptional<z.ZodString>;
67
+ }, "strip", z.ZodTypeAny, {
68
+ target: string;
69
+ guard?: string | undefined;
70
+ actions?: string[] | undefined;
71
+ description?: string | undefined;
72
+ }, {
73
+ target: string;
74
+ guard?: string | undefined;
75
+ actions?: string[] | undefined;
76
+ description?: string | undefined;
77
+ }>, z.ZodArray<z.ZodObject<{
78
+ target: z.ZodString;
79
+ guard: z.ZodOptional<z.ZodString>;
80
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
81
+ description: z.ZodOptional<z.ZodString>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ target: string;
84
+ guard?: string | undefined;
85
+ actions?: string[] | undefined;
86
+ description?: string | undefined;
87
+ }, {
88
+ target: string;
89
+ guard?: string | undefined;
90
+ actions?: string[] | undefined;
91
+ description?: string | undefined;
92
+ }>, "many">]>>>;
93
+ type: z.ZodOptional<z.ZodEnum<["atomic", "final", "compound", "parallel", "history"]>>;
94
+ description: z.ZodOptional<z.ZodString>;
95
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
96
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
99
+ description?: string | undefined;
100
+ on?: Record<string, string | {
101
+ target: string;
102
+ guard?: string | undefined;
103
+ actions?: string[] | undefined;
104
+ description?: string | undefined;
105
+ } | {
106
+ target: string;
107
+ guard?: string | undefined;
108
+ actions?: string[] | undefined;
109
+ description?: string | undefined;
110
+ }[]> | undefined;
111
+ tags?: string[] | undefined;
112
+ meta?: Record<string, unknown> | undefined;
113
+ }, {
114
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
115
+ description?: string | undefined;
116
+ on?: Record<string, string | {
117
+ target: string;
118
+ guard?: string | undefined;
119
+ actions?: string[] | undefined;
120
+ description?: string | undefined;
121
+ } | {
122
+ target: string;
123
+ guard?: string | undefined;
124
+ actions?: string[] | undefined;
125
+ description?: string | undefined;
126
+ }[]> | undefined;
127
+ tags?: string[] | undefined;
128
+ meta?: Record<string, unknown> | undefined;
129
+ }>;
130
+ export type MachineStateConfig = z.infer<typeof MachineStateConfig>;
131
+ /** The subset of XState v5 machine config Lockstep understands. Flat states only in v1. */
132
+ export declare const MachineJson: z.ZodObject<{
133
+ id: z.ZodString;
134
+ initial: z.ZodString;
135
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
136
+ states: z.ZodRecord<z.ZodString, z.ZodObject<{
137
+ on: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
138
+ target: z.ZodString;
139
+ guard: z.ZodOptional<z.ZodString>;
140
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
141
+ description: z.ZodOptional<z.ZodString>;
142
+ }, "strip", z.ZodTypeAny, {
143
+ target: string;
144
+ guard?: string | undefined;
145
+ actions?: string[] | undefined;
146
+ description?: string | undefined;
147
+ }, {
148
+ target: string;
149
+ guard?: string | undefined;
150
+ actions?: string[] | undefined;
151
+ description?: string | undefined;
152
+ }>, z.ZodArray<z.ZodObject<{
153
+ target: z.ZodString;
154
+ guard: z.ZodOptional<z.ZodString>;
155
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
156
+ description: z.ZodOptional<z.ZodString>;
157
+ }, "strip", z.ZodTypeAny, {
158
+ target: string;
159
+ guard?: string | undefined;
160
+ actions?: string[] | undefined;
161
+ description?: string | undefined;
162
+ }, {
163
+ target: string;
164
+ guard?: string | undefined;
165
+ actions?: string[] | undefined;
166
+ description?: string | undefined;
167
+ }>, "many">]>>>;
168
+ type: z.ZodOptional<z.ZodEnum<["atomic", "final", "compound", "parallel", "history"]>>;
169
+ description: z.ZodOptional<z.ZodString>;
170
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
171
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
174
+ description?: string | undefined;
175
+ on?: Record<string, string | {
176
+ target: string;
177
+ guard?: string | undefined;
178
+ actions?: string[] | undefined;
179
+ description?: string | undefined;
180
+ } | {
181
+ target: string;
182
+ guard?: string | undefined;
183
+ actions?: string[] | undefined;
184
+ description?: string | undefined;
185
+ }[]> | undefined;
186
+ tags?: string[] | undefined;
187
+ meta?: Record<string, unknown> | undefined;
188
+ }, {
189
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
190
+ description?: string | undefined;
191
+ on?: Record<string, string | {
192
+ target: string;
193
+ guard?: string | undefined;
194
+ actions?: string[] | undefined;
195
+ description?: string | undefined;
196
+ } | {
197
+ target: string;
198
+ guard?: string | undefined;
199
+ actions?: string[] | undefined;
200
+ description?: string | undefined;
201
+ }[]> | undefined;
202
+ tags?: string[] | undefined;
203
+ meta?: Record<string, unknown> | undefined;
204
+ }>>;
205
+ }, "strip", z.ZodTypeAny, {
206
+ id: string;
207
+ initial: string;
208
+ states: Record<string, {
209
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
210
+ description?: string | undefined;
211
+ on?: Record<string, string | {
212
+ target: string;
213
+ guard?: string | undefined;
214
+ actions?: string[] | undefined;
215
+ description?: string | undefined;
216
+ } | {
217
+ target: string;
218
+ guard?: string | undefined;
219
+ actions?: string[] | undefined;
220
+ description?: string | undefined;
221
+ }[]> | undefined;
222
+ tags?: string[] | undefined;
223
+ meta?: Record<string, unknown> | undefined;
224
+ }>;
225
+ context?: Record<string, unknown> | undefined;
226
+ }, {
227
+ id: string;
228
+ initial: string;
229
+ states: Record<string, {
230
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
231
+ description?: string | undefined;
232
+ on?: Record<string, string | {
233
+ target: string;
234
+ guard?: string | undefined;
235
+ actions?: string[] | undefined;
236
+ description?: string | undefined;
237
+ } | {
238
+ target: string;
239
+ guard?: string | undefined;
240
+ actions?: string[] | undefined;
241
+ description?: string | undefined;
242
+ }[]> | undefined;
243
+ tags?: string[] | undefined;
244
+ meta?: Record<string, unknown> | undefined;
245
+ }>;
246
+ context?: Record<string, unknown> | undefined;
247
+ }>;
248
+ export type MachineJson = z.infer<typeof MachineJson>;
249
+ /** Per-state Lockstep metadata: where it lives, how to find it, what it means. */
250
+ export declare const StateMeta: z.ZodObject<{
251
+ route: z.ZodString;
252
+ testId: z.ZodString;
253
+ intent: z.ZodString;
254
+ rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
255
+ referenceAsset: z.ZodOptional<z.ZodString>;
256
+ }, "strip", z.ZodTypeAny, {
257
+ route: string;
258
+ testId: string;
259
+ intent: string;
260
+ rules: string[];
261
+ referenceAsset?: string | undefined;
262
+ }, {
263
+ route: string;
264
+ testId: string;
265
+ intent: string;
266
+ rules?: string[] | undefined;
267
+ referenceAsset?: string | undefined;
268
+ }>;
269
+ export type StateMeta = z.infer<typeof StateMeta>;
270
+ /** Binding of a declared transition to the element that triggers it. */
271
+ export declare const TriggerBinding: z.ZodObject<{
272
+ from: z.ZodString;
273
+ event: z.ZodString;
274
+ testId: z.ZodString;
275
+ label: z.ZodOptional<z.ZodString>;
276
+ }, "strip", z.ZodTypeAny, {
277
+ testId: string;
278
+ from: string;
279
+ event: string;
280
+ label?: string | undefined;
281
+ }, {
282
+ testId: string;
283
+ from: string;
284
+ event: string;
285
+ label?: string | undefined;
286
+ }>;
287
+ export type TriggerBinding = z.infer<typeof TriggerBinding>;
288
+ export declare const JourneyMeta: z.ZodObject<{
289
+ narrative: z.ZodDefault<z.ZodString>;
290
+ states: z.ZodRecord<z.ZodString, z.ZodObject<{
291
+ route: z.ZodString;
292
+ testId: z.ZodString;
293
+ intent: z.ZodString;
294
+ rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
295
+ referenceAsset: z.ZodOptional<z.ZodString>;
296
+ }, "strip", z.ZodTypeAny, {
297
+ route: string;
298
+ testId: string;
299
+ intent: string;
300
+ rules: string[];
301
+ referenceAsset?: string | undefined;
302
+ }, {
303
+ route: string;
304
+ testId: string;
305
+ intent: string;
306
+ rules?: string[] | undefined;
307
+ referenceAsset?: string | undefined;
308
+ }>>;
309
+ bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
310
+ from: z.ZodString;
311
+ event: z.ZodString;
312
+ testId: z.ZodString;
313
+ label: z.ZodOptional<z.ZodString>;
314
+ }, "strip", z.ZodTypeAny, {
315
+ testId: string;
316
+ from: string;
317
+ event: string;
318
+ label?: string | undefined;
319
+ }, {
320
+ testId: string;
321
+ from: string;
322
+ event: string;
323
+ label?: string | undefined;
324
+ }>, "many">>;
325
+ assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
326
+ name: z.ZodString;
327
+ url: z.ZodString;
328
+ }, "strip", z.ZodTypeAny, {
329
+ name: string;
330
+ url: string;
331
+ }, {
332
+ name: string;
333
+ url: string;
334
+ }>, "many">>;
335
+ }, "strip", z.ZodTypeAny, {
336
+ states: Record<string, {
337
+ route: string;
338
+ testId: string;
339
+ intent: string;
340
+ rules: string[];
341
+ referenceAsset?: string | undefined;
342
+ }>;
343
+ narrative: string;
344
+ bindings: {
345
+ testId: string;
346
+ from: string;
347
+ event: string;
348
+ label?: string | undefined;
349
+ }[];
350
+ assets: {
351
+ name: string;
352
+ url: string;
353
+ }[];
354
+ }, {
355
+ states: Record<string, {
356
+ route: string;
357
+ testId: string;
358
+ intent: string;
359
+ rules?: string[] | undefined;
360
+ referenceAsset?: string | undefined;
361
+ }>;
362
+ narrative?: string | undefined;
363
+ bindings?: {
364
+ testId: string;
365
+ from: string;
366
+ event: string;
367
+ label?: string | undefined;
368
+ }[] | undefined;
369
+ assets?: {
370
+ name: string;
371
+ url: string;
372
+ }[] | undefined;
373
+ }>;
374
+ export type JourneyMeta = z.infer<typeof JourneyMeta>;
375
+ export declare const JourneyModel: z.ZodObject<{
376
+ key: z.ZodString;
377
+ name: z.ZodString;
378
+ machine: z.ZodObject<{
379
+ id: z.ZodString;
380
+ initial: z.ZodString;
381
+ context: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
382
+ states: z.ZodRecord<z.ZodString, z.ZodObject<{
383
+ on: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodObject<{
384
+ target: z.ZodString;
385
+ guard: z.ZodOptional<z.ZodString>;
386
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
387
+ description: z.ZodOptional<z.ZodString>;
388
+ }, "strip", z.ZodTypeAny, {
389
+ target: string;
390
+ guard?: string | undefined;
391
+ actions?: string[] | undefined;
392
+ description?: string | undefined;
393
+ }, {
394
+ target: string;
395
+ guard?: string | undefined;
396
+ actions?: string[] | undefined;
397
+ description?: string | undefined;
398
+ }>, z.ZodArray<z.ZodObject<{
399
+ target: z.ZodString;
400
+ guard: z.ZodOptional<z.ZodString>;
401
+ actions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
402
+ description: z.ZodOptional<z.ZodString>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ target: string;
405
+ guard?: string | undefined;
406
+ actions?: string[] | undefined;
407
+ description?: string | undefined;
408
+ }, {
409
+ target: string;
410
+ guard?: string | undefined;
411
+ actions?: string[] | undefined;
412
+ description?: string | undefined;
413
+ }>, "many">]>>>;
414
+ type: z.ZodOptional<z.ZodEnum<["atomic", "final", "compound", "parallel", "history"]>>;
415
+ description: z.ZodOptional<z.ZodString>;
416
+ tags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
417
+ meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
418
+ }, "strip", z.ZodTypeAny, {
419
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
420
+ description?: string | undefined;
421
+ on?: Record<string, string | {
422
+ target: string;
423
+ guard?: string | undefined;
424
+ actions?: string[] | undefined;
425
+ description?: string | undefined;
426
+ } | {
427
+ target: string;
428
+ guard?: string | undefined;
429
+ actions?: string[] | undefined;
430
+ description?: string | undefined;
431
+ }[]> | undefined;
432
+ tags?: string[] | undefined;
433
+ meta?: Record<string, unknown> | undefined;
434
+ }, {
435
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
436
+ description?: string | undefined;
437
+ on?: Record<string, string | {
438
+ target: string;
439
+ guard?: string | undefined;
440
+ actions?: string[] | undefined;
441
+ description?: string | undefined;
442
+ } | {
443
+ target: string;
444
+ guard?: string | undefined;
445
+ actions?: string[] | undefined;
446
+ description?: string | undefined;
447
+ }[]> | undefined;
448
+ tags?: string[] | undefined;
449
+ meta?: Record<string, unknown> | undefined;
450
+ }>>;
451
+ }, "strip", z.ZodTypeAny, {
452
+ id: string;
453
+ initial: string;
454
+ states: Record<string, {
455
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
456
+ description?: string | undefined;
457
+ on?: Record<string, string | {
458
+ target: string;
459
+ guard?: string | undefined;
460
+ actions?: string[] | undefined;
461
+ description?: string | undefined;
462
+ } | {
463
+ target: string;
464
+ guard?: string | undefined;
465
+ actions?: string[] | undefined;
466
+ description?: string | undefined;
467
+ }[]> | undefined;
468
+ tags?: string[] | undefined;
469
+ meta?: Record<string, unknown> | undefined;
470
+ }>;
471
+ context?: Record<string, unknown> | undefined;
472
+ }, {
473
+ id: string;
474
+ initial: string;
475
+ states: Record<string, {
476
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
477
+ description?: string | undefined;
478
+ on?: Record<string, string | {
479
+ target: string;
480
+ guard?: string | undefined;
481
+ actions?: string[] | undefined;
482
+ description?: string | undefined;
483
+ } | {
484
+ target: string;
485
+ guard?: string | undefined;
486
+ actions?: string[] | undefined;
487
+ description?: string | undefined;
488
+ }[]> | undefined;
489
+ tags?: string[] | undefined;
490
+ meta?: Record<string, unknown> | undefined;
491
+ }>;
492
+ context?: Record<string, unknown> | undefined;
493
+ }>;
494
+ meta: z.ZodObject<{
495
+ narrative: z.ZodDefault<z.ZodString>;
496
+ states: z.ZodRecord<z.ZodString, z.ZodObject<{
497
+ route: z.ZodString;
498
+ testId: z.ZodString;
499
+ intent: z.ZodString;
500
+ rules: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
501
+ referenceAsset: z.ZodOptional<z.ZodString>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ route: string;
504
+ testId: string;
505
+ intent: string;
506
+ rules: string[];
507
+ referenceAsset?: string | undefined;
508
+ }, {
509
+ route: string;
510
+ testId: string;
511
+ intent: string;
512
+ rules?: string[] | undefined;
513
+ referenceAsset?: string | undefined;
514
+ }>>;
515
+ bindings: z.ZodDefault<z.ZodArray<z.ZodObject<{
516
+ from: z.ZodString;
517
+ event: z.ZodString;
518
+ testId: z.ZodString;
519
+ label: z.ZodOptional<z.ZodString>;
520
+ }, "strip", z.ZodTypeAny, {
521
+ testId: string;
522
+ from: string;
523
+ event: string;
524
+ label?: string | undefined;
525
+ }, {
526
+ testId: string;
527
+ from: string;
528
+ event: string;
529
+ label?: string | undefined;
530
+ }>, "many">>;
531
+ assets: z.ZodDefault<z.ZodArray<z.ZodObject<{
532
+ name: z.ZodString;
533
+ url: z.ZodString;
534
+ }, "strip", z.ZodTypeAny, {
535
+ name: string;
536
+ url: string;
537
+ }, {
538
+ name: string;
539
+ url: string;
540
+ }>, "many">>;
541
+ }, "strip", z.ZodTypeAny, {
542
+ states: Record<string, {
543
+ route: string;
544
+ testId: string;
545
+ intent: string;
546
+ rules: string[];
547
+ referenceAsset?: string | undefined;
548
+ }>;
549
+ narrative: string;
550
+ bindings: {
551
+ testId: string;
552
+ from: string;
553
+ event: string;
554
+ label?: string | undefined;
555
+ }[];
556
+ assets: {
557
+ name: string;
558
+ url: string;
559
+ }[];
560
+ }, {
561
+ states: Record<string, {
562
+ route: string;
563
+ testId: string;
564
+ intent: string;
565
+ rules?: string[] | undefined;
566
+ referenceAsset?: string | undefined;
567
+ }>;
568
+ narrative?: string | undefined;
569
+ bindings?: {
570
+ testId: string;
571
+ from: string;
572
+ event: string;
573
+ label?: string | undefined;
574
+ }[] | undefined;
575
+ assets?: {
576
+ name: string;
577
+ url: string;
578
+ }[] | undefined;
579
+ }>;
580
+ }, "strip", z.ZodTypeAny, {
581
+ meta: {
582
+ states: Record<string, {
583
+ route: string;
584
+ testId: string;
585
+ intent: string;
586
+ rules: string[];
587
+ referenceAsset?: string | undefined;
588
+ }>;
589
+ narrative: string;
590
+ bindings: {
591
+ testId: string;
592
+ from: string;
593
+ event: string;
594
+ label?: string | undefined;
595
+ }[];
596
+ assets: {
597
+ name: string;
598
+ url: string;
599
+ }[];
600
+ };
601
+ name: string;
602
+ key: string;
603
+ machine: {
604
+ id: string;
605
+ initial: string;
606
+ states: Record<string, {
607
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
608
+ description?: string | undefined;
609
+ on?: Record<string, string | {
610
+ target: string;
611
+ guard?: string | undefined;
612
+ actions?: string[] | undefined;
613
+ description?: string | undefined;
614
+ } | {
615
+ target: string;
616
+ guard?: string | undefined;
617
+ actions?: string[] | undefined;
618
+ description?: string | undefined;
619
+ }[]> | undefined;
620
+ tags?: string[] | undefined;
621
+ meta?: Record<string, unknown> | undefined;
622
+ }>;
623
+ context?: Record<string, unknown> | undefined;
624
+ };
625
+ }, {
626
+ meta: {
627
+ states: Record<string, {
628
+ route: string;
629
+ testId: string;
630
+ intent: string;
631
+ rules?: string[] | undefined;
632
+ referenceAsset?: string | undefined;
633
+ }>;
634
+ narrative?: string | undefined;
635
+ bindings?: {
636
+ testId: string;
637
+ from: string;
638
+ event: string;
639
+ label?: string | undefined;
640
+ }[] | undefined;
641
+ assets?: {
642
+ name: string;
643
+ url: string;
644
+ }[] | undefined;
645
+ };
646
+ name: string;
647
+ key: string;
648
+ machine: {
649
+ id: string;
650
+ initial: string;
651
+ states: Record<string, {
652
+ type?: "atomic" | "final" | "compound" | "parallel" | "history" | undefined;
653
+ description?: string | undefined;
654
+ on?: Record<string, string | {
655
+ target: string;
656
+ guard?: string | undefined;
657
+ actions?: string[] | undefined;
658
+ description?: string | undefined;
659
+ } | {
660
+ target: string;
661
+ guard?: string | undefined;
662
+ actions?: string[] | undefined;
663
+ description?: string | undefined;
664
+ }[]> | undefined;
665
+ tags?: string[] | undefined;
666
+ meta?: Record<string, unknown> | undefined;
667
+ }>;
668
+ context?: Record<string, unknown> | undefined;
669
+ };
670
+ }>;
671
+ export type JourneyModel = z.infer<typeof JourneyModel>;
672
+ /** A named test persona: deterministic seed plus mock overrides. */
673
+ export declare const Scenario: z.ZodObject<{
674
+ name: z.ZodString;
675
+ description: z.ZodOptional<z.ZodString>;
676
+ seed: z.ZodNumber;
677
+ overrides: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
678
+ }, "strip", z.ZodTypeAny, {
679
+ name: string;
680
+ seed: number;
681
+ overrides: Record<string, unknown>;
682
+ description?: string | undefined;
683
+ }, {
684
+ name: string;
685
+ seed: number;
686
+ description?: string | undefined;
687
+ overrides?: Record<string, unknown> | undefined;
688
+ }>;
689
+ export type Scenario = z.infer<typeof Scenario>;
690
+ /** Flatten any XState transition value into a list of concrete edges. */
691
+ export declare function transitionsOf(machine: MachineJson): Array<{
692
+ from: string;
693
+ event: string;
694
+ to: string;
695
+ guard?: string;
696
+ }>;
697
+ /** Stable key for a transition element: `from --event--> to`. */
698
+ export declare function transitionKey(t: {
699
+ from: string;
700
+ event: string;
701
+ to: string;
702
+ }): string;
703
+ /** Validate a journey model beyond the schema: every state has meta and targets resolve. */
704
+ export declare function validateJourney(model: JourneyModel): string[];
705
+ //# sourceMappingURL=journey.d.ts.map