@walkeros/cli 4.8.0 → 4.8.1-next-1792019907609

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dev.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { z } from '@walkeros/core/dev';
2
+ import { Flow } from '@walkeros/core';
2
3
 
3
4
  /**
4
5
  * CLI Primitive Schemas
@@ -301,4 +302,64 @@ declare namespace index {
301
302
  export { type index_BundleInput as BundleInput, index_BundleInputSchema as BundleInputSchema, index_BundleInputShape as BundleInputShape, type index_BundleOptions as BundleOptions, index_BundleOptionsSchema as BundleOptionsSchema, index_FilePathSchema as FilePathSchema, type index_Platform as Platform, index_PlatformSchema as PlatformSchema, index_PortSchema as PortSchema, type index_PushInput as PushInput, index_PushInputSchema as PushInputSchema, index_PushInputShape as PushInputShape, type index_PushOptions as PushOptions, index_PushOptionsSchema as PushOptionsSchema, type index_SimulateInput as SimulateInput, index_SimulateInputSchema as SimulateInputSchema, index_SimulateInputShape as SimulateInputShape, type index_SimulateOptions as SimulateOptions, index_SimulateOptionsSchema as SimulateOptionsSchema, type index_ValidateInput as ValidateInput, index_ValidateInputSchema as ValidateInputSchema, index_ValidateInputShape as ValidateInputShape, type index_ValidateOptions as ValidateOptions, index_ValidateOptionsSchema as ValidateOptionsSchema, type index_ValidationType as ValidationType, index_ValidationTypeSchema as ValidationTypeSchema };
302
303
  }
303
304
 
304
- export { index as schemas };
305
+ /**
306
+ * Shared resolver for the export name to import from a flow component's
307
+ * package.
308
+ *
309
+ * Both `walkeros bundle` and `walkeros setup` need to know which named export
310
+ * (or default) to pull off a package referenced by a flow component. The
311
+ * precedence chain is:
312
+ *
313
+ * 1. `flow.<kind>.<id>.import` if set (named export selector at the step).
314
+ * 2. `flow.config.bundle.packages[<package>].imports[0]` if set.
315
+ * 3. Otherwise undefined; the caller falls back to the package's `default`
316
+ * export.
317
+ *
318
+ * This lives in `cli/src/core/` so both `commands/bundle/*` and
319
+ * `commands/setup/*` import the same function. Duplicating the chain is how
320
+ * setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`
321
+ * routed through BigQuery's setup because it ignored the `code` field and
322
+ * always grabbed `mod.default`).
323
+ */
324
+
325
+ type ComponentKind = 'source' | 'transformer' | 'destination' | 'store';
326
+ type ResolveSource = 'import' | 'imports' | 'default';
327
+ interface ResolvedExportName {
328
+ /**
329
+ * The named export to pull off the imported module, or `undefined` to
330
+ * indicate the caller should use the package's `default` export.
331
+ */
332
+ exportName: string | undefined;
333
+ /** Which precedence step produced the result (useful for diagnostics). */
334
+ source: ResolveSource;
335
+ }
336
+ /**
337
+ * Resolve the export name to import for a flow component's package.
338
+ *
339
+ * See module docs for the precedence chain. Inline code (`code` is an object)
340
+ * doesn't enter this resolver at all — setup rejects inline code at a higher
341
+ * layer.
342
+ */
343
+ declare function resolveExportName(flow: Flow, kind: ComponentKind, id: string): ResolvedExportName;
344
+
345
+ /**
346
+ * Selects the dev examples of one export from a package's awaited `/dev`
347
+ * module.
348
+ *
349
+ * A package with several exports (`walkerOS.exports` in its package.json)
350
+ * ships `exportExamples`, a map from export name to that export's examples,
351
+ * the default export included. A package with one export ships only
352
+ * `examples`.
353
+ *
354
+ * - Map present, export named: `exportExamples[exportName]`. A name missing
355
+ * from the map resolves to `undefined`, never to another export's examples.
356
+ * - Map present, no export name (the step uses the default export):
357
+ * `examples`, which by convention holds the default export's examples.
358
+ * - No map: `examples`.
359
+ *
360
+ * `exportName` comes from `resolveExportName` (step `import`, else
361
+ * `bundle.packages[pkg].imports[0]`, else default).
362
+ */
363
+ declare function selectDevExamples(devModule: unknown, exportName: string | undefined): Record<string, unknown> | undefined;
364
+
365
+ export { resolveExportName, index as schemas, selectDevExamples };
package/dist/dev.js CHANGED
@@ -120,7 +120,62 @@ var PushInputShape = {
120
120
  platform: PlatformSchema.optional().describe("Override platform detection")
121
121
  };
122
122
  var PushInputSchema = z5.object(PushInputShape);
