Skip to content

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

chore(agent): drop unused turn-origin imports and refresh boundary baseline

Steven Enamakel60eddc11d62c
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
index 8a9740ed6f..de280aa91a 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_models.rs
@@ -6,11 +6,8 @@ use std::sync::Arc;
use crate::core::runtime::DispatchCtx;
pub(crate) use super::turn_model_resolver::TurnModelResolver;
-use async_trait::async_trait;
-
use crate::agent::tinyagents::model::{BuiltTurnModels, TierRoutes, TurnChatModel};
-use tinyagents_harness::host::{ModelResolveRequest, ModelResolver};
-use tinyinference_llm::model::{ErrorSlotModel, ProfileOverrideModel};
+use tinyinference_llm::model::ProfileOverrideModel;
use tinyinference_llm::model::{ResolvedModelRoute, RouteRecordingModel};
/// The per-turn crate [`ChatModel`](tinyinference_llm::model::ChatModel) set,
diff --git a/crates/openhuman-core/src/modules/wallet_host.rs b/crates/openhuman-core/src/modules/wallet_host.rs
index 9f0c0f7fa7..8f0277ac56 100644
--- a/crates/openhuman-core/src/modules/wallet_host.rs
+++ b/crates/openhuman-core/src/modules/wallet_host.rs
@@ -697,12 +697,8 @@ impl WalletHost {
&self,
request: AuthorizeX402PaymentRequest,
) -> tinybus::Result<HostResponse> {
- let owner_matches = x402_request_owner_matches(
- &request,
- crate::core::runtime::DispatchCtx::ambient_turn()
- .turn_origin()
- .as_ref(),
- );
+ let origin = crate::core::runtime::DispatchCtx::ambient_turn().turn_origin();
+ let owner_matches = x402_request_owner_matches(&request, origin.as_ref());
let approved = if owner_matches {
if let Some(gate) = crate::security::approval::ApprovalGate::try_global() {
matches!(
diff --git a/scripts/ci/agent-runtime-boundary-baseline.json b/scripts/ci/agent-runtime-boundary-baseline.json
index 700b248cb3..a309284d79 100644
--- a/scripts/ci/agent-runtime-boundary-baseline.json
+++ b/scripts/ci/agent-runtime-boundary-baseline.json
@@ -30,7 +30,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_execute.rs",
- "line": 397,
+ "line": 400,
"text": "let join = crate::core::runtime::spawn_scoped(crate::agent::turn_origin::propagate(",
"occurrence": 1
},
@@ -62,13 +62,6 @@
"text": "crate::agent::turn_origin::with_inherited_origin(",
"occurrence": 2
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/agent/plan_review/tool.rs",
- "line": 122,
- "text": "let origin = turn_origin::current().unwrap_or(AgentTurnOrigin::Unknown);",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/schemas.rs",
@@ -76,20 +69,6 @@
"text": "crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/agent/session_host/runtime_session/tool_rules.rs",
- "line": 65,
- "text": "crate::agent::turn_origin::current_is_user_authored().then(|| request.input.text());",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs",
- "line": 530,
- "text": "crate::agent::turn_origin::current(),",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/tools/delegate.rs",
@@ -97,13 +76,6 @@
"text": ".with_thread_id(tool_context.and_then(ToolRunContext::thread_id));",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/agent/turn_origin.rs",
- "line": 179,
- "text": "pub fn current_is_user_authored() -> bool {",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/agent/turn_origin.rs",
@@ -125,20 +97,6 @@
"text": "let (outcome, request_id) = crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/cron/origin.rs",
- "line": 54,
- "text": "let origin = turn_origin::current()?;",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/cron/origin.rs",
- "line": 169,
- "text": "let turn = turn_origin::current();",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/cron/scheduler/agent_run.rs",
@@ -160,13 +118,6 @@
"text": "with_origin(origin, apply_decision(&ctx, triage_run, &envelope)).await",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/flows/memory_tools.rs",
- "line": 65,
- "text": "match turn_origin::current() {",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/ops.rs",
@@ -219,52 +170,24 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/tinyflows/caps/agent.rs",
- "line": 440,
- "text": "let escalated_origin = escalated_origin_for_nested_harness(turn_origin::current());",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/flows/tinyflows/caps/agent.rs",
- "line": 453,
+ "line": 455,
"text": "Box::pin(turn_origin::with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/flows/tinyflows/caps/tier.rs",
- "line": 107,
- "text": "match escalated_origin_for_prompt(tier_decision, turn_origin::current()) {",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/flows/tinyflows/caps/tier.rs",
- "line": 115,
+ "line": 118,
"text": "turn_origin::with_origin(",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/flows/tinyflows/memory_adapter.rs",
- "line": 85,
- "text": "match turn_origin::current() {",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs",
- "line": 570,
+ "line": 586,
"text": "let run = crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs",
- "line": 134,
- "text": "crate::agent::turn_origin::current()",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/inference/provider/factory/managed_backend.rs",
@@ -331,63 +254,28 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/mcp/server/tools/dispatch.rs",
- "line": 374,
+ "line": 377,
"text": "crate::agent::turn_origin::with_origin(origin, agent.run_single(prompt)),",
"occurrence": 1
},
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/modules/wallet_host.rs",
- "line": 697,
- "text": "x402_request_owner_matches(&request, crate::agent::turn_origin::current().as_ref());",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/security/approval/gate_intercept.rs",
- "line": 56,
- "text": "let origin = turn_origin::current().unwrap_or(AgentTurnOrigin::Unknown);",
- "occurrence": 1
- },
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/runtime/run_machinery.rs",
- "line": 151,
- "text": "let inherited_origin = crate::agent::turn_origin::current()",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/skills/runtime/run_machinery.rs",
- "line": 239,
+ "line": 240,
"text": "r = crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/runtime/schemas.rs",
- "line": 271,
- "text": "let origin = crate::agent::turn_origin::current()",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/skills/runtime/schemas.rs",
- "line": 273,
+ "line": 274,
"text": "let started = crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/skills/schemas/handlers.rs",
- "line": 168,
- "text": "let origin = crate::agent::turn_origin::current()",
- "occurrence": 1
- },
- {
- "rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/skills/schemas/handlers.rs",
- "line": 170,
+ "line": 171,
"text": "let started = match crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
@@ -408,14 +296,14 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/voice/live/session.rs",
- "line": 20,
+ "line": 21,
"text": "use crate::agent::turn_origin::{with_origin, AgentTurnOrigin};",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/voice/live/session.rs",
- "line": 204,
+ "line": 207,
"text": "Box::pin(with_origin(origin, task))",
"occurrence": 1
},
@@ -429,7 +317,7 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/voice/realtime_harness/agent.rs",
- "line": 152,
+ "line": 154,
"text": "let fut = with_origin(",
"occurrence": 1
},
@@ -443,21 +331,21 @@
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/web_chat/ops/system_turn.rs",
- "line": 87,
+ "line": 89,
"text": "let result = with_origin(origin, agent.run_single(prompt))",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-core/src/web_chat/ops/turn_guards.rs",
- "line": 250,
+ "line": 251,
"text": "crate::agent::turn_origin::with_origin(",
"occurrence": 1
},
{
"rule": "openhuman-task-local",
"path": "crates/openhuman-embed/src/turn_control.rs",
- "line": 386,
+ "line": 405,
"text": "Some(origin) => openhuman_core::agent::turn_origin::with_origin(origin, dispatch).await,",
"occurrence": 1
},
@@ -583,7 +471,7 @@
{
"rule": "tinyagents-tool-calling-facade",
"path": "vendor/tinyagents/crates/tinyagents-session/src/transcript/jsonl.rs",
- "line": 13,
+ "line": 14,
"text": "use tinytools_agent::dialect::{",
"occurrence": 1
},
@@ -660,7 +548,7 @@
{
"rule": "tinyagents-upstream-reexport",
"path": "vendor/tinyagents/crates/tinyagents-session/src/port/mod.rs",
- "line": 62,
+ "line": 68,
"text": "pub use tinyagents_harness::store::{AppendStore, Store};",
"occurrence": 1
}