@bli-cockpit/cli 0.2.115 → 0.2.116

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,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.115");
18
+ writeLine(io?.stdout ?? process.stdout, "0.2.116");
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), sessions_counted_by_ladder: body.people.reduce((total, person) => total + (person.sessions_counted_by_ladder ?? 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), sessions_awaiting_count: body.people.reduce((total, person) => total + (person.sessions_awaiting_count ?? 0), 0), sessions_automated_excluded: body.people.reduce((total, person) => total + (person.sessions_automated_excluded ?? 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.");
@@ -104,6 +104,14 @@ export async function runUsage(command, io) {
104
104
  writeLine(io.stdout, "");
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
+ // BLI-4356: the gap says why. A session observed with no tokens is either
108
+ // waiting on a count that has not run yet, or an automated one this view
109
+ // leaves out on purpose; never an unexplained hole in a person's week.
110
+ const waiting = body.coverage?.sessions_awaiting_count ?? 0;
111
+ const automatedExcluded = body.coverage?.sessions_automated_excluded ?? 0;
112
+ if (waiting > 0 || automatedExcluded > 0) {
113
+ writeLine(io.stdout, `${waiting} waiting on a token count, ${automatedExcluded} automated and excluded`);
114
+ }
107
115
  // BLI-4341: a session should arrive counted. This line is how a person sees
108
116
  // whether that is happening, or whether something else is doing the work.
109
117
  // BLI-4351 added the third counter: the ladder, counting out of Storage the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/cli",
3
- "version": "0.2.115",
3
+ "version": "0.2.116",
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.43",
31
+ "@bli-cockpit/mcp": "0.1.44",
32
32
  "@bli-cockpit/telemetry-core": "0.1.48"
33
33
  }
34
34
  }