import type { TestFramework } from "./workspace.js";
import type { VerificationStatus } from "./verification.js";
export type WorkflowStatus = "completed" | "dry-run" | "rejected" | "cancelled" | "failed";
export type FileNamingStyle = "sibling" | "mirrored" | "unknown";
export interface WorkflowLimits {
    readonly maxModelCalls: number;
    readonly maxRetries: number;
    readonly contextBudgetBytes: number;
    readonly maxBytesPerFile: number;
}
export declare const DEFAULT_WORKFLOW_LIMITS: WorkflowLimits;
interface BaseWorkflowEvent {
    readonly schemaVersion: "1";
    readonly runId: string;
    readonly fingerprint: string;
    readonly seq: number;
    readonly ts: number;
}
export interface WorkflowStartedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:started";
    readonly workflowId: "unit-test-generation";
    readonly modelId: string;
    readonly applyEnabled: boolean;
    readonly limits: WorkflowLimits;
}
export interface ConventionsDetectedEvent extends BaseWorkflowEvent {
    readonly type: "conventions:detected";
    readonly framework: TestFramework;
    readonly testDirs: readonly string[];
    readonly fileNamingStyle: FileNamingStyle;
}
export interface ContextSelectedEvent extends BaseWorkflowEvent {
    readonly type: "context:selected";
    readonly entryCount: number;
    readonly usedBytes: number;
    readonly budgetBytes: number;
    readonly droppedForBudget: number;
}
export interface ModelCallStartedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:model:call:started";
    readonly attempt: number;
    readonly contextBytes: number;
}
export interface ModelCallCompletedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:model:call:completed";
    readonly attempt: number;
    readonly finishReason: string;
    readonly promptTokens: number;
    readonly completionTokens: number;
    readonly latencyMs: number;
}
export interface PatchValidatedEvent extends BaseWorkflowEvent {
    readonly type: "patch:validated";
    readonly ok: boolean;
    readonly patchBytes: number;
    readonly filesChanged: number;
    readonly rejectionCode?: string | undefined;
}
export interface PatchAppliedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:patch:applied";
    readonly changedFiles: number;
    readonly created: number;
    readonly deleted: number;
}
export interface VerificationResultEvent extends BaseWorkflowEvent {
    readonly type: "workflow:verification:result";
    readonly overallStatus: VerificationStatus;
    readonly stepCount: number;
    readonly passedCount: number;
    readonly durationMs: number;
}
export interface WorkflowCompletedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:completed";
    readonly status: WorkflowStatus;
    readonly durationMs: number;
}
export interface WorkflowFailedEvent extends BaseWorkflowEvent {
    readonly type: "workflow:failed";
    readonly errorCode: string;
    readonly message: string;
}
export type WorkflowEvent = WorkflowStartedEvent | ConventionsDetectedEvent | ContextSelectedEvent | ModelCallStartedEvent | ModelCallCompletedEvent | PatchValidatedEvent | PatchAppliedEvent | VerificationResultEvent | WorkflowCompletedEvent | WorkflowFailedEvent;
export interface WorkflowEventSink {
    readonly emit: (event: WorkflowEvent) => void;
}
export {};
//# sourceMappingURL=unit-test-events.d.ts.map