open-agents-ai 0.153.0 → 0.155.0

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 +13 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55930,6 +55930,7 @@ var init_system_metrics = __esm({
55930
55930
  _latest = null;
55931
55931
  _intervalMs = 3e3;
55932
55932
  _collecting = false;
55933
+ _collectStartTime = 0;
55933
55934
  /** Current metrics snapshot (may be null before first poll) */
55934
55935
  get latest() {
55935
55936
  return this._latest;
@@ -55959,8 +55960,8 @@ var init_system_metrics = __esm({
55959
55960
  this.stop();
55960
55961
  this._source = "remote";
55961
55962
  this._callback = callback;
55962
- this._timer = setInterval(() => this._pollNetworkOnly(), this._intervalMs);
55963
- this._pollNetworkOnly();
55963
+ this._timer = setInterval(() => this._poll(), this._intervalMs);
55964
+ this._poll();
55964
55965
  }
55965
55966
  /**
55966
55967
  * Push hardware metrics received from a remote /expose provider.
@@ -56004,15 +56005,22 @@ var init_system_metrics = __esm({
56004
56005
  return this._timer !== null;
56005
56006
  }
56006
56007
  async _poll() {
56007
- if (this._collecting)
56008
- return;
56008
+ if (this._collecting) {
56009
+ if (this._collectStartTime && Date.now() - this._collectStartTime > this._intervalMs * 2) {
56010
+ this._collecting = false;
56011
+ } else {
56012
+ return;
56013
+ }
56014
+ }
56009
56015
  this._collecting = true;
56016
+ this._collectStartTime = Date.now();
56010
56017
  try {
56011
56018
  this._latest = await collectLocalMetrics();
56012
56019
  this._callback?.(this._latest);
56013
56020
  } catch {
56014
56021
  }
56015
56022
  this._collecting = false;
56023
+ this._collectStartTime = 0;
56016
56024
  }
56017
56025
  async _pollNetworkOnly() {
56018
56026
  try {
@@ -56928,7 +56936,7 @@ var init_status_bar = __esm({
56928
56936
  * Start collecting LOCAL system metrics (CPU/RAM/GPU + network I/O).
56929
56937
  * Called automatically on startup when endpoint is local.
56930
56938
  */
56931
- startLocalMetrics(intervalMs = 3e3) {
56939
+ startLocalMetrics(intervalMs = 2e3) {
56932
56940
  this._metricsCollector.startLocal((m) => {
56933
56941
  this._unifiedMetrics = m;
56934
56942
  if (this.active)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.153.0",
3
+ "version": "0.155.0",
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",