import type { TaskRuntime } from "@yinuo-ngm/core";
import type { LogLine, TaskEventPayloadMap, TaskEventType, TaskOutputPayload } from "@yinuo-ngm/protocol";
import { WsContext } from "../ws.context";
import type { TopicHandler } from "../ws.router";
export type TaskWsDeps = {
    getTaskSnapshotByTaskId?: (taskId: string) => Promise<TaskRuntime | null>;
    getTaskTailLogsByRun?: (runId: string, tail: number) => Promise<LogLine[]>;
    resizeRun?: (taskId: string, cols: number, rows: number) => void;
};
export declare function createTaskTopicHandler(deps: TaskWsDeps, getAllClients: () => Iterable<WsContext>): TopicHandler & {
    pushOutput(payload: TaskOutputPayload): void;
    pushEvent<K extends TaskEventType>(type: K, payload: TaskEventPayloadMap[K]): void;
};
