@damper/mcp 0.3.11 → 0.3.13

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 +13 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -93,7 +93,7 @@ const FeedbackSummarySchema = z.object({
93
93
  title: z.string(),
94
94
  type: z.string(),
95
95
  voterCount: z.number(),
96
- linkedTaskId: z.string().optional(),
96
+ linkedTaskId: z.string().nullish(),
97
97
  });
98
98
  const FeedbackDetailSchema = z.object({
99
99
  id: z.string(),
@@ -102,7 +102,7 @@ const FeedbackDetailSchema = z.object({
102
102
  type: z.string(),
103
103
  status: z.string(),
104
104
  voteScore: z.number(),
105
- linkedTaskId: z.string().optional(),
105
+ linkedTaskId: z.string().nullish(),
106
106
  voters: z.array(z.object({ email: z.string(), plan: z.string() })),
107
107
  comments: z.array(z.object({ author: z.string(), body: z.string() })),
108
108
  });
@@ -779,9 +779,12 @@ server.registerTool('get_context_section', {
779
779
  openWorldHint: false,
780
780
  },
781
781
  }, async ({ section }) => {
782
- // Encode section for URL path - encodeURIComponent doesn't encode * which can cause
783
- // issues with some proxies/CDNs that interpret * as a wildcard
784
- const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
782
+ // Encode each path segment individually but preserve slashes for hierarchical sections
783
+ // Also encode * which can cause issues with some proxies/CDNs that interpret * as a wildcard
784
+ const encodedSection = section
785
+ .split('/')
786
+ .map(part => encodeURIComponent(part).replace(/\*/g, '%2A'))
787
+ .join('/');
785
788
  const data = await api('GET', `/api/agent/context/${encodedSection}`);
786
789
  // Handle glob pattern response (multiple sections)
787
790
  if (data.pattern && data.sections) {
@@ -871,7 +874,11 @@ server.registerTool('delete_context_section', {
871
874
  openWorldHint: false,
872
875
  },
873
876
  }, async ({ section }) => {
874
- const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
877
+ // Encode each path segment individually but preserve slashes
878
+ const encodedSection = section
879
+ .split('/')
880
+ .map(part => encodeURIComponent(part).replace(/\*/g, '%2A'))
881
+ .join('/');
875
882
  const result = await api('DELETE', `/api/agent/context/${encodedSection}`);
876
883
  return {
877
884
  content: [{ type: 'text', text: `🗑️ Deleted context section: ${result.section}` }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@damper/mcp",
3
- "version": "0.3.11",
3
+ "version": "0.3.13",
4
4
  "description": "MCP server for Damper task management",
5
5
  "author": "Damper <hello@usedamper.com>",
6
6
  "repository": {