open-agents-ai 0.138.7 → 0.138.9
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 +47 -182
- 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
|
|
|
@@ -38784,7 +38660,7 @@ var init_voice = __esm({
|
|
|
38784
38660
|
return;
|
|
38785
38661
|
const chunks = this.chunkText(text);
|
|
38786
38662
|
if (this.speakQueue.length >= 30) {
|
|
38787
|
-
|
|
38663
|
+
return;
|
|
38788
38664
|
}
|
|
38789
38665
|
for (const chunk of chunks) {
|
|
38790
38666
|
this.speakQueue.push({ text: chunk, volume, pitchFactor, speedFactor, stereoDelayMs });
|
|
@@ -44531,29 +44407,32 @@ 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 bgColor = 208;
|
|
44411
|
+
const fgDark = 236;
|
|
44412
|
+
const fgText = 235;
|
|
44413
|
+
const halftone = ["\u2588", "\u2593", "\u2592", "\u2591", " "];
|
|
44535
44414
|
for (let r = 0; r < rows; r++) {
|
|
44536
44415
|
const row = [];
|
|
44537
44416
|
for (let c3 = 0; c3 < width; c3++) {
|
|
44538
|
-
const
|
|
44539
|
-
|
|
44540
|
-
|
|
44541
|
-
|
|
44417
|
+
const dist = Math.abs(c3 - width / 2) / (width / 2);
|
|
44418
|
+
if (r === 1) {
|
|
44419
|
+
row.push({ char: " ", fg: fgText, bg: bgColor, bold: false });
|
|
44420
|
+
} else {
|
|
44421
|
+
const htIdx = Math.min(halftone.length - 1, Math.floor(dist * halftone.length));
|
|
44422
|
+
row.push({ char: halftone[htIdx], fg: bgColor, bg: 0, bold: false });
|
|
44423
|
+
}
|
|
44542
44424
|
}
|
|
44543
44425
|
grid.push(row);
|
|
44544
44426
|
}
|
|
44545
|
-
const versionText = `OA
|
|
44546
|
-
const hintText = " /
|
|
44427
|
+
const versionText = `OA v${version}`;
|
|
44428
|
+
const hintText = " /help \xB7 /cohere \xB7 /voice";
|
|
44547
44429
|
const fullText = versionText + hintText;
|
|
44548
44430
|
const startCol = Math.max(2, Math.floor((width - fullText.length) / 2));
|
|
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
44431
|
for (let i = 0; i < versionText.length && startCol + i < width; i++) {
|
|
44553
|
-
grid[1][startCol + i] = { char: versionText[i], fg:
|
|
44432
|
+
grid[1][startCol + i] = { char: versionText[i], fg: fgDark, bg: bgColor, bold: true };
|
|
44554
44433
|
}
|
|
44555
44434
|
for (let i = 0; i < hintText.length && startCol + versionText.length + i < width; i++) {
|
|
44556
|
-
grid[1][startCol + versionText.length + i] = { char: hintText[i], fg:
|
|
44435
|
+
grid[1][startCol + versionText.length + i] = { char: hintText[i], fg: 240, bg: bgColor, bold: false };
|
|
44557
44436
|
}
|
|
44558
44437
|
return {
|
|
44559
44438
|
id: "default-header",
|
|
@@ -52209,30 +52088,47 @@ var init_status_bar = __esm({
|
|
|
52209
52088
|
* cursor save/restore so the streaming position isn't disrupted.
|
|
52210
52089
|
* When idle (writeDepth === 0), the full footer is redrawn.
|
|
52211
52090
|
*/
|
|
52212
|
-
|
|
52213
|
-
|
|
52091
|
+
/**
|
|
52092
|
+
* Hook into a readline instance to intercept scroll keys BEFORE readline
|
|
52093
|
+
* processes them. Monkey-patches readline._ttyWrite — the only way to
|
|
52094
|
+
* prevent Page Up/Down from becoming readline history navigation.
|
|
52095
|
+
*
|
|
52096
|
+
* Must be called after readline is created.
|
|
52097
|
+
*/
|
|
52098
|
+
hookReadlineScroll(rl) {
|
|
52099
|
+
if (!rl || !rl._ttyWrite)
|
|
52214
52100
|
return;
|
|
52215
|
-
|
|
52216
|
-
|
|
52101
|
+
const origTtyWrite = rl._ttyWrite.bind(rl);
|
|
52102
|
+
rl._ttyWrite = (s, key) => {
|
|
52217
52103
|
if (!this.active)
|
|
52218
|
-
return;
|
|
52219
|
-
const seq =
|
|
52220
|
-
if (
|
|
52104
|
+
return origTtyWrite(s, key);
|
|
52105
|
+
const seq = s || "";
|
|
52106
|
+
if (key?.name === "pageup" || seq === "\x1B[5~") {
|
|
52221
52107
|
this.pageUpContent();
|
|
52222
52108
|
return;
|
|
52223
52109
|
}
|
|
52224
|
-
if (
|
|
52110
|
+
if (key?.name === "pagedown" || seq === "\x1B[6~") {
|
|
52225
52111
|
this.pageDownContent();
|
|
52226
52112
|
return;
|
|
52227
52113
|
}
|
|
52228
|
-
if (seq
|
|
52114
|
+
if (key?.shift && key?.name === "up" || seq === "\x1B[1;2A") {
|
|
52229
52115
|
this.scrollContentUp(3);
|
|
52230
52116
|
return;
|
|
52231
52117
|
}
|
|
52232
|
-
if (seq
|
|
52118
|
+
if (key?.shift && key?.name === "down" || seq === "\x1B[1;2B") {
|
|
52233
52119
|
this.scrollContentDown(3);
|
|
52234
52120
|
return;
|
|
52235
52121
|
}
|
|
52122
|
+
return origTtyWrite(s, key);
|
|
52123
|
+
};
|
|
52124
|
+
}
|
|
52125
|
+
hookStdin() {
|
|
52126
|
+
if (this.stdinHooked)
|
|
52127
|
+
return;
|
|
52128
|
+
this.stdinHooked = true;
|
|
52129
|
+
process.stdin.on("data", () => {
|
|
52130
|
+
if (!this.active)
|
|
52131
|
+
return;
|
|
52236
52132
|
setImmediate(() => {
|
|
52237
52133
|
if (this.writeDepth > 0) {
|
|
52238
52134
|
this.renderInputRowDuringStream();
|
|
@@ -53416,12 +53312,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53416
53312
|
initOaDirectory(repoRoot);
|
|
53417
53313
|
const savedSettings = resolveSettings(repoRoot);
|
|
53418
53314
|
if (process.stdout.isTTY && !isResumed) {
|
|
53419
|
-
process.stdout.write("\x1B[?1049h");
|
|
53420
|
-
process.stdout.write("\x1B[2J\x1B[H");
|
|
53421
|
-
process.stdout.write(`
|
|
53422
|
-
\x1B[2mStarting open-agents...\x1B[0m
|
|
53423
|
-
|
|
53424
|
-
`);
|
|
53315
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53425
53316
|
const restoreScreen = () => {
|
|
53426
53317
|
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53427
53318
|
};
|
|
@@ -53498,7 +53389,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53498
53389
|
const version = getVersion3();
|
|
53499
53390
|
if (isResumed) {
|
|
53500
53391
|
if (process.stdout.isTTY) {
|
|
53501
|
-
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
53392
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53502
53393
|
const restoreScreen = () => {
|
|
53503
53394
|
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53504
53395
|
};
|
|
@@ -53520,12 +53411,6 @@ async function startInteractive(config, repoPath) {
|
|
|
53520
53411
|
process.stdout.write("\x1B[H");
|
|
53521
53412
|
banner.setDesign(createDefaultBanner(version));
|
|
53522
53413
|
carouselLines = banner.start();
|
|
53523
|
-
renderRichHeader({
|
|
53524
|
-
model: config.model,
|
|
53525
|
-
version,
|
|
53526
|
-
workspace: repoRoot,
|
|
53527
|
-
carouselLines
|
|
53528
|
-
});
|
|
53529
53414
|
}
|
|
53530
53415
|
const statusBar = new StatusBar();
|
|
53531
53416
|
statusBar.setVersion(version);
|
|
@@ -53875,6 +53760,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53875
53760
|
history: savedHistory,
|
|
53876
53761
|
completer
|
|
53877
53762
|
});
|
|
53763
|
+
statusBar.hookReadlineScroll(rl);
|
|
53878
53764
|
function persistHistoryLine(line) {
|
|
53879
53765
|
if (!line.trim())
|
|
53880
53766
|
return;
|
|
@@ -53914,12 +53800,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53914
53800
|
clearBuf += `\x1B[${r};1H\x1B[2K`;
|
|
53915
53801
|
}
|
|
53916
53802
|
process.stdout.write(clearBuf);
|
|
53917
|
-
renderRichHeader({
|
|
53918
|
-
model: currentConfig.model,
|
|
53919
|
-
version,
|
|
53920
|
-
workspace: repoRoot,
|
|
53921
|
-
carouselLines
|
|
53922
|
-
});
|
|
53923
53803
|
showPrompt();
|
|
53924
53804
|
}
|
|
53925
53805
|
});
|
|
@@ -56020,21 +55900,6 @@ ${c2.dim("(Use /quit to exit)")}
|
|
|
56020
55900
|
process.stdin.on("keypress", (_str, key) => {
|
|
56021
55901
|
if (!key)
|
|
56022
55902
|
return;
|
|
56023
|
-
if (key.name === "pageup" || key.sequence === "\x1B[5~" || key.shift && key.name === "up" || key.sequence === "\x1B[1;2A") {
|
|
56024
|
-
statusBar.pageUpContent();
|
|
56025
|
-
return;
|
|
56026
|
-
}
|
|
56027
|
-
if (key.name === "pagedown" || key.sequence === "\x1B[6~" || key.shift && key.name === "down" || key.sequence === "\x1B[1;2B") {
|
|
56028
|
-
statusBar.pageDownContent();
|
|
56029
|
-
return;
|
|
56030
|
-
}
|
|
56031
|
-
if (key.name === "end" && key.ctrl || key.name === "home" && key.ctrl) {
|
|
56032
|
-
if (key.name === "end")
|
|
56033
|
-
statusBar.jumpToLive();
|
|
56034
|
-
else
|
|
56035
|
-
statusBar.scrollContentUp(99999);
|
|
56036
|
-
return;
|
|
56037
|
-
}
|
|
56038
55903
|
if (key.name === "escape" && activeTask) {
|
|
56039
55904
|
if (!activeTask.runner.isPaused) {
|
|
56040
55905
|
activeTask.runner.pause();
|
package/package.json
CHANGED