@hearsay-tools/squawk 0.18.0-dev.8597 → 0.18.0-dev.8613
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/dist/automations/tools.d.ts +8 -8
- package/dist/features/mcp/cli.d.ts +14 -0
- package/dist/features/mcp/cli.js +87 -0
- package/dist/features/mcp/cli.js.map +1 -0
- package/dist/features/mcp/index.d.ts +9 -0
- package/dist/features/mcp/index.js +13 -0
- package/dist/features/mcp/index.js.map +1 -0
- package/dist/features/mcp/stdio.d.ts +10 -0
- package/dist/features/mcp/stdio.js +41 -0
- package/dist/features/mcp/stdio.js.map +1 -0
- package/dist/features/mcp/tools.d.ts +19 -0
- package/dist/features/mcp/tools.js +476 -0
- package/dist/features/mcp/tools.js.map +1 -0
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/models-routes.d.ts +12 -12
- package/dist/server/providers-routes.d.ts +57 -57
- package/dist/server/repo-routes.d.ts +34 -34
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/runs-routes.d.ts +31 -31
- package/dist/server/server.d.ts +1596 -1596
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/server/workspace-routes.d.ts +84 -84
- package/dist/task-cli/cli.js +54 -221
- package/dist/task-cli/cli.js.map +1 -1
- package/dist/task-cli/discovery.d.ts +22 -1
- package/dist/task-cli/discovery.js +69 -17
- package/dist/task-cli/discovery.js.map +1 -1
- package/dist/task-cli/http.d.ts +15 -13
- package/dist/task-cli/http.js +16 -6
- package/dist/task-cli/http.js.map +1 -1
- package/dist/task-cli/operations.d.ts +156 -0
- package/dist/task-cli/operations.js +388 -0
- package/dist/task-cli/operations.js.map +1 -0
- package/dist/task-cli/watch.d.ts +31 -8
- package/dist/task-cli/watch.js +159 -91
- package/dist/task-cli/watch.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,476 @@
|
|
|
1
|
+
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
2
|
+
import { CallToolRequestSchema, ListToolsRequestSchema } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
import { runStatusSchema } from '../../contract/index.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
import { TaskCliError } from '../../task-cli/http.js';
|
|
6
|
+
import { archiveTask, DEFAULT_DIFF_MAX_CHARS, DEFAULT_HANDOFF_MAX_CHARS, finishTask, getTaskDiff, getTaskLog, getTaskStatus, listAllProjectsTasks, listProjects, listTasks, resolveProjectCockpit, sendTaskMessage, startTask, stopTask, waitForTasks, } from '../../task-cli/operations.js';
|
|
7
|
+
const TASK_TEXT_MAX_CHARS = 100_000;
|
|
8
|
+
const MAX_BOUNDED_CHARS = 200_000;
|
|
9
|
+
const MAX_LOG_CHARS = 1_000_000;
|
|
10
|
+
const DEFAULT_WAIT_TIMEOUT_SECONDS = 120;
|
|
11
|
+
const MAX_WAIT_TIMEOUT_SECONDS = 1_800;
|
|
12
|
+
const DEFAULT_HEARTBEAT_MS = 15_000;
|
|
13
|
+
const STATUS_LIST = runStatusSchema.options.join(', ');
|
|
14
|
+
export const MCP_SERVER_NAME = 'squawk';
|
|
15
|
+
export const MCP_SERVER_INSTRUCTIONS = [
|
|
16
|
+
'Squawk MCP server — manage coding agent tasks on a running Squawk cockpit.',
|
|
17
|
+
'1. Call project_list first to discover registered project IDs.',
|
|
18
|
+
'2. Pass `project` explicitly to every task_* tool (`task_list` also accepts "all"). There is no default project.',
|
|
19
|
+
'3. Read `attention` and `attentionLabel` (derived by the cockpit) to see when a task needs input:',
|
|
20
|
+
' - `waiting` ("needs you" / "needs review"), `error`, or `permission` means the task needs you.',
|
|
21
|
+
' - `running` ("waiting for CI", "waiting for merge", "monitoring") or `none` ("waiting on N workers", usage-limit hold) means the task is still progressing on its own.',
|
|
22
|
+
'4. Use task_wait (default mode "any", until "attention") to wait efficiently without tight polling.',
|
|
23
|
+
].join('\n');
|
|
24
|
+
const nonEmptyString = z.string().trim().min(1);
|
|
25
|
+
const boundedText = z.string().refine((value) => value.trim().length > 0, 'must not be empty').pipe(z.string().max(TASK_TEXT_MAX_CHARS));
|
|
26
|
+
const projectListInputSchema = z.object({}).strict();
|
|
27
|
+
const taskStartInputSchema = z.object({
|
|
28
|
+
project: nonEmptyString,
|
|
29
|
+
task: boundedText,
|
|
30
|
+
requestId: nonEmptyString.optional(),
|
|
31
|
+
workflow: nonEmptyString.optional(),
|
|
32
|
+
skill: nonEmptyString.optional(),
|
|
33
|
+
runner: nonEmptyString.optional(),
|
|
34
|
+
model: nonEmptyString.optional(),
|
|
35
|
+
effort: nonEmptyString.optional(),
|
|
36
|
+
autonomous: z.boolean().optional(),
|
|
37
|
+
worktree: z.boolean().optional(),
|
|
38
|
+
allowWorkers: z.boolean().optional(),
|
|
39
|
+
allowMessaging: z.boolean().optional(),
|
|
40
|
+
archiveWhenDone: z.boolean().optional(),
|
|
41
|
+
autoMergePr: z.boolean().optional(),
|
|
42
|
+
}).strict();
|
|
43
|
+
const taskSendInputSchema = z.object({
|
|
44
|
+
project: nonEmptyString,
|
|
45
|
+
id: nonEmptyString,
|
|
46
|
+
text: boundedText,
|
|
47
|
+
resume: z.boolean().optional(),
|
|
48
|
+
}).strict();
|
|
49
|
+
const taskStatusInputSchema = z.object({
|
|
50
|
+
project: nonEmptyString,
|
|
51
|
+
id: nonEmptyString,
|
|
52
|
+
full: z.boolean().optional(),
|
|
53
|
+
includeHandoff: z.boolean().optional(),
|
|
54
|
+
maxChars: z.number().int().min(1).max(MAX_BOUNDED_CHARS).optional(),
|
|
55
|
+
}).strict();
|
|
56
|
+
const taskLogInputSchema = z.object({
|
|
57
|
+
project: nonEmptyString,
|
|
58
|
+
id: nonEmptyString,
|
|
59
|
+
since: z.number().int().min(0).optional(),
|
|
60
|
+
maxChars: z.number().int().min(1).max(MAX_LOG_CHARS).optional(),
|
|
61
|
+
}).strict();
|
|
62
|
+
const taskDiffInputSchema = z.object({
|
|
63
|
+
project: nonEmptyString,
|
|
64
|
+
id: nonEmptyString,
|
|
65
|
+
stat: z.boolean().optional(),
|
|
66
|
+
maxChars: z.number().int().min(1).max(MAX_BOUNDED_CHARS).optional(),
|
|
67
|
+
}).strict();
|
|
68
|
+
const taskWaitInputSchema = z.object({
|
|
69
|
+
project: nonEmptyString,
|
|
70
|
+
ids: z.array(nonEmptyString).min(1).max(32),
|
|
71
|
+
mode: z.enum(['any', 'all']).optional(),
|
|
72
|
+
until: z.enum(['attention', 'settled']).optional(),
|
|
73
|
+
timeoutSeconds: z.number().int().min(1).max(MAX_WAIT_TIMEOUT_SECONDS).optional(),
|
|
74
|
+
}).strict();
|
|
75
|
+
const taskIdInputSchema = z.object({
|
|
76
|
+
project: nonEmptyString,
|
|
77
|
+
id: nonEmptyString,
|
|
78
|
+
}).strict();
|
|
79
|
+
const taskListInputSchema = z.object({
|
|
80
|
+
project: nonEmptyString,
|
|
81
|
+
status: z.union([z.string(), z.array(runStatusSchema)]).optional(),
|
|
82
|
+
limit: z.number().int().min(1).max(200).optional(),
|
|
83
|
+
all: z.boolean().optional(),
|
|
84
|
+
full: z.boolean().optional(),
|
|
85
|
+
}).strict();
|
|
86
|
+
function parseStatusFilter(value) {
|
|
87
|
+
if (value === undefined)
|
|
88
|
+
return undefined;
|
|
89
|
+
const entries = typeof value === 'string'
|
|
90
|
+
? value.split(',').map((item) => item.trim()).filter(Boolean)
|
|
91
|
+
: [...value];
|
|
92
|
+
if (entries.length === 0)
|
|
93
|
+
return undefined;
|
|
94
|
+
const invalid = entries.find((item) => !runStatusSchema.safeParse(item).success);
|
|
95
|
+
if (invalid) {
|
|
96
|
+
throw new TaskCliError(64, { code: 'invalid_input', error: `unknown status '${invalid}'; one of ${STATUS_LIST}` });
|
|
97
|
+
}
|
|
98
|
+
return new Set(entries);
|
|
99
|
+
}
|
|
100
|
+
const PROJECT_PROP = { type: 'string', minLength: 1, description: 'Registered project ID from project_list (required; no default project).' };
|
|
101
|
+
const TASK_ID_PROP = { type: 'string', minLength: 1, description: 'Task run ID.' };
|
|
102
|
+
async function invokeTaskStart(rawArgs, ctx) {
|
|
103
|
+
const args = taskStartInputSchema.parse(rawArgs ?? {});
|
|
104
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
105
|
+
const started = await startTask(cockpit, {
|
|
106
|
+
task: args.task,
|
|
107
|
+
requestId: args.requestId,
|
|
108
|
+
workflow: args.workflow,
|
|
109
|
+
skill: args.skill,
|
|
110
|
+
runner: args.runner,
|
|
111
|
+
model: args.model,
|
|
112
|
+
effort: args.effort,
|
|
113
|
+
autonomous: args.autonomous,
|
|
114
|
+
worktree: args.worktree,
|
|
115
|
+
allowWorkers: args.allowWorkers,
|
|
116
|
+
allowMessaging: args.allowMessaging,
|
|
117
|
+
archiveWhenDone: args.archiveWhenDone,
|
|
118
|
+
autoMergePr: args.autoMergePr,
|
|
119
|
+
signal: ctx.signal,
|
|
120
|
+
});
|
|
121
|
+
return {
|
|
122
|
+
id: started.id,
|
|
123
|
+
project: cockpit.projectId,
|
|
124
|
+
status: started.status,
|
|
125
|
+
created: started.created,
|
|
126
|
+
requestId: started.requestId,
|
|
127
|
+
...(started.branch !== undefined ? { branch: started.branch } : {}),
|
|
128
|
+
url: started.url,
|
|
129
|
+
...(started.warning !== undefined ? { warning: started.warning } : {}),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function idActionTool(name, description, run) {
|
|
133
|
+
return {
|
|
134
|
+
definition: {
|
|
135
|
+
name,
|
|
136
|
+
description,
|
|
137
|
+
inputSchema: {
|
|
138
|
+
type: 'object',
|
|
139
|
+
required: ['project', 'id'],
|
|
140
|
+
additionalProperties: false,
|
|
141
|
+
properties: { project: PROJECT_PROP, id: TASK_ID_PROP },
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
invoke: async (rawArgs, ctx) => {
|
|
145
|
+
const args = taskIdInputSchema.parse(rawArgs ?? {});
|
|
146
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
147
|
+
const result = await run(cockpit, args.id, ctx.signal);
|
|
148
|
+
return { project: cockpit.projectId, ...result };
|
|
149
|
+
},
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
const TOOLS = [
|
|
153
|
+
{
|
|
154
|
+
definition: {
|
|
155
|
+
name: 'project_list',
|
|
156
|
+
description: 'List registered projects on the Squawk cockpit. Call this first to get valid project IDs for task_* tools.',
|
|
157
|
+
inputSchema: { type: 'object', properties: {}, additionalProperties: false },
|
|
158
|
+
},
|
|
159
|
+
invoke: async (rawArgs, ctx) => {
|
|
160
|
+
projectListInputSchema.parse(rawArgs ?? {});
|
|
161
|
+
return listProjects(ctx.origin, { fetch: ctx.fetch, signal: ctx.signal });
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
definition: {
|
|
166
|
+
name: 'task_start',
|
|
167
|
+
description: 'Start a new coding task in a registered project. Retry-safe when passing a stable requestId.',
|
|
168
|
+
inputSchema: {
|
|
169
|
+
type: 'object',
|
|
170
|
+
required: ['project', 'task'],
|
|
171
|
+
additionalProperties: false,
|
|
172
|
+
properties: {
|
|
173
|
+
project: PROJECT_PROP,
|
|
174
|
+
task: { type: 'string', minLength: 1, maxLength: TASK_TEXT_MAX_CHARS, description: 'Task prompt text (1–100,000 characters).' },
|
|
175
|
+
requestId: { type: 'string', minLength: 1, description: 'Optional idempotency key (UUID) for retry-safe starts.' },
|
|
176
|
+
workflow: { type: 'string', minLength: 1, description: 'Workflow name (default quick-task; mutually exclusive with skill).' },
|
|
177
|
+
skill: { type: 'string', minLength: 1, description: 'Discovered runner skill name (mutually exclusive with workflow).' },
|
|
178
|
+
runner: { type: 'string', minLength: 1, description: 'Runner ID override.' },
|
|
179
|
+
model: { type: 'string', minLength: 1, description: 'Model override.' },
|
|
180
|
+
effort: { type: 'string', minLength: 1, description: 'Reasoning effort override.' },
|
|
181
|
+
autonomous: { type: 'boolean', description: 'Run without parking for interactive input.' },
|
|
182
|
+
worktree: { type: 'boolean', description: 'Run in an isolated git worktree (default true).' },
|
|
183
|
+
allowWorkers: { type: 'boolean', description: 'Allow the task to spawn Squawk workers.' },
|
|
184
|
+
allowMessaging: { type: 'boolean', description: 'Allow peer-task messaging.' },
|
|
185
|
+
archiveWhenDone: { type: 'boolean', description: 'Archive automatically after Done.' },
|
|
186
|
+
autoMergePr: { type: 'boolean', description: 'Auto-merge the task PR after Done when CI and repo rules pass.' },
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
},
|
|
190
|
+
invoke: invokeTaskStart,
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
definition: {
|
|
194
|
+
name: 'task_send',
|
|
195
|
+
description: 'Send human input to steer a live task, answer a pending question, or reopen a settled session with resume: true.',
|
|
196
|
+
inputSchema: {
|
|
197
|
+
type: 'object',
|
|
198
|
+
required: ['project', 'id', 'text'],
|
|
199
|
+
additionalProperties: false,
|
|
200
|
+
properties: {
|
|
201
|
+
project: PROJECT_PROP,
|
|
202
|
+
id: TASK_ID_PROP,
|
|
203
|
+
text: { type: 'string', minLength: 1, maxLength: TASK_TEXT_MAX_CHARS, description: 'Message or answer text.' },
|
|
204
|
+
resume: { type: 'boolean', description: 'Reopen a closed/settled session with this text (default false).' },
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
invoke: async (rawArgs, ctx) => {
|
|
209
|
+
const args = taskSendInputSchema.parse(rawArgs ?? {});
|
|
210
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
211
|
+
const result = await sendTaskMessage(cockpit, {
|
|
212
|
+
id: args.id,
|
|
213
|
+
text: args.text,
|
|
214
|
+
resume: args.resume ?? false,
|
|
215
|
+
signal: ctx.signal,
|
|
216
|
+
}, { closedHintStyle: 'mcp' });
|
|
217
|
+
return {
|
|
218
|
+
id: result.id,
|
|
219
|
+
project: cockpit.projectId,
|
|
220
|
+
delivery: result.delivery,
|
|
221
|
+
...(result.reason !== undefined ? { reason: result.reason } : {}),
|
|
222
|
+
...(result.hint !== undefined ? { hint: result.hint } : {}),
|
|
223
|
+
};
|
|
224
|
+
},
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
definition: {
|
|
228
|
+
name: 'task_status',
|
|
229
|
+
description: 'Read a task status projection, including attention/attentionLabel, pending question/questionContext, and optional bounded handoff text.',
|
|
230
|
+
inputSchema: {
|
|
231
|
+
type: 'object',
|
|
232
|
+
required: ['project', 'id'],
|
|
233
|
+
additionalProperties: false,
|
|
234
|
+
properties: {
|
|
235
|
+
project: PROJECT_PROP,
|
|
236
|
+
id: TASK_ID_PROP,
|
|
237
|
+
full: { type: 'boolean', description: 'Return the full contract ApiRun record instead of the slim projection.' },
|
|
238
|
+
includeHandoff: { type: 'boolean', description: 'Include bounded handoff markdown text.' },
|
|
239
|
+
maxChars: { type: 'integer', minimum: 1, maximum: MAX_BOUNDED_CHARS, description: `Max characters for handoff text when includeHandoff is true (default ${DEFAULT_HANDOFF_MAX_CHARS}).` },
|
|
240
|
+
},
|
|
241
|
+
},
|
|
242
|
+
},
|
|
243
|
+
invoke: async (rawArgs, ctx) => {
|
|
244
|
+
const args = taskStatusInputSchema.parse(rawArgs ?? {});
|
|
245
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
246
|
+
const status = await getTaskStatus(cockpit, {
|
|
247
|
+
id: args.id,
|
|
248
|
+
full: args.full,
|
|
249
|
+
includeHandoff: args.includeHandoff,
|
|
250
|
+
maxChars: args.maxChars ?? DEFAULT_HANDOFF_MAX_CHARS,
|
|
251
|
+
signal: ctx.signal,
|
|
252
|
+
});
|
|
253
|
+
return { project: cockpit.projectId, ...status };
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
definition: {
|
|
258
|
+
name: 'task_log',
|
|
259
|
+
description: 'Read a bounded snapshot of recent task transcript events after an optional sequence number.',
|
|
260
|
+
inputSchema: {
|
|
261
|
+
type: 'object',
|
|
262
|
+
required: ['project', 'id'],
|
|
263
|
+
additionalProperties: false,
|
|
264
|
+
properties: {
|
|
265
|
+
project: PROJECT_PROP,
|
|
266
|
+
id: TASK_ID_PROP,
|
|
267
|
+
since: { type: 'integer', minimum: 0, description: 'Only return events with seq greater than this value (default 0).' },
|
|
268
|
+
maxChars: { type: 'integer', minimum: 1, maximum: MAX_LOG_CHARS, description: 'Keep newest events within this character budget (default 8000).' },
|
|
269
|
+
},
|
|
270
|
+
},
|
|
271
|
+
},
|
|
272
|
+
invoke: async (rawArgs, ctx) => {
|
|
273
|
+
const args = taskLogInputSchema.parse(rawArgs ?? {});
|
|
274
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
275
|
+
const snapshot = await getTaskLog(cockpit, {
|
|
276
|
+
id: args.id,
|
|
277
|
+
since: args.since ?? 0,
|
|
278
|
+
maxChars: args.maxChars ?? 8_000,
|
|
279
|
+
signal: ctx.signal,
|
|
280
|
+
});
|
|
281
|
+
return {
|
|
282
|
+
id: snapshot.id,
|
|
283
|
+
project: cockpit.projectId,
|
|
284
|
+
events: snapshot.events,
|
|
285
|
+
lastSeq: snapshot.lastSeq,
|
|
286
|
+
truncated: snapshot.truncated,
|
|
287
|
+
};
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
definition: {
|
|
292
|
+
name: 'task_diff',
|
|
293
|
+
description: 'Read a task change stat summary (stat: true) or bounded unified diff patch.',
|
|
294
|
+
inputSchema: {
|
|
295
|
+
type: 'object',
|
|
296
|
+
required: ['project', 'id'],
|
|
297
|
+
additionalProperties: false,
|
|
298
|
+
properties: {
|
|
299
|
+
project: PROJECT_PROP,
|
|
300
|
+
id: TASK_ID_PROP,
|
|
301
|
+
stat: { type: 'boolean', description: 'Return per-file change counts instead of the unified diff patch.' },
|
|
302
|
+
maxChars: { type: 'integer', minimum: 1, maximum: MAX_BOUNDED_CHARS, description: `Max characters for non-stat diff output (default ${DEFAULT_DIFF_MAX_CHARS}).` },
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
},
|
|
306
|
+
invoke: async (rawArgs, ctx) => {
|
|
307
|
+
const args = taskDiffInputSchema.parse(rawArgs ?? {});
|
|
308
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
309
|
+
const result = await getTaskDiff(cockpit, {
|
|
310
|
+
id: args.id,
|
|
311
|
+
stat: args.stat,
|
|
312
|
+
maxChars: args.stat ? undefined : (args.maxChars ?? DEFAULT_DIFF_MAX_CHARS),
|
|
313
|
+
signal: ctx.signal,
|
|
314
|
+
});
|
|
315
|
+
return { project: cockpit.projectId, ...result };
|
|
316
|
+
},
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
definition: {
|
|
320
|
+
name: 'task_wait',
|
|
321
|
+
description: 'Wait until one or more tasks need attention (default) or reach a terminal status. Supports cancellation and 15 s progress heartbeats.',
|
|
322
|
+
inputSchema: {
|
|
323
|
+
type: 'object',
|
|
324
|
+
required: ['project', 'ids'],
|
|
325
|
+
additionalProperties: false,
|
|
326
|
+
properties: {
|
|
327
|
+
project: PROJECT_PROP,
|
|
328
|
+
ids: { type: 'array', items: { type: 'string', minLength: 1 }, minItems: 1, maxItems: 32, description: '1–32 task IDs to wait on.' },
|
|
329
|
+
mode: { type: 'string', enum: ['any', 'all'], description: 'Return when any task matches or all tasks match (default any).' },
|
|
330
|
+
until: { type: 'string', enum: ['attention', 'settled'], description: 'Stop when a task needs input or ends (attention, default), or terminal status only (settled).' },
|
|
331
|
+
timeoutSeconds: { type: 'integer', minimum: 1, maximum: MAX_WAIT_TIMEOUT_SECONDS, description: `Max seconds to wait (1–${MAX_WAIT_TIMEOUT_SECONDS}, default ${DEFAULT_WAIT_TIMEOUT_SECONDS}).` },
|
|
332
|
+
},
|
|
333
|
+
},
|
|
334
|
+
},
|
|
335
|
+
invoke: async (rawArgs, ctx) => {
|
|
336
|
+
const args = taskWaitInputSchema.parse(rawArgs ?? {});
|
|
337
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
338
|
+
const mode = args.mode ?? 'any';
|
|
339
|
+
const until = args.until ?? 'attention';
|
|
340
|
+
const timeoutSeconds = args.timeoutSeconds ?? DEFAULT_WAIT_TIMEOUT_SECONDS;
|
|
341
|
+
const waited = await waitForTasks(cockpit, {
|
|
342
|
+
ids: args.ids,
|
|
343
|
+
mode,
|
|
344
|
+
until,
|
|
345
|
+
timeoutMs: timeoutSeconds * 1_000,
|
|
346
|
+
pollMs: ctx.pollMs,
|
|
347
|
+
heartbeatMs: ctx.heartbeatMs ?? DEFAULT_HEARTBEAT_MS,
|
|
348
|
+
signal: ctx.signal,
|
|
349
|
+
onHeartbeat: ctx.sendProgress
|
|
350
|
+
? (elapsedMs, entries) => ctx.sendProgress(Math.floor(elapsedMs / 1_000), timeoutSeconds, `waiting on ${entries.length} task(s): ${entries.map((entry) => `${entry.id}=${entry.status}`).join(', ')}`)
|
|
351
|
+
: undefined,
|
|
352
|
+
});
|
|
353
|
+
return {
|
|
354
|
+
project: cockpit.projectId,
|
|
355
|
+
until: waited.until,
|
|
356
|
+
mode,
|
|
357
|
+
timedOut: waited.timedOut,
|
|
358
|
+
runs: waited.runs,
|
|
359
|
+
};
|
|
360
|
+
},
|
|
361
|
+
},
|
|
362
|
+
idActionTool('task_stop', 'Cancel a running or queued task.', (cockpit, id, signal) => stopTask(cockpit, id, signal)),
|
|
363
|
+
idActionTool('task_finish', 'Close a waiting task session as done.', (cockpit, id, signal) => finishTask(cockpit, id, signal)),
|
|
364
|
+
idActionTool('task_archive', 'Archive a task to hide it from default listings.', (cockpit, id, signal) => archiveTask(cockpit, id, true, signal)),
|
|
365
|
+
{
|
|
366
|
+
definition: {
|
|
367
|
+
name: 'task_list',
|
|
368
|
+
description: 'List tasks newest-first for one project or across all projects (project: "all"). Owned workers are excluded.',
|
|
369
|
+
inputSchema: {
|
|
370
|
+
type: 'object',
|
|
371
|
+
required: ['project'],
|
|
372
|
+
additionalProperties: false,
|
|
373
|
+
properties: {
|
|
374
|
+
project: { type: 'string', minLength: 1, description: 'Registered project ID from project_list, or "all" for all projects.' },
|
|
375
|
+
status: { type: 'string', description: `Optional status or comma-separated statuses: ${STATUS_LIST}.` },
|
|
376
|
+
limit: { type: 'integer', minimum: 1, maximum: 200, description: 'Max tasks to return (1–200, default 20).' },
|
|
377
|
+
all: { type: 'boolean', description: 'Include archived tasks.' },
|
|
378
|
+
full: { type: 'boolean', description: 'Return full contract records instead of slim list rows.' },
|
|
379
|
+
},
|
|
380
|
+
},
|
|
381
|
+
},
|
|
382
|
+
invoke: async (rawArgs, ctx) => {
|
|
383
|
+
const args = taskListInputSchema.parse(rawArgs ?? {});
|
|
384
|
+
const statuses = parseStatusFilter(args.status);
|
|
385
|
+
const limit = args.limit ?? 20;
|
|
386
|
+
if (args.project === 'all') {
|
|
387
|
+
return listAllProjectsTasks(ctx.origin, {
|
|
388
|
+
statuses,
|
|
389
|
+
limit,
|
|
390
|
+
all: args.all,
|
|
391
|
+
full: args.full,
|
|
392
|
+
fetch: ctx.fetch,
|
|
393
|
+
signal: ctx.signal,
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
const cockpit = await resolveProjectCockpit(ctx.origin, args.project, { fetch: ctx.fetch, signal: ctx.signal });
|
|
397
|
+
const listed = await listTasks(cockpit, {
|
|
398
|
+
statuses,
|
|
399
|
+
limit,
|
|
400
|
+
all: args.all,
|
|
401
|
+
full: args.full,
|
|
402
|
+
signal: ctx.signal,
|
|
403
|
+
});
|
|
404
|
+
return { project: cockpit.projectId, total: listed.total, runs: listed.runs };
|
|
405
|
+
},
|
|
406
|
+
},
|
|
407
|
+
];
|
|
408
|
+
const TOOLS_BY_NAME = new Map(TOOLS.map((entry) => [entry.definition.name, entry]));
|
|
409
|
+
function formatZodError(error) {
|
|
410
|
+
const first = error.issues[0];
|
|
411
|
+
if (!first)
|
|
412
|
+
return 'invalid arguments';
|
|
413
|
+
const path = first.path.length > 0 ? `${first.path.join('.')}: ` : '';
|
|
414
|
+
return `${path}${first.message}`;
|
|
415
|
+
}
|
|
416
|
+
export function formatMcpToolError(error) {
|
|
417
|
+
if (error instanceof TaskCliError) {
|
|
418
|
+
const code = typeof error.body.code === 'string' ? error.body.code : 'error';
|
|
419
|
+
const message = typeof error.body.error === 'string' ? error.body.error : error.message;
|
|
420
|
+
const hint = typeof error.body.hint === 'string' ? error.body.hint : undefined;
|
|
421
|
+
return {
|
|
422
|
+
isError: true,
|
|
423
|
+
content: [{ type: 'text', text: JSON.stringify({ code, error: message, ...(hint ? { hint } : {}) }) }],
|
|
424
|
+
};
|
|
425
|
+
}
|
|
426
|
+
if (error instanceof z.ZodError) {
|
|
427
|
+
return {
|
|
428
|
+
isError: true,
|
|
429
|
+
content: [{ type: 'text', text: JSON.stringify({ code: 'invalid_input', error: formatZodError(error) }) }],
|
|
430
|
+
};
|
|
431
|
+
}
|
|
432
|
+
return {
|
|
433
|
+
isError: true,
|
|
434
|
+
content: [{ type: 'text', text: JSON.stringify({ code: 'internal', error: error instanceof Error ? error.message : String(error) }) }],
|
|
435
|
+
};
|
|
436
|
+
}
|
|
437
|
+
export function createOrchestratorMcpServer(options) {
|
|
438
|
+
const server = new Server({ name: MCP_SERVER_NAME, version: options.version ?? '0.0.0' }, { capabilities: { tools: {} }, instructions: MCP_SERVER_INSTRUCTIONS });
|
|
439
|
+
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
440
|
+
tools: TOOLS.map((entry) => entry.definition),
|
|
441
|
+
}));
|
|
442
|
+
server.setRequestHandler(CallToolRequestSchema, async (request, extra) => {
|
|
443
|
+
const tool = TOOLS_BY_NAME.get(request.params.name);
|
|
444
|
+
if (!tool) {
|
|
445
|
+
return {
|
|
446
|
+
isError: true,
|
|
447
|
+
content: [{ type: 'text', text: JSON.stringify({ code: 'unknown_tool', error: `unknown tool '${request.params.name}'` }) }],
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
const progressToken = extra._meta?.progressToken;
|
|
451
|
+
const sendProgress = progressToken !== undefined
|
|
452
|
+
? async (progress, total, message) => {
|
|
453
|
+
await extra.sendNotification({
|
|
454
|
+
method: 'notifications/progress',
|
|
455
|
+
params: { progressToken, progress, total, message },
|
|
456
|
+
});
|
|
457
|
+
}
|
|
458
|
+
: undefined;
|
|
459
|
+
try {
|
|
460
|
+
const data = await tool.invoke(request.params.arguments, {
|
|
461
|
+
origin: options.origin,
|
|
462
|
+
fetch: options.fetch,
|
|
463
|
+
pollMs: options.pollMs,
|
|
464
|
+
heartbeatMs: options.heartbeatMs,
|
|
465
|
+
signal: extra.signal,
|
|
466
|
+
sendProgress,
|
|
467
|
+
});
|
|
468
|
+
return { content: [{ type: 'text', text: JSON.stringify(data) }] };
|
|
469
|
+
}
|
|
470
|
+
catch (error) {
|
|
471
|
+
return formatMcpToolError(error);
|
|
472
|
+
}
|
|
473
|
+
});
|
|
474
|
+
return server;
|
|
475
|
+
}
|
|
476
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../../src/features/mcp/tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,2CAA2C,CAAC;AACnE,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,EAAa,MAAM,oCAAoC,CAAC;AAC9G,OAAO,EAAE,eAAe,EAAE,MAAM,mCAAmC,CAAC;AACpE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,YAAY,EAAgB,MAAM,wBAAwB,CAAC;AACpE,OAAO,EACL,WAAW,EACX,sBAAsB,EACtB,yBAAyB,EACzB,UAA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AC,EAAE,CAAC,EAAE,CAAC;QACrE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,kBAAkB,CAAC,KAAK,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -58,6 +58,29 @@ export declare function ciProgressPlugs(): {
|
|
|
58
58
|
export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): import("hono/hono-base").HonoBase<import("hono/types").BlankEnv, {
|
|
59
59
|
"/workspace/activity": {
|
|
60
60
|
$get: {
|
|
61
|
+
output: {
|
|
62
|
+
error: string;
|
|
63
|
+
code?: "invalid_input" | undefined;
|
|
64
|
+
};
|
|
65
|
+
outputFormat: "json";
|
|
66
|
+
status: 400;
|
|
67
|
+
input: {
|
|
68
|
+
query: {
|
|
69
|
+
project?: string | undefined;
|
|
70
|
+
};
|
|
71
|
+
};
|
|
72
|
+
} | {
|
|
73
|
+
output: {
|
|
74
|
+
error: string;
|
|
75
|
+
};
|
|
76
|
+
outputFormat: "json";
|
|
77
|
+
status: 404 | 409 | 503;
|
|
78
|
+
input: {
|
|
79
|
+
query: {
|
|
80
|
+
project?: string | undefined;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
} | {
|
|
61
84
|
output: {
|
|
62
85
|
generatedAt: string;
|
|
63
86
|
projects: {
|
|
@@ -304,29 +327,6 @@ export declare function createActivityRoutes(routeDeps: ActivityRouteDeps): impo
|
|
|
304
327
|
project?: string | undefined;
|
|
305
328
|
};
|
|
306
329
|
};
|
|
307
|
-
} | {
|
|
308
|
-
output: {
|
|
309
|
-
error: string;
|
|
310
|
-
code?: "invalid_input" | undefined;
|
|
311
|
-
};
|
|
312
|
-
outputFormat: "json";
|
|
313
|
-
status: 400;
|
|
314
|
-
input: {
|
|
315
|
-
query: {
|
|
316
|
-
project?: string | undefined;
|
|
317
|
-
};
|
|
318
|
-
};
|
|
319
|
-
} | {
|
|
320
|
-
output: {
|
|
321
|
-
error: string;
|
|
322
|
-
};
|
|
323
|
-
outputFormat: "json";
|
|
324
|
-
status: 404 | 409 | 503;
|
|
325
|
-
input: {
|
|
326
|
-
query: {
|
|
327
|
-
project?: string | undefined;
|
|
328
|
-
};
|
|
329
|
-
};
|
|
330
330
|
};
|
|
331
331
|
};
|
|
332
332
|
}, "/", "/workspace/activity">;
|
|
@@ -16,6 +16,12 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
16
16
|
output: {
|
|
17
17
|
generation: string;
|
|
18
18
|
results: ({
|
|
19
|
+
projectId: string;
|
|
20
|
+
runId: string;
|
|
21
|
+
type: "error" | "reset";
|
|
22
|
+
status: 400 | 404 | 409 | 413 | 503;
|
|
23
|
+
error: string;
|
|
24
|
+
} | {
|
|
19
25
|
projectId: string;
|
|
20
26
|
runId: string;
|
|
21
27
|
type: "batch";
|
|
@@ -36,12 +42,6 @@ export declare function createLiveRoutes({ resolveProject, serverGeneration, res
|
|
|
36
42
|
cursor: string;
|
|
37
43
|
afterSeq: number;
|
|
38
44
|
hasMore: boolean;
|
|
39
|
-
} | {
|
|
40
|
-
projectId: string;
|
|
41
|
-
runId: string;
|
|
42
|
-
type: "error" | "reset";
|
|
43
|
-
status: 400 | 404 | 409 | 413 | 503;
|
|
44
|
-
error: string;
|
|
45
45
|
})[];
|
|
46
46
|
};
|
|
47
47
|
outputFormat: "json";
|
|
@@ -22,18 +22,6 @@ export declare function createModelsRoutes(options: {
|
|
|
22
22
|
profileId?: string | undefined;
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
} | {
|
|
26
|
-
output: {
|
|
27
|
-
error: string;
|
|
28
|
-
};
|
|
29
|
-
outputFormat: "json";
|
|
30
|
-
status: 400;
|
|
31
|
-
input: {
|
|
32
|
-
query: {
|
|
33
|
-
runner: string | string[];
|
|
34
|
-
profileId?: string | undefined;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
25
|
} | {
|
|
38
26
|
output: {
|
|
39
27
|
runner: string;
|
|
@@ -55,6 +43,18 @@ export declare function createModelsRoutes(options: {
|
|
|
55
43
|
profileId?: string | undefined;
|
|
56
44
|
};
|
|
57
45
|
};
|
|
46
|
+
} | {
|
|
47
|
+
output: {
|
|
48
|
+
error: string;
|
|
49
|
+
};
|
|
50
|
+
outputFormat: "json";
|
|
51
|
+
status: 400;
|
|
52
|
+
input: {
|
|
53
|
+
query: {
|
|
54
|
+
runner: string | string[];
|
|
55
|
+
profileId?: string | undefined;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
58
|
};
|
|
59
59
|
};
|
|
60
60
|
}, "/", "/models">;
|