@phnx-labs/agents-cli 1.23.22 → 1.23.23
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.23
|
|
4
|
+
|
|
5
|
+
- **The daemon no longer restarts in a loop on a busy Mac when it posts banners for the whole fleet.** With `interactive.host` set to this machine, `attention-notify` ran its hourly mailbox sweep inside its 10-second tick, and in that mode the sweep began with a full session scan. On a Mac at load ~120 the scan took over 100 s, the daemon restarted for the overrun, and the restarted service ran the sweep again on its first tick (50 restarts in a day on the owner's laptop). The scan now runs beside the tick, one at a time, and the first sweep waits an hour after the service starts. Source: `cli/src/lib/daemon/attention-notify-service.ts`.
|
|
6
|
+
|
|
3
7
|
## 1.23.22
|
|
4
8
|
|
|
5
9
|
- **Secrets calls go through the published `@phnx-labs/secrets-cli/client`, and an unset `SECRETS_HOME` is no longer forced to `~/.agents` (PHNX-4227). Requires the `secrets` engine 0.4.0 or newer.**
|
|
@@ -58,6 +58,7 @@ export declare class AttentionNotifyService extends BasePeriodicService {
|
|
|
58
58
|
private readonly ledgerDir;
|
|
59
59
|
private readonly now;
|
|
60
60
|
private lastHourlyMs;
|
|
61
|
+
private gcScan;
|
|
61
62
|
private settingsCache?;
|
|
62
63
|
private banners;
|
|
63
64
|
private fleetHub;
|
|
@@ -76,6 +77,7 @@ export declare class AttentionNotifyService extends BasePeriodicService {
|
|
|
76
77
|
private recordStage;
|
|
77
78
|
private writeState;
|
|
78
79
|
private hourly;
|
|
80
|
+
private sweep;
|
|
79
81
|
private pruneLedger;
|
|
80
82
|
}
|
|
81
83
|
export {};
|
|
@@ -112,6 +112,7 @@ export class AttentionNotifyService extends BasePeriodicService {
|
|
|
112
112
|
ledgerDir;
|
|
113
113
|
now;
|
|
114
114
|
lastHourlyMs = 0;
|
|
115
|
+
gcScan = null;
|
|
115
116
|
settingsCache;
|
|
116
117
|
banners = null;
|
|
117
118
|
fleetHub = null;
|
|
@@ -130,6 +131,7 @@ export class AttentionNotifyService extends BasePeriodicService {
|
|
|
130
131
|
this.now = opts.now ?? Date.now;
|
|
131
132
|
}
|
|
132
133
|
async onStart(_ctx) {
|
|
134
|
+
this.lastHourlyMs = this.now();
|
|
133
135
|
}
|
|
134
136
|
async onStop() {
|
|
135
137
|
this.releaseFleet();
|
|
@@ -308,8 +310,19 @@ export class AttentionNotifyService extends BasePeriodicService {
|
|
|
308
310
|
return;
|
|
309
311
|
this.lastHourlyMs = nowMs;
|
|
310
312
|
await this.pruneLedger(nowMs);
|
|
313
|
+
if (fetched) {
|
|
314
|
+
this.sweep(ctx, fetched);
|
|
315
|
+
return;
|
|
316
|
+
}
|
|
317
|
+
if (this.gcScan)
|
|
318
|
+
return;
|
|
319
|
+
this.gcScan = this.getSessions()
|
|
320
|
+
.then((sessions) => this.sweep(ctx, sessions))
|
|
321
|
+
.catch((err) => ctx.log('WARN', `attention-notify: mailbox gc skipped: ${err.message}`, { event: 'attention.gc.failed' }))
|
|
322
|
+
.finally(() => { this.gcScan = null; });
|
|
323
|
+
}
|
|
324
|
+
sweep(ctx, sessions) {
|
|
311
325
|
try {
|
|
312
|
-
const sessions = fetched ?? await this.getSessions();
|
|
313
326
|
const active = new Set(sessions.map(mailboxIdForActiveSession).filter((id) => !!id));
|
|
314
327
|
spanSync('attention.gc', () => this.gc(active));
|
|
315
328
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phnx-labs/agents-cli",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.23",
|
|
4
4
|
"description": "One CLI for all your AI coding agents - versions, config, cloud dispatch, sessions, and teams (now with first-class Grok Build CLI support)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|