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: follow upstream tool protocol boundary
Steven Enamakel7837ff8554ab
diff --git a/Cargo.lock b/Cargo.lockindex 39e24acf28..e715ffca44 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -6463,19 +6463,25 @@ dependencies = ["base64 0.22.1","bytes","chrono",+ "dirs 5.0.1","flate2","futures",+ "log","regex","reqwest","rusqlite","serde","serde_json","sha2 0.11.0",+ "tempfile","thiserror 2.0.20","tinyagents-tracing","tinyinference","tinytools",+ "tinytools-agent","tokio",+ "uuid",+ "wait-timeout",][[package]]@@ -6718,14 +6724,22 @@ dependencies = ["anyhow","async-trait","bytes",+ "flate2","futures",+ "hex","httpdate",+ "once_cell","reqwest","serde","serde_json","sha2 0.11.0",+ "sysinfo",+ "tar","thiserror 2.0.20","tokio",+ "tracing",+ "url",+ "zip",][[package]]@@ -6859,6 +6873,16 @@ dependencies = ["serde_json",]+[[package]]+name = "tinytools-agent"+version = "0.1.0"+dependencies = [+ "regex",+ "serde",+ "serde_json",+ "tinytools",+]+[[package]]name = "tinyvec"version = "1.12.0"diff --git a/crates/openhuman-core/src/agent/dispatcher.rs b/crates/openhuman-core/src/agent/dispatcher.rsindex cf808a6e2b..8615bd1cb6 100644--- a/crates/openhuman-core/src/agent/dispatcher.rs+++ b/crates/openhuman-core/src/agent/dispatcher.rs@@ -19,10 +19,10 @@//! instead, so the conversions below are the seam — a handful of field-wise//! maps that keep the wire bytes identical while the logic lives upstream.//!-//! Second, the **[`Tool`] trait object**. The crate takes-//! [`ToolSchema`](tinyinference::tool::ToolSchema)s, never a host's tool-//! type, for the reason the parse seam already documents: a crate that depended-//! on OpenHuman's `Tool` could not be used by a second host. So+//! Second, the **[`Tool`] trait object**. The crate takes shared+//! [`ToolSpec`] values, never a host's concrete tool type, for the reason the+//! parse seam already documents: a crate that depended on OpenHuman's `Tool`+//! could not be used by a second host. So//! [`ToolDispatcher::prompt_instructions`] reads names and schemas off the//! slice and hands the crate exactly what it needs.//!@@ -43,7 +43,6 @@ use tinyagents_harness::tool_calling::dialect::{DialectMessage, DialectResponse, DialectRole, NativeDialect, NativeToolCall, PFormatDialect,ToolDialect, ToolOutcome, ToolResultEntry, TranscriptEntry, XmlDialect,};-use tinyinference::tool::ToolSchema;/// A parsed tool call representation after being extracted from an LLM response.#[derive(Debug, Clone)]@@ -253,18 +252,8 @@ fn from_dialect_message(message: DialectMessage) -> ChatMessage {}}-fn to_schemas(specs: &[ToolSpec]) -> Vec<ToolSchema> {- specs- .iter()- .map(|spec| ToolSchema::new(&spec.name, &spec.description, spec.parameters.clone()))- .collect()-}--fn schemas_from_tools(tools: &[Box<dyn Tool>]) -> Vec<ToolSchema> {- tools- .iter()- .map(|tool| ToolSchema::new(tool.name(), tool.description(), tool.parameters_schema()))- .collect()+fn specs_from_tools(tools: &[Box<dyn Tool>]) -> Vec<ToolSpec> {+ tools.iter().map(|tool| tool.spec()).collect()}fn from_format(@@ -337,7 +326,7 @@ impl XmlToolDispatcher {/// Render the protocol block plus the full-schema catalogue.pub fn prompt_instructions_from_specs(specs: &[ToolSpec]) -> String {- XmlDialect::instructions(&to_schemas(specs))+ XmlDialect::instructions(specs)}/// Internal helper to extract tool calls from a raw text string.@@ -358,7 +347,7 @@ impl ToolDispatcher for XmlToolDispatcher {}fn prompt_instructions(&self, tools: &[Box<dyn Tool>]) -> String {- XmlDialect::instructions(&schemas_from_tools(tools))+ XmlDialect::instructions(&specs_from_tools(tools))}fn prompt_instructions_for_specs(&self, specs: &[ToolSpec]) -> Option<String> {diff --git a/crates/openhuman-core/src/agent/prompts/sections.rs b/crates/openhuman-core/src/agent/prompts/sections.rsindex 4fcb461b87..6033414352 100644--- a/crates/openhuman-core/src/agent/prompts/sections.rs+++ b/crates/openhuman-core/src/agent/prompts/sections.rs@@ -13,7 +13,7 @@ use super::types::*;use anyhow::Result;use std::fmt::Write;use tinyagents_harness::tool_calling::dialect::render_pformat_catalogue;-use tinyinference::tool::ToolSchema;+use tinytools::ToolSpec;// ─────────────────────────────────────────────────────────────────────────────// Special sections (archetype, dynamic, reflection)@@ -379,16 +379,13 @@ impl PromptSection for ToolsSection {}return Ok(ctx.dispatcher_instructions.to_string());}- // One rendering shape for every dispatcher: a compact P-Format- // signature (`name[a|b|c]`), rendered by the crate from the same- // schemas its parser reconstructs arguments with — so the order the- // model reads is by construction the order the parser expects. For+ // Render P-Format signatures from the parser's schemas and argument order. For// `Native` dispatchers the provider already has the full JSON schema in// the API request (handled above); for `Json` / `PFormat` text// dispatchers the dispatcher's own `prompt_instructions` block// (appended below) carries whatever schema detail the wire format needs.let has_filter = !ctx.visible_tool_names.is_empty();- let visible: Vec<ToolSchema> = ctx+ let visible: Vec<ToolSpec> = ctx.tools.iter().filter(|tool| !has_filter || ctx.visible_tool_names.contains(tool.name))@@ -407,7 +404,11 @@ impl PromptSection for ToolsSection {},None => serde_json::Value::Null,};- ToolSchema::new(tool.name, tool.description, parameters)+ ToolSpec {+ name: tool.name.to_string(),+ description: tool.description.to_string(),+ parameters,+ }}).collect();let mut out = render_pformat_catalogue(&visible);diff --git a/crates/openhuman-core/src/inference/provider/factory/access_gates.rs b/crates/openhuman-core/src/inference/provider/factory/access_gates.rsindex 77e0bc58a5..ab64ee2be1 100644--- a/crates/openhuman-core/src/inference/provider/factory/access_gates.rs+++ b/crates/openhuman-core/src/inference/provider/factory/access_gates.rs@@ -126,8 +126,8 @@ pub(super) fn emit_inference_egress(role: &str, provider: &str) {/// privacy gate; this exemption only concerns OpenHuman registration.pub(crate) fn provider_uses_independent_auth(provider: &str) -> bool {let p = provider.trim();- crate::inference::local::profile::is_local_provider_string(p)- || p.starts_with(crate::inference::provider::claude_code::PROVIDER_PREFIX)+ tinyinference::local::profile::is_local_provider_string(p)+ || p.starts_with(tinyagents_harness::providers::claude_code::PROVIDER_PREFIX)|| p == CLAUDE_AGENT_SDK_PROVIDER|| p.starts_with(CLAUDE_AGENT_SDK_PREFIX)}