@damper/mcp 0.10.3 → 0.10.4

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.
Files changed (2) hide show
  1. package/dist/index.js +14 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -687,8 +687,8 @@ server.registerTool('complete_task', {
687
687
  reviewInstructions: z.string().optional().describe('What the reviewer should test or verify (markdown). Recommended when sending to review (default behavior). ' +
688
688
  'Write specific, actionable steps: what to test in the UI, what edge cases to check, ' +
689
689
  'what areas might break. Not a restatement of the summary.'),
690
- selfAssessment: SelfAssessmentSchema.optional().describe('Self-review of your session (required if you haven\'t called `review_task` separately). ' +
691
- 'Reflect on what went well, what knowledge was missing, what caused friction. Pass `{}` if nothing to report.'),
690
+ selfAssessment: z.any().optional().describe('Self-review of your session. Object with optional keys: missingContext (string[]), toolIssues (string[]), processGaps (string[]). ' +
691
+ 'Reflect on what went well, what knowledge was missing, what caused friction. Pass {} if nothing to report.'),
692
692
  }),
693
693
  outputSchema: z.object({
694
694
  id: z.string(),
@@ -702,8 +702,19 @@ server.registerTool('complete_task', {
702
702
  openWorldHint: false,
703
703
  },
704
704
  }, async ({ taskId, summary, commits, confirmations, skipReview, reviewInstructions, selfAssessment }) => {
705
+ // Coerce selfAssessment to a valid object — LLMs may pass strings, nulls, or malformed values
706
+ let assessment = {};
707
+ if (selfAssessment && typeof selfAssessment === 'object') {
708
+ assessment = selfAssessment;
709
+ }
710
+ else if (typeof selfAssessment === 'string') {
711
+ try {
712
+ assessment = JSON.parse(selfAssessment);
713
+ }
714
+ catch { /* use empty */ }
715
+ }
705
716
  try {
706
- const result = await api('POST', `/api/agent/tasks/${taskId}/complete`, { summary, commits, confirmations, skipReview, reviewInstructions, selfAssessment: selfAssessment ?? {} });
717
+ const result = await api('POST', `/api/agent/tasks/${taskId}/complete`, { summary, commits, confirmations, skipReview, reviewInstructions, selfAssessment: assessment });
707
718
  return {
708
719
  content: [{ type: 'text', text: formatCompleteTaskResponse(result) }],
709
720
  structuredContent: result,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/mcp",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "description": "MCP server for Damper task management",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {