@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.
@@ -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 them as `confirmations` when calling `complete_task`:');
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 echoing back each checklist item you\'ve verified. ' +
599
- 'The server will reject completion if any items are missing.\n\n' +
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.string()).optional().describe('Completion checklist confirmations — echo back each item from the checklist shown in start_task'),
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,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/mcp",
3
- "version": "0.5.2",
3
+ "version": "0.6.1",
4
4
  "description": "MCP server for Damper task management",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {