EventListenerMap
Typed mapping from event type strings to their corresponding listener signatures.
Defined in: src/core/events/types.ts:1050
Typed mapping from event type strings to their corresponding listener signatures.
Remarks
This interface enables fully type-safe event subscriptions. When you call agent.on('transcription.final', callback), TypeScript infers that the callback receives a TranscriptionFinalEvent — no manual type assertions needed.
Example
// The callback parameter is automatically typed as TranscriptionFinalEvent
agent.on('transcription.final', (event) => {
console.log(event.text); // string -- type-safe
console.log(event.confidence); // number | undefined -- type-safe
});
// The callback parameter is automatically typed as AgentStateChangeEvent
agent.on('agent.stateChange', (event) => {
console.log(event.state); // AgentState -- type-safe
console.log(event.previousState); // AgentState -- type-safe
});
See
- EventListener for the listener function type
- EventType for valid event type strings
- CompositeVoiceEvent for the full event union
Properties
| Property | Type | Description | Defined in |
|---|---|---|---|
agent.error | EventListener<AgentErrorEvent> | Listener for AgentErrorEvent. | src/core/events/types.ts:1103 |
agent.ready | EventListener<AgentReadyEvent> | Listener for AgentReadyEvent. | src/core/events/types.ts:1097 |
agent.stateChange | EventListener<AgentStateChangeEvent> | Listener for AgentStateChangeEvent. | src/core/events/types.ts:1100 |
audio.capture.error | EventListener<AudioCaptureErrorEvent> | Listener for AudioCaptureErrorEvent. | src/core/events/types.ts:1112 |
audio.capture.start | EventListener<AudioCaptureStartEvent> | Listener for AudioCaptureStartEvent. | src/core/events/types.ts:1106 |
audio.capture.stop | EventListener<AudioCaptureStopEvent> | Listener for AudioCaptureStopEvent. | src/core/events/types.ts:1109 |
audio.playback.end | EventListener<AudioPlaybackEndEvent> | Listener for AudioPlaybackEndEvent. | src/core/events/types.ts:1118 |
audio.playback.error | EventListener<AudioPlaybackErrorEvent> | Listener for AudioPlaybackErrorEvent. | src/core/events/types.ts:1121 |
audio.playback.start | EventListener<AudioPlaybackStartEvent> | Listener for AudioPlaybackStartEvent. | src/core/events/types.ts:1115 |
llm.chunk | EventListener<LLMChunkEvent> | Listener for LLMChunkEvent. | src/core/events/types.ts:1073 |
llm.complete | EventListener<LLMCompleteEvent> | Listener for LLMCompleteEvent. | src/core/events/types.ts:1076 |
llm.error | EventListener<LLMErrorEvent> | Listener for LLMErrorEvent. | src/core/events/types.ts:1079 |
llm.start | EventListener<LLMStartEvent> | Listener for LLMStartEvent. | src/core/events/types.ts:1070 |
queue.overflow | EventListener<QueueOverflowEvent> | Listener for QueueOverflowEvent. | src/core/events/types.ts:1124 |
queue.stats | EventListener<QueueStatsEvent> | Listener for QueueStatsEvent. | src/core/events/types.ts:1127 |
transcription.error | EventListener<TranscriptionErrorEvent> | Listener for TranscriptionErrorEvent. | src/core/events/types.ts:1067 |
transcription.final | EventListener<TranscriptionFinalEvent> | Listener for TranscriptionFinalEvent. | src/core/events/types.ts:1058 |
transcription.interim | EventListener<TranscriptionInterimEvent> | Listener for TranscriptionInterimEvent. | src/core/events/types.ts:1055 |
transcription.preflight | EventListener<TranscriptionPreflightEvent> | Listener for TranscriptionPreflightEvent. | src/core/events/types.ts:1064 |
transcription.speechFinal | EventListener<TranscriptionSpeechFinalEvent> | Listener for TranscriptionSpeechFinalEvent. | src/core/events/types.ts:1061 |
transcription.start | EventListener<TranscriptionStartEvent> | Listener for TranscriptionStartEvent. | src/core/events/types.ts:1052 |
tts.audio | EventListener<TTSAudioEvent> | Listener for TTSAudioEvent. | src/core/events/types.ts:1085 |
tts.complete | EventListener<TTSCompleteEvent> | Listener for TTSCompleteEvent. | src/core/events/types.ts:1091 |
tts.error | EventListener<TTSErrorEvent> | Listener for TTSErrorEvent. | src/core/events/types.ts:1094 |
tts.metadata | EventListener<TTSMetadataEvent> | Listener for TTSMetadataEvent. | src/core/events/types.ts:1088 |
tts.start | EventListener<TTSStartEvent> | Listener for TTSStartEvent. | src/core/events/types.ts:1082 |