@bli-cockpit/cli 0.2.114 → 0.2.115

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.
@@ -15,9 +15,22 @@ export function renderLadder(ladder, dim) {
15
15
  }
16
16
  if (reasons.length > 8)
17
17
  lines.push(dim(` ${reasons.length - 8} more reasons not shown`));
18
+ // BLI-4343: deferred is its OWN count. A row waiting on a corpus pass is
19
+ // pending and not stuck, and the two look identical without this line.
20
+ if ((ladder.deferred ?? 0) > 0) {
21
+ const soonest = ladder.soonest_defer_until;
22
+ const when = typeof soonest === "string" ? `, soonest retry ${soonest}` : "";
23
+ lines.push(dim(` ${ladder.deferred} row(s) deferred, waiting on another pass${when}`));
24
+ }
18
25
  if ((ladder.stale_leases ?? 0) > 0) {
19
26
  lines.push(dim(` ${ladder.stale_leases} stale lease(s) waiting to be taken over`));
20
27
  }
28
+ // BLI-4352: work no rung status can show. A session whose four rungs all
29
+ // succeeded can still be carrying the old token-weight session label, and
30
+ // the re-label run is steered by this number.
31
+ if ((ladder.labels_v1_remaining ?? 0) > 0) {
32
+ lines.push(dim(` ${ladder.labels_v1_remaining} session label(s) still on the old provenance`));
33
+ }
21
34
  if (ladder.oldest_pending_session_id) {
22
35
  lines.push(dim(` oldest pending session ${ladder.oldest_pending_session_id}`));
23
36
  }
@@ -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.114");
18
+ writeLine(io?.stdout ?? process.stdout, "0.2.115");
19
19
  return 0;
20
20
  }
21
21
 
@@ -43,7 +43,7 @@ export async function runUsage(command, io) {
43
43
  if (!email)
44
44
  return failAgentDoor(door, "[usage]", "caller_email_unavailable", "The paired session has no email. Sign in again or pass --person <email>.");
45
45
  body.people = (body.people ?? []).filter((person) => person.email?.toLowerCase() === email.toLowerCase());
46
- body.coverage = { sessions_labelled: body.people.reduce((total, person) => total + (person.sessions_labelled ?? 0), 0), sessions_extracted: body.people.reduce((total, person) => total + person.sessions_extracted, 0), sessions_observed: body.people.reduce((total, person) => total + person.sessions_observed, 0), sessions_counted_at_upload: body.people.reduce((total, person) => total + (person.sessions_counted_at_upload ?? 0), 0), sessions_counted_by_server: body.people.reduce((total, person) => total + (person.sessions_counted_by_server ?? 0), 0) };
46
+ body.coverage = { sessions_labelled: body.people.reduce((total, person) => total + (person.sessions_labelled ?? 0), 0), sessions_extracted: body.people.reduce((total, person) => total + person.sessions_extracted, 0), sessions_observed: body.people.reduce((total, person) => total + person.sessions_observed, 0), sessions_counted_at_upload: body.people.reduce((total, person) => total + (person.sessions_counted_at_upload ?? 0), 0), sessions_counted_by_server: body.people.reduce((total, person) => total + (person.sessions_counted_by_server ?? 0), 0), sessions_counted_by_ladder: body.people.reduce((total, person) => total + (person.sessions_counted_by_ladder ?? 0), 0) };
47
47
  }
48
48
  if (command.byRepo && body.people?.some((person) => !Array.isArray(person.repos))) {
49
49
  return failAgentDoor(door, "[usage]", "repo_grouping_unavailable", "The dashboard returned person totals without project rows. Deploy the dashboard project split before using --by-repo.");
@@ -105,8 +105,10 @@ export async function runUsage(command, io) {
105
105
  writeLine(io.stdout, body.api_list_price_equivalent_label ?? "API list-price equivalent (not actual spend)");
106
106
  writeLine(io.stdout, `${body.coverage?.sessions_extracted ?? 0} of ${body.coverage?.sessions_observed ?? 0} sessions extracted`);
107
107
  // BLI-4341: a session should arrive counted. This line is how a person sees
108
- // whether that is happening, or whether the server is still doing the work.
109
- writeLine(io.stdout, `${body.coverage?.sessions_counted_at_upload ?? 0} of ${body.coverage?.sessions_observed ?? 0} sessions counted at upload, ${body.coverage?.sessions_counted_by_server ?? 0} by server backfill`);
108
+ // whether that is happening, or whether something else is doing the work.
109
+ // BLI-4351 added the third counter: the ladder, counting out of Storage the
110
+ // sessions that arrived before the collector counted anything.
111
+ writeLine(io.stdout, `${body.coverage?.sessions_counted_at_upload ?? 0} of ${body.coverage?.sessions_observed ?? 0} sessions counted at upload, ${body.coverage?.sessions_counted_by_server ?? 0} by server backfill, ${body.coverage?.sessions_counted_by_ladder ?? 0} by the ladder`);
110
112
  if (command.bySubject)
111
113
  writeLine(io.stdout, `${(body.people ?? []).reduce((n, person) => n + (person.sessions_summarized ?? 0), 0)} of ${body.coverage?.sessions_observed ?? 0} sessions summarized`);
112
114
  if (command.byTopic)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/cli",
3
- "version": "0.2.114",
3
+ "version": "0.2.115",
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.32",
31
- "@bli-cockpit/mcp": "0.1.42",
31
+ "@bli-cockpit/mcp": "0.1.43",
32
32
  "@bli-cockpit/telemetry-core": "0.1.48"
33
33
  }
34
34
  }