@bli-cockpit/mcp 0.1.14 → 0.1.16

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/README.md CHANGED
@@ -134,6 +134,9 @@ A claim about the verb's nature, not a backlog.
134
134
 
135
135
  <!-- END GENERATED verb census -->
136
136
 
137
+ For memory adoption and ordinary hook measurements, use `cockpit ops --memory`
138
+ or `ops_status` with `memory: true`. Both also read `GET /api/ops/memory-usage`.
139
+
137
140
  ## `jarvis_*` tools (BLI-3732)
138
141
 
139
142
  JARVIS itself — the same assistant Tower web chat, the Slack DM and
package/dist/cal-tools.js CHANGED
@@ -42,8 +42,9 @@ function localZone() {
42
42
  }
43
43
  }
44
44
  function eventLine(event) {
45
+ const days = Math.max(1, Math.round((Date.parse(event.ends_at) - Date.parse(event.starts_at)) / 86_400_000));
45
46
  const when = event.all_day
46
- ? `${event.starts_at.slice(0, 10)} (all day)`
47
+ ? `${event.starts_at.slice(0, 10)} (all day${days > 1 ? ` ×${days}d` : ""})`
47
48
  : `${event.starts_at.slice(0, 16).replace("T", " ")}–${event.ends_at.slice(11, 16)}`;
48
49
  const where = event.location ? ` @ ${event.location}` : "";
49
50
  const who = event.attendee_count > 0 ? ` (${event.attendee_count} attendees)` : "";
@@ -181,6 +182,7 @@ export function registerCalTools(server, deps) {
181
182
  all_day: z.boolean().optional(),
182
183
  time_zone: z.string().min(1).max(80).optional(),
183
184
  attendees: z.array(z.string().email()).max(100).optional(),
185
+ meet: z.boolean().optional().describe("Attach a Google Meet room (BLI-3810). If Google refuses, the event is still created and the answer says meet_not_available."),
184
186
  confirm: CONFIRM_INPUT,
185
187
  },
186
188
  }, async (args) => withSession(deps, async (session) => {
@@ -195,13 +197,19 @@ export function registerCalTools(server, deps) {
195
197
  ...(args.location ? { location: args.location } : {}),
196
198
  ...(args.all_day === true ? { all_day: true } : {}),
197
199
  ...(Array.isArray(args.attendees) && args.attendees.length > 0 ? { attendees: args.attendees } : {}),
200
+ ...(args.meet === true ? { meet: true } : {}),
198
201
  time_zone: args.time_zone ?? localZone(),
199
202
  });
200
203
  if (!response.ok)
201
204
  return errorResult(doorFailureText("cal_create", response));
202
205
  const event = response.body.event;
203
206
  return textResult(`Created "${event?.title ?? String(args.title)}" at ${event?.starts_at ?? String(args.starts_at)}.`
204
- + (event?.html_link ? `\n${event.html_link}` : ""), { event });
207
+ + (event?.html_link ? `\n${event.html_link}` : "")
208
+ + (args.meet === true
209
+ ? event?.meet_link
210
+ ? `\nGoogle Meet: ${event.meet_link}`
211
+ : "\nGoogle did not attach a Meet room (meet_not_available); the event exists without one."
212
+ : ""), { event });
205
213
  }));
206
214
  register("cal_share", {
207
215
  title: "Share a calendar with the org, or take it back",
package/dist/ops-tools.js CHANGED
@@ -56,6 +56,7 @@ export function registerOpsTools(server, deps) {
56
56
  inputSchema: {
57
57
  job: z.string().min(1).max(100).optional().describe("One pipeline id instead of the whole board."),
58
58
  skips: z.boolean().optional().describe("Also return the open ingest-skip ledgers."),
59
+ memory: z.boolean().optional().describe("Also return memory adoption and observed prompt-hook outcomes, delay bounds and cache reuse. No memory text."),
59
60
  },
60
61
  }, async (args) => withSession(deps, async (session) => {
61
62
  const params = new URLSearchParams();
@@ -72,16 +73,30 @@ export function registerOpsTools(server, deps) {
72
73
  const lines = rows
73
74
  .map((row) => `${(row.verdict ?? "?").padEnd(14)} ${row.id ?? "?"} ${row.detail ?? row.label ?? ""}`.trimEnd())
74
75
  .join("\n");
76
+ const memory = args.memory
77
+ ? await callAgentDoor(session, deps.fetchImpl, "GET", "/api/ops/memory-usage") : null;
78
+ if (memory && !memory.ok)
79
+ return errorResult(doorFailureText("ops_status memory", memory));
80
+ const hooks = memory?.ok ? asRecord(memory.body.hooks) : null;
81
+ const memoryLines = hooks && Array.isArray(hooks.devices)
82
+ ? hooks.devices.map((device) => {
83
+ const row = asRecord(device);
84
+ return [row.line, row.performanceLine].filter((line) => typeof line === "string").join("\n");
85
+ }).join("\n") : "";
75
86
  // Both branches say something. A board that is entirely green and
76
87
  // reports nothing cannot answer "did anybody look today?".
77
88
  return textResult(`${rows.length} pipeline(s), ${unhealthy.length} unhealthy`
78
89
  + `${unhealthy.length > 0 ? `: ${unhealthy.map((row) => row.id ?? "?").join(", ")}` : "."}`
79
- + `${lines ? `\n${lines}` : ""}`, {
90
+ + `${lines ? `\n${lines}` : ""}`
91
+ + `${memoryLines ? `\n${memoryLines}` : ""}`,
92
+ // The API owns the wording and the timing boundary on every surface.
93
+ {
80
94
  pipelines: rows,
81
95
  unhealthy: unhealthy.map((row) => row.id ?? "?"),
82
96
  ...(body.fleet ? { fleet: body.fleet } : {}),
83
97
  ...(body.coverage ? { coverage: body.coverage } : {}),
84
98
  ...(body.skips ? { skips: body.skips } : {}),
99
+ ...(memory?.ok ? { memory: memory.body.memory, hooks: memory.body.hooks } : {}),
85
100
  });
86
101
  }));
87
102
  register("slack_coverage", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/mcp",
3
- "version": "0.1.14",
3
+ "version": "0.1.16",
4
4
  "private": false,
5
5
  "description": "bli-tower \u2014 an MCP server over BLI Cockpit's agent doors: JARVIS (jarvis_*), documents (docs_*), channels (msg_*), issues (work_*), the daily page (brief_*), meeting notes (notes_*), the ops board (ops_status/slack_*), settings/team/model, Scout and the workbook, plus the legacy event-stream tools (emit_event, get_ticket_timeline, get_active_tickets).",
6
6
  "type": "module",
@@ -30,7 +30,7 @@
30
30
  "readme": "npm run build && node scripts/write-readme-census.mjs"
31
31
  },
32
32
  "dependencies": {
33
- "@bli-cockpit/telemetry-core": "0.1.32",
33
+ "@bli-cockpit/telemetry-core": "0.1.33",
34
34
  "@modelcontextprotocol/sdk": "^1.29.0",
35
35
  "zod": "^4.3.6"
36
36
  },