@synergenius/flow-weaver 0.21.10 → 0.21.12

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 (50) 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 +5 -5
  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 +65 -63
  18. package/dist/cli/index.js +10 -10
  19. package/dist/cli/pack-commands.js +2 -1
  20. package/dist/cli/templates/workflows/aggregator.js +1 -1
  21. package/dist/cli/templates/workflows/ai-agent.js +1 -1
  22. package/dist/cli/templates/workflows/ai-chat.js +1 -1
  23. package/dist/cli/templates/workflows/ai-rag.js +1 -1
  24. package/dist/cli/templates/workflows/ai-react.js +1 -1
  25. package/dist/cli/templates/workflows/conditional.js +1 -1
  26. package/dist/cli/templates/workflows/error-handler.js +1 -1
  27. package/dist/cli/templates/workflows/foreach.js +1 -1
  28. package/dist/cli/templates/workflows/sequential.js +2 -2
  29. package/dist/cli/templates/workflows/webhook.js +1 -1
  30. package/dist/doc-metadata/extractors/cli-commands.js +24 -24
  31. package/dist/doc-metadata/types.d.ts +1 -1
  32. package/dist/generated-version.d.ts +1 -1
  33. package/dist/generated-version.js +1 -1
  34. package/dist/mcp/server.js +1 -1
  35. package/dist/mcp/workflow-executor.js +2 -1
  36. package/docs/reference/advanced-annotations.md +4 -4
  37. package/docs/reference/built-in-nodes.md +2 -2
  38. package/docs/reference/cli-reference.md +142 -140
  39. package/docs/reference/compilation.md +12 -12
  40. package/docs/reference/concepts.md +29 -29
  41. package/docs/reference/debugging.md +34 -34
  42. package/docs/reference/deployment.md +27 -27
  43. package/docs/reference/export-interface.md +1 -1
  44. package/docs/reference/iterative-development.md +6 -6
  45. package/docs/reference/marketplace.md +18 -18
  46. package/docs/reference/node-conversion.md +1 -1
  47. package/docs/reference/patterns.md +7 -7
  48. package/docs/reference/scaffold.md +22 -22
  49. package/docs/reference/tutorial.md +29 -29
  50. package/package.json +3 -2
@@ -9671,7 +9671,7 @@ var VERSION;
9671
9671
  var init_generated_version = __esm({
9672
9672
  "src/generated-version.ts"() {
9673
9673
  "use strict";
9674
- VERSION = "0.21.10";
9674
+ VERSION = "0.21.12";
9675
9675
  }
9676
9676
  });
9677
9677
 
