How lg-epitech/yapd works
yapd is a macOS daemon that turns completed Claude Code and Codex sessions into prioritized spoken summaries, then listens for interruptions and routes follow-ups back to the originating session. The graph follows the documented flow and sampled ownership: the daemon receives hook events, prepares updates, and delegates playback/conversation; conversation sends follow-ups through relays. README-described provider and speech capabilities are included, but unsampled internals are linked only where the source or documentation supports the relationship.
Main entry points: Conversation.ts Spoken conversation · Daemon.ts Update coordinator · Relay.ts Relay selection · Audio.ts Audio playback
Components 26
Event intake
- CLI and wiring
src/main.ts - Agent hooks
src/Hook.ts - Local event server
src/Server.ts - Update coordinator
src/Daemon.ts - Project naming
src/Project.ts - Priority inbox
src/Inbox.ts
Summaries and speech
- Turn summarizer
src/Condenser.ts - Provider model
src/Model.ts - Provider commands
src/Provider.ts
Voice interaction
- Spoken conversation
src/Conversation.ts - Speech synthesis
src/Voice.ts - Audio playback
src/Audio.ts - Native audio helper
src/Helper.ts - Voice detection
src/Vad.ts - Speech endpointing
src/Endpointer.ts - Speech transcription
src/Transcriber.ts - Interruption responder
src/Responder.ts
Agent integrations
- Relay selection
src/Relay.ts - Claude relay
src/ClaudeCode.ts - Codex relay
src/Codex.ts - Codex app server
src/CodexServer.ts - T3 Code relay
src/T3Code.ts
Other components
- Coding agent
- User
- Kokoro runtime
- Whisper runtime
Connections 29
- Coding agent → Agent hooks: emits events
- Agent hooks → Local event server: posts events
- CLI and wiring → Local event server: starts
- CLI and wiring → Update coordinator: runs
- Local event server → Update coordinator: dispatches events
- Update coordinator → Project naming: names project
- Update coordinator → Priority inbox: queues updates
- Update coordinator → Turn summarizer: prepares summary
- Turn summarizer → Provider model: requests summary
- Provider model → Provider commands: selects command
- Update coordinator → Spoken conversation: speaks updates
- Spoken conversation → Speech synthesis: renders speech
- Speech synthesis → Kokoro runtime: synthesizes locally
- Spoken conversation → Audio playback: plays audio
- Audio playback → Native audio helper: streams audio
- User → Audio playback: interrupts speech
- Audio playback → Voice detection: provides microphone frames
- Spoken conversation → Speech endpointing: segments speech
- Spoken conversation → Speech transcription: transcribes speech
- Speech transcription → Whisper runtime: runs locally
- Spoken conversation → Interruption responder: interprets interruption
- Spoken conversation → Relay selection: sends follow-up
- Relay selection → Claude relay: dispatches
- Relay selection → Codex relay: dispatches
- Relay selection → T3 Code relay: dispatches
- Codex relay → Codex app server: uses persistent server
- Claude relay → Coding agent: wakes session
- Codex relay → Coding agent: queues message
- T3 Code relay → Coding agent: dispatches to thread