"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('tasks_bulk_priority', {
        description: 'Update priority for multiple tasks in one operation. ' +
            'Returns { updated: string[] } with IDs of successfully updated 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 update (1–100)'),
            priority: zod_1.z.enum(['critical', 'high', 'medium', 'low']).describe('New priority for all tasks'),
        },
    }, async ({ taskIds, priority }) => {
        const updated = [];
        for (const id of taskIds) {
            if (await mgr.updateTask(id, { priority }))
                updated.push(id);
        }
        return { content: [{ type: 'text', text: JSON.stringify({ updated }, null, 2) }] };
    });
}
