Skip to content
providerkit
GitHub

ChatTransport

Defined in: react/src/client.ts:159

optional enqueue(input, options): Promise<DisplayInput>;

Defined in: react/src/client.ts:162

Active-run sends use this instead of send. Authorize and persist immutable user content in the run’s InputInbox. Receipt id must equal clientId. Never create a new run or grant tool authority.

Parameter Type
input EnqueueInput
options { signal: AbortSignal; }
options.signal AbortSignal

Promise<DisplayInput>


optional observe(options): AsyncIterable<ChatEvent>;

Defined in: react/src/client.ts:173

The host’s events after cursor, or from the start without one. The client opens one at a time, and aborts signal once it stops reading.

Parameter Type
options { cursor?: Cursor; signal: AbortSignal; }
options.cursor? Cursor
options.signal AbortSignal

AsyncIterable<ChatEvent>


optional recallInput(input, options): Promise<DisplayInput>;

Defined in: react/src/client.ts:165

Optional host capability. Reserve/reconcile against inbox poll + checkpoint, not just its queued label. Refuse after claim/acceptance. createMemoryInbox alone cannot implement this.

Parameter Type
input { id: string; rootRunId: string; }
input.id string
input.rootRunId string
options { signal: AbortSignal; }
options.signal AbortSignal

Promise<DisplayInput>


optional respond(answers, options): Promise<void | EventReply>;

Defined in: react/src/client.ts:179

Answers one request or an explicit batch. Partial batches leave other requests open.

Parameter Type
answers readonly RequestAnswer[]
options { signal: AbortSignal; }
options.signal AbortSignal

Promise<void | EventReply>


optional send(input, options): Promise<void | EventReply>;

Defined in: react/src/client.ts:170

Called once per message the person sends, and once more only when they ask (retry).

Parameter Type
input SendInput
options { signal: AbortSignal; }
options.signal AbortSignal

Promise<void | EventReply>


optional stop(run): Promise<void>;

Defined in: react/src/client.ts:177

Asks the host to stop run. The client then waits for the host to say it stopped. run is the run as the client holds it: until the host names the run a message started, that is the run before it, so a host that stops by conversation can ignore it.

Parameter Type
run RunInfo

Promise<void>