Interface: IntentThread
Defined in: aiui-intent-runtime/src/intent-types.ts:10
Methods
close()
close():
void
Defined in: aiui-intent-runtime/src/intent-types.ts:25
Close the underlying socket without sending fin (a cancel).
Returns
void
finish()
finish(
payload?):Promise<Ack>
Defined in: aiui-intent-runtime/src/intent-types.ts:12
Send the final payload (fin) and release the connection.
Parameters
payload?
unknown
Returns
Promise<Ack>
onServerMessage()
onServerMessage(
handler):void
Defined in: aiui-intent-runtime/src/intent-types.ts:23
Register a handler for this thread's server pushes (lowered echoes).
Parameters
handler
(msg) => void
Returns
void
sendAttachment()
sendAttachment(
chunk,bytes,fin?):Promise<Ack>
Defined in: aiui-intent-runtime/src/intent-types.ts:19
Send a raw-binary attachment chunk (a shot PNG or a whole audio segment).
Parameters
chunk
bytes
Uint8Array
fin?
boolean
Returns
Promise<Ack>
sendAudio()
sendAudio(
chunk,bytes,fin?):Promise<Ack>
Defined in: aiui-intent-runtime/src/intent-types.ts:21
Send one streamed PCM frame of a talk segment (the realtime path).
Parameters
chunk
bytes
Uint8Array
fin?
boolean
Returns
Promise<Ack>
sendChunk()
sendChunk(
chunk,payload,fin?):Promise<Ack>
Defined in: aiui-intent-runtime/src/intent-types.ts:17
Send a tagged JSON chunk (an events batch) — the intent-v1 streaming form. fin marks the thread's final frame.
Parameters
chunk
payload
unknown
fin?
boolean
Returns
Promise<Ack>