omnius 1.0.563 → 1.0.565

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"]),
@@ -300995,11 +301014,13 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
300995
301014
  const oldKey = canonicalize2(oldTodos);
300996
301015
  const newKey = canonicalize2(incoming);
300997
301016
  if (oldKey === newKey && oldTodos.length > 0) {
301017
+ const active = oldTodos.find((todo) => todo.status === "in_progress");
300998
301018
  return {
300999
301019
  success: true,
301000
301020
  output: JSON.stringify({
301001
301021
  reminder: "[NO-OP] You called todo_write with the same plan you already have. The list is unchanged. Use todo_write ONLY to add new tasks, mark a task in_progress / completed, or record a blocker — not as a way to re-read your plan (use todo_read for that, but the current plan is also surfaced automatically in your context). Proceed with the current in_progress task.",
301002
- todos: oldTodos,
301022
+ todoCount: oldTodos.length,
301023
+ activeTodoId: active?.id ?? null,
301003
301024
  noop: true,
301004
301025
  noProgress: true
301005
301026
  }),
@@ -301018,11 +301039,23 @@ Mark tasks complete IMMEDIATELY after finishing — don't batch. Never mark comp
301018
301039
  });
301019
301040
  const verificationNudgeNeeded = justClosed >= 3 && !hasStructuredEvidence;
301020
301041
  const reminder = "Todos have been modified successfully. Ensure that you continue to use the todo list to track your progress. Mark the current task in_progress and the next task pending. Proceed with the current task.";
301042
+ const oldById = new Map(result.oldTodos.map((todo) => [todo.id, todo]));
301043
+ const changedTodoIds = result.newTodos.filter((todo) => {
301044
+ const previous = oldById.get(todo.id);
301045
+ return !previous || previous.status !== todo.status || previous.blocker !== todo.blocker || previous.parentId !== todo.parentId || previous.verifyCommand !== todo.verifyCommand || JSON.stringify(previous.declaredArtifacts ?? []) !== JSON.stringify(todo.declaredArtifacts ?? []);
301046
+ }).map((todo) => todo.id).slice(0, 20);
301047
+ const statusCounts = result.newTodos.reduce((counts, todo) => {
301048
+ counts[todo.status]++;
301049
+ return counts;
301050
+ }, { pending: 0, in_progress: 0, completed: 0, blocked: 0 });
301051
+ const activeTodo = result.newTodos.find((todo) => todo.status === "in_progress");
301021
301052
  const payload = {
301022
301053
  reminder,
301023
301054
  decompositionContract: "Use parentId for sub-todos. Split the active objective into concrete child leaf todos whenever it contains multiple remaining actions. Keep the active in_progress status on one concrete leaf; parent status is derived from children in the UI/context. Use activeForm for the currently-doing wording, owner for assigned agent/sub-agent, and blocks/blockedBy for cross-todo dependencies. When tool evidence invalidates a child, rewrite that child as blocked or split it into new children instead of overclaiming completion.",
301024
- oldTodos: result.oldTodos,
301025
- newTodos: result.newTodos,
301055
+ todoCount: result.newTodos.length,
301056
+ statusCounts,
301057
+ activeTodoId: activeTodo?.id ?? null,
301058
+ changedTodoIds,
301026
301059
  storageMode: "file-per-task+legacy-mirror",
301027
301060
  verificationNudgeNeeded
301028
301061
  };
@@ -547377,7 +547410,11 @@ import { copyFileSync as copyFileSync4, existsSync as existsSync63, statSync as
547377
547410
  import { basename as basename15, dirname as dirname21, extname as extname12, isAbsolute as isAbsolute5, join as join77, resolve as resolve40 } from "node:path";
547378
547411
  import { homedir as homedir17, tmpdir as tmpdir13 } from "node:os";
547379
547412
  function ttsPythonEnv(extra = {}) {
547380
- const env2 = { ...process.env, ...extra };
547413
+ const env2 = {
547414
+ ...process.env,
547415
+ ...unifiedPythonEnv(),
547416
+ ...extra
547417
+ };
547381
547418
  applyMediaCudaDeviceFilterToEnv(env2, "tts");
547382
547419
  return env2;
547383
547420
  }
@@ -547475,7 +547512,7 @@ function playSoundFile(file, opts = {}) {
547475
547512
  }
547476
547513
  }
