@walkeros/cli 4.8.0 → 4.8.1-next-1791586788897

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/cli.js CHANGED
@@ -262,7 +262,7 @@ function L(e6, t5) {
262
262
  }
263
263
  function D(e6) {
264
264
  const t5 = {};
265
- for (const [n6, r6] of Object.entries(e6)) P.has(n6) || (C.has(n6) && U(r6) ? t5[n6] = F(r6) : R.has(n6) && Array.isArray(r6) ? t5[n6] = r6.map((e7) => U(e7) ? D(e7) : e7) : T.has(n6) && U(r6) ? t5[n6] = D(r6) : t5[n6] = r6);
265
+ for (const [n6, r6] of Object.entries(e6)) P.has(n6) || (C.has(n6) && U(r6) ? t5[n6] = F(r6) : T.has(n6) && Array.isArray(r6) ? t5[n6] = r6.map((e7) => U(e7) ? D(e7) : e7) : R.has(n6) && U(r6) ? t5[n6] = D(r6) : t5[n6] = r6);
266
266
  return t5;
267
267
  }
268
268
  function F(e6) {
@@ -396,14 +396,14 @@ function Ie(e6, t5, n6, r6, o5, s6) {
396
396
  }
397
397
  return c4 && (f5 = Ee(f5, c4, `$var.${a6}`)), f5;
398
398
  }
399
- const a5 = e6.match(V);
399
+ const a5 = e6.match(Z);
400
400
  if (a5 && r6) {
401
401
  const e7 = a5[1], t6 = a5[2];
402
402
  e7 in r6 || N(`Contract "${e7}" not found`);
403
403
  let n7 = r6[e7];
404
404
  return t6 && (n7 = Ee(n7, t6, `$contract.${e7}`)), n7;
405
405
  }
