open-agents-ai 0.138.8 → 0.138.10
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 +40 -170
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -29732,58 +29732,6 @@ function renderVerbose(message) {
|
|
|
29732
29732
|
process.stdout.write(text);
|
|
29733
29733
|
_contentWriteHook?.end();
|
|
29734
29734
|
}
|
|
29735
|
-
function renderRichHeader(opts) {
|
|
29736
|
-
const w = getTermWidth();
|
|
29737
|
-
const divider = c2.dim("\u2500".repeat(Math.min(w - 4, 72)));
|
|
29738
|
-
let lines = 0;
|
|
29739
|
-
process.stdout.write("\n");
|
|
29740
|
-
lines++;
|
|
29741
|
-
const title = c2.bold(c2.cyan("open-agents"));
|
|
29742
|
-
const ver = c2.dim(`v${opts.version}`);
|
|
29743
|
-
const model = c2.dim(`model: ${c2.white(opts.model)}`);
|
|
29744
|
-
process.stdout.write(` ${title} ${ver} ${c2.dim("\xB7")} ${model}
|
|
29745
|
-
`);
|
|
29746
|
-
lines++;
|
|
29747
|
-
const ws = opts.workspace.length > 60 ? "..." + opts.workspace.slice(-57) : opts.workspace;
|
|
29748
|
-
process.stdout.write(` ${c2.dim("workspace:")} ${c2.white(ws)}
|
|
29749
|
-
`);
|
|
29750
|
-
lines++;
|
|
29751
|
-
process.stdout.write(` ${divider}
|
|
29752
|
-
`);
|
|
29753
|
-
lines++;
|
|
29754
|
-
process.stdout.write(` ${c2.bold("Tools")} ${c2.dim(`(${TOOL_NAMES.length}):`)} `);
|
|
29755
|
-
let lineLen = 14;
|
|
29756
|
-
for (let i = 0; i < TOOL_NAMES.length; i++) {
|
|
29757
|
-
const name = TOOL_NAMES[i];
|
|
29758
|
-
const sep = i < TOOL_NAMES.length - 1 ? " " : "";
|
|
29759
|
-
if (lineLen + name.length + 1 > w - 4) {
|
|
29760
|
-
process.stdout.write(`
|
|
29761
|
-
${" ".repeat(14)}`);
|
|
29762
|
-
lineLen = 14;
|
|
29763
|
-
lines++;
|
|
29764
|
-
}
|
|
29765
|
-
process.stdout.write(`${c2.cyan(name)}${sep}`);
|
|
29766
|
-
lineLen += name.length + 1;
|
|
29767
|
-
}
|
|
29768
|
-
process.stdout.write("\n");
|
|
29769
|
-
lines++;
|
|
29770
|
-
process.stdout.write(` ${c2.bold("Commands:")} ${COMMAND_NAMES.map((cmd) => c2.yellow(cmd)).join(" ")}
|
|
29771
|
-
`);
|
|
29772
|
-
lines++;
|
|
29773
|
-
process.stdout.write(` ${divider}
|
|
29774
|
-
`);
|
|
29775
|
-
lines++;
|
|
29776
|
-
const hintIdx = Math.floor(Date.now() / 1e4) % HINTS.length;
|
|
29777
|
-
const hint = HINTS[hintIdx];
|
|
29778
|
-
process.stdout.write(` ${c2.dim("\u{1F4A1}")} ${c2.italic(c2.dim(hint))}
|
|
29779
|
-
`);
|
|
29780
|
-
lines++;
|
|
29781
|
-
process.stdout.write(` ${c2.dim("Type a task to begin, or /help for all commands.")}
|
|
29782
|
-
|
|
29783
|
-
`);
|
|
29784
|
-
lines += 2;
|
|
29785
|
-
return lines;
|
|
29786
|
-
}
|
|
29787
29735
|
function renderCompactHeader(model) {
|
|
29788
29736
|
process.stdout.write(`
|
|
29789
29737
|
${c2.bold(c2.cyan("open-agents"))} ${c2.dim(`(${model})`)}
|
|
@@ -30002,7 +29950,7 @@ function formatDuration2(ms) {
|
|
|
30002
29950
|
const secs = Math.floor(totalSecs % 60);
|
|
30003
29951
|
return `${mins}m ${secs}s`;
|
|
30004
29952
|
}
|
|
30005
|
-
var isTTY2, c2, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLORS, _contentWriteHook
|
|
29953
|
+
var isTTY2, c2, pastel, _emojisEnabled, _colorsEnabled, MD, TOOL_ICONS, TOOL_LABELS, TOOL_COLORS, _contentWriteHook;
|
|
30006
29954
|
var init_render = __esm({
|
|
30007
29955
|
"packages/cli/dist/tui/render.js"() {
|
|
30008
29956
|
"use strict";
|
|
@@ -30160,78 +30108,6 @@ var init_render = __esm({
|
|
|
30160
30108
|
ask_user: pastel.sky
|
|
30161
30109
|
};
|
|
30162
30110
|
_contentWriteHook = null;
|
|
30163
|
-
HINTS = [
|
|
30164
|
-
"Ask the agent to connect to the Open Agents Nexus for P2P agent networking",
|
|
30165
|
-
"Use /voice to enable TTS voice feedback while the agent works",
|
|
30166
|
-
"Drop an image file onto the terminal to give the agent visual context",
|
|
30167
|
-
"Type while the agent works (+ prompt) to steer its approach",
|
|
30168
|
-
"Press Ctrl+C to abort the current task",
|
|
30169
|
-
"Use /model to switch between available Ollama models",
|
|
30170
|
-
"Use /endpoint to connect to remote vLLM or OpenAI-compatible APIs",
|
|
30171
|
-
"Create AGENTS.md or OA.md in your project root for custom instructions",
|
|
30172
|
-
"The agent stores learned patterns in .oa/memory/ for future sessions",
|
|
30173
|
-
"Use /update to check for and install the latest version",
|
|
30174
|
-
"The agent can take screenshots and OCR text from images autonomously",
|
|
30175
|
-
"Sub-agents can run independent tasks in parallel via sub_agent tool",
|
|
30176
|
-
"Background tasks let the agent run tests while making other changes",
|
|
30177
|
-
"Use /nexus connect to join the decentralized agent mesh network"
|
|
30178
|
-
];
|
|
30179
|
-
TOOL_NAMES = [
|
|
30180
|
-
"file_read",
|
|
30181
|
-
"file_write",
|
|
30182
|
-
"file_edit",
|
|
30183
|
-
"file_patch",
|
|
30184
|
-
"shell",
|
|
30185
|
-
"grep_search",
|
|
30186
|
-
"find_files",
|
|
30187
|
-
"list_directory",
|
|
30188
|
-
"web_search",
|
|
30189
|
-
"web_fetch",
|
|
30190
|
-
"memory_read",
|
|
30191
|
-
"memory_write",
|
|
30192
|
-
"batch_edit",
|
|
30193
|
-
"codebase_map",
|
|
30194
|
-
"diagnostic",
|
|
30195
|
-
"git_info",
|
|
30196
|
-
"background_run",
|
|
30197
|
-
"task_status",
|
|
30198
|
-
"task_output",
|
|
30199
|
-
"task_stop",
|
|
30200
|
-
"sub_agent",
|
|
30201
|
-
"image_read",
|
|
30202
|
-
"screenshot",
|
|
30203
|
-
"ocr",
|
|
30204
|
-
"transcribe_file",
|
|
30205
|
-
"transcribe_url",
|
|
30206
|
-
"aiwg_setup",
|
|
30207
|
-
"aiwg_health",
|
|
30208
|
-
"aiwg_workflow",
|
|
30209
|
-
"create_tool",
|
|
30210
|
-
"manage_tools",
|
|
30211
|
-
"ask_user",
|
|
30212
|
-
"task_complete"
|
|
30213
|
-
];
|
|
30214
|
-
COMMAND_NAMES = [
|
|
30215
|
-
"/model",
|
|
30216
|
-
"/models",
|
|
30217
|
-
"/endpoint",
|
|
30218
|
-
"/config",
|
|
30219
|
-
"/update",
|
|
30220
|
-
"/voice",
|
|
30221
|
-
"/listen",
|
|
30222
|
-
"/call",
|
|
30223
|
-
"/hangup",
|
|
30224
|
-
"/stream",
|
|
30225
|
-
"/verbose",
|
|
30226
|
-
"/dream",
|
|
30227
|
-
"/bruteforce",
|
|
30228
|
-
"/compact",
|
|
30229
|
-
"/tools",
|
|
30230
|
-
"/skills",
|
|
30231
|
-
"/clear",
|
|
30232
|
-
"/help",
|
|
30233
|
-
"/quit"
|
|
30234
|
-
];
|
|
30235
30111
|
}
|
|
30236
30112
|
});
|
|
30237
30113
|
|
|
@@ -44531,29 +44407,24 @@ function createDefaultBanner(version = "0.120.0") {
|
|
|
44531
44407
|
const width = process.stdout.columns ?? 80;
|
|
44532
44408
|
const rows = 3;
|
|
44533
44409
|
const grid = [];
|
|
44534
|
-
const
|
|
44410
|
+
const textColor = 178;
|
|
44411
|
+
const shades = [" ", "\u2591", "\u2592", "\u2593", "\u2588"];
|
|
44535
44412
|
for (let r = 0; r < rows; r++) {
|
|
44536
44413
|
const row = [];
|
|
44537
44414
|
for (let c3 = 0; c3 < width; c3++) {
|
|
44538
|
-
const progress = c3 / width;
|
|
44539
|
-
const
|
|
44540
|
-
|
|
44541
|
-
row.push({ char: gradient[charIdx], fg: yellowShade, bg: 0, bold: false });
|
|
44415
|
+
const progress = c3 / (width - 1);
|
|
44416
|
+
const shadeIdx = Math.min(shades.length - 1, Math.floor(progress * shades.length));
|
|
44417
|
+
row.push({ char: shades[shadeIdx], fg: textColor, bg: 0, bold: false });
|
|
44542
44418
|
}
|
|
44543
44419
|
grid.push(row);
|
|
44544
44420
|
}
|
|
44545
|
-
const
|
|
44546
|
-
const
|
|
44547
|
-
|
|
44548
|
-
|
|
44549
|
-
for (let c3 = Math.max(0, startCol - 1); c3 < Math.min(width, startCol + fullText.length + 1); c3++) {
|
|
44550
|
-
grid[1][c3] = { char: " ", fg: -1, bg: 0, bold: false };
|
|
44551
|
-
}
|
|
44552
|
-
for (let i = 0; i < versionText.length && startCol + i < width; i++) {
|
|
44553
|
-
grid[1][startCol + i] = { char: versionText[i], fg: 226, bg: 0, bold: true };
|
|
44421
|
+
const text = `OA v${version}`;
|
|
44422
|
+
const startCol = 2;
|
|
44423
|
+
for (let c3 = 0; c3 < Math.min(width, startCol + text.length + 2); c3++) {
|
|
44424
|
+
grid[1][c3] = { char: "\u2588", fg: textColor, bg: 0, bold: false };
|
|
44554
44425
|
}
|
|
44555
|
-
for (let i = 0; i <
|
|
44556
|
-
grid[1][startCol +
|
|
44426
|
+
for (let i = 0; i < text.length && startCol + i < width; i++) {
|
|
44427
|
+
grid[1][startCol + i] = { char: text[i], fg: 0, bg: textColor, bold: true };
|
|
44557
44428
|
}
|
|
44558
44429
|
return {
|
|
44559
44430
|
id: "default-header",
|
|
@@ -52220,24 +52091,36 @@ var init_status_bar = __esm({
|
|
|
52220
52091
|
if (!rl || !rl._ttyWrite)
|
|
52221
52092
|
return;
|
|
52222
52093
|
const origTtyWrite = rl._ttyWrite.bind(rl);
|
|
52223
|
-
|
|
52224
|
-
|
|
52094
|
+
const self = this;
|
|
52095
|
+
rl._ttyWrite = function(s, key) {
|
|
52096
|
+
if (!self.active)
|
|
52225
52097
|
return origTtyWrite(s, key);
|
|
52226
52098
|
const seq = s || "";
|
|
52099
|
+
if (seq.includes("[<64;") || seq.includes("\x1B[<64;")) {
|
|
52100
|
+
self.scrollContentUp(3);
|
|
52101
|
+
return;
|
|
52102
|
+
}
|
|
52103
|
+
if (seq.includes("[<65;") || seq.includes("\x1B[<65;")) {
|
|
52104
|
+
self.scrollContentDown(3);
|
|
52105
|
+
return;
|
|
52106
|
+
}
|
|
52227
52107
|
if (key?.name === "pageup" || seq === "\x1B[5~") {
|
|
52228
|
-
|
|
52108
|
+
self.pageUpContent();
|
|
52229
52109
|
return;
|
|
52230
52110
|
}
|
|
52231
52111
|
if (key?.name === "pagedown" || seq === "\x1B[6~") {
|
|
52232
|
-
|
|
52112
|
+
self.pageDownContent();
|
|
52233
52113
|
return;
|
|
52234
52114
|
}
|
|
52235
52115
|
if (key?.shift && key?.name === "up" || seq === "\x1B[1;2A") {
|
|
52236
|
-
|
|
52116
|
+
self.scrollContentUp(3);
|
|
52237
52117
|
return;
|
|
52238
52118
|
}
|
|
52239
52119
|
if (key?.shift && key?.name === "down" || seq === "\x1B[1;2B") {
|
|
52240
|
-
|
|
52120
|
+
self.scrollContentDown(3);
|
|
52121
|
+
return;
|
|
52122
|
+
}
|
|
52123
|
+
if (seq.includes("[<")) {
|
|
52241
52124
|
return;
|
|
52242
52125
|
}
|
|
52243
52126
|
return origTtyWrite(s, key);
|
|
@@ -53433,14 +53316,9 @@ async function startInteractive(config, repoPath) {
|
|
|
53433
53316
|
initOaDirectory(repoRoot);
|
|
53434
53317
|
const savedSettings = resolveSettings(repoRoot);
|
|
53435
53318
|
if (process.stdout.isTTY && !isResumed) {
|
|
53436
|
-
process.stdout.write("\x1B[?1049h");
|
|
53437
|
-
process.stdout.write("\x1B[2J\x1B[H");
|
|
53438
|
-
process.stdout.write(`
|
|
53439
|
-
\x1B[2mStarting open-agents...\x1B[0m
|
|
53440
|
-
|
|
53441
|
-
`);
|
|
53319
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
|
|
53442
53320
|
const restoreScreen = () => {
|
|
53443
|
-
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53321
|
+
process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
|
|
53444
53322
|
};
|
|
53445
53323
|
process.on("exit", restoreScreen);
|
|
53446
53324
|
process.on("SIGINT", () => {
|
|
@@ -53515,9 +53393,9 @@ async function startInteractive(config, repoPath) {
|
|
|
53515
53393
|
const version = getVersion3();
|
|
53516
53394
|
if (isResumed) {
|
|
53517
53395
|
if (process.stdout.isTTY) {
|
|
53518
|
-
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
53396
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
|
|
53519
53397
|
const restoreScreen = () => {
|
|
53520
|
-
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53398
|
+
process.stdout.write("\x1B[?1006l\x1B[?1002l\x1B[?25h\x1B[?1049l");
|
|
53521
53399
|
};
|
|
53522
53400
|
process.on("exit", restoreScreen);
|
|
53523
53401
|
process.on("SIGINT", () => {
|
|
@@ -53531,18 +53409,10 @@ async function startInteractive(config, repoPath) {
|
|
|
53531
53409
|
}
|
|
53532
53410
|
banner.setDesign(createDefaultBanner(version));
|
|
53533
53411
|
carouselLines = banner.start();
|
|
53534
|
-
const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
|
|
53535
|
-
renderInfo(resumeMsg);
|
|
53536
53412
|
} else {
|
|
53537
53413
|
process.stdout.write("\x1B[H");
|
|
53538
53414
|
banner.setDesign(createDefaultBanner(version));
|
|
53539
53415
|
carouselLines = banner.start();
|
|
53540
|
-
renderRichHeader({
|
|
53541
|
-
model: config.model,
|
|
53542
|
-
version,
|
|
53543
|
-
workspace: repoRoot,
|
|
53544
|
-
carouselLines
|
|
53545
|
-
});
|
|
53546
53416
|
}
|
|
53547
53417
|
const statusBar = new StatusBar();
|
|
53548
53418
|
statusBar.setVersion(version);
|
|
@@ -53550,6 +53420,12 @@ async function startInteractive(config, repoPath) {
|
|
|
53550
53420
|
const scrollTop = carouselLines > 0 ? carouselLines + 1 : 1;
|
|
53551
53421
|
statusBar.activate(scrollTop);
|
|
53552
53422
|
statusBar.setBannerRefresh(() => banner.renderCurrentFrame());
|
|
53423
|
+
if (isResumed) {
|
|
53424
|
+
statusBar.beginContentWrite();
|
|
53425
|
+
const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
|
|
53426
|
+
renderInfo(resumeMsg);
|
|
53427
|
+
statusBar.endContentWrite();
|
|
53428
|
+
}
|
|
53553
53429
|
setContentWriteHook({
|
|
53554
53430
|
begin: () => statusBar.beginContentWrite(),
|
|
53555
53431
|
end: () => statusBar.endContentWrite(),
|
|
@@ -53932,12 +53808,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53932
53808
|
clearBuf += `\x1B[${r};1H\x1B[2K`;
|
|
53933
53809
|
}
|
|
53934
53810
|
process.stdout.write(clearBuf);
|
|
53935
|
-
renderRichHeader({
|
|
53936
|
-
model: currentConfig.model,
|
|
53937
|
-
version,
|
|
53938
|
-
workspace: repoRoot,
|
|
53939
|
-
carouselLines
|
|
53940
|
-
});
|
|
53941
53811
|
showPrompt();
|
|
53942
53812
|
}
|
|
53943
53813
|
});
|
package/package.json
CHANGED