@vibeframe/cli 0.108.1 → 0.109.0

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.
package/dist/index.js CHANGED
@@ -11604,13 +11604,32 @@ async function loadKokoroFactory() {
11604
11604
  const mod = await import("kokoro-js");
11605
11605
  return mod.KokoroTTS;
11606
11606
  } catch (err) {
11607
+ const fallback2 = await loadKokoroFromWorkspace();
11608
+ if (fallback2)
11609
+ return fallback2;
11607
11610
  throw mapKokoroImportError(err);
11608
11611
  }
11609
11612
  }
11613
+ async function loadKokoroFromWorkspace(baseDir = process.cwd()) {
11614
+ try {
11615
+ const { readFile: readFile55 } = await import("node:fs/promises");
11616
+ const { join: join29, resolve: resolve85 } = await import("node:path");
11617
+ const { pathToFileURL } = await import("node:url");
11618
+ const pkgDir = resolve85(baseDir, "node_modules", "kokoro-js");
11619
+ const pkg = JSON.parse(await readFile55(join29(pkgDir, "package.json"), "utf-8"));
11620
+ const entry = pkg.exports?.node?.import ?? pkg.exports?.default ?? pkg.module ?? pkg.main;
11621
+ if (!entry)
11622
+ return null;
11623
+ const mod = await import(pathToFileURL(join29(pkgDir, entry)).href);
11624
+ return mod.KokoroTTS ?? null;
11625
+ } catch {
11626
+ return null;
11627
+ }
11628
+ }
11610
11629
  function mapKokoroImportError(err) {
11611
11630
  const code = err instanceof Error && "code" in err ? err.code : void 0;
11612
11631
  if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") {
11613
- return new Error("Local Kokoro TTS is unavailable: optional dependency kokoro-js is not installed (its native dependencies may have failed to build on this platform). Install it with `npm i kokoro-js`, or set ELEVENLABS_API_KEY to use the elevenlabs TTS provider instead.");
11632
+ return new Error("Local Kokoro TTS is unavailable: optional dependency kokoro-js is not installed (its native dependencies may have failed to build on this platform). Install it with `npm i kokoro-js` \u2014 run it inside your workspace folder when using the Claude Desktop extension \u2014 or set ELEVENLABS_API_KEY to use the elevenlabs TTS provider instead.");
11614
11633
  }
11615
11634
  return err instanceof Error ? err : new Error(String(err));
11616
11635
  }
@@ -72890,7 +72909,7 @@ init_source();
72890
72909
  // package.json
72891
72910
  var package_default = {
72892
72911
  name: "@vibeframe/cli",
72893
- version: "0.108.1",
72912
+ version: "0.109.0",
72894
72913
  description: "VibeFrame CLI - agentic video workflow runtime",
72895
72914
  private: false,
72896
72915
  license: "MIT",
@@ -4729,13 +4729,32 @@ async function loadKokoroFactory() {
4729
4729
  const mod = await import("kokoro-js");
4730
4730
  return mod.KokoroTTS;
4731
4731
  } catch (err) {
4732
+ const fallback2 = await loadKokoroFromWorkspace();
4733
+ if (fallback2)
4734
+ return fallback2;
4732
4735
  throw mapKokoroImportError(err);
4733
4736
  }
4734
4737
  }
4738
+ async function loadKokoroFromWorkspace(baseDir = process.cwd()) {
4739
+ try {
4740
+ const { readFile: readFile44 } = await import("node:fs/promises");
4741
+ const { join: join26, resolve: resolve65 } = await import("node:path");
4742
+ const { pathToFileURL } = await import("node:url");
4743
+ const pkgDir = resolve65(baseDir, "node_modules", "kokoro-js");
4744
+ const pkg = JSON.parse(await readFile44(join26(pkgDir, "package.json"), "utf-8"));
4745
+ const entry = pkg.exports?.node?.import ?? pkg.exports?.default ?? pkg.module ?? pkg.main;
4746
+ if (!entry)
4747
+ return null;
4748
+ const mod = await import(pathToFileURL(join26(pkgDir, entry)).href);
4749
+ return mod.KokoroTTS ?? null;
4750
+ } catch {
4751
+ return null;
4752
+ }
4753
+ }
4735
4754
  function mapKokoroImportError(err) {
4736
4755
  const code = err instanceof Error && "code" in err ? err.code : void 0;
4737
4756
  if (code === "ERR_MODULE_NOT_FOUND" || code === "MODULE_NOT_FOUND") {
4738
- return new Error("Local Kokoro TTS is unavailable: optional dependency kokoro-js is not installed (its native dependencies may have failed to build on this platform). Install it with `npm i kokoro-js`, or set ELEVENLABS_API_KEY to use the elevenlabs TTS provider instead.");
4757
+ return new Error("Local Kokoro TTS is unavailable: optional dependency kokoro-js is not installed (its native dependencies may have failed to build on this platform). Install it with `npm i kokoro-js` \u2014 run it inside your workspace folder when using the Claude Desktop extension \u2014 or set ELEVENLABS_API_KEY to use the elevenlabs TTS provider instead.");
4739
4758
  }
4740
4759
  return err instanceof Error ? err : new Error(String(err));
4741
4760
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vibeframe/cli",
3
- "version": "0.108.1",
3
+ "version": "0.109.0",
4
4
  "description": "VibeFrame CLI - agentic video workflow runtime",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -83,8 +83,8 @@
83
83
  "tsx": "^4.21.0",
84
84
  "typescript": "^5.3.3",
85
85
  "vitest": "^1.2.2",
86
- "@vibeframe/ai-providers": "0.108.1",
87
- "@vibeframe/core": "0.108.1"
86
+ "@vibeframe/core": "0.109.0",
87
+ "@vibeframe/ai-providers": "0.109.0"
88
88
  },
89
89
  "engines": {
90
90
  "node": ">=20"