open-agents-ai 0.184.68 → 0.184.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.
Files changed (2) hide show
  1. package/dist/index.js +107 -47
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -41,6 +41,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
41
41
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
42
42
 
43
43
  // packages/cli/dist/config.js
44
+ var config_exports = {};
45
+ __export(config_exports, {
46
+ DEFAULT_CONFIG: () => DEFAULT_CONFIG,
47
+ loadConfig: () => loadConfig,
48
+ mergeConfig: () => mergeConfig,
49
+ setConfigValue: () => setConfigValue
50
+ });
44
51
  import { readFileSync, existsSync, mkdirSync, writeFileSync } from "node:fs";
45
52
  import { homedir } from "node:os";
46
53
  import { join } from "node:path";
@@ -41141,56 +41148,50 @@ async function doSetup(config, rl) {
41141
41148
  `);
41142
41149
  }
41143
41150
  const score = computeInferenceScore(specs);
41144
- const w = 24;
41145
41151
  const bw = 30;
41146
- process.stdout.write(`
41147
- ${c2.dim("\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510")}
41148
- `);
41149
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold(" Inference Capability")} ${c2.dim("\u2502")}
41150
- `);
41151
- process.stdout.write(` ${c2.dim("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524")}
41152
- `);
41153
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold("Overall")} ${c2.dim("\u2502")}
41154
- `);
41155
- process.stdout.write(` ${c2.dim("\u2502")} ${renderScoreBar(score.overall, bw)} ${c2.bold(String(score.overall).padStart(3))}${c2.dim("/100")} ${c2.dim("\u2502")}
41156
- `);
41157
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.dim(score.summary.padEnd(46))} ${c2.dim("\u2502")}
41158
- `);
41159
- process.stdout.write(` ${c2.dim("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524")}
41160
- `);
41161
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold("Memory")} ${c2.dim(`${specs.totalRamGB.toFixed(0)} GB RAM` + (specs.gpuVramGB > 0 ? ` + ${specs.gpuVramGB.toFixed(0)} GB VRAM` : ""))}${" ".repeat(Math.max(0, 27 - (`${specs.totalRamGB.toFixed(0)} GB RAM` + (specs.gpuVramGB > 0 ? ` + ${specs.gpuVramGB.toFixed(0)} GB VRAM` : "")).length))} ${c2.dim("\u2502")}
41162
- `);
41163
- process.stdout.write(` ${c2.dim("\u2502")} ${renderScoreBar(score.memory, w)} ${String(score.memory).padStart(3)} ${c2.dim("\u2502")}
41164
- `);
41165
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.dim("\u2502")}
41166
- `);
41167
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold("Compute")} ${c2.dim(specs.gpuVramGB > 0 ? specs.gpuName || "NVIDIA GPU" : "CPU only")}${" ".repeat(Math.max(0, 28 - (specs.gpuVramGB > 0 ? specs.gpuName || "NVIDIA GPU" : "CPU only").length))} ${c2.dim("\u2502")}
41168
- `);
41169
- process.stdout.write(` ${c2.dim("\u2502")} ${renderScoreBar(score.compute, w)} ${String(score.compute).padStart(3)} ${c2.dim("\u2502")}
41170
- `);
41171
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.dim("\u2502")}
41172
- `);
41173
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold("Speed")} ${c2.dim(specs.gpuVramGB > 0 ? "GPU accelerated" : "CPU inference")}${" ".repeat(Math.max(0, 28 - (specs.gpuVramGB > 0 ? "GPU accelerated" : "CPU inference").length))} ${c2.dim("\u2502")}
41174
- `);
41175
- process.stdout.write(` ${c2.dim("\u2502")} ${renderScoreBar(score.speed, w)} ${String(score.speed).padStart(3)} ${c2.dim("\u2502")}
41176
- `);
41177
- process.stdout.write(` ${c2.dim("\u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524")}
41178
- `);
41179
- process.stdout.write(` ${c2.dim("\u2502")} ${c2.bold(" Model Compatibility")} ${c2.dim("\u2502")}
41180
- `);
41152
+ const sw = 24;
41153
+ const boxW = 52;
41154
+ const boxLine = (content, visLen) => {
41155
+ const pad = Math.max(0, boxW - visLen);
41156
+ return ` ${c2.dim("\u2502")}${content}${" ".repeat(pad)}${c2.dim("\u2502")}
41157
+ `;
41158
+ };
41159
+ const hLine = (ch) => ` ${c2.dim(ch + "\u2500".repeat(boxW) + (ch === "\u250C" ? "\u2510" : ch === "\u251C" ? "\u2524" : "\u2518"))}
41160
+ `;
41161
+ process.stdout.write("\n");
41162
+ process.stdout.write(hLine("\u250C"));
41163
+ process.stdout.write(boxLine(` ${c2.bold("Inference Capability")}`, 22));
41164
+ process.stdout.write(hLine("\u251C"));
41165
+ process.stdout.write(boxLine(` ${c2.bold("Overall")}`, 9));
41166
+ const overallBar = renderScoreBar(score.overall, bw);
41167
+ const overallLabel = `${String(score.overall).padStart(3)}/100`;
41168
+ process.stdout.write(boxLine(` ${overallBar} ${c2.bold(overallLabel)}`, 2 + bw + 1 + overallLabel.length));
41169
+ process.stdout.write(boxLine(` ${c2.dim(score.summary)}`, 2 + score.summary.length));
41170
+ process.stdout.write(hLine("\u251C"));
41171
+ const memLabel = `${specs.totalRamGB.toFixed(0)} GB RAM` + (specs.gpuVramGB > 0 ? ` + ${specs.gpuVramGB.toFixed(0)} GB VRAM` : "");
41172
+ process.stdout.write(boxLine(` ${c2.bold("Memory")} ${c2.dim(memLabel)}`, 11 + memLabel.length));
41173
+ process.stdout.write(boxLine(` ${renderScoreBar(score.memory, sw)} ${String(score.memory).padStart(3)}`, 2 + sw + 1 + 3));
41174
+ process.stdout.write(boxLine("", 0));
41175
+ const gpuLabel = specs.gpuVramGB > 0 ? specs.gpuName || "NVIDIA GPU" : "CPU only";
41176
+ process.stdout.write(boxLine(` ${c2.bold("Compute")} ${c2.dim(gpuLabel)}`, 11 + gpuLabel.length));
41177
+ process.stdout.write(boxLine(` ${renderScoreBar(score.compute, sw)} ${String(score.compute).padStart(3)}`, 2 + sw + 1 + 3));
41178
+ process.stdout.write(boxLine("", 0));
41179
+ const speedLabel = specs.gpuVramGB > 0 ? "GPU accelerated" : "CPU inference";
41180
+ process.stdout.write(boxLine(` ${c2.bold("Speed")} ${c2.dim(speedLabel)}`, 11 + speedLabel.length));
41181
+ process.stdout.write(boxLine(` ${renderScoreBar(score.speed, sw)} ${String(score.speed).padStart(3)}`, 2 + sw + 1 + 3));
41182
+ process.stdout.write(hLine("\u251C"));
41183
+ process.stdout.write(boxLine(` ${c2.bold("Model Compatibility")}`, 21));
41181
41184
  for (const compat of score.modelCompat) {
41182
41185
  const icon = compat.fits ? c2.green("\u2714") : c2.red("\u2716");
41183
41186
  const tag = compat.fits ? compat.tag : c2.dim(compat.tag);
41184
41187
  const note = c2.dim(compat.note);
41185
- const visTag = compat.tag;
41186
- const visNote = compat.note;
41187
- const pad = Math.max(0, 44 - 2 - visTag.length - 1 - visNote.length);
41188
- process.stdout.write(` ${c2.dim("\u2502")} ${icon} ${tag} ${" ".repeat(pad)}${note} ${c2.dim("\u2502")}
41188
+ const visLen = 2 + 1 + 1 + compat.tag.length;
41189
+ const notePad = Math.max(1, boxW - visLen - compat.note.length);
41190
+ process.stdout.write(` ${c2.dim("\u2502")} ${icon} ${tag}${" ".repeat(notePad)}${note}${c2.dim("\u2502")}
41189
41191
  `);
