omnius 1.0.543 → 1.0.545

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
@@ -576987,6 +576987,7 @@ function buildDecompositionDirective(modules, strategy, evidenceContext = {}) {
576987
576987
  ` 3. Treat a child result as complete only when it returns cited observations plus verification or an explicit blocker; otherwise retain the todo as discovery/blocked.`,
576988
576988
  ` 4. After ALL module todos have evidence-backed outcomes, run the project's integration build/tests in main context.`,
576989
576989
  ` 5. If verification fails: derive the next child request from the diagnostic and fresh relevant reads, not from the original module list.`,
576990
+ ` 6. Call task_complete only after the required integration evidence is present; otherwise preserve the specific blocker for the next parent action.`,
576990
576991
  ``,
576991
576992
  `Why this matters: implementing N modules in one context burns token budget linearly with N. sub_agent gives each module its own context window, but only a parent evidence brief prevents that isolation from becoming a task-label echo chamber.`,
576992
576993
  ``,
@@ -609851,19 +609852,22 @@ ${description}`
609851
609852
  const responseText2 = firstChoice ? String(firstChoice.message?.content ?? "") : "";
609852
609853
  const outcome = this.recordThinkOutcome(responseText2, effectiveThink === true);
609853
609854
  const independentOutcome = effectiveThink !== true ? classifyThinkOutcome(responseText2) : null;
609854
- const shouldRecoverFromEmpty = request.disableEmptyContentRecovery !== true && responseFormat !== void 0 && independentOutcome !== null && (independentOutcome === "empty_after_strip" || independentOutcome === "unclosed_think");
609855
+ const emptyIndependentOutcome = independentOutcome === "empty_after_strip" || independentOutcome === "unclosed_think";
609856
+ const expectsVisibleContent = responseFormat !== void 0 || (request.tools ?? []).length === 0;
609857
+ const shouldProbeNativeOnEmpty = expectsVisibleContent && emptyIndependentOutcome;
609858
+ const shouldRecoverFromEmpty = request.disableEmptyContentRecovery !== true && shouldProbeNativeOnEmpty;
609855
609859
  const justSuppressed = this._thinkSuppressed && this._thinkFailStreak === _OllamaAgenticBackend._thinkFailThreshold;
609856
609860
  const shouldRetryThinkGuard = outcome !== null && effectiveThink === true && (justSuppressed || outcome === "empty_after_strip" || outcome === "unclosed_think");
609857
- if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
609858
- if (shouldRecoverFromEmpty) {
609859
- try {
609860
- const _native = await this.nativeOllamaChatCompletion(request);
609861
- const _nText = String(_native.choices?.[0]?.message?.content ?? "");
609862
- if (_nText.trim().length >= 2)
609863
- return _native;
609864
- } catch {
609865
- }
609861
+ if (shouldProbeNativeOnEmpty) {
609862
+ try {
609863
+ const _native = await this.nativeOllamaChatCompletion(request);
609864
+ const _nText = String(_native.choices?.[0]?.message?.content ?? "");
609865
+ if (_nText.trim().length >= 2)
609866
+ return _native;
609867
+ } catch {
609866
609868
  }
609869
+ }
609870
+ if (shouldRetryThinkGuard || shouldRecoverFromEmpty) {
609867
609871
  const retryMessages = injectNoThinkDirective(requestMessages);
609868
609872
  const retryBody = {
609869
609873
  model: this.model,
@@ -642962,6 +642966,22 @@ var init_stageIndicator = __esm({
642962
642966
  function stageFallbackColor(stage2) {
642963
642967
  return STAGE_FALLBACK_COLOR[stage2];
642964
642968
  }
642969
+ function paintBlockBorder(glyphs, stage2, phase, truecolor, startCol = 0) {
642970
+ if (!truecolor) {
642971
+ return `\x1B[38;5;${STAGE_FALLBACK_COLOR[stage2]}m${glyphs}\x1B[0m`;
642972
+ }
642973
+ const chars = Array.from(glyphs);
642974
+ let out = "";
642975
+ for (let i2 = 0; i2 < chars.length; i2 += BORDER_GRADIENT_SEG) {
642976
+ const [r2, g, b] = stageGradientRgb(
642977
+ stage2,
642978
+ Math.floor((startCol + i2) / BORDER_GRADIENT_SEG),
642979
+ phase
642980
+ );
642981
+ out += `\x1B[38;2;${r2};${g};${b}m${chars.slice(i2, i2 + BORDER_GRADIENT_SEG).join("")}`;
642982
+ }
642983
+ return `${out}\x1B[0m`;
642984
+ }
642965
642985
  function sanitizeSubAgentActivity(value2) {
642966
642986
  return value2.replace(ANSI_RE2, "").replace(/[\x00-\x1F\x7F]/g, " ").replace(/\s+/g, " ").trim().slice(0, MAX_ACTIVITY_CHARS);
642967
642987
  }
@@ -642983,7 +643003,7 @@ function buildSubAgentLiveBlockLines(sourceEntries, width, phase, truecolor = su
642983
643003
  const title = " Sub-agent activity ";
642984
643004
  const top = `╭─┤${title}├${"─".repeat(Math.max(0, w - 5 - title.length))}╮`;
642985
643005
  const bottom = `╰${"─".repeat(Math.max(0, w - 2))}╯`;
642986
- const lines = [paint(top, primary.stage, phase, 0, truecolor)];
643006
+ const lines = [paintBlockBorder(top, primary.stage, phase, truecolor)];
642987
643007
  for (const entry of entries) {
642988
643008
  const icon = statusIcon(entry.status);
642989
643009
  const label = entry.label || entry.id;
@@ -643008,25 +643028,13 @@ function buildSubAgentLiveBlockLines(sourceEntries, width, phase, truecolor = su
643008
643028
  )
643009
643029
  );
643010
643030
  }
643011
- lines.push(paint(bottom, primary.stage, phase, 0, truecolor));
643031
+ lines.push(paintBlockBorder(bottom, primary.stage, phase, truecolor));
643012
643032
  return lines;
643013
643033
  }
643014
643034
  function contentRow(value2, width, stage2, phase, truecolor) {
643015
- return `│ ${paint(fit2(value2, width), stage2, phase, 1, truecolor)} │`;
643016
- }
643017
- function paint(value2, stage2, phase, offset, truecolor) {
643018
- let out = "";
643019
- const chars = Array.from(value2);
643020
- for (let i2 = 0; i2 < chars.length; i2++) {
643021
- const char = chars[i2];
643022
- if (truecolor) {
643023
- const [r2, g, b] = stageGradientRgb(stage2, i2 + offset, phase);
643024
- out += `\x1B[38;2;${r2};${g};${b}m${char}`;
643025
- } else {
643026
- out += `\x1B[38;5;${STAGE_FALLBACK_COLOR[stage2]}m${char}`;
643027
- }
643028
- }
643029
- return `${out}\x1B[0m`;
643035
+ const left = paintBlockBorder("│", stage2, phase, truecolor, 0);
643036
+ const right = paintBlockBorder("│", stage2, phase, truecolor, width + 3);
643037
+ return `${left} ${fit2(value2, width)} ${right}`;
643030
643038
  }
643031
643039
  function fit2(value2, width) {
643032
643040
  const plain = value2.replace(ANSI_RE2, "").replace(/\s+$/g, "");
@@ -643049,7 +643057,7 @@ function statusIcon(status) {
643049
643057
  return "●";
643050
643058
  }
643051
643059
  }
643052
- var ANSI_RE2, MAX_PREVIEW_AGENTS, MAX_ACTIVITY_CHARS, STAGE_FALLBACK_COLOR;
643060
+ var ANSI_RE2, MAX_PREVIEW_AGENTS, MAX_ACTIVITY_CHARS, STAGE_FALLBACK_COLOR, BORDER_GRADIENT_SEG;
643053
643061
  var init_sub_agent_live_block = __esm({
643054
643062
  "packages/cli/src/tui/sub-agent-live-block.ts"() {
643055
643063
  init_stageIndicator();
@@ -643074,6 +643082,7 @@ var init_sub_agent_live_block = __esm({
643074
643082
  completed: 46,
643075
643083
  failed: 196
643076
643084
  };
643085
+ BORDER_GRADIENT_SEG = 4;
643077
643086
  }
643078
643087
  });
643079
643088
 
@@ -643098,7 +643107,7 @@ function buildTrajectoryLiveBlockLines(checkpoint, width, phase, truecolor = sup
643098
643107
  const title = ` Trajectory · ${checkpoint.assessment.replace(/_/g, " ")} `;
643099
643108
  const top = `╭─┤${title}├${"─".repeat(Math.max(0, w - 5 - title.length))}╮`;
643100
643109
  const bottom = `╰${"─".repeat(Math.max(0, w - 2))}╯`;
643101
- const lines = [paint2(top, stage2, phase, 0, truecolor)];
643110
+ const lines = [paintBlockBorder(top, stage2, phase, truecolor)];
643102
643111
  lines.push(row(`Goal: ${checkpoint.goal}`, inner, stage2, phase, truecolor));
643103
643112
  if (checkpoint.situationAssessment) {
643104
643113
  lines.push(
@@ -643153,7 +643162,7 @@ function buildTrajectoryLiveBlockLines(checkpoint, width, phase, truecolor = sup
643153
643162
  )
643154
643163
  );
643155
643164
  }
643156
- lines.push(paint2(bottom, stage2, phase, 0, truecolor));
643165
+ lines.push(paintBlockBorder(bottom, stage2, phase, truecolor));
643157
643166
  return lines;
643158
643167
  }
643159
643168
  function buildTrajectoryLiveBlockCollapsedLine(checkpoint, width, phase, truecolor = supportsTruecolor()) {
@@ -643164,22 +643173,12 @@ function buildTrajectoryLiveBlockCollapsedLine(checkpoint, width, phase, truecol
643164
643173
  `▸ Trajectory · ${checkpoint.assessment.replace(/_/g, " ")} · ${checkpoint.nextAction}`,
643165
643174
  w
643166
643175
  );
643167
- return [paint2(text2, stage2, phase, 0, truecolor)];
643176
+ return [paintBlockBorder(text2, stage2, phase, truecolor)];
643168
643177
  }
643169
643178
  function row(value2, width, stage2, phase, truecolor) {
643170
- return `│ ${paint2(fit3(value2, width), stage2, phase, 1, truecolor)} │`;
643171
- }
643172
- function paint2(value2, stage2, phase, offset, truecolor) {
643173
- let out = "";
643174
- for (const [index, char] of Array.from(value2).entries()) {
643175
- if (truecolor) {
643176
- const [r2, g, b] = stageGradientRgb(stage2, index + offset, phase);
643177
- out += `\x1B[38;2;${r2};${g};${b}m${char}`;
643178
- } else {
643179
- out += `\x1B[38;5;${stageFallbackColor(stage2)}m${char}`;
643180
- }
643181
- }
643182
- return `${out}\x1B[0m`;
643179
+ const left = paintBlockBorder("│", stage2, phase, truecolor, 0);
643180
+ const right = paintBlockBorder("│", stage2, phase, truecolor, width + 3);
643181
+ return `${left} ${fit3(value2, width)} ${right}`;
643183
643182
  }
643184
643183
  function fit3(value2, width) {
643185
643184
  const clean5 = value2.replace(ANSI_RE3, "").replace(/\s+/g, " ").trim();
@@ -647366,6 +647365,9 @@ var init_status_bar = __esm({
647366
647365
  this.advanceStagePhase();
647367
647366
  this.renderFooterPreserveCursor();
647368
647367
  refreshTuiTasksAnimationFrame();
647368
+ if ((this._trajectoryLiveBlockAppended || this._subAgentLiveBlockAppended) && this._activeViewId === "main" && this.stageBorderActive()) {
647369
+ this.refreshDynamicBlocks();
647370
+ }
647369
647371
  if (this._agentViews.size > 1 && (String(this.currentHeaderPanel).startsWith("sys-") || this._headerExpanded)) {
647370
647372
  this.refreshHeaderContent();
647371
647373
  }
@@ -649232,7 +649234,7 @@ ${CONTENT_BG_SEQ}`);
649232
649234
  if (screenRow < headerSafeFloor) continue;
649233
649235
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
649234
649236
  }
649235
- buf += "\x1B8\x1B[?25h";
649237
+ buf += "\x1B8" + (this.writeDepth === 0 ? "\x1B[?25h" : "");
649236
649238
  this.termWrite(buf);
649237
649239
  }
649238
649240
  /** Full display refresh — repaint content area from stored buffer + footer.
@@ -649894,6 +649896,12 @@ ${CONTENT_BG_SEQ}`);
649894
649896
  buf += `\x1B[${this.scrollRegionTop};1H\x1B[7m${indicator}${" ".repeat(pad)}\x1B[0m`;
649895
649897
  }
649896
649898
  buf += "\x1B8";
649899
+ if (this.writeDepth === 0) {
649900
+ const wrap = this.wrapInput(w);
649901
+ const rp = this.rowPositions(termRows());
649902
+ const cursorTermRow = rp.inputStartRow + 1 + wrap.cursorRow;
649903
+ buf += `\x1B[${cursorTermRow};${wrap.cursorCol}H${CURSOR_BLINK_BLOCK}\x1B[?25h`;
649904
+ }
649897
649905
  buf += "\x1B[?2026l";
649898
649906
  const writer = this._origWrite ?? process.stdout.write.bind(process.stdout);
649899
649907
  writer(buf);
@@ -650640,7 +650648,7 @@ ${CONTENT_BG_SEQ}`);
650640
650648
  this.updateFooterHeight();
650641
650649
  const pos = this.rowPositions(termRows());
650642
650650
  this.termWrite(
650643
- `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H` + (clearScrollback ? "\x1B[3J" : "")
650651
+ `\x1B[?25l\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[${pos.scrollEnd};1H` + (clearScrollback ? "\x1B[3J" : "")
650644
650652
  );
650645
650653
  if (this.writeDepth === 0) {
650646
650654
  this.parkCursorInInput();
@@ -650799,6 +650807,13 @@ ${CONTENT_BG_SEQ}`);
650799
650807
  pos.inputStartRow + 1,
650800
650808
  inputWrap.lines.length
650801
650809
  );
650810
+ if (this.writeDepth > 0) {
650811
+ const st = this.inputStateProvider?.();
650812
+ if (!st || st.cursor >= st.line.length) {
650813
+ const cursorTermRow = pos.inputStartRow + 1 + inputWrap.cursorRow;
650814
+ buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H${PANEL_BG_SEQ}\x1B[7m \x1B[27m${PANEL_BG_SEQ}`;
650815
+ }
650816
+ }
650802
650817
  if (this._suggestions.length > 0 && pos.suggestStartRow > 0) {
650803
650818
  for (let si = 0; si < this._suggestions.length; si++) {
650804
650819
  const row2 = pos.suggestStartRow + si;
@@ -650816,8 +650831,11 @@ ${CONTENT_BG_SEQ}`);
650816
650831
  if (pos.metricsRow > 0) {
650817
650832
  buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET4}${PANEL_BG_SEQ}`;
650818
650833
  }
650819
- buf += "\x1B[?7h\x1B8" + // DEC restore cursor
650820
- (this.writeDepth === 0 ? `${CURSOR_BLINK_BLOCK}\x1B[?25h` : "");
650834
+ buf += "\x1B[?7h\x1B8";
650835
+ if (this.writeDepth === 0) {
650836
+ const cursorTermRow = pos.inputStartRow + 1 + inputWrap.cursorRow;
650837
+ buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H${CURSOR_BLINK_BLOCK}\x1B[?25h`;
650838
+ }
650821
650839
  this.termWrite(buf);
650822
650840
  this.rememberFooterPaint(pos.inputStartRow);
650823
650841
  if (pos.tabBarRow > 0) this.renderAgentTabs();
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.543",
3
+ "version": "1.0.545",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.543",
9
+ "version": "1.0.545",
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.543",
3
+ "version": "1.0.545",
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",