547477
547514
  function voiceDir() {
547478
- return join77(homedir17(), ".omnius", "voice");
547515
+ return unifiedVoiceStoreDir();
547479
547516
  }
547480
547517
  function cloneRefsDir() {
547481
547518
  return join77(voiceDir(), "clone-refs");
@@ -547749,8 +547786,10 @@ function pythonCanImportLuxTts(venvPy) {
547749
547786
  "import sys, os; sys.path.insert(0, os.environ['LUXTTS_REPO_PATH']); from zipvoice.luxvoice import LuxTTS; print('ok')"
547750
547787
  ], {
547751
547788
  stdio: "pipe",
547752
- timeout: 3e4,
547753
- env: { ...process.env, LUXTTS_REPO_PATH: luxttsRepoDir() }
547789
+ // A cold PyTorch/CUDA import can legitimately take longer than 30 s.
547790
+ // Do not classify that timeout as a corrupt venv and reinstall it.
547791
+ timeout: 12e4,
547792
+ env: ttsPythonEnv({ LUXTTS_REPO_PATH: luxttsRepoDir() })
547754
547793
  });
547755
547794
  return true;
547756
547795
  } catch {
@@ -547767,7 +547806,7 @@ function pipInstall(venvPy, packages, timeout2 = 9e5) {
547767
547806
  execFileSync2(venvPy, ["-m", "pip", "install", "--prefer-binary", ...packages], {
547768
547807
  stdio: "pipe",
547769
547808
  timeout: timeout2,
547770
- env: process.env
547809
+ env: ttsPythonEnv()
547771
547810
  });
547772
547811
  }
547773
547812
  function withVisibleElevationPrompt(reason, run2) {
@@ -548112,7 +548151,9 @@ function ensureLuxttsInstalled() {
548112
548151
  {
548113
548152
  label: "LinaCodec",
548114
548153
  args: ["git+https://github.com/ysharma3501/LinaCodec.git"],
548115
- fatal: false,
548154
+ // LuxTTS imports LinaCodec; accepting a failed install here leaves a
548155
+ // venv that will fail its health check on every subsequent run.
548156
+ fatal: true,
548116
548157
  retryWithSystemDeps: true,
548117
548158
  timeout: 12e5
548118
548159
  },
@@ -548545,6 +548586,7 @@ var init_audio_playback = __esm({
548545
548586
  "use strict";
548546
548587
  init_hf_media_models();
548547
548588
  init_cuda_device_filter();
548589
+ init_model_store();
548548
548590
  _luxttsDaemon = null;
548549
548591
  _luxttsReady = false;
548550
548592
  _luxttsRequestId = 0;
@@ -563004,6 +563046,7 @@ __export(dist_exports2, {
563004
563046
  unifiedModelStoreDir: () => unifiedModelStoreDir,
563005
563047
  unifiedPythonEnv: () => unifiedPythonEnv,
563006
563048
  unifiedRuntimeDir: () => unifiedRuntimeDir,
563049
+ unifiedVoiceStoreDir: () => unifiedVoiceStoreDir,
563007
563050
  updateWorkboardCard: () => updateWorkboardCard,
563008
563051
  updateWorkboardMetadata: () => updateWorkboardMetadata,
563009
563052
  validateCustomToolDefinition: () => validateCustomToolDefinition,
@@ -579595,6 +579638,13 @@ function retireHistoricalRunEvidence(messages2) {
579595
579638
  if (message2.role !== "system" || typeof message2.content !== "string" || !message2.content.includes("[RUN EVIDENCE]")) {
579596
579639
  continue;
579597
579640
  }
579641
+ if (/\btool=todo_write\b/i.test(message2.content) && /"(?:oldTodos|newTodos)"\s*:/i.test(message2.content)) {
579642
+ out[index] = {
579643
+ ...message2,
579644
+ content: "[RUN EVIDENCE] tool=todo_write status=ok; historical todo payload retired. Use the current todo plan for active state."
579645
+ };
579646
+ continue;
579647
+ }
579598
579648
  const text2 = message2.content.toLowerCase();
579599
579649
  const bucket2 = /\b(?:file_edit|file_write|patch|apply_patch)\b/.test(text2) ? "mutation" : /\b(?:shell|verifier|compile|build|test)\b/.test(text2) ? "verification" : "discovery";
579600
579650
  const retained = retainedByBucket.get(bucket2) ?? 0;
@@ -579915,8 +579965,8 @@ var init_context_compiler = __esm({
579915
579965
  MODEL_FACING_ACTION_GROUND_TRUTH_CHAR_CAP = 5500;
579916
579966
  CONTROLLER_STATE_MARKER = "[CONTROLLER STATE v1]";
579917
579967
  ACTION_GROUND_TRUTH_MARKER = "[RECENT ACTION GROUND TRUTH]";
579918
- LEGACY_RUNTIME_CONTROL_FRAGMENT_RE = /(?:\bREG-\d+\b|\bfocus supervisor\b|\bworld[ -]state\b|\brecent tool failures\b|\bstop\s*[—-]\s*retry loop\b|\bstagnation replan\b|\bfirst-edit nudge\b|\bintra-run lesson\b|\blocal error-informed nudge\b|\b(?:failure|failing)\s+(?:recovery|replan|loop|recap)\b|\b(?:controller|admin)\s+(?:summary|recap|reflection)\b|\bdoom-loop\b|\b(?:prior\s+)?failure reflection\b|\breflexion\b|\b(?:cross-session|prior)\s+lessons?\b|\bprogress gate\b|\bforecast\b)/i;
579919
- LEGACY_RUNTIME_CONTROL_BLOCK_START_RE = /(?:\[(?:REG-\d+|FOCUS SUPERVISOR[^\]]*|WORLD[ -]STATE[^\]]*|RECENT TOOL FAILURES|STOP\s*[—-]\s*RETRY LOOP|STAGNATION REPLAN[^\]]*|FIRST-EDIT NUDGE[^\]]*|INTRA-RUN LESSON[^\]]*|LOCAL ERROR-INFORMED NUDGE[^\]]*|FORECAST[^\]]*|PROGRESS GATE[^\]]*|FAIL(?:URE|ING)[^\]]*(?:RECOVERY|REPLAN|LOOP)[^\]]*|DOOM-LOOP[^\]]*)\]|<(?:world-state|focus-supervisor|failure-recovery|reflection|lessons?)[^>]*>)/i;
579968
+ LEGACY_RUNTIME_CONTROL_FRAGMENT_RE = /(?:\bREG-\d+\b|\bfocus supervisor\b|\bworld[ -]state\b|\brecent tool failures\b|\bstop\s*[—-]\s*retry loop\b|\bstagnation replan\b|\bfirst-edit nudge\b|\bintra-run lesson\b|\blocal error-informed nudge\b|\b(?:failure|failing)\s+(?:recovery|replan|loop|recap)\b|\b(?:controller|admin)\s+(?:summary|recap|reflection)\b|\bdoom-loop\b|\b(?:prior\s+)?failure reflection\b|\breflexion\b|\b(?:cross-session|prior)\s+lessons?\b|\bprogress (?:gate|check)\b|\brestored todo verification\b|\bforecast\b)/i;
579969
+ LEGACY_RUNTIME_CONTROL_BLOCK_START_RE = /(?:\[(?:REG-\d+|FOCUS SUPERVISOR[^\]]*|WORLD[ -]STATE[^\]]*|RECENT TOOL FAILURES|STOP\s*[—-]\s*RETRY LOOP|STAGNATION REPLAN[^\]]*|FIRST-EDIT NUDGE[^\]]*|INTRA-RUN LESSON[^\]]*|LOCAL ERROR-INFORMED NUDGE[^\]]*|FORECAST[^\]]*|PROGRESS (?:GATE|CHECK)[^\]]*|RESTORED TODO VERIFICATION[^\]]*|FAIL(?:URE|ING)[^\]]*(?:RECOVERY|REPLAN|LOOP)[^\]]*|DOOM-LOOP[^\]]*)\]|<(?:world-state|focus-supervisor|failure-recovery|reflection|lessons?)[^>]*>)/i;
579920
579970
  ASSISTANT_READ_INTENT_RETIRED_MARKER = "[assistant read intent retired: the linked tool result is already available; decide from that evidence instead of restating a read plan]";
