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
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
readonlyid:string
Defined in: src/runtime/actors/transport-actor.ts:29
Unique actor identity.
Implementation of
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
Returns
Promise<void>
Implementation of
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
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>