import { type StartWorkflowTaskInput } from "#execution/tools/workflow/start.js"; import type { HarnessSessionBase } from "#harness/types.js"; import type { TaskStartedStreamEvent } from "#protocol/message.js"; import type { RuntimeToolResultActionResult, WorkflowToolRunEntry } from "#shared/action-types.js"; type TaskDispatchInput = StartWorkflowTaskInput & { readonly taskId: string; }; /** The call's answer, and the task start the dispatch step reports for it. */ interface TaskDispatchResult { readonly result: RuntimeToolResultActionResult; readonly session: HarnessSessionBase; readonly started?: TaskStartedStreamEvent["data"]; } /** The entry of a run that does a task's work. */ type TaskRunEntry = Extract; /** * Starts the run for a task its model step committed, once, and answers the * call with its receipt and the `task.started` event the dispatch step * publishes. Runs inside that step, where the task's cap is enforced: past * it, the record is dropped and the call fails. */ export declare function startTaskRun(input: StartWorkflowTaskInput & { readonly entry: TaskRunEntry; }): Promise; /** * Sends a call to the `serve` task it names by `taskId`. The task must be * available to the tool, and a call that makes an idle task work again * counts toward the cap. The call is recorded, reported as started, and sent * to the task's run, whose body receives it from `receive()`. */ export declare function sendToTask(input: TaskDispatchInput): Promise; export {};