Skip to content

bodhi-realtime-agent / TransportActor

Class: TransportActor ​

Defined in: src/runtime/actors/transport-actor.ts:28

TransportActor wraps a TransportAdapter to participate in the actor runtime.

Inbound: adapter fires callbacks → actor sends canonical messages to peers. Outbound: actor receives canonical messages → adapter dispatches to transport.

Implements ​

Constructors ​

Constructor ​

new TransportActor(id, adapter, sendMessage, sessionActorId, toolRouterActorId, notificationActorId?, transportSubscriptionFilter?, onNotificationDelivered?): TransportActor

Defined in: src/runtime/actors/transport-actor.ts:31

Parameters ​

id ​

string

adapter ​

TransportAdapter

sendMessage ​

ActorSendFn

sessionActorId ​

string

toolRouterActorId ​

string

notificationActorId? ​

string = 'notification'

NotificationActor id; defaults to 'notification'.

transportSubscriptionFilter? ​

NotificationFilter

Optional filter for the subscription notification.subscribe envelope sent in onStart. Omit (or pass undefined) to receive every label; RuntimeOrchestrator forwards OrchestratorConfig.notification?.transportSubscriptionFilter.

onNotificationDelivered? ​

() => void

Invoked on each notification.delivered envelope BEFORE the adapter.sendContent wire-out — a generation-capable path, so VoiceSession uses this to invalidate a live H1 greeting token (the notification's model turn must never bind as the greeting).

Returns ​

TransportActor

Properties ​

id ​

readonly id: string

Defined in: src/runtime/actors/transport-actor.ts:29

Unique actor identity.

Implementation of ​

Actor.id

Methods ​

onMessage() ​

onMessage(envelope): Promise<void>

Defined in: src/runtime/actors/transport-actor.ts:106

Handle one envelope. Called serially — no concurrent invocations.

Parameters ​

envelope ​

Envelope

Returns ​

Promise<void>

Implementation of ​

Actor.onMessage


onStart() ​

onStart(): Promise<void>

Defined in: src/runtime/actors/transport-actor.ts:56

Called once when the actor is started (before any messages).

Returns ​

Promise<void>

Implementation of ​

Actor.onStart


onStop() ​

onStop(_reason): Promise<void>

Defined in: src/runtime/actors/transport-actor.ts:164

Called when the actor is stopped.

Parameters ​

_reason ​

string

Returns ​

Promise<void>

Implementation of ​

Actor.onStop

Built with VitePress