open-agents-ai 0.187.365 → 0.187.366

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 +32 -38
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -569010,12 +569010,12 @@ async function loadScheduled() {
569010
569010
  const rows = tasks.map(t => {
569011
569011
  const enabled = !!t.enabled;
569012
569012
  const btn = enabled
569013
- ? '<button onclick="toggleScheduled('' + t.id + '',false)" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">disable</button>'
569014
- : '<button onclick="toggleScheduled('' + t.id + '',true)" style="background:#2a2a30;border:1px solid #2a3a2a;color:#4ec94e;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">enable</button>';
569013
+ ? '<button onclick="toggleScheduled(\\'' + t.id + '\\',false)" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">disable</button>'
569014
+ : '<button onclick="toggleScheduled(\\'' + t.id + '\\',true)" style="background:#2a2a30;border:1px solid #2a3a2a;color:#4ec94e;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">enable</button>';
569015
569015
  const color = enabled ? '#4ec94e' : '#5a2a2a';
569016
569016
  const procInfo = t.procs && t.procs.length ? (' (' + t.procs.length + ' proc)') : '';
569017
569017
  const up = t.procs && t.procs[0] && t.procs[0].uptime_s ? (' • up ' + Math.max(1, Math.round(t.procs[0].uptime_s/60)) + 'm') : '';
569018
- const killBtn = '<button onclick="killScheduledTask('' + t.id + '')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">kill</button>';
569018
+ const killBtn = '<button onclick="killScheduledTask(\\'' + t.id + '\\')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">kill</button>';
569019
569019
  const row = '<div style="background:#1e1e22;border-left:2px solid ' + color + ';padding:6px 10px;margin:4px 0;font-size:0.72rem">'
569020
569020
  + '<div style="color:#b0b0b0">' + (t.name || '(task)') + ' <span style="color:#555">' + (t.schedule || '') + '</span>' + procInfo + up + '</div>'
569021
569021
  + '<div style="color:#555;font-size:0.6rem">' + t.file + '#' + t.index + '</div>'
@@ -569035,14 +569035,14 @@ async function loadScheduled() {
569035
569035
  } catch {}
569036
569036
  }
569037
569037
 
569038
- (window as any).toggleScheduled = async function(id: string, enabled: boolean) {
569038
+ window.toggleScheduled = async function(id, enabled) {
569039
569039
  try {
569040
569040
  await fetch('/v1/scheduled/' + encodeURIComponent(id), { method:'POST', headers: headers(), body: JSON.stringify({enabled}) });
569041
569041
  loadScheduled();
569042
569042
  } catch {}
569043
569043
  }
569044
569044
 
569045
- (window as any).killScheduled = async function() {
569045
+ window.killScheduled = async function() {
569046
569046
  try {
569047
569047
  const r = await fetch('/v1/scheduled/kill', { method:'POST', headers: headers(), body: JSON.stringify({}) });
569048
569048
  const j = await r.json();
@@ -569053,18 +569053,15 @@ async function loadScheduled() {
569053
569053
  const rem = Array.isArray(j.procs_after) ? j.procs_after.length : 0;
569054
569054
  let msg = 'Killed ' + (kb + ka) + ' processes.';
569055
569055
  if (before && after) {
569056
- msg += '
569057
- GPU util: ' + before.gpu_pct + '% → ' + after.gpu_pct + '%, VRAM: ' + before.vram_used_gb + '/' + before.vram_total_gb + ' GB → ' + after.vram_used_gb + '/' + after.vram_total_gb + ' GB';
569056
+ msg += '\\nGPU util: ' + before.gpu_pct + '% → ' + after.gpu_pct + '%, VRAM: ' + before.vram_used_gb + '/' + before.vram_total_gb + ' GB → ' + after.vram_used_gb + '/' + after.vram_total_gb + ' GB';
569058
569057
  }
569059
- msg += rem > 0 ? ('
569060
- Remaining matched processes: ' + rem) : '
569061
- No remaining matched processes.';
569058
+ msg += rem > 0 ? ('\\nRemaining matched processes: ' + rem) : '\\nNo remaining matched processes.';
569062
569059
  alert(msg);
569063
569060
  loadScheduled();
569064
569061
  } catch (e) { alert('Kill failed: ' + (e && e.message || String(e))); }
569065
569062
  }
569066
569063
 
569067
- (window as any).disableAllScheduled = async function() {
569064
+ window.disableAllScheduled = async function() {
569068
569065
  try {
569069
569066
  const r = await fetch('/v1/scheduled', { headers: headers() });
569070
569067
  const d = await r.json();
@@ -569081,7 +569078,7 @@ No remaining matched processes.';
569081
569078
  } catch {}
569082
569079
  }
569083
569080
 
569084
- (window as any).enableAllScheduled = async function() {
569081
+ window.enableAllScheduled = async function() {
569085
569082
  try {
569086
569083
  const r = await fetch('/v1/scheduled', { headers: headers() });
569087
569084
  const d = await r.json();
@@ -569098,7 +569095,7 @@ No remaining matched processes.';
569098
569095
  } catch {}
569099
569096
  }
569100
569097
 
569101
- (window as any).adoptScheduled = async function() {
569098
+ window.adoptScheduled = async function() {
569102
569099
  try {
569103
569100
  const r = await fetch('/v1/scheduled/reconcile', { method:'POST', headers: headers(), body: JSON.stringify({ apply: true }) });
569104
569101
  const j = await r.json();
@@ -569110,7 +569107,7 @@ No remaining matched processes.';
569110
569107
  } catch (e) { alert('Adopt failed: ' + (e && e.message || String(e))); }
569111
569108
  }
569112
569109
 
569113
- (window as any).fixupScheduled = async function() {
569110
+ window.fixupScheduled = async function() {
569114
569111
  try {
569115
569112
  if (!confirm('Rewrite OA cron entries to canonical launcher?')) return;
569116
569113
  const r = await fetch('/v1/scheduled/fixup', { method:'POST', headers: headers(), body: JSON.stringify({ mode: 'cron', dryRun: false }) });
@@ -569120,7 +569117,7 @@ No remaining matched processes.';
569120
569117
  } catch (e) { alert('Fixup failed: ' + (e && e.message || String(e))); }
569121
569118
  }
569122
569119
 
569123
- (window as any).migrateScheduled = async function() {
569120
+ window.migrateScheduled = async function() {
569124
569121
  try {
569125
569122
  if (!confirm('Migrate OA cron entries to systemd user timers?')) return;
569126
569123
  const r = await fetch('/v1/scheduled/fixup', { method:'POST', headers: headers(), body: JSON.stringify({ mode: 'migrate', dryRun: false }) });
@@ -569130,7 +569127,7 @@ No remaining matched processes.';
569130
569127
  } catch (e) { alert('Migrate failed: ' + (e && e.message || String(e))); }
569131
569128
  }
569132
569129
 
569133
- (window as any).killScheduledTask = async function(id) {
569130
+ window.killScheduledTask = async function(id) {
569134
569131
  try {
569135
569132
  // Fetch task to derive a pattern (directory of tasks.json)
569136
569133
  const r = await fetch('/v1/scheduled/status', { headers: headers() });
@@ -569141,20 +569138,20 @@ No remaining matched processes.';
569141
569138
  const dir = (t.file || '').split('/').slice(0, -1).join('/') || t.file;
569142
569139
  // Escape for regex without using a character class that includes brace/dollar combo (parser quirk)
569143
569140
  const safe = dir
569144
- .replace(/\\/g, "\\\\")
569145
- .replace(/[/g, "\\[")
569146
- .replace(/]/g, "\\]")
569147
- .replace(/{/g, "\\{")
569148
- .replace(/}/g, "\\}")
569149
- .replace(/(/g, "\\(")
569150
- .replace(/)/g, "\\)")
569151
- .replace(/*/g, "\\*")
569152
- .replace(/+/g, "\\+")
569153
- .replace(/?/g, "\\?")
569154
- .replace(/^/g, "\\^")
569155
- .replace(/$/g, "\\$")
569156
- .replace(/|/g, "\\|")
569157
- .replace(/./g, "\\.");
569141
+ .replace(/\\\\/g, "\\\\\\\\")
569142
+ .replace(/\\[/g, "\\\\[")
569143
+ .replace(/\\]/g, "\\\\]")
569144
+ .replace(/\\{/g, "\\\\{")
569145
+ .replace(/\\}/g, "\\\\}")
569146
+ .replace(/\\(/g, "\\\\(")
569147
+ .replace(/\\)/g, "\\\\)")
569148
+ .replace(/\\*/g, "\\\\*")
569149
+ .replace(/\\+/g, "\\\\+")
569150
+ .replace(/\\?/g, "\\\\?")
569151
+ .replace(/\\^/g, "\\\\^")
569152
+ .replace(/\\$/g, "\\\\$")
569153
+ .replace(/\\|/g, "\\\\|")
569154
+ .replace(/\\./g, "\\\\.");
569158
569155
  const body = { pattern: safe };
569159
569156
  const resp = await fetch('/v1/scheduled/kill', { method:'POST', headers: headers(), body: JSON.stringify(body) });
569160
569157
  const j = await resp.json();
@@ -569164,11 +569161,8 @@ No remaining matched processes.';
569164
569161
  const after = j.gpu_after && j.gpu_after[0] ? j.gpu_after[0] : null;
569165
569162
  const rem = Array.isArray(j.procs_after) ? j.procs_after.length : 0;
569166
569163
  let msg = 'Killed ' + (kb + ka) + ' processes for task.';
569167
- if (before && after) msg += '
569168
- GPU util: ' + before.gpu_pct + '% ' + after.gpu_pct + '%';
569169
- msg += rem > 0 ? ('
569170
- Remaining matched processes: ' + rem) : '
569171
- No remaining matched processes.';
569164
+ if (before && after) msg += '\\nGPU util: ' + before.gpu_pct + '% → ' + after.gpu_pct + '%';
569165
+ msg += rem > 0 ? ('\\nRemaining matched processes: ' + rem) : '\\nNo remaining matched processes.';
569172
569166
  alert(msg);
569173
569167
  loadScheduled();
569174
569168
  } catch (e) { alert('Kill failed: ' + (e && e.message || String(e))); }
@@ -569183,8 +569177,8 @@ async function loadServices() {
569183
569177
  const svcs = Array.isArray(d.services) ? d.services : [];
569184
569178
  if (!svcs.length) { el.innerHTML = ''; return; }
569185
569179
  const rows = svcs.map(s => {
569186
- const stopBtn = '<button onclick="svcAction('' + s.name + '','stop')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">stop</button>';
569187
- const disBtn = '<button onclick="svcAction('' + s.name + '','disable')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">disable</button>';
569180
+ const stopBtn = '<button onclick="svcAction(\\'' + s.name + '\\',\\'stop\\')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">stop</button>';
569181
+ const disBtn = '<button onclick="svcAction(\\'' + s.name + '\\',\\'disable\\')" style="background:#2a2a30;border:1px solid #5a2a2a;color:#b25f5f;padding:2px 6px;border-radius:3px;font-size:0.65rem;cursor:pointer">disable</button>';
569188
569182
  return '<div style="background:#1e1e22;border-left:2px solid #3a3a42;padding:6px 10px;margin:4px 0;font-size:0.72rem">'
569189
569183
  + '<div style="color:#b0b0b0">' + s.name + '</div>'
569190
569184
  + '<div style="color:#555;font-size:0.6rem">enabled: ' + s.enabled + ' • active: ' + s.active + '</div>'
@@ -569195,7 +569189,7 @@ async function loadServices() {
569195
569189
  } catch {}
569196
569190
  }
569197
569191
 
569198
- (window as any).svcAction = async function(name, action) {
569192
+ window.svcAction = async function(name, action) {
569199
569193
  try {
569200
569194
  await fetch('/v1/services/systemd/' + encodeURIComponent(name), { method:'POST', headers: headers(), body: JSON.stringify({ action }) });
569201
569195
  loadServices();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.365",
3
+ "version": "0.187.366",
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",