EventListenerMap
Typed mapping from event type strings to their corresponding listener signatures.
Defined in: src/core/events/types.ts:1063
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:1116 |
agent.ready | EventListener<AgentReadyEvent> | Listener for AgentReadyEvent. | src/core/events/types.ts:1110 |
agent.stateChange | EventListener<AgentStateChangeEvent> | Listener for AgentStateChangeEvent. | src/core/events/types.ts:1113 |
audio.capture.error | EventListener<AudioCaptureErrorEvent> | Listener for AudioCaptureErrorEvent. | src/core/events/types.ts:1125 |
audio.capture.start | EventListener<AudioCaptureStartEvent> | Listener for AudioCaptureStartEvent. | src/core/events/types.ts:1119 |
audio.capture.stop | EventListener<AudioCaptureStopEvent> | Listener for AudioCaptureStopEvent. | src/core/events/types.ts:1122 |
audio.playback.end | EventListener<AudioPlaybackEndEvent> | Listener for AudioPlaybackEndEvent. | src/core/events/types.ts:1131 |
audio.playback.error | EventListener<AudioPlaybackErrorEvent> | Listener for AudioPlaybackErrorEvent. | src/core/events/types.ts:1134 |
audio.playback.start | EventListener<AudioPlaybackStartEvent> | Listener for AudioPlaybackStartEvent. | src/core/events/types.ts:1128 |
llm.chunk | EventListener<LLMChunkEvent> | Listener for LLMChunkEvent. | src/core/events/types.ts:1086 |
llm.complete | EventListener<LLMCompleteEvent> | Listener for LLMCompleteEvent. | src/core/events/types.ts:1089 |
llm.error | EventListener<LLMErrorEvent> | Listener for LLMErrorEvent. | src/core/events/types.ts:1092 |
llm.start | EventListener<LLMStartEvent> | Listener for LLMStartEvent. | src/core/events/types.ts:1083 |
queue.overflow | EventListener<QueueOverflowEvent> | Listener for QueueOverflowEvent. | src/core/events/types.ts:1137 |
queue.stats | EventListener<QueueStatsEvent> | Listener for QueueStatsEvent. | src/core/events/types.ts:1140 |
transcription.error | EventListener<TranscriptionErrorEvent> | Listener for TranscriptionErrorEvent. | src/core/events/types.ts:1080 |
transcription.final | EventListener<TranscriptionFinalEvent> | Listener for TranscriptionFinalEvent. | src/core/events/types.ts:1071 |
transcription.interim | EventListener<TranscriptionInterimEvent> | Listener for TranscriptionInterimEvent. | src/core/events/types.ts:1068 |
transcription.preflight | EventListener<TranscriptionPreflightEvent> | Listener for TranscriptionPreflightEvent. | src/core/events/types.ts:1077 |
transcription.speechFinal | EventListener<TranscriptionSpeechFinalEvent> | Listener for TranscriptionSpeechFinalEvent. | src/core/events/types.ts:1074 |
transcription.start | EventListener<TranscriptionStartEvent> | Listener for TranscriptionStartEvent. | src/core/events/types.ts:1065 |
tts.audio | EventListener<TTSAudioEvent> | Listener for TTSAudioEvent. | src/core/events/types.ts:1098 |
tts.complete | EventListener<TTSCompleteEvent> | Listener for TTSCompleteEvent. | src/core/events/types.ts:1104 |
tts.error | EventListener<TTSErrorEvent> | Listener for TTSErrorEvent. | src/core/events/types.ts:1107 |
tts.metadata | EventListener<TTSMetadataEvent> | Listener for TTSMetadataEvent. | src/core/events/types.ts:1101 |
tts.start | EventListener<TTSStartEvent> | Listener for TTSStartEvent. | src/core/events/types.ts:1095 |