feat: Add delegation tracking MCP tools

Session 374: Task-MCP and Delegation System Integration (Phase 4 & 6)

- Add task_delegations tool: query delegations for a specific task
- Add task_delegation_query tool: query across all tasks by status/backend
- Enhance taskShow() to display recent delegation history
- New delegations.ts module with getRecentDelegations helper

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Christian Gick
2026-01-09 10:43:13 +02:00
parent df3e557c87
commit e21072ea54
4 changed files with 208 additions and 0 deletions

View File

@@ -22,6 +22,7 @@ import { taskAdd, taskList, taskShow, taskClose, taskUpdate } from './tools/crud
import { taskSimilar, taskContext } from './tools/search.js';
import { taskLink, checklistAdd, checklistToggle, taskResolveDuplicate } from './tools/relations.js';
import { epicAdd, epicList, epicShow, epicAssign } from './tools/epics.js';
import { taskDelegations, taskDelegationQuery } from './tools/delegations.js';
// Create MCP server
const server = new Server(
@@ -147,6 +148,18 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
});
break;
// Delegations
case 'task_delegations':
result = await taskDelegations({ task_id: a.task_id });
break;
case 'task_delegation_query':
result = await taskDelegationQuery({
status: a.status,
backend: a.backend,
limit: a.limit,
});
break;
default:
throw new Error(`Unknown tool: ${name}`);
}