// tools/register-learning-tools.ts — Registers auto-learning tools (SPEC-011/012)
// Keeps register-spec-tools.ts under the 400-line limit.
import { z } from 'zod';
import { t } from '../i18n/index.js';
import { safeLicensed } from './safe-handler.js';
import { handleCaptureLearning } from './capture-learning.js';
export function registerLearningTools(server) {
    // 1. capture_learning — SPEC-012
    server.registerTool('capture_learning', {
        description: t('tools.capture_learning.description'),
        inputSchema: {
            description: z
                .string()
                .describe('Natural language description of the pattern or improvement discovered'),
            specId: z
                .string()
                .optional()
                .describe('Target spec ID override (optional — auto-routed if omitted)'),
            subcommand: z
                .enum(['lesson'])
                .optional()
                .describe('lesson: capture a lesson into lessons-learned registry'),
            lessonType: z
                .enum([
                'bug-pattern',
                'arch-mismatch',
                'estimation-error',
                'tool-limitation',
                'test-complexity',
            ])
                .optional()
                .describe('Lesson type (required when subcommand is lesson)'),
            tags: z.array(z.string()).optional().describe('Search tags for the lesson (optional)'),
        },
    }, safeLicensed('capture_learning', async (args) => handleCaptureLearning(args)));
}
//# sourceMappingURL=register-learning-tools.js.map