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
refactor(agent): restore Rust layout boundaries
Steven Enamakel17b334e8e96f
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rsindex 9bb0fb8849..c9e135794f 100644--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs@@ -12,6 +12,9 @@ use tinyagents_harness::tool::{ToolDispatch, ToolExecutionContext};use tinytools::ToolRunContext;use tinytools::{ToolCallOptions, ToolResult};+mod dispatch_outcomes;+pub(crate) use dispatch_outcomes::*;+/// Typed dispatch for the delegation tools synthesised from the active agent.////// These tools are dynamic, so their common registration resolves the admitted@@ -673,144 +676,6 @@ pub(crate) async fn dispatch_subagent_with_live_parent(}}-/// Map a paused (`AwaitingUser`) sub-agent outcome to the tool result handed-/// back to the orchestrator: a successful `ToolResult` carrying the-/// `[SUBAGENT_AWAITING_USER]` envelope (task_id/agent_id/question + the-/// instruction to resume via `continue_subagent`). Kept as a standalone,-/// side-effect-free fn so the paused-path mapping is unit-testable without a-/// registry or a real model — the #4291 regression guard. Synchronous delegate-/// dispatch has no worker sub-thread, so `worker_thread_id` is always `None`.-///-/// **An unpersisted pause is a failure on this path, not a caveat.** The-/// envelope's "resuming may fail" wording is calibrated for the async path,-/// where a child that lost its checkpoint is still reachable through the-/// durable `subagent_sessions` store. This function serves the *synchronous*-/// delegation, which returns above before any durable session is registered-/// and has no worker thread by construction — so with no checkpoint there is-/// no resume route at all, and `continue_subagent` will find neither. Handing-/// back a success envelope would have the orchestrator put a question to the-/// user whose answer has nowhere to go, and the loss would only surface after-/// they answered. Report it as a failure instead, while the parent can still-/// act on it.-fn awaiting_outcome_to_tool_result(- outcome: &crate::agent::subagent_host::SubagentRunOutcome,- question: &str,- checkpointed: bool,-) -> ToolResult {- if !checkpointed {- // `question` is sub-agent-authored free text and this string is read by- // the orchestrator, so it gets the same treatment as the envelope's:- // JSON-encoded, not wrapped in quotes. Bare quoting is not containment —- // the question can close the quote and continue with instructions of its- // own. This is the hole `awaiting_user_envelope` exists to close, and an- // error path is not exempt from it.- let question_json = serde_json::to_string(question)- .unwrap_or_else(|_| "\"<unserializable question>\"".into());- return ToolResult::error(format!(- "The sub-agent `{}` paused to ask a question, but its state could not be saved \- and this delegation has no durable session to fall back on, so it cannot be \- resumed. Its progress is lost. Tell the user what it was asking — {} — and \- that the delegation has to be started again; do NOT call continue_subagent \- with task_id `{}`, there is nothing for it to resume.",- outcome.agent_id, question_json, outcome.task_id- ));- }- ToolResult::success(super::awaiting_user::awaiting_user_envelope(- &outcome.task_id,- &outcome.agent_id,- None,- question,- checkpointed,- ))-}--/// Format a subagent-delegation failure so the orchestrator cannot mistake it-/// for success. Kept as a standalone, side-effect-free fn so the exact wording-/// is unit-testable without standing up a registry + failing model (#3193).-fn format_subagent_failure(tool_name: &str, message: &str) -> String {- format!(- "{tool_name} failed and did not complete — no work was performed and no \- results were produced. Do NOT treat this as success or fabricate an \- output; report the failure to the user. Error: {message}"- )-}--/// Whether a "completed" sub-agent output is only an unexecuted tool call.-///-/// The marker vocabulary lives in-/// [`crate::agent::harness::archivist::helpers::looks_like_unexecuted_tool_call`];-/// this adds the second half of the question — that stripping the markup-/// leaves no prose behind. A reply that merely *mentions* a tool call still-/// carries an answer and passes through untouched.-pub(crate) fn is_unexecuted_tool_call_stub(output: &str) -> bool {- use crate::agent::harness::archivist::helpers::{- contains_tool_call_payload, strip_tool_calls_from_response,- };- if !contains_tool_call_payload(output) {- // Prose merely naming a protocol field is not a stub.- return false;- }- // A whole-text JSON payload carrying `tool_calls` is a stub however it- // is formatted — line-based stripping cannot see that the object's- // inner members belong to the call rather than to an answer.- if let Ok(serde_json::Value::Object(map)) =- serde_json::from_str::<serde_json::Value>(output.trim())- {- if map.contains_key("tool_calls") {- return true;- }- }- // Otherwise (XML spans, mixed prose): a stub is what leaves no words- // behind once the markup is stripped. Structural punctuation is not an- // answer.- !strip_tool_calls_from_response(output)- .chars()- .any(char::is_alphanumeric)-}--/// The sentence appended to a blocking delegation's result.-///-/// Integration delegations run [`DispatchMode::Blocking`] and register no-/// durable worker, but the orchestrator's `[active_subagents]` guidance-/// tells it to collect completed work with `wait_subagent`. Saying so on-/// the result itself stops it hunting for a worker that never existed-/// (#6033).-const INLINE_RESULT_NOTE: &str = "\n\n[INLINE_RESULT] This delegation ran inline and is complete as returned — there is no sub-agent worker for it. Do NOT call wait_subagent, list_subagents or continue_subagent for this delegation.";--/// The same disclosure for a run that did **not** finish. It must not claim-/// the result is complete — that would contradict the-/// `[SUBAGENT_INCOMPLETE]` guardrail it is appended to — so it says only-/// that there is no worker, and what to do instead.-const NO_WORKER_NOTE: &str = "\n\n[INLINE_RESULT] This delegation ran inline and registered no sub-agent worker, so there is nothing to collect: do NOT call wait_subagent, list_subagents or continue_subagent for it. Re-delegate with a corrected prompt instead.";--/// Append [`INLINE_RESULT_NOTE`] when the dispatch was blocking.-pub(crate) fn with_inline_result_note(output: String, mode: DispatchMode) -> String {- if mode == DispatchMode::Blocking {- format!("{output}{INLINE_RESULT_NOTE}")- } else {- output- }-}--/// The partial-progress envelope shared by every non-finishing outcome.-pub(crate) fn incomplete_envelope(- tool_name: &str,- reason: &str,- output: &str,- mode: DispatchMode,-) -> String {- let envelope = format!(- "[SUBAGENT_INCOMPLETE] the {tool_name} sub-agent {reason} and did not \- finish. Below is partial progress only — do NOT report it as done or \- re-run the identical delegation unchanged.\n\nPartial progress:\n{output}"- );- if mode == DispatchMode::Blocking {- format!("{envelope}{NO_WORKER_NOTE}")- } else {- envelope- }-}-#[cfg(test)]#[path = "dispatch_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_outcomes.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_outcomes.rsnew file mode 100644index 0000000000..e97a39ff7b--- /dev/null+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_outcomes.rs@@ -0,0 +1,74 @@+//! Pure result mapping and framing for synchronous delegation dispatch.++use super::DispatchMode;+use tinytools::ToolResult;++pub(super) fn awaiting_outcome_to_tool_result(+ outcome: &crate::agent::subagent_host::SubagentRunOutcome,+ question: &str,+ checkpointed: bool,+) -> ToolResult {+ if !checkpointed {+ let question_json = serde_json::to_string(question)+ .unwrap_or_else(|_| "\"<unserializable question>\"".into());+ return ToolResult::error(format!(+ "The sub-agent `{}` paused to ask a question, but its state could not be saved and this delegation has no durable session to fall back on, so it cannot be resumed. Its progress is lost. Tell the user what it was asking — {} — and that the delegation has to be started again; do NOT call continue_subagent with task_id `{}`, there is nothing for it to resume.",+ outcome.agent_id, question_json, outcome.task_id+ ));+ }+ ToolResult::success(super::super::awaiting_user::awaiting_user_envelope(+ &outcome.task_id,+ &outcome.agent_id,+ None,+ question,+ checkpointed,+ ))+}++pub(super) fn format_subagent_failure(tool_name: &str, message: &str) -> String {+ format!("{tool_name} failed and did not complete — no work was performed and no results were produced. Do NOT treat this as success or fabricate an output; report the failure to the user. Error: {message}")+}++pub(crate) fn is_unexecuted_tool_call_stub(output: &str) -> bool {+ use crate::agent::harness::archivist::helpers::{+ contains_tool_call_payload, strip_tool_calls_from_response,+ };+ if !contains_tool_call_payload(output) {+ return false;+ }+ if let Ok(serde_json::Value::Object(map)) =+ serde_json::from_str::<serde_json::Value>(output.trim())+ {+ if map.contains_key("tool_calls") {+ return true;+ }+ }+ !strip_tool_calls_from_response(output)+ .chars()+ .any(char::is_alphanumeric)+}++const INLINE_RESULT_NOTE: &str = "\n\n[INLINE_RESULT] This delegation ran inline and is complete as returned — there is no sub-agent worker for it. Do NOT call wait_subagent, list_subagents or continue_subagent for this delegation.";+const NO_WORKER_NOTE: &str = "\n\n[INLINE_RESULT] This delegation ran inline and registered no sub-agent worker, so there is nothing to collect: do NOT call wait_subagent, list_subagents or continue_subagent for it. Re-delegate with a corrected prompt instead.";++pub(crate) fn with_inline_result_note(output: String, mode: DispatchMode) -> String {+ if mode == DispatchMode::Blocking {+ format!("{output}{INLINE_RESULT_NOTE}")+ } else {+ output+ }+}++pub(crate) fn incomplete_envelope(+ tool_name: &str,+ reason: &str,+ output: &str,+ mode: DispatchMode,+) -> String {+ let envelope = format!("[SUBAGENT_INCOMPLETE] the {tool_name} sub-agent {reason} and did not finish. Below is partial progress only — do NOT report it as done or re-run the identical delegation unchanged.\n\nPartial progress:\n{output}");+ if mode == DispatchMode::Blocking {+ format!("{envelope}{NO_WORKER_NOTE}")+ } else {+ envelope+ }+}diff --git a/crates/openhuman-core/src/agent/session_host/driver.rs b/crates/openhuman-core/src/agent/session_host/driver.rsindex 5b784c5f60..254f0559a9 100644--- a/crates/openhuman-core/src/agent/session_host/driver.rs+++ b/crates/openhuman-core/src/agent/session_host/driver.rs@@ -459,131 +459,5 @@ fn driver_error_with_snapshot(}#[cfg(test)]-mod tests {- use super::*;-- fn sidecar() -> std::sync::Arc<- std::sync::Mutex<crate::agent::tinyagents::host::run_context::SessionTurnSidecar>,- > {- crate::agent::tinyagents::host::OpenHumanRunContext::new()- .session_sidecar- .clone()- }-- #[test]- fn graph_failure_persists_only_accepted_snapshot_history() {- let snapshot = Arc::new(std::sync::Mutex::new(- crate::agent::tinyagents::TranscriptSnapshot {- messages: vec![- Message::system("stable prefix"),- Message::user("request"),- Message::assistant("provider reply not yet accepted by a later request"),- ],- accepted_len: 2,- request_base_len: 2,- ..Default::default()- },- ));-- let failure = driver_error_with_snapshot(- "provider rejected follow-up",- &snapshot,- &sidecar(),- std::time::Duration::from_millis(1),- "chat-v1",- );- let partial = failure.partial.expect("snapshot should produce a partial");- assert_eq!(partial.history.len(), 2);- assert_eq!(partial.history[0].text(), "stable prefix");- assert_eq!(partial.history[1].text(), "request");- assert!(partial- .partial- .expect("display partial")- .content- .contains("provider rejected follow-up"));- }-- #[test]- fn graph_failure_copies_snapshot_usage_and_failed_tool_outcome_to_sidecar() {- let snapshot = Arc::new(std::sync::Mutex::new(- crate::agent::tinyagents::TranscriptSnapshot {- messages: vec![Message::user("request"), Message::tool("call-1", "denied")],- accepted_len: 1,- request_base_len: 1,- input_tokens: 21,- output_tokens: 8,- cached_input_tokens: 3,- charged_amount_usd: 0.004,- resolved_route: Some(tinyinference_llm::model::ResolvedModelRoute::new(- "openhuman",- "chat-concrete",- "chat-v1",- )),- pricing_model: None,- model_calls: 2,- tool_outcomes: vec![crate::agent::tinyagents::ToolCallOutcome {- call_id: "call-1".into(),- name: "write_file".into(),- arguments: serde_json::json!({"path": "blocked.txt"}),- success: false,- content: "denied".into(),- duration_ms: 17,- }],- },- ));- let sidecar = sidecar();-- let failure = driver_error_with_snapshot(- "tool follow-up was rejected",- &snapshot,- &sidecar,- std::time::Duration::from_millis(25),- "chat-v1",- );-- let partial = failure.partial.expect("recoverable snapshot partial");- assert_eq!(partial.history, vec![Message::user("request")]);- let observed = sidecar.lock().expect("sidecar");- assert_eq!(observed.model_calls, 2);- assert_eq!(observed.input_tokens, 21);- assert_eq!(observed.output_tokens, 8);- assert_eq!(observed.cached_input_tokens, 3);- assert!((observed.cost_usd - 0.004).abs() < f64::EPSILON);- let route = observed- .resolved_route- .as_ref()- .expect("accepted route reaches sidecar");- assert_eq!(route.provider, "openhuman");- assert_eq!(route.model, "chat-concrete");- assert_eq!(route.route, "chat-v1");- assert_eq!(observed.tool_calls, 1);- assert_eq!(- observed.duration,- Some(std::time::Duration::from_millis(25))- );- assert_eq!(observed.tool_outcomes.len(), 1);- let failure = &observed.tool_outcomes[0];- assert!(- !failure.success,- "completed failure state survives graph error"- );- assert_eq!(failure.content, "denied");- assert_eq!(- failure.arguments,- serde_json::json!({"path": "blocked.txt"})- );- assert_eq!(failure.duration_ms, 17);- }-- #[test]- fn tool_snapshot_with_no_executable_source_fails_closed_before_graph() {- let visible = HashSet::from(["revoked_tool".to_string()]);- let error = ensure_snapshot_tools_are_executable(- &visible,- &Arc::new(Vec::new()),- &Arc::new(Vec::new()),- )- .expect_err("a declared tool must have a request-scoped executable source");- assert!(error.error.to_string().contains("revoked_tool"));- }-}+#[path = "driver_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/agent/session_host/driver_tests.rs b/crates/openhuman-core/src/agent/session_host/driver_tests.rsnew file mode 100644index 0000000000..390f1b2009--- /dev/null+++ b/crates/openhuman-core/src/agent/session_host/driver_tests.rs@@ -0,0 +1,129 @@+use super::*;++fn sidecar(+) -> std::sync::Arc<std::sync::Mutex<crate::agent::tinyagents::host::run_context::SessionTurnSidecar>>+{+ crate::agent::tinyagents::host::OpenHumanRunContext::new()+ .session_sidecar+ .clone()+}++#[test]+fn graph_failure_persists_only_accepted_snapshot_history() {+ let snapshot = Arc::new(std::sync::Mutex::new(+ crate::agent::tinyagents::TranscriptSnapshot {+ messages: vec![+ Message::system("stable prefix"),+ Message::user("request"),+ Message::assistant("provider reply not yet accepted by a later request"),+ ],+ accepted_len: 2,+ request_base_len: 2,+ ..Default::default()+ },+ ));+ let failure = driver_error_with_snapshot(+ "provider rejected follow-up",+ &snapshot,+ &sidecar(),+ std::time::Duration::from_millis(1),+ "chat-v1",+ );+ let partial = failure.partial.expect("snapshot should produce a partial");+ assert_eq!(partial.history.len(), 2);+ assert_eq!(partial.history[0].text(), "stable prefix");+ assert_eq!(partial.history[1].text(), "request");+ assert!(partial+ .partial+ .expect("display partial")+ .content+ .contains("provider rejected follow-up"));+}++#[test]+fn graph_failure_copies_snapshot_usage_and_failed_tool_outcome_to_sidecar() {+ let snapshot = Arc::new(std::sync::Mutex::new(+ crate::agent::tinyagents::TranscriptSnapshot {+ messages: vec![Message::user("request"), Message::tool("call-1", "denied")],+ accepted_len: 1,+ request_base_len: 1,+ input_tokens: 21,+ output_tokens: 8,+ cached_input_tokens: 3,+ charged_amount_usd: 0.004,+ resolved_route: Some(tinyinference_llm::model::ResolvedModelRoute::new(+ "openhuman",+ "chat-concrete",+ "chat-v1",+ )),+ pricing_model: None,+ model_calls: 2,+ tool_outcomes: vec![crate::agent::tinyagents::ToolCallOutcome {+ call_id: "call-1".into(),+ name: "write_file".into(),+ arguments: serde_json::json!({"path": "blocked.txt"}),+ success: false,+ content: "denied".into(),+ duration_ms: 17,+ }],+ },+ ));+ let sidecar = sidecar();+ let failure = driver_error_with_snapshot(+ "tool follow-up was rejected",+ &snapshot,+ &sidecar,+ std::time::Duration::from_millis(25),+ "chat-v1",+ );+ let partial = failure.partial.expect("recoverable snapshot partial");+ assert_eq!(partial.history, vec![Message::user("request")]);+ let observed = sidecar.lock().expect("sidecar");+ assert_eq!(+ (+ observed.model_calls,+ observed.input_tokens,+ observed.output_tokens,+ observed.cached_input_tokens+ ),+ (2, 21, 8, 3)+ );+ assert!((observed.cost_usd - 0.004).abs() < f64::EPSILON);+ let route = observed+ .resolved_route+ .as_ref()+ .expect("accepted route reaches sidecar");+ assert_eq!(+ (&route.provider, &route.model, &route.route),+ ("openhuman", "chat-concrete", "chat-v1")+ );+ assert_eq!(observed.tool_calls, 1);+ assert_eq!(+ observed.duration,+ Some(std::time::Duration::from_millis(25))+ );+ assert_eq!(observed.tool_outcomes.len(), 1);+ let failure = &observed.tool_outcomes[0];+ assert!(+ !failure.success,+ "completed failure state survives graph error"+ );+ assert_eq!(failure.content, "denied");+ assert_eq!(+ failure.arguments,+ serde_json::json!({"path": "blocked.txt"})+ );+ assert_eq!(failure.duration_ms, 17);+}++#[test]+fn tool_snapshot_with_no_executable_source_fails_closed_before_graph() {+ let visible = HashSet::from(["revoked_tool".to_string()]);+ let error = ensure_snapshot_tools_are_executable(+ &visible,+ &Arc::new(Vec::new()),+ &Arc::new(Vec::new()),+ )+ .expect_err("a declared tool must have a request-scoped executable source");+ assert!(error.error.to_string().contains("revoked_tool"));+}diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture.rsindex 4e5b88d17a..443d052a60 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture.rs@@ -162,78 +162,5 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>}#[cfg(test)]-mod tests {- use super::*;- use tinyagents_harness::context::{RunConfig, RunContext};-- fn context() -> RunContext<crate::agent::tinyagents::host::OpenHumanRunContext> {- RunContext::new(- RunConfig::new("outcome-capture-test"),- crate::agent::tinyagents::host::OpenHumanRunContext::new(),- )- }-- #[tokio::test]- async fn same_tool_calls_keep_completion_and_failure_records_by_call_id() {- let sink = std::sync::Arc::new(std::sync::Mutex::new(Vec::new()));- let failure_map = std::sync::Arc::new(std::sync::Mutex::new(Default::default()));- let middleware = ToolOutcomeCaptureMiddleware::new(sink.clone(), failure_map.clone());- let mut ctx = context();-- let mut success_call = tinyinference_llm::tool::ToolCall {- id: "echo-success".into(),- name: "echo".into(),- arguments: serde_json::json!({"message": "hello"}),- invalid: None,- };- middleware- .before_tool(&mut ctx, &(), &mut success_call)- .await- .expect("start metadata is captured");- let success = ToolInvocationIdentity::new("echo-success", "echo");- let mut success_result = TaToolResult::success("done");- middleware- .after_tool(&mut ctx, &(), &success, &mut success_result)- .await- .expect("successful result is captured");-- let mut failure_call = tinyinference_llm::tool::ToolCall {- id: "echo-failure".into(),- name: "echo".into(),- arguments: serde_json::json!({"message": "retry"}),- invalid: None,- };- middleware- .before_tool(&mut ctx, &(), &mut failure_call)- .await- .expect("start metadata is captured");- let failure = ToolInvocationIdentity::new("echo-failure", "echo");- let mut failure_result = TaToolResult::error("request timed out");- middleware- .after_tool(&mut ctx, &(), &failure, &mut failure_result)- .await- .expect("failed result is captured");-- let outcomes = sink.lock().expect("outcome sink");- assert_eq!(outcomes.len(), 2);- assert_eq!(outcomes[0].call_id, "echo-success");- assert!(outcomes[0].success);- assert_eq!(- outcomes[0].arguments,- serde_json::json!({"message": "hello"})- );- assert_eq!(outcomes[1].call_id, "echo-failure");- assert!(!outcomes[1].success);- assert_eq!(- outcomes[1].arguments,- serde_json::json!({"message": "retry"})- );- drop(outcomes);-- let recorded = failure_map.lock().expect("failure lookup");- assert_eq!(recorded.len(), 2, "same tool names cannot overwrite calls");- assert_eq!(recorded["echo-success"].0, true);- assert_eq!(recorded["echo-failure"].0, false);- assert!(recorded["echo-failure"].1.is_some());- }-}+#[path = "tool_outcome_capture_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rsindex 87623380a2..f0325fb438 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_outcome_capture_tests.rs@@ -15,6 +15,16 @@ async fn same_tool_calls_keep_completion_and_failure_records_by_call_id() {let middleware = ToolOutcomeCaptureMiddleware::new(sink.clone(), failure_map.clone());let mut ctx = context();+ let mut success_call = tinyinference_llm::tool::ToolCall {+ id: "echo-success".into(),+ name: "echo".into(),+ arguments: serde_json::json!({"message": "hello"}),+ invalid: None,+ };+ middleware+ .before_tool(&mut ctx, &(), &mut success_call)+ .await+ .expect("start metadata is captured");let success = ToolInvocationIdentity::new("echo-success", "echo");let mut success_result = TaToolResult::success("done");middleware@@ -22,6 +32,16 @@ async fn same_tool_calls_keep_completion_and_failure_records_by_call_id() {.await.expect("successful result is captured");+ let mut failure_call = tinyinference_llm::tool::ToolCall {+ id: "echo-failure".into(),+ name: "echo".into(),+ arguments: serde_json::json!({"message": "retry"}),+ invalid: None,+ };+ middleware+ .before_tool(&mut ctx, &(), &mut failure_call)+ .await+ .expect("start metadata is captured");let failure = ToolInvocationIdentity::new("echo-failure", "echo");let mut failure_result = TaToolResult::error("request timed out");middleware@@ -33,13 +53,21 @@ async fn same_tool_calls_keep_completion_and_failure_records_by_call_id() {assert_eq!(outcomes.len(), 2);assert_eq!(outcomes[0].call_id, "echo-success");assert!(outcomes[0].success);+ assert_eq!(+ outcomes[0].arguments,+ serde_json::json!({"message": "hello"})+ );assert_eq!(outcomes[1].call_id, "echo-failure");assert!(!outcomes[1].success);+ assert_eq!(+ outcomes[1].arguments,+ serde_json::json!({"message": "retry"})+ );drop(outcomes);let recorded = failure_map.lock().expect("failure lookup");assert_eq!(recorded.len(), 2, "same tool names cannot overwrite calls");- assert!(recorded["echo-success"].0);- assert!(!recorded["echo-failure"].0);+ assert_eq!(recorded["echo-success"].0, true);+ assert_eq!(recorded["echo-failure"].0, false);assert!(recorded["echo-failure"].1.is_some());}diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rsindex 18c332cc00..8d5539687b 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs@@ -525,52 +525,5 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext> for Han}#[cfg(test)]-mod tests {- use super::*;- use tinyagents_harness::context::RunConfig;-- #[tokio::test]- async fn transcript_snapshot_keeps_a_completed_failed_tool_row() {- let sink = Arc::new(std::sync::Mutex::new(TranscriptSnapshot::default()));- let middleware = TranscriptSnapshotMiddleware {- sink: sink.clone(),- started: Default::default(),- };- let mut context = RunContext::new(- RunConfig::new("snapshot-tool-outcome"),- crate::agent::tinyagents::host::OpenHumanRunContext::new(),- );- let mut call = tinyinference_llm::tool::ToolCall {- id: "failed-call".into(),- name: "write_file".into(),- arguments: serde_json::json!({"path": "blocked.txt"}),- invalid: None,- };- middleware- .before_tool(&mut context, &(), &mut call)- .await- .expect("snapshot accepts tool start");- let invocation = ToolInvocationIdentity::new("failed-call", "write_file");- let mut result = TaToolResult::error("permission denied");- middleware- .after_tool(&mut context, &(), &invocation, &mut result)- .await- .expect("snapshot accepts tool completion");-- let snapshot = sink.lock().expect("snapshot");- assert_eq!(- snapshot.messages,- vec![Message::tool("failed-call", "permission denied")]- );- assert_eq!(snapshot.tool_outcomes.len(), 1);- let outcome = &snapshot.tool_outcomes[0];- assert_eq!(outcome.call_id, "failed-call");- assert_eq!(outcome.name, "write_file");- assert_eq!(- outcome.arguments,- serde_json::json!({"path": "blocked.txt"})- );- assert!(!outcome.success);- assert_eq!(outcome.content, "permission denied");- }-}+#[path = "turn_context_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context_tests.rsnew file mode 100644index 0000000000..595694ed39--- /dev/null+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context_tests.rs@@ -0,0 +1,47 @@+use super::*;+use tinyagents_harness::context::RunConfig;++#[tokio::test]+async fn transcript_snapshot_keeps_a_completed_failed_tool_row() {+ let sink = Arc::new(std::sync::Mutex::new(TranscriptSnapshot::default()));+ let middleware = TranscriptSnapshotMiddleware {+ sink: sink.clone(),+ started: Default::default(),+ };+ let mut context = RunContext::new(+ RunConfig::new("snapshot-tool-outcome"),+ crate::agent::tinyagents::host::OpenHumanRunContext::new(),+ );+ let mut call = tinyinference_llm::tool::ToolCall {+ id: "failed-call".into(),+ name: "write_file".into(),+ arguments: serde_json::json!({"path": "blocked.txt"}),+ invalid: None,+ };+ middleware+ .before_tool(&mut context, &(), &mut call)+ .await+ .expect("snapshot accepts tool start");+ let invocation = ToolInvocationIdentity::new("failed-call", "write_file");+ let mut result = TaToolResult::error("permission denied");+ middleware+ .after_tool(&mut context, &(), &invocation, &mut result)+ .await+ .expect("snapshot accepts tool completion");++ let snapshot = sink.lock().expect("snapshot");+ assert_eq!(+ snapshot.messages,+ vec![Message::tool("failed-call", "permission denied")]+ );+ assert_eq!(snapshot.tool_outcomes.len(), 1);+ let outcome = &snapshot.tool_outcomes[0];+ assert_eq!(outcome.call_id, "failed-call");+ assert_eq!(outcome.name, "write_file");+ assert_eq!(+ outcome.arguments,+ serde_json::json!({"path": "blocked.txt"})+ );+ assert!(!outcome.success);+ assert_eq!(outcome.content, "permission denied");+}diff --git a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rsindex 0825d84395..ee790cc721 100644--- a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs+++ b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder.rs@@ -313,97 +313,5 @@ impl Drop for SteeringForwarderGuard {}#[cfg(test)]-mod tests {- use super::*;- use tinyagents_harness::context::{RunConfig, RunContext};- use tinyagents_harness::runtime::AgentHarness;- use tinyagents_harness::testkit::ScriptedModel;-- #[tokio::test]- async fn residual_collect_requeues_to_its_original_lane() {- let queue = Arc::new(RunQueue::new());- let handle = SteeringHandle::allow_all();- let guard = SteeringForwarderGuard::new(- handle.clone(),- Some(queue.clone()),- None,- "thread-test".to_string(),- );- handle.send(SteeringCommand::InjectMessage(TaMessage::user(format!(- "{COLLECT_PREFIX}recovered context"- ))));-- drop(guard);- tokio::time::timeout(Duration::from_secs(1), async {- loop {- if queue.status().await.collects == 1 {- return;- }- tokio::task::yield_now().await;- }- })- .await- .expect("residual collect should be requeued before timeout");-- assert!(queue.drain(QueueLane::Steer).await.is_empty());- let recovered = queue.drain(QueueLane::Collect).await;- assert_eq!(recovered.len(), 1);- assert_eq!(recovered[0].text, "recovered context");- }-- #[tokio::test]- async fn collect_reaches_the_next_model_boundary_as_additional_context() {- let queue = Arc::new(RunQueue::new());- queue- .push(- QueueLane::Collect,- crate::agent::queued_turn::QueuedTurn {- text: "the deployment finished successfully".to_string(),- client_id: "client-test".to_string(),- thread_id: "thread-test".to_string(),- queued_at_ms: 1,- model_override: None,- temperature: None,- locale: None,- },- )- .await;- let handle = SteeringHandle::allow_all();-- // This is the OpenHuman bridge at the safe boundary immediately before- // a harness model call. The assertion below observes the actual model- // request, not just queue status or the steering handle's contents.- forward_collects(&queue, &handle, "thread-test").await;-- let model = Arc::new(ScriptedModel::replies(vec!["done"]));- let mut harness: AgentHarness<()> = AgentHarness::new();- harness- .register_model("scripted", model.clone())- .set_default_model("scripted");- harness- .invoke_in_context(- &(),- RunContext::new(RunConfig::new("collect-boundary"), ()).with_steering(handle),- vec![TaMessage::user("start")],- )- .await- .expect("collect-context run should complete");-- let requests = model.requests();- assert_eq!(requests.len(), 1, "one model boundary should be crossed");- let collect = requests[0]- .messages- .iter()- .find(|message| message.text().contains("deployment finished successfully"))- .expect("the next model request should contain the collected context");- assert!(matches!(collect, TaMessage::User(_)));- assert_eq!(- collect.text(),- "[Additional context from user]: the deployment finished successfully"- );- assert!(- !collect.text().starts_with(STEER_PREFIX),- "collect must be context, not a steering instruction"- );- }-}+#[path = "steering_forwarder_tests.rs"]+mod tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/steering_forwarder_tests.rs b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder_tests.rsnew file mode 100644index 0000000000..73c864c169--- /dev/null+++ b/crates/openhuman-core/src/agent/tinyagents/steering_forwarder_tests.rs@@ -0,0 +1,84 @@+use super::*;+use tinyagents_harness::context::{RunConfig, RunContext};+use tinyagents_harness::runtime::AgentHarness;+use tinyagents_harness::testkit::ScriptedModel;++#[tokio::test]+async fn residual_collect_requeues_to_its_original_lane() {+ let queue = Arc::new(RunQueue::new());+ let handle = SteeringHandle::allow_all();+ let guard = SteeringForwarderGuard::new(+ handle.clone(),+ Some(queue.clone()),+ None,+ "thread-test".to_string(),+ );+ handle.send(SteeringCommand::InjectMessage(TaMessage::user(format!(+ "{COLLECT_PREFIX}recovered context"+ ))));+ drop(guard);+ tokio::time::timeout(Duration::from_secs(1), async {+ loop {+ if queue.status().await.collects == 1 {+ return;+ }+ tokio::task::yield_now().await;+ }+ })+ .await+ .expect("residual collect should be requeued before timeout");+ assert!(queue.drain(QueueLane::Steer).await.is_empty());+ let recovered = queue.drain(QueueLane::Collect).await;+ assert_eq!(recovered.len(), 1);+ assert_eq!(recovered[0].text, "recovered context");+}++#[tokio::test]+async fn collect_reaches_the_next_model_boundary_as_additional_context() {+ let queue = Arc::new(RunQueue::new());+ queue+ .push(+ QueueLane::Collect,+ crate::agent::queued_turn::QueuedTurn {+ text: "the deployment finished successfully".to_string(),+ client_id: "client-test".to_string(),+ thread_id: "thread-test".to_string(),+ queued_at_ms: 1,+ model_override: None,+ temperature: None,+ locale: None,+ },+ )+ .await;+ let handle = SteeringHandle::allow_all();+ forward_collects(&queue, &handle, "thread-test").await;+ let model = Arc::new(ScriptedModel::replies(vec!["done"]));+ let mut harness: AgentHarness<()> = AgentHarness::new();+ harness+ .register_model("scripted", model.clone())+ .set_default_model("scripted");+ harness+ .invoke_in_context(+ &(),+ RunContext::new(RunConfig::new("collect-boundary"), ()).with_steering(handle),+ vec![TaMessage::user("start")],+ )+ .await+ .expect("collect-context run should complete");+ let requests = model.requests();+ assert_eq!(requests.len(), 1, "one model boundary should be crossed");+ let collect = requests[0]+ .messages+ .iter()+ .find(|message| message.text().contains("deployment finished successfully"))+ .expect("the next model request should contain the collected context");+ assert!(matches!(collect, TaMessage::User(_)));+ assert_eq!(+ collect.text(),+ "[Additional context from user]: the deployment finished successfully"+ );+ assert!(+ !collect.text().starts_with(STEER_PREFIX),+ "collect must be context, not a steering instruction"+ );+}diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rsindex ce333b663b..5ca2e571b8 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner.rs@@ -4,21 +4,13 @@//! sub-agent routes use; [`run_turn_via_tinyagents`] is a thin test-only//! variant with no middleware stack.-#[cfg(test)]-use crate::agent::tinyagents::model::ProfileOverrideModel;-#[cfg(test)]-use crate::agent::tinyagents::model::TurnChatModel;-#[cfg(test)]-use crate::agent::tinyagents::turn_policy::run_policy_for;use std::collections::HashSet;-use std::sync::{Arc, LazyLock};+use std::sync::Arc;use anyhow::Result;-use async_trait::async_trait;use futures::StreamExt;use tinyagents_harness::agent_loop::AgentStreamItem;use tinyagents_harness::events::EventSink;-use tinyagents_harness::host::{ContextComposer, TurnContextRequest};use tinyagents_harness::runtime::{AgentHarness, AgentInvocation, AgentTurnRequest, InvocationRuntime,};@@ -49,163 +41,18 @@ use super::ToolPolicyEnforcement;/// are attached through an [`InvocationRuntime`] and [`AgentInvocation`] for/// each root. That prevents concurrent sessions from replacing one another's/// security or workspace state on a shared harness.-static ROOT_HOSTED_HARNESS: LazyLock<AgentHarness<(), OpenHumanRunContext>> =- LazyLock::new(AgentHarness::new);--fn root_hosted_harness() -> &'static AgentHarness<(), OpenHumanRunContext> {- &ROOT_HOSTED_HARNESS-}+#[path = "turn_runner_hosted.rs"]+mod turn_runner_hosted;+use turn_runner_hosted::{root_hosted_harness, PrecomposedRootContext};#[cfg(test)]#[path = "turn_runner_tests.rs"]mod tests;--/// Keeps the session's already-built system/context ladder authoritative while-/// still entering TinyAgents through its hosted invocation boundary. The-/// session request contains the frozen system prompt, prompt policy boundary,-/// context additions and provider-ready history; composing another prompt here-/// would duplicate it and move the cache prefix.-struct PrecomposedRootContext;--#[async_trait]-impl ContextComposer for PrecomposedRootContext {- async fn compose_system_prompt(- &self,- _request: &TurnContextRequest,- ) -> tinyagents_harness::Result<String> {- Ok(String::new())- }-- async fn preamble(- &self,- _request: &TurnContextRequest,- ) -> tinyagents_harness::Result<Vec<tinyinference_llm::message::Message>> {- Ok(Vec::new())- }-}--/// Drive an agent turn through the `tinyagents` agent-loop harness.-///-/// Registers `provider` as the default model and every entry in `resolved_tools`-/// as a harness tool, seeds the loop with `history`, and runs the loop bounded-/// by `max_iterations` model calls. Returns the final text plus the resulting-/// transcript translated back to openhuman [`ChatMessage`]s.#[cfg(test)]-pub(crate) async fn run_turn_via_tinyagents(- chat_model: TurnChatModel,- model: &str,- temperature: f64,- history: Vec<ChatMessage>,- resolved_tools: Vec<Arc<dyn tinytools::Tool>>,- max_iterations: usize,-) -> Result<TinyagentsTurnOutcome> {- // `0` means "unset" → the legacy default; otherwise the harness cap would be- // zero and the run would abort before the first model call.- let max_iterations = effective_max_iterations(max_iterations);- let mut harness: tinyagents_harness::runtime::AgentHarness<()> =- tinyagents_harness::runtime::AgentHarness::new();- // Thin test variant: no response cache (chat-safe default).- harness.with_policy(run_policy_for(max_iterations, false));- let profile = chat_model.profile().cloned().unwrap_or_default();- let chat_model: TurnChatModel = Arc::new(- ProfileOverrideModel::new(chat_model, profile)- .with_request_model(model)- .with_request_temperature(temperature),- );- let error_slot = Arc::new(std::sync::Mutex::new(None));- harness- .register_model(model, chat_model)- .set_default_model(model);- let tool_count = resolved_tools.len();- for tool in resolved_tools {- harness.register_tool(tool);- }-- // Bound the run: one model call per legacy "iteration", and allow generous- // tool calls (the loop also stops when the model stops requesting tools).- let config = crate::agent::tinyagents::host::run_context::fresh_root_run_config("agent-turn")- .with_max_model_calls(max_iterations)- .with_max_tool_calls(max_iterations.saturating_mul(8).max(8))- .with_max_depth(MAX_SPAWN_DEPTH)- .with_tag("openhuman")- .with_tag("scope:root")- .with_tag("unobserved");-- tracing::info!(- model,- max_iterations,- tools = tool_count,- "[tinyagents] routing agent turn through tinyagents harness"- );-- let input = crate::agent::message_convert::history_to_messages(&history);- // Explicit persistence boundary (issue #4455): the request transcript length,- // captured *before* the run consumes `input`. Everything the harness appends- // after this index — assistant/tool rounds plus any mid-turn steer messages —- // is this turn's persisted `conversation`. Anchoring on this index instead of- // the last-user-message suffix keeps injected steers (which move that- // boundary) from truncating persisted history.- let request_base_len = input.len();- // Box the (large) harness drive future — see `run_turn_via_tinyagents_shared`.- let run = match Box::pin(harness.invoke(&(), (), config, input)).await {- Ok(run) => run,- Err(e) => {- // #4469 item 3: recover from a poisoned slot instead of panicking.- // A thread that panicked mid-run while holding this mutex would- // otherwise turn every subsequent error-recovery read into a second- // panic, masking the original provider failure. `into_inner` yields- // the guarded value regardless of poison so we still re-surface the- // typed error.- if let Some(original) = error_slot- .lock()- .unwrap_or_else(std::sync::PoisonError::into_inner)- .take()- {- return Err(original);- }- return Err(anyhow::anyhow!("tinyagents harness run failed: {e}"));- }- };-- let text = run.text().unwrap_or_default();- let out_history = crate::agent::message_convert::messages_to_history(&run.messages);- let conversation = crate::agent::message_convert::messages_to_conversation(- crate::agent::message_convert::messages_since_request(&run.messages, request_base_len),- );- tracing::debug!(- request_base_len,- transcript_len = run.messages.len(),- persisted_messages = run.messages.len().saturating_sub(request_base_len),- "[tinyagents] persisting post-request transcript (thin path; steer-safe boundary)"- );-- Ok(TinyagentsTurnOutcome {- text,- resolved_route: None,- history: out_history,- conversation,- model_calls: run.model_calls,- tool_calls: run.tool_calls,- input_tokens: run.usage.usage.input_tokens,- output_tokens: run.usage.usage.output_tokens,- cached_input_tokens: run.usage.usage.cache_read_tokens,- charged_amount_usd: crate::platform::cost::catalog::estimate_cost_usd(- model,- run.usage.usage.input_tokens,- run.usage.usage.output_tokens,- run.usage.usage.cache_read_tokens,- ),- early_exit_tool: None,- hit_cap: false,- // The thin (test-only) variant installs no middleware, so nothing could- // have injected a conclusion.- wrap_up_injected: false,- // This thin (test-only) variant does not install the breaker middleware.- breaker_halt: None,- // This thin variant carries no per-call outcome capture middleware.- tool_outcomes: Vec::new(),- })-}+#[path = "turn_runner_thin.rs"]+mod thin;+#[cfg(test)]+pub(crate) use thin::run_turn_via_tinyagents;/// Drive a turn through the tinyagents harness over the routes' **shared**,/// `Arc`-owned tool registry sets (`Arc<Vec<Box<dyn Tool>>>`), advertisingdiff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner_hosted.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner_hosted.rsnew file mode 100644index 0000000000..8063f3323b--- /dev/null+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner_hosted.rs@@ -0,0 +1,36 @@+//! Process-shared hosted harness used only for root agent invocations.++use async_trait::async_trait;+use std::sync::LazyLock;+use tinyagents_harness::host::{ContextComposer, TurnContextRequest};+use tinyagents_harness::runtime::AgentHarness;++use crate::agent::tinyagents::host::OpenHumanRunContext;++static ROOT_HOSTED_HARNESS: LazyLock<AgentHarness<(), OpenHumanRunContext>> =+ LazyLock::new(AgentHarness::new);++pub(super) fn root_hosted_harness() -> &'static AgentHarness<(), OpenHumanRunContext> {+ &ROOT_HOSTED_HARNESS+}++/// Keeps the session's already-built system/context ladder authoritative when+/// crossing the hosted invocation boundary.+pub(super) struct PrecomposedRootContext;++#[async_trait]+impl ContextComposer for PrecomposedRootContext {+ async fn compose_system_prompt(+ &self,+ _: &TurnContextRequest,+ ) -> tinyagents_harness::Result<String> {+ Ok(String::new())+ }++ async fn preamble(+ &self,+ _: &TurnContextRequest,+ ) -> tinyagents_harness::Result<Vec<tinyinference_llm::message::Message>> {+ Ok(Vec::new())+ }+}diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_runner_thin.rs b/crates/openhuman-core/src/agent/tinyagents/turn_runner_thin.rsnew file mode 100644index 0000000000..10826d51c7--- /dev/null+++ b/crates/openhuman-core/src/agent/tinyagents/turn_runner_thin.rs@@ -0,0 +1,94 @@+//! Test-only thin harness drive, kept separate from the production runner.++use super::*;+use crate::agent::tinyagents::model::{ProfileOverrideModel, TurnChatModel};+use crate::agent::tinyagents::turn_policy::run_policy_for;++pub(crate) async fn run_turn_via_tinyagents(+ chat_model: TurnChatModel,+ model: &str,+ temperature: f64,+ history: Vec<ChatMessage>,+ resolved_tools: Vec<Arc<dyn tinytools::Tool>>,+ max_iterations: usize,+) -> Result<TinyagentsTurnOutcome> {+ let max_iterations = effective_max_iterations(max_iterations);+ let mut harness: tinyagents_harness::runtime::AgentHarness<()> =+ tinyagents_harness::runtime::AgentHarness::new();+ harness.with_policy(run_policy_for(max_iterations, false));+ let profile = chat_model.profile().cloned().unwrap_or_default();+ let chat_model: TurnChatModel = Arc::new(+ ProfileOverrideModel::new(chat_model, profile)+ .with_request_model(model)+ .with_request_temperature(temperature),+ );+ let error_slot = Arc::new(std::sync::Mutex::new(None));+ harness+ .register_model(model, chat_model)+ .set_default_model(model);+ let tool_count = resolved_tools.len();+ for tool in resolved_tools {+ harness.register_tool(tool);+ }+ let config = crate::agent::tinyagents::host::run_context::fresh_root_run_config("agent-turn")+ .with_max_model_calls(max_iterations)+ .with_max_tool_calls(max_iterations.saturating_mul(8).max(8))+ .with_max_depth(MAX_SPAWN_DEPTH)+ .with_tag("openhuman")+ .with_tag("scope:root")+ .with_tag("unobserved");+ tracing::info!(+ model,+ max_iterations,+ tools = tool_count,+ "[tinyagents] routing agent turn through tinyagents harness"+ );+ let input = crate::agent::message_convert::history_to_messages(&history);+ let request_base_len = input.len();+ let run = match Box::pin(harness.invoke(&(), (), config, input)).await {+ Ok(run) => run,+ Err(error) => {+ if let Some(original) = error_slot+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .take()+ {+ return Err(original);+ }+ return Err(anyhow::anyhow!("tinyagents harness run failed: {error}"));+ }+ };+ let text = run.text().unwrap_or_default();+ let out_history = crate::agent::message_convert::messages_to_history(&run.messages);+ let conversation = crate::agent::message_convert::messages_to_conversation(+ crate::agent::message_convert::messages_since_request(&run.messages, request_base_len),+ );+ tracing::debug!(+ request_base_len,+ transcript_len = run.messages.len(),+ persisted_messages = run.messages.len().saturating_sub(request_base_len),+ "[tinyagents] persisting post-request transcript (thin path; steer-safe boundary)"+ );+ Ok(TinyagentsTurnOutcome {+ text,+ resolved_route: None,+ history: out_history,+ conversation,+ model_calls: run.model_calls,+ tool_calls: run.tool_calls,+ input_tokens: run.usage.usage.input_tokens,+ output_tokens: run.usage.usage.output_tokens,+ cached_input_tokens: run.usage.usage.cache_read_tokens,+ charged_amount_usd: crate::platform::cost::catalog::estimate_cost_usd(+ model,+ run.usage.usage.input_tokens,+ run.usage.usage.output_tokens,+ run.usage.usage.cache_read_tokens,+ ),+ early_exit_tool: None,+ hit_cap: false,+ wrap_up_injected: false,+ breaker_halt: None,+ tool_outcomes: Vec::new(),+ })+}diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjsindex 4687996b28..8824fd0e16 100644--- a/scripts/ci/check-openhuman-rust-layout.mjs+++ b/scripts/ci/check-openhuman-rust-layout.mjs@@ -20,7 +20,6 @@ const LEGACY_LIMITS = new Map([// state moved to tinyagents-runtime; this remaining composition is split in// a follow-up without reintroducing an old harness/session exception.["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 1245],- ["crates/openhuman-core/src/agent/harness/subagent_runner/ops/runner.rs", 1769],["crates/openhuman-core/src/tools/ops.rs", 1502],["crates/openhuman-core/src/web_chat/progress_bridge.rs", 1547],]);