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
feat(channels): link the real tinychannels module as the test fixture
Steven Enamakel69f6f0e045fa
diff --git a/Cargo.lock b/Cargo.lockindex d8f6e6c747..a6aa4e9fe3 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -5454,6 +5454,7 @@ dependencies = ["tinybus-module 0.1.5","tinychannels","tinychannels-bus",+ "tinychannels-module","tinychannels-runtime","tinycomputer-bus","tinyconnectors-bus",diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.tomlindex d2b3b36159..d630919b8b 100644--- a/crates/openhuman-core/Cargo.toml+++ b/crates/openhuman-core/Cargo.toml@@ -503,8 +503,9 @@ tokio-tungstenite = { version = "0.29", default-features = false, features = ["c# production channel execution uses the TinyBus module contract above.tinychannels = { path = "../../vendor/tinychannels", features = ["relay-websocket", "email", "lark", "whatsapp-web"] }tinychannels-runtime = { path = "../../vendor/tinychannels/crates/tinychannels-runtime" }-# BLOCKED on tinybus 0.1.4 (tinybus epic): tinychannels-module v0.1.29 pins =0.1.4; workspace tinybus is 0.1.3.-# tinychannels-module = { path = "../../vendor/tinychannels/crates/tinychannels-module", features = ["static-link"] }+# The real TinyChannels module, linked into the test binary (never the product)+# as the fixture behind `channels::module_fixture`.+tinychannels-module = { path = "../../vendor/tinychannels/crates/tinychannels-module", features = ["static-link"] }tinybox-core = { path = "../../vendor/tinybox/crates/tinybox-core" }# The TinyMemory reference engine (an in-memory `MemoryEngine`) and the# behavioural suite every engine must pass. Memory unit tests bind it as thediff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rsindex a32c64af66..d2b8329c4c 100644--- a/crates/openhuman-core/src/channels/bus/delivery.rs+++ b/crates/openhuman-core/src/channels/bus/delivery.rs@@ -1,13 +1,13 @@//! Captured managed transport for module-owned progressive replies.use crate::backend::{BackendApiError, BackendClient};use crate::modules::channel_runtime::ChannelRuntimeLease;-use tinybus::module::ModuleCallError;use crate::security::credentials::session_support::{get_session_token, is_local_session_token, BackendCredential,};use serde_json::json;#[cfg(test)]use serde_json::Value;+use tinybus::module::ModuleCallError;use tinychannels_bus::module_progressive::{ProgressiveCommand, ProgressiveEvent, ProgressiveResult, ProgressiveTransportRequest,ProgressiveTransportResult,@@ -147,7 +147,8 @@ impl ModuleProgressiveReply {session: tokio_util::sync::CancellationToken,) -> anyhow::Result<Self> {let callback = ManagedTransport::capture(&config, channel.clone(), session)?;- let runtime = ChannelRuntimeLease::open(crate::modules::ops::client(config), callback).await?;+ let runtime =+ ChannelRuntimeLease::open(crate::modules::ops::client(config), callback).await?;let result: ProgressiveResult = runtime.object().call_confidential(diff --git a/crates/openhuman-core/src/channels/context.rs b/crates/openhuman-core/src/channels/context.rsindex f4f1a23adb..bdb0ae44e4 100644--- a/crates/openhuman-core/src/channels/context.rs+++ b/crates/openhuman-core/src/channels/context.rs@@ -64,9 +64,7 @@ pub(crate) struct ChannelRuntimeContext {}/// Resolve the configured module client; unit tests use an attested bus fixture.-pub(crate) async fn module_client(- ctx: &ChannelRuntimeContext,-) -> tinybus::module::ModuleClient {+pub(crate) async fn module_client(ctx: &ChannelRuntimeContext) -> tinybus::module::ModuleClient {#[cfg(test)]if ctx.config.is_none() {return super::module_fixture::client().await;diff --git a/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs b/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rsindex 1d03c637d8..fbed6d36bf 100644--- a/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs+++ b/crates/openhuman-core/src/channels/controllers/ops/connect/connect_channel.rs@@ -3,9 +3,9 @@use super::shared::credential_provider;use crate::config::Config;use crate::core::Outcome;-use tinybus::module::ModuleCallError;use crate::security::credentials;use serde_json::Value;+use tinybus::module::ModuleCallError;use tinychannels_bus::controllers::ChannelConnectionResult;use tinychannels_bus::module_controller::{ChannelConfigUpdate, PreparedChannelConnection};use tinychannels_bus::{ChannelAuthMode, ChannelControllerRequest, HttpProxyPolicy};diff --git a/crates/openhuman-core/src/channels/host/channel_events.rs b/crates/openhuman-core/src/channels/host/channel_events.rsindex 72a129ee12..b8b6838f9f 100644--- a/crates/openhuman-core/src/channels/host/channel_events.rs+++ b/crates/openhuman-core/src/channels/host/channel_events.rs@@ -1,11 +1,11 @@//! Host-owned approval routing and turn events over the channel module.use crate::channels::{Channel, ChannelSendExt, SendMessage};use crate::core::events::DomainEvent;-use tinybus::module::ModuleClient;use async_trait::async_trait;use std::collections::HashMap;use std::path::PathBuf;use std::sync::{Arc, Mutex};+use tinybus::module::ModuleClient;use tinybus::EventHandler;use tinychannels_bus::{capabilities_for, ChannelMessage};@@ -211,7 +211,8 @@ impl ChannelTurnStateSubscriber {crate::modules::ops::client(self.config.as_deref().cloned().unwrap_or_default())};#[cfg(not(test))]- let client = crate::modules::ops::client(self.config.as_deref().cloned().unwrap_or_default());+ let client =+ crate::modules::ops::client(self.config.as_deref().cloned().unwrap_or_default());let result: Result<tinychannels_bus::module_remote::RemoteOperationResult, _> = client.call_confidential("tinychannels",diff --git a/crates/openhuman-core/src/channels/host/channel_events_tests.rs b/crates/openhuman-core/src/channels/host/channel_events_tests.rsindex 9ecdf48f33..3f19c991f4 100644--- a/crates/openhuman-core/src/channels/host/channel_events_tests.rs+++ b/crates/openhuman-core/src/channels/host/channel_events_tests.rs@@ -132,12 +132,10 @@ async fn approvals_for_web_email_or_unrouted_requests_are_ignored() {assert!(discord.sent.lock().unwrap().is_empty());}-// Busy flags now live in the module's own storage scope and are written by the-// module, so this needs the linked-module fixture, which is blocked on the-// tinybus epic (see `channels::module_fixture`). It failed the same way before-// the storage contract, on the fixture panic.+// Busy flags live in the module's own storage scope and are written by the+// module, so this runs against the linked-module fixture+// (`channels::module_fixture`).#[tokio::test]-#[ignore = "blocked on the linked tinychannels-module fixture (tinybus epic)"]async fn turn_state_marks_busy_for_every_remote_control_channel() {let dir = tempdir().unwrap();let ws = dir.path().to_path_buf();diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rsindex 37f5f547a6..36a94db626 100644--- a/crates/openhuman-core/src/channels/module_fixture_tests.rs+++ b/crates/openhuman-core/src/channels/module_fixture_tests.rs@@ -8,17 +8,32 @@//! on a process-lifetime runtime, so it outlives the short Tokio runtimes of//! individual tests.+use crate::config::schema::ModuleSourceMode;+use crate::config::Config;+use crate::modules::linked::register_linked;+use crate::modules::{ops, runtime};use tinybus::module::ModuleClient;use tinychannels_bus::methods;+const MODULE_ID: &str = "tinychannels";+/// Return a client for the compiled, linked TinyChannels module fixture.-///-/// BLOCKED on the tinybus epic: `tinychannels-module` v0.1.29 pins `tinybus =0.1.4`-/// while the workspace tinybus is 0.1.3, so the module cannot be a dev-dependency-/// and the fixture cannot be linked. Tests that need it fail with this message-/// until the dependency is restored.pub(crate) async fn client() -> ModuleClient {- panic!("tinychannels-module fixture unavailable: blocked on tinybus 0.1.4 (tinybus epic)")+ register_linked(MODULE_ID, tinychannels_module::linked_module);+ let mut config = Config::default();+ config.modules.source = ModuleSourceMode::Linked;+ ops::ensure_loaded(&config, MODULE_ID)+ .await+ .expect("the linked TinyChannels module should be admitted through the seam");+ let proxy = runtime::runtime()+ .await+ .expect("the module host should be running")+ .proxy(+ tinychannels_module::BUS_NAME,+ tinychannels_module::OBJECT_PATH,+ )+ .expect("the linked TinyChannels proxy should be valid");+ ops::fixture_client(proxy)}#[tokio::test]diff --git a/crates/openhuman-core/src/channels/runtime/startup.rs b/crates/openhuman-core/src/channels/runtime/startup.rsindex 9c820483d0..2ddb66581a 100644--- a/crates/openhuman-core/src/channels/runtime/startup.rs+++ b/crates/openhuman-core/src/channels/runtime/startup.rs@@ -11,8 +11,8 @@ mod relay;mod start_channels;mod turn_parts;-use tinybus::module::{ModuleCallError, ModuleClient};use anyhow::Result;+use tinybus::module::{ModuleCallError, ModuleClient};/// Ask the owning module to prepare effective execution limits for this host/// runtime. A malformed response fails closed and reports only the module ID.diff --git a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rsindex f69a129942..ed1d25c57f 100644--- a/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/module_providers.rs@@ -5,11 +5,11 @@ use super::credentials::hydrate_channel_credentials;use crate::channels::runtime::dispatch::RuntimeChannelMessage;use crate::config::Config;use crate::modules::channel_runtime::ChannelRuntimeLease;-use tinybus::module::{ModuleCallError, ModuleClient, ModuleObjectClient};use anyhow::{Context, Result};use async_trait::async_trait;use std::collections::HashMap;use std::sync::{Arc, OnceLock, Weak};+use tinybus::module::{ModuleCallError, ModuleClient, ModuleObjectClient};use tinychannels_bus::module_runtime::{ChannelIngressKind, ChannelMessagePreparation, ConfiguredChannelInfo,};diff --git a/crates/openhuman-core/src/hosting/mod.rs b/crates/openhuman-core/src/hosting/mod.rsindex 420452816b..5c195fc78d 100644--- a/crates/openhuman-core/src/hosting/mod.rs+++ b/crates/openhuman-core/src/hosting/mod.rs@@ -156,13 +156,10 @@ impl Account {self.providers_loaded.get_or_try_init(|| async {let response = self.call_providers().await?;- let providers: Vec<String> =- serde_json::from_str(&response).map_err(|_| {- crate::modules::report::malformed_reply("tinyhosts");- anyhow::anyhow!(- tinybus::module::ModuleCallError::ModuleFault.to_string()- )- })?;+ let providers: Vec<String> = serde_json::from_str(&response).map_err(|_| {+ crate::modules::report::malformed_reply("tinyhosts");+ anyhow::anyhow!(tinybus::module::ModuleCallError::ModuleFault.to_string())+ })?;if !providers.iter().any(|provider| provider == &self.provider) {crate::modules::report::unavailable("tinyhosts");anyhow::bail!(tinybus::module::ModuleCallError::Unavailable.to_string());diff --git a/crates/openhuman-core/src/inference/tokenjuice/savings.rs b/crates/openhuman-core/src/inference/tokenjuice/savings.rsindex d004e69b95..0424effe99 100644--- a/crates/openhuman-core/src/inference/tokenjuice/savings.rs+++ b/crates/openhuman-core/src/inference/tokenjuice/savings.rs@@ -114,9 +114,7 @@ pub async fn record(}/// Snapshot the module's savings aggregate.-pub async fn stats(- client: &tinybus::module::ModuleClient,-) -> Result<SavingsAggregate, String> {+pub async fn stats(client: &tinybus::module::ModuleClient) -> Result<SavingsAggregate, String> {client.call(MODULE, methods::SAVINGS_STATS, ()).awaitdiff --git a/crates/openhuman-core/src/mcp/registry/action_tool_tests.rs b/crates/openhuman-core/src/mcp/registry/action_tool_tests.rsindex 79e6d241c3..f6de6c1926 100644--- a/crates/openhuman-core/src/mcp/registry/action_tool_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/action_tool_tests.rs@@ -75,16 +75,14 @@ impl crate::mcp::module_client::McpModulePort for RecoveringModulePort {async fn prepare_agent_tools(&self,_request: tinymcp_bus::PrepareAgentToolsRequest,- ) -> Result<Vec<tinymcp_bus::McpToolPresentation>, tinybus::module::ModuleCallError>- {+ ) -> Result<Vec<tinymcp_bus::McpToolPresentation>, tinybus::module::ModuleCallError> {Ok(Vec::new())}async fn validate_server_arguments(&self,request: tinymcp_bus::ValidateServerArgumentsRequest,- ) -> Result<tinymcp_bus::ServerArgumentsValidation, tinybus::module::ModuleCallError>- {+ ) -> Result<tinymcp_bus::ServerArgumentsValidation, tinybus::module::ModuleCallError> {Ok(tinymcp_bus::ServerArgumentsValidation::Valid(request.arguments.as_object().cloned().unwrap_or_default(),))diff --git a/crates/openhuman-core/src/mcp/registry/config_ops_tests.rs b/crates/openhuman-core/src/mcp/registry/config_ops_tests.rsindex 3d6acae5fd..de15eb9366 100644--- a/crates/openhuman-core/src/mcp/registry/config_ops_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/config_ops_tests.rs@@ -1,9 +1,9 @@use super::*;use crate::mcp::module_client::{McpConfiguredClient, McpModulePort};-use tinybus::module::ModuleCallError;use async_trait::async_trait;use serde_json::Value;use std::sync::{Arc, Mutex};+use tinybus::module::ModuleCallError;use tinymcp_bus::{OpenConfiguredResponse, ServerArgumentsValidation, TransitionStatus,ValidateServerArgumentsRequest,diff --git a/crates/openhuman-core/src/mcp/registry/ops_tests.rs b/crates/openhuman-core/src/mcp/registry/ops_tests.rsindex d0e83969ed..daa5cd7be4 100644--- a/crates/openhuman-core/src/mcp/registry/ops_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/ops_tests.rs@@ -7,10 +7,10 @@use super::*;use crate::mcp::module_client::{McpConfiguredClient, McpModulePort};-use tinybus::module::ModuleCallError;use async_trait::async_trait;use serde_json::Value;use std::sync::{Arc, Mutex};+use tinybus::module::ModuleCallError;use tinymcp_bus::{OpenConfiguredResponse, ServerArgumentsValidation, TransitionStatus,ValidateServerArgumentsRequest,diff --git a/crates/openhuman-core/src/mcp/registry/tools_tests.rs b/crates/openhuman-core/src/mcp/registry/tools_tests.rsindex 120202630d..93499709f4 100644--- a/crates/openhuman-core/src/mcp/registry/tools_tests.rs+++ b/crates/openhuman-core/src/mcp/registry/tools_tests.rs@@ -342,8 +342,7 @@ impl crate::mcp::module_client::McpModulePort for ToolCallPort {async fn validate_server_arguments(&self,_request: tinymcp_bus::ValidateServerArgumentsRequest,- ) -> Result<tinymcp_bus::ServerArgumentsValidation, tinybus::module::ModuleCallError>- {+ ) -> Result<tinymcp_bus::ServerArgumentsValidation, tinybus::module::ModuleCallError> {Err(tinybus::module::ModuleCallError::IncompatibleContract)}@@ -369,8 +368,7 @@ impl crate::mcp::module_client::McpModulePort for ToolCallPort {async fn prepare_agent_tools(&self,_request: tinymcp_bus::PrepareAgentToolsRequest,- ) -> Result<Vec<tinymcp_bus::McpToolPresentation>, tinybus::module::ModuleCallError>- {+ ) -> Result<Vec<tinymcp_bus::McpToolPresentation>, tinybus::module::ModuleCallError> {Ok(Vec::new())}}diff --git a/crates/openhuman-core/src/modules/accessibility.rs b/crates/openhuman-core/src/modules/accessibility.rsindex 1acc1ff286..e009bb4424 100644--- a/crates/openhuman-core/src/modules/accessibility.rs+++ b/crates/openhuman-core/src/modules/accessibility.rs@@ -3,8 +3,8 @@use serde::{de::DeserializeOwned, Serialize};use tinycomputer_bus::{names::accessibility as methods, DesktopError, DesktopResponse};-use tinybus::module::{ModuleCallError, ModuleClient};use crate::config::Config;+use tinybus::module::{ModuleCallError, ModuleClient};pub use tinycomputer_bus::accessibility::{FocusQuery, FocusTarget, FocusedTextContext, GlobeBatch, GlobeHandle, GlobeHotkeyStatus,diff --git a/crates/openhuman-core/src/modules/channel_controller.rs b/crates/openhuman-core/src/modules/channel_controller.rsindex 193bab108a..13fe42f339 100644--- a/crates/openhuman-core/src/modules/channel_controller.rs+++ b/crates/openhuman-core/src/modules/channel_controller.rs@@ -1,6 +1,6 @@//! Thin adapters for module-owned channel controller operations.-use tinybus::module::{ModuleCallError, ModuleClient};use serde::de::DeserializeOwned;+use tinybus::module::{ModuleCallError, ModuleClient};use tinychannels_bus::{methods, ChannelControllerRequest, ChannelControllerResult, HttpProxyPolicy,};diff --git a/crates/openhuman-core/src/modules/channel_runtime.rs b/crates/openhuman-core/src/modules/channel_runtime.rsindex 36ee4dac72..6de1b1153f 100644--- a/crates/openhuman-core/src/modules/channel_runtime.rs+++ b/crates/openhuman-core/src/modules/channel_runtime.rs@@ -1,11 +1,11 @@//! Identity-scoped channel objects and cancellation-safe callback ownership.-use tinybus::module::{ModuleCallError, ModuleClient, ModuleObjectClient};use std::sync::{atomic::{AtomicBool, Ordering},Arc,};use std::time::Duration;+use tinybus::module::{ModuleCallError, ModuleClient, ModuleObjectClient};use tinybus::{Connection, ObjectPath, Proxy};use tinychannels_bus::{methods, ChannelRuntimeReservation, HOST_BUS_NAME, HOST_OBJECT_PATH, OBJECT_PATH,diff --git a/crates/openhuman-core/src/modules/documents.rs b/crates/openhuman-core/src/modules/documents.rsindex 2118d696b1..2125d44a7a 100644--- a/crates/openhuman-core/src/modules/documents.rs+++ b/crates/openhuman-core/src/modules/documents.rs@@ -189,7 +189,13 @@ pub async fn ensure_ready(config: &Config) -> Result<(), DocumentCallError> {/// Ensure the module is serving and hand back what a call needs.async fn ready(config: &Config,-) -> Result<(&'static tinybus::module::ModuleRuntime, &'static super::ModuleRecord), DocumentCallError> {+) -> Result<+ (+ &'static tinybus::module::ModuleRuntime,+ &'static super::ModuleRecord,+ ),+ DocumentCallError,+> {ops::ensure_loaded(config, MODULE_ID).await.map_err(DocumentCallError::Unavailable)?;diff --git a/crates/openhuman-core/src/modules/ops.rs b/crates/openhuman-core/src/modules/ops.rsindex d8e620218b..9fd2e4766f 100644--- a/crates/openhuman-core/src/modules/ops.rs+++ b/crates/openhuman-core/src/modules/ops.rs@@ -33,8 +33,7 @@ use super::types::{ModuleRecord, ModuleSource, ModuleState, ModuleStatus};use super::{linked, registry, report, runtime, source};use crate::config::Config;use tinybus::module::{- Availability, LoadError, ModuleClient, ModuleSource as ResolverSource, Resolver,- ResolverInputs,+ Availability, LoadError, ModuleClient, ModuleSource as ResolverSource, Resolver, ResolverInputs,};/// Environment variable naming a directory of bundled release archives, for@@ -368,6 +367,7 @@ fn status_of(config: &Config, record: &ModuleRecord) -> ModuleStatus {Availability::Ready => ModuleState::Ready,Availability::Failed => ModuleState::Failed,Availability::Unsupported => ModuleState::Unsupported,+ Availability::Disabled => ModuleState::Disabled,},detail,)diff --git a/crates/openhuman-core/src/modules/ops_tests.rs b/crates/openhuman-core/src/modules/ops_tests.rsindex 961dde9069..0b8579dbb9 100644--- a/crates/openhuman-core/src/modules/ops_tests.rs+++ b/crates/openhuman-core/src/modules/ops_tests.rs@@ -547,13 +547,17 @@ fn bundled_dir_skips_a_missing_candidate_for_a_valid_later_one() {/// carry the terminal marker the observability classifier demotes on.#[test]fn a_marked_bus_startup_failure_is_classified_as_module_unavailable() {- let marked = ops::resolver(&Config::default()).mark_terminal("the module bus could not start: no runtime".to_string());+ let marked = ops::resolver(&Config::default())+ .mark_terminal("the module bus could not start: no runtime".to_string());assert!(marked.ends_with("restart the app to try again"), "{marked}");assert!(crate::core::observability::is_module_unavailable_message(&marked));// Idempotent: an already-marked error is not annotated twice.- assert_eq!(ops::resolver(&Config::default()).mark_terminal(marked.clone()), marked);+ assert_eq!(+ ops::resolver(&Config::default()).mark_terminal(marked.clone()),+ marked+ );}#[tokio::test]@@ -609,13 +613,11 @@ fn status_reports_the_source_that_serves_a_module() {}#[tokio::test]-#[ignore = "blocked on tinybus 0.1.4 (tinybus epic): tinychannels-module cannot be a dev-dependency"]async fn a_registered_linked_factory_serves_the_module_and_status_says_so() {use crate::config::schema::ModuleSourceMode;use crate::modules::types::ModuleSource;- // Restore `register_linked("tinychannels", tinychannels_module::linked_module);`- // once the tinybus epic lets tinychannels-module be a dev-dependency again.+ crate::modules::linked::register_linked("tinychannels", tinychannels_module::linked_module);let mut config = Config::default();config.modules.source = ModuleSourceMode::Linked;ops::ensure_loaded(&config, "tinychannels")@@ -633,9 +635,16 @@ async fn a_registered_linked_factory_serves_the_module_and_status_says_so() {#[tokio::test]async fn attaching_a_linked_module_without_a_factory_fails_with_a_static_reason() {- let runtime = crate::modules::runtime::runtime().await.expect("module host");- let error = Resolver::load_linked(runtime, "tinyhosts-no-factory", None, serde_json::json!({}))- .expect_err("no factory is registered for this id");+ let runtime = crate::modules::runtime::runtime()+ .await+ .expect("module host");+ let error = Resolver::load_linked(+ runtime,+ ®istry::find("tinychannels").unwrap().release(),+ None,+ serde_json::json!({}),+ )+ .expect_err("no factory is registered for this id");assert!(error.contains("no linked factory"), "{error}");assert!(!error.contains('/'), "{error}");}@@ -645,14 +654,16 @@ async fn a_failing_linked_factory_is_reported_without_its_error_detail() {fn failing() -> tinybus::Result<tinybus::module::LinkedModule> {Err(tinybus::Error::failed("secret-token /home/user/path"))}- let runtime = crate::modules::runtime::runtime().await.expect("module host");+ let runtime = crate::modules::runtime::runtime()+ .await+ .expect("module host");let error = Resolver::load_linked(runtime,- "linked-failing-test",+ ®istry::find("tinychannels").unwrap().release(),Some(failing),serde_json::json!({}),)- .expect_err("the factory fails");+ .expect_err("the factory fails");assert!(error.contains("linked factory could not be started"),"{error}"@@ -731,10 +742,7 @@ async fn a_faulted_module_is_not_retried_in_process() {.unwrap_err();assert_eq!(again, LoadError::Failed(first.clone()));}- let status = list(&offline)- .into_iter()- .find(|m| m.id == MODULE)- .unwrap();+ let status = list(&offline).into_iter().find(|m| m.id == MODULE).unwrap();assert_eq!(status.state, ModuleState::Failed);assert_eq!(status.detail.as_deref(), Some(first.as_str()));table.forget(MODULE);@@ -784,8 +792,7 @@ fn modules_list_output_keeps_its_wire_shape() {);if let Some(source) = object.get("source") {assert!(- ["release", "linked", "source", "local_file"]- .contains(&source.as_str().unwrap()),+ ["release", "linked", "source", "local_file"].contains(&source.as_str().unwrap()),"{source}");}diff --git a/crates/openhuman-core/src/modules/report.rs b/crates/openhuman-core/src/modules/report.rsindex 5d2c8667a9..a6391278fa 100644--- a/crates/openhuman-core/src/modules/report.rs+++ b/crates/openhuman-core/src/modules/report.rs@@ -8,7 +8,9 @@use std::sync::{Arc, OnceLock};-use tinybus::module::{classify, FailureReport, FailureReporter, FailureSink, ModuleCallError, Reason};+use tinybus::module::{+ classify, FailureReport, FailureReporter, FailureSink, ModuleCallError, Reason,+};use super::registry;diff --git a/crates/openhuman-core/src/modules/wallet.rs b/crates/openhuman-core/src/modules/wallet.rsindex b2762dd040..bbde27519d 100644--- a/crates/openhuman-core/src/modules/wallet.rs+++ b/crates/openhuman-core/src/modules/wallet.rs@@ -497,7 +497,13 @@ pub async fn ensure_ready(config: &Config) -> Result<(), WalletCallError> {/// Ensure the module is serving and hand back what a call needs.async fn ready(config: &Config,-) -> Result<(&'static tinybus::module::ModuleRuntime, &'static super::ModuleRecord), WalletCallError> {+) -> Result<+ (+ &'static tinybus::module::ModuleRuntime,+ &'static super::ModuleRecord,+ ),+ WalletCallError,+> {ops::ensure_loaded(config, MODULE_ID).await.map_err(WalletCallError::Unavailable)?;diff --git a/crates/openhuman-core/src/storage/import/tinyflows_cron_tests.rs b/crates/openhuman-core/src/storage/import/tinyflows_cron_tests.rsindex 2dccce1330..490a7a558f 100644--- a/crates/openhuman-core/src/storage/import/tinyflows_cron_tests.rs+++ b/crates/openhuman-core/src/storage/import/tinyflows_cron_tests.rs@@ -20,7 +20,8 @@ fn copy_tree(from: &Path, to: &Path) {#[test]fn run_with_imports_legacy_cron_jobs_whatever_the_flows_gate() {let dir = tempfile::TempDir::new().unwrap();- let fixtures = Path::new(env!("CARGO_MANIFEST_DIR")).join("src/storage/import/fixtures/tinyflows/workspace");+ let fixtures = Path::new(env!("CARGO_MANIFEST_DIR"))+ .join("src/storage/import/fixtures/tinyflows/workspace");copy_tree(&fixtures, dir.path());let config = Config {workspace_dir: dir.path().to_path_buf(),@@ -39,7 +40,10 @@ fn run_with_imports_legacy_cron_jobs_whatever_the_flows_gate() {}let docs = Arc::clone(backend.for_scope(&Scope::local()).unwrap().documents());let jobs = crate::storage::block_on_anyhow(async move {- CronDocuments::new(docs).list_jobs().await.map_err(Into::into)+ CronDocuments::new(docs)+ .list_jobs()+ .await+ .map_err(Into::into)}).unwrap();assert!(!jobs.is_empty());diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks.rsindex a33e53d85b..90655aab9c 100644--- a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs@@ -2,10 +2,10 @@//! confidential one-shot tool-call contract.use crate::{config::Config, inference::provider::factory::redact_endpoint};-use tinybus::module::ModuleClient;use async_trait::async_trait;use serde_json::{json, Value};use std::time::Duration;+use tinybus::module::ModuleClient;use tinytools::{PermissionLevel, Tool, ToolResult};pub struct GitbooksSearchTool {@@ -27,7 +27,8 @@ impl GitbooksSearchTool {Ok(Self {endpoint,timeout_secs,- client: crate::modules::ops::client(config).with_timeout(Duration::from_secs(timeout_secs)),+ client: crate::modules::ops::client(config)+ .with_timeout(Duration::from_secs(timeout_secs)),})}@@ -120,7 +121,8 @@ impl GitbooksGetPageTool {Ok(Self {endpoint,timeout_secs,- client: crate::modules::ops::client(config).with_timeout(Duration::from_secs(timeout_secs)),+ client: crate::modules::ops::client(config)+ .with_timeout(Duration::from_secs(timeout_secs)),})}diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rsindex 680bbd3649..e346f88a44 100644--- a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs@@ -89,7 +89,11 @@ async fn mock_module_client(tinymcp_bus::names::INTERFACE,).expect("TinyMCP proxy");- (crate::modules::ops::fixture_client(proxy), service, provider_state)+ (+ crate::modules::ops::fixture_client(proxy),+ service,+ provider_state,+ )}#[cfg(feature = "modules")]diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rsindex 4cadb3d3dd..9951768459 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs@@ -547,9 +547,7 @@ fn unavailable_outcome(server: &str, tool: &str) -> tinymcp_bus::McpCallOutcome)}-pub(super) fn input_module_error_code(- error: tinybus::module::ModuleCallError,-) -> &'static str {+pub(super) fn input_module_error_code(error: tinybus::module::ModuleCallError) -> &'static str {use tinybus::module::ModuleCallError;match error {ModuleCallError::Unavailable | ModuleCallError::IncompatibleContract => {@@ -560,9 +558,7 @@ pub(super) fn input_module_error_code(}}-pub(super) fn input_module_error_message(- error: tinybus::module::ModuleCallError,-) -> &'static str {+pub(super) fn input_module_error_message(error: tinybus::module::ModuleCallError) -> &'static str {use tinybus::module::ModuleCallError;match error {ModuleCallError::Unavailable => "TinyMCP module is unavailable",diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rsindex ca2707a043..a93acb10d6 100644--- a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs+++ b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs@@ -32,10 +32,7 @@ impl McpModulePort for PreparePort {})}- async fn close(- &self,- _: &str,- ) -> Result<Option<String>, tinybus::module::ModuleCallError> {+ async fn close(&self, _: &str) -> Result<Option<String>, tinybus::module::ModuleCallError> {Ok(None)}@@ -91,10 +88,7 @@ impl McpModulePort for PreparePort {&self,_: ValidateServerArgumentsRequest,) -> Result<ServerArgumentsValidation, tinybus::module::ModuleCallError> {- std::future::ready(Err(- tinybus::module::ModuleCallError::IncompatibleContract,- ))- .await+ std::future::ready(Err(tinybus::module::ModuleCallError::IncompatibleContract)).await}async fn normalize_tool_arguments(diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rsindex c67794d377..2d14fc5cd5 100644--- a/crates/openhuman-core/src/tools/impl/system/shell.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs@@ -1,7 +1,7 @@use super::shell_description::{command_param_description, shell_description};-use super::shell_support::{command_failure, exec_result, python_utf8_env, tool_timeout_message};#[cfg(feature = "modules")]use super::shell_support::container_environment;+use super::shell_support::{command_failure, exec_result, python_utf8_env, tool_timeout_message};use crate::agent::host_runtime::RuntimeAdapter;use crate::config::Config;use crate::security::{AuditLogger, CommandExecutionLog, SecurityPolicy};diff --git a/crates/openhuman-core/src/voice/audio_capture.rs b/crates/openhuman-core/src/voice/audio_capture.rsindex c046d00ed4..dc53b7e831 100644--- a/crates/openhuman-core/src/voice/audio_capture.rs+++ b/crates/openhuman-core/src/voice/audio_capture.rs@@ -62,10 +62,9 @@ pub async fn start_recording(config: &Config) -> Result<RecordingHandle, String>/// Enumerate native input devices through the loaded module.pub async fn list_input_devices(config: &Config) -> Result<Vec<String>, String> {use tinyvoice_bus::{capture::CaptureResult, names::methods};- let result: CaptureResult<Vec<String>> =- crate::modules::ops::client(config.clone())- .call_confidential("tinyvoice", methods::LIST_INPUT_DEVICES, ())- .await- .map_err(|e| e.to_string())?;+ let result: CaptureResult<Vec<String>> = crate::modules::ops::client(config.clone())+ .call_confidential("tinyvoice", methods::LIST_INPUT_DEVICES, ())+ .await+ .map_err(|e| e.to_string())?;result.map_err(|_| "input device enumeration failed".to_string())}diff --git a/crates/openhuman-core/src/voice/capture_lease.rs b/crates/openhuman-core/src/voice/capture_lease.rsindex d0cedf7f91..98fc847c68 100644--- a/crates/openhuman-core/src/voice/capture_lease.rs+++ b/crates/openhuman-core/src/voice/capture_lease.rs@@ -1,7 +1,6 @@//! Host ownership and cancellation of opaque TinyVoice capture leases.use super::audio_capture::{RecordingResult, TARGET_SAMPLE_RATE};use crate::config::Config;-use tinybus::module::ModuleClient;use base64::Engine as _;use serde::{de::DeserializeOwned, Serialize};use std::collections::HashMap;@@ -9,6 +8,7 @@ use std::sync::{atomic::{AtomicBool, AtomicU64, Ordering},Arc, LazyLock, Mutex,};+use tinybus::module::ModuleClient;use tinyvoice_bus::{capture::{AudioOutput, CaptureBatch, CaptureError, CaptureHandle, CapturePollRequest, CaptureResult,