/**
 * CI Watch/Fix Loop
 *
 * After a push, watches CI status using an agent-based approach and attempts
 * automatic fixes when CI fails. The agent follows CI/CD best practices:
 * checks ALL runs, waits for ALL to complete, and reports accurate status.
 *
 * Respects configurable max attempts, timeout, and log size from settings.
 */
import type { IAgentExecutor } from '../../../../../../application/ports/output/agents/agent-executor.interface.js';
import type { IFeatureRepository } from '../../../../../../application/ports/output/repositories/feature-repository.interface.js';
import type { IGitPrService } from '../../../../../../application/ports/output/services/git-pr-service.interface.js';
import { CiStatus, type CiFixRecord } from '../../../../../../domain/generated/output.js';
import type { NodeLogger } from '../node-helpers.js';
import type { AgentExecutionOptions } from '../../../../../../application/ports/output/agents/agent-executor.interface.js';
export interface CiWatchFixDeps {
    executor: IAgentExecutor;
    gitPrService: IGitPrService;
    featureRepository: Pick<IFeatureRepository, 'findById' | 'update'>;
}
export interface CiWatchFixParams {
    cwd: string;
    branch: string;
    options: AgentExecutionOptions;
    feature: Awaited<ReturnType<Pick<IFeatureRepository, 'findById'>['findById']>>;
    prUrl: string | null;
    prNumber: number | null;
    existingAttempts: number;
    messages: string[];
    log: NodeLogger;
}
export type CiFixStatusValue = 'idle' | 'watching' | 'fixing' | 'success' | 'exhausted' | 'timeout';
export interface CiWatchFixResult {
    ciStatus: CiStatus;
    ciFixAttempts: number;
    ciFixHistory: CiFixRecord[];
    ciFixStatus: CiFixStatusValue;
}
/**
 * Run the CI watch/fix loop. Watches for the initial CI result using an
 * agent-based approach, then iteratively attempts fixes up to the configured maximum.
 *
 * Throws on timeout or exhausted attempts (after updating feature state).
 */
export declare function runCiWatchFixLoop(deps: CiWatchFixDeps, params: CiWatchFixParams): Promise<CiWatchFixResult>;
//# sourceMappingURL=ci-watch-fix-loop.d.ts.map