41190
41192
  }
41191
- process.stdout.write(` ${c2.dim("\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518")}
41192
-
41193
- `);
41193
+ process.stdout.write(hLine("\u2514"));
41194
+ process.stdout.write("\n");
41194
41195
  let hasPython = hasCmd("python3") || hasCmd("python");
41195
41196
  if (!hasPython) {
41196
41197
  process.stdout.write(` ${c2.yellow("\u26A0")} Python3 not found (needed for vision, OCR, browser automation).
@@ -47776,6 +47777,19 @@ async function handleSlashCommand(input, ctx) {
47776
47777
  case "upgrade":
47777
47778
  await handleUpdate(arg, ctx);
47778
47779
  return "handled";
47780
+ case "setup":
47781
+ case "wizard": {
47782
+ const setupModel = await runSetupWizard(ctx.config);
47783
+ if (setupModel) {
47784
+ const { loadConfig: loadConfig2 } = await Promise.resolve().then(() => (init_config(), config_exports));
47785
+ const freshConfig = loadConfig2();
47786
+ Object.assign(ctx.config, freshConfig, { model: setupModel });
47787
+ renderInfo(`Setup complete \u2014 model set to ${setupModel}`);
47788
+ } else {
47789
+ renderInfo("Setup cancelled \u2014 no changes made.");
47790
+ }
47791
+ return "handled";
47792
+ }
47779
47793
  case "voice": {
47780
47794
  const save = (settings) => {
47781
47795
  ctx.saveSettings(settings);
@@ -60955,6 +60969,17 @@ ${CONTENT_BG_SEQ}`);
60955
60969
  }
