Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

feat(tinyagents): add live harness tests for turn middleware

Steven Enamakel255e29e9b77b
diff --git a/crates/openhuman-core/src/agent/tinyagents/live_harness_tests.rs b/crates/openhuman-core/src/agent/tinyagents/live_harness_tests.rs
index 2a758f7b90..530be4c95f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/live_harness_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/live_harness_tests.rs
@@ -32,6 +32,7 @@ fn surface(allowed: &[&str]) -> LiveToolSurface {
tool_policy: None,
has_thread: true,
tool_hooks: Vec::new(),
+ dispatch: crate::core::runtime::DispatchCtx::ambient(),
}
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs
index ed67a44d02..2eff1bb300 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs
@@ -64,6 +64,8 @@ pub(super) struct TurnMiddlewareInputs {
pub(super) deterministic_cacheable: bool,
/// Whether the run has a cross-route fallback chain.
pub(super) has_route_fallback: bool,
+ /// The turn's dispatch context (its embedder tool hooks come from it).
+ pub(super) dispatch: crate::core::runtime::DispatchCtx,
/// Hosted roots authorize tools through `OpenHumanSecurityGate`; installing
/// the legacy approval middleware as well would issue a second approval.
pub(super) hosted_security_gate: bool,