123
+
124
+ // src/core/resolve-export-name.ts
125
+ function getStep(flow, kind, id) {
126
+ switch (kind) {
127
+ case "source":
128
+ return flow.sources?.[id];
129
+ case "transformer":
130
+ return flow.transformers?.[id];
131
+ case "destination":
132
+ return flow.destinations?.[id];
133
+ case "store":
134
+ return flow.stores?.[id];
135
+ }
136
+ }
137
+ function getBundlePackages(flow) {
138
+ return flow.config?.bundle?.packages;
139
+ }
140
+ function readFirstImport(packages, packageName) {
141
+ if (!packages || !packageName) return void 0;
142
+ const pkg = packages[packageName];
143
+ if (!pkg || !pkg.imports || pkg.imports.length === 0) return void 0;
144
+ const first = pkg.imports[0];
145
+ return typeof first === "string" && first.length > 0 ? first : void 0;
146
+ }
147
+ function resolveExportName(flow, kind, id) {
148
+ const step = getStep(flow, kind, id);
149
+ if (!step) return { exportName: void 0, source: "default" };
150
+ const packageName = step.package;
151
+ const importName = step.import;
152
+ if (typeof importName === "string" && importName.length > 0) {
153
+ return { exportName: importName, source: "import" };
154
+ }
155
+ const firstImport = readFirstImport(getBundlePackages(flow), packageName);
156
+ if (firstImport) {
157
+ return { exportName: firstImport, source: "imports" };
158
+ }
159
+ return { exportName: void 0, source: "default" };
160
+ }
161
+
162
+ // src/commands/push/dev-examples.ts
163
+ function isRecord(value) {
164
+ return value !== null && typeof value === "object";
165
+ }
166
+ function selectDevExamples(devModule, exportName) {
167
+ if (!isRecord(devModule)) return void 0;
168
+ const map = devModule.exportExamples;
169
+ if (isRecord(map) && exportName !== void 0) {
170
+ const selected = map[exportName];
171
+ return isRecord(selected) ? selected : void 0;
172
+ }
173
+ const examples = devModule.examples;
174
+ return isRecord(examples) ? examples : void 0;
175
+ }
123
176
  export {
124
- schemas_exports as schemas
177
+ resolveExportName,
178
+ schemas_exports as schemas,
179
+ selectDevExamples
125
180
  };
126
181
  //# sourceMappingURL=dev.js.map
