"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.register = register;
const zod_1 = require("zod");
function register(server, mgr) {
    server.registerTool('epics_unlink_task', {
        description: 'Remove a task from an epic (remove belongs_to relationship).',
        inputSchema: {
            taskId: zod_1.z.string().min(1).max(500).describe('Task ID to unlink'),
            epicId: zod_1.z.string().min(1).max(500).describe('Epic ID to unlink from'),
        },
    }, async ({ taskId, epicId }) => {
        const ok = mgr.unlinkTaskFromEpic(taskId, epicId);
        if (!ok)
            return { content: [{ type: 'text', text: 'Link not found' }], isError: true };
        return { content: [{ type: 'text', text: JSON.stringify({ taskId, epicId, unlinked: true }, null, 2) }] };
    });
}
