// tools/register-coverage-tools.ts — Registers the spec_coverage tool on the MCP server.
// SPEC-068: Test Coverage per Spec.
import { z } from 'zod';
import { safeLicensed } from './safe-handler.js';
import { handleSpecCoverage } from './spec-coverage.js';
/**
 * Registers the spec_coverage tool (SPEC-068) on the MCP server.
 * Requires a paid plan — coverage analysis is a Pro feature.
 */
export function registerCoverageTools(server) {
    server.registerTool('spec_coverage', {
        description: 'Analyze how many acceptance criteria in a spec are backed by real test files in your project. ' +
            'Performs static analysis across 10 ecosystems (TypeScript, Python, Go, Java, Rust, Swift, C#, PHP, Ruby, Kotlin). ' +
            'Returns a per-criterion breakdown with coverage grade (A/B/C/D) and identifies untested criteria as risk items.',
        inputSchema: {
            projectId: z.string().max(500).describe('Project ID returned by init_project'),
            specId: z
                .string()
                .max(500)
                .describe('Spec ID to analyze (e.g., "SPEC-001"), or "all" to analyze every spec in the project'),
        },
        annotations: {
            title: 'Spec Test Coverage',
            readOnlyHint: true,
        },
    }, safeLicensed('spec_coverage', async (args) => handleSpecCoverage(args)));
}
//# sourceMappingURL=register-coverage-tools.js.map