/**
 * MCP Handlers — Guard 审计 & 项目扫描
 *
 * 统一入口：autosnippet_guard
 *   无参数         → review 模式（自动 git diff 增量文件 + inline recipe）
 *   files: string[] → 指定文件检查（+ inline recipe）
 *   code: string    → 单文件内联检查
 */
import type { McpContext } from './types.js';
export interface GuardViolation {
    ruleId: string;
    message: string;
    severity: string;
    line?: number;
    snippet?: string;
    fixSuggestion?: string | null;
    [key: string]: unknown;
}
interface GuardViolationEnriched {
    ruleId: string;
    message: string;
    severity: string;
    line?: number;
    snippet?: string;
    fixSuggestion: string | null;
    recipe?: {
        title: string;
        doClause: string | null;
        dontClause: string | null;
        coreCode: string | null;
    };
}
export interface ReviewFileResult {
    filePath: string;
    language?: string;
    violations: GuardViolationEnriched[];
    summary: {
        total: number;
        errors: number;
        warnings: number;
    };
    error?: string;
}
interface GuardCheckArgs {
    code?: string;
    language?: string;
    filePath?: string;
    [key: string]: unknown;
}
interface GuardAuditArgs {
    files: Array<{
        path: string;
        content?: string;
    }>;
    scope?: string;
    [key: string]: unknown;
}
interface GuardReviewArgs {
    files?: Array<string | {
        path?: string;
        [key: string]: unknown;
    }>;
    [key: string]: unknown;
}
interface ScanProjectArgs {
    maxFiles?: number;
    includeContent?: boolean;
    contentMaxLines?: number;
    [key: string]: unknown;
}
export declare function guardCheck(ctx: McpContext, args: GuardCheckArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        language: string;
        violations: never[];
        summary: {
            total: number;
            errors: number;
            warnings: number;
        };
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
} | {
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        warnings?: "未能识别语言，部分语言相关规则可能未执行。建议提供 language 或 filePath 参数。"[] | undefined;
        language: string;
        violations: GuardViolation[];
        summary: {
            total: number;
            errors: number;
            warnings: number;
        };
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
export declare function guardAuditFiles(ctx: McpContext, args: GuardAuditArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        capabilityReport?: {
            executedChecks: Record<string, {
                total: number;
                executed: number;
                skipped: number;
            }>;
            skippedChecks: unknown[];
            boundaries: unknown[];
            uncertainResults: Array<{
                ruleId: string;
                message: string;
                layer: string;
                reason: string;
                detail: string;
            }>;
            checkCoverage: number;
        } | undefined;
        uncertainSummary?: {
            total: number;
            byLayer: Record<string, number>;
            byReason: Record<string, number>;
        } | undefined;
        boundaries?: unknown[] | undefined;
        crossFileViolations?: unknown[] | undefined;
        summary: {
            [key: string]: unknown;
            total: number;
            errors: number;
            warnings: number;
        };
        files: {
            filePath: string;
            language: string;
            violations: GuardViolation[];
            summary: {
                total: number;
                errors: number;
                warnings: number;
                uncertain?: number;
            };
        }[];
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
/**
 * Guard Review — 编码后的代码质量检查
 *
 * 设计要点:
 *   1. 无参数 → 自动从 git diff 检测增量文件（staged + unstaged + untracked）
 *   2. files: string[] → 指定文件路径（简化，不再要求对象数组）
 *   3. violations 内联 recipe 修复指南（doClause + coreCode）
 *   4. 防无限循环：reviewRound 计数 + MAX_REVIEW_ROUNDS 限制
 *   5. 不绑定 task ID — 代码检查独立于任务系统
 *
 * @param ctx MCP context with container
 * @param args { files?: string[] }
 */
export declare function guardReview(ctx: McpContext, args: GuardReviewArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        passed: boolean;
        files: never[];
        totalViolations: number;
        reviewRound: any;
        maxRoundsReached: boolean;
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
} | {
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        passed: boolean;
        files: never[];
        totalViolations: number;
        reviewRound: any;
        fileSource: string;
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
} | {
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        uncertainSummary?: {
            total: number;
            byLayer: Record<string, number>;
            byReason: Record<string, number>;
        } | undefined;
        uncertainResults?: unknown[] | undefined;
        passed: boolean;
        reviewRound: any;
        fileSource: string;
        files: ReviewFileResult[];
        totalViolations: number;
        summary: {
            total: number;
            errors: number;
            warnings: number;
            filesChecked: number;
        };
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
export declare function scanProject(ctx: McpContext, args: ScanProjectArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        targets: never[];
        files: never[];
        guardAudit: null;
        message: string;
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
} | {
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        targets: {
            name: string;
            type: string | undefined;
            packageName: string | undefined;
        }[];
        files: {
            name: string;
            path: string;
            targetName: string;
            content?: string;
            totalLines?: number;
            truncated?: boolean;
        }[];
        fileCount: number;
        guardAudit: {
            crossFileViolations?: unknown[] | undefined;
            summary: {
                [key: string]: unknown;
                total: number;
                errors: number;
                warnings: number;
            };
            filesWithViolations: {
                filePath: string;
                language: string;
                violations: GuardViolation[];
                summary: {
                    total: number;
                    errors: number;
                    warnings: number;
                    uncertain?: number;
                };
            }[];
        } | null;
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
interface ReverseAuditArgs {
    maxFiles?: number;
    [key: string]: unknown;
}
/**
 * 对所有 active rule Recipe 执行反向验证：
 *   - 检查 coreCode 引用的符号是否还存在
 *   - 检查 guard pattern 匹配率是否骤降
 */
export declare function guardReverseAudit(ctx: McpContext, args: ReverseAuditArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        totalRecipes: number;
        healthy: number;
        investigate: number;
        decay: number;
        drifts: {
            recipeId: string;
            title: string;
            recommendation: import("#service/guard/ReverseGuard.js").ReverseRecommendation;
            signals: import("#service/guard/ReverseGuard.js").PatternDriftSignal[];
        }[];
        allResults: {
            recipeId: string;
            title: string;
            recommendation: import("#service/guard/ReverseGuard.js").ReverseRecommendation;
            signalCount: number;
        }[];
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
interface CoverageMatrixArgs {
    [key: string]: unknown;
}
/**
 * 计算模块级 Guard 规则覆盖率矩阵
 */
export declare function guardCoverageMatrix(ctx: McpContext, _args: CoverageMatrixArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        overallCoverage: number;
        zeroModules: string[];
        lowModules: string[];
        modules: import("#service/guard/CoverageAnalyzer.js").ModuleCoverage[];
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
interface ComplianceReportArgs {
    [key: string]: unknown;
}
/**
 * 生成 3D 合规报告（compliance + coverage + confidence）
 * 包含完整 uncertain 消费数据
 */
export declare function guardComplianceReport(ctx: McpContext, _args: ComplianceReportArgs): Promise<{
    success: boolean;
    errorCode: string | null;
    message: string;
    data: {
        scores: {
            compliance: number;
            coverage: number;
            confidence: number;
        };
        qualityGate: {
            status: string;
            score: number;
            thresholds: {
                maxErrors: number;
                maxWarnings: number;
                minScore: number;
            };
        };
        summary: {
            filesScanned: number;
            totalViolations: number;
            errors: number;
            warnings: number;
            infos: number;
        };
        uncertainSummary: {
            total: number;
            byLayer: Record<string, number>;
            byReason: Record<string, number>;
        };
        boundaries: {
            type: string;
            description: string;
            affectedRules: string[];
            suggestedAction: string;
        }[];
        topViolations: any[];
        trend: {
            errorsChange: number;
            warningsChange: number;
            hasHistory: boolean;
        };
    } | null;
    meta: {
        source?: string | undefined;
        responseTimeMs?: number | undefined;
        version: string;
        tool?: string | undefined;
    };
}>;
export {};
