@skrr-ai/cli 0.1.97 → 0.1.98
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.
|
@@ -243,14 +243,33 @@ exports.default = AgentsUpdate;
|
|
|
243
243
|
* Exported for tests.
|
|
244
244
|
*/
|
|
245
245
|
function agentUpdateWarnings(payload, updated) {
|
|
246
|
+
const isRecord = (value) => value !== null && typeof value === 'object' && !Array.isArray(value);
|
|
247
|
+
const controlReply = isRecord(updated) &&
|
|
248
|
+
typeof updated.agentId === 'string' &&
|
|
249
|
+
isRecord(updated.state) &&
|
|
250
|
+
typeof updated.state.isAlwaysOn === 'boolean';
|
|
251
|
+
let comparison = updated;
|
|
252
|
+
if (controlReply && isRecord(updated) && isRecord(updated.state)) {
|
|
253
|
+
const projection = isRecord(updated.agent) ? { ...updated.agent } : {};
|
|
254
|
+
// The ordinary Agent snapshot can precede the control write. Only the
|
|
255
|
+
// returned control state acknowledges this field, including a false value.
|
|
256
|
+
delete projection.isAlwaysOn;
|
|
257
|
+
delete projection.expectedGeneration;
|
|
258
|
+
if (typeof payload.isAlwaysOn === 'boolean' &&
|
|
259
|
+
updated.state.isAlwaysOn === payload.isAlwaysOn) {
|
|
260
|
+
projection.isAlwaysOn = updated.state.isAlwaysOn;
|
|
261
|
+
}
|
|
262
|
+
comparison = projection;
|
|
263
|
+
}
|
|
246
264
|
const cleared = Object.keys(payload).filter((key) => payload[key] === null);
|
|
247
|
-
const unapplied = (0, create_1.unappliedPayloadKeys)(payload,
|
|
265
|
+
const unapplied = (0, create_1.unappliedPayloadKeys)(payload, comparison, [
|
|
248
266
|
'removeProjectIds',
|
|
249
267
|
...cleared,
|
|
250
|
-
...(0, agent_config_1.deprecatedFieldNames)(
|
|
268
|
+
...(0, agent_config_1.deprecatedFieldNames)(comparison),
|
|
269
|
+
...(controlReply && typeof payload.isAlwaysOn === 'boolean' ? ['expectedGeneration'] : []),
|
|
251
270
|
]);
|
|
252
271
|
return [
|
|
253
|
-
...(0, agent_config_1.deprecatedFieldsWarnings)(
|
|
272
|
+
...(0, agent_config_1.deprecatedFieldsWarnings)(comparison),
|
|
254
273
|
...(unapplied.length > 0 ? [(0, create_1.unappliedPayloadKeysWarning)(unapplied)] : []),
|
|
255
274
|
];
|
|
256
275
|
}
|
|
@@ -67,6 +67,7 @@ class DedicatedMachinesShow extends dedicated_lease_command_1.DedicatedLeaseComm
|
|
|
67
67
|
}));
|
|
68
68
|
this.log(JSON.stringify({
|
|
69
69
|
...response,
|
|
70
|
+
readinessScope: 'runtime-dispatch',
|
|
70
71
|
harnesses: engines,
|
|
71
72
|
agentBrowser,
|
|
72
73
|
...(latestDaemonRelease ? { latestDaemonRelease } : {}),
|
|
@@ -45,9 +45,22 @@ class MachinesShow extends base_command_1.BaseCommand {
|
|
|
45
45
|
if (!machine) {
|
|
46
46
|
this.error('Machine not found.', { exit: 1 });
|
|
47
47
|
}
|
|
48
|
+
const harnesses = machine.harnesses ?? [];
|
|
49
|
+
const shown = flags.json || flags.all ? harnesses : harnesses.filter((h) => !h.superseded);
|
|
50
|
+
const rowReadiness = await (0, cli_installers_1.readinessForRows)(shown, this.resolvedCredential);
|
|
51
|
+
const readinessFor = rowReadiness.lookup;
|
|
48
52
|
if (flags.json) {
|
|
49
53
|
this.log(JSON.stringify({
|
|
50
54
|
...machine,
|
|
55
|
+
harnesses: harnesses.map((h) => ({
|
|
56
|
+
...h,
|
|
57
|
+
authStatusScope: 'daemon-to-skrr',
|
|
58
|
+
readiness: readinessFor(h) ?? null,
|
|
59
|
+
})),
|
|
60
|
+
readinessObservation: {
|
|
61
|
+
asked: rowReadiness.asked,
|
|
62
|
+
answered: rowReadiness.answered,
|
|
63
|
+
},
|
|
51
64
|
url: this.cliConfig?.baseURL
|
|
52
65
|
? (0, web_url_1.webUrl)(this.cliConfig.baseURL, { kind: 'machine', machineId: machine.id })
|
|
53
66
|
: null,
|
|
@@ -86,7 +99,6 @@ class MachinesShow extends base_command_1.BaseCommand {
|
|
|
86
99
|
if (machine.preferences?.tags?.length) {
|
|
87
100
|
this.log(` tags ${machine.preferences.tags.join(', ')}`);
|
|
88
101
|
}
|
|
89
|
-
const harnesses = machine.harnesses ?? [];
|
|
90
102
|
const live = (0, machines_1.liveHarnessCount)(machine);
|
|
91
103
|
const superseded = harnesses.length - live;
|
|
92
104
|
// Superseded registrations are history, not capabilities, and they are not
|
|
@@ -95,7 +107,6 @@ class MachinesShow extends base_command_1.BaseCommand {
|
|
|
95
107
|
// printed, they were 35 of a machine's 42 rows, back two months, under a
|
|
96
108
|
// header whose count read like a summary of rows it then printed anyway
|
|
97
109
|
// (OSK-9389). `--all` shows them, and `--json` always carries every row.
|
|
98
|
-
const shown = flags.all ? harnesses : harnesses.filter((h) => !h.superseded);
|
|
99
110
|
// The daemon's own standing with skrr is ONE fact about the machine, not a
|
|
100
111
|
// per-provider one: it is written across every row of a daemon at once. It
|
|
101
112
|
// sat in a per-row column and answered `ok` for a Devin its CLI called
|
|
@@ -115,8 +126,6 @@ class MachinesShow extends base_command_1.BaseCommand {
|
|
|
115
126
|
.filter((h) => h.status === 'online' && !h.superseded && h.daemonId)
|
|
116
127
|
.map((h) => h.daemonId)),
|
|
117
128
|
];
|
|
118
|
-
const rowReadiness = await (0, cli_installers_1.readinessForRows)(shown, this.resolvedCredential);
|
|
119
|
-
const readinessFor = rowReadiness.lookup;
|
|
120
129
|
const readiness = rowReadiness.answered > 0 ? rowReadiness : null;
|
|
121
130
|
this.log('');
|
|
122
131
|
this.log(`Harnesses (${machine.onlineHarnessCount}/${live} online` +
|
|
@@ -815,6 +815,9 @@ function describeDedicatedLease(lease, harnesses = [], opts = {}) {
|
|
|
815
815
|
? ''
|
|
816
816
|
: (0, harnesses_1.describeHealthReasonSentences)(health.reasons, dedicatedLeaseState(lease));
|
|
817
817
|
row('health', health.assignable ? 'can take work' : `not assignable${why ? `: ${why}` : ''}`);
|
|
818
|
+
if (health.assignable) {
|
|
819
|
+
row('provider auth', `separate from runtime health; inspect saved sign-in: skrr machines dedicated sign-in-status ${dedicatedLeaseId(lease)} (credentials supplied for a run may differ)`);
|
|
820
|
+
}
|
|
818
821
|
}
|
|
819
822
|
row('spend', lease.billing ? dedicatedSpendSummary(lease) : undefined);
|
|
820
823
|
const deletionPlan = dedicatedDeletionLines(lease);
|
package/oclif.manifest.json
CHANGED
|
@@ -130039,5 +130039,5 @@
|
|
|
130039
130039
|
]
|
|
130040
130040
|
}
|
|
130041
130041
|
},
|
|
130042
|
-
"version": "0.1.
|
|
130042
|
+
"version": "0.1.98"
|
|
130043
130043
|
}
|