579921
579971
  RESTORE_NOISE_LINE_RE = /^\s*(?:🔊|E Task timeout reached|E Incomplete:|⚠ Task incomplete|Tokens:\s*[\d,]+|▹\s*continue\b|·\s*(?:Starting fresh|Context (?:auto-)?restored|Nexus P2P network connected|REST API:|Voice feedback enabled|Memory maintenance:)|.*\bSHELL TRANSCRIPT\b.*|.*speaker emoji.*).*$/i;
579922
579972
  RUNTIME_GUIDANCE_RE = /\[RUNTIME_GUIDANCE_INTAKE v\d+\][\s\S]*?<<<RUNTIME_GUIDANCE>>>\s*([\s\S]*?)\s*<<<END_RUNTIME_GUIDANCE>>>[\s\S]*?\[\/RUNTIME_GUIDANCE_INTAKE\]/g;
@@ -600629,6 +600679,65 @@ ${notice}`;
600629
600679
  this._supersededTodoIds.add(todo.id);
600630
600680
  this._workboard = null;
600631
600681
  }
600682
+ /**
600683
+ * A new run may share a TUI/session identifier with its predecessor, but it
600684
+ * does not thereby inherit that predecessor's checklist. Keep the old tree
600685
+ * auditable on disk and hide it from every active guard/context surface.
600686
+ *
600687
+ * Explicit continuation is the sole exception. This prevents an old
600688
+ * implementation checklist from being reinterpreted as a blocker for a new
600689
+ * dashboard, catalog, or unrelated request in the same workspace.
600690
+ */
600691
+ _hidePriorSessionTodosForFreshTask(goal) {
600692
+ const todos = this.readSessionTodos() ?? [];
600693
+ if (todos.length === 0)
600694
+ return;
600695
+ const archivedAt = (/* @__PURE__ */ new Date()).toISOString();
600696
+ try {
600697
+ const dir = _pathJoin(this.omniusStateDir(), "task-epoch-archives");
600698
+ _fsMkdirSync(dir, { recursive: true });
600699
+ _fsWriteFileSync(_pathJoin(dir, `${this._activeRunId || this._sessionId}-prior-todos.json`), JSON.stringify({
600700
+ runId: this._activeRunId || this._sessionId,
600701
+ sessionId: this._sessionId,
600702
+ taskEpoch: this._taskEpoch,
600703
+ archivedAt,
600704
+ reason: "fresh_task_boundary",
600705
+ newGoal: goal.slice(0, 800),
600706
+ todos
600707
+ }, null, 2), "utf8");
600708
+ } catch {
600709
+ }
600710
+ for (const todo of todos)
600711
+ this._supersededTodoIds.add(todo.id);
600712
+ this._workboard = null;
600713
+ this.emit({
600714
+ type: "status",
600715
+ content: `Fresh task boundary archived ${todos.length} prior todo(s); their blockers and verifier requirements are historical, not active state.`,
600716
+ timestamp: archivedAt
600717
+ });
600718
+ }
600719
+ /** Clear verifier and recovery state that is meaningful only for one task epoch. */
600720
+ _resetTaskScopedVerifierState() {
600721
+ this._compileFixLoop = null;
600722
+ this._pendingCompileDelegationCardId = null;
600723
+ this._declaredVerifierCommand = null;
600724
+ this._lastDeclaredVerifierOutput = null;
600725
+ this._lastDeclaredVerifierDiagnostics = [];
600726
+ this._lastBuildOutput = null;
600727
+ this._preFoldErrorCount = null;
600728
+ this._preFoldFixerDescription = null;
600729
+ this._recentFailures = [];
600730
+ this._failureReflections.clear();
600731
+ this._verifyFailures.clear();
600732
+ this._verifyCommandFailures.clear();
600733
+ this._artifactInspectionFailures.clear();
600734
+ this._artifactInspectionDoneThisTurn.clear();
600735
+ this._verifyFailuresBaseline.clear();
600736
+ this._lastBuildSuccessTurn = -1;
600737
+ this._lastBuildSuccessCommand = "";
600738
+ this._worldFacts.lastTest = {};
600739
+ delete this._lastVerifierResult;
600740
+ }
600632
600741
  _activateSteering(record, turn) {
600633
600742
  const requiresReconciliation = steeringRequiresReconciliation(record.intent);
600634
600743
  const gatesOldPlan = steeringGatesOldPlan(record.intent);
@@ -600742,6 +600851,7 @@ ${notice}`;
600742
600851
  }
