@bli-cockpit/mcp 0.1.51 → 0.1.52

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
@@ -59,7 +59,7 @@ three tables below.
59
59
  | `cockpit cal week` | `cal_week` | `GET /api/cal/week` |
60
60
  | `cockpit careers decide` | `careers_decide` | `POST /api/careers/applications/[id]/decide` |
61
61
  | `cockpit careers grade` | `careers_grade` | `POST /api/careers/applications/[id]/grade` |
62
- | `cockpit careers invite` | `careers_invite` | `POST /api/careers/applications/[id]/invite` |
62
+ | `cockpit careers send-takehome` | `careers_send_takehome` | `POST /api/careers/applications/[id]/invite` |
63
63
  | `cockpit careers list` | `careers_list` | `GET /api/careers/applications` |
64
64
  | `cockpit careers rescreen` | `careers_rescreen` | `POST /api/careers/applications/[id]/rescreen` |
65
65
  | `cockpit careers settings set` | `careers_settings_set` | `PUT /api/careers/settings` |
@@ -26,14 +26,24 @@ export function registerCareersTools(server, deps) {
26
26
  const answer = await callAgentDoor(session, deps.fetchImpl, action === 'show' ? 'GET' : 'POST', `/api/careers/applications/${encodeURIComponent(String(args.id))}${action === 'rescreen' ? '/rescreen' : ''}`, undefined, 60_000);
27
27
  return answer.ok ? textResult('Application', answer.body) : errorResult(doorFailureText(`careers_${action}`, answer));
28
28
  }));
29
- register('careers_invite', {
30
- title: 'Send the take-home',
31
- description: 'Super-admin only. Sends that role\'s take-home invitation from the configured mailbox, whatever the screening scored. Only a row still at the `screened` stage; a row already invited is refused.',
32
- inputSchema: { id: z.string().uuid() },
33
- }, async (args) => withSession(deps, async (session) => {
34
- const answer = await callAgentDoor(session, deps.fetchImpl, 'POST', `/api/careers/applications/${encodeURIComponent(String(args.id))}/invite`, undefined, 60_000);
35
- return answer.ok ? textResult('Invitation sent', answer.body) : errorResult(doorFailureText('careers_invite', answer));
36
- }));
29
+ // Two names, ONE door (BLI-4460 follow-up). Tower's button says "Send
30
+ // take-home" and this tool said `invite`, so an agent reading the screen and
31
+ // an agent reading the tool list were looking for different words for the
32
+ // same act. `careers_send_takehome` is the spelling the button uses and the
33
+ // one the census and the README teach; `careers_invite` stays registered
34
+ // because anything that already learned it keeps working.
35
+ for (const [tool, description] of [
36
+ ['careers_send_takehome', 'Send the take-home invitation to one applicant (the button labelled Send take-home). Same door as careers_invite. Super-admin only. Sends that role\'s take-home from the configured mailbox, whatever the screening scored. Only a row still at the `screened` stage; a row already invited is refused.'],
37
+ ['careers_invite', 'Super-admin only. Sends that role\'s take-home invitation from the configured mailbox, whatever the screening scored. Only a row still at the `screened` stage; a row already invited is refused. The same door as careers_send_takehome, which is the name the button uses.'],
38
+ ])
39
+ register(tool, {
40
+ title: 'Send the take-home',
41
+ description,
42
+ inputSchema: { id: z.string().uuid() },
43
+ }, async (args) => withSession(deps, async (session) => {
44
+ const answer = await callAgentDoor(session, deps.fetchImpl, 'POST', `/api/careers/applications/${encodeURIComponent(String(args.id))}/invite`, undefined, 60_000);
45
+ return answer.ok ? textResult('Invitation sent', answer.body) : errorResult(doorFailureText(tool, answer));
46
+ }));
37
47
  register('careers_grade', {
38
48
  title: 'Re-queue a take-home for grading',
39
49
  description: 'Super-admin only. Puts one submitted or graded application back in the take-home grader\'s queue. The grader runs on Railway every 15 minutes because it clones a repository and reads a video; `now` is answered honestly rather than run here.',
@@ -212,7 +212,12 @@ export const MCP_TWINS = {
212
212
  "careers list": { tool: "careers_list", door: "GET /api/careers/applications" },
213
213
  "careers show": { tool: "careers_show", door: "GET /api/careers/applications/[id]" },
214
214
  "careers rescreen": { tool: "careers_rescreen", door: "POST /api/careers/applications/[id]/rescreen" },
215
- "careers invite": { tool: "careers_invite", door: "POST /api/careers/applications/[id]/invite" },
215
+ // The parser's action is `invite`; what a person types is `careers
216
+ // send-takehome`, the words on Tower's own button, and the tool is named to
217
+ // match (TYPED_SPELLING below carries that spelling into this row of the
218
+ // README). `cockpit careers invite` and `careers_invite` are the older words
219
+ // for the identical door, and both still work.
220
+ "careers invite": { tool: "careers_send_takehome", door: "POST /api/careers/applications/[id]/invite" },
216
221
  "careers decide": { tool: "careers_decide", door: "POST /api/careers/applications/[id]/decide" },
217
222
  "careers grade": { tool: "careers_grade", door: "POST /api/careers/applications/[id]/grade" },
218
223
  "careers takehome-show": { tool: "careers_takehome_show", door: "GET /api/careers/takehomes/[role]" },
@@ -350,6 +355,9 @@ export const MCP_TWINS = {
350
355
  * shorter this map is, the closer the census keys are to the product.
351
356
  */
352
357
  export const TYPED_SPELLING = {
358
+ // The action is `invite`; the button, the help wall and the docs all say
359
+ // send-takehome, so that is what a stranger is told to type.
360
+ "careers invite": "careers send-takehome",
353
361
  "careers takehome-show": "careers takehome show",
354
362
  "careers takehome-set": "careers takehome set",
355
363
  "careers settings-show": "careers settings show",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bli-cockpit/mcp",
3
- "version": "0.1.51",
3
+ "version": "0.1.52",
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",