@skrr-ai/cli 0.1.183 → 0.1.185
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.
|
@@ -105,6 +105,15 @@ class MachinesList extends base_command_1.BaseCommand {
|
|
|
105
105
|
this.log(` ${m.preferences?.name || m.name}: ${m.statusReason}`);
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
+
// A Dedicated Runtime's Claude Code or Codex that needs its owner's sign-in, or
|
|
109
|
+
// whose sign-in its daemon did not report, with the command (OSK-24457). A
|
|
110
|
+
// harness counted online above can still be one that cannot run a turn.
|
|
111
|
+
const signInNotes = (0, machines_1.harnessSignInNotes)(views);
|
|
112
|
+
if (signInNotes.length > 0) {
|
|
113
|
+
this.log('');
|
|
114
|
+
for (const line of signInNotes)
|
|
115
|
+
this.log(line);
|
|
116
|
+
}
|
|
108
117
|
const foldedHistory = views.reduce((sum, view) => sum + (view.hiddenHarnessCount ?? 0), 0);
|
|
109
118
|
if (foldedHistory > 0) {
|
|
110
119
|
this.log('');
|
package/dist/lib/machines.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DaemonContactState, DaemonMaintenanceSummary, MachineIcon, MachineIconPatch } from '@skrr-ai/data-provider';
|
|
1
|
+
import type { DaemonContactState, DaemonMaintenanceSummary, HarnessSignInView, MachineIcon, MachineIconPatch } from '@skrr-ai/data-provider';
|
|
2
2
|
/**
|
|
3
3
|
* machines.ts — request client for `/api/machines`.
|
|
4
4
|
*
|
|
@@ -79,6 +79,13 @@ export interface MachineHarnessRow {
|
|
|
79
79
|
reconnecting?: boolean;
|
|
80
80
|
/** How long ago the connection closed, in ms. Present with `reconnecting`. */
|
|
81
81
|
disconnectedForMs?: number;
|
|
82
|
+
/**
|
|
83
|
+
* Whether this harness can run a turn on its own sign-in, and the command when
|
|
84
|
+
* it cannot (OSK-24457): the server's `deriveHarnessSignIn` view, present only
|
|
85
|
+
* where it applies (Claude Code or Codex on a Dedicated Runtime). Absent means
|
|
86
|
+
* there is nothing to say, never "signed in".
|
|
87
|
+
*/
|
|
88
|
+
signIn?: HarnessSignInView;
|
|
82
89
|
}
|
|
83
90
|
/**
|
|
84
91
|
* What a machine's heartbeats say, apart from what its rows are recorded as
|
|
@@ -294,6 +301,16 @@ export interface MachineListView extends Machine {
|
|
|
294
301
|
* registrations that still stand and says how many it left out; `--all` keeps
|
|
295
302
|
* everything.
|
|
296
303
|
*/
|
|
304
|
+
/**
|
|
305
|
+
* The lines `skrr machines list` prints under its table for harnesses that cannot
|
|
306
|
+
* be shown as signed in (OSK-24457): one that needs its owner's sign-in, and one
|
|
307
|
+
* whose state its daemon did not report, each with the command that signs it in.
|
|
308
|
+
* A signed-in or platform-run harness needs no line. The words are the server's
|
|
309
|
+
* view (`signIn.label`, `signIn.command`), so every surface says the same thing.
|
|
310
|
+
*/
|
|
311
|
+
export declare function harnessSignInNotes(machines: ReadonlyArray<Pick<Machine, 'name' | 'preferences'> & {
|
|
312
|
+
harnesses: readonly MachineHarnessRow[];
|
|
313
|
+
}>): string[];
|
|
297
314
|
export declare function machineListView(machine: Machine, options: {
|
|
298
315
|
all: boolean;
|
|
299
316
|
hardwareMachineUuid: string;
|
package/dist/lib/machines.js
CHANGED
|
@@ -11,6 +11,7 @@ exports.summarizeMachineProfiles = summarizeMachineProfiles;
|
|
|
11
11
|
exports.harnessStateLabel = harnessStateLabel;
|
|
12
12
|
exports.summarizeDaemons = summarizeDaemons;
|
|
13
13
|
exports.isThisComputer = isThisComputer;
|
|
14
|
+
exports.harnessSignInNotes = harnessSignInNotes;
|
|
14
15
|
exports.machineListView = machineListView;
|
|
15
16
|
exports.parseMachineIconFlag = parseMachineIconFlag;
|
|
16
17
|
exports.describeMachineIcon = describeMachineIcon;
|
|
@@ -45,7 +46,10 @@ function machineStateLabel(machine) {
|
|
|
45
46
|
// (OSK-16442).
|
|
46
47
|
if (machine.status === 'degraded') {
|
|
47
48
|
const contact = machine.contact?.state;
|
|
48
|
-
if (contact === 'stale' ||
|
|
49
|
+
if (contact === 'stale' ||
|
|
50
|
+
contact === 'reconnecting' ||
|
|
51
|
+
contact === 'unconfirmed' ||
|
|
52
|
+
contact === 'unknown')
|
|
49
53
|
return data_provider_1.DAEMON_CONTACT_WORDS[contact];
|
|
50
54
|
}
|
|
51
55
|
if (machine.status !== 'offline')
|
|
@@ -144,7 +148,14 @@ function newerStamp(a, b) {
|
|
|
144
148
|
return a;
|
|
145
149
|
return new Date(b).getTime() > new Date(a).getTime() ? b : a;
|
|
146
150
|
}
|
|
147
|
-
const RANK = {
|
|
151
|
+
const RANK = {
|
|
152
|
+
online: 0,
|
|
153
|
+
reconnecting: 1,
|
|
154
|
+
unconfirmed: 2,
|
|
155
|
+
unknown: 3,
|
|
156
|
+
stale: 4,
|
|
157
|
+
offline: 5,
|
|
158
|
+
};
|
|
148
159
|
/** The profile a harness row belongs to: the server's field, else the one its legacy daemon id names. */
|
|
149
160
|
function harnessProfileOf(row) {
|
|
150
161
|
if (row.profile)
|
|
@@ -253,6 +264,28 @@ function isThisComputer(machine, hardwareMachineUuid) {
|
|
|
253
264
|
* registrations that still stand and says how many it left out; `--all` keeps
|
|
254
265
|
* everything.
|
|
255
266
|
*/
|
|
267
|
+
/**
|
|
268
|
+
* The lines `skrr machines list` prints under its table for harnesses that cannot
|
|
269
|
+
* be shown as signed in (OSK-24457): one that needs its owner's sign-in, and one
|
|
270
|
+
* whose state its daemon did not report, each with the command that signs it in.
|
|
271
|
+
* A signed-in or platform-run harness needs no line. The words are the server's
|
|
272
|
+
* view (`signIn.label`, `signIn.command`), so every surface says the same thing.
|
|
273
|
+
*/
|
|
274
|
+
function harnessSignInNotes(machines) {
|
|
275
|
+
const lines = [];
|
|
276
|
+
for (const machine of machines) {
|
|
277
|
+
const machineName = machine.preferences?.name || machine.name;
|
|
278
|
+
for (const row of machine.harnesses) {
|
|
279
|
+
const signIn = row.signIn;
|
|
280
|
+
if (!signIn?.applies || !signIn.command)
|
|
281
|
+
continue;
|
|
282
|
+
if (signIn.state !== 'needs_sign_in' && signIn.state !== 'unknown')
|
|
283
|
+
continue;
|
|
284
|
+
lines.push(` ${machineName}: ${row.name} — ${signIn.label}. Sign in with \`${signIn.command}\`.`);
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
return lines;
|
|
288
|
+
}
|
|
256
289
|
function machineListView(machine, options) {
|
|
257
290
|
const rows = machine.harnesses ?? [];
|
|
258
291
|
const daemons = summarizeDaemons(rows, options.activeProfile);
|