Skip to content

Interface: Wire

Defined in: aiui-intent-runtime/src/wire.ts:69

The wire surface the host (and, through it, the talk lanes) drives.

Methods

cancelThread()

cancelThread(): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:99

Close the socket without fin (a cancel) and reset the wire state.

Returns

Promise<void>


dispose()

dispose(): void

Defined in: aiui-intent-runtime/src/wire.ts:101

Unmount: cancel whatever thread is open.

Returns

void


finalizeThread()

finalizeThread(): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:97

The send path: flush, consume the selection, fin, surface the ack.

Returns

Promise<void>


flushOutbox()

flushOutbox(known?): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:81

Flush the outbox now, past the debounce (talk-end wants promptness).

Parameters

known?

IntentThread

Returns

Promise<void>


getThread()

getThread(): Promise<IntentThread | undefined>

Defined in: aiui-intent-runtime/src/wire.ts:79

The open thread, or undefined when none/opening failed (degraded mode).

Returns

Promise<IntentThread | undefined>


onEngineEvent()

onEngineEvent(event): void

Defined in: aiui-intent-runtime/src/wire.ts:75

Feed one engine event through the wire: thread-open opens the socket, and everything is queued on the debounce while a socket exists (and we are not merging a server echo back in — that would re-stream it).

Parameters

event

IntentEvent

Returns

void


sendControl()

Call Signature

sendControl(control, value): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:94

A mid-thread control chunk — reconfiguration, never turn content. Two controls: linter starts / stops / swaps the prompt linter live, and lint drives the converse turn strategy's button pair (now ends the lint turn at the button, stop cancels the in-flight reply). A no-op when no thread is open (a linter change rides the next hello instead; a lint press has nothing to end).

Parameters
control

"linter"

value

LinterVendor

Returns

Promise<void>

Call Signature

sendControl(control, value): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:95

Parameters
control

"lint"

value

"now" | "stop"

Returns

Promise<void>


socketState()

socketState(): ThreadSocketState

Defined in: aiui-intent-runtime/src/wire.ts:77

The thread socket's lifecycle, surfaced in the host's report/status.

Returns

ThreadSocketState


uploadAttachment()

uploadAttachment(id, mime, bytes): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:83

Upload a raw-binary attachment (a shot PNG / a whole audio segment).

Parameters

id

string

mime

string

bytes

Uint8Array

Returns

Promise<void>


uploadAudio()

uploadAudio(segment, seq, bytes): Promise<void>

Defined in: aiui-intent-runtime/src/wire.ts:85

One captured PCM frame → an audio chunk on seg_N, in seq order.

Parameters

segment

number

seq

number

bytes

Uint8Array

Returns

Promise<void>