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(builder): switch test definitions from Sandboxed to ReadOnly
Steven Enamakel2f6160e33be2
diff --git a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_explicit_definition_tests.rs b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_explicit_definition_tests.rsindex 87d879656d..e731aaa747 100644--- a/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_explicit_definition_tests.rs+++ b/crates/openhuman-core/src/agent/harness/session/builder/builder_tests_explicit_definition_tests.rs@@ -18,7 +18,9 @@ fn explicit_definition(id: &str) -> crate::agent::harness::definition::AgentDefidef.display_name = Some("Explicit".to_string());def.system_prompt = PromptSource::Inline("You are explicit.".to_string());def.tools = ToolScope::Wildcard;- def.sandbox_mode = SandboxMode::Sandboxed;+ // The built-in orchestrator runs `Sandboxed`; `ReadOnly` is observably+ // different at every reader that consults the definition.+ def.sandbox_mode = SandboxMode::ReadOnly;def}@@ -36,7 +38,7 @@ async fn from_config_with_definition_stamps_the_definition_on_the_session() {.resolved_definition().expect("the explicit definition is stamped");assert_eq!(resolved.id, "embedded-alpha");- assert_eq!(resolved.sandbox_mode, SandboxMode::Sandboxed);+ assert_eq!(resolved.sandbox_mode, SandboxMode::ReadOnly);assert!(matches!(resolved.system_prompt, PromptSource::Inline(ref p) if p == "You are explicit."));}@@ -53,8 +55,8 @@ async fn resolved_definition_prefers_the_sessions_own_over_a_same_id_registry_enAgentDefinitionRegistry::global().and_then(|r| r.get("orchestrator")).map(|d| d.sandbox_mode),- Some(SandboxMode::Sandboxed),- "the registry's orchestrator is not sandboxed, so a leak is observable"+ Some(SandboxMode::ReadOnly),+ "the registry's orchestrator is not read-only, so a leak is observable");let agent = Agent::from_config_with_definition(&config, &def, None, None)@@ -62,7 +64,7 @@ async fn resolved_definition_prefers_the_sessions_own_over_a_same_id_registry_enassert_eq!(agent.resolved_definition().map(|d| d.sandbox_mode),- Some(SandboxMode::Sandboxed)+ Some(SandboxMode::ReadOnly));}@@ -77,5 +79,9 @@ async fn registry_built_sessions_resolve_the_registry_definition() {let agent = Agent::from_config(&config).expect("orchestrator session");let resolved = agent.resolved_definition().expect("registry definition");assert_eq!(resolved.id, "orchestrator");- assert_eq!(resolved.sandbox_mode, SandboxMode::None);+ let registry_mode = AgentDefinitionRegistry::global()+ .and_then(|r| r.get("orchestrator"))+ .map(|d| d.sandbox_mode)+ .expect("registry orchestrator");+ assert_eq!(resolved.sandbox_mode, registry_mode);}