open-agents-ai 0.138.8 → 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 +18 -156
- 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,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",
|
|
@@ -53433,12 +53312,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53433
53312
|
initOaDirectory(repoRoot);
|
|
53434
53313
|
const savedSettings = resolveSettings(repoRoot);
|
|
53435
53314
|
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
|
-
`);
|
|
53315
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53442
53316
|
const restoreScreen = () => {
|
|
53443
53317
|
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53444
53318
|
};
|
|
@@ -53515,7 +53389,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53515
53389
|
const version = getVersion3();
|
|
53516
53390
|
if (isResumed) {
|
|
53517
53391
|
if (process.stdout.isTTY) {
|
|
53518
|
-
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
53392
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53519
53393
|
const restoreScreen = () => {
|
|
53520
53394
|
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53521
53395
|
};
|
|
@@ -53537,12 +53411,6 @@ async function startInteractive(config, repoPath) {
|
|
|
53537
53411
|
process.stdout.write("\x1B[H");
|
|
53538
53412
|
banner.setDesign(createDefaultBanner(version));
|
|
53539
53413
|
carouselLines = banner.start();
|
|
53540
|
-
renderRichHeader({
|
|
53541
|
-
model: config.model,
|
|
53542
|
-
version,
|
|
53543
|
-
workspace: repoRoot,
|
|
53544
|
-
carouselLines
|
|
53545
|
-
});
|
|
53546
53414
|
}
|
|
53547
53415
|
const statusBar = new StatusBar();
|
|
53548
53416
|
statusBar.setVersion(version);
|
|
@@ -53932,12 +53800,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53932
53800
|
clearBuf += `\x1B[${r};1H\x1B[2K`;
|
|
53933
53801
|
}
|
|
53934
53802
|
process.stdout.write(clearBuf);
|
|
53935
|
-
renderRichHeader({
|
|
53936
|
-
model: currentConfig.model,
|
|
53937
|
-
version,
|
|
53938
|
-
workspace: repoRoot,
|
|
53939
|
-
carouselLines
|
|
53940
|
-
});
|
|
53941
53803
|
showPrompt();
|
|
53942
53804
|
}
|
|
53943
53805
|
});
|
package/package.json
CHANGED