/** * Effect Scheduling (GAP-ROUTE-002). * * Priority-based scheduling for effect execution. Effects are enqueued * with a priority level and dequeued in priority order (highest first). * Enables orchestration to process critical effects before lower-priority ones. */ /** Priority levels for effect scheduling, from lowest to highest. */ export type EffectPriority = "low" | "normal" | "high" | "critical"; /** An effect entry in the priority queue. */ export interface ScheduledEffect { /** Unique identifier for the scheduled effect. */ id: string; /** Priority level. */ priority: EffectPriority; /** The effect payload. */ payload: T; /** When the effect was enqueued (ISO 8601). */ enqueuedAt: string; } /** Compare two priorities. Returns positive if a > b, negative if a < b. */ export declare function comparePriority(a: EffectPriority, b: EffectPriority): number; /** * Priority queue for scheduling effects. * * Effects are dequeued in priority order (critical first, then high, * normal, low). Within the same priority, FIFO ordering is preserved. */ export declare class EffectScheduler { private readonly queue; /** * Enqueue an effect with a given priority. */ enqueue(id: string, payload: T, priority?: EffectPriority): ScheduledEffect; /** * Dequeue the highest-priority effect. * Returns undefined if the queue is empty. */ dequeue(): ScheduledEffect | undefined; /** * Peek at the highest-priority effect without removing it. */ peek(): ScheduledEffect | undefined; /** * Get all scheduled effects in priority order (highest first). */ getAll(): ReadonlyArray>; /** * Get all effects with a specific priority. */ getByPriority(priority: EffectPriority): Array>; /** * Remove a specific effect by id. * Returns true if the effect was found and removed. */ remove(id: string): boolean; /** * Number of effects in the queue. */ get size(): number; /** * Whether the queue is empty. */ get isEmpty(): boolean; /** * Clear all scheduled effects. */ clear(): void; } //# sourceMappingURL=scheduling.d.ts.map