Skip to content

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

chore: format merged upstream Rust files

Steven Enamakel37f25cf9c536
diff --git a/crates/openhuman-core/src/agent/session_host/mod.rs b/crates/openhuman-core/src/agent/session_host/mod.rs
index 7b68116664..505b90ac8c 100644
--- a/crates/openhuman-core/src/agent/session_host/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/mod.rs
@@ -81,7 +81,7 @@ mod runtime_adapter_tests;
#[cfg(test)]
mod transcript_compat_tests;
#[cfg(test)]
-mod typed_transcript_compat_tests;
-#[cfg(test)]
#[path = "transcript_resume_stable_tests.rs"]
mod transcript_resume_stable_tests;
+#[cfg(test)]
+mod typed_transcript_compat_tests;
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs
index df9895798d..022f3a02ae 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context_tests.rs
@@ -469,5 +469,9 @@ fn autonomous_iter_cap_is_inherited_by_children_and_lifts_subagent_caps() {
let grandchild = parent.child().child();
assert_eq!(grandchild.autonomous_iter_cap, Some(200));
assert_eq!(lift(grandchild.autonomous_iter_cap, 10), 200);
- assert_eq!(lift(Some(5), 10), 10, "a cap below the base never lowers it");
+ assert_eq!(
+ lift(Some(5), 10),
+ 10,
+ "a cap below the base never lowers it"
+ );
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/mod.rs b/crates/openhuman-core/src/agent/tinyagents/mod.rs
index 023e61fd0d..8fe1a5e76b 100644
--- a/crates/openhuman-core/src/agent/tinyagents/mod.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/mod.rs
@@ -106,8 +106,8 @@ mod nested_calls_tests;
#[path = "prompt_cache_golden_tests.rs"]
mod prompt_cache_golden_tests;
#[cfg(test)]
-#[path = "topology_collision_tests.rs"]
-mod topology_collision_tests;
-#[cfg(test)]
#[path = "tinyagents_tests.rs"]
mod tests;
+#[cfg(test)]
+#[path = "topology_collision_tests.rs"]
+mod topology_collision_tests;
diff --git a/crates/openhuman-core/src/channels/bus/delivery.rs b/crates/openhuman-core/src/channels/bus/delivery.rs
index 12da60c1ac..ecbe152fd3 100644
--- a/crates/openhuman-core/src/channels/bus/delivery.rs
+++ b/crates/openhuman-core/src/channels/bus/delivery.rs
@@ -147,8 +147,7 @@ impl ModuleProgressiveReply {
session: tokio_util::sync::CancellationToken,
) -> anyhow::Result<Self> {
let callback = ManagedTransport::capture(&config, channel.clone(), session)?;
- let runtime =
- ChannelRuntimeLease::open(crate::modules::client(config), callback).await?;
+ let runtime = ChannelRuntimeLease::open(crate::modules::client(config), callback).await?;
let result: ProgressiveResult = runtime
.object()
.call_confidential(
diff --git a/crates/openhuman-core/src/channels/module_fixture_tests.rs b/crates/openhuman-core/src/channels/module_fixture_tests.rs
index 13b9ee3f64..452cd56b8f 100644
--- a/crates/openhuman-core/src/channels/module_fixture_tests.rs
+++ b/crates/openhuman-core/src/channels/module_fixture_tests.rs
@@ -22,6 +22,7 @@ const MODULE_ID: &str = "tinychannels";
pub(crate) async fn client() -> ModuleClient {
register_linked(MODULE_ID, tinychannels_module::linked_module);
let mut config = Config::default();
+ config.modules.allow_download = false;
config.modules.source = ModuleSourceMode::Linked;
ops::ensure_loaded(&config, MODULE_ID)
.await
diff --git a/crates/openhuman-core/src/modules/unloaded.rs b/crates/openhuman-core/src/modules/unloaded.rs
index f008712d48..bcd9c5b869 100644
--- a/crates/openhuman-core/src/modules/unloaded.rs
+++ b/crates/openhuman-core/src/modules/unloaded.rs
@@ -9,8 +9,7 @@
//! `loader_disabled` reason.
use tinybus::module::{
- AccessFuture, FailureReporter, ModuleAccess, ModuleClient, ProxyFailure, Reason,
- ReleaseRecord,
+ AccessFuture, FailureReporter, ModuleAccess, ModuleClient, ProxyFailure, Reason, ReleaseRecord,
};
use tinybus::Proxy;
diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
index 8c499793f5..4df17419b0 100644
--- a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
@@ -27,8 +27,7 @@ impl GitbooksSearchTool {
Ok(Self {
endpoint,
timeout_secs,
- client: crate::modules::client(config)
- .with_timeout(Duration::from_secs(timeout_secs)),
+ client: crate::modules::client(config).with_timeout(Duration::from_secs(timeout_secs)),
})
}
@@ -121,8 +120,7 @@ impl GitbooksGetPageTool {
Ok(Self {
endpoint,
timeout_secs,
- client: crate::modules::client(config)
- .with_timeout(Duration::from_secs(timeout_secs)),
+ client: crate::modules::client(config).with_timeout(Duration::from_secs(timeout_secs)),
})
}
diff --git a/crates/openhuman-modules-linked/src/lib_tests.rs b/crates/openhuman-modules-linked/src/lib_tests.rs
index e14c7e502d..22383ba55f 100644
--- a/crates/openhuman-modules-linked/src/lib_tests.rs
+++ b/crates/openhuman-modules-linked/src/lib_tests.rs
@@ -216,5 +216,8 @@ async fn linked_tinywallet_accepts_confidential_delivery() {
tokio::time::sleep(std::time::Duration::from_millis(100)).await;
}
broker_task.abort();
- assert!(delivered, "linked tinywallet must accept confidential delivery");
+ assert!(
+ delivered,
+ "linked tinywallet must accept confidential delivery"
+ );
}
diff --git a/scripts/test-rust-with-mock.sh b/scripts/test-rust-with-mock.sh
index ca7373e733..0c13daca40 100755
--- a/scripts/test-rust-with-mock.sh
+++ b/scripts/test-rust-with-mock.sh
@@ -309,7 +309,7 @@ run_tinychannels_linked_fixture_tests() {
# processes so process-wide module-loader state cannot leak into the unit
# suite. The linked source is explicit and never falls back to downloading.
OPENHUMAN_MODULE_PATH="$tinychannels_dir${OPENHUMAN_MODULE_PATH:+:$OPENHUMAN_MODULE_PATH}" \
- cargo_test --lib channels::module_fixture:: \
+ cargo_test --features e2e-test-support --lib channels::module_fixture:: \
-- --test-threads=1 "$@"
OPENHUMAN_MODULE_PATH="$tinychannels_dir${OPENHUMAN_MODULE_PATH:+:$OPENHUMAN_MODULE_PATH}" \
cargo_test --features e2e-test-support --lib \