@walkeros/cli 4.7.2 → 4.8.0-next-1791496487198

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
@@ -13,7 +13,7 @@ var __export = (target, all) => {
13
13
  var define_CLIENT_OPERATION_DIGESTS_default;
14
14
  var init_define_CLIENT_OPERATION_DIGESTS = __esm({
15
15
  "<define:__CLIENT_OPERATION_DIGESTS__>"() {
16
- define_CLIENT_OPERATION_DIGESTS_default = [{ op: "GET /api/auth/whoami", usedBy: ["mcp auth", "walkeros auth login", "walkeros auth whoami"], digest: "f8287550f3ac65aa5b290875220f06dd3f48d607ed489b9f0a8f704d3f8f5cfd" }, { op: "POST /api/feedback", usedBy: ["mcp feedback", "walkeros feedback"], digest: "7417108c6ea8d60904b715dfedc1d8b9b597834f7d427df6b9226b36e5eef963" }, { op: "GET /api/health", usedBy: ["mcp diagnostics", "walkeros diagnostics"], digest: "2b3c0883edf4048aca77f4222247929b9045db33d06729502cb5021929d04156" }, { op: "POST /api/oauth/device_authorization", usedBy: ["mcp auth", "walkeros auth login"], digest: "a3e744775b93e7f50ea4021f8a027e656bb90e6f2358c65a35e4c45e16ac3fdd" }, { op: "POST /api/oauth/revoke", usedBy: ["mcp auth", "walkeros auth logout"], digest: "dbc453faaaa748d1129473ccda7b26a4e3267d67c25a8a9fc1da0068837fe154" }, { op: "POST /api/oauth/token", usedBy: ["@walkeros/cli resolveAccessToken", "mcp auth", "walkeros auth login"], digest: "16f5a3146c0a3fff703122a5ff25446bad07a6c37069a9e9a6db6925daa036a0" }, { op: "GET /api/openapi.json", usedBy: ["mcp diagnostics", "mcp resource walkeros://reference/openapi", "walkeros diagnostics"], digest: "dbf34e575af8f757d9a0f967c4565968d1a2d64b57a717fc65c8f81692099f0a" }, { op: "GET /api/packages", usedBy: ["mcp package_search", "mcp resource walkeros://reference/packages", "mcp resource walkeros://schema/{packageName}"], digest: "d9c713eea791e8bae3c606bcd1f0209db2c7050a39b18e96f7d913b7d0752e19" }, { op: "GET /api/projects", usedBy: ["mcp flow_manage", "mcp project_manage", "walkeros projects list"], digest: "1e65fca4cb31ccfc10b9835595ac4ee1f69bd6da14127bcc31d62616dfba7281" }, { op: "POST /api/projects", usedBy: ["mcp project_manage", "walkeros projects create"], digest: "3ab6d76c78d4433f0e0ab85a0a23753c7065bc232bfb30b7cee616a3aef8bec5" }, { op: "DELETE /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects delete"], digest: "9f725b18812327c57cfbf8d8ed0139353c60ed2eb34024618e1760c2765889ca" }, { op: "GET /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects get"], digest: "535d11026c7b7ff3b59512c0f68ddeb4e73104d4adab143351c7f9fa1ece6e78" }, { op: "PATCH /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects update"], digest: "d15d7756dae06372328b43891a89dc839e6eb8587896d19999ff49ec8aa1d19b" }, { op: "GET /api/projects/{projectId}/deployments", usedBy: ["mcp deploy_manage", "walkeros deploy list"], digest: "2b3cc07e4cf1f739f7321b5bf157b91ac300205286a48c4f29dd11269d00f2c0" }, { op: "POST /api/projects/{projectId}/deployments", usedBy: ["walkeros deploy create"], digest: "fa0bcad018a21213f473bd058ef90975b50fd3f978340e36c61acf1d609bab95" }, { op: "DELETE /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy delete"], digest: "ce119e1743ecfdda590f7fae6bfc5a094c387efcbdaac6eaf9b2b7b0fffac58e" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy status"], digest: "089bd54697005003c9fb256f853dad2e4431d62cbaa2805d311c6837e498ba2b" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}/stream", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "cf27b0c148cfeb3b772f150a9de0359540643b3eeaff8dc373cb865557e24a82" }, { op: "GET /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows list"], digest: "ecb58ddbde3808a161bee04d333d4e976e86f46505bacc6d571050a45c6c9ee8" }, { op: "POST /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows create"], digest: "bcae723b986165cab63933eda1814a9da984cdfada8fe1a0c9cc01d4554d8372" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows delete"], digest: "1f164466f6b6058b79e787b0234b42d61274431dd6e29cb8acc23c2706218278" }, { op: "GET /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp deploy_manage", "mcp flow_bundle", "mcp flow_load", "mcp flow_manage", "mcp flow_simulate", "mcp observe_session", "walkeros deploy create", "walkeros deploy start", "walkeros flows get", "walkeros observe start", "walkeros previews create"], digest: "a8fc246e9b179a7becce56221be27aae649f471aebb639eda34b215c926f21dd" }, { op: "PATCH /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows update"], digest: "f9e59060ab31184a3b5906c3346479616101f7793c7a00c35649f08d2f5d6a32" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "8d9229fc0d884a75b1faf06877494e4dd5fa8c77affc7a7bb58d559fbd0c8646" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "ea6922423f14dde427cf37f13f07e3f5f783358ff23fd7464925da068838068e" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/duplicate", usedBy: ["mcp flow_manage", "walkeros flows duplicate"], digest: "b9111138d427419eea46ed590a301373a4c641b19d90ab1566891f5aaaadc231" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/journeys", usedBy: ["mcp flow_manage", "mcp observe_journeys", "mcp observe_session"], digest: "78377e4a5b4b1e4dce9f94813bd3484e78b9520e57c712f963ef98c42516b01c" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "5620b4826736b3aff1c80412d9861d5286304957df59d241e9adff6d101bb032" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session"], digest: "9bdc90811f98a22030ee33bb24e2f270b64733b81e3e4dd3d16cd00620dafb44" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "ab5e8a2b908391c701c9e0b73813f1eb3bfa5b2a82e82b7009b2559467352491" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/heartbeat", usedBy: ["walkeros observe start"], digest: "2b0b74a466c643aac87226c8154a530ce55deb5409a4fb65a4ef9b8aa182cbc7" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews list"], digest: "ef72ef8b90676c59c626763f120d6a81910b29e4384f0ac8174f7e12420007c2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "7239dc554d11983386108825087aa45eb4d0bd38eae87dbac376e68e724c6a8f" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews delete"], digest: "de9be2358920517321c4e2c59c9ce59f174be0382596037ce36f987233689e51" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews get"], digest: "4dbaa7000600aa12d45388511192dabdcd910fad9acedd802fdc68efea4e7bc7" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews/{previewId}/grant", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "4cf5c7ea9363935bd978f858e4bb058c6dd64bb2763cefac9ce07da248605e7f" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases", usedBy: ["mcp hub_manage"], digest: "c6ac90c93e07429b53c506292ceda03bfb8873686db76e422f5eed4638f4bee7" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/releases/annotations", usedBy: ["mcp hub_manage"], digest: "084f638f024a578ab2f401839f10f9554e6d2100ba7d67f1ab2be560616bd044" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/step-history", usedBy: ["mcp hub_manage"], digest: "a0d051814f7e8cc39e00592c16bc92a1afae0b58cd71b9b98ab6c85da4dd04e4" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/{versionId}", usedBy: ["mcp hub_manage"], digest: "d429b1564ca64148c5844e799c5dafc5d864fcf94df62f51174c3825db6a3463" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "19629983472c4e46b6c97fc8700b35549f38725fd4d7a5f59ddacd6a7bcfc8f2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "b9407ce8584d147f84acf2562f1eb7c63c35e7ed93bd275d8c3c2ba3c4a1a8e3" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets/values", usedBy: ["runner"], digest: "0c02c86b0576047e8d986c2829212fef4e7eea5791250188619244bfbcdfb4aa" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "b744bcdb73b204d9aa4e4d3f846552a4154601df27c4fe18045bdb8a09624b84" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "5b94004e066746ee7a83b90477db9d2a343361705c2e158df85d74e47085a46a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "0ad85a2494f22e9863362a7137d721d970b87ff60fdb41727a76cb4f590c83bc" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "b6506c543c7e755592b5a6671016c4bae3b3e41cd76c28852297413e1a412e46" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "ae0b8185fa74ba12d99eedacedb53e5801d7485cdf7b1c382334371454f8c323" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "0ee52914274f52641a08b4c2d9da774c971d214929b43abee85d5e657b209144" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads/{threadId}/messages", usedBy: ["mcp hub_manage"], digest: "28d8e964962b03c016c909111be0ce570df9bf43f89f0ab1c74b6dd65503eec1" }, { op: "GET /api/projects/{projectId}/frames", usedBy: ["mcp frame_manage"], digest: "c1cecd6354a7071418e709ecbf925a6ae14bb0099459bac786f35877108e29fd" }, { op: "GET /api/projects/{projectId}/frames/{frameId}", usedBy: ["mcp frame_manage"], digest: "98e3373cb23c9851280c505239ff960088d89bea9d922787da812bd7a59d104e" }, { op: "GET /api/projects/{projectId}/knowledge", usedBy: ["mcp hub_manage"], digest: "ca52e4593757c4fede25c41c3bb95e9a3b7476106549752b756860fc35abd1f1" }, { op: "POST /api/projects/{projectId}/runners/heartbeat", usedBy: ["runner"], digest: "96546fffffb32b66db7c5238daa2ba8f549d976f5ffcab2befa639e2eb1df0e1" }, { op: "POST /api/telemetry", usedBy: ["@walkeros/cli telemetry"], digest: "d119e16315ff9df09160d8b36ebc78dec089cb2a726f4a8fd77ff5b693999667" }];
16
+ define_CLIENT_OPERATION_DIGESTS_default = [{ op: "GET /api/auth/whoami", usedBy: ["mcp auth", "walkeros auth login", "walkeros auth whoami"], digest: "f8287550f3ac65aa5b290875220f06dd3f48d607ed489b9f0a8f704d3f8f5cfd" }, { op: "POST /api/feedback", usedBy: ["mcp feedback", "walkeros feedback"], digest: "7417108c6ea8d60904b715dfedc1d8b9b597834f7d427df6b9226b36e5eef963" }, { op: "GET /api/health", usedBy: ["mcp diagnostics", "walkeros diagnostics"], digest: "2b3c0883edf4048aca77f4222247929b9045db33d06729502cb5021929d04156" }, { op: "POST /api/oauth/device_authorization", usedBy: ["mcp auth", "walkeros auth login"], digest: "a3e744775b93e7f50ea4021f8a027e656bb90e6f2358c65a35e4c45e16ac3fdd" }, { op: "POST /api/oauth/revoke", usedBy: ["mcp auth", "walkeros auth logout"], digest: "dbc453faaaa748d1129473ccda7b26a4e3267d67c25a8a9fc1da0068837fe154" }, { op: "POST /api/oauth/token", usedBy: ["@walkeros/cli resolveAccessToken", "mcp auth", "walkeros auth login"], digest: "16f5a3146c0a3fff703122a5ff25446bad07a6c37069a9e9a6db6925daa036a0" }, { op: "GET /api/openapi.json", usedBy: ["mcp diagnostics", "mcp resource walkeros://reference/openapi", "walkeros diagnostics"], digest: "dbf34e575af8f757d9a0f967c4565968d1a2d64b57a717fc65c8f81692099f0a" }, { op: "GET /api/packages", usedBy: ["mcp package_search", "mcp resource walkeros://reference/packages", "mcp resource walkeros://schema/{packageName}"], digest: "d9c713eea791e8bae3c606bcd1f0209db2c7050a39b18e96f7d913b7d0752e19" }, { op: "GET /api/projects", usedBy: ["mcp flow_manage", "mcp project_manage", "walkeros projects list"], digest: "1e65fca4cb31ccfc10b9835595ac4ee1f69bd6da14127bcc31d62616dfba7281" }, { op: "POST /api/projects", usedBy: ["mcp project_manage", "walkeros projects create"], digest: "3ab6d76c78d4433f0e0ab85a0a23753c7065bc232bfb30b7cee616a3aef8bec5" }, { op: "DELETE /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects delete"], digest: "9f725b18812327c57cfbf8d8ed0139353c60ed2eb34024618e1760c2765889ca" }, { op: "GET /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects get"], digest: "535d11026c7b7ff3b59512c0f68ddeb4e73104d4adab143351c7f9fa1ece6e78" }, { op: "PATCH /api/projects/{projectId}", usedBy: ["mcp project_manage", "walkeros projects update"], digest: "d15d7756dae06372328b43891a89dc839e6eb8587896d19999ff49ec8aa1d19b" }, { op: "GET /api/projects/{projectId}/deployments", usedBy: ["mcp deploy_manage", "walkeros deploy list"], digest: "2b3cc07e4cf1f739f7321b5bf157b91ac300205286a48c4f29dd11269d00f2c0" }, { op: "POST /api/projects/{projectId}/deployments", usedBy: ["walkeros deploy create"], digest: "fa0bcad018a21213f473bd058ef90975b50fd3f978340e36c61acf1d609bab95" }, { op: "DELETE /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy delete"], digest: "ce119e1743ecfdda590f7fae6bfc5a094c387efcbdaac6eaf9b2b7b0fffac58e" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}", usedBy: ["mcp deploy_manage", "walkeros deploy status"], digest: "089bd54697005003c9fb256f853dad2e4431d62cbaa2805d311c6837e498ba2b" }, { op: "GET /api/projects/{projectId}/deployments/{deploymentId}/stream", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "cf27b0c148cfeb3b772f150a9de0359540643b3eeaff8dc373cb865557e24a82" }, { op: "GET /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows list"], digest: "ecb58ddbde3808a161bee04d333d4e976e86f46505bacc6d571050a45c6c9ee8" }, { op: "POST /api/projects/{projectId}/flows", usedBy: ["mcp flow_manage", "walkeros flows create"], digest: "bcae723b986165cab63933eda1814a9da984cdfada8fe1a0c9cc01d4554d8372" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows delete"], digest: "1f164466f6b6058b79e787b0234b42d61274431dd6e29cb8acc23c2706218278" }, { op: "GET /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp deploy_manage", "mcp flow_bundle", "mcp flow_load", "mcp flow_manage", "mcp flow_simulate", "mcp observe_session", "walkeros deploy create", "walkeros deploy start", "walkeros flows get", "walkeros observe start", "walkeros previews create"], digest: "a8fc246e9b179a7becce56221be27aae649f471aebb639eda34b215c926f21dd" }, { op: "PATCH /api/projects/{projectId}/flows/{flowId}", usedBy: ["mcp flow_manage", "walkeros flows update"], digest: "f9e59060ab31184a3b5906c3346479616101f7793c7a00c35649f08d2f5d6a32" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "8d9229fc0d884a75b1faf06877494e4dd5fa8c77affc7a7bb58d559fbd0c8646" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "ea6922423f14dde427cf37f13f07e3f5f783358ff23fd7464925da068838068e" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/duplicate", usedBy: ["mcp flow_manage", "walkeros flows duplicate"], digest: "b9111138d427419eea46ed590a301373a4c641b19d90ab1566891f5aaaadc231" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/frames", usedBy: ["mcp frame_manage"], digest: "b8027522be3c0cf725ce3b02b7029102846b4a6a7ada10c0d8edac31f59c2a0a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/frames/{frameId}", usedBy: ["mcp frame_manage"], digest: "5439af00498b5bc23363b11dbe362ea058ff0b9ef04b00c4a96be03208787cfd" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/journeys", usedBy: ["mcp flow_manage", "mcp observe_journeys", "mcp observe_session"], digest: "78377e4a5b4b1e4dce9f94813bd3484e78b9520e57c712f963ef98c42516b01c" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "5620b4826736b3aff1c80412d9861d5286304957df59d241e9adff6d101bb032" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session"], digest: "9bdc90811f98a22030ee33bb24e2f270b64733b81e3e4dd3d16cd00620dafb44" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}", usedBy: ["mcp observe_session", "walkeros observe start"], digest: "ab5e8a2b908391c701c9e0b73813f1eb3bfa5b2a82e82b7009b2559467352491" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/observe-sessions/{sessionId}/heartbeat", usedBy: ["walkeros observe start"], digest: "2b0b74a466c643aac87226c8154a530ce55deb5409a4fb65a4ef9b8aa182cbc7" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews list"], digest: "ef72ef8b90676c59c626763f120d6a81910b29e4384f0ac8174f7e12420007c2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "7239dc554d11983386108825087aa45eb4d0bd38eae87dbac376e68e724c6a8f" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews delete"], digest: "de9be2358920517321c4e2c59c9ce59f174be0382596037ce36f987233689e51" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/previews/{previewId}", usedBy: ["mcp flow_manage", "walkeros previews get"], digest: "4dbaa7000600aa12d45388511192dabdcd910fad9acedd802fdc68efea4e7bc7" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/previews/{previewId}/grant", usedBy: ["mcp flow_manage", "walkeros previews create"], digest: "4cf5c7ea9363935bd978f858e4bb058c6dd64bb2763cefac9ce07da248605e7f" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases", usedBy: ["mcp hub_manage"], digest: "c6ac90c93e07429b53c506292ceda03bfb8873686db76e422f5eed4638f4bee7" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/releases/annotations", usedBy: ["mcp hub_manage"], digest: "084f638f024a578ab2f401839f10f9554e6d2100ba7d67f1ab2be560616bd044" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/step-history", usedBy: ["mcp hub_manage"], digest: "a0d051814f7e8cc39e00592c16bc92a1afae0b58cd71b9b98ab6c85da4dd04e4" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/releases/{versionId}", usedBy: ["mcp hub_manage"], digest: "d429b1564ca64148c5844e799c5dafc5d864fcf94df62f51174c3825db6a3463" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "19629983472c4e46b6c97fc8700b35549f38725fd4d7a5f59ddacd6a7bcfc8f2" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/secrets", usedBy: ["mcp secret_manage"], digest: "b9407ce8584d147f84acf2562f1eb7c63c35e7ed93bd275d8c3c2ba3c4a1a8e3" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/secrets/values", usedBy: ["runner"], digest: "0c02c86b0576047e8d986c2829212fef4e7eea5791250188619244bfbcdfb4aa" }, { op: "DELETE /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "b744bcdb73b204d9aa4e4d3f846552a4154601df27c4fe18045bdb8a09624b84" }, { op: "PUT /api/projects/{projectId}/flows/{flowId}/secrets/{secretId}", usedBy: ["mcp secret_manage"], digest: "5b94004e066746ee7a83b90477db9d2a343361705c2e158df85d74e47085a46a" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["@walkeros/cli getDeployment"], digest: "0ad85a2494f22e9863362a7137d721d970b87ff60fdb41727a76cb4f590c83bc" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/settings/{settingsId}/deploy", usedBy: ["mcp deploy_manage", "walkeros deploy start"], digest: "b6506c543c7e755592b5a6671016c4bae3b3e41cd76c28852297413e1a412e46" }, { op: "GET /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "ae0b8185fa74ba12d99eedacedb53e5801d7485cdf7b1c382334371454f8c323" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads", usedBy: ["mcp hub_manage"], digest: "0ee52914274f52641a08b4c2d9da774c971d214929b43abee85d5e657b209144" }, { op: "POST /api/projects/{projectId}/flows/{flowId}/threads/{threadId}/messages", usedBy: ["mcp hub_manage"], digest: "28d8e964962b03c016c909111be0ce570df9bf43f89f0ab1c74b6dd65503eec1" }, { op: "GET /api/projects/{projectId}/knowledge", usedBy: ["mcp hub_manage"], digest: "ca52e4593757c4fede25c41c3bb95e9a3b7476106549752b756860fc35abd1f1" }, { op: "POST /api/projects/{projectId}/runners/heartbeat", usedBy: ["runner"], digest: "96546fffffb32b66db7c5238daa2ba8f549d976f5ffcab2befa639e2eb1df0e1" }, { op: "POST /api/telemetry", usedBy: ["@walkeros/cli telemetry"], digest: "d119e16315ff9df09160d8b36ebc78dec089cb2a726f4a8fd77ff5b693999667" }];
17
17
  }
18
18
  });
19
19
 
@@ -306,26 +306,26 @@ function pe(e6) {
306
306
  function de(e6) {
307
307
  const t5 = pe(e6);
308
308
  if (void 0 === t5) return [];
309
- const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping";
309
+ const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping", r6 = "config.mapping" === n6 && void 0 !== e6.mapping;
310
310
  if (void 0 !== e6.code || void 0 !== e6.package) {
311
- return [`\`${n6}\` is ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs it; a mapping applies only to a transformer without code.`];
311
+ return [`${r6 ? "`config.mapping` and `mapping` are" : `\`${n6}\` is`} ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs ${r6 ? "them" : "it"}; a mapping applies only to a transformer without code.`];
312
312
  }
313
- const r6 = [];
314
- "config.mapping" === n6 && void 0 !== e6.mapping && r6.push("`mapping` is overridden: `config.mapping` wins; remove one.");
315
- const o5 = (function(e7, t6) {
313
+ const o5 = [];
314
+ r6 && o5.push("`mapping` is overridden: `config.mapping` wins; remove one.");
315
+ const s6 = (function(e7, t6) {
316
316
  if (!ae(e7)) return [];
317
317
  const n7 = [];
318
318
  for (const r8 of fe) void 0 !== e7[r8] && n7.push(`${t6}.${r8}`);
319
319
  const r7 = e7.mapping;
320
320
  if (!ae(r7)) return n7;
321
- for (const [e8, o6] of Object.entries(r7)) if (ae(o6)) for (const [r8, s6] of Object.entries(o6)) (Q(s6) ? s6 : [s6]).forEach((o7, i6) => {
321
+ for (const [e8, o6] of Object.entries(r7)) if (ae(o6)) for (const [r8, s7] of Object.entries(o6)) (Q(s7) ? s7 : [s7]).forEach((o7, i6) => {
322
322
  if (!ae(o7)) return;
323
- const a5 = `${t6}.mapping.${e8}.${r8}${Q(s6) ? `[${i6}]` : ""}`;
323
+ const a5 = `${t6}.mapping.${e8}.${r8}${Q(s7) ? `[${i6}]` : ""}`;
324
324
  for (const e9 of le) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
325
325
  });
326
326
  return n7;
327
327
  })(t5, n6);
328
- return o5.length > 0 && r6.push(`${o5.map((e7) => `\`${e7}\``).join(", ")} ${1 === o5.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), r6;
328
+ return s6.length > 0 && o5.push(`${s6.map((e7) => `\`${e7}\``).join(", ")} ${1 === s6.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), o5;
329
329
  }
330
330
  function ge(e6, t5) {
331
331
  const n6 = me[e6];
@@ -786,14 +786,13 @@ function bt(e6, t5, n6) {
786
786
  }
787
787
  };
788
788
  }
