Skip to content

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

style(voice): apply rustfmt formatting to live voice modules

Steven Enamakel01b7dbb7e429
diff --git a/crates/openhuman-core/src/agent/session_host/live_tools.rs b/crates/openhuman-core/src/agent/session_host/live_tools.rs
index f6803c6a38..2a786e57d0 100644
--- a/crates/openhuman-core/src/agent/session_host/live_tools.rs
+++ b/crates/openhuman-core/src/agent/session_host/live_tools.rs
@@ -42,4 +42,3 @@ impl OpenHumanSessionHost {
self.workspace_descriptor.clone()
}
}
-
diff --git a/crates/openhuman-core/src/agent/tinyagents/live_harness.rs b/crates/openhuman-core/src/agent/tinyagents/live_harness.rs
index 1db4d9ee98..0e354e81a0 100644
--- a/crates/openhuman-core/src/agent/tinyagents/live_harness.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/live_harness.rs
@@ -128,4 +128,3 @@ pub(crate) fn assemble_live_tool_harness(
}
harness
}
-
diff --git a/crates/openhuman-core/src/config/schema/mod.rs b/crates/openhuman-core/src/config/schema/mod.rs
index 9f4bd330b0..b77790000c 100644
--- a/crates/openhuman-core/src/config/schema/mod.rs
+++ b/crates/openhuman-core/src/config/schema/mod.rs
@@ -131,8 +131,8 @@ pub use update::{UpdateConfig, UpdateRestartStrategy};
pub use web_chat_config::WebChatConfig;
mod voice_server;
pub use voice_server::{SttEngine, VoiceActivationMode, VoiceServerConfig};
-pub mod voice_providers;
pub mod voice_live;
+pub mod voice_providers;
pub use voice_live::LiveVoiceConfig;
pub use voice_providers::{
generate_voice_provider_id, is_voice_slug_reserved, BuiltinVoiceProvider, VoiceCapability,
diff --git a/crates/openhuman-core/src/voice/live/ops.rs b/crates/openhuman-core/src/voice/live/ops.rs
index a4cf86d67b..5a1c75b4de 100644
--- a/crates/openhuman-core/src/voice/live/ops.rs
+++ b/crates/openhuman-core/src/voice/live/ops.rs
@@ -81,7 +81,11 @@ pub async fn live_test_provider(config: &Config, provider: &str) -> Outcome<Live
error: Some(error.to_string()),
},
};
- tracing::debug!(provider, ok = value.ok, "[voice-live] provider test finished");
+ tracing::debug!(
+ provider,
+ ok = value.ok,
+ "[voice-live] provider test finished"
+ );
Outcome::new(value, Vec::new())
}
@@ -92,13 +96,19 @@ async fn test_connect(config: &Config, provider: &str) -> Result<(), LiveVoiceEr
let mut live_session = prepared.provider.connect(prepared.config).await?;
let sender = live_session.sender();
let outcome = match tokio::time::timeout(TEST_TIMEOUT, live_session.recv()).await {
- Err(_) => Err(LiveVoiceError::new("timeout", "the provider did not become ready")),
+ Err(_) => Err(LiveVoiceError::new(
+ "timeout",
+ "the provider did not become ready",
+ )),
Ok(Some(LiveEvent::Ready(_))) => Ok(()),
Ok(Some(LiveEvent::Error { error, .. })) => Err(error.into()),
Ok(Some(LiveEvent::Closed(tinyagents_live::tinyliveagents::CloseReason::Error(error)))) => {
Err(error.into())
}
- Ok(_) => Err(LiveVoiceError::new("provider", "the provider closed before it was ready")),
+ Ok(_) => Err(LiveVoiceError::new(
+ "provider",
+ "the provider closed before it was ready",
+ )),
};
let _ = sender.close().await;
outcome
diff --git a/crates/openhuman-core/src/voice/live/ops_tests.rs b/crates/openhuman-core/src/voice/live/ops_tests.rs
index 81bbc43aed..723639d44b 100644
--- a/crates/openhuman-core/src/voice/live/ops_tests.rs
+++ b/crates/openhuman-core/src/voice/live/ops_tests.rs
@@ -5,7 +5,10 @@ use crate::config::schema::voice_live::{SarvamLiveSettings, LIVE_PROVIDER_SARVAM
fn providers_and_settings_reflect_the_config() {
let config = Config::default();
let providers = live_providers(&config).value;
- assert_eq!(providers.default_provider, config.voice_live.default_provider);
+ assert_eq!(
+ providers.default_provider,
+ config.voice_live.default_provider
+ );
assert_eq!(providers.providers.len(), 4);
assert_eq!(live_settings_get(&config).value, config.voice_live);
}
@@ -77,7 +80,9 @@ async fn testing_an_unconfigured_provider_reports_why() {
let mut config = Config::default();
config.workspace_dir = dir.path().to_path_buf();
config.config_path = dir.path().join("config.toml");
- let result = live_test_provider(&config, LIVE_PROVIDER_SARVAM).await.value;
+ let result = live_test_provider(&config, LIVE_PROVIDER_SARVAM)
+ .await
+ .value;
assert!(!result.ok);
assert!(result.error.unwrap().contains("not_configured"));
let result = live_test_provider(&config, "nope").await.value;
diff --git a/crates/openhuman-core/src/voice/live/persist.rs b/crates/openhuman-core/src/voice/live/persist.rs
index 7abdc854ef..1ac1011354 100644
--- a/crates/openhuman-core/src/voice/live/persist.rs
+++ b/crates/openhuman-core/src/voice/live/persist.rs
@@ -39,7 +39,11 @@ impl TranscriptPersister {
}
/// The message a final utterance becomes, or `None` for blank text.
- pub(crate) fn message(&mut self, role: TranscriptRole, text: &str) -> Option<ConversationMessage> {
+ pub(crate) fn message(
+ &mut self,
+ role: TranscriptRole,
+ text: &str,
+ ) -> Option<ConversationMessage> {
let content = text.trim();
if content.is_empty() {
return None;
diff --git a/crates/openhuman-core/src/voice/live/persist_tests.rs b/crates/openhuman-core/src/voice/live/persist_tests.rs
index 187035d161..74d6f85cb7 100644
--- a/crates/openhuman-core/src/voice/live/persist_tests.rs
+++ b/crates/openhuman-core/src/voice/live/persist_tests.rs
@@ -9,7 +9,9 @@ fn builds_deterministic_messages_and_skips_blank_text() {
let dir = tempfile::tempdir().unwrap();
let mut p = persister(dir.path());
assert!(p.message(TranscriptRole::User, " ").is_none());
- let user = p.message(TranscriptRole::User, " what time is it ").unwrap();
+ let user = p
+ .message(TranscriptRole::User, " what time is it ")
+ .unwrap();
assert_eq!(user.id, "voice-s1-1-user");
assert_eq!(user.sender, "user");
assert_eq!(user.content, "what time is it");
@@ -44,7 +46,10 @@ async fn saves_into_the_thread_store() {
crate::threads::store::blocking::get_messages(dir.path().to_path_buf(), "t1".into())
.await
.unwrap();
- let texts: Vec<_> = messages.iter().map(|m| (m.sender.as_str(), m.content.as_str())).collect();
+ let texts: Vec<_> = messages
+ .iter()
+ .map(|m| (m.sender.as_str(), m.content.as_str()))
+ .collect();
assert_eq!(texts, vec![("user", "hello"), ("agent", "hi there")]);
}
diff --git a/crates/openhuman-core/src/voice/live/providers.rs b/crates/openhuman-core/src/voice/live/providers.rs
index ddf2b67ae2..978094366f 100644
--- a/crates/openhuman-core/src/voice/live/providers.rs
+++ b/crates/openhuman-core/src/voice/live/providers.rs
@@ -145,7 +145,8 @@ pub(crate) fn live_config(
live.voice = settings.gemini.voice.clone();
live.language = settings.gemini.language.clone();
// Keep long conversations inside the context window.
- live.provider_options = json!({ "context_window_compression": { "slidingWindow": {} } });
+ live.provider_options =
+ json!({ "context_window_compression": { "slidingWindow": {} } });
}
LIVE_PROVIDER_SARVAM => {
live.system_instruction = Some(system_instruction.to_string());
@@ -191,8 +192,8 @@ pub(crate) async fn prepare(
ticket.session_id,
ticket.model
);
- let relay =
- GeminiRelay::connect_url(ticket.ws_url).with_session(ticket.session_id, ticket.model);
+ let relay = GeminiRelay::connect_url(ticket.ws_url)
+ .with_session(ticket.session_id, ticket.model);
Ok(PreparedProvider {
provider: Box::new(relay),
config: live,
@@ -215,8 +216,9 @@ pub(crate) async fn prepare(
})
}
LIVE_PROVIDER_GEMINI => {
- let key = stored_key("google", config)
- .ok_or_else(|| LiveVoiceError::not_configured("add a Google API key for Gemini Live"))?;
+ let key = stored_key("google", config).ok_or_else(|| {
+ LiveVoiceError::not_configured("add a Google API key for Gemini Live")
+ })?;
Ok(PreparedProvider {
provider: Box::new(GeminiLive::new(key)),
config: live,
@@ -230,7 +232,9 @@ pub(crate) async fn prepare(
config: live,
})
}
- other => Err(LiveVoiceError::invalid(format!("unknown live provider `{other}`"))),
+ other => Err(LiveVoiceError::invalid(format!(
+ "unknown live provider `{other}`"
+ ))),
}
}
@@ -268,9 +272,11 @@ async fn mint_gemini_ticket(
let credential =
crate::security::credentials::session_support::resolve_backend_credential(config)
.map_err(LiveVoiceError::not_configured)?;
- let api_url = crate::backend::require_base_url(&config.api_url).map_err(LiveVoiceError::backend)?;
+ let api_url =
+ crate::backend::require_base_url(&config.api_url).map_err(LiveVoiceError::backend)?;
crate::voice::realtime::ensure_secure_backend_url(&api_url).map_err(LiveVoiceError::backend)?;
- let client = BackendClient::new(&api_url).map_err(|e| LiveVoiceError::backend(e.to_string()))?;
+ let client =
+ BackendClient::new(&api_url).map_err(|e| LiveVoiceError::backend(e.to_string()))?;
let body = gemini::ticket_request(live);
let raw = client
.authed_json(
diff --git a/crates/openhuman-core/src/voice/live/providers_tests.rs b/crates/openhuman-core/src/voice/live/providers_tests.rs
index 5d8562a18e..9fa9fdeb7a 100644
--- a/crates/openhuman-core/src/voice/live/providers_tests.rs
+++ b/crates/openhuman-core/src/voice/live/providers_tests.rs
@@ -20,7 +20,10 @@ fn catalogue_lists_every_provider_in_order() {
assert_eq!(sarvam.key_slug.as_deref(), Some("sarvam"));
assert!(sarvam.languages.contains(&"hi-IN".to_string()));
assert!(sarvam.voices.contains(&"shubh".to_string()));
- let hosted = infos.iter().find(|i| i.id == LIVE_PROVIDER_GEMINI_HOSTED).unwrap();
+ let hosted = infos
+ .iter()
+ .find(|i| i.id == LIVE_PROVIDER_GEMINI_HOSTED)
+ .unwrap();
assert_eq!(hosted.kind, LiveProviderKind::Hosted);
assert!(hosted.voices.contains(&"Puck".to_string()));
}
@@ -37,7 +40,10 @@ fn live_config_follows_the_settings_per_provider() {
assert_eq!(gemini.system_instruction.as_deref(), Some("prompt"));
assert_eq!(gemini.voice.as_deref(), Some("Kore"));
assert_eq!(gemini.model.as_deref(), Some("gemini-x"));
- assert!(gemini.provider_options.get("context_window_compression").is_some());
+ assert!(gemini
+ .provider_options
+ .get("context_window_compression")
+ .is_some());
let sarvam = live_config(&config, LIVE_PROVIDER_SARVAM, "prompt", 8_000);
assert_eq!(sarvam.voice.as_deref(), Some("priya"));
@@ -49,7 +55,10 @@ fn live_config_follows_the_settings_per_provider() {
assert_eq!(auto.provider_options["auto_language"], true);
let eleven = live_config(&config, LIVE_PROVIDER_ELEVENLABS_HOSTED, "prompt", 16_000);
- assert_eq!(eleven.system_instruction, None, "the hosted agent owns its prompt");
+ assert_eq!(
+ eleven.system_instruction, None,
+ "the hosted agent owns its prompt"
+ );
assert_eq!(eleven.voice, None, "blank voice ids are ignored");
config.voice_live.elevenlabs.voice_id = Some("v1".into());
let eleven = live_config(&config, LIVE_PROVIDER_ELEVENLABS_HOSTED, "prompt", 16_000);
@@ -72,7 +81,10 @@ fn parses_wrapped_and_bare_tickets() {
);
let bare = json!({"wsUrl": "wss://y"});
assert_eq!(parse_ticket(&bare).unwrap().session_id, "");
- assert_eq!(parse_ticket(&json!({"data": {}})).unwrap_err().code, "backend");
+ assert_eq!(
+ parse_ticket(&json!({"data": {}})).unwrap_err().code,
+ "backend"
+ );
}
#[tokio::test]
@@ -85,6 +97,9 @@ async fn byok_providers_need_a_stored_key() {
let err = prepare(&config, id, LiveConfig::new()).await.err().unwrap();
assert_eq!(err.code, "not_configured", "{id}");
}
- let err = prepare(&config, "nope", LiveConfig::new()).await.err().unwrap();
+ let err = prepare(&config, "nope", LiveConfig::new())
+ .await
+ .err()
+ .unwrap();
assert_eq!(err.code, "invalid_request");
}
diff --git a/crates/openhuman-core/src/voice/live/schemas.rs b/crates/openhuman-core/src/voice/live/schemas.rs
index 942bc867ba..d6310c6b80 100644
--- a/crates/openhuman-core/src/voice/live/schemas.rs
+++ b/crates/openhuman-core/src/voice/live/schemas.rs
@@ -36,11 +36,15 @@ pub fn live_schemas(function: &str) -> ControllerSchema {
"voice_live_providers" => ControllerSchema {
namespace: "voice",
function: "live_providers",
- description: "List live voice agent providers, whether each is usable, and the default.",
+ description:
+ "List live voice agent providers, whether each is usable, and the default.",
inputs: vec![],
outputs: vec![
json_output("default_provider", "The provider Tiny uses by default."),
- json_output("providers", "Every live provider with readiness, voices and languages."),
+ json_output(
+ "providers",
+ "Every live provider with readiness, voices and languages.",
+ ),
],
},
"voice_live_settings_get" => ControllerSchema {
@@ -48,24 +52,44 @@ pub fn live_schemas(function: &str) -> ControllerSchema {
function: "live_settings_get",
description: "Read the live voice agent settings.",
inputs: vec![],
- outputs: vec![json_output("settings", "Default provider and per-provider options.")],
+ outputs: vec![json_output(
+ "settings",
+ "Default provider and per-provider options.",
+ )],
},
"voice_live_settings_set" => ControllerSchema {
namespace: "voice",
function: "live_settings_set",
description: "Update the live voice agent settings; omitted fields are kept.",
inputs: vec![
- optional("default_provider", TypeSchema::String, "Provider id to use by default."),
- optional("gemini", TypeSchema::Json, "Gemini options: model, voice, language."),
- optional("sarvam", TypeSchema::Json, "Sarvam options: language, speaker, model."),
- optional("elevenlabs", TypeSchema::Json, "ElevenLabs options: voice_id."),
+ optional(
+ "default_provider",
+ TypeSchema::String,
+ "Provider id to use by default.",
+ ),
+ optional(
+ "gemini",
+ TypeSchema::Json,
+ "Gemini options: model, voice, language.",
+ ),
+ optional(
+ "sarvam",
+ TypeSchema::Json,
+ "Sarvam options: language, speaker, model.",
+ ),
+ optional(
+ "elevenlabs",
+ TypeSchema::Json,
+ "ElevenLabs options: voice_id.",
+ ),
],
outputs: vec![json_output("settings", "The settings after the update.")],
},
"voice_live_test_provider" => ControllerSchema {
namespace: "voice",
function: "live_test_provider",
- description: "Open a live session on a provider, wait until it is ready, then close it.",
+ description:
+ "Open a live session on a provider, wait until it is ready, then close it.",
inputs: vec![FieldSchema {
name: "provider",
ty: TypeSchema::String,
@@ -121,7 +145,11 @@ fn handle_live_test_provider(params: Map<String, Value>) -> ControllerFuture {
let params: TestParams = serde_json::from_value(Value::Object(params))
.map_err(|e| format!("invalid params: {e}"))?;
let config = config_rpc::load_config_with_timeout().await?;
- to_value(ops::live_test_provider(&config, &params.provider).await.value)
+ to_value(
+ ops::live_test_provider(&config, &params.provider)
+ .await
+ .value,
+ )
})
}
diff --git a/crates/openhuman-core/src/voice/live/schemas_tests.rs b/crates/openhuman-core/src/voice/live/schemas_tests.rs
index 466ba5dd4f..a00d4ed4f6 100644
--- a/crates/openhuman-core/src/voice/live/schemas_tests.rs
+++ b/crates/openhuman-core/src/voice/live/schemas_tests.rs
@@ -6,19 +6,29 @@ fn registers_four_live_controllers_in_the_voice_namespace() {
let functions: Vec<_> = controllers.iter().map(|c| c.schema.function).collect();
assert_eq!(
functions,
- vec!["live_providers", "live_settings_get", "live_settings_set", "live_test_provider"]
+ vec![
+ "live_providers",
+ "live_settings_get",
+ "live_settings_set",
+ "live_test_provider"
+ ]
);
assert!(controllers.iter().all(|c| c.schema.namespace == "voice"));
assert_eq!(live_controller_schemas().len(), 4);
assert_eq!(live_schemas("missing").function, "unknown");
let test = live_schemas("voice_live_test_provider");
- assert!(test.inputs.iter().any(|f| f.name == "provider" && f.required));
+ assert!(test
+ .inputs
+ .iter()
+ .any(|f| f.name == "provider" && f.required));
}
#[tokio::test]
async fn handlers_reject_bad_params() {
let bad = |v: serde_json::Value| v.as_object().unwrap().clone();
- assert!(handle_live_test_provider(bad(serde_json::json!({}))).await.is_err());
+ assert!(handle_live_test_provider(bad(serde_json::json!({})))
+ .await
+ .is_err());
assert!(
handle_live_settings_set(bad(serde_json::json!({"gemini": 5})))
.await
diff --git a/crates/openhuman-core/src/voice/live/session.rs b/crates/openhuman-core/src/voice/live/session.rs
index 24a8434646..ec96f2cd60 100644
--- a/crates/openhuman-core/src/voice/live/session.rs
+++ b/crates/openhuman-core/src/voice/live/session.rs
@@ -49,7 +49,10 @@ pub(crate) struct StartedLiveSession {
}
/// The provider a request resolves to.
-pub(crate) fn resolve_provider(config: &Config, requested: Option<&str>) -> Result<String, LiveVoiceError> {
+pub(crate) fn resolve_provider(
+ config: &Config,
+ requested: Option<&str>,
+) -> Result<String, LiveVoiceError> {
let provider = requested
.filter(|p| !p.trim().is_empty())
.unwrap_or(config.voice_live.default_provider.as_str())
@@ -90,7 +93,10 @@ pub(crate) fn system_prompt(recent: &[ConversationMessage]) -> String {
/// Makes sure the session's thread exists, creating a voice thread when the
/// client is not on one.
-async fn ensure_thread(config: &Config, thread_id: Option<String>) -> Result<String, LiveVoiceError> {
+async fn ensure_thread(
+ config: &Config,
+ thread_id: Option<String>,
+) -> Result<String, LiveVoiceError> {
let id = thread_id
.filter(|t| !t.trim().is_empty())
.unwrap_or_else(|| format!("voice-{}", uuid::Uuid::new_v4()));
@@ -172,7 +178,10 @@ pub(crate) async fn start(
let scope: TaskScope = Arc::new(move |task| {
let origin = origin.clone();
let approval = approval.clone();
- Box::pin(with_origin(origin, APPROVAL_CHAT_CONTEXT.scope(approval, task)))
+ Box::pin(with_origin(
+ origin,
+ APPROVAL_CHAT_CONTEXT.scope(approval, task),
+ ))
});
let agent = LiveAgent::new(Arc::new(harness), Arc::new(())).with_task_scope(scope);
let session = agent
diff --git a/crates/openhuman-core/src/voice/live/ws.rs b/crates/openhuman-core/src/voice/live/ws.rs
index 80ed139eec..cd9cba7aaa 100644
--- a/crates/openhuman-core/src/voice/live/ws.rs
+++ b/crates/openhuman-core/src/voice/live/ws.rs
@@ -140,7 +140,9 @@ fn error_frame(error: &LiveVoiceError) -> ServerFrame {
/// Waits for and parses the `start` frame.
pub(crate) fn parse_start(message: &Message) -> Result<LiveStartRequest, LiveVoiceError> {
let Message::Text(text) = message else {
- return Err(LiveVoiceError::invalid("the first frame must be a start frame"));
+ return Err(LiveVoiceError::invalid(
+ "the first frame must be a start frame",
+ ));
};
match serde_json::from_str::<ClientFrame>(text) {
Ok(ClientFrame::Start {
@@ -154,7 +156,9 @@ pub(crate) fn parse_start(message: &Message) -> Result<LiveStartRequest, LiveVoi
client_id,
input_sample_rate,
}),
- Ok(_) => Err(LiveVoiceError::invalid("the first frame must be a start frame")),
+ Ok(_) => Err(LiveVoiceError::invalid(
+ "the first frame must be a start frame",
+ )),
Err(error) => Err(LiveVoiceError::invalid(format!("bad start frame: {error}"))),
}
}
@@ -184,7 +188,11 @@ pub async fn handle_live_voice_ws(socket: WebSocket, config: Arc<Config>) {
let started = match session::start(config.clone(), request, &session_id).await {
Ok(started) => started,
Err(error) => {
- tracing::warn!(session_id, code = error.code, "{LOG_PREFIX} session failed to start");
+ tracing::warn!(
+ session_id,
+ code = error.code,
+ "{LOG_PREFIX} session failed to start"
+ );
let _ = sink.send(json_message(&error_frame(&error))).await;
let _ = sink
.send(json_message(&ServerFrame::Closed {
diff --git a/crates/openhuman-core/src/voice/live/ws_tests.rs b/crates/openhuman-core/src/voice/live/ws_tests.rs
index aed725d17a..a181c8584c 100644
--- a/crates/openhuman-core/src/voice/live/ws_tests.rs
+++ b/crates/openhuman-core/src/voice/live/ws_tests.rs
@@ -23,7 +23,8 @@ fn ready_uses_the_provider_session_id_or_ours() {
thread_id: Some("thread".into())
})]
);
- let Outbound::Json(ServerFrame::Ready { session_id, .. }) = &map(LiveEvent::Ready(info(Some("p"))))[0]
+ let Outbound::Json(ServerFrame::Ready { session_id, .. }) =
+ &map(LiveEvent::Ready(info(Some("p"))))[0]
else {
panic!("expected ready")
};
@@ -48,7 +49,10 @@ fn finals_are_persisted_partials_are_not() {
is_final: true,
});
assert_eq!(out.len(), 2);
- assert_eq!(out[1], Outbound::Persist(TranscriptRole::Agent, "noon".into()));
+ assert_eq!(
+ out[1],
+ Outbound::Persist(TranscriptRole::Agent, "noon".into())
+ );
}
#[test]
@@ -57,7 +61,10 @@ fn maps_audio_turns_errors_and_closes() {
map(LiveEvent::Audio(Bytes::from_static(&[1, 2]))),
vec![Outbound::Audio(Bytes::from_static(&[1, 2]))]
);
- assert_eq!(map(LiveEvent::Interrupted), vec![Outbound::Json(ServerFrame::Interrupted)]);
+ assert_eq!(
+ map(LiveEvent::Interrupted),
+ vec![Outbound::Json(ServerFrame::Interrupted)]
+ );
assert_eq!(
map(LiveEvent::TurnComplete { usage: None }),
vec![Outbound::Json(ServerFrame::TurnComplete)]
@@ -75,7 +82,9 @@ fn maps_audio_turns_errors_and_closes() {
);
assert_eq!(
map(LiveEvent::Closed(CloseReason::Client)),
- vec![Outbound::Json(ServerFrame::Closed { reason: "client".into() })]
+ vec![Outbound::Json(ServerFrame::Closed {
+ reason: "client".into()
+ })]
);
assert_eq!(
map(LiveEvent::Closed(CloseReason::Remote {
@@ -91,11 +100,17 @@ fn maps_audio_turns_errors_and_closes() {
code: None,
reason: String::new()
})),
- vec![Outbound::Json(ServerFrame::Closed { reason: "remote".into() })]
+ vec![Outbound::Json(ServerFrame::Closed {
+ reason: "remote".into()
+ })]
);
- let out = map(LiveEvent::Closed(CloseReason::Error(LiveError::Unauthorized)));
+ let out = map(LiveEvent::Closed(CloseReason::Error(
+ LiveError::Unauthorized,
+ )));
assert_eq!(out.len(), 2);
- assert!(matches!(&out[0], Outbound::Json(ServerFrame::Error { code, fatal: true, .. }) if code == "unauthorized"));
+ assert!(
+ matches!(&out[0], Outbound::Json(ServerFrame::Error { code, fatal: true, .. }) if code == "unauthorized")
+ );
// Tool calls surface through ToolStarted/ToolFinished instead.
assert!(map(LiveEvent::ToolCall(ToolCall {
call_id: "c".into(),
diff --git a/crates/openhuman-rpc/src/server/http/mod.rs b/crates/openhuman-rpc/src/server/http/mod.rs
index a51815d5ca..976d459ded 100644
--- a/crates/openhuman-rpc/src/server/http/mod.rs
+++ b/crates/openhuman-rpc/src/server/http/mod.rs
@@ -16,9 +16,9 @@ use openhuman_core::core::types::AppState;
pub(crate) mod cors;
mod dictation;
-mod live_voice;
mod events;
mod health;
+mod live_voice;
mod oauth_mcp;
mod pages;
mod rpc_handler;