/**
 * 诊断码注册表 — 问题三十六 (Diagnostic Code Contract)。
 *
 * 核心规则:
 * - 诊断码格式 SF-{AREA}-{NNNN}，一旦发布不得复用
 * - blocking/critical 事件没有诊断码不得输出
 * - 每个 active code 必须有 title_zh、user_message_zh、recovery_hint_zh
 * - deprecated/removed code 不得复用
 */
export type DiagnosticSeverity = "blocking" | "critical" | "warning" | "advisory" | "info";
export type DiagnosticStatus = "active" | "deprecated" | "removed";
export type DiagnosticArea = "STATE" | "GUARD" | "VERIFY" | "DELIVER" | "FAILURE" | "DEGRADE" | "WORKSPACE" | "OBSERVE" | "DIAG" | "TEST" | "LANG" | "CONTRACT" | "PRIVACY" | "CMD";
export interface DiagnosticCodeEntry {
    code: string;
    area: DiagnosticArea;
    severity: DiagnosticSeverity;
    status: DiagnosticStatus;
    title_zh: string;
    user_message_zh: string;
    recovery_hint_zh: string;
    owner_component: string;
    evidence_refs: string[];
    replaced_by?: string;
}
export interface DiagnosticEvent {
    code: string;
    occurred_at: string;
    context: Record<string, unknown>;
    user_visible_message: string;
    contract_id?: string;
    task_id?: string;
}
export declare const TOOL_DIAGNOSTIC_CODES: {
    readonly planGate: "SF-PLAN-5001";
    readonly instructionContract: "SF-INSTR-5801";
    readonly oodMissingSummary: "SF-OOD-6601";
    readonly oodDeliveryBlock: "SF-OOD-6602";
    readonly backendMissingSummary: "SF-BACKEND-6701";
    readonly backendDeliveryBlock: "SF-BACKEND-6702";
    readonly codeObservabilityWorkPackage: "SF-OBS-6801";
    readonly codeObservabilityFinding: "SF-OBS-6802";
    readonly projectKnowledgeBlocked: "SF-PK-6901";
    readonly contractDraft: "SF-CONTRACT-0003";
    readonly verifyPlanMismatch: "SF-VERIFY-5002";
    readonly traceabilityMissing: "SF-TRACE-7301";
    readonly traceabilityBindingMissing: "SF-TRACE-7302";
    readonly traceabilityVerifyFailed: "SF-TRACE-7303";
    readonly traceabilityDeliveryBlocked: "SF-TRACE-7304";
};
/** 按 code 获取诊断码 */
export declare function getDiagnosticByCode(code: string): DiagnosticCodeEntry | undefined;
/** 列出所有诊断码 */
export declare function listAllDiagnostics(): DiagnosticCodeEntry[];
/** 按领域列出诊断码 */
export declare function listDiagnosticsByArea(area: DiagnosticArea): DiagnosticCodeEntry[];
/** 按 severity 列出诊断码 */
export declare function listDiagnosticsBySeverity(severity: DiagnosticSeverity): DiagnosticCodeEntry[];
/** 注册新诊断码（运行时） */
export declare function registerDiagnostic(entry: DiagnosticCodeEntry): {
    success: boolean;
    error?: string;
};
/** 创建诊断事件 */
export declare function createDiagnosticEvent(code: string, context?: Record<string, unknown>, contractId?: string, taskId?: string): DiagnosticEvent | null;
/** 验证所有 blocking/critical 事件必须有诊断码 */
export declare function validateDiagnosticCoverage(eventSeverities: Array<{
    severity: DiagnosticSeverity;
    has_code: boolean;
}>): Array<{
    severity: DiagnosticSeverity;
    error: string;
}>;
/** 重置注册表（测试用） */
export declare function resetDiagnosticRegistry(): void;
/** 获取诊断码统计 */
export declare function getDiagnosticStats(): {
    total: number;
    by_area: Record<string, number>;
    by_severity: Record<string, number>;
};
//# sourceMappingURL=diagnostic_registry.d.ts.map