@walkeros/core 4.6.1 → 4.7.0-next-1790245733116

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/dev.d.mts CHANGED
@@ -544,8 +544,9 @@ declare const ValuesSchema: z.ZodArray<z.ZodType<unknown, unknown, z.core.$ZodTy
544
544
  * Loop - Tuple for array processing
545
545
  * Format: [source, transform]
546
546
  *
547
- * IMPORTANT: z.tuple() generates JSON Schema with minItems/maxItems = 2
548
- * This is how Explorer distinguishes Loop from Set
547
+ * IMPORTANT: the JSON Schema carries minItems/maxItems = 2, set explicitly in
548
+ * meta because z.tuple() emits neither for draft-7, which makes Ajv strict mode
549
+ * warn about the tuple.
549
550
  *
550
551
  * Example: ['nested', { map: { id: 'data.id' } }]
551
552
  * Means: Iterate over event.nested array, transform each item
@@ -3484,6 +3485,7 @@ declare const ConfigSchema$4: z.ZodObject<{
3484
3485
  queueMax: z.ZodOptional<z.ZodNumber>;
3485
3486
  name: z.ZodOptional<z.ZodString>;
3486
3487
  release: z.ZodOptional<z.ZodString>;
3488
+ next: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
3487
3489
  }, z.core.$strip>;
