open-agents-ai 0.104.29 → 0.104.30

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 +16 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -29270,6 +29270,8 @@ ${this.formatConnectionInfo()}`);
29270
29270
  _endpointAuth;
29271
29271
  _pollTimer = null;
29272
29272
  _activityPollTimer = null;
29273
+ /** Fast token flash timer — pulses LED at 200ms while inference is active */
29274
+ _tokenFlashTimer = null;
29273
29275
  _prevInvocCount = 0;
29274
29276
  _nexusDir = null;
29275
29277
  _stats = {
@@ -29494,9 +29496,6 @@ ${this.formatConnectionInfo()}`);
29494
29496
  this._stats.totalRequests = invocCount;
29495
29497
  this._prevInvocCount = invocCount;
29496
29498
  this.emitStats();
29497
- for (let i = 0; i < newRequests; i++)
29498
- this.emit("token_flash");
29499
- return;
29500
29499
  }
29501
29500
  const now = Date.now();
29502
29501
  let recentActive = 0;
@@ -29522,6 +29521,16 @@ ${this.formatConnectionInfo()}`);
29522
29521
  this._stats.activeConnections = Math.max(recentActive, Math.min(inFlightEstimate, 10));
29523
29522
  if (this._stats.activeConnections !== prevActive)
29524
29523
  this.emitStats();
29524
+ if (this._stats.activeConnections > 0 && !this._tokenFlashTimer) {
29525
+ this.emit("token_flash");
29526
+ this._tokenFlashTimer = setInterval(() => {
29527
+ this.emit("token_flash");
29528
+ }, 200);
29529
+ this._tokenFlashTimer.unref();
29530
+ } else if (this._stats.activeConnections === 0 && this._tokenFlashTimer) {
29531
+ clearInterval(this._tokenFlashTimer);
29532
+ this._tokenFlashTimer = null;
29533
+ }
29525
29534
  } catch {
29526
29535
  }
29527
29536
  }, 1e3);
@@ -29621,7 +29630,6 @@ ${this.formatConnectionInfo()}`);
29621
29630
  }
29622
29631
  }
29623
29632
  this.emitStats();
29624
- this.emit("token_flash");
29625
29633
  }
29626
29634
  }
29627
29635
  } catch {
@@ -29638,6 +29646,10 @@ ${this.formatConnectionInfo()}`);
29638
29646
  clearInterval(this._activityPollTimer);
29639
29647
  this._activityPollTimer = null;
29640
29648
  }
29649
+ if (this._tokenFlashTimer) {
29650
+ clearInterval(this._tokenFlashTimer);
29651
+ this._tokenFlashTimer = null;
29652
+ }
29641
29653
  }
29642
29654
  emitStats() {
29643
29655
  this.emit("stats", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.104.29",
3
+ "version": "0.104.30",
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",