import type { Command } from 'commander'; import type { GapAnalysis } from '../schemas/gap-analysis.schema.js'; import type { BaselineDeltaItem } from '../baseline/baseline.schema.js'; /** * The structured result of diffing two analyze_app outputs. * Wraps `BaselineDelta` with source provenance (file labels, timestamps). */ export interface AnalyzeDiffResult { /** Human label for the "before" report (path by default). */ fromLabel: string; /** Human label for the "after" report (path by default). */ toLabel: string; /** ISO timestamp from the "before" report's analyzedAt field. */ fromAnalyzedAt: string; /** ISO timestamp from the "after" report's analyzedAt field. */ toAnalyzedAt: string; /** Release confidence from the "before" report (0–100, or null). */ fromReleaseConfidence: number | null; /** Release confidence from the "after" report (0–100, or null). */ toReleaseConfidence: number | null; /** Numeric delta: toReleaseConfidence − fromReleaseConfidence. Null if either is null. */ confidenceDelta: number | null; /** Direction of the confidence delta. */ direction: 'improved' | 'regressed' | 'unchanged' | 'unknown'; /** Findings present in "to" that were absent in "from" (new regressions). */ added: BaselineDeltaItem[]; /** Findings present in "from" that are absent in "to" (resolved issues). */ removed: BaselineDeltaItem[]; /** Same finding (path + category) with a changed severity between the two reports. */ changed: BaselineDeltaItem[]; /** One-line human summary. */ summary: string; } /** * Pure function: diff two GapAnalysis objects. * * Does NOT read files, make network requests, or touch disk. Both inputs must * already be validated GapAnalysis objects. * * @param from The "before" (baseline) analysis. * @param to The "after" (current) analysis. * @param opts Optional labels for provenance metadata. */ export declare function analyzeRunDiff(from: GapAnalysis, to: GapAnalysis, opts?: { fromLabel?: string; toLabel?: string; }): AnalyzeDiffResult; /** * Read and validate a GapAnalysis from a report.json file path. * Fails loudly on a missing/malformed/foreign file rather than diffing garbage. */ export declare function loadGapAnalysisFile(filePath: string, cwd?: string): Promise; export interface AnalyzeDiffOptions { from: string; to: string; labelFrom?: string; labelTo?: string; json?: boolean; } /** * Core of `analyze diff`, factored out for direct testing. * Loads both files, validates them, diffs them, and emits the result. */ export declare function runAnalyzeDiff(options: AnalyzeDiffOptions, out?: (line: string) => void): Promise; /** * Render an AnalyzeDiffResult as a human-readable Markdown report. * * The report is structured for readability in CI logs, GitHub PR comments, and * terminal output. It covers: * - Header with report labels and timestamps * - Confidence score delta with direction indicator * - Added / Removed / Changed findings as tables * - One-line summary */ export declare function formatAnalyzeDiffMarkdown(result: AnalyzeDiffResult): string; export declare function registerAnalyzeDiffCommand(program: Command): void; //# sourceMappingURL=analyze-diff-run.d.ts.map