600743
600852
  const previousEpoch = this._taskEpoch;
600744
600853
  this._archiveSupersededTaskState(previousEpoch, record);
600854
+ this._resetTaskScopedVerifierState();
600745
600855
  this._allowImplicitContinuation = false;
600746
600856
  this._taskEpoch += 1;
600747
600857
  this._contextMemoryTaskRecordId = null;
@@ -602228,11 +602338,7 @@ Respond with the assessment and take the selected evidence-backed action.`;
602228
602338
  this._completionCaveat = null;
602229
602339
  this._completionLedger = null;
602230
602340
  this._focusTerminalLedgerRecorded = false;
602231
- this._compileFixLoop = null;
602232
- this._pendingCompileDelegationCardId = null;
602233
- this._declaredVerifierCommand = null;
602234
- this._lastDeclaredVerifierOutput = null;
602235
- this._lastDeclaredVerifierDiagnostics = [];
602341
+ this._resetTaskScopedVerifierState();
602236
602342
  this._staleEditFamilies.clear();
602237
602343
  this._blockedFullWriteAttempts.clear();
602238
602344
  this._lastReadTurnByPathKey.clear();
@@ -602240,7 +602346,7 @@ Respond with the assessment and take the selected evidence-backed action.`;
602240
602346
  this._lastWorldStateTurn = -1;
