@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.
- package/dist/index.js +13 -6
- 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().
|
|
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().
|
|
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
|
|
783
|
-
// issues with some proxies/CDNs that interpret * as a wildcard
|
|
784
|
-
const encodedSection =
|
|
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
|
-
|
|
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}` }],
|