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
style: apply rustfmt formatting across agent_runs
Steven Enamakel77ba717516fc
diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown.rs b/crates/openhuman-core/src/agent_runs/context_breakdown.rsindex f24d24ed2d..20b8a706a0 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown.rs@@ -17,11 +17,11 @@ use std::sync::Mutex;use once_cell::sync::Lazy;use serde::{Deserialize, Serialize};-use crate::agent::debug::prompt_size::{PromptSizeReport, SectionSize, ToolSize};use crate::agent::debug::DumpPromptOptions;+use crate::agent::debug::prompt_size::{PromptSizeReport, SectionSize, ToolSize};use crate::config::Config;-use crate::core::runtime::DispatchCtx;use crate::core::Outcome;+use crate::core::runtime::DispatchCtx;/// Default agent whose prompt is measured when the caller names none — the/// one every main chat turn actually runs under.diff --git a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rsindex bd56098035..b3d1136146 100644--- a/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs+++ b/crates/openhuman-core/src/agent_runs/context_breakdown_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::agent::debug::prompt_size::PromptSizeReport;use crate::agent::debug::DumpedPrompt;+use crate::agent::debug::prompt_size::PromptSizeReport;fn sample_dump() -> DumpedPrompt {DumpedPrompt {diff --git a/crates/openhuman-core/src/agent_runs/mod.rs b/crates/openhuman-core/src/agent_runs/mod.rsindex 2cd73fe83a..ddfec2df43 100644--- a/crates/openhuman-core/src/agent_runs/mod.rs+++ b/crates/openhuman-core/src/agent_runs/mod.rs@@ -9,9 +9,24 @@ pub(crate) mod subagent_control;pub(crate) mod workflow_runs;pub(crate) mod worktree_schemas;-pub(crate) use agent_teams::{all_agent_team_controller_schemas, all_agent_team_registered_controllers};-pub(crate) use command_center::{all_command_center_controller_schemas, all_command_center_registered_controllers};-pub(crate) use schemas::{all_controller_schemas as all_agent_controller_schemas, all_registered_controllers as all_agent_registered_controllers};-pub(crate) use subagent_control::{all_controller_schemas as all_subagent_control_controller_schemas, all_registered_controllers as all_subagent_control_registered_controllers};-pub(crate) use workflow_runs::{all_workflow_run_controller_schemas, all_workflow_run_registered_controllers};-pub(crate) use worktree_schemas::{all_controller_schemas as all_worktree_controller_schemas, all_registered_controllers as all_worktree_registered_controllers};+pub(crate) use agent_teams::{+ all_agent_team_controller_schemas, all_agent_team_registered_controllers,+};+pub(crate) use command_center::{+ all_command_center_controller_schemas, all_command_center_registered_controllers,+};+pub(crate) use schemas::{+ all_controller_schemas as all_agent_controller_schemas,+ all_registered_controllers as all_agent_registered_controllers,+};+pub(crate) use subagent_control::{+ all_controller_schemas as all_subagent_control_controller_schemas,+ all_registered_controllers as all_subagent_control_registered_controllers,+};+pub(crate) use workflow_runs::{+ all_workflow_run_controller_schemas, all_workflow_run_registered_controllers,+};+pub(crate) use worktree_schemas::{+ all_controller_schemas as all_worktree_controller_schemas,+ all_registered_controllers as all_worktree_registered_controllers,+};diff --git a/crates/openhuman-core/src/agent_runs/replay/ops.rs b/crates/openhuman-core/src/agent_runs/replay/ops.rsindex 7ddf2913ca..2f5df5d753 100644--- a/crates/openhuman-core/src/agent_runs/replay/ops.rs+++ b/crates/openhuman-core/src/agent_runs/replay/ops.rs@@ -7,8 +7,8 @@use std::path::Path;use tinyagents_harness::events::HarnessRunStatus;-use tinyagents_harness::observability::replay::{self, RunEventsPage};use tinyagents_harness::observability::StoreEventJournal;+use tinyagents_harness::observability::replay::{self, RunEventsPage};/// Paged late-attach replay reader over the durable journal under `workspace`.pub(crate) async fn read_run_events_page(diff --git a/crates/openhuman-core/src/agent_runs/replay/schemas.rs b/crates/openhuman-core/src/agent_runs/replay/schemas.rsindex 49542d262f..75c5e3dc62 100644--- a/crates/openhuman-core/src/agent_runs/replay/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/replay/schemas.rs@@ -113,8 +113,7 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_events" => ControllerSchema {namespace: NAMESPACE,function: "run_events",- description:- "Read-only paged replay of a durable agent run's event stream (late-attach \+ description: "Read-only paged replay of a durable agent run's event stream (late-attach \reconnect/backfill). Returns AgentObservations at offset >= `offset` in order, \plus `next_offset` (null once drained). Never mutates state.",inputs: vec![@@ -156,8 +155,7 @@ fn replay_schema(function: &str) -> ControllerSchema {"run_status" => ControllerSchema {namespace: NAMESPACE,function: "run_status",- description:- "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \+ description: "Read-only latest durable status snapshot (HarnessRunStatus) for a run, or null \when the run is unknown. Counters/phase/usage/cost only — never prompts or \payloads.",inputs: vec![FieldSchema {@@ -176,8 +174,7 @@ fn replay_schema(function: &str) -> ControllerSchema {"runs_active" => ControllerSchema {namespace: NAMESPACE,function: "runs_active",- description:- "Read-only listing of active (pending/running/interrupted) agent runs, optionally \+ description: "Read-only listing of active (pending/running/interrupted) agent runs, optionally \filtered by `thread_id` and/or `root_run_id`. Never mutates state.",inputs: vec![FieldSchema {diff --git a/crates/openhuman-core/src/agent_runs/schemas.rs b/crates/openhuman-core/src/agent_runs/schemas.rsindex 8535a86f73..92ac8217ca 100644--- a/crates/openhuman-core/src/agent_runs/schemas.rs+++ b/crates/openhuman-core/src/agent_runs/schemas.rs@@ -1,11 +1,11 @@use crate::core::runtime::DispatchCtx;-use serde::de::DeserializeOwned;use serde::Deserialize;+use serde::de::DeserializeOwned;use serde_json::{Map, Value};use crate::config::rpc as config_rpc;-use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::Outcome;+use crate::core::all::{ControllerFuture, RegisteredController};use crate::core::{ControllerSchema, FieldSchema, TypeSchema};/// Params for `agent.chat` and `agent.chat_simple`.@@ -136,8 +136,7 @@ pub fn schemas(function: &str) -> ControllerSchema {"list_definitions" => ControllerSchema {namespace: "agent",function: "list_definitions",- description:- "List safe display metadata for sub-agent definitions in the global registry.",+ description: "List safe display metadata for sub-agent definitions in the global registry.",inputs: vec![],outputs: vec![json_output("definitions",@@ -554,7 +553,7 @@ fn handle_graph_topologies(_ctx: DispatchCtx, _params: Map<String, Value>) -> Cofn local_catalog_models_from_config(config: &crate::config::Config,) -> Vec<crate::platform::cost::catalog::LocalCatalogModel> {- use tinyinference_local::profile::{profile_for_kind, LocalProviderKind, ToolSupport};+ use tinyinference_local::profile::{LocalProviderKind, ToolSupport, profile_for_kind};config.model_registry@@ -690,8 +689,9 @@ fn handle_registry_snapshot(ctx: DispatchCtx, _params: Map<String, Value>) -> Cofn handle_context_breakdown(ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {Box::pin(async move {- let p =- deserialize_params::<crate::agent_runs::context_breakdown::ContextBreakdownParams>(params)?;+ let p = deserialize_params::<crate::agent_runs::context_breakdown::ContextBreakdownParams>(+ params,+ )?;to_json(crate::agent_runs::context_breakdown::context_breakdown(&ctx, p).await?)})}diff --git a/crates/openhuman-core/src/agent_runs/schemas_tests.rs b/crates/openhuman-core/src/agent_runs/schemas_tests.rsindex 7f4b7ca17d..9d9808e673 100644--- a/crates/openhuman-core/src/agent_runs/schemas_tests.rs+++ b/crates/openhuman-core/src/agent_runs/schemas_tests.rs@@ -1,6 +1,6 @@use super::*;-use crate::core::runtime::DispatchCtx;use crate::core::TypeSchema;+use crate::core::runtime::DispatchCtx;use serde_json::json;#[test]@@ -31,21 +31,26 @@ fn schemas_expose_expected_inputs_and_unknown_fallback() {assert_eq!(chat.namespace, "agent");assert_eq!(chat.inputs.len(), 5);assert!(matches!(chat.inputs[1].ty, TypeSchema::Option(_)));- assert!(chat- .inputs- .iter()- .any(|input| input.name == "thread_id" && !input.required));+ assert!(+ chat.inputs+ .iter()+ .any(|input| input.name == "thread_id" && !input.required)+ );let triage = schemas("triage_evaluate");assert_eq!(triage.inputs.len(), 7);- assert!(triage- .inputs- .iter()- .any(|input| input.name == "payload" && input.required));- assert!(triage- .inputs- .iter()- .any(|input| input.name == "dry_run" && !input.required));+ assert!(+ triage+ .inputs+ .iter()+ .any(|input| input.name == "payload" && input.required)+ );+ assert!(+ triage+ .inputs+ .iter()+ .any(|input| input.name == "dry_run" && !input.required)+ );let unknown = schemas("nope");assert_eq!(unknown.function, "unknown");@@ -92,11 +97,12 @@ async fn graph_topologies_handler_exports_structural_reports() {for g in graphs {assert!(g.get("name").and_then(Value::as_str).is_some());assert_eq!(g.get("ok").and_then(Value::as_bool), Some(true));- assert!(g- .get("mermaid")- .and_then(Value::as_str)- .unwrap()- .contains("flowchart"));+ assert!(+ g.get("mermaid")+ .and_then(Value::as_str)+ .unwrap()+ .contains("flowchart")+ );assert!(g.get("topology").map(|t| !t.is_null()).unwrap_or(false),"topology embeds as structured JSON"@@ -131,11 +137,13 @@ async fn reload_and_definition_handlers_cover_missing_registry_paths() {.await.expect("reload handler should always succeed");assert_eq!(reload.get("status").and_then(Value::as_str), Some("noop"));- assert!(reload- .get("note")- .and_then(Value::as_str)- .unwrap()- .contains("Restart"));+ assert!(+ reload+ .get("note")+ .and_then(Value::as_str)+ .unwrap()+ .contains("Restart")+ );let list_result = handle_list_definitions(DispatchCtx::process_default(), Map::new()).await;match list_result {