@chorus-aidlc/chorus-openclaw-plugin 0.2.0 → 0.2.2
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/package.json +1 -1
- package/src/index.ts +2 -0
- package/src/tools/admin-tools.ts +76 -0
- package/src/tools/common-tools.ts +21 -12
- package/src/tools/dev-tools.ts +0 -29
- package/src/tools/pm-tools.ts +2 -6
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -8,6 +8,7 @@ import { ChorusEventRouter } from "./event-router.js";
|
|
|
8
8
|
import { registerPmTools } from "./tools/pm-tools.js";
|
|
9
9
|
import { registerDevTools } from "./tools/dev-tools.js";
|
|
10
10
|
import { registerCommonTools } from "./tools/common-tools.js";
|
|
11
|
+
import { registerAdminTools } from "./tools/admin-tools.js";
|
|
11
12
|
import { registerChorusCommands } from "./commands.js";
|
|
12
13
|
|
|
13
14
|
/**
|
|
@@ -134,6 +135,7 @@ const plugin = {
|
|
|
134
135
|
registerPmTools(api, mcpClient);
|
|
135
136
|
registerDevTools(api, mcpClient);
|
|
136
137
|
registerCommonTools(api, mcpClient);
|
|
138
|
+
registerAdminTools(api, mcpClient);
|
|
137
139
|
|
|
138
140
|
// --- Commands ---
|
|
139
141
|
registerChorusCommands(api, mcpClient, () => sseListener?.status ?? "disconnected");
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import type { ChorusMcpClient } from "../mcp-client.js";
|
|
2
|
+
|
|
3
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
4
|
+
export function registerAdminTools(api: any, mcpClient: ChorusMcpClient) {
|
|
5
|
+
api.registerTool({
|
|
6
|
+
name: "chorus_admin_create_project",
|
|
7
|
+
description: "Create a new project. Call chorus_get_project_groups first to find the right groupUuid.",
|
|
8
|
+
parameters: {
|
|
9
|
+
type: "object",
|
|
10
|
+
properties: {
|
|
11
|
+
name: { type: "string", description: "Project name" },
|
|
12
|
+
description: { type: "string", description: "Project description" },
|
|
13
|
+
groupUuid: { type: "string", description: "Project group UUID (optional, use chorus_get_project_groups to list groups)" },
|
|
14
|
+
},
|
|
15
|
+
required: ["name"],
|
|
16
|
+
additionalProperties: false,
|
|
17
|
+
},
|
|
18
|
+
async execute(_id: string, { name, description, groupUuid }: { name: string; description?: string; groupUuid?: string }) {
|
|
19
|
+
const args: Record<string, unknown> = { name };
|
|
20
|
+
if (description) args.description = description;
|
|
21
|
+
if (groupUuid) args.groupUuid = groupUuid;
|
|
22
|
+
const result = await mcpClient.callTool("chorus_admin_create_project", args);
|
|
23
|
+
return JSON.stringify(result, null, 2);
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
api.registerTool({
|
|
28
|
+
name: "chorus_admin_create_project_group",
|
|
29
|
+
description: "Create a new project group for organizing projects.",
|
|
30
|
+
parameters: {
|
|
31
|
+
type: "object",
|
|
32
|
+
properties: {
|
|
33
|
+
name: { type: "string", description: "Group name" },
|
|
34
|
+
description: { type: "string", description: "Group description" },
|
|
35
|
+
},
|
|
36
|
+
required: ["name"],
|
|
37
|
+
additionalProperties: false,
|
|
38
|
+
},
|
|
39
|
+
async execute(_id: string, { name, description }: { name: string; description?: string }) {
|
|
40
|
+
const args: Record<string, unknown> = { name };
|
|
41
|
+
if (description) args.description = description;
|
|
42
|
+
const result = await mcpClient.callTool("chorus_admin_create_project_group", args);
|
|
43
|
+
return JSON.stringify(result, null, 2);
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
api.registerTool({
|
|
48
|
+
name: "chorus_mark_acceptance_criteria",
|
|
49
|
+
description: "Mark acceptance criteria as passed or failed (admin verification). Blocked criteria prevent task from being verified (to_verify -> done).",
|
|
50
|
+
parameters: {
|
|
51
|
+
type: "object",
|
|
52
|
+
properties: {
|
|
53
|
+
taskUuid: { type: "string", description: "Task UUID" },
|
|
54
|
+
criteria: {
|
|
55
|
+
type: "array",
|
|
56
|
+
description: "Array of { uuid, status: 'passed'|'failed', evidence?: string }",
|
|
57
|
+
items: {
|
|
58
|
+
type: "object",
|
|
59
|
+
properties: {
|
|
60
|
+
uuid: { type: "string", description: "AcceptanceCriterion UUID" },
|
|
61
|
+
status: { type: "string", description: "Verification result: passed | failed" },
|
|
62
|
+
evidence: { type: "string", description: "Optional evidence/notes" },
|
|
63
|
+
},
|
|
64
|
+
required: ["uuid", "status"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
required: ["taskUuid", "criteria"],
|
|
69
|
+
additionalProperties: false,
|
|
70
|
+
},
|
|
71
|
+
async execute(_id: string, { taskUuid, criteria }: { taskUuid: string; criteria: Array<{ uuid: string; status: string; evidence?: string }> }) {
|
|
72
|
+
const result = await mcpClient.callTool("chorus_mark_acceptance_criteria", { taskUuid, criteria });
|
|
73
|
+
return JSON.stringify(result, null, 2);
|
|
74
|
+
},
|
|
75
|
+
});
|
|
76
|
+
}
|
|
@@ -351,26 +351,35 @@ export function registerCommonTools(api: any, mcpClient: ChorusMcpClient) {
|
|
|
351
351
|
},
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
// ---
|
|
354
|
+
// --- Project group tools ---
|
|
355
355
|
|
|
356
356
|
api.registerTool({
|
|
357
|
-
name: "
|
|
358
|
-
description: "
|
|
357
|
+
name: "chorus_get_project_groups",
|
|
358
|
+
description: "List all project groups. Returns groups with project counts and completion rates.",
|
|
359
|
+
parameters: {
|
|
360
|
+
type: "object",
|
|
361
|
+
properties: {},
|
|
362
|
+
additionalProperties: false,
|
|
363
|
+
},
|
|
364
|
+
async execute() {
|
|
365
|
+
const result = await mcpClient.callTool("chorus_get_project_groups", {});
|
|
366
|
+
return JSON.stringify(result, null, 2);
|
|
367
|
+
},
|
|
368
|
+
});
|
|
369
|
+
|
|
370
|
+
api.registerTool({
|
|
371
|
+
name: "chorus_get_project_group",
|
|
372
|
+
description: "Get a single project group with its projects and stats.",
|
|
359
373
|
parameters: {
|
|
360
374
|
type: "object",
|
|
361
375
|
properties: {
|
|
362
|
-
|
|
363
|
-
description: { type: "string", description: "Project description" },
|
|
364
|
-
groupUuid: { type: "string", description: "Project group UUID (optional, use chorus_get_project_groups to list groups)" },
|
|
376
|
+
groupUuid: { type: "string", description: "Project group UUID" },
|
|
365
377
|
},
|
|
366
|
-
required: ["
|
|
378
|
+
required: ["groupUuid"],
|
|
367
379
|
additionalProperties: false,
|
|
368
380
|
},
|
|
369
|
-
async execute(_id: string, {
|
|
370
|
-
const
|
|
371
|
-
if (description) args.description = description;
|
|
372
|
-
if (groupUuid) args.groupUuid = groupUuid;
|
|
373
|
-
const result = await mcpClient.callTool("chorus_admin_create_project", args);
|
|
381
|
+
async execute(_id: string, { groupUuid }: { groupUuid: string }) {
|
|
382
|
+
const result = await mcpClient.callTool("chorus_get_project_group", { groupUuid });
|
|
374
383
|
return JSON.stringify(result, null, 2);
|
|
375
384
|
},
|
|
376
385
|
});
|
package/src/tools/dev-tools.ts
CHANGED
|
@@ -113,33 +113,4 @@ export function registerDevTools(api: any, mcpClient: ChorusMcpClient) {
|
|
|
113
113
|
},
|
|
114
114
|
});
|
|
115
115
|
|
|
116
|
-
api.registerTool({
|
|
117
|
-
name: "chorus_mark_acceptance_criteria",
|
|
118
|
-
description: "Mark acceptance criteria as passed or failed (admin verification). Blocked criteria prevent task from being verified (to_verify -> done).",
|
|
119
|
-
parameters: {
|
|
120
|
-
type: "object",
|
|
121
|
-
properties: {
|
|
122
|
-
taskUuid: { type: "string", description: "Task UUID" },
|
|
123
|
-
criteria: {
|
|
124
|
-
type: "array",
|
|
125
|
-
description: "Array of { uuid, status: 'passed'|'failed', evidence?: string }",
|
|
126
|
-
items: {
|
|
127
|
-
type: "object",
|
|
128
|
-
properties: {
|
|
129
|
-
uuid: { type: "string", description: "AcceptanceCriterion UUID" },
|
|
130
|
-
status: { type: "string", description: "Verification result: passed | failed" },
|
|
131
|
-
evidence: { type: "string", description: "Optional evidence/notes" },
|
|
132
|
-
},
|
|
133
|
-
required: ["uuid", "status"],
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
},
|
|
137
|
-
required: ["taskUuid", "criteria"],
|
|
138
|
-
additionalProperties: false,
|
|
139
|
-
},
|
|
140
|
-
async execute(_id: string, { taskUuid, criteria }: { taskUuid: string; criteria: Array<{ uuid: string; status: string; evidence?: string }> }) {
|
|
141
|
-
const result = await mcpClient.callTool("chorus_mark_acceptance_criteria", { taskUuid, criteria });
|
|
142
|
-
return JSON.stringify(result, null, 2);
|
|
143
|
-
},
|
|
144
|
-
});
|
|
145
116
|
}
|
package/src/tools/pm-tools.ts
CHANGED
|
@@ -98,7 +98,7 @@ export function registerPmTools(api: any, mcpClient: ChorusMcpClient) {
|
|
|
98
98
|
// 5. chorus_create_proposal
|
|
99
99
|
api.registerTool({
|
|
100
100
|
name: "chorus_create_proposal",
|
|
101
|
-
description: "Create
|
|
101
|
+
description: "Create an empty Proposal container. Use chorus_add_document_draft and chorus_add_task_draft to populate it afterwards.",
|
|
102
102
|
parameters: {
|
|
103
103
|
type: "object",
|
|
104
104
|
properties: {
|
|
@@ -107,19 +107,15 @@ export function registerPmTools(api: any, mcpClient: ChorusMcpClient) {
|
|
|
107
107
|
inputType: { type: "string", description: 'Input source type: "idea" or "document"' },
|
|
108
108
|
inputUuids: { type: "array", description: "Array of input UUIDs", items: { type: "string" } },
|
|
109
109
|
description: { type: "string", description: "Proposal description" },
|
|
110
|
-
documentDrafts: { type: "array", description: "Array of { type, title, content }", items: { type: "object" } },
|
|
111
|
-
taskDrafts: { type: "array", description: "Array of { title, description?, priority?, storyPoints?, acceptanceCriteriaItems?, dependsOnDraftUuids? }", items: { type: "object" } },
|
|
112
110
|
},
|
|
113
111
|
required: ["projectUuid", "title", "inputType", "inputUuids"],
|
|
114
112
|
additionalProperties: false,
|
|
115
113
|
},
|
|
116
114
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
117
|
-
async execute(_id: string, { projectUuid, title, inputType, inputUuids, description
|
|
115
|
+
async execute(_id: string, { projectUuid, title, inputType, inputUuids, description }: any) {
|
|
118
116
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
119
117
|
const args: Record<string, any> = { projectUuid, title, inputType, inputUuids };
|
|
120
118
|
if (description !== undefined) args.description = description;
|
|
121
|
-
if (documentDrafts !== undefined) args.documentDrafts = documentDrafts;
|
|
122
|
-
if (taskDrafts !== undefined) args.taskDrafts = taskDrafts;
|
|
123
119
|
const result = await mcpClient.callTool("chorus_pm_create_proposal", args);
|
|
124
120
|
return JSON.stringify(result, null, 2);
|
|
125
121
|
},
|