Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

refactor(voice): clean up function signatures in live schemas

Steven Enamakel65eccd91081f
diff --git a/crates/openhuman-core/src/voice/live/schemas.rs b/crates/openhuman-core/src/voice/live/schemas.rs
index 98d8570a1c..2ac3acfa5d 100644
--- a/crates/openhuman-core/src/voice/live/schemas.rs
+++ b/crates/openhuman-core/src/voice/live/schemas.rs
@@ -11,7 +11,8 @@ use super::ops;
use super::types::LiveSettingsPatch;
use crate::config::Config;
use crate::core::all::{
- BoundRegisteredController, ControllerEntry, ControllerFuture, ControllerTask, RegisteredController,
+ BoundRegisteredController, ControllerEntry, ControllerFuture, ControllerTask,
+ RegisteredController,
};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
@@ -162,24 +163,12 @@ fn live_test_provider_controller() -> BoundRegisteredController {
)
}
-fn run_live_providers(
- _ctx: DispatchCtx,
- config: Config,
- (): (),
-) -> ControllerFuture {
- Box::pin(async move {
- to_value(ops::live_providers(&config).value)
- })
+fn run_live_providers(_ctx: DispatchCtx, config: Config, (): ()) -> ControllerFuture {
+ Box::pin(async move { to_value(ops::live_providers(&config).value) })
}
-fn run_live_settings_get(
- _ctx: DispatchCtx,
- config: Config,
- (): (),
-) -> ControllerFuture {
- Box::pin(async move {
- to_value(ops::live_settings_get(&config).value)
- })
+fn run_live_settings_get(_ctx: DispatchCtx, config: Config, (): ()) -> ControllerFuture {
+ Box::pin(async move { to_value(ops::live_settings_get(&config).value) })
}
fn run_live_settings_set(ctx: DispatchCtx, patch: LiveSettingsPatch) -> ControllerFuture {
diff --git a/crates/openhuman-core/src/voice/mod.rs b/crates/openhuman-core/src/voice/mod.rs
index c08f2c9c3e..6dec7e9850 100644
--- a/crates/openhuman-core/src/voice/mod.rs
+++ b/crates/openhuman-core/src/voice/mod.rs
@@ -50,10 +50,10 @@ pub use factory::{
#[cfg(feature = "voice")]
pub use ops::*;
#[cfg(feature = "voice")]
-pub use schemas::{all_voice_controller_schemas, all_voice_registered_controllers, voice_schemas};
-#[cfg(feature = "voice")]
pub(crate) use schemas::all_voice_controller_entries;
#[cfg(feature = "voice")]
+pub use schemas::{all_voice_controller_schemas, all_voice_registered_controllers, voice_schemas};
+#[cfg(feature = "voice")]
pub use types::{VoiceSpeechResult, VoiceStatus, VoiceTtsResult};
// ---------------------------------------------------------------------------
diff --git a/crates/openhuman-core/src/voice/schemas/handlers.rs b/crates/openhuman-core/src/voice/schemas/handlers.rs
index cdb20386ea..797cdaf463 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers.rs
@@ -17,6 +17,6 @@ pub(super) use transcribe_tts::{
handle_voice_reply_synthesize, handle_voice_status, handle_voice_stt_dispatch,
handle_voice_transcribe, handle_voice_transcribe_bytes, handle_voice_tts,
handle_voice_tts_dispatch, voice_reply_synthesize_controller, voice_status_controller,
- voice_stt_dispatch_controller, voice_transcribe_bytes_controller,
- voice_transcribe_controller, voice_tts_controller, voice_tts_dispatch_controller,
+ voice_stt_dispatch_controller, voice_transcribe_bytes_controller, voice_transcribe_controller,
+ voice_tts_controller, voice_tts_dispatch_controller,
};
diff --git a/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs b/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
index acdb1eee69..d1f1cbe349 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
@@ -84,11 +84,7 @@ pub(crate) fn voice_tts_dispatch_controller() -> BoundRegisteredController {
)
}
-fn run_voice_status(
- _ctx: DispatchCtx,
- config: Config,
- (): (),
-) -> ControllerFuture {
+fn run_voice_status(_ctx: DispatchCtx, config: Config, (): ()) -> ControllerFuture {
Box::pin(async move { to_json(crate::voice::voice_status(&config).await?) })
}
diff --git a/crates/openhuman-core/src/voice/schemas/mod.rs b/crates/openhuman-core/src/voice/schemas/mod.rs
index c7ac890141..7d50b63797 100644
--- a/crates/openhuman-core/src/voice/schemas/mod.rs
+++ b/crates/openhuman-core/src/voice/schemas/mod.rs
@@ -21,8 +21,8 @@ mod parameter_contracts;
pub(crate) use parameter_contracts::contracts as parameter_contracts;
// Re-export the public API that callers outside this module use.
-pub use registry::{all_voice_controller_schemas, all_voice_registered_controllers, voice_schemas};
pub(crate) use registry::all_voice_controller_entries;
+pub use registry::{all_voice_controller_schemas, all_voice_registered_controllers, voice_schemas};
// ---------------------------------------------------------------------------
// Internal re-exports used by the test companion file.
diff --git a/crates/openhuman-core/src/voice/schemas/registry.rs b/crates/openhuman-core/src/voice/schemas/registry.rs
index 2327a0eea5..583ab83d46 100644
--- a/crates/openhuman-core/src/voice/schemas/registry.rs
+++ b/crates/openhuman-core/src/voice/schemas/registry.rs
@@ -7,12 +7,11 @@ use super::handlers::{
handle_voice_list_models, handle_voice_reply_synthesize, handle_voice_set_providers,
handle_voice_status, handle_voice_stt_dispatch, handle_voice_test_provider,
handle_voice_transcribe, handle_voice_transcribe_bytes, handle_voice_tts,
- handle_voice_tts_dispatch, handle_voice_update_provider_settings,
- voice_list_models_controller, voice_reply_synthesize_controller,
- voice_set_providers_controller, voice_status_controller, voice_stt_dispatch_controller,
- voice_test_provider_controller, voice_transcribe_bytes_controller,
- voice_transcribe_controller, voice_tts_controller, voice_tts_dispatch_controller,
- voice_update_provider_settings_controller,
+ handle_voice_tts_dispatch, handle_voice_update_provider_settings, voice_list_models_controller,
+ voice_reply_synthesize_controller, voice_set_providers_controller, voice_status_controller,
+ voice_stt_dispatch_controller, voice_test_provider_controller,
+ voice_transcribe_bytes_controller, voice_transcribe_controller, voice_tts_controller,
+ voice_tts_dispatch_controller, voice_update_provider_settings_controller,
};
use super::helpers::{json_output, optional_bool, optional_string, required_string};