"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('tasks_bulk_move', {
        description: 'Move multiple tasks to a new status in one operation. ' +
            'Returns { moved: string[] } with IDs of successfully moved tasks. ' +
            'Tasks that do not exist are silently skipped.',
        inputSchema: {
            taskIds: zod_1.z.array(zod_1.z.string().min(1).max(500)).min(1).max(100).describe('Array of task IDs to move (1–100)'),
            status: zod_1.z.enum(['backlog', 'todo', 'in_progress', 'review', 'done', 'cancelled']).describe('Target status for all tasks'),
        },
    }, async ({ taskIds, status }) => {
        const moved = [];
        for (const id of taskIds) {
            if (mgr.moveTask(id, status))
                moved.push(id);
        }
        return { content: [{ type: 'text', text: JSON.stringify({ moved }, null, 2) }] };
    });
}
