@sanity/workflow-engine 0.9.0 → 0.10.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.
package/dist/define.d.cts CHANGED
@@ -95,7 +95,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
95
95
  [
96
96
  v.StrictObjectSchema<
97
97
  {
98
- readonly type: v.LiteralSchema<"state.set", undefined>;
98
+ readonly type: v.LiteralSchema<"field.set", undefined>;
99
99
  readonly target: v.StrictObjectSchema<
100
100
  {
101
101
  readonly scope: v.OptionalSchema<
@@ -105,7 +105,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
105
105
  >,
106
106
  undefined
107
107
  >;
108
- readonly state: v.SchemaWithPipe<
108
+ readonly field: v.SchemaWithPipe<
109
109
  readonly [
110
110
  v.StringSchema<undefined>,
111
111
  v.MinLengthAction<
@@ -124,7 +124,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
124
124
  >,
125
125
  v.StrictObjectSchema<
126
126
  {
127
- readonly type: v.LiteralSchema<"state.unset", undefined>;
127
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
128
128
  readonly target: v.StrictObjectSchema<
129
129
  {
130
130
  readonly scope: v.OptionalSchema<
@@ -134,7 +134,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
134
134
  >,
135
135
  undefined
136
136
  >;
137
- readonly state: v.SchemaWithPipe<
137
+ readonly field: v.SchemaWithPipe<
138
138
  readonly [
139
139
  v.StringSchema<undefined>,
140
140
  v.MinLengthAction<
@@ -152,7 +152,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
152
152
  >,
153
153
  v.StrictObjectSchema<
154
154
  {
155
- readonly type: v.LiteralSchema<"state.append", undefined>;
155
+ readonly type: v.LiteralSchema<"field.append", undefined>;
156
156
  readonly target: v.StrictObjectSchema<
157
157
  {
158
158
  readonly scope: v.OptionalSchema<
@@ -162,7 +162,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
162
162
  >,
163
163
  undefined
164
164
  >;
165
- readonly state: v.SchemaWithPipe<
165
+ readonly field: v.SchemaWithPipe<
166
166
  readonly [
167
167
  v.StringSchema<undefined>,
168
168
  v.MinLengthAction<
@@ -182,7 +182,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
182
182
  v.StrictObjectSchema<
183
183
  {
184
184
  readonly type: v.LiteralSchema<
185
- "state.updateWhere",
185
+ "field.updateWhere",
186
186
  undefined
187
187
  >;
188
188
  readonly target: v.StrictObjectSchema<
@@ -194,7 +194,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
194
194
  >,
195
195
  undefined
196
196
  >;
197
- readonly state: v.SchemaWithPipe<
197
+ readonly field: v.SchemaWithPipe<
198
198
  readonly [
199
199
  v.StringSchema<undefined>,
200
200
  v.MinLengthAction<
@@ -215,7 +215,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
215
215
  v.StrictObjectSchema<
216
216
  {
217
217
  readonly type: v.LiteralSchema<
218
- "state.removeWhere",
218
+ "field.removeWhere",
219
219
  undefined
220
220
  >;
221
221
  readonly target: v.StrictObjectSchema<
@@ -227,7 +227,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
227
227
  >,
228
228
  undefined
229
229
  >;
230
- readonly state: v.SchemaWithPipe<
230
+ readonly field: v.SchemaWithPipe<
231
231
  readonly [
232
232
  v.StringSchema<undefined>,
233
233
  v.MinLengthAction<
@@ -285,7 +285,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
285
285
  >,
286
286
  undefined
287
287
  >;
288
- readonly state: v.SchemaWithPipe<
288
+ readonly field: v.SchemaWithPipe<
289
289
  readonly [
290
290
  v.StringSchema<undefined>,
291
291
  v.MinLengthAction<
@@ -412,7 +412,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
412
412
  v.StringSchema<undefined>,
413
413
  undefined
414
414
  >;
415
- readonly state: v.UnionSchema<
415
+ readonly field: v.UnionSchema<
416
416
  [
417
417
  v.SchemaWithPipe<
418
418
  readonly [
@@ -429,7 +429,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
429
429
  >,
430
430
  undefined
431
431
  >;
432
- readonly state: v.SchemaWithPipe<
432
+ readonly field: v.SchemaWithPipe<
433
433
  readonly [
434
434
  v.StringSchema<undefined>,
435
435
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -564,6 +564,92 @@ declare const AuthoringActionSchema: v.UnionSchema<
564
564
  undefined
565
565
  >;
566
566
 
567
+ declare type AuthoringFieldEntry = v.InferOutput<
568
+ typeof AuthoringFieldEntrySchema
569
+ >;
570
+
571
+ declare const AuthoringFieldEntrySchema: v.UnionSchema<
572
+ [
573
+ v.StrictObjectSchema<
574
+ {
575
+ type: v.PicklistSchema<
576
+ readonly [
577
+ "doc.ref",
578
+ "doc.refs",
579
+ "release.ref",
580
+ "query",
581
+ "value.string",
582
+ "value.url",
583
+ "value.number",
584
+ "value.boolean",
585
+ "value.dateTime",
586
+ "value.actor",
587
+ "checklist",
588
+ "notes",
589
+ "assignees",
590
+ ],
591
+ `Invalid option: expected one of ${string}`
592
+ >;
593
+ name: v.SchemaWithPipe<
594
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
595
+ >;
596
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
597
+ description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
598
+ /**
599
+ * When true, the caller MUST supply this entry at start (via
600
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
601
+ * missing required entry throws rather than silently defaulting to
602
+ * `null`/`[]` — the same fail-fast an action's `required` param gets.
603
+ * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
604
+ */
605
+ required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
606
+ source: v.GenericSchema<SourceInternal>;
607
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
608
+ editable: v.OptionalSchema<
609
+ v.UnionSchema<
610
+ [
611
+ v.LiteralSchema<true, undefined>,
612
+ v.ArraySchema<
613
+ v.SchemaWithPipe<
614
+ readonly [
615
+ v.StringSchema<undefined>,
616
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
617
+ ]
618
+ >,
619
+ undefined
620
+ >,
621
+ v.SchemaWithPipe<
622
+ readonly [
623
+ v.StringSchema<undefined>,
624
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
625
+ ]
626
+ >,
627
+ ],
628
+ undefined
629
+ >,
630
+ undefined
631
+ >;
632
+ },
633
+ undefined
634
+ >,
635
+ v.StrictObjectSchema<
636
+ {
637
+ readonly type: v.LiteralSchema<"claim", undefined>;
638
+ readonly name: v.SchemaWithPipe<
639
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
640
+ >;
641
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
642
+ readonly description: v.OptionalSchema<
643
+ v.StringSchema<undefined>,
644
+ undefined
645
+ >;
646
+ },
647
+ undefined
648
+ >,
649
+ ],
650
+ undefined
651
+ >;
652
+
567
653
  declare type AuthoringOp = v.InferOutput<typeof AuthoringOpSchema>;
568
654
 
569
655
  declare const AuthoringOpSchema: v.VariantSchema<
@@ -571,7 +657,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
571
657
  [
572
658
  v.StrictObjectSchema<
573
659
  {
574
- readonly type: v.LiteralSchema<"state.set", undefined>;
660
+ readonly type: v.LiteralSchema<"field.set", undefined>;
575
661
  readonly target: v.StrictObjectSchema<
576
662
  {
577
663
  readonly scope: v.OptionalSchema<
@@ -581,7 +667,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
581
667
  >,
582
668
  undefined
583
669
  >;
584
- readonly state: v.SchemaWithPipe<
670
+ readonly field: v.SchemaWithPipe<
585
671
  readonly [
586
672
  v.StringSchema<undefined>,
587
673
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -596,7 +682,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
596
682
  >,
597
683
  v.StrictObjectSchema<
598
684
  {
599
- readonly type: v.LiteralSchema<"state.unset", undefined>;
685
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
600
686
  readonly target: v.StrictObjectSchema<
601
687
  {
602
688
  readonly scope: v.OptionalSchema<
@@ -606,7 +692,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
606
692
  >,
607
693
  undefined
608
694
  >;
609
- readonly state: v.SchemaWithPipe<
695
+ readonly field: v.SchemaWithPipe<
610
696
  readonly [
611
697
  v.StringSchema<undefined>,
612
698
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -620,7 +706,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
620
706
  >,
621
707
  v.StrictObjectSchema<
622
708
  {
623
- readonly type: v.LiteralSchema<"state.append", undefined>;
709
+ readonly type: v.LiteralSchema<"field.append", undefined>;
624
710
  readonly target: v.StrictObjectSchema<
625
711
  {
626
712
  readonly scope: v.OptionalSchema<
@@ -630,7 +716,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
630
716
  >,
631
717
  undefined
632
718
  >;
633
- readonly state: v.SchemaWithPipe<
719
+ readonly field: v.SchemaWithPipe<
634
720
  readonly [
635
721
  v.StringSchema<undefined>,
636
722
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -645,7 +731,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
645
731
  >,
646
732
  v.StrictObjectSchema<
647
733
  {
648
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
734
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
649
735
  readonly target: v.StrictObjectSchema<
650
736
  {
651
737
  readonly scope: v.OptionalSchema<
@@ -655,7 +741,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
655
741
  >,
656
742
  undefined
657
743
  >;
658
- readonly state: v.SchemaWithPipe<
744
+ readonly field: v.SchemaWithPipe<
659
745
  readonly [
660
746
  v.StringSchema<undefined>,
661
747
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -671,7 +757,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
671
757
  >,
672
758
  v.StrictObjectSchema<
673
759
  {
674
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
760
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
675
761
  readonly target: v.StrictObjectSchema<
676
762
  {
677
763
  readonly scope: v.OptionalSchema<
@@ -681,7 +767,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
681
767
  >,
682
768
  undefined
683
769
  >;
684
- readonly state: v.SchemaWithPipe<
770
+ readonly field: v.SchemaWithPipe<
685
771
  readonly [
686
772
  v.StringSchema<undefined>,
687
773
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -725,7 +811,7 @@ declare const AuthoringOpSchema: v.VariantSchema<
725
811
  >,
726
812
  undefined
727
813
  >;
728
- readonly state: v.SchemaWithPipe<
814
+ readonly field: v.SchemaWithPipe<
729
815
  readonly [
730
816
  v.StringSchema<undefined>,
731
817
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -870,7 +956,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
870
956
  [
871
957
  v.StrictObjectSchema<
872
958
  {
873
- readonly type: v.LiteralSchema<"state.set", undefined>;
959
+ readonly type: v.LiteralSchema<"field.set", undefined>;
874
960
  readonly target: v.StrictObjectSchema<
875
961
  {
876
962
  readonly scope: v.OptionalSchema<
@@ -880,7 +966,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
880
966
  >,
881
967
  undefined
882
968
  >;
883
- readonly state: v.SchemaWithPipe<
969
+ readonly field: v.SchemaWithPipe<
884
970
  readonly [
885
971
  v.StringSchema<undefined>,
886
972
  v.MinLengthAction<
@@ -900,7 +986,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
900
986
  v.StrictObjectSchema<
901
987
  {
902
988
  readonly type: v.LiteralSchema<
903
- "state.unset",
989
+ "field.unset",
904
990
  undefined
905
991
  >;
906
992
  readonly target: v.StrictObjectSchema<
@@ -912,7 +998,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
912
998
  >,
913
999
  undefined
914
1000
  >;
915
- readonly state: v.SchemaWithPipe<
1001
+ readonly field: v.SchemaWithPipe<
916
1002
  readonly [
917
1003
  v.StringSchema<undefined>,
918
1004
  v.MinLengthAction<
@@ -931,7 +1017,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
931
1017
  v.StrictObjectSchema<
932
1018
  {
933
1019
  readonly type: v.LiteralSchema<
934
- "state.append",
1020
+ "field.append",
935
1021
  undefined
936
1022
  >;
937
1023
  readonly target: v.StrictObjectSchema<
@@ -943,7 +1029,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
943
1029
  >,
944
1030
  undefined
945
1031
  >;
946
- readonly state: v.SchemaWithPipe<
1032
+ readonly field: v.SchemaWithPipe<
947
1033
  readonly [
948
1034
  v.StringSchema<undefined>,
949
1035
  v.MinLengthAction<
@@ -963,7 +1049,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
963
1049
  v.StrictObjectSchema<
964
1050
  {
965
1051
  readonly type: v.LiteralSchema<
966
- "state.updateWhere",
1052
+ "field.updateWhere",
967
1053
  undefined
968
1054
  >;
969
1055
  readonly target: v.StrictObjectSchema<
@@ -975,7 +1061,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
975
1061
  >,
976
1062
  undefined
977
1063
  >;
978
- readonly state: v.SchemaWithPipe<
1064
+ readonly field: v.SchemaWithPipe<
979
1065
  readonly [
980
1066
  v.StringSchema<undefined>,
981
1067
  v.MinLengthAction<
@@ -996,7 +1082,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
996
1082
  v.StrictObjectSchema<
997
1083
  {
998
1084
  readonly type: v.LiteralSchema<
999
- "state.removeWhere",
1085
+ "field.removeWhere",
1000
1086
  undefined
1001
1087
  >;
1002
1088
  readonly target: v.StrictObjectSchema<
@@ -1008,7 +1094,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1008
1094
  >,
1009
1095
  undefined
1010
1096
  >;
1011
- readonly state: v.SchemaWithPipe<
1097
+ readonly field: v.SchemaWithPipe<
1012
1098
  readonly [
1013
1099
  v.StringSchema<undefined>,
1014
1100
  v.MinLengthAction<
@@ -1066,7 +1152,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1066
1152
  >,
1067
1153
  undefined
1068
1154
  >;
1069
- readonly state: v.SchemaWithPipe<
1155
+ readonly field: v.SchemaWithPipe<
1070
1156
  readonly [
1071
1157
  v.StringSchema<undefined>,
1072
1158
  v.MinLengthAction<
@@ -1295,7 +1381,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1295
1381
  v.StrictObjectSchema<
1296
1382
  {
1297
1383
  readonly type: v.LiteralSchema<
1298
- "state.set",
1384
+ "field.set",
1299
1385
  undefined
1300
1386
  >;
1301
1387
  readonly target: v.StrictObjectSchema<
@@ -1311,7 +1397,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1311
1397
  >,
1312
1398
  undefined
1313
1399
  >;
1314
- readonly state: v.SchemaWithPipe<
1400
+ readonly field: v.SchemaWithPipe<
1315
1401
  readonly [
1316
1402
  v.StringSchema<undefined>,
1317
1403
  v.MinLengthAction<
@@ -1331,7 +1417,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1331
1417
  v.StrictObjectSchema<
1332
1418
  {
1333
1419
  readonly type: v.LiteralSchema<
1334
- "state.unset",
1420
+ "field.unset",
1335
1421
  undefined
1336
1422
  >;
1337
1423
  readonly target: v.StrictObjectSchema<
@@ -1347,7 +1433,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1347
1433
  >,
1348
1434
  undefined
1349
1435
  >;
1350
- readonly state: v.SchemaWithPipe<
1436
+ readonly field: v.SchemaWithPipe<
1351
1437
  readonly [
1352
1438
  v.StringSchema<undefined>,
1353
1439
  v.MinLengthAction<
@@ -1366,7 +1452,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1366
1452
  v.StrictObjectSchema<
1367
1453
  {
1368
1454
  readonly type: v.LiteralSchema<
1369
- "state.append",
1455
+ "field.append",
1370
1456
  undefined
1371
1457
  >;
1372
1458
  readonly target: v.StrictObjectSchema<
@@ -1382,7 +1468,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1382
1468
  >,
1383
1469
  undefined
1384
1470
  >;
1385
- readonly state: v.SchemaWithPipe<
1471
+ readonly field: v.SchemaWithPipe<
1386
1472
  readonly [
1387
1473
  v.StringSchema<undefined>,
1388
1474
  v.MinLengthAction<
@@ -1402,7 +1488,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1402
1488
  v.StrictObjectSchema<
1403
1489
  {
1404
1490
  readonly type: v.LiteralSchema<
1405
- "state.updateWhere",
1491
+ "field.updateWhere",
1406
1492
  undefined
1407
1493
  >;
1408
1494
  readonly target: v.StrictObjectSchema<
@@ -1418,7 +1504,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1418
1504
  >,
1419
1505
  undefined
1420
1506
  >;
1421
- readonly state: v.SchemaWithPipe<
1507
+ readonly field: v.SchemaWithPipe<
1422
1508
  readonly [
1423
1509
  v.StringSchema<undefined>,
1424
1510
  v.MinLengthAction<
@@ -1439,7 +1525,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1439
1525
  v.StrictObjectSchema<
1440
1526
  {
1441
1527
  readonly type: v.LiteralSchema<
1442
- "state.removeWhere",
1528
+ "field.removeWhere",
1443
1529
  undefined
1444
1530
  >;
1445
1531
  readonly target: v.StrictObjectSchema<
@@ -1455,7 +1541,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1455
1541
  >,
1456
1542
  undefined
1457
1543
  >;
1458
- readonly state: v.SchemaWithPipe<
1544
+ readonly field: v.SchemaWithPipe<
1459
1545
  readonly [
1460
1546
  v.StringSchema<undefined>,
1461
1547
  v.MinLengthAction<
@@ -1523,7 +1609,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1523
1609
  >,
1524
1610
  undefined
1525
1611
  >;
1526
- readonly state: v.SchemaWithPipe<
1612
+ readonly field: v.SchemaWithPipe<
1527
1613
  readonly [
1528
1614
  v.StringSchema<undefined>,
1529
1615
  v.MinLengthAction<
@@ -1661,7 +1747,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1661
1747
  v.StringSchema<undefined>,
1662
1748
  undefined
1663
1749
  >;
1664
- readonly state: v.UnionSchema<
1750
+ readonly field: v.UnionSchema<
1665
1751
  [
1666
1752
  v.SchemaWithPipe<
1667
1753
  readonly [
@@ -1682,7 +1768,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1682
1768
  >,
1683
1769
  undefined
1684
1770
  >;
1685
- readonly state: v.SchemaWithPipe<
1771
+ readonly field: v.SchemaWithPipe<
1686
1772
  readonly [
1687
1773
  v.StringSchema<undefined>,
1688
1774
  v.MinLengthAction<
@@ -1885,7 +1971,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1885
1971
  },
1886
1972
  undefined
1887
1973
  >;
1888
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
1974
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
1889
1975
  readonly with: v.OptionalSchema<
1890
1976
  v.RecordSchema<
1891
1977
  v.SchemaWithPipe<
@@ -1948,8 +2034,8 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1948
2034
  >,
1949
2035
  undefined
1950
2036
  >;
1951
- /** Task-scoped state entries. Resolved at task activation time. */
1952
- state: v.OptionalSchema<
2037
+ /** Task-scoped field entries. Resolved at task activation time. */
2038
+ fields: v.OptionalSchema<
1953
2039
  v.ArraySchema<
1954
2040
  v.UnionSchema<
1955
2041
  [
@@ -1989,7 +2075,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1989
2075
  >;
1990
2076
  /**
1991
2077
  * When true, the caller MUST supply this entry at start (via
1992
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2078
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
1993
2079
  * missing required entry throws rather than silently defaulting to
1994
2080
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
1995
2081
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -2096,7 +2182,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2096
2182
  >,
2097
2183
  undefined
2098
2184
  >;
2099
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
2185
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
2100
2186
  ops: v.OptionalSchema<
2101
2187
  v.ArraySchema<
2102
2188
  v.VariantSchema<
@@ -2104,7 +2190,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2104
2190
  [
2105
2191
  v.StrictObjectSchema<
2106
2192
  {
2107
- readonly type: v.LiteralSchema<"state.set", undefined>;
2193
+ readonly type: v.LiteralSchema<"field.set", undefined>;
2108
2194
  readonly target: v.StrictObjectSchema<
2109
2195
  {
2110
2196
  readonly scope: v.OptionalSchema<
@@ -2114,7 +2200,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2114
2200
  >,
2115
2201
  undefined
2116
2202
  >;
2117
- readonly state: v.SchemaWithPipe<
2203
+ readonly field: v.SchemaWithPipe<
2118
2204
  readonly [
2119
2205
  v.StringSchema<undefined>,
2120
2206
  v.MinLengthAction<
@@ -2134,7 +2220,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2134
2220
  v.StrictObjectSchema<
2135
2221
  {
2136
2222
  readonly type: v.LiteralSchema<
2137
- "state.unset",
2223
+ "field.unset",
2138
2224
  undefined
2139
2225
  >;
2140
2226
  readonly target: v.StrictObjectSchema<
@@ -2146,7 +2232,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2146
2232
  >,
2147
2233
  undefined
2148
2234
  >;
2149
- readonly state: v.SchemaWithPipe<
2235
+ readonly field: v.SchemaWithPipe<
2150
2236
  readonly [
2151
2237
  v.StringSchema<undefined>,
2152
2238
  v.MinLengthAction<
@@ -2165,7 +2251,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2165
2251
  v.StrictObjectSchema<
2166
2252
  {
2167
2253
  readonly type: v.LiteralSchema<
2168
- "state.append",
2254
+ "field.append",
2169
2255
  undefined
2170
2256
  >;
2171
2257
  readonly target: v.StrictObjectSchema<
@@ -2177,7 +2263,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2177
2263
  >,
2178
2264
  undefined
2179
2265
  >;
2180
- readonly state: v.SchemaWithPipe<
2266
+ readonly field: v.SchemaWithPipe<
2181
2267
  readonly [
2182
2268
  v.StringSchema<undefined>,
2183
2269
  v.MinLengthAction<
@@ -2197,7 +2283,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2197
2283
  v.StrictObjectSchema<
2198
2284
  {
2199
2285
  readonly type: v.LiteralSchema<
2200
- "state.updateWhere",
2286
+ "field.updateWhere",
2201
2287
  undefined
2202
2288
  >;
2203
2289
  readonly target: v.StrictObjectSchema<
@@ -2209,7 +2295,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2209
2295
  >,
2210
2296
  undefined
2211
2297
  >;
2212
- readonly state: v.SchemaWithPipe<
2298
+ readonly field: v.SchemaWithPipe<
2213
2299
  readonly [
2214
2300
  v.StringSchema<undefined>,
2215
2301
  v.MinLengthAction<
@@ -2230,7 +2316,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2230
2316
  v.StrictObjectSchema<
2231
2317
  {
2232
2318
  readonly type: v.LiteralSchema<
2233
- "state.removeWhere",
2319
+ "field.removeWhere",
2234
2320
  undefined
2235
2321
  >;
2236
2322
  readonly target: v.StrictObjectSchema<
@@ -2242,7 +2328,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2242
2328
  >,
2243
2329
  undefined
2244
2330
  >;
2245
- readonly state: v.SchemaWithPipe<
2331
+ readonly field: v.SchemaWithPipe<
2246
2332
  readonly [
2247
2333
  v.StringSchema<undefined>,
2248
2334
  v.MinLengthAction<
@@ -2271,7 +2357,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2271
2357
  >,
2272
2358
  undefined
2273
2359
  >;
2274
- readonly state: v.SchemaWithPipe<
2360
+ readonly field: v.SchemaWithPipe<
2275
2361
  readonly [
2276
2362
  v.StringSchema<undefined>,
2277
2363
  v.MinLengthAction<
@@ -2433,7 +2519,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2433
2519
  >,
2434
2520
  undefined
2435
2521
  >;
2436
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
2522
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
2437
2523
  readonly idRefs: v.OptionalSchema<
2438
2524
  v.ArraySchema<
2439
2525
  v.SchemaWithPipe<
@@ -2509,12 +2595,12 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2509
2595
  undefined
2510
2596
  >;
2511
2597
  /**
2512
- * Projected workflow state the predicate reads as `guard.metadata.*` —
2513
- * the only bridge from the lake eval context (which cannot see `$state`)
2514
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
2598
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
2599
+ * the only bridge from the lake eval context (which cannot see `$fields`)
2600
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
2515
2601
  * the guard mini-language — `"$self"`, `"$now"`, or
2516
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
2517
- * re-synced by the post-state-op guard refresh.
2602
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
2603
+ * re-synced by the post-field-op guard refresh.
2518
2604
  */
2519
2605
  readonly metadata: v.OptionalSchema<
2520
2606
  v.RecordSchema<
@@ -2541,8 +2627,8 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2541
2627
  >,
2542
2628
  undefined
2543
2629
  >;
2544
- /** Stage-scoped state entries. Resolved at stage entry. */
2545
- state: v.OptionalSchema<
2630
+ /** Stage-scoped field entries. Resolved at stage entry. */
2631
+ fields: v.OptionalSchema<
2546
2632
  v.ArraySchema<
2547
2633
  v.UnionSchema<
2548
2634
  [
@@ -2579,7 +2665,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2579
2665
  >;
2580
2666
  /**
2581
2667
  * When true, the caller MUST supply this entry at start (via
2582
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2668
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
2583
2669
  * missing required entry throws rather than silently defaulting to
2584
2670
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
2585
2671
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -2693,92 +2779,6 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2693
2779
  undefined
2694
2780
  >;
2695
2781
 
2696
- declare type AuthoringStateEntry = v.InferOutput<
2697
- typeof AuthoringStateEntrySchema
2698
- >;
2699
-
2700
- declare const AuthoringStateEntrySchema: v.UnionSchema<
2701
- [
2702
- v.StrictObjectSchema<
2703
- {
2704
- type: v.PicklistSchema<
2705
- readonly [
2706
- "doc.ref",
2707
- "doc.refs",
2708
- "release.ref",
2709
- "query",
2710
- "value.string",
2711
- "value.url",
2712
- "value.number",
2713
- "value.boolean",
2714
- "value.dateTime",
2715
- "value.actor",
2716
- "checklist",
2717
- "notes",
2718
- "assignees",
2719
- ],
2720
- `Invalid option: expected one of ${string}`
2721
- >;
2722
- name: v.SchemaWithPipe<
2723
- readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2724
- >;
2725
- title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2726
- description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2727
- /**
2728
- * When true, the caller MUST supply this entry at start (via
2729
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2730
- * missing required entry throws rather than silently defaulting to
2731
- * `null`/`[]` — the same fail-fast an action's `required` param gets.
2732
- * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
2733
- */
2734
- required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2735
- source: v.GenericSchema<SourceInternal>;
2736
- /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
2737
- editable: v.OptionalSchema<
2738
- v.UnionSchema<
2739
- [
2740
- v.LiteralSchema<true, undefined>,
2741
- v.ArraySchema<
2742
- v.SchemaWithPipe<
2743
- readonly [
2744
- v.StringSchema<undefined>,
2745
- v.MinLengthAction<string, 1, "must be a non-empty string">,
2746
- ]
2747
- >,
2748
- undefined
2749
- >,
2750
- v.SchemaWithPipe<
2751
- readonly [
2752
- v.StringSchema<undefined>,
2753
- v.MinLengthAction<string, 1, "must be a non-empty string">,
2754
- ]
2755
- >,
2756
- ],
2757
- undefined
2758
- >,
2759
- undefined
2760
- >;
2761
- },
2762
- undefined
2763
- >,
2764
- v.StrictObjectSchema<
2765
- {
2766
- readonly type: v.LiteralSchema<"claim", undefined>;
2767
- readonly name: v.SchemaWithPipe<
2768
- readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2769
- >;
2770
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2771
- readonly description: v.OptionalSchema<
2772
- v.StringSchema<undefined>,
2773
- undefined
2774
- >;
2775
- },
2776
- undefined
2777
- >,
2778
- ],
2779
- undefined
2780
- >;
2781
-
2782
2782
  declare type AuthoringTask = v.InferOutput<typeof AuthoringTaskSchema>;
2783
2783
 
2784
2784
  declare const AuthoringTaskSchema: v.StrictObjectSchema<
@@ -2869,7 +2869,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2869
2869
  [
2870
2870
  v.StrictObjectSchema<
2871
2871
  {
2872
- readonly type: v.LiteralSchema<"state.set", undefined>;
2872
+ readonly type: v.LiteralSchema<"field.set", undefined>;
2873
2873
  readonly target: v.StrictObjectSchema<
2874
2874
  {
2875
2875
  readonly scope: v.OptionalSchema<
@@ -2879,7 +2879,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2879
2879
  >,
2880
2880
  undefined
2881
2881
  >;
2882
- readonly state: v.SchemaWithPipe<
2882
+ readonly field: v.SchemaWithPipe<
2883
2883
  readonly [
2884
2884
  v.StringSchema<undefined>,
2885
2885
  v.MinLengthAction<
@@ -2898,7 +2898,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2898
2898
  >,
2899
2899
  v.StrictObjectSchema<
2900
2900
  {
2901
- readonly type: v.LiteralSchema<"state.unset", undefined>;
2901
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
2902
2902
  readonly target: v.StrictObjectSchema<
2903
2903
  {
2904
2904
  readonly scope: v.OptionalSchema<
@@ -2908,7 +2908,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2908
2908
  >,
2909
2909
  undefined
2910
2910
  >;
2911
- readonly state: v.SchemaWithPipe<
2911
+ readonly field: v.SchemaWithPipe<
2912
2912
  readonly [
2913
2913
  v.StringSchema<undefined>,
2914
2914
  v.MinLengthAction<
@@ -2926,7 +2926,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2926
2926
  >,
2927
2927
  v.StrictObjectSchema<
2928
2928
  {
2929
- readonly type: v.LiteralSchema<"state.append", undefined>;
2929
+ readonly type: v.LiteralSchema<"field.append", undefined>;
2930
2930
  readonly target: v.StrictObjectSchema<
2931
2931
  {
2932
2932
  readonly scope: v.OptionalSchema<
@@ -2936,7 +2936,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2936
2936
  >,
2937
2937
  undefined
2938
2938
  >;
2939
- readonly state: v.SchemaWithPipe<
2939
+ readonly field: v.SchemaWithPipe<
2940
2940
  readonly [
2941
2941
  v.StringSchema<undefined>,
2942
2942
  v.MinLengthAction<
@@ -2955,7 +2955,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2955
2955
  >,
2956
2956
  v.StrictObjectSchema<
2957
2957
  {
2958
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
2958
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
2959
2959
  readonly target: v.StrictObjectSchema<
2960
2960
  {
2961
2961
  readonly scope: v.OptionalSchema<
@@ -2965,7 +2965,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2965
2965
  >,
2966
2966
  undefined
2967
2967
  >;
2968
- readonly state: v.SchemaWithPipe<
2968
+ readonly field: v.SchemaWithPipe<
2969
2969
  readonly [
2970
2970
  v.StringSchema<undefined>,
2971
2971
  v.MinLengthAction<
@@ -2985,7 +2985,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2985
2985
  >,
2986
2986
  v.StrictObjectSchema<
2987
2987
  {
2988
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
2988
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
2989
2989
  readonly target: v.StrictObjectSchema<
2990
2990
  {
2991
2991
  readonly scope: v.OptionalSchema<
@@ -2995,7 +2995,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2995
2995
  >,
2996
2996
  undefined
2997
2997
  >;
2998
- readonly state: v.SchemaWithPipe<
2998
+ readonly field: v.SchemaWithPipe<
2999
2999
  readonly [
3000
3000
  v.StringSchema<undefined>,
3001
3001
  v.MinLengthAction<
@@ -3047,7 +3047,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3047
3047
  >,
3048
3048
  undefined
3049
3049
  >;
3050
- readonly state: v.SchemaWithPipe<
3050
+ readonly field: v.SchemaWithPipe<
3051
3051
  readonly [
3052
3052
  v.StringSchema<undefined>,
3053
3053
  v.MinLengthAction<
@@ -3264,7 +3264,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3264
3264
  v.StrictObjectSchema<
3265
3265
  {
3266
3266
  readonly type: v.LiteralSchema<
3267
- "state.set",
3267
+ "field.set",
3268
3268
  undefined
3269
3269
  >;
3270
3270
  readonly target: v.StrictObjectSchema<
@@ -3276,7 +3276,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3276
3276
  >,
3277
3277
  undefined
3278
3278
  >;
3279
- readonly state: v.SchemaWithPipe<
3279
+ readonly field: v.SchemaWithPipe<
3280
3280
  readonly [
3281
3281
  v.StringSchema<undefined>,
3282
3282
  v.MinLengthAction<
@@ -3296,7 +3296,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3296
3296
  v.StrictObjectSchema<
3297
3297
  {
3298
3298
  readonly type: v.LiteralSchema<
3299
- "state.unset",
3299
+ "field.unset",
3300
3300
  undefined
3301
3301
  >;
3302
3302
  readonly target: v.StrictObjectSchema<
@@ -3308,7 +3308,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3308
3308
  >,
3309
3309
  undefined
3310
3310
  >;
3311
- readonly state: v.SchemaWithPipe<
3311
+ readonly field: v.SchemaWithPipe<
3312
3312
  readonly [
3313
3313
  v.StringSchema<undefined>,
3314
3314
  v.MinLengthAction<
@@ -3327,7 +3327,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3327
3327
  v.StrictObjectSchema<
3328
3328
  {
3329
3329
  readonly type: v.LiteralSchema<
3330
- "state.append",
3330
+ "field.append",
3331
3331
  undefined
3332
3332
  >;
3333
3333
  readonly target: v.StrictObjectSchema<
@@ -3339,7 +3339,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3339
3339
  >,
3340
3340
  undefined
3341
3341
  >;
3342
- readonly state: v.SchemaWithPipe<
3342
+ readonly field: v.SchemaWithPipe<
3343
3343
  readonly [
3344
3344
  v.StringSchema<undefined>,
3345
3345
  v.MinLengthAction<
@@ -3359,7 +3359,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3359
3359
  v.StrictObjectSchema<
3360
3360
  {
3361
3361
  readonly type: v.LiteralSchema<
3362
- "state.updateWhere",
3362
+ "field.updateWhere",
3363
3363
  undefined
3364
3364
  >;
3365
3365
  readonly target: v.StrictObjectSchema<
@@ -3371,7 +3371,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3371
3371
  >,
3372
3372
  undefined
3373
3373
  >;
3374
- readonly state: v.SchemaWithPipe<
3374
+ readonly field: v.SchemaWithPipe<
3375
3375
  readonly [
3376
3376
  v.StringSchema<undefined>,
3377
3377
  v.MinLengthAction<
@@ -3392,7 +3392,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3392
3392
  v.StrictObjectSchema<
3393
3393
  {
3394
3394
  readonly type: v.LiteralSchema<
3395
- "state.removeWhere",
3395
+ "field.removeWhere",
3396
3396
  undefined
3397
3397
  >;
3398
3398
  readonly target: v.StrictObjectSchema<
@@ -3404,7 +3404,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3404
3404
  >,
3405
3405
  undefined
3406
3406
  >;
3407
- readonly state: v.SchemaWithPipe<
3407
+ readonly field: v.SchemaWithPipe<
3408
3408
  readonly [
3409
3409
  v.StringSchema<undefined>,
3410
3410
  v.MinLengthAction<
@@ -3465,7 +3465,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3465
3465
  >,
3466
3466
  undefined
3467
3467
  >;
3468
- readonly state: v.SchemaWithPipe<
3468
+ readonly field: v.SchemaWithPipe<
3469
3469
  readonly [
3470
3470
  v.StringSchema<undefined>,
3471
3471
  v.MinLengthAction<
@@ -3599,7 +3599,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3599
3599
  v.StringSchema<undefined>,
3600
3600
  undefined
3601
3601
  >;
3602
- readonly state: v.UnionSchema<
3602
+ readonly field: v.UnionSchema<
3603
3603
  [
3604
3604
  v.SchemaWithPipe<
3605
3605
  readonly [
@@ -3620,7 +3620,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3620
3620
  >,
3621
3621
  undefined
3622
3622
  >;
3623
- readonly state: v.SchemaWithPipe<
3623
+ readonly field: v.SchemaWithPipe<
3624
3624
  readonly [
3625
3625
  v.StringSchema<undefined>,
3626
3626
  v.MinLengthAction<
@@ -3815,7 +3815,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3815
3815
  },
3816
3816
  undefined
3817
3817
  >;
3818
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
3818
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
3819
3819
  readonly with: v.OptionalSchema<
3820
3820
  v.RecordSchema<
3821
3821
  v.SchemaWithPipe<
@@ -3862,8 +3862,8 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3862
3862
  >,
3863
3863
  undefined
3864
3864
  >;
3865
- /** Task-scoped state entries. Resolved at task activation time. */
3866
- state: v.OptionalSchema<
3865
+ /** Task-scoped field entries. Resolved at task activation time. */
3866
+ fields: v.OptionalSchema<
3867
3867
  v.ArraySchema<
3868
3868
  v.UnionSchema<
3869
3869
  [
@@ -3900,7 +3900,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3900
3900
  >;
3901
3901
  /**
3902
3902
  * When true, the caller MUST supply this entry at start (via
3903
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
3903
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
3904
3904
  * missing required entry throws rather than silently defaulting to
3905
3905
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
3906
3906
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -4006,7 +4006,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4006
4006
  >,
4007
4007
  undefined
4008
4008
  >;
4009
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
4009
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
4010
4010
  ops: v.OptionalSchema<
4011
4011
  v.ArraySchema<
4012
4012
  v.VariantSchema<
@@ -4014,7 +4014,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4014
4014
  [
4015
4015
  v.StrictObjectSchema<
4016
4016
  {
4017
- readonly type: v.LiteralSchema<"state.set", undefined>;
4017
+ readonly type: v.LiteralSchema<"field.set", undefined>;
4018
4018
  readonly target: v.StrictObjectSchema<
4019
4019
  {
4020
4020
  readonly scope: v.OptionalSchema<
@@ -4024,7 +4024,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4024
4024
  >,
4025
4025
  undefined
4026
4026
  >;
4027
- readonly state: v.SchemaWithPipe<
4027
+ readonly field: v.SchemaWithPipe<
4028
4028
  readonly [
4029
4029
  v.StringSchema<undefined>,
4030
4030
  v.MinLengthAction<
@@ -4043,7 +4043,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4043
4043
  >,
4044
4044
  v.StrictObjectSchema<
4045
4045
  {
4046
- readonly type: v.LiteralSchema<"state.unset", undefined>;
4046
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
4047
4047
  readonly target: v.StrictObjectSchema<
4048
4048
  {
4049
4049
  readonly scope: v.OptionalSchema<
@@ -4053,7 +4053,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4053
4053
  >,
4054
4054
  undefined
4055
4055
  >;
4056
- readonly state: v.SchemaWithPipe<
4056
+ readonly field: v.SchemaWithPipe<
4057
4057
  readonly [
4058
4058
  v.StringSchema<undefined>,
4059
4059
  v.MinLengthAction<
@@ -4071,7 +4071,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4071
4071
  >,
4072
4072
  v.StrictObjectSchema<
4073
4073
  {
4074
- readonly type: v.LiteralSchema<"state.append", undefined>;
4074
+ readonly type: v.LiteralSchema<"field.append", undefined>;
4075
4075
  readonly target: v.StrictObjectSchema<
4076
4076
  {
4077
4077
  readonly scope: v.OptionalSchema<
@@ -4081,7 +4081,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4081
4081
  >,
4082
4082
  undefined
4083
4083
  >;
4084
- readonly state: v.SchemaWithPipe<
4084
+ readonly field: v.SchemaWithPipe<
4085
4085
  readonly [
4086
4086
  v.StringSchema<undefined>,
4087
4087
  v.MinLengthAction<
@@ -4100,7 +4100,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4100
4100
  >,
4101
4101
  v.StrictObjectSchema<
4102
4102
  {
4103
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
4103
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
4104
4104
  readonly target: v.StrictObjectSchema<
4105
4105
  {
4106
4106
  readonly scope: v.OptionalSchema<
@@ -4110,7 +4110,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4110
4110
  >,
4111
4111
  undefined
4112
4112
  >;
4113
- readonly state: v.SchemaWithPipe<
4113
+ readonly field: v.SchemaWithPipe<
4114
4114
  readonly [
4115
4115
  v.StringSchema<undefined>,
4116
4116
  v.MinLengthAction<
@@ -4130,7 +4130,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4130
4130
  >,
4131
4131
  v.StrictObjectSchema<
4132
4132
  {
4133
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
4133
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
4134
4134
  readonly target: v.StrictObjectSchema<
4135
4135
  {
4136
4136
  readonly scope: v.OptionalSchema<
@@ -4140,7 +4140,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4140
4140
  >,
4141
4141
  undefined
4142
4142
  >;
4143
- readonly state: v.SchemaWithPipe<
4143
+ readonly field: v.SchemaWithPipe<
4144
4144
  readonly [
4145
4145
  v.StringSchema<undefined>,
4146
4146
  v.MinLengthAction<
@@ -4169,7 +4169,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4169
4169
  >,
4170
4170
  undefined
4171
4171
  >;
4172
- readonly state: v.SchemaWithPipe<
4172
+ readonly field: v.SchemaWithPipe<
4173
4173
  readonly [
4174
4174
  v.StringSchema<undefined>,
4175
4175
  v.MinLengthAction<
@@ -4310,7 +4310,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4310
4310
  * never started cold from a picker. Omitted ⇒ `'workflow'` (startable).
4311
4311
  * Advisory: consumers filter their start pickers on it (see
4312
4312
  * {@link isStartableDefinition}); the engine does NOT refuse a
4313
- * `startInstance` on a `'child'` def — load-bearing `required` state is the
4313
+ * `startInstance` on a `'child'` def — load-bearing `required` field is the
4314
4314
  * runtime backstop.
4315
4315
  */
4316
4316
  role: v.OptionalSchema<
@@ -4327,8 +4327,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4327
4327
  v.MinLengthAction<string, 1, "must be a non-empty string">,
4328
4328
  ]
4329
4329
  >;
4330
- /** Workflow-scope state entries. Persist for the instance lifetime. */
4331
- state: v.OptionalSchema<
4330
+ /** Workflow-scope field entries. Persist for the instance lifetime. */
4331
+ fields: v.OptionalSchema<
4332
4332
  v.ArraySchema<
4333
4333
  v.UnionSchema<
4334
4334
  [
@@ -4365,7 +4365,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4365
4365
  >;
4366
4366
  /**
4367
4367
  * When true, the caller MUST supply this entry at start (via
4368
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
4368
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
4369
4369
  * missing required entry throws rather than silently defaulting to
4370
4370
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
4371
4371
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -4575,7 +4575,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4575
4575
  v.StrictObjectSchema<
4576
4576
  {
4577
4577
  readonly type: v.LiteralSchema<
4578
- "state.set",
4578
+ "field.set",
4579
4579
  undefined
4580
4580
  >;
4581
4581
  readonly target: v.StrictObjectSchema<
@@ -4591,7 +4591,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4591
4591
  >,
4592
4592
  undefined
4593
4593
  >;
4594
- readonly state: v.SchemaWithPipe<
4594
+ readonly field: v.SchemaWithPipe<
4595
4595
  readonly [
4596
4596
  v.StringSchema<undefined>,
4597
4597
  v.MinLengthAction<
@@ -4611,7 +4611,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4611
4611
  v.StrictObjectSchema<
4612
4612
  {
4613
4613
  readonly type: v.LiteralSchema<
4614
- "state.unset",
4614
+ "field.unset",
4615
4615
  undefined
4616
4616
  >;
4617
4617
  readonly target: v.StrictObjectSchema<
@@ -4627,7 +4627,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4627
4627
  >,
4628
4628
  undefined
4629
4629
  >;
4630
- readonly state: v.SchemaWithPipe<
4630
+ readonly field: v.SchemaWithPipe<
4631
4631
  readonly [
4632
4632
  v.StringSchema<undefined>,
4633
4633
  v.MinLengthAction<
@@ -4646,7 +4646,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4646
4646
  v.StrictObjectSchema<
4647
4647
  {
4648
4648
  readonly type: v.LiteralSchema<
4649
- "state.append",
4649
+ "field.append",
4650
4650
  undefined
4651
4651
  >;
4652
4652
  readonly target: v.StrictObjectSchema<
@@ -4662,7 +4662,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4662
4662
  >,
4663
4663
  undefined
4664
4664
  >;
4665
- readonly state: v.SchemaWithPipe<
4665
+ readonly field: v.SchemaWithPipe<
4666
4666
  readonly [
4667
4667
  v.StringSchema<undefined>,
4668
4668
  v.MinLengthAction<
@@ -4682,7 +4682,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4682
4682
  v.StrictObjectSchema<
4683
4683
  {
4684
4684
  readonly type: v.LiteralSchema<
4685
- "state.updateWhere",
4685
+ "field.updateWhere",
4686
4686
  undefined
4687
4687
  >;
4688
4688
  readonly target: v.StrictObjectSchema<
@@ -4698,7 +4698,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4698
4698
  >,
4699
4699
  undefined
4700
4700
  >;
4701
- readonly state: v.SchemaWithPipe<
4701
+ readonly field: v.SchemaWithPipe<
4702
4702
  readonly [
4703
4703
  v.StringSchema<undefined>,
4704
4704
  v.MinLengthAction<
@@ -4719,7 +4719,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4719
4719
  v.StrictObjectSchema<
4720
4720
  {
4721
4721
  readonly type: v.LiteralSchema<
4722
- "state.removeWhere",
4722
+ "field.removeWhere",
4723
4723
  undefined
4724
4724
  >;
4725
4725
  readonly target: v.StrictObjectSchema<
@@ -4735,7 +4735,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4735
4735
  >,
4736
4736
  undefined
4737
4737
  >;
4738
- readonly state: v.SchemaWithPipe<
4738
+ readonly field: v.SchemaWithPipe<
4739
4739
  readonly [
4740
4740
  v.StringSchema<undefined>,
4741
4741
  v.MinLengthAction<
@@ -4803,7 +4803,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4803
4803
  >,
4804
4804
  undefined
4805
4805
  >;
4806
- readonly state: v.SchemaWithPipe<
4806
+ readonly field: v.SchemaWithPipe<
4807
4807
  readonly [
4808
4808
  v.StringSchema<undefined>,
4809
4809
  v.MinLengthAction<
@@ -5032,7 +5032,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5032
5032
  v.StrictObjectSchema<
5033
5033
  {
5034
5034
  readonly type: v.LiteralSchema<
5035
- "state.set",
5035
+ "field.set",
5036
5036
  undefined
5037
5037
  >;
5038
5038
  readonly target: v.StrictObjectSchema<
@@ -5048,7 +5048,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5048
5048
  >,
5049
5049
  undefined
5050
5050
  >;
5051
- readonly state: v.SchemaWithPipe<
5051
+ readonly field: v.SchemaWithPipe<
5052
5052
  readonly [
5053
5053
  v.StringSchema<undefined>,
5054
5054
  v.MinLengthAction<
@@ -5068,7 +5068,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5068
5068
  v.StrictObjectSchema<
5069
5069
  {
5070
5070
  readonly type: v.LiteralSchema<
5071
- "state.unset",
5071
+ "field.unset",
5072
5072
  undefined
5073
5073
  >;
5074
5074
  readonly target: v.StrictObjectSchema<
@@ -5084,7 +5084,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5084
5084
  >,
5085
5085
  undefined
5086
5086
  >;
5087
- readonly state: v.SchemaWithPipe<
5087
+ readonly field: v.SchemaWithPipe<
5088
5088
  readonly [
5089
5089
  v.StringSchema<undefined>,
5090
5090
  v.MinLengthAction<
@@ -5103,7 +5103,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5103
5103
  v.StrictObjectSchema<
5104
5104
  {
5105
5105
  readonly type: v.LiteralSchema<
5106
- "state.append",
5106
+ "field.append",
5107
5107
  undefined
5108
5108
  >;
5109
5109
  readonly target: v.StrictObjectSchema<
@@ -5119,7 +5119,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5119
5119
  >,
5120
5120
  undefined
5121
5121
  >;
5122
- readonly state: v.SchemaWithPipe<
5122
+ readonly field: v.SchemaWithPipe<
5123
5123
  readonly [
5124
5124
  v.StringSchema<undefined>,
5125
5125
  v.MinLengthAction<
@@ -5139,7 +5139,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5139
5139
  v.StrictObjectSchema<
5140
5140
  {
5141
5141
  readonly type: v.LiteralSchema<
5142
- "state.updateWhere",
5142
+ "field.updateWhere",
5143
5143
  undefined
5144
5144
  >;
5145
5145
  readonly target: v.StrictObjectSchema<
@@ -5155,7 +5155,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5155
5155
  >,
5156
5156
  undefined
5157
5157
  >;
5158
- readonly state: v.SchemaWithPipe<
5158
+ readonly field: v.SchemaWithPipe<
5159
5159
  readonly [
5160
5160
  v.StringSchema<undefined>,
5161
5161
  v.MinLengthAction<
@@ -5176,7 +5176,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5176
5176
  v.StrictObjectSchema<
5177
5177
  {
5178
5178
  readonly type: v.LiteralSchema<
5179
- "state.removeWhere",
5179
+ "field.removeWhere",
5180
5180
  undefined
5181
5181
  >;
5182
5182
  readonly target: v.StrictObjectSchema<
@@ -5192,7 +5192,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5192
5192
  >,
5193
5193
  undefined
5194
5194
  >;
5195
- readonly state: v.SchemaWithPipe<
5195
+ readonly field: v.SchemaWithPipe<
5196
5196
  readonly [
5197
5197
  v.StringSchema<undefined>,
5198
5198
  v.MinLengthAction<
@@ -5260,7 +5260,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5260
5260
  >,
5261
5261
  undefined
5262
5262
  >;
5263
- readonly state: v.SchemaWithPipe<
5263
+ readonly field: v.SchemaWithPipe<
5264
5264
  readonly [
5265
5265
  v.StringSchema<undefined>,
5266
5266
  v.MinLengthAction<
@@ -5401,7 +5401,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5401
5401
  v.StringSchema<undefined>,
5402
5402
  undefined
5403
5403
  >;
5404
- readonly state: v.UnionSchema<
5404
+ readonly field: v.UnionSchema<
5405
5405
  [
5406
5406
  v.SchemaWithPipe<
5407
5407
  readonly [
@@ -5426,7 +5426,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5426
5426
  >,
5427
5427
  undefined
5428
5428
  >;
5429
- readonly state: v.SchemaWithPipe<
5429
+ readonly field: v.SchemaWithPipe<
5430
5430
  readonly [
5431
5431
  v.StringSchema<undefined>,
5432
5432
  v.MinLengthAction<
@@ -5633,7 +5633,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5633
5633
  },
5634
5634
  undefined
5635
5635
  >;
5636
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
5636
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
5637
5637
  readonly with: v.OptionalSchema<
5638
5638
  v.RecordSchema<
5639
5639
  v.SchemaWithPipe<
@@ -5696,8 +5696,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5696
5696
  >,
5697
5697
  undefined
5698
5698
  >;
5699
- /** Task-scoped state entries. Resolved at task activation time. */
5700
- state: v.OptionalSchema<
5699
+ /** Task-scoped field entries. Resolved at task activation time. */
5700
+ fields: v.OptionalSchema<
5701
5701
  v.ArraySchema<
5702
5702
  v.UnionSchema<
5703
5703
  [
@@ -5737,7 +5737,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5737
5737
  >;
5738
5738
  /**
5739
5739
  * When true, the caller MUST supply this entry at start (via
5740
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
5740
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
5741
5741
  * missing required entry throws rather than silently defaulting to
5742
5742
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
5743
5743
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -5865,7 +5865,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5865
5865
  >,
5866
5866
  undefined
5867
5867
  >;
5868
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
5868
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
5869
5869
  ops: v.OptionalSchema<
5870
5870
  v.ArraySchema<
5871
5871
  v.VariantSchema<
@@ -5874,7 +5874,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5874
5874
  v.StrictObjectSchema<
5875
5875
  {
5876
5876
  readonly type: v.LiteralSchema<
5877
- "state.set",
5877
+ "field.set",
5878
5878
  undefined
5879
5879
  >;
5880
5880
  readonly target: v.StrictObjectSchema<
@@ -5890,7 +5890,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5890
5890
  >,
5891
5891
  undefined
5892
5892
  >;
5893
- readonly state: v.SchemaWithPipe<
5893
+ readonly field: v.SchemaWithPipe<
5894
5894
  readonly [
5895
5895
  v.StringSchema<undefined>,
5896
5896
  v.MinLengthAction<
@@ -5910,7 +5910,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5910
5910
  v.StrictObjectSchema<
5911
5911
  {
5912
5912
  readonly type: v.LiteralSchema<
5913
- "state.unset",
5913
+ "field.unset",
5914
5914
  undefined
5915
5915
  >;
5916
5916
  readonly target: v.StrictObjectSchema<
@@ -5926,7 +5926,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5926
5926
  >,
5927
5927
  undefined
5928
5928
  >;
5929
- readonly state: v.SchemaWithPipe<
5929
+ readonly field: v.SchemaWithPipe<
5930
5930
  readonly [
5931
5931
  v.StringSchema<undefined>,
5932
5932
  v.MinLengthAction<
@@ -5945,7 +5945,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5945
5945
  v.StrictObjectSchema<
5946
5946
  {
5947
5947
  readonly type: v.LiteralSchema<
5948
- "state.append",
5948
+ "field.append",
5949
5949
  undefined
5950
5950
  >;
5951
5951
  readonly target: v.StrictObjectSchema<
@@ -5961,7 +5961,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5961
5961
  >,
5962
5962
  undefined
5963
5963
  >;
5964
- readonly state: v.SchemaWithPipe<
5964
+ readonly field: v.SchemaWithPipe<
5965
5965
  readonly [
5966
5966
  v.StringSchema<undefined>,
5967
5967
  v.MinLengthAction<
@@ -5981,7 +5981,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5981
5981
  v.StrictObjectSchema<
5982
5982
  {
5983
5983
  readonly type: v.LiteralSchema<
5984
- "state.updateWhere",
5984
+ "field.updateWhere",
5985
5985
  undefined
5986
5986
  >;
5987
5987
  readonly target: v.StrictObjectSchema<
@@ -5997,7 +5997,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5997
5997
  >,
5998
5998
  undefined
5999
5999
  >;
6000
- readonly state: v.SchemaWithPipe<
6000
+ readonly field: v.SchemaWithPipe<
6001
6001
  readonly [
6002
6002
  v.StringSchema<undefined>,
6003
6003
  v.MinLengthAction<
@@ -6018,7 +6018,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6018
6018
  v.StrictObjectSchema<
6019
6019
  {
6020
6020
  readonly type: v.LiteralSchema<
6021
- "state.removeWhere",
6021
+ "field.removeWhere",
6022
6022
  undefined
6023
6023
  >;
6024
6024
  readonly target: v.StrictObjectSchema<
@@ -6034,7 +6034,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6034
6034
  >,
6035
6035
  undefined
6036
6036
  >;
6037
- readonly state: v.SchemaWithPipe<
6037
+ readonly field: v.SchemaWithPipe<
6038
6038
  readonly [
6039
6039
  v.StringSchema<undefined>,
6040
6040
  v.MinLengthAction<
@@ -6070,7 +6070,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6070
6070
  >,
6071
6071
  undefined
6072
6072
  >;
6073
- readonly state: v.SchemaWithPipe<
6073
+ readonly field: v.SchemaWithPipe<
6074
6074
  readonly [
6075
6075
  v.StringSchema<undefined>,
6076
6076
  v.MinLengthAction<
@@ -6236,7 +6236,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6236
6236
  >,
6237
6237
  undefined
6238
6238
  >;
6239
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
6239
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
6240
6240
  readonly idRefs: v.OptionalSchema<
6241
6241
  v.ArraySchema<
6242
6242
  v.SchemaWithPipe<
@@ -6312,12 +6312,12 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6312
6312
  undefined
6313
6313
  >;
6314
6314
  /**
6315
- * Projected workflow state the predicate reads as `guard.metadata.*` —
6316
- * the only bridge from the lake eval context (which cannot see `$state`)
6317
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
6315
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
6316
+ * the only bridge from the lake eval context (which cannot see `$fields`)
6317
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
6318
6318
  * the guard mini-language — `"$self"`, `"$now"`, or
6319
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
6320
- * re-synced by the post-state-op guard refresh.
6319
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
6320
+ * re-synced by the post-field-op guard refresh.
6321
6321
  */
6322
6322
  readonly metadata: v.OptionalSchema<
6323
6323
  v.RecordSchema<
@@ -6352,8 +6352,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6352
6352
  >,
6353
6353
  undefined
6354
6354
  >;
6355
- /** Stage-scoped state entries. Resolved at stage entry. */
6356
- state: v.OptionalSchema<
6355
+ /** Stage-scoped field entries. Resolved at stage entry. */
6356
+ fields: v.OptionalSchema<
6357
6357
  v.ArraySchema<
6358
6358
  v.UnionSchema<
6359
6359
  [
@@ -6393,7 +6393,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6393
6393
  >;
6394
6394
  /**
6395
6395
  * When true, the caller MUST supply this entry at start (via
6396
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
6396
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
6397
6397
  * missing required entry throws rather than silently defaulting to
6398
6398
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
6399
6399
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -6554,7 +6554,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6554
6554
  type: "audit";
6555
6555
  target: {
6556
6556
  scope?: "workflow" | "stage" | "task" | undefined;
6557
- state: string;
6557
+ field: string;
6558
6558
  };
6559
6559
  value: SourceInternal;
6560
6560
  stampFields?:
@@ -6565,42 +6565,42 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6565
6565
  | undefined;
6566
6566
  }
6567
6567
  | {
6568
- type: "state.set";
6568
+ type: "field.set";
6569
6569
  target: {
6570
6570
  scope?: "workflow" | "stage" | "task" | undefined;
6571
- state: string;
6571
+ field: string;
6572
6572
  };
6573
6573
  value: SourceInternal;
6574
6574
  }
6575
6575
  | {
6576
- type: "state.unset";
6576
+ type: "field.unset";
6577
6577
  target: {
6578
6578
  scope?: "workflow" | "stage" | "task" | undefined;
6579
- state: string;
6579
+ field: string;
6580
6580
  };
6581
6581
  }
6582
6582
  | {
6583
- type: "state.append";
6583
+ type: "field.append";
6584
6584
  target: {
6585
6585
  scope?: "workflow" | "stage" | "task" | undefined;
6586
- state: string;
6586
+ field: string;
6587
6587
  };
6588
6588
  value: SourceInternal;
6589
6589
  }
6590
6590
  | {
6591
- type: "state.updateWhere";
6591
+ type: "field.updateWhere";
6592
6592
  target: {
6593
6593
  scope?: "workflow" | "stage" | "task" | undefined;
6594
- state: string;
6594
+ field: string;
6595
6595
  };
6596
6596
  where: OpPredicateInternal;
6597
6597
  value: SourceInternal;
6598
6598
  }
6599
6599
  | {
6600
- type: "state.removeWhere";
6600
+ type: "field.removeWhere";
6601
6601
  target: {
6602
6602
  scope?: "workflow" | "stage" | "task" | undefined;
6603
- state: string;
6603
+ field: string;
6604
6604
  };
6605
6605
  where: OpPredicateInternal;
6606
6606
  }
@@ -6670,7 +6670,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6670
6670
  | "stage"
6671
6671
  | "task"
6672
6672
  | undefined;
6673
- state: string;
6673
+ field: string;
6674
6674
  };
6675
6675
  value: SourceInternal;
6676
6676
  stampFields?:
@@ -6681,62 +6681,62 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6681
6681
  | undefined;
6682
6682
  }
6683
6683
  | {
6684
- type: "state.set";
6684
+ type: "field.set";
6685
6685
  target: {
6686
6686
  scope?:
6687
6687
  | "workflow"
6688
6688
  | "stage"
6689
6689
  | "task"
6690
6690
  | undefined;
6691
- state: string;
6691
+ field: string;
6692
6692
  };
6693
6693
  value: SourceInternal;
6694
6694
  }
6695
6695
  | {
6696
- type: "state.unset";
6696
+ type: "field.unset";
6697
6697
  target: {
6698
6698
  scope?:
6699
6699
  | "workflow"
6700
6700
  | "stage"
6701
6701
  | "task"
6702
6702
  | undefined;
6703
- state: string;
6703
+ field: string;
6704
6704
  };
6705
6705
  }
6706
6706
  | {
6707
- type: "state.append";
6707
+ type: "field.append";
6708
6708
  target: {
6709
6709
  scope?:
6710
6710
  | "workflow"
6711
6711
  | "stage"
6712
6712
  | "task"
6713
6713
  | undefined;
6714
- state: string;
6714
+ field: string;
6715
6715
  };
6716
6716
  value: SourceInternal;
6717
6717
  }
6718
6718
  | {
6719
- type: "state.updateWhere";
6719
+ type: "field.updateWhere";
6720
6720
  target: {
6721
6721
  scope?:
6722
6722
  | "workflow"
6723
6723
  | "stage"
6724
6724
  | "task"
6725
6725
  | undefined;
6726
- state: string;
6726
+ field: string;
6727
6727
  };
6728
6728
  where: OpPredicateInternal;
6729
6729
  value: SourceInternal;
6730
6730
  }
6731
6731
  | {
6732
- type: "state.removeWhere";
6732
+ type: "field.removeWhere";
6733
6733
  target: {
6734
6734
  scope?:
6735
6735
  | "workflow"
6736
6736
  | "stage"
6737
6737
  | "task"
6738
6738
  | undefined;
6739
- state: string;
6739
+ field: string;
6740
6740
  };
6741
6741
  where: OpPredicateInternal;
6742
6742
  }
@@ -6765,7 +6765,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6765
6765
  name: string;
6766
6766
  title?: string | undefined;
6767
6767
  description?: string | undefined;
6768
- state:
6768
+ field:
6769
6769
  | string
6770
6770
  | {
6771
6771
  scope?:
@@ -6773,7 +6773,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6773
6773
  | "stage"
6774
6774
  | "task"
6775
6775
  | undefined;
6776
- state: string;
6776
+ field: string;
6777
6777
  };
6778
6778
  roles?: string[] | undefined;
6779
6779
  filter?: string | undefined;
@@ -6834,7 +6834,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6834
6834
  | undefined;
6835
6835
  }
6836
6836
  | undefined;
6837
- state?:
6837
+ fields?:
6838
6838
  | (
6839
6839
  | {
6840
6840
  type:
@@ -6881,7 +6881,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6881
6881
  type: "audit";
6882
6882
  target: {
6883
6883
  scope?: "workflow" | "stage" | "task" | undefined;
6884
- state: string;
6884
+ field: string;
6885
6885
  };
6886
6886
  value: SourceInternal;
6887
6887
  stampFields?:
@@ -6892,42 +6892,42 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6892
6892
  | undefined;
6893
6893
  }
6894
6894
  | {
6895
- type: "state.set";
6895
+ type: "field.set";
6896
6896
  target: {
6897
6897
  scope?: "workflow" | "stage" | "task" | undefined;
6898
- state: string;
6898
+ field: string;
6899
6899
  };
6900
6900
  value: SourceInternal;
6901
6901
  }
6902
6902
  | {
6903
- type: "state.unset";
6903
+ type: "field.unset";
6904
6904
  target: {
6905
6905
  scope?: "workflow" | "stage" | "task" | undefined;
6906
- state: string;
6906
+ field: string;
6907
6907
  };
6908
6908
  }
6909
6909
  | {
6910
- type: "state.append";
6910
+ type: "field.append";
6911
6911
  target: {
6912
6912
  scope?: "workflow" | "stage" | "task" | undefined;
6913
- state: string;
6913
+ field: string;
6914
6914
  };
6915
6915
  value: SourceInternal;
6916
6916
  }
6917
6917
  | {
6918
- type: "state.updateWhere";
6918
+ type: "field.updateWhere";
6919
6919
  target: {
6920
6920
  scope?: "workflow" | "stage" | "task" | undefined;
6921
- state: string;
6921
+ field: string;
6922
6922
  };
6923
6923
  where: OpPredicateInternal;
6924
6924
  value: SourceInternal;
6925
6925
  }
6926
6926
  | {
6927
- type: "state.removeWhere";
6927
+ type: "field.removeWhere";
6928
6928
  target: {
6929
6929
  scope?: "workflow" | "stage" | "task" | undefined;
6930
- state: string;
6930
+ field: string;
6931
6931
  };
6932
6932
  where: OpPredicateInternal;
6933
6933
  }
@@ -6977,7 +6977,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6977
6977
  | undefined;
6978
6978
  }[]
6979
6979
  | undefined;
6980
- state?:
6980
+ fields?:
6981
6981
  | (
6982
6982
  | {
6983
6983
  type:
@@ -7087,16 +7087,16 @@ export declare function defineEffectDescriptor(
7087
7087
  descriptor: EffectDescriptor,
7088
7088
  ): EffectDescriptor;
7089
7089
 
7090
+ export declare function defineField(
7091
+ entry: AuthoringFieldEntry,
7092
+ ): AuthoringFieldEntry;
7093
+
7090
7094
  export declare function defineGuard(guard: Guard): Guard;
7091
7095
 
7092
7096
  export declare function defineOp(op: AuthoringOp): AuthoringOp;
7093
7097
 
7094
7098
  export declare function defineStage(stage: AuthoringStage): AuthoringStage;
7095
7099
 
7096
- export declare function defineState(
7097
- entry: AuthoringStateEntry,
7098
- ): AuthoringStateEntry;
7099
-
7100
7100
  export declare function defineTask(task: AuthoringTask): AuthoringTask;
7101
7101
 
7102
7102
  export declare function defineTransition(
@@ -7187,7 +7187,7 @@ declare const EffectSchema: v.StrictObjectSchema<
7187
7187
  * deploy like any other.
7188
7188
  *
7189
7189
  * ```ts
7190
- * const regulated = (kinds: string[]) => groq`$state.subject.category in ${kinds}`
7190
+ * const regulated = (kinds: string[]) => groq`$fields.subject.category in ${kinds}`
7191
7191
  * defineTask({ name: "legal", filter: regulated(["finance", "health"]), … })
7192
7192
  * ```
7193
7193
  */
@@ -7226,7 +7226,7 @@ declare const GuardSchema: v.StrictObjectSchema<
7226
7226
  >,
7227
7227
  undefined
7228
7228
  >;
7229
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
7229
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
7230
7230
  readonly idRefs: v.OptionalSchema<
7231
7231
  v.ArraySchema<
7232
7232
  v.SchemaWithPipe<
@@ -7279,12 +7279,12 @@ declare const GuardSchema: v.StrictObjectSchema<
7279
7279
  */
7280
7280
  readonly predicate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7281
7281
  /**
7282
- * Projected workflow state the predicate reads as `guard.metadata.*` —
7283
- * the only bridge from the lake eval context (which cannot see `$state`)
7284
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
7282
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
7283
+ * the only bridge from the lake eval context (which cannot see `$fields`)
7284
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
7285
7285
  * the guard mini-language — `"$self"`, `"$now"`, or
7286
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
7287
- * re-synced by the post-state-op guard refresh.
7286
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
7287
+ * re-synced by the post-field-op guard refresh.
7288
7288
  */
7289
7289
  readonly metadata: v.OptionalSchema<
7290
7290
  v.RecordSchema<
@@ -7357,9 +7357,9 @@ declare type SourceInternal =
7357
7357
  type: "stage";
7358
7358
  }
7359
7359
  | {
7360
- type: "stateRead";
7360
+ type: "fieldRead";
7361
7361
  scope?: "workflow" | "stage" | undefined;
7362
- state: string;
7362
+ field: string;
7363
7363
  path?: string | undefined;
7364
7364
  }
7365
7365
  | {
@@ -7405,7 +7405,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7405
7405
  * never started cold from a picker. Omitted ⇒ `'workflow'` (startable).
7406
7406
  * Advisory: consumers filter their start pickers on it (see
7407
7407
  * {@link isStartableDefinition}); the engine does NOT refuse a
7408
- * `startInstance` on a `'child'` def — load-bearing `required` state is the
7408
+ * `startInstance` on a `'child'` def — load-bearing `required` field is the
7409
7409
  * runtime backstop.
7410
7410
  */
7411
7411
  role: v.OptionalSchema<
@@ -7422,8 +7422,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7422
7422
  v.MinLengthAction<string, 1, "must be a non-empty string">,
7423
7423
  ]
7424
7424
  >;
7425
- /** Workflow-scope state entries. Persist for the instance lifetime. */
7426
- state: v.OptionalSchema<
7425
+ /** Workflow-scope field entries. Persist for the instance lifetime. */
7426
+ fields: v.OptionalSchema<
7427
7427
  v.ArraySchema<
7428
7428
  v.StrictObjectSchema<
7429
7429
  {
@@ -7455,7 +7455,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7455
7455
  description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
7456
7456
  /**
7457
7457
  * When true, the caller MUST supply this entry at start (via
7458
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
7458
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
7459
7459
  * missing required entry throws rather than silently defaulting to
7460
7460
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
7461
7461
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -7626,7 +7626,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7626
7626
  v.StrictObjectSchema<
7627
7627
  {
7628
7628
  readonly type: v.LiteralSchema<
7629
- "state.set",
7629
+ "field.set",
7630
7630
  undefined
7631
7631
  >;
7632
7632
  readonly target: v.StrictObjectSchema<
@@ -7635,7 +7635,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7635
7635
  readonly ["workflow", "stage", "task"],
7636
7636
  `Invalid option: expected one of ${string}`
7637
7637
  >;
7638
- readonly state: v.SchemaWithPipe<
7638
+ readonly field: v.SchemaWithPipe<
7639
7639
  readonly [
7640
7640
  v.StringSchema<undefined>,
7641
7641
  v.MinLengthAction<
@@ -7655,7 +7655,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7655
7655
  v.StrictObjectSchema<
7656
7656
  {
7657
7657
  readonly type: v.LiteralSchema<
7658
- "state.unset",
7658
+ "field.unset",
7659
7659
  undefined
7660
7660
  >;
7661
7661
  readonly target: v.StrictObjectSchema<
@@ -7664,7 +7664,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7664
7664
  readonly ["workflow", "stage", "task"],
7665
7665
  `Invalid option: expected one of ${string}`
7666
7666
  >;
7667
- readonly state: v.SchemaWithPipe<
7667
+ readonly field: v.SchemaWithPipe<
7668
7668
  readonly [
7669
7669
  v.StringSchema<undefined>,
7670
7670
  v.MinLengthAction<
@@ -7683,7 +7683,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7683
7683
  v.StrictObjectSchema<
7684
7684
  {
7685
7685
  readonly type: v.LiteralSchema<
7686
- "state.append",
7686
+ "field.append",
7687
7687
  undefined
7688
7688
  >;
7689
7689
  readonly target: v.StrictObjectSchema<
@@ -7692,7 +7692,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7692
7692
  readonly ["workflow", "stage", "task"],
7693
7693
  `Invalid option: expected one of ${string}`
7694
7694
  >;
7695
- readonly state: v.SchemaWithPipe<
7695
+ readonly field: v.SchemaWithPipe<
7696
7696
  readonly [
7697
7697
  v.StringSchema<undefined>,
7698
7698
  v.MinLengthAction<
@@ -7712,7 +7712,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7712
7712
  v.StrictObjectSchema<
7713
7713
  {
7714
7714
  readonly type: v.LiteralSchema<
7715
- "state.updateWhere",
7715
+ "field.updateWhere",
7716
7716
  undefined
7717
7717
  >;
7718
7718
  readonly target: v.StrictObjectSchema<
@@ -7721,7 +7721,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7721
7721
  readonly ["workflow", "stage", "task"],
7722
7722
  `Invalid option: expected one of ${string}`
7723
7723
  >;
7724
- readonly state: v.SchemaWithPipe<
7724
+ readonly field: v.SchemaWithPipe<
7725
7725
  readonly [
7726
7726
  v.StringSchema<undefined>,
7727
7727
  v.MinLengthAction<
@@ -7742,7 +7742,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7742
7742
  v.StrictObjectSchema<
7743
7743
  {
7744
7744
  readonly type: v.LiteralSchema<
7745
- "state.removeWhere",
7745
+ "field.removeWhere",
7746
7746
  undefined
7747
7747
  >;
7748
7748
  readonly target: v.StrictObjectSchema<
@@ -7751,7 +7751,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7751
7751
  readonly ["workflow", "stage", "task"],
7752
7752
  `Invalid option: expected one of ${string}`
7753
7753
  >;
7754
- readonly state: v.SchemaWithPipe<
7754
+ readonly field: v.SchemaWithPipe<
7755
7755
  readonly [
7756
7756
  v.StringSchema<undefined>,
7757
7757
  v.MinLengthAction<
@@ -7955,7 +7955,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7955
7955
  v.StrictObjectSchema<
7956
7956
  {
7957
7957
  readonly type: v.LiteralSchema<
7958
- "state.set",
7958
+ "field.set",
7959
7959
  undefined
7960
7960
  >;
7961
7961
  readonly target: v.StrictObjectSchema<
@@ -7968,7 +7968,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7968
7968
  ],
7969
7969
  `Invalid option: expected one of ${string}`
7970
7970
  >;
7971
- readonly state: v.SchemaWithPipe<
7971
+ readonly field: v.SchemaWithPipe<
7972
7972
  readonly [
7973
7973
  v.StringSchema<undefined>,
7974
7974
  v.MinLengthAction<
@@ -7988,7 +7988,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
7988
7988
  v.StrictObjectSchema<
7989
7989
  {
7990
7990
  readonly type: v.LiteralSchema<
7991
- "state.unset",
7991
+ "field.unset",
7992
7992
  undefined
7993
7993
  >;
7994
7994
  readonly target: v.StrictObjectSchema<
@@ -8001,7 +8001,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8001
8001
  ],
8002
8002
  `Invalid option: expected one of ${string}`
8003
8003
  >;
8004
- readonly state: v.SchemaWithPipe<
8004
+ readonly field: v.SchemaWithPipe<
8005
8005
  readonly [
8006
8006
  v.StringSchema<undefined>,
8007
8007
  v.MinLengthAction<
@@ -8020,7 +8020,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8020
8020
  v.StrictObjectSchema<
8021
8021
  {
8022
8022
  readonly type: v.LiteralSchema<
8023
- "state.append",
8023
+ "field.append",
8024
8024
  undefined
8025
8025
  >;
8026
8026
  readonly target: v.StrictObjectSchema<
@@ -8033,7 +8033,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8033
8033
  ],
8034
8034
  `Invalid option: expected one of ${string}`
8035
8035
  >;
8036
- readonly state: v.SchemaWithPipe<
8036
+ readonly field: v.SchemaWithPipe<
8037
8037
  readonly [
8038
8038
  v.StringSchema<undefined>,
8039
8039
  v.MinLengthAction<
@@ -8053,7 +8053,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8053
8053
  v.StrictObjectSchema<
8054
8054
  {
8055
8055
  readonly type: v.LiteralSchema<
8056
- "state.updateWhere",
8056
+ "field.updateWhere",
8057
8057
  undefined
8058
8058
  >;
8059
8059
  readonly target: v.StrictObjectSchema<
@@ -8066,7 +8066,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8066
8066
  ],
8067
8067
  `Invalid option: expected one of ${string}`
8068
8068
  >;
8069
- readonly state: v.SchemaWithPipe<
8069
+ readonly field: v.SchemaWithPipe<
8070
8070
  readonly [
8071
8071
  v.StringSchema<undefined>,
8072
8072
  v.MinLengthAction<
@@ -8087,7 +8087,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8087
8087
  v.StrictObjectSchema<
8088
8088
  {
8089
8089
  readonly type: v.LiteralSchema<
8090
- "state.removeWhere",
8090
+ "field.removeWhere",
8091
8091
  undefined
8092
8092
  >;
8093
8093
  readonly target: v.StrictObjectSchema<
@@ -8100,7 +8100,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8100
8100
  ],
8101
8101
  `Invalid option: expected one of ${string}`
8102
8102
  >;
8103
- readonly state: v.SchemaWithPipe<
8103
+ readonly field: v.SchemaWithPipe<
8104
8104
  readonly [
8105
8105
  v.StringSchema<undefined>,
8106
8106
  v.MinLengthAction<
@@ -8265,7 +8265,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8265
8265
  },
8266
8266
  undefined
8267
8267
  >;
8268
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
8268
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
8269
8269
  readonly with: v.OptionalSchema<
8270
8270
  v.RecordSchema<
8271
8271
  v.SchemaWithPipe<
@@ -8328,8 +8328,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8328
8328
  >,
8329
8329
  undefined
8330
8330
  >;
8331
- /** Task-scoped state entries. Resolved at task activation time. */
8332
- state: v.OptionalSchema<
8331
+ /** Task-scoped field entries. Resolved at task activation time. */
8332
+ fields: v.OptionalSchema<
8333
8333
  v.ArraySchema<
8334
8334
  v.StrictObjectSchema<
8335
8335
  {
@@ -8367,7 +8367,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8367
8367
  >;
8368
8368
  /**
8369
8369
  * When true, the caller MUST supply this entry at start (via
8370
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
8370
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
8371
8371
  * missing required entry throws rather than silently defaulting to
8372
8372
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
8373
8373
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -8453,7 +8453,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8453
8453
  >,
8454
8454
  ]
8455
8455
  >;
8456
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
8456
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
8457
8457
  ops: v.OptionalSchema<
8458
8458
  v.ArraySchema<
8459
8459
  v.VariantSchema<
@@ -8462,7 +8462,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8462
8462
  v.StrictObjectSchema<
8463
8463
  {
8464
8464
  readonly type: v.LiteralSchema<
8465
- "state.set",
8465
+ "field.set",
8466
8466
  undefined
8467
8467
  >;
8468
8468
  readonly target: v.StrictObjectSchema<
@@ -8471,7 +8471,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8471
8471
  readonly ["workflow", "stage", "task"],
8472
8472
  `Invalid option: expected one of ${string}`
8473
8473
  >;
8474
- readonly state: v.SchemaWithPipe<
8474
+ readonly field: v.SchemaWithPipe<
8475
8475
  readonly [
8476
8476
  v.StringSchema<undefined>,
8477
8477
  v.MinLengthAction<
@@ -8491,7 +8491,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8491
8491
  v.StrictObjectSchema<
8492
8492
  {
8493
8493
  readonly type: v.LiteralSchema<
8494
- "state.unset",
8494
+ "field.unset",
8495
8495
  undefined
8496
8496
  >;
8497
8497
  readonly target: v.StrictObjectSchema<
@@ -8500,7 +8500,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8500
8500
  readonly ["workflow", "stage", "task"],
8501
8501
  `Invalid option: expected one of ${string}`
8502
8502
  >;
8503
- readonly state: v.SchemaWithPipe<
8503
+ readonly field: v.SchemaWithPipe<
8504
8504
  readonly [
8505
8505
  v.StringSchema<undefined>,
8506
8506
  v.MinLengthAction<
@@ -8519,7 +8519,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8519
8519
  v.StrictObjectSchema<
8520
8520
  {
8521
8521
  readonly type: v.LiteralSchema<
8522
- "state.append",
8522
+ "field.append",
8523
8523
  undefined
8524
8524
  >;
8525
8525
  readonly target: v.StrictObjectSchema<
@@ -8528,7 +8528,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8528
8528
  readonly ["workflow", "stage", "task"],
8529
8529
  `Invalid option: expected one of ${string}`
8530
8530
  >;
8531
- readonly state: v.SchemaWithPipe<
8531
+ readonly field: v.SchemaWithPipe<
8532
8532
  readonly [
8533
8533
  v.StringSchema<undefined>,
8534
8534
  v.MinLengthAction<
@@ -8548,7 +8548,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8548
8548
  v.StrictObjectSchema<
8549
8549
  {
8550
8550
  readonly type: v.LiteralSchema<
8551
- "state.updateWhere",
8551
+ "field.updateWhere",
8552
8552
  undefined
8553
8553
  >;
8554
8554
  readonly target: v.StrictObjectSchema<
@@ -8557,7 +8557,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8557
8557
  readonly ["workflow", "stage", "task"],
8558
8558
  `Invalid option: expected one of ${string}`
8559
8559
  >;
8560
- readonly state: v.SchemaWithPipe<
8560
+ readonly field: v.SchemaWithPipe<
8561
8561
  readonly [
8562
8562
  v.StringSchema<undefined>,
8563
8563
  v.MinLengthAction<
@@ -8578,7 +8578,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8578
8578
  v.StrictObjectSchema<
8579
8579
  {
8580
8580
  readonly type: v.LiteralSchema<
8581
- "state.removeWhere",
8581
+ "field.removeWhere",
8582
8582
  undefined
8583
8583
  >;
8584
8584
  readonly target: v.StrictObjectSchema<
@@ -8587,7 +8587,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8587
8587
  readonly ["workflow", "stage", "task"],
8588
8588
  `Invalid option: expected one of ${string}`
8589
8589
  >;
8590
- readonly state: v.SchemaWithPipe<
8590
+ readonly field: v.SchemaWithPipe<
8591
8591
  readonly [
8592
8592
  v.StringSchema<undefined>,
8593
8593
  v.MinLengthAction<
@@ -8719,7 +8719,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8719
8719
  >,
8720
8720
  undefined
8721
8721
  >;
8722
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8722
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8723
8723
  readonly idRefs: v.OptionalSchema<
8724
8724
  v.ArraySchema<
8725
8725
  v.SchemaWithPipe<
@@ -8795,12 +8795,12 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8795
8795
  undefined
8796
8796
  >;
8797
8797
  /**
8798
- * Projected workflow state the predicate reads as `guard.metadata.*` —
8799
- * the only bridge from the lake eval context (which cannot see `$state`)
8800
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
8798
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
8799
+ * the only bridge from the lake eval context (which cannot see `$fields`)
8800
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
8801
8801
  * the guard mini-language — `"$self"`, `"$now"`, or
8802
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
8803
- * re-synced by the post-state-op guard refresh.
8802
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
8803
+ * re-synced by the post-field-op guard refresh.
8804
8804
  */
8805
8805
  readonly metadata: v.OptionalSchema<
8806
8806
  v.RecordSchema<
@@ -8835,8 +8835,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8835
8835
  >,
8836
8836
  undefined
8837
8837
  >;
8838
- /** Stage-scoped state entries. Resolved at stage entry. */
8839
- state: v.OptionalSchema<
8838
+ /** Stage-scoped field entries. Resolved at stage entry. */
8839
+ fields: v.OptionalSchema<
8840
8840
  v.ArraySchema<
8841
8841
  v.StrictObjectSchema<
8842
8842
  {
@@ -8874,7 +8874,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8874
8874
  >;
8875
8875
  /**
8876
8876
  * When true, the caller MUST supply this entry at start (via
8877
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
8877
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
8878
8878
  * missing required entry throws rather than silently defaulting to
8879
8879
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
8880
8880
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -8983,42 +8983,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
8983
8983
  | "failed";
8984
8984
  }
8985
8985
  | {
8986
- type: "state.set";
8986
+ type: "field.set";
8987
8987
  target: {
8988
8988
  scope: "workflow" | "stage" | "task";
8989
- state: string;
8989
+ field: string;
8990
8990
  };
8991
8991
  value: SourceInternal;
8992
8992
  }
8993
8993
  | {
8994
- type: "state.unset";
8994
+ type: "field.unset";
8995
8995
  target: {
8996
8996
  scope: "workflow" | "stage" | "task";
8997
- state: string;
8997
+ field: string;
8998
8998
  };
8999
8999
  }
9000
9000
  | {
9001
- type: "state.append";
9001
+ type: "field.append";
9002
9002
  target: {
9003
9003
  scope: "workflow" | "stage" | "task";
9004
- state: string;
9004
+ field: string;
9005
9005
  };
9006
9006
  value: SourceInternal;
9007
9007
  }
9008
9008
  | {
9009
- type: "state.updateWhere";
9009
+ type: "field.updateWhere";
9010
9010
  target: {
9011
9011
  scope: "workflow" | "stage" | "task";
9012
- state: string;
9012
+ field: string;
9013
9013
  };
9014
9014
  where: OpPredicateInternal;
9015
9015
  value: SourceInternal;
9016
9016
  }
9017
9017
  | {
9018
- type: "state.removeWhere";
9018
+ type: "field.removeWhere";
9019
9019
  target: {
9020
9020
  scope: "workflow" | "stage" | "task";
9021
- state: string;
9021
+ field: string;
9022
9022
  };
9023
9023
  where: OpPredicateInternal;
9024
9024
  }
@@ -9078,42 +9078,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
9078
9078
  | "failed";
9079
9079
  }
9080
9080
  | {
9081
- type: "state.set";
9081
+ type: "field.set";
9082
9082
  target: {
9083
9083
  scope: "workflow" | "stage" | "task";
9084
- state: string;
9084
+ field: string;
9085
9085
  };
9086
9086
  value: SourceInternal;
9087
9087
  }
9088
9088
  | {
9089
- type: "state.unset";
9089
+ type: "field.unset";
9090
9090
  target: {
9091
9091
  scope: "workflow" | "stage" | "task";
9092
- state: string;
9092
+ field: string;
9093
9093
  };
9094
9094
  }
9095
9095
  | {
9096
- type: "state.append";
9096
+ type: "field.append";
9097
9097
  target: {
9098
9098
  scope: "workflow" | "stage" | "task";
9099
- state: string;
9099
+ field: string;
9100
9100
  };
9101
9101
  value: SourceInternal;
9102
9102
  }
9103
9103
  | {
9104
- type: "state.updateWhere";
9104
+ type: "field.updateWhere";
9105
9105
  target: {
9106
9106
  scope: "workflow" | "stage" | "task";
9107
- state: string;
9107
+ field: string;
9108
9108
  };
9109
9109
  where: OpPredicateInternal;
9110
9110
  value: SourceInternal;
9111
9111
  }
9112
9112
  | {
9113
- type: "state.removeWhere";
9113
+ type: "field.removeWhere";
9114
9114
  target: {
9115
9115
  scope: "workflow" | "stage" | "task";
9116
- state: string;
9116
+ field: string;
9117
9117
  };
9118
9118
  where: OpPredicateInternal;
9119
9119
  }
@@ -9157,7 +9157,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
9157
9157
  | undefined;
9158
9158
  }
9159
9159
  | undefined;
9160
- state?:
9160
+ fields?:
9161
9161
  | {
9162
9162
  type:
9163
9163
  | "doc.ref"
@@ -9193,42 +9193,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
9193
9193
  ops?:
9194
9194
  | (
9195
9195
  | {
9196
- type: "state.set";
9196
+ type: "field.set";
9197
9197
  target: {
9198
9198
  scope: "workflow" | "stage" | "task";
9199
- state: string;
9199
+ field: string;
9200
9200
  };
9201
9201
  value: SourceInternal;
9202
9202
  }
9203
9203
  | {
9204
- type: "state.unset";
9204
+ type: "field.unset";
9205
9205
  target: {
9206
9206
  scope: "workflow" | "stage" | "task";
9207
- state: string;
9207
+ field: string;
9208
9208
  };
9209
9209
  }
9210
9210
  | {
9211
- type: "state.append";
9211
+ type: "field.append";
9212
9212
  target: {
9213
9213
  scope: "workflow" | "stage" | "task";
9214
- state: string;
9214
+ field: string;
9215
9215
  };
9216
9216
  value: SourceInternal;
9217
9217
  }
9218
9218
  | {
9219
- type: "state.updateWhere";
9219
+ type: "field.updateWhere";
9220
9220
  target: {
9221
9221
  scope: "workflow" | "stage" | "task";
9222
- state: string;
9222
+ field: string;
9223
9223
  };
9224
9224
  where: OpPredicateInternal;
9225
9225
  value: SourceInternal;
9226
9226
  }
9227
9227
  | {
9228
- type: "state.removeWhere";
9228
+ type: "field.removeWhere";
9229
9229
  target: {
9230
9230
  scope: "workflow" | "stage" | "task";
9231
- state: string;
9231
+ field: string;
9232
9232
  };
9233
9233
  where: OpPredicateInternal;
9234
9234
  }
@@ -9278,7 +9278,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
9278
9278
  | undefined;
9279
9279
  }[]
9280
9280
  | undefined;
9281
- state?:
9281
+ fields?:
9282
9282
  | {
9283
9283
  type:
9284
9284
  | "doc.ref"