@walkeros/cli 1.1.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +2 -1
- package/dist/dev.d.ts +328 -0
- package/dist/dev.js +110 -0
- package/dist/dev.js.map +1 -0
- package/dist/examples/flow-complete.json +10 -1
- package/dist/examples/flow-complete.md +23 -24
- package/dist/index.d.ts +191 -8
- package/dist/index.js +1966 -294
- package/dist/index.js.map +1 -1
- package/dist/runtime/main.js +134 -12
- package/dist/runtime/main.js.map +1 -1
- package/dist/walker.js +1 -0
- package/examples/flow-complete.json +10 -1
- package/examples/flow-complete.md +23 -24
- package/package.json +7 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @walkeros/cli
|
|
2
2
|
|
|
3
|
+
## 1.3.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 087eb2d: Restructure CLI with auth, projects, flows command groups; MCP wraps
|
|
8
|
+
CLI functions instead of reimplementing API logic
|
|
9
|
+
- 087eb2d: Add Unix-standard stdio support: results to stdout, logs to stderr,
|
|
10
|
+
stdin auto-detection, -o for file output
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies [a4cc1ea]
|
|
15
|
+
- @walkeros/core@1.3.0
|
|
16
|
+
- @walkeros/server-core@1.0.5
|
|
17
|
+
|
|
18
|
+
## 1.2.0
|
|
19
|
+
|
|
20
|
+
### Minor Changes
|
|
21
|
+
|
|
22
|
+
- cc68f50: Add validate command for events, flows, and mappings
|
|
23
|
+
- `walkeros validate event` - validates event structure using
|
|
24
|
+
PartialEventSchema
|
|
25
|
+
- `walkeros validate flow` - validates flow configurations using SetupSchema
|
|
26
|
+
- `walkeros validate mapping` - validates mapping event patterns
|
|
27
|
+
|
|
28
|
+
Includes programmatic API via `import { validate } from '@walkeros/cli'`
|
|
29
|
+
|
|
3
30
|
## 1.1.3
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -575,7 +575,8 @@ walkeros bundle flow.json --dockerfile Dockerfile.custom
|
|
|
575
575
|
|
|
576
576
|
- `MODE` - `collect` or `serve` (default: `collect`)
|
|
577
577
|
- `PORT` - Server port (default: `8080`)
|
|
578
|
-
- `BUNDLE` - Bundle path (default: `/app/flow/bundle.mjs`)
|
|
578
|
+
- `BUNDLE` - Bundle file path or URL (default: `/app/flow/bundle.mjs`). Also
|
|
579
|
+
accepts stdin pipe: `cat flow.mjs | docker run -i walkeros/flow`
|
|
579
580
|
|
|
580
581
|
### Using Node.js
|
|
581
582
|
|
package/dist/dev.d.ts
ADDED
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
import { z } from '@walkeros/core/dev';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* CLI Primitive Schemas
|
|
5
|
+
*
|
|
6
|
+
* Basic Zod schemas for CLI parameter validation.
|
|
7
|
+
* Follows walkerOS patterns from @walkeros/core.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Run mode schema.
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Validates CLI run mode for the `run` command.
|
|
15
|
+
* - `collect`: Run as event collector
|
|
16
|
+
* - `serve`: Run as HTTP server
|
|
17
|
+
*/
|
|
18
|
+
declare const RunModeSchema: z.ZodEnum<{
|
|
19
|
+
collect: "collect";
|
|
20
|
+
serve: "serve";
|
|
21
|
+
}>;
|
|
22
|
+
type RunMode = z.infer<typeof RunModeSchema>;
|
|
23
|
+
/**
|
|
24
|
+
* Port number schema.
|
|
25
|
+
*
|
|
26
|
+
* @remarks
|
|
27
|
+
* Validates HTTP server port number.
|
|
28
|
+
* Must be integer between 1-65535.
|
|
29
|
+
*/
|
|
30
|
+
declare const PortSchema: z.ZodNumber;
|
|
31
|
+
/**
|
|
32
|
+
* File path schema.
|
|
33
|
+
*
|
|
34
|
+
* @remarks
|
|
35
|
+
* Basic string validation for file paths.
|
|
36
|
+
* File existence is checked separately (Zod can't check filesystem).
|
|
37
|
+
*/
|
|
38
|
+
declare const FilePathSchema: z.ZodString;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Run Command Schemas
|
|
42
|
+
*
|
|
43
|
+
* Zod schemas for run command options validation.
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Run command options schema.
|
|
48
|
+
*
|
|
49
|
+
* @remarks
|
|
50
|
+
* Validates all options for the `walkeros run` command.
|
|
51
|
+
*/
|
|
52
|
+
declare const RunOptionsSchema: z.ZodObject<{
|
|
53
|
+
mode: z.ZodEnum<{
|
|
54
|
+
collect: "collect";
|
|
55
|
+
serve: "serve";
|
|
56
|
+
}>;
|
|
57
|
+
flow: z.ZodString;
|
|
58
|
+
port: z.ZodDefault<z.ZodNumber>;
|
|
59
|
+
flowName: z.ZodOptional<z.ZodString>;
|
|
60
|
+
}, z.core.$strip>;
|
|
61
|
+
type RunOptions = z.infer<typeof RunOptionsSchema>;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Validate Command Schemas
|
|
65
|
+
*
|
|
66
|
+
* Zod schemas for validate command parameter validation.
|
|
67
|
+
*/
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Validation type schema.
|
|
71
|
+
*
|
|
72
|
+
* @remarks
|
|
73
|
+
* Validates the type of validation to perform.
|
|
74
|
+
* - `event`: Validate a walkerOS event object
|
|
75
|
+
* - `flow`: Validate a flow configuration file
|
|
76
|
+
* - `mapping`: Validate mapping rules
|
|
77
|
+
*/
|
|
78
|
+
declare const ValidationTypeSchema: z.ZodEnum<{
|
|
79
|
+
flow: "flow";
|
|
80
|
+
event: "event";
|
|
81
|
+
mapping: "mapping";
|
|
82
|
+
}>;
|
|
83
|
+
type ValidationType = z.infer<typeof ValidationTypeSchema>;
|
|
84
|
+
/**
|
|
85
|
+
* Validate options schema.
|
|
86
|
+
*
|
|
87
|
+
* @remarks
|
|
88
|
+
* Options for the programmatic validate() API.
|
|
89
|
+
*/
|
|
90
|
+
declare const ValidateOptionsSchema: z.ZodObject<{
|
|
91
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
92
|
+
}, z.core.$strip>;
|
|
93
|
+
type ValidateOptions = z.infer<typeof ValidateOptionsSchema>;
|
|
94
|
+
/**
|
|
95
|
+
* Raw shape for MCP SDK compatibility (ZodRawShapeCompat).
|
|
96
|
+
*
|
|
97
|
+
* @remarks
|
|
98
|
+
* MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)
|
|
99
|
+
* rather than ZodObject instances. Define shape first, then wrap.
|
|
100
|
+
*/
|
|
101
|
+
declare const ValidateInputShape: {
|
|
102
|
+
type: z.ZodEnum<{
|
|
103
|
+
flow: "flow";
|
|
104
|
+
event: "event";
|
|
105
|
+
mapping: "mapping";
|
|
106
|
+
}>;
|
|
107
|
+
input: z.ZodString;
|
|
108
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Validate input schema for MCP tools.
|
|
112
|
+
*
|
|
113
|
+
* @remarks
|
|
114
|
+
* Full input schema including type and input source.
|
|
115
|
+
*/
|
|
116
|
+
declare const ValidateInputSchema: z.ZodObject<{
|
|
117
|
+
type: z.ZodEnum<{
|
|
118
|
+
flow: "flow";
|
|
119
|
+
event: "event";
|
|
120
|
+
mapping: "mapping";
|
|
121
|
+
}>;
|
|
122
|
+
input: z.ZodString;
|
|
123
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
type ValidateInput = z.infer<typeof ValidateInputSchema>;
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Bundle Command Schemas
|
|
129
|
+
*
|
|
130
|
+
* Zod schemas for bundle command parameter validation.
|
|
131
|
+
*/
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Bundle options schema.
|
|
135
|
+
*
|
|
136
|
+
* @remarks
|
|
137
|
+
* Options for the programmatic bundle() API.
|
|
138
|
+
*/
|
|
139
|
+
declare const BundleOptionsSchema: z.ZodObject<{
|
|
140
|
+
silent: z.ZodOptional<z.ZodBoolean>;
|
|
141
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
142
|
+
stats: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
143
|
+
cache: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
144
|
+
flowName: z.ZodOptional<z.ZodString>;
|
|
145
|
+
}, z.core.$strip>;
|
|
146
|
+
type BundleOptions = z.infer<typeof BundleOptionsSchema>;
|
|
147
|
+
/**
|
|
148
|
+
* Raw shape for MCP SDK compatibility (ZodRawShapeCompat).
|
|
149
|
+
*
|
|
150
|
+
* @remarks
|
|
151
|
+
* MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)
|
|
152
|
+
* rather than ZodObject instances. Define shape first, then wrap.
|
|
153
|
+
*/
|
|
154
|
+
declare const BundleInputShape: {
|
|
155
|
+
configPath: z.ZodString;
|
|
156
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
157
|
+
stats: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
158
|
+
output: z.ZodOptional<z.ZodString>;
|
|
159
|
+
};
|
|
160
|
+
/**
|
|
161
|
+
* Bundle input schema for MCP tools.
|
|
162
|
+
*
|
|
163
|
+
* @remarks
|
|
164
|
+
* Full input schema including config path and options.
|
|
165
|
+
*/
|
|
166
|
+
declare const BundleInputSchema: z.ZodObject<{
|
|
167
|
+
configPath: z.ZodString;
|
|
168
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
169
|
+
stats: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
170
|
+
output: z.ZodOptional<z.ZodString>;
|
|
171
|
+
}, z.core.$strip>;
|
|
172
|
+
type BundleInput = z.infer<typeof BundleInputSchema>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Simulate Command Schemas
|
|
176
|
+
*
|
|
177
|
+
* Zod schemas for simulate command parameter validation.
|
|
178
|
+
*/
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Platform schema.
|
|
182
|
+
*
|
|
183
|
+
* @remarks
|
|
184
|
+
* Validates platform type for event simulation.
|
|
185
|
+
*/
|
|
186
|
+
declare const PlatformSchema: z.ZodEnum<{
|
|
187
|
+
web: "web";
|
|
188
|
+
server: "server";
|
|
189
|
+
}>;
|
|
190
|
+
type Platform = z.infer<typeof PlatformSchema>;
|
|
191
|
+
/**
|
|
192
|
+
* Simulate options schema.
|
|
193
|
+
*
|
|
194
|
+
* @remarks
|
|
195
|
+
* Options for the programmatic simulate() API.
|
|
196
|
+
*/
|
|
197
|
+
declare const SimulateOptionsSchema: z.ZodObject<{
|
|
198
|
+
silent: z.ZodOptional<z.ZodBoolean>;
|
|
199
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
200
|
+
json: z.ZodOptional<z.ZodBoolean>;
|
|
201
|
+
}, z.core.$strip>;
|
|
202
|
+
type SimulateOptions = z.infer<typeof SimulateOptionsSchema>;
|
|
203
|
+
/**
|
|
204
|
+
* Raw shape for MCP SDK compatibility (ZodRawShapeCompat).
|
|
205
|
+
*
|
|
206
|
+
* @remarks
|
|
207
|
+
* MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)
|
|
208
|
+
* rather than ZodObject instances. Define shape first, then wrap.
|
|
209
|
+
*/
|
|
210
|
+
declare const SimulateInputShape: {
|
|
211
|
+
configPath: z.ZodString;
|
|
212
|
+
event: z.ZodString;
|
|
213
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
214
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
215
|
+
web: "web";
|
|
216
|
+
server: "server";
|
|
217
|
+
}>>;
|
|
218
|
+
};
|
|
219
|
+
/**
|
|
220
|
+
* Simulate input schema for MCP tools.
|
|
221
|
+
*
|
|
222
|
+
* @remarks
|
|
223
|
+
* Full input schema including config path, event, and options.
|
|
224
|
+
*/
|
|
225
|
+
declare const SimulateInputSchema: z.ZodObject<{
|
|
226
|
+
configPath: z.ZodString;
|
|
227
|
+
event: z.ZodString;
|
|
228
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
229
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
230
|
+
web: "web";
|
|
231
|
+
server: "server";
|
|
232
|
+
}>>;
|
|
233
|
+
}, z.core.$strip>;
|
|
234
|
+
type SimulateInput = z.infer<typeof SimulateInputSchema>;
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Push Command Schemas
|
|
238
|
+
*
|
|
239
|
+
* Zod schemas for push command parameter validation.
|
|
240
|
+
*/
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* Push options schema.
|
|
244
|
+
*
|
|
245
|
+
* @remarks
|
|
246
|
+
* Options for the programmatic push() API.
|
|
247
|
+
*/
|
|
248
|
+
declare const PushOptionsSchema: z.ZodObject<{
|
|
249
|
+
silent: z.ZodOptional<z.ZodBoolean>;
|
|
250
|
+
verbose: z.ZodOptional<z.ZodBoolean>;
|
|
251
|
+
json: z.ZodOptional<z.ZodBoolean>;
|
|
252
|
+
}, z.core.$strip>;
|
|
253
|
+
type PushOptions = z.infer<typeof PushOptionsSchema>;
|
|
254
|
+
/**
|
|
255
|
+
* Raw shape for MCP SDK compatibility (ZodRawShapeCompat).
|
|
256
|
+
*
|
|
257
|
+
* @remarks
|
|
258
|
+
* MCP SDK's registerTool expects raw shapes (Record<string, ZodType>)
|
|
259
|
+
* rather than ZodObject instances. Define shape first, then wrap.
|
|
260
|
+
*/
|
|
261
|
+
declare const PushInputShape: {
|
|
262
|
+
configPath: z.ZodString;
|
|
263
|
+
event: z.ZodString;
|
|
264
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
265
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
266
|
+
web: "web";
|
|
267
|
+
server: "server";
|
|
268
|
+
}>>;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* Push input schema for MCP tools.
|
|
272
|
+
*
|
|
273
|
+
* @remarks
|
|
274
|
+
* Full input schema including config path, event, and options.
|
|
275
|
+
*/
|
|
276
|
+
declare const PushInputSchema: z.ZodObject<{
|
|
277
|
+
configPath: z.ZodString;
|
|
278
|
+
event: z.ZodString;
|
|
279
|
+
flow: z.ZodOptional<z.ZodString>;
|
|
280
|
+
platform: z.ZodOptional<z.ZodEnum<{
|
|
281
|
+
web: "web";
|
|
282
|
+
server: "server";
|
|
283
|
+
}>>;
|
|
284
|
+
}, z.core.$strip>;
|
|
285
|
+
type PushInput = z.infer<typeof PushInputSchema>;
|
|
286
|
+
|
|
287
|
+
/**
|
|
288
|
+
* CLI Schemas
|
|
289
|
+
*
|
|
290
|
+
* Zod schemas for CLI parameter validation.
|
|
291
|
+
* Follows walkerOS patterns from @walkeros/core.
|
|
292
|
+
*/
|
|
293
|
+
|
|
294
|
+
type index_BundleInput = BundleInput;
|
|
295
|
+
declare const index_BundleInputSchema: typeof BundleInputSchema;
|
|
296
|
+
declare const index_BundleInputShape: typeof BundleInputShape;
|
|
297
|
+
type index_BundleOptions = BundleOptions;
|
|
298
|
+
declare const index_BundleOptionsSchema: typeof BundleOptionsSchema;
|
|
299
|
+
declare const index_FilePathSchema: typeof FilePathSchema;
|
|
300
|
+
type index_Platform = Platform;
|
|
301
|
+
declare const index_PlatformSchema: typeof PlatformSchema;
|
|
302
|
+
declare const index_PortSchema: typeof PortSchema;
|
|
303
|
+
type index_PushInput = PushInput;
|
|
304
|
+
declare const index_PushInputSchema: typeof PushInputSchema;
|
|
305
|
+
declare const index_PushInputShape: typeof PushInputShape;
|
|
306
|
+
type index_PushOptions = PushOptions;
|
|
307
|
+
declare const index_PushOptionsSchema: typeof PushOptionsSchema;
|
|
308
|
+
type index_RunMode = RunMode;
|
|
309
|
+
declare const index_RunModeSchema: typeof RunModeSchema;
|
|
310
|
+
type index_RunOptions = RunOptions;
|
|
311
|
+
declare const index_RunOptionsSchema: typeof RunOptionsSchema;
|
|
312
|
+
type index_SimulateInput = SimulateInput;
|
|
313
|
+
declare const index_SimulateInputSchema: typeof SimulateInputSchema;
|
|
314
|
+
declare const index_SimulateInputShape: typeof SimulateInputShape;
|
|
315
|
+
type index_SimulateOptions = SimulateOptions;
|
|
316
|
+
declare const index_SimulateOptionsSchema: typeof SimulateOptionsSchema;
|
|
317
|
+
type index_ValidateInput = ValidateInput;
|
|
318
|
+
declare const index_ValidateInputSchema: typeof ValidateInputSchema;
|
|
319
|
+
declare const index_ValidateInputShape: typeof ValidateInputShape;
|
|
320
|
+
type index_ValidateOptions = ValidateOptions;
|
|
321
|
+
declare const index_ValidateOptionsSchema: typeof ValidateOptionsSchema;
|
|
322
|
+
type index_ValidationType = ValidationType;
|
|
323
|
+
declare const index_ValidationTypeSchema: typeof ValidationTypeSchema;
|
|
324
|
+
declare namespace index {
|
|
325
|
+
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_RunMode as RunMode, index_RunModeSchema as RunModeSchema, type index_RunOptions as RunOptions, index_RunOptionsSchema as RunOptionsSchema, 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 };
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
export { index as schemas };
|
package/dist/dev.js
ADDED
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __export = (target, all) => {
|
|
3
|
+
for (var name in all)
|
|
4
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
// src/schemas/index.ts
|
|
8
|
+
var schemas_exports = {};
|
|
9
|
+
__export(schemas_exports, {
|
|
10
|
+
BundleInputSchema: () => BundleInputSchema,
|
|
11
|
+
BundleInputShape: () => BundleInputShape,
|
|
12
|
+
BundleOptionsSchema: () => BundleOptionsSchema,
|
|
13
|
+
FilePathSchema: () => FilePathSchema,
|
|
14
|
+
PlatformSchema: () => PlatformSchema,
|
|
15
|
+
PortSchema: () => PortSchema,
|
|
16
|
+
PushInputSchema: () => PushInputSchema,
|
|
17
|
+
PushInputShape: () => PushInputShape,
|
|
18
|
+
PushOptionsSchema: () => PushOptionsSchema,
|
|
19
|
+
RunModeSchema: () => RunModeSchema,
|
|
20
|
+
RunOptionsSchema: () => RunOptionsSchema,
|
|
21
|
+
SimulateInputSchema: () => SimulateInputSchema,
|
|
22
|
+
SimulateInputShape: () => SimulateInputShape,
|
|
23
|
+
SimulateOptionsSchema: () => SimulateOptionsSchema,
|
|
24
|
+
ValidateInputSchema: () => ValidateInputSchema,
|
|
25
|
+
ValidateInputShape: () => ValidateInputShape,
|
|
26
|
+
ValidateOptionsSchema: () => ValidateOptionsSchema,
|
|
27
|
+
ValidationTypeSchema: () => ValidationTypeSchema
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// src/schemas/primitives.ts
|
|
31
|
+
import { z } from "@walkeros/core/dev";
|
|
32
|
+
var RunModeSchema = z.enum(["collect", "serve"]).describe("CLI run mode: collect events or serve HTTP");
|
|
33
|
+
var PortSchema = z.number().int("Port must be an integer").min(1, "Port must be at least 1").max(65535, "Port must be at most 65535").describe("HTTP server port number");
|
|
34
|
+
var FilePathSchema = z.string().min(1, "File path cannot be empty").describe("Path to configuration file");
|
|
35
|
+
|
|
36
|
+
// src/schemas/run.ts
|
|
37
|
+
import { z as z2 } from "@walkeros/core/dev";
|
|
38
|
+
var RunOptionsSchema = z2.object({
|
|
39
|
+
mode: RunModeSchema,
|
|
40
|
+
flow: FilePathSchema,
|
|
41
|
+
port: PortSchema.default(8080),
|
|
42
|
+
flowName: z2.string().optional().describe("Specific flow name to run")
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
// src/schemas/validate.ts
|
|
46
|
+
import { z as z3 } from "@walkeros/core/dev";
|
|
47
|
+
var ValidationTypeSchema = z3.enum(["event", "flow", "mapping"]).describe("Type of validation to perform");
|
|
48
|
+
var ValidateOptionsSchema = z3.object({
|
|
49
|
+
flow: z3.string().optional().describe("Flow name for multi-flow configs")
|
|
50
|
+
});
|
|
51
|
+
var ValidateInputShape = {
|
|
52
|
+
type: ValidationTypeSchema,
|
|
53
|
+
input: z3.string().min(1).describe("JSON string, file path, or URL to validate"),
|
|
54
|
+
flow: z3.string().optional().describe("Flow name for multi-flow configs")
|
|
55
|
+
};
|
|
56
|
+
var ValidateInputSchema = z3.object(ValidateInputShape);
|
|
57
|
+
|
|
58
|
+
// src/schemas/bundle.ts
|
|
59
|
+
import { z as z4 } from "@walkeros/core/dev";
|
|
60
|
+
var BundleOptionsSchema = z4.object({
|
|
61
|
+
silent: z4.boolean().optional().describe("Suppress all output"),
|
|
62
|
+
verbose: z4.boolean().optional().describe("Enable verbose logging"),
|
|
63
|
+
stats: z4.boolean().optional().default(true).describe("Return bundle statistics"),
|
|
64
|
+
cache: z4.boolean().optional().default(true).describe("Enable package caching"),
|
|
65
|
+
flowName: z4.string().optional().describe("Flow name for multi-flow configs")
|
|
66
|
+
});
|
|
67
|
+
var BundleInputShape = {
|
|
68
|
+
configPath: FilePathSchema.describe(
|
|
69
|
+
"Path to flow configuration file (JSON or JavaScript)"
|
|
70
|
+
),
|
|
71
|
+
flow: z4.string().optional().describe("Flow name for multi-flow configs"),
|
|
72
|
+
stats: z4.boolean().optional().default(true).describe("Return bundle statistics"),
|
|
73
|
+
output: z4.string().optional().describe("Output file path (defaults to config-defined)")
|
|
74
|
+
};
|
|
75
|
+
var BundleInputSchema = z4.object(BundleInputShape);
|
|
76
|
+
|
|
77
|
+
// src/schemas/simulate.ts
|
|
78
|
+
import { z as z5 } from "@walkeros/core/dev";
|
|
79
|
+
var PlatformSchema = z5.enum(["web", "server"]).describe("Platform type for event processing");
|
|
80
|
+
var SimulateOptionsSchema = z5.object({
|
|
81
|
+
silent: z5.boolean().optional().describe("Suppress all output"),
|
|
82
|
+
verbose: z5.boolean().optional().describe("Enable verbose logging"),
|
|
83
|
+
json: z5.boolean().optional().describe("Format output as JSON")
|
|
84
|
+
});
|
|
85
|
+
var SimulateInputShape = {
|
|
86
|
+
configPath: FilePathSchema.describe("Path to flow configuration file"),
|
|
87
|
+
event: z5.string().min(1).describe("Event as JSON string, file path, or URL"),
|
|
88
|
+
flow: z5.string().optional().describe("Flow name for multi-flow configs"),
|
|
89
|
+
platform: PlatformSchema.optional().describe("Override platform detection")
|
|
90
|
+
};
|
|
91
|
+
var SimulateInputSchema = z5.object(SimulateInputShape);
|
|
92
|
+
|
|
93
|
+
// src/schemas/push.ts
|
|
94
|
+
import { z as z6 } from "@walkeros/core/dev";
|
|
95
|
+
var PushOptionsSchema = z6.object({
|
|
96
|
+
silent: z6.boolean().optional().describe("Suppress all output"),
|
|
97
|
+
verbose: z6.boolean().optional().describe("Enable verbose logging"),
|
|
98
|
+
json: z6.boolean().optional().describe("Format output as JSON")
|
|
99
|
+
});
|
|
100
|
+
var PushInputShape = {
|
|
101
|
+
configPath: FilePathSchema.describe("Path to flow configuration file"),
|
|
102
|
+
event: z6.string().min(1).describe("Event as JSON string, file path, or URL"),
|
|
103
|
+
flow: z6.string().optional().describe("Flow name for multi-flow configs"),
|
|
104
|
+
platform: PlatformSchema.optional().describe("Override platform detection")
|
|
105
|
+
};
|
|
106
|
+
var PushInputSchema = z6.object(PushInputShape);
|
|
107
|
+
export {
|
|
108
|
+
schemas_exports as schemas
|
|
109
|
+
};
|
|
110
|
+
//# sourceMappingURL=dev.js.map
|
package/dist/dev.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/schemas/index.ts","../src/schemas/primitives.ts","../src/schemas/run.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 {\n RunModeSchema,\n PortSchema,\n FilePathSchema,\n type RunMode,\n} from './primitives';\n\nexport { RunOptionsSchema, type RunOptions } from './run';\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 * Run mode schema.\n *\n * @remarks\n * Validates CLI run mode for the `run` command.\n * - `collect`: Run as event collector\n * - `serve`: Run as HTTP server\n */\nexport const RunModeSchema = z\n .enum(['collect', 'serve'])\n .describe('CLI run mode: collect events or serve HTTP');\n\nexport type RunMode = z.infer<typeof RunModeSchema>;\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 * Run Command Schemas\n *\n * Zod schemas for run command options validation.\n */\n\nimport { z } from '@walkeros/core/dev';\nimport { RunModeSchema, PortSchema, FilePathSchema } from './primitives';\n\n/**\n * Run command options schema.\n *\n * @remarks\n * Validates all options for the `walkeros run` command.\n */\nexport const RunOptionsSchema = z.object({\n mode: RunModeSchema,\n flow: FilePathSchema,\n port: PortSchema.default(8080),\n flowName: z.string().optional().describe('Specific flow name to run'),\n});\n\nexport type RunOptions = z.infer<typeof RunOptionsSchema>;\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 * - `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(['event', 'flow', 'mapping'])\n .describe('Type of validation to perform');\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});\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};\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)',\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('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 * 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":"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","names":["z","z","z","z","z","z","z","z","z"]}
|
|
@@ -250,7 +250,10 @@
|
|
|
250
250
|
"this",
|
|
251
251
|
{
|
|
252
252
|
"map": {
|
|
253
|
-
"item_id":
|
|
253
|
+
"item_id": [
|
|
254
|
+
{ "key": "data.sku" },
|
|
255
|
+
{ "key": "data.id" }
|
|
256
|
+
],
|
|
254
257
|
"item_name": "data.name",
|
|
255
258
|
"item_category": "data.category",
|
|
256
259
|
"price": "data.price"
|
|
@@ -322,6 +325,12 @@
|
|
|
322
325
|
"url": "$var.apiUrl",
|
|
323
326
|
"batch": 5
|
|
324
327
|
},
|
|
328
|
+
"data": {
|
|
329
|
+
"map": {
|
|
330
|
+
"sent_at": { "fn": "$code:() => Date.now()" },
|
|
331
|
+
"flow_version": "$var.flowVersion"
|
|
332
|
+
}
|
|
333
|
+
},
|
|
325
334
|
"mapping": {
|
|
326
335
|
"order": {
|
|
327
336
|
"complete": {
|
|
@@ -71,7 +71,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
71
71
|
|
|
72
72
|
## Feature Inventory
|
|
73
73
|
|
|
74
|
-
### Features Used (
|
|
74
|
+
### Features Used (53)
|
|
75
75
|
|
|
76
76
|
#### Mapping - Value Extraction
|
|
77
77
|
|
|
@@ -81,6 +81,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
81
81
|
| Static value | Meta ViewContent | `"content_type": { "value": "product" }` |
|
|
82
82
|
| Key with fallback | GA4 add_to_cart | `{ "key": "data.currency", "value": "$variables.currency" }` |
|
|
83
83
|
| Nested key (deep) | dataLayer mapping | `"items.0.item_id"` |
|
|
84
|
+
| Fallback array | GA4 view_item | `[{ "key": "data.sku" }, { "key": "data.id" }]` |
|
|
84
85
|
|
|
85
86
|
#### Mapping - Structure
|
|
86
87
|
|
|
@@ -92,6 +93,7 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
92
93
|
| Set (single value) | Meta ViewContent | `"content_ids": { "set": ["data.id"] }` |
|
|
93
94
|
| Set (multiple values) | Meta settings | `"external_id": { "set": ["user.device", "user.session"] }` |
|
|
94
95
|
| Direct passthrough | Meta PageView | `"data": "data"` |
|
|
96
|
+
| Config-level data | API destination | `"data": { "map": { "sent_at": {...} } }` |
|
|
95
97
|
|
|
96
98
|
#### Mapping - Control
|
|
97
99
|
|
|
@@ -175,36 +177,33 @@ npx walkeros serve packages/cli/examples/flow-complete.json --flow web
|
|
|
175
177
|
|
|
176
178
|
---
|
|
177
179
|
|
|
178
|
-
### Features NOT Used (
|
|
180
|
+
### Features NOT Used (6)
|
|
179
181
|
|
|
180
|
-
####
|
|
182
|
+
#### Now Available via $code: Prefix ✅
|
|
181
183
|
|
|
182
|
-
These features
|
|
184
|
+
These features are now fully supported in JSON via `$code:` prefix (and ARE used
|
|
185
|
+
in this example):
|
|
183
186
|
|
|
184
|
-
| Feature |
|
|
185
|
-
| --------------------------- |
|
|
186
|
-
| `fn:` function |
|
|
187
|
-
| `condition:` |
|
|
188
|
-
| Conditional mapping (array) |
|
|
189
|
-
| Custom transformer code |
|
|
190
|
-
| Custom
|
|
191
|
-
| Custom destination code | Requires JavaScript |
|
|
192
|
-
| Event handler callbacks | Requires JavaScript |
|
|
187
|
+
| Feature | Status |
|
|
188
|
+
| --------------------------- | ----------------------------------- |
|
|
189
|
+
| `fn:` function | ✅ Used via `$code:` in GA4 value |
|
|
190
|
+
| `condition:` | ✅ Used via `$code:` in definitions |
|
|
191
|
+
| Conditional mapping (array) | ✅ Used in serverValidator |
|
|
192
|
+
| Custom transformer code | ✅ Used in enricher, filter |
|
|
193
|
+
| Custom destination code | ✅ Used in debug logger |
|
|
193
194
|
|
|
194
|
-
#### Omitted for Clarity (
|
|
195
|
+
#### Omitted for Clarity (6)
|
|
195
196
|
|
|
196
197
|
These features could be added but were omitted to keep the example focused:
|
|
197
198
|
|
|
198
|
-
| Feature | Why Omitted
|
|
199
|
-
| ------------------------- |
|
|
200
|
-
| Multiple named flows (3+) | Two flows sufficient for demo
|
|
201
|
-
| Queue config | Advanced batching scenario
|
|
202
|
-
| Retry config | Advanced error handling
|
|
203
|
-
| Custom fetch options | API destination advanced
|
|
204
|
-
|
|
|
205
|
-
|
|
|
206
|
-
| Custom headers in API | Would add complexity |
|
|
207
|
-
| Multiple validators | One per flow sufficient |
|
|
199
|
+
| Feature | Why Omitted |
|
|
200
|
+
| ------------------------- | ------------------------------ |
|
|
201
|
+
| Multiple named flows (3+) | Two flows sufficient for demo |
|
|
202
|
+
| Queue config | Advanced batching scenario |
|
|
203
|
+
| Retry config | Advanced error handling |
|
|
204
|
+
| Custom fetch options | API destination advanced |
|
|
205
|
+
| Custom headers in API | Would add complexity |
|
|
206
|
+
| `validate:` function | Could add via $code: if needed |
|
|
208
207
|
|
|
209
208
|
---
|
|
210
209
|
|