3488
3490
  /**
3489
3491
  * SessionData - Session state management
@@ -3536,6 +3538,7 @@ declare const InitConfigSchema: z.ZodObject<{
3536
3538
  queueMax: z.ZodOptional<z.ZodOptional<z.ZodNumber>>;
3537
3539
  name: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3538
3540
  release: z.ZodOptional<z.ZodOptional<z.ZodString>>;
3541
+ next: z.ZodOptional<z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
3539
3542
  consent: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
3540
3543
  user: z.ZodOptional<z.ZodIntersection<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>, z.ZodObject<{
3541
3544
  id: z.ZodOptional<z.ZodString>;
@@ -3720,6 +3723,7 @@ declare const InstanceSchema$1: z.ZodObject<{
3720
3723
  queueMax: z.ZodOptional<z.ZodNumber>;
3721
3724
  name: z.ZodOptional<z.ZodString>;
3722
3725
  release: z.ZodOptional<z.ZodString>;
3726
+ next: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
3723
3727
  }, z.core.$strip>;
3724
3728
  consent: z.ZodRecord<z.ZodString, z.ZodBoolean>;
3725
3729
  custom: z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
@@ -4980,6 +4984,7 @@ declare const BundleSchema: z.ZodObject<{
4980
4984
  }, z.core.$strip>>>;
4981
4985
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4982
4986
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
4987
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4983
4988
  }, z.core.$strict>;
4984
4989
  /**
4985
4990
  * Inline code schema for embedding JavaScript functions in JSON configs.
@@ -4995,7 +5000,7 @@ declare const BundleSchema: z.ZodObject<{
4995
5000
  * {
4996
5001
  * "code": {
4997
5002
  * "type": "enricher",
4998
- * "push": "$code:(event) => ({ ...event, data: { ...event.data, enriched: true } })"
5003
+ * "push": "$code:(event) => ({ event: { ...event, data: { ...event.data, enriched: true } } })"
4999
5004
  * }
5000
5005
  * }
5001
5006
  * ```
@@ -5080,6 +5085,23 @@ declare const SourceSchema: z.ZodObject<{
5080
5085
  import: z.ZodOptional<z.ZodString>;
5081
5086
  config: z.ZodOptional<z.ZodObject<{
5082
5087
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
5088
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5089
+ mode: z.ZodEnum<{
5090
+ set: "set";
5091
+ get: "get";
5092
+ }>;
5093
+ store: z.ZodOptional<z.ZodString>;
5094
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5095
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5096
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5097
+ mode: z.ZodEnum<{
5098
+ set: "set";
5099
+ get: "get";
5100
+ }>;
5101
+ store: z.ZodOptional<z.ZodString>;
5102
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5103
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5104
+ }, z.core.$strip>>]>>;
5083
5105
  }, z.core.$loose>>;
5084
5106
  env: z.ZodOptional<z.ZodUnknown>;
5085
5107
  primary: z.ZodOptional<z.ZodBoolean>;
@@ -5115,6 +5137,23 @@ declare const SourceSchema: z.ZodObject<{
5115
5137
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5116
5138
  }, z.core.$strip>>;
5117
5139
  }, z.core.$strip>>;
5140
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5141
+ mode: z.ZodEnum<{
5142
+ set: "set";
5143
+ get: "get";
5144
+ }>;
5145
+ store: z.ZodOptional<z.ZodString>;
5146
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5147
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5148
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5149
+ mode: z.ZodEnum<{
5150
+ set: "set";
5151
+ get: "get";
5152
+ }>;
5153
+ store: z.ZodOptional<z.ZodString>;
5154
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5155
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5156
+ }, z.core.$strip>>]>>;
5118
5157
  }, z.core.$strict>;
5119
5158
  /**
5120
5159
  * Transformer reference schema (Flow.Transformer).
@@ -5161,6 +5200,24 @@ declare const TransformerSchema: z.ZodObject<{
5161
5200
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5162
5201
  }, z.core.$strip>>;
5163
5202
  }, z.core.$strip>>;
5203
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5204
+ mode: z.ZodEnum<{
5205
+ set: "set";
5206
+ get: "get";
5207
+ }>;
5208
+ store: z.ZodOptional<z.ZodString>;
5209
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5210
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5211
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5212
+ mode: z.ZodEnum<{
5213
+ set: "set";
5214
+ get: "get";
5215
+ }>;
5216
+ store: z.ZodOptional<z.ZodString>;
5217
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5218
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5219
+ }, z.core.$strip>>]>>;
5220
+ mapping: z.ZodOptional<z.ZodUnknown>;
5164
5221
  }, z.core.$strip>;
5165
5222
  /**
5166
5223
  * Destination reference schema (Flow.Destination).
@@ -5209,6 +5266,23 @@ declare const DestinationSchema: z.ZodObject<{
5209
5266
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5210
5267
  }, z.core.$strip>>;
5211
5268
  }, z.core.$strip>>;
5269
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5270
+ mode: z.ZodEnum<{
5271
+ set: "set";
5272
+ get: "get";
5273
+ }>;
5274
+ store: z.ZodOptional<z.ZodString>;
5275
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5276
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5277
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5278
+ mode: z.ZodEnum<{
5279
+ set: "set";
5280
+ get: "get";
5281
+ }>;
5282
+ store: z.ZodOptional<z.ZodString>;
5283
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5284
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5285
+ }, z.core.$strip>>]>>;
5212
5286
  }, z.core.$strip>;
5213
5287
  /**
5214
5288
  * Store reference schema (Flow.Store).
@@ -5330,6 +5404,7 @@ declare const ConfigSchema: z.ZodObject<{
5330
5404
  }, z.core.$strip>>>;
5331
5405
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5332
5406
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5407
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5333
5408
  }, z.core.$strict>>;
5334
5409
  observe: z.ZodOptional<z.ZodObject<{
5335
5410
  level: z.ZodOptional<z.ZodEnum<{
@@ -5365,6 +5440,7 @@ declare const FlowSchema: z.ZodObject<{
5365
5440
  }, z.core.$strip>>>;
5366
5441
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5367
5442
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5443
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5368
5444
  }, z.core.$strict>>;
5369
5445
  observe: z.ZodOptional<z.ZodObject<{
5370
5446
  level: z.ZodOptional<z.ZodEnum<{
@@ -5387,6 +5463,23 @@ declare const FlowSchema: z.ZodObject<{
5387
5463
  import: z.ZodOptional<z.ZodString>;
5388
5464
  config: z.ZodOptional<z.ZodObject<{
5389
5465
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
5466
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5467
+ mode: z.ZodEnum<{
5468
+ set: "set";
5469
+ get: "get";
5470
+ }>;
5471
+ store: z.ZodOptional<z.ZodString>;
5472
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5473
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5474
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5475
+ mode: z.ZodEnum<{
5476
+ set: "set";
5477
+ get: "get";
5478
+ }>;
5479
+ store: z.ZodOptional<z.ZodString>;
5480
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5481
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5482
+ }, z.core.$strip>>]>>;
5390
5483
  }, z.core.$loose>>;
5391
5484
  env: z.ZodOptional<z.ZodUnknown>;
5392
5485
  primary: z.ZodOptional<z.ZodBoolean>;
@@ -5422,6 +5515,23 @@ declare const FlowSchema: z.ZodObject<{
5422
5515
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5423
5516
  }, z.core.$strip>>;
5424
5517
  }, z.core.$strip>>;
5518
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5519
+ mode: z.ZodEnum<{
5520
+ set: "set";
5521
+ get: "get";
5522
+ }>;
5523
+ store: z.ZodOptional<z.ZodString>;
5524
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5525
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5526
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5527
+ mode: z.ZodEnum<{
5528
+ set: "set";
5529
+ get: "get";
5530
+ }>;
5531
+ store: z.ZodOptional<z.ZodString>;
5532
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5533
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5534
+ }, z.core.$strip>>]>>;
5425
5535
  }, z.core.$strict>>>;
5426
5536
  destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5427
5537
  package: z.ZodOptional<z.ZodString>;
@@ -5467,6 +5577,23 @@ declare const FlowSchema: z.ZodObject<{
5467
5577
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5468
5578
  }, z.core.$strip>>;
5469
5579
  }, z.core.$strip>>;
5580
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5581
+ mode: z.ZodEnum<{
5582
+ set: "set";
5583
+ get: "get";
5584
+ }>;
5585
+ store: z.ZodOptional<z.ZodString>;
5586
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5587
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5588
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5589
+ mode: z.ZodEnum<{
5590
+ set: "set";
5591
+ get: "get";
5592
+ }>;
5593
+ store: z.ZodOptional<z.ZodString>;
5594
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5595
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5596
+ }, z.core.$strip>>]>>;
5470
5597
  }, z.core.$strip>>>;
5471
5598
  transformers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5472
5599
  package: z.ZodOptional<z.ZodString>;
@@ -5510,6 +5637,24 @@ declare const FlowSchema: z.ZodObject<{
5510
5637
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5511
5638
  }, z.core.$strip>>;
5512
5639
  }, z.core.$strip>>;
5640
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5641
+ mode: z.ZodEnum<{
5642
+ set: "set";
5643
+ get: "get";
5644
+ }>;
5645
+ store: z.ZodOptional<z.ZodString>;
5646
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5647
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5648
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5649
+ mode: z.ZodEnum<{
5650
+ set: "set";
5651
+ get: "get";
5652
+ }>;
5653
+ store: z.ZodOptional<z.ZodString>;
5654
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5655
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5656
+ }, z.core.$strip>>]>>;
5657
+ mapping: z.ZodOptional<z.ZodUnknown>;
5513
5658
  }, z.core.$strip>>>;
5514
5659
  stores: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5515
5660
  package: z.ZodOptional<z.ZodString>;
@@ -5551,7 +5696,9 @@ declare const FlowSchema: z.ZodObject<{
5551
5696
  }>>;
5552
5697
  }, z.core.$strip>>>;
5553
5698
  }, z.core.$strip>>>;
5554
- collector: z.ZodOptional<z.ZodUnknown>;
5699
+ collector: z.ZodOptional<z.ZodObject<{
5700
+ next: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5701
+ }, z.core.$loose>>;
5555
5702
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5556
5703
  }, z.core.$strip>;
5557
5704
  /**
@@ -5589,6 +5736,7 @@ declare const JsonSchema$1: z.ZodObject<{
5589
5736
  }, z.core.$strip>>>;
5590
5737
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5591
5738
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
5739
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
5592
5740
  }, z.core.$strict>>;
5593
5741
  observe: z.ZodOptional<z.ZodObject<{
5594
5742
  level: z.ZodOptional<z.ZodEnum<{
@@ -5611,6 +5759,23 @@ declare const JsonSchema$1: z.ZodObject<{
5611
5759
  import: z.ZodOptional<z.ZodString>;
5612
5760
  config: z.ZodOptional<z.ZodObject<{
5613
5761
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
5762
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5763
+ mode: z.ZodEnum<{
5764
+ set: "set";
5765
+ get: "get";
5766
+ }>;
5767
+ store: z.ZodOptional<z.ZodString>;
5768
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5769
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5770
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5771
+ mode: z.ZodEnum<{
5772
+ set: "set";
5773
+ get: "get";
5774
+ }>;
5775
+ store: z.ZodOptional<z.ZodString>;
5776
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5777
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5778
+ }, z.core.$strip>>]>>;
5614
5779
  }, z.core.$loose>>;
5615
5780
  env: z.ZodOptional<z.ZodUnknown>;
5616
5781
  primary: z.ZodOptional<z.ZodBoolean>;
@@ -5646,6 +5811,23 @@ declare const JsonSchema$1: z.ZodObject<{
5646
5811
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5647
5812
  }, z.core.$strip>>;
5648
5813
  }, z.core.$strip>>;
5814
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5815
+ mode: z.ZodEnum<{
5816
+ set: "set";
5817
+ get: "get";
5818
+ }>;
5819
+ store: z.ZodOptional<z.ZodString>;
5820
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5821
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5822
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5823
+ mode: z.ZodEnum<{
5824
+ set: "set";
5825
+ get: "get";
5826
+ }>;
5827
+ store: z.ZodOptional<z.ZodString>;
5828
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5829
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5830
+ }, z.core.$strip>>]>>;
5649
5831
  }, z.core.$strict>>>;
5650
5832
  destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5651
5833
  package: z.ZodOptional<z.ZodString>;
@@ -5691,6 +5873,23 @@ declare const JsonSchema$1: z.ZodObject<{
5691
5873
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5692
5874
  }, z.core.$strip>>;
5693
5875
  }, z.core.$strip>>;
5876
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5877
+ mode: z.ZodEnum<{
5878
+ set: "set";
5879
+ get: "get";
5880
+ }>;
5881
+ store: z.ZodOptional<z.ZodString>;
5882
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5883
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5884
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5885
+ mode: z.ZodEnum<{
5886
+ set: "set";
5887
+ get: "get";
5888
+ }>;
5889
+ store: z.ZodOptional<z.ZodString>;
5890
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5891
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5892
+ }, z.core.$strip>>]>>;
5694
5893
  }, z.core.$strip>>>;
5695
5894
  transformers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5696
5895
  package: z.ZodOptional<z.ZodString>;
@@ -5734,6 +5933,24 @@ declare const JsonSchema$1: z.ZodObject<{
5734
5933
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
5735
5934
  }, z.core.$strip>>;
5736
5935
  }, z.core.$strip>>;
5936
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
5937
+ mode: z.ZodEnum<{
5938
+ set: "set";
5939
+ get: "get";
5940
+ }>;
5941
+ store: z.ZodOptional<z.ZodString>;
5942
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5943
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5944
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
5945
+ mode: z.ZodEnum<{
5946
+ set: "set";
5947
+ get: "get";
5948
+ }>;
5949
+ store: z.ZodOptional<z.ZodString>;
5950
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
5951
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5952
+ }, z.core.$strip>>]>>;
5953
+ mapping: z.ZodOptional<z.ZodUnknown>;
5737
5954
  }, z.core.$strip>>>;
5738
5955
  stores: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
5739
5956
  package: z.ZodOptional<z.ZodString>;
@@ -5775,7 +5992,9 @@ declare const JsonSchema$1: z.ZodObject<{
5775
5992
  }>>;
5776
5993
  }, z.core.$strip>>>;
5777
5994
  }, z.core.$strip>>>;
5778
- collector: z.ZodOptional<z.ZodUnknown>;
5995
+ collector: z.ZodOptional<z.ZodObject<{
5996
+ next: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
5997
+ }, z.core.$loose>>;
5779
5998
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
5780
5999
  }, z.core.$strip>>;
5781
6000
  }, z.core.$strip>;
@@ -5818,6 +6037,7 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5818
6037
  }> | undefined;
5819
6038
  overrides?: Record<string, string> | undefined;
5820
6039
  traceInclude?: string[] | undefined;
6040
+ env?: Record<string, string> | undefined;
5821
6041
  } | undefined;
5822
6042
  observe?: {
5823
6043
  level?: "trace" | "off" | "standard" | undefined;
@@ -5837,6 +6057,17 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5837
6057
  config?: {
5838
6058
  [x: string]: unknown;
5839
6059
  setup?: boolean | Record<string, unknown> | undefined;
6060
+ state?: {
6061
+ mode: "set" | "get";
6062
+ key: unknown;
6063
+ store?: string | undefined;
6064
+ value?: unknown;
6065
+ } | {
6066
+ mode: "set" | "get";
6067
+ key: unknown;
6068
+ store?: string | undefined;
6069
+ value?: unknown;
6070
+ }[] | undefined;
5840
6071
  } | undefined;
5841
6072
  env?: unknown;
5842
6073
  primary?: boolean | undefined;
@@ -5867,6 +6098,17 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5867
6098
  store?: string | undefined;
5868
6099
  namespace?: string | undefined;
5869
6100
  } | undefined;
6101
+ state?: {
6102
+ mode: "set" | "get";
6103
+ key: unknown;
6104
+ store?: string | undefined;
6105
+ value?: unknown;
6106
+ } | {
6107
+ mode: "set" | "get";
6108
+ key: unknown;
6109
+ store?: string | undefined;
6110
+ value?: unknown;
6111
+ }[] | undefined;
5870
6112
  }> | undefined;
5871
6113
  destinations?: Record<string, {
5872
6114
  package?: string | undefined;
@@ -5908,6 +6150,17 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5908
6150
  store?: string | undefined;
5909
6151
  namespace?: string | undefined;
5910
6152
  } | undefined;
6153
+ state?: {
6154
+ mode: "set" | "get";
6155
+ key: unknown;
6156
+ store?: string | undefined;
6157
+ value?: unknown;
6158
+ } | {
6159
+ mode: "set" | "get";
6160
+ key: unknown;
6161
+ store?: string | undefined;
6162
+ value?: unknown;
6163
+ }[] | undefined;
5911
6164
  }> | undefined;
5912
6165
  transformers?: Record<string, {
5913
6166
  package?: string | undefined;
@@ -5946,6 +6199,18 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5946
6199
  store?: string | undefined;
5947
6200
  namespace?: string | undefined;
5948
6201
  } | undefined;
6202
+ state?: {
6203
+ mode: "set" | "get";
6204
+ key: unknown;
6205
+ store?: string | undefined;
6206
+ value?: unknown;
6207
+ } | {
6208
+ mode: "set" | "get";
6209
+ key: unknown;
6210
+ store?: string | undefined;
6211
+ value?: unknown;
6212
+ }[] | undefined;
6213
+ mapping?: unknown;
5949
6214
  }> | undefined;
5950
6215
  stores?: Record<string, {
5951
6216
  package?: string | undefined;
@@ -5983,7 +6248,10 @@ declare function safeParseConfig(data: unknown): z.ZodSafeParseResult<{
5983
6248
  command?: "consent" | "config" | "user" | "run" | undefined;
5984
6249
  }> | undefined;
5985
6250
  }> | undefined;
5986
- collector?: unknown;
6251
+ collector?: {
6252
+ [x: string]: unknown;
6253
+ next?: unknown;
6254
+ } | undefined;
5987
6255
  variables?: Record<string, unknown> | undefined;
5988
6256
  }>;
5989
6257
  $schema?: string | undefined;
@@ -6021,6 +6289,7 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6021
6289
  }> | undefined;
6022
6290
  overrides?: Record<string, string> | undefined;
6023
6291
  traceInclude?: string[] | undefined;
6292
+ env?: Record<string, string> | undefined;
6024
6293
  } | undefined;
6025
6294
  observe?: {
6026
6295
  level?: "trace" | "off" | "standard" | undefined;
@@ -6040,6 +6309,17 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6040
6309
  config?: {
6041
6310
  [x: string]: unknown;
6042
6311
  setup?: boolean | Record<string, unknown> | undefined;
6312
+ state?: {
6313
+ mode: "set" | "get";
6314
+ key: unknown;
6315
+ store?: string | undefined;
6316
+ value?: unknown;
6317
+ } | {
6318
+ mode: "set" | "get";
6319
+ key: unknown;
6320
+ store?: string | undefined;
6321
+ value?: unknown;
6322
+ }[] | undefined;
6043
6323
  } | undefined;
6044
6324
  env?: unknown;
6045
6325
  primary?: boolean | undefined;
@@ -6070,6 +6350,17 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6070
6350
  store?: string | undefined;
6071
6351
  namespace?: string | undefined;
6072
6352
  } | undefined;
6353
+ state?: {
6354
+ mode: "set" | "get";
6355
+ key: unknown;
6356
+ store?: string | undefined;
6357
+ value?: unknown;
6358
+ } | {
6359
+ mode: "set" | "get";
6360
+ key: unknown;
6361
+ store?: string | undefined;
6362
+ value?: unknown;
6363
+ }[] | undefined;
6073
6364
  }> | undefined;
6074
6365
  destinations?: Record<string, {
6075
6366
  package?: string | undefined;
@@ -6111,6 +6402,17 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6111
6402
  store?: string | undefined;
6112
6403
  namespace?: string | undefined;
6113
6404
  } | undefined;
6405
+ state?: {
6406
+ mode: "set" | "get";
6407
+ key: unknown;
6408
+ store?: string | undefined;
6409
+ value?: unknown;
6410
+ } | {
6411
+ mode: "set" | "get";
6412
+ key: unknown;
6413
+ store?: string | undefined;
6414
+ value?: unknown;
6415
+ }[] | undefined;
6114
6416
  }> | undefined;
6115
6417
  transformers?: Record<string, {
6116
6418
  package?: string | undefined;
@@ -6149,6 +6451,18 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6149
6451
  store?: string | undefined;
6150
6452
  namespace?: string | undefined;
6151
6453
  } | undefined;
6454
+ state?: {
6455
+ mode: "set" | "get";
6456
+ key: unknown;
6457
+ store?: string | undefined;
6458
+ value?: unknown;
6459
+ } | {
6460
+ mode: "set" | "get";
6461
+ key: unknown;
6462
+ store?: string | undefined;
6463
+ value?: unknown;
6464
+ }[] | undefined;
6465
+ mapping?: unknown;
6152
6466
  }> | undefined;
6153
6467
  stores?: Record<string, {
6154
6468
  package?: string | undefined;
@@ -6186,7 +6500,10 @@ declare function safeParseFlow(data: unknown): z.ZodSafeParseResult<{
6186
6500
  command?: "consent" | "config" | "user" | "run" | undefined;
6187
6501
  }> | undefined;
6188
6502
  }> | undefined;
6189
- collector?: unknown;
6503
+ collector?: {
6504
+ [x: string]: unknown;
6505
+ next?: unknown;
6506
+ } | undefined;
6190
6507
  variables?: Record<string, unknown> | undefined;
6191
6508
  }>;
6192
6509
  /**
@@ -6224,6 +6541,7 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6224
6541
  }, z.core.$strip>>>;
6225
6542
  overrides: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6226
6543
  traceInclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
6544
+ env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
6227
6545
  }, z.core.$strict>>;
6228
6546
  observe: z.ZodOptional<z.ZodObject<{
6229
6547
  level: z.ZodOptional<z.ZodEnum<{
@@ -6246,6 +6564,23 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6246
6564
  import: z.ZodOptional<z.ZodString>;
6247
6565
  config: z.ZodOptional<z.ZodObject<{
6248
6566
  setup: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodRecord<z.ZodString, z.ZodUnknown>]>>;
6567
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
6568
+ mode: z.ZodEnum<{
6569
+ set: "set";
6570
+ get: "get";
6571
+ }>;
6572
+ store: z.ZodOptional<z.ZodString>;
6573
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6574
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6575
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
6576
+ mode: z.ZodEnum<{
6577
+ set: "set";
6578
+ get: "get";
6579
+ }>;
6580
+ store: z.ZodOptional<z.ZodString>;
6581
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6582
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6583
+ }, z.core.$strip>>]>>;
6249
6584
  }, z.core.$loose>>;
6250
6585
  env: z.ZodOptional<z.ZodUnknown>;
6251
6586
  primary: z.ZodOptional<z.ZodBoolean>;
@@ -6281,6 +6616,23 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6281
6616
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
6282
6617
  }, z.core.$strip>>;
6283
6618
  }, z.core.$strip>>;
6619
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
6620
+ mode: z.ZodEnum<{
6621
+ set: "set";
6622
+ get: "get";
6623
+ }>;
6624
+ store: z.ZodOptional<z.ZodString>;
6625
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6626
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6627
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
6628
+ mode: z.ZodEnum<{
6629
+ set: "set";
6630
+ get: "get";
6631
+ }>;
6632
+ store: z.ZodOptional<z.ZodString>;
6633
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6634
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6635
+ }, z.core.$strip>>]>>;
6284
6636
  }, z.core.$strict>>>;
6285
6637
  destinations: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6286
6638
  package: z.ZodOptional<z.ZodString>;
@@ -6326,6 +6678,23 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6326
6678
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
6327
6679
  }, z.core.$strip>>;
6328
6680
  }, z.core.$strip>>;
6681
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
6682
+ mode: z.ZodEnum<{
6683
+ set: "set";
6684
+ get: "get";
6685
+ }>;
6686
+ store: z.ZodOptional<z.ZodString>;
6687
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6688
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6689
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
6690
+ mode: z.ZodEnum<{
6691
+ set: "set";
6692
+ get: "get";
6693
+ }>;
6694
+ store: z.ZodOptional<z.ZodString>;
6695
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6696
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6697
+ }, z.core.$strip>>]>>;
6329
6698
  }, z.core.$strip>>>;
6330
6699
  transformers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6331
6700
  package: z.ZodOptional<z.ZodString>;
@@ -6369,6 +6738,24 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6369
6738
  update: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>>;
6370
6739
  }, z.core.$strip>>;
6371
6740
  }, z.core.$strip>>;
6741
+ state: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
6742
+ mode: z.ZodEnum<{
6743
+ set: "set";
6744
+ get: "get";
6745
+ }>;
6746
+ store: z.ZodOptional<z.ZodString>;
6747
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6748
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6749
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
6750
+ mode: z.ZodEnum<{
6751
+ set: "set";
6752
+ get: "get";
6753
+ }>;
6754
+ store: z.ZodOptional<z.ZodString>;
6755
+ key: z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>;
6756
+ value: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6757
+ }, z.core.$strip>>]>>;
6758
+ mapping: z.ZodOptional<z.ZodUnknown>;
6372
6759
  }, z.core.$strip>>>;
6373
6760
  stores: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
6374
6761
  package: z.ZodOptional<z.ZodString>;
@@ -6410,7 +6797,9 @@ declare const configJsonSchema: z.core.ZodStandardJSONSchemaPayload<z.ZodObject<
6410
6797
  }>>;
6411
6798
  }, z.core.$strip>>>;
6412
6799
  }, z.core.$strip>>>;
6413
- collector: z.ZodOptional<z.ZodUnknown>;
6800
+ collector: z.ZodOptional<z.ZodObject<{
6801
+ next: z.ZodOptional<z.ZodType<unknown, unknown, z.core.$ZodTypeInternals<unknown, unknown>>>;
6802
+ }, z.core.$loose>>;
6414
6803
  variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
6415
6804
  }, z.core.$strip>>;
6416
6805
  }, z.core.$strip>>;
@@ -6694,21 +7083,6 @@ declare namespace cache {
6694
7083
  export { cache_CacheRuleSchema as CacheRuleSchema, cache_CacheSchema as CacheSchema, cache_EventCacheRuleSchema as EventCacheRuleSchema, cache_EventCacheSchema as EventCacheSchema, cache_StoreCacheRuleSchema as StoreCacheRuleSchema, cache_StoreCacheSchema as StoreCacheSchema };
6695
7084
  }
6696
7085
 
6697
- /**
6698
- * StateSchema — declarative store get/set operation.
6699
- *
6700
- * Mirrors: types/state.ts → State
6701
- *
6702
- * - mode: 'get' | 'set' direction ('delete' is reserved for a later release).
6703
- * - store: optional store id; defaults to the in-memory `__cache` store.
6704
- * - key: Mapping.Value resolving (against the event) to the store key.
6705
- * - value: Mapping.Value. For `set` it resolves to the payload to store; for
6706
- * `get` its bare-string path (or `.key`) is the event write-target. Optional
6707
- * at the type level (to keep a future `delete` mode non-breaking) but
6708
- * validation requires it for `get`/`set`, and for `get` it must be a bare
6709
- * string or a ValueConfig with a `key` (no `value`/`fn`/`map`/`loop`/`set`,
6710
- * and no `*` wildcard in the path).
6711
- */
6712
7086
  declare const StateSchema: z.ZodObject<{
6713
7087
  mode: z.ZodEnum<{
6714
7088
  set: "set";
@@ -6721,13 +7095,11 @@ declare const StateSchema: z.ZodObject<{
6721
7095
 
6722
7096
  declare const MatchExpressionSchema: z.ZodType;
6723
7097
  declare const RouteSchema: z.ZodType;
6724
- declare const RouteWithoutManySchema: z.ZodType;
6725
7098
 
6726
7099
  declare const matcher_MatchExpressionSchema: typeof MatchExpressionSchema;
6727
7100
  declare const matcher_RouteSchema: typeof RouteSchema;
6728
- declare const matcher_RouteWithoutManySchema: typeof RouteWithoutManySchema;
6729
7101
  declare namespace matcher {
6730
- export { matcher_MatchExpressionSchema as MatchExpressionSchema, matcher_RouteSchema as RouteSchema, matcher_RouteWithoutManySchema as RouteWithoutManySchema };
7102
+ export { matcher_MatchExpressionSchema as MatchExpressionSchema, matcher_RouteSchema as RouteSchema };
6731
7103
  }
6732
7104
 
6733
7105
  declare const CodeSchema: z.ZodObject<{
@@ -7131,7 +7503,6 @@ declare const index_RequiredBoolean: typeof RequiredBoolean;
7131
7503
  declare const index_RequiredNumber: typeof RequiredNumber;
7132
7504
  declare const index_RequiredString: typeof RequiredString;
7133
7505
  declare const index_RouteSchema: typeof RouteSchema;
7134
- declare const index_RouteWithoutManySchema: typeof RouteWithoutManySchema;
7135
7506
  declare const index_RuleSchema: typeof RuleSchema;
7136
7507
  declare const index_RulesSchema: typeof RulesSchema;
7137
7508
  declare const index_RuntimeInstanceConfig: typeof RuntimeInstanceConfig;
@@ -7194,7 +7565,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
7194
7565
  declare const index_z: typeof z;
7195
7566
  declare const index_zodToSchema: typeof zodToSchema;
7196
7567
  declare namespace index {
7197
- export { index_BaseContextConfig as BaseContextConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_ClickIdEntrySchema as ClickIdEntrySchema, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractRuleSchema as ContractRuleSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_CredentialsSchema as CredentialsSchema, index_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventCacheRuleSchema as EventCacheRuleSchema, index_EventCacheSchema as EventCacheSchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema$1 as FlowJsonSchema, index_FlowSchema as FlowSchema, flow as FlowSchemas, SourceSchema as FlowSourceSchema, StoreSchema as FlowStoreSchema, TransformerSchema as FlowTransformerSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, InitConfig$1 as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoggerConfigSchema as LoggerConfigSchema, index_LoggerHandlerSchema as LoggerHandlerSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RouteSchema as RouteSchema, index_RouteWithoutManySchema as RouteWithoutManySchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_ServiceAccountSchema as ServiceAccountSchema, index_SetSchema as SetSchema, SourceSchema$1 as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StateSchema as StateSchema, index_StoreCacheRuleSchema as StoreCacheRuleSchema, index_StoreCacheSchema as StoreCacheSchema, store as StoreSchemas, index_Timestamp as Timestamp, transformer as TransformerSchemas, index_UserSchema as UserSchema, utilities as UtilitySchemas, index_ValidateEventsSchema as ValidateEventsSchema, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractJsonSchema as contractJsonSchema, index_contractRuleJsonSchema as contractRuleJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_credentialsJsonSchema as credentialsJsonSchema, index_destinationJsonSchema as destinationJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_flowConfigJsonSchema as flowConfigJsonSchema, index_flowJsonSchema as flowJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseFlow as parseFlow, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseFlow as safeParseFlow, index_setJsonSchema as setJsonSchema, index_sourceJsonSchema as sourceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeJsonSchema as storeJsonSchema, index_transformerJsonSchema as transformerJsonSchema, index_userJsonSchema as userJsonSchema, index_validateEventsJsonSchema as validateEventsJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
7568
+ export { index_BaseContextConfig as BaseContextConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_ClickIdEntrySchema as ClickIdEntrySchema, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractRuleSchema as ContractRuleSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_CredentialsSchema as CredentialsSchema, index_DeepPartialEventSchema as DeepPartialEventSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventCacheRuleSchema as EventCacheRuleSchema, index_EventCacheSchema as EventCacheSchema, index_EventSchema as EventSchema, BundlePackageSchema as FlowBundlePackageSchema, BundleSchema as FlowBundleSchema, CodeSchema$1 as FlowCodeSchema, ConfigSchema as FlowConfigSchema, DestinationSchema as FlowDestinationSchema, JsonSchema$1 as FlowJsonSchema, index_FlowSchema as FlowSchema, flow as FlowSchemas, SourceSchema as FlowSourceSchema, StoreSchema as FlowStoreSchema, TransformerSchema as FlowTransformerSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, InitConfig$1 as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoggerConfigSchema as LoggerConfigSchema, index_LoggerHandlerSchema as LoggerHandlerSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RouteSchema as RouteSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_ServiceAccountSchema as ServiceAccountSchema, index_SetSchema as SetSchema, SourceSchema$1 as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StateSchema as StateSchema, index_StoreCacheRuleSchema as StoreCacheRuleSchema, index_StoreCacheSchema as StoreCacheSchema, store as StoreSchemas, index_Timestamp as Timestamp, transformer as TransformerSchemas, index_UserSchema as UserSchema, utilities as UtilitySchemas, index_ValidateEventsSchema as ValidateEventsSchema, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractJsonSchema as contractJsonSchema, index_contractRuleJsonSchema as contractRuleJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_credentialsJsonSchema as credentialsJsonSchema, index_destinationJsonSchema as destinationJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_flowConfigJsonSchema as flowConfigJsonSchema, index_flowJsonSchema as flowJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseFlow as parseFlow, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseFlow as safeParseFlow, index_setJsonSchema as setJsonSchema, index_sourceJsonSchema as sourceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeJsonSchema as storeJsonSchema, index_transformerJsonSchema as transformerJsonSchema, index_userJsonSchema as userJsonSchema, index_validateEventsJsonSchema as validateEventsJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
7198
7569
  }
7199
7570
 
7200
7571
  type PackageType = 'source' | 'destination' | 'transformer' | 'store';
@@ -7301,6 +7672,18 @@ interface ValueConfig {
7301
7672
  validate?: Validate;
7302
7673
  value?: PropertyType;
7303
7674
  }
7675
+ /**
7676
+ * Resolution root for paths that can address both the event and the
7677
+ * pipeline ingest: state, cache keys and route matchers. Paths name their
7678
+ * side explicitly, `event.data.id` or `ingest.site`. Every route resolves
7679
+ * with the event its position holds. `event` is absent only for the
7680
+ * request-scoped source cache key (one check per request, before per-event
7681
+ * work) and in static tooling that has no event.
7682
+ */
7683
+ type Root = {
7684
+ event?: DeepPartialEvent;
7685
+ ingest: Record<string, unknown>;
7686
+ };
7304
7687
  interface Context$5 {
7305
7688
  event: DeepPartialEvent;
7306
7689
  /** The surrounding mapping config: a Value (value-level) or a Rule (rule-level). */
@@ -7507,7 +7890,7 @@ interface FlowState {
7507
7890
  /** For phase === 'flush', the batch size + entry index. */
7508
7891
  batch?: FlowStateBatch;
7509
7892
  /** Discriminator when phase === 'skip'. */
7510
- skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'unknown';
7893
+ skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'dropped' | 'unknown';
7511
7894
  /** Free-form metadata: store key/value, cached: true, etc. */
7512
7895
  meta?: Record<string, unknown>;
7513
7896
  }
@@ -7576,6 +7959,14 @@ interface Config$6 {
7576
7959
  name?: string;
7577
7960
  /** Config release id stamped into event.source.release for this flow. */
7578
7961
  release?: string;
7962
+ /**
7963
+ * The collector's own transformer chain. Runs once per completed event,
7964
+ * after enrichment and before the destination fan-out, with the full route
7965
+ * grammar. A `stop` (or a transformer returning `false`) drops the event for
7966
+ * every destination; per-destination filtering belongs on
7967
+ * `destination.before`. Swappable at runtime via `walker config`.
7968
+ */
7969
+ next?: Route;
7579
7970
  }
7580
7971
  /**
7581
7972
  * Initialization configuration that extends Config with initial state
@@ -7713,7 +8104,7 @@ interface Sources {
7713
8104
  interface Destinations {
7714
8105
  [id: string]: Instance$4;
7715
8106
  }
7716
- interface Transformers {
8107
+ interface Transformers$1 {
7717
8108
  [id: string]: Instance$2;
7718
8109
  }
7719
8110
  interface Stores {
@@ -7728,7 +8119,11 @@ interface PushOptions {
7728
8119
  ingest?: Ingest;
7729
8120
  respond?: RespondFn;
7730
8121
  mapping?: Config$7;
7731
- preChain?: string[];
8122
+ /**
8123
+ * Pre-collector chain (the source's `next` route, or a continuation of
8124
+ * it). Resolved hop by hop by the chain runner with `{ ingest, event }`.
8125
+ */
8126
+ preChain?: Route;
7732
8127
  include?: string[];
7733
8128
  exclude?: string[];
7734
8129
  }
@@ -7783,7 +8178,7 @@ interface Instance$5 {
7783
8178
  custom: Properties;
7784
8179
  sources: Sources;
7785
8180
  destinations: Destinations;
7786
- transformers: Transformers;
8181
+ transformers: Transformers$1;
7787
8182
  stores: Stores;
7788
8183
  globals: Properties;
7789
8184
  hooks: Functions;
@@ -7929,18 +8324,21 @@ interface Base<C = unknown, E = unknown> {
7929
8324
 
7930
8325
  /**
7931
8326
  * Declarative store operation. Replaces `$code:` for simple fetch/stash.
7932
- * key = store side, value = event side, mode = direction.
8327
+ * key names the store slot, value the event or ingest side, mode the
8328
+ * direction. Paths resolve against `{ event, ingest }`: `event.user.session`,
8329
+ * `ingest.site`.
7933
8330
  */
7934
8331
  interface State {
7935
8332
  /** Direction. 'delete' is reserved for a later release. */
7936
8333
  mode: 'get' | 'set';
7937
8334
  /** Store id; defaults to the in-memory `__cache` store when omitted. */
7938
8335
  store?: string;
7939
- /** Resolves against the event to the store key. */
8336
+ /** Resolves against `{ event, ingest }` to the store key. */
7940
8337
  key: Value;
7941
8338
  /**
7942
- * set: resolves to the payload to store.
7943
- * get: its `key`/bare-string path is the event write-target.
8339
+ * set: resolves against `{ event, ingest }` to the payload to store.
8340
+ * get: its string path (or `key`) is the write target, `event.` onto the
8341
+ * event or `ingest.` into the ingest.
7944
8342
  * Optional at the type level to keep a future `delete` mode non-breaking;
7945
8343
  * validation requires it for get/set.
7946
8344
  */
@@ -8067,7 +8465,7 @@ interface Config$5<T extends TypesGeneric$3 = Types$4> {
8067
8465
  mapping?: Rules<Rule<Mapping$1<T>>>;
8068
8466
  /** Pre-processing rules applied to all events before mapping; modifies events in-place. */
8069
8467
  policy?: Policy;
8070
- /** Whether to queue events when consent is not granted; defaults to true. */
8468
+ /** Whether a destination added after events were pushed receives the current run's earlier events (from `collector.queue`); defaults to true. Consent-denied events are queued regardless. */
8071
8469
  queue?: boolean;
8072
8470
  /** Defer destination initialization until these collector events fire (e.g., `['consent']`). */
8073
8471
  require?: string[];
@@ -8479,46 +8877,70 @@ type OnFn<T extends TypesGeneric$3 = Types$4> = (type: Types$3, context: Context
8479
8877
  /**
8480
8878
  * Unified route grammar for Flow v4. A `Route` is one of:
8481
8879
  * - a transformer ID string (`"redact"`)
8482
- * - a sequence of routes (`["a", "b", "c"]` — sugar for chained `.next`)
8483
- * - a `RouteConfig` — a gated / dispatching node.
8880
+ * - a sequence of routes (`["a", "b", "c"]`, run in order)
8881
+ * - a `RouteConfig`: a gated / dispatching node.
8484
8882
  *
8485
- * `RouteConfig` is a disjoint union — set exactly one of `next`, `one`,
8486
- * `many`, or neither (pure gate). The disjointness is enforced by `never`
8487
- * sibling properties at the type level and `z.strictObject` at the schema
8488
- * level.
8883
+ * Exception: an array made only of route configs (no id, no nested array)
8884
+ * is an implicit `one`, first match wins (`[gateA, gateB]` runs at most one
8885
+ * of them). Write `{ one: [...] }` to say so, or add an id to make it a
8886
+ * sequence (`["x", gateA, gateB]` evaluates both gates in order).
8887
+ *
8888
+ * `RouteConfig` is a disjoint union: set exactly one of `next`, `one`,
8889
+ * `many`, `stop`, or none of them (pure gate). The disjointness is enforced
8890
+ * by `never` sibling properties at the type level and `z.strictObject` at the
8891
+ * schema level.
8489
8892
  *
8490
8893
  * Operators:
8491
8894
  * - `next`: single continuation.
8492
8895
  * - `one`: first-match dispatch (walk entries, first whose match passes wins).
8493
- * - `many`: all-match terminal fan-out (every matching entry spawns an
8494
- * independent flow; main chain terminates here). Restricted to
8495
- * pre-collector positions (source.next, transformer.next, transformer.before).
8896
+ * - `many`: all-match fan-out. Every matching entry is its own copy of the
8897
+ * event that finishes the rest of the path on its own. Valid in every chain
8898
+ * field.
8899
+ * - `stop`: ends the running copy of the event (optionally gated by `match`).
8900
+ *
8901
+ * Sequences resolve lazily: a conditional segment is evaluated only when its
8902
+ * position is reached, so it sees what earlier steps wrote.
8496
8903
  */
8497
8904
  type Route = string | Route[] | RouteConfig;
8498
- type RouteConfig = RouteNextConfig | RouteOneConfig | RouteManyConfig | RouteGateConfig;
8905
+ type RouteConfig = RouteNextConfig | RouteOneConfig | RouteManyConfig | RouteStopConfig | RouteGateConfig;
8499
8906
  interface RouteNextConfig {
8500
8907
  match?: MatchExpression;
8501
8908
  next: Route;
8502
8909
  one?: never;
8503
8910
  many?: never;
8911
+ stop?: never;
8504
8912
  }
8505
8913
  interface RouteOneConfig {
8506
8914
  match?: MatchExpression;
8507
8915
  one: Route[];
8508
8916
  next?: never;
8509
8917
  many?: never;
8918
+ stop?: never;
8510
8919
  }
8511
8920
  interface RouteManyConfig {
8512
8921
  match?: MatchExpression;
8513
8922
  many: Route[];
8514
8923
  next?: never;
8515
8924
  one?: never;
8925
+ stop?: never;
8926
+ }
8927
+ /**
8928
+ * Ends the running copy of the event. Without `match` the stop is
8929
+ * unconditional; with `match` a failing match falls through like a gate.
8930
+ */
8931
+ interface RouteStopConfig {
8932
+ match?: MatchExpression;
8933
+ stop: true;
8934
+ next?: never;
8935
+ one?: never;
8936
+ many?: never;
8516
8937
  }
8517
8938
  interface RouteGateConfig {
8518
8939
  match: MatchExpression;
8519
8940
  next?: never;
8520
8941
  one?: never;
8521
8942
  many?: never;
8943
+ stop?: never;
8522
8944
  }
8523
8945
  /**
8524
8946
  * Base environment interface for walkerOS transformers.
@@ -8685,6 +9107,12 @@ type InitTransformer<T extends TypesGeneric$2 = Types$2> = {
8685
9107
  interface InitTransformers {
8686
9108
  [transformerId: string]: InitTransformer<any>;
8687
9109
  }
9110
+ /**
9111
+ * Active transformer instances registry.
9112
+ */
9113
+ interface Transformers {
9114
+ [transformerId: string]: Instance$2;
9115
+ }
8688
9116
 
8689
9117
  /**
8690
9118
  * Base Env interface for dependency injection into sources.
@@ -9184,20 +9612,24 @@ type ValidateEvents = Record<string, Record<string, JsonSchema>>;
9184
9612
  * Sources use `before` for consent-exempt pre-source preprocessing
9185
9613
  * (decode, validate, authenticate raw input before the source.next chain).
9186
9614
  *
9187
- * Destinations use `before` to connect to transformers (post-collector chain).
9615
+ * The collector uses `next` for its own chain: it runs once per completed
9616
+ * event, before the destination fan-out, so a `stop` there drops the event
9617
+ * for every destination.
9618
+ *
9619
+ * Destinations use `before` to connect to transformers (per-destination chain).
9188
9620
  * Destinations use `next` for post-push processing.
9189
9621
  *
9190
9622
  * Transformers use `next` to chain to other transformers. The same transformer
9191
9623
  * pool is shared by both pre-collector and post-collector chains.
9192
9624
  *
9193
- * The collector is implicit - it is never referenced directly in connections.
9194
- * It sits between the source chain and the destination chain automatically.
9625
+ * The collector is never referenced as a target in connections. It sits
9626
+ * between the source chain and the destination chains automatically.
9195
9627
  *
9196
- * Circular `next` references are safely handled at runtime by `walkChain()`
9197
- * in the collector module (visited-set detection).
9628
+ * Circular member `next` references are cut at runtime by the chain
9629
+ * runner's cycle guard (`advanceChain`) and bounded by its path cap.
9198
9630
  *
9199
9631
  * ```
9200
- * Source → [before → Preprocessing] → [next → Transformer chain] → Collector → [before → Transformer chain] → Destination → [next → Post-push]
9632
+ * Source → [before → Preprocessing] → [next → Transformer chain] → Collector → [collector.next → Transformer chain] → [before → Transformer chain] → Destination → [next → Post-push]
9201
9633
  * ```
9202
9634
  *
9203
9635
  * @packageDocumentation
@@ -9244,9 +9676,10 @@ interface Flow {
9244
9676
  /**
9245
9677
  * Transformer configurations (event transformation).
9246
9678
  *
9247
- * Pre-collector (source.next) or post-collector (destination.before).
9679
+ * Pre-collector (source.next), collector-level (collector.next, once per
9680
+ * event for every destination) or per destination (destination.before).
9248
9681
  *
9249
- * Key = unique transformer identifier (referenced by source.next or destination.before)
9682
+ * Key = unique transformer identifier (referenced by any chain field)
9250
9683
  * Value = transformer reference with package and config
9251
9684
  */
9252
9685
  transformers?: Record<string, Flow.Transformer>;
@@ -9454,6 +9887,23 @@ declare namespace Flow {
9454
9887
  * Server flows only.
9455
9888
  */
9456
9889
  traceInclude?: string[];
9890
+ /**
9891
+ * Declared build-time values for web `$env` references.
9892
+ *
9893
+ * Web flows resolve `$env.NAME` when the bundle is built and inline the
9894
+ * value. This map is the declared set the build resolves against, so the
9895
+ * same config bundles identically wherever it is built. A local CLI build
9896
+ * layers it over the shell environment; a hosted build uses it alone.
9897
+ * Server flows ignore it: their `$env` references are read at runtime.
9898
+ *
9899
+ * Values are inlined into public web bundles. Never put secrets here.
9900
+ *
9901
+ * @example
9902
+ * ```json
9903
+ * { "GA4_MEASUREMENT_ID": "G-XXXXXXX" }
9904
+ * ```
9905
+ */
9906
+ env?: Record<string, string>;
9457
9907
  }
9458
9908
  /**
9459
9909
  * Single bundle package entry.
@@ -9558,6 +10008,8 @@ declare namespace Flow {
9558
10008
  next?: Route;
9559
10009
  /** Cache configuration for this source. */
9560
10010
  cache?: Cache<EventCacheRule>;
10011
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
10012
+ state?: State | State[];
9561
10013
  /**
9562
10014
  * Source-level variables (highest priority in cascade).
9563
10015
  * Overrides flow and root variables.
@@ -9606,7 +10058,7 @@ declare namespace Flow {
9606
10058
  /** Destination environment configuration, merged with default destination environment. */
9607
10059
  env?: unknown;
9608
10060
  /**
9609
- * First transformer in post-collector chain.
10061
+ * First transformer in this destination's chain.
9610
10062
  *
9611
10063
  * Name of the transformer to execute before sending events to this destination.
9612
10064
  * If omitted, events are sent directly from the collector.
@@ -9623,6 +10075,8 @@ declare namespace Flow {
9623
10075
  next?: Route;
9624
10076
  /** Cache configuration for this destination. */
9625
10077
  cache?: Cache<EventCacheRule>;
10078
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
10079
+ state?: State | State[];
9626
10080
  /** Destination-level variables (highest priority in cascade). */
9627
10081
  variables?: Variables;
9628
10082
  /**
@@ -9674,14 +10128,23 @@ declare namespace Flow {
9674
10128
  *
9675
10129
  * Name of the next transformer to execute after this one.
9676
10130
  * In a pre-collector chain (source.next), terminates at the collector.
9677
- * In a post-collector chain (destination.before), terminates at the destination.
10131
+ * In collector.next, terminates at the destination fan-out.
10132
+ * In a destination chain (destination.before), terminates at the destination.
9678
10133
  * If omitted, the chain ends and control passes to the next pipeline stage.
9679
- * Array values define an explicit chain (no walking). Circular references
9680
- * are safely detected at runtime by `walkChain()`.
10134
+ * Array values define an explicit chain; a member's own `next` is
10135
+ * inserted right after it. Circular references are cut at runtime by the
10136
+ * chain runner's cycle guard (`advanceChain`).
9681
10137
  */
9682
10138
  next?: Route;
9683
10139
  /** Cache configuration for this transformer. */
9684
10140
  cache?: Cache<EventCacheRule>;
10141
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
10142
+ state?: State | State[];
10143
+ /**
10144
+ * Event mapping for a code-free transformer. The collector synthesizes a
10145
+ * push that applies it to the event (a rule with `ignore: true` drops it).
10146
+ */
10147
+ mapping?: Config$7;
9685
10148
  /** Transformer-level variables (highest priority in cascade). */
9686
10149
  variables?: Variables;
9687
10150
  /**
@@ -9881,4 +10344,118 @@ type StepOut = Flow.StepOut;
9881
10344
  */
9882
10345
  declare function formatOut(out: StepOut): string;
9883
10346
 
9884
- export { ClickIdEntrySchema, Flow, type JSONSchema, formatOut, mergeConfigSchema, resolveBaseSchema, index as schemas, zodToSchema };
10347
+ /**
10348
+ * Shared route cases, exported from `@walkeros/core/dev` as `routeCases` so
10349
+ * every package tests its chain runner against the same cases. Each case is a start route, the member `next`s of the
10350
+ * transformers it can reach, a root set (every matcher passes for one root
10351
+ * and fails for another), and optional per-step ingest writes (what a step
10352
+ * leaves behind for the routes after it, e.g. `state` or a transformer).
10353
+ *
10354
+ * `expected[i]` lists, for `roots[i]`, the ids every copy visits in order;
10355
+ * a copy that ended on a stop ends with `STOP`.
10356
+ *
10357
+ * Reused by the chain tests, the resolver-vs-enumeration superset test and
10358
+ * the runtime/simulate parity tests.
10359
+ */
10360
+ declare const STOP = "(stop)";
10361
+ interface RouteCase {
10362
+ name: string;
10363
+ spec: Route;
10364
+ nexts?: Record<string, Route>;
10365
+ sets?: Record<string, Record<string, unknown>>;
10366
+ roots: Root[];
10367
+ expected: string[][][];
10368
+ }
10369
+ declare function eq(key: string, value: string): MatchExpression;
10370
+ declare function makeTransformers(nexts?: Record<string, Route>): Transformers;
10371
+ declare const routeCases: RouteCase[];
10372
+ interface Copy {
10373
+ ids: string[];
10374
+ stopped: boolean;
10375
+ /** `from>to` for every hop, `from` empty at the head. */
10376
+ edges: string[];
10377
+ }
10378
+ /**
10379
+ * Tiny pure interpreter: loops `advanceChain`, records the ids each copy
10380
+ * visits, applies the per-step ingest writes, runs forks as independent
10381
+ * copies. No transformer executes.
10382
+ */
10383
+ declare function interpret(routeCase: RouteCase, root: Root, onRun?: (id: string) => void): Copy[];
10384
+ /** Visited ids per copy, `STOP` appended to stopped copies. */
10385
+ declare function visits(copies: Copy[]): string[][];
10386
+
10387
+ type routeCases$1_Copy = Copy;
10388
+ type routeCases$1_RouteCase = RouteCase;
10389
+ declare const routeCases$1_STOP: typeof STOP;
10390
+ declare const routeCases$1_eq: typeof eq;
10391
+ declare const routeCases$1_interpret: typeof interpret;
10392
+ declare const routeCases$1_makeTransformers: typeof makeTransformers;
10393
+ declare const routeCases$1_routeCases: typeof routeCases;
10394
+ declare const routeCases$1_visits: typeof visits;
10395
+ declare namespace routeCases$1 {
10396
+ export { type routeCases$1_Copy as Copy, type routeCases$1_RouteCase as RouteCase, routeCases$1_STOP as STOP, routeCases$1_eq as eq, routeCases$1_interpret as interpret, routeCases$1_makeTransformers as makeTransformers, routeCases$1_routeCases as routeCases, routeCases$1_visits as visits };
10397
+ }
10398
+
10399
+ type ValidationType = 'contract' | 'event' | 'flow' | 'mapping';
10400
+ type ValidateResultType = ValidationType | 'entry';
10401
+ interface ValidationError {
10402
+ path: string;
10403
+ message: string;
10404
+ value?: unknown;
10405
+ code?: string;
10406
+ }
10407
+ interface ValidationWarning {
10408
+ path: string;
10409
+ message: string;
10410
+ suggestion?: string;
10411
+ code?: string;
10412
+ }
10413
+ interface ValidateResult {
10414
+ valid: boolean;
10415
+ type: ValidateResultType;
10416
+ errors: ValidationError[];
10417
+ warnings: ValidationWarning[];
10418
+ details: Record<string, unknown>;
10419
+ }
10420
+ /**
10421
+ * Pure structural validation of a flow config: the exact checks the bundler
10422
+ * runs at codegen time, BEFORE any esbuild compile or package/archive fetch.
10423
+ *
10424
+ * Runs synchronously and never touches the network, the filesystem, or
10425
+ * esbuild. Aggregates every structural problem instead of throwing on the
10426
+ * first one, so a single call surfaces all issues in a config.
10427
+ *
10428
+ * Checks performed per flow:
10429
+ * - component names are valid JavaScript identifiers (they become generated
10430
+ * property names),
10431
+ * - each source/destination/store reference specifies exactly one of
10432
+ * package or code, and each transformer entry is a closed, valid shape,
10433
+ * - every `$store.` reference points at a defined store.
10434
+ *
10435
+ * Intended for fast deploy preflight: catch a bad flow config in well under a
10436
+ * second without spinning up a container or compiling anything.
10437
+ */
10438
+ declare function validateFlowStructure(flowConfig: Flow.Json): ValidateResult;
10439
+
10440
+ /**
10441
+ * Validates that a reference has either package XOR code, not both or neither.
10442
+ * Throws a descriptive error for invalid configurations.
10443
+ *
10444
+ * Transformers delegate to the closed-schema `validateStepEntry`; other kinds
10445
+ * keep the two-rule package/code presence check.
10446
+ */
10447
+ declare function validateReference(type: Flow.StepKind, name: string, ref: Flow.Step): void;
10448
+ /**
10449
+ * Validates that component names are valid JavaScript identifiers.
10450
+ * The bundler generates JS where flow config keys become property names,
10451
+ * so keys like "gtag-wrapper" would cause esbuild syntax errors.
10452
+ * Catches this early with a helpful error message suggesting camelCase.
10453
+ */
10454
+ declare function validateComponentNames(components: Record<string, unknown>, section: string): void;
10455
+ /**
10456
+ * Validates all $store. references point to defined stores.
10457
+ * Throws descriptive error on mismatch.
10458
+ */
10459
+ declare function validateStoreReferences(flowSettings: Flow, storeIds: Set<string>): void;
10460
+
10461
+ export { ClickIdEntrySchema, Flow, type JSONSchema, type ValidateResult, type ValidateResultType, type ValidationError, type ValidationType, type ValidationWarning, formatOut, mergeConfigSchema, resolveBaseSchema, routeCases$1 as routeCases, index as schemas, validateComponentNames, validateFlowStructure, validateReference, validateStoreReferences, zodToSchema };