The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
Merge remote-tracking branch 'origin/epic/8096-voice-cut' into epic-8096-400-server
Steven Enamakel4ffc38fac45e
diff --cc crates/openhuman-core/src/voice/mod.rsindex 3fb167b5d0,0243606409..9eaf1a151e--- a/crates/openhuman-core/src/voice/mod.rs+++ b/crates/openhuman-core/src/voice/mod.rs@@@ -10,13 -11,13 +10,11 @@@//! ## Compile-time gate (`voice` feature)//!//! `pub mod voice;` is ALWAYS compiled — it is a facade. The real--//! implementation (the submodules below)--//! is gated behind the default-ON `voice` Cargo feature. When the feature is--//! off, [`stub`] takes its place and exposes the same public surface that- //! other-gated callers depend on (`create_stt_provider`,- //! `effective_stt_provider`, `publish_ptt_transcript_committed`) with- //! no-op / disabled-error bodies. Keeping the two surfaces in lockstep is- //! enforced by the disabled-build check-//! other-gated callers depend on (`server`, `dictation_listener`,-//! `create_stt_provider`, `effective_stt_provider`) with no-op / disabled-error-//! bodies. Keeping the two surfaces in lockstep is enforced by the-//! disabled-build check++//! implementation (the submodules below) is gated behind the `voice` Cargo++//! feature. When the feature is off, [`stub`] takes its place and exposes the++//! same public surface that other-gated callers depend on (`create_stt_provider`++//! and `effective_stt_provider`) with no-op / disabled-error bodies. Keeping++//! the two surfaces in lockstep is enforced by the disabled-build check//! (`cargo check --no-default-features --features "<all-but-voice>"`): any//! signature drift fails that build.@@@ -26,10 -27,14 +24,6 @@@pub mod compile_status;pub use compile_status::VOICE_COMPILED_IN;--#[cfg(feature = "voice")]- pub mod bus;-pub mod audio_capture;--#[cfg(feature = "voice")]- pub use bus::publish_ptt_transcript_committed;-pub(crate) mod capture_lease;-#[cfg(feature = "voice")]-pub(crate) mod cli;-#[cfg(feature = "voice")]-pub mod dictation_listener;#[cfg(feature = "voice")]pub mod factory;#[cfg(feature = "voice")]diff --cc crates/openhuman-core/src/voice/stub.rsindex b8d72fcdd5,3a7bc6d6da..72fa9f08eb--- a/crates/openhuman-core/src/voice/stub.rs+++ b/crates/openhuman-core/src/voice/stub.rs@@@ -73,21 -73,92 +73,6 @@@ pub fn create_stt_providerErr(anyhow::anyhow!(DISABLED_MSG))}--// ---------------------------------------------------------------------------- // Event bus surface (mirrors `bus::publish_ptt_transcript_committed`)-// cli::run_standalone_subcommand (kept registered as a CLI adapter)--// ------------------------------------------------------------------------------ /// No-op: with voice disabled there is no PTT dictation path to announce.- pub fn publish_ptt_transcript_committed(- _thread_id: String,- _session_id: u64,- _text_len: usize,- _held_ms: u64,- _finalized_by_watchdog: bool,- ) {- log::debug!("[voice-stub] publish_ptt_transcript_committed ignored (voice disabled)");-pub mod cli {- /// Disabled: the standalone dictation server needs the voice stack. Returns- /// an error so `openhuman voice` reports the feature is off instead of the- /// subcommand silently disappearing from the CLI registry.- pub fn run_standalone_subcommand(_args: &[String]) -> anyhow::Result<()> {- Err(anyhow::anyhow!(super::DISABLED_MSG))- }-}--// ----------------------------------------------------------------------------// server::{start_if_enabled, try_global_server}-// -----------------------------------------------------------------------------pub mod server {- use std::sync::Arc;-- use crate::config::Config;-- /// Opaque handle; never actually constructed when voice is disabled, but- /// kept nameable so `Option<Arc<VoiceServer>>` call sites type-check.- pub struct VoiceServer;-- impl VoiceServer {- /// No-op stop — unreachable (no server is ever created).- pub async fn stop(&self) {}- }-- /// No-op: there is no voice server to start.- pub async fn start_if_enabled(_ctx: &crate::core::runtime::DispatchCtx, _config: &Config) {}-- /// Always `None`: no global voice server exists.- pub fn try_global_server() -> Option<Arc<VoiceServer>> {- None- }-}--// ----------------------------------------------------------------------------// dictation_listener::{start_if_enabled, stop, subscribe_*}-// -----------------------------------------------------------------------------pub mod dictation_listener {- use once_cell::sync::Lazy;- use serde::Serialize;- use tokio::sync::broadcast;-- use crate::config::Config;-- /// Mirrors the real `DictationEvent` wire shape so the Socket.IO bridge's- /// `serde_json::to_value(&event)` + `event.event_type` access type-check.- #[derive(Debug, Clone, Serialize)]- pub struct DictationEvent {- #[serde(rename = "type")]- pub event_type: String,- pub hotkey: String,- pub activation_mode: String,- }-- // Senders are kept alive for the process lifetime so subscribers park- // (never receive) rather than seeing an immediate `Closed`, matching the- // real always-open broadcast bus. Nothing is ever published.- static DICTATION_BUS: Lazy<broadcast::Sender<DictationEvent>> =- Lazy::new(|| broadcast::channel(1).0);- static TRANSCRIPTION_BUS: Lazy<broadcast::Sender<String>> =- Lazy::new(|| broadcast::channel(1).0);-- /// Subscribe to (never-emitting) dictation events.- pub fn subscribe_dictation_events() -> broadcast::Receiver<DictationEvent> {- DICTATION_BUS.subscribe()- }-- /// Subscribe to (never-emitting) transcription results.- pub fn subscribe_transcription_results() -> broadcast::Receiver<String> {- TRANSCRIPTION_BUS.subscribe()- }-- /// No-op: no hotkey listener is started.- pub async fn start_if_enabled(_ctx: &crate::core::runtime::DispatchCtx, _config: &Config) {}-- /// No-op: nothing to stop.- pub async fn stop() {}--}--// `live::ws::handle_live_voice_ws`: with voice off there are no live// providers, so the upgraded socket is dropped immediately.#[cfg(feature = "http-server")]diff --cc scripts/ci/check-openhuman-rust-layout.mjsindex 4187304441,5219b3c6df..73f20607ac--- a/scripts/ci/check-openhuman-rust-layout.mjs+++ b/scripts/ci/check-openhuman-rust-layout.mjs@@@ -39,9 -39,9 +39,9 @@@ const LEGACY_LIMIT_ENTRIES =// their current sizes while follow-up work separates their test concerns.// `core/` was pruned from the line limit by name until these pins; its// oversized files are pinned at the size they had when enforcement began.- ["crates/openhuman-core/src/core/all.rs", 1224],+ ["crates/openhuman-core/src/core/all.rs", 1216],["crates/openhuman-core/src/core/all_tests.rs", 1465],- ["crates/openhuman-core/src/core/events.rs", 1803],+ ["crates/openhuman-core/src/core/events.rs", 1781],["crates/openhuman-core/src/core/events_tests.rs", 997],["crates/openhuman-core/src/core/observability.rs", 3429],];