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(agent): add coverage for cost, artifact offload, and tool policy
Steven Enamakel6f1f10ad6e5b
diff --git a/crates/openhuman-core/src/agent/cost_tests.rs b/crates/openhuman-core/src/agent/cost_tests.rsindex 233d830ec9..8c8dfc0fb6 100644--- a/crates/openhuman-core/src/agent/cost_tests.rs+++ b/crates/openhuman-core/src/agent/cost_tests.rs@@ -1,5 +1,5 @@use super::*;-use tinyagents_harness::cost::CostSource;+use tinyagents_harness::cost::{CostSource, CostTally};fn counts(input: u64, output: u64, cached: u64) -> BilledUsage {BilledUsage::from_counts(input, output).with_cached_input_tokens(cached)diff --git a/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs b/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rsindex f8322aaaab..d82588bb2b 100644--- a/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs+++ b/crates/openhuman-core/src/agent/harness/artifact_offload/artifact_offload_tests.rs@@ -220,7 +220,7 @@ async fn oversized_result_is_offloaded_and_the_parent_gets_a_readable_pointer()"pointer must name the host read tool: {text}");// And the path it quotes must be the one a parent can actually extract.- assert_eq!(extract_artifact_paths(&text), vec![artifact.relative_path]);+ assert_eq!(extract_artifact_paths(&text), vec![artifact.relative_path.clone()]);// The pointer's path is openable by `file_read` against the action root.let on_disk = tokio::fs::read_to_string(action_dir.join(&artifact.relative_path))diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rsindex 9a6b2e8697..40df5331a5 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_tool_policy_tests.rs@@ -143,7 +143,6 @@ fn desktop_approval_bypass_skips_only_require_approval_channel_verdict() {vec![Arc::new(vec![Box::new(RoutingFakeTool(name))])],"sess".to_owned(),"web_chat".to_owned(),- "orchestrator".to_owned(),)}let approval_middleware = middleware(ToolPolicyAction::RequireApproval);