package/dist/dev.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/schemas/index.ts","../src/schemas/primitives.ts","../src/schemas/validate.ts","../src/schemas/bundle.ts","../src/schemas/simulate.ts","../src/schemas/push.ts"],"sourcesContent":["/**\n * CLI Schemas\n *\n * Zod schemas for CLI parameter validation.\n * Follows walkerOS patterns from @walkeros/core.\n */\n\nexport { PortSchema, FilePathSchema } from './primitives';\n\nexport {\n ValidationTypeSchema,\n ValidateOptionsSchema,\n ValidateInputShape,\n ValidateInputSchema,\n type ValidationType,\n type ValidateOptions,\n type ValidateInput,\n} from './validate';\n\nexport {\n BundleOptionsSchema,\n BundleInputShape,\n BundleInputSchema,\n type BundleOptions,\n type BundleInput,\n} from './bundle';\n\nexport {\n PlatformSchema,\n SimulateOptionsSchema,\n SimulateInputShape,\n SimulateInputSchema,\n type Platform,\n type SimulateOptions,\n type SimulateInput,\n} from './simulate';\n\nexport {\n PushOptionsSchema,\n PushInputShape,\n PushInputSchema,\n type PushOptions,\n type PushInput,\n} from './push';\n","/**\n * CLI Primitive Schemas\n *\n * Basic Zod schemas for CLI parameter validation.\n * Follows walkerOS patterns from @walkeros/core.\n */\n\nimport { z } from '@walkeros/core/dev';\n\n/**\n * Port number schema.\n *\n * @remarks\n * Validates HTTP server port number.\n * Must be integer between 1-65535.\n */\nexport const PortSchema = z\n .number()\n .int('Port must be an integer')\n .min(1, 'Port must be at least 1')\n .max(65535, 'Port must be at most 65535')\n .describe('HTTP server port number');\n\n/**\n * File path schema.\n *\n * @remarks\n * Basic string validation for file paths.\n * File existence is checked separately (Zod can't check filesystem).\n */\nexport const FilePathSchema = z\n .string()\n .min(1, 'File path cannot be empty')\n .describe('Path to configuration file');\n","/**\n * Validate Command Schemas\n *\n * Zod schemas for validate command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\n\n/**\n * Validation type schema.\n *\n * @remarks\n * Validates the type of validation to perform.\n * - `contract`: Validate a data contract\n * - `event`: Validate a walkerOS event object\n * - `flow`: Validate a flow configuration file\n * - `mapping`: Validate mapping rules\n */\nexport const ValidationTypeSchema = z\n .enum(['contract', 'event', 'flow', 'mapping'])\n .describe('Validation type: \"event\", \"flow\", \"mapping\", or \"contract\"');\n\nexport type ValidationType = z.infer<typeof ValidationTypeSchema>;\n\n/**\n * Validate options schema.\n *\n * @remarks\n * Options for the programmatic validate() API.\n */\nexport const ValidateOptionsSchema = z.object({\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n path: z\n .string()\n .optional()\n .describe(\n 'Entry path for package schema validation (e.g., \"destinations.snowplow\", \"stores.cache\"). Checks the entry in every flow that has it, or only in --flow.',\n ),\n strict: z\n .boolean()\n .optional()\n .describe(\n 'Escalate: strict turns warnings and skips into failures (valid is false), contract disagreements error',\n ),\n offline: z\n .boolean()\n .optional()\n .describe(\n 'Do not fetch package schemas: step settings are not checked against them, and the result scope says so. Only with type \"flow\" and no path.',\n ),\n configDir: z\n .string()\n .optional()\n .describe(\n \"Directory local `path` packages resolve against. Defaults to the input file's directory; set it when passing a parsed document.\",\n ),\n});\n\nexport type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const ValidateInputShape = {\n type: ValidationTypeSchema,\n input: z\n .string()\n .min(1)\n .describe('JSON string, file path, or URL to validate'),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n path: z\n .string()\n .optional()\n .describe(\n 'Entry path for package schema validation (e.g., \"destinations.snowplow\"). Only with type \"flow\": validates the entry against its package JSON Schema in every flow that has it, or only in the given flow.',\n ),\n strict: z\n .boolean()\n .optional()\n .describe(\n 'Escalate: strict turns warnings and skips into failures: valid is false (the CLI exits 2), and contract example disagreements become errors. Every check runs with or without it.',\n ),\n offline: z\n .boolean()\n .optional()\n .describe(\n 'Do not fetch package schemas: step settings are not checked against them, and details.scope says so. Only with type \"flow\" and no path.',\n ),\n};\n\n/**\n * Validate input schema for MCP tools.\n *\n * @remarks\n * Full input schema including type and input source.\n */\nexport const ValidateInputSchema = z.object(ValidateInputShape);\n\nexport type ValidateInput = z.infer<typeof ValidateInputSchema>;\n","/**\n * Bundle Command Schemas\n *\n * Zod schemas for bundle command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\n\n/**\n * Bundle options schema.\n *\n * @remarks\n * Options for the programmatic bundle() API.\n */\nexport const BundleOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n stats: z\n .boolean()\n .optional()\n .default(true)\n .describe('Return bundle statistics'),\n cache: z\n .boolean()\n .optional()\n .default(true)\n .describe('Enable package caching'),\n flowName: z.string().optional().describe('Flow name for multi-flow configs'),\n});\n\nexport type BundleOptions = z.infer<typeof BundleOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const BundleInputShape = {\n configPath: FilePathSchema.describe(\n 'Path to flow configuration file (JSON or JavaScript), URL, or inline JSON string',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n stats: z\n .boolean()\n .optional()\n .default(true)\n .describe('Return bundle statistics'),\n output: z\n .string()\n .optional()\n .describe('Output file path (defaults to config-defined)'),\n};\n\n/**\n * Bundle input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path and options.\n */\nexport const BundleInputSchema = z.object(BundleInputShape);\n\nexport type BundleInput = z.infer<typeof BundleInputSchema>;\n","/**\n * Simulate Command Schemas\n *\n * Zod schemas for simulate command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\n\n/**\n * Platform schema.\n *\n * @remarks\n * Validates platform type for event simulation.\n */\nexport const PlatformSchema = z\n .enum(['web', 'server'])\n .describe('Platform type for event processing');\n\nexport type Platform = z.infer<typeof PlatformSchema>;\n\n/**\n * Simulate options schema.\n *\n * @remarks\n * Options for the programmatic simulate() API.\n */\nexport const SimulateOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n json: z.boolean().optional().describe('Format output as JSON'),\n});\n\nexport type SimulateOptions = z.infer<typeof SimulateOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const SimulateInputShape = {\n configPath: FilePathSchema.describe(\n 'Path to flow configuration file, URL, or inline JSON string',\n ),\n event: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Event as JSON string, file path, or URL. For sources: { content, trigger?, env? }.',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n platform: PlatformSchema.optional().describe('Override platform detection'),\n step: z\n .string()\n .optional()\n .describe(\n 'Step target in type.name format (e.g. \"source.browser\", \"destination.gtag\")',\n ),\n};\n\n/**\n * Simulate input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path, event, and options.\n */\nexport const SimulateInputSchema = z.object(SimulateInputShape);\n\nexport type SimulateInput = z.infer<typeof SimulateInputSchema>;\n","/**\n * Push Command Schemas\n *\n * Zod schemas for push command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\nimport { PlatformSchema } from './simulate';\n\n/**\n * Push options schema.\n *\n * @remarks\n * Options for the programmatic push() API.\n */\nexport const PushOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n json: z.boolean().optional().describe('Format output as JSON'),\n});\n\nexport type PushOptions = z.infer<typeof PushOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const PushInputShape = {\n configPath: FilePathSchema.describe('Path to flow configuration file'),\n event: z.string().min(1).describe('Event as JSON string, file path, or URL'),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n platform: PlatformSchema.optional().describe('Override platform detection'),\n};\n\n/**\n * Push input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path, event, and options.\n */\nexport const PushInputSchema = z.object(PushInputShape);\n\nexport type PushInput = z.infer<typeof PushInputSchema>;\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,SAAS;AASX,IAAM,aAAa,EACvB,OAAO,EACP,IAAI,yBAAyB,EAC7B,IAAI,GAAG,yBAAyB,EAChC,IAAI,OAAO,4BAA4B,EACvC,SAAS,yBAAyB;AAS9B,IAAM,iBAAiB,EAC3B,OAAO,EACP,IAAI,GAAG,2BAA2B,EAClC,SAAS,4BAA4B;;;AC3BxC,SAAS,KAAAA,UAAS;AAYX,IAAM,uBAAuBA,GACjC,KAAK,CAAC,YAAY,SAAS,QAAQ,SAAS,CAAC,EAC7C,SAAS,4DAA4D;AAUjE,IAAM,wBAAwBA,GAAE,OAAO;AAAA,EAC5C,MAAMA,GAAE,OAAO,EAAE,SAAS,EAAE,SAAS,kCAAkC;AAAA,EACvE,MAAMA,GACH,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,QAAQA,GACL,QAAQ,EACR,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,SAASA,GACN,QAAQ,EACR,SAAS,EACT;AAAA,IACC;AAAA,EACF;AAAA,EACF,WAAWA,GACR,OAAO,EACP,SAAS,EACT;AAAA,IACC;AAAA,EACF;AACJ,CAAC;AAWM,IAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA,EACN,OAAOA,GACJ,OAAO,EACP,IAAI,CAAC,EACL,SAAS,4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ts","../src/schemas/bundle.ts","../src/schemas/simulate.ts","../src/schemas/push.ts","../src/core/resolve-export-name.ts","../src/commands/push/dev-examples.ts"],"sourcesContent":["/**\n * CLI Schemas\n *\n * Zod schemas for CLI parameter validation.\n * Follows walkerOS patterns from @walkeros/core.\n */\n\nexport { PortSchema, FilePathSchema } from './primitives';\n\nexport {\n ValidationTypeSchema,\n ValidateOptionsSchema,\n ValidateInputShape,\n ValidateInputSchema,\n type ValidationType,\n type ValidateOptions,\n type ValidateInput,\n} from './validate';\n\nexport {\n BundleOptionsSchema,\n BundleInputShape,\n BundleInputSchema,\n type BundleOptions,\n type BundleInput,\n} from './bundle';\n\nexport {\n PlatformSchema,\n SimulateOptionsSchema,\n SimulateInputShape,\n SimulateInputSchema,\n type Platform,\n type SimulateOptions,\n type SimulateInput,\n} from './simulate';\n\nexport {\n PushOptionsSchema,\n PushInputShape,\n PushInputSchema,\n type PushOptions,\n type PushInput,\n} from './push';\n","/**\n * CLI Primitive Schemas\n *\n * Basic Zod schemas for CLI parameter validation.\n * Follows walkerOS patterns from @walkeros/core.\n */\n\nimport { z } from '@walkeros/core/dev';\n\n/**\n * Port number schema.\n *\n * @remarks\n * Validates HTTP server port number.\n * Must be integer between 1-65535.\n */\nexport const PortSchema = z\n .number()\n .int('Port must be an integer')\n .min(1, 'Port must be at least 1')\n .max(65535, 'Port must be at most 65535')\n .describe('HTTP server port number');\n\n/**\n * File path schema.\n *\n * @remarks\n * Basic string validation for file paths.\n * File existence is checked separately (Zod can't check filesystem).\n */\nexport const FilePathSchema = z\n .string()\n .min(1, 'File path cannot be empty')\n .describe('Path to configuration file');\n","/**\n * Validate Command Schemas\n *\n * Zod schemas for validate command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\n\n/**\n * Validation type schema.\n *\n * @remarks\n * Validates the type of validation to perform.\n * - `contract`: Validate a data contract\n * - `event`: Validate a walkerOS event object\n * - `flow`: Validate a flow configuration file\n * - `mapping`: Validate mapping rules\n */\nexport const ValidationTypeSchema = z\n .enum(['contract', 'event', 'flow', 'mapping'])\n .describe('Validation type: \"event\", \"flow\", \"mapping\", or \"contract\"');\n\nexport type ValidationType = z.infer<typeof ValidationTypeSchema>;\n\n/**\n * Validate options schema.\n *\n * @remarks\n * Options for the programmatic validate() API.\n */\nexport const ValidateOptionsSchema = z.object({\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n path: z\n .string()\n .optional()\n .describe(\n 'Entry path for package schema validation (e.g., \"destinations.snowplow\", \"stores.cache\"). Checks the entry in every flow that has it, or only in --flow.',\n ),\n strict: z\n .boolean()\n .optional()\n .describe(\n 'Escalate: strict turns warnings and skips into failures (valid is false), contract disagreements error',\n ),\n offline: z\n .boolean()\n .optional()\n .describe(\n 'Do not fetch package schemas: step settings are not checked against them, and the result scope says so. Only with type \"flow\" and no path.',\n ),\n configDir: z\n .string()\n .optional()\n .describe(\n \"Directory local `path` packages resolve against. Defaults to the input file's directory; set it when passing a parsed document.\",\n ),\n});\n\nexport type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const ValidateInputShape = {\n type: ValidationTypeSchema,\n input: z\n .string()\n .min(1)\n .describe('JSON string, file path, or URL to validate'),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n path: z\n .string()\n .optional()\n .describe(\n 'Entry path for package schema validation (e.g., \"destinations.snowplow\"). Only with type \"flow\": validates the entry against its package JSON Schema in every flow that has it, or only in the given flow.',\n ),\n strict: z\n .boolean()\n .optional()\n .describe(\n 'Escalate: strict turns warnings and skips into failures: valid is false (the CLI exits 2), and contract example disagreements become errors. Every check runs with or without it.',\n ),\n offline: z\n .boolean()\n .optional()\n .describe(\n 'Do not fetch package schemas: step settings are not checked against them, and details.scope says so. Only with type \"flow\" and no path.',\n ),\n};\n\n/**\n * Validate input schema for MCP tools.\n *\n * @remarks\n * Full input schema including type and input source.\n */\nexport const ValidateInputSchema = z.object(ValidateInputShape);\n\nexport type ValidateInput = z.infer<typeof ValidateInputSchema>;\n","/**\n * Bundle Command Schemas\n *\n * Zod schemas for bundle command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\n\n/**\n * Bundle options schema.\n *\n * @remarks\n * Options for the programmatic bundle() API.\n */\nexport const BundleOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n stats: z\n .boolean()\n .optional()\n .default(true)\n .describe('Return bundle statistics'),\n cache: z\n .boolean()\n .optional()\n .default(true)\n .describe('Enable package caching'),\n flowName: z.string().optional().describe('Flow name for multi-flow configs'),\n});\n\nexport type BundleOptions = z.infer<typeof BundleOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const BundleInputShape = {\n configPath: FilePathSchema.describe(\n 'Path to flow configuration file (JSON or JavaScript), URL, or inline JSON string',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n stats: z\n .boolean()\n .optional()\n .default(true)\n .describe('Return bundle statistics'),\n output: z\n .string()\n .optional()\n .describe('Output file path (defaults to config-defined)'),\n};\n\n/**\n * Bundle input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path and options.\n */\nexport const BundleInputSchema = z.object(BundleInputShape);\n\nexport type BundleInput = z.infer<typeof BundleInputSchema>;\n","/**\n * Simulate Command Schemas\n *\n * Zod schemas for simulate command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\n\n/**\n * Platform schema.\n *\n * @remarks\n * Validates platform type for event simulation.\n */\nexport const PlatformSchema = z\n .enum(['web', 'server'])\n .describe('Platform type for event processing');\n\nexport type Platform = z.infer<typeof PlatformSchema>;\n\n/**\n * Simulate options schema.\n *\n * @remarks\n * Options for the programmatic simulate() API.\n */\nexport const SimulateOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n json: z.boolean().optional().describe('Format output as JSON'),\n});\n\nexport type SimulateOptions = z.infer<typeof SimulateOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const SimulateInputShape = {\n configPath: FilePathSchema.describe(\n 'Path to flow configuration file, URL, or inline JSON string',\n ),\n event: z\n .string()\n .min(1)\n .optional()\n .describe(\n 'Event as JSON string, file path, or URL. For sources: { content, trigger?, env? }.',\n ),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n platform: PlatformSchema.optional().describe('Override platform detection'),\n step: z\n .string()\n .optional()\n .describe(\n 'Step target in type.name format (e.g. \"source.browser\", \"destination.gtag\")',\n ),\n};\n\n/**\n * Simulate input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path, event, and options.\n */\nexport const SimulateInputSchema = z.object(SimulateInputShape);\n\nexport type SimulateInput = z.infer<typeof SimulateInputSchema>;\n","/**\n * Push Command Schemas\n *\n * Zod schemas for push command parameter validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { FilePathSchema } from './primitives';\nimport { PlatformSchema } from './simulate';\n\n/**\n * Push options schema.\n *\n * @remarks\n * Options for the programmatic push() API.\n */\nexport const PushOptionsSchema = z.object({\n silent: z.boolean().optional().describe('Suppress all output'),\n verbose: z.boolean().optional().describe('Enable verbose logging'),\n json: z.boolean().optional().describe('Format output as JSON'),\n});\n\nexport type PushOptions = z.infer<typeof PushOptionsSchema>;\n\n/**\n * Raw shape for MCP SDK compatibility (ZodRawShapeCompat).\n *\n * @remarks\n * MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)\n * rather than ZodObject instances. Define shape first, then wrap.\n */\nexport const PushInputShape = {\n configPath: FilePathSchema.describe('Path to flow configuration file'),\n event: z.string().min(1).describe('Event as JSON string, file path, or URL'),\n flow: z.string().optional().describe('Flow name for multi-flow configs'),\n platform: PlatformSchema.optional().describe('Override platform detection'),\n};\n\n/**\n * Push input schema for MCP tools.\n *\n * @remarks\n * Full input schema including config path, event, and options.\n */\nexport const PushInputSchema = z.object(PushInputShape);\n\nexport type PushInput = z.infer<typeof PushInputSchema>;\n","/**\n * Shared resolver for the export name to import from a flow component's\n * package.\n *\n * Both `walkeros bundle` and `walkeros setup` need to know which named export\n * (or default) to pull off a package referenced by a flow component. The\n * precedence chain is:\n *\n * 1. `flow.<kind>.<id>.import` if set (named export selector at the step).\n * 2. `flow.config.bundle.packages[<package>].imports[0]` if set.\n * 3. Otherwise undefined; the caller falls back to the package's `default`\n * export.\n *\n * This lives in `cli/src/core/` so both `commands/bundle/*` and\n * `commands/setup/*` import the same function. Duplicating the chain is how\n * setup ended up out of sync with bundle (Bug F: `setup destination.pubsub`\n * routed through BigQuery's setup because it ignored the `code` field and\n * always grabbed `mod.default`).\n */\n\nimport type { Flow } from '@walkeros/core';\n\nexport type ComponentKind = 'source' | 'transformer' | 'destination' | 'store';\n\nexport type ResolveSource = 'import' | 'imports' | 'default';\n\nexport interface ResolvedExportName {\n /**\n * The named export to pull off the imported module, or `undefined` to\n * indicate the caller should use the package's `default` export.\n */\n exportName: string | undefined;\n /** Which precedence step produced the result (useful for diagnostics). */\n source: ResolveSource;\n}\n\ninterface FlowStepView {\n package?: string;\n import?: string;\n}\n\nfunction getStep(\n flow: Flow,\n kind: ComponentKind,\n id: string,\n): FlowStepView | undefined {\n switch (kind) {\n case 'source':\n return flow.sources?.[id];\n case 'transformer':\n return flow.transformers?.[id];\n case 'destination':\n return flow.destinations?.[id];\n case 'store':\n return flow.stores?.[id];\n }\n}\n\nfunction getBundlePackages(\n flow: Flow,\n): Record<string, Flow.BundlePackage> | undefined {\n return flow.config?.bundle?.packages;\n}\n\n/**\n * Read the first entry of `bundle.packages[<package>].imports` if it is a\n * non-empty string. Returns `undefined` otherwise.\n */\nfunction readFirstImport(\n packages: Record<string, Flow.BundlePackage> | undefined,\n packageName: string | undefined,\n): string | undefined {\n if (!packages || !packageName) return undefined;\n const pkg = packages[packageName];\n if (!pkg || !pkg.imports || pkg.imports.length === 0) return undefined;\n const first = pkg.imports[0];\n return typeof first === 'string' && first.length > 0 ? first : undefined;\n}\n\n/**\n * Resolve the export name to import for a flow component's package.\n *\n * See module docs for the precedence chain. Inline code (`code` is an object)\n * doesn't enter this resolver at all — setup rejects inline code at a higher\n * layer.\n */\nexport function resolveExportName(\n flow: Flow,\n kind: ComponentKind,\n id: string,\n): ResolvedExportName {\n const step = getStep(flow, kind, id);\n if (!step) return { exportName: undefined, source: 'default' };\n\n const packageName = step.package;\n const importName = step.import;\n\n // 1. Explicit `import` field on the step wins.\n if (typeof importName === 'string' && importName.length > 0) {\n return { exportName: importName, source: 'import' };\n }\n\n // 2. Fallback to bundle.packages[pkg].imports[0].\n const firstImport = readFirstImport(getBundlePackages(flow), packageName);\n if (firstImport) {\n return { exportName: firstImport, source: 'imports' };\n }\n\n // 3. Default export.\n return { exportName: undefined, source: 'default' };\n}\n","function isRecord(value: unknown): value is Record<string, unknown> {\n return value !== null && typeof value === 'object';\n}\n\n/**\n * Selects the dev examples of one export from a package's awaited `/dev`\n * module.\n *\n * A package with several exports (`walkerOS.exports` in its package.json)\n * ships `exportExamples`, a map from export name to that export's examples,\n * the default export included. A package with one export ships only\n * `examples`.\n *\n * - Map present, export named: `exportExamples[exportName]`. A name missing\n * from the map resolves to `undefined`, never to another export's examples.\n * - Map present, no export name (the step uses the default export):\n * `examples`, which by convention holds the default export's examples.\n * - No map: `examples`.\n *\n * `exportName` comes from `resolveExportName` (step `import`, else\n * `bundle.packages[pkg].imports[0]`, else default).\n */\nexport function selectDevExamples(\n devModule: unknown,\n exportName: string | undefined,\n): Record<string, unknown> | undefined {\n if (!isRecord(devModule)) return undefined;\n\n const map = devModule.exportExamples;\n if (isRecord(map) && exportName !== undefined) {\n const selected = map[exportName];\n return isRecord(selected) ? selected : undefined;\n }\n\n const examples = devModule.examples;\n return isRecord(examples) ? examples : undefined;\n}\n\n/**\n * A package version from before export-keyed examples ships only\n * `examples` (the default export's), even when it declares several\n * exports. For a step naming an export, those examples may belong to\n * another export, so simulate must refuse instead of running that export's\n * mock (or none) against the real vendor. Returns the refusal message, or\n * `undefined` when the examples can be trusted.\n *\n * `packageExports` is the bundle's `__packageExports` (declared exports per\n * package, read at build time from the bundled copy). A bundle without it\n * (built before it existed) cannot tell single- from multi-export packages,\n * so a step naming an export without a map is refused.\n */\nexport function legacyExportRefusal(\n devModule: unknown,\n packageExports: Record<string, string[]> | undefined,\n packageName: string,\n exportName: string | undefined,\n): string | undefined {\n if (exportName === undefined) return undefined;\n if (isRecord(devModule) && isRecord(devModule.exportExamples))\n return undefined;\n if (packageExports) {\n const declared = packageExports[packageName];\n if (!declared || declared.length <= 1) return undefined;\n }\n return `No mock env for ${packageName} export ${exportName}: this package version predates export-keyed examples; use a version with exportExamples or a local path.`;\n}\n"],"mappings":";;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOA,SAAS,SAAS;AASX,IAAM,aAAa,EACvB,OAAO,EACP,IAAI,yBAAyB,EAC7B,IAAI,GAAG,yBAAyB,EAChC,IAAI,OAAO,4BAA4B,EACvC,SAAS,yBAAyB;AAS9B,IAAM,iBAAiB,EAC3B,OAAO,EACP,IAAI,GAAG,2BAA2B,EAClC,SAAS,4BAA4B;;;AC3BxC,SAAS,KAAAA,UAAS;AAYX,IAAM,uBAAuBA,GACjC,KAAK,CAAC,YAAY,SAAS,QAAQ,SAAS,CAAC,EAC7C,SAAS,4DAA4D;AA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C3D,WAAO,EAAE,YAAY,YAAY,QAAQ,SAAS;AAAA,EACpD;AAGA,QAAM,cAAc,gBAAgB,kBAAkB,IAAI,GAAG,WAAW;AACxE,MAAI,aAAa;AACf,WAAO,EAAE,YAAY,aAAa,QAAQ,UAAU;AAAA,EACtD;AAGA,SAAO,EAAE,YAAY,QAAW,QAAQ,UAAU;AACpD;;;AC9GA,SAAS,SAAS,OAAkD;AAClE,SAAO,UAAU,QAAQ,OAAO,UAAU;AAC5C;AAoBO,SAAS,kBACd,WACA,YACqC;AACrC,MAAI,CAAC,SAAS,SAAS,EAAG,QAAO;AAEjC,QAAM,MAAM,UAAU;AACtB,MAAI,SAAS,GAAG,KAAK,eAAe,QAAW;AAC7C,UAAM,WAAW,IAAI,UAAU;AAC/B,WAAO,SAAS,QAAQ,IAAI,WAAW;AAAA,EACzC;AAEA,QAAM,WAAW,UAAU;AAC3B,SAAO,SAAS,QAAQ,IAAI,WAAW;AACzC;","names":["z","z","z","z","z","z","z"]}
@@ -241,25 +241,25 @@
241
241
  "bundle": {
242
242
  "packages": {
243
243
  "@walkeros/collector": {
244
- "version": "4.8.0"
244
+ "version": "4.8.1-next-1792019907609"
245
245
  },
246
246
  "@walkeros/web-source-cmp-usercentrics": {
247
- "version": "4.8.0"
247
+ "version": "4.8.1-next-1792019907609"
248
248
  },
249
249
  "@walkeros/web-source-session": {
250
- "version": "4.8.0"
250
+ "version": "4.8.1-next-1792019907609"
251
251
  },
252
252
  "@walkeros/web-source-datalayer": {
253
- "version": "4.8.0"
253
+ "version": "4.8.1-next-1792019907609"
254
254
  },
255
255
  "@walkeros/web-source-browser": {
256
- "version": "4.8.0"
256
+ "version": "4.8.1-next-1792019907609"
257
257
  },
258
258
  "@walkeros/web-destination-gtag": {
259
- "version": "4.8.0"
259
+ "version": "4.8.1-next-1792019907609"
260
260
  },
261
261
  "@walkeros/web-destination-api": {
262
- "version": "4.8.0"
262
+ "version": "4.8.1-next-1792019907609"
263
263
  }
264
264
  },
265
265
  "env": {
@@ -1765,40 +1765,40 @@
1765
1765
  "bundle": {
1766
1766
  "packages": {
1767
1767
  "@walkeros/collector": {
1768
- "version": "4.8.0"
1768
+ "version": "4.8.1-next-1792019907609"
1769
1769
  },
1770
1770
  "@walkeros/server-source-express": {
1771
- "version": "4.8.0"
1771
+ "version": "4.8.1-next-1792019907609"
1772
1772
  },
1773
1773
  "@walkeros/transformer-ga4": {
1774
- "version": "4.8.0"
1774
+ "version": "4.8.1-next-1792019907609"
1775
1775
  },
1776
1776
  "@walkeros/transformer-validate": {
1777
- "version": "4.8.0"
1777
+ "version": "4.8.1-next-1792019907609"
1778
1778
  },
1779
1779
  "@walkeros/server-transformer-bot": {
1780
- "version": "4.8.0"
1780
+ "version": "4.8.1-next-1792019907609"
1781
1781
  },
1782
1782
  "@walkeros/server-transformer-fingerprint": {
1783
- "version": "4.8.0"
1783
+ "version": "4.8.1-next-1792019907609"
1784
1784
  },
1785
1785
  "@walkeros/server-transformer-file": {
1786
- "version": "4.8.0"
1786
+ "version": "4.8.1-next-1792019907609"
1787
1787
  },
1788
1788
  "@walkeros/server-store-fs": {
1789
- "version": "4.8.0"
1789
+ "version": "4.8.1-next-1792019907609"
1790
1790
  },
1791
1791
  "@walkeros/server-destination-gcp": {
1792
- "version": "4.8.0"
1792
+ "version": "4.8.1-next-1792019907609"
1793
1793
  },
1794
1794
  "@walkeros/server-destination-meta": {
1795
- "version": "4.8.0"
1795
+ "version": "4.8.1-next-1792019907609"
1796
1796
  },
1797
1797
  "@walkeros/server-destination-piwikpro": {
1798
- "version": "4.8.0"
1798
+ "version": "4.8.1-next-1792019907609"
1799
1799
  },
1800
1800
  "@walkeros/server-destination-datamanager": {
1801
- "version": "4.8.0"
1801
+ "version": "4.8.1-next-1792019907609"
1802
1802
  }
1803
1803
  }
1804
1804
  }
@@ -4875,13 +4875,13 @@
4875
4875
  "bundle": {
4876
4876
  "packages": {
4877
4877
  "@walkeros/collector": {
4878
- "version": "4.8.0"
4878
+ "version": "4.8.1-next-1792019907609"
4879
4879
  },
4880
4880
  "@walkeros/server-source-gcp": {
4881
- "version": "4.8.0"
4881
+ "version": "4.8.1-next-1792019907609"
4882
4882
  },
4883
4883
  "@walkeros/server-destination-gcp": {
4884
- "version": "4.8.0"
4884
+ "version": "4.8.1-next-1792019907609"
4885
4885
  }
4886
4886
  }
4887
4887
  }
@@ -907,16 +907,16 @@ walkeros cache info
907
907
  from the flow variable, so LOG_LEVEL changes it per environment.
908
908
  - **CI:** `walkeros validate packages/cli/examples/flow-complete.json --strict`
909
909
  plus the step examples as fixtures.
910
- - **CLI (app-bound, need a login; listed, not run for this guide):**
910
+ - **CLI (app-bound, need a login or WALKEROS_TOKEN; listed, not run for this
911
+ guide):**
911
912
 
912
913
  ```bash
913
- walkeros flows create flow-complete -c packages/cli/examples/flow-complete.json
914
- walkeros deploy create packages/cli/examples/flow-complete.json
915
- walkeros deploy start <flowId>
916
- walkeros observe start <flowId>
914
+ walkeros api GET /api/projects/{projectId}/flows
915
+ walkeros api POST /api/projects/{projectId}/flows/<flowId>/deploy --header 'Idempotency-Key: <key>'
917
916
  ```
918
917
 
919
- - **MCP:** `flow_manage`, `deploy_manage`, `observe_session`, `flow_validate`
920
- then `flow_simulate` then `flow_push` as the agent loop.
918
+ - **MCP:** on your machine `flow_validate`, then `flow_simulate`, then
919
+ `flow_push` as the agent loop; saved flows, deployments and Observe through
920
+ the hosted walkerOS MCP server.
921
921
  - **In GTM:** preview mode and container versions.
922
922
  - **Docs:** `collector/logger`.
@@ -1903,7 +1903,6 @@ declare const teaching: {
1903
1903
  useCases: "observability"[];
1904
1904
  note: string;
1905
1905
  docs: never[];
1906
- cli: string[];
1907
1906
  };
1908
1907
  'observe-level': {
1909
1908
  pointer: string;
@@ -264,25 +264,25 @@ var flow_complete_default = {
264
264
  bundle: {
265
265
  packages: {
266
266
  "@walkeros/collector": {
267
- version: "4.8.0"
267
+ version: "4.8.1-next-1792019907609"
268
268
  },
269
269
  "@walkeros/web-source-cmp-usercentrics": {
270
- version: "4.8.0"
270
+ version: "4.8.1-next-1792019907609"
271
271
  },
272
272
  "@walkeros/web-source-session": {
273
- version: "4.8.0"
273
+ version: "4.8.1-next-1792019907609"
274
274
  },
275
275
  "@walkeros/web-source-datalayer": {
276
- version: "4.8.0"
276
+ version: "4.8.1-next-1792019907609"
277
277
  },
278
278
  "@walkeros/web-source-browser": {
279
- version: "4.8.0"
279
+ version: "4.8.1-next-1792019907609"
280
280
  },
281
281
  "@walkeros/web-destination-gtag": {
282
- version: "4.8.0"
282
+ version: "4.8.1-next-1792019907609"
283
283
  },
284
284
  "@walkeros/web-destination-api": {
285
- version: "4.8.0"
285
+ version: "4.8.1-next-1792019907609"
286
286
  }
287
287
  },
288
288
  env: {
@@ -1788,40 +1788,40 @@ var flow_complete_default = {
1788
1788
  bundle: {
1789
1789
  packages: {
1790
1790
  "@walkeros/collector": {
1791
- version: "4.8.0"
1791
+ version: "4.8.1-next-1792019907609"
1792
1792
  },
1793
1793
  "@walkeros/server-source-express": {
1794
- version: "4.8.0"
1794
+ version: "4.8.1-next-1792019907609"
1795
1795
  },
1796
1796
  "@walkeros/transformer-ga4": {
1797
- version: "4.8.0"
1797
+ version: "4.8.1-next-1792019907609"
1798
1798
  },
1799
1799
  "@walkeros/transformer-validate": {
1800
- version: "4.8.0"
1800
+ version: "4.8.1-next-1792019907609"
1801
1801
  },
1802
1802
  "@walkeros/server-transformer-bot": {
1803
- version: "4.8.0"
1803
+ version: "4.8.1-next-1792019907609"
1804
1804
  },
1805
1805
  "@walkeros/server-transformer-fingerprint": {
1806
- version: "4.8.0"
1806
+ version: "4.8.1-next-1792019907609"
1807
1807
  },
1808
1808
  "@walkeros/server-transformer-file": {
1809
- version: "4.8.0"
1809
+ version: "4.8.1-next-1792019907609"
1810
1810
  },
1811
1811
  "@walkeros/server-store-fs": {
1812
- version: "4.8.0"
1812
+ version: "4.8.1-next-1792019907609"
1813
1813
  },
1814
1814
  "@walkeros/server-destination-gcp": {
1815
- version: "4.8.0"
1815
+ version: "4.8.1-next-1792019907609"
1816
1816
  },
1817
1817
  "@walkeros/server-destination-meta": {
1818
- version: "4.8.0"
1818
+ version: "4.8.1-next-1792019907609"
1819
1819
  },
1820
1820
  "@walkeros/server-destination-piwikpro": {
1821
- version: "4.8.0"
1821
+ version: "4.8.1-next-1792019907609"
1822
1822
  },
1823
1823
  "@walkeros/server-destination-datamanager": {
1824
- version: "4.8.0"
1824
+ version: "4.8.1-next-1792019907609"
1825
1825
  }
1826
1826
  }
1827
1827
  }
@@ -4898,13 +4898,13 @@ var flow_complete_default = {
4898
4898
  bundle: {
4899
4899
  packages: {
4900
4900
  "@walkeros/collector": {
4901
- version: "4.8.0"
4901
+ version: "4.8.1-next-1792019907609"
4902
4902
  },
4903
4903
  "@walkeros/server-source-gcp": {
4904
- version: "4.8.0"
4904
+ version: "4.8.1-next-1792019907609"
4905
4905
  },
4906
4906
  "@walkeros/server-destination-gcp": {
4907
- version: "4.8.0"
4907
+ version: "4.8.1-next-1792019907609"
4908
4908
  }
4909
4909
  }
4910
4910
  }
@@ -6761,8 +6761,7 @@ var teaching = {
6761
6761
  level: "intermediate",
6762
6762
  useCases: ["observability"],
6763
6763
  note: "A web flow reports to Observe through a public url and binding.",
6764
- docs: [],
6765
- cli: ["walkeros observe start <flowId>"]
6764
+ docs: []
6766
6765
  },
6767
6766
  "observe-level": {
6768
6767
  pointer: "/flows/server/config/observe/level",
@@ -6788,9 +6787,8 @@ var teaching = {
6788
6787
  note: "The log level comes from the flow variable, so LOG_LEVEL changes it per environment.",
6789
6788
  docs: [{ page: "collector/logger" }],
6790
6789
  cli: [
6791
- `walkeros flows create flow-complete -c ${FILE}`,
6792
- `walkeros deploy create ${FILE}`,
6793
- "walkeros deploy start <flowId>"
6790
+ "walkeros api GET /api/projects/{projectId}/flows",
6791
+ "walkeros api POST /api/projects/{projectId}/flows/<flowId>/deploy --header 'Idempotency-Key: <key>'"
6794
6792
  ]
6795
6793
  }
6796
6794
  };
@@ -7196,12 +7194,13 @@ var flowCompleteCli = [
7196
7194
  },
7197
7195
  { command: "walkeros cache info", chapter: "build-run" },
7198
7196
  {
7199
- command: `walkeros flows create flow-complete -c ${FILE}`,
7197
+ command: "walkeros api GET /api/projects/{projectId}/flows",
7200
7198
  chapter: "operate"
7201
7199
  },
7202
- { command: `walkeros deploy create ${FILE}`, chapter: "operate" },
7203
- { command: "walkeros deploy start <flowId>", chapter: "operate" },
7204
- { command: "walkeros observe start <flowId>", chapter: "operate" }
7200
+ {
7201
+ command: "walkeros api POST /api/projects/{projectId}/flows/<flowId>/deploy --header 'Idempotency-Key: <key>'",
7202
+ chapter: "operate"
7203
+ }
7205
7204
  ];
7206
7205
  var flowCompleteManifest = {
7207
7206
  file: FILE,