@bli-cockpit/mcp 0.1.50 → 0.1.51
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 +3 -1
- package/dist/brief-write-tools.js +70 -0
- package/dist/verb-census.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -34,7 +34,7 @@ about what an agent can reach.
|
|
|
34
34
|
|
|
35
35
|
<!-- BEGIN GENERATED verb census — `npm run mcp:readme` -->
|
|
36
36
|
|
|
37
|
-
**
|
|
37
|
+
**103 of 108 Tower verbs have an MCP twin.**
|
|
38
38
|
Each tool goes through the SAME door its CLI verb calls, with the same
|
|
39
39
|
collector device token — never a second route and never a service-role
|
|
40
40
|
reader. `src/verb-census.test.ts` fails when a verb is in none of the
|
|
@@ -42,10 +42,12 @@ three tables below.
|
|
|
42
42
|
|
|
43
43
|
| CLI verb | MCP tool | Door |
|
|
44
44
|
| --- | --- | --- |
|
|
45
|
+
| `cockpit brief done` | `brief_done` | `POST /api/jarvis/ticks` |
|
|
45
46
|
| `cockpit brief history` | `brief_history` | `GET /api/jarvis/brief?history=1` |
|
|
46
47
|
| `cockpit brief read` | `brief_read` | `GET /api/jarvis/brief` |
|
|
47
48
|
| `cockpit brief rewrite` | `brief_rewrite` | `POST /api/jarvis/recompile` |
|
|
48
49
|
| `cockpit brief status` | `brief_status` | `GET /api/ops/brief-status` |
|
|
50
|
+
| `cockpit brief undone` | `brief_undone` | `POST /api/jarvis/ticks` |
|
|
49
51
|
| `cockpit cal calendars` | `cal_calendars` | `GET /api/cal/calendars` |
|
|
50
52
|
| `cockpit cal create` | `cal_create` | `POST /api/cal/events` |
|
|
51
53
|
| `cockpit cal detach` | `cal_detach` | `DELETE /api/cal/calendars` |
|
|
@@ -175,4 +175,74 @@ export function registerBriefWriteTools(server, deps) {
|
|
|
175
175
|
link: filed.link ?? null,
|
|
176
176
|
});
|
|
177
177
|
}));
|
|
178
|
+
// BLI-3605: the board's done checkbox. Two tools rather than one with a
|
|
179
|
+
// boolean, for the same reason the CLI has two verbs: "mark it done" and
|
|
180
|
+
// "put it back" are different intentions, and a model picking a flag wrong
|
|
181
|
+
// silently un-finishes somebody's work.
|
|
182
|
+
registerTick(register, deps, "brief_done", true);
|
|
183
|
+
registerTick(register, deps, "brief_undone", false);
|
|
184
|
+
}
|
|
185
|
+
/** The item a tick is about, in the two spellings a board row can have. */
|
|
186
|
+
const TICK_ITEM = z
|
|
187
|
+
.string()
|
|
188
|
+
.min(1)
|
|
189
|
+
.max(200)
|
|
190
|
+
.describe("The board row: a ticket exactly as the board writes it (BLI-3511), or a claim id from brief_read({claims: true}) for a row with no ticket.");
|
|
191
|
+
const TICKET_IDENTIFIER = /^[A-Z][A-Z0-9]{1,9}-\d+$/;
|
|
192
|
+
/**
|
|
193
|
+
* One tick tool. `brief_done` and `brief_undone` differ by one boolean and
|
|
194
|
+
* nothing else, so they are built once here rather than written twice.
|
|
195
|
+
*
|
|
196
|
+
* The page is read first and the item looked for in it, exactly as
|
|
197
|
+
* `brief_correct` refuses an unknown claim id before writing: a key naming
|
|
198
|
+
* nothing would sit in the table forever, ticked against a row nobody can
|
|
199
|
+
* find. There is no `subject` argument on purpose, a tick is the caller's own
|
|
200
|
+
* working state, and the door has no way to accept one for anybody else.
|
|
201
|
+
*/
|
|
202
|
+
function registerTick(register, deps, name, done) {
|
|
203
|
+
register(name, {
|
|
204
|
+
title: done
|
|
205
|
+
? "Tick one Tower DO THIS FIRST item off as done"
|
|
206
|
+
: "Put one Tower DO THIS FIRST item back on the board",
|
|
207
|
+
description: done
|
|
208
|
+
? "Marks ONE row of the daily page's DO THIS FIRST board done, the website's checkbox and `cockpit brief done`, "
|
|
209
|
+
+ "same door. A row with a ticket stays ticked across every recompile. Your own board only; a tick is private "
|
|
210
|
+
+ "working state and cannot be made on anybody else's behalf."
|
|
211
|
+
: "Takes back a tick on ONE row of the DO THIS FIRST board, `cockpit brief undone`, same door. The row goes "
|
|
212
|
+
+ "back to open. Your own board only.",
|
|
213
|
+
inputSchema: { item: TICK_ITEM },
|
|
214
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
215
|
+
const item = String(args.item ?? "").trim();
|
|
216
|
+
const page = await readPage(deps, session, new URLSearchParams({ claims: "1" }));
|
|
217
|
+
if (!page.ok)
|
|
218
|
+
return errorResult(page.text);
|
|
219
|
+
const claims = page.body.claims ?? [];
|
|
220
|
+
const isTicket = TICKET_IDENTIFIER.test(item);
|
|
221
|
+
const line = isTicket
|
|
222
|
+
? claims.find((candidate) => (candidate.text ?? "").includes(item))
|
|
223
|
+
: claims.find((candidate) => candidate.claimId === item);
|
|
224
|
+
if (!line) {
|
|
225
|
+
return errorResult(`Refused (unknown_item): nothing on your page is called “${item}”. `
|
|
226
|
+
+ "Call brief_read with `claims: true` to see the ids, or name the ticket exactly as the board writes "
|
|
227
|
+
+ "it. Nothing was recorded.");
|
|
228
|
+
}
|
|
229
|
+
const response = await callAgentDoor(session, deps.fetchImpl, "POST", "/api/jarvis/ticks", {
|
|
230
|
+
item_key: item,
|
|
231
|
+
ticket_identifier: isTicket ? item : null,
|
|
232
|
+
claim_id: line.claimId ?? null,
|
|
233
|
+
page_id: page.body.page?.pageId ?? null,
|
|
234
|
+
done,
|
|
235
|
+
}, QUEUE_DEADLINE_MS);
|
|
236
|
+
if (!response.ok)
|
|
237
|
+
return errorResult(doorFailureText(name, response));
|
|
238
|
+
const body = response.body;
|
|
239
|
+
if (!body.ok)
|
|
240
|
+
return errorResult(body.reply ?? body.error ?? "Tower did not record that.");
|
|
241
|
+
return textResult(done ? `[x] ${item} is done.` : `[ ] ${item} is back on the board.`, {
|
|
242
|
+
ok: true,
|
|
243
|
+
itemKey: body.item_key ?? item,
|
|
244
|
+
done,
|
|
245
|
+
tickedAt: body.ticked_at ?? null,
|
|
246
|
+
});
|
|
247
|
+
}));
|
|
178
248
|
}
|
package/dist/verb-census.js
CHANGED
|
@@ -261,6 +261,10 @@ export const MCP_TWINS = {
|
|
|
261
261
|
"brief history": { tool: "brief_history", door: "GET /api/jarvis/brief?history=1" },
|
|
262
262
|
"brief status": { tool: "brief_status", door: "GET /api/ops/brief-status" },
|
|
263
263
|
"brief rewrite": { tool: "brief_rewrite", door: "POST /api/jarvis/recompile" },
|
|
264
|
+
// BLI-3605: the DO THIS FIRST done checkbox. One door, two verbs, because
|
|
265
|
+
// "mark it done" and "put it back" are different intentions.
|
|
266
|
+
"brief done": { tool: "brief_done", door: "POST /api/jarvis/ticks" },
|
|
267
|
+
"brief undone": { tool: "brief_undone", door: "POST /api/jarvis/ticks" },
|
|
264
268
|
correct: { tool: "brief_correct", door: "POST /api/jarvis/corrections" },
|
|
265
269
|
"notes folders": { tool: "notes_folders", door: "GET /api/notes/folders" },
|
|
266
270
|
"notes mkdir": { tool: "notes_mkdir", door: "POST /api/notes/folders" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.51",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "bli-tower: 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",
|