@walkeros/core 3.3.0-next-1776098542393 → 3.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dev.d.mts CHANGED
@@ -4469,6 +4469,18 @@ declare const HintsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
4469
4469
  }, z.core.$strip>>>;
4470
4470
  }, z.core.$strip>>;
4471
4471
 
4472
+ /**
4473
+ * Click-ID registry entry — maps a URL parameter name to a canonical platform.
4474
+ *
4475
+ * Runtime use of this schema is optional; `getMarketingParameters()` accepts
4476
+ * plain `ClickIdEntry` objects without validating. This schema exists for
4477
+ * dev tooling (Explorer UI, MCP package_get, JSON Schema generation).
4478
+ */
4479
+ declare const ClickIdEntrySchema: z.ZodObject<{
4480
+ param: z.ZodString;
4481
+ platform: z.ZodString;
4482
+ }, z.core.$strip>;
4483
+
4472
4484
  interface PackageInfo {
4473
4485
  package: string;
4474
4486
  shortName: string;
@@ -4714,6 +4726,7 @@ declare const index_BaseContextConfig: typeof BaseContextConfig;
4714
4726
  declare const index_BatchConfig: typeof BatchConfig;
4715
4727
  declare const index_CacheRuleSchema: typeof CacheRuleSchema;
4716
4728
  declare const index_CacheSchema: typeof CacheSchema;
4729
+ declare const index_ClickIdEntrySchema: typeof ClickIdEntrySchema;
4717
4730
  declare const index_CodeSchema: typeof CodeSchema;
4718
4731
  declare const index_ConsentSchema: typeof ConsentSchema;
4719
4732
  declare const index_ContractActionsSchema: typeof ContractActionsSchema;
@@ -4818,7 +4831,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
4818
4831
  declare const index_z: typeof z;
4819
4832
  declare const index_zodToSchema: typeof zodToSchema;
4820
4833
  declare namespace index {
4821
- export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, SettingsSchema as FlowSettingsSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_NextRuleSchema as NextRuleSchema, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RoutableNextSchema as RoutableNextSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StoreReferenceSchema as StoreReferenceSchema, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_TransformerReferenceSchema as TransformerReferenceSchema, index_UserSchema as UserSchema, utilities as UtilitySchemas, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractEntryJsonSchema as contractEntryJsonSchema, index_contractJsonSchema as contractJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSettings as parseSettings, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseSettings as safeParseSettings, index_setJsonSchema as setJsonSchema, index_settingsJsonSchema as settingsJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeReferenceJsonSchema as storeReferenceJsonSchema, index_transformerReferenceJsonSchema as transformerReferenceJsonSchema, index_userJsonSchema as userJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
4834
+ export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_ClickIdEntrySchema as ClickIdEntrySchema, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, SettingsSchema as FlowSettingsSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_NextRuleSchema as NextRuleSchema, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RoutableNextSchema as RoutableNextSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StoreReferenceSchema as StoreReferenceSchema, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_TransformerReferenceSchema as TransformerReferenceSchema, index_UserSchema as UserSchema, utilities as UtilitySchemas, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractEntryJsonSchema as contractEntryJsonSchema, index_contractJsonSchema as contractJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSettings as parseSettings, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseSettings as safeParseSettings, index_setJsonSchema as setJsonSchema, index_settingsJsonSchema as settingsJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeReferenceJsonSchema as storeReferenceJsonSchema, index_transformerReferenceJsonSchema as transformerReferenceJsonSchema, index_userJsonSchema as userJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
4822
4835
  }
4823
4836
 
4824
4837
  type PackageType = 'source' | 'destination' | 'transformer' | 'store';
@@ -4828,4 +4841,4 @@ interface PackageSchemas {
4828
4841
  }
4829
4842
  declare function mergeConfigSchema(type: PackageType, packageSchemas: PackageSchemas): Record<string, unknown>;
4830
4843
 
4831
- export { type JSONSchema, mergeConfigSchema, index as schemas, zodToSchema };
4844
+ export { ClickIdEntrySchema, type JSONSchema, mergeConfigSchema, index as schemas, zodToSchema };
package/dist/dev.d.ts CHANGED
@@ -4469,6 +4469,18 @@ declare const HintsSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
4469
4469
  }, z.core.$strip>>>;
4470
4470
  }, z.core.$strip>>;
4471
4471
 