602241
602347
  this._fileWritesSinceLastWorldState = 0;
602242
602348
  this._resetVisualEvidenceState();
602243
- this._verifyFailuresBaseline = new Set(this._verifyFailures);
602349
+ this._verifyFailuresBaseline = /* @__PURE__ */ new Set();
602244
602350
  if (typeof this.backend.setAbortSignal === "function") {
602245
602351
  this.backend.setAbortSignal(this._turnAbortController.signal);
602246
602352
  }
@@ -602469,6 +602575,10 @@ Respond with the assessment and take the selected evidence-backed action.`;
602469
602575
  this._memexArchive.clear();
602470
602576
  this._todoOutputLedger.clear();
602471
602577
  this._sessionId = this.options.sessionId && String(this.options.sessionId) || process.env["OMNIUS_SESSION_ID"] && String(process.env["OMNIUS_SESSION_ID"]) || `session-${Date.now()}`;
602578
+ const continuesPriorTask = this._allowImplicitContinuation || this._isContinuationResumeGoal(persistentTaskGoal);
602579
+ if (!continuesPriorTask) {
602580
+ this._hidePriorSessionTodosForFreshTask(persistentTaskGoal);
602581
+ }
602472
602582
  this._appState = createAppState({
602473
602583
  sessionId: this._sessionId,
602474
602584
  model: this.backend.model ?? "",
@@ -613584,7 +613694,7 @@ ${trimmedNew}`;
613584
613694
  _isLegacyControlMessage(message2) {
613585
613695
  if (message2.role !== "system" || typeof message2.content !== "string")
613586
613696
  return false;
613587
- return /^(?:\[(?:FIRST-EDIT NUDGE|STAGNATION(?: REPLAN| RECIPE)|STUCK DETECTOR HALT|STUCK-STATE META-ANALYZER|WRITE-THRASH HALT|EDIT-FAIL-THRASH HALT|PROBLEM-FRAME VALIDATION|STICKY ESCALATION|INTRA-RUN LESSON|LEARNED FROM EXPERIENCE|FOCUS SUPERVISOR|REG-\d+ directive active|OPAQUE LOCAL ERROR|LOCAL ERROR-INFORMED NUDGE|PRIOR LESSONS|FAILURE-MODE INTAKE|REFLECTION|Associative Memory)|LOOP CIRCUIT BREAKER)/.test(message2.content);
613697
+ return /^(?:\[(?:FIRST-EDIT NUDGE|STAGNATION(?: REPLAN| RECIPE)|STUCK DETECTOR HALT|STUCK-STATE META-ANALYZER|WRITE-THRASH HALT|EDIT-FAIL-THRASH HALT|PROBLEM-FRAME VALIDATION|STICKY ESCALATION|INTRA-RUN LESSON|LEARNED FROM EXPERIENCE|FOCUS SUPERVISOR|REG-\d+ directive active|OPAQUE LOCAL ERROR|LOCAL ERROR-INFORMED NUDGE|PRIOR LESSONS|FAILURE-MODE INTAKE|REFLECTION|Associative Memory|PROGRESS CHECK|RESTORED TODO VERIFICATION)|LOOP CIRCUIT BREAKER)/.test(message2.content);
613588
613698
  }
613589
613699
  _stripLegacyControlMessages(messages2) {
613590
613700
  for (let index = messages2.length - 1; index >= 0; index--) {
@@ -671709,6 +671819,7 @@ var init_voice_room_dsp = __esm({
671709
671819
  // packages/cli/src/tui/voice.ts
671710
671820
  var voice_exports = {};
671711
671821
  __export(voice_exports, {
671822
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS: () => LUXTTS_IMPORT_PROBE_TIMEOUT_MS,
671712
671823
  VoiceEngine: () => VoiceEngine,
671713
671824
  applySupertonicExpressionTags: () => applySupertonicExpressionTags,
671714
671825
  computeProsodyHint: () => computeProsodyHint,
@@ -671718,6 +671829,7 @@ __export(voice_exports, {
671718
671829
  describeToolResult: () => describeToolResult,
671719
671830
  getSupertonicVoiceOptions: () => getSupertonicVoiceOptions,
671720
671831
  listVoiceModels: () => listVoiceModels,
671832
+ luxttsImportProbeCommand: () => luxttsImportProbeCommand,
671721
671833
  registerCustomOnnxModel: () => registerCustomOnnxModel,
671722
671834
  resetNarrationContext: () => resetNarrationContext
671723
671835
  });
@@ -671794,7 +671906,7 @@ function getSupertonicVoiceOptions() {
671794
671906
  };
671795
671907
  }
671796
671908
  function voiceDir2() {
671797
- return join156(mediaStoreRoot(), "voice");
671909
+ return unifiedVoiceStoreDir();
671798
671910
  }
671799
671911
  function modelsDir() {
671800
671912
  return join156(voiceDir2(), "models");
@@ -671823,6 +671935,15 @@ function luxttsCloneRefsDir() {
671823
671935
  function luxttsInferScript2() {
671824
671936
  return join156(voiceDir2(), "luxtts-infer.py");
671825
671937
  }
671938
+ function luxttsImportProbeCommand(venvPy, repoDir) {
671939
+ const script = [
671940
+ "import sys",
671941
+ `sys.path.insert(0, ${JSON.stringify(repoDir)})`,
671942
+ "from zipvoice.luxvoice import LuxTTS",
671943
+ "print('ok')"
671944
+ ].join("; ");
671945
+ return `${JSON.stringify(venvPy)} -c ${JSON.stringify(script)}`;
671946
+ }
671826
671947
  function supertonicVenvDir() {
671827
671948
  return join156(voiceDir2(), "supertonic3-venv");
671828
671949
  }
@@ -672754,7 +672875,7 @@ function formatBytes11(bytes) {
672754
672875
  if (bytes < 1024 * 1024) return `${(bytes / 1024).toFixed(0)}KB`;
672755
672876
  return `${(bytes / (1024 * 1024)).toFixed(1)}MB`;
672756
672877
  }
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;
672878
+ 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
672879
  var init_voice = __esm({
672759
672880
  "packages/cli/src/tui/voice.ts"() {
672760
672881
  init_typed_node_events();
@@ -672854,6 +672975,7 @@ var init_voice = __esm({
672854
672975
  supertonicLang: "en"
672855
672976
  }
672856
672977
  };
672978
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS = 12e4;
672857
672979
  COMMON_PROJECT_ROOTS = [
672858
672980
  "projects",
672859
672981
  "src",
@@ -674701,15 +674823,9 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674701
674823
  if (existsSync147(venvPy)) {
674702
674824
  try {
674703
674825
  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
674826
  await this.asyncShell(
674711
- `${JSON.stringify(venvPy)} -c ${JSON.stringify(importProbe)}`,
674712
- 12e4
674827
+ luxttsImportProbeCommand(venvPy, repoPath2),
674828
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS
674713
674829
  );
674714
674830
  let hasCudaSys = false;
674715
674831
  try {
@@ -674723,8 +674839,14 @@ Error: ${err instanceof Error ? err.message : String(err)}`
674723
674839
  15e3
674724
674840
  ).then(async (torchCheck) => {
674725
674841
  if (torchCheck === "cpu") {
674842
+ if (process.env["OMNIUS_VOICE_AUTO_REPAIR_CUDA"] !== "1") {
674843
+ renderWarning(
674844
+ "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."
674845
+ );
674846
+ return;
674847
+ }
674726
674848
  renderWarning(
674727
- "GPU detected but PyTorch is CPU-only. Reinstalling with CUDA support in background..."
674849
+ "GPU detected but PyTorch is CPU-only. Explicit CUDA repair is running in background..."
674728
674850
  );
674729
674851
  try {
674730
674852
  const detectScript = join156(voiceDir2(), "detect-torch.py");
@@ -675068,11 +675190,17 @@ Error: ${err instanceof Error ? err.message : String(err)}`
675068
675190
  },
675069
675191
  {
675070
675192
  cmd: `${pipCmd} -m pip install --quiet "git+https://github.com/ysharma3501/LinaCodec.git"`,
675071
- fatal: false,
675193
+ // LuxTTS imports LinaCodec during module import. Allowing this
675194
+ // to fail creates a permanently unhealthy venv that is repaired
675195
+ // again on every launch.
675196
+ fatal: true,
675072
675197
  label: "LinaCodec"
675073
675198
  },
675074
675199
  {
675075
- cmd: `${pipCmd} -m pip install --quiet -e ${JSON.stringify(repoDir)}`,
675200
+ // Dependencies are installed explicitly above. Avoid letting an
675201
+ // editable install re-resolve optional dependencies and alter a
675202
+ // known-good managed environment on every repair.
675203
+ cmd: `${pipCmd} -m pip install --quiet --no-deps -e ${JSON.stringify(repoDir)}`,
675076
675204
  fatal: true,
675077
675205
  label: "LuxTTS (editable install)"
675078
675206
  }
@@ -675093,8 +675221,8 @@ Error: ${err instanceof Error ? err.message : String(err)}`
675093
675221
  }
675094
675222
  try {
675095
675223
  await this.asyncShell(
675096
- `${venvPy} -c "import sys; sys.path.insert(0, '${repoDir}'); from zipvoice.luxvoice import LuxTTS; print('ok')"`,
675097
- 3e4
675224
+ luxttsImportProbeCommand(venvPy, repoDir),
675225
+ LUXTTS_IMPORT_PROBE_TIMEOUT_MS
675098
675226
  );
675099
675227
  } catch (err) {
675100
675228
  throw new Error(
@@ -677446,7 +677574,7 @@ async function handleSlashCommand(input, ctx3) {
677446
677574
  `Disk: ${formatBytes(disk.freeBytes)} free of ${formatBytes(disk.totalBytes)}`
677447
677575
  );
677448
677576
  renderInfo(
677449
- "Relocate the heavy weights/venvs/gallery with: /models store <folder> (DBs/sessions stay in ~/.omnius)"
677577
+ "Relocate heavy models, managed venvs, voice runtimes, and gallery with: /models store <folder> (DBs/sessions stay in ~/.omnius)"
677450
677578
  );
677451
677579
  return "handled";
677452
677580
  }
@@ -761383,7 +761511,10 @@ async function runSelfImprovementCycle(repoRoot) {
761383
761511
  } catch {
761384
761512
  }
761385
761513
  }
761386
- function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler, thinkingEnabled, askUserCallback, selfModifyEnabled, sessionMetrics, realtimeEnabled, restoredRunSessionId, restoredOrientation) {
761514
+ function isExplicitRestoredTaskContinuation(input) {
761515
+ return /^(?:continue|resume|pick\s+up|carry\s+on)\b/i.test(input.trim());
761516
+ }
761517
+ function startTask(task, config, repoRoot, voice, stream, taskStores, bruteForce, statusBar, sudoCallback, costTracker, onComplete, taskType, contextWindowSize, modelCaps, personality, deepContext, onCompaction, emotionEngine, flowEnabled, slashCommandHandler, thinkingEnabled, askUserCallback, selfModifyEnabled, sessionMetrics, realtimeEnabled, restoredRunSessionId, restoredOrientation, actualUserGoal) {
761387
761518
  const voiceStyleMap = {
761388
761519
  concise: 1,
761389
761520
  balanced: 3,
@@ -763155,7 +763286,11 @@ When done, either call task_complete with your answer, or use FINAL_VAR(variable
763155
763286
  ownerId: `session:${sessionId}`
763156
763287
  },
763157
763288
  async () => {
763158
- const result = await runner.run(effectiveTask, systemContext);
763289
+ const result = await runner.run(
763290
+ effectiveTask,
763291
+ systemContext,
763292
+ actualUserGoal ?? task
763293
+ );
763159
763294
  _apiCallbacks?.onRunResult?.(result);
763160
763295
  const tokens = {
763161
763296
  total: result.totalTokens,
@@ -769412,7 +769547,8 @@ ${formatTaskCompletionMeta(previousMetaForIntake)}`
769412
769547
  } catch {
769413
769548
  }
769414
769549
  let taskInput = fullInput;
769415
- let taskSessionId = restoredTaskSessionId;
769550
+ const reuseRestoredTaskSession = Boolean(restoredTaskSessionId) && isExplicitRestoredTaskContinuation(fullInput);
769551
+ let taskSessionId = reuseRestoredTaskSession ? restoredTaskSessionId : null;
769416
769552
  let restoredOrientation = null;
769417
769553
  if (restoredSessionContext) {
769418
769554
  restoredOrientation = sanitizeRestorePromptForModel(restoredSessionContext);
@@ -769469,7 +769605,8 @@ ${taskInput}`;
769469
769605
  sessionMetrics,
769470
769606
  realtimeEnabled,
769471
769607
  taskSessionId,
769472
- restoredOrientation
769608
+ restoredOrientation,
769609
+ fullInput
769473
769610
  );
769474
769611
  activeTask = task;
769475
769612
  _recallText = null;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.563",
3
+ "version": "1.0.565",
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.565",
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.565",
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",