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
chore: files changed crates/openhuman-core/src/agent/message_convert.rs,crates/openhuman-core/src/ag
Steven Enamakelc9f5a8414cf6
diff --git a/crates/openhuman-core/src/agent/message_convert.rs b/crates/openhuman-core/src/agent/message_convert.rsindex 44c98e6609..c502bf4e28 100644--- a/crates/openhuman-core/src/agent/message_convert.rs+++ b/crates/openhuman-core/src/agent/message_convert.rs@@ -26,8 +26,8 @@ use crate::inference::provider::ChatResponse;use tinyagents_runtime::transcript::reasoning_from_content;#[cfg(test)]use tinyagents_runtime::transcript::{- message_to_display_transcript as message_to_chat_message,- message_to_native_transcript as message_to_native_chat_message, REASONING_EXT_KEY,+ REASONING_EXT_KEY, message_to_display_transcript as message_to_chat_message,+ message_to_native_transcript as message_to_native_chat_message,};use tinyagents_session::transcript::TranscriptMessage;@@ -307,7 +307,7 @@ pub(crate) fn messages_to_history(messages: &[Message]) -> Vec<TranscriptMessage// The product dialect stores provider reasoning in passthrough metadata.fn reasoning_extra_metadata(content: &[ContentBlock]) -> Option<serde_json::Value> {- tinyagents_runtime::transcript::reasoning_from_content(content)+ reasoning_from_content(content).map(|reasoning| serde_json::json!({ tinyagents_runtime::transcript::REASONING_EXT_KEY: reasoning }))}diff --git a/crates/openhuman-core/src/agent/message_convert_tests.rs b/crates/openhuman-core/src/agent/message_convert_tests.rsindex 9d6acf4d5f..3b65b50c94 100644--- a/crates/openhuman-core/src/agent/message_convert_tests.rs+++ b/crates/openhuman-core/src/agent/message_convert_tests.rs@@ -26,18 +26,21 @@ fn durable_upload_parts_survive_message_row_replay_without_inline_payloads() {let Message::User(user) = replay else {panic!("user row expected")};- assert!(user- .content- .iter()- .any(|part| matches!(part, ContentBlock::Audio(MediaRef::Path { .. }))));- assert!(user- .content- .iter()- .any(|part| matches!(part, ContentBlock::Video(MediaRef::Path { .. }))));- assert!(user- .content- .iter()- .any(|part| matches!(part, ContentBlock::Document(MediaRef::Path { .. }))));+ assert!(+ user.content+ .iter()+ .any(|part| matches!(part, ContentBlock::Audio(MediaRef::Path { .. })))+ );+ assert!(+ user.content+ .iter()+ .any(|part| matches!(part, ContentBlock::Video(MediaRef::Path { .. })))+ );+ assert!(+ user.content+ .iter()+ .any(|part| matches!(part, ContentBlock::Document(MediaRef::Path { .. })))+ );assert!(!serde_json::to_string(&row).unwrap().contains("base64"));}use tinyinference_llm::model::ModelRequest;@@ -304,10 +307,12 @@ fn reasoning_content_uses_typed_thinking_block_and_round_trips_metadata() {ContentBlock::Thinking { text, signature: None } if text == "private thoughts")}));- assert!(!assistant- .content- .iter()- .any(|block| matches!(block, ContentBlock::ProviderExtension(_))));+ assert!(+ !assistant+ .content+ .iter()+ .any(|block| matches!(block, ContentBlock::ProviderExtension(_)))+ );let back = message_to_chat_message(&msg).expect("assistant converts");assert_eq!(back.content, "visible answer");diff --git a/crates/openhuman-core/src/agent/session_host/codec.rs b/crates/openhuman-core/src/agent/session_host/codec.rsindex 9c1ffb8c9f..99174228d4 100644--- a/crates/openhuman-core/src/agent/session_host/codec.rs+++ b/crates/openhuman-core/src/agent/session_host/codec.rs@@ -314,20 +314,33 @@ fn attach_text_dialect_rounds(}}-/// Apply OpenHuman's historical orphan-head adoption to the replay view only.fn replayable_host_rows(rows: &[TranscriptMessage]) -> std::borrow::Cow<'_, [TranscriptMessage]> {// Old unpaired trims could persist tool results immediately after the// frozen system prefix (#6721). Later orphan results still fail native// validation. Merely resuming never rewrites the durable source.let prefix = rows.iter().take_while(|row| row.role == "system").count();- let orphan_count = rows[prefix..].iter().take_while(|row| row.role == "tool").count();+ let orphan_count = rows[prefix..]+ .iter()+ .take_while(|row| row.role == "tool")+ .count();if orphan_count == 0 {std::borrow::Cow::Borrowed(rows)} else {- tracing::warn!(orphan_count, "[session_host::codec] repaired legacy orphaned tool head");+ tracing::warn!(+ orphan_count,+ "[session_host::codec] repaired legacy orphaned tool head"+ );std::borrow::Cow::Owned(- rows[..prefix].iter().chain(&rows[prefix + orphan_count..]).cloned().collect(),+ rows[..prefix]+ .iter()+ .chain(&rows[prefix + orphan_count..])+ .cloned()+ .collect(),)}}++#[cfg(test)]+#[path = "codec_adoption_tests.rs"]+mod adoption_tests;diff --git a/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs b/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rsnew file mode 100644index 0000000000..1a872a261d--- /dev/null+++ b/crates/openhuman-core/src/agent/session_host/codec_adoption_tests.rs@@ -0,0 +1,91 @@+use super::*;+use tinyagents_runtime::ResumeMode;++fn meta() -> tinyagents_session::transcript::TranscriptMeta {+ tinyagents_session::transcript::TranscriptMeta {+ session_id: None,+ parent_session_id: None,+ agent_name: "adapter-test".into(),+ agent_id: Some("adapter-test".into()),+ agent_type: Some("root".into()),+ dispatcher: "test".into(),+ provider: None,+ model: None,+ created: chrono::Utc::now().to_rfc3339(),+ updated: chrono::Utc::now().to_rfc3339(),+ turn_count: 0,+ prefix_message_count: None,+ input_tokens: 0,+ output_tokens: 0,+ cached_input_tokens: 0,+ charged_amount_usd: 0.0,+ thread_id: None,+ task_id: None,+ }+}++#[test]+fn codec_still_rejects_an_orphan_result_after_a_user_message() {+ let transcript = tinyagents_session::transcript::SessionTranscript {+ meta: meta(),+ messages: [+ serde_json::json!({"role":"system","content":"frozen"}),+ serde_json::json!({"role":"tool","id":"legacy-head","content":"trimmed"}),+ serde_json::json!({"role":"user","content":"continue"}),+ serde_json::json!({"role":"tool","id":"later-orphan","content":"invalid"}),+ ]+ .into_iter()+ .map(|row| serde_json::from_value(row).unwrap())+ .collect(),+ tools: None,+ };+ let error = OpenHumanTranscriptCodec+ .decode_history(&transcript)+ .unwrap_err();+ assert!(error.to_string().contains("later-orphan"), "{error}");+ assert_eq!(transcript.messages[1].id.as_deref(), Some("legacy-head"));+}++#[test]+fn codec_retains_authoritative_row_metadata_after_legacy_head_adoption() {+ let transcript = tinyagents_session::transcript::SessionTranscript {+ meta: meta(),+ messages: [+ serde_json::json!({"role":"system","content":"frozen"}),+ serde_json::json!({"role":"tool","id":"legacy-head","content":"trimmed"}),+ serde_json::json!({"role":"user","content":"continue","request_id":"original",+ "extra_metadata":{"retained":"product-value"}}),+ ]+ .into_iter()+ .map(|row| serde_json::from_value(row).unwrap())+ .collect(),+ tools: None,+ };+ let previous = OpenHumanTranscriptCodec+ .decode_history(&transcript)+ .unwrap();+ let mut next = previous.clone();+ next.push(Message::assistant("done"));+ let rows = OpenHumanTranscriptCodec+ .reconcile(+ &transcript.messages,+ &previous,+ &next,+ &TranscriptTurnOptions {+ request_id: Some("new-turn".into()),+ thread_id: None,+ stream: false,+ resume: ResumeMode::Never,+ context: OpenHumanRunContext::new(),+ },+ )+ .unwrap();+ assert_eq!(rows[1].role, "user");+ assert_eq!(rows[1].request_id.as_deref(), Some("original"));+ assert_eq!(+ rows[1].extra_metadata,+ Some(serde_json::json!({"retained":"product-value"}))+ );+ assert_eq!(rows[2].request_id.as_deref(), Some("new-turn"));+ assert_eq!(transcript.messages[1].id.as_deref(), Some("legacy-head"));+}diff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rsindex 137f7f5083..22f77f5783 100644--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs@@ -104,14 +104,25 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {// The raw durable source still contains both leading orphans; the codec// must heal only its model-visible replay view before strict validation.let raw = tinyagents_session::transcript::read_transcript(&transcripts[0]).unwrap();- let raw_prefix = raw.messages.iter().take_while(|row| row.role == "system").count();+ let raw_prefix = raw+ .messages+ .iter()+ .take_while(|row| row.role == "system")+ .count();assert_eq!(- raw.messages[raw_prefix..].iter().take_while(|row| row.role == "tool")- .map(|row| row.id.as_deref().unwrap()).collect::<Vec<_>>(),+ raw.messages[raw_prefix..]+ .iter()+ .take_while(|row| row.role == "tool")+ .map(|row| row.id.as_deref().unwrap())+ .collect::<Vec<_>>(),["call_orphan_a", "call_orphan_b"],);assert!(host.resume_bound_session().await.unwrap());- let decoded = host.runtime_session.as_ref().expect("resumed runtime session").history();+ let decoded = host+ .runtime_session+ .as_ref()+ .expect("resumed runtime session")+ .history();assert!(!decoded.iter().any(|message| matches!(message, Message::Tool(tool) if tool.tool_call_id.starts_with("call_orphan"))));@@ -169,7 +180,9 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {!matches!(first_non_system, Message::Tool(_)),"the request must not open on an orphaned tool result, got {first_non_system:?}");- assert!(!sent- .iter()- .any(|m| matches!(m, Message::Tool(t) if t.tool_call_id.starts_with("call_orphan"))));+ assert!(+ !sent+ .iter()+ .any(|m| matches!(m, Message::Tool(t) if t.tool_call_id.starts_with("call_orphan")))+ );}diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rsindex e8d914d4a6..3b48ac420a 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs@@ -742,51 +742,3 @@ async fn reply_language_directive_rides_each_user_message_until_cleared_body() {"a cleared directive is gone next turn: {second}");}---#[test]-fn codec_still_rejects_an_orphan_result_after_a_user_message() {- let transcript = tinyagents_session::transcript::SessionTranscript {- meta: meta(),- messages: [- serde_json::json!({"role":"system","content":"frozen"}),- serde_json::json!({"role":"tool","id":"legacy-head","content":"trimmed"}),- serde_json::json!({"role":"user","content":"continue"}),- serde_json::json!({"role":"tool","id":"later-orphan","content":"invalid"}),- ].into_iter().map(|row| serde_json::from_value(row).unwrap()).collect(),- tools: None,- };- let error = OpenHumanTranscriptCodec.decode_history(&transcript).unwrap_err();- assert!(error.to_string().contains("later-orphan"), "{error}");- assert_eq!(transcript.messages[1].id.as_deref(), Some("legacy-head"));-}---#[test]-fn codec_retains_authoritative_row_metadata_after_legacy_head_adoption() {- let transcript = tinyagents_session::transcript::SessionTranscript {- meta: meta(),- messages: [- serde_json::json!({"role":"system","content":"frozen"}),- serde_json::json!({"role":"tool","id":"legacy-head","content":"trimmed"}),- serde_json::json!({"role":"user","content":"continue","request_id":"original",- "extra_metadata":{"retained":"product-value"}}),- ].into_iter().map(|row| serde_json::from_value(row).unwrap()).collect(),- tools: None,- };- let previous = OpenHumanTranscriptCodec.decode_history(&transcript).unwrap();- let mut next = previous.clone();- next.push(Message::assistant("done"));- let rows = OpenHumanTranscriptCodec.reconcile(- &transcript.messages, &previous, &next,- &TranscriptTurnOptions {- request_id: Some("new-turn".into()), thread_id: None, stream: false,- resume: ResumeMode::Never, context: OpenHumanRunContext::new(),- },- ).unwrap();- assert_eq!(rows[1].role, "user");- assert_eq!(rows[1].request_id.as_deref(), Some("original"));- assert_eq!(rows[1].extra_metadata, Some(serde_json::json!({"retained":"product-value"})));- assert_eq!(rows[2].request_id.as_deref(), Some("new-turn"));- assert_eq!(transcript.messages[1].id.as_deref(), Some("legacy-head"));-}diff --git a/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs b/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rsindex e1de3dbd23..1c8eb25d23 100644--- a/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs+++ b/crates/openhuman-core/src/agent/tinyagents/stop_hooks.rs@@ -2,8 +2,8 @@use crate::agent::cost::TurnCost;use std::sync::Arc;-use tinyagents_harness::middleware::library::{StopHookMetrics, StopHookMiddleware};use tinyagents_harness::middleware::StopHook;+use tinyagents_harness::middleware::library::{StopHookMetrics, StopHookMiddleware};use tinyagents_harness::steering::SteeringHandle;use tinyinference_llm::model::ModelResponse;@@ -39,7 +39,6 @@ pub(super) fn install(}}-fn record_halt_summary(halt_summary: &super::HaltSummarySlot,report: &tinyagents_harness::middleware::library::StopReport,diff --git a/crates/openhuman-core/src/agent/tinyagents/stop_hooks_tests.rs b/crates/openhuman-core/src/agent/tinyagents/stop_hooks_tests.rsindex f887d812b6..80b4381848 100644--- a/crates/openhuman-core/src/agent/tinyagents/stop_hooks_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/stop_hooks_tests.rs@@ -4,16 +4,27 @@ use super::*;fn a_poisoned_halt_summary_does_not_abort_stop_reporting() {let slot: super::super::HaltSummarySlot = Arc::new(std::sync::Mutex::new(None));let poisoned = Arc::clone(&slot);- assert!(std::thread::spawn(move || {- let _guard = poisoned.lock().unwrap();- panic!("synthetic prior writer failure");- }).join().is_err());- record_halt_summary(&slot, &tinyagents_harness::middleware::library::StopReport {- hook: "budget".into(),- reason: "limit reached".into(),- iteration: 2,- model: "test-model".into(),- });- assert_eq!(slot.lock().unwrap_or_else(std::sync::PoisonError::into_inner).as_deref(),- Some("Stopping after 2 model call(s): limit reached"));+ assert!(+ std::thread::spawn(move || {+ let _guard = poisoned.lock().unwrap();+ panic!("synthetic prior writer failure");+ })+ .join()+ .is_err()+ );+ record_halt_summary(+ &slot,+ &tinyagents_harness::middleware::library::StopReport {+ hook: "budget".into(),+ reason: "limit reached".into(),+ iteration: 2,+ model: "test-model".into(),+ },+ );+ assert_eq!(+ slot.lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .as_deref(),+ Some("Stopping after 2 model call(s): limit reached")+ );}diff --git a/crates/openhuman-embed/src/agent/approval_handler.rs b/crates/openhuman-embed/src/agent/approval_handler.rsindex 68e4174f38..a3d4c3ac10 100644--- a/crates/openhuman-embed/src/agent/approval_handler.rs+++ b/crates/openhuman-embed/src/agent/approval_handler.rs@@ -1,6 +1,6 @@//! Callback-based approvals, using the same agent-scoped gate as polling.use crate::{ApprovalDecision, Approvals, CancellationToken, PendingApproval};-use openhuman_core::core::bus::{EventHandler, SubscriptionHandle, BUS};+use openhuman_core::core::bus::{BUS, EventHandler, SubscriptionHandle};use openhuman_core::core::events::DomainEvent;use std::sync::Arc;diff --git a/crates/openhuman-embed/src/agent/build_tests.rs b/crates/openhuman-embed/src/agent/build_tests.rsindex b8c000feef..543106656e 100644--- a/crates/openhuman-embed/src/agent/build_tests.rs+++ b/crates/openhuman-embed/src/agent/build_tests.rs@@ -67,10 +67,12 @@ fn sub_agents_become_workers_in_a_catalogue_of_the_agents_own() {own.get("orchestrator").is_some(),"built-ins stay reachable");- assert!(definition- .subagents- .iter()- .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "lead-helper")));+ assert!(+ definition+ .subagents+ .iter()+ .any(|entry| matches!(entry, SubagentEntry::AgentId(id) if id == "lead-helper"))+ );assert!(catalogue.get("lead-helper").is_none());}diff --git a/crates/openhuman-embed/src/agent/definition_tests.rs b/crates/openhuman-embed/src/agent/definition_tests.rsindex b4c4355cea..cb706713ab 100644--- a/crates/openhuman-embed/src/agent/definition_tests.rs+++ b/crates/openhuman-embed/src/agent/definition_tests.rs@@ -85,11 +85,13 @@ fn tool_rules_reach_the_core_definition() {.into_core("narrow").unwrap();assert_eq!(def.tool_rules, Some(rules));- assert!(AgentDefinitionSpec::new()- .into_core("open")- .unwrap()- .tool_rules- .is_none());+ assert!(+ AgentDefinitionSpec::new()+ .into_core("open")+ .unwrap()+ .tool_rules+ .is_none()+ );}#[test]@@ -120,10 +122,12 @@ fn template_overrides_are_independent_and_keep_restrictions() {assert_eq!(first.temperature, 0.3);assert_eq!(second.temperature, 0.8);assert_eq!(second.max_iterations, 7);- assert!(AgentDefinitionSpec::new()- .tools(ToolScopeSpec::Wildcard)- .inherit(template)- .is_err());+ assert!(+ AgentDefinitionSpec::new()+ .tools(ToolScopeSpec::Wildcard)+ .inherit(template)+ .is_err()+ );}#[test]fn base_can_be_named_or_custom_and_unknown_names_are_typed() {diff --git a/crates/openhuman-embed/src/agent/lifecycle.rs b/crates/openhuman-embed/src/agent/lifecycle.rsindex 28d1d3a5bb..6efd5eed3f 100644--- a/crates/openhuman-embed/src/agent/lifecycle.rs+++ b/crates/openhuman-embed/src/agent/lifecycle.rs@@ -5,7 +5,7 @@ use std::sync::atomic::{AtomicBool, AtomicUsize, Ordering};use std::sync::{Arc, Mutex};use std::time::Duration;-use tokio::sync::{watch, Notify};+use tokio::sync::{Notify, watch};use crate::CoreError;diff --git a/crates/openhuman-embed/src/agent/mod.rs b/crates/openhuman-embed/src/agent/mod.rsindex 13ea47e015..5d786ad1f7 100644--- a/crates/openhuman-embed/src/agent/mod.rs+++ b/crates/openhuman-embed/src/agent/mod.rs@@ -37,9 +37,9 @@ use openhuman_core::agent::harness::definition::AgentDefinition;use openhuman_core::config::Config;use openhuman_core::core::runtime::{CoreContext, CoreRuntime};+use crate::CoreError;use crate::harness::{Access, Provider};use crate::turn::{Turn, TurnOutcome, TurnTarget};-use crate::CoreError;/// Error from instantiating or driving an [`Agent`].#[derive(Debug, thiserror::Error)]diff --git a/crates/openhuman-embed/src/agent/spec.rs b/crates/openhuman-embed/src/agent/spec.rsindex 286cdf0783..e7f96657d4 100644--- a/crates/openhuman-embed/src/agent/spec.rs+++ b/crates/openhuman-embed/src/agent/spec.rs@@ -417,11 +417,11 @@ impl AgentSpec {pub fn tools(mut self,f: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.host_tools = Some(std::sync::Arc::new(f));selfdiff --git a/crates/openhuman-embed/src/agent/spec_tests.rs b/crates/openhuman-embed/src/agent/spec_tests.rsindex cc5005f658..5f42183ca8 100644--- a/crates/openhuman-embed/src/agent/spec_tests.rs+++ b/crates/openhuman-embed/src/agent/spec_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::agent::build::{check_domains_narrow, check_tool_groups_narrow};use crate::AgentError;+use crate::agent::build::{check_domains_narrow, check_tool_groups_narrow};use openhuman_core::tools::toolpacks::GroupMode;#[test]diff --git a/crates/openhuman-embed/src/artifacts.rs b/crates/openhuman-embed/src/artifacts.rsindex 8bc9708aa8..07b4088f21 100644--- a/crates/openhuman-embed/src/artifacts.rs+++ b/crates/openhuman-embed/src/artifacts.rs@@ -4,9 +4,9 @@//! The constructors below the line exist for host tests that need a real//! artifact on disk; production hosts only resolve.-pub use openhuman_core::agent::artifacts::{resolve_ready_file, FileRoots};+pub use openhuman_core::agent::artifacts::{FileRoots, resolve_ready_file};#[doc(hidden)]pub use openhuman_core::agent::artifacts::{- create_artifact, finalize_artifact, ArtifactKind, ArtifactMeta, ArtifactStatus,+ ArtifactKind, ArtifactMeta, ArtifactStatus, create_artifact, finalize_artifact,};diff --git a/crates/openhuman-embed/src/call.rs b/crates/openhuman-embed/src/call.rsindex aa70bfbeef..3114cbebcc 100644--- a/crates/openhuman-embed/src/call.rs+++ b/crates/openhuman-embed/src/call.rs@@ -36,8 +36,8 @@//! log line. [`unwrap_outcome_envelope`] absorbs that here so no facade method//! and no host has to think about it.-use serde::de::DeserializeOwned;use serde::Serialize;+use serde::de::DeserializeOwned;use super::error::CoreError;use openhuman_core::core::runtime::CoreRuntime;diff --git a/crates/openhuman-embed/src/cancellation.rs b/crates/openhuman-embed/src/cancellation.rsindex be5eb0a3fd..b1f9e99cc4 100644--- a/crates/openhuman-embed/src/cancellation.rs+++ b/crates/openhuman-embed/src/cancellation.rs@@ -47,6 +47,6 @@ impl Cancellation {pub(crate) struct Guard(Cancellation);impl Drop for Guard {fn drop(&mut self) {- self.0 .0.active.send_modify(|count| *count -= 1);+ self.0.0.active.send_modify(|count| *count -= 1);}}diff --git a/crates/openhuman-embed/src/chat_surface.rs b/crates/openhuman-embed/src/chat_surface.rsindex 1fd074ac22..dc52bdff56 100644--- a/crates/openhuman-embed/src/chat_surface.rs+++ b/crates/openhuman-embed/src/chat_surface.rs@@ -6,6 +6,6 @@//! then reads it with [`subscribe_web_channel_events`].pub use openhuman_core::web_chat::{- publish_web_channel_event, register_approval_surface_subscriber,- register_artifact_surface_subscriber, subscribe_web_channel_events, WebChannelEvent,+ WebChannelEvent, publish_web_channel_event, register_approval_surface_subscriber,+ register_artifact_surface_subscriber, subscribe_web_channel_events,};diff --git a/crates/openhuman-embed/src/complete.rs b/crates/openhuman-embed/src/complete.rsindex 1e4db46008..2386d7ca18 100644--- a/crates/openhuman-embed/src/complete.rs+++ b/crates/openhuman-embed/src/complete.rs@@ -53,7 +53,7 @@ use tinyinference_llm::message::{ContentBlock, ImageRef, Message, UserMessage};use tinyinference_llm::model::{ModelRequest, ModelResponse};use crate::error::CoreError;-use crate::turn::{is_safe_endpoint_for_bearer, sanitize_url_for_display, Route};+use crate::turn::{Route, is_safe_endpoint_for_bearer, sanitize_url_for_display};/// Method label carried by every [`CoreError`] this module returns.pub const COMPLETE: &str = "openhuman.complete";@@ -539,7 +539,7 @@ impl Completer {mut request: CompletionRequest,) -> Result<CompletionResponse, CoreError> {use crate::structured::{- accumulate, StructuredFailureReason, StructuredOutputFailure, Validator,+ StructuredFailureReason, StructuredOutputFailure, Validator, accumulate,};let initial_failure = |reason| CoreError::StructuredOutput {method: COMPLETE,diff --git a/crates/openhuman-embed/src/config.rs b/crates/openhuman-embed/src/config.rsindex 6990e17108..3be48d5e9b 100644--- a/crates/openhuman-embed/src/config.rs+++ b/crates/openhuman-embed/src/config.rs@@ -70,12 +70,12 @@ pub use tinytools::{DefaultEffect, Patterns, RuleEffect, Surface, ToolMatcher, ToolRule, ToolRules,};+/// The core's config type, as [`crate::RuntimeConfig`].+pub use openhuman_core::config::Config as RuntimeConfig;/// Typed runtime builder policy groups from the core configuration contract.pub use openhuman_core::config::schema::{AutonomyConfig, CronConfig, PrivacyConfig, PrivacyMode, SecretsConfig,};-/// The core's config type, as [`crate::RuntimeConfig`].-pub use openhuman_core::config::Config as RuntimeConfig;/// Load `config.toml` (creating defaults when absent) with the environment/// overlay and per-user scoping — what a core with no supplied config bootsdiff --git a/crates/openhuman-embed/src/embeddings.rs b/crates/openhuman-embed/src/embeddings.rsindex 9dac1faa72..65ed53e053 100644--- a/crates/openhuman-embed/src/embeddings.rs+++ b/crates/openhuman-embed/src/embeddings.rs@@ -16,11 +16,11 @@//! [`Runtime`](crate::Runtime).pub use tinyinference_embeddings::{- format_embedding_signature, set_rate_limit, CohereEmbeddingModel, EmbeddingModel,- MockEmbeddingModel, NoopEmbeddingModel, OllamaEmbeddingModel, OpenAiEmbeddingModel,- VoyageEmbeddingModel, COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL,+ COHERE_API_BASE, COHERE_DEFAULT_DIMENSIONS, COHERE_DEFAULT_MODEL, CohereEmbeddingModel,DEFAULT_OLLAMA_DIMENSIONS, DEFAULT_OLLAMA_MODEL, DEFAULT_OLLAMA_URL,- DEFAULT_REQUESTS_PER_MINUTE, VOYAGE_API_BASE, VOYAGE_DEFAULT_DIMENSIONS, VOYAGE_DEFAULT_MODEL,+ DEFAULT_REQUESTS_PER_MINUTE, EmbeddingModel, MockEmbeddingModel, NoopEmbeddingModel,+ OllamaEmbeddingModel, OpenAiEmbeddingModel, VOYAGE_API_BASE, VOYAGE_DEFAULT_DIMENSIONS,+ VOYAGE_DEFAULT_MODEL, VoyageEmbeddingModel, format_embedding_signature, set_rate_limit,};/// Errors the embedding models return.pub use tinyinference_embeddings::{Error as EmbeddingError, Result as EmbeddingResult};diff --git a/crates/openhuman-embed/src/error.rs b/crates/openhuman-embed/src/error.rsindex 387d1944c5..524c7305eb 100644--- a/crates/openhuman-embed/src/error.rs+++ b/crates/openhuman-embed/src/error.rs@@ -20,8 +20,8 @@//! facade classifies it. A host that cannot make that distinction renders a//! scary red error where it should simply hide a tab.-use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;use openhuman_core::core::StructuredRpcError;+use openhuman_core::core::dispatch::UNKNOWN_METHOD_PREFIX;/// Error returned by every typed facade call.#[derive(Debug, thiserror::Error)]diff --git a/crates/openhuman-embed/src/events.rs b/crates/openhuman-embed/src/events.rsindex 5a2dd8162e..89f1d516ed 100644--- a/crates/openhuman-embed/src/events.rs+++ b/crates/openhuman-embed/src/events.rs@@ -1,7 +1,7 @@//! Content-free runtime observations with bounded, explicit backpressure.use futures_core::Stream;-use openhuman_core::core::bus::{EventHandler, SubscriptionHandle, BUS};+use openhuman_core::core::bus::{BUS, EventHandler, SubscriptionHandle};use openhuman_core::core::events::DomainEvent;use serde::{Deserialize, Serialize};use std::collections::{BTreeMap, BTreeSet};@@ -9,7 +9,7 @@ use std::pin::Pin;use std::sync::{Arc, Mutex, Weak};use std::task::{Context, Poll};use tokio::sync::broadcast;-use tokio_stream::wrappers::{errors::BroadcastStreamRecvError, BroadcastStream};+use tokio_stream::wrappers::{BroadcastStream, errors::BroadcastStreamRecvError};/// Metadata about one runtime transition; never includes user/tool payloads.#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]diff --git a/crates/openhuman-embed/src/harness/builder.rs b/crates/openhuman-embed/src/harness/builder.rsindex 5da75a5a80..ce3f73e216 100644--- a/crates/openhuman-embed/src/harness/builder.rs+++ b/crates/openhuman-embed/src/harness/builder.rs@@ -9,14 +9,14 @@use std::path::PathBuf;+use super::Harness;use super::access::Access;use super::error::HarnessError;use super::provider::Provider;use super::workspace::Workspace;-use super::Harness;+use crate::Session;use crate::agent::AgentSpec;use crate::runtime::RuntimeBuilder;-use crate::Session;use openhuman_core::config::Config;use openhuman_core::core::runtime::{DomainSet, ServiceSet};use openhuman_core::core::types::HostKind;@@ -130,11 +130,11 @@ impl HarnessBuilder {pub fn tools(mut self,f: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.host_tools = Some(std::sync::Arc::new(f));selfdiff --git a/crates/openhuman-embed/src/harness/mod.rs b/crates/openhuman-embed/src/harness/mod.rsindex 4a89a6b1e6..c0c4f5b5c1 100644--- a/crates/openhuman-embed/src/harness/mod.rs+++ b/crates/openhuman-embed/src/harness/mod.rs@@ -101,10 +101,10 @@ pub use workspace::Workspace;use std::path::Path;+use crate::Core;use crate::agent::Agent;use crate::runtime::Runtime;use crate::turn::{Turn, TurnOutcome};-use crate::Core;/// An embedded OpenHuman agent harness: one runtime, one agent.///diff --git a/crates/openhuman-embed/src/host_internals.rs b/crates/openhuman-embed/src/host_internals.rsindex c92bbb5ab9..dcec2d57de 100644--- a/crates/openhuman-embed/src/host_internals.rs+++ b/crates/openhuman-embed/src/host_internals.rs@@ -20,16 +20,16 @@ pub use openhuman_core::run_core_from_args;/// Shared by tinyhumans (hosted controllers) and rpc (`http_host`, `/health`).pub mod core {pub use openhuman_core::core::{- unwrap_rpc, ControllerSchema, FieldSchema, Outcome, StructuredRpcError, TypeSchema,+ ControllerSchema, FieldSchema, Outcome, StructuredRpcError, TypeSchema, unwrap_rpc,};pub mod all {// tinyhumans: hosted controller extension; rpc: http_host + `/health`.pub use openhuman_core::core::all::{+ ControllerExtension, ControllerFuture, DomainGroup, RegisteredController,all_controller_schemas, all_http_method_schemas, cli_handler_for_namespace,namespace_description, register_controller_extension, rpc_method_from_parts,- schema_for_rpc_method, ControllerExtension, ControllerFuture, DomainGroup,- RegisteredController,+ schema_for_rpc_method,};}@@ -37,30 +37,30 @@ pub mod core {/// RPC handler and classifier (rpc).pub mod observability {pub use openhuman_core::core::observability::{- contains_transient_transport_phrase, expected_error_kind, is_api_key_rejected_message,- is_session_expired_message, is_suppressed_usage_probe_backoff,- is_transient_http_status_code, is_transient_message_failure, report_error_or_expected,- report_warning_message, ExpectedErrorKind, API_KEY_REJECTED_PREFIX,- BACKEND_UNAVAILABLE_PREFIX, REPORT_ERROR_TRACING_TARGET,+ API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX, ExpectedErrorKind,+ REPORT_ERROR_TRACING_TARGET, contains_transient_transport_phrase, expected_error_kind,+ is_api_key_rejected_message, is_session_expired_message,+ is_suppressed_usage_probe_backoff, is_transient_http_status_code,+ is_transient_message_failure, report_error_or_expected, report_warning_message,};}// rpc server only, below.pub mod auth {pub use openhuman_core::core::auth::{- bearer_matches, get_rpc_token, init_rpc_token, init_rpc_token_with_value,- verify_bearer_token, CORE_TOKEN_ENV_VAR,+ CORE_TOKEN_ENV_VAR, bearer_matches, get_rpc_token, init_rpc_token,+ init_rpc_token_with_value, verify_bearer_token,};}pub mod bus {- pub use openhuman_core::core::bus::{init, BUS};+ pub use openhuman_core::core::bus::{BUS, init};}pub mod cli {pub use openhuman_core::core::cli::load_dotenv_for_cli;}pub mod dispatch {pub use openhuman_core::core::dispatch::{- is_known_probe_method, unknown_method_name, UNKNOWN_METHOD_PREFIX,+ UNKNOWN_METHOD_PREFIX, is_known_probe_method, unknown_method_name,};}pub mod event_bind_tokens {@@ -80,14 +80,14 @@ pub mod core {}pub mod runtime {pub use openhuman_core::core::runtime::{- current_tenant, is_saas, CoreContext, CoreRuntime, Mode, SaasConfig,+ CoreContext, CoreRuntime, Mode, SaasConfig, current_tenant, is_saas,};pub mod saas {pub use openhuman_core::core::runtime::saas::build;}}pub mod server_launcher {- pub use openhuman_core::core::server_launcher::{install_server_launcher, ServeRequest};+ pub use openhuman_core::core::server_launcher::{ServeRequest, install_server_launcher};}pub mod session_expiry {pub use openhuman_core::core::session_expiry::is_session_expired_error;@@ -103,13 +103,13 @@ pub mod core {/// tinyhumans (backend transport, hosted client, team ops) and rpc (`/health`).pub mod backend {pub use openhuman_core::backend::{- base_url, flatten_authed_error, BackendApiError, BackendClient,+ BackendApiError, BackendClient, base_url, flatten_authed_error,};pub mod transport {pub use openhuman_core::backend::transport::{- clear_backend_transport, resolve_backend_transport, BackendTransport,- BackendTransportError, TransportProfile,+ BackendTransport, BackendTransportError, TransportProfile, clear_backend_transport,+ resolve_backend_transport,};}}@@ -117,14 +117,14 @@ pub mod backend {/// tinyhumans (every hosted controller loads its config) and rpc (server).pub mod config {pub use openhuman_core::config::{- active_workspace_dir, active_workspace_dir_cached, active_workspace_snapshot,- load_config_with_timeout, workspace_handle, Config,+ Config, active_workspace_dir, active_workspace_dir_cached, active_workspace_snapshot,+ load_config_with_timeout, workspace_handle,};pub mod app_env {// tinyhumans: backend URL selection.pub use openhuman_core::config::app_env::{- app_env_from_env, is_staging_app_env, APP_ENV_VAR, VITE_APP_ENV_VAR,+ APP_ENV_VAR, VITE_APP_ENV_VAR, app_env_from_env, is_staging_app_env,};}pub mod ops {@@ -191,9 +191,9 @@ pub mod inference {}}pub mod http {+ pub use openhuman_core::inference::http::EXTERNAL_OPENAI_COMPAT_PROVIDER;#[cfg(feature = "http-server")]pub use openhuman_core::inference::http::router;- pub use openhuman_core::inference::http::EXTERNAL_OPENAI_COMPAT_PROVIDER;}}@@ -210,16 +210,16 @@ pub mod security {/// Host-supplied secret storage and encryption-key sources.pub mod secret_storage {pub use openhuman_core::security::secret_storage::{+ EncryptedFileBackend, MasterKeySource, SecretBackend, SecretStorageError,clear_master_key_source, clear_secret_backend, init_workspace,install_master_key_source, install_secret_backend, installed_master_key_source,installed_secret_backend, is_available, store::workspace_dir_for_file_backend,- EncryptedFileBackend, MasterKeySource, SecretBackend, SecretStorageError,};}pub mod credentials {pub use openhuman_core::security::credentials::{- channel_credential_provider, AuthService, APP_SESSION_PROVIDER,- DEFAULT_AUTH_PROFILE_NAME,+ APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME,+ channel_credential_provider,};pub mod ops {pub use openhuman_core::security::credentials::ops::{@@ -228,8 +228,8 @@ pub mod security {}pub mod session_support {pub use openhuman_core::security::credentials::session_support::{- build_session_state, current_session_is_local, resolve_backend_credential,- BackendCredential, LOCAL_SESSION_BACKEND_UNAVAILABLE,+ BackendCredential, LOCAL_SESSION_BACKEND_UNAVAILABLE, build_session_state,+ current_session_is_local, resolve_backend_credential,};}}@@ -281,7 +281,7 @@ pub mod platform {pub mod connectivity {pub mod rpc {pub use openhuman_core::platform::connectivity::rpc::{- pick_listen_port_for_host_with, OccupiedByCore,+ OccupiedByCore, pick_listen_port_for_host_with,};}}@@ -292,16 +292,16 @@ pub mod platform {pub mod storage {pub use openhuman_core::storage::{- block_on, block_on_anyhow, clear, configured_url, driver_is_shared, install, installed,- open, url_from, StorageBackend, STORAGE_URL_VAR,+ STORAGE_URL_VAR, StorageBackend, block_on, block_on_anyhow, clear, configured_url,+ driver_is_shared, install, installed, open, url_from,};}pub mod profiles {pub mod gateway {pub use openhuman_core::profiles::gateway::{- resolve_scope, sign, verify, GatewayRefusal, GatewayScope, HeldBy, PROFILE_HELD,- PROFILE_OWNER_HEADER, USER_HEADER, USER_SIG_HEADER,+ GatewayRefusal, GatewayScope, HeldBy, PROFILE_HELD, PROFILE_OWNER_HEADER, USER_HEADER,+ USER_SIG_HEADER, resolve_scope, sign, verify,};}pub mod host {@@ -343,9 +343,9 @@ pub mod web3 {pub mod web_chat {pub use openhuman_core::web_chat::{+ ChatRequestMetadata, GuardrailPayload, StartChatError, WebChannelEvent,approval_request_event, cancel_chat_scoped, plan_review_request_event,publish_web_channel_event, start_chat, subscribe_web_channel_events, unix_epoch_ms,- ChatRequestMetadata, GuardrailPayload, StartChatError, WebChannelEvent,};}diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rsindex e96ff40a3a..2289c1c69b 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -67,8 +67,8 @@pub use openhuman_core::agent::harness::definition::AgentDefinition;pub use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};pub use openhuman_core::backend::{- install_backend_transport, installed_backend_transport, BackendRequest, BackendTransport,- BackendTransportError, BaseUrlPurpose, TransportProfile,+ BackendRequest, BackendTransport, BackendTransportError, BaseUrlPurpose, TransportProfile,+ install_backend_transport, installed_backend_transport,};pub use openhuman_core::config::ComposioHostCredential;pub use openhuman_core::config::Config as RuntimeConfig;@@ -90,7 +90,7 @@ pub use tinytools::ToolPolicy;pub mod agent_progress {pub use openhuman_core::agent::progress::AgentProgress;pub use openhuman_core::agent::progress_sink::{- current_progress_sink, with_progress_sink, ProgressSink, AGENT_PROGRESS_SINK,+ AGENT_PROGRESS_SINK, ProgressSink, current_progress_sink, with_progress_sink,};}@@ -100,7 +100,7 @@ pub mod agent_progress {#[cfg(feature = "skills")]pub mod skill_registry {pub use openhuman_core::skills::catalog::{- skill_registry, ReqwestTransport, HERMES_REGISTRY_ID,+ HERMES_REGISTRY_ID, ReqwestTransport, skill_registry,};}@@ -144,11 +144,11 @@ mod turn_meter;#[path = "host_internals.rs"]pub mod __host;+pub use openhuman_core::core::ControllerSchema;/// Look up the schema of a registered RPC method (`openhuman.<ns>_<fn>`).pub use openhuman_core::core::all::schema_for_rpc_method;/// Whether this build carries the HTTP server surface the router mounts.pub use openhuman_core::core::http_server_status::HTTP_SERVER_COMPILED_IN;-pub use openhuman_core::core::ControllerSchema;/// Why a listen-port pick failed (another live core holds the port, ...).pub use openhuman_core::platform::connectivity::rpc::PickListenPortError;/// Whether this build carries the voice domain.@@ -180,14 +180,14 @@ pub use profiles::{ProfileRuntime, ProfileRuntimeBuilder, ProfileSummary, Provisioned, RelayAccepted,RelayMessage, SaasConfig,};-pub use runtime::builder::DEFAULT_MAX_AGENTS;/// Read-only view of a [`RuntimeBuilder`], for the layered crates' tests.#[doc(hidden)]pub use runtime::BuilderSummary;+pub use runtime::builder::DEFAULT_MAX_AGENTS;pub use runtime::{- run_from_args, AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo,- LearningSettings, ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults,- RuntimeError, RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass,+ AgentDefaults, ApiKey, ConfigSource, ConfigurationInfo, DefaultsInfo, LearningSettings,+ ModelDefaults, RemoveAgent, Runtime, RuntimeBuilder, RuntimeDefaults, RuntimeError,+ RuntimeInfo, RuntimeModule, SkillsPolicy, StorageInfo, WeightClass, run_from_args,};/// The types the [`RuntimeBuilder`] seam options take: controller@@ -197,10 +197,10 @@ pub use runtime::{/// so the trait unifies — re-exporting it here would break the/// agent-runtime ownership boundary.pub mod seams {- pub use openhuman_core::agent::stop_hooks::TurnCost;pub use openhuman_core::agent::hooks::{PostTurnHook, ToolHook};pub use openhuman_core::agent::hooks::{ToolHookContext, ToolHookDecision, TurnContext};pub use openhuman_core::agent::stop_hooks::BudgetStopHook;+ pub use openhuman_core::agent::stop_hooks::TurnCost;pub use tinyagents_harness::middleware::{StopDecision, StopHook};/// Product cost snapshot passed to harness-owned stop policies.pub type TurnState<'a> = tinyagents_harness::middleware::TurnState<'a, TurnCost>;@@ -240,7 +240,7 @@ pub use complete::{CompletionTrace, CompletionUsage,};pub use session_store::{InMemorySessionStores, SessionStoreProvider};-pub use turn::{absolute, Route, Turn, TurnOutcome, TurnRequest};+pub use turn::{Route, Turn, TurnOutcome, TurnRequest, absolute};pub use turn_cancellation::TurnCancellation;use std::sync::Arc;diff --git a/crates/openhuman-embed/src/process_sentry.rs b/crates/openhuman-embed/src/process_sentry.rsindex 886c39e9e3..ccc26f7d2b 100644--- a/crates/openhuman-embed/src/process_sentry.rs+++ b/crates/openhuman-embed/src/process_sentry.rs@@ -12,8 +12,8 @@ use std::borrow::Cow;use std::sync::Arc;use openhuman_core::core::observability as obs;-pub use sentry::protocol::Event;pub use sentry::ClientOptions;+pub use sentry::protocol::Event;/// Re-exported so a host initialises the same `sentry` the options were/// built for.diff --git a/crates/openhuman-embed/src/profiles.rs b/crates/openhuman-embed/src/profiles.rsindex 0332e1704b..131dc7382d 100644--- a/crates/openhuman-embed/src/profiles.rs+++ b/crates/openhuman-embed/src/profiles.rs@@ -55,8 +55,8 @@ use std::sync::Arc;use openhuman_core::agent::session_store::SessionStoreProvider;use openhuman_core::core::runtime::CoreRuntime;-use openhuman_core::profiles::credentials::UserCredentialKind;use openhuman_core::profiles::ProfileHost;+use openhuman_core::profiles::credentials::UserCredentialKind;use crate::error::CoreError;@@ -64,8 +64,8 @@ mod handle;pub use handle::{ChatReply, ProfileEvents, ProfileHandle, RelayAccepted};pub use openhuman_core::channels::providers::relay::RelayInboundParams as RelayMessage;-pub use openhuman_core::core::runtime::saas::SaasSandboxConfig;pub use openhuman_core::core::runtime::SaasConfig;+pub use openhuman_core::core::runtime::saas::SaasSandboxConfig;pub use openhuman_core::profiles::{OpenError, ProfileId, ProfileIdMode, ProfileSummary};pub use openhuman_core::storage::lease::LeaseRecord;pub use openhuman_core::threads::{ConversationMessageRecord, ConversationThreadSummary};diff --git a/crates/openhuman-embed/src/runtime/build.rs b/crates/openhuman-embed/src/runtime/build.rsindex 384d525df7..710dff6e44 100644--- a/crates/openhuman-embed/src/runtime/build.rs+++ b/crates/openhuman-embed/src/runtime/build.rs@@ -8,12 +8,12 @@ use openhuman_core::config::Config;use openhuman_core::core::runtime::CoreBuilder;use openhuman_core::core::types::HostKind;-use super::builder::{requests_background_services, ConfigSource};+use super::builder::{ConfigSource, requests_background_services};use super::presets::{default_domains, default_services};-use super::{ApiKey, Runtime, RuntimeBuilder, RuntimeError, RUNTIME_LIVE};+use super::{ApiKey, RUNTIME_LIVE, Runtime, RuntimeBuilder, RuntimeError};+use crate::Core;use crate::harness::workspace::ResolvedWorkspace;use crate::harness::{Provider, Workspace};-use crate::Core;struct SessionStoreCleanup {installed: Option<Arc<dyn SessionStoreProvider>>,diff --git a/crates/openhuman-embed/src/runtime/builder.rs b/crates/openhuman-embed/src/runtime/builder.rsindex b68ce6fed3..2621abb7f5 100644--- a/crates/openhuman-embed/src/runtime/builder.rs+++ b/crates/openhuman-embed/src/runtime/builder.rs@@ -21,10 +21,10 @@ use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;-use super::seams::HostSeams;use super::ApiKey;-use crate::harness::{Access, Provider, Workspace};+use super::seams::HostSeams;use crate::Session;+use crate::harness::{Access, Provider, Workspace};// Re-exported for the sibling test module and older call sites that reached// the default triples through this module.@@ -40,7 +40,7 @@ pub(crate) use super::build::{effective_host_kind, routed_provider_effective};#[cfg(test)]pub(crate) use super::presets::{default_domains, default_services};#[cfg(test)]-pub(crate) use super::{RuntimeError, RUNTIME_LIVE};+pub(crate) use super::{RUNTIME_LIVE, RuntimeError};/// Who produces the [`Config`] the core boots with.///diff --git a/crates/openhuman-embed/src/runtime/info.rs b/crates/openhuman-embed/src/runtime/info.rsindex 66ed2b9d88..352aaefa9e 100644--- a/crates/openhuman-embed/src/runtime/info.rs+++ b/crates/openhuman-embed/src/runtime/info.rs@@ -1,8 +1,8 @@//! Versioned, credential-safe runtime capability metadata.use super::{LearningSettings, ModelDefaults, Runtime, RuntimeBuilder};use openhuman_core::config::{- schema::{AutonomyConfig, CronConfig, PrivacyConfig, SecretsConfig},Config,+ schema::{AutonomyConfig, CronConfig, PrivacyConfig, SecretsConfig},};use std::collections::BTreeMap;diff --git a/crates/openhuman-embed/src/runtime/info_tests.rs b/crates/openhuman-embed/src/runtime/info_tests.rsindex 9a9673d709..4e84b0032a 100644--- a/crates/openhuman-embed/src/runtime/info_tests.rs+++ b/crates/openhuman-embed/src/runtime/info_tests.rs@@ -157,13 +157,15 @@ fn unavailable_module_error_names_its_cargo_feature() {fn discovered_config_still_rejects_typed_boot_edits() {let builder = RuntimeBuilder::desktop().cron(Default::default());assert!(builder.validate().is_err());- assert!(RuntimeBuilder::desktop()- .model_defaults(ModelDefaults {- max_tokens: Some(300),- ..Default::default()- })- .validate()- .is_ok());+ assert!(+ RuntimeBuilder::desktop()+ .model_defaults(ModelDefaults {+ max_tokens: Some(300),+ ..Default::default()+ })+ .validate()+ .is_ok()+ );}#[test]diff --git a/crates/openhuman-embed/src/runtime/mod.rs b/crates/openhuman-embed/src/runtime/mod.rsindex a42496c062..062335dab2 100644--- a/crates/openhuman-embed/src/runtime/mod.rs+++ b/crates/openhuman-embed/src/runtime/mod.rs@@ -103,8 +103,8 @@ use openhuman_core::core::runtime::{CoreRuntime, DomainSet, ServiceSet};use openhuman_core::tools::toolpacks::ToolGroups;use crate::agent::{Agent, AgentError, AgentSpec};-use crate::harness::workspace::ResolvedWorkspace;use crate::harness::HarnessCore;+use crate::harness::workspace::ResolvedWorkspace;use crate::{Core, CoreError};/// Guards the process-scoped core state described in the module docs.diff --git a/crates/openhuman-embed/src/runtime/presets.rs b/crates/openhuman-embed/src/runtime/presets.rsindex fbe897dd96..6e38b66bff 100644--- a/crates/openhuman-embed/src/runtime/presets.rs+++ b/crates/openhuman-embed/src/runtime/presets.rs@@ -24,8 +24,8 @@ use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;-use super::builder::ConfigSource;use super::RuntimeBuilder;+use super::builder::ConfigSource;use crate::harness::Workspace;impl RuntimeBuilder {diff --git a/crates/openhuman-embed/src/runtime/seams.rs b/crates/openhuman-embed/src/runtime/seams.rsindex be563bfffb..1eee9072b6 100644--- a/crates/openhuman-embed/src/runtime/seams.rs+++ b/crates/openhuman-embed/src/runtime/seams.rs@@ -23,14 +23,14 @@use std::sync::Arc;use openhuman_core::agent::hooks::{- embedder_post_turn_hooks, embedder_tool_hooks, replace_embedder_post_turn_hook,- replace_embedder_tool_hook, PostTurnHook, ToolHook,+ PostTurnHook, ToolHook, embedder_post_turn_hooks, embedder_tool_hooks,+ replace_embedder_post_turn_hook, replace_embedder_tool_hook,};use openhuman_core::agent::tinyagents::discovery::{clear_tool_ranker, install_tool_ranker, installed_tool_ranker,};-use openhuman_core::core::all::{register_controller_extension, ControllerExtension};-use openhuman_core::core::server_launcher::{install_server_launcher, ServerLauncher};+use openhuman_core::core::all::{ControllerExtension, register_controller_extension};+use openhuman_core::core::server_launcher::{ServerLauncher, install_server_launcher};use openhuman_core::security::SecurityPolicy;use openhuman_core::storage::StorageBackend;use tinytools::ToolRanker;diff --git a/crates/openhuman-embed/src/runtime/seams_tests.rs b/crates/openhuman-embed/src/runtime/seams_tests.rsindex 571f75166a..7558f3b742 100644--- a/crates/openhuman-embed/src/runtime/seams_tests.rs+++ b/crates/openhuman-embed/src/runtime/seams_tests.rs@@ -68,13 +68,17 @@ fn live_replacement_and_removal_update_builder_hooks_and_restore_predecessors()"seams-live-tool",Some(Arc::new(NamedToolHook("different-tool-name"))),);- assert!(embedder_tool_hooks()- .iter()- .any(|hook| hook.name() == "seams-live-tool"));+ assert!(+ embedder_tool_hooks()+ .iter()+ .any(|hook| hook.name() == "seams-live-tool")+ );seams.tool_hook("seams-live-tool", None);- assert!(!embedder_tool_hooks()- .iter()- .any(|hook| hook.name() == "seams-live-tool"));+ assert!(+ !embedder_tool_hooks()+ .iter()+ .any(|hook| hook.name() == "seams-live-tool")+ );drop(seams);assert!(Arc::ptr_eq(&embedder_post_turn_hooks()diff --git a/crates/openhuman-embed/src/runtime/summary.rs b/crates/openhuman-embed/src/runtime/summary.rsindex c4934eaf10..26ebea0fb5 100644--- a/crates/openhuman-embed/src/runtime/summary.rs+++ b/crates/openhuman-embed/src/runtime/summary.rs@@ -11,8 +11,8 @@ use openhuman_core::core::all::DomainGroup;use openhuman_core::core::runtime::{DomainSet, ServiceSet, TokenSource};use openhuman_core::core::types::HostKind;-use super::builder::ConfigSource;use super::RuntimeBuilder;+use super::builder::ConfigSource;use crate::harness::Workspace;/// What a [`RuntimeBuilder`] is set to; see the module docs.diff --git a/crates/openhuman-embed/src/secret_storage.rs b/crates/openhuman-embed/src/secret_storage.rsindex 53164fc486..2e2891bb09 100644--- a/crates/openhuman-embed/src/secret_storage.rs+++ b/crates/openhuman-embed/src/secret_storage.rs@@ -8,6 +8,6 @@//! during core boot. Native OS providers belong to `openhuman-rpc::keyring`.pub use openhuman_core::security::secret_storage::{- install_secret_backend, installed_secret_backend, EncryptedFileBackend, MemoryBackend,- SecretBackend, SecretStorageError,+ EncryptedFileBackend, MemoryBackend, SecretBackend, SecretStorageError, install_secret_backend,+ installed_secret_backend,};diff --git a/crates/openhuman-embed/src/turn.rs b/crates/openhuman-embed/src/turn.rsindex e3fedd4f9d..309efe89cc 100644--- a/crates/openhuman-embed/src/turn.rs+++ b/crates/openhuman-embed/src/turn.rs@@ -47,8 +47,8 @@ use openhuman_core::inference::INFERENCE_AGENT_CHAT as AGENT_CHAT;#[path = "turn_types.rs"]mod types;-pub(crate) use types::{is_safe_endpoint_for_bearer, sanitize_url_for_display};pub use types::{Route, TurnOutcome, TurnRequest};+pub(crate) use types::{is_safe_endpoint_for_bearer, sanitize_url_for_display};#[path = "turn_control.rs"]mod control;@@ -146,11 +146,11 @@ impl Turn {pub fn tools(mut self,factory: impl for<'a> Fn(- openhuman_core::agent::TurnContext<'a>,- ) -> openhuman_core::agent::HostTurnTools- + Send- + Sync- + 'static,+ openhuman_core::agent::TurnContext<'a>,+ ) -> openhuman_core::agent::HostTurnTools+ + Send+ + Sync+ + 'static,) -> Self {self.tools = Some(Arc::new(factory));self@@ -506,7 +506,7 @@ async fn dispatch(let turn: futures_box::BoxFuture<'_, Result<AgentReply, CoreError>> =Box::pin(async move {use openhuman_core::inference::host_runtime::ops::{- agent_chat_for, AgentChatTarget,+ AgentChatTarget, agent_chat_for,};let mut config = inner.config.clone();let route = openhuman_core::config::schema::EphemeralRoute::from_params(