@bli-cockpit/cli 0.2.164 → 0.2.165

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.
@@ -91,6 +91,8 @@ export function parseOpsArgs(args) {
91
91
  "--models",
92
92
  "--turns",
93
93
  "--tool-router",
94
+ // BLI-12507: the MCP's `people: true`. Per-device and per-person rows in --json.
95
+ "--people",
94
96
  "--person",
95
97
  "--dry-run",
96
98
  "--json",
@@ -134,6 +136,7 @@ export function parseOpsArgs(args) {
134
136
  models: values.booleans.has("--models"),
135
137
  turns: values.booleans.has("--turns"),
136
138
  toolRouter: values.booleans.has("--tool-router"),
139
+ people: values.booleans.has("--people"),
137
140
  ...(memoryDays === undefined ? {} : { memoryDays: Number(memoryDays) }),
138
141
  ...base,
139
142
  };
@@ -115,13 +115,15 @@ export const TOWER_OPS_COMMAND_HELP = [
115
115
  [
116
116
  "ops",
117
117
  [
118
- "Usage: cockpit ops [status [--job <id>] [--coverage] [--skips] [--memory [--memory-days N]] [--models] [--turns] [--tool-router] | recompile --person <email|name|id> [--dry-run]] [--json]",
118
+ "Usage: cockpit ops [status [--job <id>] [--coverage] [--skips] [--memory [--memory-days N]] [--models] [--turns] [--tool-router] [--people] | recompile --person <email|name|id> [--dry-run]] [--json]",
119
119
  "",
120
120
  " cockpit ops status",
121
121
  " One line per scheduled job: when it last produced something, and whether that",
122
122
  " is late FOR THAT JOB. A once-daily job quiet for 18 hours reads ok; a",
123
123
  " quarter-hourly one does not. Every line names the schedule it is judged against.",
124
124
  " --turns adds 30-day JARVIS turn aggregates; --tool-router adds the shadow-router agreement board.",
125
+ " --json carries the fleet and coverage SUMMARIES only (about 150 KB lighter);",
126
+ " --people --json adds every per-device and per-person row. The text board always prints them.",
125
127
  " A job that is not ok also prints what its artifact does and does not prove —",
126
128
  " several only write a row when there is something new, so quiet can mean a quiet",
127
129
  " week rather than a broken cron.",
@@ -111,14 +111,24 @@ function isUnhealthyPipeline(row) {
111
111
  }
112
112
  function writeOpsStatusOutput(command, io, payload, memory, models, turns, toolRouter) {
113
113
  if (command.json) {
114
- writeJsonOpsStatus(io, payload, memory, models, turns, toolRouter);
114
+ writeJsonOpsStatus(command.people === true, io, payload, memory, models, turns, toolRouter);
115
115
  return;
116
116
  }
117
117
  writeHumanOpsStatus(command, io, payload, memory, models, turns, toolRouter);
118
118
  }
119
- function writeJsonOpsStatus(io, payload, memory, models, turns, toolRouter) {
119
+ /** The block without its per-device / per-person rows unless `--people` asked for them. */
120
+ function summaryOnly(block, withPeople) {
121
+ if (withPeople)
122
+ return block;
123
+ const { devices: _devices, people: _people, ...rest } = block;
124
+ return rest;
125
+ }
126
+ function writeJsonOpsStatus(withPeople, io, payload, memory, models, turns, toolRouter) {
120
127
  writeLine(io.stdout, JSON.stringify({
121
128
  ...payload,
129
+ // BLI-12507: the MCP's rule, so one board reads the same on both doors.
130
+ ...(payload.fleet ? { fleet: summaryOnly(payload.fleet, withPeople) } : {}),
131
+ ...(payload.coverage ? { coverage: summaryOnly(payload.coverage, withPeople) } : {}),
122
132
  ...(memory
123
133
  ? { memory: memory.section, hooks: memory.hooks, experience: memory.experience }
124
134
  : {}),
@@ -134,6 +144,13 @@ function writeHumanOpsStatus(command, io, payload, memory, models, turns, toolRo
134
144
  })) {
135
145
  writeLine(io.stdout, line);
136
146
  }
147
+ // BLI-12507: a section the server could not read inside its budget is named
148
+ // here, never a silent gap in the board.
149
+ const unreadable = asRecord(payload)["unreadableSections"];
150
+ if (Array.isArray(unreadable) && unreadable.length > 0) {
151
+ writeLine(io.stdout, "");
152
+ writeLine(io.stdout, `NOT READ ${unreadable.join(", ")} (reader_timeout or read failure; see the Tower log)`);
153
+ }
137
154
  if (memory?.section) {
138
155
  for (const line of renderMemoryUsage(memory.section, (text) => dim(text, styled))) {
139
156
  writeLine(io.stdout, line);
@@ -195,6 +212,10 @@ function createOpsStatusReadLog(command, payload, rows, unhealthy, memory, model
195
212
  unhealthy: unhealthy.length,
196
213
  unhealthy_ids: unhealthy.map((row) => row.id ?? "?"),
197
214
  with_skips: Boolean(command.skips),
215
+ people_rows: Boolean(command.people) || !command.json ? "included" : "summary_only",
216
+ unreadable_sections: Array.isArray(asRecord(payload)["unreadableSections"])
217
+ ? asRecord(payload)["unreadableSections"]
218
+ : [],
198
219
  // The laptops (BLI-3550), counted on the same line: a run that shows a
199
220
  // green board and says nothing about the fleet cannot answer "was
200
221
  // anybody's machine dead this morning?".
@@ -21,7 +21,7 @@ export async function runCockpitCli(argv, io) {
21
21
  }
22
22
 
23
23
  if (command === "--version" || command === "-V" || command === "version") {
24
- writeLine(io?.stdout ?? process.stdout, "0.2.164");
24
+ writeLine(io?.stdout ?? process.stdout, "0.2.165");
25
25
  return 0;
26
26
  }
27
27
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/cli",
3
- "version": "0.2.164",
3
+ "version": "0.2.165",
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.45",
31
- "@bli-cockpit/mcp": "0.1.82",
31
+ "@bli-cockpit/mcp": "0.1.83",
32
32
  "@bli-cockpit/telemetry-core": "0.1.57"
33
33
  },
34
34
  "repository": {