@damper/mcp 0.3.4 → 0.3.6
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/README.md +26 -0
- package/dist/index.js +31 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -259,6 +259,32 @@ When you start a task, it's locked to prevent other agents from working on it si
|
|
|
259
259
|
- Different agent starting → fails with 409 (use `force: true` to take over)
|
|
260
260
|
- Complete or abandon → releases lock
|
|
261
261
|
|
|
262
|
+
### Recommended Workflow
|
|
263
|
+
|
|
264
|
+
When working on tasks, follow this workflow for best results:
|
|
265
|
+
|
|
266
|
+
1. **Start**: `start_task` → locks the task and returns project context
|
|
267
|
+
2. **Log start**: `add_note` with "Session started: <your goal>"
|
|
268
|
+
3. **Work**: Make changes, logging commits and decisions with `add_note`
|
|
269
|
+
4. **Log end**: `add_note` with "Session end: <summary, next steps>"
|
|
270
|
+
5. **Finish**: `complete_task` (done) or `abandon_task` (stopping)
|
|
271
|
+
|
|
272
|
+
**Note types to log:**
|
|
273
|
+
- Session start: `"Session started: implementing dark mode"`
|
|
274
|
+
- Commits: `"Committed abc123: Added theme provider"`
|
|
275
|
+
- Decisions: `"Decision: Using CSS variables because..."`
|
|
276
|
+
- Session end: `"Session end: Done theme provider, remaining: toggle UI"`
|
|
277
|
+
|
|
278
|
+
**Before completing:**
|
|
279
|
+
- Push all commits
|
|
280
|
+
- Log session end note
|
|
281
|
+
- Check if project context docs need updating
|
|
282
|
+
|
|
283
|
+
**Before abandoning:**
|
|
284
|
+
- Push any WIP commits
|
|
285
|
+
- Log session end with progress, blockers, next steps
|
|
286
|
+
- Provide summary for handoff
|
|
287
|
+
|
|
262
288
|
## Usage Examples
|
|
263
289
|
|
|
264
290
|
### Tasks
|
package/dist/index.js
CHANGED
|
@@ -635,7 +635,10 @@ server.registerTool('get_context_section', {
|
|
|
635
635
|
openWorldHint: false,
|
|
636
636
|
},
|
|
637
637
|
}, async ({ section }) => {
|
|
638
|
-
|
|
638
|
+
// Encode section for URL path - encodeURIComponent doesn't encode * which can cause
|
|
639
|
+
// issues with some proxies/CDNs that interpret * as a wildcard
|
|
640
|
+
const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
|
|
641
|
+
const data = await api('GET', `/api/agent/context/${encodedSection}`);
|
|
639
642
|
// Handle glob pattern response (multiple sections)
|
|
640
643
|
if (data.pattern && data.sections) {
|
|
641
644
|
const lines = [`**Sections matching "${data.pattern}":**\n`];
|
|
@@ -704,6 +707,33 @@ server.registerTool('update_context_section', {
|
|
|
704
707
|
structuredContent: result,
|
|
705
708
|
};
|
|
706
709
|
});
|
|
710
|
+
// Tool: Delete context section
|
|
711
|
+
server.registerTool('delete_context_section', {
|
|
712
|
+
title: 'Delete Context Section',
|
|
713
|
+
description: 'Delete a project context section. Use when documentation is outdated or no longer relevant.',
|
|
714
|
+
inputSchema: z.object({
|
|
715
|
+
section: z.string()
|
|
716
|
+
.regex(/^[a-z][a-z0-9-]{0,49}(\/[a-z][a-z0-9-]{0,49}){0,2}$/)
|
|
717
|
+
.describe('Section name or path to delete (e.g., "overview", "api/architecture")'),
|
|
718
|
+
}),
|
|
719
|
+
outputSchema: z.object({
|
|
720
|
+
success: z.boolean(),
|
|
721
|
+
section: z.string(),
|
|
722
|
+
}),
|
|
723
|
+
annotations: {
|
|
724
|
+
readOnlyHint: false,
|
|
725
|
+
destructiveHint: true,
|
|
726
|
+
idempotentHint: true,
|
|
727
|
+
openWorldHint: false,
|
|
728
|
+
},
|
|
729
|
+
}, async ({ section }) => {
|
|
730
|
+
const encodedSection = encodeURIComponent(section).replace(/\*/g, '%2A');
|
|
731
|
+
const result = await api('DELETE', `/api/agent/context/${encodedSection}`);
|
|
732
|
+
return {
|
|
733
|
+
content: [{ type: 'text', text: `🗑️ Deleted context section: ${result.section}` }],
|
|
734
|
+
structuredContent: result,
|
|
735
|
+
};
|
|
736
|
+
});
|
|
707
737
|
// Tool: Sync project context (bulk upload)
|
|
708
738
|
server.registerTool('sync_project_context', {
|
|
709
739
|
title: 'Sync Project Context',
|