import { type ExecutionAttempt, type ExecutorCommand, type Message, type WorkerId } from '@platform-modules/chatgpt-orchestrator-protocol';
import type { OrchestratorService } from '@platform-modules/chatgpt-orchestrator-core';
import type { ExecutorBridge } from './executor-bridge.js';
export interface ExecutionContinuitySchedulerOptions {
    reconcileIntervalMs?: number;
    commandDeadlineMs?: number;
}
export interface ExecutionCommandPromptOptions {
    bootstrap?: string;
    followupPrompt?: string;
    followupRequiresCreate?: boolean;
    recoveryRequiresCreate?: boolean;
}
export declare function commandForExecutionAttempt(attempt: ExecutionAttempt, commandDeadlineMs?: number, prompts?: ExecutionCommandPromptOptions): ExecutorCommand;
/**
 * Recoverable application scheduler. All eligibility, policy, stall, blocking,
 * attempt, and idempotency semantics remain in OrchestratorService. This class
 * only turns already-authoritative scheduled attempts into durable executor
 * commands and periodically asks core for due candidates.
 */
export declare class ExecutionContinuityScheduler {
    private readonly service;
    private readonly bridge?;
    private readonly reconcileIntervalMs;
    private readonly commandDeadlineMs;
    private timer;
    private reconcilePromise;
    private readonly dispatching;
    constructor(service: OrchestratorService, bridge?: ExecutorBridge | undefined, options?: ExecutionContinuitySchedulerOptions);
    start(): void;
    stop(): void;
    dispatchAttemptForReason(workerId: WorkerId, reason: 'initial' | 'followup'): Promise<ExecutionAttempt>;
    dispatchAttempt(attempt: ExecutionAttempt): Promise<void>;
    dispatchMessage(message: Message): Promise<Message>;
    sendMessage(input: Parameters<OrchestratorService['sendMessage']>[0]): Promise<Message>;
    continueNow(workerId: WorkerId, options?: {
        overrideBlock?: boolean;
        idempotencyKey?: string;
    }): Promise<Awaited<ReturnType<OrchestratorService['continueNow']>>>;
    recoverDeliveryTimeout(workerId: WorkerId): Promise<ExecutionAttempt | null>;
    reconcile(): Promise<void>;
    private reconcileOnce;
}
//# sourceMappingURL=execution-continuity.d.ts.map