@bli-cockpit/mcp 0.1.48 → 0.1.50
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 +8 -1
- package/dist/careers-tools.d.ts +10 -0
- package/dist/careers-tools.js +83 -2
- package/dist/verb-census.js +11 -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
|
+
**101 of 106 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
|
|
@@ -55,9 +55,16 @@ three tables below.
|
|
|
55
55
|
| `cockpit cal sync` | `cal_sync` | `POST /api/cal/calendars/[id]/sync` |
|
|
56
56
|
| `cockpit cal today` | `cal_today` | `GET /api/cal/today` |
|
|
57
57
|
| `cockpit cal week` | `cal_week` | `GET /api/cal/week` |
|
|
58
|
+
| `cockpit careers decide` | `careers_decide` | `POST /api/careers/applications/[id]/decide` |
|
|
59
|
+
| `cockpit careers grade` | `careers_grade` | `POST /api/careers/applications/[id]/grade` |
|
|
60
|
+
| `cockpit careers invite` | `careers_invite` | `POST /api/careers/applications/[id]/invite` |
|
|
58
61
|
| `cockpit careers list` | `careers_list` | `GET /api/careers/applications` |
|
|
59
62
|
| `cockpit careers rescreen` | `careers_rescreen` | `POST /api/careers/applications/[id]/rescreen` |
|
|
63
|
+
| `cockpit careers settings set` | `careers_settings_set` | `PUT /api/careers/settings` |
|
|
64
|
+
| `cockpit careers settings show` | `careers_settings_show` | `GET /api/careers/settings` |
|
|
60
65
|
| `cockpit careers show` | `careers_show` | `GET /api/careers/applications/[id]` |
|
|
66
|
+
| `cockpit careers takehome set` | `careers_takehome_set` | `PUT /api/careers/takehomes/[role]` |
|
|
67
|
+
| `cockpit careers takehome show` | `careers_takehome_show` | `GET /api/careers/takehomes/[role]` |
|
|
61
68
|
| `cockpit correct` | `brief_correct` | `POST /api/jarvis/corrections` |
|
|
62
69
|
| `cockpit docs create` | `docs_create` | `POST /api/docs/documents` |
|
|
63
70
|
| `cockpit docs list` | `docs_list` | `GET /api/docs/documents` |
|
package/dist/careers-tools.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
import { type ToolDeps } from './tool-result.js';
|
|
2
|
+
/**
|
|
3
|
+
* `careers_*` — the MCP twins of `cockpit careers`, over the same doors.
|
|
4
|
+
*
|
|
5
|
+
* BLI-4460 added the pipeline half: inviting, deciding, the role's take-home
|
|
6
|
+
* and the four settings. Nothing here decides policy — super_admin, the stage
|
|
7
|
+
* check and every threshold live on the server, so this surface cannot permit
|
|
8
|
+
* something the browser refuses. `careers_takehome_show` returns the RUBRIC,
|
|
9
|
+
* which is reviewer material: it is readable by a super_admin's agent and is
|
|
10
|
+
* never part of what a candidate receives.
|
|
11
|
+
*/
|
|
2
12
|
export declare function registerCareersTools(server: {
|
|
3
13
|
registerTool: (...args: never[]) => unknown;
|
|
4
14
|
}, deps: ToolDeps): void;
|
package/dist/careers-tools.js
CHANGED
|
@@ -1,11 +1,21 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { callAgentDoor } from './agent-door.js';
|
|
3
3
|
import { doorFailureText, errorResult, registrarFor, textResult, withSession } from './tool-result.js';
|
|
4
|
+
/**
|
|
5
|
+
* `careers_*` — the MCP twins of `cockpit careers`, over the same doors.
|
|
6
|
+
*
|
|
7
|
+
* BLI-4460 added the pipeline half: inviting, deciding, the role's take-home
|
|
8
|
+
* and the four settings. Nothing here decides policy — super_admin, the stage
|
|
9
|
+
* check and every threshold live on the server, so this surface cannot permit
|
|
10
|
+
* something the browser refuses. `careers_takehome_show` returns the RUBRIC,
|
|
11
|
+
* which is reviewer material: it is readable by a super_admin's agent and is
|
|
12
|
+
* never part of what a candidate receives.
|
|
13
|
+
*/
|
|
4
14
|
export function registerCareersTools(server, deps) {
|
|
5
15
|
const register = registrarFor(server);
|
|
6
|
-
register('careers_list', { title: 'List applications', description: 'Super-admin only. Newest applications, bounded to 100 with total and has_more.', inputSchema: { role: z.string().optional(), min_score: z.number().min(0).max(100).optional(), since: z.string().optional() } }, async (args) => withSession(deps, async (session) => {
|
|
16
|
+
register('careers_list', { title: 'List applications', description: 'Super-admin only. Newest applications, bounded to 100 with total and has_more, plus the two thresholds in force.', inputSchema: { role: z.string().optional(), min_score: z.number().min(0).max(100).optional(), since: z.string().optional(), stage: z.string().optional() } }, async (args) => withSession(deps, async (session) => {
|
|
7
17
|
const query = new URLSearchParams();
|
|
8
|
-
for (const key of ['role', 'min_score', 'since'])
|
|
18
|
+
for (const key of ['role', 'min_score', 'since', 'stage'])
|
|
9
19
|
if (args[key] !== undefined)
|
|
10
20
|
query.set(key, String(args[key]));
|
|
11
21
|
const answer = await callAgentDoor(session, deps.fetchImpl, 'GET', `/api/careers/applications?${query}`);
|
|
@@ -16,4 +26,75 @@ export function registerCareersTools(server, deps) {
|
|
|
16
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);
|
|
17
27
|
return answer.ok ? textResult('Application', answer.body) : errorResult(doorFailureText(`careers_${action}`, answer));
|
|
18
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
|
+
}));
|
|
37
|
+
register('careers_grade', {
|
|
38
|
+
title: 'Re-queue a take-home for grading',
|
|
39
|
+
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.',
|
|
40
|
+
inputSchema: { id: z.string().uuid(), now: z.boolean().optional() },
|
|
41
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
42
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'POST', `/api/careers/applications/${encodeURIComponent(String(args.id))}/grade`, { now: args.now === true }, 60_000);
|
|
43
|
+
return answer.ok ? textResult('Queued for grading', answer.body) : errorResult(doorFailureText('careers_grade', answer));
|
|
44
|
+
}));
|
|
45
|
+
register('careers_decide', {
|
|
46
|
+
title: 'Decide on an application',
|
|
47
|
+
description: 'Super-admin only. Records the call on one application: `passed_on`, `archived`, or `reopen` to put it back at `screened`.',
|
|
48
|
+
inputSchema: { id: z.string().uuid(), decision: z.enum(['passed_on', 'archived', 'reopen']) },
|
|
49
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
50
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'POST', `/api/careers/applications/${encodeURIComponent(String(args.id))}/decide`, { decision: args.decision });
|
|
51
|
+
return answer.ok ? textResult('Decision recorded', answer.body) : errorResult(doorFailureText('careers_decide', answer));
|
|
52
|
+
}));
|
|
53
|
+
register('careers_takehome_show', {
|
|
54
|
+
title: 'Show a role take-home',
|
|
55
|
+
description: 'Super-admin only. The subject, body, artifact link, reviewer rubric and pass score for one role. The rubric is reviewer material and never reaches a candidate.',
|
|
56
|
+
inputSchema: { role: z.string().min(1).max(200) },
|
|
57
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
58
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'GET', `/api/careers/takehomes/${encodeURIComponent(String(args.role))}`);
|
|
59
|
+
return answer.ok ? textResult('Take-home', answer.body) : errorResult(doorFailureText('careers_takehome_show', answer));
|
|
60
|
+
}));
|
|
61
|
+
register('careers_takehome_set', {
|
|
62
|
+
title: 'Edit a role take-home',
|
|
63
|
+
description: 'Super-admin only. Edits one role\'s take-home. A body must keep the {first_name} and {link} placeholders. A role nobody seeded is refused rather than created.',
|
|
64
|
+
inputSchema: {
|
|
65
|
+
role: z.string().min(1).max(200),
|
|
66
|
+
subject: z.string().min(1).max(998).optional(),
|
|
67
|
+
body_text: z.string().min(1).max(100_000).optional(),
|
|
68
|
+
artifact_link: z.string().url().max(2_000).optional(),
|
|
69
|
+
rubric_md: z.string().min(1).max(100_000).optional(),
|
|
70
|
+
pass_score: z.number().min(0).max(10).optional(),
|
|
71
|
+
},
|
|
72
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
73
|
+
const { role, ...patch } = args;
|
|
74
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'PUT', `/api/careers/takehomes/${encodeURIComponent(String(role))}`, patch);
|
|
75
|
+
return answer.ok ? textResult('Take-home saved', answer.body) : errorResult(doorFailureText('careers_takehome_set', answer));
|
|
76
|
+
}));
|
|
77
|
+
register('careers_settings_show', {
|
|
78
|
+
title: 'Show the careers settings',
|
|
79
|
+
description: 'Super-admin only. The automatic-invite bar, the attention threshold, whether automatic sending is on, and which mailbox it goes out from.',
|
|
80
|
+
inputSchema: {},
|
|
81
|
+
}, async () => withSession(deps, async (session) => {
|
|
82
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'GET', '/api/careers/settings');
|
|
83
|
+
return answer.ok ? textResult('Careers settings', answer.body) : errorResult(doorFailureText('careers_settings_show', answer));
|
|
84
|
+
}));
|
|
85
|
+
register('careers_settings_set', {
|
|
86
|
+
title: 'Change the careers settings',
|
|
87
|
+
description: 'Super-admin only. Writes any of the four careers settings. Each takes effect on the next screening, with no deploy.',
|
|
88
|
+
inputSchema: {
|
|
89
|
+
auto_invite_enabled: z.boolean().optional(),
|
|
90
|
+
auto_invite_min_score: z.number().min(0).max(100).optional(),
|
|
91
|
+
attention_min_score: z.number().min(0).max(100).optional(),
|
|
92
|
+
invite_account_id: z.string().uuid().nullable().optional(),
|
|
93
|
+
booking_link: z.string().url().max(2000).nullable().optional(),
|
|
94
|
+
grader_model: z.string().min(3).max(200).optional(),
|
|
95
|
+
},
|
|
96
|
+
}, async (args) => withSession(deps, async (session) => {
|
|
97
|
+
const answer = await callAgentDoor(session, deps.fetchImpl, 'PUT', '/api/careers/settings', args);
|
|
98
|
+
return answer.ok ? textResult('Careers settings saved', answer.body) : errorResult(doorFailureText('careers_settings_set', answer));
|
|
99
|
+
}));
|
|
19
100
|
}
|
package/dist/verb-census.js
CHANGED
|
@@ -212,6 +212,13 @@ 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" },
|
|
216
|
+
"careers decide": { tool: "careers_decide", door: "POST /api/careers/applications/[id]/decide" },
|
|
217
|
+
"careers grade": { tool: "careers_grade", door: "POST /api/careers/applications/[id]/grade" },
|
|
218
|
+
"careers takehome-show": { tool: "careers_takehome_show", door: "GET /api/careers/takehomes/[role]" },
|
|
219
|
+
"careers takehome-set": { tool: "careers_takehome_set", door: "PUT /api/careers/takehomes/[role]" },
|
|
220
|
+
"careers settings-show": { tool: "careers_settings_show", door: "GET /api/careers/settings" },
|
|
221
|
+
"careers settings-set": { tool: "careers_settings_set", door: "PUT /api/careers/settings" },
|
|
215
222
|
"usage sessions": { tool: "usage_sessions", door: "GET /api/usage/sessions" },
|
|
216
223
|
"usage people": { tool: "usage_people", door: "GET /api/usage/people" },
|
|
217
224
|
"docs list": { tool: "docs_list", door: "GET /api/docs/documents" },
|
|
@@ -339,6 +346,10 @@ export const MCP_TWINS = {
|
|
|
339
346
|
* shorter this map is, the closer the census keys are to the product.
|
|
340
347
|
*/
|
|
341
348
|
export const TYPED_SPELLING = {
|
|
349
|
+
"careers takehome-show": "careers takehome show",
|
|
350
|
+
"careers takehome-set": "careers takehome set",
|
|
351
|
+
"careers settings-show": "careers settings show",
|
|
352
|
+
"careers settings-set": "careers settings set",
|
|
342
353
|
"settings show": "settings",
|
|
343
354
|
"settings list": "settings env list",
|
|
344
355
|
"settings set": "settings switches set",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bli-cockpit/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.50",
|
|
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",
|