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
chore: files changed crates/openhuman-core/src/agent/session_host/driver.rs,crates/openhuman-core/sr
Steven Enamakel421a90792d28
diff --git a/crates/openhuman-core/src/agent/session_host/driver.rs b/crates/openhuman-core/src/agent/session_host/driver.rsindex a3b2df0451..869f643e7c 100644--- a/crates/openhuman-core/src/agent/session_host/driver.rs+++ b/crates/openhuman-core/src/agent/session_host/driver.rs@@ -236,7 +236,7 @@ impl SessionDriver<OpenHumanRunContext> for OpenHumanSessionDriver {if outcome.text.trim().is_empty() && outcome.tool_outcomes.is_empty() {return Err(driver_error(- crate::agent::error::AgentError::EmptyProviderResponse {+ tinyagents_harness::agent_error::AgentError::EmptyProviderResponse {iteration: outcome.model_calls,},));diff --git a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rsindex ca9c40bf4c..7b36e782f7 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs@@ -3,7 +3,7 @@//! events, and error sanitisation.use super::super::types::OpenHumanSessionHost;-use crate::agent::error::AgentError;+use tinyagents_harness::agent_error::AgentError;use crate::core::bus::BUS;use crate::core::events::DomainEvent;use crate::security::prompt_injection::{diff --git a/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs b/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rsindex 69c5432442..55830c155c 100644--- a/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs@@ -2,7 +2,7 @@//! sanitisation, and tool-call id fallback / persistence shaping.use super::super::types::OpenHumanSessionHost;-use crate::agent::error::AgentError;+use tinyagents_harness::agent_error::AgentError;use crate::util::truncate_with_ellipsis;use tinytools_agent::dialect::TranscriptEntry;diff --git a/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs b/crates/openhuman-core/src/agent/tinyagents/hosted_error.rsindex 4cf6f53888..cda08f21b9 100644--- a/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs+++ b/crates/openhuman-core/src/agent/tinyagents/hosted_error.rs@@ -11,7 +11,7 @@use tinyagents_harness::runtime::{HostedError, HostedErrorKind, TimeoutBound};use tinyagents_harness::TinyAgentsError;-use crate::agent::error::TurnTimeoutBound;+use tinyagents_harness::agent_error::TurnTimeoutBound;/// The host-side name of a harness [`TimeoutBound`].pub(super) fn turn_timeout_bound(bound: TimeoutBound) -> TurnTimeoutBound {diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rsindex 0293038c61..f34eaa75c9 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_error.rs@@ -39,7 +39,7 @@ pub(super) async fn map_turn_run_error(model,"[tinyagents] run hit the model-call cap; mapping to MaxIterationsExceeded (not consulting error_slot) — #4457 defect B");- return anyhow::Error::new(crate::agent::error::AgentError::MaxIterationsExceeded {+ return anyhow::Error::new(tinyagents_harness::agent_error::AgentError::MaxIterationsExceeded {max: max_iterations,});}diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rsindex 01652ad47b..db800ba341 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_error_tests.rs@@ -34,8 +34,8 @@ async fn the_model_call_cap_and_depth_limit_win_over_a_stale_provider_error() {let cap = tinyagents_harness::TinyAgentsError::LimitExceeded("model call cap".to_string());let mapped = map_turn_run_error(cap, "m", 7, &stale(), None).await;assert!(matches!(- mapped.downcast_ref::<crate::agent::error::AgentError>(),- Some(crate::agent::error::AgentError::MaxIterationsExceeded { max: 7 })+ mapped.downcast_ref::<tinyagents_harness::agent_error::AgentError>(),+ Some(tinyagents_harness::agent_error::AgentError::MaxIterationsExceeded { max: 7 })));let depth = tinyagents_harness::TinyAgentsError::SubAgentDepth(3);diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rsindex d3b3ccb398..a6e3e9d201 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs@@ -336,7 +336,7 @@ pub(super) async fn run_turn_via_tinyagents_body("[registry] aborting turn before model dispatch: capability registry validation failed");return Err(anyhow::Error::new(- crate::agent::error::AgentError::RegistryValidationFailed {+ tinyagents_harness::agent_error::AgentError::RegistryValidationFailed {diagnostics: messages,},));diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rsindex adb7e33ccc..2694500be0 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/processor/turn.rs@@ -604,7 +604,7 @@ pub(crate) async fn process_channel_runtime_message(// Sentry funnel (OPENHUMAN-TAURI-98) and emit `log::info!`// instead — `Err` propagation through the surrounding match// arm is unchanged.- if crate::agent::error::is_max_iterations_error(&e.to_string()) {+ if tinyagents_harness::agent_error::is_max_iterations_error(&e.to_string()) {log::info!(target: "channels","[channels.dispatch] suppressed Sentry emission for max-iteration cap \diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rsindex 5212c15199..5886c22efd 100644--- a/crates/openhuman-core/src/core/observability.rs+++ b/crates/openhuman-core/src/core/observability.rs@@ -2664,7 +2664,7 @@ fn all_provider_attempts_are_transient(message: &str) -> bool {/// Returns true when a Sentry event's message/exception text contains the/// canonical max-tool-iterations cap phrase (see-/// `crate::agent::error::MAX_ITERATIONS_ERROR_PREFIX`).+/// `tinyagents_harness::agent_error::MAX_ITERATIONS_ERROR_PREFIX`).////// Defense-in-depth filter for the Sentry `before_send` hook: the primary/// suppression lives at the call sites in `agent::session_host::@@ -2688,7 +2688,7 @@ pub fn is_max_iterations_event(event: &sentry::protocol::Event<'_>) -> bool {[direct, from_exception].into_iter().flatten()- .any(crate::agent::error::is_max_iterations_error)+ .any(tinyagents_harness::agent_error::is_max_iterations_error)}/// Tag + body classifier for the `before_send` chain — drops Sentry eventsdiff --git a/crates/openhuman-core/src/cron/scheduler/failure_classification.rs b/crates/openhuman-core/src/cron/scheduler/failure_classification.rsindex cdc924fa34..e4b9a96176 100644--- a/crates/openhuman-core/src/cron/scheduler/failure_classification.rs+++ b/crates/openhuman-core/src/cron/scheduler/failure_classification.rs@@ -1,7 +1,7 @@//! Classification of agent-job failures into static, leak-safe user copy and//! the permanent-halt predicates that stop the retry loop early.-use crate::agent::error::AgentError;+use tinyagents_harness::agent_error::AgentError;use tinyflows_schedule::types::JobType;pub(super) const AGENT_JOB_USER_FAILURE_MESSAGE: &str = "Something went wrong. Please try again.";diff --git a/crates/openhuman-core/src/cron/scheduler_tests.rs b/crates/openhuman-core/src/cron/scheduler_tests.rsindex 6163d72d10..c42c155dce 100644--- a/crates/openhuman-core/src/cron/scheduler_tests.rs+++ b/crates/openhuman-core/src/cron/scheduler_tests.rs@@ -1,5 +1,5 @@use super::*;-use crate::agent::error::AgentError;+use tinyagents_harness::agent_error::AgentError;use crate::config::Config;use crate::security::SecurityPolicy;use chrono::{Duration as ChronoDuration, Timelike, Utc};diff --git a/crates/openhuman-core/src/web_chat/ops/turn_guards.rs b/crates/openhuman-core/src/web_chat/ops/turn_guards.rsindex c194ec5d85..cea02aa841 100644--- a/crates/openhuman-core/src/web_chat/ops/turn_guards.rs+++ b/crates/openhuman-core/src/web_chat/ops/turn_guards.rs@@ -212,7 +212,7 @@ const STOPPED_TURN_PERSIST_GRACE: Duration = Duration::from_secs(3);/// Kept as a pure predicate over the already-formatted error string so the/// suppression policy is unit-testable without a Sentry harness.pub(crate) fn sentry_suppression_reason(detailed: &str) -> Option<&'static str> {- if crate::agent::error::is_max_iterations_error(detailed) {+ if tinyagents_harness::agent_error::is_max_iterations_error(detailed) {Some("max-iteration cap")} else if super::super::web_errors::is_outer_backstop_timeout(detailed) {Some("turn wall-clock backstop (no terminal event)")@@ -234,12 +234,12 @@ pub(crate) fn sentry_suppression_reason(detailed: &str) -> Option<&'static str>////// The bound is a typed field on the harness's hosted error/// (`HostedError::timeout_bound`); the turn runner turns it into a-/// [`TurnTimeoutBound`](crate::agent::error::TurnTimeoutBound) phrase in the+/// [`TurnTimeoutBound`](tinyagents_harness::agent_error::TurnTimeoutBound) phrase in the/// flattened error, and this function reads that phrase back through the same/// type rather than a second spelling. Pure over the formatted error string,/// for the same reason its neighbour is.pub(crate) fn timeout_bound_tag(detailed: &str) -> &'static str {- if let Some(bound) = crate::agent::error::TurnTimeoutBound::from_message(detailed) {+ if let Some(bound) = tinyagents_harness::agent_error::TurnTimeoutBound::from_message(detailed) {bound.tag()} else if super::super::web_errors::is_turn_timeout_error(detailed) {"unclassified_timeout"diff --git a/crates/openhuman-core/src/web_chat/web_errors/classify.rs b/crates/openhuman-core/src/web_chat/web_errors/classify.rsindex e279262a16..c666459f06 100644--- a/crates/openhuman-core/src/web_chat/web_errors/classify.rs+++ b/crates/openhuman-core/src/web_chat/web_errors/classify.rs@@ -255,7 +255,7 @@ pub(crate) fn classify_inference_error(err: &str) -> ClassifiedError {// thread CAN recover, but the exact wait is unpredictable. The limit is// not from a provider, so any provider name in the chain is dropped.classified_with_detail(C::ActionBudget, err, None, None)- } else if crate::agent::error::is_max_iterations_error(err) {+ } else if tinyagents_harness::agent_error::is_max_iterations_error(err) {classified_with_detail(C::MaxIterations, err, provider, None)} else if is_turn_timeout_error(err) {// The web turn driver's wall-clock backstop fired (#4746): a wedged maindiff --git a/crates/openhuman-embed/src/process_sentry_tests.rs b/crates/openhuman-embed/src/process_sentry_tests.rsindex 9b7220023d..055b4ab879 100644--- a/crates/openhuman-embed/src/process_sentry_tests.rs+++ b/crates/openhuman-embed/src/process_sentry_tests.rs@@ -62,7 +62,7 @@ fn each_known_noise_class_is_dropped() {event(&format!("{}: 50",- openhuman_core::agent::error::MAX_ITERATIONS_ERROR_PREFIX+ tinyagents_harness::agent_error::MAX_ITERATIONS_ERROR_PREFIX),&[],),