ChatTransport
Defined in: react/src/client.ts:159
Methods
Section titled “Methods”enqueue()?
Section titled “enqueue()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
EnqueueInput |
options |
{ signal: AbortSignal; } |
options.signal |
AbortSignal |
Returns
Section titled “Returns”Promise<DisplayInput>
observe()?
Section titled “observe()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
{ cursor?: Cursor; signal: AbortSignal; } |
options.cursor? |
Cursor |
options.signal |
AbortSignal |
Returns
Section titled “Returns”AsyncIterable<ChatEvent>
recallInput()?
Section titled “recallInput()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
{ id: string; rootRunId: string; } |
input.id |
string |
input.rootRunId |
string |
options |
{ signal: AbortSignal; } |
options.signal |
AbortSignal |
Returns
Section titled “Returns”Promise<DisplayInput>
respond()?
Section titled “respond()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
answers |
readonly RequestAnswer[] |
options |
{ signal: AbortSignal; } |
options.signal |
AbortSignal |
Returns
Section titled “Returns”Promise<void | EventReply>
send()?
Section titled “send()?”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).
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
SendInput |
options |
{ signal: AbortSignal; } |
options.signal |
AbortSignal |
Returns
Section titled “Returns”Promise<void | EventReply>
stop()?
Section titled “stop()?”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
run |
RunInfo |
Returns
Section titled “Returns”Promise<void>