import { CHECKS } from '../checks/registry.js'; import type { AuditResult } from '../findings/AuditResult.js'; import type { Finding } from '../findings/Finding.js'; import { type FindingStatus } from '../findings/status.js'; export interface CheckExplanation { id: string; name: string; description: string; domain?: string; effort?: string; impact?: string; complianceTags: string[]; } export interface FindingExplanation { id: string; title: string; status: FindingStatus; severity: Finding['riskLevel']; detail: string; remediation: string; affectedCount: number; affectedSample: string[]; /** Chains this finding is a step of, with whether fixing it breaks the chain. */ chains: Array<{ label: string; title: string; severity: Finding['riskLevel']; breaksChain: boolean; }>; /** The fix-first action that closes it, if it is open. */ action?: { rank: number; wave: string; title: string; }; /** Other checks that reported a finding with the same id in this run. */ alsoFrom?: string[]; } export interface Explanation { check: CheckExplanation; finding?: FindingExplanation; /** With --file and a check id: that check's findings in the run. */ findings?: Array<{ id: string; title: string; status: FindingExplanation['status']; severity: Finding['riskLevel']; }>; } /** The check a finding id belongs to: the longest check id it starts with. */ export declare function checkForFindingId(id: string): (typeof CHECKS)[number] | undefined; export declare function parseResult(json: string): AuditResult; /** Why an explanation could not be built; the command turns it into a CLI error with this advice. */ export declare class ExplainError extends Error { readonly suggestion: string; constructor(message: string, suggestion: string); } /** * Explain a check id, or a finding id from a run. With a run and the check's own id, list that * check's findings in the run. Throws ExplainError for an unknown id or a finding not in the run. */ export declare function explain(id: string, result?: AuditResult): Explanation; //# sourceMappingURL=explain.d.ts.map