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(openhuman-embed): apply rustfmt import ordering and formatting
Steven Enamakel9fe55acd897a
diff --git a/crates/openhuman-embed/src/agent/build_tests.rs b/crates/openhuman-embed/src/agent/build_tests.rsindex 76bace8723..4cdf484118 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 737c969664..e2b1f23173 100644--- a/crates/openhuman-embed/src/agent/definition_tests.rs+++ b/crates/openhuman-embed/src/agent/definition_tests.rs@@ -89,11 +89,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]@@ -124,10 +126,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 27836dd694..030fce0cd2 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::host_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 8dd7a43c18..23c17c3a52 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::artifacts::{resolve_ready_file, FileRoots};+pub use openhuman_core::artifacts::{FileRoots, resolve_ready_file};#[doc(hidden)]pub use openhuman_core::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 5b6cf9b467..b096e080a9 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 018f52efaa..279bce7171 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/cron.rs b/crates/openhuman-embed/src/cron.rsindex 02d691e729..68ee76e853 100644--- a/crates/openhuman-embed/src/cron.rs+++ b/crates/openhuman-embed/src/cron.rs@@ -59,8 +59,8 @@ use std::future::Future;use std::time::SystemTime;use openhuman_core::config::Config;-use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;use openhuman_core::cron::JobPolicy;+use openhuman_core::cron::system_jobs::SYSTEM_COMMAND_PREFIX;use {openhuman_core::cron::CronJob, openhuman_core::cron::CronJobPatch,openhuman_core::cron::JobType, openhuman_core::cron::Schedule,diff --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 d528e8a0a8..cda93673d5 100644--- a/crates/openhuman-embed/src/events.rs+++ b/crates/openhuman-embed/src/events.rs@@ -8,7 +8,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};use {openhuman_core::core::bus::BUS, tinybus::EventHandler, tinybus::SubscriptionHandle};/// Metadata about one runtime transition; never includes user/tool payloads.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 9b38ebc982..484af48fb3 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, DispatchCtx, Mode, SaasConfig,+ CoreContext, CoreRuntime, DispatchCtx, 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 {@@ -167,8 +167,8 @@ pub mod agent {}pub mod session_store {pub use openhuman_core::agent::session_store::{- context_workspace_dir, install, installed, restore, ReboundSessionStores,- WorkspaceSessionStores,+ ReboundSessionStores, WorkspaceSessionStores, context_workspace_dir, install,+ installed, restore,};}}@@ -185,8 +185,8 @@ pub mod channels {pub mod inference {pub mod embedding_host {pub use openhuman_core::inference::embedding_host::{- default_embedding_provider_for_chat, default_embedding_provider_with_config,- SharedEmbeddingModel,+ SharedEmbeddingModel, default_embedding_provider_for_chat,+ default_embedding_provider_with_config,};}pub mod provider {@@ -195,9 +195,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;}}@@ -214,16 +214,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::{@@ -232,8 +232,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,};}}@@ -285,7 +285,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,};}}@@ -296,16 +296,16 @@ pub mod platform {pub mod storage {pub use openhuman_core::storage::{- block_on, block_on_anyhow, clear, configured_url, driver_is_shared, install,- install_for_url, installed, open, url_from, StorageBackend, STORAGE_URL_VAR,+ STORAGE_URL_VAR, StorageBackend, block_on, block_on_anyhow, clear, configured_url,+ driver_is_shared, install, install_for_url, 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 {@@ -347,9 +347,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 84ff1e180a..417408baf4 100644--- a/crates/openhuman-embed/src/lib.rs+++ b/crates/openhuman-embed/src/lib.rs@@ -77,14 +77,14 @@ pub fn current_turn_origin() -> Option<AgentTurnOrigin> {openhuman_core::core::runtime::CoreContext::current_turn_origin()}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;pub use openhuman_core::config::{SearchHostCredential, UnknownKeyedSearchProvider};/// The exact ambient tenant, inherited across profile turns and their scoped tasks.-pub use openhuman_core::core::runtime::{current_tenant, NoTenant, Tenant};+pub use openhuman_core::core::runtime::{NoTenant, Tenant, current_tenant};pub use openhuman_core::security::TrustedAccess;pub use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};// The seam `AgentSpec::tools` needs: the belt types, and `Tool` itself from the@@ -102,7 +102,8 @@ pub use tinytools::{PermissionLevel, Tool, ToolExposure, ToolResult};/// Live agent-turn progress for in-process embedders.pub mod agent_progress {pub use openhuman_core::agent::progress::AgentProgress;- pub use openhuman_core::agent::progress_sink::ProgressSink;+ /// The bounded in-process channel an embedder supplies for one agent turn.+ pub type ProgressSink = tokio::sync::mpsc::Sender<AgentProgress>;}/// The skill registry: the host transport an embedder passes to@@ -111,7 +112,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,};}@@ -156,11 +157,11 @@ mod turn_steering;#[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.@@ -186,10 +187,10 @@ pub use harness::{};#[cfg(feature = "mcp")]pub use harness::{HttpHeader, McpAuthConfig, McpServer};+pub use openhuman_core::cron::JobOrigin;/// Host-routed delivery of scheduled replies, for [`RuntimeBuilder::cron_delivery`]/// and the profile runtime alike.pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};-pub use openhuman_core::cron::JobOrigin;#[cfg(feature = "profiles")]pub use profiles::{ChatReply, CronSweepReport, DirectProfileProvider, OpenError, ProfileError, ProfileEvents,@@ -198,14 +199,14 @@ pub use profiles::{};#[cfg(all(feature = "profiles", feature = "channels"))]pub use profiles::{RelayAccepted, RelayMessage};-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@@ -264,7 +265,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;pub use turn_steering::{SteerRefused, TurnSteering};diff --git a/crates/openhuman-embed/src/modules.rs b/crates/openhuman-embed/src/modules.rsindex 6132f5ae28..0e0f694657 100644--- a/crates/openhuman-embed/src/modules.rs+++ b/crates/openhuman-embed/src/modules.rs@@ -11,7 +11,7 @@ pub use openhuman_core::modules::ops::set_bundled_releases_dir;/// this for each module it links; no shipped host does.#[cfg(feature = "modules")]pub use openhuman_core::modules::linked::{- is_registered as is_linked_registered, register_linked, LinkedFactory,+ LinkedFactory, is_registered as is_linked_registered, register_linked,};/// The browser-control module.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 45632b5a07..c02b53ef5b 100644--- a/crates/openhuman-embed/src/profiles.rs+++ b/crates/openhuman-embed/src/profiles.rs@@ -54,8 +54,8 @@ use std::path::Path;use std::sync::Arc;use openhuman_core::core::runtime::CoreRuntime;-use openhuman_core::profiles::credentials::UserCredentialKind;use openhuman_core::profiles::ProfileHost;+use openhuman_core::profiles::credentials::UserCredentialKind;use tinyagents_session::port::SessionStoreProvider;use crate::error::CoreError;@@ -68,12 +68,12 @@ pub use handle::RelayAccepted;pub use handle::{ChatReply, ProfileEvents, ProfileHandle};#[cfg(feature = "channels")]pub use openhuman_core::channels::providers::relay::RelayInboundParams as RelayMessage;+pub use openhuman_core::core::runtime::SaasConfig;/// Validated operator-owned direct inference settings.pub use openhuman_core::core::runtime::direct_profile_provider::DirectProfileProvider;pub use openhuman_core::core::runtime::saas::{SaasCronConfig, SaasSandboxConfig};-pub use openhuman_core::core::runtime::SaasConfig;-pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};pub use openhuman_core::cron::JobOrigin;+pub use openhuman_core::cron::host_delivery::{CronDelivery, CronReply};pub use openhuman_core::profiles::cron::SweepReport as CronSweepReport;pub use openhuman_core::profiles::{OpenError, ProfileId, ProfileIdMode, ProfileSummary};pub use openhuman_core::storage::lease::LeaseRecord;diff --git a/crates/openhuman-embed/src/profiles/host.rs b/crates/openhuman-embed/src/profiles/host.rsindex 786649136f..32c8d87d21 100644--- a/crates/openhuman-embed/src/profiles/host.rs+++ b/crates/openhuman-embed/src/profiles/host.rs@@ -28,7 +28,7 @@ impl ProfileHostOptions {Some(ToolScopeSpec::Wildcard) => {return Err(ProfileError::Boot("profile tools require a named or host-only scope".into(),- ))+ ));}Some(ToolScopeSpec::Named(names)) => Some(names.into_iter().collect()),_ => None,diff --git a/crates/openhuman-embed/src/profiles/host_tests.rs b/crates/openhuman-embed/src/profiles/host_tests.rsindex a3af8932b6..d70ab3c1ba 100644--- a/crates/openhuman-embed/src/profiles/host_tests.rs+++ b/crates/openhuman-embed/src/profiles/host_tests.rs@@ -65,11 +65,13 @@ fn profiles_keep_a_nonempty_readonly_permission_map_without_operator_grants() {let mut config = openhuman_core::profiles::layout::profile_config(&layout, &id);capabilities.configure(&mut config);assert!(!config.agent.channel_permissions.is_empty());- assert!(config- .agent- .channel_permissions- .values()- .all(|level| level == "readonly"));+ assert!(+ config+ .agent+ .channel_permissions+ .values()+ .all(|level| level == "readonly")+ );}#[test]diff --git a/crates/openhuman-embed/src/runtime/build.rs b/crates/openhuman-embed/src/runtime/build.rsindex ada353d59e..fba985c3a7 100644--- a/crates/openhuman-embed/src/runtime/build.rs+++ b/crates/openhuman-embed/src/runtime/build.rs@@ -8,12 +8,12 @@ use openhuman_core::core::runtime::CoreBuilder;use openhuman_core::core::types::HostKind;use tinyagents_session::port::SessionStoreProvider;-use super::builder::{starts_services_on_build, ConfigSource};+use super::builder::{ConfigSource, starts_services_on_build};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 aaec18d055..73272afed8 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::types::HostKind;use openhuman_core::tools::toolpacks::ToolGroups;use tinyagents_session::port::SessionStoreProvider;-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.@@ -47,7 +47,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 e3daf89670..a221aeab6a 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 ef5ae2fd2d..6e12065a9d 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 e89a0246c3..45ebdd143b 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 26f99bd4ce..d85d2017cd 100644--- a/crates/openhuman-embed/src/turn.rs+++ b/crates/openhuman-embed/src/turn.rs@@ -49,8 +49,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;@@ -161,11 +161,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@@ -594,7 +594,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_reply_for, AgentChatTarget,+ AgentChatTarget, agent_chat_reply_for,};let mut config = dispatch.load_config()@@ -640,7 +640,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(diff --git a/crates/openhuman-embed/src/turn_types.rs b/crates/openhuman-embed/src/turn_types.rsindex 9712ce296f..f6bc451a15 100644--- a/crates/openhuman-embed/src/turn_types.rs+++ b/crates/openhuman-embed/src/turn_types.rs@@ -16,13 +16,16 @@ pub(super) fn overlay_response_usage(let preserve_host_cost = reported.cost_usd.is_none() && !reported.has_cost_receipt;let host_cost = usage.cost_usd;let host_source = usage.cost_source;- let root = openhuman_core::agent::turn_projection::failure_usage(reported);- usage.input_tokens = root.input_tokens;- usage.output_tokens = root.output_tokens;- usage.cached_input_tokens = root.cached_input_tokens;- usage.reasoning_tokens = root.reasoning_tokens;- let mut cost = root.cost_usd;- let mut source = root.cost_source;+ usage.input_tokens = reported.input_tokens;+ usage.output_tokens = reported.output_tokens;+ usage.cached_input_tokens = reported.cached_tokens;+ usage.reasoning_tokens = reported.reasoning_tokens;+ let mut cost = reported.cost_usd;+ let mut source = if reported.cost_usd.is_some() {+ tinyagents_harness::cost::CostSource::Charged+ } else {+ tinyagents_harness::cost::CostSource::Unknown+ };for child in &usage.subagents {usage.input_tokens = usage.input_tokens.saturating_add(child.usage.input_tokens);usage.output_tokens = usage