import { AgentMessageBus } from './message-bus.js';
import type { WrfcChain } from './wrfc-types.js';
import { WrfcWorkmap } from './wrfc-workmap.js';
import { AgentWorktree } from './worktree.js';
import type { ConfigManager } from '../config/manager.js';
import type { AgentRecord } from '../tools/agent/index.js';
import type { ExecutionPlanManager } from '../core/execution-plan.js';
import type { RuntimeEventBus } from '../runtime/events/index.js';
import { type AgentManagerLike } from './wrfc-config.js';
export { extractScoreFromText, extractPassedFromText, extractIssuesFromText } from './wrfc-reporting.js';
type WrfcWorktreeOps = Pick<AgentWorktree, 'merge' | 'cleanup'>;
export declare class WrfcController {
    private readonly chains;
    private chainQueue;
    private unsubscribers;
    private activeChainCount;
    private readonly pendingParentChainIds;
    /** Constraints to inherit when a gate-retry child chain is created via the pending path. */
    private readonly pendingParentConstraints;
    private readonly sessionId;
    private readonly workmap;
    private readonly projectRoot;
    private runtimeBus;
    private readonly messageBus;
    private planManager;
    private readonly agentManager;
    private readonly configManager;
    private readonly createWorktree;
    constructor(runtimeBus: RuntimeEventBus, messageBus: Pick<AgentMessageBus, 'registerAgent'>, deps: {
        readonly agentManager: AgentManagerLike;
        readonly configManager: Pick<ConfigManager, 'get' | 'getCategory'>;
        readonly projectRoot: string;
        readonly surfaceRoot?: string | undefined;
        readonly createWorktree?: (() => WrfcWorktreeOps) | undefined;
    });
    createChain(engineerRecord: AgentRecord): WrfcChain;
    getSessionId(): string;
    getWorkmap(): WrfcWorkmap;
    setPlanManager(planManager: Pick<ExecutionPlanManager, 'getActive' | 'updateItem'>): void;
    setRuntimeBus(runtimeBus: RuntimeEventBus): void;
    getChain(chainId: string): WrfcChain | null;
    listChains(): WrfcChain[];
    dispose(): void;
    private transition;
    private setupListeners;
    private onAgentComplete;
    private onAgentFailed;
    private startReview;
    private processReview;
    private startFix;
    private runGates;
    private evaluateConstraints;
    private processGateResults;
    private scheduleChainCleanup;
    private checkAndRunGatesForAll;
    private autoCommit;
    private failChain;
    private dequeueNext;
    private findChainByAgentId;
    private generateWrfcId;
    private completeCurrentNode;
    private failCurrentNode;
    private createBaseChain;
    private attachPendingParentChain;
    private startEngineeringChain;
    private handleEngineerCompletion;
    private spawnWrfcAgent;
    private completeChainAsPassed;
    private safeDequeueNext;
}
//# sourceMappingURL=wrfc-controller.d.ts.map