open-agents-ai 0.187.67 → 0.187.69
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 +148 -129
- 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
|
-
\
|
|
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 =
|
|
271218
|
-
const text = `${icon}
|
|
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 = ` \
|
|
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
|
|
278042
|
-
const
|
|
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" : (
|
|
@@ -278371,6 +278381,8 @@ var init_status_bar = __esm({
|
|
|
278371
278381
|
_suggestDelayTimer = null;
|
|
278372
278382
|
/** Whether suggestions were manually dismissed via Esc */
|
|
278373
278383
|
_suggestDismissed = false;
|
|
278384
|
+
/** Suppress hookStdin redraws during Enter processing to prevent cursor shift */
|
|
278385
|
+
_suppressStdinRedraw = false;
|
|
278374
278386
|
/** Callback to get available slash commands for suggestion matching */
|
|
278375
278387
|
_commandListProvider = null;
|
|
278376
278388
|
/** Callback to apply a selected suggestion to the input line */
|
|
@@ -280230,7 +280242,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280230
280242
|
if (fullLine.length <= availWidth) {
|
|
280231
280243
|
let displayLine;
|
|
280232
280244
|
if (ghost) {
|
|
280233
|
-
displayLine = fullLine + `\x1B[7m\x1B[38;5
|
|
280245
|
+
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
280246
|
} else {
|
|
280235
280247
|
displayLine = _StatusBar.insertVisualCursor(fullLine, cursorPos);
|
|
280236
280248
|
}
|
|
@@ -280634,9 +280646,13 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280634
280646
|
const currentLine = rl.line ?? "";
|
|
280635
280647
|
rl.line = "";
|
|
280636
280648
|
rl.cursor = 0;
|
|
280649
|
+
self2._suppressStdinRedraw = true;
|
|
280637
280650
|
self2.updateFooterHeight();
|
|
280638
280651
|
self2.renderFooterAndPositionInput();
|
|
280639
|
-
|
|
280652
|
+
rl.emit("line", currentLine);
|
|
280653
|
+
setImmediate(() => {
|
|
280654
|
+
self2._suppressStdinRedraw = false;
|
|
280655
|
+
});
|
|
280640
280656
|
return;
|
|
280641
280657
|
}
|
|
280642
280658
|
if (self2.inputStateProvider && key?.name !== "backspace") {
|
|
@@ -280701,7 +280717,11 @@ ${CONTENT_BG_SEQ}`);
|
|
|
280701
280717
|
process.stdin.on("data", () => {
|
|
280702
280718
|
if (!this.active)
|
|
280703
280719
|
return;
|
|
280720
|
+
if (this._suppressStdinRedraw)
|
|
280721
|
+
return;
|
|
280704
280722
|
setImmediate(() => {
|
|
280723
|
+
if (this._suppressStdinRedraw)
|
|
280724
|
+
return;
|
|
280705
280725
|
if (this.writeDepth > 0) {
|
|
280706
280726
|
this.renderInputRowDuringStream();
|
|
280707
280727
|
} else {
|
|
@@ -280878,7 +280898,7 @@ function tuiSelect(opts) {
|
|
|
280878
280898
|
}
|
|
280879
280899
|
const reservedTopBottom = 0;
|
|
280880
280900
|
const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
|
|
280881
|
-
const selectChrome = (hasCrumbs ? 11 : 10) +
|
|
280901
|
+
const selectChrome = (hasCrumbs ? 11 : 10) + 1;
|
|
280882
280902
|
const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : process.stdout.rows ?? 24;
|
|
280883
280903
|
let maxVisible = opts.maxVisible ?? Math.max(3, contentArea - selectChrome);
|
|
280884
280904
|
let scrollOffset = 0;
|
|
@@ -280924,7 +280944,7 @@ function tuiSelect(opts) {
|
|
|
280924
280944
|
}
|
|
280925
280945
|
overlayWrite(`${tuiBgSeq()}\x1B[H\x1B[2J`);
|
|
280926
280946
|
const lines = [];
|
|
280927
|
-
lines.push(""
|
|
280947
|
+
lines.push("");
|
|
280928
280948
|
if (hasBreadcrumbs) {
|
|
280929
280949
|
const trail = opts.breadcrumbs.map((b) => selectColors.dim(b)).join(selectColors.dim(" \u203A "));
|
|
280930
280950
|
lines.push(`
|
|
@@ -280993,7 +281013,6 @@ function tuiSelect(opts) {
|
|
|
280993
281013
|
if (remaining > 0) {
|
|
280994
281014
|
lines.push(` ${selectColors.dim(` \u25BC ${remaining} more`)}`);
|
|
280995
281015
|
}
|
|
280996
|
-
lines.push("");
|
|
280997
281016
|
if (deleteConfirmIdx >= 0) {
|
|
280998
281017
|
lines.push(` ${selectColors.dim("\u2190/\u2192 select Enter confirm Esc cancel")}`);
|
|
280999
281018
|
} else {
|
|
@@ -281003,7 +281022,6 @@ function tuiSelect(opts) {
|
|
|
281003
281022
|
const escLabel = filter2 ? "clear filter" : hasBreadcrumbs ? "\u2190 back" : "cancel";
|
|
281004
281023
|
lines.push(` ${selectColors.dim("\u2191/\u2193 navigate Enter/Click select" + actionHint + deleteHint + customHint + " Esc " + escLabel + " Type to filter")}`);
|
|
281005
281024
|
}
|
|
281006
|
-
lines.push("");
|
|
281007
281025
|
let output = lines.join("\n").replace(/\x1B\[0m/g, `\x1B[0m${tuiBgSeq()}`).replace(/\n/g, `\x1B[K
|
|
281008
281026
|
${tuiBgSeq()}`);
|
|
281009
281027
|
overlayWrite(tuiBgSeq() + output + "\x1B[K");
|
|
@@ -294123,7 +294141,8 @@ async function handleUpdate(subcommand, ctx3) {
|
|
|
294123
294141
|
const statusText = isDone ? `v${version4}` : statusLine || `v${version4}`;
|
|
294124
294142
|
const statusTrunc = statusText.slice(0, innerW - 2);
|
|
294125
294143
|
const sCol = centerCol - Math.floor(statusTrunc.length / 2);
|
|
294126
|
-
|
|
294144
|
+
const { tuiTextDim: getDimColor } = (init_theme(), __toCommonJS(theme_exports));
|
|
294145
|
+
buf += `\x1B[${boxTop + 3};${sCol}H\x1B[38;5;${getDimColor()}m${statusTrunc}\x1B[0m`;
|
|
294127
294146
|
buf += `\x1B[0m\x1B8\x1B[?25h\x1B[?2026l`;
|
|
294128
294147
|
process.stdout.write(buf);
|
|
294129
294148
|
}
|
package/package.json
CHANGED