open-agents-ai 0.187.67 → 0.187.68

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.
Files changed (2) hide show
  1. package/dist/index.js +137 -126
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -270805,7 +270805,131 @@ var init_wrapper2 = __esm({
270805
270805
  }
270806
270806
  });
270807
270807
 
270808
+ // packages/cli/dist/tui/theme.js
270809
+ var theme_exports = {};
270810
+ __export(theme_exports, {
270811
+ getThemeConfig: () => getThemeConfig,
270812
+ setThemeAccent: () => setThemeAccent,
270813
+ setThemeBackground: () => setThemeBackground,
270814
+ setThemeCustom: () => setThemeCustom,
270815
+ setThemeMode: () => setThemeMode,
270816
+ setThemeTextDim: () => setThemeTextDim,
270817
+ setThemeTextPrimary: () => setThemeTextPrimary,
270818
+ themeMode: () => themeMode,
270819
+ tuiAccent: () => tuiAccent,
270820
+ tuiAccentFg: () => tuiAccentFg,
270821
+ tuiBg: () => tuiBg,
270822
+ tuiBgSeq: () => tuiBgSeq,
270823
+ tuiBoxFg: () => tuiBoxFg,
270824
+ tuiTextDim: () => tuiTextDim,
270825
+ tuiTextPrimary: () => tuiTextPrimary,
270826
+ tuiTextPrimaryFg: () => tuiTextPrimaryFg
270827
+ });
270828
+ function themeMode() {
270829
+ return _config2.mode;
270830
+ }
270831
+ function tuiBgSeq() {
270832
+ return _config2.bg < 0 ? "\x1B[49m" : `\x1B[48;5;${_config2.bg}m`;
270833
+ }
270834
+ function tuiBg() {
270835
+ return _config2.bg;
270836
+ }
270837
+ function tuiAccentFg() {
270838
+ return _config2.accent < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.accent}m`;
270839
+ }
270840
+ function tuiAccent() {
270841
+ return _config2.accent;
270842
+ }
270843
+ function tuiBoxFg() {
270844
+ return _config2.boxColor < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.boxColor}m`;
270845
+ }
270846
+ function tuiTextPrimary() {
270847
+ return _config2.textPrimary;
270848
+ }
270849
+ function tuiTextPrimaryFg() {
270850
+ return _config2.textPrimary < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.textPrimary}m`;
270851
+ }
270852
+ function tuiTextDim() {
270853
+ return _config2.textDim;
270854
+ }
270855
+ function setThemeMode(mode) {
270856
+ _config2 = { ...PRESETS[mode] };
270857
+ }
270858
+ function setThemeCustom(overrides) {
270859
+ _config2 = { ..._config2, ...overrides, mode: "custom" };
270860
+ }
270861
+ function getThemeConfig() {
270862
+ return _config2;
270863
+ }
270864
+ function setThemeBackground(color) {
270865
+ _config2.bg = color;
270866
+ _config2.mode = "custom";
270867
+ }
270868
+ function setThemeAccent(color) {
270869
+ _config2.accent = color;
270870
+ _config2.mode = "custom";
270871
+ }
270872
+ function setThemeTextPrimary(color) {
270873
+ _config2.textPrimary = color;
270874
+ _config2.mode = "custom";
270875
+ }
270876
+ function setThemeTextDim(color) {
270877
+ _config2.textDim = color;
270878
+ _config2.mode = "custom";
270879
+ }
270880
+ var PRESETS, _config2;
270881
+ var init_theme = __esm({
270882
+ "packages/cli/dist/tui/theme.js"() {
270883
+ "use strict";
270884
+ PRESETS = {
270885
+ system: {
270886
+ mode: "system",
270887
+ bg: -1,
270888
+ // terminal default background
270889
+ accent: -1,
270890
+ // terminal default foreground
270891
+ textPrimary: -1,
270892
+ // terminal default foreground
270893
+ textDim: 245,
270894
+ // slightly dim
270895
+ boxColor: -1
270896
+ // terminal default foreground
270897
+ },
270898
+ branding: {
270899
+ mode: "branding",
270900
+ bg: 0,
270901
+ // black
270902
+ accent: 178,
270903
+ // #ffae00 yellow
270904
+ textPrimary: 178,
270905
+ // #ffae00 yellow
270906
+ textDim: 240,
270907
+ // grey
270908
+ boxColor: 178
270909
+ // #ffae00 yellow
270910
+ },
270911
+ custom: {
270912
+ mode: "custom",
270913
+ bg: 0,
270914
+ accent: 178,
270915
+ textPrimary: 252,
270916
+ textDim: 245,
270917
+ boxColor: 252
270918
+ }
270919
+ };
270920
+ _config2 = { ...PRESETS.branding };
270921
+ }
270922
+ });
270923
+
270808
270924
  // packages/cli/dist/tui/render.js
270925
+ function accentFg() {
270926
+ const a2 = tuiAccent();
270927
+ return a2 < 0 ? "\x1B[39m" : `\x1B[38;5;${a2}m`;
270928
+ }
270929
+ function textFg() {
270930
+ const t2 = tuiTextPrimary();
270931
+ return t2 < 0 ? "\x1B[39m" : `\x1B[38;5;${t2}m`;
270932
+ }
270809
270933
  function ansi2(code8, text) {
270810
270934
  return isTTY2 ? `\x1B[${code8}m${text}\x1B[0m` : text;
270811
270935
  }
@@ -270930,7 +271054,7 @@ function formatMarkdownBlock(text) {
270930
271054
  }
270931
271055
  function renderUserMessage(text) {
270932
271056
  process.stdout.write(`
270933
- \x1B[38;5;178m\u25B9\x1B[0m ${c3.bold(text)}
271057
+ ${accentFg()}\u25B9\x1B[0m ${c3.bold(text)}
270934
271058
  `);
270935
271059
  }
270936
271060
  function renderAssistantText(text) {
@@ -271214,8 +271338,8 @@ ${icon} \x1B[38;5;198m${message2}\x1B[0m
271214
271338
  }
271215
271339
  function renderInfo(message2) {
271216
271340
  const redir = _contentWriteHook?.redirect?.();
271217
- const icon = "\x1B[38;5;178mi\x1B[0m";
271218
- const text = `${icon} \x1B[38;5;252m${message2}\x1B[0m
271341
+ const icon = `${accentFg()}i\x1B[0m`;
271342
+ const text = `${icon} ${textFg()}${message2}\x1B[0m
271219
271343
  `;
271220
271344
  if (redir) {
271221
271345
  redir(text);
@@ -271240,7 +271364,7 @@ function renderWarning(message2) {
271240
271364
  }
271241
271365
  function renderVerbose(message2) {
271242
271366
  const redir = _contentWriteHook?.redirect?.();
271243
- const text = ` \x1B[38;5;178m\u25B9\x1B[0m ${c3.dim(message2)}
271367
+ const text = ` ${accentFg()}\u25B9\x1B[0m ${c3.dim(message2)}
271244
271368
  `;
271245
271369
  if (redir) {
271246
271370
  redir(text);
@@ -271365,6 +271489,7 @@ var isTTY2, c3, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, acc
271365
271489
  var init_render = __esm({
271366
271490
  "packages/cli/dist/tui/render.js"() {
271367
271491
  "use strict";
271492
+ init_theme();
271368
271493
  isTTY2 = process.stdout.isTTY ?? false;
271369
271494
  c3 = {
271370
271495
  bold: (t2) => ansi2("1", t2),
@@ -276953,122 +277078,6 @@ var init_oa_directory = __esm({
276953
277078
  }
276954
277079
  });
276955
277080
 
276956
- // packages/cli/dist/tui/theme.js
276957
- var theme_exports = {};
276958
- __export(theme_exports, {
276959
- getThemeConfig: () => getThemeConfig,
276960
- setThemeAccent: () => setThemeAccent,
276961
- setThemeBackground: () => setThemeBackground,
276962
- setThemeCustom: () => setThemeCustom,
276963
- setThemeMode: () => setThemeMode,
276964
- setThemeTextDim: () => setThemeTextDim,
276965
- setThemeTextPrimary: () => setThemeTextPrimary,
276966
- themeMode: () => themeMode,
276967
- tuiAccent: () => tuiAccent,
276968
- tuiAccentFg: () => tuiAccentFg,
276969
- tuiBg: () => tuiBg,
276970
- tuiBgSeq: () => tuiBgSeq,
276971
- tuiBoxFg: () => tuiBoxFg,
276972
- tuiTextDim: () => tuiTextDim,
276973
- tuiTextPrimary: () => tuiTextPrimary,
276974
- tuiTextPrimaryFg: () => tuiTextPrimaryFg
276975
- });
276976
- function themeMode() {
276977
- return _config2.mode;
276978
- }
276979
- function tuiBgSeq() {
276980
- return _config2.bg < 0 ? "\x1B[49m" : `\x1B[48;5;${_config2.bg}m`;
276981
- }
276982
- function tuiBg() {
276983
- return _config2.bg;
276984
- }
276985
- function tuiAccentFg() {
276986
- return _config2.accent < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.accent}m`;
276987
- }
276988
- function tuiAccent() {
276989
- return _config2.accent;
276990
- }
276991
- function tuiBoxFg() {
276992
- return _config2.boxColor < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.boxColor}m`;
276993
- }
276994
- function tuiTextPrimary() {
276995
- return _config2.textPrimary;
276996
- }
276997
- function tuiTextPrimaryFg() {
276998
- return _config2.textPrimary < 0 ? "\x1B[39m" : `\x1B[38;5;${_config2.textPrimary}m`;
276999
- }
277000
- function tuiTextDim() {
277001
- return _config2.textDim;
277002
- }
277003
- function setThemeMode(mode) {
277004
- _config2 = { ...PRESETS[mode] };
277005
- }
277006
- function setThemeCustom(overrides) {
277007
- _config2 = { ..._config2, ...overrides, mode: "custom" };
277008
- }
277009
- function getThemeConfig() {
277010
- return _config2;
277011
- }
277012
- function setThemeBackground(color) {
277013
- _config2.bg = color;
277014
- _config2.mode = "custom";
277015
- }
277016
- function setThemeAccent(color) {
277017
- _config2.accent = color;
277018
- _config2.mode = "custom";
277019
- }
277020
- function setThemeTextPrimary(color) {
277021
- _config2.textPrimary = color;
277022
- _config2.mode = "custom";
277023
- }
277024
- function setThemeTextDim(color) {
277025
- _config2.textDim = color;
277026
- _config2.mode = "custom";
277027
- }
277028
- var PRESETS, _config2;
277029
- var init_theme = __esm({
277030
- "packages/cli/dist/tui/theme.js"() {
277031
- "use strict";
277032
- PRESETS = {
277033
- system: {
277034
- mode: "system",
277035
- bg: -1,
277036
- // terminal default background
277037
- accent: -1,
277038
- // terminal default foreground
277039
- textPrimary: -1,
277040
- // terminal default foreground
277041
- textDim: 245,
277042
- // slightly dim
277043
- boxColor: -1
277044
- // terminal default foreground
277045
- },
277046
- branding: {
277047
- mode: "branding",
277048
- bg: 0,
277049
- // black
277050
- accent: 178,
277051
- // #ffae00 yellow
277052
- textPrimary: 178,
277053
- // #ffae00 yellow
277054
- textDim: 240,
277055
- // grey
277056
- boxColor: 178
277057
- // #ffae00 yellow
277058
- },
277059
- custom: {
277060
- mode: "custom",
277061
- bg: 0,
277062
- accent: 178,
277063
- textPrimary: 252,
277064
- textDim: 245,
277065
- boxColor: 252
277066
- }
277067
- };
277068
- _config2 = { ...PRESETS.branding };
277069
- }
277070
- });
277071
-
277072
277081
  // packages/cli/dist/tui/braille-spinner.js
277073
277082
  function buildColorRamp(ramp) {
277074
277083
  return [...ramp, ...ramp.slice(1, -1).reverse()];
@@ -278038,8 +278047,9 @@ var init_daemon_registry = __esm({
278038
278047
  */
278039
278048
  renderBar(width) {
278040
278049
  this.refresh();
278041
- const PANEL_BG = "\x1B[48;5;0m";
278042
- const BTN_BG = "\x1B[48;5;0m";
278050
+ const { tuiBgSeq: tuiBgSeq2 } = (init_theme(), __toCommonJS(theme_exports));
278051
+ const PANEL_BG = tuiBgSeq2();
278052
+ const BTN_BG = tuiBgSeq2();
278043
278053
  let bar = "";
278044
278054
  for (const [, d2] of this.daemons) {
278045
278055
  const dotColor = d2.status === "running" ? "32" : (
@@ -280230,7 +280240,7 @@ ${CONTENT_BG_SEQ}`);
280230
280240
  if (fullLine.length <= availWidth) {
280231
280241
  let displayLine;
280232
280242
  if (ghost) {
280233
- displayLine = fullLine + `\x1B[7m\x1B[38;5;240m${ghost[0]}\x1B[0m\x1B[2m\x1B[38;5;240m${ghost.slice(1)}\x1B[0m`;
280243
+ displayLine = fullLine + `\x1B[7m\x1B[38;5;${TEXT_DIM}m${ghost[0]}\x1B[0m\x1B[2m\x1B[38;5;${TEXT_DIM}m${ghost.slice(1)}\x1B[0m`;
280234
280244
  } else {
280235
280245
  displayLine = _StatusBar.insertVisualCursor(fullLine, cursorPos);
280236
280246
  }
@@ -280878,7 +280888,7 @@ function tuiSelect(opts) {
280878
280888
  }
280879
280889
  const reservedTopBottom = 0;
280880
280890
  const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
280881
- const selectChrome = (hasCrumbs ? 11 : 10) + 3;
280891
+ const selectChrome = (hasCrumbs ? 11 : 10) + 1;
280882
280892
  const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : process.stdout.rows ?? 24;
280883
280893
  let maxVisible = opts.maxVisible ?? Math.max(3, contentArea - selectChrome);
280884
280894
  let scrollOffset = 0;
@@ -280924,7 +280934,7 @@ function tuiSelect(opts) {
280924
280934
  }
280925
280935
  overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
280926
280936
  const lines = [];
280927
- lines.push("", "", "");
280937
+ lines.push("");
280928
280938
  if (hasBreadcrumbs) {
280929
280939
  const trail = opts.breadcrumbs.map((b) => selectColors.dim(b)).join(selectColors.dim(" \u203A "));
280930
280940
  lines.push(`
@@ -294123,7 +294133,8 @@ async function handleUpdate(subcommand, ctx3) {
294123
294133
  const statusText = isDone ? `v${version4}` : statusLine || `v${version4}`;
294124
294134
  const statusTrunc = statusText.slice(0, innerW - 2);
294125
294135
  const sCol = centerCol - Math.floor(statusTrunc.length / 2);
294126
- buf += `\x1B[${boxTop + 3};${sCol}H\x1B[38;5;240m${statusTrunc}\x1B[0m`;
294136
+ const { tuiTextDim: getDimColor } = (init_theme(), __toCommonJS(theme_exports));
294137
+ buf += `\x1B[${boxTop + 3};${sCol}H\x1B[38;5;${getDimColor()}m${statusTrunc}\x1B[0m`;
294127
294138
  buf += `\x1B[0m\x1B8\x1B[?25h\x1B[?2026l`;
294128
294139
  process.stdout.write(buf);
294129
294140
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.67",
3
+ "version": "0.187.68",
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",