open-agents-ai 0.104.29 → 0.104.31
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.
- package/dist/index.js +20 -8
- 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", {
|
|
@@ -47971,7 +47983,7 @@ var init_status_bar = __esm({
|
|
|
47971
47983
|
}
|
|
47972
47984
|
};
|
|
47973
47985
|
poll();
|
|
47974
|
-
this._remoteMetricsTimer = setInterval(poll,
|
|
47986
|
+
this._remoteMetricsTimer = setInterval(poll, 5e3);
|
|
47975
47987
|
}
|
|
47976
47988
|
/**
|
|
47977
47989
|
* Start polling a peer endpoint for metrics via nexus daemon.
|
|
@@ -48087,13 +48099,13 @@ var init_status_bar = __esm({
|
|
|
48087
48099
|
cpuUtil: -1,
|
|
48088
48100
|
// -1 = unavailable (won't render bar)
|
|
48089
48101
|
gpuUtil: -1,
|
|
48090
|
-
gpuName: pollAttempt <=
|
|
48102
|
+
gpuName: pollAttempt <= 5 ? "connecting..." : `peer (${lastPeerMetricsDebug.slice(0, 40)})`,
|
|
48091
48103
|
vramUtil: -1,
|
|
48092
48104
|
memUtil: -1
|
|
48093
48105
|
});
|
|
48094
48106
|
};
|
|
48095
|
-
setTimeout(poll,
|
|
48096
|
-
this._remoteMetricsTimer = setInterval(poll,
|
|
48107
|
+
setTimeout(poll, 1e3);
|
|
48108
|
+
this._remoteMetricsTimer = setInterval(poll, 5e3);
|
|
48097
48109
|
}
|
|
48098
48110
|
/** Stop polling remote metrics and switch back to local */
|
|
48099
48111
|
stopRemoteMetricsPolling() {
|
package/package.json
CHANGED