Skip to content

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

style: reorder imports and fix indentation in tinyagents tests

Steven Enamakeld7df5d43bf63
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
index 46fd3eed97..31e875b015 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration_tests.rs
@@ -188,7 +188,7 @@ async fn live_close_alias_enforces_parent_thread_ownership() {
DurableSubagentSession, DurableSubagentStatus, SubagentSessionStore,
};
use tinyagents_harness::{
- agent_loop::phases::execute_tool_batch, context::RunConfig, ComponentId,
+ ComponentId, agent_loop::phases::execute_tool_batch, context::RunConfig,
};
let workspace = tempfile::tempdir().expect("live harness workspace");
@@ -269,14 +269,14 @@ async fn live_close_alias_enforces_parent_thread_ownership() {
.into_tinyagents(RunConfig::new("live-close-parent").with_thread("voice-thread"));
let foreign = dispatch
.execute(
- &(),
- tinyagents_harness::CallId::new("close-foreign-call"),
- serde_json::json!({"subagent_session_id":"foreign-session"}),
- tinytools::ToolCallOptions::default(),
- &run,
- )
- .await
- .expect("foreign close dispatch");
+ &(),
+ tinyagents_harness::CallId::new("close-foreign-call"),
+ serde_json::json!({"subagent_session_id":"foreign-session"}),
+ tinytools::ToolCallOptions::default(),
+ &run,
+ )
+ .await
+ .expect("foreign close dispatch");
assert!(
foreign.text().contains("not found for this parent thread"),
"foreign live close should fail closed: {}",
@@ -288,14 +288,14 @@ async fn live_close_alias_enforces_parent_thread_ownership() {
let owned = dispatch
.execute(
- &(),
- tinyagents_harness::CallId::new("close-owned-call"),
- serde_json::json!({"subagent_session_id":"owned-session"}),
- tinytools::ToolCallOptions::default(),
- &run,
- )
- .await
- .expect("owned close dispatch");
+ &(),
+ tinyagents_harness::CallId::new("close-owned-call"),
+ serde_json::json!({"subagent_session_id":"owned-session"}),
+ tinytools::ToolCallOptions::default(),
+ &run,
+ )
+ .await
+ .expect("owned close dispatch");
assert!(
owned.text().contains("closed"),
"owned live close should report closure: {}",
@@ -309,7 +309,7 @@ async fn live_close_alias_enforces_parent_thread_ownership() {
#[tokio::test]
async fn registered_memory_dispatch_enforces_one_budget_across_distinct_calls() {
use crate::memory::test_fixtures::{bind_reference, config_in};
- use tinyagents_harness::{context::RunConfig, CallId};
+ use tinyagents_harness::{CallId, context::RunConfig};
use tinytools::ToolCallOptions;
let workspace = tempfile::tempdir().unwrap();
let config = config_in(&workspace);
diff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs
index 06d74625d9..eb99b410b4 100644
--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs
@@ -21,9 +21,9 @@ use async_trait::async_trait;
use serde_json::json;
use std::path::Path;
use std::sync::Arc;
+use tinyagents_harness::CallId;
use tinyagents_harness::context::RunConfig;
use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool};
-use tinyagents_harness::CallId;
use tinyinference_llm::message::Message;
use tinyinference_llm::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use tinytools::{Tool, ToolCallOptions, ToolResult};
@@ -303,9 +303,7 @@ async fn packed_delegate_uses_scoped_target_and_registers_shared_job() {
assert!(!result.is_error, "{}", result.output());
assert!(
- result
- .text()
- .starts_with("a generated image description"),
+ result.text().starts_with("a generated image description"),
"the typed inline delegation result keeps the child output: {}",
result.text()
);