open-agents-ai 0.187.218 → 0.187.220

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 +47 -13
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -249789,7 +249789,7 @@ var init_browser_action = __esm({
249789
249789
  return {
249790
249790
  success: true,
249791
249791
  output: `Screenshot captured (${width}x${height}, downscaled for LLM). Base64 length: ${b64.length} chars.
249792
- [IMAGE_BASE64:${mimeType}:${b64.slice(0, 200)}...]`,
249792
+ [IMAGE_BASE64:${mimeType}:${b64}]`,
249793
249793
  durationMs: Date.now() - start2
249794
249794
  };
249795
249795
  }
@@ -250271,7 +250271,7 @@ var init_playwright_browser = __esm({
250271
250271
  }
250272
250272
  if (b64) {
250273
250273
  return ok(`Screenshot saved to ${filePath} (downscaled for LLM).
250274
- [IMAGE_BASE64:${mimeType}:${b64.slice(0, 200)}...]`, start2);
250274
+ [IMAGE_BASE64:${mimeType}:${b64}]`, start2);
250275
250275
  }
250276
250276
  return ok(`Screenshot saved to ${filePath}`, start2);
250277
250277
  }
@@ -281690,7 +281690,7 @@ function formatToolArgs(toolName, args, verbose) {
281690
281690
  else if (t2?.status === "blocked") counts.b++;
281691
281691
  else counts.p++;
281692
281692
  }
