open-agents-ai 0.104.24 → 0.104.25

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 +23 -18
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13325,7 +13325,7 @@ async function handleCmd(cmd) {
13325
13325
  dlog('system_metrics: auth OK');
13326
13326
  }
13327
13327
  try {
13328
- var os = require('os');
13328
+ var os = await import('node:os');
13329
13329
  var loads = os.loadavg();
13330
13330
  var cores = os.cpus().length;
13331
13331
  var totalMem = os.totalmem();
@@ -13333,7 +13333,7 @@ async function handleCmd(cmd) {
13333
13333
  var usedMem = totalMem - freeMem;
13334
13334
  var gpuInfo = { available: false, name: '', utilization: 0, vramUsedMB: 0, vramTotalMB: 0, vramUtilization: 0 };
13335
13335
  try {
13336
- var cp = require('child_process');
13336
+ var cp = await import('node:child_process');
13337
13337
  var smiOut = cp.execSync('nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null', { encoding: 'utf8', timeout: 3000 });
13338
13338
  var smiLine = smiOut.trim().split('\\n')[0];
13339
13339
  if (smiLine) {
@@ -29494,6 +29494,8 @@ ${this.formatConnectionInfo()}`);
29494
29494
  this._stats.totalRequests = invocCount;
29495
29495
  this._prevInvocCount = invocCount;
29496
29496
  this.emitStats();
29497
+ for (let i = 0; i < newRequests; i++)
29498
+ this.emit("token_flash");
29497
29499
  return;
29498
29500
  }
29499
29501
  const now = Date.now();
@@ -29619,6 +29621,7 @@ ${this.formatConnectionInfo()}`);
29619
29621
  }
29620
29622
  }
29621
29623
  this.emitStats();
29624
+ this.emit("token_flash");
29622
29625
  }
29623
29626
  }
29624
29627
  } catch {
@@ -37431,6 +37434,8 @@ Error: ${err instanceof Error ? err.message : String(err)}`);
37431
37434
  });
37432
37435
 
37433
37436
  // packages/cli/dist/tui/commands.js
37437
+ import * as nodeOs from "node:os";
37438
+ import { execSync as nodeExecSync } from "node:child_process";
37434
37439
  function safeLog(text) {
37435
37440
  if (isNeovimActive()) {
37436
37441
  writeToNeovimOutput(text + "\n");
@@ -40167,16 +40172,15 @@ function fmtUptime(ms) {
40167
40172
  return `${Math.floor(sec / 3600)}h ${Math.floor(sec % 3600 / 60)}m`;
40168
40173
  }
40169
40174
  function getLocalSystemMetrics() {
40170
- const os = __require("node:os");
40171
- const cpus3 = os.cpus();
40172
- const loads = os.loadavg();
40173
- const totalMem = os.totalmem();
40174
- const freeMem = os.freemem();
40175
+ const cpus4 = nodeOs.cpus();
40176
+ const loads = nodeOs.loadavg();
40177
+ const totalMem = nodeOs.totalmem();
40178
+ const freeMem = nodeOs.freemem();
40175
40179
  const usedMem = totalMem - freeMem;
40176
40180
  const result = {
40177
- cpuModel: cpus3[0]?.model?.trim() ?? "unknown",
40178
- cpuCores: cpus3.length,
40179
- cpuUtil: Math.min(100, Math.round(loads[0] / cpus3.length * 100)),
40181
+ cpuModel: cpus4[0]?.model?.trim() ?? "unknown",
40182
+ cpuCores: cpus4.length,
40183
+ cpuUtil: Math.min(100, Math.round(loads[0] / cpus4.length * 100)),
40180
40184
  memTotalGB: Math.round(totalMem / (1024 * 1024 * 1024) * 10) / 10,
40181
40185
  memUsedGB: Math.round(usedMem / (1024 * 1024 * 1024) * 10) / 10,
40182
40186
  memUtil: Math.round(usedMem / totalMem * 100),
@@ -40188,8 +40192,7 @@ function getLocalSystemMetrics() {
40188
40192
  vramUtil: 0
40189
40193
  };
40190
40194
  try {
40191
- const { execSync: execSync30 } = __require("node:child_process");
40192
- const smiOut = execSync30("nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 });
40195
+ const smiOut = nodeExecSync("nvidia-smi --query-gpu=utilization.gpu,memory.used,memory.total,name --format=csv,noheader,nounits 2>/dev/null", { encoding: "utf8", timeout: 3e3 });
40193
40196
  const line = smiOut.trim().split("\n")[0];
40194
40197
  if (line) {
40195
40198
  const parts = line.split(",").map((s) => s.trim());
@@ -47138,7 +47141,7 @@ var init_braille_spinner = __esm({
47138
47141
  });
47139
47142
 
47140
47143
  // packages/cli/dist/tui/system-metrics.js
47141
- import { loadavg as loadavg2, cpus as cpus2, totalmem as totalmem3, freemem as freemem2, platform as platform4 } from "node:os";
47144
+ import { loadavg as loadavg3, cpus as cpus3, totalmem as totalmem4, freemem as freemem3, platform as platform4 } from "node:os";
47142
47145
  import { exec as exec3 } from "node:child_process";
47143
47146
  import { readFile as readFile16 } from "node:fs/promises";
47144
47147
  function formatRate(bytesPerSec) {
@@ -47269,11 +47272,11 @@ function getInstantSnapshot() {
47269
47272
  };
47270
47273
  }
47271
47274
  function collectCpuRam() {
47272
- const [l1] = loadavg2();
47273
- const cores = cpus2().length;
47274
- const cpuModel = cpus2()[0]?.model ?? "";
47275
- const totalMem = totalmem3();
47276
- const usedMem = totalMem - freemem2();
47275
+ const [l1] = loadavg3();
47276
+ const cores = cpus3().length;
47277
+ const cpuModel = cpus3()[0]?.model ?? "";
47278
+ const totalMem = totalmem4();
47279
+ const usedMem = totalMem - freemem3();
47277
47280
  return {
47278
47281
  cpuUtil: Math.min(100, Math.round(l1 / cores * 100)),
47279
47282
  cpuCores: cores,
@@ -50612,6 +50615,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
50612
50615
  modelUsage: stats.modelUsage
50613
50616
  });
50614
50617
  });
50618
+ reconnectedP2P.on("token_flash", () => statusBar.flashExposeToken());
50615
50619
  writeContent(() => {
50616
50620
  renderInfo(`Reconnected to existing P2P expose: ${reconnectedP2P.peerId}`);
50617
50621
  });
@@ -51434,6 +51438,7 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
51434
51438
  modelUsage: stats.modelUsage
51435
51439
  });
51436
51440
  });
51441
+ newP2P.on("token_flash", () => statusBar.flashExposeToken());
51437
51442
  try {
51438
51443
  const peerId = await newP2P.start();
51439
51444
  clearInterval(exposeSpinner);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.104.24",
3
+ "version": "0.104.25",
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",