@@ -35559,12 +35559,12 @@ var init_parser2 = __esm({
35559
35559
  if (this.loadedPackDirs.has(projectDir)) return;
35560
35560
  this.loadedPackDirs.add(projectDir);
35561
35561
  const { discoverTagHandlers: discoverTagHandlers2, discoverValidationRuleSets: discoverValidationRuleSets2 } = await Promise.resolve().then(() => (init_registry(), registry_exports));
35562
- const { pathToFileURL: pathToFileURL4 } = await import("node:url");
35562
+ const { pathToFileURL: pathToFileURL5 } = await import("node:url");
35563
35563
  const handlers = await discoverTagHandlers2(projectDir);
35564
35564
  for (const discovered of handlers) {
35565
35565
  if (discovered.tags.every((t) => this.tagRegistry.has(t))) continue;
35566
35566
  try {
35567
- const mod = await import(pathToFileURL4(discovered.absoluteFile).href);
35567
+ const mod = await import(pathToFileURL5(discovered.absoluteFile).href);
35568
35568
  const handlerFn = discovered.exportName ? mod[discovered.exportName] : mod.default;
35569
35569
  if (typeof handlerFn === "function") {
35570
35570
  this.tagRegistry.register(
@@ -35581,7 +35581,7 @@ var init_parser2 = __esm({
35581
35581
  const ruleSets = await discoverValidationRuleSets2(projectDir);
35582
35582
  for (const ruleSet of ruleSets) {
35583
35583
  try {
35584
- const mod = await import(pathToFileURL4(ruleSet.absoluteFile).href);
35584
+ const mod = await import(pathToFileURL5(ruleSet.absoluteFile).href);
35585
35585
  const detectFn = mod[ruleSet.detectExport ?? "detect"];
35586
35586
  const getRulesFn = mod[ruleSet.rulesExport ?? "getRules"];
35587
35587
  if (typeof detectFn === "function" && typeof getRulesFn === "function") {
@@ -46252,7 +46252,7 @@ export ${asyncKeyword}function ${workflowName}(
46252
46252
  execute: boolean,
46253
46253
  params: { data: any }
46254
46254
  ): ${returnType} {
46255
- throw new Error("Compile with: flow-weaver compile <file>");
46255
+ throw new Error("Compile with: fw compile <file>");
46256
46256
  }
46257
46257
  `.trim();
46258
46258
  }
@@ -46310,7 +46310,7 @@ export ${asyncKeyword}function ${workflowName}(
46310
46310
  execute: boolean,
46311
46311
  params: { ${inputPort}: any }
46312
46312
  ): ${returnType} {
46313
- throw new Error("Compile with: flow-weaver compile <file>");
46313
+ throw new Error("Compile with: fw compile <file>");
46314
46314
  }`.trim();
46315
46315
  }
46316
46316
  var configSchema, sequentialTemplate;
@@ -46511,7 +46511,7 @@ export ${asyncKeyword}function ${workflowName}(
46511
46511
  execute: boolean,
46512
46512
  params: { items: any[] }
46513
46513
  ): ${returnType} {
46514
- throw new Error("Compile with: flow-weaver compile <file>");
46514
+ throw new Error("Compile with: fw compile <file>");
46515
46515
  }
46516
46516
  `.trim();
46517
46517
  }
@@ -46646,7 +46646,7 @@ export ${asyncKeyword}function ${workflowName}(
46646
46646
  execute: boolean,
46647
46647
  params: { data: any }
46648
46648
  ): ${returnType} {
46649
- throw new Error("Compile with: flow-weaver compile <file>");
46649
+ throw new Error("Compile with: fw compile <file>");
46650
46650
  }
46651
46651
  `.trim();
46652
46652
  }
@@ -47322,7 +47322,7 @@ export async function ${workflowName}(
47322
47322
  onFailure: boolean;
47323
47323
  response: string;
47324
47324
  }> {
47325
- throw new Error('Compile with: flow-weaver compile <file>');
47325
+ throw new Error('Compile with: fw compile <file>');
47326
47326
  }
47327
47327
  `.trim();
47328
47328
  }
@@ -47622,7 +47622,7 @@ export async function ${workflowName}(
47622
47622
  onFailure: boolean;
47623
47623
  answer: string;
47624
47624
  }> {
47625
- throw new Error('Compile with: flow-weaver compile <file>');
47625
+ throw new Error('Compile with: fw compile <file>');
47626
47626
  }
47627
47627
  `.trim();
47628
47628
  }
@@ -47810,7 +47810,7 @@ export async function ${workflowName}(
47810
47810
  answer: string;
47811
47811
  sourcesUsed: number;
47812
47812
  }> {
47813
- throw new Error('Compile with: flow-weaver compile <file>');
47813
+ throw new Error('Compile with: fw compile <file>');
47814
47814
  }
47815
47815
  `.trim();
47816
47816
  }
@@ -47981,7 +47981,7 @@ export async function ${workflowName}(
47981
47981
  onFailure: boolean;
47982
47982
  response: string;
47983
47983
  }> {
47984
- throw new Error('Compile with: flow-weaver compile <file>');
47984
+ throw new Error('Compile with: fw compile <file>');
47985
47985
  }
47986
47986
  `.trim();
47987
47987
  }
@@ -48083,7 +48083,7 @@ export ${asyncKeyword}function ${workflowName}(
48083
48083
  execute: boolean,
48084
48084
  params: { query: any }
48085
48085
  ): ${returnType} {
48086
- throw new Error("Compile with: flow-weaver compile <file>");
48086
+ throw new Error("Compile with: fw compile <file>");
48087
48087
  }
48088
48088
  `.trim();
48089
48089
  }
@@ -48242,7 +48242,7 @@ export ${asyncKeyword}function ${workflowName}(
48242
48242
  execute: boolean,
48243
48243
  params: { headers: Record<string, string>; body: any }
48244
48244
  ): ${returnType} {
48245
- throw new Error("Compile with: flow-weaver compile <file>");
48245
+ throw new Error("Compile with: fw compile <file>");
48246
48246
  }
48247
48247
  `.trim();
48248
48248
  }
@@ -48388,7 +48388,7 @@ export ${asyncKeyword}function ${workflowName}(
48388
48388
  execute: boolean,
48389
48389
  params: { data: any; maxRetries?: number }
48390
48390
  ): ${returnType} {
48391
- throw new Error("Compile with: flow-weaver compile <file>");
48391
+ throw new Error("Compile with: fw compile <file>");
48392
48392
  }
48393
48393
  `.trim();
48394
48394
  }
@@ -60846,9 +60846,9 @@ function generateReadme(projectName, persona, _template) {
60846
60846
  "Browse and add more workflows:",
60847
60847
  "",
60848
60848
  "```sh",
60849
- "flow-weaver templates # List all templates",
60850
- "flow-weaver create workflow <template> <file> # Add a workflow",
60851
- "flow-weaver describe src/*.ts --format ascii # See workflow structure",
60849
+ "fw templates # List all templates",
60850
+ "fw create workflow <template> <file> # Add a workflow",
60851
+ "fw describe src/*.ts --format ascii # See workflow structure",
60852
60852
  "```",
60853
60853
  ""
60854
60854
  );
@@ -60869,8 +60869,8 @@ function generateReadme(projectName, persona, _template) {
60869
60869
  lines.push(
60870
60870
  "## Learn more",
60871
60871
  "",
60872
- "- `flow-weaver docs` to browse reference documentation",
60873
- "- `flow-weaver mcp-setup` to connect AI editors",
60872
+ "- `fw docs` to browse reference documentation",
60873
+ "- `fw mcp-setup` to connect AI editors",
60874
60874
  ""
60875
60875
  );
60876
60876
  return lines.join("\n");
@@ -60923,7 +60923,7 @@ export function ${fnName}(
60923
60923
  execute: boolean,
60924
60924
  params: { name: string }
60925
60925
  ): { onSuccess: boolean; onFailure: boolean; result: string } {
60926
- throw new Error("Compile with: flow-weaver compile <file>");
60926
+ throw new Error("Compile with: fw compile <file>");
60927
60927
  }
60928
60928
  `;
60929
60929
  }
@@ -60987,9 +60987,9 @@ function printNocodeGuidance(_projectName) {
60987
60987
  logger.newline();
60988
60988
  logger.log(` ${logger.bold("Useful commands")}`);
60989
60989
  logger.newline();
60990
- logger.log(` flow-weaver run src/*.ts ${logger.dim("Run your workflow")}`);
60991
- logger.log(` flow-weaver diagram src/*.ts ${logger.dim("See a visual diagram")}`);
60992
- logger.log(` flow-weaver mcp-setup ${logger.dim("Connect more AI editors")}`);
60990
+ logger.log(` fw run src/*.ts ${logger.dim("Run your workflow")}`);
60991
+ logger.log(` fw diagram src/*.ts ${logger.dim("See a visual diagram")}`);
60992
+ logger.log(` fw mcp-setup ${logger.dim("Connect more AI editors")}`);
60993
60993
  }
60994
60994
  function printVibecoderGuidance() {
60995
60995
  logger.newline();
@@ -61007,17 +61007,17 @@ function printLowcodeGuidance() {
61007
61007
  logger.newline();
61008
61008
  logger.log(` ${logger.bold("Explore and customize")}`);
61009
61009
  logger.newline();
61010
- logger.log(` flow-weaver templates ${logger.dim("List all 16 workflow templates")}`);
61011
- logger.log(` flow-weaver describe src/*.ts ${logger.dim("See the workflow structure")}`);
61012
- logger.log(` flow-weaver docs annotations ${logger.dim("Annotation reference")}`);
61010
+ logger.log(` fw templates ${logger.dim("List all 16 workflow templates")}`);
61011
+ logger.log(` fw describe src/*.ts ${logger.dim("See the workflow structure")}`);
61012
+ logger.log(` fw docs annotations ${logger.dim("Annotation reference")}`);
61013
61013
  logger.newline();
61014
61014
  logger.log(` Your project includes an example in ${logger.highlight("examples/")} to study.`);
61015
61015
  logger.log(` With MCP connected, AI can help modify nodes and connections.`);
61016
61016
  }
61017
61017
  function printExpertGuidance() {
61018
61018
  logger.newline();
61019
- logger.log(` flow-weaver mcp-setup ${logger.dim("Connect AI editors (Claude, Cursor, VS Code)")}`);
61020
- logger.log(` flow-weaver docs ${logger.dim("Browse reference docs")}`);
61019
+ logger.log(` fw mcp-setup ${logger.dim("Connect AI editors (Claude, Cursor, VS Code)")}`);
61020
+ logger.log(` fw docs ${logger.dim("Browse reference docs")}`);
61021
61021
  }
61022
61022
  function pad(displayName, width) {
61023
61023
  const padding = Math.max(1, width - displayName.length);
@@ -61288,7 +61288,8 @@ async function executeWorkflowFromFile(filePath, params, options) {
61288
61288
  );
61289
61289
  if (fs20.existsSync(distEquivalent)) {
61290
61290
  const relative9 = path21.relative(srcDir, distEquivalent);
61291
- const normalized = relative9.startsWith(".") ? relative9 : `./${relative9}`;
61291
+ const posixRelative = relative9.replace(/\\/g, "/");
61292
+ const normalized = posixRelative.startsWith(".") ? posixRelative : `./${posixRelative}`;
61292
61293
  return `from '${normalized}'`;
61293
61294
  }
61294
61295
  }
@@ -70360,6 +70361,7 @@ __export(pack_commands_exports, {
70360
70361
  registerPackCommands: () => registerPackCommands
70361
70362
  });
70362
70363
  import * as path49 from "path";
70364
+ import { pathToFileURL as pathToFileURL4 } from "node:url";
70363
70365
  function compareVersions2(a, b) {
70364
70366
  const pa = a.split(".").map(Number);
70365
70367
  const pb = b.split(".").map(Number);
@@ -70419,7 +70421,7 @@ async function registerPackCommands(program3) {
70419
70421
  sub.allowUnknownOption(true);
70420
70422
  sub.action(async (...actionArgs) => {
70421
70423
  try {
70422
- const bridge = await import(entrypointPath);
70424
+ const bridge = await import(pathToFileURL4(entrypointPath).href);
70423
70425
  const rawArgs = sub.args ?? [];
70424
70426
  await bridge.handleCommand(cmd.name, rawArgs);
70425
70427
  } catch (err) {
@@ -72100,7 +72102,7 @@ async function createWorkflowCommand(template, file, options = {}) {
72100
72102
  const templateDef = getWorkflowTemplate(template);
72101
72103
  if (!templateDef) {
72102
72104
  logger.error(`Unknown workflow template: ${template}`);
72103
- logger.info("Run 'flow-weaver templates' to see available templates");
72105
+ logger.info("Run 'fw templates' to see available templates");
72104
72106
  process.exit(1);
72105
72107
  }
72106
72108
  const filePath = path11.resolve(file);
@@ -72146,7 +72148,7 @@ async function createNodeCommand(name, file, options = {}) {
72146
72148
  const templateDef = getNodeTemplate(template);
72147
72149
  if (!templateDef) {
72148
72150
  logger.error(`Unknown node template: ${template}`);
72149
- logger.info("Run 'flow-weaver templates' to see available templates");
72151
+ logger.info("Run 'fw templates' to see available templates");
72150
72152
  process.exit(1);
72151
72153
  }
72152
72154
  const filePath = path11.resolve(file);
@@ -72487,8 +72489,8 @@ async function templatesCommand(options = {}) {
72487
72489
  }
72488
72490
  logger.newline();
72489
72491
  logger.section("Usage");
72490
- logger.log(" $ flow-weaver create workflow <template> <file> [--async] [--line N]");
72491
- logger.log(" $ flow-weaver create node <name> <file> [-t <template>] [--line N]");
72492
+ logger.log(" $ fw create workflow <template> <file> [--async] [--line N]");
72493
+ logger.log(" $ fw create node <name> <file> [-t <template>] [--line N]");
72492
72494
  logger.newline();
72493
72495
  }
72494
72496
 
@@ -76365,14 +76367,14 @@ function generateProjectFiles(projectName, template, format = "esm", persona = "
76365
76367
  }
76366
76368
  const workflowCode = tmpl.generate({ workflowName });
76367
76369
  const scripts = {
76368
- dev: `npx flow-weaver compile src/${workflowFile} -o src && npx tsx src/main.ts`,
76370
+ dev: `npx fw compile src/${workflowFile} -o src && npx tsx src/main.ts`,
76369
76371
  start: "npx tsx src/main.ts",
76370
- compile: `npx flow-weaver compile src/${workflowFile} -o src`,
76371
- validate: `npx flow-weaver validate src/${workflowFile}`,
76372
- doctor: "npx flow-weaver doctor"
76372
+ compile: `npx fw compile src/${workflowFile} -o src`,
76373
+ validate: `npx fw validate src/${workflowFile}`,
76374
+ doctor: "npx fw doctor"
76373
76375
  };
76374
76376
  if (persona !== "expert") {
76375
- scripts.diagram = `npx flow-weaver diagram src/${workflowFile} --format ascii-compact`;
76377
+ scripts.diagram = `npx fw diagram src/${workflowFile} --format ascii-compact`;
76376
76378
  }
76377
76379
  const packageJsonContent = {
76378
76380
  name: projectName,
@@ -90415,7 +90417,7 @@ async function startMcpServer(options) {
90415
90417
  async function mcpServerCommand(options) {
90416
90418
  const log = options.stdio ? (msg) => process.stderr.write(msg + "\n") : (msg) => process.stdout.write(msg + "\n");
90417
90419
  if (!options.stdio) {
90418
- log('Tip: run "flow-weaver mcp-setup" to register with your AI tools.');
90420
+ log('Tip: run "fw mcp-setup" to register with your AI tools.');
90419
90421
  log("Starting MCP server...");
90420
90422
  }
90421
90423
  await startMcpServer(options);
@@ -92357,15 +92359,15 @@ async function docsListCommand(options) {
92357
92359
  logger.log(` ${topic.slug.padEnd(maxSlug + 2)} ${topic.description}`);
92358
92360
  }
92359
92361
  logger.newline();
92360
- logger.log(" Usage: flow-weaver docs <topic>");
92361
- logger.log(" Search: flow-weaver docs search <query>");
92362
+ logger.log(" Usage: fw docs <topic>");
92363
+ logger.log(" Search: fw docs search <query>");
92362
92364
  logger.newline();
92363
92365
  }
92364
92366
  async function docsReadCommand(topic, options) {
92365
92367
  if (options.json) {
92366
92368
  const structured = readTopicStructured(topic);
92367
92369
  if (!structured) {
92368
- logger.error(`Unknown topic: "${topic}". Run "flow-weaver docs" to see available topics.`);
92370
+ logger.error(`Unknown topic: "${topic}". Run "fw docs" to see available topics.`);
92369
92371
  process.exit(1);
92370
92372
  }
92371
92373
  process.stdout.write(JSON.stringify(structured, null, 2) + "\n");
@@ -92373,7 +92375,7 @@ async function docsReadCommand(topic, options) {
92373
92375
  }
92374
92376
  const doc = readTopic(topic, options.compact);
92375
92377
  if (!doc) {
92376
- logger.error(`Unknown topic: "${topic}". Run "flow-weaver docs" to see available topics.`);
92378
+ logger.error(`Unknown topic: "${topic}". Run "fw docs" to see available topics.`);
92377
92379
  process.exit(1);
92378
92380
  }
92379
92381
  process.stdout.write(doc.content + "\n");
@@ -92408,7 +92410,7 @@ async function docsSearchCommand(query, options) {
92408
92410
  if (shown >= 15) break;
92409
92411
  }
92410
92412
  logger.log(` ${results.length} matching section(s) across ${new Set(results.map((r) => r.slug)).size} topic(s).`);
92411
- logger.log(" Read a topic: flow-weaver docs <topic>");
92413
+ logger.log(" Read a topic: fw docs <topic>");
92412
92414
  logger.newline();
92413
92415
  }
92414
92416
 
@@ -92426,7 +92428,7 @@ async function contextCommand(preset, options) {
92426
92428
  logger.log(` ${name.padEnd(maxName + 2)} ${topics.join(", ")}`);
92427
92429
  }
92428
92430
  logger.newline();
92429
- logger.log(" Usage: flow-weaver context [preset] [options]");
92431
+ logger.log(" Usage: fw context [preset] [options]");
92430
92432
  logger.newline();
92431
92433
  return;
92432
92434
  }
@@ -92456,7 +92458,7 @@ async function contextCommand(preset, options) {
92456
92458
  process.stdout.write(result.content);
92457
92459
  }
92458
92460
  const stats = `${result.topicCount} topics, ${result.lineCount} lines (${result.profile} profile)`;
92459
- process.stderr.write(`flow-weaver context: ${stats}
92461
+ process.stderr.write(`fw context: ${stats}
92460
92462
  `);
92461
92463
  }
92462
92464
 
@@ -92761,7 +92763,7 @@ async function marketInitCommand(name, options = {}) {
92761
92763
  },
92762
92764
  scripts: {
92763
92765
  build: "tsc",
92764
- pack: "flow-weaver market pack",
92766
+ pack: "fw market pack",
92765
92767
  prepublishOnly: "npm run build && npm run pack"
92766
92768
  },
92767
92769
  ...options.author && { author: options.author },
@@ -92842,7 +92844,7 @@ A [Flow Weaver](https://github.com/synergenius-fw/flow-weaver) marketplace pack.
92842
92844
  ## Installation
92843
92845
 
92844
92846
  \`\`\`bash
92845
- flow-weaver market install ${name}
92847
+ fw market install ${name}
92846
92848
  \`\`\`
92847
92849
 
92848
92850
  ## Contents
@@ -92877,7 +92879,7 @@ npm publish # Publish to npm
92877
92879
  logger.log(" npm install");
92878
92880
  logger.log(" # Add your node types, workflows, and patterns to src/");
92879
92881
  logger.log(" npm run build");
92880
- logger.log(" flow-weaver market pack");
92882
+ logger.log(" fw market pack");
92881
92883
  logger.log(" npm publish");
92882
92884
  logger.newline();
92883
92885
  }
@@ -92989,7 +92991,7 @@ async function marketInstallCommand(packageSpec, options = {}) {
92989
92991
  displayManifestSummary(manifest);
92990
92992
  } else {
92991
92993
  logger.warn("No flowweaver.manifest.json found in package");
92992
- logger.info('The package may need to run "flow-weaver market pack" before publishing');
92994
+ logger.info('The package may need to run "fw market pack" before publishing');
92993
92995
  }
92994
92996
  }
92995
92997
  async function marketSearchCommand(query, options = {}) {
@@ -93054,7 +93056,7 @@ async function marketListCommand(options = {}) {
93054
93056
  }
93055
93057
  if (packages.length === 0) {
93056
93058
  logger.info("No marketplace packages installed");
93057
- logger.info('Use "flow-weaver market search" to find packages');
93059
+ logger.info('Use "fw market search" to find packages');
93058
93060
  return;
93059
93061
  }
93060
93062
  for (const pkg of packages) {
@@ -93115,9 +93117,9 @@ function displayInstalledPackage(pkg) {
93115
93117
  // src/cli/index.ts
93116
93118
  init_logger();
93117
93119
  init_error_utils();
93118
- var version2 = true ? "0.21.10" : "0.0.0-dev";
93120
+ var version2 = true ? "0.21.12" : "0.0.0-dev";
93119
93121
  var program2 = new Command();
93120
- program2.name("flow-weaver").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
93122
+ program2.name("fw").description("Flow Weaver Annotations - Compile and validate workflow files").option("-v, --version", "Output the current version").option("--no-color", "Disable colors").option("--color", "Force colors").on("option:version", () => {
93121
93123
  logger.banner(version2);
93122
93124
  process.exit(0);
93123
93125
  }).configureHelp({
@@ -93286,7 +93288,7 @@ program2.command("docs [args...]").description("Browse reference documentation")
93286
93288
  } else if (args[0] === "search") {
93287
93289
  const query = args.slice(1).join(" ");
93288
93290
  if (!query) {
93289
- logger.error("Usage: flow-weaver docs search <query>");
93291
+ logger.error("Usage: fw docs search <query>");
93290
93292
  process.exit(1);
93291
93293
  }
93292
93294
  await docsSearchCommand(query, options);
@@ -93319,13 +93321,13 @@ marketCmd.command("list").description("List installed marketplace packages").opt
93319
93321
  program2.addHelpText("after", `
93320
93322
  Examples:
93321
93323
 
93322
- $ flow-weaver compile my-workflow.ts
93323
- $ flow-weaver validate 'src/**/*.ts'
93324
- $ flow-weaver run workflow.ts --params '{"a": 5}'
93325
- $ flow-weaver describe workflow.ts --format ascii-compact
93326
- $ flow-weaver init my-project
93324
+ $ fw compile my-workflow.ts
93325
+ $ fw validate 'src/**/*.ts'
93326
+ $ fw run workflow.ts --params '{"a": 5}'
93327
+ $ fw describe workflow.ts --format ascii-compact
93328
+ $ fw init my-project
93327
93329
 
93328
- Run flow-weaver <command> --help for detailed usage.
93330
+ Run fw <command> --help for detailed usage.
93329
93331
  `);
93330
93332
  if (!process.argv.slice(2).length) {
93331
93333
  logger.banner(version2);
@@ -93339,7 +93341,7 @@ if (!process.argv.slice(2).length) {
93339
93341
  console.log(" run <input> Execute a workflow");
93340
93342
  console.log(" doctor Check project environment");
93341
93343
  console.log();
93342
- console.log(" Run " + logger.highlight("flow-weaver --help") + " for all commands.");
93344
+ console.log(" Run " + logger.highlight("fw --help") + " for all commands.");
93343
93345
  console.log();
93344
93346
  process.exit(0);
93345
93347
  }
package/dist/cli/index.js CHANGED
@@ -44,7 +44,7 @@ import { getErrorMessage } from '../utils/error-utils.js';
44
44
  const version = typeof __CLI_VERSION__ !== 'undefined' ? __CLI_VERSION__ : '0.0.0-dev';
45
45
  const program = new Command();
46
46
  program
47
- .name('flow-weaver')
47
+ .name('fw')
48
48
  .description('Flow Weaver Annotations - Compile and validate workflow files')
49
49
  .option('-v, --version', 'Output the current version')
50
50
  .option('--no-color', 'Disable colors')
@@ -533,7 +533,7 @@ program
533
533
  .action(wrapAction(async (options) => {
534
534
  await changelogCommand(options);
535
535
  }));
536
- // Docs command: flow-weaver docs [topic] | flow-weaver docs search <query>
536
+ // Docs command: fw docs [topic] | fw docs search <query>
537
537
  program
538
538
  .command('docs [args...]')
539
539
  .description('Browse reference documentation')
@@ -546,7 +546,7 @@ program
546
546
  else if (args[0] === 'search') {
547
547
  const query = args.slice(1).join(' ');
548
548
  if (!query) {
549
- logger.error('Usage: flow-weaver docs search <query>');
549
+ logger.error('Usage: fw docs search <query>');
550
550
  process.exit(1);
551
551
  }
552
552
  await docsSearchCommand(query, options);
@@ -622,13 +622,13 @@ marketCmd
622
622
  program.addHelpText('after', `
623
623
  Examples:
624
624
 
625
- $ flow-weaver compile my-workflow.ts
626
- $ flow-weaver validate 'src/**/*.ts'
627
- $ flow-weaver run workflow.ts --params '{"a": 5}'
628
- $ flow-weaver describe workflow.ts --format ascii-compact
629
- $ flow-weaver init my-project
625
+ $ fw compile my-workflow.ts
626
+ $ fw validate 'src/**/*.ts'
627
+ $ fw run workflow.ts --params '{"a": 5}'
628
+ $ fw describe workflow.ts --format ascii-compact
629
+ $ fw init my-project
630
630
 
631
- Run flow-weaver <command> --help for detailed usage.
631
+ Run fw <command> --help for detailed usage.
632
632
  `);
633
633
  // Show concise welcome when no command specified (before parse to avoid Commander error handling)
634
634
  if (!process.argv.slice(2).length) {
@@ -643,7 +643,7 @@ if (!process.argv.slice(2).length) {
643
643
  console.log(' run <input> Execute a workflow');
644
644
  console.log(' doctor Check project environment');
645
645
  console.log();
646
- console.log(' Run ' + logger.highlight('flow-weaver --help') + ' for all commands.');
646
+ console.log(' Run ' + logger.highlight('fw --help') + ' for all commands.');
647
647
  console.log();
648
648
  process.exit(0);
649
649
  }
@@ -9,6 +9,7 @@
9
9
  * when the user actually invokes a pack command.
10
10
  */
11
11
  import * as path from 'path';
12
+ import { pathToFileURL } from 'node:url';
12
13
  import { listInstalledPackages } from '../marketplace/registry.js';
13
14
  import { VERSION } from '../generated-version.js';
14
15
  function compareVersions(a, b) {
@@ -81,7 +82,7 @@ export async function registerPackCommands(program) {
81
82
  sub.allowUnknownOption(true);
82
83
  sub.action(async (...actionArgs) => {
83
84
  try {
84
- const bridge = await import(entrypointPath);
85
+ const bridge = await import(pathToFileURL(entrypointPath).href);
85
86
  // Collect raw args from the sub command
86
87
  const rawArgs = sub.args ?? [];
87
88
  await bridge.handleCommand(cmd.name, rawArgs);
@@ -93,7 +93,7 @@ export ${asyncKeyword}function ${workflowName}(
93
93
  execute: boolean,
94
94
  params: { query: any }
95
95
  ): ${returnType} {
96
- throw new Error("Compile with: flow-weaver compile <file>");
96
+ throw new Error("Compile with: fw compile <file>");
97
97
  }
98
98
  `.trim();
99
99
  },
@@ -318,7 +318,7 @@ export async function ${workflowName}(
318
318
  onFailure: boolean;
319
319
  response: string;
320
320
  }> {
321
- throw new Error('Compile with: flow-weaver compile <file>');
321
+ throw new Error('Compile with: fw compile <file>');
322
322
  }
323
323
  `.trim();
324
324
  },
@@ -159,7 +159,7 @@ export async function ${workflowName}(
159
159
  onFailure: boolean;
160
160
  response: string;
161
161
  }> {
162
- throw new Error('Compile with: flow-weaver compile <file>');
162
+ throw new Error('Compile with: fw compile <file>');
163
163
  }
164
164
  `.trim();
165
165
  },
@@ -176,7 +176,7 @@ export async function ${workflowName}(
176
176
  answer: string;
177
177
  sourcesUsed: number;
178
178
  }> {
179
- throw new Error('Compile with: flow-weaver compile <file>');
179
+ throw new Error('Compile with: fw compile <file>');
180
180
  }
181
181
  `.trim();
182
182
  },
@@ -285,7 +285,7 @@ export async function ${workflowName}(
285
285
  onFailure: boolean;
286
286
  answer: string;
287
287
  }> {
288
- throw new Error('Compile with: flow-weaver compile <file>');
288
+ throw new Error('Compile with: fw compile <file>');
289
289
  }
290
290
  `.trim();
291
291
  },
@@ -131,7 +131,7 @@ export ${asyncKeyword}function ${workflowName}(
131
131
  execute: boolean,
132
132
  params: { data: any }
133
133
  ): ${returnType} {
134
- throw new Error("Compile with: flow-weaver compile <file>");
134
+ throw new Error("Compile with: fw compile <file>");
135
135
  }
136
136
  `.trim();
137
137
  },
@@ -137,7 +137,7 @@ export ${asyncKeyword}function ${workflowName}(
137
137
  execute: boolean,
138
138
  params: { data: any; maxRetries?: number }
139
139
  ): ${returnType} {
140
- throw new Error("Compile with: flow-weaver compile <file>");
140
+ throw new Error("Compile with: fw compile <file>");
141
141
  }
142
142
  `.trim();
143
143
  },
@@ -132,7 +132,7 @@ export ${asyncKeyword}function ${workflowName}(
132
132
  execute: boolean,
133
133
  params: { items: any[] }
134
134
  ): ${returnType} {
135
- throw new Error("Compile with: flow-weaver compile <file>");
135
+ throw new Error("Compile with: fw compile <file>");
136
136
  }
137
137
  `.trim();
138
138
  },
@@ -107,7 +107,7 @@ export ${asyncKeyword}function ${workflowName}(
107
107
  execute: boolean,
108
108
  params: { data: any }
109
109
  ): ${returnType} {
110
- throw new Error("Compile with: flow-weaver compile <file>");
110
+ throw new Error("Compile with: fw compile <file>");
111
111
  }
112
112
  `.trim();
113
113
  }
@@ -168,7 +168,7 @@ export ${asyncKeyword}function ${workflowName}(
168
168
  execute: boolean,
169
169
  params: { ${inputPort}: any }
170
170
  ): ${returnType} {
171
- throw new Error("Compile with: flow-weaver compile <file>");
171
+ throw new Error("Compile with: fw compile <file>");
172
172
  }`.trim();
173
173
  }
174
174
  export const sequentialTemplate = {
@@ -150,7 +150,7 @@ export ${asyncKeyword}function ${workflowName}(
150
150
  execute: boolean,
151
151
  params: { headers: Record<string, string>; body: any }
152
152
  ): ${returnType} {
153
- throw new Error("Compile with: flow-weaver compile <file>");
153
+ throw new Error("Compile with: fw compile <file>");
154
154
  }
155
155
  `.trim();
156
156
  },