import type { OrchestrationInput } from "../types.js"; import { type DurableSessionRuntime } from "./state.js"; /** * Put an item back at the HEAD of the FIFO. * * decide() peeks by popping. When the popped item turns out not to be * mergeable it has to go back — and appending it put it BEHIND everything * still queued: a FIFO of [kickoff, "do X", "cancel X"] dispatched the * kickoff and left ["cancel X", "do X"], so the next turn read the two in * the wrong order. The item was just popped from the head of the first * non-empty bucket, so the head of that bucket is exactly where it belongs. * If it no longer fits there (it always should — the bucket only shrank), * fall back to append rather than lose it. */ export declare function prependToFifo(runtime: DurableSessionRuntime, item: any): void; export declare function appendToFifo(runtime: DurableSessionRuntime, newItems: any[]): void; export declare function drain(runtime: DurableSessionRuntime): Generator; export declare function decide(runtime: DurableSessionRuntime): Generator; export { OrchestrationInput }; //# sourceMappingURL=queue.d.ts.map