@chorus-aidlc/chorus-openclaw-plugin 0.3.1 → 0.5.0
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 +218 -218
- package/dist/commands.d.ts +5 -0
- package/dist/commands.d.ts.map +1 -0
- package/dist/commands.js +147 -0
- package/dist/commands.js.map +1 -0
- package/dist/config.d.ts +38 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +57 -0
- package/dist/config.js.map +1 -0
- package/dist/event-router.d.ts +55 -0
- package/dist/event-router.d.ts.map +1 -0
- package/dist/event-router.js +157 -0
- package/dist/event-router.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +108 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp-client.d.ts +37 -0
- package/dist/mcp-client.d.ts.map +1 -0
- package/dist/mcp-client.js +137 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/mcp-registration.d.ts +25 -0
- package/dist/mcp-registration.d.ts.map +1 -0
- package/dist/mcp-registration.js +93 -0
- package/dist/mcp-registration.js.map +1 -0
- package/dist/sse-listener.d.ts +37 -0
- package/dist/sse-listener.d.ts.map +1 -0
- package/dist/sse-listener.js +152 -0
- package/dist/sse-listener.js.map +1 -0
- package/dist/wake.d.ts +67 -0
- package/dist/wake.d.ts.map +1 -0
- package/dist/wake.js +234 -0
- package/dist/wake.js.map +1 -0
- package/openclaw.plugin.json +14 -12
- package/package.json +24 -5
- package/skills/brainstorm/SKILL.md +163 -0
- package/skills/chorus/SKILL.md +413 -0
- package/skills/develop/SKILL.md +434 -0
- package/skills/idea/SKILL.md +293 -0
- package/skills/openspec-aware/SKILL.md +425 -0
- package/skills/proposal/SKILL.md +397 -0
- package/skills/proposal-reviewer/SKILL.md +117 -0
- package/skills/quick-dev/SKILL.md +198 -0
- package/skills/review/SKILL.md +354 -0
- package/skills/task-reviewer/SKILL.md +113 -0
- package/skills/yolo/SKILL.md +498 -0
- package/src/commands.ts +147 -57
- package/src/config.ts +23 -10
- package/src/event-router.ts +46 -54
- package/src/index.ts +56 -83
- package/src/mcp-client.ts +17 -0
- package/src/mcp-registration.ts +142 -0
- package/src/openclaw-sdk.d.ts +95 -0
- package/src/wake.ts +310 -0
- package/src/tools/admin-tools.ts +0 -117
- package/src/tools/common-tools.ts +0 -546
- package/src/tools/dev-tools.ts +0 -97
- package/src/tools/pm-tools.ts +0 -390
|
@@ -1,546 +0,0 @@
|
|
|
1
|
-
import type { ChorusMcpClient } from "../mcp-client.js";
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
-
export function registerCommonTools(api: any, mcpClient: ChorusMcpClient) {
|
|
5
|
-
api.registerTool({
|
|
6
|
-
name: "chorus_checkin",
|
|
7
|
-
description: "Agent check-in. Returns persona, roles, and pending assignments. Recommended at session start.",
|
|
8
|
-
parameters: {
|
|
9
|
-
type: "object",
|
|
10
|
-
properties: {},
|
|
11
|
-
additionalProperties: false,
|
|
12
|
-
},
|
|
13
|
-
async execute() {
|
|
14
|
-
const result = await mcpClient.callTool("chorus_checkin", {});
|
|
15
|
-
return JSON.stringify(result, null, 2);
|
|
16
|
-
},
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
api.registerTool({
|
|
20
|
-
name: "chorus_get_notifications",
|
|
21
|
-
description: "Get notifications. By default fetches unread and auto-marks them as read.",
|
|
22
|
-
parameters: {
|
|
23
|
-
type: "object",
|
|
24
|
-
properties: {
|
|
25
|
-
status: { type: "string", description: "Filter: unread | read | all (default: unread)" },
|
|
26
|
-
autoMarkRead: { type: "boolean", description: "Auto-mark fetched unread as read (default: true)" },
|
|
27
|
-
},
|
|
28
|
-
additionalProperties: false,
|
|
29
|
-
},
|
|
30
|
-
async execute(_id: string, { status, autoMarkRead }: { status?: string; autoMarkRead?: boolean }) {
|
|
31
|
-
const args: Record<string, unknown> = {};
|
|
32
|
-
if (status) args.status = status;
|
|
33
|
-
if (autoMarkRead !== undefined) args.autoMarkRead = autoMarkRead;
|
|
34
|
-
const result = await mcpClient.callTool("chorus_get_notifications", args);
|
|
35
|
-
return JSON.stringify(result, null, 2);
|
|
36
|
-
},
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
api.registerTool({
|
|
40
|
-
name: "chorus_get_project",
|
|
41
|
-
description: "Get project details and context",
|
|
42
|
-
parameters: {
|
|
43
|
-
type: "object",
|
|
44
|
-
properties: {
|
|
45
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
46
|
-
},
|
|
47
|
-
required: ["projectUuid"],
|
|
48
|
-
additionalProperties: false,
|
|
49
|
-
},
|
|
50
|
-
async execute(_id: string, { projectUuid }: { projectUuid: string }) {
|
|
51
|
-
const result = await mcpClient.callTool("chorus_get_project", { projectUuid });
|
|
52
|
-
return JSON.stringify(result, null, 2);
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
api.registerTool({
|
|
57
|
-
name: "chorus_get_task",
|
|
58
|
-
description: "Get detailed information and context for a single task",
|
|
59
|
-
parameters: {
|
|
60
|
-
type: "object",
|
|
61
|
-
properties: {
|
|
62
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
63
|
-
},
|
|
64
|
-
required: ["taskUuid"],
|
|
65
|
-
additionalProperties: false,
|
|
66
|
-
},
|
|
67
|
-
async execute(_id: string, { taskUuid }: { taskUuid: string }) {
|
|
68
|
-
const result = await mcpClient.callTool("chorus_get_task", { taskUuid });
|
|
69
|
-
return JSON.stringify(result, null, 2);
|
|
70
|
-
},
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
api.registerTool({
|
|
74
|
-
name: "chorus_get_idea",
|
|
75
|
-
description: "Get detailed information for a single idea",
|
|
76
|
-
parameters: {
|
|
77
|
-
type: "object",
|
|
78
|
-
properties: {
|
|
79
|
-
ideaUuid: { type: "string", description: "Idea UUID" },
|
|
80
|
-
},
|
|
81
|
-
required: ["ideaUuid"],
|
|
82
|
-
additionalProperties: false,
|
|
83
|
-
},
|
|
84
|
-
async execute(_id: string, { ideaUuid }: { ideaUuid: string }) {
|
|
85
|
-
const result = await mcpClient.callTool("chorus_get_idea", { ideaUuid });
|
|
86
|
-
return JSON.stringify(result, null, 2);
|
|
87
|
-
},
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
api.registerTool({
|
|
91
|
-
name: "chorus_get_available_tasks",
|
|
92
|
-
description: "Get tasks available to claim in a project (status=open). Optionally filter by proposal UUIDs.",
|
|
93
|
-
parameters: {
|
|
94
|
-
type: "object",
|
|
95
|
-
properties: {
|
|
96
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
97
|
-
proposalUuids: { type: "array", items: { type: "string" }, description: "Filter tasks by proposal UUIDs" },
|
|
98
|
-
},
|
|
99
|
-
required: ["projectUuid"],
|
|
100
|
-
additionalProperties: false,
|
|
101
|
-
},
|
|
102
|
-
async execute(_id: string, { projectUuid, proposalUuids }: { projectUuid: string; proposalUuids?: string[] }) {
|
|
103
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
104
|
-
if (proposalUuids && proposalUuids.length > 0) args.proposalUuids = proposalUuids;
|
|
105
|
-
const result = await mcpClient.callTool("chorus_get_available_tasks", args);
|
|
106
|
-
return JSON.stringify(result, null, 2);
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
|
|
110
|
-
api.registerTool({
|
|
111
|
-
name: "chorus_get_available_ideas",
|
|
112
|
-
description: "Get ideas available to claim in a project (status=open)",
|
|
113
|
-
parameters: {
|
|
114
|
-
type: "object",
|
|
115
|
-
properties: {
|
|
116
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
117
|
-
},
|
|
118
|
-
required: ["projectUuid"],
|
|
119
|
-
additionalProperties: false,
|
|
120
|
-
},
|
|
121
|
-
async execute(_id: string, { projectUuid }: { projectUuid: string }) {
|
|
122
|
-
const result = await mcpClient.callTool("chorus_get_available_ideas", { projectUuid });
|
|
123
|
-
return JSON.stringify(result, null, 2);
|
|
124
|
-
},
|
|
125
|
-
});
|
|
126
|
-
|
|
127
|
-
// --- List tools for project exploration ---
|
|
128
|
-
|
|
129
|
-
api.registerTool({
|
|
130
|
-
name: "chorus_list_projects",
|
|
131
|
-
description: "List all projects for the current company. Returns projects with counts of ideas, documents, tasks, and proposals.",
|
|
132
|
-
parameters: {
|
|
133
|
-
type: "object",
|
|
134
|
-
properties: {
|
|
135
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
136
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
137
|
-
},
|
|
138
|
-
additionalProperties: false,
|
|
139
|
-
},
|
|
140
|
-
async execute(_id: string, { page, pageSize }: { page?: number; pageSize?: number }) {
|
|
141
|
-
const args: Record<string, unknown> = {};
|
|
142
|
-
if (page !== undefined) args.page = page;
|
|
143
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
144
|
-
const result = await mcpClient.callTool("chorus_list_projects", args);
|
|
145
|
-
return JSON.stringify(result, null, 2);
|
|
146
|
-
},
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
api.registerTool({
|
|
150
|
-
name: "chorus_list_tasks",
|
|
151
|
-
description: "List tasks for a project. Can filter by status, priority, and proposal UUIDs.",
|
|
152
|
-
parameters: {
|
|
153
|
-
type: "object",
|
|
154
|
-
properties: {
|
|
155
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
156
|
-
status: { type: "string", description: "Filter by status: open | assigned | in_progress | to_verify | done | closed" },
|
|
157
|
-
priority: { type: "string", description: "Filter by priority: low | medium | high" },
|
|
158
|
-
proposalUuids: { type: "array", items: { type: "string" }, description: "Filter tasks by proposal UUIDs" },
|
|
159
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
160
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
161
|
-
},
|
|
162
|
-
required: ["projectUuid"],
|
|
163
|
-
additionalProperties: false,
|
|
164
|
-
},
|
|
165
|
-
async execute(_id: string, { projectUuid, status, priority, proposalUuids, page, pageSize }: { projectUuid: string; status?: string; priority?: string; proposalUuids?: string[]; page?: number; pageSize?: number }) {
|
|
166
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
167
|
-
if (status) args.status = status;
|
|
168
|
-
if (priority) args.priority = priority;
|
|
169
|
-
if (proposalUuids && proposalUuids.length > 0) args.proposalUuids = proposalUuids;
|
|
170
|
-
if (page !== undefined) args.page = page;
|
|
171
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
172
|
-
const result = await mcpClient.callTool("chorus_list_tasks", args);
|
|
173
|
-
return JSON.stringify(result, null, 2);
|
|
174
|
-
},
|
|
175
|
-
});
|
|
176
|
-
|
|
177
|
-
api.registerTool({
|
|
178
|
-
name: "chorus_get_ideas",
|
|
179
|
-
description: "List ideas for a project. Can filter by status.",
|
|
180
|
-
parameters: {
|
|
181
|
-
type: "object",
|
|
182
|
-
properties: {
|
|
183
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
184
|
-
status: { type: "string", description: "Filter by status: open | elaborating | proposal_created | completed | closed" },
|
|
185
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
186
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
187
|
-
},
|
|
188
|
-
required: ["projectUuid"],
|
|
189
|
-
additionalProperties: false,
|
|
190
|
-
},
|
|
191
|
-
async execute(_id: string, { projectUuid, status, page, pageSize }: { projectUuid: string; status?: string; page?: number; pageSize?: number }) {
|
|
192
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
193
|
-
if (status) args.status = status;
|
|
194
|
-
if (page !== undefined) args.page = page;
|
|
195
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
196
|
-
const result = await mcpClient.callTool("chorus_get_ideas", args);
|
|
197
|
-
return JSON.stringify(result, null, 2);
|
|
198
|
-
},
|
|
199
|
-
});
|
|
200
|
-
|
|
201
|
-
api.registerTool({
|
|
202
|
-
name: "chorus_get_proposals",
|
|
203
|
-
description: "List proposals for a project. Can filter by status.",
|
|
204
|
-
parameters: {
|
|
205
|
-
type: "object",
|
|
206
|
-
properties: {
|
|
207
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
208
|
-
status: { type: "string", description: "Filter by status: draft | pending | approved | rejected" },
|
|
209
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
210
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
211
|
-
},
|
|
212
|
-
required: ["projectUuid"],
|
|
213
|
-
additionalProperties: false,
|
|
214
|
-
},
|
|
215
|
-
async execute(_id: string, { projectUuid, status, page, pageSize }: { projectUuid: string; status?: string; page?: number; pageSize?: number }) {
|
|
216
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
217
|
-
if (status) args.status = status;
|
|
218
|
-
if (page !== undefined) args.page = page;
|
|
219
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
220
|
-
const result = await mcpClient.callTool("chorus_get_proposals", args);
|
|
221
|
-
return JSON.stringify(result, null, 2);
|
|
222
|
-
},
|
|
223
|
-
});
|
|
224
|
-
|
|
225
|
-
api.registerTool({
|
|
226
|
-
name: "chorus_get_documents",
|
|
227
|
-
description: "List documents for a project. Can filter by type.",
|
|
228
|
-
parameters: {
|
|
229
|
-
type: "object",
|
|
230
|
-
properties: {
|
|
231
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
232
|
-
type: { type: "string", description: "Filter by type: prd | tech_design | adr | spec | guide" },
|
|
233
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
234
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
235
|
-
},
|
|
236
|
-
required: ["projectUuid"],
|
|
237
|
-
additionalProperties: false,
|
|
238
|
-
},
|
|
239
|
-
async execute(_id: string, { projectUuid, type, page, pageSize }: { projectUuid: string; type?: string; page?: number; pageSize?: number }) {
|
|
240
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
241
|
-
if (type) args.type = type;
|
|
242
|
-
if (page !== undefined) args.page = page;
|
|
243
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
244
|
-
const result = await mcpClient.callTool("chorus_get_documents", args);
|
|
245
|
-
return JSON.stringify(result, null, 2);
|
|
246
|
-
},
|
|
247
|
-
});
|
|
248
|
-
|
|
249
|
-
api.registerTool({
|
|
250
|
-
name: "chorus_get_document",
|
|
251
|
-
description: "Get the detailed content of a single document.",
|
|
252
|
-
parameters: {
|
|
253
|
-
type: "object",
|
|
254
|
-
properties: {
|
|
255
|
-
documentUuid: { type: "string", description: "Document UUID" },
|
|
256
|
-
},
|
|
257
|
-
required: ["documentUuid"],
|
|
258
|
-
additionalProperties: false,
|
|
259
|
-
},
|
|
260
|
-
async execute(_id: string, { documentUuid }: { documentUuid: string }) {
|
|
261
|
-
const result = await mcpClient.callTool("chorus_get_document", { documentUuid });
|
|
262
|
-
return JSON.stringify(result, null, 2);
|
|
263
|
-
},
|
|
264
|
-
});
|
|
265
|
-
|
|
266
|
-
api.registerTool({
|
|
267
|
-
name: "chorus_get_unblocked_tasks",
|
|
268
|
-
description: "Get tasks that are ready to start — status is open/assigned and all dependencies are resolved (done/closed). Optionally filter by proposal UUIDs. Note: to_verify is NOT considered resolved.",
|
|
269
|
-
parameters: {
|
|
270
|
-
type: "object",
|
|
271
|
-
properties: {
|
|
272
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
273
|
-
proposalUuids: { type: "array", items: { type: "string" }, description: "Filter tasks by proposal UUIDs" },
|
|
274
|
-
},
|
|
275
|
-
required: ["projectUuid"],
|
|
276
|
-
additionalProperties: false,
|
|
277
|
-
},
|
|
278
|
-
async execute(_id: string, { projectUuid, proposalUuids }: { projectUuid: string; proposalUuids?: string[] }) {
|
|
279
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
280
|
-
if (proposalUuids && proposalUuids.length > 0) args.proposalUuids = proposalUuids;
|
|
281
|
-
const result = await mcpClient.callTool("chorus_get_unblocked_tasks", args);
|
|
282
|
-
return JSON.stringify(result, null, 2);
|
|
283
|
-
},
|
|
284
|
-
});
|
|
285
|
-
|
|
286
|
-
api.registerTool({
|
|
287
|
-
name: "chorus_get_activity",
|
|
288
|
-
description: "Get the activity stream for a project. Shows all actions taken by agents and users.",
|
|
289
|
-
parameters: {
|
|
290
|
-
type: "object",
|
|
291
|
-
properties: {
|
|
292
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
293
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
294
|
-
pageSize: { type: "number", description: "Items per page (default: 50)" },
|
|
295
|
-
},
|
|
296
|
-
required: ["projectUuid"],
|
|
297
|
-
additionalProperties: false,
|
|
298
|
-
},
|
|
299
|
-
async execute(_id: string, { projectUuid, page, pageSize }: { projectUuid: string; page?: number; pageSize?: number }) {
|
|
300
|
-
const args: Record<string, unknown> = { projectUuid };
|
|
301
|
-
if (page !== undefined) args.page = page;
|
|
302
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
303
|
-
const result = await mcpClient.callTool("chorus_get_activity", args);
|
|
304
|
-
return JSON.stringify(result, null, 2);
|
|
305
|
-
},
|
|
306
|
-
});
|
|
307
|
-
|
|
308
|
-
api.registerTool({
|
|
309
|
-
name: "chorus_get_comments",
|
|
310
|
-
description: "Get comments for an Idea, Proposal, Task, or Document. Useful for understanding context, decisions, and feedback.",
|
|
311
|
-
parameters: {
|
|
312
|
-
type: "object",
|
|
313
|
-
properties: {
|
|
314
|
-
targetType: { type: "string", description: "Target type: idea | proposal | task | document" },
|
|
315
|
-
targetUuid: { type: "string", description: "Target UUID" },
|
|
316
|
-
page: { type: "number", description: "Page number (default: 1)" },
|
|
317
|
-
pageSize: { type: "number", description: "Items per page (default: 20)" },
|
|
318
|
-
},
|
|
319
|
-
required: ["targetType", "targetUuid"],
|
|
320
|
-
additionalProperties: false,
|
|
321
|
-
},
|
|
322
|
-
async execute(_id: string, { targetType, targetUuid, page, pageSize }: { targetType: string; targetUuid: string; page?: number; pageSize?: number }) {
|
|
323
|
-
const args: Record<string, unknown> = { targetType, targetUuid };
|
|
324
|
-
if (page !== undefined) args.page = page;
|
|
325
|
-
if (pageSize !== undefined) args.pageSize = pageSize;
|
|
326
|
-
const result = await mcpClient.callTool("chorus_get_comments", args);
|
|
327
|
-
return JSON.stringify(result, null, 2);
|
|
328
|
-
},
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
api.registerTool({
|
|
332
|
-
name: "chorus_get_elaboration",
|
|
333
|
-
description: "Get the full elaboration state for an Idea, including all rounds, questions, answers, and progress summary.",
|
|
334
|
-
parameters: {
|
|
335
|
-
type: "object",
|
|
336
|
-
properties: {
|
|
337
|
-
ideaUuid: { type: "string", description: "Idea UUID" },
|
|
338
|
-
},
|
|
339
|
-
required: ["ideaUuid"],
|
|
340
|
-
additionalProperties: false,
|
|
341
|
-
},
|
|
342
|
-
async execute(_id: string, { ideaUuid }: { ideaUuid: string }) {
|
|
343
|
-
const result = await mcpClient.callTool("chorus_get_elaboration", { ideaUuid });
|
|
344
|
-
return JSON.stringify(result, null, 2);
|
|
345
|
-
},
|
|
346
|
-
});
|
|
347
|
-
|
|
348
|
-
api.registerTool({
|
|
349
|
-
name: "chorus_get_my_assignments",
|
|
350
|
-
description: "Get all Ideas and Tasks currently assigned to you.",
|
|
351
|
-
parameters: {
|
|
352
|
-
type: "object",
|
|
353
|
-
properties: {},
|
|
354
|
-
additionalProperties: false,
|
|
355
|
-
},
|
|
356
|
-
async execute() {
|
|
357
|
-
const result = await mcpClient.callTool("chorus_get_my_assignments", {});
|
|
358
|
-
return JSON.stringify(result, null, 2);
|
|
359
|
-
},
|
|
360
|
-
});
|
|
361
|
-
|
|
362
|
-
// --- Project group tools ---
|
|
363
|
-
|
|
364
|
-
api.registerTool({
|
|
365
|
-
name: "chorus_get_project_groups",
|
|
366
|
-
description: "List all project groups. Returns groups with project counts and completion rates.",
|
|
367
|
-
parameters: {
|
|
368
|
-
type: "object",
|
|
369
|
-
properties: {},
|
|
370
|
-
additionalProperties: false,
|
|
371
|
-
},
|
|
372
|
-
async execute() {
|
|
373
|
-
const result = await mcpClient.callTool("chorus_get_project_groups", {});
|
|
374
|
-
return JSON.stringify(result, null, 2);
|
|
375
|
-
},
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
api.registerTool({
|
|
379
|
-
name: "chorus_get_project_group",
|
|
380
|
-
description: "Get a single project group with its projects and stats.",
|
|
381
|
-
parameters: {
|
|
382
|
-
type: "object",
|
|
383
|
-
properties: {
|
|
384
|
-
groupUuid: { type: "string", description: "Project group UUID" },
|
|
385
|
-
},
|
|
386
|
-
required: ["groupUuid"],
|
|
387
|
-
additionalProperties: false,
|
|
388
|
-
},
|
|
389
|
-
async execute(_id: string, { groupUuid }: { groupUuid: string }) {
|
|
390
|
-
const result = await mcpClient.callTool("chorus_get_project_group", { groupUuid });
|
|
391
|
-
return JSON.stringify(result, null, 2);
|
|
392
|
-
},
|
|
393
|
-
});
|
|
394
|
-
|
|
395
|
-
// --- Write tools ---
|
|
396
|
-
|
|
397
|
-
api.registerTool({
|
|
398
|
-
name: "chorus_add_comment",
|
|
399
|
-
description: "Add a comment to an Idea, Proposal, Task, or Document",
|
|
400
|
-
parameters: {
|
|
401
|
-
type: "object",
|
|
402
|
-
properties: {
|
|
403
|
-
targetType: { type: "string", description: "Target type: idea | proposal | task | document" },
|
|
404
|
-
targetUuid: { type: "string", description: "Target UUID" },
|
|
405
|
-
content: { type: "string", description: "Comment content" },
|
|
406
|
-
},
|
|
407
|
-
required: ["targetType", "targetUuid", "content"],
|
|
408
|
-
additionalProperties: false,
|
|
409
|
-
},
|
|
410
|
-
async execute(_id: string, { targetType, targetUuid, content }: { targetType: string; targetUuid: string; content: string }) {
|
|
411
|
-
const result = await mcpClient.callTool("chorus_add_comment", { targetType, targetUuid, content });
|
|
412
|
-
return JSON.stringify(result, null, 2);
|
|
413
|
-
},
|
|
414
|
-
});
|
|
415
|
-
|
|
416
|
-
api.registerTool({
|
|
417
|
-
name: "chorus_search_mentionables",
|
|
418
|
-
description: "Search for users and agents that can be @mentioned. Returns name, type, and UUID. Use the UUID to write mentions as @[Name](type:uuid) in comment text.",
|
|
419
|
-
parameters: {
|
|
420
|
-
type: "object",
|
|
421
|
-
properties: {
|
|
422
|
-
query: { type: "string", description: "Name or keyword to search" },
|
|
423
|
-
limit: { type: "number", description: "Max results to return (default 10)" },
|
|
424
|
-
},
|
|
425
|
-
required: ["query"],
|
|
426
|
-
additionalProperties: false,
|
|
427
|
-
},
|
|
428
|
-
async execute(_id: string, { query, limit }: { query: string; limit?: number }) {
|
|
429
|
-
const args: Record<string, unknown> = { query };
|
|
430
|
-
if (limit !== undefined) args.limit = limit;
|
|
431
|
-
const result = await mcpClient.callTool("chorus_search_mentionables", args);
|
|
432
|
-
return JSON.stringify(result, null, 2);
|
|
433
|
-
},
|
|
434
|
-
});
|
|
435
|
-
|
|
436
|
-
// ===== Task Creation & Editing (available to all roles) =====
|
|
437
|
-
|
|
438
|
-
api.registerTool({
|
|
439
|
-
name: "chorus_create_tasks",
|
|
440
|
-
description:
|
|
441
|
-
"Batch create tasks in a project. Two modes:\n\n" +
|
|
442
|
-
"**Quick Task** (skip Idea→Proposal): omit proposalUuid. Ideal for bug fixes, small features, post-delivery patches.\n" +
|
|
443
|
-
"Flow: create → chorus_claim_task → execute → chorus_report_work → chorus_submit_for_verify → done.\n\n" +
|
|
444
|
-
"**Proposal-linked** (traditional AI-DLC): pass proposalUuid to associate with an approved proposal.\n\n" +
|
|
445
|
-
"Supports batch creation with intra-batch dependencies (draftUuid + dependsOnDraftUuids) and dependencies on existing tasks (dependsOnTaskUuids).",
|
|
446
|
-
parameters: {
|
|
447
|
-
type: "object",
|
|
448
|
-
properties: {
|
|
449
|
-
projectUuid: { type: "string", description: "Project UUID" },
|
|
450
|
-
proposalUuid: { type: "string", description: "Associated Proposal UUID (optional — omit for Quick Task mode)" },
|
|
451
|
-
tasks: {
|
|
452
|
-
type: "array",
|
|
453
|
-
description: "Task list. Each: { title, description?, priority?, storyPoints?, acceptanceCriteriaItems?, draftUuid?, dependsOnDraftUuids?, dependsOnTaskUuids? }",
|
|
454
|
-
items: {
|
|
455
|
-
type: "object",
|
|
456
|
-
properties: {
|
|
457
|
-
title: { type: "string", description: "Task title" },
|
|
458
|
-
description: { type: "string", description: "Task description" },
|
|
459
|
-
priority: { type: "string", description: 'Priority: "low", "medium", or "high"' },
|
|
460
|
-
storyPoints: { type: "number", description: "Effort estimate in agent hours" },
|
|
461
|
-
acceptanceCriteriaItems: { type: "array", description: "Structured acceptance criteria: [{ description, required? }]", items: { type: "object", properties: { description: { type: "string" }, required: { type: "boolean" } }, required: ["description"] } },
|
|
462
|
-
draftUuid: { type: "string", description: "Temporary UUID for intra-batch dependency references" },
|
|
463
|
-
dependsOnDraftUuids: { type: "array", description: "Dependent draftUuid list within this batch", items: { type: "string" } },
|
|
464
|
-
dependsOnTaskUuids: { type: "array", description: "Dependent existing Task UUID list", items: { type: "string" } },
|
|
465
|
-
},
|
|
466
|
-
required: ["title"],
|
|
467
|
-
},
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
required: ["projectUuid", "tasks"],
|
|
471
|
-
additionalProperties: false,
|
|
472
|
-
},
|
|
473
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
474
|
-
async execute(_id: string, { projectUuid, proposalUuid, tasks }: any) {
|
|
475
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
476
|
-
const args: Record<string, any> = { projectUuid, tasks };
|
|
477
|
-
if (proposalUuid !== undefined) args.proposalUuid = proposalUuid;
|
|
478
|
-
const result = await mcpClient.callTool("chorus_create_tasks", args);
|
|
479
|
-
return JSON.stringify(result, null, 2);
|
|
480
|
-
},
|
|
481
|
-
});
|
|
482
|
-
|
|
483
|
-
api.registerTool({
|
|
484
|
-
name: "chorus_update_task",
|
|
485
|
-
description:
|
|
486
|
-
"Update a task — edit fields, manage dependencies, or change status.\n\n" +
|
|
487
|
-
"**Field editing** (any role): title, description, priority, storyPoints, addDependsOn/removeDependsOn (incremental dependency management).\n\n" +
|
|
488
|
-
"**Status update** (assignee only): in_progress (requires all dependencies resolved), to_verify.\n\n" +
|
|
489
|
-
"For Quick Tasks: create → claim → edit details → execute → verify → done.",
|
|
490
|
-
parameters: {
|
|
491
|
-
type: "object",
|
|
492
|
-
properties: {
|
|
493
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
494
|
-
status: { type: "string", description: "New status: in_progress | to_verify (assignee only)" },
|
|
495
|
-
sessionUuid: { type: "string", description: "Session UUID for sub-agent identification" },
|
|
496
|
-
title: { type: "string", description: "New task title" },
|
|
497
|
-
description: { type: "string", description: "New task description (supports @mentions)" },
|
|
498
|
-
priority: { type: "string", description: 'New priority: "low", "medium", or "high"' },
|
|
499
|
-
storyPoints: { type: "number", description: "New effort estimate (agent hours)" },
|
|
500
|
-
addDependsOn: { type: "array", description: "Task UUIDs to add as dependencies", items: { type: "string" } },
|
|
501
|
-
removeDependsOn: { type: "array", description: "Task UUIDs to remove from dependencies", items: { type: "string" } },
|
|
502
|
-
},
|
|
503
|
-
required: ["taskUuid"],
|
|
504
|
-
additionalProperties: false,
|
|
505
|
-
},
|
|
506
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
507
|
-
async execute(_id: string, { taskUuid, status, sessionUuid, title, description, priority, storyPoints, addDependsOn, removeDependsOn }: any) {
|
|
508
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
509
|
-
const args: Record<string, any> = { taskUuid };
|
|
510
|
-
if (status !== undefined) args.status = status;
|
|
511
|
-
if (sessionUuid !== undefined) args.sessionUuid = sessionUuid;
|
|
512
|
-
if (title !== undefined) args.title = title;
|
|
513
|
-
if (description !== undefined) args.description = description;
|
|
514
|
-
if (priority !== undefined) args.priority = priority;
|
|
515
|
-
if (storyPoints !== undefined) args.storyPoints = storyPoints;
|
|
516
|
-
if (addDependsOn !== undefined) args.addDependsOn = addDependsOn;
|
|
517
|
-
if (removeDependsOn !== undefined) args.removeDependsOn = removeDependsOn;
|
|
518
|
-
const result = await mcpClient.callTool("chorus_update_task", args);
|
|
519
|
-
return JSON.stringify(result, null, 2);
|
|
520
|
-
},
|
|
521
|
-
});
|
|
522
|
-
|
|
523
|
-
api.registerTool({
|
|
524
|
-
name: "chorus_search",
|
|
525
|
-
description: "Search across tasks, ideas, proposals, documents, projects, and project groups.",
|
|
526
|
-
parameters: {
|
|
527
|
-
type: "object",
|
|
528
|
-
properties: {
|
|
529
|
-
query: { type: "string", description: "Search query (matches title, description, content)" },
|
|
530
|
-
scope: { type: "string", enum: ["global", "group", "project"], description: "Search scope (default: global)" },
|
|
531
|
-
scopeUuid: { type: "string", description: "Project group UUID (when scope=group) or project UUID (when scope=project)" },
|
|
532
|
-
entityTypes: { type: "array", items: { type: "string", enum: ["task", "idea", "proposal", "document", "project", "project_group"] }, description: "Entity types to search (default: all). Example: [\"task\", \"idea\"]" },
|
|
533
|
-
},
|
|
534
|
-
required: ["query"],
|
|
535
|
-
additionalProperties: false,
|
|
536
|
-
},
|
|
537
|
-
async execute(_id: string, { query, scope, scopeUuid, entityTypes }: { query: string; scope?: string; scopeUuid?: string; entityTypes?: string[] }) {
|
|
538
|
-
const args: Record<string, unknown> = { query };
|
|
539
|
-
if (scope) args.scope = scope;
|
|
540
|
-
if (scopeUuid) args.scopeUuid = scopeUuid;
|
|
541
|
-
if (entityTypes) args.entityTypes = entityTypes;
|
|
542
|
-
const result = await mcpClient.callTool("chorus_search", args);
|
|
543
|
-
return JSON.stringify(result, null, 2);
|
|
544
|
-
},
|
|
545
|
-
});
|
|
546
|
-
}
|
package/src/tools/dev-tools.ts
DELETED
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import type { ChorusMcpClient } from "../mcp-client.js";
|
|
2
|
-
|
|
3
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
-
export function registerDevTools(api: any, mcpClient: ChorusMcpClient) {
|
|
5
|
-
api.registerTool({
|
|
6
|
-
name: "chorus_claim_task",
|
|
7
|
-
description: "Claim an open task (open -> assigned)",
|
|
8
|
-
parameters: {
|
|
9
|
-
type: "object",
|
|
10
|
-
properties: {
|
|
11
|
-
taskUuid: { type: "string", description: "Task UUID to claim" },
|
|
12
|
-
},
|
|
13
|
-
required: ["taskUuid"],
|
|
14
|
-
additionalProperties: false,
|
|
15
|
-
},
|
|
16
|
-
async execute(_id: string, { taskUuid }: { taskUuid: string }) {
|
|
17
|
-
const result = await mcpClient.callTool("chorus_claim_task", { taskUuid });
|
|
18
|
-
return JSON.stringify(result, null, 2);
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
// chorus_update_task — migrated to common-tools.ts (available to all roles, enhanced with field editing)
|
|
23
|
-
|
|
24
|
-
api.registerTool({
|
|
25
|
-
name: "chorus_report_work",
|
|
26
|
-
description: "Report work progress or completion on a task",
|
|
27
|
-
parameters: {
|
|
28
|
-
type: "object",
|
|
29
|
-
properties: {
|
|
30
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
31
|
-
report: { type: "string", description: "Work report content" },
|
|
32
|
-
status: { type: "string", description: "Optional: update status at the same time (in_progress | to_verify)" },
|
|
33
|
-
sessionUuid: { type: "string", description: "Session UUID for sub-agent identification" },
|
|
34
|
-
},
|
|
35
|
-
required: ["taskUuid", "report"],
|
|
36
|
-
additionalProperties: false,
|
|
37
|
-
},
|
|
38
|
-
async execute(_id: string, { taskUuid, report, status, sessionUuid }: { taskUuid: string; report: string; status?: string; sessionUuid?: string }) {
|
|
39
|
-
const args: Record<string, unknown> = { taskUuid, report };
|
|
40
|
-
if (status) args.status = status;
|
|
41
|
-
if (sessionUuid) args.sessionUuid = sessionUuid;
|
|
42
|
-
const result = await mcpClient.callTool("chorus_report_work", args);
|
|
43
|
-
return JSON.stringify(result, null, 2);
|
|
44
|
-
},
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
api.registerTool({
|
|
48
|
-
name: "chorus_submit_for_verify",
|
|
49
|
-
description: "Submit task for human verification (in_progress -> to_verify)",
|
|
50
|
-
parameters: {
|
|
51
|
-
type: "object",
|
|
52
|
-
properties: {
|
|
53
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
54
|
-
summary: { type: "string", description: "Work summary" },
|
|
55
|
-
},
|
|
56
|
-
required: ["taskUuid"],
|
|
57
|
-
additionalProperties: false,
|
|
58
|
-
},
|
|
59
|
-
async execute(_id: string, { taskUuid, summary }: { taskUuid: string; summary?: string }) {
|
|
60
|
-
const args: Record<string, unknown> = { taskUuid };
|
|
61
|
-
if (summary) args.summary = summary;
|
|
62
|
-
const result = await mcpClient.callTool("chorus_submit_for_verify", args);
|
|
63
|
-
return JSON.stringify(result, null, 2);
|
|
64
|
-
},
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
api.registerTool({
|
|
68
|
-
name: "chorus_report_criteria_self_check",
|
|
69
|
-
description: "Report self-check results on acceptance criteria for a task you're working on. For required criteria, keep working until all pass. Only mark optional criteria as failed if out of scope.",
|
|
70
|
-
parameters: {
|
|
71
|
-
type: "object",
|
|
72
|
-
properties: {
|
|
73
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
74
|
-
criteria: {
|
|
75
|
-
type: "array",
|
|
76
|
-
description: "Array of { uuid, devStatus: 'passed'|'failed', devEvidence?: string }",
|
|
77
|
-
items: {
|
|
78
|
-
type: "object",
|
|
79
|
-
properties: {
|
|
80
|
-
uuid: { type: "string", description: "AcceptanceCriterion UUID" },
|
|
81
|
-
devStatus: { type: "string", description: "Self-check result: passed | failed" },
|
|
82
|
-
devEvidence: { type: "string", description: "Optional evidence/notes" },
|
|
83
|
-
},
|
|
84
|
-
required: ["uuid", "devStatus"],
|
|
85
|
-
},
|
|
86
|
-
},
|
|
87
|
-
},
|
|
88
|
-
required: ["taskUuid", "criteria"],
|
|
89
|
-
additionalProperties: false,
|
|
90
|
-
},
|
|
91
|
-
async execute(_id: string, { taskUuid, criteria }: { taskUuid: string; criteria: Array<{ uuid: string; devStatus: string; devEvidence?: string }> }) {
|
|
92
|
-
const result = await mcpClient.callTool("chorus_report_criteria_self_check", { taskUuid, criteria });
|
|
93
|
-
return JSON.stringify(result, null, 2);
|
|
94
|
-
},
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
}
|