@synergenius/flow-weaver 0.21.7 → 0.21.11

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.
Files changed (51) hide show
  1. package/README.md +59 -57
  2. package/dist/cli/commands/context.js +2 -2
  3. package/dist/cli/commands/create.js +2 -2
  4. package/dist/cli/commands/docs.js +5 -5
  5. package/dist/cli/commands/export.d.ts +4 -4
  6. package/dist/cli/commands/export.js +4 -4
  7. package/dist/cli/commands/init-personas.js +11 -11
  8. package/dist/cli/commands/init.js +5 -5
  9. package/dist/cli/commands/market.js +6 -6
  10. package/dist/cli/commands/openapi.d.ts +3 -3
  11. package/dist/cli/commands/openapi.js +3 -3
  12. package/dist/cli/commands/run.d.ts +5 -5
  13. package/dist/cli/commands/run.js +5 -5
  14. package/dist/cli/commands/serve.d.ts +5 -5
  15. package/dist/cli/commands/serve.js +5 -5
  16. package/dist/cli/commands/templates.js +2 -2
  17. package/dist/cli/flow-weaver.mjs +61 -61
  18. package/dist/cli/index.js +10 -10
  19. package/dist/cli/templates/workflows/aggregator.js +1 -1
  20. package/dist/cli/templates/workflows/ai-agent.js +1 -1
  21. package/dist/cli/templates/workflows/ai-chat.js +1 -1
  22. package/dist/cli/templates/workflows/ai-rag.js +1 -1
  23. package/dist/cli/templates/workflows/ai-react.js +1 -1
  24. package/dist/cli/templates/workflows/conditional.js +1 -1
  25. package/dist/cli/templates/workflows/error-handler.js +1 -1
  26. package/dist/cli/templates/workflows/foreach.js +1 -1
  27. package/dist/cli/templates/workflows/sequential.js +2 -2
  28. package/dist/cli/templates/workflows/webhook.js +1 -1
  29. package/dist/doc-metadata/extractors/cli-commands.js +24 -24
  30. package/dist/doc-metadata/types.d.ts +1 -1
  31. package/dist/generated-version.d.ts +1 -1
  32. package/dist/generated-version.js +1 -1
  33. package/dist/marketplace/registry.d.ts +1 -1
  34. package/dist/marketplace/registry.js +2 -2
  35. package/dist/marketplace/validator.js +2 -2
  36. package/dist/mcp/server.js +1 -1
  37. package/docs/reference/advanced-annotations.md +4 -4
  38. package/docs/reference/built-in-nodes.md +2 -2
  39. package/docs/reference/cli-reference.md +142 -140
  40. package/docs/reference/compilation.md +12 -12
  41. package/docs/reference/concepts.md +29 -29
  42. package/docs/reference/debugging.md +34 -34
  43. package/docs/reference/deployment.md +27 -27
  44. package/docs/reference/export-interface.md +1 -1
  45. package/docs/reference/iterative-development.md +6 -6
  46. package/docs/reference/marketplace.md +20 -20
  47. package/docs/reference/node-conversion.md +1 -1
  48. package/docs/reference/patterns.md +7 -7
  49. package/docs/reference/scaffold.md +22 -22
  50. package/docs/reference/tutorial.md +29 -29
  51. package/package.json +3 -2
