import { type DrizzleExecutor } from "../../drizzle.js"; import { type MessageSummary, type MutationHint } from "../../chat/types.js"; /** * Finalizes an active agent's agentTurns and message output, including terminal chat and search projections produced by the run. * The users.active and worker-owned transaction prevents deactivated sessions from publishing and prevents a completed lease from becoming visible before its final answer is durable. * `workerId` is omitted only by a reader-initiated stop, which finishes a turn no worker of this process may own; `traceTitle` then names that outcome in the trace instead of the run's own result. */ export declare function finishAgentTurn(executor: DrizzleExecutor, input: { agentUserId: string; actorUserId: string; eventKind: "message.completed" | "message.failed"; lastError?: string; sessionId: string; status: "complete" | "failed"; text: string; traceTitle?: string; userMessageId: string; workerId?: string; }): Promise<{ message: MessageSummary; hint: MutationHint; } | undefined>; //# sourceMappingURL=finishAgentTurn.d.ts.map