60956
60970
  }
60957
60971
  }
60972
+ /**
60973
+ * Remove the last N lines from the content scrollback buffer and repaint.
60974
+ * Used by Esc-to-recall to erase the just-rendered user prompt.
60975
+ */
60976
+ popLastContentLines(n) {
60977
+ if (n <= 0)
60978
+ return;
60979
+ this._contentLines.splice(-n, n);
60980
+ if (this.active)
60981
+ this.refreshDisplay();
60982
+ }
60958
60983
  /** Number of visible content rows */
60959
60984
  get contentHeight() {
60960
60985
  const rows = process.stdout.rows ?? 24;
@@ -64283,7 +64308,7 @@ ${entry.fullContent}`
64283
64308
  if (slashCommandHandler) {
64284
64309
  runner.registerTool({
64285
64310
  name: "slash_command",
64286
- description: "Invoke a slash command programmatically. Available when /commands auto is set by the user. Safe commands: help, config, models, skills, tools, stats, cost, score, nexus, commands, verbose, stream, brute-force, deep-context, flow, style, emojis, colors, task-type, compact, context, evaluate. Skill commands: /<skill-name> <args>. BLOCKED commands (user-only): quit, exit, destroy, model, endpoint, update, telegram, call, listen, expose, p2p, secrets, dream, bless, clear. Use this to check configuration, run evaluations, discover skills, or adjust modes during a task.",
64311
+ description: "Invoke a slash command programmatically. Available when /commands auto is set by the user. Safe commands: help, config, models, skills, tools, stats, cost, score, nexus, commands, verbose, stream, brute-force, deep-context, flow, style, emojis, colors, task-type, compact, context, evaluate. Skill commands: /<skill-name> <args>. BLOCKED commands (user-only): quit, exit, destroy, model, endpoint, update, setup, telegram, call, listen, expose, p2p, secrets, dream, bless, clear. Use this to check configuration, run evaluations, discover skills, or adjust modes during a task.",
64287
64312
  parameters: {
64288
64313
  type: "object",
64289
64314
  properties: {
@@ -64311,6 +64336,8 @@ ${entry.fullContent}`
64311
64336
  "ep",
64312
64337
  "update",
64313
64338
  "upgrade",
64339
+ "setup",
64340
+ "wizard",
64314
64341
  "parallel",
64315
64342
  "think",
64316
64343
  "telegram",
@@ -65277,6 +65304,9 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
65277
65304
  let sessionToolCallCount = 0;
65278
65305
  let lastSteeringInput = "";
65279
65306
  let lastSteeringRetracted = false;
65307
+ let _recallText = null;
65308
+ let _recallTimer = null;
65309
+ const RECALL_WINDOW_MS = 1500;
65280
65310
  let restoredSessionContext = null;
65281
65311
  let sessionSudoPassword = null;
65282
65312
  let sudoPromptPending = false;
@@ -67607,6 +67637,13 @@ Summarize or analyze this transcription as appropriate.`;
67607
67637
  const inputLineCount = fullInput.split("\n").length;
67608
67638
  const displayText = isImage ? `[Image: ${cleanPath}]` : inputLineCount > 1 ? `[pasted ${inputLineCount} lines]` : fullInput;
67609
67639
  writeContent(() => renderUserMessage(displayText));
67640
+ _recallText = input;
67641
+ if (_recallTimer)
67642
+ clearTimeout(_recallTimer);
67643
+ _recallTimer = setTimeout(() => {
67644
+ _recallText = null;
67645
+ _recallTimer = null;
67646
+ }, RECALL_WINDOW_MS);
67610
67647
  lastSubmittedPrompt = fullInput;
67611
67648
  const taskPreview = fullInput.length > 100 ? fullInput.slice(0, 100) + "..." : fullInput;
67612
67649
  emotionEngine.setCurrentTask(taskPreview);
@@ -67644,6 +67681,11 @@ NEW TASK: ${fullInput}`;
67644
67681
  setTerminalTitle(summary?.slice(0, 60), version);
67645
67682
  }, currentTaskType, resolvedContextWindowSize, resolvedCaps, currentStyle, deepContextEnabled, compactionSNRCallback(), emotionEngine, flowEnabled, buildSlashCommandHandler(), thinkingEnabled, handleAskUser);
