Skip to main content

advanceConversation

@retinue/monorepo


@retinue/monorepo / backend/src / advanceConversation

Function: advanceConversation()

advanceConversation(coordinator, dispatcher, input): Promise<RunId | null>

Defined in: backend/src/runtime/serialization.ts:103

On a run reaching a terminal state, atomically release the conversation and promote the next queued run, then hand it to the dispatcher. Returns the promoted run, or null when the backlog is empty. Because release+promote is atomic, two runs can never both become active. This is the per-thread mailbox drain that guarantees FIFO execution.

Parameters​

coordinator​

ConversationRunCoordinator

dispatcher​

JobDispatcher

input​

conversationId​

ConversationId

runId​

RunId

tenantId​

TenantId

Returns​

Promise<RunId | null>