281693
- const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}〇${counts.b > 0 ? ` ${counts.b}◍` : ""})`;
281693
+ const summary = `${todos.length} items (${counts.c}◉ ${counts.i}◐ ${counts.p}○${counts.b > 0 ? ` ${counts.b}◍` : ""})`;
281694
281694
  if (verbose) {
281695
281695
  const current = todos.find((t2) => t2?.status === "in_progress");
281696
281696
  if (current?.content) {
@@ -288634,6 +288634,8 @@ function scheduleRedraw() {
288634
288634
  function computeTargetHeight() {
288635
288635
  if (!panelEffectivelyVisible()) return 0;
288636
288636
  if (!_lastTodos || _lastTodos.length === 0) return 0;
288637
+ const allDone = _lastTodos.every((t2) => t2 && t2.status === "completed");
288638
+ if (allDone) return 0;
288637
288639
  const itemRows = Math.min(_lastTodos.length, MAX_VISIBLE_ROWS - 1);
288638
288640
  return 1 + itemRows;
288639
288641
  }
@@ -288658,7 +288660,7 @@ function statusToAnsi(status) {
288658
288660
  case "blocked":
288659
288661
  return { mark: "◍", color: RED, box: RED };
288660
288662
  default:
288661
- return { mark: "", color: GREY, box: GREY };
288663
+ return { mark: "", color: GREY, box: GREY };
288662
288664
  }
288663
288665
  }
288664
288666
  function truncate2(s2, max) {
@@ -317014,7 +317016,8 @@ body {
317014
317016
  #footer {
317015
317017
  display: flex;
317016
317018
  flex-direction: column;
317017
- gap: 4px;
317019
+ /* gap: 0 — was 4px, removed per user request to tighten footer */
317020
+ gap: 0;
317018
317021
  padding: 0;
317019
317022
  background: #1e1e22;
317020
317023
  border-top: 1px solid #2a2a30;
@@ -317866,7 +317869,22 @@ async function sendMessage() {
317866
317869
  // preview that JSON-stringifies arrays/objects so they don't
317867
317870
  // render as "[object Object],[object Object],...".
317868
317871
  const toolName = chunk.tool || 'tool';
317869
- const a = (chunk.args && typeof chunk.args === 'object') ? chunk.args : {};
317872
+ // Defensive: if chunk.args is a JSON string, parse it. Some
317873
+ // upstream paths serialize args twice and we end up with a
317874
+ // string body where the keys/values are inside.
317875
+ let a = (chunk.args && typeof chunk.args === 'object') ? chunk.args : {};
317876
+ if (typeof chunk.args === 'string') {
317877
+ try { a = JSON.parse(chunk.args); } catch { a = { _raw: chunk.args }; }
317878
+ }
317879
+ // Defensive: if a.todos is a JSON string instead of an array
317880
+ // (e.g., model serialized it instead of providing the object),
317881
+ // try to parse it back into an array so the checklist renders.
317882
+ if (toolName === 'todo_write' && typeof a.todos === 'string') {
317883
+ try {
317884
+ const parsed = JSON.parse(a.todos);
317885
+ if (Array.isArray(parsed)) a = Object.assign({}, a, { todos: parsed });
317886
+ } catch { /* leave as-is, fallback render kicks in */ }
317887
+ }
317870
317888
  let inlineSummary = '';
317871
317889
  if (toolName === 'todo_write' && Array.isArray(a.todos)) {
317872
317890
  const todos = a.todos;
@@ -317878,7 +317896,7 @@ async function sendMessage() {
317878
317896
  else if (s === 'blocked') b++;
317879
317897
  else p++;
317880
317898
  }
317881
- inlineSummary = ' — ' + todos.length + ' items (' + c + '◉ ' + ip + '◐ ' + p + '' + (b > 0 ? ' ' + b + '◍' : '') + ')';
317899
+ inlineSummary = ' — ' + todos.length + ' items (' + c + '◉ ' + ip + '◐ ' + p + '' + (b > 0 ? ' ' + b + '◍' : '') + ')';
317882
317900
  } else {
317883
317901
  const previewParts = [];
317884
317902
  for (const [k, v] of Object.entries(a)) {
@@ -317907,7 +317925,7 @@ async function sendMessage() {
317907
317925
  if (!t || typeof t !== 'object') continue;
317908
317926
  const row = document.createElement('div');
317909
317927
  row.style.cssText = 'padding:2px 0';
317910
- let mark = '';
317928
+ let mark = '';
317911
317929
  let color = '#666';
317912
317930
  if (t.status === 'completed') { mark = '◉'; color = '#4a7a4a'; }
317913
317931
  else if (t.status === 'in_progress') { mark = '◐'; color = '#b2920a'; }
@@ -319564,14 +319582,16 @@ const todoChecklistEl = document.getElementById('todo-checklist');
319564
319582
  const todoListEl = document.getElementById('todo-list');
319565
319583
  const tasksRowEl = document.getElementById('tasks-row');
319566
319584
 
319567
- // Unicode circle markers — empty, ◐ in_progress, ◉ completed, ◍ blocked
319585
+ // Unicode circle markers — empty, ◐ in_progress, ◉ completed, ◍ blocked
319568
319586
  // Using literal unicode chars so the template-literal → HTML pipeline
319569
- // doesn't mangle the escape sequences.
319587
+ // doesn't mangle the escape sequences. Switched from 〇 (U+3007) to
319588
+ // ○ (U+25CB) per user request — same visual but the ideographic 〇
319589
+ // rendered with a wider cell that pushed list items right.
319570
319590
  function statusMark(status) {
319571
319591
  return status === 'completed' ? '◉'
319572
319592
  : status === 'in_progress' ? '◐'
319573
319593
  : status === 'blocked' ? '◍'
319574
- : '';
319594
+ : '';
319575
319595
  }
319576
319596
 
319577
319597
  function renderTasksRow(todos) {
@@ -319584,6 +319604,15 @@ function renderTasksRow(todos) {
319584
319604
  tasksRowEl.style.display = 'none';
319585
319605
  return;
319586
319606
  }
319607
+ // When ALL tasks are completed the row collapses naturally — the user
319608
+ // doesn't need a stale "all done" strip eating layout space. Once any
319609
+ // task flips back to a non-completed state (or new tasks are added),
319610
+ // the row reappears on the next refreshTodos() call.
319611
+ const allDone = todos.every(t => t && t.status === 'completed');
319612
+ if (allDone) {
319613
+ tasksRowEl.style.display = 'none';
319614
+ return;
319615
+ }
319587
319616
  tasksRowEl.style.display = 'flex';
319588
319617
  // Pending count badge first so the user sees N/M progress
319589
319618
  const completed = todos.filter(t => t.status === 'completed').length;
@@ -323467,7 +323496,12 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
323467
323496
  return;
323468
323497
  }
323469
323498
  if (pathname === "/" && method === "GET" && req2.headers.accept?.includes("text/html")) {
323470
- res.writeHead(200, { "Content-Type": "text/html; charset=utf-8" });
323499
+ res.writeHead(200, {
323500
+ "Content-Type": "text/html; charset=utf-8",
323501
+ "Cache-Control": "no-cache, no-store, must-revalidate, max-age=0",
323502
+ "Pragma": "no-cache",
323503
+ "Expires": "0"
323504
+ });
323471
323505
  res.end(getWebUI());
323472
323506
  return;
323473
323507
  }
@@ -323648,7 +323682,7 @@ async function handleRequest(req2, res, ollamaUrl, verbose) {
323648
323682
  }
323649
323683
  }
323650
323684
  const todoBlock = currentTodos.length > 0 ? "CURRENT TODO LIST:\n" + currentTodos.map((t2) => {
323651
- const mark = t2.status === "completed" ? "◉" : t2.status === "in_progress" ? "◐" : t2.status === "blocked" ? "◍" : "";
323685
+ const mark = t2.status === "completed" ? "◉" : t2.status === "in_progress" ? "◐" : t2.status === "blocked" ? "◍" : "";
323652
323686
  return `${mark} ${t2.content}` + (t2.blocker ? ` (blocked: ${t2.blocker})` : "");
323653
323687
  }).join("\n") + "\n\nUse the todo_write tool to update this list as you complete steps. Mark each item completed once you finish it.\n\n" : "";
323654
323688
  const taskPrompt = todoBlock + memCtx.contextBlock + (historyLines ? `Previous conversation:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.218",
3
+ "version": "0.187.220",
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",