import type { RunId } from '../../types/ids/index.js';
import type { Plan, PlanApprovalRequest, PlanApprovalResponse, PlanStep } from '../../types/plan/index.js';
export interface PlanEvent {
    type: 'plan.generating' | 'plan.ready' | 'plan.approved' | 'plan.rejected' | 'plan.executing' | 'plan.step_updated' | 'plan.completed' | 'plan.failed';
    plan: Plan;
    step?: PlanStep;
}
export type PlanEventListener = (event: PlanEvent) => void;
export type PlanApprovalHandler = (request: PlanApprovalRequest) => Promise<PlanApprovalResponse>;
export declare class PlanManager {
    private currentPlan;
    private runId;
    private listeners;
    private approvalHandler?;
    constructor(runId: RunId, approvalHandler?: PlanApprovalHandler);
    setApprovalHandler(handler: PlanApprovalHandler): void;
    on(listener: PlanEventListener): () => void;
    private emit;
    get active(): Plan | null;
    get isActive(): boolean;
    get needsApproval(): boolean;
    startGenerating(title: string): Plan;
    addStep(step: Omit<PlanStep, 'status'>): PlanStep | null;
    markReady(summary?: string): Plan | null;
    requestApproval(): Promise<PlanApprovalResponse>;
    approve(modifiedSteps?: PlanStep[]): Plan | null;
    startExecution(): Plan | null;
    updateStepStatus(stepId: string, status: PlanStep['status'], error?: string): PlanStep | null;
    completePlan(): Plan | null;
    failPlan(_error: string): Plan | null;
    getNextPendingStep(): PlanStep | null;
    reset(): void;
}
//# sourceMappingURL=lifecycle.d.ts.map