open-agents-ai 0.103.90 → 0.103.91

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 +26 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -45830,6 +45830,26 @@ async function collectGpuMetrics() {
45830
45830
  return noGpu;
45831
45831
  }
45832
45832
  }
45833
+ function getInstantSnapshot() {
45834
+ const cr = collectCpuRam();
45835
+ return {
45836
+ source: "local",
45837
+ hardware: {
45838
+ cpuUtil: cr.cpuUtil,
45839
+ cpuCores: cr.cpuCores,
45840
+ cpuModel: cr.cpuModel,
45841
+ gpuUtil: -1,
45842
+ gpuName: "",
45843
+ vramUtil: -1,
45844
+ vramUsedMB: 0,
45845
+ vramTotalMB: 0,
45846
+ memUtil: cr.memUtil,
45847
+ memUsedGB: cr.memUsedGB,
45848
+ memTotalGB: cr.memTotalGB
45849
+ },
45850
+ network: { rxBytesPerSec: 0, txBytesPerSec: 0 }
45851
+ };
45852
+ }
45833
45853
  function collectCpuRam() {
45834
45854
  const [l1] = loadavg2();
45835
45855
  const cores = cpus2().length;
@@ -46587,13 +46607,13 @@ var init_status_bar = __esm({
46587
46607
  poll();
46588
46608
  this._remoteMetricsTimer = setInterval(poll, 1e4);
46589
46609
  }
46590
- /** Stop polling remote metrics */
46610
+ /** Stop polling remote metrics and switch back to local */
46591
46611
  stopRemoteMetricsPolling() {
46592
46612
  if (this._remoteMetricsTimer) {
46593
46613
  clearInterval(this._remoteMetricsTimer);
46594
46614
  this._remoteMetricsTimer = null;
46595
46615
  }
46596
- this._unifiedMetrics = null;
46616
+ this.startLocalMetrics();
46597
46617
  }
46598
46618
  /** Update token metrics from a token_usage event */
46599
46619
  updateMetrics(update) {
@@ -46969,8 +46989,8 @@ var init_status_bar = __esm({
46969
46989
  empty: false
46970
46990
  });
46971
46991
  }
46972
- if (this._unifiedMetrics) {
46973
- const um = this._unifiedMetrics;
46992
+ {
46993
+ const um = this._unifiedMetrics ?? getInstantSnapshot();
46974
46994
  const rm2 = um.hardware;
46975
46995
  const isLocal = um.source === "local";
46976
46996
  const srcTag = isLocal ? pastel2(120, "L") : pastel2(117, "R");
@@ -47007,7 +47027,9 @@ var init_status_bar = __esm({
47007
47027
  const vramColor = rm2.vramUtil > 80 ? c2.red : rm2.vramUtil > 50 ? c2.yellow : c2.green;
47008
47028
  const vramDetail = rm2.vramTotalMB > 0 ? ` (${rm2.vramUsedMB}/${rm2.vramTotalMB}MB)` : "";
47009
47029
  hwExpStr += ` VRAM ${vramColor(rm2.vramUtil + "%")}${c2.dim(vramDetail)}`;
47030
+ hwCompStr += ` VRAM ${vramColor(rm2.vramUtil + "%")}`;
47010
47031
  hwExpW += 6 + `${rm2.vramUtil}%`.length + vramDetail.length;
47032
+ hwCompW += 6 + `${rm2.vramUtil}%`.length;
47011
47033
  }
47012
47034
  const net = um.network;
47013
47035
  const rxStr = formatRate(net.rxBytesPerSec);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.103.90",
3
+ "version": "0.103.91",
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",