import type { WorkflowToolRunAgentStartedMessage, WorkflowToolRunMessage } from "#execution/tools/workflow/messages.js"; import type { SessionStateCursor } from "#execution/session/state-cursor.js"; import type { RuntimeActionResult } from "#shared/action-types.js"; interface HandlerInput { readonly cursor: SessionStateCursor; readonly message: T; } export declare function handleWorkflowToolRunMessage(input: HandlerInput): Promise; /** Boundary messages in admission order, with consecutive `agent-started` messages grouped. */ type BoundaryBatch = { readonly kind: "agent-started"; readonly messages: WorkflowToolRunAgentStartedMessage[]; } | { readonly kind: "message"; readonly message: WorkflowToolRunMessage; }; /** Groups consecutive `agent-started` messages so one `emitAgentStartedStep` publishes each group. */ export declare function batchAgentStarts(messages: readonly WorkflowToolRunMessage[]): BoundaryBatch[]; export {};