import { z } from 'zod';
import { handlePlanTeamDistribution } from './plan-team-distribution.js';
import { handleGenerateTeammatePrompt } from './generate-teammate-prompt.js';
import { handleValidateTeamResults } from './validate-team-results.js';
import { safeLicensed } from './safe-handler.js';
export function registerTeamTools(server) {
    server.registerTool('plan_team_distribution', {
        description: 'Plan how to distribute approved specs across a team of Claude Code agents. ' +
            'Detects file conflicts, assigns ownership, and produces phased execution order.',
        inputSchema: {
            projectId: z.string().describe('Project identifier'),
            specIds: z.array(z.string()).describe('Spec IDs to distribute across the team'),
            template: z
                .string()
                .optional()
                .describe('Template ID: parallel-specs | implement-and-test. Defaults to parallel-specs.'),
        },
        annotations: { readOnlyHint: false },
    }, safeLicensed('plan_team_distribution', async (args) => handlePlanTeamDistribution(args)));
    server.registerTool('generate_teammate_prompt', {
        description: 'Generate a structured prompt for a single teammate in an Agent Team. ' +
            'Includes spec criteria, owned files, forbidden files, quality rules, and validation commands.',
        inputSchema: {
            projectId: z.string().describe('Project identifier'),
            specId: z.string().describe('Spec ID assigned to this teammate'),
            teammateName: z.string().describe('Unique name for this teammate'),
            assignedFiles: z
                .array(z.string())
                .describe('Files this teammate has exclusive write access to'),
            role: z
                .enum(['planner', 'implementer', 'reviewer', 'tester', 'researcher'])
                .describe('Role: planner | implementer | reviewer | tester | researcher'),
        },
        annotations: { readOnlyHint: true },
    }, safeLicensed('generate_teammate_prompt', async (args) => handleGenerateTeammatePrompt(args)));
    server.registerTool('validate_team_results', {
        description: 'Validate the combined results from all teammates after parallel execution. ' +
            'Checks for file conflicts, criteria coverage, and recommends merge order.',
        inputSchema: {
            projectId: z.string().describe('Project identifier'),
            specIds: z.array(z.string()).describe('Spec IDs that were distributed'),
            teammateNames: z.array(z.string()).describe('Names of teammates whose results to validate'),
        },
        annotations: { readOnlyHint: true },
    }, safeLicensed('validate_team_results', async (args) => handleValidateTeamResults(args)));
}
//# sourceMappingURL=register-team-tools.js.map