/** * Public enqueue knobs shared by command-lane callers and narrower injection * points that should not import the full queue implementation. */ export type CommandQueueEnqueueOptions = { warnAfterMs?: number; onWait?: (waitMs: number, queuedAhead: number) => void; taskTimeoutMs?: number; taskTimeoutProgressAtMs?: () => number | undefined; priority?: "foreground" | "normal" | "background"; }; /** Minimal queue function contract used by code that only needs to schedule work. */ export type CommandQueueEnqueueFn = ( task: () => Promise, opts?: CommandQueueEnqueueOptions, ) => Promise;