Skip to content

bodhi-realtime-agent / EventPayloadMap

Interface: EventPayloadMap

Defined in: types/events.ts:22

Maps each event type string to its payload shape. EventBus uses this mapped type for compile-time type safety on publish/subscribe.

Example

ts
eventBus.subscribe('agent.transfer', (payload) => {
  // payload is typed as { sessionId: string; fromAgent: string; toAgent: string }
});

Properties

agent.enter

agent.enter: object

Defined in: types/events.ts:24

agentName

agentName: string

sessionId

sessionId: string


agent.exit

agent.exit: object

Defined in: types/events.ts:25

agentName

agentName: string

sessionId

sessionId: string


agent.handoff

agent.handoff: object

Defined in: types/events.ts:28

agentName

agentName: string

sessionId

sessionId: string

subagentName

subagentName: string

toolCallId

toolCallId: string


agent.transfer

agent.transfer: object

Defined in: types/events.ts:26

fromAgent

fromAgent: string

sessionId

sessionId: string

toAgent

toAgent: string


agent.transfer_requested

agent.transfer_requested: object

Defined in: types/events.ts:27

sessionId

sessionId: string

toAgent

toAgent: string


context.compact

context.compact: object

Defined in: types/events.ts:59

removedItems

removedItems: number

sessionId

sessionId: string


gui.notification

gui.notification: object

Defined in: types/events.ts:47

message

message: string

sessionId

sessionId: string


gui.update

gui.update: object

Defined in: types/events.ts:46

data

data: Record<string, unknown>

sessionId

sessionId: string


session.close

session.close: object

Defined in: types/events.ts:51

reason

reason: string

sessionId

sessionId: string


session.goaway

session.goaway: object

Defined in: types/events.ts:58

sessionId

sessionId: string

timeLeft

timeLeft: string


session.resume

session.resume: object

Defined in: types/events.ts:57

handle

handle: string

sessionId

sessionId: string


session.start

session.start: object

Defined in: types/events.ts:50

agentName

agentName: string

sessionId

sessionId: string

userId

userId: string


session.stateChange

session.stateChange: object

Defined in: types/events.ts:52

fromState

fromState: SessionState

sessionId

sessionId: string

toState

toState: SessionState


subagent.notification

subagent.notification: object

Defined in: types/events.ts:64

event

event: ExternalEvent

result

result: SubagentResult

sessionId

sessionId: string


subagent.ui.response

subagent.ui.response: object

Defined in: types/events.ts:63

response

response: UIResponse

sessionId

sessionId: string


subagent.ui.send

subagent.ui.send: object

Defined in: types/events.ts:62

payload

payload: UIPayload

sessionId

sessionId: string


tool.call

tool.call: ToolCall & object

Defined in: types/events.ts:36

Type Declaration

agentName

agentName: string

sessionId

sessionId: string


tool.cancel

tool.cancel: object

Defined in: types/events.ts:38

sessionId

sessionId: string

toolCallIds

toolCallIds: string[]


tool.result

tool.result: ToolResult & object

Defined in: types/events.ts:37

Type Declaration

sessionId

sessionId: string


turn.end

turn.end: object

Defined in: types/events.ts:42

sessionId

sessionId: string

turnId

turnId: string


turn.interrupted

turn.interrupted: object

Defined in: types/events.ts:43

sessionId

sessionId: string

turnId

turnId: string


turn.start

turn.start: object

Defined in: types/events.ts:41

sessionId

sessionId: string

turnId

turnId: string

Built with VitePress