67646
67683
  activeTask = task;
67684
+ _recallText = null;
67685
+ if (_recallTimer) {
67686
+ clearTimeout(_recallTimer);
67687
+ _recallTimer = null;
67688
+ }
67647
67689
  setTerminalTitle(input.slice(0, 60), version);
67648
67690
  showPrompt();
67649
67691
  if (isNeovimActive() && !isNeovimFocused()) {
@@ -67843,6 +67885,24 @@ ${c2.dim("(Use /quit to exit)")}
67843
67885
  showPrompt();
67844
67886
  });
67845
67887
  _escapeHandler = () => {
67888
+ if (_recallText !== null) {
67889
+ const recalled = _recallText;
67890
+ _recallText = null;
67891
+ if (_recallTimer) {
67892
+ clearTimeout(_recallTimer);
67893
+ _recallTimer = null;
67894
+ }
67895
+ if (activeTask) {
67896
+ activeTask.runner.abort();
67897
+ activeTask = null;
67898
+ }
67899
+ statusBar.setProcessing(false);
67900
+ statusBar.popLastContentLines(1);
67901
+ rl.line = recalled;
67902
+ rl.cursor = recalled.length;
67903
+ showPrompt();
67904
+ return;
67905
+ }
67846
67906
  if (!activeTask)
67847
67907
  return;
67848
67908
  if (activeTask.runner.isPaused) {
@@ -68851,8 +68911,8 @@ var init_status = __esm({
68851
68911
  });
68852
68912
 
68853
68913
  // packages/cli/dist/commands/config.js
68854
- var config_exports = {};
68855
- __export(config_exports, {
68914
+ var config_exports2 = {};
68915
+ __export(config_exports2, {
68856
68916
  configCommand: () => configCommand
68857
68917
  });
68858
68918
  import { join as join73, resolve as resolve35 } from "node:path";
@@ -69638,7 +69698,7 @@ async function main() {
69638
69698
  break;
69639
69699
  }
69640
69700
  case "config": {
69641
- const { configCommand: configCommand2 } = await Promise.resolve().then(() => (init_config3(), config_exports));
69701
+ const { configCommand: configCommand2 } = await Promise.resolve().then(() => (init_config3(), config_exports2));
69642
69702
  await configCommand2({
69643
69703
  subCommand: parsed.configSubCommand,
69644
69704
  key: parsed.configKey,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.184.68",
3
+ "version": "0.184.69",
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",