Skip to content

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

feat(voice): add live voice session types

Steven Enamakela3de6a0d9cee
diff --git a/crates/openhuman-core/src/voice/live/types.rs b/crates/openhuman-core/src/voice/live/types.rs
index 339e5ff9e6..b747362903 100644
--- a/crates/openhuman-core/src/voice/live/types.rs
+++ b/crates/openhuman-core/src/voice/live/types.rs
@@ -75,6 +75,9 @@ pub enum ClientFrame {
provider: Option<String>,
#[serde(default)]
thread_id: Option<String>,
+ /// The UI client approval prompts should be routed to.
+ #[serde(default)]
+ client_id: Option<String>,
#[serde(default = "default_input_rate")]
input_sample_rate: u32,
},
diff --git a/crates/openhuman-core/src/voice/live/types_tests.rs b/crates/openhuman-core/src/voice/live/types_tests.rs
index f59b73d796..51295af592 100644
--- a/crates/openhuman-core/src/voice/live/types_tests.rs
+++ b/crates/openhuman-core/src/voice/live/types_tests.rs
@@ -9,6 +9,7 @@ fn client_frames_use_snake_case_tags_and_defaults() {
ClientFrame::Start {
provider: None,
thread_id: None,
+ client_id: None,
input_sample_rate: 16_000
}
);
diff --git a/crates/openhuman-core/src/voice/realtime.rs b/crates/openhuman-core/src/voice/realtime.rs
index 924908f69a..c5128aac73 100644
--- a/crates/openhuman-core/src/voice/realtime.rs
+++ b/crates/openhuman-core/src/voice/realtime.rs
@@ -37,7 +37,7 @@ pub struct VoiceAgentSignedUrl {
/// token is a bearer credential, so it must not travel over `http://` to a
/// remote host (CWE-319). Loopback stays allowed so local-backend development
/// (`http://localhost:5005`) still works.
-fn ensure_secure_backend_url(api_url: &str) -> Result<(), String> {
+pub(crate) fn ensure_secure_backend_url(api_url: &str) -> Result<(), String> {
let lowered = api_url.trim().to_ascii_lowercase();
if lowered.starts_with("https://") {
return Ok(());