// tools/register-changelog-tools.ts — Registers changelog and spec history tools.
import { z } from 'zod';
import { safeLicensed } from './safe-handler.js';
import { handleSpecHistory } from './spec-history.js';
export function registerChangelogTools(server) {
    // spec_history
    server.registerTool('spec_history', {
        description: 'View the changelog history of a spec — see what changed, when, and why. ' +
            'Shows criteria added/removed, status transitions, and reconciliation events. ' +
            'Returns an empty list if no changelog exists yet for this spec.',
        annotations: { title: 'Spec History', readOnlyHint: true },
        inputSchema: {
            specId: z.string().max(500).describe('Spec ID to retrieve history for (e.g. "SPEC-067")'),
            specDir: z
                .string()
                .max(4096)
                .describe('Absolute path to the spec directory containing CHANGELOG.md'),
            filter: z
                .string()
                .max(500)
                .optional()
                .describe('Filter by change type(s), comma-separated. ' +
                'Valid values: criteria_added | criteria_removed | status_changed | scope_changed | progress_updated | reconciled'),
        },
    }, safeLicensed('spec_history', async (args) => handleSpecHistory(args)));
}
//# sourceMappingURL=register-changelog-tools.js.map