// tools/register-governance-tools.ts — Registers Data Governance + Legal Compliance tools
import { z } from 'zod';
import { t } from '../i18n/index.js';
import { handleDataGovernance } from './data-governance.js';
import { handleLegalComplianceReport } from './legal-compliance-report.js';
import { safeLicensed } from './safe-handler.js';
export function registerGovernanceTools(server) {
    // data_governance — SPEC-030
    server.registerTool('data_governance', {
        description: t('tools.data_governance.description'),
        annotations: { readOnlyHint: true },
        inputSchema: {
            projectId: z.string().max(500).describe('Project ID'),
            subcommand: z
                .enum(['detect', 'retention-policy', 'privacy-notice', 'audit'])
                .describe('detect: find PII in a spec; retention-policy: generate retention policy for a model; ' +
                'privacy-notice: draft technical privacy notice for the project; ' +
                'audit: list all specs with PII and their compliance status'),
            specId: z
                .string()
                .max(500)
                .optional()
                .describe('Spec ID to analyze (required for detect subcommand)'),
            modelName: z
                .string()
                .max(500)
                .optional()
                .describe('Model name for retention-policy subcommand (default: User)'),
            specContent: z
                .string()
                .max(1_000_000)
                .optional()
                .describe('Raw spec content to analyze when specId is not available'),
        },
    }, safeLicensed('data_governance', async (args) => handleDataGovernance(args)));
    // legal_compliance_report — SPEC-131
    server.registerTool('legal_compliance_report', {
        description: 'Generate a legal compliance report for the project. ' +
            'Shows detected legal domains, applicable regulations by country, ' +
            'and per-spec compliance status. Use this to understand which laws ' +
            'and regulations apply to your project based on industry, target countries, and data types.',
        annotations: { readOnlyHint: true },
        inputSchema: {
            projectId: z.string().max(500).describe('Project ID'),
        },
    }, safeLicensed('legal_compliance_report', async (args) => handleLegalComplianceReport(args)));
}
//# sourceMappingURL=register-governance-tools.js.map