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

@@ -3,6 +3,7 @@
import { query, queryOne, execute, getNextTaskId, getProjectKey } from '../db.js';
import { getEmbedding, formatEmbedding } from '../embeddings.js';
import type { Task, ChecklistItem, TaskLink } from '../types.js';
import { getRecentDelegations } from './delegations.js';
interface TaskAddArgs {
title: string;
@@ -225,6 +226,12 @@ export async function taskShow(id: string): Promise<string> {
}
}
// Get recent delegations
const delegationHistory = await getRecentDelegations(id);
if (delegationHistory) {
output += delegationHistory;
}
return output;
}