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, plan review, and rpc modules
Steven Enamakelc7f3781c4a14
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rsindex 87fa33a1ed..2c410c5cf1 100644--- a/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs+++ b/crates/openhuman-core/src/agent/tinyagents/turn_middleware.rs@@ -17,14 +17,14 @@ use async_trait::async_trait;use tinyagents_harness::cache::InMemoryResponseCache;use tinyagents_harness::host::security_gate::{GateDecision, SecurityGate, ToolCallRequest};use tinyagents_harness::middleware::{- ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits, BudgetMiddleware,- ContextCompressionMiddleware, MiddlewareToolOutcome, PromptCacheGuardMiddleware,- RepeatProgressMiddleware, RunModeHandle, ToolHandler, ToolMiddleware,- ToolPolicyMiddleware as TaToolPolicyMiddleware, plan_mode_middleware,+ install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup, ResearchBudgetMiddleware,+ ShellTurnBudget, TurnClockMiddleware, DIRECT_WEB_READ_LIMIT,};use tinyagents_harness::middleware::{- DIRECT_WEB_READ_LIMIT, ResearchBudgetMiddleware, ShellTurnBudget, TurnClockMiddleware,- install_unmet_deliverable, is_repeat_call_exempt, tool_sets_lookup,+ plan_mode_middleware, ApprovalGateMiddleware, ArgRecoveryMiddleware, BudgetLimits,+ BudgetMiddleware, ContextCompressionMiddleware, MiddlewareToolOutcome,+ PromptCacheGuardMiddleware, RepeatProgressMiddleware, RunModeHandle, ToolHandler,+ ToolMiddleware, ToolPolicyMiddleware as TaToolPolicyMiddleware,};use tinyagents_harness::runtime::AgentHarness;use tinyagents_harness::steering::SteeringHandle;diff --git a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rsindex 7a8abb4e20..78338d0fe3 100644--- a/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs+++ b/crates/openhuman-core/src/agent/tools/plan_exit_tests.rs@@ -1,4 +1,4 @@-use crate::agent::tools::{PLAN_EXIT_MARKER, plan_exit::plan_exit_tool};+use crate::agent::tools::{plan_exit::plan_exit_tool, PLAN_EXIT_MARKER};use serde_json::json;use tinyagents_harness_tools::plan_review::{PlanReviewRequest, PlanReviewResolution};use tinytools::{PermissionLevel, Tool, ToolCallOptions, ToolRunContext};@@ -82,16 +82,14 @@ async fn plan_exit_does_not_flip_while_a_review_is_parked() {// Resolve the parked review so the spawned task and the gate's// bookkeeping don't leak past this test.- assert!(- crate::plan_review::host::global().decide_by_thread(- &crate::core::runtime::DispatchCtx::ambient()- .tenant()- .unwrap()- .profile_only(),- thread_id,- PlanReviewResolution::Approve,- )- );+ assert!(crate::plan_review::host::global().decide_by_thread(+ &crate::core::runtime::DispatchCtx::ambient()+ .tenant()+ .unwrap()+ .profile_only(),+ thread_id,+ PlanReviewResolution::Approve,+ ));let resolution = parked.await.unwrap();assert_eq!(resolution, PlanReviewResolution::Approve);diff --git a/crates/openhuman-core/src/plan_review/schemas.rs b/crates/openhuman-core/src/plan_review/schemas.rsindex bf57d22457..14ca397bea 100644--- a/crates/openhuman-core/src/plan_review/schemas.rs+++ b/crates/openhuman-core/src/plan_review/schemas.rs@@ -2,8 +2,8 @@//! resolves a parked interactive turn (approve / reject / revise-with-feedback).use crate::core::runtime::DispatchCtx;-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::core::all::{ControllerFuture, RegisteredController};@@ -53,7 +53,8 @@ pub fn schemas(function: &str) -> ControllerSchema {outputs: vec![FieldSchema {name: "resolved",ty: TypeSchema::Bool,- comment: "true if a parked turn was woken; false if the request was unknown/expired.",+ comment:+ "true if a parked turn was woken; false if the request was unknown/expired.",required: true,}],},diff --git a/crates/openhuman-core/src/threads/run_mode.rs b/crates/openhuman-core/src/threads/run_mode.rsindex 358efa6637..f749d9d38c 100644--- a/crates/openhuman-core/src/threads/run_mode.rs+++ b/crates/openhuman-core/src/threads/run_mode.rs@@ -72,8 +72,8 @@ pub fn parse_mode_label(label: &str) -> Option<RunMode> {// `schemas.rs` because this module IS the domain's entire surface (registry// + RPC), not a multi-file domain directory.-use serde::Deserialize;use serde::de::DeserializeOwned;+use serde::Deserialize;use serde_json::{Map, Value};use crate::core::all::{ControllerFuture, RegisteredController};diff --git a/crates/openhuman-rpc/src/server/socketio.rs b/crates/openhuman-rpc/src/server/socketio.rsindex 05d2cf3035..68d60337e0 100644--- a/crates/openhuman-rpc/src/server/socketio.rs+++ b/crates/openhuman-rpc/src/server/socketio.rs@@ -1214,10 +1214,8 @@ fn replay_parked_plan_review(socket: &SocketRef, thread_id: &str) {let Some(tenant) = socket.extensions.get::<SocketTenant>() else {return;};- let Some(row) = crate::core_host::agent::plan_review::parked_review_for_socket(- &tenant.0,- thread_id,- )+ let Some(row) =+ crate::core_host::agent::plan_review::parked_review_for_socket(&tenant.0, thread_id)else {return;};diff --git a/crates/openhuman-rpc/src/server/socketio_tests.rs b/crates/openhuman-rpc/src/server/socketio_tests.rsindex d48d1a7e8c..14ede612b5 100644--- a/crates/openhuman-rpc/src/server/socketio_tests.rs+++ b/crates/openhuman-rpc/src/server/socketio_tests.rs@@ -7,8 +7,7 @@ use super::{#[tokio::test]async fn socket_connect_reads_dispatch_context_from_request_extensions_after_spawn() {let dispatch = crate::core_host::core::runtime::DispatchCtx::process_default();- let expected =- crate::core_host::agent::plan_review::socket_scope_for_dispatch(&dispatch);+ let expected = crate::core_host::agent::plan_review::socket_scope_for_dispatch(&dispatch);let mut extensions = axum::http::Extensions::new();extensions.insert(dispatch);