@damper/mcp 0.5.2 ā 0.6.1
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/formatters.js +2 -1
- package/dist/index.js +23 -9
- package/package.json +1 -1
package/dist/formatters.js
CHANGED
|
@@ -19,7 +19,8 @@ export function formatStartTaskResponse(result) {
|
|
|
19
19
|
// Completion checklist - shown after critical rules so agent knows upfront
|
|
20
20
|
if (result.completionChecklist && result.completionChecklist.length > 0) {
|
|
21
21
|
lines.push('\nš **COMPLETION CHECKLIST (required for complete_task):**');
|
|
22
|
-
lines.push('You MUST verify each item and pass
|
|
22
|
+
lines.push('You MUST verify each item and pass as `confirmations` with evidence:');
|
|
23
|
+
lines.push('Format: `[{item: "...", evidence: "..."}]` ā evidence must be concrete proof, not just repeating the item.');
|
|
23
24
|
for (const item of result.completionChecklist) {
|
|
24
25
|
lines.push(` ā” ${item}`);
|
|
25
26
|
}
|
package/dist/index.js
CHANGED
|
@@ -29,7 +29,7 @@ async function api(method, path, body) {
|
|
|
29
29
|
throw lockErr;
|
|
30
30
|
}
|
|
31
31
|
// Preserve checklist info for 400 checklist failures
|
|
32
|
-
if (res.status === 400 && err.missingItems) {
|
|
32
|
+
if (res.status === 400 && (err.missingItems || err.invalidEvidence)) {
|
|
33
33
|
const checklistErr = new Error(err.error || `HTTP ${res.status}`);
|
|
34
34
|
checklistErr.checklistInfo = err;
|
|
35
35
|
throw checklistErr;
|
|
@@ -595,8 +595,9 @@ server.registerTool('complete_task', {
|
|
|
595
595
|
'1. Push all commits\n' +
|
|
596
596
|
'2. Check if project context docs need updating\n\n' +
|
|
597
597
|
'**Completion checklist:** If the project has a completion checklist (shown in `start_task` response), ' +
|
|
598
|
-
'you MUST pass `confirmations` ā an array
|
|
599
|
-
'
|
|
598
|
+
'you MUST pass `confirmations` ā an array of `{item, evidence}` objects. Each confirmation needs the checklist item text ' +
|
|
599
|
+
'and concrete evidence proving you verified it (e.g., test output, build log snippet). ' +
|
|
600
|
+
'Empty evidence or evidence identical to the item text will be rejected.\n\n' +
|
|
600
601
|
'**Commits:** Pass commits array to log them at completion (convenience for final commits).\n\n' +
|
|
601
602
|
'Returns documentation update suggestions.',
|
|
602
603
|
inputSchema: z.object({
|
|
@@ -606,7 +607,10 @@ server.registerTool('complete_task', {
|
|
|
606
607
|
hash: z.string().describe('Commit hash (short or full)'),
|
|
607
608
|
message: z.string().describe('Commit message'),
|
|
608
609
|
})).optional().describe('Optional: commits to log at completion'),
|
|
609
|
-
confirmations: z.array(z.
|
|
610
|
+
confirmations: z.array(z.object({
|
|
611
|
+
item: z.string().describe('Checklist item text from start_task'),
|
|
612
|
+
evidence: z.string().describe('Concrete proof of verification (e.g., "bun test: 47 passed, 0 failed")'),
|
|
613
|
+
})).optional().describe('Completion checklist confirmations ā echo back each item from the checklist shown in start_task'),
|
|
610
614
|
}),
|
|
611
615
|
outputSchema: z.object({
|
|
612
616
|
id: z.string(),
|
|
@@ -630,15 +634,25 @@ server.registerTool('complete_task', {
|
|
|
630
634
|
catch (err) {
|
|
631
635
|
const error = err;
|
|
632
636
|
if (error.checklistInfo) {
|
|
633
|
-
const { missingItems, checklist } = error.checklistInfo;
|
|
637
|
+
const { missingItems, invalidEvidence, checklist } = error.checklistInfo;
|
|
634
638
|
const lines = [
|
|
635
639
|
'ā Completion blocked ā checklist not fully confirmed.',
|
|
636
640
|
'',
|
|
637
|
-
`**Missing ${missingItems.length} of ${checklist.length} items:**`,
|
|
638
|
-
...missingItems.map(item => ` ⢠${item}`),
|
|
639
|
-
'',
|
|
640
|
-
'Pass ALL checklist items in `confirmations` to complete the task.',
|
|
641
641
|
];
|
|
642
|
+
if (missingItems.length > 0) {
|
|
643
|
+
lines.push(`**Missing ${missingItems.length} of ${checklist.length} items:**`);
|
|
644
|
+
lines.push(...missingItems.map(item => ` ⢠${item}`));
|
|
645
|
+
lines.push('');
|
|
646
|
+
}
|
|
647
|
+
if (invalidEvidence && invalidEvidence.length > 0) {
|
|
648
|
+
lines.push(`**Invalid evidence for ${invalidEvidence.length} item(s):**`);
|
|
649
|
+
lines.push(...invalidEvidence.map(item => ` ⢠${item}`));
|
|
650
|
+
lines.push('');
|
|
651
|
+
lines.push('Evidence must be non-empty and different from the checklist item text.');
|
|
652
|
+
lines.push('Provide concrete proof (e.g., "bun test: 47 passed, 0 failed").');
|
|
653
|
+
lines.push('');
|
|
654
|
+
}
|
|
655
|
+
lines.push('Pass ALL checklist items in `confirmations` with valid evidence to complete the task.');
|
|
642
656
|
return {
|
|
643
657
|
content: [{ type: 'text', text: lines.join('\n') }],
|
|
644
658
|
isError: true,
|