4472
+ /**
4473
+ * Click-ID registry entry — maps a URL parameter name to a canonical platform.
4474
+ *
4475
+ * Runtime use of this schema is optional; `getMarketingParameters()` accepts
4476
+ * plain `ClickIdEntry` objects without validating. This schema exists for
4477
+ * dev tooling (Explorer UI, MCP package_get, JSON Schema generation).
4478
+ */
4479
+ declare const ClickIdEntrySchema: z.ZodObject<{
4480
+ param: z.ZodString;
4481
+ platform: z.ZodString;
4482
+ }, z.core.$strip>;
4483
+
4472
4484
  interface PackageInfo {
4473
4485
  package: string;
4474
4486
  shortName: string;
@@ -4714,6 +4726,7 @@ declare const index_BaseContextConfig: typeof BaseContextConfig;
4714
4726
  declare const index_BatchConfig: typeof BatchConfig;
4715
4727
  declare const index_CacheRuleSchema: typeof CacheRuleSchema;
4716
4728
  declare const index_CacheSchema: typeof CacheSchema;
4729
+ declare const index_ClickIdEntrySchema: typeof ClickIdEntrySchema;
4717
4730
  declare const index_CodeSchema: typeof CodeSchema;
4718
4731
  declare const index_ConsentSchema: typeof ConsentSchema;
4719
4732
  declare const index_ContractActionsSchema: typeof ContractActionsSchema;
@@ -4818,7 +4831,7 @@ declare const index_valueJsonSchema: typeof valueJsonSchema;
4818
4831
  declare const index_z: typeof z;
4819
4832
  declare const index_zodToSchema: typeof zodToSchema;
4820
4833
  declare namespace index {
4821
- export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, SettingsSchema as FlowSettingsSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_NextRuleSchema as NextRuleSchema, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RoutableNextSchema as RoutableNextSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StoreReferenceSchema as StoreReferenceSchema, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_TransformerReferenceSchema as TransformerReferenceSchema, index_UserSchema as UserSchema, utilities as UtilitySchemas, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractEntryJsonSchema as contractEntryJsonSchema, index_contractJsonSchema as contractJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSettings as parseSettings, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseSettings as safeParseSettings, index_setJsonSchema as setJsonSchema, index_settingsJsonSchema as settingsJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeReferenceJsonSchema as storeReferenceJsonSchema, index_transformerReferenceJsonSchema as transformerReferenceJsonSchema, index_userJsonSchema as userJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
4834
+ export { index_BaseContextConfig as BaseContextConfig, index_BatchConfig as BatchConfig, index_CacheRuleSchema as CacheRuleSchema, index_CacheSchema as CacheSchema, cache as CacheSchemas, index_ClickIdEntrySchema as ClickIdEntrySchema, index_CodeSchema as CodeSchema, collector as CollectorSchemas, index_ConsentSchema as ConsentSchema, index_ContractActionsSchema as ContractActionsSchema, index_ContractSchema as ContractSchema, index_ContractSchemaEntry as ContractSchemaEntry, index_Counter as Counter, index_DeepPartialEventSchema as DeepPartialEventSchema, index_DestinationReferenceSchema as DestinationReferenceSchema, destination as DestinationSchemas, index_DestinationsMapConfig as DestinationsMapConfig, index_EntitiesSchema as EntitiesSchema, index_EntitySchema as EntitySchema, index_EventSchema as EventSchema, ConfigSchema as FlowConfigSchema, flow as FlowSchemas, SettingsSchema as FlowSettingsSchema, index_GenericEnvConfig as GenericEnvConfig, index_GenericSettingsConfig as GenericSettingsConfig, index_HandlersConfig as HandlersConfig, index_HintSchema as HintSchema, index_HintsSchema as HintsSchema, index_IdConfig as IdConfig, index_Identifier as Identifier, index_InitConfig as InitConfig, type index_IntelliSenseContext as IntelliSenseContext, type index_JSONSchema as JSONSchema, index_LoopSchema as LoopSchema, index_MapSchema as MapSchema, ResultSchema$1 as MappingResultSchema, mapping as MappingSchemas, index_MatchExpressionSchema as MatchExpressionSchema, matcher as MatcherSchemas, index_NextRuleSchema as NextRuleSchema, index_OptionalPrimitiveValue as OptionalPrimitiveValue, index_OrderedPropertiesSchema as OrderedPropertiesSchema, type index_PackageInfo as PackageInfo, index_PartialEventSchema as PartialEventSchema, index_PolicySchema as PolicySchema, index_PrimaryConfig as PrimaryConfig, index_PrimitiveSchema as PrimitiveSchema, index_PrimitiveValue as PrimitiveValue, index_ProcessingControlConfig as ProcessingControlConfig, index_PropertiesSchema as PropertiesSchema, type index_PropertyDef as PropertyDef, index_PropertySchema as PropertySchema, index_PropertyTypeSchema as PropertyTypeSchema, index_QueueConfig as QueueConfig, index_RequiredBoolean as RequiredBoolean, index_RequiredNumber as RequiredNumber, index_RequiredString as RequiredString, index_RoutableNextSchema as RoutableNextSchema, index_RuleSchema as RuleSchema, index_RulesSchema as RulesSchema, index_RuntimeInstanceConfig as RuntimeInstanceConfig, index_SetSchema as SetSchema, index_SourceReferenceSchema as SourceReferenceSchema, index_SourceSchema as SourceSchema, source as SourceSchemas, index_SourceTypeSchema as SourceTypeSchema, index_SourcesMapConfig as SourcesMapConfig, index_StoreReferenceSchema as StoreReferenceSchema, index_TaggingVersion as TaggingVersion, index_Timestamp as Timestamp, index_TransformerReferenceSchema as TransformerReferenceSchema, index_UserSchema as UserSchema, utilities as UtilitySchemas, type index_ValidationIssue as ValidationIssue, type index_ValidationResult as ValidationResult, index_ValueConfigSchema as ValueConfigSchema, index_ValueSchema as ValueSchema, index_ValuesSchema as ValuesSchema, index_VerboseConfig as VerboseConfig, index_VersionSchema as VersionSchema, walkeros as WalkerOSSchemas, index_configJsonSchema as configJsonSchema, index_consentJsonSchema as consentJsonSchema, index_contractEntryJsonSchema as contractEntryJsonSchema, index_contractJsonSchema as contractJsonSchema, index_createArraySchema as createArraySchema, index_createConsentConfig as createConsentConfig, index_createDataTransformationConfig as createDataTransformationConfig, index_createEnumSchema as createEnumSchema, index_createMappingRulesConfig as createMappingRulesConfig, index_createObjectSchema as createObjectSchema, index_createPolicyConfig as createPolicyConfig, index_createTupleSchema as createTupleSchema, index_destinationReferenceJsonSchema as destinationReferenceJsonSchema, index_entityJsonSchema as entityJsonSchema, index_eventJsonSchema as eventJsonSchema, index_loopJsonSchema as loopJsonSchema, index_mapJsonSchema as mapJsonSchema, index_orderedPropertiesJsonSchema as orderedPropertiesJsonSchema, index_parseConfig as parseConfig, index_parseSettings as parseSettings, index_partialEventJsonSchema as partialEventJsonSchema, index_policyJsonSchema as policyJsonSchema, index_propertiesJsonSchema as propertiesJsonSchema, index_ruleJsonSchema as ruleJsonSchema, index_rulesJsonSchema as rulesJsonSchema, index_safeParseConfig as safeParseConfig, index_safeParseSettings as safeParseSettings, index_setJsonSchema as setJsonSchema, index_settingsJsonSchema as settingsJsonSchema, index_sourceReferenceJsonSchema as sourceReferenceJsonSchema, index_sourceTypeJsonSchema as sourceTypeJsonSchema, index_storeReferenceJsonSchema as storeReferenceJsonSchema, index_transformerReferenceJsonSchema as transformerReferenceJsonSchema, index_userJsonSchema as userJsonSchema, index_validateFlowConfig as validateFlowConfig, index_valueConfigJsonSchema as valueConfigJsonSchema, index_valueJsonSchema as valueJsonSchema, index_z as z, index_zodToSchema as zodToSchema };
4822
4835
  }
4823
4836
 
4824
4837
  type PackageType = 'source' | 'destination' | 'transformer' | 'store';
@@ -4828,4 +4841,4 @@ interface PackageSchemas {
4828
4841
  }
4829
4842
  declare function mergeConfigSchema(type: PackageType, packageSchemas: PackageSchemas): Record<string, unknown>;
4830
4843
 
4831
- export { type JSONSchema, mergeConfigSchema, index as schemas, zodToSchema };
4844
+ export { ClickIdEntrySchema, type JSONSchema, mergeConfigSchema, index as schemas, zodToSchema };
package/dist/dev.js CHANGED
@@ -1 +1 @@
1
- "use strict";var e,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,r=(e,i)=>{for(var t in i)n(e,t,{get:i[t],enumerable:!0})},a={};r(a,{mergeConfigSchema:()=>Zi,schemas:()=>s,z:()=>c.z,zodToSchema:()=>Ki}),module.exports=(e=a,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let c of t(r))o.call(e,c)||c===a||n(e,c,{get:()=>r[c],enumerable:!(s=i(r,c))||s.enumerable});return e})(n({},"__esModule",{value:!0}),e));var s={};r(s,{BaseContextConfig:()=>$,BatchConfig:()=>V,CacheRuleSchema:()=>Kn,CacheSchema:()=>Xn,CacheSchemas:()=>Qn,CodeSchema:()=>Ni,CollectorSchemas:()=>un,ConsentSchema:()=>ne,ContractActionsSchema:()=>gi,ContractSchema:()=>zi,ContractSchemaEntry:()=>bi,Counter:()=>g,DeepPartialEventSchema:()=>le,DestinationReferenceSchema:()=>ui,DestinationSchemas:()=>Ue,DestinationsMapConfig:()=>G,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,FlowConfigSchema:()=>Si,FlowSchemas:()=>Wn,FlowSettingsSchema:()=>vi,GenericEnvConfig:()=>M,GenericSettingsConfig:()=>q,HandlersConfig:()=>R,HintSchema:()=>Li,HintsSchema:()=>qi,IdConfig:()=>I,Identifier:()=>m,InitConfig:()=>N,LoopSchema:()=>ye,MapSchema:()=>ke,MappingResultSchema:()=>Pe,MappingSchemas:()=>ze,MatchExpressionSchema:()=>Hn,MatcherSchemas:()=>An,NextRuleSchema:()=>_n,OptionalPrimitiveValue:()=>z,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PolicySchema:()=>je,PrimaryConfig:()=>L,PrimitiveSchema:()=>Yn,PrimitiveValue:()=>h,ProcessingControlConfig:()=>H,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,QueueConfig:()=>D,RequiredBoolean:()=>u,RequiredNumber:()=>p,RequiredString:()=>d,RoutableNextSchema:()=>Gn,RuleSchema:()=>Ce,RulesSchema:()=>Ee,RuntimeInstanceConfig:()=>A,SetSchema:()=>we,SourceReferenceSchema:()=>di,SourceSchema:()=>oe,SourceSchemas:()=>En,SourceTypeSchema:()=>ee,SourcesMapConfig:()=>F,StoreReferenceSchema:()=>mi,TaggingVersion:()=>f,Timestamp:()=>b,TransformerReferenceSchema:()=>pi,UserSchema:()=>ie,UtilitySchemas:()=>v,ValueConfigSchema:()=>xe,ValueSchema:()=>ve,ValuesSchema:()=>Se,VerboseConfig:()=>O,VersionSchema:()=>te,WalkerOSSchemas:()=>_,configJsonSchema:()=>ji,consentJsonSchema:()=>he,contractEntryJsonSchema:()=>Oi,contractJsonSchema:()=>Di,createArraySchema:()=>Gi,createConsentConfig:()=>W,createDataTransformationConfig:()=>T,createEnumSchema:()=>_i,createMappingRulesConfig:()=>U,createObjectSchema:()=>Hi,createPolicyConfig:()=>B,createTupleSchema:()=>Qi,destinationReferenceJsonSchema:()=>Ji,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,loopJsonSchema:()=>De,mapJsonSchema:()=>Ne,orderedPropertiesJsonSchema:()=>be,parseConfig:()=>yi,parseSettings:()=>ki,partialEventJsonSchema:()=>pe,policyJsonSchema:()=>Le,propertiesJsonSchema:()=>me,ruleJsonSchema:()=>qe,rulesJsonSchema:()=>Me,safeParseConfig:()=>wi,safeParseSettings:()=>xi,setJsonSchema:()=>Ie,settingsJsonSchema:()=>Ci,sourceReferenceJsonSchema:()=>Ei,sourceTypeJsonSchema:()=>fe,storeReferenceJsonSchema:()=>Ri,transformerReferenceJsonSchema:()=>Pi,userJsonSchema:()=>ue,validateFlowConfig:()=>Mi,valueConfigJsonSchema:()=>Oe,valueJsonSchema:()=>Re,z:()=>c.z,zodToSchema:()=>Ki});var c=require("zod");function l(e,n,i="draft-7"){return c.z.toJSONSchema(e,{target:i})}var d=c.z.string(),p=c.z.number(),u=c.z.boolean(),m=c.z.string().min(1),b=c.z.number().int().positive(),g=c.z.number().int().nonnegative(),f=c.z.number().describe("Tagging version number"),h=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]),z=h.optional(),v={};r(v,{ErrorHandlerSchema:()=>w,HandlerSchema:()=>x,LogHandlerSchema:()=>k,StorageSchema:()=>y,StorageTypeSchema:()=>S,errorHandlerJsonSchema:()=>E,handlerJsonSchema:()=>P,logHandlerJsonSchema:()=>J,storageJsonSchema:()=>C,storageTypeJsonSchema:()=>j});var S=c.z.enum(["local","session","cookie"]).describe("Storage mechanism: local, session, or cookie"),y=c.z.object({Local:c.z.literal("local"),Session:c.z.literal("session"),Cookie:c.z.literal("cookie")}).describe("Storage type constants for type-safe references"),w=c.z.any().describe("Error handler function: (error, state?) => void"),k=c.z.any().describe("Log handler function: (message, verbose?) => void"),x=c.z.object({Error:w.describe("Error handler function"),Log:k.describe("Log handler function")}).describe("Handler interface with error and log functions"),j=l(S),C=l(y),E=l(w),J=l(k),P=l(x),R=c.z.object({onError:w.optional().describe("Error handler function: (error, state?) => void"),onLog:k.optional().describe("Log handler function: (message, verbose?) => void")}).partial(),O=c.z.object({verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional()}).partial(),D=c.z.object({queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional()}).partial(),I=c.z.object({}).partial(),N=c.z.object({init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional()}).partial(),L=c.z.object({primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).partial(),q=c.z.object({settings:c.z.any().optional().describe("Implementation-specific configuration")}).partial(),M=c.z.object({env:c.z.any().optional().describe("Environment dependencies (platform-specific)")}).partial();function T(e,n){return c.z.object({data:c.z.union([e,n]).optional().describe("Data transformation rules")}).partial()}function U(e){return c.z.object({mapping:e.optional().describe("Event mapping rules")}).partial()}function B(e){return c.z.object({policy:e.optional().describe("Pre-processing policy rules")}).partial()}function W(e){return c.z.object({consent:e.optional().describe("Required consent states")}).partial()}var A=c.z.object({type:c.z.string().optional().describe("Instance type identifier"),config:c.z.unknown().describe("Instance configuration")}).partial(),$=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:c.z.unknown().describe("Configuration"),env:c.z.unknown().describe("Environment dependencies")}).partial(),V=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),batched:c.z.unknown().optional().describe("Batch of events to be processed")}).partial(),H=c.z.object({ignore:c.z.boolean().describe("Set to true to skip processing").optional(),condition:c.z.string().optional().describe("Condition function: return true to process")}).partial(),F=c.z.object({sources:c.z.record(c.z.string(),c.z.unknown()).describe("Map of source instances")}).partial(),G=c.z.object({destinations:c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination instances")}).partial(),_={};r(_,{ConsentSchema:()=>ne,DeepPartialEventSchema:()=>le,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,SourceSchema:()=>oe,SourceTypeSchema:()=>ee,UserSchema:()=>ie,VersionSchema:()=>te,consentJsonSchema:()=>he,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,orderedPropertiesJsonSchema:()=>be,partialEventJsonSchema:()=>pe,propertiesJsonSchema:()=>me,sourceTypeJsonSchema:()=>fe,userJsonSchema:()=>ue});var Q,K=c.z.lazy(()=>c.z.union([c.z.boolean(),c.z.string(),c.z.number(),c.z.record(c.z.string(),X)])),X=c.z.lazy(()=>c.z.union([K,c.z.array(K)])),Y=c.z.record(c.z.string(),X.optional()).describe("Flexible property collection with optional values"),Z=c.z.record(c.z.string(),c.z.tuple([X,c.z.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"),ee=c.z.union([c.z.enum(["web","server","app","other"]),c.z.string()]).describe("Source type: web, server, app, other, or custom"),ne=c.z.record(c.z.string(),c.z.boolean()).describe("Consent requirement mapping (group name → state)"),ie=Y.and(c.z.object({id:c.z.string().optional().describe("User identifier"),device:c.z.string().optional().describe("Device identifier"),session:c.z.string().optional().describe("Session identifier"),hash:c.z.string().optional().describe("Hashed identifier"),address:c.z.string().optional().describe("User address"),email:c.z.string().email().optional().describe("User email address"),phone:c.z.string().optional().describe("User phone number"),userAgent:c.z.string().optional().describe("Browser user agent string"),browser:c.z.string().optional().describe("Browser name"),browserVersion:c.z.string().optional().describe("Browser version"),deviceType:c.z.string().optional().describe("Device type (mobile, desktop, tablet)"),os:c.z.string().optional().describe("Operating system"),osVersion:c.z.string().optional().describe("Operating system version"),screenSize:c.z.string().optional().describe("Screen dimensions"),language:c.z.string().optional().describe("User language"),country:c.z.string().optional().describe("User country"),region:c.z.string().optional().describe("User region/state"),city:c.z.string().optional().describe("User city"),zip:c.z.string().optional().describe("User postal code"),timezone:c.z.string().optional().describe("User timezone"),ip:c.z.string().optional().describe("User IP address"),internal:c.z.boolean().optional().describe("Internal user flag (employee, test user)")})).describe("User identification and properties"),te=Y.and(c.z.object({source:d.describe('Walker implementation version (e.g., "2.0.0")'),tagging:f})).describe("Walker version information"),oe=Y.and(c.z.object({type:ee.describe("Source type identifier"),id:d.describe("Source identifier (typically URL on web)"),previous_id:d.describe("Previous source identifier (typically referrer on web)")})).describe("Event source information"),re=c.z.lazy(()=>c.z.object({entity:c.z.string().describe("Entity name"),data:Y.describe("Entity-specific properties"),nested:c.z.array(re).describe("Nested child entities"),context:Z.describe("Entity context data")})).describe("Nested entity structure with recursive nesting support"),ae=c.z.array(re).describe("Array of nested entities"),se=c.z.object({name:c.z.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'),data:Y.describe("Event-specific properties"),context:Z.describe("Ordered context properties with priorities"),globals:Y.describe("Global properties shared across events"),custom:Y.describe("Custom implementation-specific properties"),user:ie.describe("User identification and attributes"),nested:ae.describe("Related nested entities"),consent:ne.describe("Consent states at event time"),id:m.describe("Unique event identifier (timestamp-based)"),trigger:d.describe("Event trigger identifier"),entity:d.describe("Parsed entity from event name"),action:d.describe("Parsed action from event name"),timestamp:b.describe("Unix timestamp in milliseconds since epoch"),timing:p.describe("Event processing timing information"),group:d.describe("Event grouping identifier"),count:g.describe("Event count in session"),version:te.describe("Walker version information"),source:oe.describe("Event source information")}).describe("Complete walkerOS event structure"),ce=se.partial().describe("Partial event structure with all fields optional"),le=se.partial().describe("Partial event structure with all top-level fields optional"),de=l(se),pe=l(ce),ue=l(ie),me=l(Y),be=l(Z),ge=l(re),fe=l(ee),he=l(ne),ze={};r(ze,{ConfigSchema:()=>Je,LoopSchema:()=>ye,MapSchema:()=>ke,PolicySchema:()=>je,ResultSchema:()=>Pe,RuleSchema:()=>Ce,RulesSchema:()=>Ee,SetSchema:()=>we,ValueConfigSchema:()=>xe,ValueSchema:()=>ve,ValuesSchema:()=>Se,configJsonSchema:()=>Te,loopJsonSchema:()=>De,mapJsonSchema:()=>Ne,policyJsonSchema:()=>Le,ruleJsonSchema:()=>qe,rulesJsonSchema:()=>Me,setJsonSchema:()=>Ie,valueConfigJsonSchema:()=>Oe,valueJsonSchema:()=>Re});var ve=c.z.lazy(()=>c.z.union([c.z.string().describe('String value or property path (e.g., "data.id")'),c.z.number().describe("Numeric value"),c.z.boolean().describe("Boolean value"),c.z.lazy(()=>Q),c.z.array(ve).describe("Array of values")])),Se=c.z.array(ve).describe("Array of transformation values"),ye=c.z.lazy(()=>c.z.tuple([ve,ve]).describe("Loop transformation: [source, transform] tuple for array processing")),we=c.z.lazy(()=>c.z.array(ve).describe("Set: Array of values for selection or combination")),ke=c.z.lazy(()=>c.z.record(c.z.string(),ve).describe("Map: Object mapping keys to transformation values")),xe=Q=c.z.object({key:c.z.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'),value:c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).optional().describe("Static primitive value"),fn:c.z.string().optional().describe("Custom transformation function as string (serialized)"),map:ke.optional().describe("Object mapping: transform event data to structured output"),loop:ye.optional().describe("Loop transformation: [source, transform] for array processing"),set:we.optional().describe("Set of values: combine or select from multiple values"),consent:ne.optional().describe("Required consent states to include this value"),condition:c.z.string().optional().describe("Condition function as string: return true to include value"),validate:c.z.string().optional().describe("Validation function as string: return true if value is valid")}).refine(e=>Object.keys(e).length>0,{message:"ValueConfig must have at least one property"}).describe("Value transformation configuration with multiple strategies"),je=c.z.record(c.z.string(),ve).describe("Policy rules for event pre-processing (key → value mapping)"),Ce=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),condition:c.z.string().optional().describe("Condition function as string: return true to process event"),consent:ne.optional().describe("Required consent states to process this event"),settings:c.z.any().optional().describe("Destination-specific settings for this event mapping"),data:c.z.union([ve,Se]).optional().describe("Data transformation rules for event"),ignore:c.z.boolean().optional().describe("Set to true to skip processing this event"),name:c.z.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'),policy:je.optional().describe("Event-level policy overrides (applied after config-level policy)")}).describe("Mapping rule for specific entity-action combination"),Ee=c.z.record(c.z.string(),c.z.record(c.z.string(),c.z.union([Ce,c.z.array(Ce)])).optional()).describe('Event mapping rules: entity → action → Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*→*).'),Je=c.z.object({consent:ne.optional().describe("Required consent states to process any events"),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events"),mapping:Ee.optional().describe("Entity-action specific mapping rules"),policy:je.optional().describe("Pre-processing policy rules applied before mapping")}).describe("Shared mapping configuration for sources and destinations"),Pe=c.z.object({eventMapping:Ce.optional().describe("Resolved mapping rule for event"),mappingKey:c.z.string().optional().describe('Mapping key used (e.g., "product.view")')}).describe("Mapping resolution result"),Re=l(ve),Oe=l(xe),De=l(ye),Ie=l(we),Ne=l(ke),Le=l(je),qe=l(Ce),Me=l(Ee),Te=l(Je),Ue={};r(Ue,{BatchSchema:()=>_e,ConfigSchema:()=>Be,ContextSchema:()=>$e,DLQSchema:()=>on,DataSchema:()=>Qe,DestinationPolicySchema:()=>Ae,DestinationsSchema:()=>Ze,InitDestinationsSchema:()=>Ye,InitSchema:()=>Xe,InstanceSchema:()=>Ke,PartialConfigSchema:()=>We,PushBatchContextSchema:()=>He,PushContextSchema:()=>Ve,PushEventSchema:()=>Fe,PushEventsSchema:()=>Ge,PushResultSchema:()=>nn,RefSchema:()=>en,ResultSchema:()=>tn,batchJsonSchema:()=>ln,configJsonSchema:()=>rn,contextJsonSchema:()=>sn,instanceJsonSchema:()=>dn,partialConfigJsonSchema:()=>an,pushContextJsonSchema:()=>cn,resultJsonSchema:()=>pn});var Be=c.z.object({consent:ne.optional().describe("Required consent states to send events to this destination"),settings:c.z.any().describe("Implementation-specific configuration").optional(),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events for this destination"),env:c.z.any().describe("Environment dependencies (platform-specific)").optional(),id:m.describe("Destination instance identifier (defaults to destination key)").optional(),init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional(),mapping:Ee.optional().describe("Entity-action specific mapping rules for this destination"),policy:je.optional().describe("Pre-processing policy rules applied before event mapping"),queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional(),require:c.z.array(c.z.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'),logger:c.z.object({level:c.z.union([c.z.number(),c.z.enum(["ERROR","WARN","INFO","DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"),handler:c.z.any().optional().describe("Custom log handler function")}).optional().describe("Logger configuration (level, handler) to override the collector defaults"),onError:w.optional(),onLog:k.optional()}).describe("Destination configuration"),We=Be.partial().describe("Partial destination configuration with all fields optional"),Ae=je.describe("Destination policy rules for event pre-processing"),$e=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:Be.describe("Destination configuration"),data:c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data"),env:c.z.unknown().describe("Environment dependencies")}).describe("Destination context for init and push functions"),Ve=$e.extend({mapping:Ce.optional().describe("Resolved mapping rule for this specific event")}).describe("Push context with event-specific mapping"),He=Ve.describe("Batch push context with event-specific mapping"),Fe=c.z.object({event:se.describe("The event to process"),mapping:Ce.optional().describe("Mapping rule for this event")}).describe("Event with optional mapping for batch processing"),Ge=c.z.array(Fe).describe("Array of events with mappings"),_e=c.z.object({key:c.z.string().describe('Batch key (usually mapping key like "product.view")'),events:c.z.array(se).describe("Array of events in batch"),data:c.z.array(c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional()).describe("Transformed data for each event"),mapping:Ce.optional().describe("Shared mapping rule for batch")}).describe("Batch of events grouped by mapping key"),Qe=c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"),Ke=c.z.object({config:Be.describe("Destination configuration"),queue:c.z.array(se).optional().describe("Queued events awaiting consent"),dlq:c.z.array(c.z.tuple([se,c.z.unknown()])).optional().describe("Dead letter queue (failed events with errors)"),type:c.z.string().optional().describe("Destination type identifier"),env:c.z.unknown().optional().describe("Environment dependencies"),init:c.z.unknown().optional().describe("Initialization function"),push:c.z.unknown().describe("Push function for single events"),pushBatch:c.z.unknown().optional().describe("Batch push function"),on:c.z.unknown().optional().describe("Event lifecycle hook function")}).describe("Destination instance (runtime object with functions)"),Xe=c.z.object({code:Ke.describe("Destination instance with implementation"),config:We.optional().describe("Partial configuration overrides"),env:c.z.unknown().optional().describe("Partial environment overrides")}).describe("Destination initialization configuration"),Ye=c.z.record(c.z.string(),Xe).describe("Map of destination IDs to initialization configurations"),Ze=c.z.record(c.z.string(),Ke).describe("Map of destination IDs to runtime instances"),en=c.z.object({type:c.z.string().describe('Destination type ("gtag", "meta", "bigquery")'),data:c.z.unknown().optional().describe("Response from push()"),error:c.z.unknown().optional().describe("Error if failed")}).describe("Destination reference with type and response data"),nn=c.z.object({queue:c.z.array(se).optional().describe("Events queued (awaiting consent)"),error:c.z.unknown().optional().describe("Error if push failed")}).describe("Push operation result"),tn=c.z.object({ok:c.z.boolean().describe("True if nothing failed"),event:c.z.unknown().optional().describe("The processed event"),done:c.z.record(c.z.string(),en).optional().describe("Destinations that processed successfully"),queued:c.z.record(c.z.string(),en).optional().describe("Destinations that queued events"),failed:c.z.record(c.z.string(),en).optional().describe("Destinations that failed to process")}).describe("Push result with destination outcomes"),on=c.z.array(c.z.tuple([se,c.z.unknown()])).describe("Dead letter queue: [(event, error), ...]"),rn=l(Be),an=l(We),sn=l($e),cn=l(Ve),ln=l(_e),dn=l(Ke),pn=l(tn),un={};r(un,{CommandTypeSchema:()=>mn,ConfigSchema:()=>bn,DestinationsSchema:()=>vn,InitConfigSchema:()=>fn,InstanceSchema:()=>Sn,PushContextSchema:()=>hn,SessionDataSchema:()=>gn,SourcesSchema:()=>zn,commandTypeJsonSchema:()=>yn,configJsonSchema:()=>wn,initConfigJsonSchema:()=>xn,instanceJsonSchema:()=>Cn,pushContextJsonSchema:()=>jn,sessionDataJsonSchema:()=>kn});var mn=c.z.union([c.z.enum(["action","config","consent","context","destination","elb","globals","hook","init","link","run","user","walker"]),c.z.string()]).describe("Collector command type: standard commands or custom string for extensions"),bn=c.z.object({run:c.z.boolean().describe("Whether to run collector automatically on initialization").optional(),tagging:f,globalsStatic:Y.describe("Static global properties that persist across collector runs"),sessionStatic:c.z.record(c.z.string(),c.z.unknown()).describe("Static session data that persists across collector runs"),verbose:c.z.boolean().describe("Enable verbose logging for debugging"),onError:w.optional(),onLog:k.optional()}).describe("Core collector configuration"),gn=Y.and(c.z.object({isStart:c.z.boolean().describe("Whether this is a new session start"),storage:c.z.boolean().describe("Whether storage is available"),id:m.describe("Session identifier").optional(),start:b.describe("Session start timestamp").optional(),marketing:c.z.literal(!0).optional().describe("Marketing attribution flag"),updated:b.describe("Last update timestamp").optional(),isNew:c.z.boolean().describe("Whether this is a new session").optional(),device:m.describe("Device identifier").optional(),count:g.describe("Event count in session").optional(),runs:g.describe("Number of runs").optional()})).describe("Session state and tracking data"),fn=bn.partial().extend({consent:ne.optional().describe("Initial consent state"),user:ie.optional().describe("Initial user data"),globals:Y.optional().describe("Initial global properties"),sources:c.z.unknown().optional().describe("Source configurations"),destinations:c.z.unknown().optional().describe("Destination configurations"),custom:Y.optional().describe("Initial custom implementation-specific properties")}).describe("Collector initialization configuration with initial state"),hn=c.z.object({mapping:Je.optional().describe("Source-level mapping configuration")}).describe("Push context with optional source mapping"),zn=c.z.record(c.z.string(),c.z.unknown()).describe("Map of source IDs to source instances"),vn=c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination IDs to destination instances"),Sn=c.z.object({push:c.z.unknown().describe("Push function for processing events"),command:c.z.unknown().describe("Command function for walker commands"),allowed:c.z.boolean().describe("Whether event processing is allowed"),config:bn.describe("Current collector configuration"),consent:ne.describe("Current consent state"),count:c.z.number().describe("Event count (increments with each event)"),custom:Y.describe("Custom implementation-specific properties"),sources:zn.describe("Registered source instances"),destinations:vn.describe("Registered destination instances"),globals:Y.describe("Current global properties"),group:c.z.string().describe("Event grouping identifier"),hooks:c.z.unknown().describe("Lifecycle hook functions"),on:c.z.unknown().describe("Event lifecycle configuration"),queue:c.z.array(se).describe("Queued events awaiting processing"),round:c.z.number().describe("Collector run count (increments with each run)"),session:c.z.union([gn]).describe("Current session state"),timing:c.z.number().describe("Event processing timing information"),user:ie.describe("Current user data"),version:c.z.string().describe("Walker implementation version")}).describe("Collector instance with state and methods"),yn=l(mn),wn=l(bn),kn=l(gn),xn=l(fn),jn=l(hn),Cn=l(Sn),En={};r(En,{BaseEnvSchema:()=>Jn,ConfigSchema:()=>Pn,InitSchema:()=>Dn,InitSourceSchema:()=>In,InitSourcesSchema:()=>Nn,InstanceSchema:()=>On,PartialConfigSchema:()=>Rn,baseEnvJsonSchema:()=>Ln,configJsonSchema:()=>qn,initSourceJsonSchema:()=>Un,initSourcesJsonSchema:()=>Bn,instanceJsonSchema:()=>Tn,partialConfigJsonSchema:()=>Mn});var Jn=c.z.object({push:c.z.unknown().describe("Collector push function"),command:c.z.unknown().describe("Collector command function"),sources:c.z.unknown().optional().describe("Map of registered source instances"),elb:c.z.unknown().describe("Public API function (alias for collector.push)")}).catchall(c.z.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"),Pn=Je.extend({settings:c.z.any().describe("Implementation-specific configuration").optional(),env:Jn.optional().describe("Environment dependencies (platform-specific)"),id:m.describe("Source identifier (defaults to source key)").optional(),onError:w.optional(),primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional(),require:c.z.array(c.z.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'),logger:c.z.object({level:c.z.union([c.z.number(),c.z.enum(["ERROR","WARN","INFO","DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"),handler:c.z.any().optional().describe("Custom log handler function")}).optional().describe("Logger configuration (level, handler) to override the collector defaults"),ingest:c.z.union([ve,Se]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax.")}).describe("Source configuration with mapping and environment"),Rn=Pn.partial().describe("Partial source configuration with all fields optional"),On=c.z.object({type:c.z.string().describe('Source type identifier (e.g., "browser", "dataLayer")'),config:Pn.describe("Current source configuration"),push:c.z.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"),destroy:c.z.any().optional().describe("Cleanup function called when source is removed"),on:c.z.unknown().optional().describe("Lifecycle hook function for event types")}).describe("Source instance with push handler and lifecycle methods"),Dn=c.z.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>"),In=c.z.object({code:Dn.describe("Source initialization function"),config:Rn.optional().describe("Partial configuration overrides"),env:Jn.partial().optional().describe("Partial environment overrides"),primary:c.z.boolean().optional().describe("Mark as primary source (only one can be primary)")}).describe("Source initialization configuration"),Nn=c.z.record(c.z.string(),In).describe("Map of source IDs to initialization configurations"),Ln=l(Jn),qn=l(Pn),Mn=l(Rn),Tn=l(On),Un=l(In),Bn=l(Nn),Wn={};r(Wn,{BundleSchema:()=>oi,ConfigSchema:()=>Si,ContractActionsSchema:()=>gi,ContractEntrySchema:()=>hi,ContractEventsSchema:()=>fi,ContractSchema:()=>zi,ContractSchemaEntry:()=>bi,DefinitionsSchema:()=>ei,DestinationReferenceSchema:()=>ui,InlineCodeSchema:()=>si,OverridesSchema:()=>ti,PackagesSchema:()=>ii,PrimitiveSchema:()=>Yn,ServerSchema:()=>ai,SettingsSchema:()=>vi,SourceReferenceSchema:()=>di,StepExampleSchema:()=>ci,StepExamplesSchema:()=>li,StoreReferenceSchema:()=>mi,TransformerReferenceSchema:()=>pi,VariablesSchema:()=>Zn,WebSchema:()=>ri,configJsonSchema:()=>ji,contractEntryJsonSchema:()=>Oi,contractJsonSchema:()=>Di,destinationReferenceJsonSchema:()=>Ji,parseConfig:()=>yi,parseSettings:()=>ki,safeParseConfig:()=>wi,safeParseSettings:()=>xi,settingsJsonSchema:()=>Ci,sourceReferenceJsonSchema:()=>Ei,storeReferenceJsonSchema:()=>Ri,transformerReferenceJsonSchema:()=>Pi});var An={};r(An,{MatchExpressionSchema:()=>Hn,NextRuleSchema:()=>_n,RoutableNextSchema:()=>Gn});var $n=c.z.enum(["eq","contains","prefix","suffix","regex","gt","lt","exists"]),Vn=c.z.object({key:c.z.string(),operator:$n,value:c.z.string(),not:c.z.boolean().optional()}),Hn=c.z.union([Vn,c.z.object({and:c.z.array(c.z.lazy(()=>Hn))}),c.z.object({or:c.z.array(c.z.lazy(()=>Hn))})]),Fn=c.z.union([Hn,c.z.literal("*")]),Gn=c.z.union([c.z.string(),c.z.array(c.z.string()),c.z.array(c.z.object({match:Fn,next:c.z.lazy(()=>Gn)}))]),_n=c.z.object({match:Fn,next:c.z.lazy(()=>Gn)}),Qn={};r(Qn,{CacheRuleSchema:()=>Kn,CacheSchema:()=>Xn});var Kn=c.z.object({match:c.z.union([Hn,c.z.literal("*")]).describe("Match expression or wildcard to determine when this rule applies"),key:c.z.array(c.z.string()).min(1).describe("Dot-path fields used to build the cache key"),ttl:c.z.number().positive().describe("Time-to-live in seconds for cached entries"),update:c.z.record(c.z.string(),ve).optional().describe("Response mutations applied on cache hit (key → Value mapping)")}),Xn=c.z.object({full:c.z.boolean().optional().describe("Stop flow on cache HIT (default: false). When true, skip remaining steps and return cached value."),store:c.z.string().optional().describe("Store ID for persistent caching (references a configured store)"),rules:c.z.array(Kn).min(1).describe("Cache rules — at least one required")}),Yn=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).describe("Primitive value: string, number, or boolean"),Zn=c.z.record(c.z.string(),Yn).describe("Variables for interpolation"),ei=c.z.record(c.z.string(),c.z.unknown()).describe("Reusable configuration definitions"),ni=/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/,ii=c.z.record(c.z.string().regex(ni,"Invalid npm package name"),c.z.object({version:c.z.string().optional(),imports:c.z.array(c.z.string()).optional(),path:c.z.string().optional()})).describe("NPM packages to bundle"),ti=c.z.record(c.z.string().regex(ni,"Invalid npm package name"),c.z.string().min(1,"Override version cannot be empty")).describe("Transitive dependency version overrides"),oi=c.z.object({packages:ii.optional().describe("NPM packages to bundle"),overrides:ti.optional().describe("Transitive dependency overrides")}).strict().describe("Bundle configuration (packages + overrides)"),ri=c.z.object({windowCollector:c.z.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'),windowElb:c.z.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")')}).describe("Web platform configuration"),ai=c.z.object({}).passthrough().describe("Server platform configuration (reserved for future options)"),si=c.z.object({push:c.z.string().min(1,"Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'),type:c.z.string().optional().describe("Optional type identifier for the inline instance"),init:c.z.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.")}).describe("Inline code for custom sources/transformers/destinations"),ci=c.z.object({description:c.z.string().optional().describe("Human-readable description"),in:c.z.unknown().optional().describe("Input to the step"),trigger:c.z.object({type:c.z.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"),options:c.z.unknown().optional().describe("Mechanism-specific options")}).optional().describe("Source trigger metadata"),mapping:c.z.unknown().optional().describe("Mapping configuration"),out:c.z.unknown().optional().describe("Expected output from the step"),command:c.z.enum(["config","consent","user","run"]).optional().describe("Invoke elb('walker <command>', in) instead of pushing in as an event")}).describe("Named example with input/output pair"),li=c.z.record(c.z.string(),ci).describe("Named step examples for testing and documentation"),di=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'),config:c.z.unknown().optional().describe("Source-specific configuration object"),env:c.z.unknown().optional().describe("Source environment configuration"),primary:c.z.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."),variables:Zn.optional().describe("Source-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Source-level definitions (highest priority in cascade)"),next:Gn.optional().describe("Pre-collector transformer chain. String, string[], or NextRule[] for conditional routing based on ingest data."),before:Gn.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this source (match → key → ttl rules)")}).describe("Source package reference with configuration"),pi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'),config:c.z.unknown().optional().describe("Transformer-specific configuration object"),env:c.z.unknown().optional().describe("Transformer environment configuration"),before:Gn.optional().describe("Pre-transformer chain. Runs before this transformer push function."),next:Gn.optional().describe("Next transformer in chain. String, string[], or NextRule[] for conditional routing."),variables:Zn.optional().describe("Transformer-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Transformer-level definitions (highest priority in cascade)"),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this transformer (match → key → ttl rules)")}).describe("Transformer package reference with configuration"),ui=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'),config:c.z.unknown().optional().describe("Destination-specific configuration object"),env:c.z.unknown().optional().describe("Destination environment configuration"),variables:Zn.optional().describe("Destination-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Destination-level definitions (highest priority in cascade)"),before:Gn.optional().describe("Post-collector transformer chain. String, string[], or NextRule[] for conditional routing."),next:Gn.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this destination (match → key → ttl rules)")}).describe("Destination package reference with configuration"),mi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe("Store package specifier with optional version"),code:c.z.union([c.z.string(),si]).optional().describe("Named export string or inline code definition"),config:c.z.unknown().optional().describe("Store-specific configuration object"),env:c.z.unknown().optional().describe("Store environment configuration"),variables:Zn.optional().describe("Store-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Store-level definitions (highest priority in cascade)"),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)")}).describe("Store package reference with configuration"),bi=c.z.record(c.z.string(),c.z.unknown()).describe("JSON Schema object for event validation with description/examples annotations"),gi=c.z.record(c.z.string(),bi).describe("Action-level contract entries"),fi=c.z.record(c.z.string(),gi).describe("Entity-action event schemas"),hi=c.z.object({extends:c.z.string().optional().describe("Inherit from another named contract"),tagging:c.z.number().int().min(0).optional().describe("Contract version number"),description:c.z.string().optional().describe("Human-readable description"),globals:bi.optional().describe("JSON Schema for event.globals"),context:bi.optional().describe("JSON Schema for event.context"),custom:bi.optional().describe("JSON Schema for event.custom"),user:bi.optional().describe("JSON Schema for event.user"),consent:bi.optional().describe("JSON Schema for event.consent"),events:fi.optional().describe("Entity-action event schemas")}).describe("Named contract entry with optional sections and events"),zi=c.z.record(c.z.string(),hi).describe("Named contracts with optional extends inheritance"),vi=c.z.object({web:ri.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."),server:ai.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."),sources:c.z.record(c.z.string(),di).optional().describe("Source configurations (data capture) keyed by unique identifier"),destinations:c.z.record(c.z.string(),ui).optional().describe("Destination configurations (data output) keyed by unique identifier"),transformers:c.z.record(c.z.string(),pi).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"),stores:c.z.record(c.z.string(),mi).optional().describe("Store configurations (key-value storage) keyed by unique identifier"),collector:c.z.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"),bundle:oi.optional().describe("Build-time configuration (packages + overrides)"),packages:c.z.unknown().optional().refine(e=>void 0===e,{message:"`packages` must live under `bundle.packages`. Move your packages block to `flow.<name>.bundle.packages`. This is a breaking change — see CHANGELOG migration guide."}).describe("Legacy top-level packages (moved to bundle.packages)"),variables:Zn.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"),definitions:ei.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)")}).refine(e=>{const n=void 0!==e.web,i=void 0!==e.server;return(n||i)&&!(n&&i)},{message:'Exactly one of "web" or "server" must be present'}).describe("Single flow settings for one deployment target"),Si=c.z.object({$schema:c.z.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'),include:c.z.array(c.z.string()).optional().describe("Folders to include in the bundle output"),variables:Zn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"),definitions:ei.optional().describe("Reusable configuration definitions (use $def.name syntax)"),flows:c.z.record(c.z.string(),vi).refine(e=>Object.keys(e).length>0,{message:"At least one flow is required"}).describe("Named flow configurations (e.g., production, staging, development)")}).extend({version:c.z.literal(3).describe("Configuration schema version"),contract:zi.optional().describe("Named contracts with extends inheritance and dot-path references")}).describe("walkerOS flow configuration (walkeros.config.json)");function yi(e){return Si.parse(e)}function wi(e){return Si.safeParse(e)}function ki(e){return vi.parse(e)}function xi(e){return vi.safeParse(e)}var ji=c.z.toJSONSchema(Si,{target:"draft-7"}),Ci=l(vi),Ei=l(di),Ji=l(ui),Pi=l(pi),Ri=l(mi),Oi=l(hi),Di=l(zi),Ii=require("zod"),Ni=Ii.z.object({lang:Ii.z.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"),code:Ii.z.string().describe("Code snippet")}),Li=Ii.z.object({text:Ii.z.string().describe("Short actionable hint text focused on walkerOS usage"),code:Ii.z.array(Ni).optional().describe("Optional code snippets")}),qi=Ii.z.record(Ii.z.string(),Li).describe("Keyed hints for AI consumption — lightweight context beyond schemas and examples");function Mi(e){let n;try{n=JSON.parse(e)}catch(n){const{line:i,column:t}=function(e,n){if(e instanceof SyntaxError){const i=e.message.match(/position\s+(\d+)/);if(i){return Ti(n,parseInt(i[1],10))}const t=e.message.match(/line\s+(\d+)\s+column\s+(\d+)/);if(t)return{line:parseInt(t[1],10),column:parseInt(t[2],10)}}return{line:1,column:1}}(n,e);return{valid:!1,errors:[{message:n instanceof Error?n.message:"Invalid JSON",severity:"error",line:i,column:t}],warnings:[]}}const i=[],t=[],o=Si.safeParse(n);if(!o.success)for(const n of o.error.issues){const t=n.path.join("."),o=Bi(e,n.path);i.push({message:n.message,severity:"error",path:t||"root",...o})}const r=function(e){if(!(Wi(e)&&"version"in e&&"flows"in e&&Wi(e.flows)))return;const n={},i={},t=[],o=[],r=[],a=[],s=[];let c;$i(n,e.variables),Vi(i,e.definitions),function(e,n){if(!Wi(n))return;for(const[,i]of Object.entries(n)){if(!Wi(i))continue;const n=i.events;if(Wi(n))for(const[i,t]of Object.entries(n)){if(!Wi(t))continue;const n=e.find(e=>e.entity===i),o=Object.keys(t);if(n)for(const e of o)n.actions.includes(e)||n.actions.push(e);else e.push({entity:i,actions:o})}}}(s,e.contract);for(const s of Object.values(e.flows))if(Wi(s)){c||("web"in s?c="web":"server"in s&&(c="server")),$i(n,s.variables),Vi(i,s.definitions);for(const e of["sources","destinations","transformers"]){const l="sources"===e?"source":"destinations"===e?"destination":"transformer",d="sources"===e?t:"destinations"===e?o:r;if(Wi(s[e]))for(const[t,o]of Object.entries(s[e]))d.push(t),Wi(o)&&($i(n,o.variables),Vi(i,o.definitions),"string"==typeof o.package&&a.push({package:o.package,shortName:t,type:l,platform:c||"web"}))}}const l={variables:n,definitions:i,stepNames:{sources:t,destinations:o,transformers:r}};c&&(l.platform=c);a.length>0&&(l.packages=a);s.length>0&&(l.contract=s);return l}(n);if(r){const n=function(e,n){const i=[];if(n.variables){const t=/\$var\.(\w+)/g;let o;for(;null!==(o=t.exec(e));)if(!(o[1]in n.variables)){const t=Ui(e,o.index,o[0].length);i.push({message:`Unknown variable "$var.${o[1]}". Defined: ${Object.keys(n.variables).join(", ")||"none"}`,severity:"warning",path:`$var.${o[1]}`,...t})}}if(n.definitions){const t=/\$def\.(\w+)/g;let o;for(;null!==(o=t.exec(e));)if(!(o[1]in n.definitions)){const t=Ui(e,o.index,o[0].length);i.push({message:`Unknown definition "$def.${o[1]}". Defined: ${Object.keys(n.definitions).join(", ")||"none"}`,severity:"warning",path:`$def.${o[1]}`,...t})}}return i}(e,r);t.push(...n)}return{valid:0===i.length,errors:i,warnings:t,context:r}}function Ti(e,n){let i=1,t=1;for(let o=0;o<n&&o<e.length;o++)"\n"===e[o]?(i++,t=1):t++;return{line:i,column:t}}function Ui(e,n,i){const t=Ti(e,n),o=Ti(e,n+i);return{line:t.line,column:t.column,endLine:o.line,endColumn:o.column}}function Bi(e,n){if(0===n.length)return{line:1,column:1};const i=n[n.length-1];if("string"==typeof i){const n=`"${i}"`,t=e.lastIndexOf(n);if(-1!==t)return Ti(e,t)}return{line:1,column:1}}function Wi(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function Ai(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function $i(e,n){if(Wi(n))for(const[i,t]of Object.entries(n))Ai(t)&&(e[i]=t)}function Vi(e,n){if(Wi(n))for(const[i,t]of Object.entries(n))e[i]=t}function Hi(e,n){const i=[],t={};for(const[n,o]of Object.entries(e)){o.required&&i.push(n);const e={type:o.type};if(o.description&&(e.description=o.description),o.pattern&&(e.pattern=o.pattern),void 0!==o.minLength&&(e.minLength=o.minLength),void 0!==o.maxLength&&(e.maxLength=o.maxLength),void 0!==o.minimum&&(e.minimum=o.minimum),void 0!==o.maximum&&(e.maximum=o.maximum),o.enum&&(e.enum=[...o.enum]),void 0!==o.default&&(e.default=o.default),"object"===o.type&&o.properties){const n={};for(const[e,i]of Object.entries(o.properties))n[e]=Fi(i);e.properties=n}"array"===o.type&&o.items&&(e.items=Fi(o.items)),t[n]=e}const o={type:"object",properties:t};return n&&(o.title=n),i.length>0&&(o.required=i),o}function Fi(e){const n={type:e.type};if(e.description&&(n.description=e.description),e.pattern&&(n.pattern=e.pattern),void 0!==e.minLength&&(n.minLength=e.minLength),void 0!==e.maxLength&&(n.maxLength=e.maxLength),void 0!==e.minimum&&(n.minimum=e.minimum),void 0!==e.maximum&&(n.maximum=e.maximum),e.enum&&(n.enum=[...e.enum]),void 0!==e.default&&(n.default=e.default),"object"===e.type&&e.properties){const i={};for(const[n,t]of Object.entries(e.properties))i[n]=Fi(t);n.properties=i}return"array"===e.type&&e.items&&(n.items=Fi(e.items)),n}function Gi(e,n){const i={type:"array",items:Fi(e)};return void 0!==n?.minItems&&(i.minItems=n.minItems),void 0!==n?.maxItems&&(i.maxItems=n.maxItems),n?.description&&(i.description=n.description),n?.title&&(i.title=n.title),i}function _i(e,n="string",i){const t={type:n,enum:[...e]};return i?.description&&(t.description=i.description),i?.title&&(t.title=i.title),t}function Qi(e,n,i){return Gi({type:"object"},{minItems:2,maxItems:2,description:i||"Tuple with exactly 2 elements [source, transform]"})}function Ki(e){return c.z.toJSONSchema(e,{target:"draft-7"})}var Xi=new Set(["env","onError","onLog","primary"]),Yi={source:En.configJsonSchema,destination:Ue.configJsonSchema};function Zi(e,n){const i=Yi[e];if(!i||!i.properties){return{type:"object",properties:{settings:n.settings?et(n.settings):{description:"Implementation-specific configuration"}}}}const t=JSON.parse(JSON.stringify(i)),o=t.properties;for(const e of Xi)delete o[e];return n.settings&&(o.settings=et(n.settings)),t}function et(e){const{$schema:n,...i}=e;return i}//# sourceMappingURL=dev.js.map
1
+ "use strict";var e,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.prototype.hasOwnProperty,r=(e,i)=>{for(var t in i)n(e,t,{get:i[t],enumerable:!0})},a={};r(a,{ClickIdEntrySchema:()=>qi,mergeConfigSchema:()=>et,schemas:()=>s,z:()=>c.z,zodToSchema:()=>Xi}),module.exports=(e=a,((e,r,a,s)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let c of t(r))o.call(e,c)||c===a||n(e,c,{get:()=>r[c],enumerable:!(s=i(r,c))||s.enumerable});return e})(n({},"__esModule",{value:!0}),e));var s={};r(s,{BaseContextConfig:()=>$,BatchConfig:()=>V,CacheRuleSchema:()=>Kn,CacheSchema:()=>Xn,CacheSchemas:()=>Qn,ClickIdEntrySchema:()=>qi,CodeSchema:()=>Ni,CollectorSchemas:()=>un,ConsentSchema:()=>ne,ContractActionsSchema:()=>gi,ContractSchema:()=>zi,ContractSchemaEntry:()=>bi,Counter:()=>g,DeepPartialEventSchema:()=>le,DestinationReferenceSchema:()=>ui,DestinationSchemas:()=>Ue,DestinationsMapConfig:()=>G,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,FlowConfigSchema:()=>Si,FlowSchemas:()=>Wn,FlowSettingsSchema:()=>vi,GenericEnvConfig:()=>q,GenericSettingsConfig:()=>M,HandlersConfig:()=>R,HintSchema:()=>Li,HintsSchema:()=>Mi,IdConfig:()=>D,Identifier:()=>m,InitConfig:()=>N,LoopSchema:()=>ye,MapSchema:()=>ke,MappingResultSchema:()=>Pe,MappingSchemas:()=>ze,MatchExpressionSchema:()=>Hn,MatcherSchemas:()=>An,NextRuleSchema:()=>_n,OptionalPrimitiveValue:()=>z,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PolicySchema:()=>je,PrimaryConfig:()=>L,PrimitiveSchema:()=>Yn,PrimitiveValue:()=>h,ProcessingControlConfig:()=>H,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,QueueConfig:()=>O,RequiredBoolean:()=>u,RequiredNumber:()=>p,RequiredString:()=>d,RoutableNextSchema:()=>Gn,RuleSchema:()=>Ce,RulesSchema:()=>Ee,RuntimeInstanceConfig:()=>A,SetSchema:()=>we,SourceReferenceSchema:()=>di,SourceSchema:()=>oe,SourceSchemas:()=>En,SourceTypeSchema:()=>ee,SourcesMapConfig:()=>F,StoreReferenceSchema:()=>mi,TaggingVersion:()=>f,Timestamp:()=>b,TransformerReferenceSchema:()=>pi,UserSchema:()=>ie,UtilitySchemas:()=>v,ValueConfigSchema:()=>xe,ValueSchema:()=>ve,ValuesSchema:()=>Se,VerboseConfig:()=>I,VersionSchema:()=>te,WalkerOSSchemas:()=>_,configJsonSchema:()=>ji,consentJsonSchema:()=>he,contractEntryJsonSchema:()=>Ii,contractJsonSchema:()=>Oi,createArraySchema:()=>_i,createConsentConfig:()=>W,createDataTransformationConfig:()=>T,createEnumSchema:()=>Qi,createMappingRulesConfig:()=>U,createObjectSchema:()=>Fi,createPolicyConfig:()=>B,createTupleSchema:()=>Ki,destinationReferenceJsonSchema:()=>Ji,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,loopJsonSchema:()=>Oe,mapJsonSchema:()=>Ne,orderedPropertiesJsonSchema:()=>be,parseConfig:()=>yi,parseSettings:()=>ki,partialEventJsonSchema:()=>pe,policyJsonSchema:()=>Le,propertiesJsonSchema:()=>me,ruleJsonSchema:()=>Me,rulesJsonSchema:()=>qe,safeParseConfig:()=>wi,safeParseSettings:()=>xi,setJsonSchema:()=>De,settingsJsonSchema:()=>Ci,sourceReferenceJsonSchema:()=>Ei,sourceTypeJsonSchema:()=>fe,storeReferenceJsonSchema:()=>Ri,transformerReferenceJsonSchema:()=>Pi,userJsonSchema:()=>ue,validateFlowConfig:()=>Ti,valueConfigJsonSchema:()=>Ie,valueJsonSchema:()=>Re,z:()=>c.z,zodToSchema:()=>Xi});var c=require("zod");function l(e,n,i="draft-7"){return c.z.toJSONSchema(e,{target:i})}var d=c.z.string(),p=c.z.number(),u=c.z.boolean(),m=c.z.string().min(1),b=c.z.number().int().positive(),g=c.z.number().int().nonnegative(),f=c.z.number().describe("Tagging version number"),h=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]),z=h.optional(),v={};r(v,{ErrorHandlerSchema:()=>w,HandlerSchema:()=>x,LogHandlerSchema:()=>k,StorageSchema:()=>y,StorageTypeSchema:()=>S,errorHandlerJsonSchema:()=>E,handlerJsonSchema:()=>P,logHandlerJsonSchema:()=>J,storageJsonSchema:()=>C,storageTypeJsonSchema:()=>j});var S=c.z.enum(["local","session","cookie"]).describe("Storage mechanism: local, session, or cookie"),y=c.z.object({Local:c.z.literal("local"),Session:c.z.literal("session"),Cookie:c.z.literal("cookie")}).describe("Storage type constants for type-safe references"),w=c.z.any().describe("Error handler function: (error, state?) => void"),k=c.z.any().describe("Log handler function: (message, verbose?) => void"),x=c.z.object({Error:w.describe("Error handler function"),Log:k.describe("Log handler function")}).describe("Handler interface with error and log functions"),j=l(S),C=l(y),E=l(w),J=l(k),P=l(x),R=c.z.object({onError:w.optional().describe("Error handler function: (error, state?) => void"),onLog:k.optional().describe("Log handler function: (message, verbose?) => void")}).partial(),I=c.z.object({verbose:c.z.boolean().describe("Enable verbose logging for debugging").optional()}).partial(),O=c.z.object({queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional()}).partial(),D=c.z.object({}).partial(),N=c.z.object({init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional()}).partial(),L=c.z.object({primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional()}).partial(),M=c.z.object({settings:c.z.any().optional().describe("Implementation-specific configuration")}).partial(),q=c.z.object({env:c.z.any().optional().describe("Environment dependencies (platform-specific)")}).partial();function T(e,n){return c.z.object({data:c.z.union([e,n]).optional().describe("Data transformation rules")}).partial()}function U(e){return c.z.object({mapping:e.optional().describe("Event mapping rules")}).partial()}function B(e){return c.z.object({policy:e.optional().describe("Pre-processing policy rules")}).partial()}function W(e){return c.z.object({consent:e.optional().describe("Required consent states")}).partial()}var A=c.z.object({type:c.z.string().optional().describe("Instance type identifier"),config:c.z.unknown().describe("Instance configuration")}).partial(),$=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:c.z.unknown().describe("Configuration"),env:c.z.unknown().describe("Environment dependencies")}).partial(),V=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),batched:c.z.unknown().optional().describe("Batch of events to be processed")}).partial(),H=c.z.object({ignore:c.z.boolean().describe("Set to true to skip processing").optional(),condition:c.z.string().optional().describe("Condition function: return true to process")}).partial(),F=c.z.object({sources:c.z.record(c.z.string(),c.z.unknown()).describe("Map of source instances")}).partial(),G=c.z.object({destinations:c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination instances")}).partial(),_={};r(_,{ConsentSchema:()=>ne,DeepPartialEventSchema:()=>le,EntitiesSchema:()=>ae,EntitySchema:()=>re,EventSchema:()=>se,OrderedPropertiesSchema:()=>Z,PartialEventSchema:()=>ce,PropertiesSchema:()=>Y,PropertySchema:()=>X,PropertyTypeSchema:()=>K,SourceSchema:()=>oe,SourceTypeSchema:()=>ee,UserSchema:()=>ie,VersionSchema:()=>te,consentJsonSchema:()=>he,entityJsonSchema:()=>ge,eventJsonSchema:()=>de,orderedPropertiesJsonSchema:()=>be,partialEventJsonSchema:()=>pe,propertiesJsonSchema:()=>me,sourceTypeJsonSchema:()=>fe,userJsonSchema:()=>ue});var Q,K=c.z.lazy(()=>c.z.union([c.z.boolean(),c.z.string(),c.z.number(),c.z.record(c.z.string(),X)])),X=c.z.lazy(()=>c.z.union([K,c.z.array(K)])),Y=c.z.record(c.z.string(),X.optional()).describe("Flexible property collection with optional values"),Z=c.z.record(c.z.string(),c.z.tuple([X,c.z.number()]).optional()).describe("Ordered properties with [value, order] tuples for priority control"),ee=c.z.union([c.z.enum(["web","server","app","other"]),c.z.string()]).describe("Source type: web, server, app, other, or custom"),ne=c.z.record(c.z.string(),c.z.boolean()).describe("Consent requirement mapping (group name → state)"),ie=Y.and(c.z.object({id:c.z.string().optional().describe("User identifier"),device:c.z.string().optional().describe("Device identifier"),session:c.z.string().optional().describe("Session identifier"),hash:c.z.string().optional().describe("Hashed identifier"),address:c.z.string().optional().describe("User address"),email:c.z.string().email().optional().describe("User email address"),phone:c.z.string().optional().describe("User phone number"),userAgent:c.z.string().optional().describe("Browser user agent string"),browser:c.z.string().optional().describe("Browser name"),browserVersion:c.z.string().optional().describe("Browser version"),deviceType:c.z.string().optional().describe("Device type (mobile, desktop, tablet)"),os:c.z.string().optional().describe("Operating system"),osVersion:c.z.string().optional().describe("Operating system version"),screenSize:c.z.string().optional().describe("Screen dimensions"),language:c.z.string().optional().describe("User language"),country:c.z.string().optional().describe("User country"),region:c.z.string().optional().describe("User region/state"),city:c.z.string().optional().describe("User city"),zip:c.z.string().optional().describe("User postal code"),timezone:c.z.string().optional().describe("User timezone"),ip:c.z.string().optional().describe("User IP address"),internal:c.z.boolean().optional().describe("Internal user flag (employee, test user)")})).describe("User identification and properties"),te=Y.and(c.z.object({source:d.describe('Walker implementation version (e.g., "2.0.0")'),tagging:f})).describe("Walker version information"),oe=Y.and(c.z.object({type:ee.describe("Source type identifier"),id:d.describe("Source identifier (typically URL on web)"),previous_id:d.describe("Previous source identifier (typically referrer on web)")})).describe("Event source information"),re=c.z.lazy(()=>c.z.object({entity:c.z.string().describe("Entity name"),data:Y.describe("Entity-specific properties"),nested:c.z.array(re).describe("Nested child entities"),context:Z.describe("Entity context data")})).describe("Nested entity structure with recursive nesting support"),ae=c.z.array(re).describe("Array of nested entities"),se=c.z.object({name:c.z.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'),data:Y.describe("Event-specific properties"),context:Z.describe("Ordered context properties with priorities"),globals:Y.describe("Global properties shared across events"),custom:Y.describe("Custom implementation-specific properties"),user:ie.describe("User identification and attributes"),nested:ae.describe("Related nested entities"),consent:ne.describe("Consent states at event time"),id:m.describe("Unique event identifier (timestamp-based)"),trigger:d.describe("Event trigger identifier"),entity:d.describe("Parsed entity from event name"),action:d.describe("Parsed action from event name"),timestamp:b.describe("Unix timestamp in milliseconds since epoch"),timing:p.describe("Event processing timing information"),group:d.describe("Event grouping identifier"),count:g.describe("Event count in session"),version:te.describe("Walker version information"),source:oe.describe("Event source information")}).describe("Complete walkerOS event structure"),ce=se.partial().describe("Partial event structure with all fields optional"),le=se.partial().describe("Partial event structure with all top-level fields optional"),de=l(se),pe=l(ce),ue=l(ie),me=l(Y),be=l(Z),ge=l(re),fe=l(ee),he=l(ne),ze={};r(ze,{ConfigSchema:()=>Je,LoopSchema:()=>ye,MapSchema:()=>ke,PolicySchema:()=>je,ResultSchema:()=>Pe,RuleSchema:()=>Ce,RulesSchema:()=>Ee,SetSchema:()=>we,ValueConfigSchema:()=>xe,ValueSchema:()=>ve,ValuesSchema:()=>Se,configJsonSchema:()=>Te,loopJsonSchema:()=>Oe,mapJsonSchema:()=>Ne,policyJsonSchema:()=>Le,ruleJsonSchema:()=>Me,rulesJsonSchema:()=>qe,setJsonSchema:()=>De,valueConfigJsonSchema:()=>Ie,valueJsonSchema:()=>Re});var ve=c.z.lazy(()=>c.z.union([c.z.string().describe('String value or property path (e.g., "data.id")'),c.z.number().describe("Numeric value"),c.z.boolean().describe("Boolean value"),c.z.lazy(()=>Q),c.z.array(ve).describe("Array of values")])),Se=c.z.array(ve).describe("Array of transformation values"),ye=c.z.lazy(()=>c.z.tuple([ve,ve]).describe("Loop transformation: [source, transform] tuple for array processing")),we=c.z.lazy(()=>c.z.array(ve).describe("Set: Array of values for selection or combination")),ke=c.z.lazy(()=>c.z.record(c.z.string(),ve).describe("Map: Object mapping keys to transformation values")),xe=Q=c.z.object({key:c.z.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'),value:c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).optional().describe("Static primitive value"),fn:c.z.string().optional().describe("Custom transformation function as string (serialized)"),map:ke.optional().describe("Object mapping: transform event data to structured output"),loop:ye.optional().describe("Loop transformation: [source, transform] for array processing"),set:we.optional().describe("Set of values: combine or select from multiple values"),consent:ne.optional().describe("Required consent states to include this value"),condition:c.z.string().optional().describe("Condition function as string: return true to include value"),validate:c.z.string().optional().describe("Validation function as string: return true if value is valid")}).refine(e=>Object.keys(e).length>0,{message:"ValueConfig must have at least one property"}).describe("Value transformation configuration with multiple strategies"),je=c.z.record(c.z.string(),ve).describe("Policy rules for event pre-processing (key → value mapping)"),Ce=c.z.object({batch:c.z.number().optional().describe("Batch size: bundle N events for batch processing"),condition:c.z.string().optional().describe("Condition function as string: return true to process event"),consent:ne.optional().describe("Required consent states to process this event"),settings:c.z.any().optional().describe("Destination-specific settings for this event mapping"),data:c.z.union([ve,Se]).optional().describe("Data transformation rules for event"),ignore:c.z.boolean().optional().describe("Set to true to skip processing this event"),name:c.z.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'),policy:je.optional().describe("Event-level policy overrides (applied after config-level policy)")}).describe("Mapping rule for specific entity-action combination"),Ee=c.z.record(c.z.string(),c.z.record(c.z.string(),c.z.union([Ce,c.z.array(Ce)])).optional()).describe('Event mapping rules: entity → action → Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*→*).'),Je=c.z.object({consent:ne.optional().describe("Required consent states to process any events"),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events"),mapping:Ee.optional().describe("Entity-action specific mapping rules"),policy:je.optional().describe("Pre-processing policy rules applied before mapping")}).describe("Shared mapping configuration for sources and destinations"),Pe=c.z.object({eventMapping:Ce.optional().describe("Resolved mapping rule for event"),mappingKey:c.z.string().optional().describe('Mapping key used (e.g., "product.view")')}).describe("Mapping resolution result"),Re=l(ve),Ie=l(xe),Oe=l(ye),De=l(we),Ne=l(ke),Le=l(je),Me=l(Ce),qe=l(Ee),Te=l(Je),Ue={};r(Ue,{BatchSchema:()=>_e,ConfigSchema:()=>Be,ContextSchema:()=>$e,DLQSchema:()=>on,DataSchema:()=>Qe,DestinationPolicySchema:()=>Ae,DestinationsSchema:()=>Ze,InitDestinationsSchema:()=>Ye,InitSchema:()=>Xe,InstanceSchema:()=>Ke,PartialConfigSchema:()=>We,PushBatchContextSchema:()=>He,PushContextSchema:()=>Ve,PushEventSchema:()=>Fe,PushEventsSchema:()=>Ge,PushResultSchema:()=>nn,RefSchema:()=>en,ResultSchema:()=>tn,batchJsonSchema:()=>ln,configJsonSchema:()=>rn,contextJsonSchema:()=>sn,instanceJsonSchema:()=>dn,partialConfigJsonSchema:()=>an,pushContextJsonSchema:()=>cn,resultJsonSchema:()=>pn});var Be=c.z.object({consent:ne.optional().describe("Required consent states to send events to this destination"),settings:c.z.any().describe("Implementation-specific configuration").optional(),data:c.z.union([ve,Se]).optional().describe("Global data transformation applied to all events for this destination"),env:c.z.any().describe("Environment dependencies (platform-specific)").optional(),id:m.describe("Destination instance identifier (defaults to destination key)").optional(),init:c.z.boolean().describe("Whether to initialize immediately").optional(),loadScript:c.z.boolean().describe("Whether to load external script (for web destinations)").optional(),mapping:Ee.optional().describe("Entity-action specific mapping rules for this destination"),policy:je.optional().describe("Pre-processing policy rules applied before event mapping"),queue:c.z.boolean().describe("Whether to queue events when consent is not granted").optional(),require:c.z.array(c.z.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'),logger:c.z.object({level:c.z.union([c.z.number(),c.z.enum(["ERROR","WARN","INFO","DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"),handler:c.z.any().optional().describe("Custom log handler function")}).optional().describe("Logger configuration (level, handler) to override the collector defaults"),onError:w.optional(),onLog:k.optional()}).describe("Destination configuration"),We=Be.partial().describe("Partial destination configuration with all fields optional"),Ae=je.describe("Destination policy rules for event pre-processing"),$e=c.z.object({collector:c.z.unknown().describe("Collector instance (runtime object)"),config:Be.describe("Destination configuration"),data:c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data"),env:c.z.unknown().describe("Environment dependencies")}).describe("Destination context for init and push functions"),Ve=$e.extend({mapping:Ce.optional().describe("Resolved mapping rule for this specific event")}).describe("Push context with event-specific mapping"),He=Ve.describe("Batch push context with event-specific mapping"),Fe=c.z.object({event:se.describe("The event to process"),mapping:Ce.optional().describe("Mapping rule for this event")}).describe("Event with optional mapping for batch processing"),Ge=c.z.array(Fe).describe("Array of events with mappings"),_e=c.z.object({key:c.z.string().describe('Batch key (usually mapping key like "product.view")'),events:c.z.array(se).describe("Array of events in batch"),data:c.z.array(c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional()).describe("Transformed data for each event"),mapping:Ce.optional().describe("Shared mapping rule for batch")}).describe("Batch of events grouped by mapping key"),Qe=c.z.union([c.z.unknown(),c.z.array(c.z.unknown())]).optional().describe("Transformed event data (Property, undefined, or array)"),Ke=c.z.object({config:Be.describe("Destination configuration"),queue:c.z.array(se).optional().describe("Queued events awaiting consent"),dlq:c.z.array(c.z.tuple([se,c.z.unknown()])).optional().describe("Dead letter queue (failed events with errors)"),type:c.z.string().optional().describe("Destination type identifier"),env:c.z.unknown().optional().describe("Environment dependencies"),init:c.z.unknown().optional().describe("Initialization function"),push:c.z.unknown().describe("Push function for single events"),pushBatch:c.z.unknown().optional().describe("Batch push function"),on:c.z.unknown().optional().describe("Event lifecycle hook function")}).describe("Destination instance (runtime object with functions)"),Xe=c.z.object({code:Ke.describe("Destination instance with implementation"),config:We.optional().describe("Partial configuration overrides"),env:c.z.unknown().optional().describe("Partial environment overrides")}).describe("Destination initialization configuration"),Ye=c.z.record(c.z.string(),Xe).describe("Map of destination IDs to initialization configurations"),Ze=c.z.record(c.z.string(),Ke).describe("Map of destination IDs to runtime instances"),en=c.z.object({type:c.z.string().describe('Destination type ("gtag", "meta", "bigquery")'),data:c.z.unknown().optional().describe("Response from push()"),error:c.z.unknown().optional().describe("Error if failed")}).describe("Destination reference with type and response data"),nn=c.z.object({queue:c.z.array(se).optional().describe("Events queued (awaiting consent)"),error:c.z.unknown().optional().describe("Error if push failed")}).describe("Push operation result"),tn=c.z.object({ok:c.z.boolean().describe("True if nothing failed"),event:c.z.unknown().optional().describe("The processed event"),done:c.z.record(c.z.string(),en).optional().describe("Destinations that processed successfully"),queued:c.z.record(c.z.string(),en).optional().describe("Destinations that queued events"),failed:c.z.record(c.z.string(),en).optional().describe("Destinations that failed to process")}).describe("Push result with destination outcomes"),on=c.z.array(c.z.tuple([se,c.z.unknown()])).describe("Dead letter queue: [(event, error), ...]"),rn=l(Be),an=l(We),sn=l($e),cn=l(Ve),ln=l(_e),dn=l(Ke),pn=l(tn),un={};r(un,{CommandTypeSchema:()=>mn,ConfigSchema:()=>bn,DestinationsSchema:()=>vn,InitConfigSchema:()=>fn,InstanceSchema:()=>Sn,PushContextSchema:()=>hn,SessionDataSchema:()=>gn,SourcesSchema:()=>zn,commandTypeJsonSchema:()=>yn,configJsonSchema:()=>wn,initConfigJsonSchema:()=>xn,instanceJsonSchema:()=>Cn,pushContextJsonSchema:()=>jn,sessionDataJsonSchema:()=>kn});var mn=c.z.union([c.z.enum(["action","config","consent","context","destination","elb","globals","hook","init","link","run","user","walker"]),c.z.string()]).describe("Collector command type: standard commands or custom string for extensions"),bn=c.z.object({run:c.z.boolean().describe("Whether to run collector automatically on initialization").optional(),tagging:f,globalsStatic:Y.describe("Static global properties that persist across collector runs"),sessionStatic:c.z.record(c.z.string(),c.z.unknown()).describe("Static session data that persists across collector runs"),verbose:c.z.boolean().describe("Enable verbose logging for debugging"),onError:w.optional(),onLog:k.optional()}).describe("Core collector configuration"),gn=Y.and(c.z.object({isStart:c.z.boolean().describe("Whether this is a new session start"),storage:c.z.boolean().describe("Whether storage is available"),id:m.describe("Session identifier").optional(),start:b.describe("Session start timestamp").optional(),marketing:c.z.literal(!0).optional().describe("Marketing attribution flag"),updated:b.describe("Last update timestamp").optional(),isNew:c.z.boolean().describe("Whether this is a new session").optional(),device:m.describe("Device identifier").optional(),count:g.describe("Event count in session").optional(),runs:g.describe("Number of runs").optional()})).describe("Session state and tracking data"),fn=bn.partial().extend({consent:ne.optional().describe("Initial consent state"),user:ie.optional().describe("Initial user data"),globals:Y.optional().describe("Initial global properties"),sources:c.z.unknown().optional().describe("Source configurations"),destinations:c.z.unknown().optional().describe("Destination configurations"),custom:Y.optional().describe("Initial custom implementation-specific properties")}).describe("Collector initialization configuration with initial state"),hn=c.z.object({mapping:Je.optional().describe("Source-level mapping configuration")}).describe("Push context with optional source mapping"),zn=c.z.record(c.z.string(),c.z.unknown()).describe("Map of source IDs to source instances"),vn=c.z.record(c.z.string(),c.z.unknown()).describe("Map of destination IDs to destination instances"),Sn=c.z.object({push:c.z.unknown().describe("Push function for processing events"),command:c.z.unknown().describe("Command function for walker commands"),allowed:c.z.boolean().describe("Whether event processing is allowed"),config:bn.describe("Current collector configuration"),consent:ne.describe("Current consent state"),count:c.z.number().describe("Event count (increments with each event)"),custom:Y.describe("Custom implementation-specific properties"),sources:zn.describe("Registered source instances"),destinations:vn.describe("Registered destination instances"),globals:Y.describe("Current global properties"),group:c.z.string().describe("Event grouping identifier"),hooks:c.z.unknown().describe("Lifecycle hook functions"),on:c.z.unknown().describe("Event lifecycle configuration"),queue:c.z.array(se).describe("Queued events awaiting processing"),round:c.z.number().describe("Collector run count (increments with each run)"),session:c.z.union([gn]).describe("Current session state"),timing:c.z.number().describe("Event processing timing information"),user:ie.describe("Current user data"),version:c.z.string().describe("Walker implementation version")}).describe("Collector instance with state and methods"),yn=l(mn),wn=l(bn),kn=l(gn),xn=l(fn),jn=l(hn),Cn=l(Sn),En={};r(En,{BaseEnvSchema:()=>Jn,ConfigSchema:()=>Pn,InitSchema:()=>On,InitSourceSchema:()=>Dn,InitSourcesSchema:()=>Nn,InstanceSchema:()=>In,PartialConfigSchema:()=>Rn,baseEnvJsonSchema:()=>Ln,configJsonSchema:()=>Mn,initSourceJsonSchema:()=>Un,initSourcesJsonSchema:()=>Bn,instanceJsonSchema:()=>Tn,partialConfigJsonSchema:()=>qn});var Jn=c.z.object({push:c.z.unknown().describe("Collector push function"),command:c.z.unknown().describe("Collector command function"),sources:c.z.unknown().optional().describe("Map of registered source instances"),elb:c.z.unknown().describe("Public API function (alias for collector.push)")}).catchall(c.z.unknown()).describe("Base environment for dependency injection - platform-specific sources extend this"),Pn=Je.extend({settings:c.z.any().describe("Implementation-specific configuration").optional(),env:Jn.optional().describe("Environment dependencies (platform-specific)"),id:m.describe("Source identifier (defaults to source key)").optional(),onError:w.optional(),primary:c.z.boolean().describe("Mark as primary (only one can be primary)").optional(),require:c.z.array(c.z.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'),logger:c.z.object({level:c.z.union([c.z.number(),c.z.enum(["ERROR","WARN","INFO","DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"),handler:c.z.any().optional().describe("Custom log handler function")}).optional().describe("Logger configuration (level, handler) to override the collector defaults"),ingest:c.z.union([ve,Se]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax.")}).describe("Source configuration with mapping and environment"),Rn=Pn.partial().describe("Partial source configuration with all fields optional"),In=c.z.object({type:c.z.string().describe('Source type identifier (e.g., "browser", "dataLayer")'),config:Pn.describe("Current source configuration"),push:c.z.any().describe("Push function - THE HANDLER (flexible signature for platform compatibility)"),destroy:c.z.any().optional().describe("Cleanup function called when source is removed"),on:c.z.unknown().optional().describe("Lifecycle hook function for event types")}).describe("Source instance with push handler and lifecycle methods"),On=c.z.any().describe("Source initialization function: (config, env) => Instance | Promise<Instance>"),Dn=c.z.object({code:On.describe("Source initialization function"),config:Rn.optional().describe("Partial configuration overrides"),env:Jn.partial().optional().describe("Partial environment overrides"),primary:c.z.boolean().optional().describe("Mark as primary source (only one can be primary)")}).describe("Source initialization configuration"),Nn=c.z.record(c.z.string(),Dn).describe("Map of source IDs to initialization configurations"),Ln=l(Jn),Mn=l(Pn),qn=l(Rn),Tn=l(In),Un=l(Dn),Bn=l(Nn),Wn={};r(Wn,{BundleSchema:()=>oi,ConfigSchema:()=>Si,ContractActionsSchema:()=>gi,ContractEntrySchema:()=>hi,ContractEventsSchema:()=>fi,ContractSchema:()=>zi,ContractSchemaEntry:()=>bi,DefinitionsSchema:()=>ei,DestinationReferenceSchema:()=>ui,InlineCodeSchema:()=>si,OverridesSchema:()=>ti,PackagesSchema:()=>ii,PrimitiveSchema:()=>Yn,ServerSchema:()=>ai,SettingsSchema:()=>vi,SourceReferenceSchema:()=>di,StepExampleSchema:()=>ci,StepExamplesSchema:()=>li,StoreReferenceSchema:()=>mi,TransformerReferenceSchema:()=>pi,VariablesSchema:()=>Zn,WebSchema:()=>ri,configJsonSchema:()=>ji,contractEntryJsonSchema:()=>Ii,contractJsonSchema:()=>Oi,destinationReferenceJsonSchema:()=>Ji,parseConfig:()=>yi,parseSettings:()=>ki,safeParseConfig:()=>wi,safeParseSettings:()=>xi,settingsJsonSchema:()=>Ci,sourceReferenceJsonSchema:()=>Ei,storeReferenceJsonSchema:()=>Ri,transformerReferenceJsonSchema:()=>Pi});var An={};r(An,{MatchExpressionSchema:()=>Hn,NextRuleSchema:()=>_n,RoutableNextSchema:()=>Gn});var $n=c.z.enum(["eq","contains","prefix","suffix","regex","gt","lt","exists"]),Vn=c.z.object({key:c.z.string(),operator:$n,value:c.z.string(),not:c.z.boolean().optional()}),Hn=c.z.union([Vn,c.z.object({and:c.z.array(c.z.lazy(()=>Hn))}),c.z.object({or:c.z.array(c.z.lazy(()=>Hn))})]),Fn=c.z.union([Hn,c.z.literal("*")]),Gn=c.z.union([c.z.string(),c.z.array(c.z.string()),c.z.array(c.z.object({match:Fn,next:c.z.lazy(()=>Gn)}))]),_n=c.z.object({match:Fn,next:c.z.lazy(()=>Gn)}),Qn={};r(Qn,{CacheRuleSchema:()=>Kn,CacheSchema:()=>Xn});var Kn=c.z.object({match:c.z.union([Hn,c.z.literal("*")]).describe("Match expression or wildcard to determine when this rule applies"),key:c.z.array(c.z.string()).min(1).describe("Dot-path fields used to build the cache key"),ttl:c.z.number().positive().describe("Time-to-live in seconds for cached entries"),update:c.z.record(c.z.string(),ve).optional().describe("Response mutations applied on cache hit (key → Value mapping)")}),Xn=c.z.object({full:c.z.boolean().optional().describe("Stop flow on cache HIT (default: false). When true, skip remaining steps and return cached value."),store:c.z.string().optional().describe("Store ID for persistent caching (references a configured store)"),rules:c.z.array(Kn).min(1).describe("Cache rules — at least one required")}),Yn=c.z.union([c.z.string(),c.z.number(),c.z.boolean()]).describe("Primitive value: string, number, or boolean"),Zn=c.z.record(c.z.string(),Yn).describe("Variables for interpolation"),ei=c.z.record(c.z.string(),c.z.unknown()).describe("Reusable configuration definitions"),ni=/^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/,ii=c.z.record(c.z.string().regex(ni,"Invalid npm package name"),c.z.object({version:c.z.string().optional(),imports:c.z.array(c.z.string()).optional(),path:c.z.string().optional()})).describe("NPM packages to bundle"),ti=c.z.record(c.z.string().regex(ni,"Invalid npm package name"),c.z.string().min(1,"Override version cannot be empty")).describe("Transitive dependency version overrides"),oi=c.z.object({packages:ii.optional().describe("NPM packages to bundle"),overrides:ti.optional().describe("Transitive dependency overrides")}).strict().describe("Bundle configuration (packages + overrides)"),ri=c.z.object({windowCollector:c.z.string().default("collector").optional().describe('Window property name for the collector instance (default: "collector")'),windowElb:c.z.string().default("elb").optional().describe('Window property name for the elb command queue (default: "elb")')}).describe("Web platform configuration"),ai=c.z.object({}).passthrough().describe("Server platform configuration (reserved for future options)"),si=c.z.object({push:c.z.string().min(1,"Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix. Example: "$code:(event) => { console.log(event); }"'),type:c.z.string().optional().describe("Optional type identifier for the inline instance"),init:c.z.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.")}).describe("Inline code for custom sources/transformers/destinations"),ci=c.z.object({description:c.z.string().optional().describe("Human-readable description"),in:c.z.unknown().optional().describe("Input to the step"),trigger:c.z.object({type:c.z.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"),options:c.z.unknown().optional().describe("Mechanism-specific options")}).optional().describe("Source trigger metadata"),mapping:c.z.unknown().optional().describe("Mapping configuration"),out:c.z.unknown().optional().describe("Expected output from the step"),command:c.z.enum(["config","consent","user","run"]).optional().describe("Invoke elb('walker <command>', in) instead of pushing in as an event")}).describe("Named example with input/output pair"),li=c.z.record(c.z.string(),ci).describe("Named step examples for testing and documentation"),di=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-source-browser@2.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "sourceExpress") or an inline code object with push function'),config:c.z.unknown().optional().describe("Source-specific configuration object"),env:c.z.unknown().optional().describe("Source environment configuration"),primary:c.z.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."),variables:Zn.optional().describe("Source-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Source-level definitions (highest priority in cascade)"),next:Gn.optional().describe("Pre-collector transformer chain. String, string[], or NextRule[] for conditional routing based on ingest data."),before:Gn.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this source (match → key → ttl rules)")}).describe("Source package reference with configuration"),pi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "transformerEnricher") or an inline code object with push function'),config:c.z.unknown().optional().describe("Transformer-specific configuration object"),env:c.z.unknown().optional().describe("Transformer environment configuration"),before:Gn.optional().describe("Pre-transformer chain. Runs before this transformer push function."),next:Gn.optional().describe("Next transformer in chain. String, string[], or NextRule[] for conditional routing."),variables:Zn.optional().describe("Transformer-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Transformer-level definitions (highest priority in cascade)"),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this transformer (match → key → ttl rules)")}).describe("Transformer package reference with configuration"),ui=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/web-destination-gtag@2.0.0")'),code:c.z.union([c.z.string(),si]).optional().describe('Either a named export string (e.g., "destinationAnalytics") or an inline code object with push function'),config:c.z.unknown().optional().describe("Destination-specific configuration object"),env:c.z.unknown().optional().describe("Destination environment configuration"),variables:Zn.optional().describe("Destination-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Destination-level definitions (highest priority in cascade)"),before:Gn.optional().describe("Post-collector transformer chain. String, string[], or NextRule[] for conditional routing."),next:Gn.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)"),cache:Xn.optional().describe("Cache configuration for this destination (match → key → ttl rules)")}).describe("Destination package reference with configuration"),mi=c.z.object({package:c.z.string().min(1,"Package name cannot be empty").optional().describe("Store package specifier with optional version"),code:c.z.union([c.z.string(),si]).optional().describe("Named export string or inline code definition"),config:c.z.unknown().optional().describe("Store-specific configuration object"),env:c.z.unknown().optional().describe("Store environment configuration"),variables:Zn.optional().describe("Store-level variables (highest priority in cascade)"),definitions:ei.optional().describe("Store-level definitions (highest priority in cascade)"),examples:li.optional().describe("Named step examples for testing and documentation (stripped during bundling)")}).describe("Store package reference with configuration"),bi=c.z.record(c.z.string(),c.z.unknown()).describe("JSON Schema object for event validation with description/examples annotations"),gi=c.z.record(c.z.string(),bi).describe("Action-level contract entries"),fi=c.z.record(c.z.string(),gi).describe("Entity-action event schemas"),hi=c.z.object({extends:c.z.string().optional().describe("Inherit from another named contract"),tagging:c.z.number().int().min(0).optional().describe("Contract version number"),description:c.z.string().optional().describe("Human-readable description"),globals:bi.optional().describe("JSON Schema for event.globals"),context:bi.optional().describe("JSON Schema for event.context"),custom:bi.optional().describe("JSON Schema for event.custom"),user:bi.optional().describe("JSON Schema for event.user"),consent:bi.optional().describe("JSON Schema for event.consent"),events:fi.optional().describe("Entity-action event schemas")}).describe("Named contract entry with optional sections and events"),zi=c.z.record(c.z.string(),hi).describe("Named contracts with optional extends inheritance"),vi=c.z.object({web:ri.optional().describe("Web platform configuration (browser-based tracking). Mutually exclusive with server."),server:ai.optional().describe("Server platform configuration (Node.js). Mutually exclusive with web."),sources:c.z.record(c.z.string(),di).optional().describe("Source configurations (data capture) keyed by unique identifier"),destinations:c.z.record(c.z.string(),ui).optional().describe("Destination configurations (data output) keyed by unique identifier"),transformers:c.z.record(c.z.string(),pi).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"),stores:c.z.record(c.z.string(),mi).optional().describe("Store configurations (key-value storage) keyed by unique identifier"),collector:c.z.unknown().optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"),bundle:oi.optional().describe("Build-time configuration (packages + overrides)"),packages:c.z.unknown().optional().refine(e=>void 0===e,{message:"`packages` must live under `bundle.packages`. Move your packages block to `flow.<name>.bundle.packages`. This is a breaking change — see CHANGELOG migration guide."}).describe("Legacy top-level packages (moved to bundle.packages)"),variables:Zn.optional().describe("Flow-level variables (override Config.variables, overridden by source/destination variables)"),definitions:ei.optional().describe("Flow-level definitions (extend Config.definitions, overridden by source/destination definitions)")}).refine(e=>{const n=void 0!==e.web,i=void 0!==e.server;return(n||i)&&!(n&&i)},{message:'Exactly one of "web" or "server" must be present'}).describe("Single flow settings for one deployment target"),Si=c.z.object({$schema:c.z.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v2.json")'),include:c.z.array(c.z.string()).optional().describe("Folders to include in the bundle output"),variables:Zn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax)"),definitions:ei.optional().describe("Reusable configuration definitions (use $def.name syntax)"),flows:c.z.record(c.z.string(),vi).refine(e=>Object.keys(e).length>0,{message:"At least one flow is required"}).describe("Named flow configurations (e.g., production, staging, development)")}).extend({version:c.z.literal(3).describe("Configuration schema version"),contract:zi.optional().describe("Named contracts with extends inheritance and dot-path references")}).describe("walkerOS flow configuration (walkeros.config.json)");function yi(e){return Si.parse(e)}function wi(e){return Si.safeParse(e)}function ki(e){return vi.parse(e)}function xi(e){return vi.safeParse(e)}var ji=c.z.toJSONSchema(Si,{target:"draft-7"}),Ci=l(vi),Ei=l(di),Ji=l(ui),Pi=l(pi),Ri=l(mi),Ii=l(hi),Oi=l(zi),Di=require("zod"),Ni=Di.z.object({lang:Di.z.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"),code:Di.z.string().describe("Code snippet")}),Li=Di.z.object({text:Di.z.string().describe("Short actionable hint text focused on walkerOS usage"),code:Di.z.array(Ni).optional().describe("Optional code snippets")}),Mi=Di.z.record(Di.z.string(),Li).describe("Keyed hints for AI consumption — lightweight context beyond schemas and examples"),qi=c.z.object({param:c.z.string().describe("Lowercase URL parameter name. Match is case-insensitive on lookup."),platform:c.z.string().describe("Canonical platform identifier (lowercase, kebab-case).")});function Ti(e){let n;try{n=JSON.parse(e)}catch(n){const{line:i,column:t}=function(e,n){if(e instanceof SyntaxError){const i=e.message.match(/position\s+(\d+)/);if(i){return Ui(n,parseInt(i[1],10))}const t=e.message.match(/line\s+(\d+)\s+column\s+(\d+)/);if(t)return{line:parseInt(t[1],10),column:parseInt(t[2],10)}}return{line:1,column:1}}(n,e);return{valid:!1,errors:[{message:n instanceof Error?n.message:"Invalid JSON",severity:"error",line:i,column:t}],warnings:[]}}const i=[],t=[],o=Si.safeParse(n);if(!o.success)for(const n of o.error.issues){const t=n.path.join("."),o=Wi(e,n.path);i.push({message:n.message,severity:"error",path:t||"root",...o})}const r=function(e){if(!(Ai(e)&&"version"in e&&"flows"in e&&Ai(e.flows)))return;const n={},i={},t=[],o=[],r=[],a=[],s=[];let c;Vi(n,e.variables),Hi(i,e.definitions),function(e,n){if(!Ai(n))return;for(const[,i]of Object.entries(n)){if(!Ai(i))continue;const n=i.events;if(Ai(n))for(const[i,t]of Object.entries(n)){if(!Ai(t))continue;const n=e.find(e=>e.entity===i),o=Object.keys(t);if(n)for(const e of o)n.actions.includes(e)||n.actions.push(e);else e.push({entity:i,actions:o})}}}(s,e.contract);for(const s of Object.values(e.flows))if(Ai(s)){c||("web"in s?c="web":"server"in s&&(c="server")),Vi(n,s.variables),Hi(i,s.definitions);for(const e of["sources","destinations","transformers"]){const l="sources"===e?"source":"destinations"===e?"destination":"transformer",d="sources"===e?t:"destinations"===e?o:r;if(Ai(s[e]))for(const[t,o]of Object.entries(s[e]))d.push(t),Ai(o)&&(Vi(n,o.variables),Hi(i,o.definitions),"string"==typeof o.package&&a.push({package:o.package,shortName:t,type:l,platform:c||"web"}))}}const l={variables:n,definitions:i,stepNames:{sources:t,destinations:o,transformers:r}};c&&(l.platform=c);a.length>0&&(l.packages=a);s.length>0&&(l.contract=s);return l}(n);if(r){const n=function(e,n){const i=[];if(n.variables){const t=/\$var\.(\w+)/g;let o;for(;null!==(o=t.exec(e));)if(!(o[1]in n.variables)){const t=Bi(e,o.index,o[0].length);i.push({message:`Unknown variable "$var.${o[1]}". Defined: ${Object.keys(n.variables).join(", ")||"none"}`,severity:"warning",path:`$var.${o[1]}`,...t})}}if(n.definitions){const t=/\$def\.(\w+)/g;let o;for(;null!==(o=t.exec(e));)if(!(o[1]in n.definitions)){const t=Bi(e,o.index,o[0].length);i.push({message:`Unknown definition "$def.${o[1]}". Defined: ${Object.keys(n.definitions).join(", ")||"none"}`,severity:"warning",path:`$def.${o[1]}`,...t})}}return i}(e,r);t.push(...n)}return{valid:0===i.length,errors:i,warnings:t,context:r}}function Ui(e,n){let i=1,t=1;for(let o=0;o<n&&o<e.length;o++)"\n"===e[o]?(i++,t=1):t++;return{line:i,column:t}}function Bi(e,n,i){const t=Ui(e,n),o=Ui(e,n+i);return{line:t.line,column:t.column,endLine:o.line,endColumn:o.column}}function Wi(e,n){if(0===n.length)return{line:1,column:1};const i=n[n.length-1];if("string"==typeof i){const n=`"${i}"`,t=e.lastIndexOf(n);if(-1!==t)return Ui(e,t)}return{line:1,column:1}}function Ai(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function $i(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e}function Vi(e,n){if(Ai(n))for(const[i,t]of Object.entries(n))$i(t)&&(e[i]=t)}function Hi(e,n){if(Ai(n))for(const[i,t]of Object.entries(n))e[i]=t}function Fi(e,n){const i=[],t={};for(const[n,o]of Object.entries(e)){o.required&&i.push(n);const e={type:o.type};if(o.description&&(e.description=o.description),o.pattern&&(e.pattern=o.pattern),void 0!==o.minLength&&(e.minLength=o.minLength),void 0!==o.maxLength&&(e.maxLength=o.maxLength),void 0!==o.minimum&&(e.minimum=o.minimum),void 0!==o.maximum&&(e.maximum=o.maximum),o.enum&&(e.enum=[...o.enum]),void 0!==o.default&&(e.default=o.default),"object"===o.type&&o.properties){const n={};for(const[e,i]of Object.entries(o.properties))n[e]=Gi(i);e.properties=n}"array"===o.type&&o.items&&(e.items=Gi(o.items)),t[n]=e}const o={type:"object",properties:t};return n&&(o.title=n),i.length>0&&(o.required=i),o}function Gi(e){const n={type:e.type};if(e.description&&(n.description=e.description),e.pattern&&(n.pattern=e.pattern),void 0!==e.minLength&&(n.minLength=e.minLength),void 0!==e.maxLength&&(n.maxLength=e.maxLength),void 0!==e.minimum&&(n.minimum=e.minimum),void 0!==e.maximum&&(n.maximum=e.maximum),e.enum&&(n.enum=[...e.enum]),void 0!==e.default&&(n.default=e.default),"object"===e.type&&e.properties){const i={};for(const[n,t]of Object.entries(e.properties))i[n]=Gi(t);n.properties=i}return"array"===e.type&&e.items&&(n.items=Gi(e.items)),n}function _i(e,n){const i={type:"array",items:Gi(e)};return void 0!==n?.minItems&&(i.minItems=n.minItems),void 0!==n?.maxItems&&(i.maxItems=n.maxItems),n?.description&&(i.description=n.description),n?.title&&(i.title=n.title),i}function Qi(e,n="string",i){const t={type:n,enum:[...e]};return i?.description&&(t.description=i.description),i?.title&&(t.title=i.title),t}function Ki(e,n,i){return _i({type:"object"},{minItems:2,maxItems:2,description:i||"Tuple with exactly 2 elements [source, transform]"})}function Xi(e){return c.z.toJSONSchema(e,{target:"draft-7"})}var Yi=new Set(["env","onError","onLog","primary"]),Zi={source:En.configJsonSchema,destination:Ue.configJsonSchema};function et(e,n){const i=Zi[e];if(!i||!i.properties){return{type:"object",properties:{settings:n.settings?nt(n.settings):{description:"Implementation-specific configuration"}}}}const t=JSON.parse(JSON.stringify(i)),o=t.properties;for(const e of Yi)delete o[e];return n.settings&&(o.settings=nt(n.settings)),t}function nt(e){const{$schema:n,...i}=e;return i}//# sourceMappingURL=dev.js.map