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

enter: object

Defined in: types/events.ts:24

agentName

agentName: string

sessionId

sessionId: string


agent.exit

exit: object

Defined in: types/events.ts:25

agentName

agentName: string

sessionId

sessionId: string


agent.handoff

handoff: object

Defined in: types/events.ts:27

agentName

agentName: string

sessionId

sessionId: string

subagentName

subagentName: string

toolCallId

toolCallId: string


agent.transfer

transfer: object

Defined in: types/events.ts:26

fromAgent

fromAgent: string

sessionId

sessionId: string

toAgent

toAgent: string


context.compact

compact: object

Defined in: types/events.ts:58

removedItems

removedItems: number

sessionId

sessionId: string


gui.notification

notification: object

Defined in: types/events.ts:46

message

message: string

sessionId

sessionId: string


gui.update

update: object

Defined in: types/events.ts:45

data

data: Record<string, unknown>

sessionId

sessionId: string


session.close

close: object

Defined in: types/events.ts:50

reason

reason: string

sessionId

sessionId: string


session.goaway

goaway: object

Defined in: types/events.ts:57

sessionId

sessionId: string

timeLeft

timeLeft: string


session.resume

resume: object

Defined in: types/events.ts:56

handle

handle: string

sessionId

sessionId: string


session.start

start: object

Defined in: types/events.ts:49

agentName

agentName: string

sessionId

sessionId: string

userId

userId: string


session.stateChange

stateChange: object

Defined in: types/events.ts:51

fromState

fromState: SessionState

sessionId

sessionId: string

toState

toState: SessionState


subagent.notification

notification: object

Defined in: types/events.ts:63

event

event: ExternalEvent

result

result: SubagentResult

sessionId

sessionId: string


subagent.ui.response

response: object

Defined in: types/events.ts:62

response

response: UIResponse

sessionId

sessionId: string


subagent.ui.send

send: object

Defined in: types/events.ts:61

payload

payload: UIPayload

sessionId

sessionId: string


tool.call

call: ToolCall & object

Defined in: types/events.ts:35

Type Declaration

agentName

agentName: string

sessionId

sessionId: string


tool.cancel

cancel: object

Defined in: types/events.ts:37

sessionId

sessionId: string

toolCallIds

toolCallIds: string[]


tool.result

result: ToolResult & object

Defined in: types/events.ts:36

Type Declaration

sessionId

sessionId: string


turn.end

end: object

Defined in: types/events.ts:41

sessionId

sessionId: string

turnId

turnId: string


turn.interrupted

interrupted: object

Defined in: types/events.ts:42

sessionId

sessionId: string

turnId

turnId: string


turn.start

start: object

Defined in: types/events.ts:40

sessionId

sessionId: string

turnId

turnId: string

Built with VitePress