// tools/register-registry-tools.ts — Registers SPEC-072 framework registry tools
// check_spec_accuracy: validates spec content against the framework registry
// update_registry: allows adding custom framework entries
import { safeTracked } from './safe-handler.js';
import { CheckSpecAccuracySchema, UpdateRegistrySchema } from './schemas/registry.js';
import { handleCheckSpecAccuracy } from './check-spec-accuracy.js';
import { handleUpdateRegistry } from './update-registry.js';
export function registerRegistryTools(server) {
    // check_spec_accuracy
    server.registerTool('check_spec_accuracy', {
        description: 'Validate spec content (HU.md text or acceptance criteria) against the framework registry ' +
            'to detect hallucinated APIs, deprecated patterns, and common mistakes. ' +
            'Returns a confidence score (0-100) and actionable suggestions.',
        inputSchema: {
            specContent: CheckSpecAccuracySchema.shape.specContent,
            frameworks: CheckSpecAccuracySchema.shape.frameworks,
        },
        annotations: {
            title: 'Check Spec Accuracy',
            readOnlyHint: true,
        },
    }, safeTracked('check_spec_accuracy', async (args) => handleCheckSpecAccuracy(args)));
    // update_registry
    server.registerTool('update_registry', {
        description: 'Add a custom framework entry to the local registry. ' +
            'Custom entries override base entries and are stored in data/global/registry-custom.json. ' +
            'Use this to register internal frameworks or override outdated base entries.',
        inputSchema: {
            framework: UpdateRegistrySchema.shape.framework,
            displayName: UpdateRegistrySchema.shape.displayName,
            ecosystem: UpdateRegistrySchema.shape.ecosystem,
            frameworkVersion: UpdateRegistrySchema.shape.frameworkVersion,
            correctPatterns: UpdateRegistrySchema.shape.correctPatterns,
            deprecatedPatterns: UpdateRegistrySchema.shape.deprecatedPatterns,
            commonMistakes: UpdateRegistrySchema.shape.commonMistakes,
        },
        annotations: {
            title: 'Update Framework Registry',
            destructiveHint: false,
        },
    }, safeTracked('update_registry', async (args) => handleUpdateRegistry(args)));
}
//# sourceMappingURL=register-registry-tools.js.map