import type { CronRunOutcome, JobData, JobExecution, JobExecutor, JobExecutorDeps } from './types.js';
import type { CronRunLogStore } from './run-log-store.js';
export declare class DefaultJobExecutor implements JobExecutor {
    private history;
    private runningJobs;
    private agentService;
    private messageBus;
    private heartbeatService;
    private sessionStore;
    private runLogStore;
    private getDefaultCronAgentId;
    setRunLogStore(store: CronRunLogStore | null): void;
    setDeps(deps: JobExecutorDeps): void;
    private buildCronOutboundMessage;
    execute(job: JobData, signal: AbortSignal, deps?: JobExecutorDeps): Promise<void>;
    /**
     * Perform the actual job work - integrate with AgentService
     */
    protected performJob(job: JobData, signal: AbortSignal): Promise<CronRunOutcome>;
    /**
     * Execute in main session - sends system event
     */
    private executeMainSession;
    /**
     * Execute in isolated mode - runs agent independently
     */
    private executeIsolated;
    /**
     * Basic execution without agent service (fallback)
     */
    private basicExecute;
    /**
     * Cancel a running job
     */
    cancelJob(jobId: string): boolean;
    /**
     * Get execution history for a job
     */
    getHistory(jobId: string, limit?: number): JobExecution[];
    /**
     * Get currently running executions
     */
    getRunningExecutions(): JobExecution[];
    /**
     * Check if a job is currently running
     */
    isRunning(jobId: string): boolean;
    /**
     * Get consecutive error count for a job
     */
    getConsecutiveErrors(jobId: string): number;
    /**
     * Calculate backoff delay for a job
     */
    calculateBackoff(jobId: string): number;
    /**
     * Clear old history entries
     */
    cleanupHistory(maxAgeDays?: number): void;
    private addToHistory;
}