406
- const c3 = e6.match(Z);
406
+ const c3 = e6.match(V);
407
407
  if (c3) {
408
408
  const t6 = c3[1], r7 = c3[2], s7 = false === n6?.strictFlowRefs;
409
409
  o5 || N(`$flow.${t6}${r7 ? `.${r7}` : ""} cannot be resolved without a flow resolver`);
@@ -521,8 +521,8 @@ function Pe(e6) {
521
521
  if ("web" === t5 || "server" === t5) return t5;
522
522
  N('Flow must have config.platform set to "web" or "server"');
523
523
  }
524
- function Re(e6, t5 = {}, n6 = {}) {
525
- n6 = { ...Te, ...n6 };
524
+ function Te(e6, t5 = {}, n6 = {}) {
525
+ n6 = { ...Re, ...n6 };
526
526
  const r6 = Object.entries(t5).reduce((t6, [r7, o5]) => {
527
527
  const s6 = e6[r7];
528
528
  return n6.merge && Array.isArray(s6) && Array.isArray(o5) ? t6[r7] = o5.reduce((e7, t7) => e7.includes(t7) ? e7 : [...e7, t7], [...s6]) : (n6.extend || r7 in e6) && (t6[r7] = o5), t6;
@@ -634,11 +634,11 @@ function Ke(e6, t5 = {}, n6 = {}) {
634
634
  r6[t6] && (o5[t6] = true, e6 && e6[t6] && (s6 = true));
635
635
  }), !!s6 && o5;
636
636
  }
637
- function Ze(e6, t5) {
637
+ function Ve(e6, t5) {
638
638
  if (!ae(t5)) return e6;
639
639
  for (const n6 of Object.keys(t5)) {
640
640
  const r6 = t5[n6];
641
- void 0 !== r6 && (ae(r6) && ae(e6[n6]) ? Ze(e6[n6], r6) : e6[n6] = r6);
641
+ void 0 !== r6 && (ae(r6) && ae(e6[n6]) ? Ve(e6[n6], r6) : e6[n6] = r6);
642
642
  }
643
643
  return e6;
644
644
  }
@@ -889,22 +889,22 @@ async function At(e6, t5, n6) {
889
889
  if (r6.ignore) return { event: e6, data: s6, mapping: r6, mappingKey: o5, ignore: true, silent: i6 };
890
890
  if (r6.name && (e6.name = r6.name), r6.data) {
891
891
  const t6 = r6.data && await St(e6, r6.data, { collector: n6, event: e6 });
892
- s6 = ae(s6) && ae(t6) ? Re(s6, t6) : t6;
892
+ s6 = ae(s6) && ae(t6) ? Te(s6, t6) : t6;
893
893
  }
894
894
  }
895
895
  const a5 = r6?.include ?? t5.include;
896
896
  if (a5 && a5.length > 0) {
897
897
  const t6 = We(e6, a5);
898
- Object.keys(t6).length > 0 && (s6 = ae(s6) ? Re(t6, s6) : s6 ?? t6);
898
+ Object.keys(t6).length > 0 && (s6 = ae(s6) ? Te(t6, s6) : s6 ?? t6);
899
899
  }
900
900
  if (r6?.remove && ae(s6)) for (const e7 of r6.remove) s6 = De(s6, e7);
901
901
  return { event: e6, data: s6, mapping: r6, mappingKey: o5, ignore: false, silent: i6 };
902
902
  }
903
- function Tt(e6) {
903
+ function Rt(e6) {
904
904
  return void 0 === e6 || ce(e6, "") ? e6 : JSON.stringify(e6);
905
905
  }
906
- function Rt(e6 = {}) {
907
- return Re({ "Content-Type": "application/json; charset=utf-8" }, e6);
906
+ function Tt(e6 = {}) {
907
+ return Te({ "Content-Type": "application/json; charset=utf-8" }, e6);
908
908
  }
909
909
  function Dt(e6, t5, n6, r6) {
910
910
  const o5 = e6;
@@ -953,7 +953,7 @@ function Ut(e6, t5) {
953
953
  }
954
954
  };
955
955
  }
956
- function Nn(e6, t5) {
956
+ function Ln(e6, t5) {
957
957
  if (0 === e6.observers.size) return;
958
958
  const n6 = Array.from(e6.observers);
959
959
  for (const e7 of n6) try {
@@ -961,7 +961,7 @@ function Nn(e6, t5) {
961
961
  } catch {
962
962
  }
963
963
  }
964
- function Pn(e6) {
964
+ function Dn(e6) {
965
965
  const t5 = e6.batchMs, n6 = "number" == typeof t5 && Number.isFinite(t5) && t5 > 0 ? Math.floor(t5) : 50, r6 = e6.batchSize, o5 = "number" == typeof r6 && Number.isFinite(r6) && r6 >= 1 ? Math.floor(r6) : 50, s6 = e6.maxBodyBytes, i6 = "number" == typeof s6 && Number.isFinite(s6) && s6 >= 1 ? Math.floor(s6) : 6e4, a5 = e6.fetch ?? ((e7, t6) => globalThis.fetch(e7, t6)), c3 = e6.onError ?? (() => {
966
966
  }), u4 = {};
967
967
  for (const [t6, n7] of Object.entries(e6.headers ?? {})) {
@@ -1008,10 +1008,10 @@ function Pn(e6) {
1008
1008
  f4.push({ ...e7, seq: ++p4 }), f4.length >= o5 ? g4() : null === l4 && (l4 = setTimeout(g4, n6));
1009
1009
  };
1010
1010
  }
1011
- function Wn(e6) {
1012
- return "string" != typeof e6 ? { ok: false, reason: "is not a string" } : Un.test(e6) ? Fn.includes(e6) ? { ok: false, reason: `is reserved (${Fn.join(", ")})` } : { ok: true, name: e6 } : { ok: false, reason: "is not a JavaScript identifier (letters, digits, _ or $, not starting with a digit)" };
1011
+ function Hn(e6) {
1012
+ return "string" != typeof e6 ? { ok: false, reason: "is not a string" } : Bn.test(e6) ? Vn.includes(e6) ? { ok: false, reason: `is reserved (${Vn.join(", ")})` } : { ok: true, name: e6 } : { ok: false, reason: "is not a JavaScript identifier (letters, digits, _ or $, not starting with a digit)" };
1013
1013
  }
1014
- function Bn() {
1014
+ function Qn() {
1015
1015
  let e6 = 0, t5 = 0;
1016
1016
  return { start() {
1017
1017
  e6 = Date.now(), t5 = 0;
@@ -1019,13 +1019,13 @@ function Bn() {
1019
1019
  return (this.getElapsed() / 1e3).toFixed(2) + "s";
1020
1020
  } };
1021
1021
  }
1022
- function Hn(e6) {
1022
+ function er(e6) {
1023
1023
  return e6 instanceof Error ? e6.message : String(e6);
1024
1024
  }
1025
- function Jn(e6) {
1025
+ function tr(e6) {
1026
1026
  return "string" == typeof e6 || Array.isArray(e6) && e6.every((e7) => "string" == typeof e7) ? e6 : void 0;
1027
1027
  }
1028
- async function Gn(e6, t5) {
1028
+ async function nr(e6, t5) {
1029
1029
  const n6 = t5?.version || "latest", r6 = t5?.timeout || 1e4, o5 = new AbortController(), s6 = setTimeout(() => o5.abort(), r6), i6 = o5.signal, a5 = t5?.client ? { "X-Walkeros-Client": t5.client } : void 0;
1030
1030
  try {
1031
1031
  if (t5?.baseUrl) {
@@ -1033,10 +1033,10 @@ async function Gn(e6, t5) {
1033
1033
  if (!o7.ok) throw new Error(`Failed to fetch ${r8} (HTTP ${o7.status})`);
1034
1034
  return (function(e7, t6, n7) {
1035
1035
  const r9 = n7.schemas || {}, o8 = n7.examples || {}, s7 = n7.hints, i7 = n7.hintKeys ?? (s7 ? Object.keys(s7) : []), a6 = n7.exampleSummaries ?? [], c3 = n7.platform, u4 = n7.exportExamples, f4 = n7.exportSchemas, l4 = n7.exports;
1036
- return { packageName: n7.package || e7, version: "string" == typeof n7.version ? n7.version : t6, ...void 0 !== n7.description && { description: n7.description }, ...void 0 !== n7.type && { type: n7.type }, ...void 0 !== c3 && { platform: c3 }, schemas: r9, examples: o8, ...void 0 !== n7.docs && { docs: n7.docs }, ...void 0 !== n7.source && { source: n7.source }, ...s7 && Object.keys(s7).length > 0 ? { hints: s7 } : {}, hintKeys: i7, exampleSummaries: a6, ...Yn(u4) ? { exportExamples: u4 } : {}, ...Xn(f4) ? { exportSchemas: f4 } : {}, ...Qn(l4) ? { exports: l4 } : {} };
1036
+ return { packageName: n7.package || e7, version: "string" == typeof n7.version ? n7.version : t6, ...void 0 !== n7.description && { description: n7.description }, ...void 0 !== n7.type && { type: n7.type }, ...void 0 !== c3 && { platform: c3 }, schemas: r9, examples: o8, ...void 0 !== n7.docs && { docs: n7.docs }, ...void 0 !== n7.source && { source: n7.source }, ...s7 && Object.keys(s7).length > 0 ? { hints: s7 } : {}, hintKeys: i7, exampleSummaries: a6, ...rr(u4) ? { exportExamples: u4 } : {}, ...or(f4) ? { exportSchemas: f4 } : {}, ...sr(l4) ? { exports: l4 } : {} };
1037
1037
  })(e6, n6, await o7.json());
1038
1038
  }
1039
- const r7 = `https://cdn.jsdelivr.net/npm/${e6}@${n6}`, o6 = await er(`${r7}/package.json`, i6, a5);
1039
+ const r7 = `https://cdn.jsdelivr.net/npm/${e6}@${n6}`, o6 = await ir(`${r7}/package.json`, i6, a5);
1040
1040
  return (function(e7, t6, n7, r8) {
1041
1041
  const o7 = r8.$meta || {}, s7 = r8.schemas || {}, i7 = r8.examples || {}, a6 = r8.hints, c3 = a6 ? Object.keys(a6) : [], u4 = r8.exportExamples, f4 = r8.exportSchemas, l4 = o7.exports, p4 = [], d3 = i7.step || {};
1042
1042
  for (const [e8, t7] of Object.entries(d3)) {
@@ -1044,71 +1044,71 @@ async function Gn(e6, t5) {
1044
1044
  "string" == typeof n8?.description && (r9.description = n8.description), p4.push(r9);
1045
1045
  }
1046
1046
  const m4 = "string" == typeof o7.docs ? o7.docs : void 0, g4 = "string" == typeof o7.source ? o7.source : void 0;
1047
- return { packageName: e7, version: "string" == typeof n7.version ? n7.version : t6, description: "string" == typeof n7.description ? n7.description : void 0, type: "string" == typeof o7.type ? o7.type : void 0, platform: Jn(o7.platform), schemas: s7, examples: i7, ...m4 ? { docs: m4 } : {}, ...g4 ? { source: g4 } : {}, ...a6 && Object.keys(a6).length > 0 ? { hints: a6 } : {}, hintKeys: c3, exampleSummaries: p4, ...Yn(u4) ? { exportExamples: u4 } : {}, ...Xn(f4) ? { exportSchemas: f4 } : {}, ...Qn(l4) ? { exports: l4 } : {} };
1048
- })(e6, n6, o6, await er(`${r7}/dist/walkerOS.json`, i6, a5));
1047
+ return { packageName: e7, version: "string" == typeof n7.version ? n7.version : t6, description: "string" == typeof n7.description ? n7.description : void 0, type: "string" == typeof o7.type ? o7.type : void 0, platform: tr(o7.platform), schemas: s7, examples: i7, ...m4 ? { docs: m4 } : {}, ...g4 ? { source: g4 } : {}, ...a6 && Object.keys(a6).length > 0 ? { hints: a6 } : {}, hintKeys: c3, exampleSummaries: p4, ...rr(u4) ? { exportExamples: u4 } : {}, ...or(f4) ? { exportSchemas: f4 } : {}, ...sr(l4) ? { exports: l4 } : {} };
1048
+ })(e6, n6, o6, await ir(`${r7}/dist/walkerOS.json`, i6, a5));
1049
1049
  } finally {
1050
1050
  clearTimeout(s6);
1051
1051
  }
1052
1052
  }
1053
- function Yn(e6) {
1053
+ function rr(e6) {
1054
1054
  return null !== e6 && "object" == typeof e6 && !Array.isArray(e6);
1055
1055
  }
1056
- function Xn(e6) {
1057
- return Yn(e6) && Object.values(e6).every(Yn);
1056
+ function or(e6) {
1057
+ return rr(e6) && Object.values(e6).every(rr);
1058
1058
  }
1059
- function Qn(e6) {
1060
- return Yn(e6) && Object.values(e6).every((e7) => "string" == typeof e7);
1059
+ function sr(e6) {
1060
+ return rr(e6) && Object.values(e6).every((e7) => "string" == typeof e7);
1061
1061
  }
1062
- async function er(e6, t5, n6) {
1062
+ async function ir(e6, t5, n6) {
1063
1063
  const r6 = await fetch(e6, { signal: t5, ...n6 && { headers: n6 } });
1064
1064
  if (!r6.ok) throw new Error(`Failed to fetch ${e6} (HTTP ${r6.status})`);
1065
1065
  return await r6.json();
1066
1066
  }
1067
- function sr(e6) {
1068
- const t5 = (e6.startsWith(or) ? e6.slice(5) : e6).split(".");
1067
+ function lr(e6) {
1068
+ const t5 = (e6.startsWith(fr) ? e6.slice(5) : e6).split(".");
1069
1069
  return t5.some((e7) => "" === e7) ? [] : t5;
1070
1070
  }
1071
- function ir(e6) {
1071
+ function pr(e6) {
1072
1072
  return "function" == typeof e6;
1073
1073
  }
1074
- function ar(e6) {
1074
+ function dr(e6) {
1075
1075
  return "object" == typeof e6 && null !== e6;
1076
1076
  }
1077
- function ur(e6, t5) {
1078
- if (-1 !== cr.indexOf(t5)) return false;
1077
+ function gr(e6, t5) {
1078
+ if (-1 !== mr.indexOf(t5)) return false;
1079
1079
  let n6 = e6;
1080
- for (; ir(n6); ) {
1080
+ for (; pr(n6); ) {
1081
1081
  if (Object.prototype.hasOwnProperty.call(n6, t5)) return true;
1082
1082
  const e7 = Object.getPrototypeOf(n6);
1083
- if (!ir(e7) || !ir(Object.getPrototypeOf(e7))) return false;
1083
+ if (!pr(e7) || !pr(Object.getPrototypeOf(e7))) return false;
1084
1084
  n6 = e7;
1085
1085
  }
1086
1086
  return false;
1087
1087
  }
1088
- function fr(e6, t5) {
1088
+ function hr(e6, t5) {
1089
1089
  const n6 = Reflect.getOwnPropertyDescriptor(e6, t5);
1090
1090
  return !(n6 && !n6.configurable) || "value" in n6 && true === n6.writable;
1091
1091
  }
1092
- function lr(e6, t5) {
1092
+ function vr(e6, t5) {
1093
1093
  let n6 = e6;
1094
1094
  for (const e7 of t5) {
1095
- if (ir(n6)) {
1096
- if (!ur(n6, e7)) return true;
1097
- if (!fr(n6, e7)) return false;
1095
+ if (pr(n6)) {
1096
+ if (!gr(n6, e7)) return true;
1097
+ if (!hr(n6, e7)) return false;
1098
1098
  } else if (se(n6)) {
1099
1099
  if (!(e7 in n6)) return true;
1100
- } else if (!ar(n6) || !(e7 in n6)) return false;
1100
+ } else if (!dr(n6) || !(e7 in n6)) return false;
1101
1101
  n6 = Reflect.get(n6, e7);
1102
1102
  }
1103
- return ir(n6);
1103
+ return pr(n6);
1104
1104
  }
1105
- function pr(e6, t5, n6) {
1105
+ function yr(e6, t5, n6) {
1106
1106
  const r6 = [], o5 = [], s6 = [];
1107
1107
  for (const n7 of t5) {
1108
- const t6 = sr(n7);
1108
+ const t6 = lr(n7);
1109
1109
  if (0 === t6.length) continue;
1110
1110
  const r7 = t6.join(".");
1111
- s6.push({ rest: t6, fn: r7 }), lr(e6, t6) || o5.push(r7);
1111
+ s6.push({ rest: t6, fn: r7 }), vr(e6, t6) || o5.push(r7);
1112
1112
  }
1113
1113
  const i6 = /* @__PURE__ */ new WeakMap(), a5 = /* @__PURE__ */ new WeakSet();
1114
1114
  function c3(e7, t6) {
@@ -1119,10 +1119,10 @@ function pr(e6, t5, n6) {
1119
1119
  else r6.push({ fn: o6, args: t6, ts: Date.now() });
1120
1120
  }
1121
1121
  function u4(e7, t6) {
1122
- return 0 === t6.length || f4(e7) ? e7 : se(e7) && !t6.some((t7) => t7.rest[0] in e7) ? Promise.resolve(e7).then((e8) => u4(e8, t6)) : ir(e7) ? h3(e7, [], t6) : ar(e7) ? p4(e7, t6) : e7;
1122
+ return 0 === t6.length || f4(e7) ? e7 : se(e7) && !t6.some((t7) => t7.rest[0] in e7) ? Promise.resolve(e7).then((e8) => u4(e8, t6)) : pr(e7) ? h3(e7, [], t6) : dr(e7) ? p4(e7, t6) : e7;
1123
1123
  }
1124
1124
  function f4(e7) {
1125
- return (ar(e7) || ir(e7)) && a5.has(e7);
1125
+ return (dr(e7) || pr(e7)) && a5.has(e7);
1126
1126
  }
1127
1127
  function l4(e7, t6) {
1128
1128
  const n7 = [], r7 = [];
@@ -1140,8 +1140,8 @@ function pr(e6, t5, n6) {
1140
1140
  return r7.set(n7, s7), s7;
1141
1141
  }
1142
1142
  function d3(e7, t6) {
1143
- if (ir(e7)) return m4(e7, t6);
1144
- return t6.some((t7) => !fr(e7, t7.rest[0])) ? (function(e8, t7) {
1143
+ if (pr(e7)) return m4(e7, t6);
1144
+ return t6.some((t7) => !hr(e7, t7.rest[0])) ? (function(e8, t7) {
1145
1145
  const n7 = Object.create(Object.getPrototypeOf(e8)), r7 = g4(e8, t7, () => o6), o6 = new Proxy(n7, { get: (e9, t8) => r7.get(t8), set: (t8, n8, r8) => Reflect.set(e8, n8, r8, e8), has: (t8, n8) => Reflect.has(e8, n8), ownKeys: () => Reflect.ownKeys(e8), getOwnPropertyDescriptor(t8, n8) {
1146
1146
  const r8 = Reflect.getOwnPropertyDescriptor(e8, n8);
1147
1147
  return r8 && { ...r8, configurable: true };
@@ -1150,7 +1150,7 @@ function pr(e6, t5, n6) {
1150
1150
  })(e7, t6) : m4(e7, t6);
1151
1151
  }
1152
1152
  function m4(e7, t6) {
1153
- const n7 = g4(e7, t6, () => r7), r7 = new Proxy(e7, { get: (e8, t7) => "string" != typeof t7 || fr(e8, t7) ? n7.get(t7) : Reflect.get(e8, t7, e8), set: (e8, t7, n8) => Reflect.set(e8, t7, n8, e8) });
1153
+ const n7 = g4(e7, t6, () => r7), r7 = new Proxy(e7, { get: (e8, t7) => "string" != typeof t7 || hr(e8, t7) ? n7.get(t7) : Reflect.get(e8, t7, e8), set: (e8, t7, n8) => Reflect.set(e8, t7, n8, e8) });
1154
1154
  return a5.add(r7), r7;
1155
1155
  }
1156
1156
  function g4(e7, t6, n7) {
@@ -1158,32 +1158,32 @@ function pr(e6, t5, n6) {
1158
1158
  return { get(o6) {
1159
1159
  const s7 = Reflect.get(e7, o6, e7);
1160
1160
  if ("string" != typeof o6) return s7;
1161
- if (!ir(s7) && !ar(s7)) return s7;
1161
+ if (!pr(s7) && !dr(s7)) return s7;
1162
1162
  if (f4(s7)) return s7;
1163
1163
  const i7 = r7.get(o6);
1164
1164
  if (i7 && i7.value === s7) return i7.out;
1165
1165
  const { leafs: a6, deeper: c4 } = l4(t6, o6);
1166
- if (!(a6.length > 0 || c4.length > 0) && (!ir(s7) || (function(e8) {
1166
+ if (!(a6.length > 0 || c4.length > 0) && (!pr(s7) || (function(e8) {
1167
1167
  if (Array.isArray(e8)) return true;
1168
1168
  const t7 = Object.getPrototypeOf(e8);
1169
1169
  return t7 === Object.prototype || null === t7;
1170
1170
  })(e7))) return s7;
1171
1171
  let u5 = s7;
1172
- return ir(s7) ? u5 = h3(s7, a6, c4, { proxy: n7(), target: e7 }) : c4.length > 0 && (u5 = p4(s7, c4)), r7.set(o6, { value: s7, out: u5 }), u5;
1172
+ return pr(s7) ? u5 = h3(s7, a6, c4, { proxy: n7(), target: e7 }) : c4.length > 0 && (u5 = p4(s7, c4)), r7.set(o6, { value: s7, out: u5 }), u5;
1173
1173
  } };
1174
1174
  }
1175
1175
  function h3(e7, t6, n7, r7) {
1176
- const o6 = () => n7.filter((t7) => !ur(e7, t7.rest[0])), s7 = /* @__PURE__ */ new Map(), i7 = new Proxy(e7, { get(e8, t7) {
1176
+ const o6 = () => n7.filter((t7) => !gr(e7, t7.rest[0])), s7 = /* @__PURE__ */ new Map(), i7 = new Proxy(e7, { get(e8, t7) {
1177
1177
  const r8 = Reflect.get(e8, t7, e8);
1178
- if ("string" != typeof t7 || !fr(e8, t7)) return r8;
1179
- if (!ur(e8, t7)) return r8;
1178
+ if ("string" != typeof t7 || !hr(e8, t7)) return r8;
1179
+ if (!gr(e8, t7)) return r8;
1180
1180
  const { leafs: o7, deeper: a6 } = l4(n7, t7);
1181
1181
  if (0 === o7.length && 0 === a6.length) return r8;
1182
1182
  if (f4(r8)) return r8;
1183
1183
  const c4 = s7.get(t7);
1184
1184
  if (c4 && c4.value === r8) return c4.out;
1185
1185
  let u5 = r8;
1186
- return ir(r8) ? u5 = h3(r8, o7, a6, { proxy: i7, target: e8 }) : ar(r8) && a6.length > 0 && (u5 = p4(r8, a6)), s7.set(t7, { value: r8, out: u5 }), u5;
1186
+ return pr(r8) ? u5 = h3(r8, o7, a6, { proxy: i7, target: e8 }) : dr(r8) && a6.length > 0 && (u5 = p4(r8, a6)), s7.set(t7, { value: r8, out: u5 }), u5;
1187
1187
  }, set: (e8, t7, n8) => Reflect.set(e8, t7, n8, e8), apply(e8, n8, s8) {
1188
1188
  c3(t6, s8);
1189
1189
  const i8 = !r7 || n8 !== r7.proxy && void 0 !== n8 ? n8 : r7.target;
@@ -1191,28 +1191,28 @@ function pr(e6, t5, n6) {
1191
1191
  }, construct(e8, n8, r8) {
1192
1192
  c3(t6, n8);
1193
1193
  const s8 = Reflect.construct(e8, n8, r8 === i7 ? e8 : r8), a6 = u4(s8, o6());
1194
- return ar(a6) || ir(a6) ? a6 : s8;
1194
+ return dr(a6) || pr(a6) ? a6 : s8;
1195
1195
  } });
1196
1196
  return a5.add(i7), i7;
1197
1197
  }
1198
1198
  return { env: d3(e6, s6), calls: r6, unresolved: o5 };
1199
1199
  }
1200
- function mr(e6) {
1201
- if (!e6.startsWith(dr)) return null;
1200
+ function wr(e6) {
1201
+ if (!e6.startsWith(br)) return null;
1202
1202
  const t5 = e6.slice(5).split("."), [n6, r6, o5] = t5;
1203
1203
  return 3 === t5.length && n6 && r6 && o5 ? { pb: n6, ses: r6, secret: o5 } : null;
1204
1204
  }
1205
- function $r(e6) {
1205
+ function Er(e6) {
1206
1206
  return ae(e6) && "string" == typeof e6.method && ae(e6.headers);
1207
1207
  }
1208
- function Er(e6) {
1208
+ function Rr(e6) {
1209
1209
  if (void 0 === e6 || "*" === e6) return () => true;
1210
1210
  if ("and" in e6) {
1211
- const t5 = e6.and.map(Er);
1211
+ const t5 = e6.and.map(Rr);
1212
1212
  return (e7) => t5.every((t6) => t6(e7));
1213
1213
  }
1214
1214
  if ("or" in e6) {
1215
- const t5 = e6.or.map(Er);
1215
+ const t5 = e6.or.map(Rr);
1216
1216
  return (e7) => t5.some((t6) => t6(e7));
1217
1217
  }
1218
1218
  return (function(e7) {
@@ -1248,79 +1248,79 @@ function Er(e6) {
1248
1248
  };
1249
1249
  })(e6);
1250
1250
  }
1251
- function Ir(e6) {
1251
+ function Tr(e6) {
1252
1252
  return "object" == typeof e6 && null !== e6 && !Array.isArray(e6) && ("match" in e6 || "next" in e6 || "one" in e6 || "many" in e6 || "stop" in e6);
1253
1253
  }
1254
- function _r(e6) {
1255
- return Array.isArray(e6) && e6.length > 0 && e6.every((e7) => Ir(e7));
1254
+ function Cr(e6) {
1255
+ return Array.isArray(e6) && e6.length > 0 && e6.every((e7) => Tr(e7));
1256
1256
  }
1257
- function Mr(e6) {
1257
+ function zr(e6) {
1258
1258
  return "object" == typeof e6 && !Array.isArray(e6) && "type" in e6 && "continuation" === e6.type;
1259
1259
  }
1260
- function Pr(e6, t5) {
1260
+ function Dr(e6, t5) {
1261
1261
  return { kind: t5 ? "sequence" : "next", path: e6 };
1262
1262
  }
1263
- function Tr(e6, t5) {
1263
+ function Fr(e6, t5) {
1264
1264
  return t5 ? { ...e6, outer: t5 } : e6;
1265
1265
  }
1266
- function Rr(e6, t5, n6, r6) {
1267
- return Tr(n6 ? { kind: e6, path: t5, match: n6 } : { kind: e6, path: t5, catchAll: true }, r6);
1266
+ function Ur(e6, t5, n6, r6) {
1267
+ return Fr(n6 ? { kind: e6, path: t5, match: n6 } : { kind: e6, path: t5, catchAll: true }, r6);
1268
1268
  }
1269
- function Cr(e6, t5, n6, r6) {
1270
- return 0 === e6.length ? { type: "chain", value: [], label: Tr({ kind: n6, path: t5 }, r6) } : { type: n6, routes: zr(e6, t5, n6, r6) };
1269
+ function Wr(e6, t5, n6, r6) {
1270
+ return 0 === e6.length ? { type: "chain", value: [], label: Fr({ kind: n6, path: t5 }, r6) } : { type: n6, routes: qr(e6, t5, n6, r6) };
1271
1271
  }
1272
- function zr(e6, t5, n6, r6) {
1272
+ function qr(e6, t5, n6, r6) {
1273
1273
  return e6.map((e7, o5) => {
1274
1274
  const s6 = [...t5, o5];
1275
1275
  if ("string" == typeof e7 || Array.isArray(e7)) {
1276
- const t6 = Rr(n6, s6, void 0, r6);
1277
- return { match: Nr, next: Dr(e7, s6, t6) ?? { type: "chain", value: [], label: t6 } };
1276
+ const t6 = Ur(n6, s6, void 0, r6);
1277
+ return { match: Lr, next: Zr(e7, s6, t6) ?? { type: "chain", value: [], label: t6 } };
1278
1278
  }
1279
- const i6 = Rr(n6, s6, e7.match, r6);
1280
- return { match: e7.match ? Er(e7.match) : Nr, source: e7.match, next: Lr(e7, s6, i6, false, true) ?? { type: "chain", value: [], label: i6 } };
1279
+ const i6 = Ur(n6, s6, e7.match, r6);
1280
+ return { match: e7.match ? Rr(e7.match) : Lr, source: e7.match, next: Kr(e7, s6, i6, false, true) ?? { type: "chain", value: [], label: i6 } };
1281
1281
  });
1282
1282
  }
1283
- function Lr(e6, t5, n6, r6, o5) {
1284
- const s6 = o5 ? void 0 : e6.match, i6 = s6 ? Tr({ kind: "next", path: t5, match: s6 }, n6) : n6 ?? Pr(t5, r6), a5 = s6 ? i6 : n6;
1283
+ function Kr(e6, t5, n6, r6, o5) {
1284
+ const s6 = o5 ? void 0 : e6.match, i6 = s6 ? Fr({ kind: "next", path: t5, match: s6 }, n6) : n6 ?? Dr(t5, r6), a5 = s6 ? i6 : n6;
1285
1285
  let c3;
1286
- return true === e6.stop ? c3 = { type: "stop", label: i6 } : void 0 !== e6.one ? c3 = Cr(e6.one, [...t5, "one"], "one", a5) : void 0 !== e6.many ? c3 = Cr(e6.many, [...t5, "many"], "many", a5) : void 0 !== e6.next && (c3 = Dr(e6.next, [...t5, "next"], a5)), s6 ? { type: "gate", match: Er(s6), source: s6, next: c3 ?? { type: "chain", value: [], label: i6 } } : void 0 === c3 && e6.match ? { type: "chain", value: [], label: i6 } : c3;
1286
+ return true === e6.stop ? c3 = { type: "stop", label: i6 } : void 0 !== e6.one ? c3 = Wr(e6.one, [...t5, "one"], "one", a5) : void 0 !== e6.many ? c3 = Wr(e6.many, [...t5, "many"], "many", a5) : void 0 !== e6.next && (c3 = Zr(e6.next, [...t5, "next"], a5)), s6 ? { type: "gate", match: Rr(s6), source: s6, next: c3 ?? { type: "chain", value: [], label: i6 } } : void 0 === c3 && e6.match ? { type: "chain", value: [], label: i6 } : c3;
1287
1287
  }
1288
- function Dr(e6, t5 = [], n6, r6 = false) {
1288
+ function Zr(e6, t5 = [], n6, r6 = false) {
1289
1289
  if (null != e6) {
1290
- if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ?? Pr(t5, r6) };
1290
+ if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ?? Dr(t5, r6) };
1291
1291
  if (Array.isArray(e6)) {
1292
1292
  if (0 === e6.length) return;
1293
- if (_r(e6)) return { type: "one", routes: zr(e6, t5, "one", n6) };
1293
+ if (Cr(e6)) return { type: "one", routes: qr(e6, t5, "one", n6) };
1294
1294
  const o5 = [];
1295
1295
  for (const t6 of e6) "string" == typeof t6 && o5.push(t6);
1296
- if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ?? Pr(t5, r6) };
1296
+ if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ?? Dr(t5, r6) };
1297
1297
  const s6 = [];
1298
1298
  if (e6.forEach((e7, r7) => {
1299
- const o6 = Dr(e7, [...t5, r7], n6, true);
1299
+ const o6 = Zr(e7, [...t5, r7], n6, true);
1300
1300
  void 0 !== o6 && s6.push(o6);
1301
1301
  }), 0 === s6.length) return;
1302
1302
  return { type: "sequence", value: s6 };
1303
1303
  }
1304
- return Lr(e6, t5, n6, r6, false);
1304
+ return Kr(e6, t5, n6, r6, false);
1305
1305
  }
1306
1306
  }
1307
- function Ur(e6, t5, n6) {
1307
+ function Br(e6, t5, n6) {
1308
1308
  return n6 ? { type: "continuation", segments: e6, at: t5, tail: n6 } : { type: "continuation", segments: e6, at: t5 };
1309
1309
  }
1310
- function Wr(e6) {
1310
+ function Hr(e6) {
1311
1311
  if (null == e6) return;
1312
- if (Mr(e6)) return e6;
1312
+ if (zr(e6)) return e6;
1313
1313
  const t5 = (function(e7) {
1314
1314
  if (null == e7) return;
1315
- if ("object" != typeof e7) return Dr(e7);
1316
- const t6 = Fr.get(e7);
1315
+ if ("object" != typeof e7) return Zr(e7);
1316
+ const t6 = Vr.get(e7);
1317
1317
  if (t6) return t6;
1318
- const n6 = Dr(e7);
1319
- return n6 && Fr.set(e7, n6), n6;
1318
+ const n6 = Zr(e7);
1319
+ return n6 && Vr.set(e7, n6), n6;
1320
1320
  })(e6);
1321
- return t5 ? Ur([t5], 0, void 0) : void 0;
1321
+ return t5 ? Br([t5], 0, void 0) : void 0;
1322
1322
  }
1323
- function qr(e6, t5, n6) {
1323
+ function Jr(e6, t5, n6) {
1324
1324
  const r6 = [];
1325
1325
  let o5 = e6;
1326
1326
  for (; o5; ) {
@@ -1328,7 +1328,7 @@ function qr(e6, t5, n6) {
1328
1328
  o5 = o5.tail;
1329
1329
  continue;
1330
1330
  }
1331
- const e7 = o5.segments[o5.at], s6 = Ur(o5.segments, o5.at + 1, o5.tail);
1331
+ const e7 = o5.segments[o5.at], s6 = Br(o5.segments, o5.at + 1, o5.tail);
1332
1332
  if ("static" === e7.type) {
1333
1333
  r6.push(e7.value), n6 && n6(e7), o5 = s6;
1334
1334
  continue;
@@ -1338,30 +1338,30 @@ function qr(e6, t5, n6) {
1338
1338
  continue;
1339
1339
  }
1340
1340
  if ("sequence" === e7.type) {
1341
- o5 = Ur(e7.value, 0, s6);
1341
+ o5 = Br(e7.value, 0, s6);
1342
1342
  continue;
1343
1343
  }
1344
1344
  if (r6.length > 0) return { ids: r6, then: o5 };
1345
1345
  if ("stop" === e7.type) return n6 && n6(e7), { ids: [], stop: true };
1346
1346
  if ("gate" === e7.type) {
1347
- o5 = t5.gate(e7) ? Ur([e7.next], 0, s6) : s6;
1347
+ o5 = t5.gate(e7) ? Br([e7.next], 0, s6) : s6;
1348
1348
  continue;
1349
1349
  }
1350
1350
  if ("one" === e7.type) {
1351
1351
  const n7 = e7.routes.length > 0 ? t5.one(e7.routes) : -1;
1352
- o5 = n7 >= 0 ? Ur([e7.routes[n7].next], 0, s6) : s6;
1352
+ o5 = n7 >= 0 ? Br([e7.routes[n7].next], 0, s6) : s6;
1353
1353
  continue;
1354
1354
  }
1355
1355
  const i6 = e7.routes.length > 0 ? t5.many(e7.routes) : [];
1356
1356
  if (0 !== i6.length) {
1357
- if (1 !== i6.length) return { ids: [], forks: i6.map((t6) => Ur([e7.routes[t6].next], 0, s6)) };
1358
- o5 = Ur([e7.routes[i6[0]].next], 0, s6);
1357
+ if (1 !== i6.length) return { ids: [], forks: i6.map((t6) => Br([e7.routes[t6].next], 0, s6)) };
1358
+ o5 = Br([e7.routes[i6[0]].next], 0, s6);
1359
1359
  } else o5 = s6;
1360
1360
  }
1361
1361
  return { ids: r6 };
1362
1362
  }
1363
- function Kr(e6, t5) {
1364
- return qr(Wr(e6), /* @__PURE__ */ (function(e7) {
1363
+ function Gr(e6, t5) {
1364
+ return Jr(Hr(e6), /* @__PURE__ */ (function(e7) {
1365
1365
  return { gate: (t6) => t6.match(e7), one: (t6) => t6.findIndex((t7) => t7.match(e7)), many: (t6) => {
1366
1366
  const n6 = [];
1367
1367
  return t6.forEach((t7, r6) => {
@@ -1370,42 +1370,42 @@ function Kr(e6, t5) {
1370
1370
  } };
1371
1371
  })(t5));
1372
1372
  }
1373
- function Vr(e6) {
1373
+ function Yr(e6) {
1374
1374
  return null == e6 ? [] : [{ route: e6, ancestry: [] }];
1375
1375
  }
1376
- function Zr(e6) {
1376
+ function Xr(e6) {
1377
1377
  return Array.isArray(e6) && e6.every((e7) => "object" == typeof e7 && null !== e7 && !Array.isArray(e7) && "ancestry" in e7);
1378
1378
  }
1379
- function Br(e6, t5, n6) {
1379
+ function Qr(e6, t5, n6) {
1380
1380
  if (e6.at >= e6.ids.length) return { rest: t5 };
1381
1381
  const r6 = e6.ids[e6.at], o5 = e6.at + 1 < e6.ids.length ? [{ ids: e6.ids, at: e6.at + 1, ancestry: e6.ancestry }, ...t5] : t5;
1382
1382
  if (e6.ancestry.includes(r6)) return { rest: o5 };
1383
1383
  const s6 = [...e6.ancestry, r6], i6 = n6[r6], a5 = i6 ? i6.config.next : void 0;
1384
1384
  return { id: r6, ancestry: s6, rest: void 0 === a5 ? o5 : [{ route: a5, ancestry: s6 }, ...o5] };
1385
1385
  }
1386
- function Hr(e6, t5, n6) {
1386
+ function eo(e6, t5, n6) {
1387
1387
  if (e6.stop) return t5.length > 0 ? { kind: "stop", owner: t5[t5.length - 1] } : { kind: "stop" };
1388
1388
  if (e6.forks) return { kind: "fork", branches: e6.forks.map((e7) => [{ route: e7, ancestry: t5 }, ...n6]) };
1389
1389
  const r6 = [];
1390
1390
  return e6.ids.length > 0 && r6.push({ ids: e6.ids, at: 0, ancestry: t5 }), e6.then && r6.push({ route: e6.then, ancestry: t5 }), { kind: "stack", stack: [...r6, ...n6] };
1391
1391
  }
1392
- function Jr(e6, t5, n6) {
1392
+ function to(e6, t5, n6) {
1393
1393
  let r6 = e6;
1394
1394
  for (; r6.length > 0; ) {
1395
1395
  const [e7, ...o5] = r6;
1396
1396
  if ("ids" in e7) {
1397
- const t6 = Br(e7, o5, n6);
1397
+ const t6 = Qr(e7, o5, n6);
1398
1398
  if (void 0 !== t6.id) return { kind: "run", id: t6.id, rest: t6.rest, ancestry: t6.ancestry };
1399
1399
  r6 = t6.rest;
1400
1400
  continue;
1401
1401
  }
1402
- const s6 = Hr(Kr(e7.route, t5), e7.ancestry, o5);
1402
+ const s6 = eo(Gr(e7.route, t5), e7.ancestry, o5);
1403
1403
  if ("stack" !== s6.kind) return s6;
1404
1404
  r6 = s6.stack;
1405
1405
  }
1406
1406
  return { kind: "done" };
1407
1407
  }
1408
- function Gr(e6, t5 = {}) {
1408
+ function no(e6, t5 = {}) {
1409
1409
  const n6 = [], r6 = /* @__PURE__ */ new Map(), o5 = /* @__PURE__ */ new Set(), s6 = /* @__PURE__ */ new WeakMap(), i6 = /* @__PURE__ */ new WeakMap();
1410
1410
  let a5 = 0;
1411
1411
  const c3 = (e7) => {
@@ -1431,7 +1431,7 @@ function Gr(e6, t5 = {}) {
1431
1431
  }
1432
1432
  const n7 = e7.route;
1433
1433
  if ("string" == typeof n7) return `s${n7}/${t6}`;
1434
- let r7 = "", o6 = Wr(n7);
1434
+ let r7 = "", o6 = Hr(n7);
1435
1435
  for (; o6; ) r7 += `${c3(o6.segments)}@${o6.at};`, o6 = o6.tail;
1436
1436
  return `r${r7}/${t6}`;
1437
1437
  }, p4 = (e7, n7, r7) => {
@@ -1440,7 +1440,7 @@ function Gr(e6, t5 = {}) {
1440
1440
  if (o5.add(i7), 0 === e7.length) return;
1441
1441
  const [a6, ...d3] = e7;
1442
1442
  if ("ids" in a6) {
1443
- const e8 = Br(a6, d3, t5);
1443
+ const e8 = Qr(a6, d3, t5);
1444
1444
  if (void 0 === e8.id) return void p4(e8.rest, n7, r7);
1445
1445
  const o6 = (s6.get(a6.ids) ?? [])[a6.at];
1446
1446
  if (!o6) return;
@@ -1461,7 +1461,7 @@ function Gr(e6, t5 = {}) {
1461
1461
  const s7 = [], i8 = (e10) => {
1462
1462
  let t7 = 0;
1463
1463
  return o6 < r8.length ? t7 = r8[o6] : s7.push(e10), o6++, t7;
1464
- }, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], u5 = qr(e9, { gate: () => 0 === i8(2), one: (e10) => {
1464
+ }, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], u5 = Jr(e9, { gate: () => 0 === i8(2), one: (e10) => {
1465
1465
  const t7 = e10.map((e11, t8) => t8);
1466
1466
  return a7(e10) || t7.push(-1), t7[i8(t7.length)];
1467
1467
  }, many: (e10) => {
@@ -1476,7 +1476,7 @@ function Gr(e6, t5 = {}) {
1476
1476
  }
1477
1477
  };
1478
1478
  return n8([]), t6;
1479
- })(Wr(a6.route))) {
1479
+ })(Hr(a6.route))) {
1480
1480
  const { steps: t6 } = e8, r8 = [];
1481
1481
  let o6 = n7;
1482
1482
  for (const t7 of e8.visited) if ("stop" !== t7.type) if ("static" === t7.type) r8.push(t7), o6 = t7.value;
@@ -1487,42 +1487,42 @@ function Gr(e6, t5 = {}) {
1487
1487
  }
1488
1488
  else f4(n7, t7.label, c3(t7), m4, void 0);
1489
1489
  t6.ids.length > 0 && s6.set(t6.ids, r8);
1490
- const i8 = Hr(t6, a6.ancestry, d3);
1490
+ const i8 = eo(t6, a6.ancestry, d3);
1491
1491
  if ("stop" !== i8.kind) if ("fork" !== i8.kind) p4(i8.stack, n7, void 0);
1492
1492
  else for (const e9 of i8.branches) p4(e9, n7, void 0);
1493
1493
  }
1494
1494
  };
1495
- return p4(Vr(e6), void 0, void 0), n6;
1495
+ return p4(Yr(e6), void 0, void 0), n6;
1496
1496
  }
1497
- function Qr(e6, t5, n6 = Date.now) {
1498
- const r6 = { [Yr]: e6 };
1499
- return void 0 !== t5 && (r6[Xr] = n6() + t5), r6;
1497
+ function so(e6, t5, n6 = Date.now) {
1498
+ const r6 = { [ro]: e6 };
1499
+ return void 0 !== t5 && (r6[oo] = n6() + t5), r6;
1500
1500
  }
1501
- function eo(e6, t5 = Date.now) {
1501
+ function io(e6, t5 = Date.now) {
1502
1502
  if (void 0 === e6) return;
1503
- if (null === (n6 = e6) || "object" != typeof n6 || Array.isArray(n6) || !(Yr in e6)) return { value: e6 };
1503
+ if (null === (n6 = e6) || "object" != typeof n6 || Array.isArray(n6) || !(ro in e6)) return { value: e6 };
1504
1504
  var n6;
1505
- const r6 = e6[Xr];
1506
- return "number" == typeof r6 && t5() > r6 ? { expired: true } : { value: e6[Yr] };
1505
+ const r6 = e6[oo];
1506
+ return "number" == typeof r6 && t5() > r6 ? { expired: true } : { value: e6[ro] };
1507
1507
  }
1508
- function ro(e6) {
1508
+ function uo(e6) {
1509
1509
  return null !== e6 && "object" == typeof e6 && !Array.isArray(e6);
1510
1510
  }
1511
- function ao(e6) {
1512
- return null === e6 || "string" == typeof e6 || "number" == typeof e6 || "boolean" == typeof e6 || e6 instanceof Uint8Array || (Array.isArray(e6) ? e6.every((e7) => void 0 === e7 || ao(e7)) : !!ro(e6) && Object.values(e6).every((e7) => void 0 === e7 || ao(e7)));
1511
+ function mo(e6) {
1512
+ return null === e6 || "string" == typeof e6 || "number" == typeof e6 || "boolean" == typeof e6 || e6 instanceof Uint8Array || (Array.isArray(e6) ? e6.every((e7) => void 0 === e7 || mo(e7)) : !!uo(e6) && Object.values(e6).every((e7) => void 0 === e7 || mo(e7)));
1513
1513
  }
1514
- function fo(e6 = {}, t5) {
1514
+ function vo(e6 = {}, t5) {
1515
1515
  return void 0 === t5 ? { ingest: e6 } : { ingest: e6, event: t5 };
1516
1516
  }
1517
- function lo(e6) {
1518
- return { stop: e6.stop ?? false, storeId: e6.store, namespace: e6.namespace, rules: e6.rules.map((e7) => ({ match: e7.match ? Er(e7.match) : () => true, key: e7.key, ttl: e7.ttl, update: e7.update })) };
1517
+ function yo(e6) {
1518
+ return { stop: e6.stop ?? false, storeId: e6.store, namespace: e6.namespace, rules: e6.rules.map((e7) => ({ match: e7.match ? Rr(e7.match) : () => true, key: e7.key, ttl: e7.ttl, update: e7.update })) };
1519
1519
  }
1520
- async function po(e6, t5, n6, r6) {
1520
+ async function bo(e6, t5, n6, r6) {
1521
1521
  const o5 = e6.rules.find((e7) => e7.match(n6));
1522
1522
  if (!o5) return null;
1523
1523
  const s6 = o5.key.map((e7) => String(ze(n6, e7) ?? ""));
1524
1524
  if (s6.every((e7) => "" === e7)) return null;
1525
- const i6 = s6.join(":"), a5 = r6 ?? e6.namespace, c3 = a5 ? `${a5}:${i6}` : i6, u4 = eo(await t5.get(c3));
1525
+ const i6 = s6.join(":"), a5 = r6 ?? e6.namespace, c3 = a5 ? `${a5}:${i6}` : i6, u4 = io(await t5.get(c3));
1526
1526
  if (void 0 === u4) return { status: "MISS", key: c3, rule: o5 };
1527
1527
  if ("expired" in u4) {
1528
1528
  try {
@@ -1533,13 +1533,13 @@ async function po(e6, t5, n6, r6) {
1533
1533
  }
1534
1534
  return { status: "HIT", key: c3, value: u4.value, rule: o5 };
1535
1535
  }
1536
- function mo(e6, t5, n6, r6) {
1537
- if (!ao(n6)) return;
1538
- const o5 = 1e3 * r6, s6 = e6.set(t5, Qr(n6, o5), o5);
1536
+ function wo(e6, t5, n6, r6) {
1537
+ if (!mo(n6)) return;
1538
+ const o5 = 1e3 * r6, s6 = e6.set(t5, so(n6, o5), o5);
1539
1539
  se(s6) && Promise.resolve(s6).catch(() => {
1540
1540
  });
1541
1541
  }
1542
- async function go(e6, t5, n6, r6) {
1542
+ async function ko(e6, t5, n6, r6) {
1543
1543
  if (!t5) return e6;
1544
1544
  let o5 = e6;
1545
1545
  for (const [e7, s6] of Object.entries(t5)) {
@@ -1547,30 +1547,30 @@ async function go(e6, t5, n6, r6) {
1547
1547
  }
1548
1548
  return o5;
1549
1549
  }
1550
- function ho(e6) {
1550
+ function $o(e6) {
1551
1551
  return Q(e6) ? e6 : [e6];
1552
1552
  }
1553
- function vo(e6) {
1553
+ function jo(e6) {
1554
1554
  const t5 = /^(event|ingest)\.(.+)$/.exec(e6);
1555
1555
  if (t5) return { side: "event" === t5[1] ? "event" : "ingest", path: t5[2] };
1556
1556
  }
1557
- function yo(e6) {
1557
+ function So(e6) {
1558
1558
  if (!ae(e6.consent)) return;
1559
1559
  const t5 = {};
1560
1560
  for (const [n6, r6] of Object.entries(e6.consent)) "boolean" == typeof r6 && (t5[n6] = r6);
1561
1561
  return t5;
1562
1562
  }
1563
- function bo(e6) {
1563
+ function Ao(e6) {
1564
1564
  return !ne(e6) || (ae(e6) ? 0 === Object.keys(e6).length : !!Q(e6) && !e6.some(ne));
1565
1565
  }
1566
- async function wo(e6, t5, n6, r6, o5) {
1566
+ async function xo(e6, t5, n6, r6, o5) {
1567
1567
  const s6 = o5 ?? {};
1568
1568
  let i6 = n6;
1569
1569
  for (const n7 of e6) await bt(async () => {
1570
1570
  const e7 = t5(n7.store);
1571
1571
  if (!e7) return void r6.logger?.error?.("[state] unknown store", { mode: n7.mode, store: n7.store });
1572
1572
  if (ae(e7.config) && true === e7.config.file) return void r6.logger?.warn?.("[state] file stores are not supported by state, entry skipped", { mode: n7.mode, store: n7.store });
1573
- const o6 = fo(s6, i6), a5 = { collector: r6, event: i6, consent: yo(i6) }, c3 = await St(o6, n7.key, a5);
1573
+ const o6 = vo(s6, i6), a5 = { collector: r6, event: i6, consent: So(i6) }, c3 = await St(o6, n7.key, a5);
1574
1574
  if (!ue(c3)) return void r6.logger?.warn?.("[state] key did not resolve", { mode: n7.mode, store: n7.store, key: n7.key });
1575
1575
  const u4 = n7.store ? c3 : `state:${c3}`;
1576
1576
  if ("set" === n7.mode) {
@@ -1580,15 +1580,15 @@ async function wo(e6, t5, n6, r6, o5) {
1580
1580
  return void await e7.set(u4, t6);
1581
1581
  }
1582
1582
  const s7 = await kt(t6, n7.mapping, a5);
1583
- if (!ne(s7) || bo(s7)) return;
1583
+ if (!ne(s7) || Ao(s7)) return;
1584
1584
  if (!ae(s7)) return void await e7.set(u4, s7);
1585
1585
  const i7 = await e7.get(u4);
1586
- return ne(i7) && !ae(i7) && r6.logger?.warn?.("[state] stored value is not an object, replaced", { store: n7.store }), void await e7.set(u4, ae(i7) ? Ze(Ce(i7), s7) : s7);
1586
+ return ne(i7) && !ae(i7) && r6.logger?.warn?.("[state] stored value is not an object, replaced", { store: n7.store }), void await e7.set(u4, ae(i7) ? Ve(Ce(i7), s7) : s7);
1587
1587
  }
1588
1588
  const f4 = ue(l4 = n7.value) ? l4 : ae(l4) && ue(l4.key) ? l4.key : void 0;
1589
1589
  var l4;
1590
1590
  if (!f4) return;
1591
- const p4 = vo(f4);
1591
+ const p4 = jo(f4);
1592
1592
  if (!p4) return void r6.logger?.warn?.("[state] get target needs an event. or ingest. prefix", { store: n7.store, value: f4 });
1593
1593
  const d3 = await e7.get(u4);
1594
1594
  if (!ne(n7.mapping)) {
@@ -1597,8 +1597,8 @@ async function wo(e6, t5, n6, r6, o5) {
1597
1597
  }
1598
1598
  ne(d3) && !gt(d3) && r6.logger?.warn?.("[state] stored value has null or non-JSON values, mapping drops them", { store: n7.store });
1599
1599
  const m4 = await kt(d3, n7.mapping, a5);
1600
- if (bo(m4)) return;
1601
- const g4 = "ingest" === p4.side ? ze(s6, p4.path) : ze(i6, p4.path), h3 = ae(g4) && ae(m4) ? Ze(Ce(g4), m4) : m4;
1600
+ if (Ao(m4)) return;
1601
+ const g4 = "ingest" === p4.side ? ze(s6, p4.path) : ze(i6, p4.path), h3 = ae(g4) && ae(m4) ? Ve(Ce(g4), m4) : m4;
1602
1602
  "ingest" === p4.side ? Le(s6, p4.path, h3, { mutable: true }) : i6 = Le(i6, p4.path, h3);
1603
1603
  }, (e7) => {
1604
1604
  if (e7 instanceof wt) throw e7;
@@ -1606,7 +1606,7 @@ async function wo(e6, t5, n6, r6, o5) {
1606
1606
  })();
1607
1607
  return i6;
1608
1608
  }
1609
- var e, t, r, i, f, l, m, v, b, P, T, R, C, W, q, K, V, Z, B, H, J, fe, le, me, ve, ye, be, je, Se, Ae, xe, Te, Fe, Je, rt, pt, wt, Lt, tn, Fn, Un, nr, or, cr, dr, Nr, Fr, Yr, Xr;
1609
+ var e, t, r, i, f, l, m, v, b, P, R, T, C, W, q, K, Z, V, B, H, J, fe, le, me, ve, ye, be, je, Se, Ae, xe, Re, Fe, Je, rt, pt, wt, Lt, nn, Vn, Bn, cr, fr, mr, br, Lr, Vr, ro, oo;
1610
1610
  var init_dist = __esm({
1611
1611
  "../core/dist/index.mjs"() {
1612
1612
  "use strict";
@@ -1629,14 +1629,14 @@ var init_dist = __esm({
1629
1629
  b = {};
1630
1630
  t(b, { getStore: () => w, getStoreValue: () => k });
1631
1631
  P = /* @__PURE__ */ new Set(["description", "examples", "title", "$comment"]);
1632
- T = /* @__PURE__ */ new Set(["additionalItems", "additionalProperties", "contains", "contentSchema", "else", "if", "items", "not", "propertyNames", "then", "unevaluatedItems", "unevaluatedProperties"]);
1633
- R = /* @__PURE__ */ new Set(["allOf", "anyOf", "items", "oneOf", "prefixItems"]);
1632
+ R = /* @__PURE__ */ new Set(["additionalItems", "additionalProperties", "contains", "contentSchema", "else", "if", "items", "not", "propertyNames", "then", "unevaluatedItems", "unevaluatedProperties"]);
1633
+ T = /* @__PURE__ */ new Set(["allOf", "anyOf", "items", "oneOf", "prefixItems"]);
1634
1634
  C = /* @__PURE__ */ new Set(["properties", "patternProperties", "dependentSchemas", "dependentRequired", "dependencies", "$defs", "definitions"]);
1635
1635
  W = /^\$var\.([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)$/;
1636
1636
  q = /\$var\.([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)/g;
1637
1637
  K = /\$env\.([a-zA-Z_][a-zA-Z0-9_]*)(?::([^"}\s]*))?/g;
1638
- V = /^\$contract\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/;
1639
- Z = /^\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?$/;
1638
+ Z = /^\$contract\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/;
1639
+ V = /^\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?$/;
1640
1640
  B = /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
1641
1641
  H = /^\$secret\.([A-Z0-9_]+)$/;
1642
1642
  J = "$code:";
@@ -1662,7 +1662,7 @@ var init_dist = __esm({
1662
1662
  };
1663
1663
  Ae = "__WALKEROS_ENV:";
1664
1664
  xe = "__WALKEROS_SECRET:";
1665
- Te = { merge: true, shallow: true, extend: true };
1665
+ Re = { merge: true, shallow: true, extend: true };
1666
1666
  Fe = { data: (e6) => e6.data, globals: (e6) => e6.globals, context: (e6) => e6.context, user: (e6) => e6.user, source: (e6) => e6.source, event: (e6) => ({ entity: e6.entity, action: e6.action, id: e6.id, timestamp: e6.timestamp, name: e6.name, trigger: e6.trigger, timing: e6.timing }) };
1667
1667
  Je = "0123456789abcdef";
1668
1668
  rt = /^(?<version>[0-9a-f]{2})-(?<trace>[0-9a-f]{32})-(?<span>[0-9a-f]{16})-[0-9a-f]{2}$/;
@@ -1680,17 +1680,17 @@ var init_dist = __esm({
1680
1680
  super(t5), this.name = "InvalidEventError", Object.setPrototypeOf(this, e3.prototype);
1681
1681
  }
1682
1682
  };
1683
- tn = "elbObserve";
1684
- Fn = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
1685
- Un = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
1686
- nr = "observe";
1687
- or = "call:";
1688
- cr = ["name", "length", "prototype", "arguments", "caller"];
1689
- dr = "obsw_";
1690
- Nr = () => true;
1691
- Fr = /* @__PURE__ */ new WeakMap();
1692
- Yr = "__walkeros_cache_v__";
1693
- Xr = "__walkeros_cache_exp__";
1683
+ nn = "elbObserve";
1684
+ Vn = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
1685
+ Bn = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
1686
+ cr = "observe";
1687
+ fr = "call:";
1688
+ mr = ["name", "length", "prototype", "arguments", "caller"];
1689
+ br = "obsw_";
1690
+ Lr = () => true;
1691
+ Vr = /* @__PURE__ */ new WeakMap();
1692
+ ro = "__walkeros_cache_v__";
1693
+ oo = "__walkeros_cache_exp__";
1694
1694
  }
1695
1695
  });
1696
1696
 
@@ -3096,20 +3096,20 @@ function rt3(e6) {
3096
3096
  function st2(e6, t5, n6, i6) {
3097
3097
  for (const o5 of rt3(e6)) i6.test(o5) || n6.addIssue({ code: "custom", message: `State paths resolve against { event, ingest }: "${o5}" needs an "event." or "ingest." prefix.`, path: [t5] });
3098
3098
  }
3099
- function Fn3(e6, t5) {
3099
+ function Fn2(e6, t5) {
3100
3100
  void 0 !== e6.import && (void 0 !== e6.code && t5.addIssue({ code: "custom", message: "`import` cannot be combined with inline `code`", path: ["import"] }), void 0 === e6.package && t5.addIssue({ code: "custom", message: "`import` requires `package`", path: ["import"] }));
3101
3101
  }
3102
3102
  function Qn3(e6) {
3103
3103
  return Kn2.parse(e6);
3104
3104
  }
3105
- function Yn2(e6) {
3105
+ function Yn(e6) {
3106
3106
  return Kn2.safeParse(e6);
3107
3107
  }
3108
- function Xn2(e6) {
3109
- return Gn3.parse(e6);
3108
+ function Xn(e6) {
3109
+ return Gn2.parse(e6);
3110
3110
  }
3111
3111
  function ei(e6) {
3112
- return Gn3.safeParse(e6);
3112
+ return Gn2.safeParse(e6);
3113
3113
  }
3114
3114
  function yi(e6) {
3115
3115
  return Array.isArray(e6);
@@ -3583,24 +3583,24 @@ function Xi(e6, t5) {
3583
3583
  if (o7++, "object" === s7?.kind && s7.expectKey) {
3584
3584
  const t9 = JSON.parse(e9.slice(n10, o7));
3585
3585
  s7.key = "string" == typeof t9 ? t9 : "";
3586
- } else t8.set(ao2(i9()), { start: n10, end: o7 });
3586
+ } else t8.set(ao(i9()), { start: n10, end: o7 });
3587
3587
  } else o7++;
3588
3588
  }
3589
3589
  return t8;
3590
3590
  })(e8), i8 = [];
3591
- return fo2(t7, [], (t8, o7) => {
3592
- if (uo(o7)) return;
3593
- const r8 = n8.get(ao2(o7));
3591
+ return fo(t7, [], (t8, o7) => {
3592
+ if (uo2(o7)) return;
3593
+ const r8 = n8.get(ao(o7));
3594
3594
  r8 && i8.push({ path: o7, raw: e8.slice(r8.start + 1, r8.end - 1), offset: r8.start + 1 });
3595
3595
  }), i8;
3596
3596
  })(e7, t6);
3597
3597
  (function(e8, t7, n8) {
3598
- so(t7, io, (t8, i8, o7) => {
3598
+ so2(t7, io2, (t8, i8, o7) => {
3599
3599
  const r8 = t8[0], s7 = t8[1], a5 = t8[2];
3600
- n8.push({ message: `Malformed reference "${r8}", use a dot, not a colon: "$${s7}.${a5}".`, severity: "warning", path: i8.path.join("."), ...ko(e8, o7, r8.length) });
3600
+ n8.push({ message: `Malformed reference "${r8}", use a dot, not a colon: "$${s7}.${a5}".`, severity: "warning", path: i8.path.join("."), ...ko2(e8, o7, r8.length) });
3601
3601
  });
3602
3602
  })(e7, r7, o6), (function(e8, t7, n8, i8, o7) {
3603
- so(n8, ro2, (n9, r8, s7) => {
3603
+ so2(n8, ro2, (n9, r8, s7) => {
3604
3604
  const a5 = (function(e9, t8, n10) {
3605
3605
  if ("flows" !== t8[0] || !To(e9) || !To(e9.flows)) return n10.variables ?? {};
3606
3606
  const i9 = {};
@@ -3609,34 +3609,34 @@ function Xi(e6, t5) {
3609
3609
  if (!To(o8)) return i9;
3610
3610
  Ro(i9, o8.variables);
3611
3611
  const r9 = o8[t8[2]];
3612
- if (po2.includes(t8[2]) && To(r9)) {
3612
+ if (po.includes(t8[2]) && To(r9)) {
3613
3613
  const e10 = r9[t8[3]];
3614
3614
  To(e10) && Ro(i9, e10.variables);
3615
3615
  }
3616
3616
  return i9;
3617
3617
  })(t7, r8.path, i8);
3618
- n9[1] in a5 || o7.push({ message: `Unknown variable "$var.${n9[1]}". Defined: ${Object.keys(a5).join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...ko(e8, s7, n9[0].length) });
3618
+ n9[1] in a5 || o7.push({ message: `Unknown variable "$var.${n9[1]}". Defined: ${Object.keys(a5).join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...ko2(e8, s7, n9[0].length) });
3619
3619
  });
3620
3620
  })(e7, t6, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
3621
- so(n8, eo2, (n9, r8, s7) => {
3621
+ so2(n8, eo2, (n9, r8, s7) => {
3622
3622
  const a5 = (function(e9, t8, n10) {
3623
3623
  if ("flows" !== t8[0] || !To(e9) || !To(e9.flows)) return n10.stepNames?.stores ?? [];
3624
3624
  const i9 = e9.flows[t8[1]];
3625
3625
  return To(i9) && To(i9.stores) ? Object.keys(i9.stores) : [];
3626
3626
  })(t7, r8.path, i8);
3627
- a5.includes(n9[1]) || o7.push({ message: `Unknown store "$store.${n9[1]}". Defined: ${a5.join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...ko(e8, s7, n9[0].length) });
3627
+ a5.includes(n9[1]) || o7.push({ message: `Unknown store "$store.${n9[1]}". Defined: ${a5.join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...ko2(e8, s7, n9[0].length) });
3628
3628
  });
3629
3629
  })(e7, t6, r7, n7, o6), (function(e8, t7, n8) {
3630
- so(t7, to, (t8, i8, o7) => {
3631
- const r8 = t8[0], s7 = t8[1], a5 = t8[2], c3 = ko(e8, o7, r8.length), l4 = i8.path.join(".");
3630
+ so2(t7, to2, (t8, i8, o7) => {
3631
+ const r8 = t8[0], s7 = t8[1], a5 = t8[2], c3 = ko2(e8, o7, r8.length), l4 = i8.path.join(".");
3632
3632
  a5 ? n8.push({ message: `Malformed $env reference "${r8}". Use ":" for default values, not "=" (e.g., "$env.${s7}:fallback").`, severity: "warning", path: l4, ...c3 }) : /^[A-Z][A-Z0-9_]*$/.test(s7) || n8.push({ message: `$env.${s7} should use UPPER_SNAKE_CASE by convention (e.g., $env.${s7.toUpperCase()}).`, severity: "warning", path: l4, ...c3 });
3633
3633
  });
3634
3634
  })(e7, r7, o6), (function(e8, t7, n8, i8) {
3635
3635
  const o7 = n8.flowNames ?? [];
3636
3636
  if (0 === o7.length) return;
3637
- so(t7, no, (t8, n9, r8) => {
3637
+ so2(t7, no2, (t8, n9, r8) => {
3638
3638
  const s7 = t8[0], a5 = t8[1];
3639
- o7.includes(a5) || i8.push({ message: `Unknown flow "$flow.${a5}". Defined: ${o7.join(", ")}`, severity: "warning", path: n9.path.join("."), ...ko(e8, r8, s7.length) });
3639
+ o7.includes(a5) || i8.push({ message: `Unknown flow "$flow.${a5}". Defined: ${o7.join(", ")}`, severity: "warning", path: n9.path.join("."), ...ko2(e8, r8, s7.length) });
3640
3640
  });
3641
3641
  })(e7, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
3642
3642
  const r8 = n8.secrets;
@@ -3644,18 +3644,18 @@ function Xi(e6, t5) {
3644
3644
  for (const [n9, s7] of Object.entries(t7.flows)) {
3645
3645
  if (!To(s7)) continue;
3646
3646
  const t8 = s7.config, a5 = !To(t8) || "web" !== t8.platform && "server" !== t8.platform ? void 0 : t8.platform;
3647
- fo2(s7, ["flows", n9], (t9, n10) => {
3648
- if (uo(n10)) return;
3647
+ fo(s7, ["flows", n9], (t9, n10) => {
3648
+ if (uo2(n10)) return;
3649
3649
  let s8;
3650
- for (oo.lastIndex = 0; null !== (s8 = oo.exec(t9)); ) {
3651
- const t10 = s8[0], n11 = s8[1], c3 = e8.indexOf(t10), l4 = -1 === c3 ? { line: 1, column: 1 } : ko(e8, c3, t10.length);
3650
+ for (oo2.lastIndex = 0; null !== (s8 = oo2.exec(t9)); ) {
3651
+ const t10 = s8[0], n11 = s8[1], c3 = e8.indexOf(t10), l4 = -1 === c3 ? { line: 1, column: 1 } : ko2(e8, c3, t10.length);
3652
3652
  "web" !== a5 ? r8 && !r8.includes(n11) && o7.push({ message: `Unknown secret "$secret.${n11}"; not in the project's registered secrets.`, severity: "warning", path: t10, ...l4 }) : i8.push({ message: `Secret "$secret.${n11}" cannot be used in a web flow: secrets are never sent to the browser; use a server flow.`, severity: "error", path: t10, ...l4 });
3653
3653
  }
3654
3654
  });
3655
3655
  }
3656
3656
  })(e7, t6, n7, i7, o6), (function(e8, t7, n8) {
3657
- fo2(t7, [], (t8, i8) => {
3658
- if (!t8.startsWith(Yi) && !uo(i8)) for (const { prefix: o7, regex: r8, grammar: s7 } of co) {
3657
+ fo(t7, [], (t8, i8) => {
3658
+ if (!t8.startsWith(Yi) && !uo2(i8)) for (const { prefix: o7, regex: r8, grammar: s7 } of co) {
3659
3659
  if (!t8.includes(o7)) continue;
3660
3660
  const a5 = o7.slice(0, -1);
3661
3661
  let c3;
@@ -3664,18 +3664,18 @@ function Xi(e6, t5) {
3664
3664
  c3 = `"${t8}" does not match the ${a5}.NAME grammar (${s7}); it would not resolve. To build a longer string, compose with $var or $env.`;
3665
3665
  } else c3 = `"${t8}" uses ${o7} inline. ${o7} references resolve only as the whole value; it would ship as literal text. Use the reference as the entire value, or compose strings with $var or $env.`;
3666
3666
  const l4 = JSON.stringify(t8), d3 = e8.indexOf(l4);
3667
- n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } : ko(e8, d3, l4.length) });
3667
+ n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } : ko2(e8, d3, l4.length) });
3668
3668
  }
3669
3669
  });
3670
3670
  })(e7, t6, o6);
3671
3671
  })(e6, n6, s6, i6, o5)), (function(e7, t6, n7) {
3672
3672
  if (!To(t6)) return;
3673
- const i7 = Vn2.safeParse(t6.contract);
3673
+ const i7 = Vn3.safeParse(t6.contract);
3674
3674
  if (void 0 === t6.contract || !i7.success) return;
3675
3675
  try {
3676
3676
  Hi(i7.data);
3677
3677
  } catch (t7) {
3678
- n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...So2(e7, "contract") });
3678
+ n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...So3(e7, "contract") });
3679
3679
  }
3680
3680
  })(e6, n6, i6), (function(e7, t6, n7) {
3681
3681
  if (!To(t6) || !To(t6.flows)) return;
@@ -3687,14 +3687,14 @@ function Xi(e6, t5) {
3687
3687
  })(e6, n6, o5), (function(e7, t6, n7) {
3688
3688
  if (!To(t6) || !To(t6.flows)) return;
3689
3689
  const i7 = (t7, i8, o7) => {
3690
- n7.push({ message: o7, severity: "error", path: i8.join("."), ...So2(e7, t7) });
3690
+ n7.push({ message: o7, severity: "error", path: i8.join("."), ...So3(e7, t7) });
3691
3691
  }, o6 = (e8, t7) => {
3692
3692
  e8.startsWith("ingest.") && i7(e8, t7, `Mapping values resolve against the event, so "${e8}" never resolves here. Copy it onto the event in an earlier step, then map the event path.`);
3693
3693
  }, r7 = (e8, t7) => (n8, o7) => {
3694
3694
  e8.test(n8) || i7(n8, o7, `Cache keys and route matchers resolve against { event, ingest }: "${n8}" needs an ${t7} prefix.`);
3695
- }, s7 = r7(xo2, '"event." or "ingest."'), a5 = r7(jo2, '"event.", "ingest." or "cache."');
3695
+ }, s7 = r7(xo3, '"event." or "ingest."'), a5 = r7(jo3, '"event.", "ingest." or "cache."');
3696
3696
  for (const [e8, n8] of Object.entries(t6.flows)) if (To(n8)) {
3697
- for (const t7 of $o) {
3697
+ for (const t7 of $o2) {
3698
3698
  const i8 = n8[t7];
3699
3699
  if (To(i8)) for (const [n9, r8] of Object.entries(i8)) {
3700
3700
  if (!To(r8)) continue;
@@ -3706,47 +3706,47 @@ function Xi(e6, t5) {
3706
3706
  }
3707
3707
  })(e6, n6, i6), { valid: 0 === i6.length, errors: i6, warnings: o5, context: s6 };
3708
3708
  }
3709
- function so(e6, t5, n6) {
3709
+ function so2(e6, t5, n6) {
3710
3710
  for (const i6 of e6) {
3711
3711
  let e7;
3712
3712
  for (t5.lastIndex = 0; null !== (e7 = t5.exec(i6.raw)); ) n6(e7, i6, i6.offset + e7.index);
3713
3713
  }
3714
3714
  }
3715
- function ao2(e6) {
3715
+ function ao(e6) {
3716
3716
  return JSON.stringify(e6);
3717
3717
  }
3718
- function uo(e6) {
3718
+ function uo2(e6) {
3719
3719
  const t5 = e6[e6.length - 1];
3720
- return "$comment" === t5 || ("contract" === e6[0] || (!("flows" !== e6[0] || !po2.includes(e6[2]) || "config" !== e6[4] || "settings" !== e6[5] || "contract" !== e6[6]) || !!lo3.includes(t5) && (1 === e6.length || "flows" === e6[0] && (3 === e6.length || !!po2.includes(e6[2]) && (5 === e6.length || 7 === e6.length && "examples" === e6[4])))));
3720
+ return "$comment" === t5 || ("contract" === e6[0] || (!("flows" !== e6[0] || !po.includes(e6[2]) || "config" !== e6[4] || "settings" !== e6[5] || "contract" !== e6[6]) || !!lo2.includes(t5) && (1 === e6.length || "flows" === e6[0] && (3 === e6.length || !!po.includes(e6[2]) && (5 === e6.length || 7 === e6.length && "examples" === e6[4])))));
3721
3721
  }
3722
- function fo2(e6, t5, n6) {
3722
+ function fo(e6, t5, n6) {
3723
3723
  if ("string" != typeof e6) {
3724
- if (Array.isArray(e6)) e6.forEach((e7, i6) => fo2(e7, [...t5, String(i6)], n6));
3725
- else if (To(e6)) for (const [i6, o5] of Object.entries(e6)) fo2(o5, [...t5, i6], n6);
3724
+ if (Array.isArray(e6)) e6.forEach((e7, i6) => fo(e7, [...t5, String(i6)], n6));
3725
+ else if (To(e6)) for (const [i6, o5] of Object.entries(e6)) fo(o5, [...t5, i6], n6);
3726
3726
  } else n6(e6, t5);
3727
3727
  }
3728
3728
  function bo2(e6) {
3729
3729
  return To(e6.config) && true === e6.config.file;
3730
3730
  }
3731
3731
  function vo2(e6, t5, n6) {
3732
- for (const [i6, o5] of Object.entries(t5)) To(o5) && bo2(o5) && void 0 !== o5.cache && n6.push({ message: `Store "${i6}" sets file: true and cache. The cache holds structured values; caching a byte-serving store offers no benefit. Remove cache or unset file.`, severity: "warning", path: `stores.${i6}`, ...So2(e6, i6) });
3732
+ for (const [i6, o5] of Object.entries(t5)) To(o5) && bo2(o5) && void 0 !== o5.cache && n6.push({ message: `Store "${i6}" sets file: true and cache. The cache holds structured values; caching a byte-serving store offers no benefit. Remove cache or unset file.`, severity: "warning", path: `stores.${i6}`, ...So3(e6, i6) });
3733
3733
  }
3734
3734
  function yo2(e6, t5, n6, i6) {
3735
3735
  for (const o5 of Object.values(t5)) {
3736
3736
  if (!To(o5)) continue;
3737
- if (o5.package !== go2) continue;
3737
+ if (o5.package !== go) continue;
3738
3738
  if (!To(o5.env)) continue;
3739
3739
  const t6 = o5.env.store;
3740
3740
  if ("string" != typeof t6) continue;
3741
- const r6 = ho2.exec(t6);
3741
+ const r6 = ho.exec(t6);
3742
3742
  if (!r6) continue;
3743
3743
  const s6 = r6[1], a5 = n6[s6];
3744
3744
  if (!To(a5)) continue;
3745
3745
  const c3 = a5.package;
3746
- "string" == typeof c3 && mo2.includes(c3) && (bo2(a5) || i6.push({ message: `transformer-file serves byte-exact assets; set config.file: true on store "${s6}".`, severity: "warning", path: `stores.${s6}`, ...So2(e6, s6) }));
3746
+ "string" == typeof c3 && mo2.includes(c3) && (bo2(a5) || i6.push({ message: `transformer-file serves byte-exact assets; set config.file: true on store "${s6}".`, severity: "warning", path: `stores.${s6}`, ...So3(e6, s6) }));
3747
3747
  }
3748
3748
  }
3749
- function So2(e6, t5) {
3749
+ function So3(e6, t5) {
3750
3750
  const n6 = e6.indexOf(`"${t5}"`);
3751
3751
  return -1 === n6 ? { line: 1, column: 1 } : wo3(e6, n6);
3752
3752
  }
@@ -3755,7 +3755,7 @@ function wo3(e6, t5) {
3755
3755
  for (let o5 = 0; o5 < t5 && o5 < e6.length; o5++) "\n" === e6[o5] ? (n6++, i6 = 1) : i6++;
3756
3756
  return { line: n6, column: i6 };
3757
3757
  }
3758
- function ko(e6, t5, n6) {
3758
+ function ko2(e6, t5, n6) {
3759
3759
  const i6 = wo3(e6, t5), o5 = wo3(e6, t5 + n6);
3760
3760
  return { line: i6.line, column: i6.column, endLine: o5.line, endColumn: o5.column };
3761
3761
  }
@@ -3796,7 +3796,7 @@ function Do(e6, t5, n6, i6) {
3796
3796
  To(e6) && Array.isArray(e6.rules) && e6.rules.forEach((e7, o5) => {
3797
3797
  if (!To(e7)) return;
3798
3798
  const r6 = [...t5, "rules", o5];
3799
- if (Oo2(e7.key, [...r6, "key"], n6), Ao(e7.match, [...r6, "match"], n6), To(e7.update)) for (const [t6, n7] of Object.entries(e7.update)) Oo2(n7, [...r6, "update", t6], i6);
3799
+ if (Oo2(e7.key, [...r6, "key"], n6), Ao2(e7.match, [...r6, "match"], n6), To(e7.update)) for (const [t6, n7] of Object.entries(e7.update)) Oo2(n7, [...r6, "update", t6], i6);
3800
3800
  });
3801
3801
  }
3802
3802
  function Io2(e6, t5, n6) {
@@ -3806,11 +3806,11 @@ function Io2(e6, t5, n6) {
3806
3806
  for (const i7 of Li(e6)) for (const e7 of [...i7.via ?? [], i7]) {
3807
3807
  if (!e7.match) continue;
3808
3808
  const i8 = e7.path.join(".");
3809
- o5.has(i8) || (o5.add(i8), Ao(e7.match, [...t5, ...e7.path, "match"], n6));
3809
+ o5.has(i8) || (o5.add(i8), Ao2(e7.match, [...t5, ...e7.path, "match"], n6));
3810
3810
  }
3811
3811
  }
3812
- function Ao(e6, t5, n6) {
3813
- To(e6) && (Array.isArray(e6.and) && e6.and.forEach((e7, i6) => Ao(e7, [...t5, "and", i6], n6)), Array.isArray(e6.or) && e6.or.forEach((e7, i6) => Ao(e7, [...t5, "or", i6], n6)), "string" == typeof e6.key && Oo2(e6.key, [...t5, "key"], n6));
3812
+ function Ao2(e6, t5, n6) {
3813
+ To(e6) && (Array.isArray(e6.and) && e6.and.forEach((e7, i6) => Ao2(e7, [...t5, "and", i6], n6)), Array.isArray(e6.or) && e6.or.forEach((e7, i6) => Ao2(e7, [...t5, "or", i6], n6)), "string" == typeof e6.key && Oo2(e6.key, [...t5, "key"], n6));
3814
3814
  }
3815
3815
  function To(e6) {
3816
3816
  return "object" == typeof e6 && null !== e6 && !Array.isArray(e6);
@@ -3880,7 +3880,7 @@ function qo2(e6) {
3880
3880
  for (const [e7, n6] of Object.entries(t5)) n6 && "object" == typeof n6 && ("object" === n6.type && n6.properties && "string" != typeof n6.title && (n6.title = e7), qo2(n6));
3881
3881
  }
3882
3882
  }
3883
- function rr(e6, t5) {
3883
+ function rr2(e6, t5) {
3884
3884
  return { key: e6, operator: "eq", value: t5 };
3885
3885
  }
3886
3886
  function sr2(e6 = {}) {
@@ -3940,36 +3940,36 @@ function fr2(e6) {
3940
3940
  for (const [e8, o6] of Object.entries(i7)) if (Si(o6)) for (const [i8, r7] of Object.entries(o6)) (yi(r7) ? r7 : [r7]).forEach((o7, s6) => {
3941
3941
  if (!Si(o7)) return;
3942
3942
  const a5 = `${t6}.mapping.${e8}.${i8}${yi(r7) ? `[${s6}]` : ""}`;
3943
- for (const e9 of ur2) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
3943
+ for (const e9 of ur) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
3944
3944
  });
3945
3945
  return n7;
3946
3946
  })(t5, n6);
3947
3947
  return r6.length > 0 && o5.push(`${r6.map((e7) => `\`${e7}\``).join(", ")} ${1 === r6.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), o5;
3948
3948
  }
3949
- function br(e6, t5) {
3949
+ function br2(e6, t5) {
3950
3950
  const n6 = (function(e7) {
3951
- return /* @__PURE__ */ new Set([...Object.keys(mr2[e7]), ...gr]);
3951
+ return /* @__PURE__ */ new Set([...Object.keys(mr2[e7]), ...gr2]);
3952
3952
  })(t5);
3953
3953
  for (const i7 of Object.keys(e6)) if (!n6.has(i7)) return { ok: false, code: "UNKNOWN_KEY", key: i7, reason: `Unknown key "${i7}" on ${t5}. Allowed: ${[...n6].sort().join(", ")}.` };
3954
3954
  const i6 = void 0 !== e6.package, o5 = void 0 !== e6.import, r6 = void 0 !== e6.code;
3955
- return r6 && "string" == typeof e6.code ? { ok: false, code: "OBSOLETE_CODE_STRING", key: "code", reason: `code: "<name>" is no longer supported. Use import: "${e6.code}" with the package field instead.` } : r6 && ("object" != typeof e6.code && "function" != typeof e6.code || null === e6.code || Array.isArray(e6.code)) ? { ok: false, code: "INVALID_CODE_SHAPE", key: "code", reason: "code must be an object ({ push, type?, init? }) or a resolved function value." } : r6 && i6 ? { ok: false, code: "CONFLICT", key: "package", reason: "Cannot specify both `code` and `package`. Use one or the other." } : r6 && o5 ? { ok: false, code: "CONFLICT", key: "import", reason: "Cannot specify both `code` and `import`." } : o5 && !i6 ? { ok: false, code: "MISSING_PACKAGE", key: "import", reason: "`import` requires `package` to be set." } : !o5 || "string" == typeof e6.import && hr.test(e6.import) ? { ok: true } : { ok: false, code: "INVALID_IMPORT", key: "import", reason: `import must match ${hr.source}. Got: ${JSON.stringify(e6.import)}.` };
3955
+ return r6 && "string" == typeof e6.code ? { ok: false, code: "OBSOLETE_CODE_STRING", key: "code", reason: `code: "<name>" is no longer supported. Use import: "${e6.code}" with the package field instead.` } : r6 && ("object" != typeof e6.code && "function" != typeof e6.code || null === e6.code || Array.isArray(e6.code)) ? { ok: false, code: "INVALID_CODE_SHAPE", key: "code", reason: "code must be an object ({ push, type?, init? }) or a resolved function value." } : r6 && i6 ? { ok: false, code: "CONFLICT", key: "package", reason: "Cannot specify both `code` and `package`. Use one or the other." } : r6 && o5 ? { ok: false, code: "CONFLICT", key: "import", reason: "Cannot specify both `code` and `import`." } : o5 && !i6 ? { ok: false, code: "MISSING_PACKAGE", key: "import", reason: "`import` requires `package` to be set." } : !o5 || "string" == typeof e6.import && hr2.test(e6.import) ? { ok: true } : { ok: false, code: "INVALID_IMPORT", key: "import", reason: `import must match ${hr2.source}. Got: ${JSON.stringify(e6.import)}.` };
3956
3956
  }
3957
- function vr(e6) {
3957
+ function vr2(e6) {
3958
3958
  return (function(e7) {
3959
3959
  return Si(e7) && "push" in e7;
3960
3960
  })(e6) || "string" == typeof e6;
3961
3961
  }
3962
- function yr(e6, t5, n6) {
3962
+ function yr2(e6, t5, n6) {
3963
3963
  if ("Transformer" === e6) {
3964
- const e7 = br({ ...n6 }, "Transformer");
3964
+ const e7 = br2({ ...n6 }, "Transformer");
3965
3965
  if (!e7.ok) throw new Error(`Transformer "${t5}": ${e7.reason ?? "invalid entry."}`);
3966
3966
  return;
3967
3967
  }
3968
- const i6 = !!n6.package, o5 = vr(n6.code);
3968
+ const i6 = !!n6.package, o5 = vr2(n6.code);
3969
3969
  if (i6 && o5) throw new Error(`${e6} "${t5}": Cannot specify both package and code. Use one or the other.`);
3970
3970
  if (!i6 && !o5) throw new Error(`${e6} "${t5}": Must specify either package or code.`);
3971
3971
  }
3972
- function wr(e6, t5) {
3972
+ function wr2(e6, t5) {
3973
3973
  for (const n6 of Object.keys(e6)) if (!Sr.test(n6)) throw new Error(`Invalid ${t5} name "${n6}": must be a valid JavaScript identifier (use camelCase, e.g., "${n6.replace(/-([a-z])/g, (e7, t6) => t6.toUpperCase())}")`);
3974
3974
  }
3975
3975
  function kr(e6, t5) {
@@ -3998,13 +3998,13 @@ function jr(e6, t5) {
3998
3998
  return e6.stores;
3999
3999
  }
4000
4000
  }
4001
- function $r2(e6) {
4001
+ function $r(e6) {
4002
4002
  return "string" == typeof e6 || Si(e6) && "push" in e6;
4003
4003
  }
4004
4004
  function Or(e6) {
4005
4005
  return e6 instanceof Error ? e6.message : String(e6);
4006
4006
  }
4007
- function Pr2(e6, t5) {
4007
+ function Pr(e6, t5) {
4008
4008
  const n6 = [], i6 = e6.stores || {}, o5 = (e7, t6) => {
4009
4009
  if (!Si(e7) || "string" != typeof e7.store) return;
4010
4010
  const o6 = e7.store;
@@ -4030,7 +4030,7 @@ function Dr2(e6) {
4030
4030
  for (const n7 of Cr2) {
4031
4031
  const o7 = jr(i7, n7);
4032
4032
  if (o7) try {
4033
- wr(o7, n7);
4033
+ wr2(o7, n7);
4034
4034
  } catch (i8) {
4035
4035
  t5.push({ path: `flows.${e7}.${n7}`, message: Or(i8), code: "INVALID_COMPONENT_NAME" });
4036
4036
  }
@@ -4040,8 +4040,8 @@ function Dr2(e6) {
4040
4040
  if (!o7) continue;
4041
4041
  const r8 = xr[n7];
4042
4042
  if ("Transformer" !== r8) {
4043
- for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package || $r2(s6.code)) try {
4044
- yr(r8, i8, s6);
4043
+ for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package || $r(s6.code)) try {
4044
+ yr2(r8, i8, s6);
4045
4045
  } catch (o8) {
4046
4046
  t5.push({ path: `flows.${e7}.${n7}.${i8}`, message: Or(o8), code: "INVALID_REFERENCE" });
4047
4047
  }
@@ -4049,7 +4049,7 @@ function Dr2(e6) {
4049
4049
  }
4050
4050
  const o6 = i7.transformers;
4051
4051
  if (o6) for (const [i8, r8] of Object.entries(o6)) {
4052
- const o7 = `flows.${e7}.transformers.${i8}`, s6 = br({ ...r8 }, "Transformer");
4052
+ const o7 = `flows.${e7}.transformers.${i8}`, s6 = br2({ ...r8 }, "Transformer");
4053
4053
  s6.ok || t5.push({ path: o7, message: s6.reason || "Invalid transformer entry.", code: s6.code });
4054
4054
  const { config: a5 } = r8;
4055
4055
  for (const e8 of fr2({ ...r8, config: Si(a5) ? a5 : void 0 })) n6.push({ path: o7, message: e8, code: "TRANSFORMER_MAPPING_NO_OP" });
@@ -4060,11 +4060,11 @@ function Dr2(e6) {
4060
4060
  } catch (n7) {
4061
4061
  t5.push({ path: `flows.${e7}`, message: Or(n7), code: "STORE_REFERENCE_NOT_FOUND" });
4062
4062
  }
4063
- t5.push(...Pr2(i7, e7));
4063
+ t5.push(...Pr(i7, e7));
4064
4064
  }
4065
4065
  return { valid: 0 === t5.length, type: "flow", errors: t5, warnings: n6, details: i6 };
4066
4066
  }
4067
- var e5, t4, n4, r4, s4, a4, c2, l3, d2, p2, u3, f3, m3, g3, h2, b3, v3, y3, S2, w3, k3, C4, x3, j3, $3, O3, E2, P4, D3, I3, J3, F3, N4, z4, _2, L4, q3, W4, U3, B3, V3, H3, Z4, G3, K4, Q3, Y3, X2, ee3, te2, ne3, ie3, oe2, re2, se3, ae3, ce3, le2, de2, pe2, ue2, fe2, me2, ge2, he2, be2, ve2, ye2, Se2, we2, ke2, Ce2, xe2, je2, $e2, Oe2, Ee2, Pe2, De2, Ie2, Ae2, Te2, Re2, Me2, Je3, Fe3, Ne3, ze3, _e2, Le2, qe, We2, Ue3, Be2, Ve2, He3, Ze3, Ge3, Ke2, Qe2, Ye3, Xe2, et3, tt3, nt3, it2, ot3, at3, ct3, lt3, dt3, pt3, ut2, ft3, mt3, gt3, ht2, bt3, vt3, yt3, St3, wt3, kt3, Ct2, xt2, jt3, $t3, Ot2, Et2, Pt2, Dt3, It2, At3, Tt3, Rt3, Mt2, Jt2, Ft3, Nt2, zt2, _t2, Lt3, qt2, Wt2, Ut3, Bt2, Vt2, Ht2, Zt2, Gt2, Kt2, Qt2, Yt2, Xt2, en2, tn2, nn2, on, rn2, sn2, an2, cn2, ln2, dn2, pn2, un2, fn2, mn2, gn2, hn2, bn2, vn2, yn2, Sn2, wn2, kn2, Cn2, xn, jn, $n, On2, En2, Pn3, Dn, In, An, Tn2, Rn2, Mn, Jn2, Nn2, zn2, _n2, Ln2, qn2, Wn3, Un2, Bn3, Vn2, Hn3, Zn, Gn3, Kn2, ti, ni, ii, oi, ri, si, ai, ci, li, di, ui, fi, mi, gi, hi, bi, vi, xi, Ai, Wi, Ui, Bi, Vi, Yi, eo2, to, no, io, oo, ro2, co, lo3, po2, mo2, go2, ho2, xo2, jo2, $o, Uo, ir2, or2, ar2, pr2, ur2, mr2, gr, hr, Sr, Cr2, xr, Er2;
4067
+ var e5, t4, n4, r4, s4, a4, c2, l3, d2, p2, u3, f3, m3, g3, h2, b3, v3, y3, S2, w3, k3, C4, x3, j3, $3, O3, E2, P4, D3, I3, J3, F3, N4, z4, _2, L4, q3, W4, U3, B3, V3, H3, Z4, G3, K4, Q3, Y3, X2, ee3, te2, ne3, ie3, oe2, re2, se3, ae3, ce3, le2, de2, pe2, ue2, fe2, me2, ge2, he2, be2, ve2, ye2, Se2, we2, ke2, Ce2, xe2, je2, $e2, Oe2, Ee2, Pe2, De2, Ie2, Ae2, Te2, Re2, Me2, Je3, Fe3, Ne3, ze3, _e2, Le2, qe, We2, Ue3, Be2, Ve3, He3, Ze2, Ge3, Ke2, Qe2, Ye3, Xe2, et3, tt3, nt3, it2, ot3, at3, ct3, lt3, dt3, pt3, ut2, ft3, mt3, gt3, ht2, bt3, vt3, yt3, St3, wt3, kt3, Ct2, xt2, jt3, $t3, Ot2, Et2, Pt2, Dt3, It2, At3, Tt3, Rt3, Mt2, Jt2, Ft3, Nt2, zt2, _t2, Lt3, qt2, Wt2, Ut3, Bt2, Vt2, Ht2, Zt2, Gt2, Kt2, Qt2, Yt2, Xt2, en2, tn, nn3, on, rn2, sn2, an2, cn2, ln2, dn2, pn2, un2, fn2, mn2, gn2, hn2, bn2, vn2, yn2, Sn2, wn2, kn2, Cn2, xn, jn, $n, On2, En2, Pn2, Dn2, In, An, Tn2, Rn2, Mn, Jn, Nn, zn2, _n2, Ln3, qn2, Wn2, Un, Bn3, Vn3, Hn3, Zn, Gn2, Kn2, ti, ni, ii, oi, ri, si, ai, ci, li, di, ui, fi, mi, gi, hi, bi, vi, xi, Ai, Wi, Ui, Bi, Vi, Yi, eo2, to2, no2, io2, oo2, ro2, co, lo2, po, mo2, go, ho, xo3, jo3, $o2, Uo, ir2, or2, ar, pr2, ur, mr2, gr2, hr2, Sr, Cr2, xr, Er2;
4068
4068
  var init_dev = __esm({
4069
4069
  "../core/dist/dev.mjs"() {
4070
4070
  "use strict";
@@ -4074,7 +4074,7 @@ var init_dev = __esm({
4074
4074
  for (var i6 in n6) e5(t5, i6, { get: n6[i6], enumerable: true });
4075
4075
  };
4076
4076
  n4 = {};
4077
- t4(n4, { BaseContextConfig: () => F3, CacheRuleSchema: () => tt3, CacheSchema: () => nt3, CacheSchemas: () => Ke2, ClickIdEntrySchema: () => gi, CodeSchema: () => ui, CollectorSchemas: () => Mt2, ConsentSchema: () => Z4, ContractActionsSchema: () => Wn3, ContractRuleSchema: () => Bn3, ContractSchema: () => Vn2, ContractSchemaEntry: () => qn2, Counter: () => d2, CredentialsSchema: () => bi, DeepPartialEventSchema: () => ie3, DestinationSchemas: () => Ne3, DestinationsMapConfig: () => _2, EntitiesSchema: () => ee3, EntitySchema: () => X2, EventCacheRuleSchema: () => Qe2, EventCacheSchema: () => Ye3, EventSchema: () => te2, FlowBundlePackageSchema: () => Pn3, FlowBundleSchema: () => Dn, FlowCodeSchema: () => In, FlowConfigSchema: () => Zn, FlowDestinationSchema: () => _n2, FlowJsonSchema: () => Kn2, FlowSchema: () => Gn3, FlowSchemas: () => wn2, FlowSourceSchema: () => Nn2, FlowStoreSchema: () => Ln2, FlowTransformerSchema: () => zn2, GenericEnvConfig: () => I3, GenericSettingsConfig: () => D3, HandlersConfig: () => x3, HintSchema: () => fi, HintsSchema: () => mi, IdConfig: () => O3, Identifier: () => c2, InitConfig: () => E2, LoggerConfigSchema: () => lt3, LoggerHandlerSchema: () => ct3, LoopSchema: () => he2, MapSchema: () => ve2, MappingResultSchema: () => Ee2, MappingSchemas: () => ue2, MatchExpressionSchema: () => qe, MatcherSchemas: () => ze3, OptionalPrimitiveValue: () => u3, OrderedPropertiesSchema: () => V3, PartialEventSchema: () => ne3, PolicySchema: () => Se2, PrimaryConfig: () => P4, PrimitiveValue: () => p2, ProcessingControlConfig: () => N4, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, QueueConfig: () => $3, RequiredBoolean: () => a4, RequiredNumber: () => s4, RequiredString: () => r4, RouteSchema: () => Ge3, RuleSchema: () => je2, RulesSchema: () => $e2, RuntimeInstanceConfig: () => J3, ServiceAccountSchema: () => hi, SetSchema: () => be2, SourceSchema: () => Y3, SourceSchemas: () => Kt2, SourceTypeSchema: () => H3, SourcesMapConfig: () => z4, StateSchema: () => at3, StoreCacheRuleSchema: () => Xe2, StoreCacheSchema: () => et3, StoreSchemas: () => hn2, Timestamp: () => l3, TransformerSchemas: () => pn2, UserSchema: () => K4, UtilitySchemas: () => f3, ValidateEventsSchema: () => Jn2, ValueConfigSchema: () => ye2, ValueSchema: () => me2, ValuesSchema: () => ge2, VerboseConfig: () => j3, WalkerOSSchemas: () => L4, configJsonSchema: () => ti, consentJsonSchema: () => pe2, contractJsonSchema: () => li, contractRuleJsonSchema: () => ci, createArraySchema: () => No, createConsentConfig: () => M3, createDataTransformationConfig: () => A3, createEnumSchema: () => zo, createMappingRulesConfig: () => T4, createObjectSchema: () => Jo, createPolicyConfig: () => R3, createTupleSchema: () => _o2, credentialsJsonSchema: () => vi, destinationJsonSchema: () => ri, entityJsonSchema: () => le2, eventJsonSchema: () => oe2, flowConfigJsonSchema: () => ii, flowJsonSchema: () => ni, loopJsonSchema: () => Ie2, mapJsonSchema: () => Te2, orderedPropertiesJsonSchema: () => ce3, parseConfig: () => Qn3, parseFlow: () => Xn2, partialEventJsonSchema: () => re2, policyJsonSchema: () => Re2, propertiesJsonSchema: () => ae3, ruleJsonSchema: () => Me2, rulesJsonSchema: () => Je3, safeParseConfig: () => Yn2, safeParseFlow: () => ei, setJsonSchema: () => Ae2, sourceJsonSchema: () => oi, sourceTypeJsonSchema: () => de2, storeJsonSchema: () => ai, transformerJsonSchema: () => si, userJsonSchema: () => se3, validateEventsJsonSchema: () => di, validateFlowConfig: () => Xi, valueConfigJsonSchema: () => De2, valueJsonSchema: () => Pe2, z: () => i4, zodToSchema: () => Lo });
4077
+ t4(n4, { BaseContextConfig: () => F3, CacheRuleSchema: () => tt3, CacheSchema: () => nt3, CacheSchemas: () => Ke2, ClickIdEntrySchema: () => gi, CodeSchema: () => ui, CollectorSchemas: () => Mt2, ConsentSchema: () => Z4, ContractActionsSchema: () => Wn2, ContractRuleSchema: () => Bn3, ContractSchema: () => Vn3, ContractSchemaEntry: () => qn2, Counter: () => d2, CredentialsSchema: () => bi, DeepPartialEventSchema: () => ie3, DestinationSchemas: () => Ne3, DestinationsMapConfig: () => _2, EntitiesSchema: () => ee3, EntitySchema: () => X2, EventCacheRuleSchema: () => Qe2, EventCacheSchema: () => Ye3, EventSchema: () => te2, FlowBundlePackageSchema: () => Pn2, FlowBundleSchema: () => Dn2, FlowCodeSchema: () => In, FlowConfigSchema: () => Zn, FlowDestinationSchema: () => _n2, FlowJsonSchema: () => Kn2, FlowSchema: () => Gn2, FlowSchemas: () => wn2, FlowSourceSchema: () => Nn, FlowStoreSchema: () => Ln3, FlowTransformerSchema: () => zn2, GenericEnvConfig: () => I3, GenericSettingsConfig: () => D3, HandlersConfig: () => x3, HintSchema: () => fi, HintsSchema: () => mi, IdConfig: () => O3, Identifier: () => c2, InitConfig: () => E2, LoggerConfigSchema: () => lt3, LoggerHandlerSchema: () => ct3, LoopSchema: () => he2, MapSchema: () => ve2, MappingResultSchema: () => Ee2, MappingSchemas: () => ue2, MatchExpressionSchema: () => qe, MatcherSchemas: () => ze3, OptionalPrimitiveValue: () => u3, OrderedPropertiesSchema: () => V3, PartialEventSchema: () => ne3, PolicySchema: () => Se2, PrimaryConfig: () => P4, PrimitiveValue: () => p2, ProcessingControlConfig: () => N4, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, QueueConfig: () => $3, RequiredBoolean: () => a4, RequiredNumber: () => s4, RequiredString: () => r4, RouteSchema: () => Ge3, RuleSchema: () => je2, RulesSchema: () => $e2, RuntimeInstanceConfig: () => J3, ServiceAccountSchema: () => hi, SetSchema: () => be2, SourceSchema: () => Y3, SourceSchemas: () => Kt2, SourceTypeSchema: () => H3, SourcesMapConfig: () => z4, StateSchema: () => at3, StoreCacheRuleSchema: () => Xe2, StoreCacheSchema: () => et3, StoreSchemas: () => hn2, Timestamp: () => l3, TransformerSchemas: () => pn2, UserSchema: () => K4, UtilitySchemas: () => f3, ValidateEventsSchema: () => Jn, ValueConfigSchema: () => ye2, ValueSchema: () => me2, ValuesSchema: () => ge2, VerboseConfig: () => j3, WalkerOSSchemas: () => L4, configJsonSchema: () => ti, consentJsonSchema: () => pe2, contractJsonSchema: () => li, contractRuleJsonSchema: () => ci, createArraySchema: () => No, createConsentConfig: () => M3, createDataTransformationConfig: () => A3, createEnumSchema: () => zo, createMappingRulesConfig: () => T4, createObjectSchema: () => Jo, createPolicyConfig: () => R3, createTupleSchema: () => _o2, credentialsJsonSchema: () => vi, destinationJsonSchema: () => ri, entityJsonSchema: () => le2, eventJsonSchema: () => oe2, flowConfigJsonSchema: () => ii, flowJsonSchema: () => ni, loopJsonSchema: () => Ie2, mapJsonSchema: () => Te2, orderedPropertiesJsonSchema: () => ce3, parseConfig: () => Qn3, parseFlow: () => Xn, partialEventJsonSchema: () => re2, policyJsonSchema: () => Re2, propertiesJsonSchema: () => ae3, ruleJsonSchema: () => Me2, rulesJsonSchema: () => Je3, safeParseConfig: () => Yn, safeParseFlow: () => ei, setJsonSchema: () => Ae2, sourceJsonSchema: () => oi, sourceTypeJsonSchema: () => de2, storeJsonSchema: () => ai, transformerJsonSchema: () => si, userJsonSchema: () => se3, validateEventsJsonSchema: () => di, validateFlowConfig: () => Xi, valueConfigJsonSchema: () => De2, valueJsonSchema: () => Pe2, z: () => i4, zodToSchema: () => Lo });
4078
4078
  r4 = i4.string();
4079
4079
  s4 = i4.number();
4080
4080
  a4 = i4.boolean();
@@ -4170,10 +4170,10 @@ var init_dev = __esm({
4170
4170
  We2 = i4.strictObject({ match: qe.optional(), next: i4.lazy(() => Ge3) });
4171
4171
  Ue3 = i4.strictObject({ match: qe.optional(), one: i4.array(i4.lazy(() => Ge3)) });
4172
4172
  Be2 = i4.strictObject({ match: qe.optional(), many: i4.array(i4.lazy(() => Ge3)) });
4173
- Ve2 = i4.strictObject({ match: qe.optional(), stop: i4.literal(true) });
4173
+ Ve3 = i4.strictObject({ match: qe.optional(), stop: i4.literal(true) });
4174
4174
  He3 = i4.strictObject({ match: qe });
4175
- Ze3 = i4.union([We2, Ue3, Be2, Ve2, He3]);
4176
- Ge3 = i4.union([i4.string(), i4.array(i4.lazy(() => Ge3)), Ze3]).meta({ id: "Route", title: "Route", description: "Recursive route: string ID, sequence of routes, or a RouteConfig (next/one/many/stop/gate). Valid in every chain field." });
4175
+ Ze2 = i4.union([We2, Ue3, Be2, Ve3, He3]);
4176
+ Ge3 = i4.union([i4.string(), i4.array(i4.lazy(() => Ge3)), Ze2]).meta({ id: "Route", title: "Route", description: "Recursive route: string ID, sequence of routes, or a RouteConfig (next/one/many/stop/gate). Valid in every chain field." });
4177
4177
  Ke2 = {};
4178
4178
  t4(Ke2, { CacheRuleSchema: () => tt3, CacheSchema: () => nt3, EventCacheRuleSchema: () => Qe2, EventCacheSchema: () => Ye3, StoreCacheRuleSchema: () => Xe2, StoreCacheSchema: () => et3 });
4179
4179
  Qe2 = i4.object({ match: qe.optional().describe("Optional match expression \u2014 omit for always-match."), key: i4.array(i4.string()).min(1).describe("Dot-path fields used to build the cache key"), ttl: i4.number().positive().describe("Time-to-live in seconds"), update: i4.record(i4.string(), me2).optional().describe("Response mutations applied on cache hit (key \u2192 Value mapping)") }).meta({ id: "EventCacheRule", title: "EventCache.Rule", description: "Single event-cache rule: when it applies (match), what event fields it keys off, TTL, and optional response mutations on hit." });
@@ -4243,19 +4243,19 @@ var init_dev = __esm({
4243
4243
  Zt2 = o3(_t2);
4244
4244
  Gt2 = o3(Wt2);
4245
4245
  Kt2 = {};
4246
- t4(Kt2, { BaseEnvSchema: () => Qt2, ConfigSchema: () => Yt2, InitSchema: () => tn2, InitSourceSchema: () => nn2, InitSourcesSchema: () => on, InstanceSchema: () => en2, PartialConfigSchema: () => Xt2, baseEnvJsonSchema: () => rn2, configJsonSchema: () => sn2, initSourceJsonSchema: () => ln2, initSourcesJsonSchema: () => dn2, instanceJsonSchema: () => cn2, partialConfigJsonSchema: () => an2 });
4246
+ t4(Kt2, { BaseEnvSchema: () => Qt2, ConfigSchema: () => Yt2, InitSchema: () => tn, InitSourceSchema: () => nn3, InitSourcesSchema: () => on, InstanceSchema: () => en2, PartialConfigSchema: () => Xt2, baseEnvJsonSchema: () => rn2, configJsonSchema: () => sn2, initSourceJsonSchema: () => ln2, initSourcesJsonSchema: () => dn2, instanceJsonSchema: () => cn2, partialConfigJsonSchema: () => an2 });
4247
4247
  Qt2 = i4.object({ push: i4.unknown().meta({ id: "SourcePushFn", title: "Source.PushFn", description: "Collector push function passed to the source via dependency injection." }).describe("Collector push function"), command: i4.unknown().meta({ id: "SourceCommandFn", title: "Source.CommandFn", description: "Collector command function passed to the source." }).describe("Collector command function"), sources: i4.unknown().optional().describe("Map of registered source instances"), elb: i4.unknown().meta({ id: "ElbFn", title: "Elb.Fn", description: "Public `elb(...)` API function alias for collector.push." }).describe("Public API function (alias for collector.push)") }).catchall(i4.unknown()).meta({ id: "SourceBaseEnv", title: "Source.BaseEnv", description: "Base environment for source dependency injection; platform-specific sources extend this." }).describe("Base environment for dependency injection - platform-specific sources extend this");
4248
4248
  Yt2 = Oe2.extend({ settings: i4.any().meta({ id: "SourceSettings", title: "Source.Settings", description: "Implementation-specific configuration (source-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.any().meta({ id: "SourceCredentials", title: "Source.Credentials", description: "Optional credentials slot (source-defined shape); back it with a managed secret via $secret.NAME (credentials use $secret, not $env). The per-package shape is supplied via mergeConfigSchema." }).describe("Optional credentials (source-defined shape)").optional(), env: Qt2.optional().describe("Environment dependencies (platform-specific)"), id: c2.describe("Source identifier (defaults to source key)").optional(), primary: i4.boolean().describe("Mark as primary (only one can be primary)").optional(), require: i4.array(i4.string()).optional().describe('Defer source initialization until these collector events fire (e.g., ["consent"])'), logger: lt3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), async: i4.union([i4.boolean(), i4.record(i4.string(), i4.boolean())]).optional().describe('Respond-first acknowledgement for response-producing server sources. When true the source responds 2xx ("accepted") before the event is delivered; when false it waits for delivery to settle and the response reflects the outcome. A record configures this per source-defined key: the express source keys it by HTTP method (GET/POST) and defaults to { GET: false, POST: true }. Browser/dataLayer sources have no HTTP response to defer and ignore it. A 2xx means accepted, not delivered. Defaults are per source type.'), setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during source registration (boolean enables defaults, object configures specifics)"), ingest: i4.union([me2, ge2]).optional().describe("Ingest metadata extraction mapping. Extracts values from raw request objects (Express req, Lambda event) using mapping syntax."), disabled: i4.boolean().describe("Completely skip this source (no init, no event capture)").optional(), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set operations applied around this source"), init: i4.boolean().optional().describe("Init lifecycle flag set by collector to true after Instance.init() runs") }).meta({ id: "SourceConfig", title: "Source.Config", description: "Source configuration with mapping, environment, and lifecycle hooks." }).describe("Source configuration with mapping and environment");
4249
4249
  Xt2 = Yt2.partial().meta({ id: "SourcePartialConfig", title: "Source.PartialConfig", description: "Partial source configuration with all fields optional." }).describe("Partial source configuration with all fields optional");
4250
4250
  en2 = i4.object({ type: i4.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Yt2.describe("Current source configuration"), push: i4.any().meta({ id: "SourceInstancePushFn", title: "Source.PushFn", description: "Push function \u2014 THE HANDLER (flexible signature for platform compatibility)." }).describe("Push function - THE HANDLER (flexible signature for platform compatibility)"), destroy: i4.any().meta({ id: "SourceDestroyFn", title: "Source.DestroyFn", description: "Cleanup function called when the source is removed." }).optional().describe("Cleanup function called when source is removed"), on: i4.unknown().optional().describe("Lifecycle hook function for event types") }).meta({ id: "SourceInstance", title: "Source.Instance", description: "Source instance (runtime object with push handler and lifecycle methods)." }).describe("Source instance with push handler and lifecycle methods");
4251
- tn2 = i4.any().meta({ id: "SourceInit", title: "Source.Init", description: "Source initialization function: (config, env) => Instance | Promise<Instance>." }).describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
4252
- nn2 = i4.object({ code: tn2.describe("Source initialization function"), config: Xt2.optional().describe("Partial configuration overrides"), env: Qt2.partial().optional().describe("Partial environment overrides"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set operations applied around this source"), primary: i4.boolean().optional().describe("Mark as primary source (only one can be primary)") }).meta({ id: "SourceInitSource", title: "Source.InitSource", description: "Source initialization bundle (init function + config + env + primary flag)." }).describe("Source initialization configuration");
4253
- on = i4.record(i4.string(), nn2).meta({ id: "SourceInitSources", title: "Source.InitSources", description: "Map of source IDs to initialization configurations." }).describe("Map of source IDs to initialization configurations");
4251
+ tn = i4.any().meta({ id: "SourceInit", title: "Source.Init", description: "Source initialization function: (config, env) => Instance | Promise<Instance>." }).describe("Source initialization function: (config, env) => Instance | Promise<Instance>");
4252
+ nn3 = i4.object({ code: tn.describe("Source initialization function"), config: Xt2.optional().describe("Partial configuration overrides"), env: Qt2.partial().optional().describe("Partial environment overrides"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set operations applied around this source"), primary: i4.boolean().optional().describe("Mark as primary source (only one can be primary)") }).meta({ id: "SourceInitSource", title: "Source.InitSource", description: "Source initialization bundle (init function + config + env + primary flag)." }).describe("Source initialization configuration");
4253
+ on = i4.record(i4.string(), nn3).meta({ id: "SourceInitSources", title: "Source.InitSources", description: "Map of source IDs to initialization configurations." }).describe("Map of source IDs to initialization configurations");
4254
4254
  rn2 = o3(Qt2);
4255
4255
  sn2 = o3(Yt2);
4256
4256
  an2 = o3(Xt2);
4257
4257
  cn2 = o3(en2);
4258
- ln2 = o3(nn2);
4258
+ ln2 = o3(nn3);
4259
4259
  dn2 = o3(on);
4260
4260
  pn2 = {};
4261
4261
  t4(pn2, { ConfigSchema: () => un2, PartialConfigSchema: () => fn2, configJsonSchema: () => mn2, partialConfigJsonSchema: () => gn2 });
@@ -4270,7 +4270,7 @@ var init_dev = __esm({
4270
4270
  yn2 = o3(bn2);
4271
4271
  Sn2 = o3(vn2);
4272
4272
  wn2 = {};
4273
- t4(wn2, { BundlePackageSchema: () => Pn3, BundleSchema: () => Dn, CodeSchema: () => In, ConfigSchema: () => Zn, ContractActionsSchema: () => Wn3, ContractEventsSchema: () => Un2, ContractRuleSchema: () => Bn3, ContractSchema: () => Vn2, ContractSchemaEntry: () => qn2, DestinationSchema: () => _n2, FlowSchema: () => Gn3, JsonSchema: () => Kn2, JsonSchemaSchema: () => Mn, ObserveSchema: () => Hn3, SettingsSchema: () => On2, SourceSchema: () => Nn2, StepExampleSchema: () => Tn2, StepExamplesSchema: () => Rn2, StoreSchema: () => Ln2, TransformerSchema: () => zn2, TriggerDescriptorSchema: () => An, ValidateEventsSchema: () => Jn2, VariablesSchema: () => xn, configJsonSchema: () => ti, contractJsonSchema: () => li, contractRuleJsonSchema: () => ci, destinationJsonSchema: () => ri, flowConfigJsonSchema: () => ii, flowJsonSchema: () => ni, parseConfig: () => Qn3, parseFlow: () => Xn2, safeParseConfig: () => Yn2, safeParseFlow: () => ei, sourceJsonSchema: () => oi, storeJsonSchema: () => ai, transformerJsonSchema: () => si, validateEventsJsonSchema: () => di });
4273
+ t4(wn2, { BundlePackageSchema: () => Pn2, BundleSchema: () => Dn2, CodeSchema: () => In, ConfigSchema: () => Zn, ContractActionsSchema: () => Wn2, ContractEventsSchema: () => Un, ContractRuleSchema: () => Bn3, ContractSchema: () => Vn3, ContractSchemaEntry: () => qn2, DestinationSchema: () => _n2, FlowSchema: () => Gn2, JsonSchema: () => Kn2, JsonSchemaSchema: () => Mn, ObserveSchema: () => Hn3, SettingsSchema: () => On2, SourceSchema: () => Nn, StepExampleSchema: () => Tn2, StepExamplesSchema: () => Rn2, StoreSchema: () => Ln3, TransformerSchema: () => zn2, TriggerDescriptorSchema: () => An, ValidateEventsSchema: () => Jn, VariablesSchema: () => xn, configJsonSchema: () => ti, contractJsonSchema: () => li, contractRuleJsonSchema: () => ci, destinationJsonSchema: () => ri, flowConfigJsonSchema: () => ii, flowJsonSchema: () => ni, parseConfig: () => Qn3, parseFlow: () => Xn, safeParseConfig: () => Yn, safeParseFlow: () => ei, sourceJsonSchema: () => oi, storeJsonSchema: () => ai, transformerJsonSchema: () => si, validateEventsJsonSchema: () => di });
4274
4274
  kn2 = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
4275
4275
  Cn2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
4276
4276
  xn = i4.record(i4.string(), i4.unknown()).meta({ id: "FlowVariables", title: "Flow.Variables", description: "Reusable values referenced via $var.name (with optional deep paths). Whole-string refs preserve native type; inline interpolation requires scalars." });
@@ -4284,37 +4284,37 @@ var init_dev = __esm({
4284
4284
  });
4285
4285
  On2 = i4.looseObject({ windowCollector: $n.optional().describe('Web: global variable name of the collector instance (default: "walkerOS").') }).meta({ id: "FlowSettings", title: "Flow.Settings", description: "Free-form key-value settings consumed by the platform runtime." }).describe("Free-form platform settings bag");
4286
4286
  En2 = /^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/;
4287
- Pn3 = i4.object({ version: i4.string().optional(), imports: i4.array(i4.string()).optional(), path: i4.string().optional() }).meta({ id: "FlowBundlePackage", title: "Flow.BundlePackage", description: "Per-package bundle spec (version / imports / local path)." });
4288
- Dn = i4.object({ packages: i4.record(i4.string().regex(En2, "Invalid npm package name"), Pn3).optional().describe("NPM packages to bundle, keyed by package name"), overrides: i4.record(i4.string().regex(En2, "Invalid npm package name"), i4.string().min(1, "Override version cannot be empty")).optional().describe("Transitive dependency version pins"), traceInclude: i4.array(i4.string()).optional().describe("Extra paths or globs the bundler must include in the trace output (server flows only)"), env: i4.record(i4.string(), i4.string()).optional().describe("Declared build-time values for web $env references (inlined into public bundles, never secrets)") }).strict().meta({ id: "FlowBundle", title: "Flow.Bundle", description: "Bundle configuration (packages + overrides + traceInclude + env)." }).describe("Bundle configuration (packages + overrides + traceInclude + env)");
4287
+ Pn2 = i4.object({ version: i4.string().optional(), imports: i4.array(i4.string()).optional(), path: i4.string().optional() }).meta({ id: "FlowBundlePackage", title: "Flow.BundlePackage", description: "Per-package bundle spec (version / imports / local path)." });
4288
+ Dn2 = i4.object({ packages: i4.record(i4.string().regex(En2, "Invalid npm package name"), Pn2).optional().describe("NPM packages to bundle, keyed by package name"), overrides: i4.record(i4.string().regex(En2, "Invalid npm package name"), i4.string().min(1, "Override version cannot be empty")).optional().describe("Transitive dependency version pins"), traceInclude: i4.array(i4.string()).optional().describe("Extra paths or globs the bundler must include in the trace output (server flows only)"), env: i4.record(i4.string(), i4.string()).optional().describe("Declared build-time values for web $env references (inlined into public bundles, never secrets)") }).strict().meta({ id: "FlowBundle", title: "Flow.Bundle", description: "Bundle configuration (packages + overrides + traceInclude + env)." }).describe("Bundle configuration (packages + overrides + traceInclude + env)");
4289
4289
  In = i4.object({ push: i4.string().min(1, "Push function cannot be empty").describe('JavaScript function for processing events. Must start with "$code:" prefix.'), type: i4.string().optional().describe("Optional type identifier for the inline instance"), init: i4.string().optional().describe("Optional initialization function. Use $code: prefix for inline JavaScript.") }).meta({ id: "FlowCode", title: "Flow.Code", description: "Inline code block (object form) for custom sources / transformers / destinations / stores. Use `import` on the step to select a named export from a package." }).describe("Inline code for custom components (object form)");
4290
4290
  An = i4.object({ type: i4.string().optional().describe("Trigger mechanism (e.g., click, POST, load)"), options: i4.unknown().optional().describe("Mechanism-specific options") }).meta({ id: "TriggerDescriptor", title: "Trigger.Descriptor", description: "Source trigger metadata (mechanism + options) used by step examples." });
4291
4291
  Tn2 = i4.object({ title: i4.string().optional().describe("Human-readable title (overrides default heading)"), description: i4.string().optional().describe("Human-readable description"), public: i4.boolean().optional().describe("Whether this example is shown in docs/UI/MCP default output (default: true). Set false for test-only fixtures."), in: i4.unknown().optional().describe("Input to the step"), trigger: An.optional().describe("Source trigger metadata"), mapping: i4.unknown().optional().describe("Mapping configuration"), out: i4.unknown().optional().describe("Expected output from the step"), command: i4.enum(["config", "consent", "user", "run"]).optional().describe("Invoke elb('walker <command>', in) instead of pushing in as an event") }).meta({ id: "FlowStepExample", title: "Flow.StepExample", description: "Named example with input/output pair used for step testing." }).describe("Named example with input/output pair");
4292
4292
  Rn2 = i4.record(i4.string(), Tn2).meta({ id: "FlowStepExamples", title: "Flow.StepExamples", description: "Named step examples keyed by scenario name." }).describe("Named step examples for testing and documentation");
4293
4293
  Mn = i4.record(i4.string(), i4.unknown()).meta({ id: "JsonSchema", title: "JsonSchema", description: "Structural JSON Schema fragment (Record<string, unknown>)" });
4294
- Jn2 = i4.record(i4.string(), i4.record(i4.string(), Mn)).meta({ id: "ValidateEvents", title: "ValidateEvents", description: "Entity-action keyed JSON Schemas" }).describe("Entity-action keyed JSON Schemas");
4295
- Nn2 = i4.object({ package: i4.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: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during source registration (boolean enables defaults, object configures specifics)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set, run before the collector receives the event. Takes precedence over a step-level state.") }).meta({ id: "FlowSourceConfig", title: "Source.Config", description: "Source-specific configuration object (Source.Config)." }).optional().describe("Source-specific configuration object"), env: i4.unknown().meta({ id: "FlowSourceEnv", title: "Source.BaseEnv", description: "Source environment configuration (Source.BaseEnv overrides)." }).optional().describe("Source environment configuration"), primary: i4.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: xn.optional().describe("Source-level variables (highest priority in cascade)"), next: Ge3.optional().describe("Pre-collector transformer chain. String, string[], or Route[] for conditional routing on ingest and event data."), before: Ge3.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this source. Paths resolve against { event, ingest }.") }).strict().meta({ id: "FlowSource", title: "Flow.Source", description: "Source package reference with configuration, env, chains, and examples." }).describe("Source package reference with configuration").superRefine(Fn3);
4296
- zn2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.unknown().meta({ id: "FlowTransformerConfig", title: "Transformer.Config", description: "Transformer-specific configuration object." }).optional().describe("Transformer-specific configuration object"), env: i4.unknown().meta({ id: "FlowTransformerEnv", title: "Transformer.Env", description: "Transformer environment configuration." }).optional().describe("Transformer environment configuration"), before: Ge3.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Ge3.optional().describe("Next transformer in chain. String, string[], or Route[] for conditional routing."), variables: xn.optional().describe("Transformer-level variables (highest priority in cascade)"), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this transformer. Paths resolve against { event, ingest }."), mapping: i4.unknown().optional().describe("Event mapping for a code-free transformer. The collector applies it to the event; a rule with ignore: true drops it.") }).meta({ id: "FlowTransformer", title: "Flow.Transformer", description: "Transformer package reference with configuration, env, chains, and cache." }).describe("Transformer package reference with configuration").superRefine(Fn3);
4297
- _n2 = i4.object({ package: i4.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: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during destination registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowDestinationConfig", title: "Destination.Config", description: "Destination-specific configuration object." }).optional().describe("Destination-specific configuration object"), env: i4.unknown().meta({ id: "FlowDestinationEnv", title: "Destination.Env", description: "Destination environment configuration." }).optional().describe("Destination environment configuration"), variables: xn.optional().describe("Destination-level variables (highest priority in cascade)"), before: Ge3.optional().describe("Transformer chain run for this destination only, before it receives the event. String, string[], or a Route for conditional routing."), next: Ge3.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this destination. Paths resolve against { event, ingest }.") }).meta({ id: "FlowDestination", title: "Flow.Destination", description: "Destination package reference with configuration, env, chains, and cache." }).describe("Destination package reference with configuration").superRefine(Fn3);
4298
- Ln2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during store registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowStoreConfig", title: "Store.Config", description: "Store-specific configuration object." }).optional().describe("Store-specific configuration object"), env: i4.unknown().meta({ id: "FlowStoreEnv", title: "Store.Env", description: "Store environment configuration." }).optional().describe("Store environment configuration"), cache: et3.optional().describe("Cache configuration for this store (TTL-only rules, optional recursive `cache.store`)"), variables: xn.optional().describe("Store-level variables (highest priority in cascade)"), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).meta({ id: "FlowStore", title: "Flow.Store", description: "Store package reference with configuration, env, cache, and examples." }).describe("Store package reference with configuration").superRefine(Fn3);
4294
+ Jn = i4.record(i4.string(), i4.record(i4.string(), Mn)).meta({ id: "ValidateEvents", title: "ValidateEvents", description: "Entity-action keyed JSON Schemas" }).describe("Entity-action keyed JSON Schemas");
4295
+ Nn = i4.object({ package: i4.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: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during source registration (boolean enables defaults, object configures specifics)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set, run before the collector receives the event. Takes precedence over a step-level state.") }).meta({ id: "FlowSourceConfig", title: "Source.Config", description: "Source-specific configuration object (Source.Config)." }).optional().describe("Source-specific configuration object"), env: i4.unknown().meta({ id: "FlowSourceEnv", title: "Source.BaseEnv", description: "Source environment configuration (Source.BaseEnv overrides)." }).optional().describe("Source environment configuration"), primary: i4.boolean().optional().describe("Mark as primary source (provides main elb). Only one source should be primary."), variables: xn.optional().describe("Source-level variables (highest priority in cascade)"), next: Ge3.optional().describe("Pre-collector transformer chain. String, string[], or Route[] for conditional routing on ingest and event data."), before: Ge3.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this source. Paths resolve against { event, ingest }.") }).strict().meta({ id: "FlowSource", title: "Flow.Source", description: "Source package reference with configuration, env, chains, and examples." }).describe("Source package reference with configuration").superRefine(Fn2);
4296
+ zn2 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe('Package specifier with optional version (e.g., "@walkeros/transformer-enricher@1.0.0")'), code: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.unknown().meta({ id: "FlowTransformerConfig", title: "Transformer.Config", description: "Transformer-specific configuration object." }).optional().describe("Transformer-specific configuration object"), env: i4.unknown().meta({ id: "FlowTransformerEnv", title: "Transformer.Env", description: "Transformer environment configuration." }).optional().describe("Transformer environment configuration"), before: Ge3.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Ge3.optional().describe("Next transformer in chain. String, string[], or Route[] for conditional routing."), variables: xn.optional().describe("Transformer-level variables (highest priority in cascade)"), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this transformer. Paths resolve against { event, ingest }."), mapping: i4.unknown().optional().describe("Event mapping for a code-free transformer. The collector applies it to the event; a rule with ignore: true drops it.") }).meta({ id: "FlowTransformer", title: "Flow.Transformer", description: "Transformer package reference with configuration, env, chains, and cache." }).describe("Transformer package reference with configuration").superRefine(Fn2);
4297
+ _n2 = i4.object({ package: i4.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: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during destination registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowDestinationConfig", title: "Destination.Config", description: "Destination-specific configuration object." }).optional().describe("Destination-specific configuration object"), env: i4.unknown().meta({ id: "FlowDestinationEnv", title: "Destination.Env", description: "Destination environment configuration." }).optional().describe("Destination environment configuration"), variables: xn.optional().describe("Destination-level variables (highest priority in cascade)"), before: Ge3.optional().describe("Transformer chain run for this destination only, before it receives the event. String, string[], or a Route for conditional routing."), next: Ge3.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ye3.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set for this destination. Paths resolve against { event, ingest }.") }).meta({ id: "FlowDestination", title: "Flow.Destination", description: "Destination package reference with configuration, env, chains, and cache." }).describe("Destination package reference with configuration").superRefine(Fn2);
4298
+ Ln3 = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: In.optional().describe("Inline code definition (object form). For a named export from a package, use `import` instead."), import: i4.string().regex(/^[A-Za-z_$][A-Za-z0-9_$]*$/, "import must be a valid JavaScript identifier").optional().describe("Named export from `package` to import as this step's implementation. Top-level identifier only. Requires `package`. Mutually exclusive with `code`."), config: i4.looseObject({ setup: i4.union([i4.boolean(), i4.record(i4.string(), i4.unknown())]).optional().describe("One-time setup options applied during store registration (boolean enables defaults, object configures specifics)") }).meta({ id: "FlowStoreConfig", title: "Store.Config", description: "Store-specific configuration object." }).optional().describe("Store-specific configuration object"), env: i4.unknown().meta({ id: "FlowStoreEnv", title: "Store.Env", description: "Store environment configuration." }).optional().describe("Store environment configuration"), cache: et3.optional().describe("Cache configuration for this store (TTL-only rules, optional recursive `cache.store`)"), variables: xn.optional().describe("Store-level variables (highest priority in cascade)"), examples: Rn2.optional().describe("Named step examples for testing and documentation (stripped during bundling)") }).meta({ id: "FlowStore", title: "Flow.Store", description: "Store package reference with configuration, env, cache, and examples." }).describe("Store package reference with configuration").superRefine(Fn2);
4299
4299
  qn2 = i4.record(i4.string(), i4.unknown()).meta({ id: "FlowContractSchemaEntry", title: "Flow.ContractSchemaEntry", description: "JSON Schema object for event validation with description/examples annotations." }).describe("JSON Schema object for event validation with description/examples annotations");
4300
- Wn3 = i4.record(i4.string(), qn2).meta({ id: "FlowContractActions", title: "Flow.ContractActions", description: "Action-level contract entries keyed by action name." }).describe("Action-level contract entries");
4301
- Un2 = i4.record(i4.string(), Wn3).meta({ id: "FlowContractEvents", title: "Flow.ContractEvents", description: "Entity-action event schemas (entity \u2192 action \u2192 schema)." }).describe("Entity-action event schemas");
4302
- Bn3 = i4.object({ extend: i4.string().optional(), tagging: i4.number().optional(), description: i4.string().optional(), events: Jn2.optional(), schema: Mn.optional() }).meta({ id: "ContractRule", title: "Flow.ContractRule", description: "Named contract entry" });
4303
- Vn2 = i4.record(i4.string(), Bn3).meta({ id: "FlowContract", title: "Flow.Contract", description: "Named contracts map with optional extend inheritance." }).describe("Named contracts with optional extend inheritance");
4300
+ Wn2 = i4.record(i4.string(), qn2).meta({ id: "FlowContractActions", title: "Flow.ContractActions", description: "Action-level contract entries keyed by action name." }).describe("Action-level contract entries");
4301
+ Un = i4.record(i4.string(), Wn2).meta({ id: "FlowContractEvents", title: "Flow.ContractEvents", description: "Entity-action event schemas (entity \u2192 action \u2192 schema)." }).describe("Entity-action event schemas");
4302
+ Bn3 = i4.object({ extend: i4.string().optional(), tagging: i4.number().optional(), description: i4.string().optional(), events: Jn.optional(), schema: Mn.optional() }).meta({ id: "ContractRule", title: "Flow.ContractRule", description: "Named contract entry" });
4303
+ Vn3 = i4.record(i4.string(), Bn3).meta({ id: "FlowContract", title: "Flow.Contract", description: "Named contracts map with optional extend inheritance." }).describe("Named contracts with optional extend inheritance");
4304
4304
  Hn3 = i4.object({ level: i4.enum(["off", "standard", "trace"]).optional().describe("Managed-telemetry verbosity. 'off' disables telemetry entirely, 'standard' emits structural records, 'trace' emits full payloads."), sample: i4.number().min(0).max(1).optional().describe("Deterministic sample fraction in [0, 1]. Defaults to 1."), url: i4.string().min(1).optional().describe("Observer base URL for the web connect form. Public, safe to commit. Paired with binding."), binding: i4.string().min(1).optional().describe("Public project binding a web observe credential must match. Paired with url; public, safe to commit.") }).meta({ id: "FlowObserve", title: "Flow.Observe", description: "Observability configuration: public web connect pair (url + binding) and managed-telemetry knobs (level + sample)." }).describe("Observability configuration block");
4305
- Zn = i4.object({ platform: i4.enum(["web", "server"]).describe("Platform identity for this flow. Drives bundle target/format."), url: i4.string().min(1).optional().describe("Public URL where this flow is reachable (for cross-flow $flow.X.url references)."), settings: On2.optional().describe("Free-form key-value settings consumed by the platform runtime."), bundle: Dn.optional().describe("Bundle configuration: NPM packages, transitive dependency overrides."), observe: Hn3.optional().describe("Observability configuration: public web connect pair, managed-telemetry level and sample.") }).meta({ id: "FlowConfig", title: "Flow.Config", description: "Per-flow configuration block: platform identity, optional public URL, settings, bundle, observe." }).describe("Per-flow configuration block");
4306
- Gn3 = i4.object({ config: Zn.optional().describe("Per-flow configuration: platform, url, settings, bundle."), sources: i4.record(i4.string(), Nn2).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: i4.record(i4.string(), _n2).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: i4.record(i4.string(), zn2).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: i4.record(i4.string(), Ln2).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: i4.looseObject({ next: Ge3.optional().describe("Collector chain: runs once per completed event before the destination fan-out. A stop drops the event for every destination.") }).meta({ id: "FlowCollector", title: "Collector.InitConfig", description: "Collector configuration for event processing (Collector.InitConfig)." }).optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), variables: xn.optional().describe("Flow-level variables (override root variables, overridden by source/destination variables)") }).meta({ id: "Flow", title: "Flow", description: "Single flow definition (one deployment target): config, sources, destinations, transformers, stores, collector." }).describe("Single flow definition for one deployment target");
4307
- Kn2 = i4.object({ version: i4.literal(4).describe("Configuration schema version (v4, current)."), $schema: i4.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v4.json")'), include: i4.array(i4.string()).optional().describe("Folders to include in the bundle output"), variables: xn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax, deep paths supported)"), contract: Vn2.optional().describe("Named contracts with extend inheritance and dot-path references"), flows: i4.record(i4.string(), Gn3).refine((e6) => Object.keys(e6).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).meta({ id: "FlowJson", title: "Flow.Json", description: "walkerOS root configuration (walkeros.config.json) v4: version, variables, contract, named flows." }).describe("walkerOS root configuration (walkeros.config.json)");
4305
+ Zn = i4.object({ platform: i4.enum(["web", "server"]).describe("Platform identity for this flow. Drives bundle target/format."), url: i4.string().min(1).optional().describe("Public URL where this flow is reachable (for cross-flow $flow.X.url references)."), settings: On2.optional().describe("Free-form key-value settings consumed by the platform runtime."), bundle: Dn2.optional().describe("Bundle configuration: NPM packages, transitive dependency overrides."), observe: Hn3.optional().describe("Observability configuration: public web connect pair, managed-telemetry level and sample.") }).meta({ id: "FlowConfig", title: "Flow.Config", description: "Per-flow configuration block: platform identity, optional public URL, settings, bundle, observe." }).describe("Per-flow configuration block");
4306
+ Gn2 = i4.object({ config: Zn.optional().describe("Per-flow configuration: platform, url, settings, bundle."), sources: i4.record(i4.string(), Nn).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: i4.record(i4.string(), _n2).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: i4.record(i4.string(), zn2).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: i4.record(i4.string(), Ln3).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: i4.looseObject({ next: Ge3.optional().describe("Collector chain: runs once per completed event before the destination fan-out. A stop drops the event for every destination.") }).meta({ id: "FlowCollector", title: "Collector.InitConfig", description: "Collector configuration for event processing (Collector.InitConfig)." }).optional().describe("Collector configuration for event processing (uses Collector.InitConfig)"), variables: xn.optional().describe("Flow-level variables (override root variables, overridden by source/destination variables)") }).meta({ id: "Flow", title: "Flow", description: "Single flow definition (one deployment target): config, sources, destinations, transformers, stores, collector." }).describe("Single flow definition for one deployment target");
4307
+ Kn2 = i4.object({ version: i4.literal(4).describe("Configuration schema version (v4, current)."), $schema: i4.string().url("Schema URL must be a valid URL").optional().describe('JSON Schema reference for IDE validation (e.g., "https://walkeros.io/schema/flow/v4.json")'), include: i4.array(i4.string()).optional().describe("Folders to include in the bundle output"), variables: xn.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax, deep paths supported)"), contract: Vn3.optional().describe("Named contracts with extend inheritance and dot-path references"), flows: i4.record(i4.string(), Gn2).refine((e6) => Object.keys(e6).length > 0, { message: "At least one flow is required" }).describe("Named flow configurations (e.g., production, staging, development)") }).meta({ id: "FlowJson", title: "Flow.Json", description: "walkerOS root configuration (walkeros.config.json) v4: version, variables, contract, named flows." }).describe("walkerOS root configuration (walkeros.config.json)");
4308
4308
  ti = i4.toJSONSchema(Kn2, { target: "draft-7" });
4309
- ni = o3(Gn3);
4309
+ ni = o3(Gn2);
4310
4310
  ii = o3(Zn);
4311
- oi = o3(Nn2);
4311
+ oi = o3(Nn);
4312
4312
  ri = o3(_n2);
4313
4313
  si = o3(zn2);
4314
- ai = o3(Ln2);
4314
+ ai = o3(Ln3);
4315
4315
  ci = o3(Bn3);
4316
- li = o3(Vn2);
4317
- di = o3(Jn2);
4316
+ li = o3(Vn3);
4317
+ di = o3(Jn);
4318
4318
  ui = pi.object({ lang: pi.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: pi.string().describe("Code snippet") });
4319
4319
  fi = pi.object({ text: pi.string().describe("Short actionable hint text focused on walkerOS usage"), code: pi.array(ui).optional().describe("Optional code snippets") });
4320
4320
  mi = pi.record(pi.string(), fi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
@@ -4330,30 +4330,30 @@ var init_dev = __esm({
4330
4330
  Vi = /* @__PURE__ */ new Set(["properties", "patternProperties", "dependentSchemas", "dependentRequired", "dependencies", "$defs", "definitions"]);
4331
4331
  Yi = "$code:";
4332
4332
  eo2 = /\$store\.([a-zA-Z_][a-zA-Z0-9_]*)/g;
4333
- to = /\$env\.([A-Za-z_]\w*)(=[^"}\s]*)?/g;
4334
- no = /\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?/g;
4335
- io = /\$(var|store|flow|secret):([a-zA-Z_][a-zA-Z0-9_]*)/g;
4336
- oo = /\$secret\.([A-Za-z0-9_]+)/g;
4333
+ to2 = /\$env\.([A-Za-z_]\w*)(=[^"}\s]*)?/g;
4334
+ no2 = /\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?/g;
4335
+ io2 = /\$(var|store|flow|secret):([a-zA-Z_][a-zA-Z0-9_]*)/g;
4336
+ oo2 = /\$secret\.([A-Za-z0-9_]+)/g;
4337
4337
  ro2 = /\$var\.(\w+)/g;
4338
4338
  co = [{ prefix: "$flow.", regex: /^\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?$/, grammar: "a flow name, then an optional dot path of letters, digits and _" }, { prefix: "$store.", regex: /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/, grammar: "one store id of letters, digits and _, no path" }, { prefix: "$secret.", regex: /^\$secret\.([A-Z0-9_]+)$/, grammar: "uppercase letters, digits and _" }, { prefix: "$contract.", regex: /^\$contract\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.(.+))?$/, grammar: "a contract name, then an optional dot path" }];
4339
- lo3 = ["title", "description"];
4340
- po2 = ["sources", "transformers", "destinations", "stores"];
4339
+ lo2 = ["title", "description"];
4340
+ po = ["sources", "transformers", "destinations", "stores"];
4341
4341
  mo2 = ["@walkeros/server-store-fs", "@walkeros/server-store-s3", "@walkeros/server-store-gcs"];
4342
- go2 = "@walkeros/server-transformer-file";
4343
- ho2 = /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
4344
- xo2 = /^(event|ingest)(\..+)?$/;
4345
- jo2 = /^(event|ingest|cache)(\..+)?$/;
4346
- $o = ["sources", "transformers", "destinations"];
4342
+ go = "@walkeros/server-transformer-file";
4343
+ ho = /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
4344
+ xo3 = /^(event|ingest)(\..+)?$/;
4345
+ jo3 = /^(event|ingest|cache)(\..+)?$/;
4346
+ $o2 = ["sources", "transformers", "destinations"];
4347
4347
  Uo = { source: Kt2.configJsonSchema, destination: Ne3.configJsonSchema, store: hn2.configJsonSchema };
4348
4348
  ir2 = {};
4349
- t4(ir2, { STOP: () => or2, eq: () => rr, interpret: () => lr2, makeTransformers: () => sr2, routeCases: () => ar2, visits: () => dr2 });
4349
+ t4(ir2, { STOP: () => or2, eq: () => rr2, interpret: () => lr2, makeTransformers: () => sr2, routeCases: () => ar, visits: () => dr2 });
4350
4350
  or2 = "(stop)";
4351
- ar2 = [{ name: "static member next is inserted after the member", spec: ["bot", "validate", "session"], nexts: { bot: "foo" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "validate", "session"]]] }, { name: "member next insertion is recursive and depth first", spec: ["bot", "validate", "session"], nexts: { bot: "foo", foo: "bar" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "bar", "validate", "session"]]] }, { name: "conditional member next inserts only on match", spec: ["bot", "validate"], nexts: { bot: { match: rr("ingest.bot", "yes"), next: "flag" } }, roots: [{ ingest: { bot: "yes" } }, { ingest: { bot: "no" } }], expected: [[["bot", "flag", "validate"]], [["bot", "validate"]]] }, { name: "conditional member next sees what the member wrote", spec: ["enrich", "out"], nexts: { enrich: { match: rr("ingest.tier", "gold"), next: "vip" } }, sets: { enrich: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["enrich", "vip", "out"]]] }, { name: "many forks and each fork finishes the rest of the array", spec: ["a", { many: ["x", "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", "z"], ["a", "y", "z"]]] }, { name: "stop in one fork ends only that copy", spec: ["a", { many: [["x", { stop: true }], "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", or2], ["a", "y", "z"]]] }, { name: "fork at depth 2 carries every enclosing continuation", spec: ["a", { one: [{ match: rr("ingest.k", "1"), next: ["b", { many: ["c", "d"] }, "e"] }] }, "f"], roots: [{ ingest: { k: "1" } }, { ingest: { k: "2" } }], expected: [[["a", "b", "c", "e", "f"], ["a", "b", "d", "e", "f"]], [["a", "f"]]] }, { name: "fork inside a member next continues the enclosing arrays", spec: ["a", ["b", "c"], "d"], nexts: { b: { many: ["m1", "m2"] } }, roots: [{ ingest: {} }], expected: [[["a", "b", "m1", "c", "d"], ["a", "b", "m2", "c", "d"]]] }, { name: "a step listed twice runs twice", spec: ["a", "b", "a"], roots: [{ ingest: {} }], expected: [[["a", "b", "a"]]] }, { name: "member next cycle stops at the guard", spec: ["a", "x"], nexts: { a: "b", b: "a" }, roots: [{ ingest: {} }], expected: [[["a", "b", "x"]]] }, { name: "gated stop after a write ends the copy", spec: ["a", { match: rr("ingest.tier", "gold"), stop: true }, "b"], sets: { a: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["a", or2]]] }, { name: "gated stop that fails falls through", spec: ["a", { match: rr("ingest.tier", "gold"), stop: true }, "b"], roots: [{ ingest: { tier: "gold" } }, { ingest: { tier: "silver" } }], expected: [[["a", or2]], [["a", "b"]]] }, { name: "unconditional stop", spec: ["a", { stop: true }, "b"], roots: [{ ingest: {} }], expected: [[["a", or2]]] }, { name: "one with a stop entry", spec: { one: [{ match: rr("ingest.x", "1"), stop: true }, { next: "b" }] }, roots: [{ ingest: { x: "1" } }, { ingest: { x: "2" } }], expected: [[[or2]], [["b"]]] }, { name: "state get into ingest.tier \u2192 next one on ingest.tier", spec: ["state", { one: [{ match: rr("ingest.tier", "gold"), next: "vip" }, { next: "std" }] }], sets: { state: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["state", "vip"]]] }];
4351
+ ar = [{ name: "static member next is inserted after the member", spec: ["bot", "validate", "session"], nexts: { bot: "foo" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "validate", "session"]]] }, { name: "member next insertion is recursive and depth first", spec: ["bot", "validate", "session"], nexts: { bot: "foo", foo: "bar" }, roots: [{ ingest: {} }], expected: [[["bot", "foo", "bar", "validate", "session"]]] }, { name: "conditional member next inserts only on match", spec: ["bot", "validate"], nexts: { bot: { match: rr2("ingest.bot", "yes"), next: "flag" } }, roots: [{ ingest: { bot: "yes" } }, { ingest: { bot: "no" } }], expected: [[["bot", "flag", "validate"]], [["bot", "validate"]]] }, { name: "conditional member next sees what the member wrote", spec: ["enrich", "out"], nexts: { enrich: { match: rr2("ingest.tier", "gold"), next: "vip" } }, sets: { enrich: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["enrich", "vip", "out"]]] }, { name: "many forks and each fork finishes the rest of the array", spec: ["a", { many: ["x", "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", "z"], ["a", "y", "z"]]] }, { name: "stop in one fork ends only that copy", spec: ["a", { many: [["x", { stop: true }], "y"] }, "z"], roots: [{ ingest: {} }], expected: [[["a", "x", or2], ["a", "y", "z"]]] }, { name: "fork at depth 2 carries every enclosing continuation", spec: ["a", { one: [{ match: rr2("ingest.k", "1"), next: ["b", { many: ["c", "d"] }, "e"] }] }, "f"], roots: [{ ingest: { k: "1" } }, { ingest: { k: "2" } }], expected: [[["a", "b", "c", "e", "f"], ["a", "b", "d", "e", "f"]], [["a", "f"]]] }, { name: "fork inside a member next continues the enclosing arrays", spec: ["a", ["b", "c"], "d"], nexts: { b: { many: ["m1", "m2"] } }, roots: [{ ingest: {} }], expected: [[["a", "b", "m1", "c", "d"], ["a", "b", "m2", "c", "d"]]] }, { name: "a step listed twice runs twice", spec: ["a", "b", "a"], roots: [{ ingest: {} }], expected: [[["a", "b", "a"]]] }, { name: "member next cycle stops at the guard", spec: ["a", "x"], nexts: { a: "b", b: "a" }, roots: [{ ingest: {} }], expected: [[["a", "b", "x"]]] }, { name: "gated stop after a write ends the copy", spec: ["a", { match: rr2("ingest.tier", "gold"), stop: true }, "b"], sets: { a: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["a", or2]]] }, { name: "gated stop that fails falls through", spec: ["a", { match: rr2("ingest.tier", "gold"), stop: true }, "b"], roots: [{ ingest: { tier: "gold" } }, { ingest: { tier: "silver" } }], expected: [[["a", or2]], [["a", "b"]]] }, { name: "unconditional stop", spec: ["a", { stop: true }, "b"], roots: [{ ingest: {} }], expected: [[["a", or2]]] }, { name: "one with a stop entry", spec: { one: [{ match: rr2("ingest.x", "1"), stop: true }, { next: "b" }] }, roots: [{ ingest: { x: "1" } }, { ingest: { x: "2" } }], expected: [[[or2]], [["b"]]] }, { name: "state get into ingest.tier \u2192 next one on ingest.tier", spec: ["state", { one: [{ match: rr2("ingest.tier", "gold"), next: "vip" }, { next: "std" }] }], sets: { state: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["state", "vip"]]] }];
4352
4352
  pr2 = ["consent", "include", "data"];
4353
- ur2 = ["consent", "include", "remove", "batch", "settings", "extend", "data", "silent"];
4353
+ ur = ["consent", "include", "remove", "batch", "settings", "extend", "data", "silent"];
4354
4354
  mr2 = { Source: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", primary: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", variables: "resolve", examples: "docs" }, Transformer: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", mapping: "runtime", variables: "resolve", examples: "docs" }, Destination: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", before: "runtime", next: "runtime", cache: "runtime", state: "runtime", variables: "resolve", examples: "docs" }, Store: { package: "reference", code: "reference", import: "reference", config: "runtime", env: "runtime", cache: "runtime", variables: "resolve", examples: "docs" } };
4355
- gr = ["disabled", "id", "logger", "mock", "chainMocks"];
4356
- hr = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
4355
+ gr2 = ["disabled", "id", "logger", "mock", "chainMocks"];
4356
+ hr2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
4357
4357
  Sr = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
4358
4358
  Cr2 = ["sources", "destinations", "transformers", "stores"];
4359
4359
  xr = { sources: "Source", destinations: "Destination", transformers: "Transformer", stores: "Store" };
@@ -4503,7 +4503,7 @@ var init_content_digest = __esm({
4503
4503
 
4504
4504
  // src/config/window-collector.ts
4505
4505
  function assertWindowCollector(value, source = {}) {
4506
- const check = Wn(value);
4506
+ const check = Hn(value);
4507
4507
  if (check.ok) return check.name;
4508
4508
  const path25 = source.path ?? "config.settings.windowCollector";
4509
4509
  const subject = source.written !== void 0 && source.written !== value ? `${JSON.stringify(source.written)} resolved to ${JSON.stringify(value)}, which` : JSON.stringify(value);
@@ -5541,7 +5541,7 @@ function s(e6, t5) {
5541
5541
  const n6 = {};
5542
5542
  return Object.entries(t5).forEach(([e7, t6]) => {
5543
5543
  n6[e7] = !!t6;
5544
- }), e6.consent = Re(e6.consent, n6), { update: n6 };
5544
+ }), e6.consent = Te(e6.consent, n6), { update: n6 };
5545
5545
  }
5546
5546
  function O(e6, t5, n6) {
5547
5547
  return { traceId: e6.source?.trace ?? t5?._meta.trace ?? n6.trace, sourceId: t5?._meta.path[0], parentEventId: t5?._meta.parentEventId };
@@ -5556,16 +5556,16 @@ function x(e6) {
5556
5556
  function j(e6, t5, n6, o5) {
5557
5557
  e6.status.in++;
5558
5558
  const s6 = C2(e6, "collector.push", "collector", "skip", "string" == typeof t5.id ? t5.id : "", Date.now(), O(t5, n6, e6));
5559
- s6.skipReason = o5.reason, "consent" === o5.reason ? (s6.consent = { ...o5.consent }, s6.meta = { at: o5.at, required: { ...o5.required } }) : s6.meta = { by: o5.by ?? "route", at: o5.at }, Nn(e6, s6);
5559
+ s6.skipReason = o5.reason, "consent" === o5.reason ? (s6.consent = { ...o5.consent }, s6.meta = { at: o5.at, required: { ...o5.required } }) : s6.meta = { by: o5.by ?? "route", at: o5.at }, Ln(e6, s6);
5560
5560
  }
5561
5561
  function A(e6, t5) {
5562
5562
  return e6.storeId && t5.stores[e6.storeId] ? t5.stores[e6.storeId] : t5.stores.__cache;
5563
5563
  }
5564
5564
  function $(e6) {
5565
- return ("undefined" == typeof __WALKEROS_STATE__ || __WALKEROS_STATE__) && e6 ? ho(e6) : void 0;
5565
+ return ("undefined" == typeof __WALKEROS_STATE__ || __WALKEROS_STATE__) && e6 ? $o(e6) : void 0;
5566
5566
  }
5567
5567
  function M(e6, t5, n6, o5) {
5568
- return "undefined" == typeof __WALKEROS_STATE__ || __WALKEROS_STATE__ ? wo(t5, (t6) => (function(e7, t7) {
5568
+ return "undefined" == typeof __WALKEROS_STATE__ || __WALKEROS_STATE__ ? xo(t5, (t6) => (function(e7, t7) {
5569
5569
  return e7 ? t7.stores[e7] : t7.stores.__cache;
5570
5570
  })(t6, e6), n6, e6, o5) : Promise.resolve(n6);
5571
5571
  }
@@ -5595,7 +5595,7 @@ function W2(e6, t5, n6) {
5595
5595
  function T2(e6) {
5596
5596
  const { simulation: t5, ...n6 } = e6, o5 = {}, s6 = /* @__PURE__ */ new WeakMap();
5597
5597
  for (const [e7, t6] of Object.entries(n6)) o5[e7] = "function" == typeof t6 ? t6 : W2(t6, s6, 1);
5598
- const r6 = pr(o5, t5);
5598
+ const r6 = yr(o5, t5);
5599
5599
  return { wrappedEnv: r6.env, calls: r6.calls, unresolved: r6.unresolved };
5600
5600
  }
5601
5601
  function B2(e6, t5) {
@@ -5730,17 +5730,17 @@ async function Fe2(e6, t5, n6) {
5730
5730
  }
5731
5731
  return true;
5732
5732
  }
5733
- async function Ve(e6, t5, n6, o5, s6, r6) {
5733
+ async function Ve2(e6, t5, n6, o5, s6, r6) {
5734
5734
  const i6 = t5.type || "unknown", a5 = e6.logger.scope(`transformer:${i6}`), c3 = { collector: e6, logger: a5, id: n6, ingest: s6, config: t5.config, env: { ...tt2(t5.config.env), ...r6 ? { respond: r6 } : {} }, reportError: ce2(e6, "transformer", n6, a5) };
5735
5735
  a5.debug("push", { event: o5.name });
5736
5736
  const u4 = "string" == typeof o5.id ? o5.id : "", d3 = O(o5, s6, e6), l4 = Date.now(), f4 = C2(e6, o("transformer", n6), "transformer", "in", u4, l4, d3);
5737
- f4.inEvent = o5, Nn(e6, f4);
5737
+ f4.inEvent = o5, Ln(e6, f4);
5738
5738
  try {
5739
5739
  const s7 = await Dt(t5.push, "TransformerPush", e6.hooks, e6.logger)(o5, c3), r7 = Date.now(), i7 = C2(e6, o("transformer", n6), "transformer", "out", u4, r7, d3);
5740
- return i7.durationMs = r7 - l4, i7.outEvent = s7, Nn(e6, i7), a5.debug("push done"), s7;
5740
+ return i7.durationMs = r7 - l4, i7.outEvent = s7, Ln(e6, i7), a5.debug("push done"), s7;
5741
5741
  } catch (t6) {
5742
5742
  const o6 = Date.now(), s7 = C2(e6, o("transformer", n6), "transformer", "error", u4, o6, d3);
5743
- throw s7.durationMs = o6 - l4, s7.error = x(t6), Nn(e6, s7), t6;
5743
+ throw s7.durationMs = o6 - l4, s7.error = x(t6), Ln(e6, s7), t6;
5744
5744
  }
5745
5745
  }
5746
5746
  function Ue2(e6) {
@@ -5781,7 +5781,7 @@ async function Xe(e6, t5) {
5781
5781
  let t6, a5;
5782
5782
  if (i6) t6 = i6.member, a5 = i6, i6 = void 0;
5783
5783
  else {
5784
- const i7 = Jr(o5, fo(n6, s6), e6.transformers);
5784
+ const i7 = to(o5, vo(n6, s6), e6.transformers);
5785
5785
  if ("done" === i7.kind) return Qe([{ event: s6, ingest: n6 }], r6);
5786
5786
  if ("stop" === i7.kind) return { copies: [], respond: r6, stopped: true, ...void 0 !== i7.owner ? { droppedBy: i7.owner } : {} };
5787
5787
  if ("fork" === i7.kind) {
@@ -5802,7 +5802,7 @@ async function Je2(e6, t5, n6, o5, s6, r6) {
5802
5802
  let l4 = n6, f4 = s6;
5803
5803
  const p4 = (e7 = t5.rest) => ({ kind: "continue", event: He2(n6, l4), respond: f4, stack: e7 }), g4 = (e7) => ({ kind: "halt", result: e7 });
5804
5804
  if (!d3) return i6.logger.warn(`Transformer not found: ${u4}`), p4();
5805
- const h3 = d3.config?.cache, m4 = h3 ? lo(h3) : void 0, w4 = m4 ? A(m4, i6) : void 0;
5805
+ const h3 = d3.config?.cache, m4 = h3 ? yo(h3) : void 0, w4 = m4 ? A(m4, i6) : void 0;
5806
5806
  let v4 = r6?.cacheMiss;
5807
5807
  if (!r6) {
5808
5808
  if (o5._meta.path.length > 256) return i6.logger.error(`Max path length exceeded at ${u4}`), g4({ copies: [], respond: f4 });
@@ -5818,7 +5818,7 @@ async function Je2(e6, t5, n6, o5, s6, r6) {
5818
5818
  if (void 0 !== d3.config?.mock) return i6.logger.scope(`transformer:${d3.type || "unknown"}`).debug("mock"), l4 = d3.config.mock, p4();
5819
5819
  if (d3.config?.disabled) return p4();
5820
5820
  if (m4 && w4) {
5821
- const e7 = await po(m4, w4, fo(o5, l4));
5821
+ const e7 = await bo(m4, w4, vo(o5, l4));
5822
5822
  if ("HIT" === e7?.status && e7.value) {
5823
5823
  if (l4 = e7.value, m4.stop) {
5824
5824
  return g4({ copies: [{ event: He2(n6, l4), ingest: o5 }], respond: f4, stopped: true });
@@ -5841,7 +5841,7 @@ async function Je2(e6, t5, n6, o5, s6, r6) {
5841
5841
  }
5842
5842
  const y4 = $(d3.config?.state), b4 = y4?.filter((e7) => "get" === e7.mode), k4 = y4?.filter((e7) => "set" === e7.mode), S3 = async (e7) => k4 && 0 !== k4.length ? M(i6, k4, e7, o5) : e7;
5843
5843
  b4 && b4.length > 0 && (l4 = await M(i6, b4, l4, o5));
5844
- const _3 = await bt(Ve, (e7) => (i6.status.failed++, i6.logger.scope(`transformer:${d3.type || "unknown"}`).error("Push failed", ae2(e7)), false))(i6, d3, u4, l4, o5, f4);
5844
+ const _3 = await bt(Ve2, (e7) => (i6.status.failed++, i6.logger.scope(`transformer:${d3.type || "unknown"}`).error("Push failed", ae2(e7)), false))(i6, d3, u4, l4, o5, f4);
5845
5845
  if (false === _3) return g4({ copies: [], respond: f4, droppedBy: u4 });
5846
5846
  if (Array.isArray(_3) && 1 !== _3.length) {
5847
5847
  if (0 === _3.length) return g4({ copies: [], respond: f4 });
@@ -5854,14 +5854,14 @@ async function Je2(e6, t5, n6, o5, s6, r6) {
5854
5854
  }
5855
5855
  const E3 = Array.isArray(_3) ? _3[0] : _3;
5856
5856
  let q4;
5857
- return E3 && "object" == typeof E3 && (E3.respond && (f4 = E3.respond), E3.event && (l4 = E3.event), q4 = E3.next), l4 = await S3(l4), v4 && w4 && mo(w4, v4.key, l4, v4.ttl), p4(Ne2(t5, q4));
5857
+ return E3 && "object" == typeof E3 && (E3.respond && (f4 = E3.respond), E3.event && (l4 = E3.event), q4 = E3.next), l4 = await S3(l4), v4 && w4 && wo(w4, v4.key, l4, v4.ttl), p4(Ne2(t5, q4));
5858
5858
  }
5859
- async function Ze2(e6, t5, n6, o5, s6, r6, i6) {
5859
+ async function Ze(e6, t5, n6, o5, s6, r6, i6) {
5860
5860
  const a5 = s6 ?? I("string" == typeof n6 ? n6 : "chain");
5861
- return void 0 === n6 ? Qe([{ event: o5, ingest: a5 }], r6) : (i6 && (a5._meta.chainPath = i6), Xe({ collector: e6, transformers: t5, chainContext: i6 }, { stack: Zr(n6) ? n6 : Vr(n6), event: o5, ingest: a5, respond: r6 }));
5861
+ return void 0 === n6 ? Qe([{ event: o5, ingest: a5 }], r6) : (i6 && (a5._meta.chainPath = i6), Xe({ collector: e6, transformers: t5, chainContext: i6 }, { stack: Xr(n6) ? n6 : Yr(n6), event: o5, ingest: a5, respond: r6 }));
5862
5862
  }
5863
5863
  async function et2(e6, t5, n6, o5, s6, r6, i6) {
5864
- const a5 = t5[n6], c3 = a5 ? a5.config.before : void 0, u4 = await Ze2(e6, t5, c3, o5, s6, r6, i6);
5864
+ const a5 = t5[n6], c3 = a5 ? a5.config.before : void 0, u4 = await Ze(e6, t5, c3, o5, s6, r6, i6);
5865
5865
  return u4.stopped && 0 === u4.copies.length && !u4.droppedBy ? { ...u4, droppedBy: n6 } : u4;
5866
5866
  }
5867
5867
  function tt2(e6) {
@@ -5906,13 +5906,13 @@ function at2(e6) {
5906
5906
  async function ct2(e6, t5, n6) {
5907
5907
  const { code: o5, config: s6 = {}, env: r6 = {}, primary: i6, next: a5, before: c3, cache: u4, terminus: d3 } = n6, l4 = s6.state ?? n6.state, f4 = $(l4);
5908
5908
  P2(e6, o("source", t5), l4);
5909
- const p4 = u4, g4 = p4 ? lo({ ...p4, stop: p4.stop ?? true }) : void 0, h3 = d3 ?? e6.push, m4 = Boolean(d3), w4 = async (n7, o6, r7) => {
5909
+ const p4 = u4, g4 = p4 ? yo({ ...p4, stop: p4.stop ?? true }) : void 0, h3 = d3 ?? e6.push, m4 = Boolean(d3), w4 = async (n7, o6, r7) => {
5910
5910
  if (m4) return h3(n7);
5911
5911
  let i7;
5912
5912
  const u5 = "string" == typeof n7.id && "" !== n7.id ? n7 : { ...n7, id: Ye() };
5913
5913
  let d4 = [{ event: u5, ingest: r7.ingest }];
5914
5914
  if (void 0 !== c3) {
5915
- const n8 = `source.${t5}.before`, o7 = await Ze2(e6, e6.transformers || {}, c3, u5, r7.ingest, r7.respond, n8);
5915
+ const n8 = `source.${t5}.before`, o7 = await Ze(e6, e6.transformers || {}, c3, u5, r7.ingest, r7.respond, n8);
5916
5916
  if (0 === o7.copies.length) return j(e6, u5, r7.ingest, { reason: "dropped", by: o7.droppedBy, at: n8 }), En({ ok: true, dropped: true });
5917
5917
  if (o7.stopped) return o7.respond && (r7.respond = o7.respond), { ok: true };
5918
5918
  o7.respond && (r7.respond = o7.respond), d4 = o7.copies;
@@ -5920,22 +5920,22 @@ async function ct2(e6, t5, n6) {
5920
5920
  if (g4) {
5921
5921
  const t6 = A(g4, e6);
5922
5922
  if (t6) {
5923
- const n8 = fo(r7.ingest), o7 = await po(g4, t6, n8);
5923
+ const n8 = vo(r7.ingest), o7 = await bo(g4, t6, n8);
5924
5924
  if (o7) {
5925
5925
  if ("HIT" === o7.status && void 0 !== o7.value && g4.stop) {
5926
5926
  let t7 = o7.value;
5927
- return o7.rule.update && (t7 = await go(t7, o7.rule.update, { ...n8, cache: { status: "HIT" } }, e6)), r7.respond?.(t7), { ok: true };
5927
+ return o7.rule.update && (t7 = await ko(t7, o7.rule.update, { ...n8, cache: { status: "HIT" } }, e6)), r7.respond?.(t7), { ok: true };
5928
5928
  }
5929
5929
  if ("MISS" === o7.status && g4.stop && r7.respond) {
5930
5930
  const s7 = r7.respond, a6 = o7.rule.update, c4 = { ...n8, cache: { status: "MISS" } }, u6 = o7.key, d5 = o7.rule.ttl, l6 = (n9) => {
5931
- mo(t6, u6, n9, d5), a6 ? i7 = (async () => {
5932
- const t7 = await go(n9, a6, c4, e6);
5931
+ wo(t6, u6, n9, d5), a6 ? i7 = (async () => {
5932
+ const t7 = await ko(n9, a6, c4, e6);
5933
5933
  s7(t7);
5934
5934
  })() : s7(n9);
5935
5935
  };
5936
5936
  r7.respond = l6;
5937
5937
  }
5938
- "MISS" !== o7.status || g4.stop || mo(t6, o7.key, true, o7.rule.ttl);
5938
+ "MISS" !== o7.status || g4.stop || wo(t6, o7.key, true, o7.rule.ttl);
5939
5939
  }
5940
5940
  }
5941
5941
  }
@@ -5944,7 +5944,7 @@ async function ct2(e6, t5, n6) {
5944
5944
  for (const e7 of d4) l5 = await h3(e7.event, { ...o6, id: t5, ingest: e7.ingest, respond: r7.respond, mapping: s6, preChain: a5 });
5945
5945
  return i7 && await i7, l5;
5946
5946
  }, v4 = async (n7) => {
5947
- const o6 = I(t5), r7 = ot($r(n7) ? n7?.headers?.traceparent : void 0);
5947
+ const o6 = I(t5), r7 = ot(Er(n7) ? n7?.headers?.traceparent : void 0);
5948
5948
  if (r7 && (o6._meta.trace = r7.trace, o6._meta.parentEventId = r7.parentSpan), !s6.ingest || void 0 === n7) return o6;
5949
5949
  const i7 = await St(n7, s6.ingest, { collector: e6 });
5950
5950
  return { ...o6, ...i7, _meta: o6._meta };
@@ -6294,7 +6294,7 @@ async function Zt(e6, t5, n6) {
6294
6294
  function en(e6) {
6295
6295
  return (Pt.get(e6) || 0) > 0;
6296
6296
  }
6297
- async function nn(e6) {
6297
+ async function nn2(e6) {
6298
6298
  if (!lt2(e6)) return pt2(), [];
6299
6299
  const t5 = [];
6300
6300
  for (const [n6, o5] of Object.entries(e6.destinations)) {
@@ -6467,7 +6467,7 @@ async function yn(e6, t5, n6, o5) {
6467
6467
  const r8 = Ke(p5.config.consent, n7, t7.consent);
6468
6468
  if (r8) return t7.consent = r8, s7.push(t7), false;
6469
6469
  const i6 = C2(e6, o("destination", o6), "destination", "skip", "string" == typeof t7.id ? t7.id : "", Date.now(), O(t7, x4, e6));
6470
- return i6.skipReason = "consent", n7 && (i6.consent = { ...n7 }), p5.config.consent && (i6.meta = { required: { ...p5.config.consent } }), Nn(e6, i6), true;
6470
+ return i6.skipReason = "consent", n7 && (i6.consent = { ...n7 }), p5.config.consent && (i6.meta = { required: { ...p5.config.consent } }), Ln(e6, i6), true;
6471
6471
  });
6472
6472
  return { allowed: s7, skipped: r7 };
6473
6473
  }, I4 = e6.consent, { allowed: D4, skipped: P5 } = j4(q4);
@@ -6497,28 +6497,28 @@ async function yn(e6, t5, n6, o5) {
6497
6497
  if (k4(T5), !D4.length) return b4(), T5.length ? { id: o6, destination: p5, queue: T5 } : { id: o6, destination: p5, skipped: true };
6498
6498
  let L5, z6;
6499
6499
  p5.dlq || (p5.dlq = []);
6500
- const F4 = p5.config.before, V4 = p5.config.next, U4 = p5.config?.cache, H4 = U4 ? lo(U4) : void 0, G4 = H4 ? A(H4, e6) : void 0, N5 = $(p5.config?.state), J4 = N5?.filter((e7) => "get" === e7.mode), Z5 = N5?.filter((e7) => "set" === e7.mode);
6500
+ const F4 = p5.config.before, V4 = p5.config.next, U4 = p5.config?.cache, H4 = U4 ? yo(U4) : void 0, G4 = H4 ? A(H4, e6) : void 0, N5 = $(p5.config?.state), J4 = N5?.filter((e7) => "get" === e7.mode), Z5 = N5?.filter((e7) => "set" === e7.mode);
6501
6501
  let oe3 = 0, ce4 = 0, ue3 = 0;
6502
6502
  return await Promise.all(D4.map(async (t6) => {
6503
6503
  let c3, u4;
6504
- if (t6.user = Re(s6, t6.user), H4?.stop && G4) {
6505
- const e7 = fo(x4, t6), n7 = await po(H4, G4, e7);
6504
+ if (t6.user = Te(s6, t6.user), H4?.stop && G4) {
6505
+ const e7 = vo(x4, t6), n7 = await bo(H4, G4, e7);
6506
6506
  if ("HIT" === n7?.status) return t6;
6507
6507
  "MISS" === n7?.status && (c3 = { key: n7.key, ttl: n7.rule.ttl });
6508
6508
  }
6509
6509
  let f4 = [{ event: t6, ingest: x4 }], h5 = n6.respond;
6510
6510
  if (void 0 !== F4) {
6511
- const s7 = `destination.${o6}.before`, i6 = await Ze2(e6, r6, F4, t6, x4, n6.respond, s7);
6511
+ const s7 = `destination.${o6}.before`, i6 = await Ze(e6, r6, F4, t6, x4, n6.respond, s7);
6512
6512
  if (0 === i6.copies.length) {
6513
6513
  const n7 = C2(e6, o("destination", o6), "destination", "skip", "string" == typeof t6.id ? t6.id : "", Date.now(), O(t6, x4, e6));
6514
- return n7.skipReason = "dropped", n7.meta = { by: i6.droppedBy ?? "route", at: s7 }, Nn(e6, n7), t6;
6514
+ return n7.skipReason = "dropped", n7.meta = { by: i6.droppedBy ?? "route", at: s7 }, Ln(e6, n7), t6;
6515
6515
  }
6516
6516
  i6.respond && (h5 = i6.respond), f4 = i6.copies.map((e7) => ({ event: e7.event, ingest: e7.ingest }));
6517
6517
  }
6518
6518
  const m4 = async (t7, n7, s7) => {
6519
6519
  let i6 = s7, c4 = false;
6520
6520
  if (H4 && !H4.stop && G4) {
6521
- const e7 = fo(n7, t7 ?? void 0), o7 = await po(H4, G4, e7);
6521
+ const e7 = vo(n7, t7 ?? void 0), o7 = await bo(H4, G4, e7);
6522
6522
  if ("HIT" === o7?.status) return false;
6523
6523
  "MISS" === o7?.status && (i6 = { key: o7.key, ttl: o7.rule.ttl }, c4 = true);
6524
6524
  }
@@ -6535,15 +6535,15 @@ async function yn(e6, t5, n6, o5) {
6535
6535
  Y(r7, e6.logger.scope(p5.type || "unknown"), "destination.dlq overflow; oldest entries dropped", { buffer: "dlq", destination: i7, cap: a5.max, droppedCount: t8 });
6536
6536
  } else r7.length < a5.max && X(r7);
6537
6537
  })(e6, p5, o6, t7, n7, h5);
6538
- if (oe3 += Date.now() - f5, i6 && G4 && void 0 === p5.config.mock && (c4 ? mo(G4, i6.key, m5 ?? true, i6.ttl) : void 0 === u4 && (u4 = m5 ?? true)), !g4 && !ln(m5) && Z5 && Z5.length > 0 && t7 && (t7 = await M(e6, Z5, t7, n7)), void 0 === m5 || ln(m5) || (z6 = m5), ln(m5) && ce4++, !g4 && V4) {
6538
+ if (oe3 += Date.now() - f5, i6 && G4 && void 0 === p5.config.mock && (c4 ? wo(G4, i6.key, m5 ?? true, i6.ttl) : void 0 === u4 && (u4 = m5 ?? true)), !g4 && !ln(m5) && Z5 && Z5.length > 0 && t7 && (t7 = await M(e6, Z5, t7, n7)), void 0 === m5 || ln(m5) || (z6 = m5), ln(m5) && ce4++, !g4 && V4) {
6539
6539
  void 0 !== m5 && (n7._response = m5);
6540
- const s8 = await Ze2(e6, r6, V4, t7, n7, h5, `destination.${o6}.next`);
6540
+ const s8 = await Ze(e6, r6, V4, t7, n7, h5, `destination.${o6}.next`);
6541
6541
  s8.respond && (h5 = s8.respond);
6542
6542
  }
6543
6543
  return true;
6544
6544
  };
6545
6545
  for (const e7 of f4) await m4(e7.event, e7.ingest, c3) && ue3++;
6546
- return c3 && G4 && void 0 !== u4 && void 0 === p5.config.mock && mo(G4, c3.key, u4, c3.ttl), t6;
6546
+ return c3 && G4 && void 0 !== u4 && void 0 === p5.config.mock && wo(G4, c3.key, u4, c3.ttl), t6;
6547
6547
  })), { id: o6, destination: p5, error: L5, response: z6, totalDuration: oe3, batchedCount: ce4, allowedCount: D4.length, pushedCount: ue3, canonicalId: h4, breakerConfig: v5 };
6548
6548
  })), h3 = {}, w4 = {}, v4 = {};
6549
6549
  for (const t6 of p4) {
@@ -6570,12 +6570,12 @@ async function bn(e6, t5, n6, o5) {
6570
6570
  r6.debug("init");
6571
6571
  const a5 = Date.now();
6572
6572
  let c3;
6573
- Nn(e7, C2(e7, o("destination", o6), "destination", "init", "", a5));
6573
+ Ln(e7, C2(e7, o("destination", o6), "destination", "init", "", a5));
6574
6574
  try {
6575
6575
  c3 = await Dt(n7, "DestinationInit", e7.hooks, e7.logger)(i6);
6576
6576
  } catch (t7) {
6577
6577
  const n8 = Date.now(), s8 = C2(e7, o("destination", o6), "destination", "error", "", n8);
6578
- throw s8.durationMs = n8 - a5, s8.error = x(t7), Nn(e7, s8), t7;
6578
+ throw s8.durationMs = n8 - a5, s8.error = x(t7), Ln(e7, s8), t7;
6579
6579
  }
6580
6580
  return false !== c3 && { ...c3 || t6.config, init: true };
6581
6581
  })(e6, t5, n6, o5);
@@ -6680,7 +6680,7 @@ async function _n(e6, t5, n6, o5, s6, r6) {
6680
6680
  const e7 = q5 ? k5 : b5.get(o8);
6681
6681
  a8.error = x(e7);
6682
6682
  }
6683
- Nn(e6, a8);
6683
+ Ln(e6, a8);
6684
6684
  }), u4.debug("push batch done"), l5.inFlightBatch = Math.max(0, (l5.inFlightBatch ?? 0) - r8.entries.length), I4 > 0 && (l5.count += I4, l5.lastAt = Date.now(), e6.status.out += I4, w5("success"));
6685
6685
  }, { wait: a6, size: c5, age: d5 });
6686
6686
  t5.batches[h3] = { batched: o6, isDefault: !f4, batchFn: () => {
@@ -6692,9 +6692,9 @@ async function _n(e6, t5, n6, o5, s6, r6) {
6692
6692
  const c4 = t5.batches[h3];
6693
6693
  c4.batched.entries.push({ event: a5.event, ingest: s6, respond: r6, rule: l4, data: a5.data }), c4.batched.events.push(a5.event), ne(a5.data) && c4.batched.data.push(a5.data);
6694
6694
  const d4 = "string" == typeof a5.event.id ? a5.event.id : "", m4 = O(o5, s6, e6), v4 = Date.now(), b4 = C2(e6, o("destination", n6), "destination", "in", d4, v4, m4);
6695
- a5.mappingKey && (b4.mappingKey = a5.mappingKey), a5.event.consent && (b4.consent = { ...a5.event.consent }), b4.inEvent = a5.event, Nn(e6, b4);
6695
+ a5.mappingKey && (b4.mappingKey = a5.mappingKey), a5.event.consent && (b4.consent = { ...a5.event.consent }), b4.inEvent = a5.event, Ln(e6, b4);
6696
6696
  const k4 = C2(e6, o("destination", n6), "destination", "out", d4, v4, m4);
6697
- a5.mappingKey && (k4.mappingKey = a5.mappingKey), k4.outEvent = a5.event, k4.batch = { size: c4.batched.entries.length, index: c4.batched.entries.length - 1 }, Nn(e6, k4);
6697
+ a5.mappingKey && (k4.mappingKey = a5.mappingKey), k4.outEvent = a5.event, k4.batch = { size: c4.batched.entries.length, index: c4.batched.entries.length - 1 }, Ln(e6, k4);
6698
6698
  const q4 = t5.config.id || n6, j4 = re(e6, q4);
6699
6699
  return j4.inFlightBatch = (j4.inFlightBatch ?? 0) + 1, c4.batchFn(), dn;
6700
6700
  }
@@ -6702,16 +6702,16 @@ async function _n(e6, t5, n6, o5, s6, r6) {
6702
6702
  let r7;
6703
6703
  if (u4.debug("push", { event: a5.event.name }), ("undefined" == typeof __WALKEROS_OBSERVE__ || __WALKEROS_OBSERVE__) && "trace" === e6.observeLevel?.() && Array.isArray(t5.calls) && t5.calls.length > 0) {
6704
6704
  const e7 = T2({ ...d3.env, simulation: t5.calls });
6705
- d3.env = e7.wrappedEnv, r7 = e7.calls, e7.unresolved.length > 0 && (e7.wrappedEnv[nr] = { paths: e7.unresolved, record: (t6, n7) => e7.calls.push({ fn: t6, args: n7, ts: Date.now() }) });
6705
+ d3.env = e7.wrappedEnv, r7 = e7.calls, e7.unresolved.length > 0 && (e7.wrappedEnv[cr] = { paths: e7.unresolved, record: (t6, n7) => e7.calls.push({ fn: t6, args: n7, ts: Date.now() }) });
6706
6706
  }
6707
6707
  const c4 = "string" == typeof a5.event.id ? a5.event.id : "", l5 = O(o5, s6, e6), f5 = Date.now(), p4 = C2(e6, o("destination", n6), "destination", "in", c4, f5, l5);
6708
- a5.mappingKey && (p4.mappingKey = a5.mappingKey), a5.event.consent && (p4.consent = { ...a5.event.consent }), p4.inEvent = a5.event, Nn(e6, p4);
6708
+ a5.mappingKey && (p4.mappingKey = a5.mappingKey), a5.event.consent && (p4.consent = { ...a5.event.consent }), p4.inEvent = a5.event, Ln(e6, p4);
6709
6709
  try {
6710
6710
  const o6 = ot2(i6.timeout), s7 = await rt2(Promise.resolve(Dt(t5.push, "DestinationPush", e6.hooks, e6.logger)(a5.event, d3)), o6, `Destination "${n6}" delivery timed out after ${o6}ms`), p5 = Date.now(), h4 = C2(e6, o("destination", n6), "destination", "out", c4, p5, l5);
6711
- return h4.durationMs = p5 - f5, h4.outEvent = a5.event, L2(h4, r7), ne(s7) && (h4.meta = { ...h4.meta, response: s7 }), a5.mappingKey && (h4.mappingKey = a5.mappingKey), Nn(e6, h4), u4.debug("push done"), s7;
6711
+ return h4.durationMs = p5 - f5, h4.outEvent = a5.event, L2(h4, r7), ne(s7) && (h4.meta = { ...h4.meta, response: s7 }), a5.mappingKey && (h4.mappingKey = a5.mappingKey), Ln(e6, h4), u4.debug("push done"), s7;
6712
6712
  } catch (t6) {
6713
6713
  const o6 = Date.now(), s7 = C2(e6, o("destination", n6), "destination", "error", c4, o6, l5);
6714
- throw s7.durationMs = o6 - f5, s7.error = x(t6), L2(s7, r7), a5.mappingKey && (s7.mappingKey = a5.mappingKey), Nn(e6, s7), t6;
6714
+ throw s7.durationMs = o6 - f5, s7.error = x(t6), L2(s7, r7), a5.mappingKey && (s7.mappingKey = a5.mappingKey), Ln(e6, s7), t6;
6715
6715
  }
6716
6716
  }
6717
6717
  }
@@ -6732,10 +6732,10 @@ async function On(e6, t5 = {}) {
6732
6732
  function Cn(e6, t5) {
6733
6733
  return e6 || t5 ? t5 ? e6 && ae(e6) && ae(t5) ? { ...e6, ...t5 } : t5 : e6 : {};
6734
6734
  }
6735
- var Pn2 = 5e3;
6735
+ var Pn = 5e3;
6736
6736
  async function Rn(e6) {
6737
6737
  const t5 = e6.logger;
6738
- await Wn2(e6.sources, "source", t5), await (async function(e7, t6) {
6738
+ await Wn(e6.sources, "source", t5), await (async function(e7, t6) {
6739
6739
  const n6 = Object.entries(e7).flatMap(([e8, n7]) => {
6740
6740
  const o5 = n7.batches;
6741
6741
  if (!o5) return [];
@@ -6744,7 +6744,7 @@ async function Rn(e6) {
6744
6744
  let n8;
6745
6745
  try {
6746
6746
  await Promise.race([t7.flush(), new Promise((t8, o6) => {
6747
- n8 = setTimeout(() => o6(new Error(`destination '${e8}' batch flush timed out`)), Pn2);
6747
+ n8 = setTimeout(() => o6(new Error(`destination '${e8}' batch flush timed out`)), Pn);
6748
6748
  })]);
6749
6749
  } catch (t8) {
6750
6750
  s6.error(`destination '${e8}' batch flush failed: ${t8}`);
@@ -6754,9 +6754,9 @@ async function Rn(e6) {
6754
6754
  });
6755
6755
  });
6756
6756
  await Promise.allSettled(n6);
6757
- })(e6.destinations, t5), await Wn2(e6.destinations, "destination", t5), await Wn2(e6.transformers, "transformer", t5), await Wn2(e6.stores, "store", t5);
6757
+ })(e6.destinations, t5), await Wn(e6.destinations, "destination", t5), await Wn(e6.transformers, "transformer", t5), await Wn(e6.stores, "store", t5);
6758
6758
  }
6759
- async function Wn2(e6, t5, n6) {
6759
+ async function Wn(e6, t5, n6) {
6760
6760
  const o5 = Object.entries(e6).map(async ([e7, o6]) => {
6761
6761
  const s6 = o6.destroy;
6762
6762
  if (!s6) return;
@@ -6764,7 +6764,7 @@ async function Wn2(e6, t5, n6) {
6764
6764
  let c3;
6765
6765
  try {
6766
6766
  await Promise.race([s6(a5), new Promise((n7, o7) => {
6767
- c3 = setTimeout(() => o7(new Error(`${t5} '${e7}' destroy timed out`)), Pn2);
6767
+ c3 = setTimeout(() => o7(new Error(`${t5} '${e7}' destroy timed out`)), Pn);
6768
6768
  })]);
6769
6769
  } catch (n7) {
6770
6770
  i6.error(`${t5} '${e7}' destroy failed: ${n7}`);
@@ -6784,7 +6784,7 @@ async function Bn2(e6, t5, o5) {
6784
6784
  return await (async function() {
6785
6785
  switch (t5) {
6786
6786
  case n.Commands.Config:
6787
- ae(o5) && (Re(e6.config, o5, { shallow: false, merge: false }), i6 = o5, a5 = true);
6787
+ ae(o5) && (Te(e6.config, o5, { shallow: false, merge: false }), i6 = o5, a5 = true);
6788
6788
  break;
6789
6789
  case n.Commands.Consent:
6790
6790
  if (ae(o5)) {
@@ -6793,13 +6793,13 @@ async function Bn2(e6, t5, o5) {
6793
6793
  }
6794
6794
  break;
6795
6795
  case n.Commands.Custom:
6796
- ae(o5) && (e6.custom = Re(e6.custom, o5), Tn(e6, n.Commands.Custom), i6 = o5, a5 = true);
6796
+ ae(o5) && (e6.custom = Te(e6.custom, o5), Tn(e6, n.Commands.Custom), i6 = o5, a5 = true);
6797
6797
  break;
6798
6798
  case n.Commands.Destination:
6799
6799
  ae(o5) && "code" in o5 && ae(o5.code) && (r6 = await gn(e6, o5));
6800
6800
  break;
6801
6801
  case n.Commands.Globals:
6802
- ae(o5) && (e6.globals = Re(e6.globals, o5), Tn(e6, n.Commands.Globals), i6 = o5, a5 = true);
6802
+ ae(o5) && (e6.globals = Te(e6.globals, o5), Tn(e6, n.Commands.Globals), i6 = o5, a5 = true);
6803
6803
  break;
6804
6804
  case n.Commands.Hook:
6805
6805
  if (ae(o5) && ue(o5.name) && oe(o5.fn)) {
@@ -6826,7 +6826,7 @@ async function Bn2(e6, t5, o5) {
6826
6826
  e6.hasShutdown || (e6.hasShutdown = true, await Rn(e6));
6827
6827
  break;
6828
6828
  case n.Commands.User:
6829
- ae(o5) && (Re(e6.user, o5, { shallow: false }), Tn(e6, n.Commands.User), i6 = o5, a5 = true);
6829
+ ae(o5) && (Te(e6.user, o5, { shallow: false }), Tn(e6, n.Commands.User), i6 = o5, a5 = true);
6830
6830
  break;
6831
6831
  default:
6832
6832
  return e6.logger.warn("unknown command", { command: t5 }), En({ ok: false });
@@ -6849,13 +6849,13 @@ async function Bn2(e6, t5, o5) {
6849
6849
  function Kn(e6, t5) {
6850
6850
  return { timing: Math.round((Date.now() - e6.timing) / 10) / 100, source: { type: "collector", schema: "4" }, ...t5 };
6851
6851
  }
6852
- function Ln(e6, t5, n6) {
6853
- return Fn2(e6, t5, n6, { globals: e6.globals, user: e6.user, consent: e6.consent });
6852
+ function Ln2(e6, t5, n6) {
6853
+ return Fn(e6, t5, n6, { globals: e6.globals, user: e6.user, consent: e6.consent });
6854
6854
  }
6855
6855
  function zn(e6, t5, n6) {
6856
- return Fn2(e6, Kn(e6, t5), n6, { globals: {}, user: {}, consent: {} });
6856
+ return Fn(e6, Kn(e6, t5), n6, { globals: {}, user: {}, consent: {} });
6857
6857
  }
6858
- function Fn2(e6, t5, n6, o5) {
6858
+ function Fn(e6, t5, n6, o5) {
6859
6859
  const s6 = t5.name;
6860
6860
  if ("string" != typeof s6) throw new Lt(void 0 === s6 ? "Event name is required" : "Event name is invalid");
6861
6861
  if (!s6) throw new Lt("Event name is required");
@@ -6863,18 +6863,18 @@ function Fn2(e6, t5, n6, o5) {
6863
6863
  if (!r6 || !i6) throw new Lt("Event name is invalid");
6864
6864
  const { timestamp: a5 = Date.now(), name: c3 = `${r6} ${i6}`, data: u4 = {}, context: d3 = {}, globals: l4 = {}, custom: f4 = {}, user: p4 = o5.user, nested: g4 = [], consent: h3 = o5.consent, id: m4 = Ye(), trigger: w4 = "", entity: v4 = r6, action: y4 = i6, timing: b4 = 0, source: k4 = { type: "collector", schema: "4" } } = t5, S3 = k4 ?? { type: "collector", schema: "4" }, _3 = S3.count ?? (e6.count += 1), E3 = S3.trace ?? n6?._meta.trace ?? e6.trace, q4 = { ...S3, count: _3 };
6865
6865
  void 0 !== E3 && (q4.trace = E3);
6866
- const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.8.0";
6866
+ const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.8.1-next-1791586788897";
6867
6867
  q4.release = { ...S3.release, [O4]: C5 };
6868
- return { name: c3, data: u4, context: d3, globals: Re(o5.globals, l4), custom: f4, user: p4, nested: g4, consent: h3, id: m4, trigger: w4, entity: v4, action: y4, timestamp: a5, timing: b4, source: q4 };
6868
+ return { name: c3, data: u4, context: d3, globals: Te(o5.globals, l4), custom: f4, user: p4, nested: g4, consent: h3, id: m4, trigger: w4, entity: v4, action: y4, timestamp: a5, timing: b4, source: q4 };
6869
6869
  }
6870
- function Vn(e6, t5, n6) {
6871
- return Ln(e6, Kn(e6, t5), n6);
6870
+ function Vn2(e6, t5, n6) {
6871
+ return Ln2(e6, Kn(e6, t5), n6);
6872
6872
  }
6873
6873
  async function Hn2(e6, t5, o5) {
6874
- e6.allowed = true, e6.timing = Date.now(), e6.trace = nt(), e6.count = 0, t5 && (t5.consent && (e6.consent = Re(e6.consent, t5.consent), Tn(e6, n.Commands.Consent)), t5.user && (e6.user = Re(e6.user, t5.user), Tn(e6, n.Commands.User)), t5.globals && (e6.globals = Re(e6.config.globalsStatic || {}, t5.globals), Tn(e6, n.Commands.Globals)), t5.custom && (e6.custom = Re(e6.custom, t5.custom), Tn(e6, n.Commands.Custom))), Object.values(e6.destinations).forEach((e7) => {
6874
+ e6.allowed = true, e6.timing = Date.now(), e6.trace = nt(), e6.count = 0, t5 && (t5.consent && (e6.consent = Te(e6.consent, t5.consent), Tn(e6, n.Commands.Consent)), t5.user && (e6.user = Te(e6.user, t5.user), Tn(e6, n.Commands.User)), t5.globals && (e6.globals = Te(e6.config.globalsStatic || {}, t5.globals), Tn(e6, n.Commands.Globals)), t5.custom && (e6.custom = Te(e6.custom, t5.custom), Tn(e6, n.Commands.Custom))), Object.values(e6.destinations).forEach((e7) => {
6875
6875
  e7.queuePush = [];
6876
6876
  }), e6.queue = [], e6.round++, await dt2(e6);
6877
- const s6 = await nn(e6);
6877
+ const s6 = await nn2(e6);
6878
6878
  let r6 = true;
6879
6879
  const i6 = {};
6880
6880
  if (e6.preRunQueue.length) {
@@ -6891,14 +6891,14 @@ async function Hn2(e6, t5, o5) {
6891
6891
  const c3 = { ...a5.failed ?? {}, ...i6 };
6892
6892
  return { ...a5, ok: false, ...Object.keys(c3).length > 0 ? { failed: c3 } : {} };
6893
6893
  }
6894
- var Gn2 = "collector.next";
6894
+ var Gn = "collector.next";
6895
6895
  async function Qn2(e6, t5, n6 = {}) {
6896
6896
  const o5 = n6.ingest ?? I(n6.id || "unknown"), s6 = e6.config.next;
6897
6897
  if (void 0 === s6) return { copies: [{ event: t5, ingest: o5 }], respond: n6.respond };
6898
- const i6 = await Ze2(e6, e6.transformers || {}, s6, t5, o5, n6.respond, Gn2), a5 = i6.respond ?? n6.respond;
6899
- return 0 === i6.copies.length ? (e6.logger.debug("Event dropped by collector.next" + (i6.droppedBy ? ` (${i6.droppedBy})` : "")), j(e6, t5, o5, { reason: "dropped", by: i6.droppedBy, at: Gn2 }), { copies: [], respond: a5, dropped: true }) : i6.stopped ? { copies: [], respond: a5 } : { copies: i6.copies.map((t6) => ({ event: zn(e6, t6.event, t6.ingest), ingest: t6.ingest })), respond: a5 };
6898
+ const i6 = await Ze(e6, e6.transformers || {}, s6, t5, o5, n6.respond, Gn), a5 = i6.respond ?? n6.respond;
6899
+ return 0 === i6.copies.length ? (e6.logger.debug("Event dropped by collector.next" + (i6.droppedBy ? ` (${i6.droppedBy})` : "")), j(e6, t5, o5, { reason: "dropped", by: i6.droppedBy, at: Gn }), { copies: [], respond: a5, dropped: true }) : i6.stopped ? { copies: [], respond: a5 } : { copies: i6.copies.map((t6) => ({ event: zn(e6, t6.event, t6.ingest), ingest: t6.ingest })), respond: a5 };
6900
6900
  }
6901
- function lo2(e6, t5) {
6901
+ function lo(e6, t5) {
6902
6902
  const n6 = Dt(async (n7, o5 = {}) => await bt(async () => {
6903
6903
  if (!e6.allowed) {
6904
6904
  const t6 = G(e6.config.queueMax), s7 = Q2(e6.preRunQueue, { event: n7, options: o5 }, { max: t6 });
@@ -6928,12 +6928,12 @@ function lo2(e6, t5) {
6928
6928
  p4 = t6.event;
6929
6929
  }
6930
6930
  if (void 0 !== u4) {
6931
- const n8 = r6 ? `source.${r6}.next` : void 0, o6 = await Ze2(e6, e6.transformers || {}, u4, p4, h3, f4, n8);
6931
+ const n8 = r6 ? `source.${r6}.next` : void 0, o6 = await Ze(e6, e6.transformers || {}, u4, p4, h3, f4, n8);
6932
6932
  if (0 === o6.copies.length) return e6.logger.debug("Event dropped by transformer chain" + (o6.droppedBy ? ` (${o6.droppedBy})` : "")), j(e6, p4, h3, { reason: "dropped", by: o6.droppedBy, at: n8 ?? "collector.push.preChain" }), En({ ok: true, dropped: true });
6933
6933
  if (o6.stopped) return o6.respond && (f4 = o6.respond), En({ ok: true });
6934
6934
  if (o6.respond && (f4 = o6.respond), o6.copies.length > 1) {
6935
6935
  const n9 = await Promise.all(o6.copies.map(async (n10) => {
6936
- const o7 = Ln(e6, t5(n10.event), n10.ingest);
6936
+ const o7 = Ln2(e6, t5(n10.event), n10.ingest);
6937
6937
  return vn(e6, o7, { id: r6, ingest: n10.ingest, respond: f4 }, g4);
6938
6938
  }));
6939
6939
  if (r6) {
@@ -6945,7 +6945,7 @@ function lo2(e6, t5) {
6945
6945
  }
6946
6946
  p4 = o6.copies[0].event, h3 = o6.copies[0].ingest;
6947
6947
  }
6948
- const m4 = Vn(e6, p4, h3), w4 = await vn(e6, m4, { id: r6, ingest: h3, respond: f4 }, g4);
6948
+ const m4 = Vn2(e6, p4, h3), w4 = await vn(e6, m4, { id: r6, ingest: h3, respond: f4 }, g4);
6949
6949
  if (r6) {
6950
6950
  e6.status.sources[r6] || (e6.status.sources[r6] = { count: 0, duration: 0 });
6951
6951
  const t6 = e6.status.sources[r6];
@@ -6967,13 +6967,13 @@ function lo2(e6, t5) {
6967
6967
  })(), "Push", e6.hooks, e6.logger);
6968
6968
  return async (t6, o5) => {
6969
6969
  const s6 = "string" == typeof t6.id && "" !== t6.id ? t6 : { ...t6, id: Ye() }, r6 = "string" == typeof s6.id ? s6.id : "", i6 = O(s6, o5?.ingest, e6), a5 = Date.now(), c3 = C2(e6, "collector.push", "collector", "in", r6, a5, i6);
6970
- c3.inEvent = s6, Nn(e6, c3);
6970
+ c3.inEvent = s6, Ln(e6, c3);
6971
6971
  try {
6972
6972
  const t7 = await n6(s6, o5), c4 = Date.now(), u4 = C2(e6, "collector.push", "collector", "out", r6, c4, i6);
6973
- return u4.durationMs = c4 - a5, u4.outEvent = t7, Nn(e6, u4), t7;
6973
+ return u4.durationMs = c4 - a5, u4.outEvent = t7, Ln(e6, u4), t7;
6974
6974
  } catch (t7) {
6975
6975
  const n7 = Date.now(), o6 = C2(e6, "collector.push", "collector", "error", r6, n7, i6);
6976
- throw o6.durationMs = n7 - a5, o6.error = x(t7), Nn(e6, o6), t7;
6976
+ throw o6.durationMs = n7 - a5, o6.error = x(t7), Ln(e6, o6), t7;
6977
6977
  }
6978
6978
  };
6979
6979
  }
@@ -7010,12 +7010,12 @@ function wo2(e6 = {}) {
7010
7010
  void 0 !== a5 && (clearInterval(a5), a5 = void 0), r6.clear();
7011
7011
  } };
7012
7012
  }
7013
- function So(e6, t5) {
7013
+ function So2(e6, t5) {
7014
7014
  const { cacheConfig: n6, cacheStore: o5, namespace: s6, logger: r6, storeId: i6, collector: a5 } = t5, c3 = (e7, t6) => {
7015
7015
  if (!a5) return;
7016
7016
  const n7 = C2(a5, `store.${i6}`, "store", "in", "");
7017
- n7.meta = { op: "cache", cached: "hit" === t6, status: t6, key: e7 }, Nn(a5, n7);
7018
- }, u4 = { hits: 0, misses: 0, populates: 0, writes: 0, deletes: 0, inflight_dedups: 0 }, d3 = n6.rules.map((e7) => ({ match: e7.match ? Er(e7.match) : () => true, ttl: e7.ttl })), l4 = (e7) => `${s6}:${e7}`;
7017
+ n7.meta = { op: "cache", cached: "hit" === t6, status: t6, key: e7 }, Ln(a5, n7);
7018
+ }, u4 = { hits: 0, misses: 0, populates: 0, writes: 0, deletes: 0, inflight_dedups: 0 }, d3 = n6.rules.map((e7) => ({ match: e7.match ? Rr(e7.match) : () => true, ttl: e7.ttl })), l4 = (e7) => `${s6}:${e7}`;
7019
7019
  function f4(e7, t6) {
7020
7020
  const n7 = void 0 === t6 ? { key: e7 } : { key: e7, value: t6 };
7021
7021
  return d3.find((e8) => e8.match(n7));
@@ -7024,7 +7024,7 @@ function So(e6, t5) {
7024
7024
  return { type: e6.type, config: e6.config, setup: e6.setup, get counters() {
7025
7025
  return { ...u4 };
7026
7026
  }, async get(t6) {
7027
- const n7 = l4(t6), s7 = await o5.get(n7), r7 = eo(s7);
7027
+ const n7 = l4(t6), s7 = await o5.get(n7), r7 = io(s7);
7028
7028
  if (void 0 !== r7) {
7029
7029
  if (!("expired" in r7)) return u4.hits++, c3(t6, "hit"), r7.value;
7030
7030
  try {
@@ -7043,7 +7043,7 @@ function So(e6, t5) {
7043
7043
  const r8 = f4(t6, s8);
7044
7044
  if (r8) try {
7045
7045
  const e7 = 1e3 * r8.ttl;
7046
- await o5.set(n7, Qr(s8, e7), e7), u4.populates++;
7046
+ await o5.set(n7, so(s8, e7), e7), u4.populates++;
7047
7047
  } catch (e7) {
7048
7048
  g4("set", t6, e7);
7049
7049
  }
@@ -7058,7 +7058,7 @@ function So(e6, t5) {
7058
7058
  const r7 = f4(t6, n7);
7059
7059
  if (r7) try {
7060
7060
  const e7 = 1e3 * r7.ttl;
7061
- await o5.set(l4(t6), Qr(n7, e7), e7);
7061
+ await o5.set(l4(t6), so(n7, e7), e7);
7062
7062
  } catch (e7) {
7063
7063
  g4("set", t6, e7);
7064
7064
  }
@@ -7079,35 +7079,35 @@ function _o(e6, t5, n6) {
7079
7079
  const o5 = `store.${n6}`, s6 = Dt(t5.get, "StoreGet", e6.hooks, e6.logger), r6 = Dt(t5.set, "StoreSet", e6.hooks, e6.logger), i6 = Dt(t5.delete, "StoreDelete", e6.hooks, e6.logger);
7080
7080
  t5.get = async (t6) => {
7081
7081
  const n7 = Date.now(), r7 = C2(e6, o5, "store", "in", "", n7);
7082
- r7.meta = { op: "get", key: t6 }, Nn(e6, r7);
7082
+ r7.meta = { op: "get", key: t6 }, Ln(e6, r7);
7083
7083
  try {
7084
7084
  const r8 = await s6(t6), i7 = Date.now(), a5 = C2(e6, o5, "store", "out", "", i7);
7085
- return a5.durationMs = i7 - n7, a5.meta = { op: "get", key: t6 }, Nn(e6, a5), r8;
7085
+ return a5.durationMs = i7 - n7, a5.meta = { op: "get", key: t6 }, Ln(e6, a5), r8;
7086
7086
  } catch (s7) {
7087
7087
  const r8 = Date.now(), i7 = C2(e6, o5, "store", "error", "", r8);
7088
- throw i7.durationMs = r8 - n7, i7.meta = { op: "get", key: t6 }, i7.error = x(s7), Nn(e6, i7), s7;
7088
+ throw i7.durationMs = r8 - n7, i7.meta = { op: "get", key: t6 }, i7.error = x(s7), Ln(e6, i7), s7;
7089
7089
  }
7090
7090
  }, t5.set = async (t6, n7, s7) => {
7091
7091
  const i7 = Date.now(), a5 = C2(e6, o5, "store", "in", "", i7);
7092
- a5.meta = { op: "set", key: t6 }, Nn(e6, a5);
7092
+ a5.meta = { op: "set", key: t6 }, Ln(e6, a5);
7093
7093
  try {
7094
7094
  await r6(t6, n7, s7);
7095
7095
  const a6 = Date.now(), c3 = C2(e6, o5, "store", "out", "", a6);
7096
- c3.durationMs = a6 - i7, c3.meta = { op: "set", key: t6 }, Nn(e6, c3);
7096
+ c3.durationMs = a6 - i7, c3.meta = { op: "set", key: t6 }, Ln(e6, c3);
7097
7097
  } catch (n8) {
7098
7098
  const s8 = Date.now(), r7 = C2(e6, o5, "store", "error", "", s8);
7099
- throw r7.durationMs = s8 - i7, r7.meta = { op: "set", key: t6 }, r7.error = x(n8), Nn(e6, r7), n8;
7099
+ throw r7.durationMs = s8 - i7, r7.meta = { op: "set", key: t6 }, r7.error = x(n8), Ln(e6, r7), n8;
7100
7100
  }
7101
7101
  }, t5.delete = async (t6) => {
7102
7102
  const n7 = Date.now(), s7 = C2(e6, o5, "store", "in", "", n7);
7103
- s7.meta = { op: "delete", key: t6 }, Nn(e6, s7);
7103
+ s7.meta = { op: "delete", key: t6 }, Ln(e6, s7);
7104
7104
  try {
7105
7105
  await i6(t6);
7106
7106
  const s8 = Date.now(), r7 = C2(e6, o5, "store", "out", "", s8);
7107
- r7.durationMs = s8 - n7, r7.meta = { op: "delete", key: t6 }, Nn(e6, r7);
7107
+ r7.durationMs = s8 - n7, r7.meta = { op: "delete", key: t6 }, Ln(e6, r7);
7108
7108
  } catch (s8) {
7109
7109
  const r7 = Date.now(), i7 = C2(e6, o5, "store", "error", "", r7);
7110
- throw i7.durationMs = r7 - n7, i7.meta = { op: "delete", key: t6 }, i7.error = x(s8), Nn(e6, i7), s8;
7110
+ throw i7.durationMs = r7 - n7, i7.meta = { op: "delete", key: t6 }, i7.error = x(s8), Ln(e6, i7), s8;
7111
7111
  }
7112
7112
  };
7113
7113
  }
@@ -7145,14 +7145,14 @@ async function Eo(e6, t5 = {}) {
7145
7145
  let r6, i6;
7146
7146
  void 0 !== s7.store ? (r6 = n6[s7.store], i6 = s7.store) : (n6.__cache || (n6.__cache = wo2()), r6 = n6.__cache, i6 = "__cache");
7147
7147
  const a5 = s7.namespace ?? t6;
7148
- e6.logger.scope("store-cache").scope(t6).info(`store "${t6}" caches with namespace "${a5}:" via ${i6}`), n6[t6] = So(n6[t6], { storeId: t6, cacheConfig: s7, cacheStore: r6, namespace: a5, logger: e6.logger.scope("store-cache").scope(t6), collector: e6 });
7148
+ e6.logger.scope("store-cache").scope(t6).info(`store "${t6}" caches with namespace "${a5}:" via ${i6}`), n6[t6] = So2(n6[t6], { storeId: t6, cacheConfig: s7, cacheStore: r6, namespace: a5, logger: e6.logger.scope("store-cache").scope(t6), collector: e6 });
7149
7149
  }
7150
7150
  for (const [t6, o6] of Object.entries(n6)) "__cache" !== t6 && _o(e6, o6, t6);
7151
7151
  return n6;
7152
7152
  }
7153
7153
  async function qo(e6) {
7154
- const t5 = Re({ globalsStatic: {}, sessionStatic: {}, run: true, queueMax: 1e3 }, e6, { merge: false, extend: false }), n6 = { level: e6.logger?.level, handler: e6.logger?.handler }, o5 = dt(n6), s6 = { ...t5.globalsStatic, ...e6.globals }, r6 = { allowed: false, config: t5, consent: e6.consent || {}, custom: e6.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s6, hooks: e6.hooks || {}, observers: /* @__PURE__ */ new Set(), logger: o5, on: {}, queue: [], preRunQueue: [], round: 0, count: 0, stateVersion: 0, cellVersion: {}, delivery: /* @__PURE__ */ new WeakMap(), session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {}, dropped: {}, connectionErrors: {}, breakers: {} }, timing: Date.now(), user: e6.user || {}, sources: {}, pending: { destinations: {} }, hasShutdown: false, seenEvents: /* @__PURE__ */ new Set(), push: void 0, command: void 0, elb: void 0 };
7155
- void 0 !== e6.name && (r6.name = e6.name), void 0 !== e6.release && (r6.release = e6.release), void 0 !== e6.next && (t5.next = e6.next), r6.push = lo2(r6, (e7) => Kn(r6, e7)), r6.command = (function(e7, t6) {
7154
+ const t5 = Te({ globalsStatic: {}, sessionStatic: {}, run: true, queueMax: 1e3 }, e6, { merge: false, extend: false }), n6 = { level: e6.logger?.level, handler: e6.logger?.handler }, o5 = dt(n6), s6 = { ...t5.globalsStatic, ...e6.globals }, r6 = { allowed: false, config: t5, consent: e6.consent || {}, custom: e6.custom || {}, destinations: {}, transformers: {}, stores: {}, globals: s6, hooks: e6.hooks || {}, observers: /* @__PURE__ */ new Set(), logger: o5, on: {}, queue: [], preRunQueue: [], round: 0, count: 0, stateVersion: 0, cellVersion: {}, delivery: /* @__PURE__ */ new WeakMap(), session: void 0, status: { startedAt: Date.now(), in: 0, out: 0, failed: 0, sources: {}, destinations: {}, dropped: {}, connectionErrors: {}, breakers: {} }, timing: Date.now(), user: e6.user || {}, sources: {}, pending: { destinations: {} }, hasShutdown: false, seenEvents: /* @__PURE__ */ new Set(), push: void 0, command: void 0, elb: void 0 };
7155
+ void 0 !== e6.name && (r6.name = e6.name), void 0 !== e6.release && (r6.release = e6.release), void 0 !== e6.next && (t5.next = e6.next), r6.push = lo(r6, (e7) => Kn(r6, e7)), r6.command = (function(e7, t6) {
7156
7156
  return Dt(async (n7, o6, s7) => await bt(async () => await t6(e7, n7, o6, s7), (t7) => {
7157
7157
  if (t7 instanceof wt) throw t7;
7158
7158
  return e7.status.failed++, e7.logger.error("command failed", { ...ae2(t7), command: n7 }), En({ ok: false });
@@ -7216,14 +7216,14 @@ function Co(e6) {
7216
7216
  try {
7217
7217
  const t5 = Oo.window;
7218
7218
  if (!t5) return;
7219
- t5.localStorage.getItem(tn) === e6 && t5.localStorage.removeItem(tn);
7219
+ t5.localStorage.getItem(nn) === e6 && t5.localStorage.removeItem(nn);
7220
7220
  } catch {
7221
7221
  }
7222
7222
  }
7223
- function xo(e6, t5) {
7223
+ function xo2(e6, t5) {
7224
7224
  return void 0 === t5 ? e6 : (n6) => e6({ ...n6, release: t5 });
7225
7225
  }
7226
- function jo(e6, t5) {
7226
+ function jo2(e6, t5) {
7227
7227
  const n6 = t5.observe;
7228
7228
  if (!n6) return;
7229
7229
  const o5 = e6.name ?? "default";
@@ -7232,55 +7232,55 @@ function jo(e6, t5) {
7232
7232
  const e7 = Oo.window, t7 = Oo.URLSearchParams;
7233
7233
  if (!e7 || !t7) return null;
7234
7234
  try {
7235
- const n7 = new t7(e7.location.search.replace(/^\?/, "")).getAll(tn);
7235
+ const n7 = new t7(e7.location.search.replace(/^\?/, "")).getAll(nn);
7236
7236
  return n7.length > 0 ? n7[n7.length - 1] ?? null : null;
7237
7237
  } catch {
7238
7238
  return null;
7239
7239
  }
7240
7240
  })(), s7 = t6 ?? (function() {
7241
7241
  try {
7242
- return Oo.window?.localStorage.getItem(tn) ?? null;
7242
+ return Oo.window?.localStorage.getItem(nn) ?? null;
7243
7243
  } catch {
7244
7244
  return null;
7245
7245
  }
7246
7246
  })();
7247
7247
  if (!s7) return;
7248
- const r6 = mr(s7);
7248
+ const r6 = wr(s7);
7249
7249
  if (!r6) return void (null === t6 ? (e6.logger.warn("observe: malformed stored credential cleared"), Co(s7)) : e6.logger.warn("observe: malformed credential ignored"));
7250
7250
  if (r6.pb !== n6.binding) return void e6.logger.warn("observe: credential binding mismatch, credential ignored");
7251
7251
  let i6;
7252
7252
  !(function(e7) {
7253
7253
  try {
7254
- Oo.window?.localStorage.setItem(tn, e7);
7254
+ Oo.window?.localStorage.setItem(nn, e7);
7255
7255
  } catch {
7256
7256
  }
7257
7257
  })(s7), null !== t6 && (function() {
7258
7258
  const e7 = Oo.window, t7 = Oo.URLSearchParams;
7259
7259
  if (e7 && t7) try {
7260
7260
  const n7 = e7.location.href, o6 = n7.indexOf("#"), s8 = o6 >= 0 ? n7.slice(o6) : "", r7 = o6 >= 0 ? n7.slice(0, o6) : n7, i7 = r7.indexOf("?"), a6 = i7 >= 0 ? r7.slice(0, i7) : r7, c4 = new t7(i7 >= 0 ? r7.slice(i7 + 1) : "");
7261
- c4.delete(tn);
7261
+ c4.delete(nn);
7262
7262
  const u4 = c4.toString();
7263
7263
  e7.history.replaceState({}, "", `${a6}${u4 ? `?${u4}` : ""}${s8}`);
7264
7264
  } catch {
7265
7265
  }
7266
7266
  })();
7267
- const a5 = Pn({ url: `${n6.url}/ingest/${r6.ses}`, token: r6.secret, headers: { "X-Walkeros-Binding": n6.binding }, onStatus: (t7) => {
7267
+ const a5 = Dn({ url: `${n6.url}/ingest/${r6.ses}`, token: r6.secret, headers: { "X-Walkeros-Binding": n6.binding }, onStatus: (t7) => {
7268
7268
  401 === t7 && (Co(s7), i6 && e6.observers.delete(i6));
7269
7269
  } });
7270
7270
  i6 = Ut(/* @__PURE__ */ (function(e7, t7) {
7271
7271
  return void 0 === t7 ? e7 : (n7) => e7({ ...n7, flowId: t7 });
7272
- })(xo(a5, e6.release), n6.flowId), { flowId: n6.flowId ?? o5, ...void 0 !== n6.level ? { level: n6.level } : {}, ...void 0 !== n6.sample ? { sample: n6.sample } : {} }), e6.observers.add(i6);
7272
+ })(xo2(a5, e6.release), n6.flowId), { flowId: n6.flowId ?? o5, ...void 0 !== n6.level ? { level: n6.level } : {}, ...void 0 !== n6.sample ? { sample: n6.sample } : {} }), e6.observers.add(i6);
7273
7273
  const c3 = n6.level;
7274
7274
  return void (void 0 !== c3 && (e6.observeLevel = () => c3));
7275
7275
  }
7276
7276
  if ("off" === n6.level) return;
7277
7277
  const s6 = n6.level;
7278
- void 0 !== s6 && (e6.observeLevel = () => s6), e6.observers.add(Ut(xo(Pn({ url: `${n6.url}/ingest/${n6.sessionId}`, token: n6.token }), e6.release), { flowId: o5, level: n6.level, sample: n6.sample }));
7278
+ void 0 !== s6 && (e6.observeLevel = () => s6), e6.observers.add(Ut(xo2(Dn({ url: `${n6.url}/ingest/${n6.sessionId}`, token: n6.token }), e6.release), { flowId: o5, level: n6.level, sample: n6.sample }));
7279
7279
  }
7280
7280
  async function Io(e6) {
7281
7281
  const t5 = e6 ?? {}, n6 = await qo(t5);
7282
7282
  if (t5.observers) for (const e7 of t5.observers) n6.observers.add(e7);
7283
- "undefined" == typeof __WALKEROS_OBSERVE__ || __WALKEROS_OBSERVE__ ? jo(n6, t5) : t5.observe && n6.logger.warn("observe: not in this build, config ignored"), await ut(n6, t5.sources || {});
7283
+ "undefined" == typeof __WALKEROS_OBSERVE__ || __WALKEROS_OBSERVE__ ? jo2(n6, t5) : t5.observe && n6.logger.warn("observe: not in this build, config ignored"), await ut(n6, t5.sources || {});
7284
7284
  const { consent: o5, user: s6, globals: r6, custom: i6 } = t5;
7285
7285
  o5 && await n6.command("consent", o5), s6 && await n6.command("user", s6), r6 && await n6.command("globals", r6), i6 && await n6.command("custom", i6), n6.config.run && await n6.command("run");
7286
7286
  let a5 = n6.elb;
@@ -7299,7 +7299,7 @@ import * as r2 from "http";
7299
7299
  import * as s2 from "https";
7300
7300
  import { createHash as n2, createHmac as i2 } from "crypto";
7301
7301
  function a2(a5, n6, i6 = {}) {
7302
- const u4 = Rt(i6.headers), c3 = Tt(n6), d3 = i6.method || "POST", m4 = i6.timeout || 5e3;
7302
+ const u4 = Tt(i6.headers), c3 = Rt(n6), d3 = i6.method || "POST", m4 = i6.timeout || 5e3;
7303
7303
  return new Promise((t5) => {
7304
7304
  const e6 = new URL(a5), n7 = "https:" === e6.protocol ? s2 : r2, i7 = { method: d3, headers: u4 }, p4 = n7.request(e6, i7, (e7) => {
7305
7305
  const r6 = [];
@@ -7907,6 +7907,7 @@ init_dist();
7907
7907
  import esbuild2 from "esbuild";
7908
7908
  import { builtinModules } from "module";
7909
7909
  import path14 from "path";
7910
+ import { fileURLToPath as fileURLToPath2 } from "url";
7910
7911
  import fs14 from "fs-extra";
7911
7912
 
7912
7913
  // src/commands/bundle/config-classifier.ts
@@ -7999,7 +8000,7 @@ function applyStepPackages(flowSettings, packages, logger) {
7999
8000
  const stepPackages = collectAllStepPackages(flowSettings);
8000
8001
  const originalPins = /* @__PURE__ */ new Map();
8001
8002
  const inlineSeen = /* @__PURE__ */ new Map();
8002
- const rewriteSteps = (from, to2) => {
8003
+ const rewriteSteps = (from, to3) => {
8003
8004
  for (const section of [
8004
8005
  "sources",
8005
8006
  "destinations",
@@ -8010,7 +8011,7 @@ function applyStepPackages(flowSettings, packages, logger) {
8010
8011
  if (!steps) continue;
8011
8012
  for (const step of Object.values(steps)) {
8012
8013
  if (step.package === from) {
8013
- step.package = to2;
8014
+ step.package = to3;
8014
8015
  }
8015
8016
  }
8016
8017
  }
@@ -8187,7 +8188,7 @@ async function replaceIncomplete(tmp, dest) {
8187
8188
  await fs9.remove(loser);
8188
8189
  }
8189
8190
  async function writeCacheDir(src, dest, logger, options = {}) {
8190
- const copy = options.copy ?? ((from, to2) => fs9.copy(from, to2));
8191
+ const copy = options.copy ?? ((from, to3) => fs9.copy(from, to3));
8191
8192
  const dir = path9.dirname(dest);
8192
8193
  const tmp = tempSibling(dest);
8193
8194
  try {
@@ -8210,7 +8211,7 @@ async function writeCacheDir(src, dest, logger, options = {}) {
8210
8211
  });
8211
8212
  const label = options.label ?? path9.basename(dest);
8212
8213
  logger.warn(
8213
- `Package cache write failed for ${label}: ${Hn(error)}. The build continues without caching it.`
8214
+ `Package cache write failed for ${label}: ${er(error)}. The build continues without caching it.`
8214
8215
  );
8215
8216
  }
8216
8217
  }
@@ -9573,6 +9574,7 @@ ${dataDeclaration}${needs}`;
9573
9574
  };
9574
9575
  if (buildOptions.platform === "browser") {
9575
9576
  stage2Options.format = "iife";
9577
+ stage2Options.plugins = [cliCorePlugin()];
9576
9578
  stage2Options.define = {
9577
9579
  "process.env.NODE_ENV": '"production"',
9578
9580
  global: "globalThis",
@@ -9740,6 +9742,25 @@ function getNodeExternals() {
9740
9742
  }
9741
9743
  return externals;
9742
9744
  }
9745
+ var CLI_CORE = "walkeros-cli-core";
9746
+ function cliCorePlugin() {
9747
+ const resolveDir = path14.dirname(fileURLToPath2(import.meta.url));
9748
+ return {
9749
+ name: CLI_CORE,
9750
+ setup(build2) {
9751
+ build2.onResolve({ filter: /^@walkeros\/core$/ }, async (args) => {
9752
+ if (args.pluginData === CLI_CORE) return void 0;
9753
+ const resolved = await build2.resolve(args.path, {
9754
+ kind: args.kind,
9755
+ resolveDir,
9756
+ pluginData: CLI_CORE
9757
+ });
9758
+ if (resolved.errors.length > 0) return { errors: resolved.errors };
9759
+ return { path: resolved.path, sideEffects: resolved.sideEffects };
9760
+ });
9761
+ }
9762
+ };
9763
+ }
9743
9764
  async function runNftServerPath(outputPath, flowSettings, buildOptions, tempDir, declaredPackages, logger) {
9744
9765
  const outDir = path14.dirname(outputPath);
9745
9766
  const flowExtraIncludes = [
@@ -9967,13 +9988,13 @@ async function createEntryPoint(flowSettings, buildOptions, packagePaths, logger
9967
9988
  const storeIds = new Set(Object.keys(flowSettings.stores || {}));
9968
9989
  kr(flowSettings, storeIds);
9969
9990
  if (flowSettings.sources)
9970
- wr(flowSettings.sources, "sources");
9991
+ wr2(flowSettings.sources, "sources");
9971
9992
  if (flowSettings.destinations)
9972
- wr(flowSettings.destinations, "destinations");
9993
+ wr2(flowSettings.destinations, "destinations");
9973
9994
  if (flowSettings.transformers)
9974
- wr(flowSettings.transformers, "transformers");
9995
+ wr2(flowSettings.transformers, "transformers");
9975
9996
  if (flowSettings.stores)
9976
- wr(flowSettings.stores, "stores");
9997
+ wr2(flowSettings.stores, "stores");
9977
9998
  const withDev = buildOptions.withDev !== void 0 ? buildOptions.withDev === true : buildOptions.skipWrapper === true;
9978
9999
  const {
9979
10000
  importStatements,
@@ -10095,13 +10116,13 @@ function buildSplitConfigObject(flowSettings, namedImports) {
10095
10116
  return buildSplitStepEntry(section, stepId, codeVar, runtimeProps);
10096
10117
  }
10097
10118
  Object.entries(sources).forEach(([name, source]) => {
10098
- yr("Source", name, source);
10119
+ yr2("Source", name, source);
10099
10120
  });
10100
10121
  Object.entries(destinations).forEach(([name, dest]) => {
10101
- yr("Destination", name, dest);
10122
+ yr2("Destination", name, dest);
10102
10123
  });
10103
10124
  Object.entries(transformers).forEach(([name, transformer]) => {
10104
- yr("Transformer", name, transformer);
10125
+ yr2("Transformer", name, transformer);
10105
10126
  });
10106
10127
  const sourcesEntries = Object.entries(sources).filter(([, source]) => source.package || hasCodeReference(source.code)).map(([key, source]) => buildStepEntry("Source", "sources", key, source));
10107
10128
  const destinationsEntries = Object.entries(destinations).filter(([, dest]) => dest.package || hasCodeReference(dest.code)).map(
@@ -10114,7 +10135,7 @@ function buildSplitConfigObject(flowSettings, namedImports) {
10114
10135
  );
10115
10136
  Object.entries(stores).forEach(([name, store]) => {
10116
10137
  if (store.package || hasCodeReference(store.code)) {
10117
- yr("Store", name, store);
10138
+ yr2("Store", name, store);
10118
10139
  }
10119
10140
  });
10120
10141
  const storesEntries = Object.entries(stores).filter(([, store]) => store.package || hasCodeReference(store.code)).map(([key, store]) => buildStepEntry("Store", "stores", key, store));
@@ -10248,6 +10269,34 @@ function emitObserveAssignment(observe) {
10248
10269
  return `
10249
10270
  config.observe = ${JSON.stringify(literal)};`;
10250
10271
  }
10272
+ var MOIN_IMPORT = "import { moin } from '@walkeros/core';\n";
10273
+ function emitMoinCall(target) {
10274
+ if (!target)
10275
+ return `
10276
+ moin();`;
10277
+ const app = parseHttps(target.app);
10278
+ if (!app || app.origin !== target.app) {
10279
+ throw new Error(
10280
+ `Invalid moin.app "${target.app}". Must be an https origin such as https://app.example.com.`
10281
+ );
10282
+ }
10283
+ const base = parseHttps(target.base);
10284
+ if (!base || base.href !== target.base || base.username || base.password || base.search || base.hash || !base.pathname.endsWith("/")) {
10285
+ throw new Error(
10286
+ `Invalid moin.base "${target.base}". Must be an https URL ending in "/" without query or fragment.`
10287
+ );
10288
+ }
10289
+ return `
10290
+ moin({ app: ${JSON.stringify(target.app)}, base: ${JSON.stringify(target.base)} });`;
10291
+ }
10292
+ function parseHttps(value) {
10293
+ try {
10294
+ const url = new URL(value);
10295
+ return url.protocol === "https:" ? url : void 0;
10296
+ } catch {
10297
+ return void 0;
10298
+ }
10299
+ }
10251
10300
  function generateWebEntry(stage1Path, dataPayload, options = {}) {
10252
10301
  const assignments = [];
10253
10302
  if (options.windowCollector) {
@@ -10269,11 +10318,13 @@ function generateWebEntry(stage1Path, dataPayload, options = {}) {
10269
10318
  }` : "";
10270
10319
  const stage1Specifier = toFileImportSpecifier(stage1Path);
10271
10320
  const observeBlock = options.observe ? emitObserveAssignment(options.observe) : "";
10272
- return `import { startFlow, wireConfig } from '${stage1Specifier}';
10321
+ const loaderImport = platform === "browser" ? MOIN_IMPORT : "";
10322
+ const loaderCall = platform === "browser" ? emitMoinCall() : "";
10323
+ return `${loaderImport}import { startFlow, wireConfig } from '${stage1Specifier}';
10273
10324
 
10274
10325
  const __configData = ${dataPayload};
10275
10326
 
10276
- (async () => {
10327
+ (async () => {${loaderCall}
10277
10328
  const config = wireConfig(__configData);${envBlock}${observeBlock}
10278
10329
  const { collector, elb } = await startFlow(config);${assignmentCode}
10279
10330
  })();`;
@@ -10344,9 +10395,11 @@ ${grantTargets.map((key) => {
10344
10395
  }` : "";
10345
10396
  const stage1Specifier = toFileImportSpecifier(stage1Path);
10346
10397
  const observeBlock = options.observe ? emitObserveAssignment(options.observe) : "";
10347
- return `${previewImport}import { startFlow, wireConfig, __configData } from '${stage1Specifier}';
10398
+ const loaderImport = platform === "browser" ? MOIN_IMPORT : "";
10399
+ const loaderCall = platform === "browser" ? emitMoinCall(options.moin) : "";
10400
+ return `${loaderImport}${previewImport}import { startFlow, wireConfig, __configData } from '${stage1Specifier}';
10348
10401
 
10349
- (async () => {${previewBlock}
10402
+ (async () => {${loaderCall}${previewBlock}
10350
10403
  const config = wireConfig(__configData);${envBlock}${previewGrantBlock}${observeBlock}
10351
10404
  const { collector, elb } = await startFlow(config);${assignmentCode}
10352
10405
  })();`;
@@ -10636,7 +10689,7 @@ async function runBundleCoreWithArchive(flowSettings, buildOptions, logger, show
10636
10689
  }
10637
10690
  }
10638
10691
  async function bundleCommand(options) {
10639
- const timer = Bn();
10692
+ const timer = Qn();
10640
10693
  timer.start();
10641
10694
  const writingToStdout = !options.output;
10642
10695
  const logger = createCLILogger({
@@ -10742,7 +10795,7 @@ async function bundleCommand(options) {
10742
10795
  }
10743
10796
  }
10744
10797
  } catch (error) {
10745
- const errorMessage = Hn(error);
10798
+ const errorMessage = er(error);
10746
10799
  results.push({ flowName, success: false, error: errorMessage });
10747
10800
  if (!options.all) {
10748
10801
  throw error;
@@ -10787,7 +10840,7 @@ Build Summary: ${successCount}/${results.length} succeeded`
10787
10840
  process.exit(0);
10788
10841
  } catch (error) {
10789
10842
  const duration = timer.getElapsed();
10790
- const errorMessage = Hn(error);
10843
+ const errorMessage = er(error);
10791
10844
  if (options.json) {
10792
10845
  const jsonError = createErrorOutput(errorMessage, duration);
10793
10846
  await writeResult(JSON.stringify(jsonError, null, 2) + "\n", {
@@ -10912,6 +10965,7 @@ var BuildWrapOptionsSchema = i4.object({
10912
10965
  level: i4.enum(["off", "standard", "trace"]).optional(),
10913
10966
  sample: i4.number().min(0).max(1).optional()
10914
10967
  }).strict().optional(),
10968
+ moin: i4.object({ app: i4.string(), base: i4.string() }).strict().optional().describe("Tag Mode loader target; absent, the production app"),
10915
10969
  minify: i4.boolean().optional(),
10916
10970
  minifyOptions: i4.object({
10917
10971
  identifiers: i4.boolean().optional(),
@@ -11010,7 +11064,7 @@ var BuildResultSchema = i4.object({
11010
11064
  // src/commands/bundle/wrap.ts
11011
11065
  init_define_CLIENT_OPERATION_DIGESTS();
11012
11066
  import * as path16 from "path";
11013
- import { fileURLToPath as fileURLToPath2 } from "url";
11067
+ import { fileURLToPath as fileURLToPath3 } from "url";
11014
11068
  import fs17 from "fs-extra";
11015
11069
  import * as esbuild3 from "esbuild";
11016
11070
  function extractDevExternals(skeletonText) {
@@ -11023,7 +11077,7 @@ function extractDevExternals(skeletonText) {
11023
11077
  return Array.from(found);
11024
11078
  }
11025
11079
  function getNodeResolutionPaths() {
11026
- const here = path16.dirname(fileURLToPath2(import.meta.url));
11080
+ const here = path16.dirname(fileURLToPath3(import.meta.url));
11027
11081
  const candidates = [];
11028
11082
  let dir = here;
11029
11083
  for (let i6 = 0; i6 < 8; i6++) {
@@ -11068,7 +11122,8 @@ async function wrapSkeleton(options) {
11068
11122
  ...options.preview ? { preview: options.preview } : {},
11069
11123
  ...options.previewGrantTargets ? { previewGrantTargets: options.previewGrantTargets } : {},
11070
11124
  platform,
11071
- ...options.observe ? { observe: options.observe } : {}
11125
+ ...options.observe ? { observe: options.observe } : {},
11126
+ ...options.moin ? { moin: options.moin } : {}
11072
11127
  }) : generateWrapEntryServer(absoluteSkeletonPath);
11073
11128
  const entryDir = await tmpRunDir("wrap");
11074
11129
  const entryPath = path16.join(entryDir, "flow.mjs");
@@ -11100,6 +11155,7 @@ async function wrapSkeleton(options) {
11100
11155
  };
11101
11156
  if (platform === "browser") {
11102
11157
  esbuildOptions.format = "iife";
11158
+ esbuildOptions.plugins = [cliCorePlugin()];
11103
11159
  const needs = readNeedsMarker(skeletonText);
11104
11160
  esbuildOptions.define = {
11105
11161
  "process.env.NODE_ENV": '"production"',
@@ -11280,7 +11336,7 @@ async function put(url, body, contentType, headers, retry) {
11280
11336
  { ...retry, label: "Upload", timeoutMs: 6e4 }
11281
11337
  );
11282
11338
  } catch (error) {
11283
- throw new BuildError("UPLOAD_FAILED", Hn(error));
11339
+ throw new BuildError("UPLOAD_FAILED", er(error));
11284
11340
  }
11285
11341
  }
11286
11342
  async function download(url, dest, retry) {
@@ -11292,7 +11348,7 @@ async function download(url, dest, retry) {
11292
11348
  { ...retry, label: "Skeleton download", timeoutMs: 6e4 }
11293
11349
  );
11294
11350
  } catch (error) {
11295
- throw new BuildError("BUILD_FAILED", Hn(error));
11351
+ throw new BuildError("BUILD_FAILED", er(error));
11296
11352
  }
11297
11353
  await fs18.writeFile(dest, Buffer.from(await response.arrayBuffer()));
11298
11354
  }
@@ -11346,7 +11402,7 @@ async function runBuildManifest(source, retry = {}) {
11346
11402
  try {
11347
11403
  raw = await readManifestSource(source, retry);
11348
11404
  } catch (error) {
11349
- fail("INVALID_MANIFEST", Hn(error));
11405
+ fail("INVALID_MANIFEST", er(error));
11350
11406
  return { result, reported: false };
11351
11407
  }
11352
11408
  const parsed = BuildManifestSchema.safeParse(raw);
@@ -11382,7 +11438,7 @@ async function runBuildManifest(source, retry = {}) {
11382
11438
  });
11383
11439
  assertNoLocalPaths(loaded);
11384
11440
  } catch (error) {
11385
- fail(classify(error, "config"), Hn(error));
11441
+ fail(classify(error, "config"), er(error));
11386
11442
  return {
11387
11443
  result,
11388
11444
  reported: await report(manifest.resultPutUrl, result)
@@ -11419,7 +11475,7 @@ async function runBuildManifest(source, retry = {}) {
11419
11475
  } catch (error) {
11420
11476
  fail(
11421
11477
  classify(error, "build"),
11422
- Hn(error),
11478
+ er(error),
11423
11479
  artifact.outputName
11424
11480
  );
11425
11481
  return {
@@ -11474,7 +11530,7 @@ async function bundleManifestCommand(options) {
11474
11530
  try {
11475
11531
  source = resolveManifestSource(options.manifest);
11476
11532
  } catch (error) {
11477
- logger.error(`Error: ${Hn(error)}`);
11533
+ logger.error(`Error: ${er(error)}`);
11478
11534
  process.exit(1);
11479
11535
  }
11480
11536
  const { result, reported } = await runBuildManifest(source, {
@@ -11903,7 +11959,7 @@ function defaultPushError(error, startTime) {
11903
11959
  return {
11904
11960
  success: false,
11905
11961
  duration: Date.now() - startTime,
11906
- error: Hn(error)
11962
+ error: er(error)
11907
11963
  };
11908
11964
  }
11909
11965
  async function withFlowContext(options, fn3, onError) {
@@ -12177,7 +12233,7 @@ function hasEvent(entry) {
12177
12233
  return entry.event != null;
12178
12234
  }
12179
12235
  function toError(error) {
12180
- return error instanceof Error ? error : new Error(Hn(error));
12236
+ return error instanceof Error ? error : new Error(er(error));
12181
12237
  }
12182
12238
  function buildSimulationResult(args) {
12183
12239
  const { step, name, startTime, captured, usage, mappingKey, skipped, error } = args;
@@ -12487,7 +12543,7 @@ async function runPush(options, loaded) {
12487
12543
  return {
12488
12544
  success: false,
12489
12545
  duration: Date.now() - startTime,
12490
- error: Hn(error)
12546
+ error: er(error)
12491
12547
  };
12492
12548
  }
12493
12549
  }
@@ -12704,7 +12760,7 @@ async function pushCore(inputPath, event, options = {}) {
12704
12760
  return {
12705
12761
  success: false,
12706
12762
  duration: Date.now() - startTime,
12707
- error: Hn(error)
12763
+ error: er(error)
12708
12764
  };
12709
12765
  } finally {
12710
12766
  if (tempDir) {
@@ -13180,7 +13236,7 @@ async function simulateSource(configOrPath, input, options) {
13180
13236
  }
13181
13237
  }
13182
13238
  async function runTransformerSimulation(collector, transformerId, event, ingest) {
13183
- const result = await Ze2(
13239
+ const result = await Ze(
13184
13240
  collector,
13185
13241
  collector.transformers,
13186
13242
  transformerId,
@@ -13341,7 +13397,7 @@ async function simulateTransformer(configOrPath, event, options) {
13341
13397
  }
13342
13398
  }
13343
13399
  async function runCollectorSimulation(collector, event, ingest = I("collector")) {
13344
- const enriched = Vn(collector, event);
13400
+ const enriched = Vn2(collector, event);
13345
13401
  const result = await Qn2(collector, enriched, { ingest });
13346
13402
  return result.copies.map((copy) => copy.event);
13347
13403
  }
@@ -13703,7 +13759,7 @@ init_output();
13703
13759
  // src/core/step-loader.ts
13704
13760
  init_define_CLIENT_OPERATION_DIGESTS();
13705
13761
  import path21 from "path";
13706
- import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath3 } from "url";
13762
+ import { pathToFileURL as pathToFileURL2, fileURLToPath as fileURLToPath4 } from "url";
13707
13763
  import { execFile } from "child_process";
13708
13764
  import { promisify } from "util";
13709
13765
  import fs21 from "fs-extra";
@@ -13774,7 +13830,7 @@ async function resolvePackageEntry(packageDir, packageName) {
13774
13830
  } finally {
13775
13831
  await fs21.remove(probePath).catch(() => void 0);
13776
13832
  }
13777
- const entryAbs = fileURLToPath3(entryUrl);
13833
+ const entryAbs = fileURLToPath4(entryUrl);
13778
13834
  const entryRel = path21.relative(packageDir, entryAbs);
13779
13835
  if (entryAbs.endsWith(".ts") || entryAbs.endsWith(".tsx")) {
13780
13836
  throw new Error(
@@ -15244,14 +15300,14 @@ Known schemas:
15244
15300
  if ($uniqueItems) {
15245
15301
  for (let j4 = 0; j4 < length; j4++) {
15246
15302
  const a5 = instance[j4];
15247
- const ao3 = typeof a5 === "object" && a5 !== null;
15303
+ const ao2 = typeof a5 === "object" && a5 !== null;
15248
15304
  for (let k4 = 0; k4 < length; k4++) {
15249
15305
  if (j4 === k4) {
15250
15306
  continue;
15251
15307
  }
15252
15308
  const b4 = instance[k4];
15253
15309
  const bo3 = typeof b4 === "object" && b4 !== null;
15254
- if (a5 === b4 || ao3 && bo3 && deepCompareStrict(a5, b4)) {
15310
+ if (a5 === b4 || ao2 && bo3 && deepCompareStrict(a5, b4)) {
15255
15311
  errors.push({
15256
15312
  instanceLocation,
15257
15313
  keyword: "uniqueItems",
@@ -15617,7 +15673,7 @@ function resolveFlow2(file, name) {
15617
15673
  ok: false,
15618
15674
  error: {
15619
15675
  path: `flows.${name}`,
15620
- message: Hn(error),
15676
+ message: er(error),
15621
15677
  code: resolutionCode(error)
15622
15678
  }
15623
15679
  };
@@ -15635,7 +15691,7 @@ init_dist();
15635
15691
  import * as fs23 from "fs";
15636
15692
  import * as path22 from "path";
15637
15693
  import Ajv from "ajv";
15638
- var CLIENT_HEADER = "walkeros-cli/4.8.0";
15694
+ var CLIENT_HEADER = "walkeros-cli/4.8.1-next-1791586788897";
15639
15695
  function createSettingsContext(configDir) {
15640
15696
  return { configDir, cache: /* @__PURE__ */ new Map(), compiled: /* @__PURE__ */ new Map() };
15641
15697
  }
@@ -15787,7 +15843,7 @@ async function loadSchema(source, context2) {
15787
15843
  );
15788
15844
  return readLocalSchema(source, configDir);
15789
15845
  }
15790
- const info = await Gn(source.name, {
15846
+ const info = await nr(source.name, {
15791
15847
  ...source.version ? { version: source.version } : {},
15792
15848
  client: CLIENT_HEADER
15793
15849
  });
@@ -15804,7 +15860,7 @@ function compileSettings(settings) {
15804
15860
  try {
15805
15861
  return { ok: true, validate: ajv.compile(settings) };
15806
15862
  } catch (error) {
15807
- return { ok: false, message: Hn(error) };
15863
+ return { ok: false, message: er(error) };
15808
15864
  }
15809
15865
  }
15810
15866
  function sourceKey(source) {
@@ -15847,7 +15903,7 @@ async function checkStepSettings(target, resolvedFlow, rawFlow, check, context2)
15847
15903
  outcome.skipped.push({
15848
15904
  path: at4,
15849
15905
  check,
15850
- reason: `Schema for ${source.name}${source.version ? `@${source.version}` : ""} could not be loaded: ${Hn(error)}`,
15906
+ reason: `Schema for ${source.name}${source.version ? `@${source.version}` : ""} could not be loaded: ${er(error)}`,
15851
15907
  code: "SCHEMA_UNAVAILABLE"
15852
15908
  });
15853
15909
  return outcome;
@@ -16287,7 +16343,7 @@ function checkResolvedWindowCollector(name, raw, flow, errors, deferred) {
16287
16343
  deferred.push({ path: path25, reference: written });
16288
16344
  return;
16289
16345
  }
16290
- const check = Wn(value);
16346
+ const check = Hn(value);
16291
16347
  if (check.ok) return;
16292
16348
  errors.push({
16293
16349
  path: path25,
@@ -16309,7 +16365,7 @@ function unknownStepKeys(step, kind) {
16309
16365
  function routeTargets(spec) {
16310
16366
  if (spec === void 0) return [];
16311
16367
  const targets = /* @__PURE__ */ new Set();
16312
- for (const node of Gr(spec)) {
16368
+ for (const node of no(spec)) {
16313
16369
  for (const target of node.targets) targets.add(target);
16314
16370
  }
16315
16371
  return [...targets];
@@ -16471,7 +16527,7 @@ function lintRoute(spec, position, known, errors, warnings) {
16471
16527
  reported.add(key);
16472
16528
  return true;
16473
16529
  };
16474
- for (const node of Gr(spec)) {
16530
+ for (const node of no(spec)) {
16475
16531
  for (const target of node.targets) {
16476
16532
  if (known.has(target) || !once(`unknown:${target}`)) continue;
16477
16533
  errors.push({
@@ -16554,7 +16610,7 @@ function resolveStepContracts(entries, contract) {
16554
16610
  sources.push(entry);
16555
16611
  continue;
16556
16612
  }
16557
- const match = typeof entry === "string" ? entry.match(V) : null;
16613
+ const match = typeof entry === "string" ? entry.match(Z) : null;
16558
16614
  if (!match)
16559
16615
  return {
16560
16616
  ok: false,
@@ -16995,7 +17051,7 @@ async function validateCommand(options) {
16995
17051
  await writeResult(formatted + "\n", { output: options.output });
16996
17052
  }
16997
17053
  } catch (error) {
16998
- const errorMessage = Hn(error);
17054
+ const errorMessage = er(error);
16999
17055
  if (options.json) {
17000
17056
  const errorOutput = JSON.stringify(
17001
17057
  {