isimud/lib.rs
1//! isimud — macOS menu bar text-to-speech and MCP server for AI agents.
2//!
3//! The functional inverse of MUNINN (speech-to-text): agents enqueue speech through MCP
4//! tools; a single worker serializes playback, routes named voices to TTS providers, and
5//! broadcasts lifecycle events to the menu-bar indicator and connected MCP peers.
6
7/// TOML configuration loading, validation, and credential resolution.
8pub mod config;
9/// MCP tool handlers and speech-event notification fan-out.
10pub mod mcp;
11/// Shared rodio playback for cloud-provider audio bytes.
12pub mod playback;
13/// TTS provider trait, registry, and Apple/OpenAI/Google backends.
14pub mod providers;
15/// Axum HTTP server wiring for streamable MCP over `/mcp`.
16pub mod server;
17/// Speech state machine, status snapshots, and lifecycle events.
18pub mod state;
19/// Named-voice resolution from `[voices.*]` into provider parameters.
20pub mod voices;
21/// Serialized speech queue, worker task, and engine API.
22pub mod worker;
23
24/// Re-export of the top-level TOML configuration type.
25pub use config::AppConfig;
26
27/// Tracing target for runtime/lifecycle events.
28pub const TARGET_RUNTIME: &str = "runtime";
29/// Tracing target for the MCP/HTTP server.
30pub const TARGET_SERVER: &str = "server";
31/// Tracing target for TTS provider activity.
32pub const TARGET_PROVIDER: &str = "provider";
33/// Tracing target for configuration handling.
34pub const TARGET_CONFIG: &str = "config";
35/// Tracing target for speech worker / playback activity.
36pub const TARGET_SPEECH: &str = "speech";
37/// Catch-all tracing target.
38pub const TARGET_DEFAULT: &str = "default";
39
40/// Default MCP server port — T9 keypad spelling of "ENKI" (the god isimud serves),
41/// inside the IANA registered range (1024–49151).
42pub const DEFAULT_PORT: u16 = 3654;
43
44/// Default loopback bind address for the MCP/HTTP server.
45pub const DEFAULT_BIND_HOST: &str = "127.0.0.1";