"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('tasks_bulk_delete', {
        description: 'Delete multiple tasks in one operation. ' +
            'Returns { deleted: string[] } with IDs of successfully deleted tasks. ' +
            'Tasks that do not exist are silently skipped. This action is irreversible.',
        inputSchema: {
            taskIds: zod_1.z.array(zod_1.z.string().min(1).max(500)).min(1).max(100).describe('Array of task IDs to delete (1–100)'),
        },
    }, async ({ taskIds }) => {
        const deleted = [];
        for (const id of taskIds) {
            if (mgr.deleteTask(id))
                deleted.push(id);
        }
        return { content: [{ type: 'text', text: JSON.stringify({ deleted }, null, 2) }] };
    });
}
