@chorus-aidlc/chorus-openclaw-plugin 0.2.2 → 0.2.3
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/tools/admin-tools.ts +41 -0
package/package.json
CHANGED
package/src/tools/admin-tools.ts
CHANGED
|
@@ -44,6 +44,47 @@ export function registerAdminTools(api: any, mcpClient: ChorusMcpClient) {
|
|
|
44
44
|
},
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
+
api.registerTool({
|
|
48
|
+
name: "chorus_admin_approve_proposal",
|
|
49
|
+
description:
|
|
50
|
+
"Approve a Proposal (Admin exclusive). On approval, documentDrafts and taskDrafts are automatically materialized into real Document and Task entities — materialized Tasks can then be claimed and executed by agents. " +
|
|
51
|
+
"⚠️ This action is irreversible — unless there is a special reason, you MUST obtain explicit human approval before calling this tool.",
|
|
52
|
+
parameters: {
|
|
53
|
+
type: "object",
|
|
54
|
+
properties: {
|
|
55
|
+
proposalUuid: { type: "string", description: "Proposal UUID" },
|
|
56
|
+
reviewNote: { type: "string", description: "Optional review note" },
|
|
57
|
+
},
|
|
58
|
+
required: ["proposalUuid"],
|
|
59
|
+
additionalProperties: false,
|
|
60
|
+
},
|
|
61
|
+
async execute(_id: string, { proposalUuid, reviewNote }: { proposalUuid: string; reviewNote?: string }) {
|
|
62
|
+
const args: Record<string, unknown> = { proposalUuid };
|
|
63
|
+
if (reviewNote) args.reviewNote = reviewNote;
|
|
64
|
+
const result = await mcpClient.callTool("chorus_admin_approve_proposal", args);
|
|
65
|
+
return JSON.stringify(result, null, 2);
|
|
66
|
+
},
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
api.registerTool({
|
|
70
|
+
name: "chorus_admin_verify_task",
|
|
71
|
+
description:
|
|
72
|
+
"Verify a Task (to_verify → done, Admin exclusive). Marks a task as completed after verification. Downstream tasks that depend on this task will only be unblocked after it is verified. " +
|
|
73
|
+
"⚠️ This action is irreversible — unless there is a special reason, you MUST obtain explicit human approval before calling this tool.",
|
|
74
|
+
parameters: {
|
|
75
|
+
type: "object",
|
|
76
|
+
properties: {
|
|
77
|
+
taskUuid: { type: "string", description: "Task UUID" },
|
|
78
|
+
},
|
|
79
|
+
required: ["taskUuid"],
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
},
|
|
82
|
+
async execute(_id: string, { taskUuid }: { taskUuid: string }) {
|
|
83
|
+
const result = await mcpClient.callTool("chorus_admin_verify_task", { taskUuid });
|
|
84
|
+
return JSON.stringify(result, null, 2);
|
|
85
|
+
},
|
|
86
|
+
});
|
|
87
|
+
|
|
47
88
|
api.registerTool({
|
|
48
89
|
name: "chorus_mark_acceptance_criteria",
|
|
49
90
|
description: "Mark acceptance criteria as passed or failed (admin verification). Blocked criteria prevent task from being verified (to_verify -> done).",
|