@@ -13,7 +13,7 @@ export const CLI_COMMANDS = [
13
13
  // ── Core commands ──────────────────────────────────────────────
14
14
  {
15
15
  name: 'compile',
16
- syntax: 'flow-weaver compile <file> [options]',
16
+ syntax: 'fw compile <file> [options]',
17
17
  description: 'Compile workflow source file',
18
18
  botCompatible: true,
19
19
  options: [
@@ -29,7 +29,7 @@ export const CLI_COMMANDS = [
29
29
  },
30
30
  {
31
31
  name: 'validate',
32
- syntax: 'flow-weaver validate <file> [options]',
32
+ syntax: 'fw validate <file> [options]',
33
33
  description: 'Validate workflow without compiling',
34
34
  botCompatible: true,
35
35
  options: [
@@ -42,7 +42,7 @@ export const CLI_COMMANDS = [
42
42
  },
43
43
  {
44
44
  name: 'describe',
45
- syntax: 'flow-weaver describe <file> [options]',
45
+ syntax: 'fw describe <file> [options]',
46
46
  description: 'Output workflow structure in LLM-friendly formats (JSON, text, mermaid)',
47
47
  botCompatible: true,
48
48
  options: [
@@ -54,7 +54,7 @@ export const CLI_COMMANDS = [
54
54
  },
55
55
  {
56
56
  name: 'run',
57
- syntax: 'flow-weaver run <file> [options]',
57
+ syntax: 'fw run <file> [options]',
58
58
  description: 'Execute a workflow file directly',
59
59
  botCompatible: true,
60
60
  options: [
@@ -69,7 +69,7 @@ export const CLI_COMMANDS = [
69
69
  },
70
70
  {
71
71
  name: 'serve',
72
- syntax: 'flow-weaver serve [directory] [options]',
72
+ syntax: 'fw serve [directory] [options]',
73
73
  description: 'Start HTTP server exposing workflows as endpoints',
74
74
  options: [
75
75
  { flags: '-p, --port', arg: '<port>', description: 'Server port', defaultValue: '3000' },
@@ -84,7 +84,7 @@ export const CLI_COMMANDS = [
84
84
  // ── Create subcommands ─────────────────────────────────────────
85
85
  {
86
86
  name: 'create workflow',
87
- syntax: 'flow-weaver create workflow <template> <file> [options]',
87
+ syntax: 'fw create workflow <template> <file> [options]',
88
88
  description: 'Create new workflow from template',
89
89
  botCompatible: true,
90
90
  group: 'create',
@@ -106,7 +106,7 @@ export const CLI_COMMANDS = [
106
106
  },
107
107
  {
108
108
  name: 'create node',
109
- syntax: 'flow-weaver create node <name> <file> [options]',
109
+ syntax: 'fw create node <name> <file> [options]',
110
110
  description: 'Create a node type from template',
111
111
  botCompatible: true,
112
112
  group: 'create',
@@ -119,7 +119,7 @@ export const CLI_COMMANDS = [
119
119
  // ── Templates (generated from registries) ──────────────────────
120
120
  {
121
121
  name: 'templates',
122
- syntax: 'flow-weaver templates [--json]',
122
+ syntax: 'fw templates [--json]',
123
123
  description: `List available workflow templates (${workflowTemplates.length} total)`,
124
124
  botCompatible: true,
125
125
  listStyle: 'definition',
@@ -130,7 +130,7 @@ export const CLI_COMMANDS = [
130
130
  },
131
131
  {
132
132
  name: 'Node Templates',
133
- syntax: 'flow-weaver create node <name> <file> --template <type>',
133
+ syntax: 'fw create node <name> <file> --template <type>',
134
134
  description: `Create node types from templates (${nodeTemplates.length} total)`,
135
135
  listStyle: 'definition',
136
136
  options: [],
@@ -139,7 +139,7 @@ export const CLI_COMMANDS = [
139
139
  // ── Pattern subcommands ────────────────────────────────────────
140
140
  {
141
141
  name: 'pattern list',
142
- syntax: 'flow-weaver pattern list <path> [--json]',
142
+ syntax: 'fw pattern list <path> [--json]',
143
143
  description: 'List patterns in file or directory',
144
144
  botCompatible: true,
145
145
  group: 'pattern',
@@ -149,7 +149,7 @@ export const CLI_COMMANDS = [
149
149
  },
150
150
  {
151
151
  name: 'pattern apply',
152
- syntax: 'flow-weaver pattern apply <pattern-file> <target-file> [options]',
152
+ syntax: 'fw pattern apply <pattern-file> <target-file> [options]',
153
153
  description: 'Apply a pattern to a workflow file',
154
154
  botCompatible: true,
155
155
  group: 'pattern',
@@ -161,7 +161,7 @@ export const CLI_COMMANDS = [
161
161
  },
162
162
  {
163
163
  name: 'pattern extract',
164
- syntax: 'flow-weaver pattern extract <source-file> --nodes <ids> -o <file> [options]',
164
+ syntax: 'fw pattern extract <source-file> --nodes <ids> -o <file> [options]',
165
165
  description: 'Extract nodes as reusable pattern',
166
166
  botCompatible: true,
167
167
  group: 'pattern',
@@ -175,7 +175,7 @@ export const CLI_COMMANDS = [
175
175
  // ── Project & dev commands ─────────────────────────────────────
176
176
  {
177
177
  name: 'init',
178
- syntax: 'flow-weaver init [directory] [options]',
178
+ syntax: 'fw init [directory] [options]',
179
179
  description: 'Create a new flow-weaver project with templates and config',
180
180
  options: [
181
181
  { flags: '-n, --name', arg: '<name>', description: 'Project name (defaults to directory name)' },
@@ -190,7 +190,7 @@ export const CLI_COMMANDS = [
190
190
  },
191
191
  {
192
192
  name: 'watch',
193
- syntax: 'flow-weaver watch <file> [options]',
193
+ syntax: 'fw watch <file> [options]',
194
194
  description: 'Watch workflow files and recompile on changes',
195
195
  options: [
196
196
  { flags: '-o, --output', arg: '<path>', description: 'Output file or directory' },
@@ -203,7 +203,7 @@ export const CLI_COMMANDS = [
203
203
  },
204
204
  {
205
205
  name: 'doctor',
206
- syntax: 'flow-weaver doctor [--json]',
206
+ syntax: 'fw doctor [--json]',
207
207
  description: 'Check project environment and configuration. Validates Node.js version, TypeScript, package installation, and tsconfig.json settings.',
208
208
  botCompatible: true,
209
209
  options: [
@@ -213,7 +213,7 @@ export const CLI_COMMANDS = [
213
213
  // ── Context ─────────────────────────────────────────────────────
214
214
  {
215
215
  name: 'context',
216
- syntax: 'flow-weaver context [preset] [options]',
216
+ syntax: 'fw context [preset] [options]',
217
217
  description: 'Generate LLM context bundle from documentation and grammar',
218
218
  botCompatible: true,
219
219
  options: [
@@ -236,7 +236,7 @@ export const CLI_COMMANDS = [
236
236
  // ── Export & generation ────────────────────────────────────────
237
237
  {
238
238
  name: 'export',
239
- syntax: 'flow-weaver export <file> -t <target> -o <path> [options]',
239
+ syntax: 'fw export <file> -t <target> -o <path> [options]',
240
240
  description: 'Export workflow as serverless function',
241
241
  botCompatible: true,
242
242
  options: [
@@ -252,7 +252,7 @@ export const CLI_COMMANDS = [
252
252
  },
253
253
  {
254
254
  name: 'diff',
255
- syntax: 'flow-weaver diff <file1> <file2> [options]',
255
+ syntax: 'fw diff <file1> <file2> [options]',
256
256
  description: 'Semantic diff between two workflow files',
257
257
  botCompatible: true,
258
258
  options: [
@@ -263,7 +263,7 @@ export const CLI_COMMANDS = [
263
263
  },
264
264
  {
265
265
  name: 'openapi',
266
- syntax: 'flow-weaver openapi <directory> [options]',
266
+ syntax: 'fw openapi <directory> [options]',
267
267
  description: 'Generate OpenAPI specification from workflows',
268
268
  options: [
269
269
  { flags: '-o, --output', arg: '<path>', description: 'Output file path' },
@@ -276,7 +276,7 @@ export const CLI_COMMANDS = [
276
276
  },
277
277
  {
278
278
  name: 'grammar',
279
- syntax: 'flow-weaver grammar [options]',
279
+ syntax: 'fw grammar [options]',
280
280
  description: 'Output JSDoc annotation grammar specification',
281
281
  options: [
282
282
  { flags: '-f, --format', arg: 'html|ebnf', description: 'Output format', defaultValue: 'html' },
@@ -286,7 +286,7 @@ export const CLI_COMMANDS = [
286
286
  // ── Integration commands ───────────────────────────────────────
287
287
  {
288
288
  name: 'mcp-server',
289
- syntax: 'flow-weaver mcp-server [options]',
289
+ syntax: 'fw mcp-server [options]',
290
290
  description: 'Start MCP server for Claude Code integration',
291
291
  options: [
292
292
  { flags: '--stdio', description: 'Run in MCP stdio mode (skip interactive registration)' },
@@ -295,7 +295,7 @@ export const CLI_COMMANDS = [
295
295
  // ── Plugin subcommands ─────────────────────────────────────────
296
296
  {
297
297
  name: 'plugin init',
298
- syntax: 'flow-weaver plugin init <name> [options]',
298
+ syntax: 'fw plugin init <name> [options]',
299
299
  description: 'Scaffold a new external plugin',
300
300
  group: 'plugin',
301
301
  options: [
@@ -308,7 +308,7 @@ export const CLI_COMMANDS = [
308
308
  // ── Migration & changelog ──────────────────────────────────────
309
309
  {
310
310
  name: 'migrate',
311
- syntax: 'flow-weaver migrate <glob> [options]',
311
+ syntax: 'fw migrate <glob> [options]',
312
312
  description: 'Migrate workflow files to current syntax via parse → regenerate round-trip',
313
313
  botCompatible: true,
314
314
  options: [
@@ -318,7 +318,7 @@ export const CLI_COMMANDS = [
318
318
  },
319
319
  {
320
320
  name: 'changelog',
321
- syntax: 'flow-weaver changelog [options]',
321
+ syntax: 'fw changelog [options]',
322
322
  description: 'Generate changelog from git history, categorized by file path',
323
323
  options: [
324
324
  { flags: '--last-tag', description: 'From last git tag to HEAD', exclusive: 'range' },
@@ -105,7 +105,7 @@ export interface TCliOptionDoc {
105
105
  export interface TCliCommandDoc {
106
106
  /** Command name, e.g. "compile", "create workflow", "ui focus-node" */
107
107
  name: string;
108
- /** Full syntax string, e.g. "flow-weaver compile <input> [options]" */
108
+ /** Full syntax string, e.g. "fw compile <input> [options]" */
109
109
  syntax: string;
110
110
  /** Human-readable description */
111
111
  description: string;
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.21.7";
1
+ export declare const VERSION = "0.21.11";
2
2
  //# sourceMappingURL=generated-version.d.ts.map
@@ -1,3 +1,3 @@
1
1
  // Auto-generated by scripts/generate-version.ts — do not edit manually
2
- export const VERSION = '0.21.7';
2
+ export const VERSION = '0.21.11';
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -2,7 +2,7 @@
2
2
  * Registry integration — npm search API + local package scanning.
3
3
  *
4
4
  * Uses the npm registry search endpoint filtered by the
5
- * `flowweaver-marketplace-pack` keyword for discovery, and scans
5
+ * `flow-weaver-marketplace-pack` keyword for discovery, and scans
6
6
  * `node_modules/` for locally installed packages.
7
7
  */
8
8
  import type { TMarketplaceManifest, TMarketplacePackageInfo, TInstalledPackage, TManifestTagHandler, TManifestValidationRuleSet, TManifestDocTopic, TManifestInitContribution } from './types.js';
@@ -2,13 +2,13 @@
2
2
  * Registry integration — npm search API + local package scanning.
3
3
  *
4
4
  * Uses the npm registry search endpoint filtered by the
5
- * `flowweaver-marketplace-pack` keyword for discovery, and scans
5
+ * `flow-weaver-marketplace-pack` keyword for discovery, and scans
6
6
  * `node_modules/` for locally installed packages.
7
7
  */
8
8
  import * as fs from 'fs';
9
9
  import * as path from 'path';
10
10
  import { glob } from 'glob';
11
- const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
11
+ const MARKETPLACE_KEYWORD = 'flow-weaver-marketplace-pack';
12
12
  const NPM_SEARCH_URL = 'https://registry.npmjs.org/-/v1/search';
13
13
  const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
14
14
  /**
@@ -10,7 +10,7 @@ function issue(code, severity, message) {
10
10
  return { code, severity, message };
11
11
  }
12
12
  const PACK_NAME_RE = /^(@[^/]+\/)?flow-weaver-pack-.+$/;
13
- const MARKETPLACE_KEYWORD = 'flowweaver-marketplace-pack';
13
+ const MARKETPLACE_KEYWORD = 'flow-weaver-marketplace-pack';
14
14
  // ── Package-level rules ──────────────────────────────────────────────────────
15
15
  function validatePackageJson(pkg, directory) {
16
16
  const issues = [];
@@ -19,7 +19,7 @@ function validatePackageJson(pkg, directory) {
19
19
  if (!name || !PACK_NAME_RE.test(name)) {
20
20
  issues.push(issue('PKG-005', 'error', `Package name must match "flow-weaver-pack-*" or "@<scope>/flow-weaver-pack-*", got "${name ?? ''}"`));
21
21
  }
22
- // PKG-001: keywords must include flowweaver-marketplace-pack
22
+ // PKG-001: keywords must include flow-weaver-marketplace-pack
23
23
  const keywords = (pkg.keywords ?? []);
24
24
  if (!keywords.includes(MARKETPLACE_KEYWORD)) {
25
25
  issues.push(issue('PKG-001', 'error', `"keywords" must include "${MARKETPLACE_KEYWORD}"`));
@@ -46,7 +46,7 @@ export async function mcpServerCommand(options) {
46
46
  ? (msg) => process.stderr.write(msg + '\n')
47
47
  : (msg) => process.stdout.write(msg + '\n');
48
48
  if (!options.stdio) {
49
- log('Tip: run "flow-weaver mcp-setup" to register with your AI tools.');
49
+ log('Tip: run "fw mcp-setup" to register with your AI tools.');
50
50
  log('Starting MCP server...');
51
51
  }
52
52
  await startMcpServer(options);
@@ -469,10 +469,10 @@ export function enrichPipeline(params: { data: string }) { ... }
469
469
  Most CLI commands accept `--workflow-name` or `-w` to target a specific workflow:
470
470
 
471
471
  ```bash
472
- flow-weaver compile multi.ts --workflow-name validatePipeline
473
- flow-weaver validate multi.ts -w enrichPipeline
474
- flow-weaver run multi.ts -w validatePipeline --params '{"data": "test"}'
475
- flow-weaver describe multi.ts --workflow-name enrichPipeline
472
+ fw compile multi.ts --workflow-name validatePipeline
473
+ fw validate multi.ts -w enrichPipeline
474
+ fw run multi.ts -w validatePipeline --params '{"data": "test"}'
475
+ fw describe multi.ts --workflow-name enrichPipeline
476
476
  ```
477
477
 
478
478
  Without this flag, all workflows in the file are processed.
@@ -139,13 +139,13 @@ interface FwMockConfig {
139
139
  Pass mock config directly:
140
140
 
141
141
  ```bash
142
- flow-weaver run workflow.ts --mocks '{"fast": true, "events": {"app/approved": {"status": "ok"}}}'
142
+ fw run workflow.ts --mocks '{"fast": true, "events": {"app/approved": {"status": "ok"}}}'
143
143
  ```
144
144
 
145
145
  Or from a file:
146
146
 
147
147
  ```bash
148
- flow-weaver run workflow.ts --mocks-file mocks.json
148
+ fw run workflow.ts --mocks-file mocks.json
149
149
  ```
150
150
 
151
151
  **mocks.json:**