/**
 * Auto Types (Simplified - Stop Hook Feedback Loop)
 *
 * Core principle: The increment's metadata.json status IS the state.
 * No complex session management needed.
 *
 * Extended with Success Criteria for LLM-based completion evaluation.
 */
/**
 * Success criteria type for auto mode completion evaluation
 * Determines when auto mode session should end
 */
export type SuccessCriteriaType = 'tasks_complete' | 'acs_satisfied' | 'tests_pass' | 'build_succeeds' | 'llm_evaluate' | 'custom_command';
/**
 * Individual success criterion for auto mode
 */
export interface SuccessCriterion {
    type: SuccessCriteriaType;
    description: string;
    required: boolean;
    command?: string;
    threshold?: number;
    model?: 'haiku' | 'sonnet' | 'opus';
}
/**
 * Result of evaluating a success criterion
 */
export interface CriterionEvaluationResult {
    criterion: SuccessCriterion;
    satisfied: boolean;
    reason: string;
    durationMs?: number;
}
/**
 * Result of full completion evaluation
 */
export interface CompletionEvaluationResult {
    complete: boolean;
    overallReason: string;
    confidence: number;
    results: CriterionEvaluationResult[];
    nextSteps: string[];
    durationMs: number;
}
/**
 * Default success criteria - what most projects need
 */
export declare const DEFAULT_SUCCESS_CRITERIA: SuccessCriterion[];
/**
 * Auto mode flag - the only state file needed
 * Stored at .specweave/state/auto-mode.json
 */
export interface AutoModeFlag {
    active: boolean;
    timestamp: string;
    incrementIds?: string[];
    tddMode?: boolean;
    requireTests?: boolean;
    successCriteria?: SuccessCriterion[];
    successSummary?: string;
    userGoal?: string;
    sessionId?: string;
}
/**
 * Completion condition types for quality gates
 * NOTE: These are checked by sw:done, NOT by auto mode itself
 */
export type CompletionConditionType = 'build' | 'tests' | 'e2e' | 'integration' | 'lint' | 'types' | 'coverage' | 'e2e-coverage' | 'command';
export interface CompletionCondition {
    type: CompletionConditionType;
    threshold?: number;
    cmd?: string;
    autoHeal?: boolean;
    maxRetries?: number;
    mandatory?: boolean;
    framework?: string;
    detectedCommand?: string;
}
/**
 * Auto config - includes legacy fields for backward compatibility
 */
export interface AutoConfig {
    enabled: boolean;
    maxIterations: number;
    maxTurns?: number;
    maxRetries?: number;
    requireTests?: boolean;
    requireValidation?: boolean;
    requireJudgeLLM?: boolean;
    requireLLMEval?: boolean;
    maxHours?: number;
    testCommand?: string;
    coverageThreshold?: number;
    enforceTestFirst?: boolean;
    humanGated?: {
        patterns: string[];
        timeout: number;
        neverAutoApprove: string[];
    };
    circuitBreakers?: {
        failureThreshold: number;
        resetTimeout: number;
    };
    sync?: {
        batchInterval: number;
        forceOnComplete: boolean;
    };
}
export declare const DEFAULT_AUTO_CONFIG: AutoConfig;
/**
 * @deprecated Use increment metadata.json status instead
 */
export type AutoSessionStatus = 'running' | 'paused' | 'completed' | 'failed' | 'cancelled';
/**
 * @deprecated Session state is no longer tracked - increment status IS the state
 */
export interface AutoSession {
    sessionId: string;
    status: AutoSessionStatus;
    startTime: string;
    endTime?: string;
    iteration: number;
    maxIterations: number;
    maxHours?: number;
    incrementQueue: string[];
    currentIncrement: string | null;
    completedIncrements: string[];
    failedIncrements: string[];
    humanGates: {
        pending: null;
        approved: string[];
        blocked: string[];
    };
    circuitBreakers: Record<string, unknown>;
    lastActivity: string;
    endReason?: string;
    simple?: boolean;
    completionConditions?: CompletionCondition[];
    tddMode?: boolean;
}
/**
 * @deprecated Log entries are no longer tracked in simplified auto mode
 */
export interface AutoLogEntry {
    timestamp: string;
    iteration: number;
    sessionId: string;
    event: 'start' | 'iteration' | 'task_complete' | 'task_failed' | 'gate_triggered' | 'gate_approved' | 'gate_blocked' | 'circuit_open' | 'circuit_close' | 'sync' | 'complete' | 'cancel' | 'error';
    details: Record<string, unknown>;
}
/**
 * @deprecated Session summary is no longer generated in simplified auto mode
 */
export interface SessionSummary {
    sessionId: string;
    startTime: string;
    endTime: string;
    duration: number;
    iterations: number;
    incrementsCompleted: number;
    incrementsFailed: number;
    totalTasks: number;
    totalTests: number;
    averageCoverage: number;
    humanGatesTriggered: number;
    circuitBreakerTrips: number;
    syncOperations: number;
    success: boolean;
    endReason: string;
}
/**
 * @deprecated Increment completion reports are no longer generated in simplified auto mode
 */
export interface IncrementCompletionReport {
    incrementId: string;
    sessionId: string;
    startTime: string;
    endTime: string;
    duration: number;
    tasksCompleted: number;
    tasksTotal: number;
    testsPassed: number;
    testsTotal: number;
    coveragePercent: number;
    humanGatesTriggered: number;
    humanGatesApproved: number;
    circuitBreakerTrips: number;
    syncOperations: number;
    success: boolean;
    endReason?: string;
}
//# sourceMappingURL=types.d.ts.map