import type { WorkflowToolRunControlMessage } from "#execution/tools/workflow/messages.js"; import type { WorkflowToolRunAddress } from "#execution/tools/workflow/types.js"; /** How a run is told to stop: `end` also finishes a `serve` task's run, which a cancel keeps. */ export type WorkflowToolRunStop = Extract; /** * Asks the run to stop itself, then bounds cooperative cleanup. Failures are * logged: the caller has already committed cancellation of the calling turn. */ export declare function cancelWorkflowToolRun(run: WorkflowToolRunAddress, stop: WorkflowToolRunStop): Promise; /** Allows cooperative cleanup, then forcibly stops a still-live run. */ export declare function settleWorkflowToolRunCancellation(runId: string, reason: string, cooperative?: boolean): Promise;