@synergenius/flow-weaver 0.19.5 → 0.20.1

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.
@@ -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.19.5";
9674
+ VERSION = "0.20.1";
9675
9675
  }
9676
9676
  });
9677
9677
 
@@ -50877,8 +50877,8 @@ function buildDiagramGraph(ast, options = {}) {
50877
50877
  }
50878
50878
  }
50879
50879
  const diagramNodes = /* @__PURE__ */ new Map();
50880
- const allStartPorts = { ...ast.startPorts };
50881
- if (!allStartPorts.execute) {
50880
+ const allStartPorts = filterHiddenPorts({ ...ast.startPorts });
50881
+ if (!allStartPorts.execute && !ast.startPorts.execute?.hidden) {
50882
50882
  allStartPorts.execute = { dataType: "STEP" };
50883
50883
  }
50884
50884
  const startOutputs = orderedPorts(allStartPorts, "OUTPUT");
@@ -50895,13 +50895,13 @@ function buildDiagramGraph(ast, options = {}) {
50895
50895
  width: NODE_MIN_WIDTH,
50896
50896
  height: NODE_MIN_HEIGHT
50897
50897
  });
50898
- const allExitPorts = { ...ast.exitPorts };
50899
- if (!allExitPorts.onSuccess) {
50898
+ const allExitPorts = filterHiddenPorts({ ...ast.exitPorts });
50899
+ if (!allExitPorts.onSuccess && !ast.exitPorts.onSuccess?.hidden) {
50900
50900
  allExitPorts.onSuccess = { dataType: "STEP", isControlFlow: true };
50901
50901
  }
50902
- if (!allExitPorts.onFailure) {
50902
+ if (!allExitPorts.onFailure && !ast.exitPorts.onFailure?.hidden) {
50903
50903
  allExitPorts.onFailure = { dataType: "STEP", isControlFlow: true, failure: true };
50904
- } else {
50904
+ } else if (allExitPorts.onFailure) {
50905
50905
  allExitPorts.onFailure = { ...allExitPorts.onFailure, failure: true };
50906
50906
  }
50907
50907
  const exitInputs = orderedPorts(allExitPorts, "INPUT");
@@ -73228,16 +73228,6 @@ __export(pack_commands_exports, {
73228
73228
  registerPackCommands: () => registerPackCommands
73229
73229
  });
73230
73230
  import * as path55 from "path";
73231
- import { createRequire as createRequire2 } from "node:module";
73232
- function getEngineVersion2() {
73233
- try {
73234
- const req = createRequire2(import.meta.url);
73235
- const pkg = req("../../package.json");
73236
- return pkg.version;
73237
- } catch {
73238
- return "0.0.0";
73239
- }
73240
- }
73241
73231
  function compareVersions2(a, b) {
73242
73232
  const pa = a.split(".").map(Number);
73243
73233
  const pb = b.split(".").map(Number);
@@ -73251,8 +73241,7 @@ function checkPackEngineVersion2(pkg) {
73251
73241
  const required2 = pkg.manifest.engineVersion;
73252
73242
  if (!required2) return;
73253
73243
  const minVersion = required2.replace(/^>=?\s*/, "");
73254
- const current2 = getEngineVersion2();
73255
- if (current2 === "0.0.0") return;
73244
+ const current2 = VERSION;
73256
73245
  if (compareVersions2(current2, minVersion) < 0) {
73257
73246
  console.warn(
73258
73247
  `\x1B[33mWarning: ${pkg.name} requires flow-weaver >=${minVersion} but ${current2} is installed.\x1B[0m`
@@ -73314,6 +73303,7 @@ var init_pack_commands = __esm({
73314
73303
  "src/cli/pack-commands.ts"() {
73315
73304
  "use strict";
73316
73305
  init_registry();
73306
+ init_generated_version();
73317
73307
  }
73318
73308
  });
73319
73309
 
@@ -103625,17 +103615,8 @@ function registerPrompts(mcp) {
103625
103615
 
103626
103616
  // src/mcp/pack-tools.ts
103627
103617
  init_registry();
103618
+ init_generated_version();
103628
103619
  import * as path44 from "path";
103629
- import { createRequire } from "node:module";
103630
- function getEngineVersion() {
103631
- try {
103632
- const req = createRequire(import.meta.url);
103633
- const pkg = req("../../package.json");
103634
- return pkg.version;
103635
- } catch {
103636
- return "0.0.0";
103637
- }
103638
- }
103639
103620
  function compareVersions(a, b) {
103640
103621
  const pa = a.split(".").map(Number);
103641
103622
  const pb = b.split(".").map(Number);
@@ -103649,8 +103630,7 @@ function checkPackEngineVersion(pkg) {
103649
103630
  const required2 = pkg.manifest.engineVersion;
103650
103631
  if (!required2) return;
103651
103632
  const minVersion = required2.replace(/^>=?\s*/, "");
103652
- const current2 = getEngineVersion();
103653
- if (current2 === "0.0.0") return;
103633
+ const current2 = VERSION;
103654
103634
  if (compareVersions(current2, minVersion) < 0) {
103655
103635
  process.stderr.write(
103656
103636
  `\x1B[33mWarning: ${pkg.name} requires flow-weaver >=${minVersion} but ${current2} is installed.\x1B[0m
@@ -106511,7 +106491,7 @@ function displayInstalledPackage(pkg) {
106511
106491
  // src/cli/index.ts
106512
106492
  init_logger();
106513
106493
  init_error_utils();
106514
- var version2 = true ? "0.19.5" : "0.0.0-dev";
106494
+ var version2 = true ? "0.20.1" : "0.0.0-dev";
106515
106495
  var program2 = new Command();
106516
106496
  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", () => {
106517
106497
  logger.banner(version2);
@@ -9,18 +9,8 @@
9
9
  * when the user actually invokes a pack command.
10
10
  */
11
11
  import * as path from 'path';
12
- import { createRequire } from 'node:module';
13
12
  import { listInstalledPackages } from '../marketplace/registry.js';
14
- function getEngineVersion() {
15
- try {
16
- const req = createRequire(import.meta.url);
17
- const pkg = req('../../package.json');
18
- return pkg.version;
19
- }
20
- catch {
21
- return '0.0.0';
22
- }
23
- }
13
+ import { VERSION } from '../generated-version.js';
24
14
  function compareVersions(a, b) {
25
15
  const pa = a.split('.').map(Number);
26
16
  const pb = b.split('.').map(Number);
@@ -36,9 +26,7 @@ function checkPackEngineVersion(pkg) {
36
26
  if (!required)
37
27
  return;
38
28
  const minVersion = required.replace(/^>=?\s*/, '');
39
- const current = getEngineVersion();
40
- if (current === '0.0.0')
41
- return; // dev mode, skip check
29
+ const current = VERSION;
42
30
  if (compareVersions(current, minVersion) < 0) {
43
31
  console.warn(`\x1b[33mWarning: ${pkg.name} requires flow-weaver >=${minVersion} but ${current} is installed.\x1b[0m`);
44
32
  console.warn(`\x1b[33mRun: npm install @synergenius/flow-weaver@latest\x1b[0m`);
@@ -699,8 +699,8 @@ export function buildDiagramGraph(ast, options = {}) {
699
699
  // Build diagram nodes
700
700
  const diagramNodes = new Map();
701
701
  // Start node — ensure mandatory execute STEP port exists
702
- const allStartPorts = { ...ast.startPorts };
703
- if (!allStartPorts.execute) {
702
+ const allStartPorts = filterHiddenPorts({ ...ast.startPorts });
703
+ if (!allStartPorts.execute && !ast.startPorts.execute?.hidden) {
704
704
  allStartPorts.execute = { dataType: 'STEP' };
705
705
  }
706
706
  const startOutputs = orderedPorts(allStartPorts, 'OUTPUT');
@@ -717,14 +717,14 @@ export function buildDiagramGraph(ast, options = {}) {
717
717
  height: NODE_MIN_HEIGHT,
718
718
  });
719
719
  // Exit node — ensure mandatory onSuccess/onFailure STEP ports exist
720
- const allExitPorts = { ...ast.exitPorts };
721
- if (!allExitPorts.onSuccess) {
720
+ const allExitPorts = filterHiddenPorts({ ...ast.exitPorts });
721
+ if (!allExitPorts.onSuccess && !ast.exitPorts.onSuccess?.hidden) {
722
722
  allExitPorts.onSuccess = { dataType: 'STEP', isControlFlow: true };
723
723
  }
724
- if (!allExitPorts.onFailure) {
724
+ if (!allExitPorts.onFailure && !ast.exitPorts.onFailure?.hidden) {
725
725
  allExitPorts.onFailure = { dataType: 'STEP', isControlFlow: true, failure: true };
726
726
  }
727
- else {
727
+ else if (allExitPorts.onFailure) {
728
728
  allExitPorts.onFailure = { ...allExitPorts.onFailure, failure: true };
729
729
  }
730
730
  const exitInputs = orderedPorts(allExitPorts, 'INPUT');
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.19.5";
1
+ export declare const VERSION = "0.20.1";
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.19.5';
2
+ export const VERSION = '0.20.1';
3
3
  //# sourceMappingURL=generated-version.js.map
@@ -5,18 +5,8 @@
5
5
  * imports the entrypoint and calls its registerMcpTools(mcp) function.
6
6
  */
7
7
  import * as path from 'path';
8
- import { createRequire } from 'node:module';
9
8
  import { listInstalledPackages } from '../marketplace/registry.js';
10
- function getEngineVersion() {
11
- try {
12
- const req = createRequire(import.meta.url);
13
- const pkg = req('../../package.json');
14
- return pkg.version;
15
- }
16
- catch {
17
- return '0.0.0';
18
- }
19
- }
9
+ import { VERSION } from '../generated-version.js';
20
10
  function compareVersions(a, b) {
21
11
  const pa = a.split('.').map(Number);
22
12
  const pb = b.split('.').map(Number);
@@ -32,9 +22,7 @@ function checkPackEngineVersion(pkg) {
32
22
  if (!required)
33
23
  return;
34
24
  const minVersion = required.replace(/^>=?\s*/, '');
35
- const current = getEngineVersion();
36
- if (current === '0.0.0')
37
- return;
25
+ const current = VERSION;
38
26
  if (compareVersions(current, minVersion) < 0) {
39
27
  process.stderr.write(`\x1b[33mWarning: ${pkg.name} requires flow-weaver >=${minVersion} but ${current} is installed.\x1b[0m\n`);
40
28
  process.stderr.write(`\x1b[33mRun: npm install @synergenius/flow-weaver@latest\x1b[0m\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.19.5",
3
+ "version": "0.20.1",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",