@walkeros/core 2.1.1 → 2.2.0-next-1773136823705

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.ts CHANGED
@@ -28,7 +28,7 @@ declare function createRespond(sender: (options: RespondOptions) => void): Respo
28
28
  /**
29
29
  * Core collector configuration interface
30
30
  */
31
- interface Config$7 {
31
+ interface Config$8 {
32
32
  /** Whether to run collector automatically */
33
33
  run?: boolean;
34
34
  /** Version for event tagging */
@@ -38,12 +38,12 @@ interface Config$7 {
38
38
  /** Static session data even on a new run */
39
39
  sessionStatic: Partial<SessionData>;
40
40
  /** Logger configuration */
41
- logger?: Config$4;
41
+ logger?: Config$5;
42
42
  }
43
43
  /**
44
44
  * Initialization configuration that extends Config with initial state
45
45
  */
46
- interface InitConfig extends Partial<Config$7> {
46
+ interface InitConfig extends Partial<Config$8> {
47
47
  /** Initial consent state */
48
48
  consent?: Consent;
49
49
  /** Initial user data */
@@ -56,6 +56,8 @@ interface InitConfig extends Partial<Config$7> {
56
56
  destinations?: InitDestinations;
57
57
  /** Transformer configurations */
58
58
  transformers?: InitTransformers;
59
+ /** Store configurations */
60
+ stores?: InitStores;
59
61
  /** Initial custom properties */
60
62
  custom?: Properties;
61
63
  }
@@ -91,13 +93,16 @@ interface DestinationStatus {
91
93
  duration: number;
92
94
  }
93
95
  interface Sources {
94
- [id: string]: Instance;
96
+ [id: string]: Instance$1;
95
97
  }
96
98
  interface Destinations$1 {
97
- [id: string]: Instance$3;
99
+ [id: string]: Instance$4;
98
100
  }
99
101
  interface Transformers$1 {
100
- [id: string]: Instance$1;
102
+ [id: string]: Instance$2;
103
+ }
104
+ interface Stores$1 {
105
+ [id: string]: Instance;
101
106
  }
102
107
  type CommandType = 'action' | 'config' | 'consent' | 'context' | 'destination' | 'elb' | 'globals' | 'hook' | 'init' | 'link' | 'run' | 'user' | 'walker' | string;
103
108
  /**
@@ -108,7 +113,7 @@ interface PushOptions {
108
113
  id?: string;
109
114
  ingest?: unknown;
110
115
  respond?: RespondFn;
111
- mapping?: Config$3;
116
+ mapping?: Config$4;
112
117
  preChain?: string[];
113
118
  }
114
119
  /**
@@ -121,11 +126,11 @@ interface PushFn$1 {
121
126
  * Command function signature - handles walker commands only
122
127
  */
123
128
  interface CommandFn {
124
- (command: 'config', config: Partial<Config$7>): Promise<PushResult>;
129
+ (command: 'config', config: Partial<Config$8>): Promise<PushResult>;
125
130
  (command: 'consent', consent: Consent): Promise<PushResult>;
126
- <T extends Types$3>(command: 'destination', destination: Init$2<T> | Instance$3<T>, config?: Config$6<T>): Promise<PushResult>;
131
+ <T extends Types$4>(command: 'destination', destination: Init$3<T> | Instance$4<T>, config?: Config$7<T>): Promise<PushResult>;
127
132
  <K extends keyof Functions>(command: 'hook', name: K, hookFn: Functions[K]): Promise<PushResult>;
128
- (command: 'on', type: Types$2, rules: SingleOrArray<Options>): Promise<PushResult>;
133
+ (command: 'on', type: Types$3, rules: SingleOrArray<Options>): Promise<PushResult>;
129
134
  (command: 'user', user: User): Promise<PushResult>;
130
135
  (command: 'run', runState?: {
131
136
  consent?: Consent;
@@ -135,21 +140,22 @@ interface CommandFn {
135
140
  }): Promise<PushResult>;
136
141
  (command: string, data?: unknown, options?: unknown): Promise<PushResult>;
137
142
  }
138
- interface Instance$4 {
143
+ interface Instance$5 {
139
144
  push: PushFn$1;
140
145
  command: CommandFn;
141
146
  allowed: boolean;
142
- config: Config$7;
147
+ config: Config$8;
143
148
  consent: Consent;
144
149
  count: number;
145
150
  custom: Properties;
146
151
  sources: Sources;
147
152
  destinations: Destinations$1;
148
153
  transformers: Transformers$1;
154
+ stores: Stores$1;
149
155
  globals: Properties;
150
156
  group: string;
151
157
  hooks: Functions;
152
- logger: Instance$2;
158
+ logger: Instance$3;
153
159
  on: OnConfig;
154
160
  queue: Events;
155
161
  round: number;
@@ -174,7 +180,7 @@ type collector_SourceStatus = SourceStatus;
174
180
  type collector_Sources = Sources;
175
181
  type collector_Status = Status;
176
182
  declare namespace collector {
177
- export type { collector_CommandFn as CommandFn, collector_CommandType as CommandType, Config$7 as Config, collector_DestinationStatus as DestinationStatus, Destinations$1 as Destinations, collector_InitConfig as InitConfig, Instance$4 as Instance, PushFn$1 as PushFn, collector_PushOptions as PushOptions, collector_SessionData as SessionData, collector_SourceStatus as SourceStatus, collector_Sources as Sources, collector_Status as Status, Transformers$1 as Transformers };
183
+ export type { collector_CommandFn as CommandFn, collector_CommandType as CommandType, Config$8 as Config, collector_DestinationStatus as DestinationStatus, Destinations$1 as Destinations, collector_InitConfig as InitConfig, Instance$5 as Instance, PushFn$1 as PushFn, collector_PushOptions as PushOptions, collector_SessionData as SessionData, collector_SourceStatus as SourceStatus, collector_Sources as Sources, collector_Status as Status, Stores$1 as Stores, Transformers$1 as Transformers };
178
184
  }
179
185
 
180
186
  /**
@@ -182,8 +188,8 @@ declare namespace collector {
182
188
  * Sources, Transformers, and Destinations extend this.
183
189
  */
184
190
  interface Base<C = unknown, E = unknown> {
185
- collector: Instance$4;
186
- logger: Instance$2;
191
+ collector: Instance$5;
192
+ logger: Instance$3;
187
193
  config: C;
188
194
  env: E;
189
195
  }
@@ -203,7 +209,7 @@ interface Globals {
203
209
  [name: string]: Global;
204
210
  }
205
211
  interface Contexts {
206
- [name: string]: Context$5;
212
+ [name: string]: Context$6;
207
213
  }
208
214
  interface Entities$1 {
209
215
  [name: string]: Entity$1;
@@ -213,7 +219,7 @@ interface Properties$1 {
213
219
  }
214
220
  interface Global extends Property$1 {
215
221
  }
216
- interface Context$5 extends Property$1 {
222
+ interface Context$6 extends Property$1 {
217
223
  }
218
224
  interface Entity$1 {
219
225
  data: Properties$1;
@@ -242,7 +248,7 @@ type data_Globals = Globals;
242
248
  type data_PropertyValues = PropertyValues;
243
249
  type data_Trigger = Trigger;
244
250
  declare namespace data {
245
- export type { data_Action as Action, data_Actions as Actions, Context$5 as Context, data_Contexts as Contexts, Contract$1 as Contract, Entities$1 as Entities, Entity$1 as Entity, data_Global as Global, data_Globals as Globals, Properties$1 as Properties, Property$1 as Property, PropertyType$1 as PropertyType, data_PropertyValues as PropertyValues, data_Trigger as Trigger };
251
+ export type { data_Action as Action, data_Actions as Actions, Context$6 as Context, data_Contexts as Contexts, Contract$1 as Contract, Entities$1 as Entities, Entity$1 as Entity, data_Global as Global, data_Globals as Globals, Properties$1 as Properties, Property$1 as Property, PropertyType$1 as PropertyType, data_PropertyValues as PropertyValues, data_Trigger as Trigger };
246
252
  }
247
253
 
248
254
  /**
@@ -260,7 +266,7 @@ interface DestroyContext<C = unknown, E = unknown> {
260
266
  /** Runtime environment/dependencies (DB clients, auth clients, etc.). */
261
267
  env: E;
262
268
  /** Scoped logger for this step instance. */
263
- logger: Instance$2;
269
+ logger: Instance$3;
264
270
  }
265
271
  /**
266
272
  * Destroy function signature for step lifecycle cleanup.
@@ -283,7 +289,7 @@ declare namespace lifecycle {
283
289
  * their runtime environment requirements. Platform-specific extensions
284
290
  * should extend this interface.
285
291
  */
286
- interface BaseEnv$2 {
292
+ interface BaseEnv$3 {
287
293
  /**
288
294
  * Generic global properties that destinations may require
289
295
  * Platform-specific implementations can extend this interface
@@ -294,7 +300,7 @@ interface BaseEnv$2 {
294
300
  * Type bundle for destination generics.
295
301
  * Groups Settings, InitSettings, Mapping, and Env into a single type parameter.
296
302
  */
297
- interface Types$3<S = unknown, M = unknown, E = BaseEnv$2, I = S> {
303
+ interface Types$4<S = unknown, M = unknown, E = BaseEnv$3, I = S> {
298
304
  settings: S;
299
305
  initSettings: I;
300
306
  mapping: M;
@@ -303,7 +309,7 @@ interface Types$3<S = unknown, M = unknown, E = BaseEnv$2, I = S> {
303
309
  /**
304
310
  * Generic constraint for Types - ensures T has required properties for indexed access
305
311
  */
306
- type TypesGeneric$2 = {
312
+ type TypesGeneric$3 = {
307
313
  settings: any;
308
314
  initSettings: any;
309
315
  mapping: any;
@@ -312,40 +318,40 @@ type TypesGeneric$2 = {
312
318
  /**
313
319
  * Type extractors for consistent usage with Types bundle
314
320
  */
315
- type Settings$2<T extends TypesGeneric$2 = Types$3> = T['settings'];
316
- type InitSettings$2<T extends TypesGeneric$2 = Types$3> = T['initSettings'];
317
- type Mapping$1<T extends TypesGeneric$2 = Types$3> = T['mapping'];
318
- type Env$2<T extends TypesGeneric$2 = Types$3> = T['env'];
321
+ type Settings$4<T extends TypesGeneric$3 = Types$4> = T['settings'];
322
+ type InitSettings$3<T extends TypesGeneric$3 = Types$4> = T['initSettings'];
323
+ type Mapping$1<T extends TypesGeneric$3 = Types$4> = T['mapping'];
324
+ type Env$3<T extends TypesGeneric$3 = Types$4> = T['env'];
319
325
  /**
320
326
  * Inference helper: Extract Types from Instance
321
327
  */
322
- type TypesOf$2<I> = I extends Instance$3<infer T> ? T : never;
323
- interface Instance$3<T extends TypesGeneric$2 = Types$3> {
324
- config: Config$6<T>;
328
+ type TypesOf$3<I> = I extends Instance$4<infer T> ? T : never;
329
+ interface Instance$4<T extends TypesGeneric$3 = Types$4> {
330
+ config: Config$7<T>;
325
331
  queuePush?: Events;
326
332
  queueOn?: Array<{
327
- type: Types$2;
333
+ type: Types$3;
328
334
  data?: unknown;
329
335
  }>;
330
336
  dlq?: DLQ;
331
337
  batches?: BatchRegistry<Mapping$1<T>>;
332
338
  type?: string;
333
- env?: Env$2<T>;
334
- init?: InitFn$1<T>;
339
+ env?: Env$3<T>;
340
+ init?: InitFn$2<T>;
335
341
  push: PushFn<T>;
336
342
  pushBatch?: PushBatchFn<T>;
337
343
  on?: OnFn;
338
- destroy?: DestroyFn<Config$6<T>, Env$2<T>>;
344
+ destroy?: DestroyFn<Config$7<T>, Env$3<T>>;
339
345
  }
340
- interface Config$6<T extends TypesGeneric$2 = Types$3> {
346
+ interface Config$7<T extends TypesGeneric$3 = Types$4> {
341
347
  /** Required consent states to push events; queues events when not granted. */
342
348
  consent?: Consent;
343
349
  /** Implementation-specific configuration passed to the init function. */
344
- settings?: InitSettings$2<T>;
350
+ settings?: InitSettings$3<T>;
345
351
  /** Global data transformation applied to all events; result passed as context.data to push. */
346
352
  data?: Value | Values;
347
353
  /** Runtime dependencies merged from code and config env; extensible per destination. */
348
- env?: Env$2<T>;
354
+ env?: Env$3<T>;
349
355
  /** Destination identifier; auto-generated if not provided. */
350
356
  id?: string;
351
357
  /** Whether the destination has been initialized; prevents re-initialization. */
@@ -353,7 +359,7 @@ interface Config$6<T extends TypesGeneric$2 = Types$3> {
353
359
  /** Whether to load external scripts (e.g., gtag.js); destination-specific behavior. */
354
360
  loadScript?: boolean;
355
361
  /** Logger configuration (level, handler) to override the collector's defaults. */
356
- logger?: Config$4;
362
+ logger?: Config$5;
357
363
  /** Entity-action rules to filter, rename, transform, and batch events for this destination. */
358
364
  mapping?: Rules<Rule<Mapping$1<T>>>;
359
365
  /** Pre-processing rules applied to all events before mapping; modifies events in-place. */
@@ -365,42 +371,42 @@ interface Config$6<T extends TypesGeneric$2 = Types$3> {
365
371
  /** Transformer chain to run after collector processing but before this destination. */
366
372
  before?: string | string[];
367
373
  }
368
- type PartialConfig$1<T extends TypesGeneric$2 = Types$3> = Config$6<Types$3<Partial<Settings$2<T>> | Settings$2<T>, Partial<Mapping$1<T>> | Mapping$1<T>, Env$2<T>>>;
374
+ type PartialConfig$1<T extends TypesGeneric$3 = Types$4> = Config$7<Types$4<Partial<Settings$4<T>> | Settings$4<T>, Partial<Mapping$1<T>> | Mapping$1<T>, Env$3<T>>>;
369
375
  interface Policy$1 {
370
376
  [key: string]: Value;
371
377
  }
372
- type Code<T extends TypesGeneric$2 = Types$3> = Instance$3<T>;
373
- type Init$2<T extends TypesGeneric$2 = Types$3> = {
378
+ type Code<T extends TypesGeneric$3 = Types$4> = Instance$4<T>;
379
+ type Init$3<T extends TypesGeneric$3 = Types$4> = {
374
380
  code: Code<T>;
375
- config?: Partial<Config$6<T>>;
376
- env?: Partial<Env$2<T>>;
381
+ config?: Partial<Config$7<T>>;
382
+ env?: Partial<Env$3<T>>;
377
383
  before?: string | string[];
378
384
  };
379
385
  interface InitDestinations {
380
- [key: string]: Init$2<any>;
386
+ [key: string]: Init$3<any>;
381
387
  }
382
388
  interface Destinations {
383
- [key: string]: Instance$3;
389
+ [key: string]: Instance$4;
384
390
  }
385
391
  /**
386
392
  * Context provided to destination functions.
387
393
  * Extends base context with destination-specific properties.
388
394
  */
389
- interface Context$4<T extends TypesGeneric$2 = Types$3> extends Base<Config$6<T>, Env$2<T>> {
395
+ interface Context$5<T extends TypesGeneric$3 = Types$4> extends Base<Config$7<T>, Env$3<T>> {
390
396
  id: string;
391
397
  data?: Data$1;
392
398
  }
393
- interface PushContext<T extends TypesGeneric$2 = Types$3> extends Context$4<T> {
399
+ interface PushContext<T extends TypesGeneric$3 = Types$4> extends Context$5<T> {
394
400
  ingest?: unknown;
395
401
  rule?: Rule<Mapping$1<T>>;
396
402
  }
397
- interface PushBatchContext<T extends TypesGeneric$2 = Types$3> extends Context$4<T> {
403
+ interface PushBatchContext<T extends TypesGeneric$3 = Types$4> extends Context$5<T> {
398
404
  ingest?: unknown;
399
405
  rule?: Rule<Mapping$1<T>>;
400
406
  }
401
- type InitFn$1<T extends TypesGeneric$2 = Types$3> = (context: Context$4<T>) => PromiseOrValue<void | false | Config$6<T>>;
402
- type PushFn<T extends TypesGeneric$2 = Types$3> = (event: Event, context: PushContext<T>) => PromiseOrValue<void | unknown>;
403
- type PushBatchFn<T extends TypesGeneric$2 = Types$3> = (batch: Batch<Mapping$1<T>>, context: PushBatchContext<T>) => void;
407
+ type InitFn$2<T extends TypesGeneric$3 = Types$4> = (context: Context$5<T>) => PromiseOrValue<void | false | Config$7<T>>;
408
+ type PushFn<T extends TypesGeneric$3 = Types$4> = (event: Event, context: PushContext<T>) => PromiseOrValue<void | unknown>;
409
+ type PushBatchFn<T extends TypesGeneric$3 = Types$4> = (batch: Batch<Mapping$1<T>>, context: PushBatchContext<T>) => void;
404
410
  type PushEvent<Mapping = unknown> = {
405
411
  event: Event;
406
412
  mapping?: Rule<Mapping>;
@@ -432,19 +438,19 @@ type DLQ = Array<[Event, unknown]>;
432
438
 
433
439
  type destination_Batch<Mapping> = Batch<Mapping>;
434
440
  type destination_BatchRegistry<Mapping> = BatchRegistry<Mapping>;
435
- type destination_Code<T extends TypesGeneric$2 = Types$3> = Code<T>;
441
+ type destination_Code<T extends TypesGeneric$3 = Types$4> = Code<T>;
436
442
  type destination_DLQ = DLQ;
437
443
  type destination_Destinations = Destinations;
438
444
  type destination_InitDestinations = InitDestinations;
439
- type destination_PushBatchContext<T extends TypesGeneric$2 = Types$3> = PushBatchContext<T>;
440
- type destination_PushBatchFn<T extends TypesGeneric$2 = Types$3> = PushBatchFn<T>;
441
- type destination_PushContext<T extends TypesGeneric$2 = Types$3> = PushContext<T>;
445
+ type destination_PushBatchContext<T extends TypesGeneric$3 = Types$4> = PushBatchContext<T>;
446
+ type destination_PushBatchFn<T extends TypesGeneric$3 = Types$4> = PushBatchFn<T>;
447
+ type destination_PushContext<T extends TypesGeneric$3 = Types$4> = PushContext<T>;
442
448
  type destination_PushEvent<Mapping = unknown> = PushEvent<Mapping>;
443
449
  type destination_PushEvents<Mapping = unknown> = PushEvents<Mapping>;
444
- type destination_PushFn<T extends TypesGeneric$2 = Types$3> = PushFn<T>;
450
+ type destination_PushFn<T extends TypesGeneric$3 = Types$4> = PushFn<T>;
445
451
  type destination_Ref = Ref;
446
452
  declare namespace destination {
447
- export type { BaseEnv$2 as BaseEnv, destination_Batch as Batch, destination_BatchRegistry as BatchRegistry, destination_Code as Code, Config$6 as Config, Context$4 as Context, destination_DLQ as DLQ, Data$1 as Data, destination_Destinations as Destinations, Env$2 as Env, Init$2 as Init, destination_InitDestinations as InitDestinations, InitFn$1 as InitFn, InitSettings$2 as InitSettings, Instance$3 as Instance, Mapping$1 as Mapping, PartialConfig$1 as PartialConfig, Policy$1 as Policy, Push$1 as Push, destination_PushBatchContext as PushBatchContext, destination_PushBatchFn as PushBatchFn, destination_PushContext as PushContext, destination_PushEvent as PushEvent, destination_PushEvents as PushEvents, destination_PushFn as PushFn, destination_Ref as Ref, Settings$2 as Settings, Types$3 as Types, TypesGeneric$2 as TypesGeneric, TypesOf$2 as TypesOf };
453
+ export type { BaseEnv$3 as BaseEnv, destination_Batch as Batch, destination_BatchRegistry as BatchRegistry, destination_Code as Code, Config$7 as Config, Context$5 as Context, destination_DLQ as DLQ, Data$1 as Data, destination_Destinations as Destinations, Env$3 as Env, Init$3 as Init, destination_InitDestinations as InitDestinations, InitFn$2 as InitFn, InitSettings$3 as InitSettings, Instance$4 as Instance, Mapping$1 as Mapping, PartialConfig$1 as PartialConfig, Policy$1 as Policy, Push$1 as Push, destination_PushBatchContext as PushBatchContext, destination_PushBatchFn as PushBatchFn, destination_PushContext as PushContext, destination_PushEvent as PushEvent, destination_PushEvents as PushEvents, destination_PushFn as PushFn, destination_Ref as Ref, Settings$4 as Settings, Types$4 as Types, TypesGeneric$3 as TypesGeneric, TypesOf$3 as TypesOf };
448
454
  }
449
455
 
450
456
  interface EventFn<R = Promise<PushResult>> {
@@ -457,9 +463,9 @@ interface Fn$2<R = Promise<PushResult>, Config = unknown> extends EventFn<R>, Wa
457
463
  interface WalkerCommands<R = Promise<PushResult>, Config = unknown> {
458
464
  (event: 'walker config', config: Partial<Config>): R;
459
465
  (event: 'walker consent', consent: Consent): R;
460
- <T extends Types$3>(event: 'walker destination', destination: Init$2<T> | Instance$3<T>, config?: Config$6<T>): R;
466
+ <T extends Types$4>(event: 'walker destination', destination: Init$3<T> | Instance$4<T>, config?: Config$7<T>): R;
461
467
  <K extends keyof Functions>(event: 'walker hook', name: K, hookFn: Functions[K]): R;
462
- (event: 'walker on', type: Types$2, rules: SingleOrArray<Options>): R;
468
+ (event: 'walker on', type: Types$3, rules: SingleOrArray<Options>): R;
463
469
  (event: 'walker user', user: User): R;
464
470
  (event: 'walker run', runState: {
465
471
  consent?: Consent;
@@ -553,12 +559,12 @@ interface Contract {
553
559
  type Primitive = string | number | boolean;
554
560
  /**
555
561
  * Variables record type for interpolation.
556
- * Used at Setup, Config, Source, and Destination levels.
562
+ * Used at Config, Settings, Source, and Destination levels.
557
563
  */
558
564
  type Variables = Record<string, Primitive>;
559
565
  /**
560
566
  * Definitions record type for reusable configurations.
561
- * Used at Setup, Config, Source, and Destination levels.
567
+ * Used at Config, Settings, Source, and Destination levels.
562
568
  */
563
569
  type Definitions = Record<string, unknown>;
564
570
  /**
@@ -627,7 +633,7 @@ interface Server {
627
633
  * }
628
634
  * ```
629
635
  */
630
- interface Setup {
636
+ interface Config$6 {
631
637
  /**
632
638
  * Configuration schema version.
633
639
  */
@@ -662,7 +668,7 @@ interface Setup {
662
668
  contract?: Contract;
663
669
  /**
664
670
  * Shared variables for interpolation.
665
- * Resolution: destination/source > Config > Setup level
671
+ * Resolution: destination/source > Settings > Config level
666
672
  * Syntax: $var.name
667
673
  */
668
674
  variables?: Variables;
@@ -675,7 +681,7 @@ interface Setup {
675
681
  * Named flow configurations.
676
682
  * If only one flow exists, it's auto-selected.
677
683
  */
678
- flows: Record<string, Config$5>;
684
+ flows: Record<string, Settings$3>;
679
685
  }
680
686
  /**
681
687
  * Single flow configuration.
@@ -685,9 +691,9 @@ interface Setup {
685
691
  * Platform is determined by presence of `web` or `server` key.
686
692
  * Exactly one must be present.
687
693
  *
688
- * Variables/definitions cascade: source/destination > config > setup
694
+ * Variables/definitions cascade: source/destination > settings > config
689
695
  */
690
- interface Config$5 {
696
+ interface Settings$3 {
691
697
  /**
692
698
  * Web platform configuration.
693
699
  * Presence indicates web platform (browser-based tracking).
@@ -702,9 +708,21 @@ interface Config$5 {
702
708
  server?: Server;
703
709
  /**
704
710
  * Data contract definition for this flow.
705
- * Merges on top of Setup-level contract (additive).
711
+ * Merges on top of Config-level contract (additive).
706
712
  */
707
713
  contract?: Contract;
714
+ /**
715
+ * Store configurations (key-value storage).
716
+ *
717
+ * @remarks
718
+ * Stores provide key-value storage consumed by sources, transformers,
719
+ * and destinations via env injection. Referenced using $store:storeId
720
+ * prefix in env values.
721
+ *
722
+ * Key = unique store identifier (arbitrary)
723
+ * Value = store reference with package and config
724
+ */
725
+ stores?: Record<string, StoreReference>;
708
726
  /**
709
727
  * Source configurations (data capture).
710
728
  *
@@ -832,12 +850,12 @@ interface Config$5 {
832
850
  packages?: Packages;
833
851
  /**
834
852
  * Flow-level variables.
835
- * Override Setup.variables, overridden by source/destination variables.
853
+ * Override Config.variables, overridden by source/destination variables.
836
854
  */
837
855
  variables?: Variables;
838
856
  /**
839
857
  * Flow-level definitions.
840
- * Extend Setup.definitions, overridden by source/destination definitions.
858
+ * Extend Config.definitions, overridden by source/destination definitions.
841
859
  */
842
860
  definitions?: Definitions;
843
861
  }
@@ -889,7 +907,7 @@ interface SourceReference {
889
907
  * Resolved import variable name or built-in code source.
890
908
  *
891
909
  * @remarks
892
- * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
910
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),
893
911
  * or provided explicitly for advanced use cases.
894
912
  * - InlineCode: Object with type, push, and optional init for inline code definition.
895
913
  *
@@ -993,7 +1011,7 @@ interface TransformerReference {
993
1011
  * Resolved import variable name or built-in code transformer.
994
1012
  *
995
1013
  * @remarks
996
- * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
1014
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),
997
1015
  * or provided explicitly for advanced use cases.
998
1016
  * - InlineCode: Object with type, push, and optional init for inline code definition.
999
1017
  *
@@ -1051,6 +1069,47 @@ interface TransformerReference {
1051
1069
  */
1052
1070
  examples?: StepExamples;
1053
1071
  }
1072
+ /**
1073
+ * Store reference with inline package syntax.
1074
+ *
1075
+ * @remarks
1076
+ * References a store package and provides configuration.
1077
+ * Stores provide key-value storage consumed by other components via env.
1078
+ * Unlike sources/transformers/destinations, stores have no chain properties
1079
+ * (no `next` or `before`) — they are passive infrastructure.
1080
+ */
1081
+ interface StoreReference {
1082
+ /**
1083
+ * Package specifier with optional version.
1084
+ * Optional when `code` is provided for inline code.
1085
+ */
1086
+ package?: string;
1087
+ /**
1088
+ * Resolved import variable name or inline code definition.
1089
+ */
1090
+ code?: string | InlineCode;
1091
+ /**
1092
+ * Store-specific configuration.
1093
+ */
1094
+ config?: unknown;
1095
+ /**
1096
+ * Store environment configuration.
1097
+ */
1098
+ env?: unknown;
1099
+ /**
1100
+ * Store-level variables (highest priority in cascade).
1101
+ */
1102
+ variables?: Variables;
1103
+ /**
1104
+ * Store-level definitions (highest priority in cascade).
1105
+ */
1106
+ definitions?: Definitions;
1107
+ /**
1108
+ * Named examples for testing and documentation.
1109
+ * Stripped during flow resolution.
1110
+ */
1111
+ examples?: StepExamples;
1112
+ }
1054
1113
  /**
1055
1114
  * Destination reference with inline package syntax.
1056
1115
  *
@@ -1074,7 +1133,7 @@ interface DestinationReference {
1074
1133
  * Resolved import variable name or built-in code destination.
1075
1134
  *
1076
1135
  * @remarks
1077
- * - String: Auto-resolved from packages[package].imports[0] during getFlowConfig(),
1136
+ * - String: Auto-resolved from packages[package].imports[0] during getFlowSettings(),
1078
1137
  * or provided explicitly for advanced use cases.
1079
1138
  * - InlineCode: Object with type, push, and optional init for inline code definition.
1080
1139
  *
@@ -1165,15 +1224,15 @@ type flow_InlineCode = InlineCode;
1165
1224
  type flow_Packages = Packages;
1166
1225
  type flow_Primitive = Primitive;
1167
1226
  type flow_Server = Server;
1168
- type flow_Setup = Setup;
1169
1227
  type flow_SourceReference = SourceReference;
1170
1228
  type flow_StepExample = StepExample;
1171
1229
  type flow_StepExamples = StepExamples;
1230
+ type flow_StoreReference = StoreReference;
1172
1231
  type flow_TransformerReference = TransformerReference;
1173
1232
  type flow_Variables = Variables;
1174
1233
  type flow_Web = Web;
1175
1234
  declare namespace flow {
1176
- export type { Config$5 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, flow_Setup as Setup, flow_SourceReference as SourceReference, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1235
+ export type { Config$6 as Config, flow_Contract as Contract, flow_ContractActions as ContractActions, flow_ContractSchema as ContractSchema, flow_Definitions as Definitions, flow_DestinationReference as DestinationReference, flow_InlineCode as InlineCode, flow_Packages as Packages, flow_Primitive as Primitive, flow_Server as Server, Settings$3 as Settings, flow_SourceReference as SourceReference, flow_StepExample as StepExample, flow_StepExamples as StepExamples, flow_StoreReference as StoreReference, flow_TransformerReference as TransformerReference, flow_Variables as Variables, flow_Web as Web };
1177
1236
  }
1178
1237
 
1179
1238
  type AnyFunction$1<P extends unknown[] = never[], R = unknown> = (...args: P) => R;
@@ -1241,7 +1300,7 @@ type Handler = (level: Level, message: string, context: LogContext, scope: strin
1241
1300
  * Logger instance with scoping support
1242
1301
  * All logs automatically include trace path from scoping
1243
1302
  */
1244
- interface Instance$2 {
1303
+ interface Instance$3 {
1245
1304
  /**
1246
1305
  * Log an error message (always visible unless silenced)
1247
1306
  */
@@ -1272,12 +1331,12 @@ interface Instance$2 {
1272
1331
  * @param name - Scope name (e.g., destination type, destination key)
1273
1332
  * @returns A new logger instance with the scope applied
1274
1333
  */
1275
- scope: (name: string) => Instance$2;
1334
+ scope: (name: string) => Instance$3;
1276
1335
  }
1277
1336
  /**
1278
1337
  * Logger configuration options
1279
1338
  */
1280
- interface Config$4 {
1339
+ interface Config$5 {
1281
1340
  /**
1282
1341
  * Minimum log level to display
1283
1342
  * @default Level.ERROR
@@ -1303,7 +1362,7 @@ interface InternalConfig {
1303
1362
  /**
1304
1363
  * Logger factory function type
1305
1364
  */
1306
- type Factory = (config?: Config$4) => Instance$2;
1365
+ type Factory = (config?: Config$5) => Instance$3;
1307
1366
 
1308
1367
  type logger_DefaultHandler = DefaultHandler;
1309
1368
  type logger_ErrorContext = ErrorContext;
@@ -1316,14 +1375,14 @@ type logger_LogContext = LogContext;
1316
1375
  type logger_LogFn = LogFn;
1317
1376
  type logger_ThrowFn = ThrowFn;
1318
1377
  declare namespace logger {
1319
- export { type Config$4 as Config, type logger_DefaultHandler as DefaultHandler, type logger_ErrorContext as ErrorContext, type logger_Factory as Factory, type logger_Handler as Handler, type Instance$2 as Instance, type logger_InternalConfig as InternalConfig, logger_Level as Level, type logger_LogContext as LogContext, type logger_LogFn as LogFn, type logger_ThrowFn as ThrowFn };
1378
+ export { type Config$5 as Config, type logger_DefaultHandler as DefaultHandler, type logger_ErrorContext as ErrorContext, type logger_Factory as Factory, type logger_Handler as Handler, type Instance$3 as Instance, type logger_InternalConfig as InternalConfig, logger_Level as Level, type logger_LogContext as LogContext, type logger_LogFn as LogFn, type logger_ThrowFn as ThrowFn };
1320
1379
  }
1321
1380
 
1322
1381
  /**
1323
1382
  * Shared mapping configuration interface.
1324
1383
  * Used by both Source.Config and Destination.Config.
1325
1384
  */
1326
- interface Config$3<T = unknown> {
1385
+ interface Config$4<T = unknown> {
1327
1386
  consent?: Consent;
1328
1387
  data?: Value | Values;
1329
1388
  mapping?: Rules<Rule<T>>;
@@ -1337,7 +1396,7 @@ interface Rules<T = Rule> {
1337
1396
  }
1338
1397
  interface Rule<Settings = unknown> {
1339
1398
  batch?: number;
1340
- batchFn?: (destination: Instance$3, collector: Instance$4) => void;
1399
+ batchFn?: (destination: Instance$4, collector: Instance$5) => void;
1341
1400
  batched?: Batch<Settings>;
1342
1401
  condition?: Condition;
1343
1402
  consent?: Consent;
@@ -1366,7 +1425,7 @@ interface ValueConfig {
1366
1425
  validate?: Validate;
1367
1426
  value?: PropertyType;
1368
1427
  }
1369
- type Condition = (value: DeepPartialEvent | unknown, mapping?: Value, collector?: Instance$4) => PromiseOrValue<boolean>;
1428
+ type Condition = (value: DeepPartialEvent | unknown, mapping?: Value, collector?: Instance$5) => PromiseOrValue<boolean>;
1370
1429
  type Fn$1 = (value: DeepPartialEvent | unknown, mapping: Value, options: Options$1) => PromiseOrValue<Property | unknown>;
1371
1430
  type Loop = [Value, Value];
1372
1431
  type Map = {
@@ -1374,7 +1433,7 @@ type Map = {
1374
1433
  };
1375
1434
  interface Options$1 {
1376
1435
  consent?: Consent;
1377
- collector?: Instance$4;
1436
+ collector?: Instance$5;
1378
1437
  props?: unknown;
1379
1438
  }
1380
1439
  type Validate = (value?: unknown) => PromiseOrValue<boolean>;
@@ -1392,10 +1451,10 @@ type mapping_ValueConfig = ValueConfig;
1392
1451
  type mapping_ValueType = ValueType;
1393
1452
  type mapping_Values = Values;
1394
1453
  declare namespace mapping {
1395
- export type { mapping_Condition as Condition, Config$3 as Config, mapping_Data as Data, Fn$1 as Fn, mapping_Loop as Loop, mapping_Map as Map, Options$1 as Options, mapping_Policy as Policy, Result$2 as Result, mapping_Rule as Rule, mapping_Rules as Rules, mapping_Validate as Validate, mapping_Value as Value, mapping_ValueConfig as ValueConfig, mapping_ValueType as ValueType, mapping_Values as Values };
1454
+ export type { mapping_Condition as Condition, Config$4 as Config, mapping_Data as Data, Fn$1 as Fn, mapping_Loop as Loop, mapping_Map as Map, Options$1 as Options, mapping_Policy as Policy, Result$2 as Result, mapping_Rule as Rule, mapping_Rules as Rules, mapping_Validate as Validate, mapping_Value as Value, mapping_ValueConfig as ValueConfig, mapping_ValueType as ValueType, mapping_Values as Values };
1396
1455
  }
1397
1456
 
1398
- type Config$2 = {
1457
+ type Config$3 = {
1399
1458
  config?: Array<GenericConfig>;
1400
1459
  consent?: Array<ConsentConfig>;
1401
1460
  custom?: Array<GenericConfig>;
@@ -1405,9 +1464,9 @@ type Config$2 = {
1405
1464
  session?: Array<SessionConfig>;
1406
1465
  user?: Array<UserConfig>;
1407
1466
  };
1408
- type Types$2 = keyof Config$2 | (string & {});
1467
+ type Types$3 = keyof Config$3 | (string & {});
1409
1468
  interface EventContextMap {
1410
- config: Partial<Config$7>;
1469
+ config: Partial<Config$8>;
1411
1470
  consent: Consent;
1412
1471
  custom: Properties;
1413
1472
  globals: Properties;
@@ -1418,7 +1477,7 @@ interface EventContextMap {
1418
1477
  }
1419
1478
  type EventContext<T extends keyof EventContextMap> = EventContextMap[T];
1420
1479
  type AnyEventContext = EventContextMap[keyof EventContextMap];
1421
- interface Context$3 {
1480
+ interface Context$4 {
1422
1481
  consent?: Consent;
1423
1482
  session?: unknown;
1424
1483
  }
@@ -1426,17 +1485,17 @@ type Options = ConsentConfig | GenericConfig | ReadyConfig | RunConfig | Session
1426
1485
  interface ConsentConfig {
1427
1486
  [key: string]: ConsentFn;
1428
1487
  }
1429
- type ConsentFn = (collector: Instance$4, consent: Consent) => void;
1488
+ type ConsentFn = (collector: Instance$5, consent: Consent) => void;
1430
1489
  type GenericConfig = GenericFn;
1431
- type GenericFn = (collector: Instance$4, data: unknown) => void;
1490
+ type GenericFn = (collector: Instance$5, data: unknown) => void;
1432
1491
  type ReadyConfig = ReadyFn;
1433
- type ReadyFn = (collector: Instance$4) => void;
1492
+ type ReadyFn = (collector: Instance$5) => void;
1434
1493
  type RunConfig = RunFn;
1435
- type RunFn = (collector: Instance$4) => void;
1494
+ type RunFn = (collector: Instance$5) => void;
1436
1495
  type SessionConfig = SessionFn;
1437
- type SessionFn = (collector: Instance$4, session?: unknown) => void;
1496
+ type SessionFn = (collector: Instance$5, session?: unknown) => void;
1438
1497
  type UserConfig = UserFn;
1439
- type UserFn = (collector: Instance$4, user: User) => void;
1498
+ type UserFn = (collector: Instance$5, user: User) => void;
1440
1499
  interface OnConfig {
1441
1500
  config?: GenericConfig[];
1442
1501
  consent?: ConsentConfig[];
@@ -1448,8 +1507,8 @@ interface OnConfig {
1448
1507
  user?: UserConfig[];
1449
1508
  [key: string]: ConsentConfig[] | GenericConfig[] | ReadyConfig[] | RunConfig[] | SessionConfig[] | UserConfig[] | undefined;
1450
1509
  }
1451
- type OnFn<T extends TypesGeneric$2 = Types$3> = (type: Types$2, context: Context$4<T>) => PromiseOrValue<void>;
1452
- type OnFnRuntime = (type: Types$2, context: Context$4) => PromiseOrValue<void>;
1510
+ type OnFn<T extends TypesGeneric$3 = Types$4> = (type: Types$3, context: Context$5<T>) => PromiseOrValue<void>;
1511
+ type OnFnRuntime = (type: Types$3, context: Context$5) => PromiseOrValue<void>;
1453
1512
 
1454
1513
  type on_AnyEventContext = AnyEventContext;
1455
1514
  type on_ConsentConfig = ConsentConfig;
@@ -1459,7 +1518,7 @@ type on_EventContextMap = EventContextMap;
1459
1518
  type on_GenericConfig = GenericConfig;
1460
1519
  type on_GenericFn = GenericFn;
1461
1520
  type on_OnConfig = OnConfig;
1462
- type on_OnFn<T extends TypesGeneric$2 = Types$3> = OnFn<T>;
1521
+ type on_OnFn<T extends TypesGeneric$3 = Types$4> = OnFn<T>;
1463
1522
  type on_OnFnRuntime = OnFnRuntime;
1464
1523
  type on_Options = Options;
1465
1524
  type on_ReadyConfig = ReadyConfig;
@@ -1471,7 +1530,7 @@ type on_SessionFn = SessionFn;
1471
1530
  type on_UserConfig = UserConfig;
1472
1531
  type on_UserFn = UserFn;
1473
1532
  declare namespace on {
1474
- export type { on_AnyEventContext as AnyEventContext, Config$2 as Config, on_ConsentConfig as ConsentConfig, on_ConsentFn as ConsentFn, Context$3 as Context, on_EventContext as EventContext, on_EventContextMap as EventContextMap, on_GenericConfig as GenericConfig, on_GenericFn as GenericFn, on_OnConfig as OnConfig, on_OnFn as OnFn, on_OnFnRuntime as OnFnRuntime, on_Options as Options, on_ReadyConfig as ReadyConfig, on_ReadyFn as ReadyFn, on_RunConfig as RunConfig, on_RunFn as RunFn, on_SessionConfig as SessionConfig, on_SessionFn as SessionFn, Types$2 as Types, on_UserConfig as UserConfig, on_UserFn as UserFn };
1533
+ export type { on_AnyEventContext as AnyEventContext, Config$3 as Config, on_ConsentConfig as ConsentConfig, on_ConsentFn as ConsentFn, Context$4 as Context, on_EventContext as EventContext, on_EventContextMap as EventContextMap, on_GenericConfig as GenericConfig, on_GenericFn as GenericFn, on_OnConfig as OnConfig, on_OnFn as OnFn, on_OnFnRuntime as OnFnRuntime, on_Options as Options, on_ReadyConfig as ReadyConfig, on_ReadyFn as ReadyFn, on_RunConfig as RunConfig, on_RunFn as RunFn, on_SessionConfig as SessionConfig, on_SessionFn as SessionFn, Types$3 as Types, on_UserConfig as UserConfig, on_UserFn as UserFn };
1475
1534
  }
1476
1535
 
1477
1536
  type Next = string | string[];
@@ -1481,7 +1540,7 @@ type Next = string | string[];
1481
1540
  * Minimal like Destination - just an extensible object.
1482
1541
  * Transformers receive dependencies through context, not env.
1483
1542
  */
1484
- interface BaseEnv$1 {
1543
+ interface BaseEnv$2 {
1485
1544
  [key: string]: unknown;
1486
1545
  }
1487
1546
  /**
@@ -1493,7 +1552,7 @@ interface BaseEnv$1 {
1493
1552
  * @template E - Environment type
1494
1553
  * @template I - InitSettings configuration type (user input)
1495
1554
  */
1496
- interface Types$1<S = unknown, E = BaseEnv$1, I = S> {
1555
+ interface Types$2<S = unknown, E = BaseEnv$2, I = S> {
1497
1556
  settings: S;
1498
1557
  initSettings: I;
1499
1558
  env: E;
@@ -1501,7 +1560,7 @@ interface Types$1<S = unknown, E = BaseEnv$1, I = S> {
1501
1560
  /**
1502
1561
  * Generic constraint for Types - ensures T has required properties for indexed access.
1503
1562
  */
1504
- type TypesGeneric$1 = {
1563
+ type TypesGeneric$2 = {
1505
1564
  settings: any;
1506
1565
  initSettings: any;
1507
1566
  env: any;
@@ -1509,21 +1568,21 @@ type TypesGeneric$1 = {
1509
1568
  /**
1510
1569
  * Type extractors for consistent usage with Types bundle.
1511
1570
  */
1512
- type Settings$1<T extends TypesGeneric$1 = Types$1> = T['settings'];
1513
- type InitSettings$1<T extends TypesGeneric$1 = Types$1> = T['initSettings'];
1514
- type Env$1<T extends TypesGeneric$1 = Types$1> = T['env'];
1571
+ type Settings$2<T extends TypesGeneric$2 = Types$2> = T['settings'];
1572
+ type InitSettings$2<T extends TypesGeneric$2 = Types$2> = T['initSettings'];
1573
+ type Env$2<T extends TypesGeneric$2 = Types$2> = T['env'];
1515
1574
  /**
1516
1575
  * Inference helper: Extract Types from Instance.
1517
1576
  */
1518
- type TypesOf$1<I> = I extends Instance$1<infer T> ? T : never;
1577
+ type TypesOf$2<I> = I extends Instance$2<infer T> ? T : never;
1519
1578
  /**
1520
1579
  * Transformer configuration.
1521
1580
  */
1522
- interface Config$1<T extends TypesGeneric$1 = Types$1> {
1523
- settings?: InitSettings$1<T>;
1524
- env?: Env$1<T>;
1581
+ interface Config$2<T extends TypesGeneric$2 = Types$2> {
1582
+ settings?: InitSettings$2<T>;
1583
+ env?: Env$2<T>;
1525
1584
  id?: string;
1526
- logger?: Config$4;
1585
+ logger?: Config$5;
1527
1586
  next?: Next;
1528
1587
  init?: boolean;
1529
1588
  }
@@ -1531,7 +1590,7 @@ interface Config$1<T extends TypesGeneric$1 = Types$1> {
1531
1590
  * Context provided to transformer functions.
1532
1591
  * Extends base context with transformer-specific properties.
1533
1592
  */
1534
- interface Context$2<T extends TypesGeneric$1 = Types$1> extends Base<Config$1<T>, Env$1<T>> {
1593
+ interface Context$3<T extends TypesGeneric$2 = Types$2> extends Base<Config$2<T>, Env$2<T>> {
1535
1594
  id: string;
1536
1595
  ingest?: unknown;
1537
1596
  }
@@ -1558,7 +1617,7 @@ interface Result$1 {
1558
1617
  * @returns void - continue with current event unchanged (passthrough)
1559
1618
  * @returns false - stop chain, cancel further processing
1560
1619
  */
1561
- type Fn<T extends TypesGeneric$1 = Types$1> = (event: DeepPartialEvent, context: Context$2<T>) => PromiseOrValue<Result$1 | false | void>;
1620
+ type Fn<T extends TypesGeneric$2 = Types$2> = (event: DeepPartialEvent, context: Context$3<T>) => PromiseOrValue<Result$1 | false | void>;
1562
1621
  /**
1563
1622
  * Optional initialization function.
1564
1623
  * Called once before first push.
@@ -1568,30 +1627,30 @@ type Fn<T extends TypesGeneric$1 = Types$1> = (event: DeepPartialEvent, context:
1568
1627
  * @returns false - initialization failed, skip this transformer
1569
1628
  * @returns Config<T> - return updated config
1570
1629
  */
1571
- type InitFn<T extends TypesGeneric$1 = Types$1> = (context: Context$2<T>) => PromiseOrValue<void | false | Config$1<T>>;
1630
+ type InitFn$1<T extends TypesGeneric$2 = Types$2> = (context: Context$3<T>) => PromiseOrValue<void | false | Config$2<T>>;
1572
1631
  /**
1573
1632
  * Transformer instance returned by Init function.
1574
1633
  */
1575
- interface Instance$1<T extends TypesGeneric$1 = Types$1> {
1634
+ interface Instance$2<T extends TypesGeneric$2 = Types$2> {
1576
1635
  type: string;
1577
- config: Config$1<T>;
1636
+ config: Config$2<T>;
1578
1637
  push: Fn<T>;
1579
- init?: InitFn<T>;
1580
- destroy?: DestroyFn<Config$1<T>, Env$1<T>>;
1638
+ init?: InitFn$1<T>;
1639
+ destroy?: DestroyFn<Config$2<T>, Env$2<T>>;
1581
1640
  }
1582
1641
  /**
1583
1642
  * Transformer initialization function.
1584
1643
  * Creates a transformer instance from context.
1585
1644
  */
1586
- type Init$1<T extends TypesGeneric$1 = Types$1> = (context: Context$2<Types$1<Partial<Settings$1<T>>, Env$1<T>, InitSettings$1<T>>>) => Instance$1<T> | Promise<Instance$1<T>>;
1645
+ type Init$2<T extends TypesGeneric$2 = Types$2> = (context: Context$3<Types$2<Partial<Settings$2<T>>, Env$2<T>, InitSettings$2<T>>>) => Instance$2<T> | Promise<Instance$2<T>>;
1587
1646
  /**
1588
1647
  * Configuration for initializing a transformer.
1589
1648
  * Used in collector registration.
1590
1649
  */
1591
- type InitTransformer<T extends TypesGeneric$1 = Types$1> = {
1592
- code: Init$1<T>;
1593
- config?: Partial<Config$1<T>>;
1594
- env?: Partial<Env$1<T>>;
1650
+ type InitTransformer<T extends TypesGeneric$2 = Types$2> = {
1651
+ code: Init$2<T>;
1652
+ config?: Partial<Config$2<T>>;
1653
+ env?: Partial<Env$2<T>>;
1595
1654
  next?: Next;
1596
1655
  };
1597
1656
  /**
@@ -1605,20 +1664,19 @@ interface InitTransformers {
1605
1664
  * Active transformer instances registry.
1606
1665
  */
1607
1666
  interface Transformers {
1608
- [transformerId: string]: Instance$1;
1667
+ [transformerId: string]: Instance$2;
1609
1668
  }
1610
1669
 
1611
- type transformer_Fn<T extends TypesGeneric$1 = Types$1> = Fn<T>;
1612
- type transformer_InitFn<T extends TypesGeneric$1 = Types$1> = InitFn<T>;
1613
- type transformer_InitTransformer<T extends TypesGeneric$1 = Types$1> = InitTransformer<T>;
1670
+ type transformer_Fn<T extends TypesGeneric$2 = Types$2> = Fn<T>;
1671
+ type transformer_InitTransformer<T extends TypesGeneric$2 = Types$2> = InitTransformer<T>;
1614
1672
  type transformer_InitTransformers = InitTransformers;
1615
1673
  type transformer_Next = Next;
1616
1674
  type transformer_Transformers = Transformers;
1617
1675
  declare namespace transformer {
1618
- export type { BaseEnv$1 as BaseEnv, Config$1 as Config, Context$2 as Context, Env$1 as Env, transformer_Fn as Fn, Init$1 as Init, transformer_InitFn as InitFn, InitSettings$1 as InitSettings, transformer_InitTransformer as InitTransformer, transformer_InitTransformers as InitTransformers, Instance$1 as Instance, transformer_Next as Next, Result$1 as Result, Settings$1 as Settings, transformer_Transformers as Transformers, Types$1 as Types, TypesGeneric$1 as TypesGeneric, TypesOf$1 as TypesOf };
1676
+ export type { BaseEnv$2 as BaseEnv, Config$2 as Config, Context$3 as Context, Env$2 as Env, transformer_Fn as Fn, Init$2 as Init, InitFn$1 as InitFn, InitSettings$2 as InitSettings, transformer_InitTransformer as InitTransformer, transformer_InitTransformers as InitTransformers, Instance$2 as Instance, transformer_Next as Next, Result$1 as Result, Settings$2 as Settings, transformer_Transformers as Transformers, Types$2 as Types, TypesGeneric$2 as TypesGeneric, TypesOf$2 as TypesOf };
1619
1677
  }
1620
1678
 
1621
- interface Context$1 {
1679
+ interface Context$2 {
1622
1680
  city?: string;
1623
1681
  country?: string;
1624
1682
  encoding?: string;
@@ -1632,7 +1690,7 @@ interface Context$1 {
1632
1690
  }
1633
1691
 
1634
1692
  declare namespace request {
1635
- export type { Context$1 as Context };
1693
+ export type { Context$2 as Context };
1636
1694
  }
1637
1695
 
1638
1696
  /**
@@ -1641,13 +1699,13 @@ declare namespace request {
1641
1699
  * Sources receive all their dependencies through this environment object,
1642
1700
  * making them platform-agnostic and easily testable.
1643
1701
  */
1644
- interface BaseEnv {
1702
+ interface BaseEnv$1 {
1645
1703
  [key: string]: unknown;
1646
1704
  push: PushFn$1;
1647
1705
  command: CommandFn;
1648
1706
  sources?: Sources;
1649
1707
  elb: Fn$2;
1650
- logger: Instance$2;
1708
+ logger: Instance$3;
1651
1709
  }
1652
1710
  /**
1653
1711
  * Type bundle for source generics.
@@ -1659,7 +1717,7 @@ interface BaseEnv {
1659
1717
  * @template E - Environment dependencies type
1660
1718
  * @template I - InitSettings configuration type (user input)
1661
1719
  */
1662
- interface Types<S = unknown, M = unknown, P = Fn$2, E = BaseEnv, I = S> {
1720
+ interface Types$1<S = unknown, M = unknown, P = Fn$2, E = BaseEnv$1, I = S> {
1663
1721
  settings: S;
1664
1722
  initSettings: I;
1665
1723
  mapping: M;
@@ -1669,7 +1727,7 @@ interface Types<S = unknown, M = unknown, P = Fn$2, E = BaseEnv, I = S> {
1669
1727
  /**
1670
1728
  * Generic constraint for Types - ensures T has required properties for indexed access
1671
1729
  */
1672
- type TypesGeneric = {
1730
+ type TypesGeneric$1 = {
1673
1731
  settings: any;
1674
1732
  initSettings: any;
1675
1733
  mapping: any;
@@ -1679,24 +1737,24 @@ type TypesGeneric = {
1679
1737
  /**
1680
1738
  * Type extractors for consistent usage with Types bundle
1681
1739
  */
1682
- type Settings<T extends TypesGeneric = Types> = T['settings'];
1683
- type InitSettings<T extends TypesGeneric = Types> = T['initSettings'];
1684
- type Mapping<T extends TypesGeneric = Types> = T['mapping'];
1685
- type Push<T extends TypesGeneric = Types> = T['push'];
1686
- type Env<T extends TypesGeneric = Types> = T['env'];
1740
+ type Settings$1<T extends TypesGeneric$1 = Types$1> = T['settings'];
1741
+ type InitSettings$1<T extends TypesGeneric$1 = Types$1> = T['initSettings'];
1742
+ type Mapping<T extends TypesGeneric$1 = Types$1> = T['mapping'];
1743
+ type Push<T extends TypesGeneric$1 = Types$1> = T['push'];
1744
+ type Env$1<T extends TypesGeneric$1 = Types$1> = T['env'];
1687
1745
  /**
1688
1746
  * Inference helper: Extract Types from Instance
1689
1747
  */
1690
- type TypesOf<I> = I extends Instance<infer T> ? T : never;
1691
- interface Config<T extends TypesGeneric = Types> extends Config$3<Mapping<T>> {
1748
+ type TypesOf$1<I> = I extends Instance$1<infer T> ? T : never;
1749
+ interface Config$1<T extends TypesGeneric$1 = Types$1> extends Config$4<Mapping<T>> {
1692
1750
  /** Implementation-specific configuration passed to the init function. */
1693
- settings?: InitSettings<T>;
1751
+ settings?: InitSettings$1<T>;
1694
1752
  /** Runtime dependencies injected by the collector (push, command, logger, etc.). */
1695
- env?: Env<T>;
1753
+ env?: Env$1<T>;
1696
1754
  /** Source identifier; defaults to the InitSources object key. */
1697
1755
  id?: string;
1698
1756
  /** Logger configuration (level, handler) to override the collector's defaults. */
1699
- logger?: Config$4;
1757
+ logger?: Config$5;
1700
1758
  /** Mark as primary source; its push function becomes the exported `elb` from startFlow. */
1701
1759
  primary?: boolean;
1702
1760
  /** Defer source initialization until these collector events fire (e.g., `['consent']`). */
@@ -1715,19 +1773,19 @@ interface Config<T extends TypesGeneric = Types> extends Config$3<Mapping<T>> {
1715
1773
  */
1716
1774
  ingest?: Data;
1717
1775
  }
1718
- type PartialConfig<T extends TypesGeneric = Types> = Config<Types<Partial<Settings<T>> | Settings<T>, Partial<Mapping<T>> | Mapping<T>, Push<T>, Env<T>>>;
1719
- interface Instance<T extends TypesGeneric = Types> {
1776
+ type PartialConfig<T extends TypesGeneric$1 = Types$1> = Config$1<Types$1<Partial<Settings$1<T>> | Settings$1<T>, Partial<Mapping<T>> | Mapping<T>, Push<T>, Env$1<T>>>;
1777
+ interface Instance$1<T extends TypesGeneric$1 = Types$1> {
1720
1778
  type: string;
1721
- config: Config<T>;
1779
+ config: Config$1<T>;
1722
1780
  push: Push<T>;
1723
- destroy?: DestroyFn<Config<T>, Env<T>>;
1724
- on?(event: Types$2, context?: unknown): void | boolean | Promise<void | boolean>;
1781
+ destroy?: DestroyFn<Config$1<T>, Env$1<T>>;
1782
+ on?(event: Types$3, context?: unknown): void | boolean | Promise<void | boolean>;
1725
1783
  }
1726
1784
  /**
1727
1785
  * Context provided to source init function.
1728
1786
  * Extends base context with source-specific properties.
1729
1787
  */
1730
- interface Context<T extends TypesGeneric = Types> extends Base<Partial<Config<T>>, Env<T>> {
1788
+ interface Context$1<T extends TypesGeneric$1 = Types$1> extends Base<Partial<Config$1<T>>, Env$1<T>> {
1731
1789
  id: string;
1732
1790
  /**
1733
1791
  * Sets ingest metadata for the current request.
@@ -1740,11 +1798,11 @@ interface Context<T extends TypesGeneric = Types> extends Base<Partial<Config<T>
1740
1798
  /** Sets respond function for the current request. Called by source per-request. */
1741
1799
  setRespond: (fn: RespondFn | undefined) => void;
1742
1800
  }
1743
- type Init<T extends TypesGeneric = Types> = (context: Context<T>) => Instance<T> | Promise<Instance<T>>;
1744
- type InitSource<T extends TypesGeneric = Types> = {
1745
- code: Init<T>;
1746
- config?: Partial<Config<T>>;
1747
- env?: Partial<Env<T>>;
1801
+ type Init$1<T extends TypesGeneric$1 = Types$1> = (context: Context$1<T>) => Instance$1<T> | Promise<Instance$1<T>>;
1802
+ type InitSource<T extends TypesGeneric$1 = Types$1> = {
1803
+ code: Init$1<T>;
1804
+ config?: Partial<Config$1<T>>;
1805
+ env?: Partial<Env$1<T>>;
1748
1806
  primary?: boolean;
1749
1807
  next?: Next;
1750
1808
  };
@@ -1782,27 +1840,89 @@ interface SimulationEnv {
1782
1840
  */
1783
1841
  type SetupFn = (input: unknown, env: SimulationEnv) => void | (() => void);
1784
1842
 
1785
- type source_BaseEnv = BaseEnv;
1786
- type source_Config<T extends TypesGeneric = Types> = Config<T>;
1787
- type source_Context<T extends TypesGeneric = Types> = Context<T>;
1788
- type source_Env<T extends TypesGeneric = Types> = Env<T>;
1789
- type source_Init<T extends TypesGeneric = Types> = Init<T>;
1790
- type source_InitSettings<T extends TypesGeneric = Types> = InitSettings<T>;
1791
- type source_InitSource<T extends TypesGeneric = Types> = InitSource<T>;
1843
+ type source_InitSource<T extends TypesGeneric$1 = Types$1> = InitSource<T>;
1792
1844
  type source_InitSources = InitSources;
1793
- type source_Instance<T extends TypesGeneric = Types> = Instance<T>;
1794
- type source_Mapping<T extends TypesGeneric = Types> = Mapping<T>;
1795
- type source_PartialConfig<T extends TypesGeneric = Types> = PartialConfig<T>;
1796
- type source_Push<T extends TypesGeneric = Types> = Push<T>;
1845
+ type source_Mapping<T extends TypesGeneric$1 = Types$1> = Mapping<T>;
1846
+ type source_PartialConfig<T extends TypesGeneric$1 = Types$1> = PartialConfig<T>;
1847
+ type source_Push<T extends TypesGeneric$1 = Types$1> = Push<T>;
1797
1848
  type source_Renderer = Renderer;
1798
- type source_Settings<T extends TypesGeneric = Types> = Settings<T>;
1799
1849
  type source_SetupFn = SetupFn;
1800
1850
  type source_SimulationEnv = SimulationEnv;
1801
- type source_Types<S = unknown, M = unknown, P = Fn$2, E = BaseEnv, I = S> = Types<S, M, P, E, I>;
1802
- type source_TypesGeneric = TypesGeneric;
1803
- type source_TypesOf<I> = TypesOf<I>;
1804
1851
  declare namespace source {
1805
- export type { source_BaseEnv as BaseEnv, source_Config as Config, source_Context as Context, source_Env as Env, source_Init as Init, source_InitSettings as InitSettings, source_InitSource as InitSource, source_InitSources as InitSources, source_Instance as Instance, source_Mapping as Mapping, source_PartialConfig as PartialConfig, source_Push as Push, source_Renderer as Renderer, source_Settings as Settings, source_SetupFn as SetupFn, source_SimulationEnv as SimulationEnv, source_Types as Types, source_TypesGeneric as TypesGeneric, source_TypesOf as TypesOf };
1852
+ export type { BaseEnv$1 as BaseEnv, Config$1 as Config, Context$1 as Context, Env$1 as Env, Init$1 as Init, InitSettings$1 as InitSettings, source_InitSource as InitSource, source_InitSources as InitSources, Instance$1 as Instance, source_Mapping as Mapping, source_PartialConfig as PartialConfig, source_Push as Push, source_Renderer as Renderer, Settings$1 as Settings, source_SetupFn as SetupFn, source_SimulationEnv as SimulationEnv, Types$1 as Types, TypesGeneric$1 as TypesGeneric, TypesOf$1 as TypesOf };
1853
+ }
1854
+
1855
+ interface BaseEnv {
1856
+ [key: string]: unknown;
1857
+ }
1858
+ interface Types<S = unknown, E = BaseEnv, I = S> {
1859
+ settings: S;
1860
+ initSettings: I;
1861
+ env: E;
1862
+ }
1863
+ type TypesGeneric = {
1864
+ settings: any;
1865
+ initSettings: any;
1866
+ env: any;
1867
+ };
1868
+ type Settings<T extends TypesGeneric = Types> = T['settings'];
1869
+ type InitSettings<T extends TypesGeneric = Types> = T['initSettings'];
1870
+ type Env<T extends TypesGeneric = Types> = T['env'];
1871
+ type TypesOf<I> = I extends Instance<infer T> ? T : never;
1872
+ interface Config<T extends TypesGeneric = Types> {
1873
+ settings?: InitSettings<T>;
1874
+ env?: Env<T>;
1875
+ id?: string;
1876
+ logger?: Config$5;
1877
+ }
1878
+ interface Context<T extends TypesGeneric = Types> extends Base<Config<T>, Env<T>> {
1879
+ id: string;
1880
+ }
1881
+ type GetFn<T = unknown> = (key: string) => T | undefined | Promise<T | undefined>;
1882
+ type SetFn<T = unknown> = (key: string, value: T, ttl?: number) => void | Promise<void>;
1883
+ type DeleteFn = (key: string) => void | Promise<void>;
1884
+ interface Instance<T extends TypesGeneric = Types> {
1885
+ type: string;
1886
+ config: Config<T>;
1887
+ get: GetFn;
1888
+ set: SetFn;
1889
+ delete: DeleteFn;
1890
+ destroy?: DestroyFn<Config<T>, Env<T>>;
1891
+ }
1892
+ type Init<T extends TypesGeneric = Types> = (context: Context<Types<Partial<Settings<T>>, Env<T>, InitSettings<T>>>) => Instance<T> | Promise<Instance<T>>;
1893
+ type InitFn<T extends TypesGeneric = Types> = (context: Context<T>) => PromiseOrValue<void | false | Config<T>>;
1894
+ type InitStore<T extends TypesGeneric = Types> = {
1895
+ code: Init<T>;
1896
+ config?: Partial<Config<T>>;
1897
+ env?: Partial<Env<T>>;
1898
+ };
1899
+ interface InitStores {
1900
+ [storeId: string]: InitStore<any>;
1901
+ }
1902
+ interface Stores {
1903
+ [storeId: string]: Instance;
1904
+ }
1905
+
1906
+ type store_BaseEnv = BaseEnv;
1907
+ type store_Config<T extends TypesGeneric = Types> = Config<T>;
1908
+ type store_Context<T extends TypesGeneric = Types> = Context<T>;
1909
+ type store_DeleteFn = DeleteFn;
1910
+ type store_Env<T extends TypesGeneric = Types> = Env<T>;
1911
+ type store_GetFn<T = unknown> = GetFn<T>;
1912
+ type store_Init<T extends TypesGeneric = Types> = Init<T>;
1913
+ type store_InitFn<T extends TypesGeneric = Types> = InitFn<T>;
1914
+ type store_InitSettings<T extends TypesGeneric = Types> = InitSettings<T>;
1915
+ type store_InitStore<T extends TypesGeneric = Types> = InitStore<T>;
1916
+ type store_InitStores = InitStores;
1917
+ type store_Instance<T extends TypesGeneric = Types> = Instance<T>;
1918
+ type store_SetFn<T = unknown> = SetFn<T>;
1919
+ type store_Settings<T extends TypesGeneric = Types> = Settings<T>;
1920
+ type store_Stores = Stores;
1921
+ type store_Types<S = unknown, E = BaseEnv, I = S> = Types<S, E, I>;
1922
+ type store_TypesGeneric = TypesGeneric;
1923
+ type store_TypesOf<I> = TypesOf<I>;
1924
+ declare namespace store {
1925
+ export type { store_BaseEnv as BaseEnv, store_Config as Config, store_Context as Context, store_DeleteFn as DeleteFn, store_Env as Env, store_GetFn as GetFn, store_Init as Init, store_InitFn as InitFn, store_InitSettings as InitSettings, store_InitStore as InitStore, store_InitStores as InitStores, store_Instance as Instance, store_SetFn as SetFn, store_Settings as Settings, store_Stores as Stores, store_Types as Types, store_TypesGeneric as TypesGeneric, store_TypesOf as TypesOf };
1806
1926
  }
1807
1927
 
1808
1928
  type AnyObject<T = unknown> = Record<string, T>;
@@ -1962,6 +2082,28 @@ declare namespace simulation {
1962
2082
  export type { simulation_Call as Call, simulation_Result as Result };
1963
2083
  }
1964
2084
 
2085
+ type MatchExpression = MatchCondition | {
2086
+ and: MatchExpression[];
2087
+ } | {
2088
+ or: MatchExpression[];
2089
+ };
2090
+ interface MatchCondition {
2091
+ key: string;
2092
+ operator: MatchOperator;
2093
+ value: string;
2094
+ not?: boolean;
2095
+ }
2096
+ type MatchOperator = 'eq' | 'contains' | 'prefix' | 'suffix' | 'regex' | 'gt' | 'lt' | 'exists';
2097
+ type CompiledMatcher = (ingest: Record<string, unknown>) => boolean;
2098
+
2099
+ type matcher_CompiledMatcher = CompiledMatcher;
2100
+ type matcher_MatchCondition = MatchCondition;
2101
+ type matcher_MatchExpression = MatchExpression;
2102
+ type matcher_MatchOperator = MatchOperator;
2103
+ declare namespace matcher {
2104
+ export type { matcher_CompiledMatcher as CompiledMatcher, matcher_MatchCondition as MatchCondition, matcher_MatchExpression as MatchExpression, matcher_MatchOperator as MatchOperator };
2105
+ }
2106
+
1965
2107
  type StorageType = 'local' | 'session' | 'cookie';
1966
2108
  declare const Const: {
1967
2109
  readonly Utils: {
@@ -2019,31 +2161,31 @@ interface ResolveOptions {
2019
2161
  */
2020
2162
  declare function packageNameToVariable(packageName: string): string;
2021
2163
  /**
2022
- * Get resolved flow configuration for a named flow.
2164
+ * Get resolved flow settings for a named flow.
2023
2165
  *
2024
- * @param setup - The complete setup configuration
2166
+ * @param config - The complete Flow.Config configuration
2025
2167
  * @param flowName - Flow name (auto-selected if only one exists)
2026
- * @returns Resolved Config with $var, $env, and $def patterns resolved
2168
+ * @returns Resolved Settings with $var, $env, and $def patterns resolved
2027
2169
  * @throws Error if flow selection is required but not specified, or flow not found
2028
2170
  *
2029
2171
  * @example
2030
2172
  * ```typescript
2031
- * import { getFlowConfig } from '@walkeros/core';
2173
+ * import { getFlowSettings } from '@walkeros/core';
2032
2174
  *
2033
- * const setup = JSON.parse(fs.readFileSync('walkeros.config.json', 'utf8'));
2175
+ * const config = JSON.parse(fs.readFileSync('walkeros.config.json', 'utf8'));
2034
2176
  *
2035
2177
  * // Auto-select if only one flow
2036
- * const config = getFlowConfig(setup);
2178
+ * const settings = getFlowSettings(config);
2037
2179
  *
2038
2180
  * // Or specify flow
2039
- * const prodConfig = getFlowConfig(setup, 'production');
2181
+ * const prodSettings = getFlowSettings(config, 'production');
2040
2182
  * ```
2041
2183
  */
2042
- declare function getFlowConfig(setup: Setup, flowName?: string, options?: ResolveOptions): Config$5;
2184
+ declare function getFlowSettings(config: Config$6, flowName?: string, options?: ResolveOptions): Settings$3;
2043
2185
  /**
2044
- * Get platform from config (web or server).
2186
+ * Get platform from settings (web or server).
2045
2187
  *
2046
- * @param config - Flow configuration
2188
+ * @param settings - Flow settings
2047
2189
  * @returns "web" or "server"
2048
2190
  * @throws Error if neither web nor server is present
2049
2191
  *
@@ -2051,11 +2193,11 @@ declare function getFlowConfig(setup: Setup, flowName?: string, options?: Resolv
2051
2193
  * ```typescript
2052
2194
  * import { getPlatform } from '@walkeros/core';
2053
2195
  *
2054
- * const platform = getPlatform(config);
2196
+ * const platform = getPlatform(settings);
2055
2197
  * // Returns "web" or "server"
2056
2198
  * ```
2057
2199
  */
2058
- declare function getPlatform(config: Config$5): 'web' | 'server';
2200
+ declare function getPlatform(settings: Settings$3): 'web' | 'server';
2059
2201
 
2060
2202
  /**
2061
2203
  * @interface Assign
@@ -2151,7 +2293,7 @@ declare function getGrantedConsent(required: Consent | undefined, state?: Consen
2151
2293
  * }));
2152
2294
  * ```
2153
2295
  */
2154
- declare function createDestination<I extends Instance$3>(baseDestination: I, config: Partial<Config$6<TypesOf$2<I>>>): I;
2296
+ declare function createDestination<I extends Instance$4>(baseDestination: I, config: Partial<Config$7<TypesOf$3<I>>>): I;
2155
2297
 
2156
2298
  /**
2157
2299
  * Creates a complete event with default values.
@@ -2313,7 +2455,7 @@ declare function isString(value: unknown): value is string;
2313
2455
  * // TODO: Consider compile-time stripping of debug logs in production builds
2314
2456
  * // e.g., if (__DEV__) { logger.debug(...) }
2315
2457
  */
2316
- declare function createLogger(config?: Config$4): Instance$2;
2458
+ declare function createLogger(config?: Config$5): Instance$3;
2317
2459
 
2318
2460
  /**
2319
2461
  * Gets the mapping for an event.
@@ -2351,7 +2493,7 @@ declare function getMappingValue(value: DeepPartialEvent | unknown | undefined,
2351
2493
  * @param collector - Collector instance for context
2352
2494
  * @returns Object with transformed event, data, mapping rule, and ignore flag
2353
2495
  */
2354
- declare function processEventMapping<T extends DeepPartialEvent | Event>(event: T, config: Config$3, collector: Instance$4): Promise<{
2496
+ declare function processEventMapping<T extends DeepPartialEvent | Event>(event: T, config: Config$4, collector: Instance$5): Promise<{
2355
2497
  event: T;
2356
2498
  data?: Property;
2357
2499
  mapping?: Rule;
@@ -2430,7 +2572,7 @@ declare function traverseEnv<T extends object>(env: T, replacer: (value: unknown
2430
2572
  * Includes all logger methods as jest.fn() plus tracking of scoped loggers
2431
2573
  * Extends Instance to ensure type compatibility
2432
2574
  */
2433
- interface MockLogger extends Instance$2 {
2575
+ interface MockLogger extends Instance$3 {
2434
2576
  error: jest.Mock;
2435
2577
  warn: jest.Mock;
2436
2578
  info: jest.Mock;
@@ -2734,7 +2876,7 @@ declare function mergeContractSchemas(parent: Record<string, unknown>, child: Re
2734
2876
  */
2735
2877
  declare function resolveContract(setup: Contract, entity: string, action: string, config?: Contract): Record<string, unknown>;
2736
2878
 
2737
- declare function mcpResult(result: unknown): {
2879
+ declare function mcpResult(result: unknown, summary?: string): {
2738
2880
  content: {
2739
2881
  type: "text";
2740
2882
  text: string;
@@ -2749,4 +2891,11 @@ declare function mcpError(error: unknown): {
2749
2891
  isError: true;
2750
2892
  };
2751
2893
 
2752
- export { collector as Collector, Const, context as Context, data as Data, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, flow as Flow, hooks as Hooks, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, transformer as Transformer, walkeros as WalkerOS, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, assign, branch, castToProperty, castValue, clone, createDestination, createEvent, createLogger, createMockLogger, createRespond, debounce, fetchPackageMeta, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowConfig, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isSameType, isString, mcpError, mcpResult, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContract, setByPath, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, wrapCondition, wrapFn, wrapValidate };
2894
+ /**
2895
+ * Compiles a match expression into a closure for fast runtime evaluation.
2896
+ * Regex patterns are compiled once. Numeric comparisons are parsed once.
2897
+ * Runtime evaluation is pure function calls with short-circuit logic.
2898
+ */
2899
+ declare function compileMatcher(expr: MatchExpression | '*'): CompiledMatcher;
2900
+
2901
+ export { collector as Collector, Const, context as Context, data as Data, destination as Destination, ENV_MARKER_PREFIX, elb as Elb, flow as Flow, hooks as Hooks, Level, lifecycle as Lifecycle, logger as Logger, mapping as Mapping, type MarketingParameters, matcher as Matcher, type MockLogger, on as On, request as Request, type ResolveOptions, type RespondFn, type RespondOptions, type SendDataValue, type SendHeaders, type SendResponse, simulation as Simulation, source as Source, type StorageType, store as Store, transformer as Transformer, walkeros as WalkerOS, type WalkerOSPackageInfo, type WalkerOSPackageMeta, anonymizeIP, assign, branch, castToProperty, castValue, clone, compileMatcher, createDestination, createEvent, createLogger, createMockLogger, createRespond, debounce, fetchPackageMeta, fetchPackageSchema, filterValues, getBrowser, getBrowserVersion, getByPath, getDeviceType, getEvent, getFlowSettings, getGrantedConsent, getHeaders, getId, getMappingEvent, getMappingValue, getMarketingParameters, getOS, getOSVersion, getPlatform, isArguments, isArray, isBoolean, isCommand, isDefined, isElementOrDocument, isFunction, isNumber, isObject, isPropertyType, isSameType, isString, mcpError, mcpResult, mergeContractSchemas, mockEnv, packageNameToVariable, parseUserAgent, processEventMapping, requestToData, requestToParameter, resolveContract, setByPath, throttle, throwError, transformData, traverseEnv, trim, tryCatch, tryCatchAsync, useHooks, wrapCondition, wrapFn, wrapValidate };