feat(CF-301): Implement task_move_project function
Added task_move_project tool to move tasks between projects while preserving all relationships and history: Changes: - db.ts: Added getClient() for transaction support - crud.ts: Implemented taskMoveProject() with full transaction - index.ts: Wired up tool handler and import - tools/index.ts: Registered tool definition Preserves: - Task metadata (title, description, type, status, priority) - Checklist items - Linked commits - Delegations - Activity history - Task links (relates_to, blocks, duplicates) - Epic and version assignments - Embeddings Process: 1. Validates source task and target project exist 2. Generates new ID in target project 3. Transfers all related data in transaction 4. Marks old task as completed with reference 5. Creates duplicate link between tasks Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,7 @@ import {
|
||||
|
||||
import { testConnection, close } from './db.js';
|
||||
import { toolDefinitions } from './tools/index.js';
|
||||
import { taskAdd, taskList, taskShow, taskClose, taskUpdate, taskInvestigate } from './tools/crud.js';
|
||||
import { taskAdd, taskList, taskShow, taskClose, taskUpdate, taskInvestigate, taskMoveProject } from './tools/crud.js';
|
||||
import { taskSimilar, taskContext } from './tools/search.js';
|
||||
import { taskLink, checklistAdd, checklistToggle, taskResolveDuplicate } from './tools/relations.js';
|
||||
import { epicAdd, epicList, epicShow, epicAssign, epicClose } from './tools/epics.js';
|
||||
@@ -147,6 +147,13 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => {
|
||||
description: a.description,
|
||||
});
|
||||
break;
|
||||
case 'task_move_project':
|
||||
result = await taskMoveProject({
|
||||
id: a.id,
|
||||
target_project: a.target_project,
|
||||
reason: a.reason,
|
||||
});
|
||||
break;
|
||||
|
||||
// Search
|
||||
case 'task_similar':
|
||||
|
||||
Reference in New Issue
Block a user