@synergenius/flow-weaver 0.29.1 → 0.30.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.
@@ -5987,7 +5987,7 @@ var VERSION;
5987
5987
  var init_generated_version = __esm({
5988
5988
  "src/generated-version.ts"() {
5989
5989
  "use strict";
5990
- VERSION = "0.29.1";
5990
+ VERSION = "0.30.1";
5991
5991
  }
5992
5992
  });
5993
5993
 
@@ -9844,14 +9844,14 @@ var require_read_wasm = __commonJS({
9844
9844
  var fs49 = __require("fs");
9845
9845
  var path54 = __require("path");
9846
9846
  module.exports = function readWasm() {
9847
- return new Promise((resolve38, reject) => {
9847
+ return new Promise((resolve39, reject) => {
9848
9848
  const wasmPath = path54.join(__dirname, "mappings.wasm");
9849
9849
  fs49.readFile(wasmPath, null, (error2, data) => {
9850
9850
  if (error2) {
9851
9851
  reject(error2);
9852
9852
  return;
9853
9853
  }
9854
- resolve38(data.buffer);
9854
+ resolve39(data.buffer);
9855
9855
  });
9856
9856
  });
9857
9857
  };
@@ -12059,7 +12059,7 @@ is not a problem with esbuild. You need to fix your environment instead.
12059
12059
  let latestResultPromise;
12060
12060
  let provideLatestResult;
12061
12061
  if (isContext)
12062
- requestCallbacks["on-end"] = (id, request2) => new Promise((resolve38) => {
12062
+ requestCallbacks["on-end"] = (id, request2) => new Promise((resolve39) => {
12063
12063
  buildResponseToResult(request2, (err, result, onEndErrors, onEndWarnings) => {
12064
12064
  const response = {
12065
12065
  errors: onEndErrors,
@@ -12069,7 +12069,7 @@ is not a problem with esbuild. You need to fix your environment instead.
12069
12069
  latestResultPromise = void 0;
12070
12070
  provideLatestResult = void 0;
12071
12071
  sendResponse(id, response);
12072
- resolve38();
12072
+ resolve39();
12073
12073
  });
12074
12074
  });
12075
12075
  sendRequest(refs, request, (error2, response) => {
@@ -12086,10 +12086,10 @@ is not a problem with esbuild. You need to fix your environment instead.
12086
12086
  let didDispose = false;
12087
12087
  const result = {
12088
12088
  rebuild: () => {
12089
- if (!latestResultPromise) latestResultPromise = new Promise((resolve38, reject) => {
12089
+ if (!latestResultPromise) latestResultPromise = new Promise((resolve39, reject) => {
12090
12090
  let settlePromise;
12091
12091
  provideLatestResult = (err, result2) => {
12092
- if (!settlePromise) settlePromise = () => err ? reject(err) : resolve38(result2);
12092
+ if (!settlePromise) settlePromise = () => err ? reject(err) : resolve39(result2);
12093
12093
  };
12094
12094
  const triggerAnotherBuild = () => {
12095
12095
  const request2 = {
@@ -12110,7 +12110,7 @@ is not a problem with esbuild. You need to fix your environment instead.
12110
12110
  });
12111
12111
  return latestResultPromise;
12112
12112
  },
12113
- watch: (options2 = {}) => new Promise((resolve38, reject) => {
12113
+ watch: (options2 = {}) => new Promise((resolve39, reject) => {
12114
12114
  if (!streamIn.hasFS) throw new Error(`Cannot use the "watch" API in this environment`);
12115
12115
  const keys = {};
12116
12116
  const delay = getFlag(options2, keys, "delay", mustBeInteger);
@@ -12122,10 +12122,10 @@ is not a problem with esbuild. You need to fix your environment instead.
12122
12122
  if (delay) request2.delay = delay;
12123
12123
  sendRequest(refs, request2, (error22) => {
12124
12124
  if (error22) reject(new Error(error22));
12125
- else resolve38(void 0);
12125
+ else resolve39(void 0);
12126
12126
  });
12127
12127
  }),
12128
- serve: (options2 = {}) => new Promise((resolve38, reject) => {
12128
+ serve: (options2 = {}) => new Promise((resolve39, reject) => {
12129
12129
  if (!streamIn.hasFS) throw new Error(`Cannot use the "serve" API in this environment`);
12130
12130
  const keys = {};
12131
12131
  const port = getFlag(options2, keys, "port", mustBeValidPortNumber);
@@ -12163,28 +12163,28 @@ is not a problem with esbuild. You need to fix your environment instead.
12163
12163
  sendResponse(id, {});
12164
12164
  };
12165
12165
  }
12166
- resolve38(response2);
12166
+ resolve39(response2);
12167
12167
  });
12168
12168
  }),
12169
- cancel: () => new Promise((resolve38) => {
12170
- if (didDispose) return resolve38();
12169
+ cancel: () => new Promise((resolve39) => {
12170
+ if (didDispose) return resolve39();
12171
12171
  const request2 = {
12172
12172
  command: "cancel",
12173
12173
  key: buildKey
12174
12174
  };
12175
12175
  sendRequest(refs, request2, () => {
12176
- resolve38();
12176
+ resolve39();
12177
12177
  });
12178
12178
  }),
12179
- dispose: () => new Promise((resolve38) => {
12180
- if (didDispose) return resolve38();
12179
+ dispose: () => new Promise((resolve39) => {
12180
+ if (didDispose) return resolve39();
12181
12181
  didDispose = true;
12182
12182
  const request2 = {
12183
12183
  command: "dispose",
12184
12184
  key: buildKey
12185
12185
  };
12186
12186
  sendRequest(refs, request2, () => {
12187
- resolve38();
12187
+ resolve39();
12188
12188
  scheduleOnDisposeCallbacks();
12189
12189
  refs.unref();
12190
12190
  });
@@ -12223,7 +12223,7 @@ is not a problem with esbuild. You need to fix your environment instead.
12223
12223
  onLoad: []
12224
12224
  };
12225
12225
  i++;
12226
- let resolve38 = (path310, options = {}) => {
12226
+ let resolve39 = (path310, options = {}) => {
12227
12227
  if (!isSetupDone) throw new Error('Cannot call "resolve" before plugin setup has completed');
12228
12228
  if (typeof path310 !== "string") throw new Error(`The path to resolve must be a string`);
12229
12229
  let keys2 = /* @__PURE__ */ Object.create(null);
@@ -12267,7 +12267,7 @@ is not a problem with esbuild. You need to fix your environment instead.
12267
12267
  };
12268
12268
  let promise = setup({
12269
12269
  initialOptions,
12270
- resolve: resolve38,
12270
+ resolve: resolve39,
12271
12271
  onStart(callback) {
12272
12272
  let registeredText = `This error came from the "onStart" callback registered here:`;
12273
12273
  let registeredNote = extractCallerV8(new Error(registeredText), streamIn, "onStart");
@@ -13145,46 +13145,46 @@ More information: The file containing the code for esbuild's JavaScript API (${_
13145
13145
  }
13146
13146
  };
13147
13147
  longLivedService = {
13148
- build: (options) => new Promise((resolve38, reject) => {
13148
+ build: (options) => new Promise((resolve39, reject) => {
13149
13149
  service.buildOrContext({
13150
13150
  callName: "build",
13151
13151
  refs,
13152
13152
  options,
13153
13153
  isTTY: isTTY2(),
13154
13154
  defaultWD,
13155
- callback: (err, res) => err ? reject(err) : resolve38(res)
13155
+ callback: (err, res) => err ? reject(err) : resolve39(res)
13156
13156
  });
13157
13157
  }),
13158
- context: (options) => new Promise((resolve38, reject) => service.buildOrContext({
13158
+ context: (options) => new Promise((resolve39, reject) => service.buildOrContext({
13159
13159
  callName: "context",
13160
13160
  refs,
13161
13161
  options,
13162
13162
  isTTY: isTTY2(),
13163
13163
  defaultWD,
13164
- callback: (err, res) => err ? reject(err) : resolve38(res)
13164
+ callback: (err, res) => err ? reject(err) : resolve39(res)
13165
13165
  })),
13166
- transform: (input, options) => new Promise((resolve38, reject) => service.transform({
13166
+ transform: (input, options) => new Promise((resolve39, reject) => service.transform({
13167
13167
  callName: "transform",
13168
13168
  refs,
13169
13169
  input,
13170
13170
  options: options || {},
13171
13171
  isTTY: isTTY2(),
13172
13172
  fs: fsAsync,
13173
- callback: (err, res) => err ? reject(err) : resolve38(res)
13173
+ callback: (err, res) => err ? reject(err) : resolve39(res)
13174
13174
  })),
13175
- formatMessages: (messages, options) => new Promise((resolve38, reject) => service.formatMessages({
13175
+ formatMessages: (messages, options) => new Promise((resolve39, reject) => service.formatMessages({
13176
13176
  callName: "formatMessages",
13177
13177
  refs,
13178
13178
  messages,
13179
13179
  options,
13180
- callback: (err, res) => err ? reject(err) : resolve38(res)
13180
+ callback: (err, res) => err ? reject(err) : resolve39(res)
13181
13181
  })),
13182
- analyzeMetafile: (metafile, options) => new Promise((resolve38, reject) => service.analyzeMetafile({
13182
+ analyzeMetafile: (metafile, options) => new Promise((resolve39, reject) => service.analyzeMetafile({
13183
13183
  callName: "analyzeMetafile",
13184
13184
  refs,
13185
13185
  metafile: typeof metafile === "string" ? metafile : JSON.stringify(metafile),
13186
13186
  options,
13187
- callback: (err, res) => err ? reject(err) : resolve38(res)
13187
+ callback: (err, res) => err ? reject(err) : resolve39(res)
13188
13188
  }))
13189
13189
  };
13190
13190
  return longLivedService;
@@ -13262,13 +13262,13 @@ error: ${text}`);
13262
13262
  worker.postMessage(msg);
13263
13263
  let status = Atomics.wait(sharedBufferView, 0, 0);
13264
13264
  if (status !== "ok" && status !== "not-equal") throw new Error("Internal error: Atomics.wait() failed: " + status);
13265
- let { message: { id: id2, resolve: resolve38, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
13265
+ let { message: { id: id2, resolve: resolve39, reject, properties } } = worker_threads2.receiveMessageOnPort(mainPort);
13266
13266
  if (id !== id2) throw new Error(`Internal error: Expected id ${id} but got id ${id2}`);
13267
13267
  if (reject) {
13268
13268
  applyProperties(reject, properties);
13269
13269
  throw reject;
13270
13270
  }
13271
- return resolve38;
13271
+ return resolve39;
13272
13272
  };
13273
13273
  worker.unref();
13274
13274
  return {
@@ -47602,45 +47602,45 @@ async function compileCommand(input, options = {}) {
47602
47602
  errorCount++;
47603
47603
  continue;
47604
47604
  }
47605
- if (strict) {
47606
- const validation = validator.validate(parseResult.ast, { strictMode: true });
47607
- if (validation.errors.length > 0) {
47608
- logger.error(` ${fileName}`);
47609
- validation.errors.forEach((err) => {
47610
- const friendly = getFriendlyError(err);
47611
- if (friendly) {
47612
- const loc = err.location ? `[line ${err.location.line}] ` : "";
47613
- logger.error(` ${loc}${friendly.title}: ${friendly.explanation}`);
47614
- logger.warn(` How to fix: ${friendly.fix}`);
47615
- if (err.docUrl) {
47616
- logger.warn(` See: ${err.docUrl}`);
47617
- }
47618
- } else {
47619
- let msg = ` ${err.message}`;
47620
- if (err.node) {
47621
- msg += ` (node: ${err.node})`;
47622
- }
47623
- logger.error(msg);
47624
- if (err.docUrl) {
47625
- logger.warn(` See: ${err.docUrl}`);
47626
- }
47605
+ const validation = validator.validate(parseResult.ast, { strictMode: strict });
47606
+ if (strict && validation.errors.length > 0) {
47607
+ logger.error(` ${fileName}`);
47608
+ validation.errors.forEach((err) => {
47609
+ const friendly = getFriendlyError(err);
47610
+ if (friendly) {
47611
+ const loc = err.location ? `[line ${err.location.line}] ` : "";
47612
+ logger.error(` ${loc}${friendly.title}: ${friendly.explanation}`);
47613
+ logger.warn(` How to fix: ${friendly.fix}`);
47614
+ if (err.docUrl) {
47615
+ logger.warn(` See: ${err.docUrl}`);
47627
47616
  }
47628
- });
47629
- errorCount++;
47630
- continue;
47631
- }
47632
- if (validation.warnings.length > 0 && verbose) {
47633
- validation.warnings.forEach((warn) => {
47634
- const friendly = getFriendlyError(warn);
47635
- if (friendly) {
47636
- const loc = warn.location ? `[line ${warn.location.line}] ` : "";
47637
- logger.warn(` ${loc}${friendly.title}: ${friendly.explanation}`);
47617
+ } else {
47618
+ let msg = ` ${err.message}`;
47619
+ if (err.node) {
47620
+ msg += ` (node: ${err.node})`;
47621
+ }
47622
+ logger.error(msg);
47623
+ if (err.docUrl) {
47624
+ logger.warn(` See: ${err.docUrl}`);
47625
+ }
47626
+ }
47627
+ });
47628
+ errorCount++;
47629
+ continue;
47630
+ }
47631
+ if (validation.warnings.length > 0) {
47632
+ validation.warnings.forEach((warn) => {
47633
+ const friendly = getFriendlyError(warn);
47634
+ if (friendly) {
47635
+ const loc = warn.location ? `[line ${warn.location.line}] ` : "";
47636
+ logger.warn(` ${loc}${friendly.title}: ${friendly.explanation}`);
47637
+ if (verbose) {
47638
47638
  logger.warn(` How to fix: ${friendly.fix}`);
47639
- } else {
47640
- logger.warn(` ${warn.message}`);
47641
47639
  }
47642
- });
47643
- }
47640
+ } else {
47641
+ logger.warn(` ${warn.message}`);
47642
+ }
47643
+ });
47644
47644
  }
47645
47645
  const sourceCode = fs11.readFileSync(file, "utf8");
47646
47646
  const result = generateInPlace(sourceCode, parseResult.ast, { production, moduleFormat, sourceFile: file, skipParamReturns: clean });
@@ -50419,7 +50419,7 @@ async function describeCommand(input, options = {}) {
50419
50419
  throw new Error(`File not found: ${filePath}`);
50420
50420
  }
50421
50421
  try {
50422
- const parseResult = await parseWorkflow(filePath, { workflowName });
50422
+ const parseResult = await parseWorkflow(filePath, { workflowName, projectDir: path12.dirname(filePath) });
50423
50423
  if (parseResult.errors.length > 0) {
50424
50424
  throw new Error(`Parse errors:
50425
50425
  ${parseResult.errors.map((err) => ` ${err}`).join("\n")}`);
@@ -52506,6 +52506,7 @@ async function diagramCommand(input, options = {}) {
52506
52506
  if (!fs14.existsSync(filePath)) {
52507
52507
  throw new Error(`File not found: ${filePath}`);
52508
52508
  }
52509
+ await parser.loadPackHandlers(path13.dirname(filePath));
52509
52510
  let result;
52510
52511
  if (ASCII_FORMATS.has(format)) {
52511
52512
  result = fileToASCII(filePath, { ...diagramOptions, format });
@@ -52527,6 +52528,7 @@ var init_diagram2 = __esm({
52527
52528
  "src/cli/commands/diagram.ts"() {
52528
52529
  "use strict";
52529
52530
  init_diagram();
52531
+ init_parser2();
52530
52532
  init_logger();
52531
52533
  init_safe_write();
52532
52534
  ASCII_FORMATS = /* @__PURE__ */ new Set(["ascii", "ascii-compact", "text"]);
@@ -52570,8 +52572,8 @@ async function diffCommand(file1, file2, options = {}) {
52570
52572
  }
52571
52573
  try {
52572
52574
  const [result1, result2] = await Promise.all([
52573
- parseWorkflow(filePath1, { workflowName }),
52574
- parseWorkflow(filePath2, { workflowName })
52575
+ parseWorkflow(filePath1, { workflowName, projectDir: path14.dirname(filePath1) }),
52576
+ parseWorkflow(filePath2, { workflowName, projectDir: path14.dirname(filePath2) })
52575
52577
  ]);
52576
52578
  if (result1.errors.length > 0) {
52577
52579
  throw new Error(`Parse errors in ${file1}:
@@ -52660,7 +52662,7 @@ async function validateCommand(input, options = {}) {
52660
52662
  logger.progress(i + 1, files.length, fileName);
52661
52663
  }
52662
52664
  try {
52663
- const parseResult = await parseWorkflow(file, { workflowName, projectDir: process.cwd() });
52665
+ const parseResult = await parseWorkflow(file, { workflowName, projectDir: path15.dirname(path15.resolve(file)) });
52664
52666
  if (parseResult.warnings.length > 0) {
52665
52667
  if (!json2 && !quiet) {
52666
52668
  logger.warn(`Parse warnings in ${fileName}:`);
@@ -54396,13 +54398,13 @@ var init_promise_polyfill = __esm({
54396
54398
  // Available starting from Node 22
54397
54399
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
54398
54400
  static withResolver() {
54399
- let resolve38;
54401
+ let resolve39;
54400
54402
  let reject;
54401
54403
  const promise = new Promise((res, rej) => {
54402
- resolve38 = res;
54404
+ resolve39 = res;
54403
54405
  reject = rej;
54404
54406
  });
54405
- return { promise, resolve: resolve38, reject };
54407
+ return { promise, resolve: resolve39, reject };
54406
54408
  }
54407
54409
  };
54408
54410
  }
@@ -54440,7 +54442,7 @@ function createPrompt(view) {
54440
54442
  output
54441
54443
  });
54442
54444
  const screen = new ScreenManager(rl);
54443
- const { promise, resolve: resolve38, reject } = PromisePolyfill.withResolver();
54445
+ const { promise, resolve: resolve39, reject } = PromisePolyfill.withResolver();
54444
54446
  const cancel = () => reject(new CancelPromptError());
54445
54447
  if (signal) {
54446
54448
  const abort = () => reject(new AbortPromptError({ cause: signal.reason }));
@@ -54467,7 +54469,7 @@ function createPrompt(view) {
54467
54469
  cycle(() => {
54468
54470
  try {
54469
54471
  const nextView = view(config2, (value) => {
54470
- setImmediate(() => resolve38(value));
54472
+ setImmediate(() => resolve39(value));
54471
54473
  });
54472
54474
  if (nextView === void 0) {
54473
54475
  const callerFilename = callSites[1]?.getFileName();
@@ -55278,13 +55280,13 @@ var init_promise_polyfill2 = __esm({
55278
55280
  // Available starting from Node 22
55279
55281
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
55280
55282
  static withResolver() {
55281
- let resolve38;
55283
+ let resolve39;
55282
55284
  let reject;
55283
55285
  const promise = new Promise((res, rej) => {
55284
- resolve38 = res;
55286
+ resolve39 = res;
55285
55287
  reject = rej;
55286
55288
  });
55287
- return { promise, resolve: resolve38, reject };
55289
+ return { promise, resolve: resolve39, reject };
55288
55290
  }
55289
55291
  };
55290
55292
  }
@@ -55322,7 +55324,7 @@ function createPrompt2(view) {
55322
55324
  output
55323
55325
  });
55324
55326
  const screen = new ScreenManager2(rl);
55325
- const { promise, resolve: resolve38, reject } = PromisePolyfill2.withResolver();
55327
+ const { promise, resolve: resolve39, reject } = PromisePolyfill2.withResolver();
55326
55328
  const cancel = () => reject(new CancelPromptError2());
55327
55329
  if (signal) {
55328
55330
  const abort = () => reject(new AbortPromptError2({ cause: signal.reason }));
@@ -55349,7 +55351,7 @@ function createPrompt2(view) {
55349
55351
  cycle(() => {
55350
55352
  try {
55351
55353
  const nextView = view(config2, (value) => {
55352
- setImmediate(() => resolve38(value));
55354
+ setImmediate(() => resolve39(value));
55353
55355
  });
55354
55356
  if (nextView === void 0) {
55355
55357
  const callerFilename = callSites[1]?.getFileName();
@@ -56133,13 +56135,13 @@ var init_promise_polyfill3 = __esm({
56133
56135
  // Available starting from Node 22
56134
56136
  // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/withResolvers
56135
56137
  static withResolver() {
56136
- let resolve38;
56138
+ let resolve39;
56137
56139
  let reject;
56138
56140
  const promise = new Promise((res, rej) => {
56139
- resolve38 = res;
56141
+ resolve39 = res;
56140
56142
  reject = rej;
56141
56143
  });
56142
- return { promise, resolve: resolve38, reject };
56144
+ return { promise, resolve: resolve39, reject };
56143
56145
  }
56144
56146
  };
56145
56147
  }
@@ -56177,7 +56179,7 @@ function createPrompt3(view) {
56177
56179
  output
56178
56180
  });
56179
56181
  const screen = new ScreenManager3(rl);
56180
- const { promise, resolve: resolve38, reject } = PromisePolyfill3.withResolver();
56182
+ const { promise, resolve: resolve39, reject } = PromisePolyfill3.withResolver();
56181
56183
  const cancel = () => reject(new CancelPromptError3());
56182
56184
  if (signal) {
56183
56185
  const abort = () => reject(new AbortPromptError3({ cause: signal.reason }));
@@ -56204,7 +56206,7 @@ function createPrompt3(view) {
56204
56206
  cycle(() => {
56205
56207
  try {
56206
56208
  const nextView = view(config2, (value) => {
56207
- setImmediate(() => resolve38(value));
56209
+ setImmediate(() => resolve39(value));
56208
56210
  });
56209
56211
  if (nextView === void 0) {
56210
56212
  const callerFilename = callSites[1]?.getFileName();
@@ -60762,7 +60764,29 @@ function parseParams(options) {
60762
60764
  }
60763
60765
  return {};
60764
60766
  }
60765
- async function compileAndRun(filePath, params, options) {
60767
+ function parseMocks(options) {
60768
+ if (options.mocks) {
60769
+ try {
60770
+ return JSON.parse(options.mocks);
60771
+ } catch {
60772
+ throw new Error(`Invalid JSON in --mocks: ${options.mocks}`);
60773
+ }
60774
+ }
60775
+ if (options.mocksFile) {
60776
+ const mocksFilePath = path21.resolve(options.mocksFile);
60777
+ if (!fs21.existsSync(mocksFilePath)) {
60778
+ throw new Error(`Mocks file not found: ${mocksFilePath}`);
60779
+ }
60780
+ try {
60781
+ const content = fs21.readFileSync(mocksFilePath, "utf8");
60782
+ return JSON.parse(content);
60783
+ } catch {
60784
+ throw new Error(`Failed to parse mocks file: ${options.mocksFile}`);
60785
+ }
60786
+ }
60787
+ return void 0;
60788
+ }
60789
+ async function compileAndRun(filePath, params, mocks, options) {
60766
60790
  const compileOpts = {
60767
60791
  format: options.format,
60768
60792
  clean: options.clean
@@ -60796,7 +60820,8 @@ async function compileAndRun(filePath, params, options) {
60796
60820
  const result = await executeWorkflowFromFile(filePath, params, {
60797
60821
  workflowName: options.workflow,
60798
60822
  production: options.production ?? false,
60799
- includeTrace: !options.production
60823
+ includeTrace: !options.production,
60824
+ mocks
60800
60825
  });
60801
60826
  if (options.json) {
60802
60827
  process.stdout.write(
@@ -60844,15 +60869,19 @@ async function devCommand(input, options = {}) {
60844
60869
  );
60845
60870
  }
60846
60871
  const params = parseParams(options);
60872
+ const mocks = parseMocks(options);
60847
60873
  if (!options.json) {
60848
60874
  logger.section("Dev Mode");
60849
60875
  logger.info(`File: ${path21.basename(filePath)}`);
60850
60876
  if (Object.keys(params).length > 0) {
60851
60877
  logger.info(`Params: ${JSON.stringify(params)}`);
60852
60878
  }
60879
+ if (mocks) {
60880
+ logger.info(`Mocks: ${JSON.stringify(mocks)}`);
60881
+ }
60853
60882
  logger.newline();
60854
60883
  }
60855
- await compileAndRun(filePath, params, options);
60884
+ await compileAndRun(filePath, params, mocks, options);
60856
60885
  if (options.once) {
60857
60886
  return;
60858
60887
  }
@@ -60870,7 +60899,7 @@ async function devCommand(input, options = {}) {
60870
60899
  if (!options.json) {
60871
60900
  cycleSeparator(file);
60872
60901
  }
60873
- await compileAndRun(filePath, params, options);
60902
+ await compileAndRun(filePath, params, mocks, options);
60874
60903
  });
60875
60904
  const cleanup = () => {
60876
60905
  if (!options.json) {
@@ -69556,7 +69585,7 @@ var init_protocol = __esm({
69556
69585
  return;
69557
69586
  }
69558
69587
  const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
69559
- await new Promise((resolve38) => setTimeout(resolve38, pollInterval));
69588
+ await new Promise((resolve39) => setTimeout(resolve39, pollInterval));
69560
69589
  options?.signal?.throwIfAborted();
69561
69590
  }
69562
69591
  } catch (error2) {
@@ -69573,7 +69602,7 @@ var init_protocol = __esm({
69573
69602
  */
69574
69603
  request(request, resultSchema, options) {
69575
69604
  const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
69576
- return new Promise((resolve38, reject) => {
69605
+ return new Promise((resolve39, reject) => {
69577
69606
  const earlyReject = (error2) => {
69578
69607
  reject(error2);
69579
69608
  };
@@ -69651,7 +69680,7 @@ var init_protocol = __esm({
69651
69680
  if (!parseResult.success) {
69652
69681
  reject(parseResult.error);
69653
69682
  } else {
69654
- resolve38(parseResult.data);
69683
+ resolve39(parseResult.data);
69655
69684
  }
69656
69685
  } catch (error2) {
69657
69686
  reject(error2);
@@ -69912,12 +69941,12 @@ var init_protocol = __esm({
69912
69941
  }
69913
69942
  } catch {
69914
69943
  }
69915
- return new Promise((resolve38, reject) => {
69944
+ return new Promise((resolve39, reject) => {
69916
69945
  if (signal.aborted) {
69917
69946
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
69918
69947
  return;
69919
69948
  }
69920
- const timeoutId = setTimeout(resolve38, interval);
69949
+ const timeoutId = setTimeout(resolve39, interval);
69921
69950
  signal.addEventListener("abort", () => {
69922
69951
  clearTimeout(timeoutId);
69923
69952
  reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
@@ -72944,7 +72973,7 @@ var require_compile = __commonJS({
72944
72973
  const schOrFunc = root.refs[ref];
72945
72974
  if (schOrFunc)
72946
72975
  return schOrFunc;
72947
- let _sch = resolve38.call(this, root, ref);
72976
+ let _sch = resolve39.call(this, root, ref);
72948
72977
  if (_sch === void 0) {
72949
72978
  const schema2 = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
72950
72979
  const { schemaId } = this.opts;
@@ -72971,7 +73000,7 @@ var require_compile = __commonJS({
72971
73000
  function sameSchemaEnv(s1, s2) {
72972
73001
  return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
72973
73002
  }
72974
- function resolve38(root, ref) {
73003
+ function resolve39(root, ref) {
72975
73004
  let sch;
72976
73005
  while (typeof (sch = this.refs[ref]) == "string")
72977
73006
  ref = sch;
@@ -73546,7 +73575,7 @@ var require_fast_uri = __commonJS({
73546
73575
  }
73547
73576
  return uri;
73548
73577
  }
73549
- function resolve38(baseURI, relativeURI, options) {
73578
+ function resolve39(baseURI, relativeURI, options) {
73550
73579
  const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
73551
73580
  const resolved = resolveComponent(parse4(baseURI, schemelessOptions), parse4(relativeURI, schemelessOptions), schemelessOptions, true);
73552
73581
  schemelessOptions.skipEscape = true;
@@ -73773,7 +73802,7 @@ var require_fast_uri = __commonJS({
73773
73802
  var fastUri = {
73774
73803
  SCHEMES,
73775
73804
  normalize,
73776
- resolve: resolve38,
73805
+ resolve: resolve39,
73777
73806
  resolveComponent,
73778
73807
  equal,
73779
73808
  serialize,
@@ -77892,7 +77921,7 @@ var init_mcp = __esm({
77892
77921
  let task = createTaskResult.task;
77893
77922
  const pollInterval = task.pollInterval ?? 5e3;
77894
77923
  while (task.status !== "completed" && task.status !== "failed" && task.status !== "cancelled") {
77895
- await new Promise((resolve38) => setTimeout(resolve38, pollInterval));
77924
+ await new Promise((resolve39) => setTimeout(resolve39, pollInterval));
77896
77925
  const updatedTask = await extra.taskStore.getTask(taskId);
77897
77926
  if (!updatedTask) {
77898
77927
  throw new McpError(ErrorCode.InternalError, `Task ${taskId} not found during polling`);
@@ -78486,12 +78515,12 @@ var init_stdio2 = __esm({
78486
78515
  this.onclose?.();
78487
78516
  }
78488
78517
  send(message) {
78489
- return new Promise((resolve38) => {
78518
+ return new Promise((resolve39) => {
78490
78519
  const json2 = serializeMessage(message);
78491
78520
  if (this._stdout.write(json2)) {
78492
- resolve38();
78521
+ resolve39();
78493
78522
  } else {
78494
- this._stdout.once("drain", resolve38);
78523
+ this._stdout.once("drain", resolve39);
78495
78524
  }
78496
78525
  });
78497
78526
  }
@@ -83222,8 +83251,8 @@ var init_debug_controller = __esm({
83222
83251
  async pause(nodeId, phase, ctx) {
83223
83252
  const state = this.buildState(nodeId, phase, ctx);
83224
83253
  this._pauseResolve?.(state);
83225
- return new Promise((resolve38) => {
83226
- this._gateResolve = (action) => resolve38(action);
83254
+ return new Promise((resolve39) => {
83255
+ this._gateResolve = (action) => resolve39(action);
83227
83256
  });
83228
83257
  }
83229
83258
  applyAction(action) {
@@ -83284,8 +83313,8 @@ var init_debug_controller = __esm({
83284
83313
  return outputs;
83285
83314
  }
83286
83315
  _createPausePromise() {
83287
- return new Promise((resolve38) => {
83288
- this._pauseResolve = resolve38;
83316
+ return new Promise((resolve39) => {
83317
+ this._pauseResolve = resolve39;
83289
83318
  });
83290
83319
  }
83291
83320
  };
@@ -83484,8 +83513,8 @@ var init_agent_channel = __esm({
83484
83513
  */
83485
83514
  async request(agentRequest) {
83486
83515
  this._pauseResolve?.(agentRequest);
83487
- return new Promise((resolve38, reject) => {
83488
- this._resolve = resolve38;
83516
+ return new Promise((resolve39, reject) => {
83517
+ this._resolve = resolve39;
83489
83518
  this._reject = reject;
83490
83519
  });
83491
83520
  }
@@ -83515,8 +83544,8 @@ var init_agent_channel = __esm({
83515
83544
  this._pausePromise = this._createPausePromise();
83516
83545
  }
83517
83546
  _createPausePromise() {
83518
- return new Promise((resolve38) => {
83519
- this._pauseResolve = resolve38;
83547
+ return new Promise((resolve39) => {
83548
+ this._pauseResolve = resolve39;
83520
83549
  });
83521
83550
  }
83522
83551
  };
@@ -84873,7 +84902,7 @@ async function runCommandInner(input, options) {
84873
84902
  let executionOrder = resumeExecutionOrder;
84874
84903
  if (!executionOrder) {
84875
84904
  const source = fs36.readFileSync(filePath, "utf8");
84876
- const parsed = await parseWorkflow(source, { workflowName: options.workflow });
84905
+ const parsed = await parseWorkflow(source, { workflowName: options.workflow, projectDir: path40.dirname(filePath) });
84877
84906
  if (parsed.errors.length === 0) {
84878
84907
  executionOrder = getTopologicalOrder(parsed.ast);
84879
84908
  } else {
@@ -85086,7 +85115,7 @@ async function validateMockConfig(mocks, filePath, workflowName) {
85086
85115
  }
85087
85116
  }
85088
85117
  try {
85089
- const result = await parseWorkflow(filePath, { workflowName });
85118
+ const result = await parseWorkflow(filePath, { workflowName, projectDir: path40.dirname(filePath) });
85090
85119
  if (result.errors.length > 0 || !result.ast?.instances) return;
85091
85120
  const usedNodeTypes = new Set(result.ast.instances.map((i) => i.nodeType));
85092
85121
  for (const [section, nodeType] of Object.entries(MOCK_SECTION_TO_NODE)) {
@@ -85148,13 +85177,13 @@ async function runDebugRepl(controller, execPromise, agentChannel, options) {
85148
85177
  output: process.stderr,
85149
85178
  prompt: "> "
85150
85179
  });
85151
- return new Promise((resolve38, reject) => {
85180
+ return new Promise((resolve39, reject) => {
85152
85181
  let resolved = false;
85153
85182
  function finish(value) {
85154
85183
  if (resolved) return;
85155
85184
  resolved = true;
85156
85185
  rl.close();
85157
- resolve38(value);
85186
+ resolve39(value);
85158
85187
  }
85159
85188
  function fail(err) {
85160
85189
  if (resolved) return;
@@ -85366,7 +85395,7 @@ Workflow completed in ${execResult.executionTime}ms`);
85366
85395
  });
85367
85396
  }
85368
85397
  function promptForInput(question) {
85369
- return new Promise((resolve38) => {
85398
+ return new Promise((resolve39) => {
85370
85399
  const rl = readline8.createInterface({
85371
85400
  input: process.stdin,
85372
85401
  output: process.stderr
@@ -85374,7 +85403,7 @@ function promptForInput(question) {
85374
85403
  });
85375
85404
  rl.question(question, (answer) => {
85376
85405
  rl.close();
85377
- resolve38(answer.trim());
85406
+ resolve39(answer.trim());
85378
85407
  });
85379
85408
  });
85380
85409
  }
@@ -85850,6 +85879,15 @@ __export(serve_exports, {
85850
85879
  import * as path41 from "path";
85851
85880
  import * as fs38 from "fs";
85852
85881
  async function serveCommand(dir, options) {
85882
+ try {
85883
+ await import("fastify");
85884
+ } catch {
85885
+ logger.error("The serve command requires fastify. Install it with:");
85886
+ logger.newline();
85887
+ logger.log(" npm install fastify");
85888
+ logger.newline();
85889
+ process.exit(1);
85890
+ }
85853
85891
  const workflowDir = path41.resolve(dir || ".");
85854
85892
  if (!fs38.existsSync(workflowDir)) {
85855
85893
  throw new Error(`Directory not found: ${workflowDir}`);
@@ -86734,131 +86772,6 @@ var init_implement = __esm({
86734
86772
  }
86735
86773
  });
86736
86774
 
86737
- // src/cli/commands/changelog.ts
86738
- var changelog_exports = {};
86739
- __export(changelog_exports, {
86740
- changelogCommand: () => changelogCommand
86741
- });
86742
- import { execSync as execSync6 } from "child_process";
86743
- function categorize(files) {
86744
- for (const category of CATEGORIES2) {
86745
- if (files.some(category.match)) {
86746
- return category.name;
86747
- }
86748
- }
86749
- return "Other";
86750
- }
86751
- function getGitRange(options) {
86752
- if (options.range) {
86753
- return options.range;
86754
- }
86755
- if (options.lastTag) {
86756
- try {
86757
- const lastTag = execSync6("git describe --tags --abbrev=0", {
86758
- encoding: "utf8"
86759
- }).trim();
86760
- return `${lastTag}..HEAD`;
86761
- } catch {
86762
- logger.warn("No git tags found, showing all commits");
86763
- return "HEAD";
86764
- }
86765
- }
86766
- if (options.since) {
86767
- return `--since="${options.since}"`;
86768
- }
86769
- return "-20";
86770
- }
86771
- function getCommits(rangeArg) {
86772
- const isSinceArg = rangeArg.startsWith("--since");
86773
- const isCountArg = rangeArg.startsWith("-");
86774
- let logCmd;
86775
- if (isSinceArg) {
86776
- logCmd = `git log ${rangeArg} --format="%H %s" --no-merges`;
86777
- } else if (isCountArg) {
86778
- logCmd = `git log ${rangeArg} --format="%H %s" --no-merges`;
86779
- } else {
86780
- logCmd = `git log ${rangeArg} --format="%H %s" --no-merges`;
86781
- }
86782
- const logOutput = execSync6(logCmd, { encoding: "utf8" }).trim();
86783
- if (!logOutput) {
86784
- return [];
86785
- }
86786
- const entries = [];
86787
- for (const line of logOutput.split(/\r?\n/)) {
86788
- if (!line.trim()) continue;
86789
- const spaceIdx = line.indexOf(" ");
86790
- const hash = line.slice(0, spaceIdx);
86791
- const message = line.slice(spaceIdx + 1);
86792
- let files;
86793
- try {
86794
- const filesOutput = execSync6(`git diff-tree --no-commit-id --name-only -r ${hash}`, {
86795
- encoding: "utf8"
86796
- }).trim();
86797
- files = filesOutput ? filesOutput.split(/\r?\n/) : [];
86798
- } catch {
86799
- files = [];
86800
- }
86801
- entries.push({ hash: hash.slice(0, 7), message, files });
86802
- }
86803
- return entries;
86804
- }
86805
- async function changelogCommand(options = {}) {
86806
- const rangeArg = getGitRange(options);
86807
- const rangeLabel = options.range || (options.lastTag ? "last tag" : options.since ? `since ${options.since}` : "recent");
86808
- const commits = getCommits(rangeArg);
86809
- if (commits.length === 0) {
86810
- logger.info("No commits found in the specified range.");
86811
- return;
86812
- }
86813
- const grouped = /* @__PURE__ */ new Map();
86814
- for (const commit of commits) {
86815
- const category = categorize(commit.files);
86816
- if (!grouped.has(category)) {
86817
- grouped.set(category, []);
86818
- }
86819
- grouped.get(category).push(commit);
86820
- }
86821
- console.log(`## Changes (${rangeLabel})
86822
- `);
86823
- const categoryOrder = CATEGORIES2.map((c) => c.name);
86824
- const sortedCategories = [...grouped.keys()].sort((a, b) => {
86825
- const idxA = categoryOrder.indexOf(a);
86826
- const idxB = categoryOrder.indexOf(b);
86827
- if (idxA === -1 && idxB === -1) return a.localeCompare(b);
86828
- if (idxA === -1) return 1;
86829
- if (idxB === -1) return -1;
86830
- return idxA - idxB;
86831
- });
86832
- for (const category of sortedCategories) {
86833
- const categoryCommits = grouped.get(category);
86834
- console.log(`### ${category} (${categoryCommits.length} commit${categoryCommits.length !== 1 ? "s" : ""})
86835
- `);
86836
- for (const commit of categoryCommits) {
86837
- console.log(`- ${commit.hash} ${commit.message}`);
86838
- }
86839
- console.log("");
86840
- }
86841
- }
86842
- var CATEGORIES2;
86843
- var init_changelog = __esm({
86844
- "src/cli/commands/changelog.ts"() {
86845
- "use strict";
86846
- init_logger();
86847
- CATEGORIES2 = [
86848
- { name: "Grammar", match: (f) => /parser|chevrotain|grammar/.test(f) },
86849
- { name: "Code Generation", match: (f) => /generator|body-generator|generate/.test(f) },
86850
- { name: "Differ", match: (f) => f.includes("diff/") },
86851
- { name: "CLI", match: (f) => f.includes("cli/commands/") },
86852
- { name: "MCP Tools", match: (f) => f.includes("mcp/") },
86853
- { name: "Deployment", match: (f) => /deployment|export/.test(f) },
86854
- { name: "Runtime", match: (f) => f.includes("runtime/") },
86855
- { name: "Migration", match: (f) => f.includes("migration/") },
86856
- { name: "Tests", match: (f) => f.includes("tests/") || f.includes(".test.") },
86857
- { name: "Documentation", match: (f) => /doc|readme|changelog/i.test(f) }
86858
- ];
86859
- }
86860
- });
86861
-
86862
86775
  // src/cli/commands/docs.ts
86863
86776
  var docs_exports = {};
86864
86777
  __export(docs_exports, {
@@ -87009,7 +86922,7 @@ __export(market_exports, {
87009
86922
  });
87010
86923
  import * as fs45 from "fs";
87011
86924
  import * as path48 from "path";
87012
- import { execSync as execSync7 } from "child_process";
86925
+ import { execSync as execSync6 } from "child_process";
87013
86926
  async function marketInitCommand(name, options = {}) {
87014
86927
  if (!name.startsWith("flow-weaver-pack-")) {
87015
86928
  const suggested = `flow-weaver-pack-${name}`;
@@ -87238,7 +87151,7 @@ async function marketPublishCommand(directory, options = {}) {
87238
87151
  if (tag) npmArgs.push("--tag", tag);
87239
87152
  try {
87240
87153
  logger.newline();
87241
- execSync7(`npm ${npmArgs.join(" ")}`, { cwd: dir, stdio: "inherit" });
87154
+ execSync6(`npm ${npmArgs.join(" ")}`, { cwd: dir, stdio: "inherit" });
87242
87155
  if (!dryRun) {
87243
87156
  logger.newline();
87244
87157
  logger.success(`Published ${pkg.name}@${pkg.version} to npm`);
@@ -87255,7 +87168,7 @@ async function marketInstallCommand(packageSpec, options = {}) {
87255
87168
  logger.newline();
87256
87169
  }
87257
87170
  try {
87258
- execSync7(`npm install ${packageSpec}`, { stdio: json2 ? "pipe" : "inherit" });
87171
+ execSync6(`npm install ${packageSpec}`, { stdio: json2 ? "pipe" : "inherit" });
87259
87172
  } catch (err) {
87260
87173
  if (json2) {
87261
87174
  console.log(JSON.stringify({ success: false, error: getErrorMessage(err) }));
@@ -87813,15 +87726,15 @@ function readLine(prompt2) {
87813
87726
  return Promise.resolve(null);
87814
87727
  }
87815
87728
  const rl = readline9.createInterface({ input: process.stdin, output: process.stderr });
87816
- return new Promise((resolve38) => {
87729
+ return new Promise((resolve39) => {
87817
87730
  let answered = false;
87818
87731
  rl.question(prompt2, (answer) => {
87819
87732
  answered = true;
87820
87733
  rl.close();
87821
- resolve38(answer.trim());
87734
+ resolve39(answer.trim());
87822
87735
  });
87823
87736
  rl.on("close", () => {
87824
- if (!answered) resolve38(null);
87737
+ if (!answered) resolve39(null);
87825
87738
  });
87826
87739
  });
87827
87740
  }
@@ -88075,7 +87988,7 @@ async function authStatusCommand() {
88075
87988
  }
88076
87989
  function prompt(message, hidden = false) {
88077
87990
  if (hidden && process.stdin.isTTY) {
88078
- return new Promise((resolve38) => {
87991
+ return new Promise((resolve39) => {
88079
87992
  process.stderr.write(message);
88080
87993
  process.stdin.setRawMode(true);
88081
87994
  process.stdin.resume();
@@ -88087,7 +88000,7 @@ function prompt(message, hidden = false) {
88087
88000
  process.stdin.pause();
88088
88001
  process.stdin.removeListener("data", handler);
88089
88002
  process.stderr.write("\n");
88090
- resolve38(input);
88003
+ resolve39(input);
88091
88004
  } else if (ch === "") {
88092
88005
  process.stdin.setRawMode(false);
88093
88006
  process.exit(1);
@@ -88100,11 +88013,11 @@ function prompt(message, hidden = false) {
88100
88013
  process.stdin.on("data", handler);
88101
88014
  });
88102
88015
  }
88103
- return new Promise((resolve38) => {
88016
+ return new Promise((resolve39) => {
88104
88017
  const rl = readline10.createInterface({ input: process.stdin, output: process.stderr });
88105
88018
  rl.question(message, (answer) => {
88106
88019
  rl.close();
88107
- resolve38(answer);
88020
+ resolve39(answer);
88108
88021
  });
88109
88022
  });
88110
88023
  }
@@ -88618,7 +88531,7 @@ var init_device_connection = __esm({
88618
88531
  const wsUrl = this.options.platformUrl.replace(/^http/, "ws").replace(/\/$/, "") + "/ws/device";
88619
88532
  this.log(`Connecting to ${wsUrl}...`);
88620
88533
  this.shouldReconnect = true;
88621
- return new Promise((resolve38, reject) => {
88534
+ return new Promise((resolve39, reject) => {
88622
88535
  try {
88623
88536
  this.ws = new WebSocket(`${wsUrl}?token=${encodeURIComponent(this.options.token)}`);
88624
88537
  } catch (err) {
@@ -88635,7 +88548,7 @@ var init_device_connection = __esm({
88635
88548
  }
88636
88549
  }, 3e4);
88637
88550
  this.options.onConnect?.();
88638
- resolve38();
88551
+ resolve39();
88639
88552
  });
88640
88553
  this.ws.addEventListener("message", async (event) => {
88641
88554
  try {
@@ -88741,12 +88654,12 @@ import * as path52 from "node:path";
88741
88654
  import * as os5 from "node:os";
88742
88655
  import * as readline11 from "node:readline";
88743
88656
  function promptYesNo(message) {
88744
- return new Promise((resolve38) => {
88657
+ return new Promise((resolve39) => {
88745
88658
  const rl = readline11.createInterface({ input: process.stdin, output: process.stderr });
88746
88659
  rl.question(message, (answer) => {
88747
88660
  rl.close();
88748
88661
  const normalized = answer.trim().toLowerCase();
88749
- resolve38(normalized === "" || normalized === "y" || normalized === "yes");
88662
+ resolve39(normalized === "" || normalized === "y" || normalized === "yes");
88750
88663
  });
88751
88664
  });
88752
88665
  }
@@ -88867,15 +88780,15 @@ async function handleConnect(projectDir) {
88867
88780
  try {
88868
88781
  await conn.connect();
88869
88782
  console.log(" \x1B[2mPress Ctrl+C to disconnect.\x1B[0m\n");
88870
- await new Promise((resolve38) => {
88783
+ await new Promise((resolve39) => {
88871
88784
  process.on("SIGINT", () => {
88872
88785
  console.log("\n \x1B[2mDisconnecting...\x1B[0m");
88873
88786
  conn.disconnect();
88874
- resolve38();
88787
+ resolve39();
88875
88788
  });
88876
88789
  process.on("SIGTERM", () => {
88877
88790
  conn.disconnect();
88878
- resolve38();
88791
+ resolve39();
88879
88792
  });
88880
88793
  });
88881
88794
  } catch (err) {
@@ -88933,7 +88846,7 @@ function parseIntStrict(value) {
88933
88846
  // src/cli/index.ts
88934
88847
  init_logger();
88935
88848
  init_error_utils();
88936
- var version2 = true ? "0.29.1" : "0.0.0-dev";
88849
+ var version2 = true ? "0.30.1" : "0.0.0-dev";
88937
88850
  var program2 = new Command();
88938
88851
  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", () => {
88939
88852
  logger.banner(version2);
@@ -89009,7 +88922,7 @@ program2.command("watch <input>").description("Watch workflow files and recompil
89009
88922
  if (options.workflow) options.workflowName = options.workflow;
89010
88923
  await watchCommand2(input, options);
89011
88924
  }));
89012
- program2.command("dev <input>").description("Watch, compile, and run workflow on changes").option("--params <json>", "Input parameters as JSON string").option("--params-file <path>", "Path to JSON file with input parameters").option("-w, --workflow <name>", "Specific workflow name to run").option("-p, --production", "Run in production mode (no trace events)", false).option("-f, --format <format>", "Module format: esm, cjs, or auto", "auto").option("--clean", "Omit redundant @param/@returns annotations", false).option("--once", "Run once then exit", false).option("--json", "Output result as JSON", false).option("--target <target>", "Compilation target (default: typescript)").action(wrapAction(async (input, options) => {
88925
+ program2.command("dev <input>").description("Watch, compile, and run workflow on changes").option("--params <json>", "Input parameters as JSON string").option("--params-file <path>", "Path to JSON file with input parameters").option("-w, --workflow <name>", "Specific workflow name to run").option("-p, --production", "Run in production mode (no trace events)", false).option("-f, --format <format>", "Module format: esm, cjs, or auto", "auto").option("--clean", "Omit redundant @param/@returns annotations", false).option("--once", "Run once then exit", false).option("--json", "Output result as JSON", false).option("--target <target>", "Compilation target (default: typescript)").option("--mocks <json>", "Mock config for built-in nodes (events, invocations, agents, fast) as JSON").option("--mocks-file <path>", "Path to JSON file with mock config for built-in nodes").action(wrapAction(async (input, options) => {
89013
88926
  const { devCommand: devCommand2 } = await Promise.resolve().then(() => (init_dev(), dev_exports));
89014
88927
  await devCommand2(input, options);
89015
88928
  }));
@@ -89129,10 +89042,6 @@ program2.command("implement <input> [node]").description("Replace a stub node wi
89129
89042
  if (options.workflow) options.workflowName = options.workflow;
89130
89043
  await implementCommand2(input, nodeName, options);
89131
89044
  }));
89132
- program2.command("changelog").description("Generate changelog from git history, categorized by file path").option("--last-tag", "From last git tag to HEAD", false).option("--since <date>", 'Date-based range (e.g., "2024-01-01")').option("-r, --range <range>", 'Custom git range (e.g., "v0.1.0..HEAD")').action(wrapAction(async (options) => {
89133
- const { changelogCommand: changelogCommand2 } = await Promise.resolve().then(() => (init_changelog(), changelog_exports));
89134
- await changelogCommand2(options);
89135
- }));
89136
89045
  program2.command("docs [args...]").description("Browse reference documentation").option("--json", "Output as JSON", false).option("--compact", "Return compact LLM-friendly version", false).action(wrapAction(async (args, options) => {
89137
89046
  const { docsListCommand: docsListCommand2, docsReadCommand: docsReadCommand2, docsSearchCommand: docsSearchCommand2 } = await Promise.resolve().then(() => (init_docs2(), docs_exports));
89138
89047
  if (args.length === 0 || args[0] === "list") {