omnius 1.0.116 → 1.0.117

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
@@ -564766,6 +564766,9 @@ __export(render_exports, {
564766
564766
  setEmojisEnabled: () => setEmojisEnabled,
564767
564767
  ui: () => ui
564768
564768
  });
564769
+ function stdoutIsTTY() {
564770
+ return process.stdout.isTTY ?? false;
564771
+ }
564769
564772
  function accentFg() {
564770
564773
  const a2 = tuiAccent();
564771
564774
  return a2 < 0 ? "\x1B[39m" : `\x1B[38;5;${a2}m`;
@@ -564774,17 +564777,17 @@ function dimFg() {
564774
564777
  return `\x1B[38;5;${tuiTextDim()}m`;
564775
564778
  }
564776
564779
  function ansi2(code8, text) {
564777
- return isTTY2 ? `\x1B[${code8}m${text}\x1B[0m` : text;
564780
+ return stdoutIsTTY() ? `\x1B[${code8}m${text}\x1B[0m` : text;
564778
564781
  }
564779
564782
  function fg256(code8, text) {
564780
- return isTTY2 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
564783
+ return stdoutIsTTY() ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
564781
564784
  }
564782
564785
  function hyperlink(url, text) {
564783
- if (!isTTY2) return text;
564786
+ if (!stdoutIsTTY()) return text;
564784
564787
  return `\x1B]8;;${url}\x07${text}\x1B]8;;\x07`;
564785
564788
  }
564786
564789
  function fileLink(filePath) {
564787
- if (!isTTY2) return filePath;
564790
+ if (!stdoutIsTTY()) return filePath;
564788
564791
  if (filePath.startsWith("/") || filePath.startsWith("~")) {
564789
564792
  const absPath = filePath.startsWith("~") ? filePath.replace("~", process.env["HOME"] ?? "") : filePath;
564790
564793
  return hyperlink(`file://${absPath}`, filePath);
@@ -564923,11 +564926,11 @@ function toolColorCode(toolName) {
564923
564926
  return TOOL_COLOR_CODES[toolName] ?? tuiTextDim();
564924
564927
  }
564925
564928
  function toolColorSeq(code8, bold = false) {
564926
- if (!_colorsEnabled || !isTTY2) return "";
564929
+ if (!_colorsEnabled || !stdoutIsTTY()) return "";
564927
564930
  return `\x1B[${bold ? "1;" : ""}38;5;${code8}m`;
564928
564931
  }
564929
564932
  function toolResetSeq() {
564930
- return _colorsEnabled && isTTY2 ? RESET2 : "";
564933
+ return _colorsEnabled && stdoutIsTTY() ? RESET2 : "";
564931
564934
  }
564932
564935
  function visibleLen(text) {
564933
564936
  return stripAnsi(text).length;
@@ -564969,10 +564972,10 @@ function wrapToolTextLine(text, width) {
564969
564972
  out.push(remaining);
564970
564973
  return out;
564971
564974
  }
564972
- function buildToolTopBorder(title, metrics2, width, colorCode) {
564975
+ function buildToolTopBorder(title, metrics2, width, colorCode, metricsColorCode = 222) {
564973
564976
  const border = toolColorSeq(colorCode);
564974
564977
  const titleColor = toolColorSeq(colorCode, true);
564975
- const metricColor = toolColorSeq(222);
564978
+ const metricColor = toolColorSeq(metricsColorCode);
564976
564979
  const reset = toolResetSeq();
564977
564980
  const inner = Math.max(4, width - 2);
564978
564981
  const titleVisible = stripAnsi(title);
@@ -565077,7 +565080,7 @@ function buildToolBoxLines(data, width) {
565077
565080
  const w = Math.max(40, width);
565078
565081
  const innerWidth = Math.max(1, w - 4);
565079
565082
  const lines = [
565080
- buildToolTopBorder(data.title, data.metrics, w, data.colorCode),
565083
+ buildToolTopBorder(data.title, data.metrics, w, data.colorCode, data.metricsColorCode),
565081
565084
  buildToolDivider(w, data.colorCode)
565082
565085
  ];
565083
565086
  for (const bodyLine of data.body.length > 0 ? data.body : [{ text: "Done", mode: "wrap", kind: "dim" }]) {
@@ -565187,7 +565190,8 @@ function buildToolResultBoxLines(toolName, success, output, opts, width) {
565187
565190
  metrics: metrics2,
565188
565191
  body,
565189
565192
  footers,
565190
- colorCode: toolColorCode(toolName)
565193
+ colorCode: success ? toolColorCode(toolName) : TOOL_ERROR_COLOR_CODE,
565194
+ metricsColorCode: success ? void 0 : TOOL_ERROR_COLOR_CODE
565191
565195
  }, width);
565192
565196
  }
565193
565197
  function buildToolResultBody(toolName, success, output, verbose) {
@@ -565644,7 +565648,7 @@ function formatDuration3(ms) {
565644
565648
  const secs = Math.floor(totalSecs % 60);
565645
565649
  return `${mins}m ${secs}s`;
565646
565650
  }
565647
- var isTTY2, c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLOR_CODES, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, BOX_TJ_L2, BOX_TJ_R2, RESET2, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
565651
+ var c3, ui, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLOR_CODES, TOOL_ERROR_COLOR_CODE, BOX_TL2, BOX_TR2, BOX_BL2, BOX_BR2, BOX_H2, BOX_V2, BOX_TJ_L2, BOX_TJ_R2, RESET2, _contentWriteHook, HINTS, TOOL_NAMES, COMMAND_NAMES, SLASH_COMMANDS2;
565648
565652
  var init_render = __esm({
565649
565653
  "packages/cli/src/tui/render.ts"() {
565650
565654
  "use strict";
@@ -565655,10 +565659,9 @@ var init_render = __esm({
565655
565659
  init_text_selection();
565656
565660
  init_task_complete_box();
565657
565661
  init_model_picker();
565658
- isTTY2 = process.stdout.isTTY ?? false;
565659
565662
  c3 = {
565660
565663
  bold: (t2) => ansi2("1", t2),
565661
- dim: (t2) => isTTY2 ? `${dimFg()}${t2}\x1B[0m` : t2,
565664
+ dim: (t2) => stdoutIsTTY() ? `${dimFg()}${t2}\x1B[0m` : t2,
565662
565665
  italic: (t2) => ansi2("3", t2),
565663
565666
  red: (t2) => ansi2("31", t2),
565664
565667
  green: (t2) => ansi2("32", t2),
@@ -565827,6 +565830,7 @@ var init_render = __esm({
565827
565830
  transcribe_url: 43,
565828
565831
  ask_user: 44
565829
565832
  };
565833
+ TOOL_ERROR_COLOR_CODE = 198;
565830
565834
  BOX_TL2 = "╭";
565831
565835
  BOX_TR2 = "╮";
565832
565836
  BOX_BL2 = "╰";
@@ -577003,10 +577007,10 @@ ${CONTENT_BG_SEQ}`);
577003
577007
 
577004
577008
  // packages/cli/src/tui/tui-select.ts
577005
577009
  function ansi3(code8, text) {
577006
- return isTTY3 ? `\x1B[${code8}m${text}\x1B[0m` : text;
577010
+ return isTTY2 ? `\x1B[${code8}m${text}\x1B[0m` : text;
577007
577011
  }
577008
577012
  function fg2563(code8, text) {
577009
- return isTTY3 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
577013
+ return isTTY2 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
577010
577014
  }
577011
577015
  function stripAnsi3(s2) {
577012
577016
  return s2.replace(/\x1B\[[0-9;]*m/g, "");
@@ -577636,14 +577640,14 @@ ${tuiBgSeq()}`);
577636
577640
  }
577637
577641
  });
577638
577642
  }
577639
- var isTTY3, MENU_ACTIVE_GREEN_256, selectColors;
577643
+ var isTTY2, MENU_ACTIVE_GREEN_256, selectColors;
577640
577644
  var init_tui_select = __esm({
577641
577645
  "packages/cli/src/tui/tui-select.ts"() {
577642
577646
  "use strict";
577643
577647
  init_overlay_lock();
577644
577648
  init_theme();
577645
577649
  init_layout2();
577646
- isTTY3 = process.stdout.isTTY ?? false;
577650
+ isTTY2 = process.stdout.isTTY ?? false;
577647
577651
  MENU_ACTIVE_GREEN_256 = 154;
577648
577652
  selectColors = {
577649
577653
  blue: (t2) => fg2563(39, t2),
@@ -582209,7 +582213,7 @@ var init_workspace_explorer = __esm({
582209
582213
  import { existsSync as existsSync95 } from "node:fs";
582210
582214
  import { extname as extname13, resolve as resolve39 } from "node:path";
582211
582215
  function ansi4(code8, text) {
582212
- return isTTY4 ? `\x1B[${code8}m${text}\x1B[0m` : text;
582216
+ return isTTY3 ? `\x1B[${code8}m${text}\x1B[0m` : text;
582213
582217
  }
582214
582218
  function stripAnsi4(s2) {
582215
582219
  return s2.replace(/\x1B\[[0-9;]*m/g, "");
@@ -582380,13 +582384,13 @@ function showDropPanel(opts) {
582380
582384
  render2();
582381
582385
  });
582382
582386
  }
582383
- var isTTY4, dc;
582387
+ var isTTY3, dc;
582384
582388
  var init_drop_panel = __esm({
582385
582389
  "packages/cli/src/tui/drop-panel.ts"() {
582386
582390
  "use strict";
582387
582391
  init_overlay_lock();
582388
582392
  init_layout2();
582389
- isTTY4 = process.stdout.isTTY ?? false;
582393
+ isTTY3 = process.stdout.isTTY ?? false;
582390
582394
  dc = {
582391
582395
  bold: (t2) => ansi4("1", t2),
582392
582396
  dim: (t2) => ansi4("38;5;250", t2),
@@ -584736,7 +584740,7 @@ async function startNeovimMode(opts) {
584736
584740
  const ptyCols = opts.cols;
584737
584741
  const topOffset = opts.topOffset ?? 0;
584738
584742
  const ptyRows = Math.max(5, opts.contentRows);
584739
- if (isTTY5) {
584743
+ if (isTTY4) {
584740
584744
  const L = layout();
584741
584745
  const bottomBound = L.contentBottom;
584742
584746
  process.stdout.write(
@@ -584805,7 +584809,7 @@ async function startNeovimMode(opts) {
584805
584809
  }
584806
584810
  }
584807
584811
  function renderToolbar() {
584808
- if (!isTTY5) return;
584812
+ if (!isTTY4) return;
584809
584813
  const L = layout();
584810
584814
  const hdrRow = L.headerContent;
584811
584815
  const fg2 = 252;
@@ -584866,7 +584870,7 @@ async function startNeovimMode(opts) {
584866
584870
  stdin.setRawMode(true);
584867
584871
  }
584868
584872
  stdin.resume();
584869
- if (isTTY5) {
584873
+ if (isTTY4) {
584870
584874
  process.stdout.write("\x1B[?1002h\x1B[?1006h");
584871
584875
  }
584872
584876
  state.stdinHandler = (data) => {
@@ -585165,13 +585169,13 @@ function doCleanup(state) {
585165
585169
  }
585166
585170
  state.opts.onExit?.();
585167
585171
  }
585168
- var isTTY5, PTY_MODE_ENABLE_RE, STDIN_MOUSE_FOCUS_RE, _state;
585172
+ var isTTY4, PTY_MODE_ENABLE_RE, STDIN_MOUSE_FOCUS_RE, _state;
585169
585173
  var init_neovim_mode = __esm({
585170
585174
  "packages/cli/src/tui/neovim-mode.ts"() {
585171
585175
  "use strict";
585172
585176
  init_setup();
585173
585177
  init_layout2();
585174
- isTTY5 = process.stdout.isTTY ?? false;
585178
+ isTTY4 = process.stdout.isTTY ?? false;
585175
585179
  PTY_MODE_ENABLE_RE = /\x1B\[\?(?:1004|2004)h/g;
585176
585180
  STDIN_MOUSE_FOCUS_RE = /\x1B\[<[\d;]+[Mm]|\x1B\[M[\s\S]{3}|\x1B\[[IO]|\x1BO[ABCD]/g;
585177
585181
  _state = null;
@@ -604876,7 +604880,7 @@ function setCarouselWriter(writer) {
604876
604880
  chromeWrite2 = writer;
604877
604881
  }
604878
604882
  function fg(code8, text) {
604879
- return isTTY6 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
604883
+ return isTTY5 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
604880
604884
  }
604881
604885
  function displayWidth(str) {
604882
604886
  let w = 0;
@@ -604914,12 +604918,12 @@ function createRow(phraseIndices, speed, direction, bank2) {
604914
604918
  const phrases = phraseIndices.map((i2) => bank2[i2 % bank2.length]);
604915
604919
  return { phrases, offset: 0, speed, direction, renderedPlain: "" };
604916
604920
  }
604917
- var isTTY6, chromeWrite2, PHRASES, Carousel;
604921
+ var isTTY5, chromeWrite2, PHRASES, Carousel;
604918
604922
  var init_carousel = __esm({
604919
604923
  "packages/cli/src/tui/carousel.ts"() {
604920
604924
  "use strict";
604921
604925
  init_layout2();
604922
- isTTY6 = process.stdout.isTTY ?? false;
604926
+ isTTY5 = process.stdout.isTTY ?? false;
604923
604927
  chromeWrite2 = ((data) => {
604924
604928
  process.stdout.write(data);
604925
604929
  });
@@ -605031,7 +605035,7 @@ var init_carousel = __esm({
605031
605035
  * Sets scroll region to row 5+ for all content/readline.
605032
605036
  */
605033
605037
  start() {
605034
- if (!isTTY6) return 0;
605038
+ if (!isTTY5) return 0;
605035
605039
  this.started = true;
605036
605040
  setHeaderHeight(this.reservedRows);
605037
605041
  const L = layout();
@@ -605063,7 +605067,7 @@ var init_carousel = __esm({
605063
605067
  * Row 4 is left blank as a separator.
605064
605068
  */
605065
605069
  renderFrame() {
605066
- if (!isTTY6) return;
605070
+ if (!isTTY5) return;
605067
605071
  const L = layout();
605068
605072
  let buf = "\x1B7";
605069
605073
  buf += "\x1B[?7l";
@@ -605140,7 +605144,7 @@ var init_carousel = __esm({
605140
605144
  process.stdout.removeListener("resize", this.resizeHandler);
605141
605145
  this.resizeHandler = null;
605142
605146
  }
605143
- if (!isTTY6 || !this.started) return;
605147
+ if (!isTTY5 || !this.started) return;
605144
605148
  const L = layout();
605145
605149
  let buf = "\x1B7";
605146
605150
  for (let i2 = 0; i2 < this.reservedRows; i2++) {
@@ -605376,13 +605380,13 @@ function createAnimatedBanner(id, name10, frameBuilders, frameDurationMs, author
605376
605380
  createdAt: (/* @__PURE__ */ new Date()).toISOString()
605377
605381
  };
605378
605382
  }
605379
- var isTTY7, chromeWrite3, MNEMONIC_ADJECTIVES, MNEMONIC_NOUNS, BannerRenderer;
605383
+ var isTTY6, chromeWrite3, MNEMONIC_ADJECTIVES, MNEMONIC_NOUNS, BannerRenderer;
605380
605384
  var init_banner = __esm({
605381
605385
  "packages/cli/src/tui/banner.ts"() {
605382
605386
  "use strict";
605383
605387
  init_theme();
605384
605388
  init_layout2();
605385
- isTTY7 = process.stdout.isTTY ?? false;
605389
+ isTTY6 = process.stdout.isTTY ?? false;
605386
605390
  chromeWrite3 = ((data) => {
605387
605391
  process.stdout.write(data);
605388
605392
  });
@@ -605544,7 +605548,7 @@ var init_banner = __esm({
605544
605548
  * Returns the number of rows reserved (3 banner + 1 separator = 4).
605545
605549
  */
605546
605550
  start() {
605547
- if (!isTTY7 || !this.currentDesign) return 0;
605551
+ if (!isTTY6 || !this.currentDesign) return 0;
605548
605552
  this.renderCurrentFrame();
605549
605553
  this._resizeHandler = () => {
605550
605554
  setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
@@ -605585,7 +605589,7 @@ var init_banner = __esm({
605585
605589
  }
605586
605590
  /** Render the current frame into the top 3 rows (public for refresh callbacks) */
605587
605591
  renderCurrentFrame() {
605588
- if (!isTTY7 || !this.currentDesign) return;
605592
+ if (!isTTY6 || !this.currentDesign) return;
605589
605593
  const frame = this.currentDesign.frames[this.currentFrame];
605590
605594
  if (!frame) return;
605591
605595
  this.width = termCols();
@@ -606000,13 +606004,13 @@ __export(syntax_highlight_exports, {
606000
606004
  prewarm: () => prewarm
606001
606005
  });
606002
606006
  function highlightingDisabled() {
606003
- return !isTTY8 || noColorEnv || disableEnv;
606007
+ return !isTTY7 || noColorEnv || disableEnv;
606004
606008
  }
606005
606009
  async function loadHighlighter() {
606006
606010
  if (_state2.attempted) return _state2.fn;
606007
606011
  _state2.attempted = true;
606008
606012
  if (highlightingDisabled()) {
606009
- _state2.reason = !isTTY8 ? "non-tty" : noColorEnv ? "NO_COLOR set" : "OMNIUS_TUI_HIGHLIGHT=0";
606013
+ _state2.reason = !isTTY7 ? "non-tty" : noColorEnv ? "NO_COLOR set" : "OMNIUS_TUI_HIGHLIGHT=0";
606010
606014
  return null;
606011
606015
  }
606012
606016
  try {
@@ -606053,7 +606057,7 @@ function getHighlightStatus() {
606053
606057
  available: isAvailable(),
606054
606058
  attempted: _state2.attempted,
606055
606059
  reason: _state2.reason,
606056
- isTTY: isTTY8,
606060
+ isTTY: isTTY7,
606057
606061
  noColor: noColorEnv,
606058
606062
  disabledByEnv: disableEnv
606059
606063
  };
@@ -606143,11 +606147,11 @@ function highlightBlock(code8, language) {
606143
606147
  return code8.split("\n");
606144
606148
  }
606145
606149
  }
606146
- var isTTY8, noColorEnv, disableEnv, _state2;
606150
+ var isTTY7, noColorEnv, disableEnv, _state2;
606147
606151
  var init_syntax_highlight = __esm({
606148
606152
  "packages/cli/src/tui/syntax-highlight.ts"() {
606149
606153
  "use strict";
606150
- isTTY8 = process.stdout?.isTTY ?? false;
606154
+ isTTY7 = process.stdout?.isTTY ?? false;
606151
606155
  noColorEnv = process.env["NO_COLOR"] !== void 0 && process.env["NO_COLOR"] !== "";
606152
606156
  disableEnv = process.env["OMNIUS_TUI_HIGHLIGHT"] === "0";
606153
606157
  _state2 = {
@@ -606160,21 +606164,21 @@ var init_syntax_highlight = __esm({
606160
606164
 
606161
606165
  // packages/cli/src/tui/stream-renderer.ts
606162
606166
  function fg2564(code8, text) {
606163
- return isTTY9 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
606167
+ return isTTY8 ? `\x1B[38;5;${code8}m${text}\x1B[0m` : text;
606164
606168
  }
606165
606169
  function dimText(text) {
606166
- return isTTY9 ? `\x1B[38;5;${tuiTextDim()}m${text}\x1B[0m` : text;
606170
+ return isTTY8 ? `\x1B[38;5;${tuiTextDim()}m${text}\x1B[0m` : text;
606167
606171
  }
606168
606172
  function italicText(text) {
606169
- return isTTY9 ? `\x1B[3m${text}\x1B[0m` : text;
606173
+ return isTTY8 ? `\x1B[3m${text}\x1B[0m` : text;
606170
606174
  }
606171
606175
  function dimItalic(text) {
606172
- return isTTY9 ? `\x1B[3m\x1B[38;5;${tuiTextDim()}m${text}\x1B[0m` : text;
606176
+ return isTTY8 ? `\x1B[3m\x1B[38;5;${tuiTextDim()}m${text}\x1B[0m` : text;
606173
606177
  }
606174
606178
  function boldText(text) {
606175
- return isTTY9 ? `\x1B[1m${text}\x1B[0m` : text;
606179
+ return isTTY8 ? `\x1B[1m${text}\x1B[0m` : text;
606176
606180
  }
606177
- var isTTY9, PASTEL, StreamRenderer;
606181
+ var isTTY8, PASTEL, StreamRenderer;
606178
606182
  var init_stream_renderer = __esm({
606179
606183
  "packages/cli/src/tui/stream-renderer.ts"() {
606180
606184
  "use strict";
@@ -606182,7 +606186,7 @@ var init_stream_renderer = __esm({
606182
606186
  init_text_selection();
606183
606187
  init_theme();
606184
606188
  init_syntax_highlight();
606185
- isTTY9 = process.stdout.isTTY ?? false;
606189
+ isTTY8 = process.stdout.isTTY ?? false;
606186
606190
  PASTEL = {
606187
606191
  key: 222,
606188
606192
  // light gold — JSON keys
@@ -606551,7 +606555,7 @@ var init_stream_renderer = __esm({
606551
606555
  * Also maintains _cursorCol so emitWrapped can decide when to force a
606552
606556
  * wrap on the NEXT partial flush (avoiding bottom-row token pile-up). */
606553
606557
  writeRaw(text) {
606554
- if (isTTY9) {
606558
+ if (isTTY8) {
606555
606559
  process.stdout.write(`\x1B[?25l\x1B[?7l${text}\x1B[?7h`);
606556
606560
  } else {
606557
606561
  process.stdout.write(text);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omnius",
3
- "version": "1.0.116",
3
+ "version": "1.0.117",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omnius",
9
- "version": "1.0.116",
9
+ "version": "1.0.117",
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.116",
3
+ "version": "1.0.117",
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",