omnius 1.0.265 → 1.0.267

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
@@ -595366,26 +595366,29 @@ function truncateAnsiToWidth(text2, width) {
595366
595366
  }
595367
595367
  function wrapToolTextLine(text2, width, prefix = "") {
595368
595368
  text2 = sanitizeToolBoxContent(text2);
595369
- if (width <= 0) return prefix ? [prefix] : [text2];
595370
- if (text2.length === 0) return prefix ? [prefix] : [""];
595369
+ if (width <= 0) return [text2];
595370
+ if (text2.length === 0) return [""];
595371
595371
  const out = [];
595372
- const continuationIndent = hangingIndentForPlainLine(text2, width);
595373
595372
  const prefixLen = visibleLen(prefix);
595374
- const avail = Math.max(4, width - prefixLen);
595375
595373
  let remaining = text2;
595376
- while (visibleLen(remaining) > avail) {
595374
+ let first2 = true;
595375
+ while (true) {
595376
+ const avail = Math.max(4, first2 ? width : width - prefixLen);
595377
+ if (visibleLen(remaining) <= avail) {
595378
+ out.push(first2 ? remaining : prefix + remaining);
595379
+ break;
595380
+ }
595377
595381
  const breakOffset = findVisibleBreak(remaining, avail);
595378
595382
  let breakAt = breakOffset;
595379
- let bestBreak = remaining.lastIndexOf(" ", breakOffset);
595383
+ const bestBreak = remaining.lastIndexOf(" ", breakOffset);
595380
595384
  if (bestBreak > 0) {
595381
595385
  breakAt = bestBreak;
595382
595386
  }
595383
595387
  const line = remaining.slice(0, breakAt).trimEnd();
595384
- out.push(prefix ? prefix + line : line);
595388
+ out.push(first2 ? line : prefix + line);
595385
595389
  remaining = remaining.slice(breakAt).trimStart();
595390
+ first2 = false;
595386
595391
  }
595387
- const lastLine = prefix ? prefix + remaining : remaining;
595388
- out.push(lastLine);
595389
595392
  return out;
595390
595393
  }
595391
595394
  function wrapLinesWithPrefix(content, prefix, maxWidth) {
@@ -595552,7 +595555,7 @@ function wrapFooterItems(items, width) {
595552
595555
  }
595553
595556
  if (current) lines.push(current);
595554
595557
  if (clean5.length > width) {
595555
- const pipe3 = "";
595558
+ const pipe3 = " ";
595556
595559
  const chunks = wrapToolTextLine(clean5, width, pipe3);
595557
595560
  lines.push(...chunks.slice(0, -1));
595558
595561
  current = chunks[chunks.length - 1] ?? "";
@@ -595624,7 +595627,7 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595624
595627
  ];
595625
595628
  const triggerTexts = formatToolArgsForBox(toolName, callArgs, opts.verbose);
595626
595629
  for (const text2 of triggerTexts) {
595627
- const pipe3 = "";
595630
+ const pipe3 = " ";
595628
595631
  const chunks = wrapToolTextLine(text2, innerWidth, pipe3);
595629
595632
  for (const chunk of chunks) {
595630
595633
  lines.push(
@@ -595636,7 +595639,7 @@ function buildCombinedToolBoxLines(toolName, callArgs, success, output, opts, wi
595636
595639
  if (resultBody.length > 0) {
595637
595640
  for (const bodyLine of resultBody) {
595638
595641
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595639
- const pipe3 = "";
595642
+ const pipe3 = " ";
595640
595643
  const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595641
595644
  for (const chunk of chunks) {
595642
595645
  lines.push(
@@ -595678,7 +595681,7 @@ function buildToolBoxLines(data, width) {
595678
595681
  ];
595679
595682
  for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
595680
595683
  const text2 = sanitizeToolBoxContent(bodyLine.text);
595681
- const pipe3 = "";
595684
+ const pipe3 = " ";
595682
595685
  const chunks = bodyLine.mode === "truncate" ? [truncateAnsiToWidth(text2, innerWidth)] : wrapToolTextLine(text2, innerWidth, pipe3);
595683
595686
  for (const chunk of chunks) {
595684
595687
  lines.push(
@@ -606210,7 +606213,10 @@ var init_status_bar = __esm({
606210
606213
  const sentinel = `${this.DYNAMIC_BLOCK_MARK_PREFIX}${id}${this.DYNAMIC_BLOCK_MARK_SUFFIX}`;
606211
606214
  this._contentLines.push(sentinel);
606212
606215
  if (this._contentLines.length > this._contentMaxLines) {
606213
- this._contentLines.splice(0, this._contentLines.length - this._contentMaxLines);
606216
+ this._contentLines.splice(
606217
+ 0,
606218
+ this._contentLines.length - this._contentMaxLines
606219
+ );
606214
606220
  this.clampContentScrollOffset();
606215
606221
  }
606216
606222
  if (this._autoScroll && !this._mouseSelecting)
@@ -606343,8 +606349,13 @@ var init_status_bar = __esm({
606343
606349
  ];
606344
606350
  const model = this.summarizeHeaderModelName();
606345
606351
  const transport = this.summarizeHeaderTransport();
606346
- if (model) parts.push({ text: ` ${model} `, width: stripAnsi(` ${model} `).length });
606347
- if (transport) parts.push({ text: ` ${transport} `, width: stripAnsi(` ${transport} `).length });
606352
+ if (model)
606353
+ parts.push({ text: ` ${model} `, width: stripAnsi(` ${model} `).length });
606354
+ if (transport)
606355
+ parts.push({
606356
+ text: ` ${transport} `,
606357
+ width: stripAnsi(` ${transport} `).length
606358
+ });
606348
606359
  if (this._updateLatest) {
606349
606360
  const last2 = parts[parts.length - 1];
606350
606361
  if (last2) {
@@ -606563,7 +606574,10 @@ var init_status_bar = __esm({
606563
606574
  const telegramDot = this._telegramStatus.active ? "●" : "○";
606564
606575
  const telegramLabel = this._telegramStatus.activeSubAgents > 0 ? ` ✈ tg ${this._telegramStatus.activeSubAgents} ` : " ✈ tg ";
606565
606576
  sysItems.push({
606566
- render: () => renderBtn("telegram", `\x1B[38;5;45m${telegramDot}${telegramLabel}\x1B[0m`) + " ",
606577
+ render: () => renderBtn(
606578
+ "telegram",
606579
+ `\x1B[38;5;45m${telegramDot}${telegramLabel}\x1B[0m`
606580
+ ) + " ",
606567
606581
  w: telegramLabel.length + 2
606568
606582
  });
606569
606583
  const nexusDot = this._nexusStatus === "connected" || this._nexusStatus === "connecting" ? "●" : "○";
@@ -607091,7 +607105,9 @@ var init_status_bar = __esm({
607091
607105
  Promise.resolve().then(() => (init_dist8(), dist_exports3)).then(({ getOllamaPool: getOllamaPool2, resolveDefaultPoolConfig: resolveDefaultPoolConfig2 }) => {
607092
607106
  try {
607093
607107
  const config = resolveDefaultPoolConfig2();
607094
- const pool3 = getOllamaPool2({ baseInstanceUrl: config.baseInstanceUrl });
607108
+ const pool3 = getOllamaPool2({
607109
+ baseInstanceUrl: config.baseInstanceUrl
607110
+ });
607095
607111
  broker.setOllamaAffinityProvider((modelName) => {
607096
607112
  try {
607097
607113
  const status = pool3.status?.();
@@ -607667,7 +607683,10 @@ var init_status_bar = __esm({
607667
607683
  if (!this._mouseTrackingEnabled) return;
607668
607684
  this._mouseTrackingEnabled = false;
607669
607685
  if (process.stdout.isTTY) {
607670
- this._trueStdoutWrite.call(process.stdout, "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l");
607686
+ this._trueStdoutWrite.call(
607687
+ process.stdout,
607688
+ "\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l"
607689
+ );
607671
607690
  }
607672
607691
  }
607673
607692
  /** Re-apply the current mouse preference after overlays, password prompts, or redraws. */
@@ -608471,10 +608490,7 @@ ${CONTENT_BG_SEQ}`);
608471
608490
  reflowContentLine(line, width) {
608472
608491
  const visible = stripAnsi(line);
608473
608492
  if (visible.length <= width) return [line];
608474
- const continuationIndent = this.hangingIndentForVisibleLine(
608475
- visible,
608476
- width
608477
- );
608493
+ const continuationIndent = this.hangingIndentForVisibleLine(visible, width);
608478
608494
  const ranges = this.visibleWrapRanges(
608479
608495
  visible,
608480
608496
  width,
@@ -608647,46 +608663,28 @@ ${CONTENT_BG_SEQ}`);
608647
608663
  (line) => line.replace(/\x1B\[[0-9;]*[a-zA-Z]/g, "").replace(/\x1B\]?[^\x07]*\x07/g, "")
608648
608664
  );
608649
608665
  const text2 = stripped.join("\n");
608650
- const clipboardCmds = [
608651
- ["wl-copy", text2],
608652
- ["xclip", ["-selection", "clipboard"], "-i"],
608653
- ["xsel", "--clipboard", "--input"]
608654
- ];
608655
- let success = false;
608656
- for (const [cmd, ...args] of clipboardCmds) {
608666
+ if (text2.length === 0) return;
608667
+ const ok3 = copyText(text2);
608668
+ if (!ok3) {
608657
608669
  try {
608658
- const { execSync: execSync63 } = __require("child_process");
608659
- const child = __require("child_process").spawn(cmd, args, {
608660
- stdio: ["pipe", "pipe", "pipe"]
608661
- });
608662
- if (child.stdin) {
608663
- child.stdin.write(text2);
608664
- child.stdin.end();
608665
- }
608666
- child.on("close", (code8) => {
608667
- if (code8 === 0) success = true;
608668
- });
608669
- setTimeout(() => {
608670
- if (!success) {
608671
- try {
608672
- child.kill();
608673
- } catch {
608674
- }
608675
- }
608676
- }, 500);
608677
- break;
608670
+ const fs11 = __require("fs");
608671
+ const os9 = __require("os");
608672
+ const tmpPath = __require("path").join(
608673
+ os9.tmpdir(),
608674
+ "omnius-session-copy.txt"
608675
+ );
608676
+ fs11.writeFileSync(tmpPath, text2, "utf-8");
608677
+ process.stderr.write(
608678
+ `\x1B[38;5;208mClipboard unavailable session saved to ${tmpPath}\x1B[0m
608679
+ `
608680
+ );
608678
608681
  } catch {
608679
- continue;
608682
+ process.stderr.write(
608683
+ `\x1B[38;5;196mFailed to save session to clipboard or temp file.\x1B[0m
608684
+ `
608685
+ );
608680
608686
  }
608681
608687
  }
608682
- if (!success) {
608683
- const fs11 = __require("fs");
608684
- const os9 = __require("os");
608685
- const tmpPath = __require("path").join(os9.tmpdir(), "omnius-session-copy.txt");
608686
- fs11.writeFileSync(tmpPath, text2, "utf-8");
608687
- process.stderr.write(`\x1B[38;5;208mClipboard unavailable — session saved to ${tmpPath}\x1B[0m
608688
- `);
608689
- }
608690
608688
  }
608691
608689
  /**
608692
608690
  * WO-TASK-02 — sync the tasks panel "pager" scope flag with the current
@@ -608754,7 +608752,10 @@ ${CONTENT_BG_SEQ}`);
608754
608752
  end: startCol + label.length - 1
608755
608753
  };
608756
608754
  const copyLabel = " ⎘ copy session ";
608757
- const copyCol = Math.max(startCol + label.length + 2, w - copyLabel.length);
608755
+ const copyCol = Math.max(
608756
+ startCol + label.length + 2,
608757
+ w - copyLabel.length
608758
+ );
608758
608759
  if (copyCol + copyLabel.length <= w) {
608759
608760
  buf += `\x1B[${spacerRow};${copyCol}H\x1B[38;5;141m${copyLabel}\x1B[0m${CONTENT_BG_SEQ}`;
608760
608761
  this._copyBtnRegion = {
@@ -609265,7 +609266,10 @@ ${CONTENT_BG_SEQ}`);
609265
609266
  if (!this.inputStateProvider) return 1;
609266
609267
  const availWidth = this.inputTextWidth(termWidth);
609267
609268
  const { line } = this.inputStateProvider();
609268
- return Math.max(1, this.wrapPlainInputText(line, availWidth).rawLines.length);
609269
+ return Math.max(
609270
+ 1,
609271
+ this.wrapPlainInputText(line, availWidth).rawLines.length
609272
+ );
609269
609273
  }
609270
609274
  /** Update _currentFooterHeight based on current input + suggestions. Returns true if height changed. */
609271
609275
  updateFooterHeight(termWidth) {
@@ -609341,10 +609345,16 @@ ${CONTENT_BG_SEQ}`);
609341
609345
  cursorRow: 0,
609342
609346
  // Align with bordered input layout: col1 is │, content starts at col2.
609343
609347
  // Keep this consistent with the wrapped path (+2) and positionAtInput().
609344
- cursorCol: Math.min(Math.max(1, termWidth - 1), this.promptWidth + cursorPos + 2)
609348
+ cursorCol: Math.min(
609349
+ Math.max(1, termWidth - 1),
609350
+ this.promptWidth + cursorPos + 2
609351
+ )
609345
609352
  };
609346
609353
  }
609347
- const { rawLines, charPositions } = this.wrapPlainInputText(fullLine, availWidth);
609354
+ const { rawLines, charPositions } = this.wrapPlainInputText(
609355
+ fullLine,
609356
+ availWidth
609357
+ );
609348
609358
  let cursorLineIdx = rawLines.length - 1;
609349
609359
  let cursorColInLine = cursorPos;
609350
609360
  for (let i2 = 0; i2 < charPositions.length; i2++) {
@@ -609363,7 +609373,10 @@ ${CONTENT_BG_SEQ}`);
609363
609373
  lines,
609364
609374
  cursorRow: cursorLineIdx,
609365
609375
  // +2 accounts for the left box border (│ at col 1) and the column after it
609366
- cursorCol: Math.min(Math.max(1, termWidth - 1), this.promptWidth + cursorColInLine + 2)
609376
+ cursorCol: Math.min(
609377
+ Math.max(1, termWidth - 1),
609378
+ this.promptWidth + cursorColInLine + 2
609379
+ )
609367
609380
  };
609368
609381
  }
609369
609382
  /** Set the DECSTBM scroll region to exclude the dynamic footer rows */
@@ -609540,7 +609553,8 @@ ${CONTENT_BG_SEQ}`);
609540
609553
  * If footer height changed, also updates DECSTBM and redraws full footer.
609541
609554
  */
609542
609555
  renderInputRowDuringStream(force = false) {
609543
- if (!this.active || this._resizing && !force || !this.inputStateProvider) return;
609556
+ if (!this.active || this._resizing && !force || !this.inputStateProvider)
609557
+ return;
609544
609558
  const rows = termRows();
609545
609559
  const w = getTermWidth();
609546
609560
  const oldFooterHeight = this._currentFooterHeight;
@@ -609989,7 +610003,11 @@ ${CONTENT_BG_SEQ}`);
609989
610003
  totalToolCalls: this._toolCalls,
609990
610004
  successfulToolCalls: this._successfulToolCalls,
609991
610005
  failedToolCalls: this._failedToolCalls,
609992
- toolCallBreakdown: this._toolCallBreakdown.map((t2) => ({ name: t2.name, count: t2.count, avgDurationMs: 0 })),
610006
+ toolCallBreakdown: this._toolCallBreakdown.map((t2) => ({
610007
+ name: t2.name,
610008
+ count: t2.count,
610009
+ avgDurationMs: 0
610010
+ })),
609993
610011
  contextWindowSize: m2.contextWindowSize,
609994
610012
  estimatedContextTokens: m2.estimatedContextTokens,
609995
610013
  peakContextTokens: m2.estimatedContextTokens,
@@ -673079,7 +673097,7 @@ function buildShellLiveBlockLines(state, width) {
673079
673097
  const elapsed = Math.max(0, Date.now() - state.startedAt);
673080
673098
  const status = state.status === "running" ? `live ${formatElapsed2(elapsed)}` : state.status;
673081
673099
  const title = ` Shell ${status} `;
673082
- const top = `╭${fitWithFill(`─${title}`, w - 2, "─")}╮`;
673100
+ const top = `╭─┤${title}├${"─".repeat(Math.max(0, w - 5 - title.length))}╮`;
673083
673101
  const bottom = `╰${"─".repeat(w - 2)}╯`;
673084
673102
  const visibleLines = [...state.lines];
673085
673103
  if (state.currentLine) visibleLines.push(state.currentLine);
@@ -673090,7 +673108,10 @@ function buildShellLiveBlockLines(state, width) {
673090
673108
  contentRow(`$ ${state.command}`, inner),
673091
673109
  contentRow("", inner)
673092
673110
  ];
673093
- if (hidden > 0) rows.push(contentRow(`... ${hidden} earlier line${hidden === 1 ? "" : "s"}`, inner));
673111
+ if (hidden > 0)
673112
+ rows.push(
673113
+ contentRow(`... ${hidden} earlier line${hidden === 1 ? "" : "s"}`, inner)
673114
+ );
673094
673115
  if (body.length === 0) {
673095
673116
  rows.push(contentRow("(waiting for output)", inner));
673096
673117
  } else {
@@ -673117,11 +673138,6 @@ function fit2(value2, width) {
673117
673138
  }
673118
673139
  return plain + " ".repeat(width - chars.length);
673119
673140
  }
673120
- function fitWithFill(value2, width, fill) {
673121
- const chars = Array.from(value2);
673122
- if (chars.length > width) return chars.slice(0, width).join("");
673123
- return value2 + fill.repeat(width - chars.length);
673124
- }
673125
673141
  function formatElapsed2(ms) {
673126
673142
  const seconds = Math.floor(ms / 1e3);
673127
673143
  if (seconds < 60) return `${seconds}s`;
@@ -704302,20 +704318,32 @@ ${entry.fullContent}`
704302
704318
  case "debug_adversary":
704303
704319
  if (event.adversaryAction) {
704304
704320
  const lm = event.adversaryAction;
704305
- if (lm.intervention) {
704306
- const simple = `⚠ ${lm.intervention}`;
704307
- contentWrite(() => renderInfo(simple));
704308
- }
704309
704321
  if (lm.details) {
704310
704322
  adversaryBuffer.push(lm.details);
704311
704323
  if (adversaryBuffer.length > 50)
704312
704324
  adversaryBuffer.splice(0, adversaryBuffer.length - 50);
704313
- if (showAdversary) {
704314
- const det = String(lm.details);
704315
- contentWrite(() => {
704316
- process.stdout.write(c3.dim(det) + "\n");
704325
+ }
704326
+ if (lm.intervention) {
704327
+ contentWrite(() => {
704328
+ const lines = [`⚠ ${lm.intervention}`];
704329
+ if (lm.details && showAdversary) {
704330
+ const det = String(lm.details);
704331
+ lines.push(...det.split("\n").filter(Boolean));
704332
+ }
704333
+ renderBoxedBlock({
704334
+ title: "Adversary",
704335
+ lines,
704336
+ kind: "plain"
704317
704337
  });
704318
- }
704338
+ });
704339
+ } else if (lm.details && showAdversary) {
704340
+ contentWrite(() => {
704341
+ renderBoxedBlock({
704342
+ title: "Adversary",
704343
+ lines: String(lm.details).split("\n").filter(Boolean),
704344
+ kind: "dim"
704345
+ });
704346
+ });
704319
704347
  }
704320
704348
  }
704321
704349
  break;
@@ -705285,8 +705313,14 @@ Review its full output via sub_agent(action='output', id='${id}')`
705285
705313
  subToolInstances.push(new TodoReadTool());
705286
705314
  subRunner.registerTools(subToolInstances.map(adaptTool6));
705287
705315
  const subAgentId = opts.id || `sub-${Date.now()}`;
705288
- statusBar.registerAgentView(subAgentId, `Sub-agent ${subAgentId}`, "sub");
705289
- subRunner.registerTool(createTaskCompleteTool(subTier, repoRoot, true));
705316
+ statusBar.registerAgentView(
705317
+ subAgentId,
705318
+ `Sub-agent ${subAgentId}`,
705319
+ "sub"
705320
+ );
705321
+ subRunner.registerTool(
705322
+ createTaskCompleteTool(subTier, repoRoot, true)
705323
+ );
705290
705324
  const systemCtx = opts.systemPromptAddition ? `Working directory: ${repoRoot}
705291
705325
 
705292
705326
  ${opts.systemPromptAddition}` : `Working directory: ${repoRoot}`;
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.265",
3
+ "version": "1.0.267",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.265",
9
+ "version": "1.0.267",
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.265",
3
+ "version": "1.0.267",
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",