import { type TaskRunCommands } from "#execution/tasks/table.js"; import { type SessionStepState } from "#execution/publish-session-events.js"; import { type SessionStateTransition } from "#execution/session/state-delta.js"; import type { WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js"; import type { TaskCancelReason } from "#protocol/message.js"; /** The messages a task's run sends that change its record. */ export type TaskRunMessage = Extract; /** Applies one message from a task's run: started, a reply, usage no reply carried, or the run's outcome. */ export declare function applyTaskRunMessageStep(input: SessionStepState & { readonly message: TaskRunMessage; }): Promise; /** * Cancels tasks: their calls settle as cancelled and their runs are told to * stop. A run ends itself within its cleanup deadline and reports cancelled. * A `task()` run's cancel settles every request it relayed, so the session * withdraws them in the same step and accepts no answer after it. A `serve()` * run withdraws its stretch's questions itself, and the session decides each one. */ export declare function cancelTasksStep(input: SessionStepState & TaskCancellationInput): Promise; interface TaskCancellationInput { readonly reason: TaskCancelReason; readonly taskIds: readonly string[]; } /** * Sends commands to a task's run, in order. A run that already finished takes * none; its outcome settles any call still waiting. */ export declare function sendTaskRunCommands(commands: TaskRunCommands): Promise; export {};