import type { MemoryWorkflowPort } from "@oscharko-dev/keiko-contracts";
import type { WorkflowHandoffRequest } from "@oscharko-dev/keiko-contracts/workflow-handoff";
import type { ModelPort } from "@oscharko-dev/keiko-harness";
import type { PatchChangeKind, SpawnFn, WorkspaceWriter } from "@oscharko-dev/keiko-tools";
import type { WorkspaceFs } from "@oscharko-dev/keiko-workspace";
import type { VerificationAuditSummary } from "@oscharko-dev/keiko-verification";
import type { BugWorkflowEventSink } from "./events.js";
import type { BugWorkflowLimits, BugWorkflowStatus } from "@oscharko-dev/keiko-contracts";
export type { BugWorkflowStatus, BugWorkflowLimits } from "@oscharko-dev/keiko-contracts";
export { DEFAULT_BUG_WORKFLOW_LIMITS } from "@oscharko-dev/keiko-contracts";
export interface FailureFrame {
    readonly file: string;
    readonly line?: number | undefined;
}
export interface FailureEvidence {
    readonly frames: readonly FailureFrame[];
    readonly messages: readonly string[];
}
export interface BugReportInput {
    readonly description?: string | undefined;
    readonly failingOutput?: string | undefined;
    readonly stackTrace?: string | undefined;
    readonly targetFiles?: readonly string[] | undefined;
}
export interface BugInvestigationInput {
    readonly workspaceRoot: string;
    readonly report: BugReportInput;
    readonly apply?: boolean | undefined;
    readonly modelId: string;
    readonly limits?: Partial<BugWorkflowLimits> | undefined;
}
export interface BugInvestigationDeps {
    readonly model: ModelPort;
    readonly fs?: WorkspaceFs | undefined;
    readonly writer?: WorkspaceWriter | undefined;
    readonly spawn?: SpawnFn | undefined;
    readonly now?: (() => number) | undefined;
    readonly idSource?: (() => string) | undefined;
    readonly sink?: BugWorkflowEventSink | undefined;
    readonly processEnv?: NodeJS.ProcessEnv | undefined;
    readonly signal?: AbortSignal | undefined;
    readonly memoryPort?: MemoryWorkflowPort | undefined;
    readonly workflowHandoff?: WorkflowHandoffRequest | undefined;
}
export interface VerifiedFindings {
    readonly patchValidates: boolean;
    readonly patchApplied: boolean;
    readonly verification?: VerificationAuditSummary | undefined;
    readonly failureFrames: readonly FailureFrame[];
}
export interface Hypothesis {
    readonly rootCause?: string | undefined;
    readonly regressionTestStrategy?: string | undefined;
    readonly uncertainty?: string | undefined;
    readonly confidence?: "low" | "medium" | "high" | undefined;
}
export interface ChangedFile {
    readonly path: string;
    readonly kind: PatchChangeKind;
    readonly addedLines: number;
    readonly removedLines: number;
    readonly elevatedReview: boolean;
}
export interface BugInvestigationReport {
    readonly workflowId: "bug-investigation";
    readonly status: BugWorkflowStatus;
    readonly modelId: string;
    readonly durationMs: number;
    readonly verified: VerifiedFindings;
    readonly hypothesis: Hypothesis;
    readonly proposedDiff?: string | undefined;
    readonly dryRunPreview?: string | undefined;
    readonly changedFiles: readonly ChangedFile[];
    readonly regressionCoverage: number;
    readonly verificationSkipReason?: string | undefined;
    readonly nextActions: readonly string[];
    readonly failureReason?: string | undefined;
    readonly modelCallCount: number;
    readonly patchRetryCount: number;
}
export interface ParsedBugOutput {
    readonly diff: string;
    readonly rootCause: string | undefined;
    readonly regressionTestStrategy: string | undefined;
    readonly uncertainty: string | undefined;
    readonly confidence: "low" | "medium" | "high" | undefined;
}
//# sourceMappingURL=types.d.ts.map