@synergenius/flow-weaver 0.24.3 → 0.24.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9886,7 +9886,7 @@ var VERSION;
9886
9886
  var init_generated_version = __esm({
9887
9887
  "src/generated-version.ts"() {
9888
9888
  "use strict";
9889
- VERSION = "0.24.3";
9889
+ VERSION = "0.24.4";
9890
9890
  }
9891
9891
  });
9892
9892
 
@@ -36231,9 +36231,22 @@ var init_parser2 = __esm({
36231
36231
  const cacheKey = `npm:${imp.importSource}`;
36232
36232
  if (this.importCache.has(cacheKey)) {
36233
36233
  const cached2 = this.importCache.get(cacheKey);
36234
- const found = cached2.nodeTypes.find((nt) => nt.functionName === imp.functionName);
36235
- if (found) {
36236
- return { ...found, name: imp.name, importSource: imp.importSource };
36234
+ const resolvedDts = resolvePackageTypesPath(imp.importSource, currentDir);
36235
+ let cacheValid = false;
36236
+ if (resolvedDts) {
36237
+ try {
36238
+ const dtsStats = fs5.statSync(resolvedDts);
36239
+ cacheValid = cached2.mtime === dtsStats.mtimeMs;
36240
+ } catch {
36241
+ }
36242
+ } else {
36243
+ cacheValid = true;
36244
+ }
36245
+ if (cacheValid) {
36246
+ const found = cached2.nodeTypes.find((nt) => nt.functionName === imp.functionName);
36247
+ if (found) {
36248
+ return { ...found, name: imp.name, importSource: imp.importSource };
36249
+ }
36237
36250
  }
36238
36251
  }
36239
36252
  const dtsPath = resolvePackageTypesPath(imp.importSource, currentDir);
@@ -95960,7 +95973,7 @@ function parseIntStrict(value) {
95960
95973
  // src/cli/index.ts
95961
95974
  init_logger();
95962
95975
  init_error_utils();
95963
- var version2 = true ? "0.24.3" : "0.0.0-dev";
95976
+ var version2 = true ? "0.24.4" : "0.0.0-dev";
95964
95977
  var program2 = new Command();
95965
95978
  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", () => {
95966
95979
  logger.banner(version2);
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.24.3";
1
+ export declare const VERSION = "0.24.4";
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.24.3';
2
+ export const VERSION = '0.24.4';
3
3
  //# sourceMappingURL=generated-version.js.map
package/dist/parser.js CHANGED
@@ -610,14 +610,28 @@ export class AnnotationParser {
610
610
  * Resolve an npm package @fwImport to a node type by reading .d.ts declarations.
611
611
  */
612
612
  resolveNpmImportAnnotation(imp, currentDir) {
613
- // Check cache
613
+ // Check cache (with mtime validation — same pattern as resolveNpmImports)
614
614
  const cacheKey = `npm:${imp.importSource}`;
615
615
  if (this.importCache.has(cacheKey)) {
616
616
  const cached = this.importCache.get(cacheKey);
617
- const found = cached.nodeTypes.find((nt) => nt.functionName === imp.functionName);
618
- if (found) {
619
- // Return a copy with the correct name from @fwImport
620
- return { ...found, name: imp.name, importSource: imp.importSource };
617
+ const resolvedDts = resolvePackageTypesPath(imp.importSource, currentDir);
618
+ let cacheValid = false;
619
+ if (resolvedDts) {
620
+ try {
621
+ const dtsStats = fs.statSync(resolvedDts);
622
+ cacheValid = cached.mtime === dtsStats.mtimeMs;
623
+ }
624
+ catch { /* file gone — re-parse */ }
625
+ }
626
+ else {
627
+ // No .d.ts found — trust cache (package may have been removed)
628
+ cacheValid = true;
629
+ }
630
+ if (cacheValid) {
631
+ const found = cached.nodeTypes.find((nt) => nt.functionName === imp.functionName);
632
+ if (found) {
633
+ return { ...found, name: imp.name, importSource: imp.importSource };
634
+ }
621
635
  }
622
636
  }
623
637
  // Resolve .d.ts path
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@synergenius/flow-weaver",
3
- "version": "0.24.3",
3
+ "version": "0.24.4",
4
4
  "description": "Deterministic workflow compiler for AI agents. Compiles to standalone TypeScript, no runtime dependencies.",
5
5
  "private": false,
6
6
  "type": "module",