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(agent): remove unused harness assembly and verify before finish modules
Steven Enamakel23db2c83f0f4
diff --git a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rsindex 2371f8a3a7..36f365fcfd 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs@@ -597,7 +597,12 @@ pub(super) fn assemble_turn_harness();// Issue #6952: one spec check before a root orchestrator turn's first answer.let agent_definition_id = tool_policy.as_ref().map(|p| p.agent_definition_id.as_str());- verify_before_finish::install(&mut harness, subagent_scope.is_some(), agent_definition_id);+ verify_before_finish::install(+ &mut harness,+ subagent_scope.is_some(),+ agent_definition_id,+ wrap_up_fired.as_ref(),+ );// Direct web lookup is bounded. Once enough search/fetch results have// returned, the web tools leave the request so the run works with what itdiff --git a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rsindex 06177db68f..3bb06bead0 100644--- a/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs+++ b/crates/openhuman-core/src/agent/tinyagents/verify_before_finish.rs@@ -14,7 +14,9 @@use std::sync::Arc;use std::time::Duration;-use tinyagents_harness::middleware::{FinishActivity, VerifyBeforeFinishMiddleware};+use tinyagents_harness::middleware::{+ FinalCallWrapUpMiddleware, FinishActivity, VerifyBeforeFinishMiddleware,+};use tinyagents_harness::runtime::AgentHarness;use crate::agent::session_host::turn_checkpoint::wrap_harness_instruction;@@ -59,10 +61,16 @@ pub(super) fn check_message() -> String {/// Install the check on `harness` when [`applies`] says so. The policy-level/// turn wall clock is declared to the middleware because it cannot read/// `RunPolicy` from the run context.+///+/// `wrap_up` must be the same `Arc` that is installed as the turn's wrap-up+/// middleware (`with_wrap_up` only sees announcements made by that instance).+/// Once it has announced a budget notice ("N calls left, finish now") the check+/// stays quiet, so the two directives cannot contradict each other (tinyagents#301).pub(super) fn install<C: Send + Sync + 'static>(harness: &mut AgentHarness<(), C>,is_subagent: bool,agent_definition_id: Option<&str>,+ wrap_up: Option<&Arc<FinalCallWrapUpMiddleware>>,) {if !applies(is_subagent, agent_definition_id) {tracing::debug!(@@ -77,8 +85,12 @@ pub(super) fn install<C: Send + Sync + 'static>(if let Some(ms) = super::agent_turn_wall_clock_ms() {middleware = middleware.with_wall_clock_limit(Duration::from_millis(ms));}+ if let Some(wrap_up) = wrap_up {+ middleware = middleware.with_wrap_up(Arc::clone(wrap_up));+ }tracing::debug!(min_tool_rounds = MIN_TOOL_ROUNDS,+ wrap_up_linked = wrap_up.is_some(),"[verify_before_finish] installed for a root orchestrator turn");harness.push_middleware(Arc::new(middleware));