/**
 * Autofix PR Integration Types
 *
 * Types for automated PR creation with AI-powered security fixes.
 *
 * @module autofix/types
 */
import type { Finding, Severity } from "../certification/types.js";
import type { FixResult } from "../certification/autofix.js";
/**
 * How to group fixes into PRs
 */
export type AutofixGroupBy = "severity" | "file" | "pattern" | "single";
/**
 * Configuration for autofix PR generation
 */
export interface AutofixPRConfig {
    /** Project directory path */
    projectPath: string;
    /** Findings to fix */
    findings: Finding[];
    /** Branch name prefix */
    branchPrefix: string;
    /** Base branch to create PR against */
    baseBranch: string;
    /** How to group fixes into PRs */
    groupBy: AutofixGroupBy;
    /** Dry run - don't create actual PR */
    dryRun: boolean;
    /** Sign commits with Sigstore */
    signCommits: boolean;
    /** Include fixes marked as unsafe */
    includeUnsafe: boolean;
    /** GitHub remote name (default: "origin") */
    remoteName: string;
    /** PR title template (supports {{count}}, {{severity}}, {{files}}) */
    titleTemplate?: string;
    /** PR description template */
    descriptionTemplate?: string;
}
/**
 * Default PR configuration
 */
export declare const DEFAULT_AUTOFIX_PR_CONFIG: Omit<AutofixPRConfig, "projectPath" | "findings">;
/**
 * Result of creating an autofix PR
 */
export interface AutofixPRResult {
    /** PR number if created */
    prNumber?: number;
    /** PR URL if created */
    prUrl?: string;
    /** Branch name used */
    branch: string;
    /** Fixes that were applied */
    fixesApplied: FixResult[];
    /** Files that were modified */
    filesModified: string[];
    /** Commit SHA if committed */
    commitSha?: string;
    /** Whether this was a dry run */
    dryRun: boolean;
    /** Error message if failed */
    error?: string;
    /** Severity level of fixes in this PR */
    severity?: Severity;
}
/**
 * Grouped fixes ready for PR creation
 */
export interface AutofixGroup {
    /** Group identifier */
    groupId: string;
    /** Branch name for this group */
    branchName: string;
    /** Findings in this group */
    findings: Finding[];
    /** Severity level (for severity-based grouping) */
    severity?: Severity;
    /** File path (for file-based grouping) */
    file?: string;
    /** Pattern ID (for pattern-based grouping) */
    patternId?: string;
}
/**
 * Result of batch PR creation
 */
export interface BatchPRResult {
    /** Total findings processed */
    totalFindings: number;
    /** PRs created (or would be created in dry run) */
    prsCreated: AutofixPRResult[];
    /** Findings that couldn't be fixed */
    unfixable: Array<{
        findingId: string;
        reason: string;
    }>;
    /** Overall success status */
    success: boolean;
    /** Summary statistics */
    summary: {
        bySeverity: Partial<Record<Severity, number>>;
        byFile: Record<string, number>;
        byPattern: Record<string, number>;
    };
}
/**
 * Git operation result
 */
export interface GitResult {
    success: boolean;
    stdout?: string;
    stderr?: string;
    exitCode?: number;
    error?: string;
}
/**
 * Branch information
 */
export interface BranchInfo {
    name: string;
    current: boolean;
    remote?: string;
    tracking?: string;
    ahead: number;
    behind: number;
}
/**
 * Commit information for autofix
 */
export interface AutofixCommit {
    message: string;
    sha?: string;
    files: string[];
    author: string;
    coAuthors: string[];
    signed: boolean;
}
/**
 * PR metadata
 */
export interface PRMetadata {
    title: string;
    body: string;
    base: string;
    head: string;
    labels: string[];
    assignees: string[];
    reviewers: string[];
}
//# sourceMappingURL=types.d.ts.map