@walkeros/core 4.6.1 → 4.7.0-next-1790187973605

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.mts CHANGED
@@ -99,6 +99,18 @@ interface ValueConfig {
99
99
  validate?: Validate;
100
100
  value?: PropertyType;
101
101
  }
102
+ /**
103
+ * Resolution root for paths that can address both the event and the
104
+ * pipeline ingest: state, cache keys and route matchers. Paths name their
105
+ * side explicitly, `event.data.id` or `ingest.site`. Every route resolves
106
+ * with the event its position holds. `event` is absent only for the
107
+ * request-scoped source cache key (one check per request, before per-event
108
+ * work) and in static tooling that has no event.
109
+ */
110
+ type Root = {
111
+ event?: DeepPartialEvent;
112
+ ingest: Record<string, unknown>;
113
+ };
102
114
  interface Context$6 {
103
115
  event: DeepPartialEvent;
104
116
  /** The surrounding mapping config: a Value (value-level) or a Rule (rule-level). */
@@ -118,6 +130,7 @@ type Map = {
118
130
  type mapping_Condition = Condition;
119
131
  type mapping_Loop = Loop;
120
132
  type mapping_Map = Map;
133
+ type mapping_Root = Root;
121
134
  type mapping_Rule<Settings = unknown> = Rule<Settings>;
122
135
  type mapping_RulePatch<Settings = unknown> = RulePatch<Settings>;
123
136
  type mapping_Rules<T = Rule> = Rules<T>;
@@ -127,7 +140,7 @@ type mapping_ValueConfig = ValueConfig;
127
140
  type mapping_ValueType = ValueType;
128
141
  type mapping_Values = Values;
129
142
  declare namespace mapping {
130
- export type { mapping_Condition as Condition, Config$7 as Config, Context$6 as Context, Data$1 as Data, Fn$4 as Fn, mapping_Loop as Loop, mapping_Map as Map, Policy$1 as Policy, Result$2 as Result, mapping_Rule as Rule, mapping_RulePatch as RulePatch, mapping_Rules as Rules, mapping_Validate as Validate, mapping_Value as Value, mapping_ValueConfig as ValueConfig, mapping_ValueType as ValueType, mapping_Values as Values };
143
+ export type { mapping_Condition as Condition, Config$7 as Config, Context$6 as Context, Data$1 as Data, Fn$4 as Fn, mapping_Loop as Loop, mapping_Map as Map, Policy$1 as Policy, Result$2 as Result, mapping_Root as Root, mapping_Rule as Rule, mapping_RulePatch as RulePatch, mapping_Rules as Rules, mapping_Validate as Validate, mapping_Value as Value, mapping_ValueConfig as ValueConfig, mapping_ValueType as ValueType, mapping_Values as Values };
131
144
  }
132
145
 
133
146
  interface BaseCacheRule {
@@ -366,7 +379,7 @@ interface FlowState {
366
379
  /** For phase === 'flush', the batch size + entry index. */
367
380
  batch?: FlowStateBatch;
368
381
  /** Discriminator when phase === 'skip'. */
369
- skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'unknown';
382
+ skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'dropped' | 'unknown';
370
383
  /** Free-form metadata: store key/value, cached: true, etc. */
371
384
  meta?: Record<string, unknown>;
372
385
  }
@@ -448,6 +461,14 @@ interface Config$6 {
448
461
  name?: string;
449
462
  /** Config release id stamped into event.source.release for this flow. */
450
463
  release?: string;
464
+ /**
465
+ * The collector's own transformer chain. Runs once per completed event,
466
+ * after enrichment and before the destination fan-out, with the full route
467
+ * grammar. A `stop` (or a transformer returning `false`) drops the event for
468
+ * every destination; per-destination filtering belongs on
469
+ * `destination.before`. Swappable at runtime via `walker config`.
470
+ */
471
+ next?: Route;
451
472
  }
452
473
  /**
453
474
  * Initialization configuration that extends Config with initial state
@@ -601,7 +622,11 @@ interface PushOptions {
601
622
  ingest?: Ingest;
602
623
  respond?: RespondFn;
603
624
  mapping?: Config$7;
604
- preChain?: string[];
625
+ /**
626
+ * Pre-collector chain (the source's `next` route, or a continuation of
627
+ * it). Resolved hop by hop by the chain runner with `{ ingest, event }`.
628
+ */
629
+ preChain?: Route;
605
630
  include?: string[];
606
631
  exclude?: string[];
607
632
  }
@@ -848,18 +873,21 @@ type Credential<T> = string | T;
848
873
 
849
874
  /**
850
875
  * Declarative store operation. Replaces `$code:` for simple fetch/stash.
851
- * key = store side, value = event side, mode = direction.
876
+ * key names the store slot, value the event or ingest side, mode the
877
+ * direction. Paths resolve against `{ event, ingest }`: `event.user.session`,
878
+ * `ingest.site`.
852
879
  */
853
880
  interface State {
854
881
  /** Direction. 'delete' is reserved for a later release. */
855
882
  mode: 'get' | 'set';
856
883
  /** Store id; defaults to the in-memory `__cache` store when omitted. */
857
884
  store?: string;
858
- /** Resolves against the event to the store key. */
885
+ /** Resolves against `{ event, ingest }` to the store key. */
859
886
  key: Value;
860
887
  /**
861
- * set: resolves to the payload to store.
862
- * get: its `key`/bare-string path is the event write-target.
888
+ * set: resolves against `{ event, ingest }` to the payload to store.
889
+ * get: its string path (or `key`) is the write target, `event.` onto the
890
+ * event or `ingest.` into the ingest.
863
891
  * Optional at the type level to keep a future `delete` mode non-breaking;
864
892
  * validation requires it for get/set.
865
893
  */
@@ -1028,7 +1056,7 @@ interface Config$5<T extends TypesGeneric$3 = Types$4> {
1028
1056
  mapping?: Rules<Rule<Mapping$1<T>>>;
1029
1057
  /** Pre-processing rules applied to all events before mapping; modifies events in-place. */
1030
1058
  policy?: Policy;
1031
- /** Whether to queue events when consent is not granted; defaults to true. */
1059
+ /** 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. */
1032
1060
  queue?: boolean;
1033
1061
  /** Defer destination initialization until these collector events fire (e.g., `['consent']`). */
1034
1062
  require?: string[];
@@ -1347,46 +1375,70 @@ declare namespace elb {
1347
1375
  /**
1348
1376
  * Unified route grammar for Flow v4. A `Route` is one of:
1349
1377
  * - a transformer ID string (`"redact"`)
1350
- * - a sequence of routes (`["a", "b", "c"]` — sugar for chained `.next`)
1351
- * - a `RouteConfig` — a gated / dispatching node.
1378
+ * - a sequence of routes (`["a", "b", "c"]`, run in order)
1379
+ * - a `RouteConfig`: a gated / dispatching node.
1380
+ *
1381
+ * Exception: an array made only of route configs (no id, no nested array)
1382
+ * is an implicit `one`, first match wins (`[gateA, gateB]` runs at most one
1383
+ * of them). Write `{ one: [...] }` to say so, or add an id to make it a
1384
+ * sequence (`["x", gateA, gateB]` evaluates both gates in order).
1352
1385
  *
1353
- * `RouteConfig` is a disjoint union — set exactly one of `next`, `one`,
1354
- * `many`, or neither (pure gate). The disjointness is enforced by `never`
1355
- * sibling properties at the type level and `z.strictObject` at the schema
1356
- * level.
1386
+ * `RouteConfig` is a disjoint union: set exactly one of `next`, `one`,
1387
+ * `many`, `stop`, or none of them (pure gate). The disjointness is enforced
1388
+ * by `never` sibling properties at the type level and `z.strictObject` at the
1389
+ * schema level.
1357
1390
  *
1358
1391
  * Operators:
1359
1392
  * - `next`: single continuation.
1360
1393
  * - `one`: first-match dispatch (walk entries, first whose match passes wins).
1361
- * - `many`: all-match terminal fan-out (every matching entry spawns an
1362
- * independent flow; main chain terminates here). Restricted to
1363
- * pre-collector positions (source.next, transformer.next, transformer.before).
1394
+ * - `many`: all-match fan-out. Every matching entry is its own copy of the
1395
+ * event that finishes the rest of the path on its own. Valid in every chain
1396
+ * field.
1397
+ * - `stop`: ends the running copy of the event (optionally gated by `match`).
1398
+ *
1399
+ * Sequences resolve lazily: a conditional segment is evaluated only when its
1400
+ * position is reached, so it sees what earlier steps wrote.
1364
1401
  */
1365
1402
  type Route = string | Route[] | RouteConfig;
1366
- type RouteConfig = RouteNextConfig | RouteOneConfig | RouteManyConfig | RouteGateConfig;
1403
+ type RouteConfig = RouteNextConfig | RouteOneConfig | RouteManyConfig | RouteStopConfig | RouteGateConfig;
1367
1404
  interface RouteNextConfig {
1368
1405
  match?: MatchExpression;
1369
1406
  next: Route;
1370
1407
  one?: never;
1371
1408
  many?: never;
1409
+ stop?: never;
1372
1410
  }
1373
1411
  interface RouteOneConfig {
1374
1412
  match?: MatchExpression;
1375
1413
  one: Route[];
1376
1414
  next?: never;
1377
1415
  many?: never;
1416
+ stop?: never;
1378
1417
  }
1379
1418
  interface RouteManyConfig {
1380
1419
  match?: MatchExpression;
1381
1420
  many: Route[];
1382
1421
  next?: never;
1383
1422
  one?: never;
1423
+ stop?: never;
1424
+ }
1425
+ /**
1426
+ * Ends the running copy of the event. Without `match` the stop is
1427
+ * unconditional; with `match` a failing match falls through like a gate.
1428
+ */
1429
+ interface RouteStopConfig {
1430
+ match?: MatchExpression;
1431
+ stop: true;
1432
+ next?: never;
1433
+ one?: never;
1434
+ many?: never;
1384
1435
  }
1385
1436
  interface RouteGateConfig {
1386
1437
  match: MatchExpression;
1387
1438
  next?: never;
1388
1439
  one?: never;
1389
1440
  many?: never;
1441
+ stop?: never;
1390
1442
  }
1391
1443
  /**
1392
1444
  * Base environment interface for walkerOS transformers.
@@ -1486,21 +1538,36 @@ interface Result$1<E = DeepPartialEvent> {
1486
1538
  respond?: RespondFn;
1487
1539
  next?: Route;
1488
1540
  }
1541
+ /**
1542
+ * One finished copy of a chain run: its event and its own ingest. `E`
1543
+ * narrows the event where the copy is known complete (a full event after
1544
+ * `collector.next`).
1545
+ */
1546
+ interface ChainCopy<E = DeepPartialEvent> {
1547
+ event: E;
1548
+ ingest: Ingest;
1549
+ }
1489
1550
  /**
1490
1551
  * Result of running a transformer chain.
1491
- * Returns the processed event (singular, fan-out array, or null if dropped)
1492
- * alongside the potentially wrapped respond function.
1493
1552
  *
1494
- * `stopped` signals pipeline-halt — when set, the caller MUST NOT propagate
1495
- * the event further downstream (no destinations, no subsequent chains).
1496
- * Used by `cache.stop: true` on pre-collector transformers so the documented
1497
- * "downstream transformers and destinations are skipped" semantic holds.
1553
+ * `copies` is the one carrier of the outcome: every finished copy that
1554
+ * continues downstream (one without a fork, one per surviving fork), each
1555
+ * with the ingest it finished with. The next position goes on with each
1556
+ * pair.
1557
+ *
1558
+ * - dropped (a transformer returned `false` or threw): `copies` empty,
1559
+ * `droppedBy` names the transformer.
1560
+ * - route `stop`: `copies` empty, `stopped: true`; `droppedBy` names the
1561
+ * transformer whose route stopped it, absent for the start route.
1562
+ * - `cache.stop: true` HIT: `copies` holds the cached copy, `stopped: true`.
1563
+ * The caller MUST NOT propagate it further downstream than its position
1564
+ * allows (pipeline halt).
1498
1565
  */
1499
1566
  interface ChainResult {
1500
- event: DeepPartialEvent | DeepPartialEvent[] | null;
1567
+ copies: ChainCopy[];
1501
1568
  respond?: RespondFn;
1502
1569
  stopped?: true;
1503
- /** Transformer that stopped the chain (returned false or threw). */
1570
+ /** Transformer that dropped or stopped the chain. */
1504
1571
  droppedBy?: string;
1505
1572
  }
1506
1573
  /**
@@ -1600,6 +1667,7 @@ declare function getTransformer<T extends TypesGeneric$2 = Types$3>(collector: {
1600
1667
  };
1601
1668
  }, id: string): Instance$4<T>;
1602
1669
 
1670
+ type transformer_ChainCopy<E = DeepPartialEvent> = ChainCopy<E>;
1603
1671
  type transformer_ChainResult = ChainResult;
1604
1672
  type transformer_InitTransformer<T extends TypesGeneric$2 = Types$3> = InitTransformer<T>;
1605
1673
  type transformer_InitTransformers = InitTransformers;
@@ -1609,10 +1677,11 @@ type transformer_RouteGateConfig = RouteGateConfig;
1609
1677
  type transformer_RouteManyConfig = RouteManyConfig;
1610
1678
  type transformer_RouteNextConfig = RouteNextConfig;
1611
1679
  type transformer_RouteOneConfig = RouteOneConfig;
1680
+ type transformer_RouteStopConfig = RouteStopConfig;
1612
1681
  type transformer_Transformers = Transformers;
1613
1682
  declare const transformer_getTransformer: typeof getTransformer;
1614
1683
  declare namespace transformer {
1615
- export { type BaseEnv$2 as BaseEnv, type transformer_ChainResult as ChainResult, type Config$4 as Config, type Context$4 as Context, type Env$2 as Env, type Fn$2 as Fn, type Init$2 as Init, type InitFn$1 as InitFn, type InitSettings$2 as InitSettings, type transformer_InitTransformer as InitTransformer, type transformer_InitTransformers as InitTransformers, type Instance$4 as Instance, type Result$1 as Result, type transformer_Route as Route, type transformer_RouteConfig as RouteConfig, type transformer_RouteGateConfig as RouteGateConfig, type transformer_RouteManyConfig as RouteManyConfig, type transformer_RouteNextConfig as RouteNextConfig, type transformer_RouteOneConfig as RouteOneConfig, type Settings$2 as Settings, type transformer_Transformers as Transformers, type Types$3 as Types, type TypesGeneric$2 as TypesGeneric, type TypesOf$2 as TypesOf, transformer_getTransformer as getTransformer };
1684
+ export { type BaseEnv$2 as BaseEnv, type transformer_ChainCopy as ChainCopy, type transformer_ChainResult as ChainResult, type Config$4 as Config, type Context$4 as Context, type Env$2 as Env, type Fn$2 as Fn, type Init$2 as Init, type InitFn$1 as InitFn, type InitSettings$2 as InitSettings, type transformer_InitTransformer as InitTransformer, type transformer_InitTransformers as InitTransformers, type Instance$4 as Instance, type Result$1 as Result, type transformer_Route as Route, type transformer_RouteConfig as RouteConfig, type transformer_RouteGateConfig as RouteGateConfig, type transformer_RouteManyConfig as RouteManyConfig, type transformer_RouteNextConfig as RouteNextConfig, type transformer_RouteOneConfig as RouteOneConfig, type transformer_RouteStopConfig as RouteStopConfig, type Settings$2 as Settings, type transformer_Transformers as Transformers, type Types$3 as Types, type TypesGeneric$2 as TypesGeneric, type TypesOf$2 as TypesOf, transformer_getTransformer as getTransformer };
1616
1685
  }
1617
1686
 
1618
1687
  /**
@@ -1647,20 +1716,24 @@ type ValidateEvents = Record<string, Record<string, JsonSchema>>;
1647
1716
  * Sources use `before` for consent-exempt pre-source preprocessing
1648
1717
  * (decode, validate, authenticate raw input before the source.next chain).
1649
1718
  *
1650
- * Destinations use `before` to connect to transformers (post-collector chain).
1719
+ * The collector uses `next` for its own chain: it runs once per completed
1720
+ * event, before the destination fan-out, so a `stop` there drops the event
1721
+ * for every destination.
1722
+ *
1723
+ * Destinations use `before` to connect to transformers (per-destination chain).
1651
1724
  * Destinations use `next` for post-push processing.
1652
1725
  *
1653
1726
  * Transformers use `next` to chain to other transformers. The same transformer
1654
1727
  * pool is shared by both pre-collector and post-collector chains.
1655
1728
  *
1656
- * The collector is implicit - it is never referenced directly in connections.
1657
- * It sits between the source chain and the destination chain automatically.
1729
+ * The collector is never referenced as a target in connections. It sits
1730
+ * between the source chain and the destination chains automatically.
1658
1731
  *
1659
- * Circular `next` references are safely handled at runtime by `walkChain()`
1660
- * in the collector module (visited-set detection).
1732
+ * Circular member `next` references are cut at runtime by the chain
1733
+ * runner's cycle guard (`advanceChain`) and bounded by its path cap.
1661
1734
  *
1662
1735
  * ```
1663
- * Source → [before → Preprocessing] → [next → Transformer chain] → Collector → [before → Transformer chain] → Destination → [next → Post-push]
1736
+ * Source → [before → Preprocessing] → [next → Transformer chain] → Collector → [collector.next → Transformer chain] → [before → Transformer chain] → Destination → [next → Post-push]
1664
1737
  * ```
1665
1738
  *
1666
1739
  * @packageDocumentation
@@ -1707,9 +1780,10 @@ interface Flow {
1707
1780
  /**
1708
1781
  * Transformer configurations (event transformation).
1709
1782
  *
1710
- * Pre-collector (source.next) or post-collector (destination.before).
1783
+ * Pre-collector (source.next), collector-level (collector.next, once per
1784
+ * event for every destination) or per destination (destination.before).
1711
1785
  *
1712
- * Key = unique transformer identifier (referenced by source.next or destination.before)
1786
+ * Key = unique transformer identifier (referenced by any chain field)
1713
1787
  * Value = transformer reference with package and config
1714
1788
  */
1715
1789
  transformers?: Record<string, Flow.Transformer>;
@@ -2021,6 +2095,8 @@ declare namespace Flow {
2021
2095
  next?: Route;
2022
2096
  /** Cache configuration for this source. */
2023
2097
  cache?: Cache<EventCacheRule>;
2098
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
2099
+ state?: State | State[];
2024
2100
  /**
2025
2101
  * Source-level variables (highest priority in cascade).
2026
2102
  * Overrides flow and root variables.
@@ -2086,6 +2162,8 @@ declare namespace Flow {
2086
2162
  next?: Route;
2087
2163
  /** Cache configuration for this destination. */
2088
2164
  cache?: Cache<EventCacheRule>;
2165
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
2166
+ state?: State | State[];
2089
2167
  /** Destination-level variables (highest priority in cascade). */
2090
2168
  variables?: Variables;
2091
2169
  /**
@@ -2139,12 +2217,20 @@ declare namespace Flow {
2139
2217
  * In a pre-collector chain (source.next), terminates at the collector.
2140
2218
  * In a post-collector chain (destination.before), terminates at the destination.
2141
2219
  * If omitted, the chain ends and control passes to the next pipeline stage.
2142
- * Array values define an explicit chain (no walking). Circular references
2143
- * are safely detected at runtime by `walkChain()`.
2220
+ * Array values define an explicit chain; a member's own `next` is
2221
+ * inserted right after it. Circular references are cut at runtime by the
2222
+ * chain runner's cycle guard (`advanceChain`).
2144
2223
  */
2145
2224
  next?: Route;
2146
2225
  /** Cache configuration for this transformer. */
2147
2226
  cache?: Cache<EventCacheRule>;
2227
+ /** Declarative store get/set. Paths resolve against `{ event, ingest }`. */
2228
+ state?: State | State[];
2229
+ /**
2230
+ * Event mapping for a code-free transformer. The collector synthesizes a
2231
+ * push that applies it to the event (a rule with `ignore: true` drops it).
2232
+ */
2233
+ mapping?: Config$7;
2148
2234
  /** Transformer-level variables (highest priority in cascade). */
2149
2235
  variables?: Variables;
2150
2236
  /**
@@ -3478,7 +3564,7 @@ interface JourneyBranch {
3478
3564
  /** Wall-clock duration of the branch, when measured. */
3479
3565
  durationMs?: number;
3480
3566
  /** Skip discriminator when the branch was skipped. */
3481
- skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'unknown';
3567
+ skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'dropped' | 'unknown';
3482
3568
  /** Error info when the branch failed. */
3483
3569
  error?: {
3484
3570
  name?: string;
@@ -3525,7 +3611,7 @@ interface JourneyHop {
3525
3611
  message: string;
3526
3612
  };
3527
3613
  /** Skip discriminator when the hop's terminal phase is skip. */
3528
- skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'unknown';
3614
+ skipReason?: 'consent' | 'cache_hit' | 'sampled_out' | 'disabled' | 'dropped' | 'unknown';
3529
3615
  /** Matched mapping rule, when one matched. */
3530
3616
  mappingKey?: string;
3531
3617
  /** Matched contract rule, when one matched. */
@@ -3652,7 +3738,10 @@ interface JourneyAssembly {
3652
3738
  declare function branch(event: DeepPartialEvent, next: Route): Result$1;
3653
3739
 
3654
3740
  /**
3655
- * Anonymizes an IPv4 address by setting the last octet to 0.
3741
+ * Anonymizes an IP address: IPv4 keeps its /24, IPv6 its /48.
3742
+ *
3743
+ * An IPv4-mapped IPv6 address (`::ffff:1.2.3.4`, what a dual-stack listener
3744
+ * reports for an IPv4 client) is treated as the IPv4 address it carries.
3656
3745
  *
3657
3746
  * @param ip The IP address to anonymize.
3658
3747
  * @returns The anonymized IP address or an empty string if the IP is invalid.
@@ -3805,9 +3894,18 @@ declare function getByPath(event: unknown, key?: string, defaultValue?: unknown)
3805
3894
  * @param obj - The object to set the value in.
3806
3895
  * @param key - The dot-notation string.
3807
3896
  * @param value - The value to set.
3808
- * @returns A new object with the updated value.
3897
+ * @param options.mutable - Write into `obj` in place instead of a clone. For
3898
+ * shared mutable context such as ingest, where later steps must see the
3899
+ * write. Returns `obj` itself.
3900
+ * @returns A new object with the updated value, or `obj` when mutable.
3901
+ *
3902
+ * Setting `undefined` removes the key instead, and creates nothing on a
3903
+ * missing path. An own key holding `undefined` is a state walkerOS never
3904
+ * produces, because JSON and JSON Schema treat it as absent.
3809
3905
  */
3810
- declare function setByPath<T = unknown>(obj: T, key: string, value: unknown): T;
3906
+ declare function setByPath<T = unknown>(obj: T, key: string, value: unknown, options?: {
3907
+ mutable?: boolean;
3908
+ }): T;
3811
3909
  /**
3812
3910
  * Deletes a value in an object by a dot-notation string.
3813
3911
  * Returns a new object; the input is not mutated. No-op when the path is
@@ -3906,6 +4004,14 @@ declare function getId(length?: number, charset?: string): string;
3906
4004
  */
3907
4005
  declare function getSpanId(): string;
3908
4006
 
4007
+ /**
4008
+ * Deterministic child span id: 16 lowercase hex characters (the shape of
4009
+ * `getSpanId`), derived from the parent id and the child's position. The
4010
+ * same inputs always give the same id, different positions or parents give
4011
+ * different ids, so forks of one event never collapse on `event.id`.
4012
+ */
4013
+ declare function deriveSpanId(parentId: string, position: number | string): string;
4014
+
3909
4015
  /**
3910
4016
  * W3C trace_id: 16 random bytes encoded as 32 lowercase hex characters.
3911
4017
  * Shared by every event of a collector run. Reference: W3C Trace Context.
@@ -5259,32 +5365,228 @@ declare function pushResultToOutcome(result: {
5259
5365
  */
5260
5366
  declare function compileMatcher(expr: MatchExpression | '*' | undefined): CompiledMatcher;
5261
5367
 
5368
+ /** Position inside a raw route spec, e.g. `['one', 0, 'next']`. */
5369
+ type RoutePath = (string | number)[];
5370
+ /**
5371
+ * Where a compiled id or stop came from: the nearest enclosing decision
5372
+ * (`one` / `many` entry or gated `next` / `stop`) with its SOURCE match
5373
+ * expression, or, outside any decision, the plain position of the segment.
5374
+ * Kept beside the compiled matcher so enumerations can label branches.
5375
+ */
5376
+ interface RouteDecision {
5377
+ kind: 'next' | 'one' | 'many' | 'sequence';
5378
+ path: RoutePath;
5379
+ match?: MatchExpression;
5380
+ catchAll?: true;
5381
+ }
5382
+ /**
5383
+ * A decision label plus `outer`, the enclosing decision whose match must
5384
+ * also have held to reach this one (a gate inside a `one` entry, a `one`
5385
+ * inside a gate, ...). The chain of `outer` links lists every decision on
5386
+ * the way from the route's head.
5387
+ */
5388
+ interface RouteLabel extends RouteDecision {
5389
+ outer?: RouteLabel;
5390
+ }
5391
+ /**
5392
+ * Internal: compiled route data. Not exported from the package's public
5393
+ * surface (`@walkeros/core`), but exported here so adjacent files inside the
5394
+ * core package can probe compilation.
5395
+ */
5396
+ interface CompiledRoute {
5397
+ match: CompiledMatcher;
5398
+ source?: MatchExpression;
5399
+ next: CompiledNext;
5400
+ }
5401
+ type CompiledIdNode = {
5402
+ type: 'static';
5403
+ value: string;
5404
+ label: RouteLabel;
5405
+ } | {
5406
+ type: 'chain';
5407
+ value: string[];
5408
+ label: RouteLabel;
5409
+ };
5410
+ type CompiledStopNode = {
5411
+ type: 'stop';
5412
+ label: RouteLabel;
5413
+ };
5414
+ type CompiledGateNode = {
5415
+ type: 'gate';
5416
+ match: CompiledMatcher;
5417
+ source: MatchExpression;
5418
+ next: CompiledNext;
5419
+ };
5420
+ type CompiledNext = CompiledIdNode | CompiledStopNode | CompiledGateNode | {
5421
+ type: 'one';
5422
+ routes: CompiledRoute[];
5423
+ } | {
5424
+ type: 'many';
5425
+ routes: CompiledRoute[];
5426
+ } | {
5427
+ type: 'sequence';
5428
+ value: CompiledNext[];
5429
+ };
5430
+ /**
5431
+ * The unresolved remainder of a route: compiled segments still to walk,
5432
+ * followed by the remainder of every enclosing level (`tail`). Treat it as
5433
+ * opaque: only `getNextSteps` (and the chain helpers built on it) read it.
5434
+ * It references the cached compiled nodes, so resuming never recompiles.
5435
+ */
5436
+ interface RouteContinuation {
5437
+ readonly type: 'continuation';
5438
+ readonly segments: readonly CompiledNext[];
5439
+ readonly at: number;
5440
+ readonly tail?: RouteContinuation;
5441
+ }
5442
+ /**
5443
+ * Result of resolving a route against one root.
5444
+ *
5445
+ * - `{ ids }`: run these ids in order. `ids: []` without `then` means the
5446
+ * route resolved to nothing (gate failed, no `one` entry matched, empty or
5447
+ * undefined spec): the caller continues with whatever follows the route.
5448
+ * - `{ ids, then }`: run `ids`, then resolve `then` against the root as the
5449
+ * last of those steps left it (lazy sequences).
5450
+ * - `{ ids: [], stop: true }`: a `stop` matched; the running copy ends.
5451
+ * - `{ ids: [], forks }`: a `many` matched two or more entries. Each fork is
5452
+ * an independent copy that resolves its own continuation (which already
5453
+ * includes the rest of the enclosing sequence).
5454
+ */
5455
+ type NextSteps = {
5456
+ ids: string[];
5457
+ then?: RouteContinuation;
5458
+ stop?: never;
5459
+ forks?: never;
5460
+ } | {
5461
+ ids: [];
5462
+ stop: true;
5463
+ then?: never;
5464
+ forks?: never;
5465
+ } | {
5466
+ ids: [];
5467
+ forks: RouteContinuation[];
5468
+ stop?: never;
5469
+ then?: never;
5470
+ };
5262
5471
  declare function isRouteConfigEntry(entry: unknown): boolean;
5263
5472
  /**
5264
- * Pure RouteConfig array — every element is a RouteConfig object.
5473
+ * Pure RouteConfig array: every element is a RouteConfig object.
5265
5474
  * Used to detect the legacy first-match shape (treated as implicit `one`).
5266
5475
  */
5267
5476
  declare function isRouteArray(next: Route): next is RouteConfig[];
5477
+ declare function isRouteContinuation(spec: Route | RouteContinuation): spec is RouteContinuation;
5268
5478
  /**
5269
- * Resolve a Route spec against a matcher context. Returns the immediate
5270
- * next transformer IDs.
5271
- *
5272
- * Return shape:
5273
- * [] → terminate (gate failed, empty many, all matchers failed,
5274
- * undefined spec).
5275
- * ["x"] → continue main chain at x.
5276
- * ["a","b",…] → fan-out, only produced by `many`. Main chain terminates
5277
- * at this dispatch point; each branch is an independent
5278
- * flow running to its own exit.
5279
- *
5280
- * Reachability vs prediction: `match` rules read arbitrary event fields.
5281
- * `getNextSteps` is deterministic for the SUPPLIED context only. Static
5282
- * analyzers without a real event must over-approximate by treating each
5283
- * match as "may pass or fail" — see `flattenRouteTargets` in the CLI
5284
- * validator. This function does NOT predict the path a future event will
5285
- * take; it computes the path for the event you give it.
5286
- */
5287
- declare function getNextSteps(spec: Route | undefined, context?: Record<string, unknown>): string[];
5479
+ * The one route resolver. Resolves `spec` (a Route or a continuation handed
5480
+ * back by an earlier call) against the resolution root `{ ingest, event }`
5481
+ * of the position that is running.
5482
+ *
5483
+ * Deterministic for the SUPPLIED root only. Static tooling that needs every
5484
+ * possible target uses `getRouteGraph`, the enumeration over the same
5485
+ * compiled form.
5486
+ */
5487
+ declare function getNextSteps(spec: Route | RouteContinuation | undefined, root: Root): NextSteps;
5488
+
5489
+ /**
5490
+ * One level of the continuation stack.
5491
+ *
5492
+ * - `ids` frame: resolved ids still to run, `at` is the next one.
5493
+ * - `route` frame: a route (or a route continuation) not resolved yet. It is
5494
+ * resolved only when popped, i.e. with the root as the preceding step left
5495
+ * it. A member's own `next` is pushed as a route frame right after the
5496
+ * member runs.
5497
+ *
5498
+ * `ancestry` lists the members whose own `next` inserted this frame (outer
5499
+ * first). A member already in its frame's ancestry is not run again: that is
5500
+ * the cycle guard for member-next insertion. Frames of the explicit start
5501
+ * route have an empty ancestry, so a step listed twice runs twice.
5502
+ */
5503
+ type ChainFrame = {
5504
+ ids: readonly string[];
5505
+ at: number;
5506
+ ancestry: readonly string[];
5507
+ } | {
5508
+ route: Route | RouteContinuation;
5509
+ ancestry: readonly string[];
5510
+ };
5511
+ /**
5512
+ * Immutable continuation stack, top first. A fork copies it, so every copy
5513
+ * carries the continuation of every enclosing level.
5514
+ */
5515
+ type ChainContinuation = readonly ChainFrame[];
5516
+ /**
5517
+ * What to do next.
5518
+ *
5519
+ * - `run`: run step `id`, then advance `rest` with the root the step left.
5520
+ * `rest` already carries the member's own `next` on top (unresolved).
5521
+ * `ancestry` is that frame's ancestry (member included), for a caller that
5522
+ * pushes a further route on behalf of the member.
5523
+ * - `fork`: run every branch to its end as an independent copy.
5524
+ * - `stop`: this copy ends. `owner` is the member whose own route (its
5525
+ * `next`, or a route pushed on its behalf) resolved the stop; absent when
5526
+ * the stop came from the start route itself.
5527
+ * - `done`: the path is finished.
5528
+ */
5529
+ type ChainStep = {
5530
+ kind: 'run';
5531
+ id: string;
5532
+ rest: ChainContinuation;
5533
+ ancestry: readonly string[];
5534
+ } | {
5535
+ kind: 'fork';
5536
+ branches: ChainContinuation[];
5537
+ } | {
5538
+ kind: 'stop';
5539
+ owner?: string;
5540
+ } | {
5541
+ kind: 'done';
5542
+ };
5543
+ /** Continuation stack for a chain field (`next`, `before`, ...). */
5544
+ declare function startChain(spec: Route | undefined): ChainContinuation;
5545
+ /**
5546
+ * Tells a continuation stack apart from a Route. Route arrays hold ids,
5547
+ * nested routes and route configs, never frames; an empty array means
5548
+ * "nothing to run" either way.
5549
+ */
5550
+ declare function isChainContinuation(value: Route | ChainContinuation): value is ChainContinuation;
5551
+ /**
5552
+ * Advances the continuation stack to the next thing to do. Pure: no I/O and
5553
+ * no transformer execution. Route frames are resolved through
5554
+ * `getNextSteps` with `root`, only when popped.
5555
+ */
5556
+ declare function advanceChain(stack: ChainContinuation, root: Root, transformers: Transformers): ChainStep;
5557
+ /**
5558
+ * One branch of the route graph: `targets` run in order right after `from`
5559
+ * (the position's head when `from` is absent). A branch ending in a `stop`
5560
+ * has `stop: true`.
5561
+ *
5562
+ * - `kind`, `match`, `catchAll`: the decision that selected the branch, with
5563
+ * the SOURCE match expression (for labels and matcher path checks).
5564
+ * - `path`: position of that decision (or plain segment) inside the raw
5565
+ * route; the route is the given spec, or `transformers[owner].config.next`
5566
+ * when `owner` is set (an inserted member `next`).
5567
+ * - `via`: the enclosing decisions (outer first) that must also have held
5568
+ * to reach this branch, e.g. the `one` entry around a nested gate. Absent
5569
+ * when the branch sits directly under the route's head.
5570
+ */
5571
+ interface RouteGraphNode {
5572
+ from?: string;
5573
+ targets: string[];
5574
+ kind: RouteLabel['kind'];
5575
+ match?: MatchExpression;
5576
+ stop?: true;
5577
+ catchAll?: true;
5578
+ path: (string | number)[];
5579
+ owner?: string;
5580
+ via?: RouteDecision[];
5581
+ }
5582
+ /**
5583
+ * Enumerates every branch of a route over the same compiled form and the
5584
+ * same continuation stack as `advanceChain`: every `one` and `many` entry,
5585
+ * both sides of a gate, sequence segments in order, stops marked. With
5586
+ * `transformers`, each member's own `next` is drawn where it is inserted,
5587
+ * and each fork continues through the rest of the path.
5588
+ */
5589
+ declare function getRouteGraph(spec: Route | undefined, transformers?: Transformers): RouteGraphNode[];
5288
5590
 
5289
5591
  interface CompiledCacheRule {
5290
5592
  match: CompiledMatcher;
@@ -5305,10 +5607,11 @@ interface CacheResult {
5305
5607
  rule: CompiledCacheRule;
5306
5608
  }
5307
5609
  /**
5308
- * Builds a structured context object for cache and routing operations.
5309
- * Normalizes ingest (defaulting to {}) and optionally includes event.
5610
+ * Builds the `{ event, ingest }` resolution root. Ingest defaults to `{}`.
5611
+ * `event` is omitted when undefined, because `before` chains route on ingest
5612
+ * before an event exists.
5310
5613
  */
5311
- declare function buildCacheContext(ingest?: unknown, event?: unknown): Record<string, unknown>;
5614
+ declare function createMappingRoot(ingest?: Record<string, unknown>, event?: DeepPartialEvent): Root;
5312
5615
  declare function compileCache(cache: Cache<EventCacheRule>): CompiledCache;
5313
5616
  declare function checkCache(compiled: CompiledCache, store: Instance$1, context: Record<string, unknown>, namespace?: string): Promise<CacheResult | null>;
5314
5617
  declare function storeCache(store: Instance$1, key: string, value: unknown, ttlSeconds: number): void;
@@ -5405,13 +5708,21 @@ type GetStore = (id: string | undefined) => Instance$1 | undefined;
5405
5708
  declare function compileState(state: State | State[]): State[];
5406
5709
  /**
5407
5710
  * Apply declarative store operations against an event, in array order,
5408
- * sequentially. `get` reads from the store and writes the fetched value to
5409
- * the event's value path; `set` writes the resolved value to the store. Each
5410
- * entry is fail-open: a store or resolution error is logged and the event is
5411
- * left unmutated, the chain continues. Only `FatalError` rethrows (via
5711
+ * sequentially.
5712
+ *
5713
+ * `key` and `value` resolve against `{ event, ingest }`, so every path names
5714
+ * its side: `event.user.session`, `ingest.site`. `get` reads from the store
5715
+ * and writes the fetched value to its `value` path: `event.x` onto the event
5716
+ * (immutably), `ingest.x` into the ingest in place. An ingest write is shared
5717
+ * by every event in the scope, so at a fan-out it loses per-event
5718
+ * attribution. `set` writes the resolved value to the store.
5719
+ *
5720
+ * Each entry is fail-open: a store or resolution error is logged and the
5721
+ * event is left unmutated, the chain continues. A key that does not resolve
5722
+ * warns; a store miss is silent. Only `FatalError` rethrows (via
5412
5723
  * `getMappingValue`).
5413
5724
  */
5414
- declare function applyState<E extends DeepPartialEvent>(states: State[], getStore: GetStore, event: E, collector: Instance$6): Promise<E>;
5725
+ declare function applyState<E extends DeepPartialEvent>(states: State[], getStore: GetStore, event: E, collector: Instance$6, ingest: Record<string, unknown> | undefined): Promise<E>;
5415
5726
 
5416
5727
  /**
5417
5728
  * Single source of truth for step-entry validation across all four kinds.
@@ -5428,7 +5739,63 @@ declare function applyState<E extends DeepPartialEvent>(states: State[], getStor
5428
5739
  * - INVALID_IMPORT `import` is set but is not a valid JS identifier
5429
5740
  * - INVALID_CODE_SHAPE `code` is present but is neither an object nor a string
5430
5741
  */
5431
- declare const STEP_OPERATIVE_FIELDS: Record<Flow.StepKind, readonly string[]>;
5742
+ /**
5743
+ * The Flow step interface for each step kind.
5744
+ */
5745
+ interface StepByKind {
5746
+ Source: Flow.Source;
5747
+ Transformer: Flow.Transformer;
5748
+ Destination: Flow.Destination;
5749
+ Store: Flow.Store;
5750
+ }
5751
+ /** A declared field name of the Flow step interface for `K`. */
5752
+ type StepField<K extends Flow.StepKind> = keyof StepByKind[K] & string;
5753
+ /**
5754
+ * Lifecycle role of a declared step field.
5755
+ *
5756
+ * - `reference`: selects the implementation (`code`, `package`, `import`).
5757
+ * The bundler turns it into the emitted `code` value; it is never emitted
5758
+ * as-is.
5759
+ * - `resolve`: consumed by flow resolution (the variable cascade). Kept on the
5760
+ * resolved flow, never emitted into a bundle.
5761
+ * - `docs`: consumed by validate/simulate/test tooling. Stripped at flow
5762
+ * resolution, never emitted.
5763
+ * - `runtime`: must reach the collector unchanged, on every emission path
5764
+ * (package step, inline code step, code-free path step).
5765
+ */
5766
+ type StepFieldRole = 'reference' | 'resolve' | 'docs' | 'runtime';
5767
+ /**
5768
+ * Single source of truth for what happens to each declared step field between
5769
+ * the flow file and the running collector. Flow resolution (`getFlowSettings`)
5770
+ * and the CLI bundler both derive their field handling from this table instead
5771
+ * of hand-written field lists.
5772
+ *
5773
+ * Each entry is typed as a complete map over the Flow step interface, so adding
5774
+ * a field to `Flow.Source` / `Flow.Transformer` / `Flow.Destination` /
5775
+ * `Flow.Store` is a compile error here until the field is classified.
5776
+ */
5777
+ declare const STEP_FIELD_ROLES: {
5778
+ readonly [K in Flow.StepKind]: Readonly<Record<StepField<K>, StepFieldRole>>;
5779
+ };
5780
+ /**
5781
+ * Role of `field` on a step of `kind`, or `undefined` when the field is not a
5782
+ * declared Flow step field.
5783
+ */
5784
+ declare function getStepFieldRole(kind: Flow.StepKind, field: string): StepFieldRole | undefined;
5785
+ /**
5786
+ * The runtime fields of a step entry: every declared field classified as
5787
+ * `runtime` whose value is set. This is what the bundler must emit for the
5788
+ * step, whatever its emission path.
5789
+ */
5790
+ declare function getStepRuntimeProps(step: object, kind: Flow.StepKind): Record<string, unknown>;
5791
+ /**
5792
+ * Fields whose presence makes an entry operative (a real step rather than an
5793
+ * empty no-op). Each is a declared Flow step field; see `STEP_FIELD_ROLES` for
5794
+ * its lifecycle.
5795
+ */
5796
+ declare const STEP_OPERATIVE_FIELDS: {
5797
+ readonly [K in Flow.StepKind]: readonly StepField<K>[];
5798
+ };
5432
5799
  type StepEntryErrorCode = 'UNKNOWN_KEY' | 'CONFLICT' | 'MISSING_PACKAGE' | 'OBSOLETE_CODE_STRING' | 'INVALID_IMPORT' | 'INVALID_CODE_SHAPE';
5433
5800
  interface StepEntryValidation {
5434
5801
  ok: boolean;
@@ -5484,4 +5851,4 @@ declare const REF_CODE_PREFIX = "$code:";
5484
5851
  */
5485
5852
  declare function scanFlowRefs(value: unknown, into?: Set<string>): Set<string>;
5486
5853
 
5487
- export { type ActivationGrant, type AssembleJourneysOptions, type BatchResponse, type BatchedPosterOptions, type BreakerState, CLOCK_SKEW_MS, cache as Cache, type CacheEnvelope, type CacheResult, type ClickIdEntry, collector as Collector, type CompiledCache, Const, context as Context, type Credential, type Debounced, destination as Destination, type DestroyContext, type DestroyFn, type DroppedCounters, ENV_MARKER_PREFIX, elb as Elb, type EmitFn, type EventOutcome, type ExampleSummary, FatalError, Flow, type FlowConfigResolver, type FlowState, type FlowStateBatch, type FlowStatePhase, type FlowStepType, type GetStore, hint as Hint, hooks as Hooks, type Ingest, type IngestEnvelope, type IngestMeta, InvalidEventError, type Journey, type JourneyAssembly, type JourneyBranch, type JourneyCorrelation, type JourneyEntry, type JourneyGap, type JourneyHop, type JourneyHopStatus, type JourneyPlatform, type JourneyStatus, type JourneyTopology, type JourneyTopologyNode, type JourneyUnattributed, type JsonSchema, Level, lifecycle as Lifecycle, type LifecycleContext, logger as Logger, MAX_SESSION_MS, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, type NodeLikeRequest, OBSERVE_ENV_KEY, OBSERVE_STORAGE_KEY, type Observe, type ObserveCredential, type ObserveServer, type ObserveWeb, type ObserverFn, on as On, type ParsedGrant, type ParsedTraceparent, type PosterFetch, type PosterResponse, type PreviewCrypto, type PreviewFailure, type PreviewKey, type PreviewSubtle, REF_CODE_PREFIX, REF_CONTRACT, REF_ENV, REF_FLOW, REF_SECRET, REF_STORE, REF_VAR_FULL, REF_VAR_INLINE, request as Request, type ResolveContractsOptions, type ResolveOptions, type RespondFn, type RespondOptions, SECRET_MARKER_PREFIX, SESSION_STORAGE_KEY, STEP_OPERATIVE_FIELDS, type ScheduleOptions, type SendDataValue, type SendHeaders, type SendResponse, type ServiceAccount, type SetupFn, simulation as Simulation, source as Source, type State, type StepEntryErrorCode, type StepEntryValidation, type StepKind, type StorageType, store as Store, StoreCodecError, type SwapActivatorConfig, type TelemetryLevel, type TelemetryOptions, type TelemetryOptionsSupplier, transformer as Transformer, trigger as Trigger, URL_WINDOW_MS, type ValidateEvents, type VerifyParams, type VerifyResult, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, applyState, applyUpdate, assembleJourneys, assign, batchResponse, branch, browserSwapActivator, buildCacheContext, buildScopeFromNodeRequest, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileState, createBatchedPoster, createDestination, createEvent, createIngest, createLogger, createMockContext, createMockLogger, createRespond, createTelemetryObserver, debounce, deepMerge, defaultClickIds, deleteByPath, deserializeStoreValue, emitStep, fetchPackage, fetchPackageSchema, filterValues, flattenIncludeSections, formatOut, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getNextSteps, getOS, getOSVersion, getPlatform, getSpanId, getTraceId, getTraceUntil, isArguments, isArray, isBatchBody, isBoolean, isCommand, isDefined, isElementOrDocument, isEnvObserve, isFunction, isNumber, isObject, isPathStepEntry, isPropertyType, isRouteArray, isRouteConfigEntry, isSameType, isSampled, isScope, isStoreValue, isString, mcpError, mcpResult, mergeContractSchemas, mergeMappingRule, mockEnv, normalizeBody, normalizeHeaders, normalizeQuery, observeFromEnv, packageNameToVariable, parseCallPath, parseGrant, parseObserveCredential, parseTraceparent, parseUserAgent, processEventMapping, pushResultToOutcome, readCacheEnvelope, requestToData, requestToParameter, resolveContracts, resolveSetup, resolveTelemetryOptions, scanFlowRefs, serializeStoreValue, setByPath, setTraceUntil, stepId, storeCache, throttle, throwError, toEventList, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, validateStepEntry, verifyActivation, walkPath, wrapCacheEnvelope, wrapCondition, wrapFn, wrapValidate };
5854
+ export { type ActivationGrant, type AssembleJourneysOptions, type BatchResponse, type BatchedPosterOptions, type BreakerState, CLOCK_SKEW_MS, cache as Cache, type CacheEnvelope, type CacheResult, type ChainContinuation, type ChainFrame, type ChainStep, type ClickIdEntry, collector as Collector, type CompiledCache, Const, context as Context, type Credential, type Debounced, destination as Destination, type DestroyContext, type DestroyFn, type DroppedCounters, ENV_MARKER_PREFIX, elb as Elb, type EmitFn, type EventOutcome, type ExampleSummary, FatalError, Flow, type FlowConfigResolver, type FlowState, type FlowStateBatch, type FlowStatePhase, type FlowStepType, type GetStore, hint as Hint, hooks as Hooks, type Ingest, type IngestEnvelope, type IngestMeta, InvalidEventError, type Journey, type JourneyAssembly, type JourneyBranch, type JourneyCorrelation, type JourneyEntry, type JourneyGap, type JourneyHop, type JourneyHopStatus, type JourneyPlatform, type JourneyStatus, type JourneyTopology, type JourneyTopologyNode, type JourneyUnattributed, type JsonSchema, Level, lifecycle as Lifecycle, type LifecycleContext, logger as Logger, MAX_SESSION_MS, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, type NextSteps, type NodeLikeRequest, OBSERVE_ENV_KEY, OBSERVE_STORAGE_KEY, type Observe, type ObserveCredential, type ObserveServer, type ObserveWeb, type ObserverFn, on as On, type ParsedGrant, type ParsedTraceparent, type PosterFetch, type PosterResponse, type PreviewCrypto, type PreviewFailure, type PreviewKey, type PreviewSubtle, REF_CODE_PREFIX, REF_CONTRACT, REF_ENV, REF_FLOW, REF_SECRET, REF_STORE, REF_VAR_FULL, REF_VAR_INLINE, request as Request, type ResolveContractsOptions, type ResolveOptions, type RespondFn, type RespondOptions, type RouteContinuation, type RouteDecision, type RouteGraphNode, type RouteLabel, SECRET_MARKER_PREFIX, SESSION_STORAGE_KEY, STEP_FIELD_ROLES, STEP_OPERATIVE_FIELDS, type ScheduleOptions, type SendDataValue, type SendHeaders, type SendResponse, type ServiceAccount, type SetupFn, simulation as Simulation, source as Source, type State, type StepEntryErrorCode, type StepEntryValidation, type StepField, type StepFieldRole, type StepKind, type StorageType, store as Store, StoreCodecError, type SwapActivatorConfig, type TelemetryLevel, type TelemetryOptions, type TelemetryOptionsSupplier, transformer as Transformer, trigger as Trigger, URL_WINDOW_MS, type ValidateEvents, type VerifyParams, type VerifyResult, walkeros as WalkerOS, type WalkerOSPackage, type WalkerOSPackageInfo, type WalkerOSPackageMeta, advanceChain, anonymizeIP, applyState, applyUpdate, assembleJourneys, assign, batchResponse, branch, browserSwapActivator, buildScopeFromNodeRequest, castToProperty, castValue, checkCache, clone, compileCache, compileMatcher, compileState, createBatchedPoster, createDestination, createEvent, createIngest, createLogger, createMappingRoot, createMockContext, createMockLogger, createRespond, createTelemetryObserver, debounce, deepMerge, defaultClickIds, deleteByPath, deriveSpanId, deserializeStoreValue, emitStep, fetchPackage, fetchPackageSchema, filterValues, flattenIncludeSections, formatOut, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getNextSteps, getOS, getOSVersion, getPlatform, getRouteGraph, getSpanId, getStepFieldRole, getStepRuntimeProps, getTraceId, getTraceUntil, isArguments, isArray, isBatchBody, isBoolean, isChainContinuation, isCommand, isDefined, isElementOrDocument, isEnvObserve, isFunction, isNumber, isObject, isPathStepEntry, isPropertyType, isRouteArray, isRouteConfigEntry, isRouteContinuation, isSameType, isSampled, isScope, isStoreValue, isString, mcpError, mcpResult, mergeContractSchemas, mergeMappingRule, mockEnv, normalizeBody, normalizeHeaders, normalizeQuery, observeFromEnv, packageNameToVariable, parseCallPath, parseGrant, parseObserveCredential, parseTraceparent, parseUserAgent, processEventMapping, pushResultToOutcome, readCacheEnvelope, requestToData, requestToParameter, resolveContracts, resolveSetup, resolveTelemetryOptions, scanFlowRefs, serializeStoreValue, setByPath, setTraceUntil, startChain, stepId, storeCache, throttle, throwError, toEventList, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, validateStepEntry, verifyActivation, walkPath, wrapCacheEnvelope, wrapCondition, wrapFn, wrapValidate };