@phnx-labs/agents-cli 1.23.14 → 1.23.15
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,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.23.15
|
|
4
|
+
|
|
5
|
+
- **`--device auto` no longer refuses every worker when the load probe times out.** The
|
|
6
|
+
2.5 s load/memory probe could time out on every worker at once during a brief stall on
|
|
7
|
+
the launching machine, and placement then failed with `no healthy device ... (probe
|
|
8
|
+
timed out)` even though each worker had just answered the sign-in probe. A worker that
|
|
9
|
+
answers the sign-in probe now counts as reachable; only its load is reported as
|
|
10
|
+
unknown. Source: `cli/src/lib/teams/placement-probe.ts`.
|
|
11
|
+
|
|
3
12
|
## 1.23.14
|
|
4
13
|
|
|
5
14
|
- **Removed dead and duplicate commands (PHNX-4227, owner decision 2026-10-11).**
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
+
import { type DeviceStats } from '../devices/health.js';
|
|
1
2
|
import { type AgentType } from './agents.js';
|
|
2
3
|
import type { DevicePlacementSignal } from './scheduler.js';
|
|
3
4
|
export declare const READY_PROBE_TIMEOUT_MS = 8000;
|
|
4
5
|
export declare const SIGNAL_TTL_MS = 15000;
|
|
5
6
|
export declare function clearPlacementSignalCache(): void;
|
|
7
|
+
interface ReadinessInfo {
|
|
8
|
+
answered: boolean;
|
|
9
|
+
installed: boolean | undefined;
|
|
10
|
+
signedIn: boolean | undefined;
|
|
11
|
+
pickerEligible: boolean | undefined;
|
|
12
|
+
}
|
|
13
|
+
export declare function mergePlacementSignal(stats: DeviceStats | undefined, readiness: ReadinessInfo | undefined): DevicePlacementSignal;
|
|
6
14
|
export declare function probePoolSignals(pool: string[], agent?: AgentType, opts?: {
|
|
7
15
|
force?: boolean;
|
|
8
16
|
now?: number;
|
|
9
17
|
}): Promise<Map<string, DevicePlacementSignal>>;
|
|
18
|
+
export {};
|
|
@@ -18,7 +18,7 @@ export function clearPlacementSignalCache() {
|
|
|
18
18
|
cache.clear();
|
|
19
19
|
}
|
|
20
20
|
function probeRemoteReadiness(device, agent, usagePayload) {
|
|
21
|
-
const unknown = { installed: undefined, signedIn: undefined, pickerEligible: undefined };
|
|
21
|
+
const unknown = { answered: false, installed: undefined, signedIn: undefined, pickerEligible: undefined };
|
|
22
22
|
let args;
|
|
23
23
|
let env;
|
|
24
24
|
try {
|
|
@@ -60,17 +60,30 @@ function probeRemoteReadiness(device, agent, usagePayload) {
|
|
|
60
60
|
if (!probe.reachable)
|
|
61
61
|
return finish(unknown);
|
|
62
62
|
if (!probe.version)
|
|
63
|
-
return finish({ installed: false, signedIn: false, pickerEligible: false });
|
|
63
|
+
return finish({ answered: true, installed: false, signedIn: false, pickerEligible: false });
|
|
64
64
|
const installed = viewHasAgent(probe.view, agent);
|
|
65
65
|
const eligibility = installed
|
|
66
66
|
? viewAgentAccountEligibility(probe.view, agent)
|
|
67
67
|
: { signedIn: false, pickerEligible: false };
|
|
68
|
-
finish({ installed, ...eligibility });
|
|
68
|
+
finish({ answered: true, installed, ...eligibility });
|
|
69
69
|
});
|
|
70
70
|
child.stdin.on('error', () => { });
|
|
71
71
|
child.stdin.end(usagePayload);
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
|
+
export function mergePlacementSignal(stats, readiness) {
|
|
75
|
+
const reachable = readiness?.answered === true ? true : stats?.reachable;
|
|
76
|
+
return {
|
|
77
|
+
reachable,
|
|
78
|
+
timedOut: reachable === true ? undefined : stats?.timedOut,
|
|
79
|
+
headroom: stats ? headroom(stats) : undefined,
|
|
80
|
+
loadPercent: stats?.loadPercent,
|
|
81
|
+
memPercent: stats?.memPercent,
|
|
82
|
+
installed: readiness?.installed,
|
|
83
|
+
signedIn: readiness?.signedIn,
|
|
84
|
+
pickerEligible: readiness?.pickerEligible,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
74
87
|
export async function probePoolSignals(pool, agent, opts = {}) {
|
|
75
88
|
const now = opts.now ?? Date.now();
|
|
76
89
|
const key = cacheKey(pool, agent);
|
|
@@ -98,13 +111,14 @@ export async function probePoolSignals(pool, agent, opts = {}) {
|
|
|
98
111
|
if (isSelf) {
|
|
99
112
|
const inst = checkCliAvailable(agent)[0];
|
|
100
113
|
if (!inst)
|
|
101
|
-
return [d.name, { installed: false, signedIn: false, pickerEligible: false }];
|
|
114
|
+
return [d.name, { answered: true, installed: false, signedIn: false, pickerEligible: false }];
|
|
102
115
|
const candidates = await collectRunCandidates(agent).catch(() => null);
|
|
103
116
|
if (!candidates) {
|
|
104
|
-
return [d.name, { installed: true, signedIn: undefined, pickerEligible: undefined }];
|
|
117
|
+
return [d.name, { answered: true, installed: true, signedIn: undefined, pickerEligible: undefined }];
|
|
105
118
|
}
|
|
106
119
|
const readiness = candidates.map((candidate) => readinessFromCandidate(candidate));
|
|
107
120
|
return [d.name, {
|
|
121
|
+
answered: true,
|
|
108
122
|
installed: true,
|
|
109
123
|
signedIn: readiness.some((candidate) => candidate.ready),
|
|
110
124
|
pickerEligible: readiness.some((candidate) => candidate.ready || isSignInRecoverable(candidate)),
|
|
@@ -120,16 +134,7 @@ export async function probePoolSignals(pool, agent, opts = {}) {
|
|
|
120
134
|
const inst = d ? installed.get(d.name) : undefined;
|
|
121
135
|
if (!s && !inst)
|
|
122
136
|
continue;
|
|
123
|
-
signals.set(name,
|
|
124
|
-
reachable: s?.reachable,
|
|
125
|
-
timedOut: s?.timedOut,
|
|
126
|
-
headroom: s ? headroom(s) : undefined,
|
|
127
|
-
loadPercent: s?.loadPercent,
|
|
128
|
-
memPercent: s?.memPercent,
|
|
129
|
-
installed: inst?.installed,
|
|
130
|
-
signedIn: inst?.signedIn,
|
|
131
|
-
pickerEligible: inst?.pickerEligible,
|
|
132
|
-
});
|
|
137
|
+
signals.set(name, mergePlacementSignal(s, inst));
|
|
133
138
|
}
|
|
134
139
|
cache.set(key, { at: now, signals });
|
|
135
140
|
return signals;
|
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.15",
|
|
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",
|