import { type ExecutorOptions } from './options'; import type { PrecisionTimer } from './precision-timer'; import type { ExecutorTaskStore } from './store'; import type { TaskHandlerRegistry } from './task-handler'; import type { ExecutorTracing, FireResult } from './tracing'; import type { ClaimedTask } from '../types'; export interface ExecutorHooks { onLeaseShorterThanLookahead?: (context: { lookaheadMs: number; leaseMs: number; }) => void; onMissingHandler?: (task: ClaimedTask) => void; onFireError?: (task: ClaimedTask, error: unknown) => void; onReleaseError?: (taskId: string, error: unknown) => void; onDispatch?: (taskType: string, lagSeconds: number) => void; onFire?: (taskType: string, result: 'success' | 'failure') => void; onRetry?: (taskType: string) => void; onLeaseLost?: (taskType: string) => void; } export declare class Executor { private readonly store; private readonly registry; private readonly timer; private readonly options; private readonly hooks; private readonly tracing; private readonly leaseMs; private readonly lookaheadMs; private readonly claimedTaskById; private stopping; constructor(store: ExecutorTaskStore, registry: TaskHandlerRegistry, timer: PrecisionTimer, options?: ExecutorOptions, hooks?: ExecutorHooks, tracing?: ExecutorTracing); claimAndSchedule(host: string, signal?: AbortSignal): Promise; private handBackClaims; private scheduleClaimed; fire(host: string, task: ClaimedTask): Promise; private runFire; private releaseClaimBestEffort; stop(): Promise; }