import type { ServeOptions, TaskDispatch } from '../index.ts'; import type { ServerContext } from './context.ts'; /** * Schedule a delayed dispatch, tracking the timer for cleanup on shutdown. * * No-ops once `context.stopping` is set — `server.stop()`'s timer-clearing * disposer has already run by then, so arming a new timer here would leak a * callback that fires against a stopped server instead of being cleared. */ export declare function scheduleDelayedDispatch(context: ServerContext, options: ServeOptions, task: TaskDispatch, delay: number): void; export declare function resolveTaskPriority(_context: ServerContext, _options: ServeOptions, task: TaskDispatch): number | undefined; export declare function dispatchTaskImpl(context: ServerContext, options: ServeOptions, task: TaskDispatch, { redispatch }?: { redispatch?: boolean; }): Promise; /** Send a cancel message to the worker handling a specific operation. */ export declare function cancelTask(context: ServerContext, operationId: string): boolean;