omnius 1.0.445 → 1.0.446

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
@@ -578352,7 +578352,11 @@ ${parts.join("\n")}
578352
578352
  if (!card)
578353
578353
  return false;
578354
578354
  const editTools = /* @__PURE__ */ new Set(["file_write", "file_edit", "batch_edit", "file_patch"]);
578355
- return card.evidence.some((e2) => typeof e2.tool === "string" && editTools.has(e2.tool));
578355
+ return card.evidence.some((e2) => {
578356
+ if (typeof e2.tool === "string" && editTools.has(e2.tool))
578357
+ return true;
578358
+ return e2.tool === "shell" && /filesystem mutation/i.test(e2.summary ?? "");
578359
+ });
578356
578360
  }
578357
578361
  _workboardHasVerificationEvidence(card) {
578358
578362
  if (!card)
@@ -578463,11 +578467,14 @@ ${parts.join("\n")}
578463
578467
  lines.push("not_progress=repeat unchanged todo_write; repeat broad discovery already represented in this frame; keep discovery active after a real mutation");
578464
578468
  return lines.join("\n");
578465
578469
  }
578466
- _workboardTargetCardId(snapshot, toolName, result) {
578470
+ _workboardTargetCardId(snapshot, toolName, result, meta = {}) {
578467
578471
  const byId = new Map(snapshot.cards.map((card) => [card.id, card]));
578468
578472
  if (this._isProjectEditTool(toolName) && this._isRealProjectMutation(toolName, result)) {
578469
578473
  return byId.has("implement-repair") ? "implement-repair" : null;
578470
578474
  }
578475
+ if (toolName === "shell" && meta.shellFilesystemMutation === true) {
578476
+ return byId.has("implement-repair") ? "implement-repair" : null;
578477
+ }
578471
578478
  if (toolName === "shell" || toolName === "background_run") {
578472
578479
  const implementation2 = byId.get("implement-repair");
578473
578480
  const target = this._workboardHasEditEvidence(implementation2) ? "integrate-and-run" : "discover-current-state";
@@ -578484,11 +578491,11 @@ ${parts.join("\n")}
578484
578491
  this._workboard = refreshed;
578485
578492
  return refreshed;
578486
578493
  }
578487
- _advanceWorkboardForTool(snapshot, toolName, result, actor) {
578494
+ _advanceWorkboardForTool(snapshot, toolName, result, actor, meta = {}) {
578488
578495
  const dir = this._workboardDir();
578489
578496
  let current = snapshot;
578490
578497
  const byId = () => new Map(current.cards.map((card) => [card.id, card]));
578491
- const editMutation = this._isProjectEditTool(toolName) && this._isRealProjectMutation(toolName, result);
578498
+ const editMutation = this._isProjectEditTool(toolName) && this._isRealProjectMutation(toolName, result) || toolName === "shell" && result?.success === true && meta.shellFilesystemMutation === true;
578492
578499
  try {
578493
578500
  if (editMutation) {
578494
578501
  let cards = byId();
@@ -578550,18 +578557,22 @@ ${parts.join("\n")}
578550
578557
  * Matches by card assignee when the card is in progress.
578551
578558
  * Non-fatal: failures to attach evidence are silently caught.
578552
578559
  */
578553
- recordWorkboardToolCall(toolName, args, success, output, result) {
578560
+ recordWorkboardToolCall(toolName, args, success, output, result, meta = {}) {
578554
578561
  const board = this._workboard ?? this.getOrCreateWorkboard();
578555
578562
  if (!board)
578556
578563
  return;
578557
578564
  if (toolName === "task_complete" || toolName === "workboard_create")
578558
578565
  return;
578566
+ if (meta.repeatShortCircuit || result?.runtimeAuthored)
578567
+ return;
578568
+ if (meta.focusDecisionKind === "block_tool_call")
578569
+ return;
578559
578570
  if (result?.success === true && this._isProjectEditTool(toolName) && !this._isRealProjectMutation(toolName, result)) {
578560
578571
  return;
578561
578572
  }
578562
578573
  const dir = this._workboardDir();
578563
578574
  try {
578564
- const evidenceSummary = `${toolName} ${success ? "ok" : "fail"}`;
578575
+ const evidenceSummary = toolName === "shell" && meta.shellFilesystemMutation ? `shell filesystem mutation ${success ? "ok" : "fail"}` : `${toolName} ${success ? "ok" : "fail"}`;
578565
578576
  const rawEvidenceOutput = typeof output === "string" && output.length > 0 ? output : result?.output || result?.error || "";
578566
578577
  const evidenceContent = rawEvidenceOutput.slice(0, 1e3);
578567
578578
  const evidence = {
@@ -578573,8 +578584,8 @@ ${parts.join("\n")}
578573
578584
  ref: typeof args["path"] === "string" ? args["path"]?.slice(0, 200) : void 0
578574
578585
  };
578575
578586
  const actor = this.options.subAgent ? "sub-agent" : "agent";
578576
- const advanced = this._advanceWorkboardForTool(board, toolName, result, actor);
578577
- const targetCardId = this._workboardTargetCardId(advanced, toolName, result);
578587
+ const advanced = this._advanceWorkboardForTool(board, toolName, result, actor, meta);
578588
+ const targetCardId = this._workboardTargetCardId(advanced, toolName, result, meta);
578578
578589
  if (!targetCardId)
578579
578590
  return;
578580
578591
  const targetCard = advanced.cards.find((card) => card.id === targetCardId);
@@ -587749,7 +587760,9 @@ Read the current file if needed, make a different concrete edit, or move to veri
587749
587760
  success: true,
587750
587761
  output: `[STOP RE-READING — you have requested this exact read ${criticDecision.hitNumber}× and you ALREADY HAVE its full content, shown again below. Do NOT read it again. Act on it: edit the file, run a verification, or call task_complete. If a previous edit failed with "old_string not found", your old_string did not match the file — copy it EXACTLY (including indentation) from the content below.]
587751
587762
 
587752
- ` + cachedResult
587763
+ ` + cachedResult,
587764
+ runtimeAuthored: true,
587765
+ noop: true
587753
587766
  };
587754
587767
  } else if (isFailedShellRepeat) {
587755
587768
  repeatShortCircuit = {
@@ -587776,7 +587789,9 @@ ${cachedResult}`,
587776
587789
  runtimeAuthored: true
587777
587790
  } : {
587778
587791
  success: true,
587779
- output: cachedResult
587792
+ output: cachedResult,
587793
+ runtimeAuthored: true,
587794
+ noop: true
587780
587795
  };
587781
587796
  }
587782
587797
  }
@@ -589181,7 +589196,6 @@ Evidence: ${evidencePreview}`.slice(0, 500);
589181
589196
  turn,
589182
589197
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
589183
589198
  });
589184
- this.recordWorkboardToolCall(tc.name, tc.arguments, result.success, result.output || result.error || output, result);
589185
589199
  this._taskState.toolCallCount++;
589186
589200
  if (realFileMutation) {
589187
589201
  this._lastFileWriteTurn = turn;
@@ -589358,6 +589372,11 @@ Evidence: ${evidencePreview}`.slice(0, 500);
589358
589372
  });
589359
589373
  } catch {
589360
589374
  }
589375
+ this.recordWorkboardToolCall(tc.name, tc.arguments, result.success, result.output || result.error || output, result, {
589376
+ repeatShortCircuit: Boolean(repeatShortCircuit),
589377
+ focusDecisionKind: focusDecision?.kind,
589378
+ shellFilesystemMutation
589379
+ });
589361
589380
  if (tc.name === "todo_write" && !this._isTodoWriteNoopResult(result)) {
589362
589381
  this._lastTodoWriteTurn = turn;
589363
589382
  }
@@ -609750,7 +609769,7 @@ var init_live_sensors = __esm({
609750
609769
  inferEnabled: true,
609751
609770
  clipEnabled: true,
609752
609771
  audioEnabled: true,
609753
- asrEnabled: true,
609772
+ asrEnabled: options2.asr ?? true,
609754
609773
  audioAnalysisEnabled: true,
609755
609774
  videoIntervalMs: options2.lowLatency === false ? this.config.videoIntervalMs : Math.min(this.config.videoIntervalMs, LOW_LATENCY_VIDEO_INTERVAL_MS),
609756
609775
  audioIntervalMs: options2.lowLatency === false ? this.config.audioIntervalMs : Math.min(this.config.audioIntervalMs, LOW_LATENCY_AUDIO_INTERVAL_MS)
@@ -610334,7 +610353,7 @@ ${output}`).join("\n\n");
610334
610353
  transcript = cleanPreview(liveAsr.lastPartialTranscript, 1600);
610335
610354
  asrBackend = [liveAsr.backend, liveAsr.model, "streaming-partial"].filter(Boolean).join(" ");
610336
610355
  } else if (liveAsr.phase === "idle") {
610337
- audioErrors.push("Streaming ASR is not running. Start /live run or /listen to enable CUDA Whisper streaming.");
610356
+ audioErrors.push("Streaming ASR is not active yet; live sound analysis is continuing without a fresh transcript.");
610338
610357
  } else if (liveAsr.lastStatus) {
610339
610358
  audioErrors.push(`Streaming ASR status: ${liveAsr.lastStatus}`);
610340
610359
  }
@@ -661536,11 +661555,24 @@ function attachLiveSinks(ctx3, manager, agentEnabled = false, speechEnabledOverr
661536
661555
  }
661537
661556
  }
661538
661557
  async function ensureLiveStreamingAsr(ctx3, manager, force = false) {
661539
- if (!force && !manager.getConfig().asrEnabled) return;
661540
- if (!ctx3.listenStart) return;
661541
- ctx3.listenSetMode?.("auto");
661542
- const msg = await ctx3.listenStart("live");
661543
- if (!/already active/i.test(msg)) renderInfo(`Live ASR: ${msg}`);
661558
+ if (!force && !manager.getConfig().asrEnabled) return Boolean(ctx3.listenIsActive?.());
661559
+ if (!ctx3.listenStart) {
661560
+ renderWarning("Live ASR auto-start is unavailable in this command context; live audio analysis will continue without transcript intake.");
661561
+ return false;
661562
+ }
661563
+ try {
661564
+ ctx3.listenSetMode?.("auto");
661565
+ const msg = await ctx3.listenStart("live");
661566
+ const active = Boolean(ctx3.listenIsActive?.()) || /already active|listening with|already listening/i.test(msg);
661567
+ if (!/already active/i.test(msg)) {
661568
+ const render2 = active ? renderInfo : renderWarning;
661569
+ render2(`${active ? "Live ASR" : "Live ASR startup"}: ${msg}`);
661570
+ }
661571
+ return active;
661572
+ } catch (err) {
661573
+ renderWarning(`Live ASR startup failed: ${err instanceof Error ? err.message : String(err)}`);
661574
+ return false;
661575
+ }
661544
661576
  }
661545
661577
  async function releaseLiveStreamingAsr(ctx3) {
661546
661578
  try {
@@ -661797,8 +661829,8 @@ async function handleLiveCommand(ctx3, arg) {
661797
661829
  renderWarning("Live PFC agent review is unavailable in this context; starting visual/audio feedback only.");
661798
661830
  }
661799
661831
  await ensureLiveInventory(manager);
661800
- await ensureLiveStreamingAsr(ctx3, manager, true);
661801
- renderInfo(manager.startRunMode({ agent: effectiveAgent, lowLatency: true, speech: effectiveAgent && Boolean(ctx3.voiceSpeak) }));
661832
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
661833
+ renderInfo(manager.startRunMode({ agent: effectiveAgent, lowLatency: true, speech: effectiveAgent && Boolean(ctx3.voiceSpeak), asr: asrStarted }));
661802
661834
  return;
661803
661835
  }
661804
661836
  if (sub2 === "chat" || sub2 === "voicechat" || sub2 === "voice") {
@@ -661899,12 +661931,14 @@ async function handleLiveCommand(ctx3, arg) {
661899
661931
  if (sub2 === "asr") {
661900
661932
  const cfg = manager.getConfig();
661901
661933
  const enabled2 = setBool(value2, !cfg.asrEnabled);
661902
- manager.configure({
661903
- audioEnabled: true,
661904
- asrEnabled: enabled2
661905
- });
661906
- if (enabled2) await ensureLiveStreamingAsr(ctx3, manager);
661907
- else await releaseLiveStreamingAsr(ctx3);
661934
+ if (enabled2) {
661935
+ manager.configure({ audioEnabled: true, asrEnabled: false });
661936
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
661937
+ manager.configure({ asrEnabled: asrStarted });
661938
+ } else {
661939
+ manager.configure({ audioEnabled: true, asrEnabled: false });
661940
+ await releaseLiveStreamingAsr(ctx3);
661941
+ }
661908
661942
  renderInfo(formatLiveStatus(manager.getSnapshot()));
661909
661943
  return;
661910
661944
  }
@@ -661957,8 +661991,9 @@ async function handleLiveCommand(ctx3, arg) {
661957
661991
  }
661958
661992
  if (sub2 === "sample" || sub2 === "hear") {
661959
661993
  await ensureLiveInventory(manager);
661960
- manager.configure({ audioEnabled: true, asrEnabled: true, audioAnalysisEnabled: true });
661961
- await ensureLiveStreamingAsr(ctx3, manager, true);
661994
+ manager.configure({ audioEnabled: true, asrEnabled: false, audioAnalysisEnabled: false });
661995
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
661996
+ manager.configure({ asrEnabled: asrStarted, audioAnalysisEnabled: true });
661962
661997
  renderInfo("Sampling live audio...");
661963
661998
  renderInfo(await manager.sampleAudioNow());
661964
661999
  return;
@@ -662194,8 +662229,8 @@ async function showLiveMenu(ctx3, manager) {
662194
662229
  await ensureLiveInventory(manager);
662195
662230
  if (!manager.isRunning()) {
662196
662231
  attachLiveSinks(ctx3, manager, false);
662197
- await ensureLiveStreamingAsr(ctx3, manager, true);
662198
- renderInfo(manager.startRunMode({ agent: false, lowLatency: true, speech: false }));
662232
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
662233
+ renderInfo(manager.startRunMode({ agent: false, lowLatency: true, speech: false, asr: asrStarted }));
662199
662234
  }
662200
662235
  while (true) {
662201
662236
  await refreshLiveResourceModelSnapshot().catch(() => void 0);
@@ -662353,19 +662388,21 @@ async function showLiveMenu(ctx3, manager) {
662353
662388
  case "toggle-video":
662354
662389
  manager.configure({ videoEnabled: !cfg.videoEnabled });
662355
662390
  continue;
662356
- case "run-live":
662391
+ case "run-live": {
662357
662392
  attachLiveSinks(ctx3, manager, false);
662358
- await ensureLiveStreamingAsr(ctx3, manager, true);
662359
- renderInfo(manager.startRunMode({ agent: false, lowLatency: true, speech: false }));
662393
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
662394
+ renderInfo(manager.startRunMode({ agent: false, lowLatency: true, speech: false, asr: asrStarted }));
662360
662395
  continue;
662361
- case "run-agent":
662396
+ }
662397
+ case "run-agent": {
662362
662398
  attachLiveSinks(ctx3, manager, true);
662363
662399
  if (!ctx3.startBackgroundPrompt) {
662364
662400
  renderWarning("Live PFC agent review is unavailable in this context; starting visual/audio feedback only.");
662365
662401
  }
662366
- await ensureLiveStreamingAsr(ctx3, manager, true);
662367
- renderInfo(manager.startRunMode({ agent: Boolean(ctx3.startBackgroundPrompt), lowLatency: true, speech: Boolean(ctx3.startBackgroundPrompt && ctx3.voiceSpeak) }));
662402
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
662403
+ renderInfo(manager.startRunMode({ agent: Boolean(ctx3.startBackgroundPrompt), lowLatency: true, speech: Boolean(ctx3.startBackgroundPrompt && ctx3.voiceSpeak), asr: asrStarted }));
662368
662404
  continue;
662405
+ }
662369
662406
  case "run-chat":
662370
662407
  await startLiveVoicechat(ctx3, manager);
662371
662408
  continue;
@@ -662382,9 +662419,14 @@ async function showLiveMenu(ctx3, manager) {
662382
662419
  manager.configure({ videoEnabled: true, clipEnabled: !cfg.clipEnabled });
662383
662420
  continue;
662384
662421
  case "toggle-asr":
662385
- manager.configure({ audioEnabled: true, asrEnabled: !cfg.asrEnabled });
662386
- if (!cfg.asrEnabled) await ensureLiveStreamingAsr(ctx3, manager);
662387
- else await releaseLiveStreamingAsr(ctx3);
662422
+ if (!cfg.asrEnabled) {
662423
+ manager.configure({ audioEnabled: true, asrEnabled: false });
662424
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
662425
+ manager.configure({ asrEnabled: asrStarted });
662426
+ } else {
662427
+ manager.configure({ audioEnabled: true, asrEnabled: false });
662428
+ await releaseLiveStreamingAsr(ctx3);
662429
+ }
662388
662430
  continue;
662389
662431
  case "toggle-sounds":
662390
662432
  manager.configure({ audioEnabled: true, audioAnalysisEnabled: !cfg.audioAnalysisEnabled });
@@ -662432,12 +662474,14 @@ Previewing microphone activity...`);
662432
662474
  renderInfo("Sampling camera inference...");
662433
662475
  renderInfo(await manager.sampleVideoNow(true));
662434
662476
  continue;
662435
- case "sample-audio":
662436
- manager.configure({ audioEnabled: true, asrEnabled: true, audioAnalysisEnabled: true });
662437
- await ensureLiveStreamingAsr(ctx3, manager, true);
662477
+ case "sample-audio": {
662478
+ manager.configure({ audioEnabled: true, asrEnabled: false, audioAnalysisEnabled: false });
662479
+ const asrStarted = await ensureLiveStreamingAsr(ctx3, manager, true);
662480
+ manager.configure({ asrEnabled: asrStarted, audioAnalysisEnabled: true });
662438
662481
  renderInfo("Sampling live audio...");
662439
662482
  renderInfo(await manager.sampleAudioNow());
662440
662483
  continue;
662484
+ }
662441
662485
  case "listen-mode":
662442
662486
  if (ctx3.listenToggle) {
662443
662487
  ctx3.listenSetMode?.("auto");
@@ -702421,6 +702465,25 @@ function buildSyntheticContext(config, repoRoot) {
702421
702465
  renderError(`voice model ${TUI_ONLY_HINT}`);
702422
702466
  return "";
702423
702467
  },
702468
+ listenStart: async (owner = "live") => {
702469
+ const engine = getDaemonListenEngine();
702470
+ const available = await engine.isAvailable();
702471
+ if (!available) {
702472
+ return "ASR runtime unavailable. Omnius attempted managed Whisper setup; check ~/.omnius/runtimes/asr and CUDA PyTorch.";
702473
+ }
702474
+ engine.setMode("auto");
702475
+ return engine.acquire(owner);
702476
+ },
702477
+ listenRelease: async (owner = "live") => {
702478
+ const engine = getDaemonListenEngine();
702479
+ return engine.release(owner);
702480
+ },
702481
+ listenIsActive: () => getDaemonListenEngine().isActive,
702482
+ listenSetMode: (mode) => {
702483
+ const engine = getDaemonListenEngine();
702484
+ engine.setMode(mode);
702485
+ return mode === "auto" ? "Auto mode: transcriptions auto-submit after 3s silence" : "Manual mode: press Enter to submit transcriptions (auto-submit off)";
702486
+ },
702424
702487
  getColors: () => colorsEnabled,
702425
702488
  setColors: (enabled2) => {
702426
702489
  colorsEnabled = enabled2;
@@ -738713,13 +738776,14 @@ This is an independent background session started from /background.`
738713
738776
  headerBtnQueue = command;
738714
738777
  return;
738715
738778
  }
738716
- const commandToRun = command === "live" ? isLiveSensorActiveForRepo(repoRoot) ? "live stop" : "live run" : command;
738779
+ const normalizedHeaderCommand = command.replace(/^\/+/, "");
738780
+ const commandToRun = normalizedHeaderCommand === "live" ? isLiveSensorActiveForRepo(repoRoot) ? "live stop" : "live run" : command;
738717
738781
  if (headerBtnActive && headerBtnActive !== command) {
738718
738782
  headerBtnQueue = command;
738719
738783
  return;
738720
738784
  }
738721
738785
  if (headerBtnActive === command) {
738722
- if (command === "live") headerBtnQueue = command;
738786
+ if (normalizedHeaderCommand === "live") headerBtnQueue = command;
738723
738787
  return;
738724
738788
  }
738725
738789
  headerBtnActive = command;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.445",
3
+ "version": "1.0.446",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.445",
9
+ "version": "1.0.446",
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.445",
3
+ "version": "1.0.446",
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",