789
- async function kt(e6, t5 = {}, n6 = {}) {
790
- const r6 = n6.consent || n6.collector?.consent, o5 = n6.event ?? {};
789
+ async function kt(e6, t5 = {}, n6) {
791
790
  if (!n6.collector) throw new Error("getMappingValue: context.collector is required");
792
- const s6 = { event: o5, mapping: t5, collector: n6.collector, logger: n6.collector.logger, consent: r6 }, i6 = Q(t5) ? t5 : [t5];
791
+ const r6 = n6.consent || n6.collector.consent, o5 = n6.event ?? {}, s6 = { event: o5, mapping: t5, collector: n6.collector, logger: n6.collector.logger, consent: r6 }, i6 = Q(t5) ? t5 : [t5];
793
792
  for (const t6 of i6) {
794
793
  const r7 = await bt($t, (e7) => {
795
794
  if (e7 instanceof wt) throw e7;
796
- n6.collector && n6.collector.status.failed++, s6.logger.error("mapping processing failed", { event: o5, error: e7 });
795
+ n6.collector.status.failed++, s6.logger.error("mapping processing failed", { event: o5, error: e7 });
797
796
  })(e6, t6, { ...s6, mapping: t6 });
798
797
  if (ne(r7)) return r7;
799
798
  }
@@ -862,16 +861,16 @@ async function jt(e6, t5, n6) {
862
861
  const e7 = l4(`${a5} ${c3}`, d3[c3]);
863
862
  s6 = se(e7) ? await e7 : e7;
864
863
  }
865
- if (!s6) {
864
+ if (!(s6 || d3 && "*" === a5 && "*" === c3)) {
866
865
  a5 = "*", c3 = "*";
867
866
  const e7 = l4("* *", t5[a5]?.[c3]);
868
867
  s6 = se(e7) ? await e7 : e7;
869
868
  }
870
869
  return s6 && (i6 = `${a5} ${c3}`), { eventMapping: s6, mappingKey: i6 };
871
870
  }
872
- async function St(e6, t5 = {}, n6 = {}) {
871
+ async function St(e6, t5 = {}, n6) {
873
872
  if (!ne(e6)) return;
874
- const r6 = ae(e6) && e6.consent || n6.consent || n6.collector?.consent, o5 = n6.event ?? (ae(e6) ? e6 : {});
873
+ const r6 = ae(e6) && e6.consent || n6?.consent || n6?.collector?.consent, o5 = n6?.event ?? (ae(e6) ? e6 : {});
875
874
  return kt(e6, t5, { ...n6, consent: r6, event: o5 });
876
875
  }
877
876
  async function At(e6, t5, n6) {
@@ -1537,7 +1536,7 @@ async function po(e6, t5, n6, r6) {
1537
1536
  function mo(e6, t5, n6, r6) {
1538
1537
  if (!ao(n6)) return;
1539
1538
  const o5 = 1e3 * r6, s6 = e6.set(t5, Qr(n6, o5), o5);
1540
- s6 instanceof Promise && s6.catch(() => {
1539
+ se(s6) && Promise.resolve(s6).catch(() => {
1541
1540
  });
1542
1541
  }
1543
1542
  async function go(e6, t5, n6, r6) {
@@ -3075,7 +3074,7 @@ var init_stdin = __esm({
3075
3074
 
3076
3075
  // ../core/dist/dev.mjs
3077
3076
  import { z as i4 } from "zod";
3078
- import { z as si } from "zod";
3077
+ import { z as pi } from "zod";
3079
3078
  function o3(e6, t5, n6 = "draft-7") {
3080
3079
  return i4.toJSONSchema(e6, { target: n6 });
3081
3080
  }
@@ -3088,61 +3087,61 @@ function T4(e6) {
3088
3087
  function R3(e6) {
3089
3088
  return i4.object({ policy: e6.optional().describe("Pre-processing policy rules") }).partial();
3090
3089
  }
3091
- function J3(e6) {
3090
+ function M3(e6) {
3092
3091
  return i4.object({ consent: e6.optional().describe("Required consent states") }).partial();
3093
3092
  }
3094
- function et3(e6) {
3095
- return "string" == typeof e6 ? [e6] : Array.isArray(e6) ? e6.flatMap(et3) : "object" == typeof e6 && null !== e6 && "key" in e6 && "string" == typeof e6.key ? [e6.key] : [];
3093
+ function rt3(e6) {
3094
+ return "string" == typeof e6 ? [e6] : Array.isArray(e6) ? e6.flatMap(rt3) : "object" == typeof e6 && null !== e6 && "key" in e6 && "string" == typeof e6.key ? [e6.key] : [];
3096
3095
  }
3097
- function tt3(e6, t5, n6, i6) {
3098
- for (const o5 of et3(e6)) i6.test(o5) || n6.addIssue({ code: "custom", message: `State paths resolve against { event, ingest }: "${o5}" needs an "event." or "ingest." prefix.`, path: [t5] });
3096
+ function st2(e6, t5, n6, i6) {
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] });
3099
3098
  }
3100
- function An(e6, t5) {
3099
+ function Fn3(e6, t5) {
3101
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"] }));
3102
3101
  }
3103
- function Hn3(e6) {
3104
- return Bn3.parse(e6);
3102
+ function Qn3(e6) {
3103
+ return Kn2.parse(e6);
3105
3104
  }
3106
- function Zn(e6) {
3107
- return Bn3.safeParse(e6);
3105
+ function Yn2(e6) {
3106
+ return Kn2.safeParse(e6);
3108
3107
  }
3109
- function Vn2(e6) {
3110
- return Un2.parse(e6);
3108
+ function Xn2(e6) {
3109
+ return Gn3.parse(e6);
3111
3110
  }
3112
- function Gn3(e6) {
3113
- return Un2.safeParse(e6);
3111
+ function ei(e6) {
3112
+ return Gn3.safeParse(e6);
3114
3113
  }
3115
- function mi(e6) {
3114
+ function yi(e6) {
3116
3115
  return Array.isArray(e6);
3117
3116
  }
3118
- function gi(e6) {
3119
- return "object" == typeof e6 && null !== e6 && !mi(e6) && "[object Object]" === Object.prototype.toString.call(e6);
3117
+ function Si(e6) {
3118
+ return "object" == typeof e6 && null !== e6 && !yi(e6) && "[object Object]" === Object.prototype.toString.call(e6);
3120
3119
  }
3121
- function hi(e6, t5 = "", n6) {
3120
+ function wi(e6, t5 = "", n6) {
3122
3121
  const i6 = t5.split(".");
3123
3122
  let o5 = e6;
3124
3123
  for (let e7 = 0; e7 < i6.length; e7++) {
3125
3124
  const t6 = i6[e7];
3126
- if ("*" === t6 && mi(o5)) {
3125
+ if ("*" === t6 && yi(o5)) {
3127
3126
  const t7 = i6.slice(e7 + 1).join("."), r6 = [];
3128
3127
  for (const e8 of o5) {
3129
- const i7 = hi(e8, t7, n6);
3128
+ const i7 = wi(e8, t7, n6);
3130
3129
  r6.push(i7);
3131
3130
  }
3132
3131
  return r6;
3133
3132
  }
3134
- if (o5 = gi(o5) || mi(o5) ? o5[t6] : void 0, void 0 === o5) break;
3133
+ if (o5 = Si(o5) || yi(o5) ? o5[t6] : void 0, void 0 === o5) break;
3135
3134
  }
3136
3135
  return void 0 !== o5 ? o5 : n6;
3137
3136
  }
3138
- function bi(e6) {
3137
+ function ki(e6) {
3139
3138
  if (void 0 === e6 || "*" === e6) return () => true;
3140
3139
  if ("and" in e6) {
3141
- const t5 = e6.and.map(bi);
3140
+ const t5 = e6.and.map(ki);
3142
3141
  return (e7) => t5.every((t6) => t6(e7));
3143
3142
  }
3144
3143
  if ("or" in e6) {
3145
- const t5 = e6.or.map(bi);
3144
+ const t5 = e6.or.map(ki);
3146
3145
  return (e7) => t5.some((t6) => t6(e7));
3147
3146
  }
3148
3147
  return (function(e7) {
@@ -3173,82 +3172,82 @@ function bi(e6) {
3173
3172
  }
3174
3173
  })(n6, i6);
3175
3174
  return (e8) => {
3176
- const n7 = hi(e8, t5), i7 = r6(n7);
3175
+ const n7 = wi(e8, t5), i7 = r6(n7);
3177
3176
  return o5 ? !i7 : i7;
3178
3177
  };
3179
3178
  })(e6);
3180
3179
  }
3181
- function vi(e6) {
3180
+ function Ci(e6) {
3182
3181
  return Array.isArray(e6) && e6.length > 0 && e6.every((e7) => (function(e8) {
3183
3182
  return "object" == typeof e8 && null !== e8 && !Array.isArray(e8) && ("match" in e8 || "next" in e8 || "one" in e8 || "many" in e8 || "stop" in e8);
3184
3183
  })(e7));
3185
3184
  }
3186
- function Si(e6, t5) {
3185
+ function ji(e6, t5) {
3187
3186
  return { kind: t5 ? "sequence" : "next", path: e6 };
3188
3187
  }
3189
- function wi(e6, t5) {
3188
+ function $i(e6, t5) {
3190
3189
  return t5 ? { ...e6, outer: t5 } : e6;
3191
3190
  }
3192
- function ki(e6, t5, n6, i6) {
3193
- return wi(n6 ? { kind: e6, path: t5, match: n6 } : { kind: e6, path: t5, catchAll: true }, i6);
3191
+ function Oi(e6, t5, n6, i6) {
3192
+ return $i(n6 ? { kind: e6, path: t5, match: n6 } : { kind: e6, path: t5, catchAll: true }, i6);
3194
3193
  }
3195
- function Ci(e6, t5, n6, i6) {
3196
- return 0 === e6.length ? { type: "chain", value: [], label: wi({ kind: n6, path: t5 }, i6) } : { type: n6, routes: xi(e6, t5, n6, i6) };
3194
+ function Ei(e6, t5, n6, i6) {
3195
+ return 0 === e6.length ? { type: "chain", value: [], label: $i({ kind: n6, path: t5 }, i6) } : { type: n6, routes: Pi(e6, t5, n6, i6) };
3197
3196
  }
3198
- function xi(e6, t5, n6, i6) {
3197
+ function Pi(e6, t5, n6, i6) {
3199
3198
  return e6.map((e7, o5) => {
3200
3199
  const r6 = [...t5, o5];
3201
3200
  if ("string" == typeof e7 || Array.isArray(e7)) {
3202
- const t6 = ki(n6, r6, void 0, i6);
3203
- return { match: yi, next: $i(e7, r6, t6) ?? { type: "chain", value: [], label: t6 } };
3201
+ const t6 = Oi(n6, r6, void 0, i6);
3202
+ return { match: xi, next: Ii(e7, r6, t6) ?? { type: "chain", value: [], label: t6 } };
3204
3203
  }
3205
- const s6 = ki(n6, r6, e7.match, i6);
3206
- return { match: e7.match ? bi(e7.match) : yi, source: e7.match, next: ji(e7, r6, s6, false, true) ?? { type: "chain", value: [], label: s6 } };
3204
+ const s6 = Oi(n6, r6, e7.match, i6);
3205
+ return { match: e7.match ? ki(e7.match) : xi, source: e7.match, next: Di(e7, r6, s6, false, true) ?? { type: "chain", value: [], label: s6 } };
3207
3206
  });
3208
3207
  }
3209
- function ji(e6, t5, n6, i6, o5) {
3210
- const r6 = o5 ? void 0 : e6.match, s6 = r6 ? wi({ kind: "next", path: t5, match: r6 }, n6) : n6 ?? Si(t5, i6), a5 = r6 ? s6 : n6;
3208
+ function Di(e6, t5, n6, i6, o5) {
3209
+ const r6 = o5 ? void 0 : e6.match, s6 = r6 ? $i({ kind: "next", path: t5, match: r6 }, n6) : n6 ?? ji(t5, i6), a5 = r6 ? s6 : n6;
3211
3210
  let c3;
3212
- return true === e6.stop ? c3 = { type: "stop", label: s6 } : void 0 !== e6.one ? c3 = Ci(e6.one, [...t5, "one"], "one", a5) : void 0 !== e6.many ? c3 = Ci(e6.many, [...t5, "many"], "many", a5) : void 0 !== e6.next && (c3 = $i(e6.next, [...t5, "next"], a5)), r6 ? { type: "gate", match: bi(r6), source: r6, next: c3 ?? { type: "chain", value: [], label: s6 } } : void 0 === c3 && e6.match ? { type: "chain", value: [], label: s6 } : c3;
3211
+ return true === e6.stop ? c3 = { type: "stop", label: s6 } : void 0 !== e6.one ? c3 = Ei(e6.one, [...t5, "one"], "one", a5) : void 0 !== e6.many ? c3 = Ei(e6.many, [...t5, "many"], "many", a5) : void 0 !== e6.next && (c3 = Ii(e6.next, [...t5, "next"], a5)), r6 ? { type: "gate", match: ki(r6), source: r6, next: c3 ?? { type: "chain", value: [], label: s6 } } : void 0 === c3 && e6.match ? { type: "chain", value: [], label: s6 } : c3;
3213
3212
  }
3214
- function $i(e6, t5 = [], n6, i6 = false) {
3213
+ function Ii(e6, t5 = [], n6, i6 = false) {
3215
3214
  if (null != e6) {
3216
- if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ?? Si(t5, i6) };
3215
+ if ("string" == typeof e6) return { type: "static", value: e6, label: n6 ?? ji(t5, i6) };
3217
3216
  if (Array.isArray(e6)) {
3218
3217
  if (0 === e6.length) return;
3219
- if (vi(e6)) return { type: "one", routes: xi(e6, t5, "one", n6) };
3218
+ if (Ci(e6)) return { type: "one", routes: Pi(e6, t5, "one", n6) };
3220
3219
  const o5 = [];
3221
3220
  for (const t6 of e6) "string" == typeof t6 && o5.push(t6);
3222
- if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ?? Si(t5, i6) };
3221
+ if (o5.length === e6.length) return { type: "chain", value: o5, label: n6 ?? ji(t5, i6) };
3223
3222
  const r6 = [];
3224
3223
  if (e6.forEach((e7, i7) => {
3225
- const o6 = $i(e7, [...t5, i7], n6, true);
3224
+ const o6 = Ii(e7, [...t5, i7], n6, true);
3226
3225
  void 0 !== o6 && r6.push(o6);
3227
3226
  }), 0 === r6.length) return;
3228
3227
  return { type: "sequence", value: r6 };
3229
3228
  }
3230
- return ji(e6, t5, n6, i6, false);
3229
+ return Di(e6, t5, n6, i6, false);
3231
3230
  }
3232
3231
  }
3233
- function Ei(e6, t5, n6) {
3232
+ function Ti(e6, t5, n6) {
3234
3233
  return n6 ? { type: "continuation", segments: e6, at: t5, tail: n6 } : { type: "continuation", segments: e6, at: t5 };
3235
3234
  }
3236
- function Pi(e6) {
3235
+ function Ri(e6) {
3237
3236
  if (null == e6) return;
3238
3237
  if ((function(e7) {
3239
3238
  return "object" == typeof e7 && !Array.isArray(e7) && "type" in e7 && "continuation" === e7.type;
3240
3239
  })(e6)) return e6;
3241
3240
  const t5 = (function(e7) {
3242
3241
  if (null == e7) return;
3243
- if ("object" != typeof e7) return $i(e7);
3244
- const t6 = Oi.get(e7);
3242
+ if ("object" != typeof e7) return Ii(e7);
3243
+ const t6 = Ai.get(e7);
3245
3244
  if (t6) return t6;
3246
- const n6 = $i(e7);
3247
- return n6 && Oi.set(e7, n6), n6;
3245
+ const n6 = Ii(e7);
3246
+ return n6 && Ai.set(e7, n6), n6;
3248
3247
  })(e6);
3249
- return t5 ? Ei([t5], 0, void 0) : void 0;
3248
+ return t5 ? Ti([t5], 0, void 0) : void 0;
3250
3249
  }
3251
- function Di(e6, t5, n6) {
3250
+ function Mi(e6, t5, n6) {
3252
3251
  const i6 = [];
3253
3252
  let o5 = e6;
3254
3253
  for (; o5; ) {
@@ -3256,7 +3255,7 @@ function Di(e6, t5, n6) {
3256
3255
  o5 = o5.tail;
3257
3256
  continue;
3258
3257
  }
3259
- const e7 = o5.segments[o5.at], r6 = Ei(o5.segments, o5.at + 1, o5.tail);
3258
+ const e7 = o5.segments[o5.at], r6 = Ti(o5.segments, o5.at + 1, o5.tail);
3260
3259
  if ("static" === e7.type) {
3261
3260
  i6.push(e7.value), n6 && n6(e7), o5 = r6;
3262
3261
  continue;
@@ -3266,30 +3265,30 @@ function Di(e6, t5, n6) {
3266
3265
  continue;
3267
3266
  }
3268
3267
  if ("sequence" === e7.type) {
3269
- o5 = Ei(e7.value, 0, r6);
3268
+ o5 = Ti(e7.value, 0, r6);
3270
3269
  continue;
3271
3270
  }
3272
3271
  if (i6.length > 0) return { ids: i6, then: o5 };
3273
3272
  if ("stop" === e7.type) return n6 && n6(e7), { ids: [], stop: true };
3274
3273
  if ("gate" === e7.type) {
3275
- o5 = t5.gate(e7) ? Ei([e7.next], 0, r6) : r6;
3274
+ o5 = t5.gate(e7) ? Ti([e7.next], 0, r6) : r6;
3276
3275
  continue;
3277
3276
  }
3278
3277
  if ("one" === e7.type) {
3279
3278
  const n7 = e7.routes.length > 0 ? t5.one(e7.routes) : -1;
3280
- o5 = n7 >= 0 ? Ei([e7.routes[n7].next], 0, r6) : r6;
3279
+ o5 = n7 >= 0 ? Ti([e7.routes[n7].next], 0, r6) : r6;
3281
3280
  continue;
3282
3281
  }
3283
3282
  const s6 = e7.routes.length > 0 ? t5.many(e7.routes) : [];
3284
3283
  if (0 !== s6.length) {
3285
- if (1 !== s6.length) return { ids: [], forks: s6.map((t6) => Ei([e7.routes[t6].next], 0, r6)) };
3286
- o5 = Ei([e7.routes[s6[0]].next], 0, r6);
3284
+ if (1 !== s6.length) return { ids: [], forks: s6.map((t6) => Ti([e7.routes[t6].next], 0, r6)) };
3285
+ o5 = Ti([e7.routes[s6[0]].next], 0, r6);
3287
3286
  } else o5 = r6;
3288
3287
  }
3289
3288
  return { ids: i6 };
3290
3289
  }
3291
- function Ii(e6, t5) {
3292
- return Di(Pi(e6), /* @__PURE__ */ (function(e7) {
3290
+ function Ji(e6, t5) {
3291
+ return Mi(Ri(e6), /* @__PURE__ */ (function(e7) {
3293
3292
  return { gate: (t6) => t6.match(e7), one: (t6) => t6.findIndex((t7) => t7.match(e7)), many: (t6) => {
3294
3293
  const n6 = [];
3295
3294
  return t6.forEach((t7, i6) => {
@@ -3298,39 +3297,39 @@ function Ii(e6, t5) {
3298
3297
  } };
3299
3298
  })(t5));
3300
3299
  }
3301
- function Ai(e6) {
3300
+ function Fi(e6) {
3302
3301
  return null == e6 ? [] : [{ route: e6, ancestry: [] }];
3303
3302
  }
3304
- function Ti(e6, t5, n6) {
3303
+ function Ni(e6, t5, n6) {
3305
3304
  if (e6.at >= e6.ids.length) return { rest: t5 };
3306
3305
  const i6 = e6.ids[e6.at], o5 = e6.at + 1 < e6.ids.length ? [{ ids: e6.ids, at: e6.at + 1, ancestry: e6.ancestry }, ...t5] : t5;
3307
3306
  if (e6.ancestry.includes(i6)) return { rest: o5 };
3308
3307
  const r6 = [...e6.ancestry, i6], s6 = n6[i6], a5 = s6 ? s6.config.next : void 0;
3309
3308
  return { id: i6, ancestry: r6, rest: void 0 === a5 ? o5 : [{ route: a5, ancestry: r6 }, ...o5] };
3310
3309
  }
3311
- function Ri(e6, t5, n6) {
3310
+ function zi(e6, t5, n6) {
3312
3311
  if (e6.stop) return t5.length > 0 ? { kind: "stop", owner: t5[t5.length - 1] } : { kind: "stop" };
3313
3312
  if (e6.forks) return { kind: "fork", branches: e6.forks.map((e7) => [{ route: e7, ancestry: t5 }, ...n6]) };
3314
3313
  const i6 = [];
3315
3314
  return e6.ids.length > 0 && i6.push({ ids: e6.ids, at: 0, ancestry: t5 }), e6.then && i6.push({ route: e6.then, ancestry: t5 }), { kind: "stack", stack: [...i6, ...n6] };
3316
3315
  }
3317
- function Ji(e6, t5, n6) {
3316
+ function _i(e6, t5, n6) {
3318
3317
  let i6 = e6;
3319
3318
  for (; i6.length > 0; ) {
3320
3319
  const [e7, ...o5] = i6;
3321
3320
  if ("ids" in e7) {
3322
- const t6 = Ti(e7, o5, n6);
3321
+ const t6 = Ni(e7, o5, n6);
3323
3322
  if (void 0 !== t6.id) return { kind: "run", id: t6.id, rest: t6.rest, ancestry: t6.ancestry };
3324
3323
  i6 = t6.rest;
3325
3324
  continue;
3326
3325
  }
3327
- const r6 = Ri(Ii(e7.route, t5), e7.ancestry, o5);
3326
+ const r6 = zi(Ji(e7.route, t5), e7.ancestry, o5);
3328
3327
  if ("stack" !== r6.kind) return r6;
3329
3328
  i6 = r6.stack;
3330
3329
  }
3331
3330
  return { kind: "done" };
3332
3331
  }
3333
- function Mi(e6, t5 = {}) {
3332
+ function Li(e6, t5 = {}) {
3334
3333
  const n6 = [], i6 = /* @__PURE__ */ new Map(), o5 = /* @__PURE__ */ new Set(), r6 = /* @__PURE__ */ new WeakMap(), s6 = /* @__PURE__ */ new WeakMap();
3335
3334
  let a5 = 0;
3336
3335
  const c3 = (e7) => {
@@ -3356,7 +3355,7 @@ function Mi(e6, t5 = {}) {
3356
3355
  }
3357
3356
  const n7 = e7.route;
3358
3357
  if ("string" == typeof n7) return `s${n7}/${t6}`;
3359
- let i7 = "", o6 = Pi(n7);
3358
+ let i7 = "", o6 = Ri(n7);
3360
3359
  for (; o6; ) i7 += `${c3(o6.segments)}@${o6.at};`, o6 = o6.tail;
3361
3360
  return `r${i7}/${t6}`;
3362
3361
  }, u4 = (e7, n7, i7) => {
@@ -3365,7 +3364,7 @@ function Mi(e6, t5 = {}) {
3365
3364
  if (o5.add(s7), 0 === e7.length) return;
3366
3365
  const [a6, ...f4] = e7;
3367
3366
  if ("ids" in a6) {
3368
- const e8 = Ti(a6, f4, t5);
3367
+ const e8 = Ni(a6, f4, t5);
3369
3368
  if (void 0 === e8.id) return void u4(e8.rest, n7, i7);
3370
3369
  const o6 = (r6.get(a6.ids) ?? [])[a6.at];
3371
3370
  if (!o6) return;
@@ -3386,7 +3385,7 @@ function Mi(e6, t5 = {}) {
3386
3385
  const r7 = [], s8 = (e10) => {
3387
3386
  let t7 = 0;
3388
3387
  return o6 < i8.length ? t7 = i8[o6] : r7.push(e10), o6++, t7;
3389
- }, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], l5 = Di(e9, { gate: () => 0 === s8(2), one: (e10) => {
3388
+ }, a7 = (e10) => e10.some((e11) => void 0 === e11.source), c4 = [], l5 = Mi(e9, { gate: () => 0 === s8(2), one: (e10) => {
3390
3389
  const t7 = e10.map((e11, t8) => t8);
3391
3390
  return a7(e10) || t7.push(-1), t7[s8(t7.length)];
3392
3391
  }, many: (e10) => {
@@ -3401,7 +3400,7 @@ function Mi(e6, t5 = {}) {
3401
3400
  }
3402
3401
  };
3403
3402
  return n8([]), t6;
3404
- })(Pi(a6.route))) {
3403
+ })(Ri(a6.route))) {
3405
3404
  const { steps: t6 } = e8, i8 = [];
3406
3405
  let o6 = n7;
3407
3406
  for (const t7 of e8.visited) if ("stop" !== t7.type) if ("static" === t7.type) i8.push(t7), o6 = t7.value;
@@ -3412,30 +3411,30 @@ function Mi(e6, t5 = {}) {
3412
3411
  }
3413
3412
  else d3(n7, t7.label, c3(t7), m4, void 0);
3414
3413
  t6.ids.length > 0 && r6.set(t6.ids, i8);
3415
- const s8 = Ri(t6, a6.ancestry, f4);
3414
+ const s8 = zi(t6, a6.ancestry, f4);
3416
3415
  if ("stop" !== s8.kind) if ("fork" !== s8.kind) u4(s8.stack, n7, void 0);
3417
3416
  else for (const e9 of s8.branches) u4(e9, n7, void 0);
3418
3417
  }
3419
3418
  };
3420
- return u4(Ai(e6), void 0, void 0), n6;
3419
+ return u4(Fi(e6), void 0, void 0), n6;
3421
3420
  }
3422
- function Fi(e6) {
3421
+ function qi(e6) {
3423
3422
  throw new Error(String(e6));
3424
3423
  }
3425
- function qi(e6, t5) {
3424
+ function Hi(e6, t5) {
3426
3425
  const n6 = false !== t5?.stripAnnotations, i6 = {}, o5 = /* @__PURE__ */ new Set();
3427
3426
  function r6(t6) {
3428
3427
  if (i6[t6]) return i6[t6];
3429
- o5.has(t6) && Fi(`Circular extend chain detected: ${[...o5, t6].join(" \u2192 ")}`);
3428
+ o5.has(t6) && qi(`Circular extend chain detected: ${[...o5, t6].join(" \u2192 ")}`);
3430
3429
  const s6 = e6[t6];
3431
- s6 || Fi(`Contract "${t6}" not found`), o5.add(t6);
3430
+ s6 || qi(`Contract "${t6}" not found`), o5.add(t6);
3432
3431
  let a5 = {};
3433
3432
  if (s6.extend) {
3434
3433
  a5 = (function(e7, t7) {
3435
3434
  const n7 = {};
3436
3435
  void 0 === e7.tagging && void 0 === t7.tagging || (n7.tagging = t7.tagging ?? e7.tagging);
3437
3436
  void 0 === e7.description && void 0 === t7.description || (n7.description = t7.description ?? e7.description);
3438
- e7.schema && t7.schema ? n7.schema = Wi(e7.schema, t7.schema) : (e7.schema || t7.schema) && (n7.schema = { ...e7.schema || t7.schema });
3437
+ e7.schema && t7.schema ? n7.schema = Zi(e7.schema, t7.schema) : (e7.schema || t7.schema) && (n7.schema = { ...e7.schema || t7.schema });
3439
3438
  if (e7.events || t7.events) {
3440
3439
  const i7 = {}, o6 = /* @__PURE__ */ new Set([...Object.keys(e7.events || {}), ...Object.keys(t7.events || {})]);
3441
3440
  for (const n8 of o6) {
@@ -3443,7 +3442,7 @@ function qi(e6, t5) {
3443
3442
  i7[n8] = {};
3444
3443
  for (const e8 of s7) {
3445
3444
  const t8 = o7[e8], s8 = r7[e8];
3446
- i7[n8][e8] = t8 && s8 ? Wi(t8, s8) : { ...t8 || s8 };
3445
+ i7[n8][e8] = t8 && s8 ? Zi(t8, s8) : { ...t8 || s8 };
3447
3446
  }
3448
3447
  }
3449
3448
  n7.events = i7;
@@ -3458,13 +3457,13 @@ function qi(e6, t5) {
3458
3457
  for (const i7 of Object.keys(e7[n7] || {})) {
3459
3458
  let o6 = {};
3460
3459
  const r7 = e7["*"]?.["*"];
3461
- r7 && (o6 = Wi(o6, r7));
3460
+ r7 && (o6 = Zi(o6, r7));
3462
3461
  const s7 = e7["*"]?.[i7];
3463
- s7 && "*" !== i7 && (o6 = Wi(o6, s7));
3462
+ s7 && "*" !== i7 && (o6 = Zi(o6, s7));
3464
3463
  const a6 = e7[n7]?.["*"];
3465
- a6 && "*" !== i7 && (o6 = Wi(o6, a6));
3464
+ a6 && "*" !== i7 && (o6 = Zi(o6, a6));
3466
3465
  const c3 = e7[n7]?.[i7];
3467
- c3 && (o6 = Wi(o6, c3)), t7[n7][i7] = o6;
3466
+ c3 && (o6 = Zi(o6, c3)), t7[n7][i7] = o6;
3468
3467
  }
3469
3468
  }
3470
3469
  e7["*"] && (t7["*"] = { ...e7["*"] });
@@ -3473,7 +3472,7 @@ function qi(e6, t5) {
3473
3472
  const e7 = {};
3474
3473
  for (const [t7, n7] of Object.entries(a5.events)) {
3475
3474
  e7[t7] = {};
3476
- for (const [i7, o6] of Object.entries(n7)) e7[t7][i7] = Ui(o6);
3475
+ for (const [i7, o6] of Object.entries(n7)) e7[t7][i7] = Gi(o6);
3477
3476
  }
3478
3477
  a5.events = e7;
3479
3478
  }
@@ -3482,28 +3481,28 @@ function qi(e6, t5) {
3482
3481
  for (const t6 of Object.keys(e6)) r6(t6);
3483
3482
  return i6;
3484
3483
  }
3485
- function Wi(e6, t5) {
3484
+ function Zi(e6, t5) {
3486
3485
  const n6 = { ...e6 };
3487
3486
  for (const i6 of Object.keys(t5)) {
3488
3487
  const o5 = e6[i6], r6 = t5[i6];
3489
- "required" === i6 && Array.isArray(o5) && Array.isArray(r6) ? n6[i6] = [.../* @__PURE__ */ new Set([...o5, ...r6])] : Hi(o5) && Hi(r6) ? n6[i6] = Wi(o5, r6) : n6[i6] = r6;
3488
+ "required" === i6 && Array.isArray(o5) && Array.isArray(r6) ? n6[i6] = [.../* @__PURE__ */ new Set([...o5, ...r6])] : Qi(o5) && Qi(r6) ? n6[i6] = Zi(o5, r6) : n6[i6] = r6;
3490
3489
  }
3491
3490
  return n6;
3492
3491
  }
3493
- function Ui(e6) {
3492
+ function Gi(e6) {
3494
3493
  const t5 = {};
3495
- for (const [n6, i6] of Object.entries(e6)) Ni.has(n6) || (Li.has(n6) && Hi(i6) ? t5[n6] = Bi(i6) : _i.has(n6) && Array.isArray(i6) ? t5[n6] = i6.map((e7) => Hi(e7) ? Ui(e7) : e7) : zi.has(n6) && Hi(i6) ? t5[n6] = Ui(i6) : t5[n6] = i6);
3494
+ for (const [n6, i6] of Object.entries(e6)) Wi.has(n6) || (Vi.has(n6) && Qi(i6) ? t5[n6] = Ki(i6) : Bi.has(n6) && Array.isArray(i6) ? t5[n6] = i6.map((e7) => Qi(e7) ? Gi(e7) : e7) : Ui.has(n6) && Qi(i6) ? t5[n6] = Gi(i6) : t5[n6] = i6);
3496
3495
  return t5;
3497
3496
  }
3498
- function Bi(e6) {
3497
+ function Ki(e6) {
3499
3498
  const t5 = {};
3500
- for (const [n6, i6] of Object.entries(e6)) t5[n6] = Hi(i6) ? Ui(i6) : i6;
3499
+ for (const [n6, i6] of Object.entries(e6)) t5[n6] = Qi(i6) ? Gi(i6) : i6;
3501
3500
  return t5;
3502
3501
  }
3503
- function Hi(e6) {
3502
+ function Qi(e6) {
3504
3503
  return "object" == typeof e6 && null !== e6 && !Array.isArray(e6);
3505
3504
  }
3506
- function Vi(e6, t5) {
3505
+ function Xi(e6, t5) {
3507
3506
  let n6;
3508
3507
  try {
3509
3508
  n6 = JSON.parse(e6);
@@ -3512,7 +3511,7 @@ function Vi(e6, t5) {
3512
3511
  if (e7 instanceof SyntaxError) {
3513
3512
  const n8 = e7.message.match(/position\s+(\d+)/);
3514
3513
  if (n8) {
3515
- return ho2(t7, parseInt(n8[1], 10));
3514
+ return wo3(t7, parseInt(n8[1], 10));
3516
3515
  }
3517
3516
  const i8 = e7.message.match(/line\s+(\d+)\s+column\s+(\d+)/);
3518
3517
  if (i8) return { line: parseInt(i8[1], 10), column: parseInt(i8[2], 10) };
@@ -3521,45 +3520,45 @@ function Vi(e6, t5) {
3521
3520
  })(t6, e6);
3522
3521
  return { valid: false, errors: [{ message: t6 instanceof Error ? t6.message : "Invalid JSON", severity: "error", line: n7, column: i7 }], warnings: [] };
3523
3522
  }
3524
- const i6 = [], o5 = [], r6 = Bn3.safeParse(n6);
3523
+ const i6 = [], o5 = [], r6 = Kn2.safeParse(n6);
3525
3524
  if (!r6.success) for (const t6 of r6.error.issues) {
3526
- const n7 = t6.path.join("."), o6 = vo2(e6, t6.path);
3525
+ const n7 = t6.path.join("."), o6 = Co2(e6, t6.path);
3527
3526
  i6.push({ message: t6.message, severity: "error", path: n7 || "root", ...o6 });
3528
3527
  }
3529
3528
  const s6 = (function(e7) {
3530
- if (!(Eo2(e7) && "version" in e7 && "flows" in e7 && Eo2(e7.flows))) return;
3529
+ if (!(To(e7) && "version" in e7 && "flows" in e7 && To(e7.flows))) return;
3531
3530
  const t6 = {}, n7 = [], i7 = [], o6 = [], r7 = [], s7 = [], a5 = [];
3532
3531
  let c3;
3533
3532
  const l4 = Object.keys(e7.flows);
3534
- Po(t6, e7.variables), (function(e8, t7) {
3535
- if (!Eo2(t7)) return;
3533
+ Ro(t6, e7.variables), (function(e8, t7) {
3534
+ if (!To(t7)) return;
3536
3535
  let n8;
3537
3536
  try {
3538
- n8 = qi(t7, { stripAnnotations: false });
3537
+ n8 = Hi(t7, { stripAnnotations: false });
3539
3538
  } catch {
3540
3539
  return;
3541
3540
  }
3542
3541
  for (const t8 of Object.values(n8)) {
3543
3542
  const n9 = t8.events;
3544
- if (Eo2(n9)) for (const [t9, i8] of Object.entries(n9)) {
3545
- if (!Eo2(i8)) continue;
3543
+ if (To(n9)) for (const [t9, i8] of Object.entries(n9)) {
3544
+ if (!To(i8)) continue;
3546
3545
  let n10 = e8.find((e9) => e9.entity === t9);
3547
3546
  n10 || (n10 = { entity: t9, actions: [], properties: {} }, e8.push(n10)), n10.properties || (n10.properties = {});
3548
- for (const [e9, t10] of Object.entries(i8)) n10.actions.includes(e9) || n10.actions.push(e9), n10.properties[e9] = Do(t10);
3547
+ for (const [e9, t10] of Object.entries(i8)) n10.actions.includes(e9) || n10.actions.push(e9), n10.properties[e9] = Mo(t10);
3549
3548
  }
3550
3549
  }
3551
3550
  })(a5, e7.contract);
3552
- for (const a6 of Object.values(e7.flows)) if (Eo2(a6)) {
3551
+ for (const a6 of Object.values(e7.flows)) if (To(a6)) {
3553
3552
  if (!c3) {
3554
3553
  const e8 = a6.config;
3555
- !Eo2(e8) || "web" !== e8.platform && "server" !== e8.platform || (c3 = e8.platform);
3554
+ !To(e8) || "web" !== e8.platform && "server" !== e8.platform || (c3 = e8.platform);
3556
3555
  }
3557
- Po(t6, a6.variables);
3556
+ Ro(t6, a6.variables);
3558
3557
  for (const e8 of ["sources", "destinations", "transformers"]) {
3559
3558
  const r8 = "sources" === e8 ? "source" : "destinations" === e8 ? "destination" : "transformer", l5 = "sources" === e8 ? n7 : "destinations" === e8 ? i7 : o6;
3560
- if (Eo2(a6[e8])) for (const [n8, i8] of Object.entries(a6[e8])) l5.push(n8), Eo2(i8) && (Po(t6, i8.variables), "string" == typeof i8.package && s7.push({ package: i8.package, shortName: n8, type: r8, platform: c3 || "web" }));
3559
+ if (To(a6[e8])) for (const [n8, i8] of Object.entries(a6[e8])) l5.push(n8), To(i8) && (Ro(t6, i8.variables), "string" == typeof i8.package && s7.push({ package: i8.package, shortName: n8, type: r8, platform: c3 || "web" }));
3561
3560
  }
3562
- if (Eo2(a6.stores)) for (const [e8, n8] of Object.entries(a6.stores)) r7.push(e8), Eo2(n8) && Po(t6, n8.variables);
3561
+ if (To(a6.stores)) for (const [e8, n8] of Object.entries(a6.stores)) r7.push(e8), To(n8) && Ro(t6, n8.variables);
3563
3562
  }
3564
3563
  const d3 = { variables: t6, stepNames: { sources: n7, destinations: i7, transformers: o6, stores: r7 }, flowNames: l4 };
3565
3564
  c3 && (d3.platform = c3);
@@ -3584,79 +3583,79 @@ function Vi(e6, t5) {
3584
3583
  if (o7++, "object" === s7?.kind && s7.expectKey) {
3585
3584
  const t9 = JSON.parse(e9.slice(n10, o7));
3586
3585
  s7.key = "string" == typeof t9 ? t9 : "";
3587
- } else t8.set(no(i9()), { start: n10, end: o7 });
3586
+ } else t8.set(ao2(i9()), { start: n10, end: o7 });
3588
3587
  } else o7++;
3589
3588
  }
3590
3589
  return t8;
3591
3590
  })(e8), i8 = [];
3592
- return ao2(t7, [], (t8, o7) => {
3593
- if (so(o7)) return;
3594
- const r8 = n8.get(no(o7));
3591
+ return fo2(t7, [], (t8, o7) => {
3592
+ if (uo(o7)) return;
3593
+ const r8 = n8.get(ao2(o7));
3595
3594
  r8 && i8.push({ path: o7, raw: e8.slice(r8.start + 1, r8.end - 1), offset: r8.start + 1 });
3596
3595
  }), i8;
3597
3596
  })(e7, t6);
3598
3597
  (function(e8, t7, n8) {
3599
- to(t7, Yi, (t8, i8, o7) => {
3598
+ so(t7, io, (t8, i8, o7) => {
3600
3599
  const r8 = t8[0], s7 = t8[1], a5 = t8[2];
3601
- n8.push({ message: `Malformed reference "${r8}", use a dot, not a colon: "$${s7}.${a5}".`, severity: "warning", path: i8.path.join("."), ...bo2(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("."), ...ko(e8, o7, r8.length) });
3602
3601
  });
3603
3602
  })(e7, r7, o6), (function(e8, t7, n8, i8, o7) {
3604
- to(n8, eo2, (n9, r8, s7) => {
3603
+ so(n8, ro2, (n9, r8, s7) => {
3605
3604
  const a5 = (function(e9, t8, n10) {
3606
- if ("flows" !== t8[0] || !Eo2(e9) || !Eo2(e9.flows)) return n10.variables ?? {};
3605
+ if ("flows" !== t8[0] || !To(e9) || !To(e9.flows)) return n10.variables ?? {};
3607
3606
  const i9 = {};
3608
- Po(i9, e9.variables);
3607
+ Ro(i9, e9.variables);
3609
3608
  const o8 = e9.flows[t8[1]];
3610
- if (!Eo2(o8)) return i9;
3611
- Po(i9, o8.variables);
3609
+ if (!To(o8)) return i9;
3610
+ Ro(i9, o8.variables);
3612
3611
  const r9 = o8[t8[2]];
3613
- if (ro2.includes(t8[2]) && Eo2(r9)) {
3612
+ if (po2.includes(t8[2]) && To(r9)) {
3614
3613
  const e10 = r9[t8[3]];
3615
- Eo2(e10) && Po(i9, e10.variables);
3614
+ To(e10) && Ro(i9, e10.variables);
3616
3615
  }
3617
3616
  return i9;
3618
3617
  })(t7, r8.path, i8);
3619
- n9[1] in a5 || o7.push({ message: `Unknown variable "$var.${n9[1]}". Defined: ${Object.keys(a5).join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...bo2(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("."), ...ko(e8, s7, n9[0].length) });
3620
3619
  });
3621
3620
  })(e7, t6, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
3622
- to(n8, Gi, (n9, r8, s7) => {
3621
+ so(n8, eo2, (n9, r8, s7) => {
3623
3622
  const a5 = (function(e9, t8, n10) {
3624
- if ("flows" !== t8[0] || !Eo2(e9) || !Eo2(e9.flows)) return n10.stepNames?.stores ?? [];
3623
+ if ("flows" !== t8[0] || !To(e9) || !To(e9.flows)) return n10.stepNames?.stores ?? [];
3625
3624
  const i9 = e9.flows[t8[1]];
3626
- return Eo2(i9) && Eo2(i9.stores) ? Object.keys(i9.stores) : [];
3625
+ return To(i9) && To(i9.stores) ? Object.keys(i9.stores) : [];
3627
3626
  })(t7, r8.path, i8);
3628
- a5.includes(n9[1]) || o7.push({ message: `Unknown store "$store.${n9[1]}". Defined: ${a5.join(", ") || "none"}`, severity: "warning", path: r8.path.join("."), ...bo2(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("."), ...ko(e8, s7, n9[0].length) });
3629
3628
  });
3630
3629
  })(e7, t6, r7, n7, o6), (function(e8, t7, n8) {
3631
- to(t7, Ki, (t8, i8, o7) => {
3632
- const r8 = t8[0], s7 = t8[1], a5 = t8[2], c3 = bo2(e8, o7, r8.length), l4 = i8.path.join(".");
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(".");
3633
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 });
3634
3633
  });
3635
3634
  })(e7, r7, o6), (function(e8, t7, n8, i8) {
3636
3635
  const o7 = n8.flowNames ?? [];
3637
3636
  if (0 === o7.length) return;
3638
- to(t7, Qi, (t8, n9, r8) => {
3637
+ so(t7, no, (t8, n9, r8) => {
3639
3638
  const s7 = t8[0], a5 = t8[1];
3640
- o7.includes(a5) || i8.push({ message: `Unknown flow "$flow.${a5}". Defined: ${o7.join(", ")}`, severity: "warning", path: n9.path.join("."), ...bo2(e8, r8, s7.length) });
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) });
3641
3640
  });
3642
3641
  })(e7, r7, n7, o6), (function(e8, t7, n8, i8, o7) {
3643
3642
  const r8 = n8.secrets;
3644
- if (!Eo2(t7) || !Eo2(t7.flows)) return;
3643
+ if (!To(t7) || !To(t7.flows)) return;
3645
3644
  for (const [n9, s7] of Object.entries(t7.flows)) {
3646
- if (!Eo2(s7)) continue;
3647
- const t8 = s7.config, a5 = !Eo2(t8) || "web" !== t8.platform && "server" !== t8.platform ? void 0 : t8.platform;
3648
- ao2(s7, ["flows", n9], (t9, n10) => {
3649
- if (so(n10)) return;
3645
+ if (!To(s7)) continue;
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;
3650
3649
  let s8;
3651
- for (Xi.lastIndex = 0; null !== (s8 = Xi.exec(t9)); ) {
3652
- const t10 = s8[0], n11 = s8[1], c3 = e8.indexOf(t10), l4 = -1 === c3 ? { line: 1, column: 1 } : bo2(e8, c3, t10.length);
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);
3653
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 });
3654
3653
  }
3655
3654
  });
3656
3655
  }
3657
3656
  })(e7, t6, n7, i7, o6), (function(e8, t7, n8) {
3658
- ao2(t7, [], (t8, i8) => {
3659
- if (!t8.startsWith(Zi) && !so(i8)) for (const { prefix: o7, regex: r8, grammar: s7 } of io) {
3657
+ fo2(t7, [], (t8, i8) => {
3658
+ if (!t8.startsWith(Yi) && !uo(i8)) for (const { prefix: o7, regex: r8, grammar: s7 } of co) {
3660
3659
  if (!t8.includes(o7)) continue;
3661
3660
  const a5 = o7.slice(0, -1);
3662
3661
  let c3;
@@ -3665,247 +3664,247 @@ function Vi(e6, t5) {
3665
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.`;
3666
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.`;
3667
3666
  const l4 = JSON.stringify(t8), d3 = e8.indexOf(l4);
3668
- n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } : bo2(e8, d3, l4.length) });
3667
+ n8.push({ message: c3, severity: "warning", path: i8.join("."), ...-1 === d3 ? { line: 1, column: 1 } : ko(e8, d3, l4.length) });
3669
3668
  }
3670
3669
  });
3671
3670
  })(e7, t6, o6);
3672
3671
  })(e6, n6, s6, i6, o5)), (function(e7, t6, n7) {
3673
- if (!Eo2(t6)) return;
3674
- const i7 = Ln2.safeParse(t6.contract);
3672
+ if (!To(t6)) return;
3673
+ const i7 = Vn2.safeParse(t6.contract);
3675
3674
  if (void 0 === t6.contract || !i7.success) return;
3676
3675
  try {
3677
- qi(i7.data);
3676
+ Hi(i7.data);
3678
3677
  } catch (t7) {
3679
- n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...go2(e7, "contract") });
3678
+ n7.push({ message: `Contract does not resolve: ${t7 instanceof Error ? t7.message : String(t7)}`, severity: "error", path: "contract", ...So2(e7, "contract") });
3680
3679
  }
3681
3680
  })(e6, n6, i6), (function(e7, t6, n7) {
3682
- if (!Eo2(t6) || !Eo2(t6.flows)) return;
3681
+ if (!To(t6) || !To(t6.flows)) return;
3683
3682
  for (const i7 of Object.values(t6.flows)) {
3684
- if (!Eo2(i7)) continue;
3685
- const t7 = Eo2(i7.stores) ? i7.stores : void 0;
3686
- t7 && fo2(e7, t7, n7), t7 && Eo2(i7.transformers) && mo2(e7, i7.transformers, t7, n7);
3683
+ if (!To(i7)) continue;
3684
+ const t7 = To(i7.stores) ? i7.stores : void 0;
3685
+ t7 && vo2(e7, t7, n7), t7 && To(i7.transformers) && yo2(e7, i7.transformers, t7, n7);
3687
3686
  }
3688
3687
  })(e6, n6, o5), (function(e7, t6, n7) {
3689
- if (!Eo2(t6) || !Eo2(t6.flows)) return;
3688
+ if (!To(t6) || !To(t6.flows)) return;
3690
3689
  const i7 = (t7, i8, o7) => {
3691
- n7.push({ message: o7, severity: "error", path: i8.join("."), ...go2(e7, t7) });
3690
+ n7.push({ message: o7, severity: "error", path: i8.join("."), ...So2(e7, t7) });
3692
3691
  }, o6 = (e8, t7) => {
3693
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.`);
3694
3693
  }, r7 = (e8, t7) => (n8, o7) => {
3695
3694
  e8.test(n8) || i7(n8, o7, `Cache keys and route matchers resolve against { event, ingest }: "${n8}" needs an ${t7} prefix.`);
3696
- }, s7 = r7(yo2, '"event." or "ingest."'), a5 = r7(So2, '"event.", "ingest." or "cache."');
3697
- for (const [e8, n8] of Object.entries(t6.flows)) if (Eo2(n8)) {
3698
- for (const t7 of wo3) {
3695
+ }, s7 = r7(xo2, '"event." or "ingest."'), a5 = r7(jo2, '"event.", "ingest." or "cache."');
3696
+ for (const [e8, n8] of Object.entries(t6.flows)) if (To(n8)) {
3697
+ for (const t7 of $o) {
3699
3698
  const i8 = n8[t7];
3700
- if (Eo2(i8)) for (const [n9, r8] of Object.entries(i8)) {
3701
- if (!Eo2(r8)) continue;
3699
+ if (To(i8)) for (const [n9, r8] of Object.entries(i8)) {
3700
+ if (!To(r8)) continue;
3702
3701
  const i9 = ["flows", e8, t7, n9];
3703
- $o(r8.before, [...i9, "before"], s7), $o(r8.next, [...i9, "next"], s7), jo2(r8.cache, [...i9, "cache"], s7, a5), "transformers" !== t7 && Eo2(r8.config) && xo2(r8.config, [...i9, "config"], o6);
3702
+ Io2(r8.before, [...i9, "before"], s7), Io2(r8.next, [...i9, "next"], s7), Do(r8.cache, [...i9, "cache"], s7, a5), "transformers" !== t7 && To(r8.config) && Po(r8.config, [...i9, "config"], o6);
3704
3703
  }
3705
3704
  }
3706
- Eo2(n8.collector) && $o(n8.collector.next, ["flows", e8, "collector", "next"], s7);
3705
+ To(n8.collector) && Io2(n8.collector.next, ["flows", e8, "collector", "next"], s7);
3707
3706
  }
3708
3707
  })(e6, n6, i6), { valid: 0 === i6.length, errors: i6, warnings: o5, context: s6 };
3709
3708
  }
3710
- function to(e6, t5, n6) {
3709
+ function so(e6, t5, n6) {
3711
3710
  for (const i6 of e6) {
3712
3711
  let e7;
3713
3712
  for (t5.lastIndex = 0; null !== (e7 = t5.exec(i6.raw)); ) n6(e7, i6, i6.offset + e7.index);
3714
3713
  }
3715
3714
  }
3716
- function no(e6) {
3715
+ function ao2(e6) {
3717
3716
  return JSON.stringify(e6);
3718
3717
  }
3719
- function so(e6) {
3718
+ function uo(e6) {
3720
3719
  const t5 = e6[e6.length - 1];
3721
- return "$comment" === t5 || ("contract" === e6[0] || (!("flows" !== e6[0] || !ro2.includes(e6[2]) || "config" !== e6[4] || "settings" !== e6[5] || "contract" !== e6[6]) || !!oo.includes(t5) && (1 === e6.length || "flows" === e6[0] && (3 === e6.length || !!ro2.includes(e6[2]) && (5 === e6.length || 7 === e6.length && "examples" === e6[4])))));
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])))));
3722
3721
  }
3723
- function ao2(e6, t5, n6) {
3722
+ function fo2(e6, t5, n6) {
3724
3723
  if ("string" != typeof e6) {
3725
- if (Array.isArray(e6)) e6.forEach((e7, i6) => ao2(e7, [...t5, String(i6)], n6));
3726
- else if (Eo2(e6)) for (const [i6, o5] of Object.entries(e6)) ao2(o5, [...t5, i6], n6);
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);
3727
3726
  } else n6(e6, t5);
3728
3727
  }
3729
- function uo(e6) {
3730
- return Eo2(e6.config) && true === e6.config.file;
3728
+ function bo2(e6) {
3729
+ return To(e6.config) && true === e6.config.file;
3731
3730
  }
3732
- function fo2(e6, t5, n6) {
3733
- for (const [i6, o5] of Object.entries(t5)) Eo2(o5) && uo(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}`, ...go2(e6, i6) });
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) });
3734
3733
  }
3735
- function mo2(e6, t5, n6, i6) {
3734
+ function yo2(e6, t5, n6, i6) {
3736
3735
  for (const o5 of Object.values(t5)) {
3737
- if (!Eo2(o5)) continue;
3738
- if (o5.package !== lo3) continue;
3739
- if (!Eo2(o5.env)) continue;
3736
+ if (!To(o5)) continue;
3737
+ if (o5.package !== go2) continue;
3738
+ if (!To(o5.env)) continue;
3740
3739
  const t6 = o5.env.store;
3741
3740
  if ("string" != typeof t6) continue;
3742
- const r6 = po2.exec(t6);
3741
+ const r6 = ho2.exec(t6);
3743
3742
  if (!r6) continue;
3744
3743
  const s6 = r6[1], a5 = n6[s6];
3745
- if (!Eo2(a5)) continue;
3744
+ if (!To(a5)) continue;
3746
3745
  const c3 = a5.package;
3747
- "string" == typeof c3 && co.includes(c3) && (uo(a5) || i6.push({ message: `transformer-file serves byte-exact assets; set config.file: true on store "${s6}".`, severity: "warning", path: `stores.${s6}`, ...go2(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}`, ...So2(e6, s6) }));
3748
3747
  }
3749
3748
  }
3750
- function go2(e6, t5) {
3749
+ function So2(e6, t5) {
3751
3750
  const n6 = e6.indexOf(`"${t5}"`);
3752
- return -1 === n6 ? { line: 1, column: 1 } : ho2(e6, n6);
3751
+ return -1 === n6 ? { line: 1, column: 1 } : wo3(e6, n6);
3753
3752
  }
3754
- function ho2(e6, t5) {
3753
+ function wo3(e6, t5) {
3755
3754
  let n6 = 1, i6 = 1;
3756
3755
  for (let o5 = 0; o5 < t5 && o5 < e6.length; o5++) "\n" === e6[o5] ? (n6++, i6 = 1) : i6++;
3757
3756
  return { line: n6, column: i6 };
3758
3757
  }
3759
- function bo2(e6, t5, n6) {
3760
- const i6 = ho2(e6, t5), o5 = ho2(e6, t5 + n6);
3758
+ function ko(e6, t5, n6) {
3759
+ const i6 = wo3(e6, t5), o5 = wo3(e6, t5 + n6);
3761
3760
  return { line: i6.line, column: i6.column, endLine: o5.line, endColumn: o5.column };
3762
3761
  }
3763
- function vo2(e6, t5) {
3762
+ function Co2(e6, t5) {
3764
3763
  if (0 === t5.length) return { line: 1, column: 1 };
3765
3764
  const n6 = t5[t5.length - 1];
3766
3765
  if ("string" == typeof n6) {
3767
3766
  const t6 = `"${n6}"`, i6 = e6.lastIndexOf(t6);
3768
- if (-1 !== i6) return ho2(e6, i6);
3767
+ if (-1 !== i6) return wo3(e6, i6);
3769
3768
  }
3770
3769
  return { line: 1, column: 1 };
3771
3770
  }
3772
- function ko(e6, t5, n6) {
3771
+ function Oo2(e6, t5, n6) {
3773
3772
  if ("string" != typeof e6) {
3774
- if (Array.isArray(e6)) e6.forEach((e7, i6) => ko(e7, [...t5, i6], n6));
3775
- else if (Eo2(e6)) {
3776
- if ("string" == typeof e6.key && ko(e6.key, [...t5, "key"], n6), Eo2(e6.map)) for (const [i6, o5] of Object.entries(e6.map)) ko(o5, [...t5, "map", i6], n6);
3777
- Array.isArray(e6.set) && e6.set.forEach((e7, i6) => ko(e7, [...t5, "set", i6], n6)), Array.isArray(e6.loop) && "this" !== e6.loop[0] && ko(e6.loop[0], [...t5, "loop", 0], n6);
3773
+ if (Array.isArray(e6)) e6.forEach((e7, i6) => Oo2(e7, [...t5, i6], n6));
3774
+ else if (To(e6)) {
3775
+ if ("string" == typeof e6.key && Oo2(e6.key, [...t5, "key"], n6), To(e6.map)) for (const [i6, o5] of Object.entries(e6.map)) Oo2(o5, [...t5, "map", i6], n6);
3776
+ Array.isArray(e6.set) && e6.set.forEach((e7, i6) => Oo2(e7, [...t5, "set", i6], n6)), Array.isArray(e6.loop) && "this" !== e6.loop[0] && Oo2(e6.loop[0], [...t5, "loop", 0], n6);
3778
3777
  }
3779
3778
  } else e6.startsWith("$") || n6(e6, t5);
3780
3779
  }
3781
- function Co2(e6, t5, n6) {
3782
- if (Eo2(e6)) for (const [i6, o5] of Object.entries(e6)) ko(o5, [...t5, i6], n6);
3780
+ function Eo2(e6, t5, n6) {
3781
+ if (To(e6)) for (const [i6, o5] of Object.entries(e6)) Oo2(o5, [...t5, i6], n6);
3783
3782
  }
3784
- function xo2(e6, t5, n6) {
3785
- if (ko(e6.data, [...t5, "data"], n6), Co2(e6.policy, [...t5, "policy"], n6), Eo2(e6.mapping)) {
3786
- for (const [i6, o5] of Object.entries(e6.mapping)) if (Eo2(o5)) for (const [e7, r6] of Object.entries(o5)) {
3783
+ function Po(e6, t5, n6) {
3784
+ if (Oo2(e6.data, [...t5, "data"], n6), Eo2(e6.policy, [...t5, "policy"], n6), To(e6.mapping)) {
3785
+ for (const [i6, o5] of Object.entries(e6.mapping)) if (To(o5)) for (const [e7, r6] of Object.entries(o5)) {
3787
3786
  const o6 = [...t5, "mapping", i6, e7];
3788
3787
  (Array.isArray(r6) ? r6 : [r6]).forEach((e8, t6) => {
3789
- if (!Eo2(e8)) return;
3788
+ if (!To(e8)) return;
3790
3789
  const i7 = Array.isArray(r6) ? [...o6, t6] : o6;
3791
- ko(e8.data, [...i7, "data"], n6), Co2(e8.policy, [...i7, "policy"], n6), Eo2(e8.extend) && (ko(e8.extend.data, [...i7, "extend", "data"], n6), Co2(e8.extend.policy, [...i7, "extend", "policy"], n6));
3790
+ Oo2(e8.data, [...i7, "data"], n6), Eo2(e8.policy, [...i7, "policy"], n6), To(e8.extend) && (Oo2(e8.extend.data, [...i7, "extend", "data"], n6), Eo2(e8.extend.policy, [...i7, "extend", "policy"], n6));
3792
3791
  });
3793
3792
  }
3794
3793
  }
3795
3794
  }
3796
- function jo2(e6, t5, n6, i6) {
3797
- Eo2(e6) && Array.isArray(e6.rules) && e6.rules.forEach((e7, o5) => {
3798
- if (!Eo2(e7)) return;
3795
+ function Do(e6, t5, n6, i6) {
3796
+ To(e6) && Array.isArray(e6.rules) && e6.rules.forEach((e7, o5) => {
3797
+ if (!To(e7)) return;
3799
3798
  const r6 = [...t5, "rules", o5];
3800
- if (ko(e7.key, [...r6, "key"], n6), Oo2(e7.match, [...r6, "match"], n6), Eo2(e7.update)) for (const [t6, n7] of Object.entries(e7.update)) ko(n7, [...r6, "update", t6], i6);
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);
3801
3800
  });
3802
3801
  }
3803
- function $o(e6, t5, n6) {
3804
- if (void 0 === e6 || (i6 = e6, !Ue3.safeParse(i6).success)) return;
3802
+ function Io2(e6, t5, n6) {
3803
+ if (void 0 === e6 || (i6 = e6, !Ge3.safeParse(i6).success)) return;
3805
3804
  var i6;
3806
3805
  const o5 = /* @__PURE__ */ new Set();
3807
- for (const i7 of Mi(e6)) for (const e7 of [...i7.via ?? [], i7]) {
3806
+ for (const i7 of Li(e6)) for (const e7 of [...i7.via ?? [], i7]) {
3808
3807
  if (!e7.match) continue;
3809
3808
  const i8 = e7.path.join(".");
3810
- o5.has(i8) || (o5.add(i8), Oo2(e7.match, [...t5, ...e7.path, "match"], n6));
3809
+ o5.has(i8) || (o5.add(i8), Ao(e7.match, [...t5, ...e7.path, "match"], n6));
3811
3810
  }
3812
3811
  }
3813
- function Oo2(e6, t5, n6) {
3814
- Eo2(e6) && (Array.isArray(e6.and) && e6.and.forEach((e7, i6) => Oo2(e7, [...t5, "and", i6], n6)), Array.isArray(e6.or) && e6.or.forEach((e7, i6) => Oo2(e7, [...t5, "or", i6], n6)), "string" == typeof e6.key && ko(e6.key, [...t5, "key"], n6));
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));
3815
3814
  }
3816
- function Eo2(e6) {
3815
+ function To(e6) {
3817
3816
  return "object" == typeof e6 && null !== e6 && !Array.isArray(e6);
3818
3817
  }
3819
- function Po(e6, t5) {
3820
- if (Eo2(t5)) for (const [n6, i6] of Object.entries(t5)) e6[n6] = i6;
3818
+ function Ro(e6, t5) {
3819
+ if (To(t5)) for (const [n6, i6] of Object.entries(t5)) e6[n6] = i6;
3821
3820
  }
3822
- function Do(e6) {
3821
+ function Mo(e6) {
3823
3822
  const t5 = {};
3824
- if (!Eo2(e6)) return t5;
3825
- const n6 = Eo2(e6.properties) ? e6.properties.data : void 0;
3826
- if (!Eo2(n6)) return t5;
3823
+ if (!To(e6)) return t5;
3824
+ const n6 = To(e6.properties) ? e6.properties.data : void 0;
3825
+ if (!To(n6)) return t5;
3827
3826
  const i6 = Array.isArray(n6.required) ? n6.required.filter((e7) => "string" == typeof e7) : [], o5 = n6.properties;
3828
- if (!Eo2(o5)) return t5;
3827
+ if (!To(o5)) return t5;
3829
3828
  for (const [e7, n7] of Object.entries(o5)) {
3830
3829
  const o6 = {};
3831
- Eo2(n7) && ("string" == typeof n7.type && (o6.type = n7.type), "string" == typeof n7.description && (o6.description = n7.description)), i6.includes(e7) && (o6.required = true), t5[e7] = o6;
3830
+ To(n7) && ("string" == typeof n7.type && (o6.type = n7.type), "string" == typeof n7.description && (o6.description = n7.description)), i6.includes(e7) && (o6.required = true), t5[e7] = o6;
3832
3831
  }
3833
3832
  return t5;
3834
3833
  }
3835
- function Io2(e6, t5) {
3834
+ function Jo(e6, t5) {
3836
3835
  const n6 = [], i6 = {};
3837
3836
  for (const [t6, o6] of Object.entries(e6)) {
3838
3837
  o6.required && n6.push(t6);
3839
3838
  const e7 = { type: o6.type };
3840
3839
  if (o6.description && (e7.description = o6.description), o6.pattern && (e7.pattern = o6.pattern), void 0 !== o6.minLength && (e7.minLength = o6.minLength), void 0 !== o6.maxLength && (e7.maxLength = o6.maxLength), void 0 !== o6.minimum && (e7.minimum = o6.minimum), void 0 !== o6.maximum && (e7.maximum = o6.maximum), o6.enum && (e7.enum = [...o6.enum]), void 0 !== o6.default && (e7.default = o6.default), "object" === o6.type && o6.properties) {
3841
3840
  const t7 = {};
3842
- for (const [e8, n7] of Object.entries(o6.properties)) t7[e8] = Ao(n7);
3841
+ for (const [e8, n7] of Object.entries(o6.properties)) t7[e8] = Fo(n7);
3843
3842
  e7.properties = t7;
3844
3843
  }
3845
- "array" === o6.type && o6.items && (e7.items = Ao(o6.items)), i6[t6] = e7;
3844
+ "array" === o6.type && o6.items && (e7.items = Fo(o6.items)), i6[t6] = e7;
3846
3845
  }
3847
3846
  const o5 = { type: "object", properties: i6 };
3848
3847
  return t5 && (o5.title = t5), n6.length > 0 && (o5.required = n6), o5;
3849
3848
  }
3850
- function Ao(e6) {
3849
+ function Fo(e6) {
3851
3850
  const t5 = { type: e6.type };
3852
3851
  if (e6.description && (t5.description = e6.description), e6.pattern && (t5.pattern = e6.pattern), void 0 !== e6.minLength && (t5.minLength = e6.minLength), void 0 !== e6.maxLength && (t5.maxLength = e6.maxLength), void 0 !== e6.minimum && (t5.minimum = e6.minimum), void 0 !== e6.maximum && (t5.maximum = e6.maximum), e6.enum && (t5.enum = [...e6.enum]), void 0 !== e6.default && (t5.default = e6.default), "object" === e6.type && e6.properties) {
3853
3852
  const n6 = {};
3854
- for (const [t6, i6] of Object.entries(e6.properties)) n6[t6] = Ao(i6);
3853
+ for (const [t6, i6] of Object.entries(e6.properties)) n6[t6] = Fo(i6);
3855
3854
  t5.properties = n6;
3856
3855
  }
3857
- return "array" === e6.type && e6.items && (t5.items = Ao(e6.items)), t5;
3856
+ return "array" === e6.type && e6.items && (t5.items = Fo(e6.items)), t5;
3858
3857
  }
3859
- function To(e6, t5) {
3860
- const n6 = { type: "array", items: Ao(e6) };
3858
+ function No(e6, t5) {
3859
+ const n6 = { type: "array", items: Fo(e6) };
3861
3860
  return void 0 !== t5?.minItems && (n6.minItems = t5.minItems), void 0 !== t5?.maxItems && (n6.maxItems = t5.maxItems), t5?.description && (n6.description = t5.description), t5?.title && (n6.title = t5.title), n6;
3862
3861
  }
3863
- function Ro(e6, t5 = "string", n6) {
3862
+ function zo(e6, t5 = "string", n6) {
3864
3863
  const i6 = { type: t5, enum: [...e6] };
3865
3864
  return n6?.description && (i6.description = n6.description), n6?.title && (i6.title = n6.title), i6;
3866
3865
  }
3867
- function Jo(e6, t5, n6) {
3868
- return To({ type: "object" }, { minItems: 2, maxItems: 2, description: n6 || "Tuple with exactly 2 elements [source, transform]" });
3866
+ function _o2(e6, t5, n6) {
3867
+ return No({ type: "object" }, { minItems: 2, maxItems: 2, description: n6 || "Tuple with exactly 2 elements [source, transform]" });
3869
3868
  }
3870
- function Mo(e6) {
3869
+ function Lo(e6) {
3871
3870
  const t5 = i4.toJSONSchema(e6, { target: "draft-7" });
3872
- return Fo(t5), t5;
3871
+ return qo2(t5), t5;
3873
3872
  }
3874
- function Fo(e6) {
3873
+ function qo2(e6) {
3875
3874
  const t5 = e6.properties;
3876
3875
  if (t5 && "object" == typeof t5) {
3877
3876
  Array.isArray(e6.required) && (e6.required = e6.required.filter((e7) => {
3878
3877
  const n6 = t5[e7];
3879
3878
  return !(n6 && "object" == typeof n6 && "default" in n6);
3880
3879
  }));
3881
- for (const [e7, n6] of Object.entries(t5)) n6 && "object" == typeof n6 && ("object" === n6.type && n6.properties && "string" != typeof n6.title && (n6.title = e7), Fo(n6));
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));
3882
3881
  }
3883
3882
  }
3884
- function er2(e6, t5) {
3883
+ function rr(e6, t5) {
3885
3884
  return { key: e6, operator: "eq", value: t5 };
3886
3885
  }
3887
- function tr(e6 = {}) {
3886
+ function sr2(e6 = {}) {
3888
3887
  const t5 = {};
3889
3888
  for (const [n6, i6] of Object.entries(e6)) t5[n6] = { type: n6, config: { next: i6 }, push: () => {
3890
3889
  } };
3891
3890
  return t5;
3892
3891
  }
3893
- function ir2(e6) {
3892
+ function cr2(e6) {
3894
3893
  return { ...e6, ingest: { ...e6.ingest } };
3895
3894
  }
3896
- function or2(e6, t5, n6) {
3897
- const i6 = tr(e6.nexts), o5 = [], r6 = (t6, s6, a5) => {
3895
+ function lr2(e6, t5, n6) {
3896
+ const i6 = sr2(e6.nexts), o5 = [], r6 = (t6, s6, a5) => {
3898
3897
  let c3 = t6;
3899
3898
  const l4 = { ids: [...a5.ids], stopped: false, edges: [...a5.edges] };
3900
3899
  for (let t7 = 0; t7 < 256; t7++) {
3901
- const t8 = Ji(c3, s6, i6);
3900
+ const t8 = _i(c3, s6, i6);
3902
3901
  if ("done" === t8.kind) break;
3903
3902
  if ("stop" === t8.kind) {
3904
3903
  l4.stopped = true;
3905
3904
  break;
3906
3905
  }
3907
3906
  if ("fork" === t8.kind) {
3908
- for (const e7 of t8.branches) r6(e7, ir2(s6), l4);
3907
+ for (const e7 of t8.branches) r6(e7, cr2(s6), l4);
3909
3908
  return;
3910
3909
  }
3911
3910
  n6 && n6(t8.id);
@@ -3916,64 +3915,64 @@ function or2(e6, t5, n6) {
3916
3915
  }
3917
3916
  o5.push(l4);
3918
3917
  };
3919
- return r6(Ai(e6.spec), ir2(t5), { ids: [], stopped: false, edges: [] }), o5;
3918
+ return r6(Fi(e6.spec), cr2(t5), { ids: [], stopped: false, edges: [] }), o5;
3920
3919
  }
3921
- function rr(e6) {
3922
- return e6.map((e7) => e7.stopped ? [...e7.ids, Xo] : e7.ids);
3920
+ function dr2(e6) {
3921
+ return e6.map((e7) => e7.stopped ? [...e7.ids, or2] : e7.ids);
3923
3922
  }
3924
- function cr2(e6) {
3923
+ function fr2(e6) {
3925
3924
  const t5 = (function(e7) {
3926
3925
  return e7.config?.mapping ?? e7.mapping;
3927
3926
  })(e6);
3928
3927
  if (void 0 === t5) return [];
3929
- const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping";
3928
+ const n6 = void 0 !== e6.config?.mapping ? "config.mapping" : "mapping", i6 = "config.mapping" === n6 && void 0 !== e6.mapping;
3930
3929
  if (void 0 !== e6.code || void 0 !== e6.package) {
3931
- return [`\`${n6}\` is ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs it; a mapping applies only to a transformer without code.`];
3930
+ return [`${i6 ? "`config.mapping` and `mapping` are" : `\`${n6}\` is`} ignored: a transformer with \`${void 0 !== e6.code ? "code" : "package"}\` never runs ${i6 ? "them" : "it"}; a mapping applies only to a transformer without code.`];
3932
3931
  }
3933
- const i6 = [];
3934
- "config.mapping" === n6 && void 0 !== e6.mapping && i6.push("`mapping` is overridden: `config.mapping` wins; remove one.");
3935
- const o5 = (function(e7, t6) {
3936
- if (!gi(e7)) return [];
3932
+ const o5 = [];
3933
+ i6 && o5.push("`mapping` is overridden: `config.mapping` wins; remove one.");
3934
+ const r6 = (function(e7, t6) {
3935
+ if (!Si(e7)) return [];
3937
3936
  const n7 = [];
3938
- for (const i8 of sr2) void 0 !== e7[i8] && n7.push(`${t6}.${i8}`);
3937
+ for (const i8 of pr2) void 0 !== e7[i8] && n7.push(`${t6}.${i8}`);
3939
3938
  const i7 = e7.mapping;
3940
- if (!gi(i7)) return n7;
3941
- for (const [e8, o6] of Object.entries(i7)) if (gi(o6)) for (const [i8, r6] of Object.entries(o6)) (mi(r6) ? r6 : [r6]).forEach((o7, s6) => {
3942
- if (!gi(o7)) return;
3943
- const a5 = `${t6}.mapping.${e8}.${i8}${mi(r6) ? `[${s6}]` : ""}`;
3944
- for (const e9 of ar2) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
3939
+ if (!Si(i7)) return n7;
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
+ if (!Si(o7)) return;
3942
+ const a5 = `${t6}.mapping.${e8}.${i8}${yi(r7) ? `[${s6}]` : ""}`;
3943
+ for (const e9 of ur2) void 0 !== o7[e9] && n7.push(`${a5}.${e9}`);
3945
3944
  });
3946
3945
  return n7;
3947
3946
  })(t5, n6);
3948
- return o5.length > 0 && i6.push(`${o5.map((e7) => `\`${e7}\``).join(", ")} ${1 === o5.length ? "does" : "do"} nothing at the transformer position; only \`policy\` and a rule's \`condition\`, \`policy\`, \`name\` and \`ignore\` apply.`), i6;
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;
3949
3948
  }
3950
- function ur2(e6, t5) {
3949
+ function br(e6, t5) {
3951
3950
  const n6 = (function(e7) {
3952
- return /* @__PURE__ */ new Set([...Object.keys(lr2[e7]), ...dr2]);
3951
+ return /* @__PURE__ */ new Set([...Object.keys(mr2[e7]), ...gr]);
3953
3952
  })(t5);
3954
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(", ")}.` };
3955
3954
  const i6 = void 0 !== e6.package, o5 = void 0 !== e6.import, r6 = void 0 !== e6.code;
3956
- 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 && pr2.test(e6.import) ? { ok: true } : { ok: false, code: "INVALID_IMPORT", key: "import", reason: `import must match ${pr2.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 && hr.test(e6.import) ? { ok: true } : { ok: false, code: "INVALID_IMPORT", key: "import", reason: `import must match ${hr.source}. Got: ${JSON.stringify(e6.import)}.` };
3957
3956
  }
3958
- function fr2(e6) {
3957
+ function vr(e6) {
3959
3958
  return (function(e7) {
3960
- return gi(e7) && "push" in e7;
3959
+ return Si(e7) && "push" in e7;
3961
3960
  })(e6) || "string" == typeof e6;
3962
3961
  }
3963
- function mr2(e6, t5, n6) {
3962
+ function yr(e6, t5, n6) {
3964
3963
  if ("Transformer" === e6) {
3965
- const e7 = ur2({ ...n6 }, "Transformer");
3964
+ const e7 = br({ ...n6 }, "Transformer");
3966
3965
  if (!e7.ok) throw new Error(`Transformer "${t5}": ${e7.reason ?? "invalid entry."}`);
3967
3966
  return;
3968
3967
  }
3969
- const i6 = !!n6.package, o5 = fr2(n6.code);
3968
+ const i6 = !!n6.package, o5 = vr(n6.code);
3970
3969
  if (i6 && o5) throw new Error(`${e6} "${t5}": Cannot specify both package and code. Use one or the other.`);
3971
3970
  if (!i6 && !o5) throw new Error(`${e6} "${t5}": Must specify either package or code.`);
3972
3971
  }
3973
- function hr(e6, t5) {
3974
- for (const n6 of Object.keys(e6)) if (!gr.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())}")`);
3972
+ function wr(e6, t5) {
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())}")`);
3975
3974
  }
3976
- function br(e6, t5) {
3975
+ function kr(e6, t5) {
3977
3976
  const n6 = [];
3978
3977
  function i6(e7, t6) {
3979
3978
  if ("string" == typeof e7 && e7.startsWith("$store.")) n6.push({ ref: e7.slice(7), location: t6 });
@@ -3987,7 +3986,7 @@ function br(e6, t5) {
3987
3986
  throw new Error(`Invalid store references: ${n7}. ${e7}`);
3988
3987
  }
3989
3988
  }
3990
- function Sr(e6, t5) {
3989
+ function jr(e6, t5) {
3991
3990
  switch (t5) {
3992
3991
  case "sources":
3993
3992
  return e6.sources;
@@ -3999,73 +3998,73 @@ function Sr(e6, t5) {
3999
3998
  return e6.stores;
4000
3999
  }
4001
4000
  }
4002
- function wr(e6) {
4003
- return "string" == typeof e6 || gi(e6) && "push" in e6;
4001
+ function $r2(e6) {
4002
+ return "string" == typeof e6 || Si(e6) && "push" in e6;
4004
4003
  }
4005
- function kr(e6) {
4004
+ function Or(e6) {
4006
4005
  return e6 instanceof Error ? e6.message : String(e6);
4007
4006
  }
4008
- function xr(e6, t5) {
4007
+ function Pr2(e6, t5) {
4009
4008
  const n6 = [], i6 = e6.stores || {}, o5 = (e7, t6) => {
4010
- if (!gi(e7) || "string" != typeof e7.store) return;
4009
+ if (!Si(e7) || "string" != typeof e7.store) return;
4011
4010
  const o6 = e7.store;
4012
4011
  if (o6.startsWith("$") || "__cache" === o6) return;
4013
4012
  const r7 = i6[o6];
4014
- r7 ? gi(r7.config) && true === r7.config.file && n6.push({ path: t6, message: `State cannot use store "${o6}": it sets file: true. Handle byte stores in a transformer.`, code: "STATE_STORE_FILE" }) : n6.push({ path: t6, message: `State store "${o6}" is not declared in flow.stores.`, code: "STATE_STORE_UNKNOWN" });
4013
+ r7 ? Si(r7.config) && true === r7.config.file && n6.push({ path: t6, message: `State cannot use store "${o6}": it sets file: true. Handle byte stores in a transformer.`, code: "STATE_STORE_FILE" }) : n6.push({ path: t6, message: `State store "${o6}" is not declared in flow.stores.`, code: "STATE_STORE_UNKNOWN" });
4015
4014
  }, r6 = (e7, t6) => {
4016
4015
  Array.isArray(e7) ? e7.forEach((e8, n7) => o5(e8, `${t6}.${n7}`)) : o5(e7, t6);
4017
4016
  };
4018
- for (const n7 of Cr2) {
4019
- const i7 = Sr(e6, n7);
4017
+ for (const n7 of Er2) {
4018
+ const i7 = jr(e6, n7);
4020
4019
  if (i7) for (const [e7, o6] of Object.entries(i7)) {
4021
4020
  const i8 = `flows.${t5}.${n7}.${e7}`;
4022
- "state" in o6 && r6(o6.state, `${i8}.state`), gi(o6.config) && r6(o6.config.state, `${i8}.config.state`);
4021
+ "state" in o6 && r6(o6.state, `${i8}.state`), Si(o6.config) && r6(o6.config.state, `${i8}.config.state`);
4023
4022
  }
4024
4023
  }
4025
4024
  return n6;
4026
4025
  }
4027
- function jr(e6) {
4028
- const t5 = [], n6 = [], i6 = {}, o5 = e6.flows, r6 = gi(o5) ? Object.keys(o5) : [];
4029
- if (i6.flowNames = r6, i6.flowCount = r6.length, !gi(o5) || 0 === r6.length) return t5.push({ path: "flows", message: "At least one flow is required", code: "EMPTY_FLOWS" }), { valid: false, type: "flow", errors: t5, warnings: [], details: i6 };
4026
+ function Dr2(e6) {
4027
+ const t5 = [], n6 = [], i6 = {}, o5 = e6.flows, r6 = Si(o5) ? Object.keys(o5) : [];
4028
+ if (i6.flowNames = r6, i6.flowCount = r6.length, !Si(o5) || 0 === r6.length) return t5.push({ path: "flows", message: "At least one flow is required", code: "EMPTY_FLOWS" }), { valid: false, type: "flow", errors: t5, warnings: [], details: i6 };
4030
4029
  for (const [e7, i7] of Object.entries(o5)) {
4031
- for (const n7 of vr) {
4032
- const o7 = Sr(i7, n7);
4030
+ for (const n7 of Cr2) {
4031
+ const o7 = jr(i7, n7);
4033
4032
  if (o7) try {
4034
- hr(o7, n7);
4033
+ wr(o7, n7);
4035
4034
  } catch (i8) {
4036
- t5.push({ path: `flows.${e7}.${n7}`, message: kr(i8), code: "INVALID_COMPONENT_NAME" });
4035
+ t5.push({ path: `flows.${e7}.${n7}`, message: Or(i8), code: "INVALID_COMPONENT_NAME" });
4037
4036
  }
4038
4037
  }
4039
- for (const n7 of vr) {
4040
- const o7 = Sr(i7, n7);
4038
+ for (const n7 of Cr2) {
4039
+ const o7 = jr(i7, n7);
4041
4040
  if (!o7) continue;
4042
- const r8 = yr[n7];
4041
+ const r8 = xr[n7];
4043
4042
  if ("Transformer" !== r8) {
4044
- for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package || wr(s6.code)) try {
4045
- mr2(r8, i8, s6);
4043
+ for (const [i8, s6] of Object.entries(o7)) if ("Store" !== r8 || s6.package || $r2(s6.code)) try {
4044
+ yr(r8, i8, s6);
4046
4045
  } catch (o8) {
4047
- t5.push({ path: `flows.${e7}.${n7}.${i8}`, message: kr(o8), code: "INVALID_REFERENCE" });
4046
+ t5.push({ path: `flows.${e7}.${n7}.${i8}`, message: Or(o8), code: "INVALID_REFERENCE" });
4048
4047
  }
4049
4048
  }
4050
4049
  }
4051
4050
  const o6 = i7.transformers;
4052
4051
  if (o6) for (const [i8, r8] of Object.entries(o6)) {
4053
- const o7 = `flows.${e7}.transformers.${i8}`, s6 = ur2({ ...r8 }, "Transformer");
4052
+ const o7 = `flows.${e7}.transformers.${i8}`, s6 = br({ ...r8 }, "Transformer");
4054
4053
  s6.ok || t5.push({ path: o7, message: s6.reason || "Invalid transformer entry.", code: s6.code });
4055
4054
  const { config: a5 } = r8;
4056
- for (const e8 of cr2({ ...r8, config: gi(a5) ? a5 : void 0 })) n6.push({ path: o7, message: e8, code: "TRANSFORMER_MAPPING_NO_OP" });
4055
+ for (const e8 of fr2({ ...r8, config: Si(a5) ? a5 : void 0 })) n6.push({ path: o7, message: e8, code: "TRANSFORMER_MAPPING_NO_OP" });
4057
4056
  }
4058
4057
  const r7 = new Set(Object.keys(i7.stores || {}));
4059
4058
  try {
4060
- br(i7, r7);
4059
+ kr(i7, r7);
4061
4060
  } catch (n7) {
4062
- t5.push({ path: `flows.${e7}`, message: kr(n7), code: "STORE_REFERENCE_NOT_FOUND" });
4061
+ t5.push({ path: `flows.${e7}`, message: Or(n7), code: "STORE_REFERENCE_NOT_FOUND" });
4063
4062
  }
4064
- t5.push(...xr(i7, e7));
4063
+ t5.push(...Pr2(i7, e7));
4065
4064
  }
4066
4065
  return { valid: 0 === t5.length, type: "flow", errors: t5, warnings: n6, details: i6 };
4067
4066
  }
4068
- 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, M3, F3, N4, z4, _2, L4, q3, W4, U3, B3, H3, Z4, V3, 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, Je3, Me2, Fe3, Ne3, ze3, _e2, Le2, qe, We2, Ue3, Be2, He3, Ze3, Ve2, Ge3, Ke2, Qe2, Ye3, Xe2, nt3, it2, ot3, rt3, st2, 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, Jt2, Mt2, Ft3, Nt2, zt2, _t2, Lt3, qt2, Wt2, Ut3, Bt2, Ht2, Zt2, Vt2, 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, Tn2, Rn2, Jn2, Mn, Fn3, Nn2, zn2, _n2, Ln2, qn2, Wn3, Un2, Bn3, Kn2, Qn3, Yn2, Xn2, ei, ti, ni, ii, oi, ri, ai, ci, li, di, pi, ui, fi, yi, Oi, Ni, zi, _i, Li, Zi, Gi, Ki, Qi, Yi, Xi, eo2, io, oo, ro2, co, lo3, po2, yo2, So2, wo3, zo, Yo, Xo, nr2, sr2, ar2, lr2, dr2, pr2, gr, vr, yr, Cr2;
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;
4069
4068
  var init_dev = __esm({
4070
4069
  "../core/dist/dev.mjs"() {
4071
4070
  "use strict";
@@ -4075,7 +4074,7 @@ var init_dev = __esm({
4075
4074
  for (var i6 in n6) e5(t5, i6, { get: n6[i6], enumerable: true });
4076
4075
  };
4077
4076
  n4 = {};
4078
- t4(n4, { BaseContextConfig: () => F3, CacheRuleSchema: () => Ke2, CacheSchema: () => Qe2, CacheSchemas: () => Be2, ClickIdEntrySchema: () => di, CodeSchema: () => ai, CollectorSchemas: () => Dt3, ConsentSchema: () => V3, ContractActionsSchema: () => Nn2, ContractRuleSchema: () => _n2, ContractSchema: () => Ln2, ContractSchemaEntry: () => Fn3, Counter: () => d2, CredentialsSchema: () => ui, DeepPartialEventSchema: () => ne3, DestinationSchemas: () => Te2, DestinationsMapConfig: () => _2, EntitiesSchema: () => X2, EntitySchema: () => Y3, EventCacheRuleSchema: () => He3, EventCacheSchema: () => Ze3, EventSchema: () => ee3, FlowBundlePackageSchema: () => xn, FlowBundleSchema: () => jn, FlowCodeSchema: () => $n, FlowConfigSchema: () => Wn3, FlowDestinationSchema: () => Jn2, FlowJsonSchema: () => Bn3, FlowSchema: () => Un2, FlowSchemas: () => hn2, FlowSourceSchema: () => Tn2, FlowStoreSchema: () => Mn, FlowTransformerSchema: () => Rn2, GenericEnvConfig: () => I3, GenericSettingsConfig: () => D3, HandlersConfig: () => x3, HintSchema: () => ci, HintsSchema: () => li, IdConfig: () => O3, Identifier: () => c2, InitConfig: () => E2, LoggerConfigSchema: () => ot3, LoggerHandlerSchema: () => it2, LoopSchema: () => me2, MapSchema: () => he2, MappingResultSchema: () => Ce2, MappingSchemas: () => pe2, MatchExpressionSchema: () => Fe3, MatcherSchemas: () => Re2, OptionalPrimitiveValue: () => u3, OrderedPropertiesSchema: () => H3, PartialEventSchema: () => te2, PolicySchema: () => ve2, PrimaryConfig: () => P4, PrimitiveValue: () => p2, ProcessingControlConfig: () => N4, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, QueueConfig: () => $3, RequiredBoolean: () => a4, RequiredNumber: () => s4, RequiredString: () => r4, RouteSchema: () => Ue3, RuleSchema: () => Se2, RulesSchema: () => we2, RuntimeInstanceConfig: () => M3, ServiceAccountSchema: () => pi, SetSchema: () => ge2, SourceSchema: () => Q3, SourceSchemas: () => Bt2, SourceTypeSchema: () => Z4, SourcesMapConfig: () => z4, StateSchema: () => nt3, StoreCacheRuleSchema: () => Ve2, StoreCacheSchema: () => Ge3, StoreSchemas: () => pn2, Timestamp: () => l3, TransformerSchemas: () => sn2, UserSchema: () => G3, UtilitySchemas: () => f3, ValidateEventsSchema: () => In, ValueConfigSchema: () => be2, ValueSchema: () => ue2, ValuesSchema: () => fe2, VerboseConfig: () => j3, WalkerOSSchemas: () => L4, configJsonSchema: () => Kn2, consentJsonSchema: () => de2, contractJsonSchema: () => oi, contractRuleJsonSchema: () => ii, createArraySchema: () => To, createConsentConfig: () => J3, createDataTransformationConfig: () => A3, createEnumSchema: () => Ro, createMappingRulesConfig: () => T4, createObjectSchema: () => Io2, createPolicyConfig: () => R3, createTupleSchema: () => Jo, credentialsJsonSchema: () => fi, destinationJsonSchema: () => ei, entityJsonSchema: () => ce3, eventJsonSchema: () => ie3, flowConfigJsonSchema: () => Yn2, flowJsonSchema: () => Qn3, loopJsonSchema: () => $e2, mapJsonSchema: () => Ee2, orderedPropertiesJsonSchema: () => ae3, parseConfig: () => Hn3, parseFlow: () => Vn2, partialEventJsonSchema: () => oe2, policyJsonSchema: () => Pe2, propertiesJsonSchema: () => se3, ruleJsonSchema: () => De2, rulesJsonSchema: () => Ie2, safeParseConfig: () => Zn, safeParseFlow: () => Gn3, setJsonSchema: () => Oe2, sourceJsonSchema: () => Xn2, sourceTypeJsonSchema: () => le2, storeJsonSchema: () => ni, transformerJsonSchema: () => ti, userJsonSchema: () => re2, validateEventsJsonSchema: () => ri, validateFlowConfig: () => Vi, valueConfigJsonSchema: () => je2, valueJsonSchema: () => xe2, z: () => i4, zodToSchema: () => Mo });
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 });
4079
4078
  r4 = i4.string();
4080
4079
  s4 = i4.number();
4081
4080
  a4 = i4.boolean();
@@ -4104,85 +4103,90 @@ var init_dev = __esm({
4104
4103
  P4 = i4.object({ primary: i4.boolean().describe("Mark as primary (only one can be primary)").optional() }).partial();
4105
4104
  D3 = i4.object({ settings: i4.any().optional().describe("Implementation-specific configuration") }).partial();
4106
4105
  I3 = i4.object({ env: i4.any().optional().describe("Environment dependencies (platform-specific)") }).partial();
4107
- M3 = i4.object({ type: i4.string().optional().describe("Instance type identifier"), config: i4.unknown().describe("Instance configuration") }).partial();
4106
+ J3 = i4.object({ type: i4.string().optional().describe("Instance type identifier"), config: i4.unknown().describe("Instance configuration") }).partial();
4108
4107
  F3 = i4.object({ collector: i4.unknown().describe("Collector instance (runtime object)"), config: i4.unknown().describe("Configuration"), env: i4.unknown().describe("Environment dependencies") }).partial();
4109
4108
  N4 = i4.object({ ignore: i4.boolean().describe("Set to true to skip processing").optional(), condition: i4.string().optional().describe("Condition function: return true to process") }).partial();
4110
4109
  z4 = i4.object({ sources: i4.record(i4.string(), i4.unknown()).describe("Map of source instances") }).partial();
4111
4110
  _2 = i4.object({ destinations: i4.record(i4.string(), i4.unknown()).describe("Map of destination instances") }).partial();
4112
4111
  L4 = {};
4113
- t4(L4, { ConsentSchema: () => V3, DeepPartialEventSchema: () => ne3, EntitiesSchema: () => X2, EntitySchema: () => Y3, EventSchema: () => ee3, OrderedPropertiesSchema: () => H3, PartialEventSchema: () => te2, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, SourceFieldsSchema: () => K4, SourceSchema: () => Q3, SourceTypeSchema: () => Z4, UserSchema: () => G3, consentJsonSchema: () => de2, entityJsonSchema: () => ce3, eventJsonSchema: () => ie3, orderedPropertiesJsonSchema: () => ae3, partialEventJsonSchema: () => oe2, propertiesJsonSchema: () => se3, sourceTypeJsonSchema: () => le2, userJsonSchema: () => re2 });
4112
+ t4(L4, { ConsentSchema: () => Z4, DeepPartialEventSchema: () => ie3, EntitiesSchema: () => ee3, EntitySchema: () => X2, EventSchema: () => te2, OrderedPropertiesSchema: () => V3, PartialEventSchema: () => ne3, PropertiesSchema: () => B3, PropertySchema: () => U3, PropertyTypeSchema: () => W4, SourceFieldsSchema: () => Q3, SourceSchema: () => Y3, SourceTypeSchema: () => H3, UserFieldsSchema: () => G3, UserSchema: () => K4, consentJsonSchema: () => pe2, entityJsonSchema: () => le2, eventJsonSchema: () => oe2, orderedPropertiesJsonSchema: () => ce3, partialEventJsonSchema: () => re2, propertiesJsonSchema: () => ae3, sourceTypeJsonSchema: () => de2, userJsonSchema: () => se3 });
4114
4113
  W4 = i4.lazy(() => i4.union([i4.boolean(), i4.string(), i4.number(), i4.record(i4.string(), U3)])).meta({ id: "WalkerOSPropertyType", title: "WalkerOS.PropertyType", description: "Base property value types (boolean, string, number, or nested Property record)." });
4115
4114
  U3 = i4.lazy(() => i4.union([W4, i4.array(W4)])).meta({ id: "WalkerOSProperty", title: "WalkerOS.Property", description: "PropertyType or an array of PropertyType. Recursive structure for nested objects and arrays." });
4116
4115
  B3 = i4.record(i4.string(), U3.optional()).meta({ id: "WalkerOSProperties", title: "WalkerOS.Properties", description: "Flexible property collection with optional values." }).describe("Flexible property collection with optional values");
4117
- H3 = i4.record(i4.string(), i4.tuple([U3, i4.number()]).optional()).meta({ id: "WalkerOSOrderedProperties", title: "WalkerOS.OrderedProperties", description: "Ordered properties with [value, order] tuples for priority control." }).describe("Ordered properties with [value, order] tuples for priority control");
4118
- Z4 = i4.union([i4.enum(["web", "server", "app", "other"]), i4.string()]).meta({ id: "WalkerOSSourceType", title: "WalkerOS.SourceType", description: "Source type identifier. Standard: web, server, app, other. Extensible to custom strings." }).describe("Source type: web, server, app, other, or custom");
4119
- V3 = i4.record(i4.string(), i4.boolean()).meta({ id: "WalkerOSConsent", title: "WalkerOS.Consent", description: "Consent state mapping. Keys are consent groups (e.g. marketing, functional), values are booleans for granted/denied." }).describe("Consent requirement mapping (group name to state)");
4120
- G3 = B3.and(i4.object({ id: i4.string().optional().describe("User identifier"), device: i4.string().optional().describe("Device identifier"), session: i4.string().optional().describe("Session identifier"), hash: i4.string().optional().describe("Hashed identifier"), address: i4.string().optional().describe("User address"), email: i4.string().email().optional().describe("User email address"), phone: i4.string().optional().describe("User phone number"), userAgent: i4.string().optional().describe("Browser user agent string"), browser: i4.string().optional().describe("Browser name"), browserVersion: i4.string().optional().describe("Browser version"), deviceType: i4.string().optional().describe("Device type (mobile, desktop, tablet)"), os: i4.string().optional().describe("Operating system"), osVersion: i4.string().optional().describe("Operating system version"), screenSize: i4.string().optional().describe("Screen dimensions"), language: i4.string().optional().describe("User language"), country: i4.string().optional().describe("User country"), region: i4.string().optional().describe("User region/state"), city: i4.string().optional().describe("User city"), zip: i4.string().optional().describe("User postal code"), timezone: i4.string().optional().describe("User timezone"), ip: i4.string().optional().describe("User IP address"), internal: i4.boolean().optional().describe("Internal user flag (employee, test user)") })).meta({ id: "WalkerOSUser", title: "WalkerOS.User", description: "User identification and attributes." }).describe("User identification and properties");
4121
- K4 = i4.object({ type: i4.string().describe("Source kind (browser, dataLayer, gtag, ...)"), platform: i4.string().optional().describe("Runtime platform (web, server, app, ios, android, terminal, ...)"), version: i4.string().optional().describe("Deployment version of the source emitter"), schema: i4.string().optional().describe('Event model spec version (collector defaults to "4")'), count: i4.number().int().nonnegative().optional().describe("Emission sequence per run"), trace: i4.string().optional().describe("Trace id shared by every event of a run (W3C trace-id shape)"), release: i4.record(i4.string(), i4.string()).optional().describe("Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings"), url: i4.string().optional(), referrer: i4.string().optional(), tool: i4.string().optional(), command: i4.string().optional() });
4122
- Q3 = B3.and(K4).meta({ id: "WalkerOSSource", title: "WalkerOS.Source", description: "Event source information (origin of the event)." }).describe("Event source information");
4123
- Y3 = i4.lazy(() => i4.object({ entity: i4.string().describe("Entity name"), data: B3.describe("Entity-specific properties"), nested: i4.array(Y3).optional().describe("Nested child entities"), context: H3.optional().describe("Entity context data") })).meta({ id: "WalkerOSEntity", title: "WalkerOS.Entity", description: "Nested entity structure with recursive nesting support." }).describe("Nested entity structure with recursive nesting support");
4124
- X2 = i4.array(Y3).meta({ id: "WalkerOSEntities", title: "WalkerOS.Entities", description: "Array of nested entities." }).describe("Array of nested entities");
4125
- ee3 = i4.object({ name: i4.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: B3.describe("Event-specific properties"), context: H3.describe("Ordered context properties with priorities"), globals: B3.describe("Global properties shared across events"), custom: B3.describe("Custom implementation-specific properties"), user: G3.describe("User identification and attributes"), nested: X2.describe("Related nested entities"), consent: V3.describe("Consent states at event time"), id: c2.describe("W3C span_id, 16 lowercase hex characters"), trigger: r4.describe("Event trigger identifier"), entity: r4.describe("Parsed entity from event name"), action: r4.describe("Parsed action from event name"), timestamp: l3.describe("Unix timestamp in milliseconds since epoch"), timing: s4.describe("Event processing timing information"), source: Q3.describe("Event source information") }).meta({ id: "WalkerOSEvent", title: "WalkerOS.Event", description: "Complete walkerOS event structure." }).describe("Complete walkerOS event structure");
4126
- te2 = ee3.partial().meta({ id: "WalkerOSPartialEvent", title: "WalkerOS.PartialEvent", description: "Partial event structure with all fields optional." }).describe("Partial event structure with all fields optional");
4127
- ne3 = ee3.partial().meta({ id: "WalkerOSDeepPartialEvent", title: "WalkerOS.DeepPartialEvent", description: "Partial event structure with all top-level fields optional." }).describe("Partial event structure with all top-level fields optional");
4128
- ie3 = o3(ee3);
4116
+ V3 = i4.record(i4.string(), i4.tuple([U3, i4.number()]).optional()).meta({ id: "WalkerOSOrderedProperties", title: "WalkerOS.OrderedProperties", description: "Ordered properties with [value, order] tuples for priority control." }).describe("Ordered properties with [value, order] tuples for priority control");
4117
+ H3 = i4.union([i4.enum(["web", "server", "app", "other"]), i4.string()]).meta({ id: "WalkerOSSourceType", title: "WalkerOS.SourceType", description: "Source type identifier. Standard: web, server, app, other. Extensible to custom strings." }).describe("Source type: web, server, app, other, or custom");
4118
+ Z4 = i4.record(i4.string(), i4.boolean()).meta({ id: "WalkerOSConsent", title: "WalkerOS.Consent", description: "Consent state mapping. Keys are consent groups (e.g. marketing, functional), values are booleans for granted/denied." }).describe("Consent requirement mapping (group name to state)");
4119
+ G3 = i4.object({ id: i4.string().optional().describe("User identifier"), device: i4.string().optional().describe("Device identifier"), session: i4.string().optional().describe("Session identifier"), hash: i4.string().optional().describe("Hashed identifier"), address: i4.string().optional().describe("User address"), email: i4.string().email().optional().describe("User email address"), phone: i4.string().optional().describe("User phone number"), userAgent: i4.string().optional().describe("Browser user agent string"), browser: i4.string().optional().describe("Browser name"), browserVersion: i4.string().optional().describe("Browser version"), deviceType: i4.string().optional().describe("Device type (mobile, desktop, tablet)"), os: i4.string().optional().describe("Operating system"), osVersion: i4.string().optional().describe("Operating system version"), screenSize: i4.string().optional().describe("Screen dimensions"), language: i4.string().optional().describe("User language"), country: i4.string().optional().describe("User country"), region: i4.string().optional().describe("User region/state"), city: i4.string().optional().describe("User city"), zip: i4.string().optional().describe("User postal code"), timezone: i4.string().optional().describe("User timezone"), ip: i4.string().optional().describe("User IP address"), internal: i4.boolean().optional().describe("Internal user flag (employee, test user)"), optout: i4.boolean().optional().describe("User opted out of tracking") });
4120
+ K4 = G3.catchall(U3.optional()).meta({ id: "WalkerOSUser", title: "WalkerOS.User", description: "User identification and attributes." }).describe("User identification and properties");
4121
+ Q3 = i4.object({ type: i4.string().describe("Source kind (browser, dataLayer, gtag, ...)"), platform: i4.string().optional().describe("Runtime platform (web, server, app, ios, android, terminal, ...)"), version: i4.string().optional().describe("Deployment version of the source emitter"), schema: i4.string().optional().describe('Event model spec version (collector defaults to "4")'), count: i4.number().int().nonnegative().optional().describe("Emission sequence per run"), trace: i4.string().optional().describe("Trace id shared by every event of a run (W3C trace-id shape)"), release: i4.record(i4.string(), i4.string()).optional().describe("Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings"), url: i4.string().optional(), referrer: i4.string().optional(), tool: i4.string().optional(), command: i4.string().optional() });
4122
+ Y3 = Q3.catchall(U3.optional()).meta({ id: "WalkerOSSource", title: "WalkerOS.Source", description: "Event source information (origin of the event)." }).describe("Event source information");
4123
+ X2 = i4.lazy(() => i4.object({ entity: i4.string().describe("Entity name"), data: B3.describe("Entity-specific properties"), nested: i4.array(X2).optional().describe("Nested child entities"), context: V3.optional().describe("Entity context data") })).meta({ id: "WalkerOSEntity", title: "WalkerOS.Entity", description: "Nested entity structure with recursive nesting support." }).describe("Nested entity structure with recursive nesting support");
4124
+ ee3 = i4.array(X2).meta({ id: "WalkerOSEntities", title: "WalkerOS.Entities", description: "Array of nested entities." }).describe("Array of nested entities");
4125
+ te2 = i4.object({ name: i4.string().describe('Event name in "entity action" format (e.g., "page view", "product add")'), data: B3.describe("Event-specific properties"), context: V3.describe("Ordered context properties with priorities"), globals: B3.describe("Global properties shared across events"), custom: B3.describe("Custom implementation-specific properties"), user: K4.describe("User identification and attributes"), nested: ee3.describe("Related nested entities"), consent: Z4.describe("Consent states at event time"), id: c2.describe("W3C span_id, 16 lowercase hex characters"), trigger: r4.describe("Event trigger identifier"), entity: r4.describe("Parsed entity from event name"), action: r4.describe("Parsed action from event name"), timestamp: l3.describe("Unix timestamp in milliseconds since epoch"), timing: s4.describe("Event processing timing information"), source: Y3.describe("Event source information") }).meta({ id: "WalkerOSEvent", title: "WalkerOS.Event", description: "Complete walkerOS event structure." }).describe("Complete walkerOS event structure");
4126
+ ne3 = te2.partial().meta({ id: "WalkerOSPartialEvent", title: "WalkerOS.PartialEvent", description: "Partial event structure with all fields optional." }).describe("Partial event structure with all fields optional");
4127
+ ie3 = te2.partial().meta({ id: "WalkerOSDeepPartialEvent", title: "WalkerOS.DeepPartialEvent", description: "Partial event structure with all top-level fields optional." }).describe("Partial event structure with all top-level fields optional");
4129
4128
  oe2 = o3(te2);
4130
- re2 = o3(G3);
4131
- se3 = o3(B3);
4132
- ae3 = o3(H3);
4133
- ce3 = o3(Y3);
4134
- le2 = o3(Z4);
4135
- de2 = o3(V3);
4136
- pe2 = {};
4137
- t4(pe2, { ConfigSchema: () => ke2, LoopSchema: () => me2, MapSchema: () => he2, PolicySchema: () => ve2, ResultSchema: () => Ce2, RulePatchSchema: () => ye2, RuleSchema: () => Se2, RulesSchema: () => we2, SetSchema: () => ge2, ValueConfigSchema: () => be2, ValueSchema: () => ue2, ValuesSchema: () => fe2, configJsonSchema: () => Ae2, loopJsonSchema: () => $e2, mapJsonSchema: () => Ee2, policyJsonSchema: () => Pe2, ruleJsonSchema: () => De2, rulesJsonSchema: () => Ie2, setJsonSchema: () => Oe2, valueConfigJsonSchema: () => je2, valueJsonSchema: () => xe2 });
4138
- ue2 = i4.lazy(() => i4.union([i4.string().describe('String value or property path (e.g., "data.id")'), i4.number().describe("Numeric value"), i4.boolean().describe("Boolean value"), i4.lazy(() => q3), i4.array(ue2).describe("Array of values")])).meta({ id: "MappingValue", title: "Mapping.Value", description: "Polymorphic transform primitive used in every mapping field. A string path, constant, operator object (map/loop/set/condition/consent), or array of values." });
4139
- fe2 = i4.array(ue2).meta({ id: "MappingValues", title: "Mapping.Values", description: "Array of transformation values." }).describe("Array of transformation values");
4140
- me2 = i4.lazy(() => i4.tuple([ue2, ue2]).describe("Loop transformation: [source, transform] tuple for array processing")).meta({ id: "MappingLoop", title: "Mapping.Loop", description: "Loop tuple [source, transform] for iterating and transforming arrays.", minItems: 2, maxItems: 2 });
4141
- ge2 = i4.lazy(() => i4.array(ue2).describe("Set: Array of values for selection or combination")).meta({ id: "MappingSet", title: "Mapping.Set", description: "Set: array of values for selection or combination." });
4142
- he2 = i4.lazy(() => i4.record(i4.string(), ue2).describe("Map: Object mapping keys to transformation values")).meta({ id: "MappingMap", title: "Mapping.Map", description: "Map: object mapping keys to transformation values." });
4143
- be2 = q3 = i4.object({ key: i4.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: i4.union([i4.string(), i4.number(), i4.boolean()]).optional().describe("Static primitive value"), fn: i4.string().optional().describe("Custom transformation function as string (serialized)"), map: he2.optional().describe("Object mapping: transform event data to structured output"), loop: me2.optional().describe("Loop transformation: [source, transform] for array processing"), set: ge2.optional().describe("Set of values: combine or select from multiple values"), consent: V3.optional().describe("Required consent states to include this value"), condition: i4.string().optional().describe("Condition function as string: return true to include value"), validate: i4.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e6) => Object.keys(e6).length > 0, { message: "ValueConfig must have at least one property" }).meta({ id: "MappingValueConfig", title: "Mapping.ValueConfig", description: "Object-form value transformation with map/loop/set/condition/consent etc." }).describe("Value transformation configuration with multiple strategies");
4144
- ve2 = i4.record(i4.string(), ue2).meta({ id: "MappingPolicy", title: "Mapping.Policy", description: "Policy rules for event pre-processing (key \u2192 value transformation)." }).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
4145
- ye2 = i4.object({ name: i4.string().nullable().optional(), data: i4.union([ue2, fe2]).nullable().optional(), settings: i4.unknown().nullable().optional(), condition: i4.string().nullable().optional(), consent: V3.nullable().optional(), policy: ve2.nullable().optional(), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).nullable().optional(), include: i4.array(i4.string()).nullable().optional(), ignore: i4.boolean().nullable().optional(), silent: i4.boolean().nullable().optional() }).meta({ id: "MappingRulePatch", title: "Mapping.RulePatch", description: "Partial rule deep-merged onto a package-shipped default; a null value clears the inherited field." }).describe("Partial rule for `extend`; null clears an inherited field");
4146
- Se2 = i4.object({ name: i4.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), data: i4.union([ue2, fe2]).optional().describe("Data transformation rules for event"), settings: i4.unknown().optional().describe("Destination-specific settings for this event mapping"), condition: i4.string().optional().describe("Condition function as string: return true to process event"), consent: V3.optional().describe("Not enforced yet. To require consent for a destination, set consent in its config."), policy: ve2.optional().describe("Event-level policy overrides (applied after config-level policy)"), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Batch scheduling: bare number is the debounce wait window (legacy); object form supports wait/size/age."), include: i4.array(i4.string()).optional().describe('Event sections (e.g. ["context", "globals"]) flattened into context.data'), ignore: i4.boolean().optional().describe("Skip the event entirely. No push, no side effects. Use for suppression."), silent: i4.boolean().optional().describe("Run side effects (settings.identify, ...) but suppress the destination default push call."), extend: ye2.optional().describe("Merge mode: a partial rule deep-merged onto the package-shipped default at this key (instead of replacing it). A null value clears an inherited field."), remove: i4.array(i4.string()).optional().describe("Dotted paths stripped from the produced data payload after evaluation (applied last).") }).meta({ id: "MappingRule", title: "Mapping.Rule", description: "Configuration for transforming a single event at one stage of the flow (source or destination)." }).describe("Mapping rule for specific entity-action combination");
4147
- we2 = i4.record(i4.string(), i4.record(i4.string(), i4.union([Se2, i4.array(Se2)])).optional()).meta({ id: "MappingRules", title: "Mapping.Rules", description: 'Event mapping rules tree: entity \u2192 action \u2192 Rule (or Rule[]). Use "*" as wildcard for entity or action.' }).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
4148
- ke2 = i4.object({ consent: V3.optional().describe("Required consent states to process any events"), data: i4.union([ue2, fe2]).optional().describe("Global data transformation applied to all events"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), mapping: we2.optional().describe("Entity-action specific mapping rules"), policy: ve2.optional().describe("Pre-processing policy rules applied before mapping") }).meta({ id: "MappingConfig", title: "Mapping.Config", description: "Shared mapping configuration (consent, data, include, mapping, policy)." }).describe("Shared mapping configuration for sources and destinations");
4149
- Ce2 = i4.object({ eventMapping: Se2.optional().describe("Resolved mapping rule for event"), mappingKey: i4.string().optional().describe('Mapping key used (e.g., "product.view")') }).meta({ id: "MappingResult", title: "Mapping.Result", description: "Mapping resolution result (matched rule + key)." }).describe("Mapping resolution result");
4150
- xe2 = o3(ue2);
4151
- je2 = o3(be2);
4152
- $e2 = o3(me2);
4153
- Oe2 = o3(ge2);
4154
- Ee2 = o3(he2);
4155
- Pe2 = o3(ve2);
4156
- De2 = o3(Se2);
4157
- Ie2 = o3(we2);
4158
- Ae2 = o3(ke2);
4159
- Te2 = {};
4160
- t4(Te2, { BatchSchema: () => ft3, ConfigSchema: () => rt3, ContextSchema: () => ct3, DLQSchema: () => kt3, DataSchema: () => mt3, DestinationPolicySchema: () => at3, DestinationsSchema: () => vt3, InitDestinationsSchema: () => bt3, InitSchema: () => ht2, InstanceSchema: () => gt3, PartialConfigSchema: () => st2, PushBatchContextSchema: () => dt3, PushContextSchema: () => lt3, PushEventSchema: () => pt3, PushEventsSchema: () => ut2, PushResultSchema: () => St3, RefSchema: () => yt3, ResultSchema: () => wt3, batchJsonSchema: () => Ot2, configJsonSchema: () => Ct2, contextJsonSchema: () => jt3, instanceJsonSchema: () => Et2, partialConfigJsonSchema: () => xt2, pushContextJsonSchema: () => $t3, resultJsonSchema: () => Pt2 });
4161
- Re2 = {};
4162
- t4(Re2, { MatchExpressionSchema: () => Fe3, RouteSchema: () => Ue3 });
4163
- Je3 = i4.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]).meta({ id: "MatcherOperator", title: "Matcher.Operator", description: "Supported operators for a match condition." });
4164
- Me2 = i4.object({ key: i4.string(), operator: Je3, value: i4.string(), not: i4.boolean().optional() }).meta({ id: "MatcherCondition", title: "Matcher.Condition", description: "Single match condition (key, operator, value, optional not)." });
4165
- Fe3 = i4.union([Me2, i4.object({ and: i4.array(i4.lazy(() => Fe3)) }), i4.object({ or: i4.array(i4.lazy(() => Fe3)) })]).meta({ id: "MatcherExpression", title: "Matcher.Expression", description: "Boolean expression tree of match conditions (leaf, and, or)." });
4166
- Ne3 = i4.strictObject({ match: Fe3.optional(), next: i4.lazy(() => Ue3) });
4167
- ze3 = i4.strictObject({ match: Fe3.optional(), one: i4.array(i4.lazy(() => Ue3)) });
4168
- _e2 = i4.strictObject({ match: Fe3.optional(), many: i4.array(i4.lazy(() => Ue3)) });
4169
- Le2 = i4.strictObject({ match: Fe3.optional(), stop: i4.literal(true) });
4170
- qe = i4.strictObject({ match: Fe3 });
4171
- We2 = i4.union([Ne3, ze3, _e2, Le2, qe]);
4172
- Ue3 = i4.union([i4.string(), i4.array(i4.lazy(() => Ue3)), We2]).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." });
4173
- Be2 = {};
4174
- t4(Be2, { CacheRuleSchema: () => Ke2, CacheSchema: () => Qe2, EventCacheRuleSchema: () => He3, EventCacheSchema: () => Ze3, StoreCacheRuleSchema: () => Ve2, StoreCacheSchema: () => Ge3 });
4175
- He3 = i4.object({ match: Fe3.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(), ue2).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." });
4176
- Ze3 = i4.object({ stop: i4.boolean().optional().describe("Stop the chain on cache HIT (default: false). When true, skip remaining steps and return cached value."), store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().optional().describe("Optional key prefix. Omit to write keys directly to the store. Same store + same key + same namespace = same cache entry."), rules: i4.array(He3).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "EventCacheConfig", title: "EventCache.Config", description: "Top-level cache configuration for an event-context pipeline step (source / transformer / destination)." });
4177
- Ve2 = i4.strictObject({ match: Fe3.optional().describe("Optional match expression evaluated against `{ key, value? }`. Omit for always-match."), ttl: i4.number().positive().describe("Time-to-live in seconds") }).meta({ id: "StoreCacheRule", title: "StoreCache.Rule", description: "Single store-cache rule: optional match against `{ key, value? }` and a TTL. No `key` (caller provides it) and no `update` (no event to mutate)." });
4178
- Ge3 = i4.strictObject({ store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().min(1).optional().describe("Optional key prefix. Omit to default to the host store id. Empty string is rejected."), rules: i4.array(Ve2).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "StoreCacheConfig", title: "StoreCache.Config", description: "Top-level cache configuration for a store wrapper. No `stop` (always falls through on miss); namespace defaults to the host store id." });
4179
- Ke2 = He3;
4180
- Qe2 = Ze3;
4181
- Ye3 = /^(event|ingest)(\..+)?$/;
4182
- Xe2 = /^(event|ingest)\..+$/;
4183
- nt3 = i4.object({ mode: i4.enum(["get", "set"]).describe("Direction: 'get' reads from the store, 'set' writes to it"), store: i4.string().optional().describe("Store id; defaults to the in-memory __cache store when omitted"), key: ue2.describe("Resolves against { event, ingest } to the store key. Paths need an event. or ingest. prefix"), value: ue2.optional().describe("set: resolves against { event, ingest } to the payload to store. get: its path is the write target, event. onto the event or ingest. into the ingest."), mapping: ue2.optional().describe("Shapes the value read (get) or the payload (set). Paths are relative to that value. The result merges into the target.") }).superRefine((e6, t5) => {
4184
- if (tt3(e6.key, "key", t5, Xe2), void 0 !== e6.value) {
4185
- if (tt3(e6.value, "value", t5, "get" === e6.mode ? Xe2 : Ye3), "get" === e6.mode) {
4129
+ re2 = o3(ne3);
4130
+ se3 = o3(K4);
4131
+ ae3 = o3(B3);
4132
+ ce3 = o3(V3);
4133
+ le2 = o3(X2);
4134
+ de2 = o3(H3);
4135
+ pe2 = o3(Z4);
4136
+ ue2 = {};
4137
+ t4(ue2, { ConfigSchema: () => Oe2, LoopSchema: () => he2, MapSchema: () => ve2, PolicySchema: () => Se2, ResultSchema: () => Ee2, RulePatchSchema: () => xe2, RuleSchema: () => je2, RulesSchema: () => $e2, SetSchema: () => be2, ValueConfigSchema: () => ye2, ValueSchema: () => me2, ValuesSchema: () => ge2, configJsonSchema: () => Fe3, loopJsonSchema: () => Ie2, mapJsonSchema: () => Te2, policyJsonSchema: () => Re2, ruleJsonSchema: () => Me2, rulesJsonSchema: () => Je3, setJsonSchema: () => Ae2, valueConfigJsonSchema: () => De2, valueJsonSchema: () => Pe2 });
4138
+ me2 = i4.lazy(() => i4.union([i4.string().describe('String value or property path (e.g., "data.id")'), i4.number().describe("Numeric value"), i4.boolean().describe("Boolean value"), i4.lazy(() => q3), i4.array(me2).describe("Array of values")])).meta({ id: "MappingValue", title: "Mapping.Value", description: "Polymorphic transform primitive used in every mapping field. A string path, constant, operator object (map/loop/set/condition/consent), or array of values." });
4139
+ ge2 = i4.array(me2).meta({ id: "MappingValues", title: "Mapping.Values", description: "Array of transformation values." }).describe("Array of transformation values");
4140
+ he2 = i4.lazy(() => i4.tuple([me2, me2]).describe("Loop transformation: [source, transform] tuple for array processing")).meta({ id: "MappingLoop", title: "Mapping.Loop", description: "Loop tuple [source, transform] for iterating and transforming arrays.", minItems: 2, maxItems: 2 });
4141
+ be2 = i4.lazy(() => i4.array(me2).describe("Set: Array of values for selection or combination")).meta({ id: "MappingSet", title: "Mapping.Set", description: "Set: array of values for selection or combination." });
4142
+ ve2 = i4.lazy(() => i4.record(i4.string(), me2).describe("Map: Object mapping keys to transformation values")).meta({ id: "MappingMap", title: "Mapping.Map", description: "Map: object mapping keys to transformation values." });
4143
+ ye2 = q3 = i4.object({ key: i4.string().optional().describe('Property path to extract from event (e.g., "data.id", "user.email")'), value: i4.union([i4.string(), i4.number(), i4.boolean()]).optional().describe("Static primitive value"), fn: i4.string().optional().describe("Custom transformation function as string (serialized)"), map: ve2.optional().describe("Object mapping: transform event data to structured output"), loop: he2.optional().describe("Loop transformation: [source, transform] for array processing"), set: be2.optional().describe("Set of values: combine or select from multiple values"), consent: Z4.optional().describe("Required consent states to include this value"), condition: i4.string().optional().describe("Condition function as string: return true to include value"), validate: i4.string().optional().describe("Validation function as string: return true if value is valid") }).refine((e6) => Object.keys(e6).length > 0, { message: "ValueConfig must have at least one property" }).meta({ id: "MappingValueConfig", title: "Mapping.ValueConfig", description: "Object-form value transformation with map/loop/set/condition/consent etc." }).describe("Value transformation configuration with multiple strategies");
4144
+ Se2 = i4.record(i4.string(), me2).meta({ id: "MappingPolicy", title: "Mapping.Policy", description: "Policy rules for event pre-processing (key \u2192 value transformation)." }).describe("Policy rules for event pre-processing (key \u2192 value mapping)");
4145
+ we2 = i4.record(i4.string(), i4.boolean().nullable());
4146
+ ke2 = i4.lazy(() => i4.union([i4.string(), i4.number(), i4.boolean(), i4.lazy(() => fe2), i4.array(me2)])).meta({ id: "MappingValuePatch", title: "Mapping.ValuePatch", description: "A Mapping.Value inside `extend`; a null at an object key clears the inherited key." });
4147
+ Ce2 = i4.record(i4.string(), ke2.nullable());
4148
+ fe2 = i4.object({ key: i4.string().nullable().optional(), value: i4.union([i4.string(), i4.number(), i4.boolean()]).nullable().optional(), fn: i4.string().nullable().optional(), map: Ce2.nullable().optional(), loop: he2.nullable().optional(), set: be2.nullable().optional(), consent: we2.nullable().optional(), condition: i4.string().nullable().optional(), validate: i4.string().nullable().optional() }).meta({ id: "MappingValueConfigPatch", title: "Mapping.ValueConfigPatch", description: "A Mapping.ValueConfig inside `extend`; a null value clears the inherited field." });
4149
+ xe2 = i4.object({ name: i4.string().nullable().optional(), data: i4.union([ke2, ge2]).nullable().optional(), settings: i4.unknown().nullable().optional(), condition: i4.string().nullable().optional(), consent: we2.nullable().optional(), policy: Ce2.nullable().optional(), batch: i4.union([i4.number(), i4.object({ wait: i4.number().nullable().optional(), size: i4.number().nullable().optional(), age: i4.number().nullable().optional() })]).nullable().optional(), include: i4.array(i4.string()).nullable().optional(), ignore: i4.boolean().nullable().optional(), silent: i4.boolean().nullable().optional() }).meta({ id: "MappingRulePatch", title: "Mapping.RulePatch", description: "Partial rule deep-merged onto a package-shipped default; a null value clears the inherited field." }).describe("Partial rule for `extend`; null clears an inherited field");
4150
+ je2 = i4.object({ name: i4.string().optional().describe('Custom event name override (e.g., "view_item" for "product view")'), data: i4.union([me2, ge2]).optional().describe("Data transformation rules for event"), settings: i4.unknown().optional().describe("Destination-specific settings for this event mapping"), condition: i4.string().optional().describe("Condition function as string: return true to process event"), consent: Z4.optional().describe("Not enforced yet. To require consent for a destination, set consent in its config."), policy: Se2.optional().describe("Event-level policy overrides (applied after config-level policy)"), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Batch scheduling: bare number is the debounce wait window (legacy); object form supports wait/size/age."), include: i4.array(i4.string()).optional().describe('Event sections (e.g. ["context", "globals"]) flattened into context.data'), ignore: i4.boolean().optional().describe("Skip the event entirely. No push, no side effects. Use for suppression."), silent: i4.boolean().optional().describe("Run side effects (settings.identify, ...) but suppress the destination default push call."), extend: xe2.optional().describe("Merge mode: a partial rule deep-merged onto the package-shipped default at this key (instead of replacing it). A null value clears an inherited field."), remove: i4.array(i4.string()).optional().describe("Dotted paths stripped from the produced data payload after evaluation (applied last).") }).meta({ id: "MappingRule", title: "Mapping.Rule", description: "Configuration for transforming a single event at one stage of the flow (source or destination)." }).describe("Mapping rule for specific entity-action combination");
4151
+ $e2 = i4.record(i4.string(), i4.record(i4.string(), i4.union([je2, i4.array(je2)])).optional()).meta({ id: "MappingRules", title: "Mapping.Rules", description: 'Event mapping rules tree: entity \u2192 action \u2192 Rule (or Rule[]). Use "*" as wildcard for entity or action.' }).describe('Event mapping rules: entity \u2192 action \u2192 Rule. Keys match event name split by space. Use "*" as wildcard for entity or action. Priority: exact > entity wildcard > action wildcard > global wildcard (*\u2192*).');
4152
+ Oe2 = i4.object({ consent: Z4.optional().describe("Required consent states to process any events"), data: i4.union([me2, ge2]).optional().describe("Global data transformation applied to all events"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), mapping: $e2.optional().describe("Entity-action specific mapping rules"), policy: Se2.optional().describe("Pre-processing policy rules applied before mapping") }).meta({ id: "MappingConfig", title: "Mapping.Config", description: "Shared mapping configuration (consent, data, include, mapping, policy)." }).describe("Shared mapping configuration for sources and destinations");
4153
+ Ee2 = i4.object({ eventMapping: je2.optional().describe("Resolved mapping rule for event"), mappingKey: i4.string().optional().describe('Mapping key used (e.g., "product.view")') }).meta({ id: "MappingResult", title: "Mapping.Result", description: "Mapping resolution result (matched rule + key)." }).describe("Mapping resolution result");
4154
+ Pe2 = o3(me2);
4155
+ De2 = o3(ye2);
4156
+ Ie2 = o3(he2);
4157
+ Ae2 = o3(be2);
4158
+ Te2 = o3(ve2);
4159
+ Re2 = o3(Se2);
4160
+ Me2 = o3(je2);
4161
+ Je3 = o3($e2);
4162
+ Fe3 = o3(Oe2);
4163
+ Ne3 = {};
4164
+ t4(Ne3, { BatchSchema: () => vt3, ConfigSchema: () => dt3, ContextSchema: () => ft3, DLQSchema: () => Ot2, DataSchema: () => yt3, DestinationPolicySchema: () => ut2, DestinationsSchema: () => Ct2, InitDestinationsSchema: () => kt3, InitSchema: () => wt3, InstanceSchema: () => St3, PartialConfigSchema: () => pt3, PushBatchContextSchema: () => gt3, PushContextSchema: () => mt3, PushEventSchema: () => ht2, PushEventsSchema: () => bt3, PushResultSchema: () => jt3, RefSchema: () => xt2, ResultSchema: () => $t3, batchJsonSchema: () => At3, configJsonSchema: () => Et2, contextJsonSchema: () => Dt3, instanceJsonSchema: () => Tt3, partialConfigJsonSchema: () => Pt2, pushContextJsonSchema: () => It2, resultJsonSchema: () => Rt3 });
4165
+ ze3 = {};
4166
+ t4(ze3, { MatchExpressionSchema: () => qe, RouteSchema: () => Ge3 });
4167
+ _e2 = i4.enum(["eq", "contains", "prefix", "suffix", "regex", "gt", "lt", "exists"]).meta({ id: "MatcherOperator", title: "Matcher.Operator", description: "Supported operators for a match condition." });
4168
+ Le2 = i4.object({ key: i4.string(), operator: _e2, value: i4.string(), not: i4.boolean().optional() }).meta({ id: "MatcherCondition", title: "Matcher.Condition", description: "Single match condition (key, operator, value, optional not)." });
4169
+ qe = i4.union([Le2, i4.object({ and: i4.array(i4.lazy(() => qe)) }), i4.object({ or: i4.array(i4.lazy(() => qe)) })]).meta({ id: "MatcherExpression", title: "Matcher.Expression", description: "Boolean expression tree of match conditions (leaf, and, or)." });
4170
+ We2 = i4.strictObject({ match: qe.optional(), next: i4.lazy(() => Ge3) });
4171
+ Ue3 = i4.strictObject({ match: qe.optional(), one: i4.array(i4.lazy(() => Ge3)) });
4172
+ Be2 = i4.strictObject({ match: qe.optional(), many: i4.array(i4.lazy(() => Ge3)) });
4173
+ Ve2 = i4.strictObject({ match: qe.optional(), stop: i4.literal(true) });
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." });
4177
+ Ke2 = {};
4178
+ t4(Ke2, { CacheRuleSchema: () => tt3, CacheSchema: () => nt3, EventCacheRuleSchema: () => Qe2, EventCacheSchema: () => Ye3, StoreCacheRuleSchema: () => Xe2, StoreCacheSchema: () => et3 });
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." });
4180
+ Ye3 = i4.object({ stop: i4.boolean().optional().describe("Stop the chain on cache HIT (default: false). When true, skip remaining steps and return cached value."), store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().optional().describe("Optional key prefix. Omit to write keys directly to the store. Same store + same key + same namespace = same cache entry."), rules: i4.array(Qe2).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "EventCacheConfig", title: "EventCache.Config", description: "Top-level cache configuration for an event-context pipeline step (source / transformer / destination)." });
4181
+ Xe2 = i4.strictObject({ match: qe.optional().describe("Optional match expression evaluated against `{ key, value? }`. Omit for always-match."), ttl: i4.number().positive().describe("Time-to-live in seconds") }).meta({ id: "StoreCacheRule", title: "StoreCache.Rule", description: "Single store-cache rule: optional match against `{ key, value? }` and a TTL. No `key` (caller provides it) and no `update` (no event to mutate)." });
4182
+ et3 = i4.strictObject({ store: i4.string().optional().describe("Store ID for persistent caching (references a configured store)"), namespace: i4.string().min(1).optional().describe("Optional key prefix. Omit to default to the host store id. Empty string is rejected."), rules: i4.array(Xe2).min(1).describe("Cache rules \u2014 at least one required") }).meta({ id: "StoreCacheConfig", title: "StoreCache.Config", description: "Top-level cache configuration for a store wrapper. No `stop` (always falls through on miss); namespace defaults to the host store id." });
4183
+ tt3 = Qe2;
4184
+ nt3 = Ye3;
4185
+ it2 = /^(event|ingest)(\..+)?$/;
4186
+ ot3 = /^(event|ingest)\..+$/;
4187
+ at3 = i4.object({ mode: i4.enum(["get", "set"]).describe("Direction: 'get' reads from the store, 'set' writes to it"), store: i4.string().optional().describe("Store id; defaults to the in-memory __cache store when omitted"), key: me2.describe("Resolves against { event, ingest } to the store key. Paths need an event. or ingest. prefix"), value: me2.optional().describe("set: resolves against { event, ingest } to the payload to store. get: its path is the write target, event. onto the event or ingest. into the ingest."), mapping: me2.optional().describe("Shapes the value read (get) or the payload (set). Paths are relative to that value. The result merges into the target.") }).superRefine((e6, t5) => {
4188
+ if (st2(e6.key, "key", t5, ot3), void 0 !== e6.value) {
4189
+ if (st2(e6.value, "value", t5, "get" === e6.mode ? ot3 : it2), "get" === e6.mode) {
4186
4190
  const n6 = e6.value;
4187
4191
  let i6;
4188
4192
  if ("string" == typeof n6) i6 = n6;
@@ -4195,165 +4199,165 @@ var init_dev = __esm({
4195
4199
  }
4196
4200
  } else t5.addIssue({ code: "custom", message: `\`value\` is required for mode "${e6.mode}".`, path: ["value"] });
4197
4201
  }).meta({ id: "StateConfig", title: "State.Config", description: "Declarative store operation: stash (set) or fetch (get) a value against a store. key names the store slot, value the event or ingest side, mode the direction. Paths resolve against { event, ingest }." });
4198
- it2 = i4.any().meta({ id: "LoggerHandler", title: "Logger.Handler", description: "Custom log handler function (level, ...args) => void" });
4199
- ot3 = i4.object({ level: i4.union([i4.number(), i4.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: it2.optional().describe("Custom log handler function") }).meta({ id: "LoggerConfig", title: "Logger.Config", description: "Logger configuration (level, handler) to override the collector defaults" });
4200
- rt3 = i4.object({ consent: V3.optional().describe("Required consent states to send events to this destination"), settings: i4.any().meta({ id: "DestinationSettings", title: "Destination.Settings", description: "Implementation-specific configuration (destination-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.any().meta({ id: "DestinationCredentials", title: "Destination.Credentials", description: "Optional credentials slot (destination-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 (destination-defined shape)").optional(), data: i4.union([ue2, fe2]).optional().describe("Global data transformation applied to all events for this destination"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), env: i4.any().meta({ id: "DestinationEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape) \u2014 platform, SDK, or mock hook." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Destination instance identifier (defaults to destination key)").optional(), init: i4.boolean().describe("Whether to initialize immediately").optional(), loadScript: i4.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: we2.optional().describe("Entity-action specific mapping rules for this destination"), policy: ve2.optional().describe("Pre-processing policy rules applied before event mapping"), queue: i4.boolean().describe("Whether a destination added later receives events pushed earlier in the current run (default true). Consent-denied events are queued regardless.").optional(), require: i4.array(i4.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: ot3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), 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)"), before: Ue3.optional().describe("Transformer chain run for this destination only, before it receives the event."), next: Ue3.optional().describe("Post-push transformer chain. Runs after destination push completes; push response is available at ingest._response."), cache: Ze3.optional().describe("Cache configuration for deduplication; skip push on cache HIT"), state: i4.union([nt3, i4.array(nt3)]).optional().describe("Declarative store get/set operations applied around this destination"), disabled: i4.boolean().describe("Completely skip this destination (no init, no push, no queue)").optional(), mock: i4.unknown().meta({ id: "DestinationMock", title: "Destination.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Dev/testing only."), queueMax: i4.number().optional().describe("Maximum consent-denied events retained in queuePush for this destination. FIFO drop on overflow. Default 1000."), dlqMax: i4.number().optional().describe("Maximum failed-push entries retained in dlq for this destination. FIFO drop on overflow. Default 100."), timeout: i4.number().optional().describe("Per-destination delivery timeout in ms (default 10000); a delivery that does not settle in this window is routed to the DLQ like a thrown push."), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Enables batching for all of this destination's events into one shared default buffer; a mapping rule's own batch splits that entity-action into its own buffer and overrides per field. Bare number is the debounce wait window; object form supports wait (debounce ms), size (count cap, default 1000), age (max ms since first entry, default 30000)."), breaker: i4.union([i4.number(), i4.object({ threshold: i4.number().optional(), cooldown: i4.number().optional() })]).optional().describe("Per-destination circuit breaker (presence-gated). After threshold consecutive transport failures the breaker opens and events are skipped until cooldown ms elapse, then one probe is admitted; success closes it, failure re-opens it. Partial-batch row failures are breaker-neutral. Bare number is the threshold; object form supports threshold (default 5) and cooldown (default 30000ms).") }).meta({ id: "DestinationConfig", title: "Destination.Config", description: "Destination configuration: consent, settings, data, env, mapping rules, policy, queue, logger, before/next chains, cache." }).describe("Destination configuration");
4201
- st2 = rt3.partial().meta({ id: "DestinationPartialConfig", title: "Destination.PartialConfig", description: "Partial destination configuration with all fields optional." }).describe("Partial destination configuration with all fields optional");
4202
- at3 = ve2.describe("Destination policy rules for event pre-processing");
4203
- ct3 = i4.object({ collector: i4.unknown().meta({ id: "DestinationContextCollector", title: "Collector.Instance", description: "Collector instance handed to the destination (runtime object)." }).describe("Collector instance (runtime object)"), config: rt3.describe("Destination configuration"), data: i4.union([i4.unknown(), i4.array(i4.unknown())]).optional().describe("Transformed event data"), env: i4.unknown().meta({ id: "DestinationContextEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape)." }).describe("Environment dependencies") }).meta({ id: "DestinationContext", title: "Destination.Context", description: "Destination context passed to init and push functions." }).describe("Destination context for init and push functions");
4204
- lt3 = ct3.extend({ mapping: Se2.optional().describe("Resolved mapping rule for this specific event") }).meta({ id: "DestinationPushContext", title: "Destination.PushContext", description: "Destination context for push() with the resolved event mapping rule." }).describe("Push context with event-specific mapping");
4205
- dt3 = lt3.describe("Batch push context with event-specific mapping");
4206
- pt3 = i4.object({ event: ee3.describe("The event to process"), mapping: Se2.optional().describe("Mapping rule for this event") }).meta({ id: "DestinationPushEvent", title: "Destination.PushEvent", description: "Single event paired with its resolved mapping rule (batch element)." }).describe("Event with optional mapping for batch processing");
4207
- ut2 = i4.array(pt3).meta({ id: "DestinationPushEvents", title: "Destination.PushEvents", description: "Array of events with mappings (batch input)." }).describe("Array of events with mappings");
4208
- ft3 = i4.object({ key: i4.string().describe('Batch key (usually mapping key like "product.view")'), events: i4.array(ee3).describe("Array of events in batch"), data: i4.array(i4.union([i4.unknown(), i4.array(i4.unknown())]).optional()).describe("Transformed data for each event"), mapping: Se2.optional().describe("Shared mapping rule for batch") }).meta({ id: "DestinationBatch", title: "Destination.Batch", description: "Batch of events grouped by mapping key for batch delivery." }).describe("Batch of events grouped by mapping key");
4209
- mt3 = i4.union([i4.unknown(), i4.array(i4.unknown())]).meta({ id: "DestinationData", title: "Destination.Data", description: "Transformed event data delivered to the destination (Property, undefined, or array)." }).optional().describe("Transformed event data (Property, undefined, or array)");
4210
- gt3 = i4.object({ config: rt3.describe("Destination configuration"), queue: i4.array(ee3).optional().describe("Queued events awaiting consent"), dlq: i4.array(i4.tuple([ee3, i4.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: i4.string().optional().describe("Destination type identifier"), env: i4.unknown().optional().describe("Environment dependencies"), init: i4.unknown().optional().describe("Initialization function"), push: i4.unknown().describe("Push function for single events"), pushBatch: i4.unknown().optional().describe("Batch push function"), on: i4.unknown().optional().describe("Event lifecycle hook function") }).meta({ id: "DestinationInstance", title: "Destination.Instance", description: "Destination instance (runtime object with init/push/pushBatch/on)." }).describe("Destination instance (runtime object with functions)");
4211
- ht2 = i4.object({ code: gt3.describe("Destination instance with implementation"), config: st2.optional().describe("Partial configuration overrides"), env: i4.unknown().optional().describe("Partial environment overrides") }).meta({ id: "DestinationInit", title: "Destination.Init", description: "Destination initialization bundle (instance code + config + env)." }).describe("Destination initialization configuration");
4212
- bt3 = i4.record(i4.string(), ht2).meta({ id: "DestinationInitDestinations", title: "Destination.InitDestinations", description: "Map of destination IDs to initialization configurations." }).describe("Map of destination IDs to initialization configurations");
4213
- vt3 = i4.record(i4.string(), gt3).meta({ id: "DestinationDestinations", title: "Destination.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to runtime instances");
4214
- yt3 = i4.object({ type: i4.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: i4.unknown().optional().describe("Response from push()"), error: i4.unknown().optional().describe("Error if failed") }).meta({ id: "DestinationRef", title: "Destination.Ref", description: "Reference to a destination outcome (type + response data or error)." }).describe("Destination reference with type and response data");
4215
- St3 = i4.object({ queue: i4.array(ee3).optional().describe("Events queued (awaiting consent)"), error: i4.unknown().optional().describe("Error if push failed") }).meta({ id: "DestinationPushResult", title: "Destination.PushResult", description: "Result of a single destination push (queued events, optional error)." }).describe("Push operation result");
4216
- wt3 = i4.object({ ok: i4.boolean().describe("True if nothing failed"), event: i4.unknown().optional().describe("The processed event"), done: i4.record(i4.string(), yt3).optional().describe("Destinations that processed successfully"), queued: i4.record(i4.string(), yt3).optional().describe("Destinations that queued events"), failed: i4.record(i4.string(), yt3).optional().describe("Destinations that failed to process") }).meta({ id: "DestinationResult", title: "Destination.Result", description: "Overall push result aggregated across all destinations (done/queued/failed maps)." }).describe("Push result with destination outcomes");
4217
- kt3 = i4.array(i4.tuple([ee3, i4.unknown()])).meta({ id: "DestinationDLQ", title: "Destination.DLQ", description: "Dead-letter queue: list of [event, error] tuples." }).describe("Dead letter queue: [(event, error), ...]");
4218
- Ct2 = o3(rt3);
4219
- xt2 = o3(st2);
4220
- jt3 = o3(ct3);
4221
- $t3 = o3(lt3);
4222
- Ot2 = o3(ft3);
4223
- Et2 = o3(gt3);
4224
- Pt2 = o3(wt3);
4225
- Dt3 = {};
4226
- t4(Dt3, { CommandTypeSchema: () => It2, ConfigSchema: () => At3, DestinationsSchema: () => Ft3, InitConfigSchema: () => Rt3, InstanceSchema: () => Nt2, PushContextSchema: () => Jt2, SessionDataSchema: () => Tt3, SourcesSchema: () => Mt2, commandTypeJsonSchema: () => zt2, configJsonSchema: () => _t2, initConfigJsonSchema: () => qt2, instanceJsonSchema: () => Ut3, pushContextJsonSchema: () => Wt2, sessionDataJsonSchema: () => Lt3 });
4227
- It2 = i4.union([i4.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), i4.string()]).meta({ id: "CollectorCommandType", title: "Collector.CommandType", description: "Collector command type identifier (standard or extension string)." }).describe("Collector command type: standard commands or custom string for extensions");
4228
- At3 = i4.object({ run: i4.boolean().describe("Whether to run collector automatically on initialization").optional(), globalsStatic: B3.describe("Static global properties that persist across collector runs"), sessionStatic: i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSessionStatic", title: "Collector.SessionStatic", description: "Static session data that persists across collector runs." }).describe("Static session data that persists across collector runs"), logger: ot3.optional().describe("Logger configuration (level, handler)"), queueMax: i4.number().optional().describe("Maximum events retained in collector.queue (late-registration replay). FIFO drop on overflow. Default 1000."), name: i4.string().optional().describe("Flow name; keys this flow's entry in event.source.release and the observer flowId."), release: i4.string().optional().describe("Config release id stamped into event.source.release for this flow."), next: Ue3.optional().describe("Collector chain: runs once per completed event before the destination fan-out. A stop drops the event for every destination.") }).meta({ id: "CollectorConfig", title: "Collector.Config", description: "Core collector configuration (globals/session statics, logger, buffer bounds)." }).describe("Core collector configuration");
4229
- Tt3 = B3.and(i4.object({ isStart: i4.boolean().describe("Whether this is a new session start"), storage: i4.boolean().describe("Whether storage is available"), id: c2.describe("Session identifier").optional(), start: l3.describe("Session start timestamp").optional(), marketing: i4.literal(true).optional().describe("Marketing attribution flag"), updated: l3.describe("Last update timestamp").optional(), isNew: i4.boolean().describe("Whether this is a new session").optional(), device: c2.describe("Device identifier").optional(), count: d2.describe("Event count in session").optional(), runs: d2.describe("Number of runs").optional() })).meta({ id: "CollectorSessionData", title: "Collector.SessionData", description: "Session state and tracking data." }).describe("Session state and tracking data");
4230
- Rt3 = At3.partial().extend({ consent: V3.optional().describe("Initial consent state"), user: G3.optional().describe("Initial user data"), globals: B3.optional().describe("Initial global properties"), sources: i4.unknown().meta({ id: "CollectorInitSources", title: "Source.InitSources", description: "Source configurations map (id \u2192 InitSource)." }).optional().describe("Source configurations"), destinations: i4.unknown().meta({ id: "CollectorInitDestinations", title: "Destination.InitDestinations", description: "Destination configurations map (id \u2192 Init)." }).optional().describe("Destination configurations"), transformers: i4.unknown().meta({ id: "CollectorInitTransformers", title: "Transformer.Configs", description: "Transformer configurations map (id \u2192 Config)." }).optional().describe("Transformer configurations"), stores: i4.unknown().meta({ id: "CollectorInitStores", title: "Store.Configs", description: "Store configurations map (id \u2192 Config)." }).optional().describe("Store configurations"), custom: B3.optional().describe("Initial custom implementation-specific properties"), hooks: i4.unknown().meta({ id: "CollectorHooks", title: "Collector.Hooks", description: "Pipeline observation hooks." }).optional().describe("Pipeline observation hooks"), observe: i4.union([i4.object({ url: i4.string().describe("Observer base URL"), binding: i4.string().describe("Public project binding the web credential must match") }), i4.object({ url: i4.string().describe("Observer base URL"), sessionId: i4.string().describe("Session id the runtime posts under"), token: i4.string().describe("Ingest bearer token"), level: i4.enum(["off", "standard", "trace"]).optional().describe("Telemetry level"), sample: i4.number().optional().describe("Deterministic sample fraction in [0, 1]") })]).meta({ id: "CollectorObserve", title: "Observe", description: "Observation session connect config: web arm (url + binding) or server arm (url + sessionId + token)." }).optional().describe("Observation session connect config"), observers: i4.unknown().meta({ id: "CollectorObservers", title: "Collector.Observers", description: "Caller-supplied advisory observer functions (runtime objects)." }).optional().describe("Caller-supplied advisory observer functions") }).meta({ id: "CollectorInitConfig", title: "Collector.InitConfig", description: "Collector initialization configuration with initial state (consent, user, globals, components, hooks)." }).describe("Collector initialization configuration with initial state");
4231
- Jt2 = i4.object({ mapping: ke2.optional().describe("Source-level mapping configuration") }).meta({ id: "CollectorPushContext", title: "Collector.PushContext", description: "Push context with optional source-level mapping." }).describe("Push context with optional source mapping");
4232
- Mt2 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSources", title: "Collector.Sources", description: "Map of source IDs to runtime source instances." }).describe("Map of source IDs to source instances");
4233
- Ft3 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorDestinations", title: "Collector.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to destination instances");
4234
- Nt2 = i4.object({ push: i4.unknown().describe("Push function for processing events"), command: i4.unknown().describe("Command function for walker commands"), allowed: i4.boolean().describe("Whether event processing is allowed"), config: At3.describe("Current collector configuration"), consent: V3.describe("Current consent state"), custom: B3.describe("Custom implementation-specific properties"), sources: Mt2.describe("Registered source instances"), destinations: Ft3.describe("Registered destination instances"), globals: B3.describe("Current global properties"), hooks: i4.unknown().describe("Lifecycle hook functions"), on: i4.unknown().describe("Event lifecycle configuration"), queue: i4.array(ee3).describe("Queued events awaiting processing"), round: i4.number().describe("Collector run count (increments with each run)"), session: i4.union([Tt3]).describe("Current session state"), timing: i4.number().describe("Event processing timing information"), user: G3.describe("Current user data") }).meta({ id: "CollectorInstance", title: "Collector.Instance", description: "Collector instance (runtime object with push/command + full state and component maps)." }).describe("Collector instance with state and methods");
4235
- zt2 = o3(It2);
4236
- _t2 = o3(At3);
4237
- Lt3 = o3(Tt3);
4238
- qt2 = o3(Rt3);
4239
- Wt2 = o3(Jt2);
4240
- Ut3 = o3(Nt2);
4241
- Bt2 = {};
4242
- t4(Bt2, { BaseEnvSchema: () => Ht2, ConfigSchema: () => Zt2, InitSchema: () => Kt2, InitSourceSchema: () => Qt2, InitSourcesSchema: () => Yt2, InstanceSchema: () => Gt2, PartialConfigSchema: () => Vt2, baseEnvJsonSchema: () => Xt2, configJsonSchema: () => en2, initSourceJsonSchema: () => on, initSourcesJsonSchema: () => rn2, instanceJsonSchema: () => nn2, partialConfigJsonSchema: () => tn2 });
4243
- Ht2 = 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");
4244
- Zt2 = ke2.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: Ht2.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: ot3.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([ue2, fe2]).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([nt3, i4.array(nt3)]).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");
4245
- Vt2 = Zt2.partial().meta({ id: "SourcePartialConfig", title: "Source.PartialConfig", description: "Partial source configuration with all fields optional." }).describe("Partial source configuration with all fields optional");
4246
- Gt2 = i4.object({ type: i4.string().describe('Source type identifier (e.g., "browser", "dataLayer")'), config: Zt2.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");
4247
- Kt2 = 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>");
4248
- Qt2 = i4.object({ code: Kt2.describe("Source initialization function"), config: Vt2.optional().describe("Partial configuration overrides"), env: Ht2.partial().optional().describe("Partial environment overrides"), state: i4.union([nt3, i4.array(nt3)]).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");
4249
- Yt2 = i4.record(i4.string(), Qt2).meta({ id: "SourceInitSources", title: "Source.InitSources", description: "Map of source IDs to initialization configurations." }).describe("Map of source IDs to initialization configurations");
4250
- Xt2 = o3(Ht2);
4251
- en2 = o3(Zt2);
4252
- tn2 = o3(Vt2);
4253
- nn2 = o3(Gt2);
4254
- on = o3(Qt2);
4255
- rn2 = o3(Yt2);
4256
- sn2 = {};
4257
- t4(sn2, { ConfigSchema: () => an2, PartialConfigSchema: () => cn2, configJsonSchema: () => ln2, partialConfigJsonSchema: () => dn2 });
4258
- an2 = i4.object({ settings: i4.any().meta({ id: "TransformerSettings", title: "Transformer.Settings", description: "Implementation-specific configuration (transformer-defined shape)." }).describe("Implementation-specific configuration").optional(), env: i4.any().meta({ id: "TransformerEnv", title: "Transformer.Env", description: "Environment dependencies (transformer-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Transformer instance identifier (defaults to transformer key)").optional(), logger: ot3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), before: Ue3.optional().describe("Pre-transformer chain that runs before this transformer pushes"), next: Ue3.optional().describe("Graph wiring to the next transformer in the chain"), cache: Ze3.optional().describe("Step-level cache configuration for this transformer"), state: i4.union([nt3, i4.array(nt3)]).optional().describe("Declarative store get/set operations applied around this transformer"), init: i4.boolean().describe("Whether to initialize immediately").optional(), disabled: i4.boolean().describe("Completely skip this transformer in chains").optional(), mock: i4.unknown().meta({ id: "TransformerMock", title: "Transformer.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Global mock for all chains. Dev/testing only."), chainMocks: i4.record(i4.string(), i4.unknown().meta({ id: "TransformerChainMock", title: "Transformer.ChainMock", description: "Chain-path-specific mock value. Dev/testing only." })).optional().describe("Path-specific mock values keyed by chain path. Takes precedence over global mock. Dev/testing only."), mapping: ke2.optional().describe("Declarative event-to-event mapping applied when this transformer step has no code; wins over the step-level mapping. At this position, only event-mutating fields apply (policy, and per rule condition, policy, name, ignore); consent, include, data, remove, batch, settings, extend and silent do nothing and are warned about at init.") }).strict().meta({ id: "TransformerConfig", title: "Transformer.Config", description: "Transformer configuration (settings, env, chain wiring, cache, mocks)." }).describe("Transformer configuration");
4259
- cn2 = an2.partial().meta({ id: "TransformerPartialConfig", title: "Transformer.PartialConfig", description: "Partial transformer configuration with all fields optional." }).describe("Partial transformer configuration with all fields optional");
4260
- ln2 = o3(an2);
4261
- dn2 = o3(cn2);
4202
+ ct3 = i4.any().meta({ id: "LoggerHandler", title: "Logger.Handler", description: "Custom log handler function (level, ...args) => void" });
4203
+ lt3 = i4.object({ level: i4.union([i4.number(), i4.enum(["ERROR", "WARN", "INFO", "DEBUG"])]).optional().describe("Minimum log level (default: ERROR)"), handler: ct3.optional().describe("Custom log handler function") }).meta({ id: "LoggerConfig", title: "Logger.Config", description: "Logger configuration (level, handler) to override the collector defaults" });
4204
+ dt3 = i4.object({ consent: Z4.optional().describe("Required consent states to send events to this destination"), settings: i4.any().meta({ id: "DestinationSettings", title: "Destination.Settings", description: "Implementation-specific configuration (destination-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.any().meta({ id: "DestinationCredentials", title: "Destination.Credentials", description: "Optional credentials slot (destination-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 (destination-defined shape)").optional(), data: i4.union([me2, ge2]).optional().describe("Global data transformation applied to all events for this destination"), include: i4.array(i4.string()).optional().describe("Event sections to flatten into context.data"), env: i4.any().meta({ id: "DestinationEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape) \u2014 platform, SDK, or mock hook." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Destination instance identifier (defaults to destination key)").optional(), init: i4.boolean().describe("Whether to initialize immediately").optional(), loadScript: i4.boolean().describe("Whether to load external script (for web destinations)").optional(), mapping: $e2.optional().describe("Entity-action specific mapping rules for this destination"), policy: Se2.optional().describe("Pre-processing policy rules applied before event mapping"), queue: i4.boolean().describe("Whether a destination added later receives events pushed earlier in the current run (default true). Consent-denied events are queued regardless.").optional(), require: i4.array(i4.string()).optional().describe('Defer destination initialization until these collector events fire (e.g., ["consent"])'), logger: lt3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), 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)"), before: Ge3.optional().describe("Transformer chain run for this destination only, before it receives the event."), next: Ge3.optional().describe("Post-push transformer chain. Runs after destination push completes; push response is available at ingest._response."), cache: Ye3.optional().describe("Cache configuration for deduplication; skip push on cache HIT"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set operations applied around this destination"), disabled: i4.boolean().describe("Completely skip this destination (no init, no push, no queue)").optional(), mock: i4.unknown().meta({ id: "DestinationMock", title: "Destination.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Dev/testing only."), queueMax: i4.number().optional().describe("Maximum consent-denied events retained in queuePush for this destination. FIFO drop on overflow. Default 1000."), dlqMax: i4.number().optional().describe("Maximum failed-push entries retained in dlq for this destination. FIFO drop on overflow. Default 100."), timeout: i4.number().optional().describe("Per-destination delivery timeout in ms (default 10000); a delivery that does not settle in this window is routed to the DLQ like a thrown push."), batch: i4.union([i4.number(), i4.object({ wait: i4.number().optional(), size: i4.number().optional(), age: i4.number().optional() })]).optional().describe("Enables batching for all of this destination's events into one shared default buffer; a mapping rule's own batch splits that entity-action into its own buffer and overrides per field. Bare number is the debounce wait window; object form supports wait (debounce ms), size (count cap, default 1000), age (max ms since first entry, default 30000)."), breaker: i4.union([i4.number(), i4.object({ threshold: i4.number().optional(), cooldown: i4.number().optional() })]).optional().describe("Per-destination circuit breaker (presence-gated). After threshold consecutive transport failures the breaker opens and events are skipped until cooldown ms elapse, then one probe is admitted; success closes it, failure re-opens it. Partial-batch row failures are breaker-neutral. Bare number is the threshold; object form supports threshold (default 5) and cooldown (default 30000ms).") }).meta({ id: "DestinationConfig", title: "Destination.Config", description: "Destination configuration: consent, settings, data, env, mapping rules, policy, queue, logger, before/next chains, cache." }).describe("Destination configuration");
4205
+ pt3 = dt3.partial().meta({ id: "DestinationPartialConfig", title: "Destination.PartialConfig", description: "Partial destination configuration with all fields optional." }).describe("Partial destination configuration with all fields optional");
4206
+ ut2 = Se2.describe("Destination policy rules for event pre-processing");
4207
+ ft3 = i4.object({ collector: i4.unknown().meta({ id: "DestinationContextCollector", title: "Collector.Instance", description: "Collector instance handed to the destination (runtime object)." }).describe("Collector instance (runtime object)"), config: dt3.describe("Destination configuration"), data: i4.union([i4.unknown(), i4.array(i4.unknown())]).optional().describe("Transformed event data"), env: i4.unknown().meta({ id: "DestinationContextEnv", title: "Destination.Env", description: "Environment dependencies (destination-defined shape)." }).describe("Environment dependencies") }).meta({ id: "DestinationContext", title: "Destination.Context", description: "Destination context passed to init and push functions." }).describe("Destination context for init and push functions");
4208
+ mt3 = ft3.extend({ mapping: je2.optional().describe("Resolved mapping rule for this specific event") }).meta({ id: "DestinationPushContext", title: "Destination.PushContext", description: "Destination context for push() with the resolved event mapping rule." }).describe("Push context with event-specific mapping");
4209
+ gt3 = mt3.describe("Batch push context with event-specific mapping");
4210
+ ht2 = i4.object({ event: te2.describe("The event to process"), mapping: je2.optional().describe("Mapping rule for this event") }).meta({ id: "DestinationPushEvent", title: "Destination.PushEvent", description: "Single event paired with its resolved mapping rule (batch element)." }).describe("Event with optional mapping for batch processing");
4211
+ bt3 = i4.array(ht2).meta({ id: "DestinationPushEvents", title: "Destination.PushEvents", description: "Array of events with mappings (batch input)." }).describe("Array of events with mappings");
4212
+ vt3 = i4.object({ key: i4.string().describe('Batch key (usually mapping key like "product.view")'), events: i4.array(te2).describe("Array of events in batch"), data: i4.array(i4.union([i4.unknown(), i4.array(i4.unknown())]).optional()).describe("Transformed data for each event"), mapping: je2.optional().describe("Shared mapping rule for batch") }).meta({ id: "DestinationBatch", title: "Destination.Batch", description: "Batch of events grouped by mapping key for batch delivery." }).describe("Batch of events grouped by mapping key");
4213
+ yt3 = i4.union([i4.unknown(), i4.array(i4.unknown())]).meta({ id: "DestinationData", title: "Destination.Data", description: "Transformed event data delivered to the destination (Property, undefined, or array)." }).optional().describe("Transformed event data (Property, undefined, or array)");
4214
+ St3 = i4.object({ config: dt3.describe("Destination configuration"), queue: i4.array(te2).optional().describe("Queued events awaiting consent"), dlq: i4.array(i4.tuple([te2, i4.unknown()])).optional().describe("Dead letter queue (failed events with errors)"), type: i4.string().optional().describe("Destination type identifier"), env: i4.unknown().optional().describe("Environment dependencies"), init: i4.unknown().optional().describe("Initialization function"), push: i4.unknown().describe("Push function for single events"), pushBatch: i4.unknown().optional().describe("Batch push function"), on: i4.unknown().optional().describe("Event lifecycle hook function") }).meta({ id: "DestinationInstance", title: "Destination.Instance", description: "Destination instance (runtime object with init/push/pushBatch/on)." }).describe("Destination instance (runtime object with functions)");
4215
+ wt3 = i4.object({ code: St3.describe("Destination instance with implementation"), config: pt3.optional().describe("Partial configuration overrides"), env: i4.unknown().optional().describe("Partial environment overrides") }).meta({ id: "DestinationInit", title: "Destination.Init", description: "Destination initialization bundle (instance code + config + env)." }).describe("Destination initialization configuration");
4216
+ kt3 = i4.record(i4.string(), wt3).meta({ id: "DestinationInitDestinations", title: "Destination.InitDestinations", description: "Map of destination IDs to initialization configurations." }).describe("Map of destination IDs to initialization configurations");
4217
+ Ct2 = i4.record(i4.string(), St3).meta({ id: "DestinationDestinations", title: "Destination.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to runtime instances");
4218
+ xt2 = i4.object({ type: i4.string().describe('Destination type ("gtag", "meta", "bigquery")'), data: i4.unknown().optional().describe("Response from push()"), error: i4.unknown().optional().describe("Error if failed") }).meta({ id: "DestinationRef", title: "Destination.Ref", description: "Reference to a destination outcome (type + response data or error)." }).describe("Destination reference with type and response data");
4219
+ jt3 = i4.object({ queue: i4.array(te2).optional().describe("Events queued (awaiting consent)"), error: i4.unknown().optional().describe("Error if push failed") }).meta({ id: "DestinationPushResult", title: "Destination.PushResult", description: "Result of a single destination push (queued events, optional error)." }).describe("Push operation result");
4220
+ $t3 = i4.object({ ok: i4.boolean().describe("True if nothing failed"), event: i4.unknown().optional().describe("The processed event"), done: i4.record(i4.string(), xt2).optional().describe("Destinations that processed successfully"), queued: i4.record(i4.string(), xt2).optional().describe("Destinations that queued events"), failed: i4.record(i4.string(), xt2).optional().describe("Destinations that failed to process") }).meta({ id: "DestinationResult", title: "Destination.Result", description: "Overall push result aggregated across all destinations (done/queued/failed maps)." }).describe("Push result with destination outcomes");
4221
+ Ot2 = i4.array(i4.tuple([te2, i4.unknown()])).meta({ id: "DestinationDLQ", title: "Destination.DLQ", description: "Dead-letter queue: list of [event, error] tuples." }).describe("Dead letter queue: [(event, error), ...]");
4222
+ Et2 = o3(dt3);
4223
+ Pt2 = o3(pt3);
4224
+ Dt3 = o3(ft3);
4225
+ It2 = o3(mt3);
4226
+ At3 = o3(vt3);
4227
+ Tt3 = o3(St3);
4228
+ Rt3 = o3($t3);
4229
+ Mt2 = {};
4230
+ t4(Mt2, { CommandTypeSchema: () => Jt2, ConfigSchema: () => Ft3, DestinationsSchema: () => qt2, InitConfigSchema: () => zt2, InstanceSchema: () => Wt2, PushContextSchema: () => _t2, SessionDataSchema: () => Nt2, SourcesSchema: () => Lt3, commandTypeJsonSchema: () => Ut3, configJsonSchema: () => Bt2, initConfigJsonSchema: () => Ht2, instanceJsonSchema: () => Gt2, pushContextJsonSchema: () => Zt2, sessionDataJsonSchema: () => Vt2 });
4231
+ Jt2 = i4.union([i4.enum(["action", "config", "consent", "context", "destination", "elb", "globals", "hook", "init", "link", "run", "user", "walker"]), i4.string()]).meta({ id: "CollectorCommandType", title: "Collector.CommandType", description: "Collector command type identifier (standard or extension string)." }).describe("Collector command type: standard commands or custom string for extensions");
4232
+ Ft3 = i4.object({ run: i4.boolean().describe("Whether to run collector automatically on initialization").optional(), globalsStatic: B3.describe("Static global properties that persist across collector runs"), sessionStatic: i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSessionStatic", title: "Collector.SessionStatic", description: "Static session data that persists across collector runs." }).describe("Static session data that persists across collector runs"), logger: lt3.optional().describe("Logger configuration (level, handler)"), queueMax: i4.number().optional().describe("Maximum events retained in collector.queue (late-registration replay). FIFO drop on overflow. Default 1000."), name: i4.string().optional().describe("Flow name; keys this flow's entry in event.source.release and the observer flowId."), release: i4.string().optional().describe("Config release id stamped into event.source.release for this flow."), 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: "CollectorConfig", title: "Collector.Config", description: "Core collector configuration (globals/session statics, logger, buffer bounds)." }).describe("Core collector configuration");
4233
+ Nt2 = B3.and(i4.object({ isStart: i4.boolean().describe("Whether this is a new session start"), storage: i4.boolean().describe("Whether storage is available"), id: c2.describe("Session identifier").optional(), start: l3.describe("Session start timestamp").optional(), marketing: i4.literal(true).optional().describe("Marketing attribution flag"), updated: l3.describe("Last update timestamp").optional(), isNew: i4.boolean().describe("Whether this is a new session").optional(), device: c2.describe("Device identifier").optional(), count: d2.describe("Event count in session").optional(), runs: d2.describe("Number of runs").optional() })).meta({ id: "CollectorSessionData", title: "Collector.SessionData", description: "Session state and tracking data." }).describe("Session state and tracking data");
4234
+ zt2 = Ft3.partial().extend({ consent: Z4.optional().describe("Initial consent state"), user: K4.optional().describe("Initial user data"), globals: B3.optional().describe("Initial global properties"), sources: i4.unknown().meta({ id: "CollectorInitSources", title: "Source.InitSources", description: "Source configurations map (id \u2192 InitSource)." }).optional().describe("Source configurations"), destinations: i4.unknown().meta({ id: "CollectorInitDestinations", title: "Destination.InitDestinations", description: "Destination configurations map (id \u2192 Init)." }).optional().describe("Destination configurations"), transformers: i4.unknown().meta({ id: "CollectorInitTransformers", title: "Transformer.Configs", description: "Transformer configurations map (id \u2192 Config)." }).optional().describe("Transformer configurations"), stores: i4.unknown().meta({ id: "CollectorInitStores", title: "Store.Configs", description: "Store configurations map (id \u2192 Config)." }).optional().describe("Store configurations"), custom: B3.optional().describe("Initial custom implementation-specific properties"), hooks: i4.unknown().meta({ id: "CollectorHooks", title: "Collector.Hooks", description: "Pipeline observation hooks." }).optional().describe("Pipeline observation hooks"), observe: i4.union([i4.object({ url: i4.string().describe("Observer base URL"), binding: i4.string().describe("Public project binding the web credential must match") }), i4.object({ url: i4.string().describe("Observer base URL"), sessionId: i4.string().describe("Session id the runtime posts under"), token: i4.string().describe("Ingest bearer token"), level: i4.enum(["off", "standard", "trace"]).optional().describe("Telemetry level"), sample: i4.number().optional().describe("Deterministic sample fraction in [0, 1]") })]).meta({ id: "CollectorObserve", title: "Observe", description: "Observation session connect config: web arm (url + binding) or server arm (url + sessionId + token)." }).optional().describe("Observation session connect config"), observers: i4.unknown().meta({ id: "CollectorObservers", title: "Collector.Observers", description: "Caller-supplied advisory observer functions (runtime objects)." }).optional().describe("Caller-supplied advisory observer functions") }).meta({ id: "CollectorInitConfig", title: "Collector.InitConfig", description: "Collector initialization configuration with initial state (consent, user, globals, components, hooks)." }).describe("Collector initialization configuration with initial state");
4235
+ _t2 = i4.object({ mapping: Oe2.optional().describe("Source-level mapping configuration") }).meta({ id: "CollectorPushContext", title: "Collector.PushContext", description: "Push context with optional source-level mapping." }).describe("Push context with optional source mapping");
4236
+ Lt3 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorSources", title: "Collector.Sources", description: "Map of source IDs to runtime source instances." }).describe("Map of source IDs to source instances");
4237
+ qt2 = i4.record(i4.string(), i4.unknown()).meta({ id: "CollectorDestinations", title: "Collector.Destinations", description: "Map of destination IDs to runtime destination instances." }).describe("Map of destination IDs to destination instances");
4238
+ Wt2 = i4.object({ push: i4.unknown().describe("Push function for processing events"), command: i4.unknown().describe("Command function for walker commands"), allowed: i4.boolean().describe("Whether event processing is allowed"), config: Ft3.describe("Current collector configuration"), consent: Z4.describe("Current consent state"), custom: B3.describe("Custom implementation-specific properties"), sources: Lt3.describe("Registered source instances"), destinations: qt2.describe("Registered destination instances"), globals: B3.describe("Current global properties"), hooks: i4.unknown().describe("Lifecycle hook functions"), on: i4.unknown().describe("Event lifecycle configuration"), queue: i4.array(te2).describe("Queued events awaiting processing"), round: i4.number().describe("Collector run count (increments with each run)"), session: i4.union([Nt2]).describe("Current session state"), timing: i4.number().describe("Event processing timing information"), user: K4.describe("Current user data") }).meta({ id: "CollectorInstance", title: "Collector.Instance", description: "Collector instance (runtime object with push/command + full state and component maps)." }).describe("Collector instance with state and methods");
4239
+ Ut3 = o3(Jt2);
4240
+ Bt2 = o3(Ft3);
4241
+ Vt2 = o3(Nt2);
4242
+ Ht2 = o3(zt2);
4243
+ Zt2 = o3(_t2);
4244
+ Gt2 = o3(Wt2);
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 });
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
+ 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
+ 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
+ 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");
4254
+ rn2 = o3(Qt2);
4255
+ sn2 = o3(Yt2);
4256
+ an2 = o3(Xt2);
4257
+ cn2 = o3(en2);
4258
+ ln2 = o3(nn2);
4259
+ dn2 = o3(on);
4262
4260
  pn2 = {};
4263
4261
  t4(pn2, { ConfigSchema: () => un2, PartialConfigSchema: () => fn2, configJsonSchema: () => mn2, partialConfigJsonSchema: () => gn2 });
4264
- un2 = i4.object({ settings: i4.unknown().meta({ id: "StoreSettings", title: "Store.Settings", description: "Implementation-specific configuration (store-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.unknown().meta({ id: "StoreCredentials", title: "Store.Credentials", description: "Optional credentials slot (store-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 (store-defined shape)").optional(), env: i4.unknown().meta({ id: "StoreEnv", title: "Store.Env", description: "Environment dependencies (store-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Store instance identifier (defaults to store key)").optional(), logger: ot3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), 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)"), file: i4.boolean().optional().describe("Persist values as raw bytes (byte-exact), bypassing the structured codec. Default false (structured). Set true only on byte-native stores for asset serving; sheets rejects it.") }).meta({ id: "StoreConfig", title: "Store.Config", description: "Store configuration (settings, env, logger): key-value infrastructure component." }).describe("Store configuration");
4265
- fn2 = un2.partial().meta({ id: "StorePartialConfig", title: "Store.PartialConfig", description: "Partial store configuration with all fields optional." }).describe("Partial store configuration with all fields optional");
4262
+ un2 = i4.object({ settings: i4.any().meta({ id: "TransformerSettings", title: "Transformer.Settings", description: "Implementation-specific configuration (transformer-defined shape)." }).describe("Implementation-specific configuration").optional(), env: i4.any().meta({ id: "TransformerEnv", title: "Transformer.Env", description: "Environment dependencies (transformer-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Transformer instance identifier (defaults to transformer key)").optional(), logger: lt3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), before: Ge3.optional().describe("Pre-transformer chain that runs before this transformer pushes"), next: Ge3.optional().describe("Graph wiring to the next transformer in the chain"), cache: Ye3.optional().describe("Step-level cache configuration for this transformer"), state: i4.union([at3, i4.array(at3)]).optional().describe("Declarative store get/set operations applied around this transformer"), init: i4.boolean().describe("Whether to initialize immediately").optional(), disabled: i4.boolean().describe("Completely skip this transformer in chains").optional(), mock: i4.unknown().meta({ id: "TransformerMock", title: "Transformer.Mock", description: "Return this value instead of calling push(). Dev/testing only." }).optional().describe("Return this value instead of calling push(). Global mock for all chains. Dev/testing only."), chainMocks: i4.record(i4.string(), i4.unknown().meta({ id: "TransformerChainMock", title: "Transformer.ChainMock", description: "Chain-path-specific mock value. Dev/testing only." })).optional().describe("Path-specific mock values keyed by chain path. Takes precedence over global mock. Dev/testing only."), mapping: Oe2.optional().describe("Declarative event-to-event mapping applied when this transformer step has no code; wins over the step-level mapping. At this position, only event-mutating fields apply (policy, and per rule condition, policy, name, ignore); consent, include, data, remove, batch, settings, extend and silent do nothing and are warned about at init.") }).strict().meta({ id: "TransformerConfig", title: "Transformer.Config", description: "Transformer configuration (settings, env, chain wiring, cache, mocks)." }).describe("Transformer configuration");
4263
+ fn2 = un2.partial().meta({ id: "TransformerPartialConfig", title: "Transformer.PartialConfig", description: "Partial transformer configuration with all fields optional." }).describe("Partial transformer configuration with all fields optional");
4266
4264
  mn2 = o3(un2);
4267
4265
  gn2 = o3(fn2);
4268
4266
  hn2 = {};
4269
- t4(hn2, { BundlePackageSchema: () => xn, BundleSchema: () => jn, CodeSchema: () => $n, ConfigSchema: () => Wn3, ContractActionsSchema: () => Nn2, ContractEventsSchema: () => zn2, ContractRuleSchema: () => _n2, ContractSchema: () => Ln2, ContractSchemaEntry: () => Fn3, DestinationSchema: () => Jn2, FlowSchema: () => Un2, JsonSchema: () => Bn3, JsonSchemaSchema: () => Dn, ObserveSchema: () => qn2, SettingsSchema: () => kn2, SourceSchema: () => Tn2, StepExampleSchema: () => En2, StepExamplesSchema: () => Pn3, StoreSchema: () => Mn, TransformerSchema: () => Rn2, TriggerDescriptorSchema: () => On2, ValidateEventsSchema: () => In, VariablesSchema: () => yn2, configJsonSchema: () => Kn2, contractJsonSchema: () => oi, contractRuleJsonSchema: () => ii, destinationJsonSchema: () => ei, flowConfigJsonSchema: () => Yn2, flowJsonSchema: () => Qn3, parseConfig: () => Hn3, parseFlow: () => Vn2, safeParseConfig: () => Zn, safeParseFlow: () => Gn3, sourceJsonSchema: () => Xn2, storeJsonSchema: () => ni, transformerJsonSchema: () => ti, validateEventsJsonSchema: () => ri });
4270
- bn2 = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
4271
- vn2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
4272
- yn2 = 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." });
4273
- Sn2 = /\$(?:var|env)\./;
4274
- wn2 = i4.string().superRefine((e6, t5) => {
4275
- if (Sn2.test(e6)) return;
4267
+ t4(hn2, { ConfigSchema: () => bn2, PartialConfigSchema: () => vn2, configJsonSchema: () => yn2, partialConfigJsonSchema: () => Sn2 });
4268
+ bn2 = i4.object({ settings: i4.unknown().meta({ id: "StoreSettings", title: "Store.Settings", description: "Implementation-specific configuration (store-defined shape)." }).describe("Implementation-specific configuration").optional(), credentials: i4.unknown().meta({ id: "StoreCredentials", title: "Store.Credentials", description: "Optional credentials slot (store-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 (store-defined shape)").optional(), env: i4.unknown().meta({ id: "StoreEnv", title: "Store.Env", description: "Environment dependencies (store-defined shape)." }).describe("Environment dependencies (platform-specific)").optional(), id: c2.describe("Store instance identifier (defaults to store key)").optional(), logger: lt3.optional().describe("Logger configuration (level, handler) to override the collector defaults"), 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)"), file: i4.boolean().optional().describe("Persist values as raw bytes (byte-exact), bypassing the structured codec. Default false (structured). Set true only on byte-native stores for asset serving; sheets rejects it.") }).meta({ id: "StoreConfig", title: "Store.Config", description: "Store configuration (settings, env, logger): key-value infrastructure component." }).describe("Store configuration");
4269
+ vn2 = bn2.partial().meta({ id: "StorePartialConfig", title: "Store.PartialConfig", description: "Partial store configuration with all fields optional." }).describe("Partial store configuration with all fields optional");
4270
+ yn2 = o3(bn2);
4271
+ Sn2 = o3(vn2);
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 });
4274
+ kn2 = ["elb", "elbLayer", "window", "document", "location", "self", "top", "parent", "frames", "globalThis", "__proto__", "constructor", "prototype"];
4275
+ Cn2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
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." });
4277
+ jn = /\$(?:var|env)\./;
4278
+ $n = i4.string().superRefine((e6, t5) => {
4279
+ if (jn.test(e6)) return;
4276
4280
  const n6 = (function(e7) {
4277
- return "string" != typeof e7 ? { ok: false, reason: "is not a string" } : vn2.test(e7) ? bn2.includes(e7) ? { ok: false, reason: `is reserved (${bn2.join(", ")})` } : { ok: true, name: e7 } : { ok: false, reason: "is not a JavaScript identifier (letters, digits, _ or $, not starting with a digit)" };
4281
+ return "string" != typeof e7 ? { ok: false, reason: "is not a string" } : Cn2.test(e7) ? kn2.includes(e7) ? { ok: false, reason: `is reserved (${kn2.join(", ")})` } : { ok: true, name: e7 } : { ok: false, reason: "is not a JavaScript identifier (letters, digits, _ or $, not starting with a digit)" };
4278
4282
  })(e6);
4279
4283
  n6.ok || t5.addIssue({ code: "custom", message: `windowCollector ${JSON.stringify(e6)} ${n6.reason}` });
4280
4284
  });
4281
- kn2 = i4.looseObject({ windowCollector: wn2.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");
4282
- Cn2 = /^(@[a-z0-9\-~][a-z0-9\-._~]*\/)?[a-z0-9\-~][a-z0-9\-._~]*$/;
4283
- xn = 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)." });
4284
- jn = i4.object({ packages: i4.record(i4.string().regex(Cn2, "Invalid npm package name"), xn).optional().describe("NPM packages to bundle, keyed by package name"), overrides: i4.record(i4.string().regex(Cn2, "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)");
4285
- $n = 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)");
4286
- On2 = 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." });
4287
- En2 = 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: On2.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");
4288
- Pn3 = i4.record(i4.string(), En2).meta({ id: "FlowStepExamples", title: "Flow.StepExamples", description: "Named step examples keyed by scenario name." }).describe("Named step examples for testing and documentation");
4289
- Dn = i4.record(i4.string(), i4.unknown()).meta({ id: "JsonSchema", title: "JsonSchema", description: "Structural JSON Schema fragment (Record<string, unknown>)" });
4290
- In = i4.record(i4.string(), i4.record(i4.string(), Dn)).meta({ id: "ValidateEvents", title: "ValidateEvents", description: "Entity-action keyed JSON Schemas" }).describe("Entity-action keyed JSON Schemas");
4291
- Tn2 = 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: $n.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([nt3, i4.array(nt3)]).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: yn2.optional().describe("Source-level variables (highest priority in cascade)"), next: Ue3.optional().describe("Pre-collector transformer chain. String, string[], or Route[] for conditional routing on ingest and event data."), before: Ue3.optional().describe("Pre-source transformer chain (consent-exempt). Handles transport-level preprocessing."), examples: Pn3.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ze3.optional().describe("Cache configuration for this source (match \u2192 key \u2192 ttl rules)"), state: i4.union([nt3, i4.array(nt3)]).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(An);
4292
- Rn2 = 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: $n.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: Ue3.optional().describe("Pre-transformer chain. Runs before this transformer push function."), next: Ue3.optional().describe("Next transformer in chain. String, string[], or Route[] for conditional routing."), variables: yn2.optional().describe("Transformer-level variables (highest priority in cascade)"), examples: Pn3.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ze3.optional().describe("Cache configuration for this transformer (match \u2192 key \u2192 ttl rules)"), state: i4.union([nt3, i4.array(nt3)]).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(An);
4293
- Jn2 = 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: $n.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: yn2.optional().describe("Destination-level variables (highest priority in cascade)"), before: Ue3.optional().describe("Transformer chain run for this destination only, before it receives the event. String, string[], or a Route for conditional routing."), next: Ue3.optional().describe("Post-push transformer chain. Push response available at context.ingest._response."), examples: Pn3.optional().describe("Named step examples for testing and documentation (stripped during bundling)"), cache: Ze3.optional().describe("Cache configuration for this destination (match \u2192 key \u2192 ttl rules)"), state: i4.union([nt3, i4.array(nt3)]).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(An);
4294
- Mn = i4.object({ package: i4.string().min(1, "Package name cannot be empty").optional().describe("Store package specifier with optional version"), code: $n.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: Ge3.optional().describe("Cache configuration for this store (TTL-only rules, optional recursive `cache.store`)"), variables: yn2.optional().describe("Store-level variables (highest priority in cascade)"), examples: Pn3.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(An);
4295
- Fn3 = 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");
4296
- Nn2 = i4.record(i4.string(), Fn3).meta({ id: "FlowContractActions", title: "Flow.ContractActions", description: "Action-level contract entries keyed by action name." }).describe("Action-level contract entries");
4297
- zn2 = i4.record(i4.string(), Nn2).meta({ id: "FlowContractEvents", title: "Flow.ContractEvents", description: "Entity-action event schemas (entity \u2192 action \u2192 schema)." }).describe("Entity-action event schemas");
4298
- _n2 = i4.object({ extend: i4.string().optional(), tagging: i4.number().optional(), description: i4.string().optional(), events: In.optional(), schema: Dn.optional() }).meta({ id: "ContractRule", title: "Flow.ContractRule", description: "Named contract entry" });
4299
- Ln2 = i4.record(i4.string(), _n2).meta({ id: "FlowContract", title: "Flow.Contract", description: "Named contracts map with optional extend inheritance." }).describe("Named contracts with optional extend inheritance");
4300
- qn2 = 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");
4301
- Wn3 = 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: kn2.optional().describe("Free-form key-value settings consumed by the platform runtime."), bundle: jn.optional().describe("Bundle configuration: NPM packages, transitive dependency overrides."), observe: qn2.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");
4302
- Un2 = i4.object({ config: Wn3.optional().describe("Per-flow configuration: platform, url, settings, bundle."), sources: i4.record(i4.string(), Tn2).optional().describe("Source configurations (data capture) keyed by unique identifier"), destinations: i4.record(i4.string(), Jn2).optional().describe("Destination configurations (data output) keyed by unique identifier"), transformers: i4.record(i4.string(), Rn2).optional().describe("Transformer configurations (event transformation) keyed by unique identifier"), stores: i4.record(i4.string(), Mn).optional().describe("Store configurations (key-value storage) keyed by unique identifier"), collector: i4.looseObject({ next: Ue3.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: yn2.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");
4303
- Bn3 = 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: yn2.optional().describe("Shared variables for interpolation across all flows (use $var.name syntax, deep paths supported)"), contract: Ln2.optional().describe("Named contracts with extend inheritance and dot-path references"), flows: i4.record(i4.string(), Un2).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)");
4304
- Kn2 = i4.toJSONSchema(Bn3, { target: "draft-7" });
4305
- Qn3 = o3(Un2);
4306
- Yn2 = o3(Wn3);
4307
- Xn2 = o3(Tn2);
4308
- ei = o3(Jn2);
4309
- ti = o3(Rn2);
4310
- ni = o3(Mn);
4311
- ii = o3(_n2);
4312
- oi = o3(Ln2);
4313
- ri = o3(In);
4314
- ai = si.object({ lang: si.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: si.string().describe("Code snippet") });
4315
- ci = si.object({ text: si.string().describe("Short actionable hint text focused on walkerOS usage"), code: si.array(ai).optional().describe("Optional code snippets") });
4316
- li = si.record(si.string(), ci).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
4317
- di = i4.object({ param: i4.string().describe("Lowercase URL parameter name. Match is case-insensitive on lookup."), platform: i4.string().describe("Canonical platform identifier (lowercase, kebab-case).") });
4318
- pi = i4.object({ client_email: i4.string().describe("Service account client email"), private_key: i4.string().describe("Service account private key (PEM)"), project_id: i4.string().optional().describe("GCP project id (derived from environment when omitted)") }).meta({ id: "ServiceAccount", title: "ServiceAccount", description: "Google-style service account credentials (client_email, private_key, optional project_id)." }).describe("Google-style service account credentials");
4319
- ui = i4.union([i4.string(), pi]).meta({ id: "Credentials", title: "Credentials", description: "Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed service account object." }).describe("Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed object");
4320
- fi = o3(ui);
4321
- yi = () => true;
4322
- Oi = /* @__PURE__ */ new WeakMap();
4323
- Ni = /* @__PURE__ */ new Set(["description", "examples", "title", "$comment"]);
4324
- zi = /* @__PURE__ */ new Set(["additionalItems", "additionalProperties", "contains", "contentSchema", "else", "if", "items", "not", "propertyNames", "then", "unevaluatedItems", "unevaluatedProperties"]);
4325
- _i = /* @__PURE__ */ new Set(["allOf", "anyOf", "items", "oneOf", "prefixItems"]);
4326
- Li = /* @__PURE__ */ new Set(["properties", "patternProperties", "dependentSchemas", "dependentRequired", "dependencies", "$defs", "definitions"]);
4327
- Zi = "$code:";
4328
- Gi = /\$store\.([a-zA-Z_][a-zA-Z0-9_]*)/g;
4329
- Ki = /\$env\.([A-Za-z_]\w*)(=[^"}\s]*)?/g;
4330
- Qi = /\$flow\.([a-zA-Z_][a-zA-Z0-9_]*)(?:\.([a-zA-Z0-9_.]+))?/g;
4331
- Yi = /\$(var|store|flow|secret):([a-zA-Z_][a-zA-Z0-9_]*)/g;
4332
- Xi = /\$secret\.([A-Za-z0-9_]+)/g;
4333
- eo2 = /\$var\.(\w+)/g;
4334
- io = [{ 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" }];
4335
- oo = ["title", "description"];
4336
- ro2 = ["sources", "transformers", "destinations", "stores"];
4337
- co = ["@walkeros/server-store-fs", "@walkeros/server-store-s3", "@walkeros/server-store-gcs"];
4338
- lo3 = "@walkeros/server-transformer-file";
4339
- po2 = /^\$store\.([a-zA-Z_][a-zA-Z0-9_]*)$/;
4340
- yo2 = /^(event|ingest)(\..+)?$/;
4341
- So2 = /^(event|ingest|cache)(\..+)?$/;
4342
- wo3 = ["sources", "transformers", "destinations"];
4343
- zo = { source: Bt2.configJsonSchema, destination: Te2.configJsonSchema, store: pn2.configJsonSchema };
4344
- Yo = {};
4345
- t4(Yo, { STOP: () => Xo, eq: () => er2, interpret: () => or2, makeTransformers: () => tr, routeCases: () => nr2, visits: () => rr });
4346
- Xo = "(stop)";
4347
- nr2 = [{ 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: er2("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: er2("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", Xo], ["a", "y", "z"]]] }, { name: "fork at depth 2 carries every enclosing continuation", spec: ["a", { one: [{ match: er2("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: er2("ingest.tier", "gold"), stop: true }, "b"], sets: { a: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["a", Xo]]] }, { name: "gated stop that fails falls through", spec: ["a", { match: er2("ingest.tier", "gold"), stop: true }, "b"], roots: [{ ingest: { tier: "gold" } }, { ingest: { tier: "silver" } }], expected: [[["a", Xo]], [["a", "b"]]] }, { name: "unconditional stop", spec: ["a", { stop: true }, "b"], roots: [{ ingest: {} }], expected: [[["a", Xo]]] }, { name: "one with a stop entry", spec: { one: [{ match: er2("ingest.x", "1"), stop: true }, { next: "b" }] }, roots: [{ ingest: { x: "1" } }, { ingest: { x: "2" } }], expected: [[[Xo]], [["b"]]] }, { name: "state get into ingest.tier \u2192 next one on ingest.tier", spec: ["state", { one: [{ match: er2("ingest.tier", "gold"), next: "vip" }, { next: "std" }] }], sets: { state: { tier: "gold" } }, roots: [{ ingest: {} }], expected: [[["state", "vip"]]] }];
4348
- sr2 = ["consent", "include", "data"];
4349
- ar2 = ["consent", "include", "remove", "batch", "settings", "extend", "data", "silent"];
4350
- lr2 = { 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" } };
4351
- dr2 = ["disabled", "id", "logger", "mock", "chainMocks"];
4352
- pr2 = /^[A-Za-z_$][A-Za-z0-9_$]*$/;
4353
- gr = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
4354
- vr = ["sources", "destinations", "transformers", "stores"];
4355
- yr = { sources: "Source", destinations: "Destination", transformers: "Transformer", stores: "Store" };
4356
- Cr2 = ["sources", "transformers", "destinations"];
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
+ 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)");
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
+ 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
+ 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
+ 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
+ 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);
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");
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)");
4308
+ ti = i4.toJSONSchema(Kn2, { target: "draft-7" });
4309
+ ni = o3(Gn3);
4310
+ ii = o3(Zn);
4311
+ oi = o3(Nn2);
4312
+ ri = o3(_n2);
4313
+ si = o3(zn2);
4314
+ ai = o3(Ln2);
4315
+ ci = o3(Bn3);
4316
+ li = o3(Vn2);
4317
+ di = o3(Jn2);
4318
+ ui = pi.object({ lang: pi.string().optional().describe("Language identifier (e.g. json, sql, bash, typescript)"), code: pi.string().describe("Code snippet") });
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
+ mi = pi.record(pi.string(), fi).describe("Keyed hints for AI consumption \u2014 lightweight context beyond schemas and examples");
4321
+ gi = i4.object({ param: i4.string().describe("Lowercase URL parameter name. Match is case-insensitive on lookup."), platform: i4.string().describe("Canonical platform identifier (lowercase, kebab-case).") });
4322
+ hi = i4.object({ client_email: i4.string().describe("Service account client email"), private_key: i4.string().describe("Service account private key (PEM)"), project_id: i4.string().optional().describe("GCP project id (derived from environment when omitted)") }).meta({ id: "ServiceAccount", title: "ServiceAccount", description: "Google-style service account credentials (client_email, private_key, optional project_id)." }).describe("Google-style service account credentials");
4323
+ bi = i4.union([i4.string(), hi]).meta({ id: "Credentials", title: "Credentials", description: "Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed service account object." }).describe("Service account credentials: a JSON string (back it with a managed secret via $secret.NAME) or a parsed object");
4324
+ vi = o3(bi);
4325
+ xi = () => true;
4326
+ Ai = /* @__PURE__ */ new WeakMap();
4327
+ Wi = /* @__PURE__ */ new Set(["description", "examples", "title", "$comment"]);
4328
+ Ui = /* @__PURE__ */ new Set(["additionalItems", "additionalProperties", "contains", "contentSchema", "else", "if", "items", "not", "propertyNames", "then", "unevaluatedItems", "unevaluatedProperties"]);
4329
+ Bi = /* @__PURE__ */ new Set(["allOf", "anyOf", "items", "oneOf", "prefixItems"]);
4330
+ Vi = /* @__PURE__ */ new Set(["properties", "patternProperties", "dependentSchemas", "dependentRequired", "dependencies", "$defs", "definitions"]);
4331
+ Yi = "$code:";
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;
4337
+ ro2 = /\$var\.(\w+)/g;
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"];
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"];
4347
+ Uo = { source: Kt2.configJsonSchema, destination: Ne3.configJsonSchema, store: hn2.configJsonSchema };
4348
+ ir2 = {};
4349
+ t4(ir2, { STOP: () => or2, eq: () => rr, interpret: () => lr2, makeTransformers: () => sr2, routeCases: () => ar2, visits: () => dr2 });
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"]]] }];
4352
+ pr2 = ["consent", "include", "data"];
4353
+ ur2 = ["consent", "include", "remove", "batch", "settings", "extend", "data", "silent"];
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_$]*$/;
4357
+ Sr = /^[a-zA-Z_$][a-zA-Z0-9_$]*$/;
4358
+ Cr2 = ["sources", "destinations", "transformers", "stores"];
4359
+ xr = { sources: "Source", destinations: "Destination", transformers: "Transformer", stores: "Store" };
4360
+ Er2 = ["sources", "transformers", "destinations"];
4357
4361
  }
4358
4362
  });
4359
4363
 
@@ -6859,7 +6863,7 @@ function Fn2(e6, t5, n6, o5) {
6859
6863
  if (!r6 || !i6) throw new Lt("Event name is invalid");
6860
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 };
6861
6865
  void 0 !== E3 && (q4.trace = E3);
6862
- const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.7.2";
6866
+ const O4 = e6.name ?? S3.platform ?? "default", C5 = e6.release ?? "4.8.0-next-1791496487198";
6863
6867
  q4.release = { ...S3.release, [O4]: C5 };
6864
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 };
6865
6869
  }
@@ -9961,15 +9965,15 @@ async function createEntryPoint(flowSettings, buildOptions, packagePaths, logger
9961
9965
  const storePackages = detectStepPackages(flowSettings, "stores");
9962
9966
  const namedImports = detectNamedImports(flowSettings);
9963
9967
  const storeIds = new Set(Object.keys(flowSettings.stores || {}));
9964
- br(flowSettings, storeIds);
9968
+ kr(flowSettings, storeIds);
9965
9969
  if (flowSettings.sources)
9966
- hr(flowSettings.sources, "sources");
9970
+ wr(flowSettings.sources, "sources");
9967
9971
  if (flowSettings.destinations)
9968
- hr(flowSettings.destinations, "destinations");
9972
+ wr(flowSettings.destinations, "destinations");
9969
9973
  if (flowSettings.transformers)
9970
- hr(flowSettings.transformers, "transformers");
9974
+ wr(flowSettings.transformers, "transformers");
9971
9975
  if (flowSettings.stores)
9972
- hr(flowSettings.stores, "stores");
9976
+ wr(flowSettings.stores, "stores");
9973
9977
  const withDev = buildOptions.withDev !== void 0 ? buildOptions.withDev === true : buildOptions.skipWrapper === true;
9974
9978
  const {
9975
9979
  importStatements,
@@ -10091,13 +10095,13 @@ function buildSplitConfigObject(flowSettings, namedImports) {
10091
10095
  return buildSplitStepEntry(section, stepId, codeVar, runtimeProps);
10092
10096
  }
10093
10097
  Object.entries(sources).forEach(([name, source]) => {
10094
- mr2("Source", name, source);
10098
+ yr("Source", name, source);
10095
10099
  });
10096
10100
  Object.entries(destinations).forEach(([name, dest]) => {
10097
- mr2("Destination", name, dest);
10101
+ yr("Destination", name, dest);
10098
10102
  });
10099
10103
  Object.entries(transformers).forEach(([name, transformer]) => {
10100
- mr2("Transformer", name, transformer);
10104
+ yr("Transformer", name, transformer);
10101
10105
  });
10102
10106
  const sourcesEntries = Object.entries(sources).filter(([, source]) => source.package || hasCodeReference(source.code)).map(([key, source]) => buildStepEntry("Source", "sources", key, source));
10103
10107
  const destinationsEntries = Object.entries(destinations).filter(([, dest]) => dest.package || hasCodeReference(dest.code)).map(
@@ -10110,7 +10114,7 @@ function buildSplitConfigObject(flowSettings, namedImports) {
10110
10114
  );
10111
10115
  Object.entries(stores).forEach(([name, store]) => {
10112
10116
  if (store.package || hasCodeReference(store.code)) {
10113
- mr2("Store", name, store);
10117
+ yr("Store", name, store);
10114
10118
  }
10115
10119
  });
10116
10120
  const storesEntries = Object.entries(stores).filter(([, store]) => store.package || hasCodeReference(store.code)).map(([key, store]) => buildStepEntry("Store", "stores", key, store));
@@ -15386,7 +15390,7 @@ var Validator = class {
15386
15390
  };
15387
15391
 
15388
15392
  // ../transformers/validate/dist/index.mjs
15389
- var r5 = Object.freeze({ $schema: "http://json-schema.org/draft-07/schema#", description: "Partial event structure with all fields optional", allOf: [{ $ref: "#/definitions/WalkerOSPartialEvent" }], definitions: { WalkerOSProperty: { title: "WalkerOS.Property", description: "PropertyType or an array of PropertyType. Recursive structure for nested objects and arrays.", anyOf: [{ $ref: "#/definitions/WalkerOSPropertyType" }, { type: "array", items: { $ref: "#/definitions/WalkerOSPropertyType" } }] }, WalkerOSPropertyType: { title: "WalkerOS.PropertyType", description: "Base property value types (boolean, string, number, or nested Property record).", anyOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }, { type: "object", propertyNames: { type: "string" }, additionalProperties: { $ref: "#/definitions/WalkerOSProperty" } }] }, WalkerOSProperties: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Flexible property collection with optional values." }, WalkerOSOrderedProperties: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "array", items: [{ $ref: "#/definitions/WalkerOSProperty" }, { type: "number" }] }, title: "WalkerOS.OrderedProperties", description: "Ordered properties with [value, order] tuples for priority control." }, WalkerOSUser: { allOf: [{ description: "Flexible property collection with optional values", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, { type: "object", properties: { id: { description: "User identifier", type: "string" }, device: { description: "Device identifier", type: "string" }, session: { description: "Session identifier", type: "string" }, hash: { description: "Hashed identifier", type: "string" }, address: { description: "User address", type: "string" }, email: { description: "User email address", type: "string", format: "email", pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, phone: { description: "User phone number", type: "string" }, userAgent: { description: "Browser user agent string", type: "string" }, browser: { description: "Browser name", type: "string" }, browserVersion: { description: "Browser version", type: "string" }, deviceType: { description: "Device type (mobile, desktop, tablet)", type: "string" }, os: { description: "Operating system", type: "string" }, osVersion: { description: "Operating system version", type: "string" }, screenSize: { description: "Screen dimensions", type: "string" }, language: { description: "User language", type: "string" }, country: { description: "User country", type: "string" }, region: { description: "User region/state", type: "string" }, city: { description: "User city", type: "string" }, zip: { description: "User postal code", type: "string" }, timezone: { description: "User timezone", type: "string" }, ip: { description: "User IP address", type: "string" }, internal: { description: "Internal user flag (employee, test user)", type: "boolean" } }, additionalProperties: false }], title: "WalkerOS.User", description: "User identification and attributes." }, __schema0: { description: "Nested entity structure with recursive nesting support", $ref: "#/definitions/WalkerOSEntity" }, WalkerOSEntity: { title: "WalkerOS.Entity", description: "Nested entity structure with recursive nesting support.", type: "object", properties: { entity: { type: "string", description: "Entity name" }, data: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Entity-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, nested: { description: "Nested child entities", type: "array", items: { $ref: "#/definitions/__schema0" } }, context: { description: "Entity context data", allOf: [{ $ref: "#/definitions/WalkerOSOrderedProperties" }] } }, required: ["entity", "data"], additionalProperties: false }, WalkerOSEntities: { type: "array", items: { $ref: "#/definitions/__schema0" }, title: "WalkerOS.Entities", description: "Array of nested entities." }, WalkerOSConsent: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "boolean" }, title: "WalkerOS.Consent", description: "Consent state mapping. Keys are consent groups (e.g. marketing, functional), values are booleans for granted/denied." }, WalkerOSSource: { allOf: [{ description: "Flexible property collection with optional values", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, { type: "object", properties: { type: { type: "string", description: "Source kind (browser, dataLayer, gtag, ...)" }, platform: { description: "Runtime platform (web, server, app, ios, android, terminal, ...)", type: "string" }, version: { description: "Deployment version of the source emitter", type: "string" }, schema: { description: 'Event model spec version (collector defaults to "4")', type: "string" }, count: { description: "Emission sequence per run", type: "integer", minimum: 0, maximum: 9007199254740991 }, trace: { description: "Trace id shared by every event of a run (W3C trace-id shape)", type: "string" }, release: { description: "Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings", type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "string" } }, url: { type: "string" }, referrer: { type: "string" }, tool: { type: "string" }, command: { type: "string" } }, required: ["type"], additionalProperties: false }], title: "WalkerOS.Source", description: "Event source information (origin of the event)." }, WalkerOSPartialEvent: { type: "object", properties: { name: { type: "string", description: 'Event name in "entity action" format (e.g., "page view", "product add")' }, data: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Event-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, context: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "array", items: [{ $ref: "#/definitions/WalkerOSProperty" }, { type: "number" }] }, title: "WalkerOS.OrderedProperties", description: "Ordered context properties with priorities", allOf: [{ $ref: "#/definitions/WalkerOSOrderedProperties" }] }, globals: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Global properties shared across events", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, custom: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Custom implementation-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, user: { allOf: [{ description: "Flexible property collection with optional values", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, { type: "object", properties: { id: { description: "User identifier", type: "string" }, device: { description: "Device identifier", type: "string" }, session: { description: "Session identifier", type: "string" }, hash: { description: "Hashed identifier", type: "string" }, address: { description: "User address", type: "string" }, email: { description: "User email address", type: "string", format: "email", pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, phone: { description: "User phone number", type: "string" }, userAgent: { description: "Browser user agent string", type: "string" }, browser: { description: "Browser name", type: "string" }, browserVersion: { description: "Browser version", type: "string" }, deviceType: { description: "Device type (mobile, desktop, tablet)", type: "string" }, os: { description: "Operating system", type: "string" }, osVersion: { description: "Operating system version", type: "string" }, screenSize: { description: "Screen dimensions", type: "string" }, language: { description: "User language", type: "string" }, country: { description: "User country", type: "string" }, region: { description: "User region/state", type: "string" }, city: { description: "User city", type: "string" }, zip: { description: "User postal code", type: "string" }, timezone: { description: "User timezone", type: "string" }, ip: { description: "User IP address", type: "string" }, internal: { description: "Internal user flag (employee, test user)", type: "boolean" } }, additionalProperties: false }], title: "WalkerOS.User", description: "User identification and attributes" }, nested: { type: "array", items: { $ref: "#/definitions/__schema0" }, title: "WalkerOS.Entities", description: "Related nested entities", allOf: [{ $ref: "#/definitions/WalkerOSEntities" }] }, consent: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "boolean" }, title: "WalkerOS.Consent", description: "Consent states at event time", allOf: [{ $ref: "#/definitions/WalkerOSConsent" }] }, id: { type: "string", minLength: 1, description: "W3C span_id, 16 lowercase hex characters" }, trigger: { type: "string", description: "Event trigger identifier" }, entity: { type: "string", description: "Parsed entity from event name" }, action: { type: "string", description: "Parsed action from event name" }, timestamp: { type: "integer", exclusiveMinimum: 0, maximum: 9007199254740991, description: "Unix timestamp in milliseconds since epoch" }, timing: { type: "number", description: "Event processing timing information" }, source: { allOf: [{ description: "Flexible property collection with optional values", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, { type: "object", properties: { type: { type: "string", description: "Source kind (browser, dataLayer, gtag, ...)" }, platform: { description: "Runtime platform (web, server, app, ios, android, terminal, ...)", type: "string" }, version: { description: "Deployment version of the source emitter", type: "string" }, schema: { description: 'Event model spec version (collector defaults to "4")', type: "string" }, count: { description: "Emission sequence per run", type: "integer", minimum: 0, maximum: 9007199254740991 }, trace: { description: "Trace id shared by every event of a run (W3C trace-id shape)", type: "string" }, release: { description: "Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings", type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "string" } }, url: { type: "string" }, referrer: { type: "string" }, tool: { type: "string" }, command: { type: "string" } }, required: ["type"], additionalProperties: false }], title: "WalkerOS.Source", description: "Event source information" } }, additionalProperties: false, title: "WalkerOS.PartialEvent", description: "Partial event structure with all fields optional." } } });
15393
+ var r5 = Object.freeze({ $schema: "http://json-schema.org/draft-07/schema#", description: "Partial event structure with all fields optional", allOf: [{ $ref: "#/definitions/WalkerOSPartialEvent" }], definitions: { WalkerOSProperty: { title: "WalkerOS.Property", description: "PropertyType or an array of PropertyType. Recursive structure for nested objects and arrays.", anyOf: [{ $ref: "#/definitions/WalkerOSPropertyType" }, { type: "array", items: { $ref: "#/definitions/WalkerOSPropertyType" } }] }, WalkerOSPropertyType: { title: "WalkerOS.PropertyType", description: "Base property value types (boolean, string, number, or nested Property record).", anyOf: [{ type: "boolean" }, { type: "string" }, { type: "number" }, { type: "object", propertyNames: { type: "string" }, additionalProperties: { $ref: "#/definitions/WalkerOSProperty" } }] }, WalkerOSProperties: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Flexible property collection with optional values." }, WalkerOSOrderedProperties: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "array", items: [{ $ref: "#/definitions/WalkerOSProperty" }, { type: "number" }] }, title: "WalkerOS.OrderedProperties", description: "Ordered properties with [value, order] tuples for priority control." }, WalkerOSUser: { type: "object", properties: { id: { description: "User identifier", type: "string" }, device: { description: "Device identifier", type: "string" }, session: { description: "Session identifier", type: "string" }, hash: { description: "Hashed identifier", type: "string" }, address: { description: "User address", type: "string" }, email: { description: "User email address", type: "string", format: "email", pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, phone: { description: "User phone number", type: "string" }, userAgent: { description: "Browser user agent string", type: "string" }, browser: { description: "Browser name", type: "string" }, browserVersion: { description: "Browser version", type: "string" }, deviceType: { description: "Device type (mobile, desktop, tablet)", type: "string" }, os: { description: "Operating system", type: "string" }, osVersion: { description: "Operating system version", type: "string" }, screenSize: { description: "Screen dimensions", type: "string" }, language: { description: "User language", type: "string" }, country: { description: "User country", type: "string" }, region: { description: "User region/state", type: "string" }, city: { description: "User city", type: "string" }, zip: { description: "User postal code", type: "string" }, timezone: { description: "User timezone", type: "string" }, ip: { description: "User IP address", type: "string" }, internal: { description: "Internal user flag (employee, test user)", type: "boolean" }, optout: { description: "User opted out of tracking", type: "boolean" } }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.User", description: "User identification and attributes." }, __schema0: { description: "Nested entity structure with recursive nesting support", $ref: "#/definitions/WalkerOSEntity" }, WalkerOSEntity: { title: "WalkerOS.Entity", description: "Nested entity structure with recursive nesting support.", type: "object", properties: { entity: { type: "string", description: "Entity name" }, data: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Entity-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, nested: { description: "Nested child entities", type: "array", items: { $ref: "#/definitions/__schema0" } }, context: { description: "Entity context data", allOf: [{ $ref: "#/definitions/WalkerOSOrderedProperties" }] } }, required: ["entity", "data"], additionalProperties: false }, WalkerOSEntities: { type: "array", items: { $ref: "#/definitions/__schema0" }, title: "WalkerOS.Entities", description: "Array of nested entities." }, WalkerOSConsent: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "boolean" }, title: "WalkerOS.Consent", description: "Consent state mapping. Keys are consent groups (e.g. marketing, functional), values are booleans for granted/denied." }, WalkerOSSource: { type: "object", properties: { type: { type: "string", description: "Source kind (browser, dataLayer, gtag, ...)" }, platform: { description: "Runtime platform (web, server, app, ios, android, terminal, ...)", type: "string" }, version: { description: "Deployment version of the source emitter", type: "string" }, schema: { description: 'Event model spec version (collector defaults to "4")', type: "string" }, count: { description: "Emission sequence per run", type: "integer", minimum: 0, maximum: 9007199254740991 }, trace: { description: "Trace id shared by every event of a run (W3C trace-id shape)", type: "string" }, release: { description: "Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings", type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "string" } }, url: { type: "string" }, referrer: { type: "string" }, tool: { type: "string" }, command: { type: "string" } }, required: ["type"], additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Source", description: "Event source information (origin of the event)." }, WalkerOSPartialEvent: { type: "object", properties: { name: { type: "string", description: 'Event name in "entity action" format (e.g., "page view", "product add")' }, data: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Event-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, context: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "array", items: [{ $ref: "#/definitions/WalkerOSProperty" }, { type: "number" }] }, title: "WalkerOS.OrderedProperties", description: "Ordered context properties with priorities", allOf: [{ $ref: "#/definitions/WalkerOSOrderedProperties" }] }, globals: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Global properties shared across events", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, custom: { type: "object", propertyNames: { type: "string" }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Properties", description: "Custom implementation-specific properties", allOf: [{ $ref: "#/definitions/WalkerOSProperties" }] }, user: { type: "object", properties: { id: { description: "User identifier", type: "string" }, device: { description: "Device identifier", type: "string" }, session: { description: "Session identifier", type: "string" }, hash: { description: "Hashed identifier", type: "string" }, address: { description: "User address", type: "string" }, email: { description: "User email address", type: "string", format: "email", pattern: "^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" }, phone: { description: "User phone number", type: "string" }, userAgent: { description: "Browser user agent string", type: "string" }, browser: { description: "Browser name", type: "string" }, browserVersion: { description: "Browser version", type: "string" }, deviceType: { description: "Device type (mobile, desktop, tablet)", type: "string" }, os: { description: "Operating system", type: "string" }, osVersion: { description: "Operating system version", type: "string" }, screenSize: { description: "Screen dimensions", type: "string" }, language: { description: "User language", type: "string" }, country: { description: "User country", type: "string" }, region: { description: "User region/state", type: "string" }, city: { description: "User city", type: "string" }, zip: { description: "User postal code", type: "string" }, timezone: { description: "User timezone", type: "string" }, ip: { description: "User IP address", type: "string" }, internal: { description: "Internal user flag (employee, test user)", type: "boolean" }, optout: { description: "User opted out of tracking", type: "boolean" } }, additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.User", description: "User identification and attributes", allOf: [{ $ref: "#/definitions/WalkerOSUser" }] }, nested: { type: "array", items: { $ref: "#/definitions/__schema0" }, title: "WalkerOS.Entities", description: "Related nested entities", allOf: [{ $ref: "#/definitions/WalkerOSEntities" }] }, consent: { type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "boolean" }, title: "WalkerOS.Consent", description: "Consent states at event time", allOf: [{ $ref: "#/definitions/WalkerOSConsent" }] }, id: { type: "string", minLength: 1, description: "W3C span_id, 16 lowercase hex characters" }, trigger: { type: "string", description: "Event trigger identifier" }, entity: { type: "string", description: "Parsed entity from event name" }, action: { type: "string", description: "Parsed action from event name" }, timestamp: { type: "integer", exclusiveMinimum: 0, maximum: 9007199254740991, description: "Unix timestamp in milliseconds since epoch" }, timing: { type: "number", description: "Event processing timing information" }, source: { type: "object", properties: { type: { type: "string", description: "Source kind (browser, dataLayer, gtag, ...)" }, platform: { description: "Runtime platform (web, server, app, ios, android, terminal, ...)", type: "string" }, version: { description: "Deployment version of the source emitter", type: "string" }, schema: { description: 'Event model spec version (collector defaults to "4")', type: "string" }, count: { description: "Emission sequence per run", type: "integer", minimum: 0, maximum: 9007199254740991 }, trace: { description: "Trace id shared by every event of a run (W3C trace-id shape)", type: "string" }, release: { description: "Per-flow config release map, keyed by flow name; accumulates across walkerOS crossings", type: "object", propertyNames: { type: "string" }, additionalProperties: { type: "string" } }, url: { type: "string" }, referrer: { type: "string" }, tool: { type: "string" }, command: { type: "string" } }, required: ["type"], additionalProperties: { allOf: [{ $ref: "#/definitions/WalkerOSProperty" }] }, title: "WalkerOS.Source", description: "Event source information", allOf: [{ $ref: "#/definitions/WalkerOSSource" }] } }, additionalProperties: false, title: "WalkerOS.PartialEvent", description: "Partial event structure with all fields optional." } } });
15390
15394
  var i5 = /* @__PURE__ */ new Map();
15391
15395
  function n5(e6) {
15392
15396
  if ("object" != typeof e6 || null === e6) return false;
@@ -15418,7 +15422,7 @@ function o4(e6) {
15418
15422
  return t5 ? r6 : e6;
15419
15423
  }
15420
15424
  function p3(e6, p4, a5) {
15421
- const l4 = (function(e7, t5) {
15425
+ const d3 = (function(e7, t5) {
15422
15426
  const i6 = [];
15423
15427
  t5.format && i6.push(r5);
15424
15428
  for (const r6 of t5.contracts ?? []) if (n5(r6)) {
@@ -15426,23 +15430,23 @@ function p3(e6, p4, a5) {
15426
15430
  o5 && i6.push(o5), r6.schema && i6.push(r6.schema);
15427
15431
  } else i6.push(r6);
15428
15432
  return i6;
15429
- })(e6, a5), d3 = o4(e6), c3 = [];
15433
+ })(e6, a5), c3 = o4(e6), l4 = [];
15430
15434
  let y4;
15431
- return l4.forEach((e7, r6) => {
15435
+ return d3.forEach((e7, r6) => {
15432
15436
  try {
15433
15437
  const r7 = (function(e8) {
15434
15438
  const r8 = JSON.stringify(e8), n6 = i5.get(r8);
15435
15439
  if (n6) return n6;
15436
15440
  const s6 = JSON.parse(r8), o5 = new Validator(s6, "2020-12");
15437
15441
  return i5.set(r8, o5), o5;
15438
- })(e7).validate(d3);
15442
+ })(e7).validate(c3);
15439
15443
  if (r7.valid) return;
15440
- for (const e8 of r7.errors) c3.push({ path: e8.instanceLocation, message: e8.error, level: "error" });
15444
+ for (const e8 of r7.errors) l4.push({ path: e8.instanceLocation, message: e8.error, level: "error" });
15441
15445
  } catch (e8) {
15442
15446
  const t5 = e8 instanceof Error ? e8.message : String(e8);
15443
- y4 ??= t5, c3.push({ path: `schema[${r6}]`, message: `Validation engine failed: ${t5}`, level: "error" });
15447
+ y4 ??= t5, l4.push({ path: `schema[${r6}]`, message: `Validation engine failed: ${t5}`, level: "error" });
15444
15448
  }
15445
- }), void 0 === y4 ? { isValid: 0 === c3.length, errors: c3 } : { isValid: false, errors: c3, engineError: y4 };
15449
+ }), void 0 === y4 ? { isValid: 0 === l4.length, errors: l4 } : { isValid: false, errors: l4, engineError: y4 };
15446
15450
  }
15447
15451
 
15448
15452
  // src/commands/validate/scope.ts
@@ -15631,7 +15635,7 @@ init_dist();
15631
15635
  import * as fs23 from "fs";
15632
15636
  import * as path22 from "path";
15633
15637
  import Ajv from "ajv";
15634
- var CLIENT_HEADER = "walkeros-cli/4.7.2";
15638
+ var CLIENT_HEADER = "walkeros-cli/4.8.0-next-1791496487198";
15635
15639
  function createSettingsContext(configDir) {
15636
15640
  return { configDir, cache: /* @__PURE__ */ new Map(), compiled: /* @__PURE__ */ new Map() };
15637
15641
  }
@@ -16183,7 +16187,7 @@ function runFlowChecks(input, options) {
16183
16187
  }
16184
16188
  };
16185
16189
  perFlow(["flow:structure"], (name, flow, file) => {
16186
- const structure = jr({
16190
+ const structure = Dr2({
16187
16191
  ...file,
16188
16192
  flows: { [name]: flow }
16189
16193
  });
@@ -17822,7 +17826,7 @@ import semver4 from "semver";
17822
17826
  init_api_request();
17823
17827
  init_client_context();
17824
17828
  init_openapi_subset();
17825
- var bakedContractVersion = true ? "4.7.0+80fb4d79" : PLACEHOLDER;
17829
+ var bakedContractVersion = true ? "4.7.0+338d4329" : PLACEHOLDER;
17826
17830
  var bakedClientOperations = typeof define_CLIENT_OPERATION_DIGESTS_default === "object" ? define_CLIENT_OPERATION_DIGESTS_default : [];
17827
17831
  function isRecord5(value) {
17828
17832
  return value !== null && typeof value === "object" && !Array.isArray(value);
@@ -18322,7 +18326,7 @@ flowsCmd.command("update <flowId>").description("Update a flow").option("--proje
18322
18326
  ).option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
18323
18327
  await updateFlowCommand(flowId, options);
18324
18328
  });
18325
- flowsCmd.command("delete <flowId>").description("Delete a flow").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
18329
+ flowsCmd.command("delete <flowId>").description("Delete a flow and its frames").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {
18326
18330
  await deleteFlowCommand(flowId, options);
18327
18331
  });
18328
18332
  flowsCmd.command("duplicate <flowId>").description("Duplicate a flow").option("--project <id>", "project ID (defaults to WALKEROS_PROJECT_ID)").option("--name <name>", "name for the copy").option("-o, --output <path>", "output file path").option("--json", "output as JSON").option("-v, --verbose", "verbose output").option("-s, --silent", "suppress output").action(async (flowId, options) => {