Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0281: Host speech capability
- Status: Accepted for implementation (amended by ADR 0291)
- Date: 2026-09-17
- Related: ADR 0257 · 03-runtime/20-speech
Context
Chat, image generation, transcription, and speech synthesis are different jobs, yet
@earendil-works/pi-ai has no TTS/ASR surface and Whisper or MIMO TTS must not appear
in the chat model picker.
Decision
- The host owns a speech capability independent of chat:
transcribe(audio) → textandsynthesize(text) → audio. - Bindings live on optional
AppSettings.speechwith no schema bump, each role naming a provider, a model id, and an open protocol id. - Built-in protocols are
openai_audio(/audio/transcriptions,/audio/speech) andopenai_chat_audio, which uses the chat completionsaudiofield for MIMOmimo-v2.5-tts; a new vendor adds an adapter, not an IPC channel. - Plugins may register a protocol with
pi.speech.registerAdapterunderspeech.adapter.register, while the host executes the HTTP plan and built-in ids stay reserved. - The v1 entry is the host API only —
speech/*IPC and plugin adapters — with no Settings card or Composer control, since ADR 0291 withdrew both.
Consequences
- An unconfigured role fails
SPEECH_NOT_CONFIGURED, and deleting the bound provider makes the binding failNOT_FOUND. - Unloading a plugin drops its protocols.
- Audio bytes never enter the renderer.