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
test(session-host): update assertions for display name and tool scope
Steven Enamakel335d10ad7150
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rsindex 2dc93e5a96..7f8bec15b7 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs@@ -79,7 +79,7 @@ async fn a_definition_the_builder_was_given_resolves_for_the_turn() {.expect("the caller's own definition answers the lookup");assert_eq!(resolved.id, SEAT);- assert_eq!(resolved.name, "Library host seat");+ assert_eq!(resolved.display_name(), "Library host seat");assert!(resolved.is_valid(),"a hosted turn refuses an invalid definition: {:?}",@@ -100,7 +100,10 @@ async fn the_definition_carries_the_belt_the_turn_is_allowed_to_call() {.expect("resolution never errors").expect("resolves");- assert_eq!(resolved.tools, vec!["desk_say", "publish_artifact"]);+ assert_eq!(+ resolved.tools,+ tinyagents_definition::ToolScope::Named(vec!["desk_say".into(), "publish_artifact".into()])+ );}#[tokio::test]@@ -121,8 +124,11 @@ async fn the_sessions_own_definition_outranks_a_registry_entry_sharing_its_id().expect("resolution never errors").expect("resolves");- assert_eq!(resolved.name, "Library host seat");- assert_eq!(resolved.tools, vec!["desk_say"]);+ assert_eq!(resolved.display_name(), "Library host seat");+ assert_eq!(+ resolved.tools,+ tinyagents_definition::ToolScope::Named(vec!["desk_say".into()])+ );}#[tokio::test]diff --git a/crates/openhuman-core/src/agent/tinyagents/host/bundle_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/bundle_tests.rsindex 7be23eca1e..eb8987821b 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/bundle_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/bundle_tests.rs@@ -100,5 +100,8 @@ async fn hosted_orchestrator_allows_deferred_browser_discovery() {.await.expect("resolve").expect("orchestrator");- assert!(definition.tools.contains(&"browser_open".to_string()));+ let tinyagents_definition::ToolScope::Named(tools) = definition.tools else {+ panic!("host scope must be explicit")+ };+ assert!(tools.contains(&"browser_open".to_string()));}