@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/index.d.cts CHANGED
@@ -260,7 +260,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
260
260
  [
261
261
  v.StrictObjectSchema<
262
262
  {
263
- readonly type: v.LiteralSchema<"state.set", undefined>;
263
+ readonly type: v.LiteralSchema<"field.set", undefined>;
264
264
  readonly target: v.StrictObjectSchema<
265
265
  {
266
266
  readonly scope: v.OptionalSchema<
@@ -270,7 +270,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
270
270
  >,
271
271
  undefined
272
272
  >;
273
- readonly state: v.SchemaWithPipe<
273
+ readonly field: v.SchemaWithPipe<
274
274
  readonly [
275
275
  v.StringSchema<undefined>,
276
276
  v.MinLengthAction<
@@ -289,7 +289,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
289
289
  >,
290
290
  v.StrictObjectSchema<
291
291
  {
292
- readonly type: v.LiteralSchema<"state.unset", undefined>;
292
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
293
293
  readonly target: v.StrictObjectSchema<
294
294
  {
295
295
  readonly scope: v.OptionalSchema<
@@ -299,7 +299,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
299
299
  >,
300
300
  undefined
301
301
  >;
302
- readonly state: v.SchemaWithPipe<
302
+ readonly field: v.SchemaWithPipe<
303
303
  readonly [
304
304
  v.StringSchema<undefined>,
305
305
  v.MinLengthAction<
@@ -317,7 +317,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
317
317
  >,
318
318
  v.StrictObjectSchema<
319
319
  {
320
- readonly type: v.LiteralSchema<"state.append", undefined>;
320
+ readonly type: v.LiteralSchema<"field.append", undefined>;
321
321
  readonly target: v.StrictObjectSchema<
322
322
  {
323
323
  readonly scope: v.OptionalSchema<
@@ -327,7 +327,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
327
327
  >,
328
328
  undefined
329
329
  >;
330
- readonly state: v.SchemaWithPipe<
330
+ readonly field: v.SchemaWithPipe<
331
331
  readonly [
332
332
  v.StringSchema<undefined>,
333
333
  v.MinLengthAction<
@@ -347,7 +347,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
347
347
  v.StrictObjectSchema<
348
348
  {
349
349
  readonly type: v.LiteralSchema<
350
- "state.updateWhere",
350
+ "field.updateWhere",
351
351
  undefined
352
352
  >;
353
353
  readonly target: v.StrictObjectSchema<
@@ -359,7 +359,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
359
359
  >,
360
360
  undefined
361
361
  >;
362
- readonly state: v.SchemaWithPipe<
362
+ readonly field: v.SchemaWithPipe<
363
363
  readonly [
364
364
  v.StringSchema<undefined>,
365
365
  v.MinLengthAction<
@@ -380,7 +380,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
380
380
  v.StrictObjectSchema<
381
381
  {
382
382
  readonly type: v.LiteralSchema<
383
- "state.removeWhere",
383
+ "field.removeWhere",
384
384
  undefined
385
385
  >;
386
386
  readonly target: v.StrictObjectSchema<
@@ -392,7 +392,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
392
392
  >,
393
393
  undefined
394
394
  >;
395
- readonly state: v.SchemaWithPipe<
395
+ readonly field: v.SchemaWithPipe<
396
396
  readonly [
397
397
  v.StringSchema<undefined>,
398
398
  v.MinLengthAction<
@@ -450,7 +450,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
450
450
  >,
451
451
  undefined
452
452
  >;
453
- readonly state: v.SchemaWithPipe<
453
+ readonly field: v.SchemaWithPipe<
454
454
  readonly [
455
455
  v.StringSchema<undefined>,
456
456
  v.MinLengthAction<
@@ -577,7 +577,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
577
577
  v.StringSchema<undefined>,
578
578
  undefined
579
579
  >;
580
- readonly state: v.UnionSchema<
580
+ readonly field: v.UnionSchema<
581
581
  [
582
582
  v.SchemaWithPipe<
583
583
  readonly [
@@ -594,7 +594,7 @@ declare const AuthoringActionSchema: v.UnionSchema<
594
594
  >,
595
595
  undefined
596
596
  >;
597
- readonly state: v.SchemaWithPipe<
597
+ readonly field: v.SchemaWithPipe<
598
598
  readonly [
599
599
  v.StringSchema<undefined>,
600
600
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -761,6 +761,92 @@ declare const AuthoringEditableSchema: v.UnionSchema<
761
761
  undefined
762
762
  >;
763
763
 
764
+ export declare type AuthoringFieldEntry = v.InferOutput<
765
+ typeof AuthoringFieldEntrySchema
766
+ >;
767
+
768
+ declare const AuthoringFieldEntrySchema: v.UnionSchema<
769
+ [
770
+ v.StrictObjectSchema<
771
+ {
772
+ type: v.PicklistSchema<
773
+ readonly [
774
+ "doc.ref",
775
+ "doc.refs",
776
+ "release.ref",
777
+ "query",
778
+ "value.string",
779
+ "value.url",
780
+ "value.number",
781
+ "value.boolean",
782
+ "value.dateTime",
783
+ "value.actor",
784
+ "checklist",
785
+ "notes",
786
+ "assignees",
787
+ ],
788
+ `Invalid option: expected one of ${string}`
789
+ >;
790
+ name: v.SchemaWithPipe<
791
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
792
+ >;
793
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
794
+ description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
795
+ /**
796
+ * When true, the caller MUST supply this entry at start (via
797
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
798
+ * missing required entry throws rather than silently defaulting to
799
+ * `null`/`[]` — the same fail-fast an action's `required` param gets.
800
+ * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
801
+ */
802
+ required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
803
+ source: v.GenericSchema<SourceInternal>;
804
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
805
+ editable: v.OptionalSchema<
806
+ v.UnionSchema<
807
+ [
808
+ v.LiteralSchema<true, undefined>,
809
+ v.ArraySchema<
810
+ v.SchemaWithPipe<
811
+ readonly [
812
+ v.StringSchema<undefined>,
813
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
814
+ ]
815
+ >,
816
+ undefined
817
+ >,
818
+ v.SchemaWithPipe<
819
+ readonly [
820
+ v.StringSchema<undefined>,
821
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
822
+ ]
823
+ >,
824
+ ],
825
+ undefined
826
+ >,
827
+ undefined
828
+ >;
829
+ },
830
+ undefined
831
+ >,
832
+ v.StrictObjectSchema<
833
+ {
834
+ readonly type: v.LiteralSchema<"claim", undefined>;
835
+ readonly name: v.SchemaWithPipe<
836
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
837
+ >;
838
+ readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
839
+ readonly description: v.OptionalSchema<
840
+ v.StringSchema<undefined>,
841
+ undefined
842
+ >;
843
+ },
844
+ undefined
845
+ >,
846
+ ],
847
+ undefined
848
+ >;
849
+
764
850
  export declare type AuthoringStage = v.InferOutput<typeof AuthoringStageSchema>;
765
851
 
766
852
  declare const AuthoringStageSchema: v.StrictObjectSchema<
@@ -863,7 +949,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
863
949
  [
864
950
  v.StrictObjectSchema<
865
951
  {
866
- readonly type: v.LiteralSchema<"state.set", undefined>;
952
+ readonly type: v.LiteralSchema<"field.set", undefined>;
867
953
  readonly target: v.StrictObjectSchema<
868
954
  {
869
955
  readonly scope: v.OptionalSchema<
@@ -873,7 +959,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
873
959
  >,
874
960
  undefined
875
961
  >;
876
- readonly state: v.SchemaWithPipe<
962
+ readonly field: v.SchemaWithPipe<
877
963
  readonly [
878
964
  v.StringSchema<undefined>,
879
965
  v.MinLengthAction<
@@ -893,7 +979,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
893
979
  v.StrictObjectSchema<
894
980
  {
895
981
  readonly type: v.LiteralSchema<
896
- "state.unset",
982
+ "field.unset",
897
983
  undefined
898
984
  >;
899
985
  readonly target: v.StrictObjectSchema<
@@ -905,7 +991,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
905
991
  >,
906
992
  undefined
907
993
  >;
908
- readonly state: v.SchemaWithPipe<
994
+ readonly field: v.SchemaWithPipe<
909
995
  readonly [
910
996
  v.StringSchema<undefined>,
911
997
  v.MinLengthAction<
@@ -924,7 +1010,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
924
1010
  v.StrictObjectSchema<
925
1011
  {
926
1012
  readonly type: v.LiteralSchema<
927
- "state.append",
1013
+ "field.append",
928
1014
  undefined
929
1015
  >;
930
1016
  readonly target: v.StrictObjectSchema<
@@ -936,7 +1022,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
936
1022
  >,
937
1023
  undefined
938
1024
  >;
939
- readonly state: v.SchemaWithPipe<
1025
+ readonly field: v.SchemaWithPipe<
940
1026
  readonly [
941
1027
  v.StringSchema<undefined>,
942
1028
  v.MinLengthAction<
@@ -956,7 +1042,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
956
1042
  v.StrictObjectSchema<
957
1043
  {
958
1044
  readonly type: v.LiteralSchema<
959
- "state.updateWhere",
1045
+ "field.updateWhere",
960
1046
  undefined
961
1047
  >;
962
1048
  readonly target: v.StrictObjectSchema<
@@ -968,7 +1054,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
968
1054
  >,
969
1055
  undefined
970
1056
  >;
971
- readonly state: v.SchemaWithPipe<
1057
+ readonly field: v.SchemaWithPipe<
972
1058
  readonly [
973
1059
  v.StringSchema<undefined>,
974
1060
  v.MinLengthAction<
@@ -989,7 +1075,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
989
1075
  v.StrictObjectSchema<
990
1076
  {
991
1077
  readonly type: v.LiteralSchema<
992
- "state.removeWhere",
1078
+ "field.removeWhere",
993
1079
  undefined
994
1080
  >;
995
1081
  readonly target: v.StrictObjectSchema<
@@ -1001,7 +1087,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1001
1087
  >,
1002
1088
  undefined
1003
1089
  >;
1004
- readonly state: v.SchemaWithPipe<
1090
+ readonly field: v.SchemaWithPipe<
1005
1091
  readonly [
1006
1092
  v.StringSchema<undefined>,
1007
1093
  v.MinLengthAction<
@@ -1059,7 +1145,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1059
1145
  >,
1060
1146
  undefined
1061
1147
  >;
1062
- readonly state: v.SchemaWithPipe<
1148
+ readonly field: v.SchemaWithPipe<
1063
1149
  readonly [
1064
1150
  v.StringSchema<undefined>,
1065
1151
  v.MinLengthAction<
@@ -1288,7 +1374,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1288
1374
  v.StrictObjectSchema<
1289
1375
  {
1290
1376
  readonly type: v.LiteralSchema<
1291
- "state.set",
1377
+ "field.set",
1292
1378
  undefined
1293
1379
  >;
1294
1380
  readonly target: v.StrictObjectSchema<
@@ -1304,7 +1390,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1304
1390
  >,
1305
1391
  undefined
1306
1392
  >;
1307
- readonly state: v.SchemaWithPipe<
1393
+ readonly field: v.SchemaWithPipe<
1308
1394
  readonly [
1309
1395
  v.StringSchema<undefined>,
1310
1396
  v.MinLengthAction<
@@ -1324,7 +1410,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1324
1410
  v.StrictObjectSchema<
1325
1411
  {
1326
1412
  readonly type: v.LiteralSchema<
1327
- "state.unset",
1413
+ "field.unset",
1328
1414
  undefined
1329
1415
  >;
1330
1416
  readonly target: v.StrictObjectSchema<
@@ -1340,7 +1426,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1340
1426
  >,
1341
1427
  undefined
1342
1428
  >;
1343
- readonly state: v.SchemaWithPipe<
1429
+ readonly field: v.SchemaWithPipe<
1344
1430
  readonly [
1345
1431
  v.StringSchema<undefined>,
1346
1432
  v.MinLengthAction<
@@ -1359,7 +1445,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1359
1445
  v.StrictObjectSchema<
1360
1446
  {
1361
1447
  readonly type: v.LiteralSchema<
1362
- "state.append",
1448
+ "field.append",
1363
1449
  undefined
1364
1450
  >;
1365
1451
  readonly target: v.StrictObjectSchema<
@@ -1375,7 +1461,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1375
1461
  >,
1376
1462
  undefined
1377
1463
  >;
1378
- readonly state: v.SchemaWithPipe<
1464
+ readonly field: v.SchemaWithPipe<
1379
1465
  readonly [
1380
1466
  v.StringSchema<undefined>,
1381
1467
  v.MinLengthAction<
@@ -1395,7 +1481,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1395
1481
  v.StrictObjectSchema<
1396
1482
  {
1397
1483
  readonly type: v.LiteralSchema<
1398
- "state.updateWhere",
1484
+ "field.updateWhere",
1399
1485
  undefined
1400
1486
  >;
1401
1487
  readonly target: v.StrictObjectSchema<
@@ -1411,7 +1497,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1411
1497
  >,
1412
1498
  undefined
1413
1499
  >;
1414
- readonly state: v.SchemaWithPipe<
1500
+ readonly field: v.SchemaWithPipe<
1415
1501
  readonly [
1416
1502
  v.StringSchema<undefined>,
1417
1503
  v.MinLengthAction<
@@ -1432,7 +1518,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1432
1518
  v.StrictObjectSchema<
1433
1519
  {
1434
1520
  readonly type: v.LiteralSchema<
1435
- "state.removeWhere",
1521
+ "field.removeWhere",
1436
1522
  undefined
1437
1523
  >;
1438
1524
  readonly target: v.StrictObjectSchema<
@@ -1448,7 +1534,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1448
1534
  >,
1449
1535
  undefined
1450
1536
  >;
1451
- readonly state: v.SchemaWithPipe<
1537
+ readonly field: v.SchemaWithPipe<
1452
1538
  readonly [
1453
1539
  v.StringSchema<undefined>,
1454
1540
  v.MinLengthAction<
@@ -1516,7 +1602,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1516
1602
  >,
1517
1603
  undefined
1518
1604
  >;
1519
- readonly state: v.SchemaWithPipe<
1605
+ readonly field: v.SchemaWithPipe<
1520
1606
  readonly [
1521
1607
  v.StringSchema<undefined>,
1522
1608
  v.MinLengthAction<
@@ -1654,7 +1740,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1654
1740
  v.StringSchema<undefined>,
1655
1741
  undefined
1656
1742
  >;
1657
- readonly state: v.UnionSchema<
1743
+ readonly field: v.UnionSchema<
1658
1744
  [
1659
1745
  v.SchemaWithPipe<
1660
1746
  readonly [
@@ -1675,7 +1761,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1675
1761
  >,
1676
1762
  undefined
1677
1763
  >;
1678
- readonly state: v.SchemaWithPipe<
1764
+ readonly field: v.SchemaWithPipe<
1679
1765
  readonly [
1680
1766
  v.StringSchema<undefined>,
1681
1767
  v.MinLengthAction<
@@ -1878,7 +1964,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1878
1964
  },
1879
1965
  undefined
1880
1966
  >;
1881
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
1967
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
1882
1968
  readonly with: v.OptionalSchema<
1883
1969
  v.RecordSchema<
1884
1970
  v.SchemaWithPipe<
@@ -1941,8 +2027,8 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1941
2027
  >,
1942
2028
  undefined
1943
2029
  >;
1944
- /** Task-scoped state entries. Resolved at task activation time. */
1945
- state: v.OptionalSchema<
2030
+ /** Task-scoped field entries. Resolved at task activation time. */
2031
+ fields: v.OptionalSchema<
1946
2032
  v.ArraySchema<
1947
2033
  v.UnionSchema<
1948
2034
  [
@@ -1982,7 +2068,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
1982
2068
  >;
1983
2069
  /**
1984
2070
  * When true, the caller MUST supply this entry at start (via
1985
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2071
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
1986
2072
  * missing required entry throws rather than silently defaulting to
1987
2073
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
1988
2074
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -2089,7 +2175,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2089
2175
  >,
2090
2176
  undefined
2091
2177
  >;
2092
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
2178
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
2093
2179
  ops: v.OptionalSchema<
2094
2180
  v.ArraySchema<
2095
2181
  v.VariantSchema<
@@ -2097,7 +2183,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2097
2183
  [
2098
2184
  v.StrictObjectSchema<
2099
2185
  {
2100
- readonly type: v.LiteralSchema<"state.set", undefined>;
2186
+ readonly type: v.LiteralSchema<"field.set", undefined>;
2101
2187
  readonly target: v.StrictObjectSchema<
2102
2188
  {
2103
2189
  readonly scope: v.OptionalSchema<
@@ -2107,7 +2193,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2107
2193
  >,
2108
2194
  undefined
2109
2195
  >;
2110
- readonly state: v.SchemaWithPipe<
2196
+ readonly field: v.SchemaWithPipe<
2111
2197
  readonly [
2112
2198
  v.StringSchema<undefined>,
2113
2199
  v.MinLengthAction<
@@ -2127,7 +2213,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2127
2213
  v.StrictObjectSchema<
2128
2214
  {
2129
2215
  readonly type: v.LiteralSchema<
2130
- "state.unset",
2216
+ "field.unset",
2131
2217
  undefined
2132
2218
  >;
2133
2219
  readonly target: v.StrictObjectSchema<
@@ -2139,7 +2225,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2139
2225
  >,
2140
2226
  undefined
2141
2227
  >;
2142
- readonly state: v.SchemaWithPipe<
2228
+ readonly field: v.SchemaWithPipe<
2143
2229
  readonly [
2144
2230
  v.StringSchema<undefined>,
2145
2231
  v.MinLengthAction<
@@ -2158,7 +2244,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2158
2244
  v.StrictObjectSchema<
2159
2245
  {
2160
2246
  readonly type: v.LiteralSchema<
2161
- "state.append",
2247
+ "field.append",
2162
2248
  undefined
2163
2249
  >;
2164
2250
  readonly target: v.StrictObjectSchema<
@@ -2170,7 +2256,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2170
2256
  >,
2171
2257
  undefined
2172
2258
  >;
2173
- readonly state: v.SchemaWithPipe<
2259
+ readonly field: v.SchemaWithPipe<
2174
2260
  readonly [
2175
2261
  v.StringSchema<undefined>,
2176
2262
  v.MinLengthAction<
@@ -2190,7 +2276,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2190
2276
  v.StrictObjectSchema<
2191
2277
  {
2192
2278
  readonly type: v.LiteralSchema<
2193
- "state.updateWhere",
2279
+ "field.updateWhere",
2194
2280
  undefined
2195
2281
  >;
2196
2282
  readonly target: v.StrictObjectSchema<
@@ -2202,7 +2288,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2202
2288
  >,
2203
2289
  undefined
2204
2290
  >;
2205
- readonly state: v.SchemaWithPipe<
2291
+ readonly field: v.SchemaWithPipe<
2206
2292
  readonly [
2207
2293
  v.StringSchema<undefined>,
2208
2294
  v.MinLengthAction<
@@ -2223,7 +2309,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2223
2309
  v.StrictObjectSchema<
2224
2310
  {
2225
2311
  readonly type: v.LiteralSchema<
2226
- "state.removeWhere",
2312
+ "field.removeWhere",
2227
2313
  undefined
2228
2314
  >;
2229
2315
  readonly target: v.StrictObjectSchema<
@@ -2235,7 +2321,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2235
2321
  >,
2236
2322
  undefined
2237
2323
  >;
2238
- readonly state: v.SchemaWithPipe<
2324
+ readonly field: v.SchemaWithPipe<
2239
2325
  readonly [
2240
2326
  v.StringSchema<undefined>,
2241
2327
  v.MinLengthAction<
@@ -2264,7 +2350,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2264
2350
  >,
2265
2351
  undefined
2266
2352
  >;
2267
- readonly state: v.SchemaWithPipe<
2353
+ readonly field: v.SchemaWithPipe<
2268
2354
  readonly [
2269
2355
  v.StringSchema<undefined>,
2270
2356
  v.MinLengthAction<
@@ -2426,7 +2512,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2426
2512
  >,
2427
2513
  undefined
2428
2514
  >;
2429
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
2515
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
2430
2516
  readonly idRefs: v.OptionalSchema<
2431
2517
  v.ArraySchema<
2432
2518
  v.SchemaWithPipe<
@@ -2502,12 +2588,12 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2502
2588
  undefined
2503
2589
  >;
2504
2590
  /**
2505
- * Projected workflow state the predicate reads as `guard.metadata.*` —
2506
- * the only bridge from the lake eval context (which cannot see `$state`)
2507
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
2591
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
2592
+ * the only bridge from the lake eval context (which cannot see `$fields`)
2593
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
2508
2594
  * the guard mini-language — `"$self"`, `"$now"`, or
2509
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
2510
- * re-synced by the post-state-op guard refresh.
2595
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
2596
+ * re-synced by the post-field-op guard refresh.
2511
2597
  */
2512
2598
  readonly metadata: v.OptionalSchema<
2513
2599
  v.RecordSchema<
@@ -2534,8 +2620,8 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2534
2620
  >,
2535
2621
  undefined
2536
2622
  >;
2537
- /** Stage-scoped state entries. Resolved at stage entry. */
2538
- state: v.OptionalSchema<
2623
+ /** Stage-scoped field entries. Resolved at stage entry. */
2624
+ fields: v.OptionalSchema<
2539
2625
  v.ArraySchema<
2540
2626
  v.UnionSchema<
2541
2627
  [
@@ -2572,7 +2658,7 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2572
2658
  >;
2573
2659
  /**
2574
2660
  * When true, the caller MUST supply this entry at start (via
2575
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2661
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
2576
2662
  * missing required entry throws rather than silently defaulting to
2577
2663
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
2578
2664
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -2686,92 +2772,6 @@ declare const AuthoringStageSchema: v.StrictObjectSchema<
2686
2772
  undefined
2687
2773
  >;
2688
2774
 
2689
- export declare type AuthoringStateEntry = v.InferOutput<
2690
- typeof AuthoringStateEntrySchema
2691
- >;
2692
-
2693
- declare const AuthoringStateEntrySchema: v.UnionSchema<
2694
- [
2695
- v.StrictObjectSchema<
2696
- {
2697
- type: v.PicklistSchema<
2698
- readonly [
2699
- "doc.ref",
2700
- "doc.refs",
2701
- "release.ref",
2702
- "query",
2703
- "value.string",
2704
- "value.url",
2705
- "value.number",
2706
- "value.boolean",
2707
- "value.dateTime",
2708
- "value.actor",
2709
- "checklist",
2710
- "notes",
2711
- "assignees",
2712
- ],
2713
- `Invalid option: expected one of ${string}`
2714
- >;
2715
- name: v.SchemaWithPipe<
2716
- readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2717
- >;
2718
- title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2719
- description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2720
- /**
2721
- * When true, the caller MUST supply this entry at start (via
2722
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
2723
- * missing required entry throws rather than silently defaulting to
2724
- * `null`/`[]` — the same fail-fast an action's `required` param gets.
2725
- * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
2726
- */
2727
- required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
2728
- source: v.GenericSchema<SourceInternal>;
2729
- /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
2730
- editable: v.OptionalSchema<
2731
- v.UnionSchema<
2732
- [
2733
- v.LiteralSchema<true, undefined>,
2734
- v.ArraySchema<
2735
- v.SchemaWithPipe<
2736
- readonly [
2737
- v.StringSchema<undefined>,
2738
- v.MinLengthAction<string, 1, "must be a non-empty string">,
2739
- ]
2740
- >,
2741
- undefined
2742
- >,
2743
- v.SchemaWithPipe<
2744
- readonly [
2745
- v.StringSchema<undefined>,
2746
- v.MinLengthAction<string, 1, "must be a non-empty string">,
2747
- ]
2748
- >,
2749
- ],
2750
- undefined
2751
- >,
2752
- undefined
2753
- >;
2754
- },
2755
- undefined
2756
- >,
2757
- v.StrictObjectSchema<
2758
- {
2759
- readonly type: v.LiteralSchema<"claim", undefined>;
2760
- readonly name: v.SchemaWithPipe<
2761
- readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
2762
- >;
2763
- readonly title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
2764
- readonly description: v.OptionalSchema<
2765
- v.StringSchema<undefined>,
2766
- undefined
2767
- >;
2768
- },
2769
- undefined
2770
- >,
2771
- ],
2772
- undefined
2773
- >;
2774
-
2775
2775
  export declare type AuthoringTask = v.InferOutput<typeof AuthoringTaskSchema>;
2776
2776
 
2777
2777
  declare const AuthoringTaskSchema: v.StrictObjectSchema<
@@ -2862,7 +2862,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2862
2862
  [
2863
2863
  v.StrictObjectSchema<
2864
2864
  {
2865
- readonly type: v.LiteralSchema<"state.set", undefined>;
2865
+ readonly type: v.LiteralSchema<"field.set", undefined>;
2866
2866
  readonly target: v.StrictObjectSchema<
2867
2867
  {
2868
2868
  readonly scope: v.OptionalSchema<
@@ -2872,7 +2872,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2872
2872
  >,
2873
2873
  undefined
2874
2874
  >;
2875
- readonly state: v.SchemaWithPipe<
2875
+ readonly field: v.SchemaWithPipe<
2876
2876
  readonly [
2877
2877
  v.StringSchema<undefined>,
2878
2878
  v.MinLengthAction<
@@ -2891,7 +2891,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2891
2891
  >,
2892
2892
  v.StrictObjectSchema<
2893
2893
  {
2894
- readonly type: v.LiteralSchema<"state.unset", undefined>;
2894
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
2895
2895
  readonly target: v.StrictObjectSchema<
2896
2896
  {
2897
2897
  readonly scope: v.OptionalSchema<
@@ -2901,7 +2901,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2901
2901
  >,
2902
2902
  undefined
2903
2903
  >;
2904
- readonly state: v.SchemaWithPipe<
2904
+ readonly field: v.SchemaWithPipe<
2905
2905
  readonly [
2906
2906
  v.StringSchema<undefined>,
2907
2907
  v.MinLengthAction<
@@ -2919,7 +2919,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2919
2919
  >,
2920
2920
  v.StrictObjectSchema<
2921
2921
  {
2922
- readonly type: v.LiteralSchema<"state.append", undefined>;
2922
+ readonly type: v.LiteralSchema<"field.append", undefined>;
2923
2923
  readonly target: v.StrictObjectSchema<
2924
2924
  {
2925
2925
  readonly scope: v.OptionalSchema<
@@ -2929,7 +2929,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2929
2929
  >,
2930
2930
  undefined
2931
2931
  >;
2932
- readonly state: v.SchemaWithPipe<
2932
+ readonly field: v.SchemaWithPipe<
2933
2933
  readonly [
2934
2934
  v.StringSchema<undefined>,
2935
2935
  v.MinLengthAction<
@@ -2948,7 +2948,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2948
2948
  >,
2949
2949
  v.StrictObjectSchema<
2950
2950
  {
2951
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
2951
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
2952
2952
  readonly target: v.StrictObjectSchema<
2953
2953
  {
2954
2954
  readonly scope: v.OptionalSchema<
@@ -2958,7 +2958,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2958
2958
  >,
2959
2959
  undefined
2960
2960
  >;
2961
- readonly state: v.SchemaWithPipe<
2961
+ readonly field: v.SchemaWithPipe<
2962
2962
  readonly [
2963
2963
  v.StringSchema<undefined>,
2964
2964
  v.MinLengthAction<
@@ -2978,7 +2978,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2978
2978
  >,
2979
2979
  v.StrictObjectSchema<
2980
2980
  {
2981
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
2981
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
2982
2982
  readonly target: v.StrictObjectSchema<
2983
2983
  {
2984
2984
  readonly scope: v.OptionalSchema<
@@ -2988,7 +2988,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
2988
2988
  >,
2989
2989
  undefined
2990
2990
  >;
2991
- readonly state: v.SchemaWithPipe<
2991
+ readonly field: v.SchemaWithPipe<
2992
2992
  readonly [
2993
2993
  v.StringSchema<undefined>,
2994
2994
  v.MinLengthAction<
@@ -3040,7 +3040,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3040
3040
  >,
3041
3041
  undefined
3042
3042
  >;
3043
- readonly state: v.SchemaWithPipe<
3043
+ readonly field: v.SchemaWithPipe<
3044
3044
  readonly [
3045
3045
  v.StringSchema<undefined>,
3046
3046
  v.MinLengthAction<
@@ -3257,7 +3257,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3257
3257
  v.StrictObjectSchema<
3258
3258
  {
3259
3259
  readonly type: v.LiteralSchema<
3260
- "state.set",
3260
+ "field.set",
3261
3261
  undefined
3262
3262
  >;
3263
3263
  readonly target: v.StrictObjectSchema<
@@ -3269,7 +3269,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3269
3269
  >,
3270
3270
  undefined
3271
3271
  >;
3272
- readonly state: v.SchemaWithPipe<
3272
+ readonly field: v.SchemaWithPipe<
3273
3273
  readonly [
3274
3274
  v.StringSchema<undefined>,
3275
3275
  v.MinLengthAction<
@@ -3289,7 +3289,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3289
3289
  v.StrictObjectSchema<
3290
3290
  {
3291
3291
  readonly type: v.LiteralSchema<
3292
- "state.unset",
3292
+ "field.unset",
3293
3293
  undefined
3294
3294
  >;
3295
3295
  readonly target: v.StrictObjectSchema<
@@ -3301,7 +3301,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3301
3301
  >,
3302
3302
  undefined
3303
3303
  >;
3304
- readonly state: v.SchemaWithPipe<
3304
+ readonly field: v.SchemaWithPipe<
3305
3305
  readonly [
3306
3306
  v.StringSchema<undefined>,
3307
3307
  v.MinLengthAction<
@@ -3320,7 +3320,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3320
3320
  v.StrictObjectSchema<
3321
3321
  {
3322
3322
  readonly type: v.LiteralSchema<
3323
- "state.append",
3323
+ "field.append",
3324
3324
  undefined
3325
3325
  >;
3326
3326
  readonly target: v.StrictObjectSchema<
@@ -3332,7 +3332,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3332
3332
  >,
3333
3333
  undefined
3334
3334
  >;
3335
- readonly state: v.SchemaWithPipe<
3335
+ readonly field: v.SchemaWithPipe<
3336
3336
  readonly [
3337
3337
  v.StringSchema<undefined>,
3338
3338
  v.MinLengthAction<
@@ -3352,7 +3352,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3352
3352
  v.StrictObjectSchema<
3353
3353
  {
3354
3354
  readonly type: v.LiteralSchema<
3355
- "state.updateWhere",
3355
+ "field.updateWhere",
3356
3356
  undefined
3357
3357
  >;
3358
3358
  readonly target: v.StrictObjectSchema<
@@ -3364,7 +3364,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3364
3364
  >,
3365
3365
  undefined
3366
3366
  >;
3367
- readonly state: v.SchemaWithPipe<
3367
+ readonly field: v.SchemaWithPipe<
3368
3368
  readonly [
3369
3369
  v.StringSchema<undefined>,
3370
3370
  v.MinLengthAction<
@@ -3385,7 +3385,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3385
3385
  v.StrictObjectSchema<
3386
3386
  {
3387
3387
  readonly type: v.LiteralSchema<
3388
- "state.removeWhere",
3388
+ "field.removeWhere",
3389
3389
  undefined
3390
3390
  >;
3391
3391
  readonly target: v.StrictObjectSchema<
@@ -3397,7 +3397,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3397
3397
  >,
3398
3398
  undefined
3399
3399
  >;
3400
- readonly state: v.SchemaWithPipe<
3400
+ readonly field: v.SchemaWithPipe<
3401
3401
  readonly [
3402
3402
  v.StringSchema<undefined>,
3403
3403
  v.MinLengthAction<
@@ -3458,7 +3458,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3458
3458
  >,
3459
3459
  undefined
3460
3460
  >;
3461
- readonly state: v.SchemaWithPipe<
3461
+ readonly field: v.SchemaWithPipe<
3462
3462
  readonly [
3463
3463
  v.StringSchema<undefined>,
3464
3464
  v.MinLengthAction<
@@ -3592,7 +3592,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3592
3592
  v.StringSchema<undefined>,
3593
3593
  undefined
3594
3594
  >;
3595
- readonly state: v.UnionSchema<
3595
+ readonly field: v.UnionSchema<
3596
3596
  [
3597
3597
  v.SchemaWithPipe<
3598
3598
  readonly [
@@ -3613,7 +3613,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3613
3613
  >,
3614
3614
  undefined
3615
3615
  >;
3616
- readonly state: v.SchemaWithPipe<
3616
+ readonly field: v.SchemaWithPipe<
3617
3617
  readonly [
3618
3618
  v.StringSchema<undefined>,
3619
3619
  v.MinLengthAction<
@@ -3808,7 +3808,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3808
3808
  },
3809
3809
  undefined
3810
3810
  >;
3811
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
3811
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
3812
3812
  readonly with: v.OptionalSchema<
3813
3813
  v.RecordSchema<
3814
3814
  v.SchemaWithPipe<
@@ -3855,8 +3855,8 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3855
3855
  >,
3856
3856
  undefined
3857
3857
  >;
3858
- /** Task-scoped state entries. Resolved at task activation time. */
3859
- state: v.OptionalSchema<
3858
+ /** Task-scoped field entries. Resolved at task activation time. */
3859
+ fields: v.OptionalSchema<
3860
3860
  v.ArraySchema<
3861
3861
  v.UnionSchema<
3862
3862
  [
@@ -3893,7 +3893,7 @@ declare const AuthoringTaskSchema: v.StrictObjectSchema<
3893
3893
  >;
3894
3894
  /**
3895
3895
  * When true, the caller MUST supply this entry at start (via
3896
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
3896
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
3897
3897
  * missing required entry throws rather than silently defaulting to
3898
3898
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
3899
3899
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -3999,7 +3999,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
3999
3999
  >,
4000
4000
  undefined
4001
4001
  >;
4002
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
4002
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
4003
4003
  ops: v.OptionalSchema<
4004
4004
  v.ArraySchema<
4005
4005
  v.VariantSchema<
@@ -4007,7 +4007,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4007
4007
  [
4008
4008
  v.StrictObjectSchema<
4009
4009
  {
4010
- readonly type: v.LiteralSchema<"state.set", undefined>;
4010
+ readonly type: v.LiteralSchema<"field.set", undefined>;
4011
4011
  readonly target: v.StrictObjectSchema<
4012
4012
  {
4013
4013
  readonly scope: v.OptionalSchema<
@@ -4017,7 +4017,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4017
4017
  >,
4018
4018
  undefined
4019
4019
  >;
4020
- readonly state: v.SchemaWithPipe<
4020
+ readonly field: v.SchemaWithPipe<
4021
4021
  readonly [
4022
4022
  v.StringSchema<undefined>,
4023
4023
  v.MinLengthAction<
@@ -4036,7 +4036,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4036
4036
  >,
4037
4037
  v.StrictObjectSchema<
4038
4038
  {
4039
- readonly type: v.LiteralSchema<"state.unset", undefined>;
4039
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
4040
4040
  readonly target: v.StrictObjectSchema<
4041
4041
  {
4042
4042
  readonly scope: v.OptionalSchema<
@@ -4046,7 +4046,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4046
4046
  >,
4047
4047
  undefined
4048
4048
  >;
4049
- readonly state: v.SchemaWithPipe<
4049
+ readonly field: v.SchemaWithPipe<
4050
4050
  readonly [
4051
4051
  v.StringSchema<undefined>,
4052
4052
  v.MinLengthAction<
@@ -4064,7 +4064,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4064
4064
  >,
4065
4065
  v.StrictObjectSchema<
4066
4066
  {
4067
- readonly type: v.LiteralSchema<"state.append", undefined>;
4067
+ readonly type: v.LiteralSchema<"field.append", undefined>;
4068
4068
  readonly target: v.StrictObjectSchema<
4069
4069
  {
4070
4070
  readonly scope: v.OptionalSchema<
@@ -4074,7 +4074,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4074
4074
  >,
4075
4075
  undefined
4076
4076
  >;
4077
- readonly state: v.SchemaWithPipe<
4077
+ readonly field: v.SchemaWithPipe<
4078
4078
  readonly [
4079
4079
  v.StringSchema<undefined>,
4080
4080
  v.MinLengthAction<
@@ -4093,7 +4093,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4093
4093
  >,
4094
4094
  v.StrictObjectSchema<
4095
4095
  {
4096
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
4096
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
4097
4097
  readonly target: v.StrictObjectSchema<
4098
4098
  {
4099
4099
  readonly scope: v.OptionalSchema<
@@ -4103,7 +4103,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4103
4103
  >,
4104
4104
  undefined
4105
4105
  >;
4106
- readonly state: v.SchemaWithPipe<
4106
+ readonly field: v.SchemaWithPipe<
4107
4107
  readonly [
4108
4108
  v.StringSchema<undefined>,
4109
4109
  v.MinLengthAction<
@@ -4123,7 +4123,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4123
4123
  >,
4124
4124
  v.StrictObjectSchema<
4125
4125
  {
4126
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
4126
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
4127
4127
  readonly target: v.StrictObjectSchema<
4128
4128
  {
4129
4129
  readonly scope: v.OptionalSchema<
@@ -4133,7 +4133,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4133
4133
  >,
4134
4134
  undefined
4135
4135
  >;
4136
- readonly state: v.SchemaWithPipe<
4136
+ readonly field: v.SchemaWithPipe<
4137
4137
  readonly [
4138
4138
  v.StringSchema<undefined>,
4139
4139
  v.MinLengthAction<
@@ -4162,7 +4162,7 @@ declare const AuthoringTransitionSchema: v.StrictObjectSchema<
4162
4162
  >,
4163
4163
  undefined
4164
4164
  >;
4165
- readonly state: v.SchemaWithPipe<
4165
+ readonly field: v.SchemaWithPipe<
4166
4166
  readonly [
4167
4167
  v.StringSchema<undefined>,
4168
4168
  v.MinLengthAction<
@@ -4305,7 +4305,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4305
4305
  * never started cold from a picker. Omitted ⇒ `'workflow'` (startable).
4306
4306
  * Advisory: consumers filter their start pickers on it (see
4307
4307
  * {@link isStartableDefinition}); the engine does NOT refuse a
4308
- * `startInstance` on a `'child'` def — load-bearing `required` state is the
4308
+ * `startInstance` on a `'child'` def — load-bearing `required` field is the
4309
4309
  * runtime backstop.
4310
4310
  */
4311
4311
  role: v.OptionalSchema<
@@ -4322,8 +4322,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4322
4322
  v.MinLengthAction<string, 1, "must be a non-empty string">,
4323
4323
  ]
4324
4324
  >;
4325
- /** Workflow-scope state entries. Persist for the instance lifetime. */
4326
- state: v.OptionalSchema<
4325
+ /** Workflow-scope field entries. Persist for the instance lifetime. */
4326
+ fields: v.OptionalSchema<
4327
4327
  v.ArraySchema<
4328
4328
  v.UnionSchema<
4329
4329
  [
@@ -4360,7 +4360,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4360
4360
  >;
4361
4361
  /**
4362
4362
  * When true, the caller MUST supply this entry at start (via
4363
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
4363
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
4364
4364
  * missing required entry throws rather than silently defaulting to
4365
4365
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
4366
4366
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -4570,7 +4570,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4570
4570
  v.StrictObjectSchema<
4571
4571
  {
4572
4572
  readonly type: v.LiteralSchema<
4573
- "state.set",
4573
+ "field.set",
4574
4574
  undefined
4575
4575
  >;
4576
4576
  readonly target: v.StrictObjectSchema<
@@ -4586,7 +4586,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4586
4586
  >,
4587
4587
  undefined
4588
4588
  >;
4589
- readonly state: v.SchemaWithPipe<
4589
+ readonly field: v.SchemaWithPipe<
4590
4590
  readonly [
4591
4591
  v.StringSchema<undefined>,
4592
4592
  v.MinLengthAction<
@@ -4606,7 +4606,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4606
4606
  v.StrictObjectSchema<
4607
4607
  {
4608
4608
  readonly type: v.LiteralSchema<
4609
- "state.unset",
4609
+ "field.unset",
4610
4610
  undefined
4611
4611
  >;
4612
4612
  readonly target: v.StrictObjectSchema<
@@ -4622,7 +4622,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4622
4622
  >,
4623
4623
  undefined
4624
4624
  >;
4625
- readonly state: v.SchemaWithPipe<
4625
+ readonly field: v.SchemaWithPipe<
4626
4626
  readonly [
4627
4627
  v.StringSchema<undefined>,
4628
4628
  v.MinLengthAction<
@@ -4641,7 +4641,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4641
4641
  v.StrictObjectSchema<
4642
4642
  {
4643
4643
  readonly type: v.LiteralSchema<
4644
- "state.append",
4644
+ "field.append",
4645
4645
  undefined
4646
4646
  >;
4647
4647
  readonly target: v.StrictObjectSchema<
@@ -4657,7 +4657,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4657
4657
  >,
4658
4658
  undefined
4659
4659
  >;
4660
- readonly state: v.SchemaWithPipe<
4660
+ readonly field: v.SchemaWithPipe<
4661
4661
  readonly [
4662
4662
  v.StringSchema<undefined>,
4663
4663
  v.MinLengthAction<
@@ -4677,7 +4677,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4677
4677
  v.StrictObjectSchema<
4678
4678
  {
4679
4679
  readonly type: v.LiteralSchema<
4680
- "state.updateWhere",
4680
+ "field.updateWhere",
4681
4681
  undefined
4682
4682
  >;
4683
4683
  readonly target: v.StrictObjectSchema<
@@ -4693,7 +4693,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4693
4693
  >,
4694
4694
  undefined
4695
4695
  >;
4696
- readonly state: v.SchemaWithPipe<
4696
+ readonly field: v.SchemaWithPipe<
4697
4697
  readonly [
4698
4698
  v.StringSchema<undefined>,
4699
4699
  v.MinLengthAction<
@@ -4714,7 +4714,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4714
4714
  v.StrictObjectSchema<
4715
4715
  {
4716
4716
  readonly type: v.LiteralSchema<
4717
- "state.removeWhere",
4717
+ "field.removeWhere",
4718
4718
  undefined
4719
4719
  >;
4720
4720
  readonly target: v.StrictObjectSchema<
@@ -4730,7 +4730,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4730
4730
  >,
4731
4731
  undefined
4732
4732
  >;
4733
- readonly state: v.SchemaWithPipe<
4733
+ readonly field: v.SchemaWithPipe<
4734
4734
  readonly [
4735
4735
  v.StringSchema<undefined>,
4736
4736
  v.MinLengthAction<
@@ -4798,7 +4798,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
4798
4798
  >,
4799
4799
  undefined
4800
4800
  >;
4801
- readonly state: v.SchemaWithPipe<
4801
+ readonly field: v.SchemaWithPipe<
4802
4802
  readonly [
4803
4803
  v.StringSchema<undefined>,
4804
4804
  v.MinLengthAction<
@@ -5027,7 +5027,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5027
5027
  v.StrictObjectSchema<
5028
5028
  {
5029
5029
  readonly type: v.LiteralSchema<
5030
- "state.set",
5030
+ "field.set",
5031
5031
  undefined
5032
5032
  >;
5033
5033
  readonly target: v.StrictObjectSchema<
@@ -5043,7 +5043,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5043
5043
  >,
5044
5044
  undefined
5045
5045
  >;
5046
- readonly state: v.SchemaWithPipe<
5046
+ readonly field: v.SchemaWithPipe<
5047
5047
  readonly [
5048
5048
  v.StringSchema<undefined>,
5049
5049
  v.MinLengthAction<
@@ -5063,7 +5063,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5063
5063
  v.StrictObjectSchema<
5064
5064
  {
5065
5065
  readonly type: v.LiteralSchema<
5066
- "state.unset",
5066
+ "field.unset",
5067
5067
  undefined
5068
5068
  >;
5069
5069
  readonly target: v.StrictObjectSchema<
@@ -5079,7 +5079,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5079
5079
  >,
5080
5080
  undefined
5081
5081
  >;
5082
- readonly state: v.SchemaWithPipe<
5082
+ readonly field: v.SchemaWithPipe<
5083
5083
  readonly [
5084
5084
  v.StringSchema<undefined>,
5085
5085
  v.MinLengthAction<
@@ -5098,7 +5098,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5098
5098
  v.StrictObjectSchema<
5099
5099
  {
5100
5100
  readonly type: v.LiteralSchema<
5101
- "state.append",
5101
+ "field.append",
5102
5102
  undefined
5103
5103
  >;
5104
5104
  readonly target: v.StrictObjectSchema<
@@ -5114,7 +5114,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5114
5114
  >,
5115
5115
  undefined
5116
5116
  >;
5117
- readonly state: v.SchemaWithPipe<
5117
+ readonly field: v.SchemaWithPipe<
5118
5118
  readonly [
5119
5119
  v.StringSchema<undefined>,
5120
5120
  v.MinLengthAction<
@@ -5134,7 +5134,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5134
5134
  v.StrictObjectSchema<
5135
5135
  {
5136
5136
  readonly type: v.LiteralSchema<
5137
- "state.updateWhere",
5137
+ "field.updateWhere",
5138
5138
  undefined
5139
5139
  >;
5140
5140
  readonly target: v.StrictObjectSchema<
@@ -5150,7 +5150,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5150
5150
  >,
5151
5151
  undefined
5152
5152
  >;
5153
- readonly state: v.SchemaWithPipe<
5153
+ readonly field: v.SchemaWithPipe<
5154
5154
  readonly [
5155
5155
  v.StringSchema<undefined>,
5156
5156
  v.MinLengthAction<
@@ -5171,7 +5171,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5171
5171
  v.StrictObjectSchema<
5172
5172
  {
5173
5173
  readonly type: v.LiteralSchema<
5174
- "state.removeWhere",
5174
+ "field.removeWhere",
5175
5175
  undefined
5176
5176
  >;
5177
5177
  readonly target: v.StrictObjectSchema<
@@ -5187,7 +5187,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5187
5187
  >,
5188
5188
  undefined
5189
5189
  >;
5190
- readonly state: v.SchemaWithPipe<
5190
+ readonly field: v.SchemaWithPipe<
5191
5191
  readonly [
5192
5192
  v.StringSchema<undefined>,
5193
5193
  v.MinLengthAction<
@@ -5255,7 +5255,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5255
5255
  >,
5256
5256
  undefined
5257
5257
  >;
5258
- readonly state: v.SchemaWithPipe<
5258
+ readonly field: v.SchemaWithPipe<
5259
5259
  readonly [
5260
5260
  v.StringSchema<undefined>,
5261
5261
  v.MinLengthAction<
@@ -5396,7 +5396,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5396
5396
  v.StringSchema<undefined>,
5397
5397
  undefined
5398
5398
  >;
5399
- readonly state: v.UnionSchema<
5399
+ readonly field: v.UnionSchema<
5400
5400
  [
5401
5401
  v.SchemaWithPipe<
5402
5402
  readonly [
@@ -5421,7 +5421,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5421
5421
  >,
5422
5422
  undefined
5423
5423
  >;
5424
- readonly state: v.SchemaWithPipe<
5424
+ readonly field: v.SchemaWithPipe<
5425
5425
  readonly [
5426
5426
  v.StringSchema<undefined>,
5427
5427
  v.MinLengthAction<
@@ -5628,7 +5628,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5628
5628
  },
5629
5629
  undefined
5630
5630
  >;
5631
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
5631
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
5632
5632
  readonly with: v.OptionalSchema<
5633
5633
  v.RecordSchema<
5634
5634
  v.SchemaWithPipe<
@@ -5691,8 +5691,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5691
5691
  >,
5692
5692
  undefined
5693
5693
  >;
5694
- /** Task-scoped state entries. Resolved at task activation time. */
5695
- state: v.OptionalSchema<
5694
+ /** Task-scoped field entries. Resolved at task activation time. */
5695
+ fields: v.OptionalSchema<
5696
5696
  v.ArraySchema<
5697
5697
  v.UnionSchema<
5698
5698
  [
@@ -5732,7 +5732,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5732
5732
  >;
5733
5733
  /**
5734
5734
  * When true, the caller MUST supply this entry at start (via
5735
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
5735
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
5736
5736
  * missing required entry throws rather than silently defaulting to
5737
5737
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
5738
5738
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -5860,7 +5860,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5860
5860
  >,
5861
5861
  undefined
5862
5862
  >;
5863
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
5863
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
5864
5864
  ops: v.OptionalSchema<
5865
5865
  v.ArraySchema<
5866
5866
  v.VariantSchema<
@@ -5869,7 +5869,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5869
5869
  v.StrictObjectSchema<
5870
5870
  {
5871
5871
  readonly type: v.LiteralSchema<
5872
- "state.set",
5872
+ "field.set",
5873
5873
  undefined
5874
5874
  >;
5875
5875
  readonly target: v.StrictObjectSchema<
@@ -5885,7 +5885,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5885
5885
  >,
5886
5886
  undefined
5887
5887
  >;
5888
- readonly state: v.SchemaWithPipe<
5888
+ readonly field: v.SchemaWithPipe<
5889
5889
  readonly [
5890
5890
  v.StringSchema<undefined>,
5891
5891
  v.MinLengthAction<
@@ -5905,7 +5905,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5905
5905
  v.StrictObjectSchema<
5906
5906
  {
5907
5907
  readonly type: v.LiteralSchema<
5908
- "state.unset",
5908
+ "field.unset",
5909
5909
  undefined
5910
5910
  >;
5911
5911
  readonly target: v.StrictObjectSchema<
@@ -5921,7 +5921,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5921
5921
  >,
5922
5922
  undefined
5923
5923
  >;
5924
- readonly state: v.SchemaWithPipe<
5924
+ readonly field: v.SchemaWithPipe<
5925
5925
  readonly [
5926
5926
  v.StringSchema<undefined>,
5927
5927
  v.MinLengthAction<
@@ -5940,7 +5940,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5940
5940
  v.StrictObjectSchema<
5941
5941
  {
5942
5942
  readonly type: v.LiteralSchema<
5943
- "state.append",
5943
+ "field.append",
5944
5944
  undefined
5945
5945
  >;
5946
5946
  readonly target: v.StrictObjectSchema<
@@ -5956,7 +5956,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5956
5956
  >,
5957
5957
  undefined
5958
5958
  >;
5959
- readonly state: v.SchemaWithPipe<
5959
+ readonly field: v.SchemaWithPipe<
5960
5960
  readonly [
5961
5961
  v.StringSchema<undefined>,
5962
5962
  v.MinLengthAction<
@@ -5976,7 +5976,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5976
5976
  v.StrictObjectSchema<
5977
5977
  {
5978
5978
  readonly type: v.LiteralSchema<
5979
- "state.updateWhere",
5979
+ "field.updateWhere",
5980
5980
  undefined
5981
5981
  >;
5982
5982
  readonly target: v.StrictObjectSchema<
@@ -5992,7 +5992,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
5992
5992
  >,
5993
5993
  undefined
5994
5994
  >;
5995
- readonly state: v.SchemaWithPipe<
5995
+ readonly field: v.SchemaWithPipe<
5996
5996
  readonly [
5997
5997
  v.StringSchema<undefined>,
5998
5998
  v.MinLengthAction<
@@ -6013,7 +6013,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6013
6013
  v.StrictObjectSchema<
6014
6014
  {
6015
6015
  readonly type: v.LiteralSchema<
6016
- "state.removeWhere",
6016
+ "field.removeWhere",
6017
6017
  undefined
6018
6018
  >;
6019
6019
  readonly target: v.StrictObjectSchema<
@@ -6029,7 +6029,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6029
6029
  >,
6030
6030
  undefined
6031
6031
  >;
6032
- readonly state: v.SchemaWithPipe<
6032
+ readonly field: v.SchemaWithPipe<
6033
6033
  readonly [
6034
6034
  v.StringSchema<undefined>,
6035
6035
  v.MinLengthAction<
@@ -6065,7 +6065,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6065
6065
  >,
6066
6066
  undefined
6067
6067
  >;
6068
- readonly state: v.SchemaWithPipe<
6068
+ readonly field: v.SchemaWithPipe<
6069
6069
  readonly [
6070
6070
  v.StringSchema<undefined>,
6071
6071
  v.MinLengthAction<
@@ -6231,7 +6231,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6231
6231
  >,
6232
6232
  undefined
6233
6233
  >;
6234
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
6234
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
6235
6235
  readonly idRefs: v.OptionalSchema<
6236
6236
  v.ArraySchema<
6237
6237
  v.SchemaWithPipe<
@@ -6307,12 +6307,12 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6307
6307
  undefined
6308
6308
  >;
6309
6309
  /**
6310
- * Projected workflow state the predicate reads as `guard.metadata.*` —
6311
- * the only bridge from the lake eval context (which cannot see `$state`)
6312
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
6310
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
6311
+ * the only bridge from the lake eval context (which cannot see `$fields`)
6312
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
6313
6313
  * the guard mini-language — `"$self"`, `"$now"`, or
6314
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
6315
- * re-synced by the post-state-op guard refresh.
6314
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
6315
+ * re-synced by the post-field-op guard refresh.
6316
6316
  */
6317
6317
  readonly metadata: v.OptionalSchema<
6318
6318
  v.RecordSchema<
@@ -6347,8 +6347,8 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6347
6347
  >,
6348
6348
  undefined
6349
6349
  >;
6350
- /** Stage-scoped state entries. Resolved at stage entry. */
6351
- state: v.OptionalSchema<
6350
+ /** Stage-scoped field entries. Resolved at stage entry. */
6351
+ fields: v.OptionalSchema<
6352
6352
  v.ArraySchema<
6353
6353
  v.UnionSchema<
6354
6354
  [
@@ -6388,7 +6388,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6388
6388
  >;
6389
6389
  /**
6390
6390
  * When true, the caller MUST supply this entry at start (via
6391
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
6391
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
6392
6392
  * missing required entry throws rather than silently defaulting to
6393
6393
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
6394
6394
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -6549,7 +6549,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6549
6549
  type: "audit";
6550
6550
  target: {
6551
6551
  scope?: "workflow" | "stage" | "task" | undefined;
6552
- state: string;
6552
+ field: string;
6553
6553
  };
6554
6554
  value: SourceInternal;
6555
6555
  stampFields?:
@@ -6560,42 +6560,42 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6560
6560
  | undefined;
6561
6561
  }
6562
6562
  | {
6563
- type: "state.set";
6563
+ type: "field.set";
6564
6564
  target: {
6565
6565
  scope?: "workflow" | "stage" | "task" | undefined;
6566
- state: string;
6566
+ field: string;
6567
6567
  };
6568
6568
  value: SourceInternal;
6569
6569
  }
6570
6570
  | {
6571
- type: "state.unset";
6571
+ type: "field.unset";
6572
6572
  target: {
6573
6573
  scope?: "workflow" | "stage" | "task" | undefined;
6574
- state: string;
6574
+ field: string;
6575
6575
  };
6576
6576
  }
6577
6577
  | {
6578
- type: "state.append";
6578
+ type: "field.append";
6579
6579
  target: {
6580
6580
  scope?: "workflow" | "stage" | "task" | undefined;
6581
- state: string;
6581
+ field: string;
6582
6582
  };
6583
6583
  value: SourceInternal;
6584
6584
  }
6585
6585
  | {
6586
- type: "state.updateWhere";
6586
+ type: "field.updateWhere";
6587
6587
  target: {
6588
6588
  scope?: "workflow" | "stage" | "task" | undefined;
6589
- state: string;
6589
+ field: string;
6590
6590
  };
6591
6591
  where: OpPredicateInternal;
6592
6592
  value: SourceInternal;
6593
6593
  }
6594
6594
  | {
6595
- type: "state.removeWhere";
6595
+ type: "field.removeWhere";
6596
6596
  target: {
6597
6597
  scope?: "workflow" | "stage" | "task" | undefined;
6598
- state: string;
6598
+ field: string;
6599
6599
  };
6600
6600
  where: OpPredicateInternal;
6601
6601
  }
@@ -6665,7 +6665,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6665
6665
  | "stage"
6666
6666
  | "task"
6667
6667
  | undefined;
6668
- state: string;
6668
+ field: string;
6669
6669
  };
6670
6670
  value: SourceInternal;
6671
6671
  stampFields?:
@@ -6676,62 +6676,62 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6676
6676
  | undefined;
6677
6677
  }
6678
6678
  | {
6679
- type: "state.set";
6679
+ type: "field.set";
6680
6680
  target: {
6681
6681
  scope?:
6682
6682
  | "workflow"
6683
6683
  | "stage"
6684
6684
  | "task"
6685
6685
  | undefined;
6686
- state: string;
6686
+ field: string;
6687
6687
  };
6688
6688
  value: SourceInternal;
6689
6689
  }
6690
6690
  | {
6691
- type: "state.unset";
6691
+ type: "field.unset";
6692
6692
  target: {
6693
6693
  scope?:
6694
6694
  | "workflow"
6695
6695
  | "stage"
6696
6696
  | "task"
6697
6697
  | undefined;
6698
- state: string;
6698
+ field: string;
6699
6699
  };
6700
6700
  }
6701
6701
  | {
6702
- type: "state.append";
6702
+ type: "field.append";
6703
6703
  target: {
6704
6704
  scope?:
6705
6705
  | "workflow"
6706
6706
  | "stage"
6707
6707
  | "task"
6708
6708
  | undefined;
6709
- state: string;
6709
+ field: string;
6710
6710
  };
6711
6711
  value: SourceInternal;
6712
6712
  }
6713
6713
  | {
6714
- type: "state.updateWhere";
6714
+ type: "field.updateWhere";
6715
6715
  target: {
6716
6716
  scope?:
6717
6717
  | "workflow"
6718
6718
  | "stage"
6719
6719
  | "task"
6720
6720
  | undefined;
6721
- state: string;
6721
+ field: string;
6722
6722
  };
6723
6723
  where: OpPredicateInternal;
6724
6724
  value: SourceInternal;
6725
6725
  }
6726
6726
  | {
6727
- type: "state.removeWhere";
6727
+ type: "field.removeWhere";
6728
6728
  target: {
6729
6729
  scope?:
6730
6730
  | "workflow"
6731
6731
  | "stage"
6732
6732
  | "task"
6733
6733
  | undefined;
6734
- state: string;
6734
+ field: string;
6735
6735
  };
6736
6736
  where: OpPredicateInternal;
6737
6737
  }
@@ -6760,7 +6760,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6760
6760
  name: string;
6761
6761
  title?: string | undefined;
6762
6762
  description?: string | undefined;
6763
- state:
6763
+ field:
6764
6764
  | string
6765
6765
  | {
6766
6766
  scope?:
@@ -6768,7 +6768,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6768
6768
  | "stage"
6769
6769
  | "task"
6770
6770
  | undefined;
6771
- state: string;
6771
+ field: string;
6772
6772
  };
6773
6773
  roles?: string[] | undefined;
6774
6774
  filter?: string | undefined;
@@ -6829,7 +6829,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6829
6829
  | undefined;
6830
6830
  }
6831
6831
  | undefined;
6832
- state?:
6832
+ fields?:
6833
6833
  | (
6834
6834
  | {
6835
6835
  type:
@@ -6876,7 +6876,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6876
6876
  type: "audit";
6877
6877
  target: {
6878
6878
  scope?: "workflow" | "stage" | "task" | undefined;
6879
- state: string;
6879
+ field: string;
6880
6880
  };
6881
6881
  value: SourceInternal;
6882
6882
  stampFields?:
@@ -6887,42 +6887,42 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6887
6887
  | undefined;
6888
6888
  }
6889
6889
  | {
6890
- type: "state.set";
6890
+ type: "field.set";
6891
6891
  target: {
6892
6892
  scope?: "workflow" | "stage" | "task" | undefined;
6893
- state: string;
6893
+ field: string;
6894
6894
  };
6895
6895
  value: SourceInternal;
6896
6896
  }
6897
6897
  | {
6898
- type: "state.unset";
6898
+ type: "field.unset";
6899
6899
  target: {
6900
6900
  scope?: "workflow" | "stage" | "task" | undefined;
6901
- state: string;
6901
+ field: string;
6902
6902
  };
6903
6903
  }
6904
6904
  | {
6905
- type: "state.append";
6905
+ type: "field.append";
6906
6906
  target: {
6907
6907
  scope?: "workflow" | "stage" | "task" | undefined;
6908
- state: string;
6908
+ field: string;
6909
6909
  };
6910
6910
  value: SourceInternal;
6911
6911
  }
6912
6912
  | {
6913
- type: "state.updateWhere";
6913
+ type: "field.updateWhere";
6914
6914
  target: {
6915
6915
  scope?: "workflow" | "stage" | "task" | undefined;
6916
- state: string;
6916
+ field: string;
6917
6917
  };
6918
6918
  where: OpPredicateInternal;
6919
6919
  value: SourceInternal;
6920
6920
  }
6921
6921
  | {
6922
- type: "state.removeWhere";
6922
+ type: "field.removeWhere";
6923
6923
  target: {
6924
6924
  scope?: "workflow" | "stage" | "task" | undefined;
6925
- state: string;
6925
+ field: string;
6926
6926
  };
6927
6927
  where: OpPredicateInternal;
6928
6928
  }
@@ -6972,7 +6972,7 @@ declare const AuthoringWorkflowSchema: v.StrictObjectSchema<
6972
6972
  | undefined;
6973
6973
  }[]
6974
6974
  | undefined;
6975
- state?:
6975
+ fields?:
6976
6976
  | (
6977
6977
  | {
6978
6978
  type:
@@ -7124,7 +7124,7 @@ export declare function buildSnapshot(args: {
7124
7124
  * Thrown when auto-transitions on an instance fail to stabilise within
7125
7125
  * {@link CascadeLimitError.limit} passes — the signature of a runaway
7126
7126
  * cascade. The classic trigger is two stages whose transition guards
7127
- * stay simultaneously satisfied (e.g. an `op.state.set` lands a value
7127
+ * stay simultaneously satisfied (e.g. an `op.field.set` lands a value
7128
7128
  * that trips the very guard that fired, and nothing ever clears it), so
7129
7129
  * the engine flip-flops and would otherwise write revisions forever.
7130
7130
  *
@@ -7215,23 +7215,23 @@ export declare function computeDiffEntries(
7215
7215
  ): Promise<DiffEntry[]>;
7216
7216
 
7217
7217
  /**
7218
- * Edit-seam twin of {@link ConcurrentFireActionError}: an `editState` commit
7218
+ * Edit-seam twin of {@link ConcurrentFireActionError}: an `editField` commit
7219
7219
  * lost the optimistic-locking race on every attempt. Same contract — re-read
7220
7220
  * and retry, or investigate a write storm; nothing committed on the final try.
7221
7221
  */
7222
- export declare class ConcurrentEditStateError extends Error {
7222
+ export declare class ConcurrentEditFieldError extends Error {
7223
7223
  readonly instanceId: string;
7224
7224
  readonly target: {
7225
- scope: StateScope;
7226
- state: string;
7225
+ scope: FieldScope;
7226
+ field: string;
7227
7227
  task?: string;
7228
7228
  };
7229
7229
  readonly attempts: number;
7230
7230
  constructor(args: {
7231
7231
  instanceId: string;
7232
7232
  target: {
7233
- scope: StateScope;
7234
- state: string;
7233
+ scope: FieldScope;
7234
+ field: string;
7235
7235
  task?: string;
7236
7236
  };
7237
7237
  attempts: number;
@@ -7618,7 +7618,7 @@ export declare interface DispatchResult {
7618
7618
  cascaded: number;
7619
7619
  /** Whether the originally-requested intent fired. */
7620
7620
  fired: boolean;
7621
- /** Engine primitives (`workflow.op.state.*` / `status.set`) that ran
7621
+ /** Engine primitives (`workflow.op.field.*` / `status.set`) that ran
7622
7622
  * during the action commit. Surfaced for caller-side assertions and
7623
7623
  * audit. */
7624
7624
  ranOps?: OpAppliedSummary[];
@@ -7639,7 +7639,7 @@ export declare function displayDescription(
7639
7639
 
7640
7640
  /**
7641
7641
  * Display metadata for the discriminator literals the engine persists
7642
- * (history entries, state-entry kinds, ops, effects-context entry
7642
+ * (history entries, field-entry kinds, ops, effects-context entry
7643
7643
  * kinds, document and effect-queue types). Each entry exposes
7644
7644
  *
7645
7645
  * - `title` — short label for chips, badges, headings
@@ -7685,11 +7685,11 @@ export declare type Editable = v.InferOutput<typeof StoredEditableSchema>;
7685
7685
  * out of scope here — see the slot-component work).
7686
7686
  */
7687
7687
  export declare interface EditableSlotEvaluation {
7688
- scope: StateScope;
7688
+ scope: FieldScope;
7689
7689
  /** Present iff `scope === "task"`. */
7690
7690
  task?: TaskName;
7691
7691
  name: string;
7692
- type: StateKind;
7692
+ type: FieldKind;
7693
7693
  title?: string;
7694
7694
  /** Current resolved value; `undefined` until the slot is first resolved. */
7695
7695
  value: unknown;
@@ -7738,29 +7738,13 @@ export declare type EditDisabledReason =
7738
7738
  }
7739
7739
  >;
7740
7740
 
7741
- /**
7742
- * The generic edit seam (EDEX-1319). `editState` writes a declared-editable
7743
- * slot directly — reassign, reschedule, claim-by-hand, append to a log —
7744
- * without a bespoke action per field. It is NOT a raw patch: the edit applies
7745
- * as a `state.*` op through the shared op path (so it stamps `opApplied`
7746
- * provenance + history), gates on the slot's declared editability the same way
7747
- * an action gates on its filter, then refreshes the stage's guards and lets the
7748
- * caller cascade. Editing a value a transition reads can and should move the
7749
- * instance — that rippling is intended.
7750
- *
7751
- * Gating is ONE mechanism (advisory, like every engine check): the slot's
7752
- * effective `editable` predicate over the rendered scope. The lake ACL + guards
7753
- * are the only hard locks.
7754
- */
7755
- export declare type EditMode = "set" | "append" | "unset";
7756
-
7757
- export declare interface EditStateArgs extends OperationArgs {
7741
+ export declare interface EditFieldArgs extends OperationArgs {
7758
7742
  /**
7759
7743
  * Which declared-editable slot to write. Omit `scope` to resolve lexically
7760
7744
  * (a `task` implies task scope; otherwise the nearest declaring scope, stage
7761
7745
  * before workflow). `task` is required to address a task-scope slot.
7762
7746
  */
7763
- target: EditStateTarget;
7747
+ target: EditFieldTarget;
7764
7748
  /**
7765
7749
  * How to write: `set` replaces the value (reassign / reschedule), `append`
7766
7750
  * adds a row to an array slot (a running log / checklist), `unset` clears it.
@@ -7775,33 +7759,49 @@ export declare interface EditStateArgs extends OperationArgs {
7775
7759
  value?: unknown;
7776
7760
  }
7777
7761
 
7778
- /** Edit-seam twin of {@link ActionDisabledError}: thrown by `editState` when
7762
+ /** Edit-seam twin of {@link ActionDisabledError}: thrown by `editField` when
7779
7763
  * the slot can't be edited by the caller. Carries the structured reason. */
7780
- export declare class EditStateDeniedError extends Error {
7764
+ export declare class EditFieldDeniedError extends Error {
7781
7765
  readonly reason: EditDisabledReason;
7782
7766
  readonly target: {
7783
- scope: StateScope;
7784
- state: string;
7767
+ scope: FieldScope;
7768
+ field: string;
7785
7769
  task?: string;
7786
7770
  };
7787
7771
  constructor(args: {
7788
7772
  target: {
7789
- scope: StateScope;
7790
- state: string;
7773
+ scope: FieldScope;
7774
+ field: string;
7791
7775
  task?: string;
7792
7776
  };
7793
7777
  reason: EditDisabledReason;
7794
7778
  });
7795
7779
  }
7796
7780
 
7797
- export declare interface EditStateTarget {
7781
+ export declare interface EditFieldTarget {
7798
7782
  /** Omit to resolve lexically (task slot if `task` set, else stage then workflow). */
7799
- scope?: StateScope;
7800
- state: string;
7783
+ scope?: FieldScope;
7784
+ field: string;
7801
7785
  /** Required to address a task-scope slot. */
7802
7786
  task?: string;
7803
7787
  }
7804
7788
 
7789
+ /**
7790
+ * The generic edit seam (EDEX-1319). `editField` writes a declared-editable
7791
+ * slot directly — reassign, reschedule, claim-by-hand, append to a log —
7792
+ * without a bespoke action per field. It is NOT a raw patch: the edit applies
7793
+ * as a `field.*` op through the shared op path (so it stamps `opApplied`
7794
+ * provenance + history), gates on the slot's declared editability the same way
7795
+ * an action gates on its filter, then refreshes the stage's guards and lets the
7796
+ * caller cascade. Editing a value a transition reads can and should move the
7797
+ * instance — that rippling is intended.
7798
+ *
7799
+ * Gating is ONE mechanism (advisory, like every engine check): the slot's
7800
+ * effective `editable` predicate over the rendered scope. The lake ACL + guards
7801
+ * are the only hard locks.
7802
+ */
7803
+ export declare type EditMode = "set" | "append" | "unset";
7804
+
7805
7805
  export declare type Effect = v.InferOutput<typeof EffectSchema>;
7806
7806
 
7807
7807
  /**
@@ -7926,9 +7926,9 @@ declare const EffectSchema: v.StrictObjectSchema<
7926
7926
  * `json` entry per effect, read as `$effects['<effect name>'].<output>`.
7927
7927
  * Never mutated by user-facing API.
7928
7928
  *
7929
- * Critical: `effectsContext` is NOT a workflow state container.
7930
- * Transition filters must NOT read it as state. The workflow's state lives
7931
- * on `state[]`; external state lives in the lake (queryable via filters).
7929
+ * Critical: `effectsContext` is NOT a workflow field container.
7930
+ * Transition filters must NOT read it as fields. The workflow's fields live
7931
+ * on `fields[]`; external state lives in the lake (queryable via filters).
7932
7932
  */
7933
7933
  export declare type EffectsContextEntry =
7934
7934
  | {
@@ -7987,9 +7987,9 @@ export declare interface Engine {
7987
7987
  ) => Promise<DeployDefinitionsResult>;
7988
7988
  startInstance: (args: Bound<StartInstanceArgs>) => Promise<WorkflowInstance>;
7989
7989
  fireAction: (args: Bound<FireActionArgs>) => Promise<DispatchResult>;
7990
- /** Edit a declared-editable state slot directly (the generic edit seam):
7990
+ /** Edit a declared-editable field slot directly (the generic edit seam):
7991
7991
  * reassign / reschedule / claim-by-hand / append-to-log, then cascade. */
7992
- editState: (args: Bound<EditStateArgs>) => Promise<DispatchResult>;
7992
+ editField: (args: Bound<EditFieldArgs>) => Promise<DispatchResult>;
7993
7993
  completeEffect: (args: Bound<CompleteEffectArgs>) => Promise<DispatchResult>;
7994
7994
  tick: (args: Bound<OperationArgs>) => Promise<DispatchResult>;
7995
7995
  evaluateInstance: (
@@ -8015,7 +8015,7 @@ export declare interface Engine {
8015
8015
  getInstance: (args: { instanceId: string }) => Promise<WorkflowInstance>;
8016
8016
  /** The reactive {@link WatchSet} for an instance — every document whose
8017
8017
  * change should re-evaluate it (the instance, its ancestors, and the docs
8018
- * named by `doc.ref`/`doc.refs`/`release.ref` state entries on the workflow scope
8018
+ * named by `doc.ref`/`doc.refs`/`release.ref` field entries on the workflow scope
8019
8019
  * + current stage) as exploded {@link SubscriptionDocument}s, plus the
8020
8020
  * instance's read perspective. Fetches the instance, then derives. A
8021
8021
  * reactive adapter that already holds the live instance calls the pure
@@ -8043,7 +8043,7 @@ export declare interface Engine {
8043
8043
  }) => Promise<MutationGuardDoc[]>;
8044
8044
  /** Every lake mutation guard a workflow deployed (any version), across the
8045
8045
  * datasources its guards statically name — the workflow resource plus any
8046
- * literal-GDR state entries, unioned over all deployed versions.
8046
+ * literal-GDR field entries, unioned over all deployed versions.
8047
8047
  * Needs no live instance. Guards whose resource is only known per-instance
8048
8048
  * (init/runtime-sourced entries) are not reachable here — use
8049
8049
  * {@link Engine.guardsForInstance}. For housekeeping. Takes the
@@ -8065,7 +8065,7 @@ export declare interface Engine {
8065
8065
  }) => Promise<T>;
8066
8066
  /** Snapshot-aware GROQ — runs against the same in-memory view the
8067
8067
  * engine's filters see for the supplied instance. The rendered scope
8068
- * (`$self`, `$state`, `$parent`, `$ancestors`, `$stage`, `$now`,
8068
+ * (`$self`, `$fields`, `$parent`, `$ancestors`, `$stage`, `$now`,
8069
8069
  * `$effects`, `$tasks`, `$allTasksDone`, `$anyTaskFailed`) is bound,
8070
8070
  * ids in GDR URI form to match the snapshot's keying. */
8071
8071
  queryInScope: <T = unknown>(args: {
@@ -8235,6 +8235,143 @@ declare function fetchGrants(args: {
8235
8235
  signal?: AbortSignal;
8236
8236
  }): Promise<Grant[]>;
8237
8237
 
8238
+ declare const FIELD_SCOPES: readonly ["workflow", "stage", "task"];
8239
+
8240
+ /**
8241
+ * Field-entry `_type` discriminators. The entry's kind defines what
8242
+ * shape `value` takes (single GDR vs array, scalar vs notes log).
8243
+ */
8244
+ export declare const FIELD_SLOT_DISPLAY: {
8245
+ "doc.ref": {
8246
+ title: string;
8247
+ description: string;
8248
+ };
8249
+ "doc.refs": {
8250
+ title: string;
8251
+ description: string;
8252
+ };
8253
+ "release.ref": {
8254
+ title: string;
8255
+ description: string;
8256
+ };
8257
+ query: {
8258
+ title: string;
8259
+ description: string;
8260
+ };
8261
+ "value.string": {
8262
+ title: string;
8263
+ description: string;
8264
+ };
8265
+ "value.url": {
8266
+ title: string;
8267
+ description: string;
8268
+ };
8269
+ "value.number": {
8270
+ title: string;
8271
+ description: string;
8272
+ };
8273
+ "value.boolean": {
8274
+ title: string;
8275
+ description: string;
8276
+ };
8277
+ "value.dateTime": {
8278
+ title: string;
8279
+ description: string;
8280
+ };
8281
+ "value.actor": {
8282
+ title: string;
8283
+ description: string;
8284
+ };
8285
+ checklist: {
8286
+ title: string;
8287
+ description: string;
8288
+ };
8289
+ notes: {
8290
+ title: string;
8291
+ description: string;
8292
+ };
8293
+ assignees: {
8294
+ title: string;
8295
+ description: string;
8296
+ };
8297
+ };
8298
+
8299
+ export declare type FieldEntry = v.InferOutput<typeof FieldEntrySchema>;
8300
+
8301
+ declare const FieldEntrySchema: v.StrictObjectSchema<
8302
+ {
8303
+ type: v.PicklistSchema<
8304
+ readonly [
8305
+ "doc.ref",
8306
+ "doc.refs",
8307
+ "release.ref",
8308
+ "query",
8309
+ "value.string",
8310
+ "value.url",
8311
+ "value.number",
8312
+ "value.boolean",
8313
+ "value.dateTime",
8314
+ "value.actor",
8315
+ "checklist",
8316
+ "notes",
8317
+ "assignees",
8318
+ ],
8319
+ `Invalid option: expected one of ${string}`
8320
+ >;
8321
+ name: v.SchemaWithPipe<
8322
+ readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
8323
+ >;
8324
+ title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8325
+ description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8326
+ /**
8327
+ * When true, the caller MUST supply this entry at start (via
8328
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
8329
+ * missing required entry throws rather than silently defaulting to
8330
+ * `null`/`[]` — the same fail-fast an action's `required` param gets.
8331
+ * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
8332
+ */
8333
+ required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
8334
+ source: v.GenericSchema<SourceInternal>;
8335
+ /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
8336
+ editable: v.OptionalSchema<
8337
+ v.UnionSchema<
8338
+ [
8339
+ v.LiteralSchema<true, undefined>,
8340
+ v.SchemaWithPipe<
8341
+ readonly [
8342
+ v.StringSchema<undefined>,
8343
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
8344
+ ]
8345
+ >,
8346
+ ],
8347
+ undefined
8348
+ >,
8349
+ undefined
8350
+ >;
8351
+ },
8352
+ undefined
8353
+ >;
8354
+
8355
+ export declare type FieldKind = keyof FieldValueMap;
8356
+
8357
+ export declare type FieldScope = (typeof FIELD_SCOPES)[number];
8358
+
8359
+ export declare interface FieldValueMap {
8360
+ "doc.ref": GlobalDocumentReference | null;
8361
+ "doc.refs": GlobalDocumentReference[];
8362
+ "release.ref": ReleaseRef | null;
8363
+ query: unknown;
8364
+ "value.string": string | null;
8365
+ "value.url": string | null;
8366
+ "value.number": number | null;
8367
+ "value.boolean": boolean | null;
8368
+ "value.dateTime": string | null;
8369
+ "value.actor": Actor | null;
8370
+ checklist: ChecklistItem[];
8371
+ notes: NoteItem[];
8372
+ assignees: Assignee[];
8373
+ }
8374
+
8238
8375
  export declare interface FireActionArgs extends OperationArgs {
8239
8376
  task: string;
8240
8377
  action: string;
@@ -8304,7 +8441,7 @@ export declare type GdrScheme =
8304
8441
  *
8305
8442
  * Combined with schema validation at the API boundary, this is the
8306
8443
  * type + runtime guarantee that no bare-string id reaches the
8307
- * snapshot, state entry, or filter layer.
8444
+ * snapshot, field entry, or filter layer.
8308
8445
  */
8309
8446
  export declare type GdrUri = `${GdrScheme}:${string}`;
8310
8447
 
@@ -8404,7 +8541,7 @@ declare const GuardMatchSchema: v.StrictObjectSchema<
8404
8541
  >,
8405
8542
  undefined
8406
8543
  >;
8407
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8544
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8408
8545
  readonly idRefs: v.OptionalSchema<
8409
8546
  v.ArraySchema<
8410
8547
  v.SchemaWithPipe<
@@ -8478,7 +8615,7 @@ declare const GuardSchema: v.StrictObjectSchema<
8478
8615
  >,
8479
8616
  undefined
8480
8617
  >;
8481
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8618
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
8482
8619
  readonly idRefs: v.OptionalSchema<
8483
8620
  v.ArraySchema<
8484
8621
  v.SchemaWithPipe<
@@ -8531,12 +8668,12 @@ declare const GuardSchema: v.StrictObjectSchema<
8531
8668
  */
8532
8669
  readonly predicate: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
8533
8670
  /**
8534
- * Projected workflow state the predicate reads as `guard.metadata.*` —
8535
- * the only bridge from the lake eval context (which cannot see `$state`)
8536
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
8671
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
8672
+ * the only bridge from the lake eval context (which cannot see `$fields`)
8673
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
8537
8674
  * the guard mini-language — `"$self"`, `"$now"`, or
8538
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
8539
- * re-synced by the post-state-op guard refresh.
8675
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
8676
+ * re-synced by the post-field-op guard refresh.
8540
8677
  */
8541
8678
  readonly metadata: v.OptionalSchema<
8542
8679
  v.RecordSchema<
@@ -8568,11 +8705,11 @@ declare const GuardSchema: v.StrictObjectSchema<
8568
8705
  * ({@link GuardsForDefinitionArgs.definitions}), not just the latest.
8569
8706
  *
8570
8707
  * A datasource is statically reachable when a guard idRef resolves to a
8571
- * hardcoded GDR literal — directly, or via a `stateRead` of a state entry whose source
8708
+ * hardcoded GDR literal — directly, or via a `fieldRead` of a field entry whose source
8572
8709
  * is a literal GDR — or to the workflow resource (`self`, or a `query`-sourced
8573
- * state entry, which restamps into it). Guards whose resource is only known once an
8710
+ * field entry, which restamps into it). Guards whose resource is only known once an
8574
8711
  * instance exists — reading a `subject` / `init` / otherwise runtime-sourced
8575
- * state entry — are NOT reachable here; that is the per-instance boundary, use
8712
+ * field entry — are NOT reachable here; that is the per-instance boundary, use
8576
8713
  * {@link guardsForInstance}. Dedups resources by key, results by `_id`.
8577
8714
  */
8578
8715
  export declare function guardsForDefinition(
@@ -8753,7 +8890,7 @@ export declare type HistoryEntry =
8753
8890
  * GDR pointer at the spawned child workflow instance. Stored as
8754
8891
  * the typed `{id, type}` envelope — same shape every other GDR
8755
8892
  * field in the engine uses (`ancestors[]`, `spawnedInstances[]`,
8756
- * any `doc.ref` state entry). The `id` is the full GDR URI.
8893
+ * any `doc.ref` field entry). The `id` is the full GDR URI.
8757
8894
  */
8758
8895
  instanceRef: GlobalDocumentReference;
8759
8896
  actor?: Actor;
@@ -8780,15 +8917,15 @@ export declare type HistoryEntry =
8780
8917
  task?: TaskName;
8781
8918
  action?: ActionName;
8782
8919
  transition?: string;
8783
- /** Set when the op was a direct edit through the edit seam (`editState`),
8920
+ /** Set when the op was a direct edit through the edit seam (`editField`),
8784
8921
  * not an action/transition/activation. */
8785
8922
  edit?: true;
8786
- /** The op's `type` (e.g. `state.set`). */
8923
+ /** The op's `type` (e.g. `field.set`). */
8787
8924
  opType: string;
8788
- /** State reference the op targeted (omitted for `status.set`). */
8925
+ /** Field reference the op targeted (omitted for `status.set`). */
8789
8926
  target?: {
8790
- scope: StateScope;
8791
- state: string;
8927
+ scope: FieldScope;
8928
+ field: string;
8792
8929
  };
8793
8930
  /** Concrete resolved params the op acted on. Captured for audit. */
8794
8931
  resolved?: Record<string, unknown>;
@@ -8814,17 +8951,17 @@ export declare interface HydratedSnapshot {
8814
8951
  /**
8815
8952
  * Initial value for an `init`-sourced entry — what a caller supplies at
8816
8953
  * `startInstance` (or `setStage`). Same discriminator shape as
8817
- * ResolvedStateEntry minus `_key` and with null values disallowed
8954
+ * ResolvedFieldEntry minus `_key` and with null values disallowed
8818
8955
  * (omission signals "no initial value"). Query entries excluded —
8819
8956
  * engine always computes those itself.
8820
8957
  */
8821
- export declare type InitialStateValue = {
8822
- [K in Exclude<StateKind, "query">]: {
8958
+ export declare type InitialFieldValue = {
8959
+ [K in Exclude<FieldKind, "query">]: {
8823
8960
  type: K;
8824
8961
  name: string;
8825
- value: NonNullable<StateValueMap[K]>;
8962
+ value: NonNullable<FieldValueMap[K]>;
8826
8963
  };
8827
- }[Exclude<StateKind, "query">];
8964
+ }[Exclude<FieldKind, "query">];
8828
8965
 
8829
8966
  /**
8830
8967
  * The per-instance guard filter — the single definition of "this instance's
@@ -8870,8 +9007,8 @@ export declare interface InstanceSession {
8870
9007
  }): Promise<DispatchResult>;
8871
9008
  /** Edit a declared-editable slot against the held content (the generic edit
8872
9009
  * seam), gated on the held projection, then cascade. */
8873
- editState(args: {
8874
- target: EditStateTarget;
9010
+ editField(args: {
9011
+ target: EditFieldTarget;
8875
9012
  mode?: EditMode;
8876
9013
  value?: unknown;
8877
9014
  }): Promise<DispatchResult>;
@@ -8895,7 +9032,7 @@ export declare function isGdr(value: unknown): value is GlobalDocumentReference;
8895
9032
  * Whether a human may start this definition standalone (the default). A
8896
9033
  * `role: 'child'` definition is spawn-only — instantiated by a parent via
8897
9034
  * `task.subworkflows`, so consumers exclude it from top-level start pickers.
8898
- * Advisory: the engine does not enforce it (see the `required`-state backstop
9035
+ * Advisory: the engine does not enforce it (see the `required`-field backstop
8899
9036
  * for load-bearing init slots). Accepts any definition-shaped value (authored,
8900
9037
  * stored, deployed, or a projected list row).
8901
9038
  */
@@ -9097,23 +9234,23 @@ export declare type Op = v.InferOutput<typeof StoredOpSchema>;
9097
9234
  * Op `type` discriminators — the stored mutation primitives.
9098
9235
  */
9099
9236
  export declare const OP_DISPLAY: {
9100
- "state.set": {
9237
+ "field.set": {
9101
9238
  title: string;
9102
9239
  description: string;
9103
9240
  };
9104
- "state.unset": {
9241
+ "field.unset": {
9105
9242
  title: string;
9106
9243
  description: string;
9107
9244
  };
9108
- "state.append": {
9245
+ "field.append": {
9109
9246
  title: string;
9110
9247
  description: string;
9111
9248
  };
9112
- "state.updateWhere": {
9249
+ "field.updateWhere": {
9113
9250
  title: string;
9114
9251
  description: string;
9115
9252
  };
9116
- "state.removeWhere": {
9253
+ "field.removeWhere": {
9117
9254
  title: string;
9118
9255
  description: string;
9119
9256
  };
@@ -9126,8 +9263,8 @@ export declare const OP_DISPLAY: {
9126
9263
  export declare interface OpAppliedSummary {
9127
9264
  opType: string;
9128
9265
  target?: {
9129
- scope: StateScope;
9130
- state: string;
9266
+ scope: FieldScope;
9267
+ field: string;
9131
9268
  };
9132
9269
  resolved?: Record<string, unknown>;
9133
9270
  }
@@ -9328,12 +9465,12 @@ export declare type RemediationVerb =
9328
9465
 
9329
9466
  /**
9330
9467
  * Thrown when a workflow is started (or a child spawned) without a value for
9331
- * a state entry marked `required`. Mirrors {@link ActionParamsInvalidError}:
9468
+ * a field entry marked `required`. Mirrors {@link ActionParamsInvalidError}:
9332
9469
  * the engine has NOT created the instance — a missing load-bearing slot
9333
9470
  * (e.g. the subject of a review) screams here rather than silently defaulting
9334
9471
  * to `null`/`[]` and birthing a half-formed instance mid-process.
9335
9472
  */
9336
- export declare class RequiredStateNotProvidedError extends Error {
9473
+ export declare class RequiredFieldNotProvidedError extends Error {
9337
9474
  readonly definition?: string;
9338
9475
  readonly missing: {
9339
9476
  name: string;
@@ -9389,24 +9526,24 @@ export declare interface ResolveAccessArgs {
9389
9526
  }
9390
9527
 
9391
9528
  /**
9392
- * A resolved state entry as the engine persists it on an instance.
9529
+ * A resolved field entry as the engine persists it on an instance.
9393
9530
  * Discriminated by `_type` (bare — unique within this union); the `value`
9394
- * type follows StateValueMap. Query entries additionally carry `resolvedAt`.
9531
+ * type follows FieldValueMap. Query entries additionally carry `resolvedAt`.
9395
9532
  */
9396
- export declare type ResolvedStateEntry = {
9397
- [K in StateKind]: {
9533
+ export declare type ResolvedFieldEntry = {
9534
+ [K in FieldKind]: {
9398
9535
  _key: string;
9399
9536
  _type: K;
9400
9537
  name: string;
9401
9538
  title?: string;
9402
9539
  description?: string;
9403
- value: StateValueMap[K];
9540
+ value: FieldValueMap[K];
9404
9541
  } & (K extends "query"
9405
9542
  ? {
9406
9543
  resolvedAt: string;
9407
9544
  }
9408
9545
  : Record<never, never>);
9409
- }[StateKind];
9546
+ }[FieldKind];
9410
9547
 
9411
9548
  /**
9412
9549
  * Resolver for cross-resource reads. The engine has ONE `client` bound
@@ -9499,10 +9636,10 @@ export declare interface SetStageArgs extends OperationArgs {
9499
9636
  /** Free-text reason — surfaces on history entries for audit. */
9500
9637
  reason?: string;
9501
9638
  /**
9502
- * Initial values for state entries on the target stage, in the same shape as
9503
- * `startInstance.initialState`; reserved for the stage-state work.
9639
+ * Initial values for field entries on the target stage, in the same shape as
9640
+ * `startInstance.initialFields`; reserved for the stage-field work.
9504
9641
  */
9505
- initialState?: InitialStateValue[];
9642
+ initialFields?: InitialFieldValue[];
9506
9643
  }
9507
9644
 
9508
9645
  /**
@@ -9545,9 +9682,9 @@ declare type SourceInternal =
9545
9682
  type: "stage";
9546
9683
  }
9547
9684
  | {
9548
- type: "stateRead";
9685
+ type: "fieldRead";
9549
9686
  scope?: "workflow" | "stage" | undefined;
9550
- state: string;
9687
+ field: string;
9551
9688
  path?: string | undefined;
9552
9689
  }
9553
9690
  | {
@@ -9563,8 +9700,8 @@ export declare interface StageEntry {
9563
9700
  enteredAt: string;
9564
9701
  /** Set on transition out; absent for the current stage. */
9565
9702
  exitedAt?: string;
9566
- /** Stage-scoped resolved state entries. */
9567
- state: ResolvedStateEntry[];
9703
+ /** Stage-scoped resolved field entries. */
9704
+ fields: ResolvedFieldEntry[];
9568
9705
  tasks: TaskEntry[];
9569
9706
  }
9570
9707
 
@@ -9604,10 +9741,10 @@ export declare interface StartInstanceArgs {
9604
9741
  /** Optional explicit version. Defaults to the highest deployed version. */
9605
9742
  version?: number;
9606
9743
  /**
9607
- * Initial values for `init`-sourced state entries declared on the
9744
+ * Initial values for `init`-sourced field entries declared on the
9608
9745
  * workflow definition. Each value is a
9609
- * typed `InitialStateValue` whose `type` + `name` must match an entry
9610
- * on `definition.state[]`. Entries not present here resolve to their
9746
+ * typed `InitialFieldValue` whose `type` + `name` must match an entry
9747
+ * on `definition.fields[]`. Entries not present here resolve to their
9611
9748
  * default (null for scalars, [] for arrays, the entry's source-type
9612
9749
  * resolution for query/write).
9613
9750
  *
@@ -9615,9 +9752,9 @@ export declare interface StartInstanceArgs {
9615
9752
  * `{ type: "doc.ref", name: "subject", source: { type: "init" } }`
9616
9753
  * entry on the workflow and pass
9617
9754
  * `{ type: "doc.ref", name: "subject", value: { id, type } }` here.
9618
- * Conditions then read it as `$state.subject`.
9755
+ * Conditions then read it as `$fields.subject`.
9619
9756
  */
9620
- initialState?: InitialStateValue[];
9757
+ initialFields?: InitialFieldValue[];
9621
9758
  ancestors?: GlobalDocumentReference[];
9622
9759
  /**
9623
9760
  * Stable named params for effect handlers, set at start time. The
@@ -9657,7 +9794,7 @@ export declare interface StartInstanceArgs {
9657
9794
  grantsFromPath?: string;
9658
9795
  /**
9659
9796
  * Optional read-side perspective for this instance. Threaded into
9660
- * state-entry query resolution and spawn `forEach.groq` discovery so
9797
+ * field-entry query resolution and spawn `forEach.groq` discovery so
9661
9798
  * a workflow can scope its reads to a Content Release stack. Child
9662
9799
  * instances inherit the parent's perspective on spawn.
9663
9800
  *
@@ -9669,143 +9806,6 @@ export declare interface StartInstanceArgs {
9669
9806
  perspective?: WorkflowPerspective;
9670
9807
  }
9671
9808
 
9672
- declare const STATE_SCOPES: readonly ["workflow", "stage", "task"];
9673
-
9674
- /**
9675
- * State-entry `_type` discriminators. The entry's kind defines what
9676
- * shape `value` takes (single GDR vs array, scalar vs notes log).
9677
- */
9678
- export declare const STATE_SLOT_DISPLAY: {
9679
- "doc.ref": {
9680
- title: string;
9681
- description: string;
9682
- };
9683
- "doc.refs": {
9684
- title: string;
9685
- description: string;
9686
- };
9687
- "release.ref": {
9688
- title: string;
9689
- description: string;
9690
- };
9691
- query: {
9692
- title: string;
9693
- description: string;
9694
- };
9695
- "value.string": {
9696
- title: string;
9697
- description: string;
9698
- };
9699
- "value.url": {
9700
- title: string;
9701
- description: string;
9702
- };
9703
- "value.number": {
9704
- title: string;
9705
- description: string;
9706
- };
9707
- "value.boolean": {
9708
- title: string;
9709
- description: string;
9710
- };
9711
- "value.dateTime": {
9712
- title: string;
9713
- description: string;
9714
- };
9715
- "value.actor": {
9716
- title: string;
9717
- description: string;
9718
- };
9719
- checklist: {
9720
- title: string;
9721
- description: string;
9722
- };
9723
- notes: {
9724
- title: string;
9725
- description: string;
9726
- };
9727
- assignees: {
9728
- title: string;
9729
- description: string;
9730
- };
9731
- };
9732
-
9733
- export declare type StateEntry = v.InferOutput<typeof StateEntrySchema>;
9734
-
9735
- declare const StateEntrySchema: v.StrictObjectSchema<
9736
- {
9737
- type: v.PicklistSchema<
9738
- readonly [
9739
- "doc.ref",
9740
- "doc.refs",
9741
- "release.ref",
9742
- "query",
9743
- "value.string",
9744
- "value.url",
9745
- "value.number",
9746
- "value.boolean",
9747
- "value.dateTime",
9748
- "value.actor",
9749
- "checklist",
9750
- "notes",
9751
- "assignees",
9752
- ],
9753
- `Invalid option: expected one of ${string}`
9754
- >;
9755
- name: v.SchemaWithPipe<
9756
- readonly [v.StringSchema<undefined>, v.RegexAction<string, string>]
9757
- >;
9758
- title: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9759
- description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
9760
- /**
9761
- * When true, the caller MUST supply this entry at start (via
9762
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
9763
- * missing required entry throws rather than silently defaulting to
9764
- * `null`/`[]` — the same fail-fast an action's `required` param gets.
9765
- * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
9766
- */
9767
- required: v.OptionalSchema<v.BooleanSchema<undefined>, undefined>;
9768
- source: v.GenericSchema<SourceInternal>;
9769
- /** Who-may-edit this slot via the edit seam — see {@link StoredEditableSchema}. */
9770
- editable: v.OptionalSchema<
9771
- v.UnionSchema<
9772
- [
9773
- v.LiteralSchema<true, undefined>,
9774
- v.SchemaWithPipe<
9775
- readonly [
9776
- v.StringSchema<undefined>,
9777
- v.MinLengthAction<string, 1, "must be a non-empty string">,
9778
- ]
9779
- >,
9780
- ],
9781
- undefined
9782
- >,
9783
- undefined
9784
- >;
9785
- },
9786
- undefined
9787
- >;
9788
-
9789
- export declare type StateKind = keyof StateValueMap;
9790
-
9791
- export declare type StateScope = (typeof STATE_SCOPES)[number];
9792
-
9793
- export declare interface StateValueMap {
9794
- "doc.ref": GlobalDocumentReference | null;
9795
- "doc.refs": GlobalDocumentReference[];
9796
- "release.ref": ReleaseRef | null;
9797
- query: unknown;
9798
- "value.string": string | null;
9799
- "value.url": string | null;
9800
- "value.number": number | null;
9801
- "value.boolean": boolean | null;
9802
- "value.dateTime": string | null;
9803
- "value.actor": Actor | null;
9804
- checklist: ChecklistItem[];
9805
- notes: NoteItem[];
9806
- assignees: Assignee[];
9807
- }
9808
-
9809
9809
  declare const StoredActionSchema: v.StrictObjectSchema<
9810
9810
  {
9811
9811
  name: v.SchemaWithPipe<
@@ -9880,14 +9880,14 @@ declare const StoredActionSchema: v.StrictObjectSchema<
9880
9880
  [
9881
9881
  v.StrictObjectSchema<
9882
9882
  {
9883
- readonly type: v.LiteralSchema<"state.set", undefined>;
9883
+ readonly type: v.LiteralSchema<"field.set", undefined>;
9884
9884
  readonly target: v.StrictObjectSchema<
9885
9885
  {
9886
9886
  readonly scope: v.PicklistSchema<
9887
9887
  readonly ["workflow", "stage", "task"],
9888
9888
  `Invalid option: expected one of ${string}`
9889
9889
  >;
9890
- readonly state: v.SchemaWithPipe<
9890
+ readonly field: v.SchemaWithPipe<
9891
9891
  readonly [
9892
9892
  v.StringSchema<undefined>,
9893
9893
  v.MinLengthAction<
@@ -9906,14 +9906,14 @@ declare const StoredActionSchema: v.StrictObjectSchema<
9906
9906
  >,
9907
9907
  v.StrictObjectSchema<
9908
9908
  {
9909
- readonly type: v.LiteralSchema<"state.unset", undefined>;
9909
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
9910
9910
  readonly target: v.StrictObjectSchema<
9911
9911
  {
9912
9912
  readonly scope: v.PicklistSchema<
9913
9913
  readonly ["workflow", "stage", "task"],
9914
9914
  `Invalid option: expected one of ${string}`
9915
9915
  >;
9916
- readonly state: v.SchemaWithPipe<
9916
+ readonly field: v.SchemaWithPipe<
9917
9917
  readonly [
9918
9918
  v.StringSchema<undefined>,
9919
9919
  v.MinLengthAction<
@@ -9931,14 +9931,14 @@ declare const StoredActionSchema: v.StrictObjectSchema<
9931
9931
  >,
9932
9932
  v.StrictObjectSchema<
9933
9933
  {
9934
- readonly type: v.LiteralSchema<"state.append", undefined>;
9934
+ readonly type: v.LiteralSchema<"field.append", undefined>;
9935
9935
  readonly target: v.StrictObjectSchema<
9936
9936
  {
9937
9937
  readonly scope: v.PicklistSchema<
9938
9938
  readonly ["workflow", "stage", "task"],
9939
9939
  `Invalid option: expected one of ${string}`
9940
9940
  >;
9941
- readonly state: v.SchemaWithPipe<
9941
+ readonly field: v.SchemaWithPipe<
9942
9942
  readonly [
9943
9943
  v.StringSchema<undefined>,
9944
9944
  v.MinLengthAction<
@@ -9957,14 +9957,14 @@ declare const StoredActionSchema: v.StrictObjectSchema<
9957
9957
  >,
9958
9958
  v.StrictObjectSchema<
9959
9959
  {
9960
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
9960
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
9961
9961
  readonly target: v.StrictObjectSchema<
9962
9962
  {
9963
9963
  readonly scope: v.PicklistSchema<
9964
9964
  readonly ["workflow", "stage", "task"],
9965
9965
  `Invalid option: expected one of ${string}`
9966
9966
  >;
9967
- readonly state: v.SchemaWithPipe<
9967
+ readonly field: v.SchemaWithPipe<
9968
9968
  readonly [
9969
9969
  v.StringSchema<undefined>,
9970
9970
  v.MinLengthAction<
@@ -9984,14 +9984,14 @@ declare const StoredActionSchema: v.StrictObjectSchema<
9984
9984
  >,
9985
9985
  v.StrictObjectSchema<
9986
9986
  {
9987
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
9987
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
9988
9988
  readonly target: v.StrictObjectSchema<
9989
9989
  {
9990
9990
  readonly scope: v.PicklistSchema<
9991
9991
  readonly ["workflow", "stage", "task"],
9992
9992
  `Invalid option: expected one of ${string}`
9993
9993
  >;
9994
- readonly state: v.SchemaWithPipe<
9994
+ readonly field: v.SchemaWithPipe<
9995
9995
  readonly [
9996
9996
  v.StringSchema<undefined>,
9997
9997
  v.MinLengthAction<
@@ -10084,11 +10084,11 @@ declare const StoredActionSchema: v.StrictObjectSchema<
10084
10084
  >;
10085
10085
 
10086
10086
  /**
10087
- * Declared editability of a state slot — the generic edit seam's gate. Default
10087
+ * Declared editability of a field slot — the generic edit seam's gate. Default
10088
10088
  * (absent) is NOT editable: a slot is op-only engine working memory unless the
10089
10089
  * modeler opens it. The stored form is `true` (editable by anyone within the
10090
10090
  * slot's scope window) or a GROQ predicate over the rendered scope (`$actor`,
10091
- * `$can`, `$state`, `$assigned`), checked like an action filter to decide
10091
+ * `$can`, `$fields`, `$assigned`), checked like an action filter to decide
10092
10092
  * who-may-edit. ADVISORY like every engine gate — it disables the inline field
10093
10093
  * and explains; real immutability needs a lake {@link Guard}.
10094
10094
  */
@@ -10105,19 +10105,37 @@ declare const StoredEditableSchema: v.UnionSchema<
10105
10105
  undefined
10106
10106
  >;
10107
10107
 
10108
+ export declare type StoredFieldRef = v.InferOutput<typeof StoredFieldRefSchema>;
10109
+
10110
+ declare const StoredFieldRefSchema: v.StrictObjectSchema<
10111
+ {
10112
+ readonly scope: v.PicklistSchema<
10113
+ readonly ["workflow", "stage", "task"],
10114
+ `Invalid option: expected one of ${string}`
10115
+ >;
10116
+ readonly field: v.SchemaWithPipe<
10117
+ readonly [
10118
+ v.StringSchema<undefined>,
10119
+ v.MinLengthAction<string, 1, "must be a non-empty string">,
10120
+ ]
10121
+ >;
10122
+ },
10123
+ undefined
10124
+ >;
10125
+
10108
10126
  declare const StoredOpSchema: v.VariantSchema<
10109
10127
  "type",
10110
10128
  [
10111
10129
  v.StrictObjectSchema<
10112
10130
  {
10113
- readonly type: v.LiteralSchema<"state.set", undefined>;
10131
+ readonly type: v.LiteralSchema<"field.set", undefined>;
10114
10132
  readonly target: v.StrictObjectSchema<
10115
10133
  {
10116
10134
  readonly scope: v.PicklistSchema<
10117
10135
  readonly ["workflow", "stage", "task"],
10118
10136
  `Invalid option: expected one of ${string}`
10119
10137
  >;
10120
- readonly state: v.SchemaWithPipe<
10138
+ readonly field: v.SchemaWithPipe<
10121
10139
  readonly [
10122
10140
  v.StringSchema<undefined>,
10123
10141
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -10132,14 +10150,14 @@ declare const StoredOpSchema: v.VariantSchema<
10132
10150
  >,
10133
10151
  v.StrictObjectSchema<
10134
10152
  {
10135
- readonly type: v.LiteralSchema<"state.unset", undefined>;
10153
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
10136
10154
  readonly target: v.StrictObjectSchema<
10137
10155
  {
10138
10156
  readonly scope: v.PicklistSchema<
10139
10157
  readonly ["workflow", "stage", "task"],
10140
10158
  `Invalid option: expected one of ${string}`
10141
10159
  >;
10142
- readonly state: v.SchemaWithPipe<
10160
+ readonly field: v.SchemaWithPipe<
10143
10161
  readonly [
10144
10162
  v.StringSchema<undefined>,
10145
10163
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -10153,14 +10171,14 @@ declare const StoredOpSchema: v.VariantSchema<
10153
10171
  >,
10154
10172
  v.StrictObjectSchema<
10155
10173
  {
10156
- readonly type: v.LiteralSchema<"state.append", undefined>;
10174
+ readonly type: v.LiteralSchema<"field.append", undefined>;
10157
10175
  readonly target: v.StrictObjectSchema<
10158
10176
  {
10159
10177
  readonly scope: v.PicklistSchema<
10160
10178
  readonly ["workflow", "stage", "task"],
10161
10179
  `Invalid option: expected one of ${string}`
10162
10180
  >;
10163
- readonly state: v.SchemaWithPipe<
10181
+ readonly field: v.SchemaWithPipe<
10164
10182
  readonly [
10165
10183
  v.StringSchema<undefined>,
10166
10184
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -10175,14 +10193,14 @@ declare const StoredOpSchema: v.VariantSchema<
10175
10193
  >,
10176
10194
  v.StrictObjectSchema<
10177
10195
  {
10178
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
10196
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
10179
10197
  readonly target: v.StrictObjectSchema<
10180
10198
  {
10181
10199
  readonly scope: v.PicklistSchema<
10182
10200
  readonly ["workflow", "stage", "task"],
10183
10201
  `Invalid option: expected one of ${string}`
10184
10202
  >;
10185
- readonly state: v.SchemaWithPipe<
10203
+ readonly field: v.SchemaWithPipe<
10186
10204
  readonly [
10187
10205
  v.StringSchema<undefined>,
10188
10206
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -10198,14 +10216,14 @@ declare const StoredOpSchema: v.VariantSchema<
10198
10216
  >,
10199
10217
  v.StrictObjectSchema<
10200
10218
  {
10201
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
10219
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
10202
10220
  readonly target: v.StrictObjectSchema<
10203
10221
  {
10204
10222
  readonly scope: v.PicklistSchema<
10205
10223
  readonly ["workflow", "stage", "task"],
10206
10224
  `Invalid option: expected one of ${string}`
10207
10225
  >;
10208
- readonly state: v.SchemaWithPipe<
10226
+ readonly field: v.SchemaWithPipe<
10209
10227
  readonly [
10210
10228
  v.StringSchema<undefined>,
10211
10229
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -10338,14 +10356,14 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10338
10356
  [
10339
10357
  v.StrictObjectSchema<
10340
10358
  {
10341
- readonly type: v.LiteralSchema<"state.set", undefined>;
10359
+ readonly type: v.LiteralSchema<"field.set", undefined>;
10342
10360
  readonly target: v.StrictObjectSchema<
10343
10361
  {
10344
10362
  readonly scope: v.PicklistSchema<
10345
10363
  readonly ["workflow", "stage", "task"],
10346
10364
  `Invalid option: expected one of ${string}`
10347
10365
  >;
10348
- readonly state: v.SchemaWithPipe<
10366
+ readonly field: v.SchemaWithPipe<
10349
10367
  readonly [
10350
10368
  v.StringSchema<undefined>,
10351
10369
  v.MinLengthAction<
@@ -10365,7 +10383,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10365
10383
  v.StrictObjectSchema<
10366
10384
  {
10367
10385
  readonly type: v.LiteralSchema<
10368
- "state.unset",
10386
+ "field.unset",
10369
10387
  undefined
10370
10388
  >;
10371
10389
  readonly target: v.StrictObjectSchema<
@@ -10374,7 +10392,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10374
10392
  readonly ["workflow", "stage", "task"],
10375
10393
  `Invalid option: expected one of ${string}`
10376
10394
  >;
10377
- readonly state: v.SchemaWithPipe<
10395
+ readonly field: v.SchemaWithPipe<
10378
10396
  readonly [
10379
10397
  v.StringSchema<undefined>,
10380
10398
  v.MinLengthAction<
@@ -10393,7 +10411,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10393
10411
  v.StrictObjectSchema<
10394
10412
  {
10395
10413
  readonly type: v.LiteralSchema<
10396
- "state.append",
10414
+ "field.append",
10397
10415
  undefined
10398
10416
  >;
10399
10417
  readonly target: v.StrictObjectSchema<
@@ -10402,7 +10420,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10402
10420
  readonly ["workflow", "stage", "task"],
10403
10421
  `Invalid option: expected one of ${string}`
10404
10422
  >;
10405
- readonly state: v.SchemaWithPipe<
10423
+ readonly field: v.SchemaWithPipe<
10406
10424
  readonly [
10407
10425
  v.StringSchema<undefined>,
10408
10426
  v.MinLengthAction<
@@ -10422,7 +10440,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10422
10440
  v.StrictObjectSchema<
10423
10441
  {
10424
10442
  readonly type: v.LiteralSchema<
10425
- "state.updateWhere",
10443
+ "field.updateWhere",
10426
10444
  undefined
10427
10445
  >;
10428
10446
  readonly target: v.StrictObjectSchema<
@@ -10431,7 +10449,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10431
10449
  readonly ["workflow", "stage", "task"],
10432
10450
  `Invalid option: expected one of ${string}`
10433
10451
  >;
10434
- readonly state: v.SchemaWithPipe<
10452
+ readonly field: v.SchemaWithPipe<
10435
10453
  readonly [
10436
10454
  v.StringSchema<undefined>,
10437
10455
  v.MinLengthAction<
@@ -10452,7 +10470,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10452
10470
  v.StrictObjectSchema<
10453
10471
  {
10454
10472
  readonly type: v.LiteralSchema<
10455
- "state.removeWhere",
10473
+ "field.removeWhere",
10456
10474
  undefined
10457
10475
  >;
10458
10476
  readonly target: v.StrictObjectSchema<
@@ -10461,7 +10479,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10461
10479
  readonly ["workflow", "stage", "task"],
10462
10480
  `Invalid option: expected one of ${string}`
10463
10481
  >;
10464
- readonly state: v.SchemaWithPipe<
10482
+ readonly field: v.SchemaWithPipe<
10465
10483
  readonly [
10466
10484
  v.StringSchema<undefined>,
10467
10485
  v.MinLengthAction<
@@ -10662,7 +10680,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10662
10680
  v.StrictObjectSchema<
10663
10681
  {
10664
10682
  readonly type: v.LiteralSchema<
10665
- "state.set",
10683
+ "field.set",
10666
10684
  undefined
10667
10685
  >;
10668
10686
  readonly target: v.StrictObjectSchema<
@@ -10671,7 +10689,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10671
10689
  readonly ["workflow", "stage", "task"],
10672
10690
  `Invalid option: expected one of ${string}`
10673
10691
  >;
10674
- readonly state: v.SchemaWithPipe<
10692
+ readonly field: v.SchemaWithPipe<
10675
10693
  readonly [
10676
10694
  v.StringSchema<undefined>,
10677
10695
  v.MinLengthAction<
@@ -10691,7 +10709,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10691
10709
  v.StrictObjectSchema<
10692
10710
  {
10693
10711
  readonly type: v.LiteralSchema<
10694
- "state.unset",
10712
+ "field.unset",
10695
10713
  undefined
10696
10714
  >;
10697
10715
  readonly target: v.StrictObjectSchema<
@@ -10700,7 +10718,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10700
10718
  readonly ["workflow", "stage", "task"],
10701
10719
  `Invalid option: expected one of ${string}`
10702
10720
  >;
10703
- readonly state: v.SchemaWithPipe<
10721
+ readonly field: v.SchemaWithPipe<
10704
10722
  readonly [
10705
10723
  v.StringSchema<undefined>,
10706
10724
  v.MinLengthAction<
@@ -10719,7 +10737,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10719
10737
  v.StrictObjectSchema<
10720
10738
  {
10721
10739
  readonly type: v.LiteralSchema<
10722
- "state.append",
10740
+ "field.append",
10723
10741
  undefined
10724
10742
  >;
10725
10743
  readonly target: v.StrictObjectSchema<
@@ -10728,7 +10746,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10728
10746
  readonly ["workflow", "stage", "task"],
10729
10747
  `Invalid option: expected one of ${string}`
10730
10748
  >;
10731
- readonly state: v.SchemaWithPipe<
10749
+ readonly field: v.SchemaWithPipe<
10732
10750
  readonly [
10733
10751
  v.StringSchema<undefined>,
10734
10752
  v.MinLengthAction<
@@ -10748,7 +10766,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10748
10766
  v.StrictObjectSchema<
10749
10767
  {
10750
10768
  readonly type: v.LiteralSchema<
10751
- "state.updateWhere",
10769
+ "field.updateWhere",
10752
10770
  undefined
10753
10771
  >;
10754
10772
  readonly target: v.StrictObjectSchema<
@@ -10757,7 +10775,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10757
10775
  readonly ["workflow", "stage", "task"],
10758
10776
  `Invalid option: expected one of ${string}`
10759
10777
  >;
10760
- readonly state: v.SchemaWithPipe<
10778
+ readonly field: v.SchemaWithPipe<
10761
10779
  readonly [
10762
10780
  v.StringSchema<undefined>,
10763
10781
  v.MinLengthAction<
@@ -10778,7 +10796,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10778
10796
  v.StrictObjectSchema<
10779
10797
  {
10780
10798
  readonly type: v.LiteralSchema<
10781
- "state.removeWhere",
10799
+ "field.removeWhere",
10782
10800
  undefined
10783
10801
  >;
10784
10802
  readonly target: v.StrictObjectSchema<
@@ -10787,7 +10805,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10787
10805
  readonly ["workflow", "stage", "task"],
10788
10806
  `Invalid option: expected one of ${string}`
10789
10807
  >;
10790
- readonly state: v.SchemaWithPipe<
10808
+ readonly field: v.SchemaWithPipe<
10791
10809
  readonly [
10792
10810
  v.StringSchema<undefined>,
10793
10811
  v.MinLengthAction<
@@ -10948,7 +10966,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
10948
10966
  },
10949
10967
  undefined
10950
10968
  >;
10951
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
10969
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
10952
10970
  readonly with: v.OptionalSchema<
10953
10971
  v.RecordSchema<
10954
10972
  v.SchemaWithPipe<
@@ -11011,8 +11029,8 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11011
11029
  >,
11012
11030
  undefined
11013
11031
  >;
11014
- /** Task-scoped state entries. Resolved at task activation time. */
11015
- state: v.OptionalSchema<
11032
+ /** Task-scoped field entries. Resolved at task activation time. */
11033
+ fields: v.OptionalSchema<
11016
11034
  v.ArraySchema<
11017
11035
  v.StrictObjectSchema<
11018
11036
  {
@@ -11050,7 +11068,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11050
11068
  >;
11051
11069
  /**
11052
11070
  * When true, the caller MUST supply this entry at start (via
11053
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
11071
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
11054
11072
  * missing required entry throws rather than silently defaulting to
11055
11073
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
11056
11074
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -11118,7 +11136,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11118
11136
  v.MinLengthAction<string, 1, "must be a non-empty string">,
11119
11137
  ]
11120
11138
  >;
11121
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
11139
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
11122
11140
  ops: v.OptionalSchema<
11123
11141
  v.ArraySchema<
11124
11142
  v.VariantSchema<
@@ -11126,14 +11144,14 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11126
11144
  [
11127
11145
  v.StrictObjectSchema<
11128
11146
  {
11129
- readonly type: v.LiteralSchema<"state.set", undefined>;
11147
+ readonly type: v.LiteralSchema<"field.set", undefined>;
11130
11148
  readonly target: v.StrictObjectSchema<
11131
11149
  {
11132
11150
  readonly scope: v.PicklistSchema<
11133
11151
  readonly ["workflow", "stage", "task"],
11134
11152
  `Invalid option: expected one of ${string}`
11135
11153
  >;
11136
- readonly state: v.SchemaWithPipe<
11154
+ readonly field: v.SchemaWithPipe<
11137
11155
  readonly [
11138
11156
  v.StringSchema<undefined>,
11139
11157
  v.MinLengthAction<
@@ -11153,7 +11171,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11153
11171
  v.StrictObjectSchema<
11154
11172
  {
11155
11173
  readonly type: v.LiteralSchema<
11156
- "state.unset",
11174
+ "field.unset",
11157
11175
  undefined
11158
11176
  >;
11159
11177
  readonly target: v.StrictObjectSchema<
@@ -11162,7 +11180,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11162
11180
  readonly ["workflow", "stage", "task"],
11163
11181
  `Invalid option: expected one of ${string}`
11164
11182
  >;
11165
- readonly state: v.SchemaWithPipe<
11183
+ readonly field: v.SchemaWithPipe<
11166
11184
  readonly [
11167
11185
  v.StringSchema<undefined>,
11168
11186
  v.MinLengthAction<
@@ -11181,7 +11199,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11181
11199
  v.StrictObjectSchema<
11182
11200
  {
11183
11201
  readonly type: v.LiteralSchema<
11184
- "state.append",
11202
+ "field.append",
11185
11203
  undefined
11186
11204
  >;
11187
11205
  readonly target: v.StrictObjectSchema<
@@ -11190,7 +11208,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11190
11208
  readonly ["workflow", "stage", "task"],
11191
11209
  `Invalid option: expected one of ${string}`
11192
11210
  >;
11193
- readonly state: v.SchemaWithPipe<
11211
+ readonly field: v.SchemaWithPipe<
11194
11212
  readonly [
11195
11213
  v.StringSchema<undefined>,
11196
11214
  v.MinLengthAction<
@@ -11210,7 +11228,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11210
11228
  v.StrictObjectSchema<
11211
11229
  {
11212
11230
  readonly type: v.LiteralSchema<
11213
- "state.updateWhere",
11231
+ "field.updateWhere",
11214
11232
  undefined
11215
11233
  >;
11216
11234
  readonly target: v.StrictObjectSchema<
@@ -11219,7 +11237,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11219
11237
  readonly ["workflow", "stage", "task"],
11220
11238
  `Invalid option: expected one of ${string}`
11221
11239
  >;
11222
- readonly state: v.SchemaWithPipe<
11240
+ readonly field: v.SchemaWithPipe<
11223
11241
  readonly [
11224
11242
  v.StringSchema<undefined>,
11225
11243
  v.MinLengthAction<
@@ -11240,7 +11258,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11240
11258
  v.StrictObjectSchema<
11241
11259
  {
11242
11260
  readonly type: v.LiteralSchema<
11243
- "state.removeWhere",
11261
+ "field.removeWhere",
11244
11262
  undefined
11245
11263
  >;
11246
11264
  readonly target: v.StrictObjectSchema<
@@ -11249,7 +11267,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11249
11267
  readonly ["workflow", "stage", "task"],
11250
11268
  `Invalid option: expected one of ${string}`
11251
11269
  >;
11252
- readonly state: v.SchemaWithPipe<
11270
+ readonly field: v.SchemaWithPipe<
11253
11271
  readonly [
11254
11272
  v.StringSchema<undefined>,
11255
11273
  v.MinLengthAction<
@@ -11377,7 +11395,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11377
11395
  >,
11378
11396
  undefined
11379
11397
  >;
11380
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
11398
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
11381
11399
  readonly idRefs: v.OptionalSchema<
11382
11400
  v.ArraySchema<
11383
11401
  v.SchemaWithPipe<
@@ -11453,12 +11471,12 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11453
11471
  undefined
11454
11472
  >;
11455
11473
  /**
11456
- * Projected workflow state the predicate reads as `guard.metadata.*` —
11457
- * the only bridge from the lake eval context (which cannot see `$state`)
11458
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
11474
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
11475
+ * the only bridge from the lake eval context (which cannot see `$fields`)
11476
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
11459
11477
  * the guard mini-language — `"$self"`, `"$now"`, or
11460
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
11461
- * re-synced by the post-state-op guard refresh.
11478
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
11479
+ * re-synced by the post-field-op guard refresh.
11462
11480
  */
11463
11481
  readonly metadata: v.OptionalSchema<
11464
11482
  v.RecordSchema<
@@ -11485,8 +11503,8 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11485
11503
  >,
11486
11504
  undefined
11487
11505
  >;
11488
- /** Stage-scoped state entries. Resolved at stage entry. */
11489
- state: v.OptionalSchema<
11506
+ /** Stage-scoped field entries. Resolved at stage entry. */
11507
+ fields: v.OptionalSchema<
11490
11508
  v.ArraySchema<
11491
11509
  v.StrictObjectSchema<
11492
11510
  {
@@ -11518,7 +11536,7 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11518
11536
  description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
11519
11537
  /**
11520
11538
  * When true, the caller MUST supply this entry at start (via
11521
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
11539
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
11522
11540
  * missing required entry throws rather than silently defaulting to
11523
11541
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
11524
11542
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -11584,24 +11602,6 @@ declare const StoredStageSchema: v.StrictObjectSchema<
11584
11602
  undefined
11585
11603
  >;
11586
11604
 
11587
- export declare type StoredStateRef = v.InferOutput<typeof StoredStateRefSchema>;
11588
-
11589
- declare const StoredStateRefSchema: v.StrictObjectSchema<
11590
- {
11591
- readonly scope: v.PicklistSchema<
11592
- readonly ["workflow", "stage", "task"],
11593
- `Invalid option: expected one of ${string}`
11594
- >;
11595
- readonly state: v.SchemaWithPipe<
11596
- readonly [
11597
- v.StringSchema<undefined>,
11598
- v.MinLengthAction<string, 1, "must be a non-empty string">,
11599
- ]
11600
- >;
11601
- },
11602
- undefined
11603
- >;
11604
-
11605
11605
  declare const StoredTaskSchema: v.StrictObjectSchema<
11606
11606
  {
11607
11607
  name: v.SchemaWithPipe<
@@ -11690,14 +11690,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11690
11690
  [
11691
11691
  v.StrictObjectSchema<
11692
11692
  {
11693
- readonly type: v.LiteralSchema<"state.set", undefined>;
11693
+ readonly type: v.LiteralSchema<"field.set", undefined>;
11694
11694
  readonly target: v.StrictObjectSchema<
11695
11695
  {
11696
11696
  readonly scope: v.PicklistSchema<
11697
11697
  readonly ["workflow", "stage", "task"],
11698
11698
  `Invalid option: expected one of ${string}`
11699
11699
  >;
11700
- readonly state: v.SchemaWithPipe<
11700
+ readonly field: v.SchemaWithPipe<
11701
11701
  readonly [
11702
11702
  v.StringSchema<undefined>,
11703
11703
  v.MinLengthAction<
@@ -11716,14 +11716,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11716
11716
  >,
11717
11717
  v.StrictObjectSchema<
11718
11718
  {
11719
- readonly type: v.LiteralSchema<"state.unset", undefined>;
11719
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
11720
11720
  readonly target: v.StrictObjectSchema<
11721
11721
  {
11722
11722
  readonly scope: v.PicklistSchema<
11723
11723
  readonly ["workflow", "stage", "task"],
11724
11724
  `Invalid option: expected one of ${string}`
11725
11725
  >;
11726
- readonly state: v.SchemaWithPipe<
11726
+ readonly field: v.SchemaWithPipe<
11727
11727
  readonly [
11728
11728
  v.StringSchema<undefined>,
11729
11729
  v.MinLengthAction<
@@ -11741,14 +11741,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11741
11741
  >,
11742
11742
  v.StrictObjectSchema<
11743
11743
  {
11744
- readonly type: v.LiteralSchema<"state.append", undefined>;
11744
+ readonly type: v.LiteralSchema<"field.append", undefined>;
11745
11745
  readonly target: v.StrictObjectSchema<
11746
11746
  {
11747
11747
  readonly scope: v.PicklistSchema<
11748
11748
  readonly ["workflow", "stage", "task"],
11749
11749
  `Invalid option: expected one of ${string}`
11750
11750
  >;
11751
- readonly state: v.SchemaWithPipe<
11751
+ readonly field: v.SchemaWithPipe<
11752
11752
  readonly [
11753
11753
  v.StringSchema<undefined>,
11754
11754
  v.MinLengthAction<
@@ -11767,14 +11767,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11767
11767
  >,
11768
11768
  v.StrictObjectSchema<
11769
11769
  {
11770
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
11770
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
11771
11771
  readonly target: v.StrictObjectSchema<
11772
11772
  {
11773
11773
  readonly scope: v.PicklistSchema<
11774
11774
  readonly ["workflow", "stage", "task"],
11775
11775
  `Invalid option: expected one of ${string}`
11776
11776
  >;
11777
- readonly state: v.SchemaWithPipe<
11777
+ readonly field: v.SchemaWithPipe<
11778
11778
  readonly [
11779
11779
  v.StringSchema<undefined>,
11780
11780
  v.MinLengthAction<
@@ -11794,14 +11794,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11794
11794
  >,
11795
11795
  v.StrictObjectSchema<
11796
11796
  {
11797
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
11797
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
11798
11798
  readonly target: v.StrictObjectSchema<
11799
11799
  {
11800
11800
  readonly scope: v.PicklistSchema<
11801
11801
  readonly ["workflow", "stage", "task"],
11802
11802
  `Invalid option: expected one of ${string}`
11803
11803
  >;
11804
- readonly state: v.SchemaWithPipe<
11804
+ readonly field: v.SchemaWithPipe<
11805
11805
  readonly [
11806
11806
  v.StringSchema<undefined>,
11807
11807
  v.MinLengthAction<
@@ -11969,14 +11969,14 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11969
11969
  [
11970
11970
  v.StrictObjectSchema<
11971
11971
  {
11972
- readonly type: v.LiteralSchema<"state.set", undefined>;
11972
+ readonly type: v.LiteralSchema<"field.set", undefined>;
11973
11973
  readonly target: v.StrictObjectSchema<
11974
11974
  {
11975
11975
  readonly scope: v.PicklistSchema<
11976
11976
  readonly ["workflow", "stage", "task"],
11977
11977
  `Invalid option: expected one of ${string}`
11978
11978
  >;
11979
- readonly state: v.SchemaWithPipe<
11979
+ readonly field: v.SchemaWithPipe<
11980
11980
  readonly [
11981
11981
  v.StringSchema<undefined>,
11982
11982
  v.MinLengthAction<
@@ -11996,7 +11996,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
11996
11996
  v.StrictObjectSchema<
11997
11997
  {
11998
11998
  readonly type: v.LiteralSchema<
11999
- "state.unset",
11999
+ "field.unset",
12000
12000
  undefined
12001
12001
  >;
12002
12002
  readonly target: v.StrictObjectSchema<
@@ -12005,7 +12005,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12005
12005
  readonly ["workflow", "stage", "task"],
12006
12006
  `Invalid option: expected one of ${string}`
12007
12007
  >;
12008
- readonly state: v.SchemaWithPipe<
12008
+ readonly field: v.SchemaWithPipe<
12009
12009
  readonly [
12010
12010
  v.StringSchema<undefined>,
12011
12011
  v.MinLengthAction<
@@ -12024,7 +12024,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12024
12024
  v.StrictObjectSchema<
12025
12025
  {
12026
12026
  readonly type: v.LiteralSchema<
12027
- "state.append",
12027
+ "field.append",
12028
12028
  undefined
12029
12029
  >;
12030
12030
  readonly target: v.StrictObjectSchema<
@@ -12033,7 +12033,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12033
12033
  readonly ["workflow", "stage", "task"],
12034
12034
  `Invalid option: expected one of ${string}`
12035
12035
  >;
12036
- readonly state: v.SchemaWithPipe<
12036
+ readonly field: v.SchemaWithPipe<
12037
12037
  readonly [
12038
12038
  v.StringSchema<undefined>,
12039
12039
  v.MinLengthAction<
@@ -12053,7 +12053,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12053
12053
  v.StrictObjectSchema<
12054
12054
  {
12055
12055
  readonly type: v.LiteralSchema<
12056
- "state.updateWhere",
12056
+ "field.updateWhere",
12057
12057
  undefined
12058
12058
  >;
12059
12059
  readonly target: v.StrictObjectSchema<
@@ -12062,7 +12062,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12062
12062
  readonly ["workflow", "stage", "task"],
12063
12063
  `Invalid option: expected one of ${string}`
12064
12064
  >;
12065
- readonly state: v.SchemaWithPipe<
12065
+ readonly field: v.SchemaWithPipe<
12066
12066
  readonly [
12067
12067
  v.StringSchema<undefined>,
12068
12068
  v.MinLengthAction<
@@ -12083,7 +12083,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12083
12083
  v.StrictObjectSchema<
12084
12084
  {
12085
12085
  readonly type: v.LiteralSchema<
12086
- "state.removeWhere",
12086
+ "field.removeWhere",
12087
12087
  undefined
12088
12088
  >;
12089
12089
  readonly target: v.StrictObjectSchema<
@@ -12092,7 +12092,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12092
12092
  readonly ["workflow", "stage", "task"],
12093
12093
  `Invalid option: expected one of ${string}`
12094
12094
  >;
12095
- readonly state: v.SchemaWithPipe<
12095
+ readonly field: v.SchemaWithPipe<
12096
12096
  readonly [
12097
12097
  v.StringSchema<undefined>,
12098
12098
  v.MinLengthAction<
@@ -12242,7 +12242,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12242
12242
  },
12243
12243
  undefined
12244
12244
  >;
12245
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
12245
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
12246
12246
  readonly with: v.OptionalSchema<
12247
12247
  v.RecordSchema<
12248
12248
  v.SchemaWithPipe<
@@ -12289,8 +12289,8 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12289
12289
  >,
12290
12290
  undefined
12291
12291
  >;
12292
- /** Task-scoped state entries. Resolved at task activation time. */
12293
- state: v.OptionalSchema<
12292
+ /** Task-scoped field entries. Resolved at task activation time. */
12293
+ fields: v.OptionalSchema<
12294
12294
  v.ArraySchema<
12295
12295
  v.StrictObjectSchema<
12296
12296
  {
@@ -12322,7 +12322,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12322
12322
  description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
12323
12323
  /**
12324
12324
  * When true, the caller MUST supply this entry at start (via
12325
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
12325
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
12326
12326
  * missing required entry throws rather than silently defaulting to
12327
12327
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
12328
12328
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -12361,7 +12361,7 @@ declare const StoredTaskSchema: v.StrictObjectSchema<
12361
12361
  >;
12362
12362
 
12363
12363
  /**
12364
- * The `state.*` subset a transition may carry — `status.set` has no coherent
12364
+ * The `field.*` subset a transition may carry — `status.set` has no coherent
12365
12365
  * task target while the stage's tasks tear down, so the engine rejects it
12366
12366
  * at parse time rather than dropping it silently.
12367
12367
  */
@@ -12370,14 +12370,14 @@ declare const StoredTransitionOpSchema: v.VariantSchema<
12370
12370
  [
12371
12371
  v.StrictObjectSchema<
12372
12372
  {
12373
- readonly type: v.LiteralSchema<"state.set", undefined>;
12373
+ readonly type: v.LiteralSchema<"field.set", undefined>;
12374
12374
  readonly target: v.StrictObjectSchema<
12375
12375
  {
12376
12376
  readonly scope: v.PicklistSchema<
12377
12377
  readonly ["workflow", "stage", "task"],
12378
12378
  `Invalid option: expected one of ${string}`
12379
12379
  >;
12380
- readonly state: v.SchemaWithPipe<
12380
+ readonly field: v.SchemaWithPipe<
12381
12381
  readonly [
12382
12382
  v.StringSchema<undefined>,
12383
12383
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -12392,14 +12392,14 @@ declare const StoredTransitionOpSchema: v.VariantSchema<
12392
12392
  >,
12393
12393
  v.StrictObjectSchema<
12394
12394
  {
12395
- readonly type: v.LiteralSchema<"state.unset", undefined>;
12395
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
12396
12396
  readonly target: v.StrictObjectSchema<
12397
12397
  {
12398
12398
  readonly scope: v.PicklistSchema<
12399
12399
  readonly ["workflow", "stage", "task"],
12400
12400
  `Invalid option: expected one of ${string}`
12401
12401
  >;
12402
- readonly state: v.SchemaWithPipe<
12402
+ readonly field: v.SchemaWithPipe<
12403
12403
  readonly [
12404
12404
  v.StringSchema<undefined>,
12405
12405
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -12413,14 +12413,14 @@ declare const StoredTransitionOpSchema: v.VariantSchema<
12413
12413
  >,
12414
12414
  v.StrictObjectSchema<
12415
12415
  {
12416
- readonly type: v.LiteralSchema<"state.append", undefined>;
12416
+ readonly type: v.LiteralSchema<"field.append", undefined>;
12417
12417
  readonly target: v.StrictObjectSchema<
12418
12418
  {
12419
12419
  readonly scope: v.PicklistSchema<
12420
12420
  readonly ["workflow", "stage", "task"],
12421
12421
  `Invalid option: expected one of ${string}`
12422
12422
  >;
12423
- readonly state: v.SchemaWithPipe<
12423
+ readonly field: v.SchemaWithPipe<
12424
12424
  readonly [
12425
12425
  v.StringSchema<undefined>,
12426
12426
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -12435,14 +12435,14 @@ declare const StoredTransitionOpSchema: v.VariantSchema<
12435
12435
  >,
12436
12436
  v.StrictObjectSchema<
12437
12437
  {
12438
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
12438
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
12439
12439
  readonly target: v.StrictObjectSchema<
12440
12440
  {
12441
12441
  readonly scope: v.PicklistSchema<
12442
12442
  readonly ["workflow", "stage", "task"],
12443
12443
  `Invalid option: expected one of ${string}`
12444
12444
  >;
12445
- readonly state: v.SchemaWithPipe<
12445
+ readonly field: v.SchemaWithPipe<
12446
12446
  readonly [
12447
12447
  v.StringSchema<undefined>,
12448
12448
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -12458,14 +12458,14 @@ declare const StoredTransitionOpSchema: v.VariantSchema<
12458
12458
  >,
12459
12459
  v.StrictObjectSchema<
12460
12460
  {
12461
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
12461
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
12462
12462
  readonly target: v.StrictObjectSchema<
12463
12463
  {
12464
12464
  readonly scope: v.PicklistSchema<
12465
12465
  readonly ["workflow", "stage", "task"],
12466
12466
  `Invalid option: expected one of ${string}`
12467
12467
  >;
12468
- readonly state: v.SchemaWithPipe<
12468
+ readonly field: v.SchemaWithPipe<
12469
12469
  readonly [
12470
12470
  v.StringSchema<undefined>,
12471
12471
  v.MinLengthAction<string, 1, "must be a non-empty string">,
@@ -12504,7 +12504,7 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12504
12504
  v.MinLengthAction<string, 1, "must be a non-empty string">,
12505
12505
  ]
12506
12506
  >;
12507
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
12507
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
12508
12508
  ops: v.OptionalSchema<
12509
12509
  v.ArraySchema<
12510
12510
  v.VariantSchema<
@@ -12512,14 +12512,14 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12512
12512
  [
12513
12513
  v.StrictObjectSchema<
12514
12514
  {
12515
- readonly type: v.LiteralSchema<"state.set", undefined>;
12515
+ readonly type: v.LiteralSchema<"field.set", undefined>;
12516
12516
  readonly target: v.StrictObjectSchema<
12517
12517
  {
12518
12518
  readonly scope: v.PicklistSchema<
12519
12519
  readonly ["workflow", "stage", "task"],
12520
12520
  `Invalid option: expected one of ${string}`
12521
12521
  >;
12522
- readonly state: v.SchemaWithPipe<
12522
+ readonly field: v.SchemaWithPipe<
12523
12523
  readonly [
12524
12524
  v.StringSchema<undefined>,
12525
12525
  v.MinLengthAction<
@@ -12538,14 +12538,14 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12538
12538
  >,
12539
12539
  v.StrictObjectSchema<
12540
12540
  {
12541
- readonly type: v.LiteralSchema<"state.unset", undefined>;
12541
+ readonly type: v.LiteralSchema<"field.unset", undefined>;
12542
12542
  readonly target: v.StrictObjectSchema<
12543
12543
  {
12544
12544
  readonly scope: v.PicklistSchema<
12545
12545
  readonly ["workflow", "stage", "task"],
12546
12546
  `Invalid option: expected one of ${string}`
12547
12547
  >;
12548
- readonly state: v.SchemaWithPipe<
12548
+ readonly field: v.SchemaWithPipe<
12549
12549
  readonly [
12550
12550
  v.StringSchema<undefined>,
12551
12551
  v.MinLengthAction<
@@ -12563,14 +12563,14 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12563
12563
  >,
12564
12564
  v.StrictObjectSchema<
12565
12565
  {
12566
- readonly type: v.LiteralSchema<"state.append", undefined>;
12566
+ readonly type: v.LiteralSchema<"field.append", undefined>;
12567
12567
  readonly target: v.StrictObjectSchema<
12568
12568
  {
12569
12569
  readonly scope: v.PicklistSchema<
12570
12570
  readonly ["workflow", "stage", "task"],
12571
12571
  `Invalid option: expected one of ${string}`
12572
12572
  >;
12573
- readonly state: v.SchemaWithPipe<
12573
+ readonly field: v.SchemaWithPipe<
12574
12574
  readonly [
12575
12575
  v.StringSchema<undefined>,
12576
12576
  v.MinLengthAction<
@@ -12589,14 +12589,14 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12589
12589
  >,
12590
12590
  v.StrictObjectSchema<
12591
12591
  {
12592
- readonly type: v.LiteralSchema<"state.updateWhere", undefined>;
12592
+ readonly type: v.LiteralSchema<"field.updateWhere", undefined>;
12593
12593
  readonly target: v.StrictObjectSchema<
12594
12594
  {
12595
12595
  readonly scope: v.PicklistSchema<
12596
12596
  readonly ["workflow", "stage", "task"],
12597
12597
  `Invalid option: expected one of ${string}`
12598
12598
  >;
12599
- readonly state: v.SchemaWithPipe<
12599
+ readonly field: v.SchemaWithPipe<
12600
12600
  readonly [
12601
12601
  v.StringSchema<undefined>,
12602
12602
  v.MinLengthAction<
@@ -12616,14 +12616,14 @@ declare const StoredTransitionSchema: v.StrictObjectSchema<
12616
12616
  >,
12617
12617
  v.StrictObjectSchema<
12618
12618
  {
12619
- readonly type: v.LiteralSchema<"state.removeWhere", undefined>;
12619
+ readonly type: v.LiteralSchema<"field.removeWhere", undefined>;
12620
12620
  readonly target: v.StrictObjectSchema<
12621
12621
  {
12622
12622
  readonly scope: v.PicklistSchema<
12623
12623
  readonly ["workflow", "stage", "task"],
12624
12624
  `Invalid option: expected one of ${string}`
12625
12625
  >;
12626
- readonly state: v.SchemaWithPipe<
12626
+ readonly field: v.SchemaWithPipe<
12627
12627
  readonly [
12628
12628
  v.StringSchema<undefined>,
12629
12629
  v.MinLengthAction<
@@ -12806,7 +12806,7 @@ declare const SubworkflowsSchema: v.StrictObjectSchema<
12806
12806
  },
12807
12807
  undefined
12808
12808
  >;
12809
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
12809
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
12810
12810
  readonly with: v.OptionalSchema<
12811
12811
  v.RecordSchema<
12812
12812
  v.SchemaWithPipe<
@@ -12917,8 +12917,8 @@ export declare interface TaskEntry {
12917
12917
  * `completeWhen` / `failWhen`.
12918
12918
  */
12919
12919
  spawnedInstances?: GlobalDocumentReference[];
12920
- /** Task-scoped resolved state entries. Absent until the engine writes to it. */
12921
- state?: ResolvedStateEntry[];
12920
+ /** Task-scoped resolved field entries. Absent until the engine writes to it. */
12921
+ fields?: ResolvedFieldEntry[];
12922
12922
  }
12923
12923
 
12924
12924
  export declare interface TaskEvaluation {
@@ -13045,7 +13045,7 @@ export declare const wallClock: Clock;
13045
13045
  export declare interface WatchSet {
13046
13046
  /**
13047
13047
  * Docs to subscribe to — instance + ancestors + the docs named by
13048
- * `doc.ref`/`doc.refs`/`release.ref` state entries — deduped by
13048
+ * `doc.ref`/`doc.refs`/`release.ref` field entries — deduped by
13049
13049
  * `globalDocumentId`. Refs that aren't resource-qualified GDR URIs are
13050
13050
  * skipped (without a resource there's nothing to subscribe against).
13051
13051
  */
@@ -13123,11 +13123,11 @@ export declare const workflow: {
13123
13123
  */
13124
13124
  fireAction: (args: Clocked<FireActionArgs>) => Promise<DispatchResult>;
13125
13125
  /**
13126
- * Edit a declared-editable state slot directly — reassign, reschedule,
13126
+ * Edit a declared-editable field slot directly — reassign, reschedule,
13127
13127
  * claim-by-hand, append to a running log — through the generic edit seam,
13128
13128
  * instead of a bespoke action per field. Soft-gates on the slot's declared
13129
13129
  * editability (the same projection a UI renders), applies the edit as a
13130
- * `state.*` op (so provenance + history are stamped by the op path),
13130
+ * `field.*` op (so provenance + history are stamped by the op path),
13131
13131
  * refreshes the stage's guards, then cascades — an edit to a value a
13132
13132
  * transition reads can and should move the instance. Advisory like every
13133
13133
  * engine gate; the lake ACL + guards are the only hard locks.
@@ -13137,7 +13137,7 @@ export declare const workflow: {
13137
13137
  * UI must bind it to a deliberate boundary (blur / Enter / Save / debounce),
13138
13138
  * never an `onChange` per keystroke.
13139
13139
  */
13140
- editState: (args: Clocked<EditStateArgs>) => Promise<DispatchResult>;
13140
+ editField: (args: Clocked<EditFieldArgs>) => Promise<DispatchResult>;
13141
13141
  /**
13142
13142
  * Report a queued effect's outcome. Drains it from `pendingEffects`,
13143
13143
  * appends an `effectHistory` entry, and (if `outputs` are supplied
@@ -13220,7 +13220,7 @@ export declare const workflow: {
13220
13220
  * Hydrates the instance's snapshot (instance + ancestors + every doc
13221
13221
  * declared by a `doc.ref` / `doc.refs` entry in scope), then
13222
13222
  * evaluates the supplied GROQ in groq-js against that dataset. The
13223
- * rendered scope is auto-bound: `$self`, `$state`, `$parent`,
13223
+ * rendered scope is auto-bound: `$self`, `$fields`, `$parent`,
13224
13224
  * `$ancestors`, `$stage`, `$now`, `$effects`, `$tasks`,
13225
13225
  * `$allTasksDone`, `$anyTaskFailed` — ids in GDR URI form to match
13226
13226
  * the snapshot's keying.
@@ -13422,7 +13422,7 @@ export declare interface WorkflowClient {
13422
13422
  * etc.) without depending on the broader client surface.
13423
13423
  *
13424
13424
  * Typed loosely so both the strict real-client `Action` union and
13425
- * the test fake's discriminated shape satisfy the state entry. Callers
13425
+ * the test fake's discriminated shape satisfy the field entry. Callers
13426
13426
  * (effect handlers) pass the concrete action object literal.
13427
13427
  */
13428
13428
  action?: (
@@ -13506,7 +13506,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13506
13506
  * never started cold from a picker. Omitted ⇒ `'workflow'` (startable).
13507
13507
  * Advisory: consumers filter their start pickers on it (see
13508
13508
  * {@link isStartableDefinition}); the engine does NOT refuse a
13509
- * `startInstance` on a `'child'` def — load-bearing `required` state is the
13509
+ * `startInstance` on a `'child'` def — load-bearing `required` field is the
13510
13510
  * runtime backstop.
13511
13511
  */
13512
13512
  role: v.OptionalSchema<
@@ -13523,8 +13523,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13523
13523
  v.MinLengthAction<string, 1, "must be a non-empty string">,
13524
13524
  ]
13525
13525
  >;
13526
- /** Workflow-scope state entries. Persist for the instance lifetime. */
13527
- state: v.OptionalSchema<
13526
+ /** Workflow-scope field entries. Persist for the instance lifetime. */
13527
+ fields: v.OptionalSchema<
13528
13528
  v.ArraySchema<
13529
13529
  v.StrictObjectSchema<
13530
13530
  {
@@ -13556,7 +13556,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13556
13556
  description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
13557
13557
  /**
13558
13558
  * When true, the caller MUST supply this entry at start (via
13559
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
13559
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
13560
13560
  * missing required entry throws rather than silently defaulting to
13561
13561
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
13562
13562
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -13727,7 +13727,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13727
13727
  v.StrictObjectSchema<
13728
13728
  {
13729
13729
  readonly type: v.LiteralSchema<
13730
- "state.set",
13730
+ "field.set",
13731
13731
  undefined
13732
13732
  >;
13733
13733
  readonly target: v.StrictObjectSchema<
@@ -13736,7 +13736,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13736
13736
  readonly ["workflow", "stage", "task"],
13737
13737
  `Invalid option: expected one of ${string}`
13738
13738
  >;
13739
- readonly state: v.SchemaWithPipe<
13739
+ readonly field: v.SchemaWithPipe<
13740
13740
  readonly [
13741
13741
  v.StringSchema<undefined>,
13742
13742
  v.MinLengthAction<
@@ -13756,7 +13756,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13756
13756
  v.StrictObjectSchema<
13757
13757
  {
13758
13758
  readonly type: v.LiteralSchema<
13759
- "state.unset",
13759
+ "field.unset",
13760
13760
  undefined
13761
13761
  >;
13762
13762
  readonly target: v.StrictObjectSchema<
@@ -13765,7 +13765,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13765
13765
  readonly ["workflow", "stage", "task"],
13766
13766
  `Invalid option: expected one of ${string}`
13767
13767
  >;
13768
- readonly state: v.SchemaWithPipe<
13768
+ readonly field: v.SchemaWithPipe<
13769
13769
  readonly [
13770
13770
  v.StringSchema<undefined>,
13771
13771
  v.MinLengthAction<
@@ -13784,7 +13784,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13784
13784
  v.StrictObjectSchema<
13785
13785
  {
13786
13786
  readonly type: v.LiteralSchema<
13787
- "state.append",
13787
+ "field.append",
13788
13788
  undefined
13789
13789
  >;
13790
13790
  readonly target: v.StrictObjectSchema<
@@ -13793,7 +13793,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13793
13793
  readonly ["workflow", "stage", "task"],
13794
13794
  `Invalid option: expected one of ${string}`
13795
13795
  >;
13796
- readonly state: v.SchemaWithPipe<
13796
+ readonly field: v.SchemaWithPipe<
13797
13797
  readonly [
13798
13798
  v.StringSchema<undefined>,
13799
13799
  v.MinLengthAction<
@@ -13813,7 +13813,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13813
13813
  v.StrictObjectSchema<
13814
13814
  {
13815
13815
  readonly type: v.LiteralSchema<
13816
- "state.updateWhere",
13816
+ "field.updateWhere",
13817
13817
  undefined
13818
13818
  >;
13819
13819
  readonly target: v.StrictObjectSchema<
@@ -13822,7 +13822,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13822
13822
  readonly ["workflow", "stage", "task"],
13823
13823
  `Invalid option: expected one of ${string}`
13824
13824
  >;
13825
- readonly state: v.SchemaWithPipe<
13825
+ readonly field: v.SchemaWithPipe<
13826
13826
  readonly [
13827
13827
  v.StringSchema<undefined>,
13828
13828
  v.MinLengthAction<
@@ -13843,7 +13843,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13843
13843
  v.StrictObjectSchema<
13844
13844
  {
13845
13845
  readonly type: v.LiteralSchema<
13846
- "state.removeWhere",
13846
+ "field.removeWhere",
13847
13847
  undefined
13848
13848
  >;
13849
13849
  readonly target: v.StrictObjectSchema<
@@ -13852,7 +13852,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
13852
13852
  readonly ["workflow", "stage", "task"],
13853
13853
  `Invalid option: expected one of ${string}`
13854
13854
  >;
13855
- readonly state: v.SchemaWithPipe<
13855
+ readonly field: v.SchemaWithPipe<
13856
13856
  readonly [
13857
13857
  v.StringSchema<undefined>,
13858
13858
  v.MinLengthAction<
@@ -14056,7 +14056,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14056
14056
  v.StrictObjectSchema<
14057
14057
  {
14058
14058
  readonly type: v.LiteralSchema<
14059
- "state.set",
14059
+ "field.set",
14060
14060
  undefined
14061
14061
  >;
14062
14062
  readonly target: v.StrictObjectSchema<
@@ -14069,7 +14069,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14069
14069
  ],
14070
14070
  `Invalid option: expected one of ${string}`
14071
14071
  >;
14072
- readonly state: v.SchemaWithPipe<
14072
+ readonly field: v.SchemaWithPipe<
14073
14073
  readonly [
14074
14074
  v.StringSchema<undefined>,
14075
14075
  v.MinLengthAction<
@@ -14089,7 +14089,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14089
14089
  v.StrictObjectSchema<
14090
14090
  {
14091
14091
  readonly type: v.LiteralSchema<
14092
- "state.unset",
14092
+ "field.unset",
14093
14093
  undefined
14094
14094
  >;
14095
14095
  readonly target: v.StrictObjectSchema<
@@ -14102,7 +14102,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14102
14102
  ],
14103
14103
  `Invalid option: expected one of ${string}`
14104
14104
  >;
14105
- readonly state: v.SchemaWithPipe<
14105
+ readonly field: v.SchemaWithPipe<
14106
14106
  readonly [
14107
14107
  v.StringSchema<undefined>,
14108
14108
  v.MinLengthAction<
@@ -14121,7 +14121,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14121
14121
  v.StrictObjectSchema<
14122
14122
  {
14123
14123
  readonly type: v.LiteralSchema<
14124
- "state.append",
14124
+ "field.append",
14125
14125
  undefined
14126
14126
  >;
14127
14127
  readonly target: v.StrictObjectSchema<
@@ -14134,7 +14134,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14134
14134
  ],
14135
14135
  `Invalid option: expected one of ${string}`
14136
14136
  >;
14137
- readonly state: v.SchemaWithPipe<
14137
+ readonly field: v.SchemaWithPipe<
14138
14138
  readonly [
14139
14139
  v.StringSchema<undefined>,
14140
14140
  v.MinLengthAction<
@@ -14154,7 +14154,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14154
14154
  v.StrictObjectSchema<
14155
14155
  {
14156
14156
  readonly type: v.LiteralSchema<
14157
- "state.updateWhere",
14157
+ "field.updateWhere",
14158
14158
  undefined
14159
14159
  >;
14160
14160
  readonly target: v.StrictObjectSchema<
@@ -14167,7 +14167,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14167
14167
  ],
14168
14168
  `Invalid option: expected one of ${string}`
14169
14169
  >;
14170
- readonly state: v.SchemaWithPipe<
14170
+ readonly field: v.SchemaWithPipe<
14171
14171
  readonly [
14172
14172
  v.StringSchema<undefined>,
14173
14173
  v.MinLengthAction<
@@ -14188,7 +14188,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14188
14188
  v.StrictObjectSchema<
14189
14189
  {
14190
14190
  readonly type: v.LiteralSchema<
14191
- "state.removeWhere",
14191
+ "field.removeWhere",
14192
14192
  undefined
14193
14193
  >;
14194
14194
  readonly target: v.StrictObjectSchema<
@@ -14201,7 +14201,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14201
14201
  ],
14202
14202
  `Invalid option: expected one of ${string}`
14203
14203
  >;
14204
- readonly state: v.SchemaWithPipe<
14204
+ readonly field: v.SchemaWithPipe<
14205
14205
  readonly [
14206
14206
  v.StringSchema<undefined>,
14207
14207
  v.MinLengthAction<
@@ -14366,7 +14366,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14366
14366
  },
14367
14367
  undefined
14368
14368
  >;
14369
- /** Initial state for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
14369
+ /** Initial fields for each subworkflow — entry name → GROQ over `$row` + the parent scope. */
14370
14370
  readonly with: v.OptionalSchema<
14371
14371
  v.RecordSchema<
14372
14372
  v.SchemaWithPipe<
@@ -14429,8 +14429,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14429
14429
  >,
14430
14430
  undefined
14431
14431
  >;
14432
- /** Task-scoped state entries. Resolved at task activation time. */
14433
- state: v.OptionalSchema<
14432
+ /** Task-scoped field entries. Resolved at task activation time. */
14433
+ fields: v.OptionalSchema<
14434
14434
  v.ArraySchema<
14435
14435
  v.StrictObjectSchema<
14436
14436
  {
@@ -14468,7 +14468,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14468
14468
  >;
14469
14469
  /**
14470
14470
  * When true, the caller MUST supply this entry at start (via
14471
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
14471
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
14472
14472
  * missing required entry throws rather than silently defaulting to
14473
14473
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
14474
14474
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -14554,7 +14554,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14554
14554
  >,
14555
14555
  ]
14556
14556
  >;
14557
- /** The `state.*` subset — state-write-on-move, the stage's EXIT/ARRIVAL payload. */
14557
+ /** The `field.*` subset — field-write-on-move, the stage's EXIT/ARRIVAL payload. */
14558
14558
  ops: v.OptionalSchema<
14559
14559
  v.ArraySchema<
14560
14560
  v.VariantSchema<
@@ -14563,7 +14563,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14563
14563
  v.StrictObjectSchema<
14564
14564
  {
14565
14565
  readonly type: v.LiteralSchema<
14566
- "state.set",
14566
+ "field.set",
14567
14567
  undefined
14568
14568
  >;
14569
14569
  readonly target: v.StrictObjectSchema<
@@ -14572,7 +14572,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14572
14572
  readonly ["workflow", "stage", "task"],
14573
14573
  `Invalid option: expected one of ${string}`
14574
14574
  >;
14575
- readonly state: v.SchemaWithPipe<
14575
+ readonly field: v.SchemaWithPipe<
14576
14576
  readonly [
14577
14577
  v.StringSchema<undefined>,
14578
14578
  v.MinLengthAction<
@@ -14592,7 +14592,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14592
14592
  v.StrictObjectSchema<
14593
14593
  {
14594
14594
  readonly type: v.LiteralSchema<
14595
- "state.unset",
14595
+ "field.unset",
14596
14596
  undefined
14597
14597
  >;
14598
14598
  readonly target: v.StrictObjectSchema<
@@ -14601,7 +14601,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14601
14601
  readonly ["workflow", "stage", "task"],
14602
14602
  `Invalid option: expected one of ${string}`
14603
14603
  >;
14604
- readonly state: v.SchemaWithPipe<
14604
+ readonly field: v.SchemaWithPipe<
14605
14605
  readonly [
14606
14606
  v.StringSchema<undefined>,
14607
14607
  v.MinLengthAction<
@@ -14620,7 +14620,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14620
14620
  v.StrictObjectSchema<
14621
14621
  {
14622
14622
  readonly type: v.LiteralSchema<
14623
- "state.append",
14623
+ "field.append",
14624
14624
  undefined
14625
14625
  >;
14626
14626
  readonly target: v.StrictObjectSchema<
@@ -14629,7 +14629,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14629
14629
  readonly ["workflow", "stage", "task"],
14630
14630
  `Invalid option: expected one of ${string}`
14631
14631
  >;
14632
- readonly state: v.SchemaWithPipe<
14632
+ readonly field: v.SchemaWithPipe<
14633
14633
  readonly [
14634
14634
  v.StringSchema<undefined>,
14635
14635
  v.MinLengthAction<
@@ -14649,7 +14649,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14649
14649
  v.StrictObjectSchema<
14650
14650
  {
14651
14651
  readonly type: v.LiteralSchema<
14652
- "state.updateWhere",
14652
+ "field.updateWhere",
14653
14653
  undefined
14654
14654
  >;
14655
14655
  readonly target: v.StrictObjectSchema<
@@ -14658,7 +14658,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14658
14658
  readonly ["workflow", "stage", "task"],
14659
14659
  `Invalid option: expected one of ${string}`
14660
14660
  >;
14661
- readonly state: v.SchemaWithPipe<
14661
+ readonly field: v.SchemaWithPipe<
14662
14662
  readonly [
14663
14663
  v.StringSchema<undefined>,
14664
14664
  v.MinLengthAction<
@@ -14679,7 +14679,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14679
14679
  v.StrictObjectSchema<
14680
14680
  {
14681
14681
  readonly type: v.LiteralSchema<
14682
- "state.removeWhere",
14682
+ "field.removeWhere",
14683
14683
  undefined
14684
14684
  >;
14685
14685
  readonly target: v.StrictObjectSchema<
@@ -14688,7 +14688,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14688
14688
  readonly ["workflow", "stage", "task"],
14689
14689
  `Invalid option: expected one of ${string}`
14690
14690
  >;
14691
- readonly state: v.SchemaWithPipe<
14691
+ readonly field: v.SchemaWithPipe<
14692
14692
  readonly [
14693
14693
  v.StringSchema<undefined>,
14694
14694
  v.MinLengthAction<
@@ -14820,7 +14820,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14820
14820
  >,
14821
14821
  undefined
14822
14822
  >;
14823
- /** Target docs as `$state` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
14823
+ /** Target docs as `$fields` reads (or `"$self"`), resolved at deploy to bare ids + the resource. */
14824
14824
  readonly idRefs: v.OptionalSchema<
14825
14825
  v.ArraySchema<
14826
14826
  v.SchemaWithPipe<
@@ -14896,12 +14896,12 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14896
14896
  undefined
14897
14897
  >;
14898
14898
  /**
14899
- * Projected workflow state the predicate reads as `guard.metadata.*` —
14900
- * the only bridge from the lake eval context (which cannot see `$state`)
14901
- * to workflow state. Values are NOT GROQ: each is a deploy-time read in
14899
+ * Projected workflow fields the predicate reads as `guard.metadata.*` —
14900
+ * the only bridge from the lake eval context (which cannot see `$fields`)
14901
+ * to workflow fields. Values are NOT GROQ: each is a deploy-time read in
14902
14902
  * the guard mini-language — `"$self"`, `"$now"`, or
14903
- * `"$state.<name>[.path]"` — resolved into a bare value at deploy and
14904
- * re-synced by the post-state-op guard refresh.
14903
+ * `"$fields.<name>[.path]"` — resolved into a bare value at deploy and
14904
+ * re-synced by the post-field-op guard refresh.
14905
14905
  */
14906
14906
  readonly metadata: v.OptionalSchema<
14907
14907
  v.RecordSchema<
@@ -14936,8 +14936,8 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14936
14936
  >,
14937
14937
  undefined
14938
14938
  >;
14939
- /** Stage-scoped state entries. Resolved at stage entry. */
14940
- state: v.OptionalSchema<
14939
+ /** Stage-scoped field entries. Resolved at stage entry. */
14940
+ fields: v.OptionalSchema<
14941
14941
  v.ArraySchema<
14942
14942
  v.StrictObjectSchema<
14943
14943
  {
@@ -14975,7 +14975,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
14975
14975
  >;
14976
14976
  /**
14977
14977
  * When true, the caller MUST supply this entry at start (via
14978
- * `initialState`) or spawn (via the parent's `subworkflows.with`). A
14978
+ * `initialFields`) or spawn (via the parent's `subworkflows.with`). A
14979
14979
  * missing required entry throws rather than silently defaulting to
14980
14980
  * `null`/`[]` — the same fail-fast an action's `required` param gets.
14981
14981
  * Valid only on a workflow-scope `init`-sourced entry (deploy invariant).
@@ -15084,42 +15084,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
15084
15084
  | "failed";
15085
15085
  }
15086
15086
  | {
15087
- type: "state.set";
15087
+ type: "field.set";
15088
15088
  target: {
15089
15089
  scope: "workflow" | "stage" | "task";
15090
- state: string;
15090
+ field: string;
15091
15091
  };
15092
15092
  value: SourceInternal;
15093
15093
  }
15094
15094
  | {
15095
- type: "state.unset";
15095
+ type: "field.unset";
15096
15096
  target: {
15097
15097
  scope: "workflow" | "stage" | "task";
15098
- state: string;
15098
+ field: string;
15099
15099
  };
15100
15100
  }
15101
15101
  | {
15102
- type: "state.append";
15102
+ type: "field.append";
15103
15103
  target: {
15104
15104
  scope: "workflow" | "stage" | "task";
15105
- state: string;
15105
+ field: string;
15106
15106
  };
15107
15107
  value: SourceInternal;
15108
15108
  }
15109
15109
  | {
15110
- type: "state.updateWhere";
15110
+ type: "field.updateWhere";
15111
15111
  target: {
15112
15112
  scope: "workflow" | "stage" | "task";
15113
- state: string;
15113
+ field: string;
15114
15114
  };
15115
15115
  where: OpPredicateInternal;
15116
15116
  value: SourceInternal;
15117
15117
  }
15118
15118
  | {
15119
- type: "state.removeWhere";
15119
+ type: "field.removeWhere";
15120
15120
  target: {
15121
15121
  scope: "workflow" | "stage" | "task";
15122
- state: string;
15122
+ field: string;
15123
15123
  };
15124
15124
  where: OpPredicateInternal;
15125
15125
  }
@@ -15179,42 +15179,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
15179
15179
  | "failed";
15180
15180
  }
15181
15181
  | {
15182
- type: "state.set";
15182
+ type: "field.set";
15183
15183
  target: {
15184
15184
  scope: "workflow" | "stage" | "task";
15185
- state: string;
15185
+ field: string;
15186
15186
  };
15187
15187
  value: SourceInternal;
15188
15188
  }
15189
15189
  | {
15190
- type: "state.unset";
15190
+ type: "field.unset";
15191
15191
  target: {
15192
15192
  scope: "workflow" | "stage" | "task";
15193
- state: string;
15193
+ field: string;
15194
15194
  };
15195
15195
  }
15196
15196
  | {
15197
- type: "state.append";
15197
+ type: "field.append";
15198
15198
  target: {
15199
15199
  scope: "workflow" | "stage" | "task";
15200
- state: string;
15200
+ field: string;
15201
15201
  };
15202
15202
  value: SourceInternal;
15203
15203
  }
15204
15204
  | {
15205
- type: "state.updateWhere";
15205
+ type: "field.updateWhere";
15206
15206
  target: {
15207
15207
  scope: "workflow" | "stage" | "task";
15208
- state: string;
15208
+ field: string;
15209
15209
  };
15210
15210
  where: OpPredicateInternal;
15211
15211
  value: SourceInternal;
15212
15212
  }
15213
15213
  | {
15214
- type: "state.removeWhere";
15214
+ type: "field.removeWhere";
15215
15215
  target: {
15216
15216
  scope: "workflow" | "stage" | "task";
15217
- state: string;
15217
+ field: string;
15218
15218
  };
15219
15219
  where: OpPredicateInternal;
15220
15220
  }
@@ -15258,7 +15258,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
15258
15258
  | undefined;
15259
15259
  }
15260
15260
  | undefined;
15261
- state?:
15261
+ fields?:
15262
15262
  | {
15263
15263
  type:
15264
15264
  | "doc.ref"
@@ -15294,42 +15294,42 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
15294
15294
  ops?:
15295
15295
  | (
15296
15296
  | {
15297
- type: "state.set";
15297
+ type: "field.set";
15298
15298
  target: {
15299
15299
  scope: "workflow" | "stage" | "task";
15300
- state: string;
15300
+ field: string;
15301
15301
  };
15302
15302
  value: SourceInternal;
15303
15303
  }
15304
15304
  | {
15305
- type: "state.unset";
15305
+ type: "field.unset";
15306
15306
  target: {
15307
15307
  scope: "workflow" | "stage" | "task";
15308
- state: string;
15308
+ field: string;
15309
15309
  };
15310
15310
  }
15311
15311
  | {
15312
- type: "state.append";
15312
+ type: "field.append";
15313
15313
  target: {
15314
15314
  scope: "workflow" | "stage" | "task";
15315
- state: string;
15315
+ field: string;
15316
15316
  };
15317
15317
  value: SourceInternal;
15318
15318
  }
15319
15319
  | {
15320
- type: "state.updateWhere";
15320
+ type: "field.updateWhere";
15321
15321
  target: {
15322
15322
  scope: "workflow" | "stage" | "task";
15323
- state: string;
15323
+ field: string;
15324
15324
  };
15325
15325
  where: OpPredicateInternal;
15326
15326
  value: SourceInternal;
15327
15327
  }
15328
15328
  | {
15329
- type: "state.removeWhere";
15329
+ type: "field.removeWhere";
15330
15330
  target: {
15331
15331
  scope: "workflow" | "stage" | "task";
15332
- state: string;
15332
+ field: string;
15333
15333
  };
15334
15334
  where: OpPredicateInternal;
15335
15335
  }
@@ -15379,7 +15379,7 @@ declare const WorkflowDefinitionSchema: v.StrictObjectSchema<
15379
15379
  | undefined;
15380
15380
  }[]
15381
15381
  | undefined;
15382
- state?:
15382
+ fields?:
15383
15383
  | {
15384
15384
  type:
15385
15385
  | "doc.ref"
@@ -15474,7 +15474,7 @@ export declare interface WorkflowEvaluation {
15474
15474
  definition: WorkflowDefinition;
15475
15475
  actor: Actor;
15476
15476
  currentStage: StageEvaluation;
15477
- /** Active tasks whose assignees-kind state entry matches the actor. */
15477
+ /** Active tasks whose assignees-kind field entry matches the actor. */
15478
15478
  pendingOnYou: TaskEvaluation[];
15479
15479
  /** True if at least one action on any active task is allowed. */
15480
15480
  canInteract: boolean;
@@ -15490,7 +15490,7 @@ export declare interface WorkflowEvaluation {
15490
15490
  export declare interface WorkflowFetchOptions {
15491
15491
  /**
15492
15492
  * Override the client's configured perspective for this read. The
15493
- * engine uses this to scope state-entry query and spawn forEach
15493
+ * engine uses this to scope field-entry query and spawn forEach
15494
15494
  * reads to the instance's `perspective` field.
15495
15495
  */
15496
15496
  perspective?: WorkflowPerspective;
@@ -15517,17 +15517,17 @@ export declare interface WorkflowInstance extends SanityDocument {
15517
15517
  /** Frozen JSON snapshot of the definition at the moment the instance started. */
15518
15518
  definitionSnapshot: string;
15519
15519
  /**
15520
- * Workflow-level resolved state entries.
15521
- * Populated from the workflow definition's `state[]` declarations plus
15522
- * the caller-supplied `initialState` at `startInstance`. Persists for
15520
+ * Workflow-level resolved field entries.
15521
+ * Populated from the workflow definition's `fields[]` declarations plus
15522
+ * the caller-supplied `initialFields` at `startInstance`. Persists for
15523
15523
  * the lifetime of the instance.
15524
15524
  *
15525
15525
  * To declare "the subject document of this workflow", add a
15526
15526
  * `{ type: "doc.ref", name: "subject", source: { type: "init" } }`
15527
15527
  * entry to the workflow definition. Conditions then read it as
15528
- * `$state.subject`. There is no other subject mechanism.
15528
+ * `$fields.subject`. There is no other subject mechanism.
15529
15529
  */
15530
- state: ResolvedStateEntry[];
15530
+ fields: ResolvedFieldEntry[];
15531
15531
  /**
15532
15532
  * Stable named params the runtime hands to effect handlers via binding
15533
15533
  * resolution. Set at `startInstance`. **Not read by transition filters.**
@@ -15540,7 +15540,7 @@ export declare interface WorkflowInstance extends SanityDocument {
15540
15540
  */
15541
15541
  ancestors: GlobalDocumentReference[];
15542
15542
  /**
15543
- * Optional perspective applied to state-entry query reads and spawn
15543
+ * Optional perspective applied to field-entry query reads and spawn
15544
15544
  * `forEach.groq` discovery. When unset the engine treats reads as
15545
15545
  * `"raw"` (no filtering). Set at `startInstance` time to scope a
15546
15546
  * workflow's reads to a Content Release stack (e.g. `[releaseName]`
@@ -15600,7 +15600,7 @@ export declare interface WorkflowPatch {
15600
15600
  /**
15601
15601
  * Perspective layering — see Sanity Content Lake docs. The engine
15602
15602
  * threads this into reads that should reflect a release-stacked view
15603
- * of the dataset (state-entry query resolution, spawn forEach discovery).
15603
+ * of the dataset (field-entry query resolution, spawn forEach discovery).
15604
15604
  * Engine-internal reads of `workflow.instance` / `workflow.definition`
15605
15605
  * stay raw regardless — those docs are unversioned metadata.
15606
15606
  *
@@ -15686,7 +15686,7 @@ export declare interface WorkflowTransaction {
15686
15686
  *
15687
15687
  * Typed `any` so the test-client's `TransactionHandle.patch(string |
15688
15688
  * PatchHandle, …)` and `@sanity/client`'s `Transaction.patch(Patch |
15689
- * string, …)` both satisfy the state entry under `strictFunctionTypes`. The
15689
+ * string, …)` both satisfy the field entry under `strictFunctionTypes`. The
15690
15690
  * engine call site always passes a `WorkflowPatch`; both underlying
15691
15691
  * clients drain it structurally.
15692
15692
  */