@synergenius/flow-weaver 0.22.1 → 0.22.4
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/api/generate-in-place.js +5 -1
- package/dist/cli/commands/templates.js +7 -3
- package/dist/cli/flow-weaver.mjs +36009 -34233
- package/dist/cli/index.js +43 -29
- package/dist/cli/templates/workflows/ai-rag.js +1 -1
- package/dist/diff/formatDiff.js +36 -17
- package/dist/generated-version.d.ts +1 -1
- package/dist/generated-version.js +1 -1
- package/dist/generator/unified.js +4 -0
- package/dist/runtime/debug-controller.d.ts +9 -0
- package/dist/runtime/index.d.ts +1 -1
- package/dist/type-mappings.js +7 -1
- package/package.json +1 -1
package/dist/cli/index.js
CHANGED
|
@@ -10,35 +10,6 @@ import './env-setup.js';
|
|
|
10
10
|
// Load built-in extensions (CI/CD, etc.) before any commands run
|
|
11
11
|
import '../extensions/index.js';
|
|
12
12
|
import { Command, Option } from 'commander';
|
|
13
|
-
import { compileCommand } from './commands/compile.js';
|
|
14
|
-
import { createWorkflowCommand, createNodeCommand } from './commands/create.js';
|
|
15
|
-
import { describeCommand } from './commands/describe.js';
|
|
16
|
-
import { diagramCommand } from './commands/diagram.js';
|
|
17
|
-
import { diffCommand } from './commands/diff.js';
|
|
18
|
-
import { patternListCommand, patternApplyCommand, patternExtractCommand, } from './commands/pattern.js';
|
|
19
|
-
import { templatesCommand } from './commands/templates.js';
|
|
20
|
-
import { validateCommand } from './commands/validate.js';
|
|
21
|
-
import { doctorCommand } from './commands/doctor.js';
|
|
22
|
-
import { initCommand } from './commands/init.js';
|
|
23
|
-
import { watchCommand } from './commands/watch.js';
|
|
24
|
-
import { devCommand } from './commands/dev.js';
|
|
25
|
-
import { mcpServerCommand } from '../mcp/server.js';
|
|
26
|
-
import { grammarCommand } from './commands/grammar.js';
|
|
27
|
-
import { runCommand } from './commands/run.js';
|
|
28
|
-
import { serveCommand } from './commands/serve.js';
|
|
29
|
-
import { exportCommand } from './commands/export.js';
|
|
30
|
-
import { openapiCommand } from './commands/openapi.js';
|
|
31
|
-
import { pluginInitCommand } from './commands/plugin.js';
|
|
32
|
-
import { migrateCommand } from './commands/migrate.js';
|
|
33
|
-
import { changelogCommand } from './commands/changelog.js';
|
|
34
|
-
import { stripCommand } from './commands/strip.js';
|
|
35
|
-
import { docsListCommand, docsReadCommand, docsSearchCommand } from './commands/docs.js';
|
|
36
|
-
import { contextCommand } from './commands/context.js';
|
|
37
|
-
import { statusCommand } from './commands/status.js';
|
|
38
|
-
import { implementCommand } from './commands/implement.js';
|
|
39
|
-
import { modifyAddNodeCommand, modifyRemoveNodeCommand, modifyAddConnectionCommand, modifyRemoveConnectionCommand, modifyRenameNodeCommand, modifySetPositionCommand, modifySetLabelCommand, } from './commands/modify.js';
|
|
40
|
-
import { marketInitCommand, marketPackCommand, marketPublishCommand, marketInstallCommand, marketSearchCommand, marketListCommand, } from './commands/market.js';
|
|
41
|
-
import { mcpSetupCommand } from './commands/mcp-setup.js';
|
|
42
13
|
import { logger } from './utils/logger.js';
|
|
43
14
|
import { getErrorMessage } from '../utils/error-utils.js';
|
|
44
15
|
const version = typeof __CLI_VERSION__ !== 'undefined' ? __CLI_VERSION__ : '0.0.0-dev';
|
|
@@ -109,6 +80,7 @@ program
|
|
|
109
80
|
.option('--retries <n>', 'Number of retries per function', parseInt)
|
|
110
81
|
.option('--timeout <duration>', 'Function timeout (e.g. "30m", "1h")')
|
|
111
82
|
.action(wrapAction(async (input, options) => {
|
|
83
|
+
const { compileCommand } = await import('./commands/compile.js');
|
|
112
84
|
if (options.workflow)
|
|
113
85
|
options.workflowName = options.workflow;
|
|
114
86
|
await compileCommand(input, options);
|
|
@@ -121,6 +93,7 @@ program
|
|
|
121
93
|
.option('--dry-run', 'Preview without writing', false)
|
|
122
94
|
.option('--verbose', 'Verbose output', false)
|
|
123
95
|
.action(wrapAction(async (input, options) => {
|
|
96
|
+
const { stripCommand } = await import('./commands/strip.js');
|
|
124
97
|
await stripCommand(input, options);
|
|
125
98
|
}));
|
|
126
99
|
// Describe command
|
|
@@ -132,6 +105,7 @@ program
|
|
|
132
105
|
.option('--compile', 'Also update runtime markers in the source file')
|
|
133
106
|
.option('-w, --workflow <name>', 'Specific workflow name to describe')
|
|
134
107
|
.action(wrapAction(async (input, options) => {
|
|
108
|
+
const { describeCommand } = await import('./commands/describe.js');
|
|
135
109
|
if (options.workflow)
|
|
136
110
|
options.workflowName = options.workflow;
|
|
137
111
|
await describeCommand(input, options);
|
|
@@ -155,6 +129,7 @@ program
|
|
|
155
129
|
options.showPortLabels = options.portLabels;
|
|
156
130
|
if (options.workflow)
|
|
157
131
|
options.workflowName = options.workflow;
|
|
132
|
+
const { diagramCommand } = await import('./commands/diagram.js');
|
|
158
133
|
await diagramCommand(input, options);
|
|
159
134
|
}));
|
|
160
135
|
// Diff command
|
|
@@ -165,6 +140,7 @@ program
|
|
|
165
140
|
.option('-w, --workflow <name>', 'Specific workflow name to compare')
|
|
166
141
|
.option('--exit-zero', 'Exit 0 even when differences are found', false)
|
|
167
142
|
.action(wrapAction(async (file1, file2, options) => {
|
|
143
|
+
const { diffCommand } = await import('./commands/diff.js');
|
|
168
144
|
if (options.workflow)
|
|
169
145
|
options.workflowName = options.workflow;
|
|
170
146
|
await diffCommand(file1, file2, options);
|
|
@@ -179,6 +155,7 @@ program
|
|
|
179
155
|
.option('-w, --workflow <name>', 'Specific workflow name to validate')
|
|
180
156
|
.option('--strict', 'Treat type coercion warnings as errors', false)
|
|
181
157
|
.action(wrapAction(async (input, options) => {
|
|
158
|
+
const { validateCommand } = await import('./commands/validate.js');
|
|
182
159
|
if (options.workflow)
|
|
183
160
|
options.workflowName = options.workflow;
|
|
184
161
|
await validateCommand(input, options);
|
|
@@ -189,6 +166,7 @@ program
|
|
|
189
166
|
.description('Check project environment and configuration for flow-weaver compatibility')
|
|
190
167
|
.option('--json', 'Output results as JSON', false)
|
|
191
168
|
.action(wrapAction(async (options) => {
|
|
169
|
+
const { doctorCommand } = await import('./commands/doctor.js');
|
|
192
170
|
await doctorCommand(options);
|
|
193
171
|
}));
|
|
194
172
|
// Init command
|
|
@@ -211,6 +189,7 @@ program
|
|
|
211
189
|
.option('--force', 'Overwrite existing files', false)
|
|
212
190
|
.option('--json', 'Output results as JSON', false)
|
|
213
191
|
.action(wrapAction(async (directory, options) => {
|
|
192
|
+
const { initCommand } = await import('./commands/init.js');
|
|
214
193
|
await initCommand(directory, options);
|
|
215
194
|
}));
|
|
216
195
|
// Watch command
|
|
@@ -224,6 +203,7 @@ program
|
|
|
224
203
|
.option('-w, --workflow <name>', 'Specific workflow name to compile')
|
|
225
204
|
.option('-f, --format <format>', 'Module format: esm, cjs, or auto', 'auto')
|
|
226
205
|
.action(wrapAction(async (input, options) => {
|
|
206
|
+
const { watchCommand } = await import('./commands/watch.js');
|
|
227
207
|
if (options.workflow)
|
|
228
208
|
options.workflowName = options.workflow;
|
|
229
209
|
await watchCommand(input, options);
|
|
@@ -244,6 +224,7 @@ program
|
|
|
244
224
|
.option('--framework <framework>', 'Framework for serve handler', 'express')
|
|
245
225
|
.option('--port <port>', 'Port for dev server', (v) => parseInt(v, 10), 3000)
|
|
246
226
|
.action(wrapAction(async (input, options) => {
|
|
227
|
+
const { devCommand } = await import('./commands/dev.js');
|
|
247
228
|
await devCommand(input, options);
|
|
248
229
|
}));
|
|
249
230
|
// MCP server command
|
|
@@ -252,6 +233,7 @@ program
|
|
|
252
233
|
.description('Start MCP server for Claude Code integration')
|
|
253
234
|
.option('--stdio', 'Run in MCP stdio mode (skip interactive registration)')
|
|
254
235
|
.action(wrapAction(async (options) => {
|
|
236
|
+
const { mcpServerCommand } = await import('../mcp/server.js');
|
|
255
237
|
await mcpServerCommand(options);
|
|
256
238
|
}));
|
|
257
239
|
// MCP setup command
|
|
@@ -262,6 +244,7 @@ program
|
|
|
262
244
|
.option('--all', 'Configure all detected tools without prompting')
|
|
263
245
|
.option('--list', 'List detected tools without configuring')
|
|
264
246
|
.action(wrapAction(async (options) => {
|
|
247
|
+
const { mcpSetupCommand } = await import('./commands/mcp-setup.js');
|
|
265
248
|
await mcpSetupCommand(options);
|
|
266
249
|
}));
|
|
267
250
|
// Create command (with subcommands)
|
|
@@ -280,6 +263,7 @@ createCmd
|
|
|
280
263
|
.option('--input <name>', 'Custom input port name (default: "data")')
|
|
281
264
|
.option('--output <name>', 'Custom output port name (default: "result")')
|
|
282
265
|
.action(wrapAction(async (template, file, options) => {
|
|
266
|
+
const { createWorkflowCommand } = await import('./commands/create.js');
|
|
283
267
|
await createWorkflowCommand(template, file, options);
|
|
284
268
|
}));
|
|
285
269
|
createCmd
|
|
@@ -291,6 +275,7 @@ createCmd
|
|
|
291
275
|
.option('--strategy <strategy>', 'Template strategy (e.g. mock, callback, webhook)')
|
|
292
276
|
.option('--config <json>', 'Additional configuration (JSON)')
|
|
293
277
|
.action(wrapAction(async (name, file, options) => {
|
|
278
|
+
const { createNodeCommand } = await import('./commands/create.js');
|
|
294
279
|
await createNodeCommand(name, file, options);
|
|
295
280
|
}));
|
|
296
281
|
// Modify command (with subcommands)
|
|
@@ -302,6 +287,7 @@ modifyCmd
|
|
|
302
287
|
.requiredOption('--nodeId <id>', 'Node instance ID')
|
|
303
288
|
.requiredOption('--nodeType <type>', 'Node type name')
|
|
304
289
|
.action(wrapAction(async (options) => {
|
|
290
|
+
const { modifyAddNodeCommand } = await import('./commands/modify.js');
|
|
305
291
|
await modifyAddNodeCommand(options.file, options);
|
|
306
292
|
}));
|
|
307
293
|
modifyCmd
|
|
@@ -310,6 +296,7 @@ modifyCmd
|
|
|
310
296
|
.requiredOption('--file <path>', 'Workflow file')
|
|
311
297
|
.requiredOption('--nodeId <id>', 'Node instance ID')
|
|
312
298
|
.action(wrapAction(async (options) => {
|
|
299
|
+
const { modifyRemoveNodeCommand } = await import('./commands/modify.js');
|
|
313
300
|
await modifyRemoveNodeCommand(options.file, options);
|
|
314
301
|
}));
|
|
315
302
|
modifyCmd
|
|
@@ -319,6 +306,7 @@ modifyCmd
|
|
|
319
306
|
.requiredOption('--from <node.port>', 'Source (e.g. nodeA.output)')
|
|
320
307
|
.requiredOption('--to <node.port>', 'Target (e.g. nodeB.input)')
|
|
321
308
|
.action(wrapAction(async (options) => {
|
|
309
|
+
const { modifyAddConnectionCommand } = await import('./commands/modify.js');
|
|
322
310
|
await modifyAddConnectionCommand(options.file, options);
|
|
323
311
|
}));
|
|
324
312
|
modifyCmd
|
|
@@ -328,6 +316,7 @@ modifyCmd
|
|
|
328
316
|
.requiredOption('--from <node.port>', 'Source (e.g. nodeA.output)')
|
|
329
317
|
.requiredOption('--to <node.port>', 'Target (e.g. nodeB.input)')
|
|
330
318
|
.action(wrapAction(async (options) => {
|
|
319
|
+
const { modifyRemoveConnectionCommand } = await import('./commands/modify.js');
|
|
331
320
|
await modifyRemoveConnectionCommand(options.file, options);
|
|
332
321
|
}));
|
|
333
322
|
modifyCmd
|
|
@@ -337,6 +326,7 @@ modifyCmd
|
|
|
337
326
|
.requiredOption('--oldId <id>', 'Current node ID')
|
|
338
327
|
.requiredOption('--newId <id>', 'New node ID')
|
|
339
328
|
.action(wrapAction(async (options) => {
|
|
329
|
+
const { modifyRenameNodeCommand } = await import('./commands/modify.js');
|
|
340
330
|
await modifyRenameNodeCommand(options.file, options);
|
|
341
331
|
}));
|
|
342
332
|
modifyCmd
|
|
@@ -347,6 +337,7 @@ modifyCmd
|
|
|
347
337
|
.requiredOption('--x <number>', 'X coordinate')
|
|
348
338
|
.requiredOption('--y <number>', 'Y coordinate')
|
|
349
339
|
.action(wrapAction(async (options) => {
|
|
340
|
+
const { modifySetPositionCommand } = await import('./commands/modify.js');
|
|
350
341
|
await modifySetPositionCommand(options.file, options);
|
|
351
342
|
}));
|
|
352
343
|
modifyCmd
|
|
@@ -356,6 +347,7 @@ modifyCmd
|
|
|
356
347
|
.requiredOption('--nodeId <id>', 'Node instance ID')
|
|
357
348
|
.requiredOption('--label <text>', 'Display label')
|
|
358
349
|
.action(wrapAction(async (options) => {
|
|
350
|
+
const { modifySetLabelCommand } = await import('./commands/modify.js');
|
|
359
351
|
await modifySetLabelCommand(options.file, options);
|
|
360
352
|
}));
|
|
361
353
|
// Templates command
|
|
@@ -364,6 +356,7 @@ program
|
|
|
364
356
|
.description('List available templates')
|
|
365
357
|
.option('--json', 'Output as JSON', false)
|
|
366
358
|
.action(wrapAction(async (options) => {
|
|
359
|
+
const { templatesCommand } = await import('./commands/templates.js');
|
|
367
360
|
await templatesCommand(options);
|
|
368
361
|
}));
|
|
369
362
|
// Grammar command
|
|
@@ -373,6 +366,7 @@ program
|
|
|
373
366
|
.addOption(new Option('-f, --format <format>', 'Output format').choices(['html', 'ebnf']))
|
|
374
367
|
.option('-o, --output <path>', 'Write output to file instead of stdout')
|
|
375
368
|
.action(wrapAction(async (options) => {
|
|
369
|
+
const { grammarCommand } = await import('./commands/grammar.js');
|
|
376
370
|
await grammarCommand(options);
|
|
377
371
|
}));
|
|
378
372
|
// Pattern command (with subcommands)
|
|
@@ -382,6 +376,7 @@ patternCmd
|
|
|
382
376
|
.description('List patterns in a file or directory')
|
|
383
377
|
.option('--json', 'Output as JSON', false)
|
|
384
378
|
.action(wrapAction(async (inputPath, options) => {
|
|
379
|
+
const { patternListCommand } = await import('./commands/pattern.js');
|
|
385
380
|
await patternListCommand(inputPath, options);
|
|
386
381
|
}));
|
|
387
382
|
patternCmd
|
|
@@ -391,6 +386,7 @@ patternCmd
|
|
|
391
386
|
.option('--prefix <prefix>', 'Prefix for node instance IDs')
|
|
392
387
|
.option('-n, --name <name>', 'Specific pattern name to apply')
|
|
393
388
|
.action(wrapAction(async (patternFile, targetFile, options) => {
|
|
389
|
+
const { patternApplyCommand } = await import('./commands/pattern.js');
|
|
394
390
|
await patternApplyCommand(patternFile, targetFile, options);
|
|
395
391
|
}));
|
|
396
392
|
patternCmd
|
|
@@ -401,6 +397,7 @@ patternCmd
|
|
|
401
397
|
.option('-n, --name <name>', 'Pattern name')
|
|
402
398
|
.option('-p, --preview', 'Preview pattern without writing', false)
|
|
403
399
|
.action(wrapAction(async (sourceFile, options) => {
|
|
400
|
+
const { patternExtractCommand } = await import('./commands/pattern.js');
|
|
404
401
|
await patternExtractCommand(sourceFile, options);
|
|
405
402
|
}));
|
|
406
403
|
// Run command
|
|
@@ -422,6 +419,7 @@ program
|
|
|
422
419
|
.option('--resume [file]', 'Resume from a checkpoint file (auto-detects latest if no file)')
|
|
423
420
|
.option('-b, --breakpoint <nodeIds...>', 'Set initial breakpoints (repeatable)')
|
|
424
421
|
.action(wrapAction(async (input, options) => {
|
|
422
|
+
const { runCommand } = await import('./commands/run.js');
|
|
425
423
|
await runCommand(input, options);
|
|
426
424
|
}));
|
|
427
425
|
// Serve command
|
|
@@ -436,6 +434,7 @@ program
|
|
|
436
434
|
.option('--cors <origin>', 'CORS origin', '*')
|
|
437
435
|
.option('--swagger', 'Enable Swagger UI at /docs', false)
|
|
438
436
|
.action(wrapAction(async (directory, options) => {
|
|
437
|
+
const { serveCommand } = await import('./commands/serve.js');
|
|
439
438
|
await serveCommand(directory, {
|
|
440
439
|
port: parseInt(options.port, 10),
|
|
441
440
|
host: options.host,
|
|
@@ -460,6 +459,7 @@ program
|
|
|
460
459
|
.option('--docs', 'Include API documentation routes (/docs and /openapi.json)', false)
|
|
461
460
|
.option('--durable-steps', 'Use deep generator with per-node durable steps', false)
|
|
462
461
|
.action(wrapAction(async (input, options) => {
|
|
462
|
+
const { exportCommand } = await import('./commands/export.js');
|
|
463
463
|
await exportCommand(input, options);
|
|
464
464
|
}));
|
|
465
465
|
// OpenAPI command
|
|
@@ -473,6 +473,7 @@ program
|
|
|
473
473
|
.option('-f, --format <format>', 'Output format: json, yaml', 'json')
|
|
474
474
|
.option('--server <url>', 'Server URL')
|
|
475
475
|
.action(wrapAction(async (directory, options) => {
|
|
476
|
+
const { openapiCommand } = await import('./commands/openapi.js');
|
|
476
477
|
await openapiCommand(directory, options);
|
|
477
478
|
}));
|
|
478
479
|
// Plugin command group
|
|
@@ -485,6 +486,7 @@ pluginCmd
|
|
|
485
486
|
.option('-p, --preview', 'Preview generated files without writing', false)
|
|
486
487
|
.option('--force', 'Overwrite existing files', false)
|
|
487
488
|
.action(wrapAction(async (name, options) => {
|
|
489
|
+
const { pluginInitCommand } = await import('./commands/plugin.js');
|
|
488
490
|
await pluginInitCommand(name, options);
|
|
489
491
|
}));
|
|
490
492
|
// Migrate command
|
|
@@ -494,6 +496,7 @@ program
|
|
|
494
496
|
.option('--dry-run', 'Preview changes without writing files', false)
|
|
495
497
|
.option('--diff', 'Show semantic diff before/after', false)
|
|
496
498
|
.action(wrapAction(async (glob, options) => {
|
|
499
|
+
const { migrateCommand } = await import('./commands/migrate.js');
|
|
497
500
|
await migrateCommand(glob, options);
|
|
498
501
|
}));
|
|
499
502
|
// Status command
|
|
@@ -503,6 +506,7 @@ program
|
|
|
503
506
|
.option('-w, --workflow <name>', 'Specific workflow name')
|
|
504
507
|
.option('--json', 'Output as JSON', false)
|
|
505
508
|
.action(wrapAction(async (input, options) => {
|
|
509
|
+
const { statusCommand } = await import('./commands/status.js');
|
|
506
510
|
if (options.workflow)
|
|
507
511
|
options.workflowName = options.workflow;
|
|
508
512
|
await statusCommand(input, options);
|
|
@@ -519,6 +523,7 @@ program
|
|
|
519
523
|
if (!nodeName) {
|
|
520
524
|
throw new Error('Node name is required (as positional arg or --nodeId flag)');
|
|
521
525
|
}
|
|
526
|
+
const { implementCommand } = await import('./commands/implement.js');
|
|
522
527
|
if (options.workflow)
|
|
523
528
|
options.workflowName = options.workflow;
|
|
524
529
|
await implementCommand(input, nodeName, options);
|
|
@@ -531,6 +536,7 @@ program
|
|
|
531
536
|
.option('--since <date>', 'Date-based range (e.g., "2024-01-01")')
|
|
532
537
|
.option('-r, --range <range>', 'Custom git range (e.g., "v0.1.0..HEAD")')
|
|
533
538
|
.action(wrapAction(async (options) => {
|
|
539
|
+
const { changelogCommand } = await import('./commands/changelog.js');
|
|
534
540
|
await changelogCommand(options);
|
|
535
541
|
}));
|
|
536
542
|
// Docs command: fw docs [topic] | fw docs search <query>
|
|
@@ -540,6 +546,7 @@ program
|
|
|
540
546
|
.option('--json', 'Output as JSON', false)
|
|
541
547
|
.option('--compact', 'Return compact LLM-friendly version', false)
|
|
542
548
|
.action(wrapAction(async (args, options) => {
|
|
549
|
+
const { docsListCommand, docsReadCommand, docsSearchCommand } = await import('./commands/docs.js');
|
|
543
550
|
if (args.length === 0 || args[0] === 'list') {
|
|
544
551
|
await docsListCommand(options);
|
|
545
552
|
}
|
|
@@ -566,6 +573,7 @@ program
|
|
|
566
573
|
.option('-o, --output <path>', 'Write to file instead of stdout')
|
|
567
574
|
.option('--list', 'List available presets and exit')
|
|
568
575
|
.action(wrapAction(async (preset, options) => {
|
|
576
|
+
const { contextCommand } = await import('./commands/context.js');
|
|
569
577
|
await contextCommand(preset, options);
|
|
570
578
|
}));
|
|
571
579
|
// Marketplace command group
|
|
@@ -577,6 +585,7 @@ marketCmd
|
|
|
577
585
|
.option('-a, --author <author>', 'Author name')
|
|
578
586
|
.option('-y, --yes', 'Skip prompts and use defaults', false)
|
|
579
587
|
.action(wrapAction(async (name, options) => {
|
|
588
|
+
const { marketInitCommand } = await import('./commands/market.js');
|
|
580
589
|
await marketInitCommand(name, options);
|
|
581
590
|
}));
|
|
582
591
|
marketCmd
|
|
@@ -585,6 +594,7 @@ marketCmd
|
|
|
585
594
|
.option('--json', 'Output results as JSON', false)
|
|
586
595
|
.option('--verbose', 'Show parse warnings', false)
|
|
587
596
|
.action(wrapAction(async (directory, options) => {
|
|
597
|
+
const { marketPackCommand } = await import('./commands/market.js');
|
|
588
598
|
await marketPackCommand(directory, options);
|
|
589
599
|
}));
|
|
590
600
|
marketCmd
|
|
@@ -593,6 +603,7 @@ marketCmd
|
|
|
593
603
|
.option('--dry-run', 'Preview without publishing', false)
|
|
594
604
|
.option('--tag <tag>', 'npm dist-tag')
|
|
595
605
|
.action(wrapAction(async (directory, options) => {
|
|
606
|
+
const { marketPublishCommand } = await import('./commands/market.js');
|
|
596
607
|
await marketPublishCommand(directory, options);
|
|
597
608
|
}));
|
|
598
609
|
marketCmd
|
|
@@ -600,6 +611,7 @@ marketCmd
|
|
|
600
611
|
.description('Install a marketplace package')
|
|
601
612
|
.option('--json', 'Output results as JSON', false)
|
|
602
613
|
.action(wrapAction(async (packageSpec, options) => {
|
|
614
|
+
const { marketInstallCommand } = await import('./commands/market.js');
|
|
603
615
|
await marketInstallCommand(packageSpec, options);
|
|
604
616
|
}));
|
|
605
617
|
marketCmd
|
|
@@ -609,6 +621,7 @@ marketCmd
|
|
|
609
621
|
.option('-r, --registry <url>', 'Custom registry search URL (e.g., private npm registry)')
|
|
610
622
|
.option('--json', 'Output as JSON', false)
|
|
611
623
|
.action(wrapAction(async (query, options) => {
|
|
624
|
+
const { marketSearchCommand } = await import('./commands/market.js');
|
|
612
625
|
await marketSearchCommand(query, { ...options, limit: parseInt(options.limit, 10) });
|
|
613
626
|
}));
|
|
614
627
|
marketCmd
|
|
@@ -616,6 +629,7 @@ marketCmd
|
|
|
616
629
|
.description('List installed marketplace packages')
|
|
617
630
|
.option('--json', 'Output as JSON', false)
|
|
618
631
|
.action(wrapAction(async (options) => {
|
|
632
|
+
const { marketListCommand } = await import('./commands/market.js');
|
|
619
633
|
await marketListCommand(options);
|
|
620
634
|
}));
|
|
621
635
|
// Concise examples appended to --help
|
|
@@ -48,7 +48,7 @@ const documentStore: Document[] = [
|
|
|
48
48
|
* @input query [order:1] - Search query
|
|
49
49
|
* @input [topK] [order:2] - Number of results (default 3)
|
|
50
50
|
* @input execute [order:0] - Execute
|
|
51
|
-
* @output documents [order:2] - Retrieved documents
|
|
51
|
+
* @output documents [order:2] [hidden] - Retrieved documents
|
|
52
52
|
* @output context [order:3] - Combined document text
|
|
53
53
|
* @output onSuccess [order:0] - On Success
|
|
54
54
|
* @output onFailure [order:1] - On Failure
|
package/dist/diff/formatDiff.js
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
2
2
|
* Human-readable diff formatter for workflow diffs.
|
|
3
3
|
*/
|
|
4
4
|
import { IMPACT_DESCRIPTIONS, getImpactReasons } from './impact.js';
|
|
5
|
+
import pc from 'picocolors';
|
|
6
|
+
// Colorize diff symbols: green for added, red for removed, yellow for modified
|
|
7
|
+
function colorSymbol(symbol, text) {
|
|
8
|
+
switch (symbol) {
|
|
9
|
+
case '+': return pc.green(`${symbol} ${text}`);
|
|
10
|
+
case '-': return pc.red(`${symbol} ${text}`);
|
|
11
|
+
case '~': return pc.yellow(`${symbol} ${text}`);
|
|
12
|
+
default: return `${symbol} ${text}`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function impactColor(impact) {
|
|
16
|
+
switch (impact) {
|
|
17
|
+
case 'CRITICAL': return pc.red(pc.bold(impact));
|
|
18
|
+
case 'BREAKING': return pc.red(impact);
|
|
19
|
+
case 'MINOR': return pc.yellow(impact);
|
|
20
|
+
case 'COSMETIC': return pc.dim(impact);
|
|
21
|
+
default: return impact;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
5
24
|
/**
|
|
6
25
|
* Format a workflow diff for display
|
|
7
26
|
*/
|
|
@@ -41,7 +60,7 @@ function formatCompact(diff) {
|
|
|
41
60
|
parts.push(`+${summary.connectionsAdded} conns`);
|
|
42
61
|
if (summary.connectionsRemoved > 0)
|
|
43
62
|
parts.push(`-${summary.connectionsRemoved} conns`);
|
|
44
|
-
return `[${diff.impact}] ${parts.join(', ')}`;
|
|
63
|
+
return `[${impactColor(diff.impact)}] ${parts.join(', ')}`;
|
|
45
64
|
}
|
|
46
65
|
/**
|
|
47
66
|
* Full text format
|
|
@@ -50,11 +69,11 @@ function formatText(diff) {
|
|
|
50
69
|
const lines = [];
|
|
51
70
|
// Header
|
|
52
71
|
lines.push('═══════════════════════════════════════════════════════════════');
|
|
53
|
-
lines.push(` WORKFLOW DIFF - Impact: ${diff.impact}`);
|
|
72
|
+
lines.push(` WORKFLOW DIFF - Impact: ${impactColor(diff.impact)}`);
|
|
54
73
|
lines.push('═══════════════════════════════════════════════════════════════');
|
|
55
74
|
lines.push('');
|
|
56
75
|
if (diff.identical) {
|
|
57
|
-
lines.push(' ✓ Workflows are semantically identical');
|
|
76
|
+
lines.push(pc.green(' ✓ Workflows are semantically identical'));
|
|
58
77
|
lines.push('');
|
|
59
78
|
return lines.join('\n');
|
|
60
79
|
}
|
|
@@ -106,22 +125,22 @@ function formatText(diff) {
|
|
|
106
125
|
lines.push(' WORKFLOW PORTS');
|
|
107
126
|
lines.push(' ───────────────────────────────────────────────────────────');
|
|
108
127
|
if (diff.startPorts.added.length > 0) {
|
|
109
|
-
lines.push(
|
|
128
|
+
lines.push(' ' + colorSymbol('+', `Start ports added: ${diff.startPorts.added.map(p => p.name).join(', ')}`));
|
|
110
129
|
}
|
|
111
130
|
if (diff.startPorts.removed.length > 0) {
|
|
112
|
-
lines.push(
|
|
131
|
+
lines.push(' ' + colorSymbol('-', `Start ports removed: ${diff.startPorts.removed.map(p => p.name).join(', ')}`));
|
|
113
132
|
}
|
|
114
133
|
if (diff.startPorts.modified.length > 0) {
|
|
115
|
-
lines.push(
|
|
134
|
+
lines.push(' ' + colorSymbol('~', `Start ports modified: ${diff.startPorts.modified.map(p => p.name).join(', ')}`));
|
|
116
135
|
}
|
|
117
136
|
if (diff.exitPorts.added.length > 0) {
|
|
118
|
-
lines.push(
|
|
137
|
+
lines.push(' ' + colorSymbol('+', `Exit ports added: ${diff.exitPorts.added.map(p => p.name).join(', ')}`));
|
|
119
138
|
}
|
|
120
139
|
if (diff.exitPorts.removed.length > 0) {
|
|
121
|
-
lines.push(
|
|
140
|
+
lines.push(' ' + colorSymbol('-', `Exit ports removed: ${diff.exitPorts.removed.map(p => p.name).join(', ')}`));
|
|
122
141
|
}
|
|
123
142
|
if (diff.exitPorts.modified.length > 0) {
|
|
124
|
-
lines.push(
|
|
143
|
+
lines.push(' ' + colorSymbol('~', `Exit ports modified: ${diff.exitPorts.modified.map(p => p.name).join(', ')}`));
|
|
125
144
|
}
|
|
126
145
|
lines.push('');
|
|
127
146
|
}
|
|
@@ -131,7 +150,7 @@ function formatText(diff) {
|
|
|
131
150
|
lines.push(' ───────────────────────────────────────────────────────────');
|
|
132
151
|
for (const scope of diff.scopes) {
|
|
133
152
|
const symbol = scope.changeType === 'ADDED' ? '+' : scope.changeType === 'REMOVED' ? '-' : '~';
|
|
134
|
-
lines.push(
|
|
153
|
+
lines.push(' ' + colorSymbol(symbol, scope.name));
|
|
135
154
|
}
|
|
136
155
|
lines.push('');
|
|
137
156
|
}
|
|
@@ -149,7 +168,7 @@ function formatText(diff) {
|
|
|
149
168
|
}
|
|
150
169
|
function formatNodeType(nt) {
|
|
151
170
|
const symbol = nt.changeType === 'ADDED' ? '+' : nt.changeType === 'REMOVED' ? '-' : '~';
|
|
152
|
-
let
|
|
171
|
+
let text = nt.name;
|
|
153
172
|
if (nt.changeType === 'MODIFIED') {
|
|
154
173
|
const details = [];
|
|
155
174
|
if (nt.changes.functionName)
|
|
@@ -181,14 +200,14 @@ function formatNodeType(nt) {
|
|
|
181
200
|
details.push(`~outputs: ${modified.join(', ')}`);
|
|
182
201
|
}
|
|
183
202
|
if (details.length > 0) {
|
|
184
|
-
|
|
203
|
+
text += ` (${details.join('; ')})`;
|
|
185
204
|
}
|
|
186
205
|
}
|
|
187
|
-
return
|
|
206
|
+
return ' ' + colorSymbol(symbol, text);
|
|
188
207
|
}
|
|
189
208
|
function formatInstance(inst) {
|
|
190
209
|
const symbol = inst.changeType === 'ADDED' ? '+' : inst.changeType === 'REMOVED' ? '-' : '~';
|
|
191
|
-
let
|
|
210
|
+
let text = inst.id;
|
|
192
211
|
if (inst.changeType === 'MODIFIED') {
|
|
193
212
|
const details = [];
|
|
194
213
|
if (inst.changes.nodeType) {
|
|
@@ -206,15 +225,15 @@ function formatInstance(inst) {
|
|
|
206
225
|
details.push(`portConfigs changed`);
|
|
207
226
|
}
|
|
208
227
|
if (details.length > 0) {
|
|
209
|
-
|
|
228
|
+
text += ` (${details.join('; ')})`;
|
|
210
229
|
}
|
|
211
230
|
}
|
|
212
|
-
return
|
|
231
|
+
return ' ' + colorSymbol(symbol, text);
|
|
213
232
|
}
|
|
214
233
|
function formatConnection(conn) {
|
|
215
234
|
const symbol = conn.changeType === 'ADDED' ? '+' : '-';
|
|
216
235
|
const fromScope = conn.from.scope ? `:${conn.from.scope}` : '';
|
|
217
236
|
const toScope = conn.to.scope ? `:${conn.to.scope}` : '';
|
|
218
|
-
return
|
|
237
|
+
return ' ' + colorSymbol(symbol, `${conn.from.node}.${conn.from.port}${fromScope} → ${conn.to.node}.${conn.to.port}${toScope}`);
|
|
219
238
|
}
|
|
220
239
|
//# sourceMappingURL=formatDiff.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.22.
|
|
1
|
+
export declare const VERSION = "0.22.4";
|
|
2
2
|
//# sourceMappingURL=generated-version.d.ts.map
|
|
@@ -816,6 +816,10 @@ isAsync = false) {
|
|
|
816
816
|
const safeId = toValidIdentifier(instanceId);
|
|
817
817
|
// Add execution index for this skipped node so the event has a valid reference
|
|
818
818
|
lines.push(`${indent}const ${safeId}Idx = ${ctxVar}.addExecution('${instanceId}');`);
|
|
819
|
+
// Set STEP port variables so downstream nodes reading onSuccess/onFailure
|
|
820
|
+
// from this cancelled node don't crash with "Variable not found".
|
|
821
|
+
lines.push(`${indent}${awaitPrefix}${ctxVar}.setVariable({ id: '${instanceId}', portName: 'onSuccess', executionIndex: ${safeId}Idx, nodeTypeName: '${instance.nodeType}' }, false);`);
|
|
822
|
+
lines.push(`${indent}${awaitPrefix}${ctxVar}.setVariable({ id: '${instanceId}', portName: 'onFailure', executionIndex: ${safeId}Idx, nodeTypeName: '${instance.nodeType}' }, false);`);
|
|
819
823
|
lines.push(`${indent}${awaitPrefix}${ctxVar}.sendStatusChangedEvent({`);
|
|
820
824
|
lines.push(`${indent} nodeTypeName: '${instance.nodeType}',`);
|
|
821
825
|
lines.push(`${indent} id: '${instanceId}',`);
|
|
@@ -37,6 +37,15 @@ export type DebugResumeAction = {
|
|
|
37
37
|
} | {
|
|
38
38
|
type: 'abort';
|
|
39
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Minimal interface for the debug controller as referenced by generated code.
|
|
42
|
+
* The full DebugController class implements this, but generated code only
|
|
43
|
+
* needs beforeNode/afterNode — so this type is what gets imported.
|
|
44
|
+
*/
|
|
45
|
+
export type TDebugController = {
|
|
46
|
+
beforeNode(nodeId: string, ctx: GeneratedExecutionContext): Promise<boolean> | boolean;
|
|
47
|
+
afterNode(nodeId: string, ctx: GeneratedExecutionContext): Promise<void> | void;
|
|
48
|
+
};
|
|
40
49
|
export interface DebugControllerConfig {
|
|
41
50
|
/** Enable step-through debugging (pauses before first node) */
|
|
42
51
|
debug?: boolean;
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { GeneratedExecutionContext } from "./ExecutionContext.js";
|
|
2
2
|
export { CancellationError } from "./CancellationError.js";
|
|
3
3
|
export { DebugController } from "./debug-controller.js";
|
|
4
|
-
export type { DebugMode, DebugPauseState, DebugResumeAction, DebugControllerConfig } from "./debug-controller.js";
|
|
4
|
+
export type { TDebugController, DebugMode, DebugPauseState, DebugResumeAction, DebugControllerConfig } from "./debug-controller.js";
|
|
5
5
|
export { CheckpointWriter, loadCheckpoint, findLatestCheckpoint } from "./checkpoint.js";
|
|
6
6
|
export type { CheckpointData } from "./checkpoint.js";
|
|
7
7
|
export * from "./events.js";
|
package/dist/type-mappings.js
CHANGED
|
@@ -38,9 +38,15 @@ export function mapToTypeScript(portType, tsType) {
|
|
|
38
38
|
console.warn(`Unknown port type: ${portType}, defaulting to 'unknown'`);
|
|
39
39
|
return 'unknown';
|
|
40
40
|
}
|
|
41
|
-
// For non-primitive types, use tsType if provided
|
|
41
|
+
// For non-primitive types, use tsType if provided — BUT strip types
|
|
42
|
+
// that contain absolute paths (import("/absolute/path").Type) which
|
|
43
|
+
// break when the file is compiled on a different machine or moved.
|
|
42
44
|
if (tsType &&
|
|
43
45
|
(portType === 'OBJECT' || portType === 'ANY' || portType === 'ARRAY' || portType === 'FUNCTION')) {
|
|
46
|
+
// Strip types with absolute import paths — they break on other machines
|
|
47
|
+
if (tsType.includes('import(')) {
|
|
48
|
+
return mapping.typescript;
|
|
49
|
+
}
|
|
44
50
|
return tsType;
|
|
45
51
|
}
|
|
46
52
|
return mapping.typescript;
|
package/package.json
CHANGED