//! `nexo-plugin-voice` — TTS reply transformer + per-conversation
//! toggle for the Nexo agent framework.
//!
//! Out-of-tree subprocess plugin: the daemon spawns the binary,
//! discovers it via manifest TOML (Phase 81.33.b.real), and routes
//! the five outbound tools, HTTP toggle endpoints, admin RPC, and
//! Prometheus metrics through broker JSON-RPC. The plugin owns its
//! own SQLite store at `${state_dir}/voice.db`, its own LRU audio
//! cache, its own provider pool, and its own credentials slice —
//! the daemon never sees a voice id, a synth byte, or an API key.
//!
//! See [`README.md`](../README.md) for a high-level tour and
//! `nexo-plugin.toml` for the operator-facing manifest.

pub mod admin;
pub mod audit;
pub mod auto_discovery;
pub mod boot;
pub mod breaker;
pub mod cache;
pub mod catalog;
pub mod config;
pub mod error;
pub mod fallback;
pub mod http;
pub mod instance_registry;
pub mod metrics;
pub mod pipeline;
pub mod policy;
pub mod providers;
pub mod ssml;
pub mod store;
pub mod tool_defs;
pub mod tools;
pub mod transcode;

pub use tool_defs::voice_tool_defs;

pub use catalog::{find_by_id, find_native_id, VoiceCatalog, VoiceCatalogEntry};
pub use error::{ReasonCode, Result, VoiceError};
pub use providers::{AudioFormat, CostClass, SynthesizeOutput, SynthesizeRequest, TtsProvider};
pub use ssml::{apply_ssml_hints, normalize, strip_voice_markers};
pub use store::{VoiceModeRow, VoiceModeStore};
pub use transcode::{transcode_mp3_to_opus_ogg, OUTPUT_MIME};

/// Manifest TOML embedded at compile time. The daemon's discovery
/// walker reads the same string from disk; embedding it here lets
/// the plugin's own boot path validate it without an extra read.
pub const MANIFEST: &str = include_str!("../nexo-plugin.toml");
