omnius 1.0.563 → 1.0.564

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
@@ -8971,6 +8971,11 @@ function unifiedModelStoreDir() {
8971
8971
  function unifiedRuntimeDir(kind, backend) {
8972
8972
  return join12(mediaStoreRoot(), "runtimes", kind, `.venv-${backend}`);
8973
8973
  }
8974
+ function unifiedVoiceStoreDir() {
8975
+ const relocated = join12(mediaStoreRoot(), "voice");
8976
+ const legacy = join12(omniusHomeDir(), "voice");
8977
+ return relocated !== legacy && !existsSync14(relocated) && existsSync14(legacy) ? legacy : relocated;
8978
+ }
8974
8979
  function metaFile() {
8975
8980
  return join12(unifiedModelStoreDir(), "_meta.json");
8976
8981
  }
@@ -284149,6 +284154,18 @@ function freeBytesAt(path16) {
284149
284154
  return Number.MAX_SAFE_INTEGER;
284150
284155
  }
284151
284156
  }
284157
+ function legacyVoiceSourceFor(fromRoot) {
284158
+ if (resolvePath(fromRoot) === resolvePath(omniusHomeDir()))
284159
+ return null;
284160
+ const legacy = join52(omniusHomeDir(), "voice");
284161
+ return existsSync44(legacy) ? legacy : null;
284162
+ }
284163
+ function relocationSourceFor(name10, fromRoot) {
284164
+ const standard = join52(fromRoot, name10);
284165
+ if (existsSync44(standard) || name10 !== "voice")
284166
+ return standard;
284167
+ return legacyVoiceSourceFor(fromRoot) ?? standard;
284168
+ }
284152
284169
  function treeSizeNoFollow(dir) {
284153
284170
  let entries;
284154
284171
  try {
@@ -284205,14 +284222,15 @@ function relocateMediaStore(args) {
284205
284222
  } catch {
284206
284223
  }
284207
284224
  };
284208
- if (toRoot === resolvePath(fromRoot)) {
284225
+ const hasDetachedLegacyVoice = Boolean(legacyVoiceSourceFor(fromRoot) && !existsSync44(join52(fromRoot, "voice")));
284226
+ if (toRoot === resolvePath(fromRoot) && !hasDetachedLegacyVoice) {
284209
284227
  return { fromRoot, toRoot, movedSubtrees: [], bytesMoved: 0, dryRun };
284210
284228
  }
284211
284229
  emit2({ stage: "scan", bytesDone: 0, bytesTotal: 0, message: "Measuring store…" });
284212
284230
  const present = [];
284213
284231
  let bytesTotal = 0;
284214
284232
  for (const name10 of RELOCATABLE_SUBTREES) {
284215
- const src2 = join52(fromRoot, name10);
284233
+ const src2 = relocationSourceFor(name10, fromRoot);
284216
284234
  if (!existsSync44(src2))
284217
284235
  continue;
284218
284236
  const dst = join52(toRoot, name10);
@@ -284318,14 +284336,15 @@ async function relocateMediaStoreAsync(args) {
284318
284336
  } catch {
284319
284337
  }
284320
284338
  };
284321
- if (toRoot === resolvePath(fromRoot)) {
284339
+ const hasDetachedLegacyVoice = Boolean(legacyVoiceSourceFor(fromRoot) && !existsSync44(join52(fromRoot, "voice")));
284340
+ if (toRoot === resolvePath(fromRoot) && !hasDetachedLegacyVoice) {
284322
284341
  return { fromRoot, toRoot, movedSubtrees: [], bytesMoved: 0, dryRun };
284323
284342
  }
284324
284343
  emit2({ stage: "scan", bytesDone: 0, bytesTotal: 0, message: "Measuring store…" });
284325
284344
  const present = [];
284326
284345
  let bytesTotal = 0;
284327
284346
  for (const name10 of RELOCATABLE_SUBTREES) {
284328
- const src2 = join52(fromRoot, name10);
284347
+ const src2 = relocationSourceFor(name10, fromRoot);
284329
284348
  if (!existsSync44(src2))
284330
284349
  continue;
284331
284350
  const dst = join52(toRoot, name10);
@@ -284466,7 +284485,7 @@ var init_media_store_migrate = __esm({
284466
284485
  audio: "audio",
284467
284486
  music: "music"
284468
284487
  };
284469
- RELOCATABLE_SUBTREES = ["models", "runtimes", "media"];
284488
+ RELOCATABLE_SUBTREES = ["models", "runtimes", "media", "voice"];
284470
284489
  MEDIA_EXTENSIONS = {
284471
284490
  image: /* @__PURE__ */ new Set([".png", ".jpg", ".jpeg", ".webp", ".gif"]),
284472
284491
  video: /* @__PURE__ */ new Set([".mp4", ".webm", ".mov", ".gif"]),
@@ -547377,7 +547396,11 @@ import { copyFileSync as copyFileSync4, existsSync as existsSync63, statSync as
547377
547396
  import { basename as basename15, dirname as dirname21, extname as extname12, isAbsolute as isAbsolute5, join as join77, resolve as resolve40 } from "node:path";
547378
547397
  import { homedir as homedir17, tmpdir as tmpdir13 } from "node:os";
547379
547398
  function ttsPythonEnv(extra = {}) {
547380
- const env2 = { ...process.env, ...extra };
547399
+ const env2 = {
547400
+ ...process.env,
547401
+ ...unifiedPythonEnv(),
547402
+ ...extra
547403
+ };
547381
547404
  applyMediaCudaDeviceFilterToEnv(env2, "tts");
547382
547405
  return env2;
547383
547406
  }
@@ -547475,7 +547498,7 @@ function playSoundFile(file, opts = {}) {
547475
547498
  }
547476
547499
  }
547477
547500
  function voiceDir() {
547478
- return join77(homedir17(), ".omnius", "voice");
547501
+ return unifiedVoiceStoreDir();
547479
547502
  }
547480
547503
  function cloneRefsDir() {
547481
547504
  return join77(voiceDir(), "clone-refs");
@@ -547749,8 +547772,10 @@ function pythonCanImportLuxTts(venvPy) {
547749
547772
  "import sys, os; sys.path.insert(0, os.environ['LUXTTS_REPO_PATH']); from zipvoice.luxvoice import LuxTTS; print('ok')"
547750
547773
  ], {
547751
547774
  stdio: "pipe",
547752
- timeout: 3e4,
547753
- env: { ...process.env, LUXTTS_REPO_PATH: luxttsRepoDir() }
547775
+ // A cold PyTorch/CUDA import can legitimately take longer than 30 s.
547776
+ // Do not classify that timeout as a corrupt venv and reinstall it.
547777
+ timeout: 12e4,
547778
+ env: ttsPythonEnv({ LUXTTS_REPO_PATH: luxttsRepoDir() })
547754
547779
  });
547755
547780
  return true;
547756
547781
  } catch {
@@ -547767,7 +547792,7 @@ function pipInstall(venvPy, packages, timeout2 = 9e5) {
547767
547792
  execFileSync2(venvPy, ["-m", "pip", "install", "--prefer-binary", ...packages], {
547768
547793
  stdio: "pipe",
547769
547794
  timeout: timeout2,
547770
- env: process.env
547795
+ env: ttsPythonEnv()
547771
547796
  });
547772
547797
  }
547773
547798
  function withVisibleElevationPrompt(reason, run2) {
@@ -548112,7 +548137,9 @@ function ensureLuxttsInstalled() {
548112
548137
  {
548113
548138
  label: "LinaCodec",
548114
548139
  args: ["git+https://github.com/ysharma3501/LinaCodec.git"],
548115
- fatal: false,
548140
+ // LuxTTS imports LinaCodec; accepting a failed install here leaves a
548141
+ // venv that will fail its health check on every subsequent run.
548142
+ fatal: true,
548116
548143
  retryWithSystemDeps: true,
548117
548144
  timeout: 12e5
548118
548145
  },
@@ -548545,6 +548572,7 @@ var init_audio_playback = __esm({
548545
548572
  "use strict";
548546
548573
  init_hf_media_models();
548547
548574
  init_cuda_device_filter();
548575
+ init_model_store();
548548
548576
  _luxttsDaemon = null;
548549
548577
  _luxttsReady = false;
548550
548578
  _luxttsRequestId = 0;
@@ -563004,6 +563032,7 @@ __export(dist_exports2, {
563004
563032
  unifiedModelStoreDir: () => unifiedModelStoreDir,
563005
563033
  unifiedPythonEnv: () => unifiedPythonEnv,
563006
563034
  unifiedRuntimeDir: () => unifiedRuntimeDir,
563035
+ unifiedVoiceStoreDir: () => unifiedVoiceStoreDir,
563007
563036
  updateWorkboardCard: () => updateWorkboardCard,
563008
563037
  updateWorkboardMetadata: () => updateWorkboardMetadata,
563009
563038
  validateCustomToolDefinition: () => validateCustomToolDefinition,
@@ -671709,6 +671738,7 @@ var init_voice_room_dsp = __esm({
671709
671738
  // packages/cli/src/tui/voice.ts
671710
671739
  var voice_exports = {};
671711
671740
  __export(voice_exports, {
671741
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS: () => LUXTTS_IMPORT_PROBE_TIMEOUT_MS,
671712
671742
  VoiceEngine: () => VoiceEngine,
671713
671743
  applySupertonicExpressionTags: () => applySupertonicExpressionTags,
671714
671744
  computeProsodyHint: () => computeProsodyHint,
@@ -671718,6 +671748,7 @@ __export(voice_exports, {
671718
671748
  describeToolResult: () => describeToolResult,
671719
671749
  getSupertonicVoiceOptions: () => getSupertonicVoiceOptions,
671720
671750
  listVoiceModels: () => listVoiceModels,
671751
+ luxttsImportProbeCommand: () => luxttsImportProbeCommand,
671721
671752
  registerCustomOnnxModel: () => registerCustomOnnxModel,
671722
671753
  resetNarrationContext: () => resetNarrationContext
671723
671754
  });
@@ -671794,7 +671825,7 @@ function getSupertonicVoiceOptions() {
671794
671825
  };
671795
671826
  }
671796
671827
  function voiceDir2() {
671797
- return join156(mediaStoreRoot(), "voice");
671828
+ return unifiedVoiceStoreDir();
671798
671829
  }
671799
671830
  function modelsDir() {
671800
671831
  return join156(voiceDir2(), "models");
@@ -671823,6 +671854,15 @@ function luxttsCloneRefsDir() {
671823
671854
  function luxttsInferScript2() {
671824
671855
  return join156(voiceDir2(), "luxtts-infer.py");
671825
671856
  }
671857
+ function luxttsImportProbeCommand(venvPy, repoDir) {
671858
+ const script = [
671859
+ "import sys",
671860
+ `sys.path.insert(0, ${JSON.stringify(repoDir)})`,
671861
+ "from zipvoice.luxvoice import LuxTTS",
671862
+ "print('ok')"
671863
+ ].join("; ");
671864
+ return `${JSON.stringify(venvPy)} -c ${JSON.stringify(script)}`;
671865
+ }
671826
671866
  function supertonicVenvDir() {
671827
671867
  return join156(voiceDir2(), "supertonic3-venv");
671828
671868
  }
@@ -672754,7 +672794,7 @@ function formatBytes11(bytes) {
672754
672794
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)}KB`;
672755
672795
  return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
672756
672796
  }
672757
- var VOICE_MODELS, COMMON_PROJECT_ROOTS, DEFAULT_MISO_SETTINGS, SUPERTONIC_LANGS, SUPERTONIC_VOICES, DEFAULT_SUPERTONIC_SETTINGS, SUPERTONIC_EXPRESSION_TAG_RE, SUPERTONIC_INFER_PY2, VoiceEngine, RING_BUFFER_SIZE, narration;
672797
+ var VOICE_MODELS, LUXTTS_IMPORT_PROBE_TIMEOUT_MS, COMMON_PROJECT_ROOTS, DEFAULT_MISO_SETTINGS, SUPERTONIC_LANGS, SUPERTONIC_VOICES, DEFAULT_SUPERTONIC_SETTINGS, SUPERTONIC_EXPRESSION_TAG_RE, SUPERTONIC_INFER_PY2, VoiceEngine, RING_BUFFER_SIZE, narration;
672758
672798
  var init_voice = __esm({
672759
672799
  "packages/cli/src/tui/voice.ts"() {
672760
672800
  init_typed_node_events();
@@ -672854,6 +672894,7 @@ var init_voice = __esm({
672854
672894
  supertonicLang: "en"
672855
672895
  }
672856
672896
  };
672897
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS = 12e4;
672857
672898
  COMMON_PROJECT_ROOTS = [
672858
672899
  "projects",
672859
672900
  "src",
@@ -674701,15 +674742,9 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674701
674742
  if (existsSync147(venvPy)) {
674702
674743
  try {
674703
674744
  const repoPath2 = luxttsRepoDir2();
674704
- const importProbe = [
674705
- "import sys",
674706
- `sys.path.insert(0, ${JSON.stringify(repoPath2)})`,
674707
- "from zipvoice.luxvoice import LuxTTS",
674708
- "print('ok')"
674709
- ].join("; ");
674710
674745
  await this.asyncShell(
674711
- `${JSON.stringify(venvPy)} -c ${JSON.stringify(importProbe)}`,
674712
- 12e4
674746
+ luxttsImportProbeCommand(venvPy, repoPath2),
674747
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS
674713
674748
  );
674714
674749
  let hasCudaSys = false;
674715
674750
  try {
@@ -674723,8 +674758,14 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674723
674758
  15e3
674724
674759
  ).then(async (torchCheck) => {
674725
674760
  if (torchCheck === "cpu") {
674761
+ if (process.env["OMNIUS_VOICE_AUTO_REPAIR_CUDA"] !== "1") {
674762
+ renderWarning(
674763
+ "GPU detected but LuxTTS PyTorch is CPU-only. Preserving the working runtime; set OMNIUS_VOICE_AUTO_REPAIR_CUDA=1 to explicitly permit a CUDA wheel repair."
674764
+ );
674765
+ return;
674766
+ }
674726
674767
  renderWarning(
674727
- "GPU detected but PyTorch is CPU-only. Reinstalling with CUDA support in background..."
674768
+ "GPU detected but PyTorch is CPU-only. Explicit CUDA repair is running in background..."
674728
674769
  );
674729
674770
  try {
674730
674771
  const detectScript = join156(voiceDir2(), "detect-torch.py");
@@ -675068,11 +675109,17 @@ Error: ${err instanceof Error ? err.message : String(err)}`
675068
675109
  },
675069
675110
  {
675070
675111
  cmd: `${pipCmd} -m pip install --quiet "git+https://github.com/ysharma3501/LinaCodec.git"`,
675071
- fatal: false,
675112
+ // LuxTTS imports LinaCodec during module import. Allowing this
675113
+ // to fail creates a permanently unhealthy venv that is repaired
675114
+ // again on every launch.
675115
+ fatal: true,
675072
675116
  label: "LinaCodec"
675073
675117
  },
675074
675118
  {
675075
- cmd: `${pipCmd} -m pip install --quiet -e ${JSON.stringify(repoDir)}`,
675119
+ // Dependencies are installed explicitly above. Avoid letting an
675120
+ // editable install re-resolve optional dependencies and alter a
675121
+ // known-good managed environment on every repair.
675122
+ cmd: `${pipCmd} -m pip install --quiet --no-deps -e ${JSON.stringify(repoDir)}`,
675076
675123
  fatal: true,
675077
675124
  label: "LuxTTS (editable install)"
675078
675125
  }
@@ -675093,8 +675140,8 @@ Error: ${err instanceof Error ? err.message : String(err)}`
675093
675140
  }
675094
675141
  try {
675095
675142
  await this.asyncShell(
675096
- `${venvPy} -c "import sys; sys.path.insert(0, '${repoDir}'); from zipvoice.luxvoice import LuxTTS; print('ok')"`,
675097
- 3e4
675143
+ luxttsImportProbeCommand(venvPy, repoDir),
675144
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS
675098
675145
  );
675099
675146
  } catch (err) {
675100
675147
  throw new Error(
@@ -677446,7 +677493,7 @@ async function handleSlashCommand(input, ctx3) {
677446
677493
  `Disk: ${formatBytes(disk.freeBytes)} free of ${formatBytes(disk.totalBytes)}`
677447
677494
  );
677448
677495
  renderInfo(
677449
- "Relocate the heavy weights/venvs/gallery with: /models store <folder> (DBs/sessions stay in ~/.omnius)"
677496
+ "Relocate heavy models, managed venvs, voice runtimes, and gallery with: /models store <folder> (DBs/sessions stay in ~/.omnius)"
677450
677497
  );
677451
677498
  return "handled";
677452
677499
  }
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.563",
3
+ "version": "1.0.564",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.563",
9
+ "version": "1.0.564",
10
10
  "bundleDependencies": [
11
11
  "image-to-ascii"
12
12
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.563",
3
+ "version": "1.0.564",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",