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
fix: adapt to updated tinyagents contracts
Steven Enamakelb24e36994712
diff --git a/crates/openhuman-core/src/agent/message_convert.rs b/crates/openhuman-core/src/agent/message_convert.rsindex 35e43f4a53..abe52ef2f8 100644--- a/crates/openhuman-core/src/agent/message_convert.rs+++ b/crates/openhuman-core/src/agent/message_convert.rs@@ -400,6 +400,7 @@ pub(crate) fn message_to_chat_message(msg: &Message) -> ChatMessage {cm.id = Some(t.tool_call_id.clone());cm}+ Message::Custom(_) => ChatMessage::system(msg.text()),}}@@ -488,6 +489,7 @@ pub(crate) fn message_to_native_chat_message(msg: &Message) -> ChatMessage {cm.id = Some(t.tool_call_id.clone());cm}+ Message::Custom(_) => ChatMessage::system(msg.text()),}}@@ -541,6 +543,7 @@ pub(crate) fn messages_to_conversation(messages: &[Message]) -> Vec<Conversation});}}+ Message::Custom(_) => {}}}flush(&mut out, &mut pending);diff --git a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rsindex 2f97ae3ffa..855d5fb8f1 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/close_subagent_tests.rs@@ -62,6 +62,7 @@ async fn close_for_thread(CloseSubagentDispatch::new(Arc::new(CloseSubagentTool::new())).execute(&(),+ tinyagents_harness::ids::CallId::new("close-subagent-test"),json!({ "subagent_session_id": subagent_session_id }),tinytools::ToolCallOptions::default(),&run,diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rsindex 08cf45bfea..7a846e1d29 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs@@ -477,6 +477,7 @@ impl ChatModel<()> for ParallelHarnessProvider {Message::User(_) => "user",Message::Assistant(_) => "assistant",Message::Tool(_) => "tool",+ Message::Custom(_) => "custom",};format!("{role}:{}", message.text())})diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rsindex 42446d9cd9..6683613856 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread_tests.rs@@ -148,6 +148,7 @@ async fn spawn_from_thread(workspace: &std::path::Path, thread_id: &str) -> tinySpawnWorkerThreadDispatch::new(Arc::new(SpawnWorkerThreadTool::new())).execute(&(),+ tinyagents_harness::ids::CallId::new("spawn-worker-thread-test"),json!({"agent_id": "researcher","prompt": "do it",diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rsindex 07fd045252..0d1cb099e3 100644--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection.rs@@ -519,7 +519,8 @@ fn observation_to_progress(obs: &AgentObservation, state: &mut ReplayState) -> V| AgentEvent::BudgetReserved { .. }| AgentEvent::BudgetReconciled { .. }| AgentEvent::BudgetExceeded { .. }- | AgentEvent::LimitReached { .. } => Vec::new(),+ | AgentEvent::LimitReached { .. }+ | _ => Vec::new(),}}diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rsindex 3cf0c65c71..fccf3814ea 100644--- a/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_projection_tests.rs@@ -28,6 +28,7 @@ fn tool_completed(call: &str, name: &str, error: Option<&str>) -> AgentEvent {duration_ms: Some(30),output_bytes: Some(12),error: error.map(str::to_string),+ metadata: None,}}diff --git a/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rsindex ac0707cc08..28746165ed 100644--- a/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs+++ b/crates/openhuman-core/src/agent/progress_tracing/langfuse_batch_tests.rs@@ -283,6 +283,7 @@ fn journal_observation_content_follows_capture_gate() {duration_ms: Some(20),output_bytes: Some(13),error: None,+ metadata: None,},),];diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rsindex 2bedd1ffc9..106200182b 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs@@ -118,6 +118,7 @@ impl ScriptedProvider {Message::User(_) => "user",Message::Assistant(_) => "assistant",Message::Tool(_) => "tool",+ Message::Custom(_) => "custom",},content: message.text(),})diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rsindex 0ec8a6f826..7b13822756 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/message_trim.rs@@ -75,6 +75,7 @@ fn count_native_image_blocks(msg: &TaMessage) -> u64 {TaMessage::User(m) => &m.content,TaMessage::Assistant(m) => &m.content,TaMessage::Tool(m) => &m.content,+ TaMessage::Custom(_) => return 0,};content.iter()diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rsindex 8d5539687b..b3c2c6d54d 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs@@ -153,6 +153,7 @@ pub(crate) fn render_unanswered_steps(messages: &[Message]) -> Option<String> {Message::User(_) | Message::System(_) => {out.push_str(&format!("- message: {}\n", clip(&msg.text())))}+ Message::Custom(_) => {}}}Some(out)diff --git a/crates/openhuman-core/src/agent/tinyagents/observability_tests.rs b/crates/openhuman-core/src/agent/tinyagents/observability_tests.rsindex 001000c176..9e3f8eeb47 100644--- a/crates/openhuman-core/src/agent/tinyagents/observability_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/observability_tests.rs@@ -25,6 +25,7 @@ async fn bridge_forwards_tool_and_cost_progress() {duration_ms: None,output_bytes: None,error: None,+ metadata: None,});sink.emit(AgentEvent::UsageRecorded {usage: Usage::new(100, 40),@@ -183,6 +184,7 @@ async fn tool_completed_projects_output_arguments_and_elapsed() {duration_ms: None,output_bytes: None,error: None,+ metadata: None,});let mut seen = None;diff --git a/crates/openhuman-core/src/agent/tinyagents/summarize.rs b/crates/openhuman-core/src/agent/tinyagents/summarize.rsindex 13226b351a..9f81f894fe 100644--- a/crates/openhuman-core/src/agent/tinyagents/summarize.rs+++ b/crates/openhuman-core/src/agent/tinyagents/summarize.rs@@ -79,6 +79,7 @@ fn role_label(msg: &TaMessage) -> &'static str {TaMessage::User(_) => "user",TaMessage::Assistant(_) => "assistant",TaMessage::Tool(_) => "tool",+ TaMessage::Custom(_) => "custom",}}diff --git a/crates/openhuman-core/src/agent/tinyagents/tools_canonical_tests.rs b/crates/openhuman-core/src/agent/tinyagents/tools_canonical_tests.rsindex c376483d44..1df95ded80 100644--- a/crates/openhuman-core/src/agent/tinyagents/tools_canonical_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/tools_canonical_tests.rs@@ -52,6 +52,7 @@ impl Tool for RecordingTool {],is_error: args["fail"].as_bool().unwrap_or(false),markdown_formatted: Some("markdown content".to_string()),+ ..ToolResult::default()})}}@@ -102,6 +103,7 @@ async fn canonical_adapter_preserves_spec_policy_context_and_result() {],is_error: args["fail"].as_bool().unwrap_or(false),markdown_formatted: Some("markdown content".into()),+ ..ToolResult::default()})}}diff --git a/crates/openhuman-core/src/channels/tests/common.rs b/crates/openhuman-core/src/channels/tests/common.rsindex 7228dfee05..67fb5d3b5d 100644--- a/crates/openhuman-core/src/channels/tests/common.rs+++ b/crates/openhuman-core/src/channels/tests/common.rs@@ -15,6 +15,7 @@ fn message_role(message: &Message) -> &'static str {Message::User(_) => "user",Message::Assistant(_) => "assistant",Message::Tool(_) => "tool",+ Message::Custom(_) => "custom",}}diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rsindex 9cfd68235c..03c23d0ef5 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_schema_and_structured_output_tests.rs@@ -186,6 +186,7 @@ fn crate_model_response_preserves_flow_completion_contract() {invalid: None,}],usage: Some(usage),+ origin: None,},usage: Some(usage),finish_reason: Some("tool_calls".to_string()),diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rsindex 9d46433130..73e2f23807 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tool_results_and_credentials_tests.rs@@ -39,6 +39,7 @@ fn native_tool_payload_collapses_mixed_blocks_to_text() {],is_error: false,markdown_formatted: None,+ ..ToolResult::default()};let payload = native_tool_payload(&result);let text = payload["text"].as_str().expect("text field");diff --git a/crates/openhuman-core/src/flows/tinyflows/checkpoint_compat_tests_tests.rs b/crates/openhuman-core/src/flows/tinyflows/checkpoint_compat_tests_tests.rsindex 1fa4fcb300..5202fcb337 100644--- a/crates/openhuman-core/src/flows/tinyflows/checkpoint_compat_tests_tests.rs+++ b/crates/openhuman-core/src/flows/tinyflows/checkpoint_compat_tests_tests.rs@@ -38,6 +38,8 @@ async fn reads_a_database_written_by_the_previous_backend() {let old = tinyagents_graph::SqliteCheckpointer::<serde_json::Value>::open(&db).unwrap();let written = tinyagents_graph::Checkpoint {+ version: 1,+ created_at: 0,thread_id: "flow:f1:run-a".to_string(),checkpoint_id: "cp-1".to_string(),run_id: Some("run-1".to_string()),@@ -50,7 +52,13 @@ async fn reads_a_database_written_by_the_previous_backend() {interrupts: Vec::new(),pending_activations: None,barrier_arrivals: Vec::new(),+ tasks: Vec::new(),+ completed: Vec::new(),+ channel_versions: std::collections::BTreeMap::new(),+ versions_seen: std::collections::BTreeMap::new(),+ channel_deltas: std::collections::BTreeMap::new(),metadata: json!({ "source": "loop", "step": 3 }),+ completed_routes: Vec::new(),};LegacyCheckpointer::put(&old, written).await.unwrap();drop(old);diff --git a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rsindex 0482533135..dd6ade80fd 100644--- a/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs+++ b/crates/openhuman-core/src/inference/provider/factory/cloud_slug.rs@@ -334,6 +334,7 @@ pub(super) fn try_create_cloud_slug_chat_model_from_string_with_native_tools(temperature_unsupported_models: config.temperature_unsupported_models.as_slice(),+ extra_headers: &[],});return Some(Ok((chat, effective_model)));}diff --git a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rsindex 22917da088..958da1dab8 100644--- a/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs+++ b/crates/openhuman-core/src/inference/provider/openhuman_backend_model_tests.rs@@ -156,6 +156,8 @@ fn is_provider_not_configured_error_matches_exact_backend_shape() {retryable: false,retry_after_ms: None,raw: None,+ partial_message: None,+ stop_reason: None,};assert!(is_provider_not_configured_error(&err));}@@ -174,6 +176,8 @@ fn is_provider_not_configured_error_rejects_other_400s() {retryable: false,retry_after_ms: None,raw: None,+ partial_message: None,+ stop_reason: None,};assert!(!is_provider_not_configured_error(&err));}@@ -193,6 +197,8 @@ fn is_provider_not_configured_error_tolerates_not_configured_for_provider_wordinretryable: false,retry_after_ms: None,raw: None,+ partial_message: None,+ stop_reason: None,};assert!(is_provider_not_configured_error(&err));}@@ -215,6 +221,8 @@ fn is_provider_not_configured_error_rejects_generic_not_configured_400() {retryable: false,retry_after_ms: None,raw: None,+ partial_message: None,+ stop_reason: None,};assert!(!is_provider_not_configured_error(&err));}@@ -230,6 +238,8 @@ fn is_provider_not_configured_error_rejects_non_400_status() {retryable: false,retry_after_ms: None,raw: None,+ partial_message: None,+ stop_reason: None,};assert!(!is_provider_not_configured_error(&err));}diff --git a/crates/openhuman-core/src/platform/cost/catalog.rs b/crates/openhuman-core/src/platform/cost/catalog.rsindex 2bf1a26def..6c2e79bc20 100644--- a/crates/openhuman-core/src/platform/cost/catalog.rs+++ b/crates/openhuman-core/src/platform/cost/catalog.rs@@ -505,6 +505,7 @@ pub fn tinyagents_catalog_entry(price: &ModelPrice) -> tinyagents_registry::Modemax_input_tokens: Some(u64::from(price.context_window)),max_output_tokens: None,deprecation_date: None,+ release_date: None,pricing: tinyagents_harness::cost::ModelPricing {input_per_token: per_token(price.input_per_mtok_usd),output_per_token: per_token(price.output_per_mtok_usd),@@ -512,6 +513,7 @@ pub fn tinyagents_catalog_entry(price: &ModelPrice) -> tinyagents_registry::Modecache_creation_input_per_token: None,input_audio_per_token: None,output_reasoning_per_token: None,+ tiers: Vec::new(),},capabilities: tinyagents_registry::ModelCapabilities {prompt_caching: price.cached_input_per_mtok_usd > 0.0,@@ -568,6 +570,7 @@ fn local_catalog_entry(model: &LocalCatalogModel) -> tinyagents_registry::ModelCmax_input_tokens: model.context_window,max_output_tokens: None,deprecation_date: None,+ release_date: None,// Local runtimes are not billed per token; leave every price unset (not// zero — `None` means "not applicable", not "free of charge").pricing: tinyagents_harness::cost::ModelPricing::default(),diff --git a/crates/openhuman-core/src/skills/types.rs b/crates/openhuman-core/src/skills/types.rsindex d4d8af816a..742d252bd3 100644--- a/crates/openhuman-core/src/skills/types.rs+++ b/crates/openhuman-core/src/skills/types.rs@@ -46,6 +46,7 @@ pub fn tool_result_from_mcp(result: tinymcp_bus::McpToolResult) -> ToolResult {.collect(),is_error: result.is_error,markdown_formatted: result.markdown_formatted,+ ..ToolResult::default()}}diff --git a/crates/openhuman-core/src/tools/impl/filesystem/git_operations_tests.rs b/crates/openhuman-core/src/tools/impl/filesystem/git_operations_tests.rsindex fdceec4138..b3725cc58b 100644--- a/crates/openhuman-core/src/tools/impl/filesystem/git_operations_tests.rs+++ b/crates/openhuman-core/src/tools/impl/filesystem/git_operations_tests.rs@@ -103,7 +103,8 @@ fn git_resolves_cwd_from_workspace_descriptor() {let ws =WorkspaceDescriptor::new(worktree_tmp.path().to_path_buf()).with_policy_id("test-worktree");let ctx: RunContext = RunContext::new(RunConfig::new("test-run"), ()).with_workspace(ws);- let tool_ctx = ToolExecutionContext::from_run_context(&ctx);+ let tool_ctx =+ ToolExecutionContext::from_run_context(&ctx, tinyagents_harness::ids::CallId::new("test"));assert_eq!(tool.effective_action_dir_for_context(Some(&tool_ctx)),worktree_tmp.path().to_path_buf(),diff --git a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rsindex 77822e16be..7971dc01de 100644--- a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs+++ b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs@@ -17,7 +17,7 @@ use tinytools::WorkspaceDescriptor;fn tool_context_with_workspace(root: &Path) -> ToolExecutionContext {let ws = WorkspaceDescriptor::new(root.to_path_buf()).with_policy_id("test-descriptor");let ctx: RunContext = RunContext::new(RunConfig::new("test-run"), ()).with_workspace(ws);- ToolExecutionContext::from_run_context(&ctx)+ ToolExecutionContext::from_run_context(&ctx, tinyagents_harness::ids::CallId::new("test"))}/// A policy whose `workspace_dir`/`action_dir` are the OpenHuman home — i.e. a@@ -163,8 +163,10 @@ fn no_descriptor_leaves_the_policy_untouched() {assert_eq!(scoped.trusted_roots, base.trusted_roots);// ... and an all-default context with no workspace behaves the same.- let ctx: ToolExecutionContext =- ToolExecutionContext::from_run_context(&RunContext::new(RunConfig::new("test-run"), ()));+ let ctx: ToolExecutionContext = ToolExecutionContext::from_run_context(+ &RunContext::new(RunConfig::new("test-run"), ()),+ tinyagents_harness::ids::CallId::new("test"),+ );let scoped = security_for_tool_context(&base, Some(&ctx), "file_read");assert_eq!(scoped.action_dir, base.action_dir);assert_eq!(scoped.trusted_roots, base.trusted_roots);diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests.rsindex 5cc4544c5c..2ab3f4bd44 100644--- a/crates/openhuman-core/src/tools/impl/system/shell_tests.rs+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests.rs@@ -46,7 +46,7 @@ fn tool_context_with_workspace(use tinytools::WorkspaceDescriptor;let ws = WorkspaceDescriptor::new(root.to_path_buf()).with_policy_id("test-worktree");let ctx: RunContext = RunContext::new(RunConfig::new("test-run"), ()).with_workspace(ws);- ToolExecutionContext::from_run_context(&ctx)+ ToolExecutionContext::from_run_context(&ctx, tinyagents_harness::ids::CallId::new("test"))}fn test_security_with_env_cmd() -> Arc<SecurityPolicy> {