@bli-cockpit/cli 0.2.89 → 0.2.90
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/commands/models.js
CHANGED
|
@@ -6,11 +6,18 @@
|
|
|
6
6
|
* tokens/s and last probe verdict, and a `STALE:<field>` mark wherever the two
|
|
7
7
|
* disagree — with the command that fixes it on the next line.
|
|
8
8
|
*
|
|
9
|
+
* `models show <id>` asks the same door for the SIX SECTIONS (BLI-3918) —
|
|
10
|
+
* what's going on, what's wrong, what's right, what should we do, double down,
|
|
11
|
+
* forget about it — so a terminal reads the model page a browser reads, in the
|
|
12
|
+
* same order, including today's spend and the `stale:<field>` markers.
|
|
13
|
+
*
|
|
9
14
|
* **Every line comes from the server** (`/api/models/cards`, rendered by
|
|
10
|
-
* `lib/models/model-lines.ts`). This file decides an
|
|
11
|
-
* else. A terminal that formatted a card itself would
|
|
12
|
-
* the board about what "stale" means, and the one that
|
|
13
|
-
* one somebody is reading.
|
|
15
|
+
* `lib/models/model-lines.ts` and `card-section-lines.ts`). This file decides an
|
|
16
|
+
* exit code and nothing else. A terminal that formatted a card itself would
|
|
17
|
+
* eventually disagree with the board about what "stale" means, and the one that
|
|
18
|
+
* is wrong is always the one somebody is reading. A server that has not shipped
|
|
19
|
+
* the sections yet sends no `section_lines`, and the whole-card `lines` are
|
|
20
|
+
* printed instead — never an empty screen.
|
|
14
21
|
*
|
|
15
22
|
* **Exit codes.** Zero when the shelf was read, whatever it says — a stale card
|
|
16
23
|
* is a fact to act on, not a broken command. One when the read failed or when a
|
|
@@ -26,7 +33,7 @@ export async function runModels(command, io) {
|
|
|
26
33
|
const dashboardUrl = command.dashboardUrl ?? session.dashboard_url;
|
|
27
34
|
const log = (line) => writeLine(io.stderr, line);
|
|
28
35
|
const path = command.action === "show" && command.modelId
|
|
29
|
-
? `/api/models/cards?id=${encodeURIComponent(command.modelId)}`
|
|
36
|
+
? `/api/models/cards?id=${encodeURIComponent(command.modelId)}§ions=1`
|
|
30
37
|
: "/api/models/cards";
|
|
31
38
|
const result = await towerJsonRequest({
|
|
32
39
|
dashboardUrl,
|
|
@@ -47,7 +54,8 @@ export async function runModels(command, io) {
|
|
|
47
54
|
writeLine(io.stdout, JSON.stringify({ ok: true, ...payload }));
|
|
48
55
|
}
|
|
49
56
|
else {
|
|
50
|
-
|
|
57
|
+
const lines = payload.section_lines?.length ? payload.section_lines : (payload.lines ?? []);
|
|
58
|
+
for (const line of lines)
|
|
51
59
|
writeLine(io.stdout, line);
|
|
52
60
|
}
|
|
53
61
|
// Never silent about a card the server could not read: a shelf quietly one
|
|
@@ -59,6 +67,7 @@ export async function runModels(command, io) {
|
|
|
59
67
|
action: command.action,
|
|
60
68
|
model: command.modelId ?? null,
|
|
61
69
|
cards: Array.isArray(payload.cards) ? payload.cards.length : payload.card ? 1 : 0,
|
|
70
|
+
sections: payload.section_lines?.length ? "server" : "absent",
|
|
62
71
|
unreadable: payload.unreadable?.length ?? 0,
|
|
63
72
|
})}`);
|
|
64
73
|
return 0;
|
|
@@ -15,7 +15,7 @@ export async function runCockpitCli(argv, io) {
|
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
if (command === "--version" || command === "-V" || command === "version") {
|
|
18
|
-
writeLine(io?.stdout ?? process.stdout, "0.2.
|
|
18
|
+
writeLine(io?.stdout ?? process.stdout, "0.2.90");
|
|
19
19
|
return 0;
|
|
20
20
|
}
|
|
21
21
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.90",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@bli-cockpit/memory-mcp": "0.1.20",
|
|
31
|
-
"@bli-cockpit/mcp": "0.1.
|
|
31
|
+
"@bli-cockpit/mcp": "0.1.23",
|
|
32
32
|
"@bli-cockpit/telemetry-core": "0.1.37"
|
|
33
33
|
}
|
|
34
34
|
}
|