Skip to content

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

chore: apply rustfmt and import ordering across core

Steven Enamakelf254ae7a0799
diff --git a/crates/openhuman-core/src/agent/agent_tests.rs b/crates/openhuman-core/src/agent/agent_tests.rs
index 76c6b8d7d8..3a92465445 100644
--- a/crates/openhuman-core/src/agent/agent_tests.rs
+++ b/crates/openhuman-core/src/agent/agent_tests.rs
@@ -87,7 +87,11 @@ impl ChatModel<()> for ScriptedProvider {
} else {
guard.remove(0)
};
- Ok(crate::inference::provider::model::native_model_response_for_request(&response, &request))
+ Ok(
+ crate::inference::provider::model::native_model_response_for_request(
+ &response, &request,
+ ),
+ )
}
}
diff --git a/crates/openhuman-core/src/agent/agent_turn_loop_nudge_tests.rs b/crates/openhuman-core/src/agent/agent_turn_loop_nudge_tests.rs
index 9a613ec8c5..58348bb5f3 100644
--- a/crates/openhuman-core/src/agent/agent_turn_loop_nudge_tests.rs
+++ b/crates/openhuman-core/src/agent/agent_turn_loop_nudge_tests.rs
@@ -54,7 +54,11 @@ impl ChatModel<()> for RecordingProvider {
guard.remove(0)
}
};
- Ok(crate::inference::provider::model::native_model_response_for_request(&response, &request))
+ Ok(
+ crate::inference::provider::model::native_model_response_for_request(
+ &response, &request,
+ ),
+ )
}
}
diff --git a/crates/openhuman-core/src/agent/agent_turn_progress_release_tests.rs b/crates/openhuman-core/src/agent/agent_turn_progress_release_tests.rs
index 30cee5f455..ab26fb7c4d 100644
--- a/crates/openhuman-core/src/agent/agent_turn_progress_release_tests.rs
+++ b/crates/openhuman-core/src/agent/agent_turn_progress_release_tests.rs
@@ -33,10 +33,7 @@ async fn clearing_progress_after_a_turn_closes_the_receiver() {
// The turn's own events are still delivered, then the channel closes.
let mut saw_completed = false;
while let Some(event) = rx.recv().await {
- saw_completed |= matches!(
- event,
- crate::progress::AgentProgress::TurnCompleted { .. }
- );
+ saw_completed |= matches!(event, crate::progress::AgentProgress::TurnCompleted { .. });
}
assert!(saw_completed, "turn must still report TurnCompleted");
}
diff --git a/crates/openhuman-core/src/agent/bus.rs b/crates/openhuman-core/src/agent/bus.rs
index 578ef3ff41..6bf91bc2e4 100644
--- a/crates/openhuman-core/src/agent/bus.rs
+++ b/crates/openhuman-core/src/agent/bus.rs
@@ -20,13 +20,13 @@ use std::sync::Arc;
use tokio::sync::mpsc;
-use crate::progress::AgentProgress;
-use crate::security::turn_origin::{self, AgentTurnOrigin};
use crate::config::MultimodalConfig;
use crate::core::bus::BUS;
+use crate::progress::AgentProgress;
use crate::security::prompt_injection::{
PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,
};
+use crate::security::turn_origin::{self, AgentTurnOrigin};
use tinyagents_session::transcript::TranscriptMessage;
use tinytools::Tool;
diff --git a/crates/openhuman-core/src/agent/harness/fork_context.rs b/crates/openhuman-core/src/agent/harness/fork_context.rs
index 81f27c447b..cd0168cc8c 100644
--- a/crates/openhuman-core/src/agent/harness/fork_context.rs
+++ b/crates/openhuman-core/src/agent/harness/fork_context.rs
@@ -13,9 +13,9 @@
//! Stashed in `Arc`s so cloning into a child costs a refcount bump
//! rather than a full copy.
-use crate::progress::AgentProgress;
use crate::agent::tinyagents::TurnModelSource;
use crate::config::AgentConfig;
+use crate::progress::AgentProgress;
use std::collections::HashSet;
use std::path::PathBuf;
use std::sync::Arc;
diff --git a/crates/openhuman-core/src/agent/harness/graph.rs b/crates/openhuman-core/src/agent/harness/graph.rs
index fc323c62cb..0b5bf039e1 100644
--- a/crates/openhuman-core/src/agent/harness/graph.rs
+++ b/crates/openhuman-core/src/agent/harness/graph.rs
@@ -32,10 +32,10 @@ use std::sync::Arc;
use anyhow::Result;
use tokio::sync::mpsc::Sender;
-use crate::progress::AgentProgress;
use crate::agent::tinyagents::TurnModelSource;
use crate::agent::tinyagents::TurnSpec;
use crate::config::{MultimodalConfig, MultimodalFileConfig};
+use crate::progress::AgentProgress;
use tinyagents_session::transcript::TranscriptMessage;
use tinytools::Tool;
diff --git a/crates/openhuman-core/src/agent/mod.rs b/crates/openhuman-core/src/agent/mod.rs
index 1557e2f07b..667868086a 100644
--- a/crates/openhuman-core/src/agent/mod.rs
+++ b/crates/openhuman-core/src/agent/mod.rs
@@ -63,13 +63,6 @@ pub mod tinyagents;
pub mod tools;
/// Explicit per-turn host environment handed to the session an entry point runs.
pub mod turn_env;
-/// Turn-origin task-local — explicit trust/routing label scoped by every
-/// entry point that invokes the agent (web chat, channel runtime, cron,
-/// background jobs, CLI). Read by the approval gate to make
-/// origin-aware decisions rather than inferring trust from the absence of
-/// a chat approval context.
-pub mod turn_origin;
-
#[allow(unused_imports)]
pub use session_host::{
HostOnlyToolPolicy, HostTools, HostTurnTools, OpenHumanSessionHost, SessionHostBuilder,
diff --git a/crates/openhuman-core/src/agent/orchestration/delegation.rs b/crates/openhuman-core/src/agent/orchestration/delegation.rs
index 2b992ff8b1..b05a6777ff 100644
--- a/crates/openhuman-core/src/agent/orchestration/delegation.rs
+++ b/crates/openhuman-core/src/agent/orchestration/delegation.rs
@@ -17,13 +17,13 @@
use std::sync::Arc;
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,
};
use crate::agent::tinyagents::host::OpenHumanRunContext;
use crate::agent_registry::host_definition::AgentDefinition;
use crate::config::Config;
+use crate::progress::AgentProgress;
use tinyagents_graph::checkpoint::Checkpointer;
use tinyagents_graph::delegation::{
DelegationConfig, DelegationStage, DelegationStageOutput, DelegationState,
diff --git a/crates/openhuman-core/src/agent/orchestration/ops.rs b/crates/openhuman-core/src/agent/orchestration/ops.rs
index 339335422f..0fee059c85 100644
--- a/crates/openhuman-core/src/agent/orchestration/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/ops.rs
@@ -26,7 +26,6 @@ use super::types::{
AgentSnapshot, SpawnAgentRequest, SpawnAgentResponse, WaitAgentOptions, WaitAgentResponse,
};
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent,
};
@@ -34,6 +33,7 @@ use crate::agent::tinyagents::host::steering::shared_steering_registry;
use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
+use crate::progress::AgentProgress;
use std::collections::BTreeMap;
use std::sync::Arc;
use thiserror::Error;
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
index e20dae163a..4e6dee49ea 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents.rs
@@ -65,12 +65,12 @@ mod tests;
#[cfg(test)]
pub(crate) use cancel::prune;
#[cfg(test)]
-pub(crate) use cancel::{caller_workspace_in, CallerWorkspace};
+pub(crate) use cancel::{CallerWorkspace, caller_workspace_in};
pub(crate) use cancel::{
- cancel_all, cancel_by_session_in_workspace, cancel_by_task, cancel_for_thread, stop_for_thread,
- CancelledSubagent,
+ CancelledSubagent, cancel_all, cancel_by_session_in_workspace, cancel_by_task,
+ cancel_for_thread, stop_for_thread,
};
-pub(crate) use registry::{admit_spawn, register, status_channel, RegistrationError};
+pub(crate) use registry::{RegistrationError, admit_spawn, register, status_channel};
pub(crate) use resolve::{resume_ref_for_task_in_workspace, task_id_for_session_in_workspace};
pub(crate) use roster::active_subagents_context_block;
pub use steering::steer;
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs
index a696ed18d8..83b615775d 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents/steering.rs
@@ -2,7 +2,7 @@
use tinyagents_harness::ids::TaskId;
use tinyagents_harness::run_queue::QueueLane;
-use tinyagents_orchestration::subagent::{steer_detached, SteerAccess, SteerError};
+use tinyagents_orchestration::subagent::{SteerAccess, SteerError, steer_detached};
use super::cancel::now_ms;
use super::registry::{control_admits, owner_key, registry};
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
index ce377c2693..2a6ca43fa8 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
@@ -1,8 +1,8 @@
use super::*;
-use tinyagents_orchestration::subagent::SteerError;
use crate::core::runtime::DispatchCtx;
use crate::core::runtime::{ContextOverlay, CoreContext, DomainSet, Mode};
use crate::tools::toolpacks::ToolGroups;
+use tinyagents_orchestration::subagent::SteerError;
const CHILD: &str = "OPENHUMAN_DETACHED_TENANT_TEST_CHILD";
const PARENT: &str = "same-parent-session";
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
index ef89605ad0..0bb7487c40 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
@@ -13,8 +13,8 @@ use tokio::sync::mpsc::Sender;
use crate::agent::harness::fork_context::ParentExecutionContext;
use crate::agent::orchestration::worktree;
-use crate::progress::AgentProgress;
use crate::agent_registry::host_definition::AgentDefinition;
+use crate::progress::AgentProgress;
use tinyagents_definition::SandboxMode;
use super::staging::{
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
index 9a20442ff9..2503db5c40 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
@@ -15,7 +15,7 @@ use std::path::PathBuf;
use parking_lot::Mutex;
-use tinyagents_graph::parallel::{parse_relative_claim_paths, ClaimConflict, ClaimPathError};
+use tinyagents_graph::parallel::{ClaimConflict, ClaimPathError, parse_relative_claim_paths};
use tinyagents_orchestration::parallel::WorkerDispatchMode;
use tinyagents_orchestration::parallel::{
AdmissionPolicy, AdmissionVerdict, Plan, Preflight, Rejection, RejectionKind, Task,
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
index ec849e7e85..12e940fac2 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -9,12 +9,12 @@
//! appended to the conversation history.
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, continue_subagent, continue_subagent_with_parent,
load_subagent_checkpoint,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
+use crate::progress::AgentProgress;
use async_trait::async_trait;
use serde_json::json;
use std::sync::Arc;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
index e6d9d365d3..04ef30bf4b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
@@ -1,10 +1,10 @@
//! Subagent dispatch logic shared by all agent delegation tools.
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
+use crate::progress::AgentProgress;
use async_trait::async_trait;
use std::sync::Arc;
use tinyagents_harness::context::{RunConfig, RunContext};
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
index 02c451ca05..89ef2995c1 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
@@ -12,12 +12,12 @@ use crate::agent::orchestration::subagent_sessions::{
SubagentSessionUpsert,
};
use crate::agent::orchestration::tools::dispatch::incomplete_stop;
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::core::runtime::DispatchCtx;
+use crate::progress::AgentProgress;
use crate::threads::store::{self as conversations, ConversationMessage};
use async_trait::async_trait;
use serde_json::json;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
index 68c1114078..38a2cbbd72 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
@@ -13,12 +13,12 @@
//! prompt with a filtered tool list, on a cheaper model where applicable.
//!
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent_with_parent,
};
use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::core::runtime::DispatchCtx;
+use crate::progress::AgentProgress;
use crate::threads::store::{self as conversations, ConversationMessage, CreateConversationThread};
use async_trait::async_trait;
use serde_json::json;
diff --git a/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs b/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs
index a6e33e106a..ad90f79b4c 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/collector/span_lifecycle.rs
@@ -141,7 +141,10 @@ impl SpanCollector {
}
}
- pub(in crate::core::observability::progress_tracing) fn close_current_iteration(&mut self, end_unix_ms: u64) {
+ pub(in crate::core::observability::progress_tracing) fn close_current_iteration(
+ &mut self,
+ end_unix_ms: u64,
+ ) {
if let Some(index) = self.current_iteration_index.take() {
self.close_span(
index,
diff --git a/crates/openhuman-core/src/agent/progress_tracing/journal_replay.rs b/crates/openhuman-core/src/agent/progress_tracing/journal_replay.rs
index b7d957539c..29358c2e1c 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/journal_replay.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/journal_replay.rs
@@ -3,8 +3,8 @@
use tinyagents_harness::terminal::{TerminalClass, TerminalOutcome};
-use crate::progress::AgentProgress;
use crate::core::observability::progress_tracing::TurnOutcome;
+use crate::progress::AgentProgress;
/// One step applied to the [`super::SpanCollector`] while replaying a journal.
///
diff --git a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_tests.rs b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_tests.rs
index b438828881..033ae117d3 100644
--- a/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_tests.rs
+++ b/crates/openhuman-core/src/agent/progress_tracing/progress_tracing_tests.rs
@@ -1,8 +1,8 @@
//! Unit tests for the structured tracing export (issue #3886).
use super::*;
-use crate::progress::AgentProgress;
use crate::config::schema::{AgentTracingBackend, AgentTracingConfig, ObservabilityConfig};
+use crate::progress::AgentProgress;
fn ctx() -> TraceContext {
TraceContext::new("sess-42", Some("client-7".to_string()))
diff --git a/crates/openhuman-core/src/agent/prompts/builder.rs b/crates/openhuman-core/src/agent/prompts/builder.rs
index 0b7513258c..4b6c9e1561 100644
--- a/crates/openhuman-core/src/agent/prompts/builder.rs
+++ b/crates/openhuman-core/src/agent/prompts/builder.rs
@@ -51,9 +51,9 @@ impl TieredPrompt {
}
}
+use super::types::*;
use crate::prompts::sections::*;
use crate::prompts::sync_workspace_file;
-use super::types::*;
use anyhow::Result;
use std::path::Path;
diff --git a/crates/openhuman-core/src/agent/registration.rs b/crates/openhuman-core/src/agent/registration.rs
index 952d85a2e7..e5c0d3f4cd 100644
--- a/crates/openhuman-core/src/agent/registration.rs
+++ b/crates/openhuman-core/src/agent/registration.rs
@@ -5,10 +5,10 @@ use super::orchestration::tools::{
SpawnAsyncSubagentTool, SpawnParallelAgentsTool, SpawnSubagentTool, SteerSubagentTool,
WaitSubagentTool,
};
-#[cfg(feature = "skills")]
-use crate::skills::run_workflow::{AwaitWorkflowTool, RunWorkflowTool};
use super::tools::{PlanExitTool, TodoTool};
use crate::config::Config;
+#[cfg(feature = "skills")]
+use crate::skills::run_workflow::{AwaitWorkflowTool, RunWorkflowTool};
use std::path::Path;
use tinyagents_harness::tools as harness_tools;
use tinytools::Tool;
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index b8f9d8564b..15efa1e926 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -1,7 +1,6 @@
//! `OpenHumanSessionHost::from_config` factory methods and internal `build_session_agent_inner` constructor.
use super::should_synthesize_delegation_tools;
-use crate::modules::tinybox::host_runtime;
use crate::agent::prompts::SystemPromptBuilder;
use crate::agent::session_host::types::OpenHumanSessionHost;
use crate::agent_registry::host_definition::{
@@ -9,6 +8,7 @@ use crate::agent_registry::host_definition::{
};
use crate::config::Config;
use crate::core::runtime::DispatchCtx;
+use crate::modules::tinybox::host_runtime;
use crate::security::SecurityPolicy;
use crate::tools;
use anyhow::Result;
diff --git a/crates/openhuman-core/src/agent/session_host/mod.rs b/crates/openhuman-core/src/agent/session_host/mod.rs
index 7a41a7d936..733c9e1c81 100644
--- a/crates/openhuman-core/src/agent/session_host/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/mod.rs
@@ -52,7 +52,6 @@ mod turn;
// harness-assembly site has to name it. It stays the one definition — the whole
// point is that the in-loop conclusion and the out-of-band fallback ask for the
// same thing.
-pub(crate) mod turn_backstop;
pub(crate) mod turn_checkpoint;
mod types;
@@ -65,7 +64,6 @@ pub use types::{OpenHumanSessionHost, SessionHostBuilder, TurnOverrides};
// share one tested implementation.
pub(crate) use builder::dedup_visible_tool_specs;
-
#[cfg(test)]
mod orphaned_head_resume_tests;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
index 855c078071..cf430d0c07 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_adapter_tests.rs
@@ -10,13 +10,13 @@ use tinyagents_session::port::{InMemorySessionStores, SessionStoreProvider};
use tinyagents_session::transcript::TranscriptMeta;
use tinyinference_llm::message::Message;
-use crate::integrations::announcement_notes::{
- integration_announcement_note, mcp_announcement_note, skill_announcement_note,
-};
use super::runtime_session::tool_surface::reconcile_synthesized_visibility;
use super::runtime_session::{account_committed_turn_against_goal, holistic_last_turn_usage};
use super::{OpenHumanSessionHooks, OpenHumanTranscriptCodec};
use crate::agent::tinyagents::host::OpenHumanRunContext;
+use crate::integrations::announcement_notes::{
+ integration_announcement_note, mcp_announcement_note, skill_announcement_note,
+};
struct RecordingDriver(Arc<Mutex<Vec<OpenHumanRunContext>>>);
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_progress.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_progress.rs
index 10d892c082..ec53a2718a 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_progress.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_progress.rs
@@ -1,7 +1,7 @@
//! Post-commit progress delivery for a chat turn.
-use crate::progress::AgentProgress;
use crate::agent::tinyagents::host::OpenHumanRunContext;
+use crate::progress::AgentProgress;
use tinyagents_harness::turn_stop::TurnStop;
use tinyagents_runtime::CommitReceipt;
diff --git a/crates/openhuman-core/src/agent/session_host/turn/graph.rs b/crates/openhuman-core/src/agent/session_host/turn/graph.rs
index 53585284fe..c324a97567 100644
--- a/crates/openhuman-core/src/agent/session_host/turn/graph.rs
+++ b/crates/openhuman-core/src/agent/session_host/turn/graph.rs
@@ -28,10 +28,10 @@ use std::sync::Arc;
use anyhow::Result;
use tokio::sync::mpsc::Sender;
-use crate::progress::AgentProgress;
use crate::agent::tinyagents::middleware::turn_context::TurnContextMiddleware;
use crate::agent::tinyagents::{TinyagentsTurnOutcome, TurnSpec};
use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;
+use crate::progress::AgentProgress;
use tinyagents_definition::SandboxMode;
use tinyagents_harness::run_queue::RunQueue;
use tinyagents_session::transcript::TranscriptMessage;
diff --git a/crates/openhuman-core/src/agent/session_host/types.rs b/crates/openhuman-core/src/agent/session_host/types.rs
index fc12c0300c..dbc5209022 100644
--- a/crates/openhuman-core/src/agent/session_host/types.rs
+++ b/crates/openhuman-core/src/agent/session_host/types.rs
@@ -7,9 +7,9 @@
//! crate gaining field access.
use crate::agent::hooks::PostTurnHook;
-use crate::progress::AgentProgress;
use crate::agent::prompts::SystemPromptBuilder;
use crate::agent::tinyagents::TurnModelSource;
+use crate::progress::AgentProgress;
use std::sync::Arc;
use tinytools::ToolPolicySession;
use tinytools::{Tool, ToolSpec};
diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rs
index 6bafcf2073..fa8cabc91e 100644
--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs
@@ -68,5 +68,3 @@ pub use types::{
};
pub(crate) use ops::{append_subagent_role_contract, resolve_subagent_source};
-
-
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
index 2e8b3c411d..6888a5341b 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
@@ -6,9 +6,9 @@ use crate::agent::subagent_host::ops::checkpoint;
use std::collections::HashSet;
use std::sync::Arc;
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::types::SubagentRunError;
use crate::agent::tinyagents::{SubagentScope, TurnSpec};
+use crate::progress::AgentProgress;
use tinyagents_harness::run_queue::RunQueue;
use tinyagents_session::transcript::TranscriptMessage;
use tinyjuice_bus::types::AgentTokenjuiceCompression;
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index 76a059ce35..4213f29721 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -12,7 +12,6 @@ use std::time::Instant;
use crate::agent::harness::artifact_offload::offload_run_result;
use crate::agent::harness::fork_context::ParentExecutionContext;
use crate::agent::prompts::{PromptContext, SubagentRenderOptions};
-use crate::prompts::{render_subagent_system_prompt_with_format};
use crate::agent::subagent_host::definition_iter_cap;
use crate::agent::subagent_host::tool_prep::{
filter_tool_indices, is_subagent_spawn_tool, load_prompt_source, subagent_prompt_protocol,
@@ -23,6 +22,7 @@ use crate::agent::subagent_host::types::{
use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;
use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS;
+use crate::prompts::render_subagent_system_prompt_with_format;
use tinyagents_definition::{
AgentTier, IterationPolicy, PromptSource, SandboxMode as AgentSandboxMode,
validate_tier_transition,
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
index 9540cb30c3..b6fb57f138 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs
@@ -17,11 +17,11 @@ use std::time::Instant;
use tokio::sync::mpsc::Sender;
use crate::agent::harness::fork_context::{AgentContextPreparedSource, ParentExecutionContext};
-use crate::progress::AgentProgress;
use crate::agent::subagent_host::SubagentUsage;
use crate::agent::tinyagents::{
middleware::turn_context::TurnContextMiddleware, turn_policy::ToolPolicyEnforcement,
};
+use crate::progress::AgentProgress;
use crate::security::turn_origin::AgentTurnOrigin;
use tinyagents_definition::SandboxMode;
use tinyagents_harness::store::InMemoryStore as ToolResultArtifactIndexStore;
diff --git a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs
index df757ffb2b..fc75444d8e 100644
--- a/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/observability/event_bridge.rs
@@ -9,8 +9,8 @@ use tokio::sync::mpsc::Sender;
use tinyinference_llm::usage::Usage;
-use crate::progress::AgentProgress;
use crate::inference::provider::BilledUsage;
+use crate::progress::AgentProgress;
use tinytools::humanize_tool_name;
use super::bridge_types::{ProviderUsageCarry, SubagentScope, ToolFailureMap, ToolNameMap};
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index d1694da280..5282c4cf67 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -27,8 +27,8 @@ use crate::agent::tinyagents::host::run_context::HostOperationContext;
use crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool;
use crate::agent::tinyagents::use_skill_dispatch::UseSkillDispatch;
use crate::agent::tools::TodoToolDispatch;
-use crate::tools::delegate::DelegateToolDispatch;
use crate::core::runtime::CoreContext;
+use crate::tools::delegate::DelegateToolDispatch;
use crate::tools::implementations::threads::SpawnWorkerThreadDispatch;
type RegisteredToolDispatch = Arc<dyn ToolDispatch<(), OpenHumanRunContext>>;
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs b/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs
index 742892511e..2f92abfe28 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_run_finalize.rs
@@ -12,10 +12,10 @@ use tinyagents_harness::middleware::AgentRun;
use tinyagents_harness::middleware::{ContextCompressionMiddleware, PromptCacheGuardMiddleware};
use tokio::sync::mpsc::Sender;
-use crate::progress::AgentProgress;
use crate::agent::tinyagents::journal::TurnJournal;
use crate::agent::tinyagents::observability::{self, OpenhumanEventBridge, SubagentScope};
use crate::agent::tinyagents::turn_outcome::TinyagentsTurnOutcome;
+use crate::progress::AgentProgress;
use tinyagents_harness::turn_outcome::{HaltSummarySlot, ToolOutcomeSink};
use tinyagents_harness::turn_run_finalize::{
TurnEnd, TurnEndInputs, classify_turn_end, log_compaction_provenance, select_turn_text,
diff --git a/crates/openhuman-core/src/backend/telemetry/mod.rs b/crates/openhuman-core/src/backend/telemetry/mod.rs
index 6f8ab9f080..658395fc48 100644
--- a/crates/openhuman-core/src/backend/telemetry/mod.rs
+++ b/crates/openhuman-core/src/backend/telemetry/mod.rs
@@ -1,2 +1,3 @@
//! Backend telemetry adapters.
+#[path = "langfuse/environment.rs"]
pub(crate) mod langfuse;
diff --git a/crates/openhuman-core/src/core/observability.rs b/crates/openhuman-core/src/core/observability.rs
index 7da46e5705..63ae930992 100644
--- a/crates/openhuman-core/src/core/observability.rs
+++ b/crates/openhuman-core/src/core/observability.rs
@@ -33,8 +33,8 @@ use release_tag::{parse_release_tag, parse_version};
mod availability;
use availability::log_module_unavailable;
pub use availability::{
- is_api_key_rejected_message, is_backend_unavailable_message, is_module_unavailable_message,
- API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX,
+ API_KEY_REJECTED_PREFIX, BACKEND_UNAVAILABLE_PREFIX, is_api_key_rejected_message,
+ is_backend_unavailable_message, is_module_unavailable_message,
};
/// A `(key, value)` pair attached as a Sentry tag. Tags are short, indexed,
@@ -3427,4 +3427,3 @@ pub fn is_stale_release_event(event: &sentry::protocol::Event<'_>) -> bool {
#[cfg(test)]
#[path = "observability_tests.rs"]
mod tests;
-
diff --git a/crates/openhuman-core/src/core/observability_channel_message.rs b/crates/openhuman-core/src/core/observability_channel_message.rs
index febdd0dde3..a93d2bbc08 100644
--- a/crates/openhuman-core/src/core/observability_channel_message.rs
+++ b/crates/openhuman-core/src/core/observability_channel_message.rs
@@ -43,4 +43,3 @@ fn event_contains_channel_message_path(event: &sentry::protocol::Event<'_>) -> b
.iter()
.any(|exc| exc.value.as_deref().is_some_and(has_pattern))
}
-
diff --git a/crates/openhuman-core/src/core/observability_error_classification_user_state_tests.rs b/crates/openhuman-core/src/core/observability_error_classification_user_state_tests.rs
index 06a6b55641..818db6a449 100644
--- a/crates/openhuman-core/src/core/observability_error_classification_user_state_tests.rs
+++ b/crates/openhuman-core/src/core/observability_error_classification_user_state_tests.rs
@@ -711,7 +711,10 @@ fn connector_provider_output_is_already_reported_without_affecting_other_modules
"Composio v3 connected_accounts failed: HTTP 401: Invalid API key",
"ListConnectionsDirect: ai.tinyhumans.tinybus.Error.Failed: Composio v3 connected_accounts failed: HTTP 401: Invalid API key",
] {
- assert_eq!(expected_error_kind(message), Some(ExpectedErrorKind::ModuleUnavailable));
+ assert_eq!(
+ expected_error_kind(message),
+ Some(ExpectedErrorKind::ModuleUnavailable)
+ );
}
for message in [
"Execute: ai.tinyhumans.tinybus.Error.Failed: private module failure",
diff --git a/crates/openhuman-core/src/integrations/prelude_integrations.rs b/crates/openhuman-core/src/integrations/prelude_integrations.rs
index 86508a8d7d..baf8483109 100644
--- a/crates/openhuman-core/src/integrations/prelude_integrations.rs
+++ b/crates/openhuman-core/src/integrations/prelude_integrations.rs
@@ -46,7 +46,8 @@ impl OpenHumanTurnPrelude {
let Some(recorded) = recorded else {
return;
};
- let actions = crate::integrations::recorded_tools::recorded_integration_actions(recorded.specs());
+ let actions =
+ crate::integrations::recorded_tools::recorded_integration_actions(recorded.specs());
log::debug!(
"[session] adopting {} recorded integration action declaration(s) agent={}",
actions.len(),
diff --git a/crates/openhuman-core/src/integrations/test_support.rs b/crates/openhuman-core/src/integrations/test_support.rs
index 7b8b74ab59..748fcae4e0 100644
--- a/crates/openhuman-core/src/integrations/test_support.rs
+++ b/crates/openhuman-core/src/integrations/test_support.rs
@@ -1,6 +1,6 @@
-use axum::{routing::post, Json, Router};
+use axum::{Json, Router, routing::post};
use parking_lot::Mutex;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use std::sync::Arc;
#[derive(Debug, Clone, PartialEq)]
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser.rs b/crates/openhuman-core/src/tools/impl/browser/browser.rs
index 0fa5a98ccb..ae18bf3a9d 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser.rs
@@ -9,19 +9,19 @@ mod session_pool;
mod task_actions;
#[path = "browser_unattended.rs"]
mod unattended;
-use crate::security::turn_origin::AgentTurnOrigin;
use crate::modules::browser::BrowserClient;
-use crate::security::approval::{ApprovalGate, GateOutcome};
use crate::security::SecurityPolicy;
+use crate::security::approval::{ApprovalGate, GateOutcome};
+use crate::security::turn_origin::AgentTurnOrigin;
use async_trait::async_trait;
-use pending::{approval_target, needs_host_confirmation, Pending};
-use serde_json::{json, Value};
-use session_pool::{
- browser_session_fingerprint, evict_thread_sessions, requires_rebind, thread_sessions,
- ThreadSession,
-};
+use pending::{Pending, approval_target, needs_host_confirmation};
+use serde_json::{Value, json};
#[cfg(test)]
use session_pool::{MAX_THREAD_SESSIONS, SESSION_IDLE_TTL};
+use session_pool::{
+ ThreadSession, browser_session_fingerprint, evict_thread_sessions, requires_rebind,
+ thread_sessions,
+};
use sha2::{Digest, Sha256};
#[cfg(test)]
use std::{collections::HashMap, time::Duration};
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs
index 79e1f45555..a86ec197c7 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser_computer_tests.rs
@@ -108,10 +108,10 @@ fn direct_actions_decode_through_the_bus_tool_args() {
assert!(direct_action(&json!({"action":"click"})).is_err());
assert!(direct_action(&json!({"action":"scroll","direction":"diagonal"})).is_err());
assert!(direct_action(&json!({"action":"arbitrary_script"})).is_err());
- assert!(direct_action(
- &json!({"action":"find","by":"text","value":"Save","find_action":"text"})
- )
- .is_ok());
+ assert!(
+ direct_action(&json!({"action":"find","by":"text","value":"Save","find_action":"text"}))
+ .is_ok()
+ );
}
#[test]
@@ -165,13 +165,14 @@ async fn needs_approval_view_is_held_behind_a_token_and_cleared_by_other_states(
let output = tool.report(paused).await.unwrap();
let token = output["pending"]["token"].as_str().unwrap().to_owned();
assert_eq!(output["pending"]["task_id"], "t-1");
- assert!(tool
- .pending
- .lock()
- .await
- .as_ref()
- .unwrap()
- .matches(&json!({"token": token})));
+ assert!(
+ tool.pending
+ .lock()
+ .await
+ .as_ref()
+ .unwrap()
+ .matches(&json!({"token": token}))
+ );
let done: TaskView = serde_json::from_value(json!({
"id": "t-1",
@@ -469,7 +470,7 @@ impl tinytools::ToolRunContext for ThreadOnly {
#[tokio::test]
async fn two_agents_on_one_thread_get_distinct_browser_session_keys() {
use crate::core::runtime::agent_scope::test_agent_context;
- use crate::core::runtime::{context::CoreContext, DomainSet};
+ use crate::core::runtime::{DomainSet, context::CoreContext};
let root = CoreContext::for_test(DomainSet::full(), None);
let client = Arc::new(BrowserClient::new(Arc::new(
crate::config::Config::default(),
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs
index 84bf885645..1dab6f8cc2 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser_open_tests.rs
@@ -7,9 +7,10 @@ fn simple_open_still_obeys_shared_website_policy() {
let client = Arc::new(BrowserClient::new(Arc::new(config)));
let tool = BrowserOpenTool::new(Arc::new(SecurityPolicy::default()), client);
assert_eq!(tool.exposure(), tinytools::ToolExposure::Deferred);
- assert!(tool
- .validate_url("https://www.selenium.dev/selenium/web/web-form.html")
- .is_ok());
+ assert!(
+ tool.validate_url("https://www.selenium.dev/selenium/web/web-form.html")
+ .is_ok()
+ );
assert!(tool.validate_url("https://example.com").is_err());
assert!(tool.validate_url("http://selenium.dev").is_err());
assert!(tool.validate_url("https://localhost/").is_err());
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs
index 1e2ff3c66f..972a77f58a 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser_task_actions.rs
@@ -2,12 +2,12 @@
use super::Pending;
use crate::security::approval::{ApprovalGate, GateOutcome};
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use sha2::{Digest, Sha256};
use std::collections::BTreeMap;
use tinycomputer_bus::agent::{TaskStatus, TaskView};
-use tinycomputer_bus::browser::tool::ToolArgs;
use tinycomputer_bus::browser::Action;
+use tinycomputer_bus::browser::tool::ToolArgs;
/// What the host adds to a task report the agent cannot act on alone: a
/// task that failed because Chrome was not found, or would not start from
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_unattended.rs b/crates/openhuman-core/src/tools/impl/browser/browser_unattended.rs
index 3b13175a3e..dd881204e4 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser_unattended.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser_unattended.rs
@@ -7,8 +7,8 @@
//! unattended_actions` names the gated kinds such a turn may take without
//! asking; every other origin keeps the forced gate exactly as it was.
-use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
use crate::config::BrowserConfig;
+use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
/// A turn the user authorized ahead of time and nobody is watching live.
/// A workflow that asked for review (`require_approval`) is excluded.
diff --git a/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs b/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs
index 58322fc929..d1ef42d798 100644
--- a/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/browser/browser_unattended_tests.rs
@@ -1,6 +1,6 @@
use super::super::pending::Pending;
-use super::super::session_pool::{browser_session_fingerprint, thread_sessions, ThreadSession};
-use super::super::{approve_browser_action, task_actions::approve_task_action, BrowserTool};
+use super::super::session_pool::{ThreadSession, browser_session_fingerprint, thread_sessions};
+use super::super::{BrowserTool, approve_browser_action, task_actions::approve_task_action};
use super::*;
use crate::core::runtime::{CoreContext, DomainSet};
use crate::modules::browser::BrowserClient;
diff --git a/crates/openhuman-core/src/tools/impl/document/mod.rs b/crates/openhuman-core/src/tools/impl/document/mod.rs
index 799c8753d5..11a5bede04 100644
--- a/crates/openhuman-core/src/tools/impl/document/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/document/mod.rs
@@ -30,7 +30,7 @@ use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use crate::artifacts::production::Production;
use crate::security::SecurityPolicy;
@@ -56,7 +56,7 @@ mod types;
#[path = "document_tests.rs"]
mod tests;
-use self::types::{validate_input, GenerateDocumentInput, GenerateDocumentOutput};
+use self::types::{GenerateDocumentInput, GenerateDocumentOutput, validate_input};
/// Generation timeout. `docx-rs` typically completes the full section cap
/// in well under a second; the 30 s ceiling is a defensive bound against
@@ -276,12 +276,9 @@ impl DocumentTool {
// Retry can re-dispatch this exact spec (#3162). Best-effort: a
// write failure only forfeits regeneration, never aborts an
// otherwise-successful generation.
- if let Err(err) = crate::artifacts::store::save_artifact_args(
- &self.workspace_dir,
- production.id(),
- &args,
- )
- .await
+ if let Err(err) =
+ crate::artifacts::store::save_artifact_args(&self.workspace_dir, production.id(), &args)
+ .await
{
tracing::warn!(
target: "document",
diff --git a/crates/openhuman-core/src/tools/impl/document/types.rs b/crates/openhuman-core/src/tools/impl/document/types.rs
index 1748627068..36b5232c8a 100644
--- a/crates/openhuman-core/src/tools/impl/document/types.rs
+++ b/crates/openhuman-core/src/tools/impl/document/types.rs
@@ -27,8 +27,8 @@ use crate::modules::documents::DocumentCallError;
// are the same ones the module validates against, which is the whole reason
// `spec` is separable.
pub use crate::tools::implementations::document::format::spec::document::{
- DocumentSpec as GenerateDocumentInput, MAX_BULLETS_PER_SECTION, MAX_PARAGRAPHS_PER_SECTION,
- MAX_PARAGRAPH_CHARS, MAX_SECTIONS, MAX_TEXT_CHARS,
+ DocumentSpec as GenerateDocumentInput, MAX_BULLETS_PER_SECTION, MAX_PARAGRAPH_CHARS,
+ MAX_PARAGRAPHS_PER_SECTION, MAX_SECTIONS, MAX_TEXT_CHARS,
};
// `sections` is a `Vec<DocumentSection>`, so anything constructing an input
diff --git a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs
index 08e68815e0..f13b30caf8 100644
--- a/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/filesystem/mod_tests.rs
@@ -3,8 +3,8 @@
//! ([`super::gate::security_scoped_to_root`]).
use super::gate::security_scoped_to_root;
-use crate::security::policy::TrustedAccess;
use crate::security::SecurityPolicy;
+use crate::security::policy::TrustedAccess;
use std::path::Path;
use tinyagents_harness::context::{RunConfig, RunContext};
use tinyagents_harness::tool::ToolExecutionContext;
diff --git a/crates/openhuman-core/src/tools/impl/network/gate.rs b/crates/openhuman-core/src/tools/impl/network/gate.rs
index d516e012ec..510f5f9ede 100644
--- a/crates/openhuman-core/src/tools/impl/network/gate.rs
+++ b/crates/openhuman-core/src/tools/impl/network/gate.rs
@@ -8,7 +8,7 @@
use tinytools_std::network::NetGate;
use crate::security::egress::{
- emit_external_transfer, local_only_tool_block, DataKind, EgressDescriptor,
+ DataKind, EgressDescriptor, emit_external_transfer, local_only_tool_block,
};
use crate::security::{GateDecision, SecurityPolicy};
use tinybox_bus::CommandClass;
diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
index 4df17419b0..5d9230dfad 100644
--- a/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks.rs
@@ -3,7 +3,7 @@
use crate::{config::Config, inference::provider::factory::redact_endpoint};
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use std::time::Duration;
use tinybus::module::ModuleClient;
use tinytools::{PermissionLevel, Tool, ToolResult};
diff --git a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs
index e346f88a44..a64b22acdd 100644
--- a/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/network/gitbooks_tests.rs
@@ -58,7 +58,7 @@ impl MockTinyMcp {
async fn mock_module_client(
state: MockProviderState,
) -> (ModuleClient, tinybus::Connection, MockProviderState) {
- use tinybus::{broker::Broker, transport::memory::MemoryBus, Connection, ObjectPath};
+ use tinybus::{Connection, ObjectPath, broker::Broker, transport::memory::MemoryBus};
let bus = MemoryBus::new();
Broker::new().spawn(bus.clone());
@@ -115,13 +115,17 @@ async fn gitbooks_tools_fail_closed_when_the_module_is_not_attested() {
.expect("page fetch executes");
assert!(search_result.is_error, "{}", search_result.output());
- assert!(search_result
- .output()
- .contains("MODULE_CALL_REPORTED: module transport failed"));
+ assert!(
+ search_result
+ .output()
+ .contains("MODULE_CALL_REPORTED: module transport failed")
+ );
assert!(page_result.is_error, "{}", page_result.output());
- assert!(page_result
- .output()
- .contains("MODULE_CALL_REPORTED: module transport failed"));
+ assert!(
+ page_result
+ .output()
+ .contains("MODULE_CALL_REPORTED: module transport failed")
+ );
assert!(
module_calls
.calls
diff --git a/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs b/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs
index fcfc1f9dcd..1cc07b9b74 100644
--- a/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/network/gmail_unsubscribe_tests.rs
@@ -44,9 +44,11 @@ async fn test_gmail_unsubscribe_empty_link() {
.unwrap();
assert!(result.is_error);
- assert!(result
- .text()
- .contains("without a valid List-Unsubscribe link"));
+ assert!(
+ result
+ .text()
+ .contains("without a valid List-Unsubscribe link")
+ );
}
#[tokio::test]
@@ -60,7 +62,9 @@ async fn test_gmail_unsubscribe_missing_link() {
.unwrap();
assert!(result.is_error);
- assert!(result
- .text()
- .contains("without a valid List-Unsubscribe link"));
+ assert!(
+ result
+ .text()
+ .contains("without a valid List-Unsubscribe link")
+ );
}
diff --git a/crates/openhuman-core/src/tools/impl/network/host.rs b/crates/openhuman-core/src/tools/impl/network/host.rs
index e49d25cb44..4f7eecd931 100644
--- a/crates/openhuman-core/src/tools/impl/network/host.rs
+++ b/crates/openhuman-core/src/tools/impl/network/host.rs
@@ -16,10 +16,10 @@ use tinytools_std::network::{
use super::gate::RoutedGate;
use crate::config::HttpRequestConfig;
-use crate::security::approval::ApprovalChatContext;
use crate::security::SecurityPolicy;
+use crate::security::approval::ApprovalChatContext;
use crate::tools::per_call::PerCallTool;
-use {tinyjuice_bus::tools::summary_focus_property, tinyjuice_bus::tools::SUMMARY_FOCUS_ARG};
+use {tinyjuice_bus::tools::SUMMARY_FOCUS_ARG, tinyjuice_bus::tools::summary_focus_property};
/// The fallbacks for a `0` limit, from the `[http_request]` schema defaults, so
/// the tools, the schema and the 5→6 migration share one source.
diff --git a/crates/openhuman-core/src/tools/impl/network/host_tests.rs b/crates/openhuman-core/src/tools/impl/network/host_tests.rs
index 66a7ae4eab..22caaa71cd 100644
--- a/crates/openhuman-core/src/tools/impl/network/host_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/network/host_tests.rs
@@ -17,10 +17,12 @@ fn fetch() -> WebFetchTool {
fn web_fetch_opts_into_an_optional_summary_focus() {
let schema = fetch().parameters_schema();
assert_eq!(schema["properties"][SUMMARY_FOCUS_ARG]["type"], "string");
- assert!(!schema["required"]
- .as_array()
- .unwrap()
- .contains(&json!(SUMMARY_FOCUS_ARG)));
+ assert!(
+ !schema["required"]
+ .as_array()
+ .unwrap()
+ .contains(&json!(SUMMARY_FOCUS_ARG))
+ );
// The tool's schema declares TinyJuice's own property, not a lookalike.
assert!(crate::inference::tokenjuice::focus::declares_summary_focus(
&schema
@@ -93,25 +95,31 @@ async fn tinyjuice_detects_and_converts_html() {
return;
}
let page = "<!DOCTYPE html><html><body><p>hi</p></body></html>";
- assert!(TinyJuiceHtml {
- ctx: crate::core::runtime::DispatchCtx::ambient(),
- }
- .looks_like_html(page)
- .await
- .unwrap());
- assert!(!TinyJuiceHtml {
- ctx: crate::core::runtime::DispatchCtx::ambient(),
- }
- .looks_like_html("# Just a README\n\nSome prose.\n")
- .await
- .unwrap());
- assert!(TinyJuiceHtml {
- ctx: crate::core::runtime::DispatchCtx::ambient(),
- }
- .to_markdown(page)
- .await
- .unwrap()
- .contains("hi"));
+ assert!(
+ TinyJuiceHtml {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
+ }
+ .looks_like_html(page)
+ .await
+ .unwrap()
+ );
+ assert!(
+ !TinyJuiceHtml {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
+ }
+ .looks_like_html("# Just a README\n\nSome prose.\n")
+ .await
+ .unwrap()
+ );
+ assert!(
+ TinyJuiceHtml {
+ ctx: crate::core::runtime::DispatchCtx::ambient(),
+ }
+ .to_markdown(page)
+ .await
+ .unwrap()
+ .contains("hi")
+ );
}
#[cfg(feature = "web3")]
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rs
index 9951768459..cfb2887ac9 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs
@@ -7,7 +7,7 @@
use std::sync::Arc;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use tinytools::{IndirectCall, PermissionLevel, Tool, ToolCallOptions, ToolResult};
use crate::{
@@ -61,7 +61,7 @@ impl Tool for McpListServersTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_servers failed: TinyMCP is unavailable",
- ))
+ ));
}
};
let config = host::client_config(&self.config);
@@ -77,7 +77,7 @@ impl Tool for McpListServersTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_servers failed: module call failed",
- ))
+ ));
}
};
let servers = summaries
@@ -173,7 +173,7 @@ impl Tool for McpListToolsTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_tools failed: TinyMCP is unavailable",
- ))
+ ));
}
};
let server = client
@@ -193,7 +193,7 @@ impl Tool for McpListToolsTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_tools failed: module call failed",
- ))
+ ));
}
};
let remote = match client
@@ -204,7 +204,7 @@ impl Tool for McpListToolsTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_tools failed: metadata scrubbing failed",
- ))
+ ));
}
};
@@ -222,7 +222,7 @@ impl Tool for McpListToolsTool {
Err(_) => {
return Ok(ToolResult::error(
"mcp_list_tools failed: tool display failed",
- ))
+ ));
}
};
display.push((tool, projected));
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs
index be002a20ea..f1fafbd3b6 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs
@@ -64,10 +64,12 @@ fn module_presentation_for_an_unconfigured_server_is_not_executable() {
&config.workspace_dir,
&config.action_dir,
));
- assert!(configured_server_tools_from_presentations(
- &config,
- vec![presentation("removed-server", false)],
- &security,
- )
- .is_empty());
+ assert!(
+ configured_server_tools_from_presentations(
+ &config,
+ vec![presentation("removed-server", false)],
+ &security,
+ )
+ .is_empty()
+ );
}
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs
index a93acb10d6..4cdfe4d610 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp_target_tests.rs
@@ -7,7 +7,7 @@ use std::{
use crate::mcp::module_client::{McpConfiguredClient, McpModulePort};
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use tinymcp_bus::{
McpToolPresentation, OpenConfiguredResponse, PrepareAgentToolsRequest,
ServerArgumentsValidation, TransitionStatus, ValidateServerArgumentsRequest,
diff --git a/crates/openhuman-core/src/tools/impl/network/mod.rs b/crates/openhuman-core/src/tools/impl/network/mod.rs
index 9c9bea8eb8..e085fa63e1 100644
--- a/crates/openhuman-core/src/tools/impl/network/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mod.rs
@@ -28,7 +28,7 @@ pub use host::{
web_fetch_tool,
};
#[cfg(feature = "mcp")]
-pub use mcp::{mcp_call_tool, McpListServersTool, McpListToolsTool};
+pub use mcp::{McpListServersTool, McpListToolsTool, mcp_call_tool};
#[cfg(feature = "mcp")]
pub use mcp_server_tools::configured_server_tools_from_presentations;
diff --git a/crates/openhuman-core/src/tools/impl/presentation/mod.rs b/crates/openhuman-core/src/tools/impl/presentation/mod.rs
index dfd315ea27..1cd1302d4e 100644
--- a/crates/openhuman-core/src/tools/impl/presentation/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/presentation/mod.rs
@@ -33,7 +33,7 @@ use std::sync::Arc;
use std::time::Duration;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use crate::artifacts::production::Production;
use crate::artifacts::read_artifact_bytes;
@@ -50,8 +50,8 @@ mod tests;
use crate::tools::implementations::document::format::spec::SlideImage;
use self::types::{
- validate_input, GeneratePresentationInput, GeneratePresentationOutput, SlideImageRequest,
- SlideImageSource, MAX_IMAGE_BYTES,
+ GeneratePresentationInput, GeneratePresentationOutput, MAX_IMAGE_BYTES, SlideImageRequest,
+ SlideImageSource, validate_input,
};
/// Generation timeout. `ppt-rs` typically completes the full 64-slide
@@ -381,12 +381,9 @@ impl PresentationTool {
// Retry can re-dispatch this exact spec deterministically (#3162).
// Best-effort: a write failure only forfeits future regeneration,
// it must not abort an otherwise-successful generation.
- if let Err(err) = crate::artifacts::store::save_artifact_args(
- &self.workspace_dir,
- production.id(),
- &args,
- )
- .await
+ if let Err(err) =
+ crate::artifacts::store::save_artifact_args(&self.workspace_dir, production.id(), &args)
+ .await
{
tracing::warn!(
target: "presentation",
diff --git a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs
index b0cc052280..803027817d 100644
--- a/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/presentation/presentation_tests.rs
@@ -13,7 +13,7 @@
//! perspective.
use super::types::GeneratePresentationInput;
-use super::types::{PresentationError, MAX_BULLETS_PER_SLIDE, MAX_SLIDES, MAX_TEXT_CHARS};
+use super::types::{MAX_BULLETS_PER_SLIDE, MAX_SLIDES, MAX_TEXT_CHARS, PresentationError};
use super::*;
use std::path::Path;
@@ -222,7 +222,7 @@ async fn execute_happy_path_returns_artifact_metadata() {
/// Canonical 1×1 PNG, written to disk to exercise the File source path.
fn png_1x1() -> Vec<u8> {
- use base64::{engine::general_purpose::STANDARD, Engine as _};
+ use base64::{Engine as _, engine::general_purpose::STANDARD};
STANDARD
.decode("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNk+M9QDwADhgGAWjR9awAAAABJRU5ErkJggg==")
.unwrap()
diff --git a/crates/openhuman-core/src/tools/impl/presentation/types.rs b/crates/openhuman-core/src/tools/impl/presentation/types.rs
index 7359b11f70..6582ec24b4 100644
--- a/crates/openhuman-core/src/tools/impl/presentation/types.rs
+++ b/crates/openhuman-core/src/tools/impl/presentation/types.rs
@@ -7,7 +7,7 @@ use crate::modules::documents::DocumentCallError;
// The size limits are the wire contract's: the tool validates against the same
// numbers the `tinydocs` module enforces, so they are defined once, there.
pub(super) use crate::tools::implementations::document::format::spec::presentation::{
- MAX_BULLETS_PER_SLIDE, MAX_IMAGES_PER_DECK, MAX_IMAGES_PER_SLIDE, MAX_IMAGE_BYTES, MAX_SLIDES,
+ MAX_BULLETS_PER_SLIDE, MAX_IMAGE_BYTES, MAX_IMAGES_PER_DECK, MAX_IMAGES_PER_SLIDE, MAX_SLIDES,
MAX_TEXT_CHARS,
};
diff --git a/crates/openhuman-core/src/tools/impl/system/install_tool.rs b/crates/openhuman-core/src/tools/impl/system/install_tool.rs
index 426a109398..af799f3c97 100644
--- a/crates/openhuman-core/src/tools/impl/system/install_tool.rs
+++ b/crates/openhuman-core/src/tools/impl/system/install_tool.rs
@@ -176,17 +176,18 @@ impl InstallToolTool {
)));
}
- let manager =
- match args.get("manager").and_then(|v| v.as_str()) {
+ let manager = match args.get("manager").and_then(|v| v.as_str()) {
+ Some(m) => m.to_string(),
+ None => match detect_system_manager() {
Some(m) => m.to_string(),
- None => match detect_system_manager() {
- Some(m) => m.to_string(),
- None => return Ok(ToolResult::error(
+ None => {
+ return Ok(ToolResult::error(
"No supported package manager detected on PATH. Pass 'manager' explicitly \
(e.g. brew, pipx, npm, cargo).",
- )),
- },
- };
+ ));
+ }
+ },
+ };
let Some((program, prefix)) = manager_argv(&manager) else {
return Ok(ToolResult::error(format!(
@@ -227,12 +228,12 @@ impl InstallToolTool {
Ok(Err(e)) => {
return Ok(ToolResult::error(format!(
"Failed to launch {program}: {e}"
- )))
+ )));
}
Err(_) => {
return Ok(ToolResult::error(format!(
"Install timed out after {INSTALL_TIMEOUT_SECS}s and was killed"
- )))
+ )));
}
};
diff --git a/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs b/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs
index 2f72f6bbf6..72f4aaa2b2 100644
--- a/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/system/install_tool_tests.rs
@@ -1,6 +1,6 @@
use super::*;
-use crate::security::approval::ApprovalChatContext;
use crate::security::AutonomyLevel;
+use crate::security::approval::ApprovalChatContext;
fn policy(allow_install: bool, autonomy: AutonomyLevel) -> Arc<SecurityPolicy> {
Arc::new(SecurityPolicy {
diff --git a/crates/openhuman-core/src/tools/impl/system/lsp.rs b/crates/openhuman-core/src/tools/impl/system/lsp.rs
index b27f427a15..c029991ea0 100644
--- a/crates/openhuman-core/src/tools/impl/system/lsp.rs
+++ b/crates/openhuman-core/src/tools/impl/system/lsp.rs
@@ -97,7 +97,7 @@ impl Tool for LspTool {
async fn execute(&self, _args: serde_json::Value) -> anyhow::Result<ToolResult> {
Ok(ToolResult::error(
- "lsp backend not yet implemented — capability gate is on but no language server is wired. Track this in the follow-up issue."
+ "lsp backend not yet implemented — capability gate is on but no language server is wired. Track this in the follow-up issue.",
))
}
}
diff --git a/crates/openhuman-core/src/tools/impl/system/mod.rs b/crates/openhuman-core/src/tools/impl/system/mod.rs
index 83ea101862..ec45c7c8e0 100644
--- a/crates/openhuman-core/src/tools/impl/system/mod.rs
+++ b/crates/openhuman-core/src/tools/impl/system/mod.rs
@@ -16,14 +16,14 @@ mod shell_support;
mod update_apply;
mod update_check;
-use crate::security::policy::{TrustedAccess, TrustedRoot};
use crate::security::SecurityPolicy;
+use crate::security::policy::{TrustedAccess, TrustedRoot};
use tinytools::ToolRunContext;
pub use install_tool::InstallToolTool;
-pub use lsp::{lsp_capability_enabled, LspTool, LSP_ENABLED_ENV};
+pub use lsp::{LSP_ENABLED_ENV, LspTool, lsp_capability_enabled};
pub use proxy_config::ProxyConfigTool;
-pub use retrieve_tool_output::{retrieve_tool_output_tool, RetrieveToolOutputTool};
+pub use retrieve_tool_output::{RetrieveToolOutputTool, retrieve_tool_output_tool};
pub use schedule::ScheduleTool;
pub use shell::ShellTool;
pub use update_apply::UpdateApplyTool;
diff --git a/crates/openhuman-core/src/tools/impl/system/proxy_config.rs b/crates/openhuman-core/src/tools/impl/system/proxy_config.rs
index 8b127f6786..24774a9eae 100644
--- a/crates/openhuman-core/src/tools/impl/system/proxy_config.rs
+++ b/crates/openhuman-core/src/tools/impl/system/proxy_config.rs
@@ -1,11 +1,11 @@
use crate::config::{
- runtime_proxy_config, set_runtime_proxy_config, Config, ProxyConfig, ProxyScope,
+ Config, ProxyConfig, ProxyScope, runtime_proxy_config, set_runtime_proxy_config,
};
use crate::security::SecurityPolicy;
use crate::tools::schema_cache::static_schema;
use crate::util::MaybeSet;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use std::fs;
use std::sync::Arc;
use tinytools::{Tool, ToolResult};
diff --git a/crates/openhuman-core/src/tools/impl/system/schedule.rs b/crates/openhuman-core/src/tools/impl/system/schedule.rs
index d9cfce3c72..d31fb0c9f0 100644
--- a/crates/openhuman-core/src/tools/impl/system/schedule.rs
+++ b/crates/openhuman-core/src/tools/impl/system/schedule.rs
@@ -1,5 +1,5 @@
use crate::config::Config;
-use crate::cron::job_builder::{create_agent_job, AgentJobInput};
+use crate::cron::job_builder::{AgentJobInput, create_agent_job};
use crate::cron::origin::{current_job_origin, current_turn_may_skip_approval};
use crate::security::SecurityPolicy;
use crate::tools::schema_cache::static_schema;
@@ -109,7 +109,8 @@ impl Tool for ScheduleTool {
}
let origin =
crate::agent::tinyagents::host::run_context::turn_origin_for_tool(tool_context);
- self.handle_create_like(action, &args, origin.as_ref()).await
+ self.handle_create_like(action, &args, origin.as_ref())
+ .await
}
"cancel" | "remove" => {
if let Some(blocked) = self.enforce_mutation_allowed(action) {
@@ -142,8 +143,8 @@ impl Tool for ScheduleTool {
Ok(self.handle_pause_resume(id, false))
}
other => Ok(ToolResult::error(format!(
- "Unknown action '{other}'. Use create/add/once/list/get/cancel/remove/pause/resume."
- ))),
+ "Unknown action '{other}'. Use create/add/once/list/get/cancel/remove/pause/resume."
+ ))),
}
}
}
diff --git a/crates/openhuman-core/src/tools/impl/system/shell.rs b/crates/openhuman-core/src/tools/impl/system/shell.rs
index d39f3baf92..aa9e7ef389 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell.rs
@@ -2,10 +2,10 @@ use super::shell_description::{command_param_description, shell_description};
#[cfg(feature = "modules")]
use super::shell_support::container_environment;
use super::shell_support::{command_failure, exec_result, python_utf8_env, tool_timeout_message};
-use crate::modules::tinybox::host_runtime::RuntimeAdapter;
use crate::agent::tinyagents::host::run_context::dispatch_ctx_for_tool;
use crate::config::Config;
use crate::core::runtime::DispatchCtx;
+use crate::modules::tinybox::host_runtime::RuntimeAdapter;
use crate::security::{AuditLogger, CommandExecutionLog, SecurityPolicy};
use async_trait::async_trait;
use serde_json::json;
@@ -359,7 +359,7 @@ impl ShellTool {
match crate::modules::tinybox::analyze_command(config, command.to_owned()).await {
Ok(analysis) => analysis,
Err(_) => {
- return (false, ToolResult::error("Command analysis is unavailable."))
+ return (false, ToolResult::error("Command analysis is unavailable."));
}
};
if let Err(reason) = self.security.check_gated_command_analysis(&analysis) {
@@ -442,7 +442,7 @@ impl ShellTool {
return (
false,
ToolResult::error(format!("Cannot read sandbox configuration: {err}")),
- )
+ );
}
};
if sandbox_required {
@@ -612,7 +612,7 @@ impl ShellTool {
return (
true,
ToolResult::error(format!("Cannot read module configuration: {e}")),
- )
+ );
}
},
};
diff --git a/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs
index 2001852c40..74196904c1 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell_saas_tests.rs
@@ -16,9 +16,11 @@ fn saas_sandbox_refuses_instead_of_falling_back_to_the_host() {
let (allowed, result) = saas_sandbox_refusal(&why);
assert!(!allowed);
assert!(result.is_error);
- assert!(result
- .output()
- .contains("Sandbox unavailable: no such sandbox"));
+ assert!(
+ result
+ .output()
+ .contains("Sandbox unavailable: no such sandbox")
+ );
}
#[test]
diff --git a/crates/openhuman-core/src/tools/impl/system/shell_support.rs b/crates/openhuman-core/src/tools/impl/system/shell_support.rs
index 83514e73ff..9e20aaef09 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell_support.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell_support.rs
@@ -11,7 +11,9 @@ pub(super) const COMMAND_TIMEOUT_NOTE: &str = "[exit 124: the command's own `tim
/// The result when the tool's own `timeout_secs` deadline killed the command.
pub(super) fn tool_timeout_message(secs: u64) -> String {
- format!("Command timed out after {secs}s and was killed: the shell tool's timeout_secs limit fired.")
+ format!(
+ "Command timed out after {secs}s and was killed: the shell tool's timeout_secs limit fired."
+ )
}
/// [`tinytools::command_failure`], plus [`COMMAND_TIMEOUT_NOTE`] on exit 124.
diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs
index e12ad99f62..d702f77008 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests_platform_tests.rs
@@ -5,7 +5,7 @@
//! pinned on every CI host, not only on a Windows runner.
use super::*;
-use crate::modules::tinybox::host_runtime::{host_shell_flavor, ShellFlavor};
+use crate::modules::tinybox::host_runtime::{ShellFlavor, host_shell_flavor};
#[cfg(feature = "modules")]
use crate::tools::system::shell_support::PYTHON_UTF8_DEFAULTS;
use std::collections::HashMap;
diff --git a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs
index 6fea3ab8c9..ba5c4c666f 100644
--- a/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs
+++ b/crates/openhuman-core/src/tools/impl/system/shell_tests_schema_and_env_tests.rs
@@ -143,10 +143,12 @@ fn shell_tool_schema_has_command() {
);
let schema = tool.parameters_schema();
assert!(schema["properties"]["command"].is_object());
- assert!(schema["required"]
- .as_array()
- .unwrap()
- .contains(&json!("command")));
+ assert!(
+ schema["required"]
+ .as_array()
+ .unwrap()
+ .contains(&json!("command"))
+ );
// The self-asserted `approved` param was removed — approval now happens
// at the harness ApprovalGate, not via a model-set flag.
assert!(schema["properties"]["approved"].is_null());
diff --git a/crates/openhuman-core/src/tools/impl/system/update_apply.rs b/crates/openhuman-core/src/tools/impl/system/update_apply.rs
index ad0e8a40e9..fea7524eb5 100644
--- a/crates/openhuman-core/src/tools/impl/system/update_apply.rs
+++ b/crates/openhuman-core/src/tools/impl/system/update_apply.rs
@@ -24,7 +24,7 @@ use crate::core::runtime::DispatchCtx;
use std::sync::Arc;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use crate::platform::update;
use crate::security::{SecurityPolicy, ToolOperation};
diff --git a/crates/openhuman-core/src/tools/impl/system/update_check.rs b/crates/openhuman-core/src/tools/impl/system/update_check.rs
index d2f7e0fcd2..2ca546cc8e 100644
--- a/crates/openhuman-core/src/tools/impl/system/update_check.rs
+++ b/crates/openhuman-core/src/tools/impl/system/update_check.rs
@@ -8,7 +8,7 @@
//! in the `update` domain.
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use crate::platform::update;
use tinytools::{PermissionLevel, Tool, ToolResult};
diff --git a/crates/openhuman-core/src/tools/mod.rs b/crates/openhuman-core/src/tools/mod.rs
index 25999d5c1e..2d91b4dd8c 100644
--- a/crates/openhuman-core/src/tools/mod.rs
+++ b/crates/openhuman-core/src/tools/mod.rs
@@ -1,5 +1,5 @@
+pub(crate) mod delegate;
pub mod host_extensions;
-pub(crate) pub(crate) mod delegate;
pub(crate) mod native_ops;
mod native_ops_types;
pub mod ops;
diff --git a/crates/openhuman-core/src/tools/native_ops.rs b/crates/openhuman-core/src/tools/native_ops.rs
index 8c236720b8..61b7b2a228 100644
--- a/crates/openhuman-core/src/tools/native_ops.rs
+++ b/crates/openhuman-core/src/tools/native_ops.rs
@@ -1,10 +1,10 @@
use std::sync::Arc;
use std::time::Instant;
-use crate::modules::tinybox::host_runtime::{NativeRuntime, RuntimeAdapter};
use crate::config::Config;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
+use crate::modules::tinybox::host_runtime::{NativeRuntime, RuntimeAdapter};
use crate::security::SecurityPolicy;
use crate::tools;
use crate::tools::native_ops_types::{ExecuteToolOutcome, RuntimeToolSummary};
@@ -158,8 +158,7 @@ pub async fn execute_tool(
let tools = build_runtime_tools(config)?;
trace!(
tool_count = tools.len(),
- tool_name,
- "[native_ops] execute_tool: runtime tools built"
+ tool_name, "[native_ops] execute_tool: runtime tools built"
);
let tool = tools
.into_iter()
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index e848b3e0a2..42fe1a3b87 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -1,10 +1,10 @@
#[cfg(feature = "mcp")]
use super::implementations::network::{McpListServersTool, McpListToolsTool};
use super::*;
-use crate::modules::tinybox::host_runtime::{NativeRuntime, RuntimeAdapter};
-use crate::tools::delegate::DelegateTool;
use crate::config::{Config, DelegateAgentConfig};
+use crate::modules::tinybox::host_runtime::{NativeRuntime, RuntimeAdapter};
use crate::security::{AuditLogger, SecurityPolicy};
+use crate::tools::delegate::DelegateTool;
use std::collections::HashMap;
use std::sync::Arc;
use tinyagents_harness::tools::{CurrentTimeTool, ResolveTimeTool};
diff --git a/crates/openhuman-core/src/tools/ops_tests.rs b/crates/openhuman-core/src/tools/ops_tests.rs
index 9dcc6b3aab..0348bed4ce 100644
--- a/crates/openhuman-core/src/tools/ops_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests.rs
@@ -1,7 +1,7 @@
use super::*;
use crate::config::{BrowserConfig, Config};
-use crate::security::credentials::{AuthService, APP_SESSION_PROVIDER, DEFAULT_AUTH_PROFILE_NAME};
use crate::security::AuditLogger;
+use crate::security::credentials::{APP_SESSION_PROVIDER, AuthService, DEFAULT_AUTH_PROFILE_NAME};
use crate::tools::ops::{all_tools, tool_group};
use std::collections::HashMap;
use tempfile::TempDir;
diff --git a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
index 9e2fd1e37f..cc9136ab79 100644
--- a/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_capability_gating_tests.rs
@@ -363,8 +363,8 @@ fn memory_tool_classifies_as_memory_family() {
/// A narrowed DomainSet axis still keeps the ordinary platform tools.
#[tokio::test]
async fn full_domain_set_keeps_platform_tools() {
- use crate::core::runtime::context::CoreContext;
use crate::core::runtime::DomainSet;
+ use crate::core::runtime::context::CoreContext;
let tmp = TempDir::new().unwrap();
let ctx = CoreContext::for_test(DomainSet::full(), None);
diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
index ab07ceed2a..5829b3e3eb 100644
--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
@@ -28,9 +28,11 @@ fn all_tools_registers_the_memory_tool_while_memory_is_on() {
);
// The search half of deferral is the harness's intrinsic bridge, never a
// registered tool: a host `tool_search` would shadow it.
- assert!(!tools
- .iter()
- .any(|tool| { tool.name() == tinytools::TOOL_SEARCH_NAME }));
+ assert!(
+ !tools
+ .iter()
+ .any(|tool| { tool.name() == tinytools::TOOL_SEARCH_NAME })
+ );
}
/// The three `whatsapp_data_*` agent tools are gone, in every build.
///
@@ -567,10 +569,9 @@ async fn document_tool_writes_into_the_configured_files_folder() {
}))
.await;
- let (artifacts, _) =
- crate::artifacts::store::list_artifacts(&cfg.workspace_dir, 0, 10, None)
- .await
- .expect("list artifacts");
+ let (artifacts, _) = crate::artifacts::store::list_artifacts(&cfg.workspace_dir, 0, 10, None)
+ .await
+ .expect("list artifacts");
assert_eq!(artifacts.len(), 1, "{artifacts:?}");
assert_eq!(
artifacts[0].file_root.as_deref(),
diff --git a/crates/openhuman-core/src/tools/registry/mod.rs b/crates/openhuman-core/src/tools/registry/mod.rs
index 472c488d20..c5234ee6c6 100644
--- a/crates/openhuman-core/src/tools/registry/mod.rs
+++ b/crates/openhuman-core/src/tools/registry/mod.rs
@@ -6,10 +6,10 @@ mod schemas;
pub use ops::{get_tool, list_tools, registry_entries, registry_entries_for_config};
pub use providers::{
+ CapabilityProviderMetadata, CapabilityProviderRegistry, CapabilityProviderRegistryError,
capability_provider_by_id, capability_provider_diagnostics, capability_provider_registry,
is_capability_provider_trusted_enabled, list_capability_providers,
- normalize_capability_provider_id, CapabilityProviderMetadata, CapabilityProviderRegistry,
- CapabilityProviderRegistryError,
+ normalize_capability_provider_id,
};
pub use schemas::{
all_controller_schemas as all_tool_registry_controller_schemas,
diff --git a/crates/openhuman-core/src/tools/registry/ops.rs b/crates/openhuman-core/src/tools/registry/ops.rs
index 266bae2fae..667e6b2678 100644
--- a/crates/openhuman-core/src/tools/registry/ops.rs
+++ b/crates/openhuman-core/src/tools/registry/ops.rs
@@ -1,11 +1,11 @@
use std::collections::{BTreeMap, BTreeSet};
-use serde_json::{json, Map, Value};
+use serde_json::{Map, Value, json};
use crate::config::Config;
+use crate::core::Outcome;
use crate::core::all;
use crate::core::runtime::DispatchCtx;
-use crate::core::Outcome;
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
use crate::mcp::audit::McpWriteListQuery;
use crate::mcp::server::McpToolSpec;
diff --git a/crates/openhuman-core/src/tools/registry/ops_tests.rs b/crates/openhuman-core/src/tools/registry/ops_tests.rs
index feaa22e65c..1a5b2cac6c 100644
--- a/crates/openhuman-core/src/tools/registry/ops_tests.rs
+++ b/crates/openhuman-core/src/tools/registry/ops_tests.rs
@@ -72,16 +72,20 @@ async fn diagnostics_reports_inventory_and_policy_surfaces() {
#[cfg(not(feature = "mcp"))]
assert_eq!(outcome.value.mcp_stdio_tools, 0);
assert!(outcome.value.json_rpc_tools > 0);
- assert!(outcome
- .value
- .policy_surfaces
- .iter()
- .any(|tool_id| tool_id == "security.policy_info"));
- assert!(outcome
- .value
- .possible_write_surfaces
- .iter()
- .any(|tool_id| tool_id == "tools.composio_execute"));
+ assert!(
+ outcome
+ .value
+ .policy_surfaces
+ .iter()
+ .any(|tool_id| tool_id == "security.policy_info")
+ );
+ assert!(
+ outcome
+ .value
+ .possible_write_surfaces
+ .iter()
+ .any(|tool_id| tool_id == "tools.composio_execute")
+ );
assert!(!outcome.value.posture.autonomy_level.is_empty());
assert!(outcome.value.mcp_write_audit.enabled);
@@ -113,11 +117,13 @@ enabled = true
outcome.value.capability_providers.trusted_enabled_providers,
1
);
- assert!(outcome
- .value
- .capability_providers
- .registry_errors
- .is_empty());
+ assert!(
+ outcome
+ .value
+ .capability_providers
+ .registry_errors
+ .is_empty()
+ );
}
#[tokio::test]
@@ -152,11 +158,13 @@ async fn diagnostics_for_config_reports_capability_provider_summary() {
outcome.value.capability_providers.trusted_enabled_providers,
1
);
- assert!(outcome
- .value
- .capability_providers
- .registry_errors
- .is_empty());
+ assert!(
+ outcome
+ .value
+ .capability_providers
+ .registry_errors
+ .is_empty()
+ );
}
#[tokio::test]
diff --git a/crates/openhuman-core/src/tools/registry/providers_tests.rs b/crates/openhuman-core/src/tools/registry/providers_tests.rs
index 5165082181..e8ce40f068 100644
--- a/crates/openhuman-core/src/tools/registry/providers_tests.rs
+++ b/crates/openhuman-core/src/tools/registry/providers_tests.rs
@@ -1,8 +1,8 @@
use crate::config::schema::{CapabilityProviderConfig, CapabilityProviderTrustState, Config};
use super::{
- capability_provider_by_id, is_capability_provider_trusted_enabled, list_capability_providers,
- normalize_capability_provider_id, CapabilityProviderRegistry,
+ CapabilityProviderRegistry, capability_provider_by_id, is_capability_provider_trusted_enabled,
+ list_capability_providers, normalize_capability_provider_id,
};
fn config_with(providers: Vec<CapabilityProviderConfig>) -> Config {
diff --git a/crates/openhuman-core/src/tools/registry/schemas.rs b/crates/openhuman-core/src/tools/registry/schemas.rs
index c5ac81fd45..d605605058 100644
--- a/crates/openhuman-core/src/tools/registry/schemas.rs
+++ b/crates/openhuman-core/src/tools/registry/schemas.rs
@@ -1,8 +1,8 @@
use crate::core::runtime::DispatchCtx;
use serde_json::{Map, Value};
-use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::Outcome;
+use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
/// Declared controller schemas for the `tool_registry` namespace.
diff --git a/crates/openhuman-core/src/tools/registry/schemas_tests.rs b/crates/openhuman-core/src/tools/registry/schemas_tests.rs
index def6a1b9a6..ac89fcf864 100644
--- a/crates/openhuman-core/src/tools/registry/schemas_tests.rs
+++ b/crates/openhuman-core/src/tools/registry/schemas_tests.rs
@@ -67,9 +67,11 @@ async fn handle_list_returns_registry_object() {
#[cfg(not(feature = "mcp"))]
let expected = "tools.web_search";
- assert!(tools
- .iter()
- .any(|tool| { tool.get("tool_id").and_then(Value::as_str) == Some(expected) }));
+ assert!(
+ tools
+ .iter()
+ .any(|tool| { tool.get("tool_id").and_then(Value::as_str) == Some(expected) })
+ );
}
#[tokio::test]
@@ -92,49 +94,63 @@ async fn handle_diagnostics_returns_counts() {
.await
.expect("diagnostics json");
let diagnostics = value.get("diagnostics").unwrap_or(&value);
- assert!(diagnostics
- .get("total_tools")
- .and_then(Value::as_u64)
- .is_some_and(|count| count > 0));
- assert!(diagnostics
- .get("policy_surfaces")
- .and_then(Value::as_array)
- .is_some());
+ assert!(
+ diagnostics
+ .get("total_tools")
+ .and_then(Value::as_u64)
+ .is_some_and(|count| count > 0)
+ );
+ assert!(
+ diagnostics
+ .get("policy_surfaces")
+ .and_then(Value::as_array)
+ .is_some()
+ );
// Expanded diagnostics surface for #2136.
let posture = diagnostics
.get("posture")
.and_then(Value::as_object)
.expect("posture");
- assert!(posture
- .get("autonomy_level")
- .and_then(Value::as_str)
- .is_some());
- assert!(posture
- .get("workspace_only")
- .and_then(Value::as_bool)
- .is_some());
+ assert!(
+ posture
+ .get("autonomy_level")
+ .and_then(Value::as_str)
+ .is_some()
+ );
+ assert!(
+ posture
+ .get("workspace_only")
+ .and_then(Value::as_bool)
+ .is_some()
+ );
let mcp_allowlists = diagnostics
.get("mcp_allowlists")
.and_then(Value::as_object)
.expect("mcp_allowlists");
- assert!(mcp_allowlists
- .get("server_count")
- .and_then(Value::as_u64)
- .is_some());
+ assert!(
+ mcp_allowlists
+ .get("server_count")
+ .and_then(Value::as_u64)
+ .is_some()
+ );
let mcp_write_audit = diagnostics
.get("mcp_write_audit")
.and_then(Value::as_object)
.expect("mcp_write_audit");
- assert!(mcp_write_audit
- .get("enabled")
- .and_then(Value::as_bool)
- .is_some());
+ assert!(
+ mcp_write_audit
+ .get("enabled")
+ .and_then(Value::as_bool)
+ .is_some()
+ );
- assert!(diagnostics
- .get("recent_denials")
- .and_then(Value::as_array)
- .is_some());
+ assert!(
+ diagnostics
+ .get("recent_denials")
+ .and_then(Value::as_array)
+ .is_some()
+ );
}
diff --git a/crates/openhuman-core/src/tools/rules/ops.rs b/crates/openhuman-core/src/tools/rules/ops.rs
index 1e3f31592b..0b18ccb81c 100644
--- a/crates/openhuman-core/src/tools/rules/ops.rs
+++ b/crates/openhuman-core/src/tools/rules/ops.rs
@@ -3,7 +3,7 @@
use std::sync::Arc;
use tinyagents_harness::tool::ToolRulePolicy;
-use tinytools::{glob_matches, RuleContext, RuleEffect, ToolRule, ToolRuleSet, ToolRules};
+use tinytools::{RuleContext, RuleEffect, ToolRule, ToolRuleSet, ToolRules, glob_matches};
use crate::agent_registry::host_definition::AgentDefinition;
use crate::config::Config;
diff --git a/crates/openhuman-core/src/tools/schemas/composio.rs b/crates/openhuman-core/src/tools/schemas/composio.rs
index 8dfb824b13..e5b7a11cb8 100644
--- a/crates/openhuman-core/src/tools/schemas/composio.rs
+++ b/crates/openhuman-core/src/tools/schemas/composio.rs
@@ -1,10 +1,10 @@
//! Handler for the `tools_composio_execute` controller schema.
use crate::core::runtime::DispatchCtx;
-use serde_json::{json, Map, Value};
+use serde_json::{Map, Value, json};
-use crate::core::all::ControllerFuture;
use crate::core::Outcome;
+use crate::core::all::ControllerFuture;
pub(super) fn handle_composio_execute(
ctx: DispatchCtx,
diff --git a/crates/openhuman-core/src/tools/schemas/web_search.rs b/crates/openhuman-core/src/tools/schemas/web_search.rs
index 65975aacb4..9240f682ab 100644
--- a/crates/openhuman-core/src/tools/schemas/web_search.rs
+++ b/crates/openhuman-core/src/tools/schemas/web_search.rs
@@ -4,7 +4,7 @@
//! RPC caller gets the same provider choice and fallback as the agent.
use crate::core::runtime::DispatchCtx;
-use serde_json::{json, Map, Value};
+use serde_json::{Map, Value, json};
use crate::core::all::ControllerFuture;
diff --git a/crates/openhuman-core/src/tools/schemas_tests.rs b/crates/openhuman-core/src/tools/schemas_tests.rs
index ba2dc37cc5..7fb21e718a 100644
--- a/crates/openhuman-core/src/tools/schemas_tests.rs
+++ b/crates/openhuman-core/src/tools/schemas_tests.rs
@@ -1,7 +1,7 @@
use super::*;
use crate::tools::schemas::registry::tools_schemas;
-use serde_json::{json, Map};
+use serde_json::{Map, json};
const BASE_CONTROLLERS: usize = 5;
#[test]
@@ -18,9 +18,11 @@ fn all_controllers_covers_the_base_surface() {
fn apify_linkedin_scrape_controller_is_retired() {
// The backend retired its Apify routes; the controller must not be
// registered or resolvable any more.
- assert!(!all_controller_schemas()
- .iter()
- .any(|s| s.function == "apify_linkedin_scrape"));
+ assert!(
+ !all_controller_schemas()
+ .iter()
+ .any(|s| s.function == "apify_linkedin_scrape")
+ );
assert_eq!(
tools_schemas("tools_apify_linkedin_scrape").function,
"unknown"
diff --git a/crates/openhuman-core/src/tools/toolpacks/mod.rs b/crates/openhuman-core/src/tools/toolpacks/mod.rs
index 9f70b5caa9..a62b54d2d0 100644
--- a/crates/openhuman-core/src/tools/toolpacks/mod.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/mod.rs
@@ -26,14 +26,14 @@ pub mod groups;
pub mod ops;
pub mod registry;
-pub use groups::{set_process_default, GroupMode, ToolGroups, GROUP_COUNT};
+pub use groups::{GROUP_COUNT, GroupMode, ToolGroups, set_process_default};
pub use ops::{
append_pack_tools, bind_pack_registry, bind_synthesized_pack_registry, close_handed_off_packs,
closed_by_direct_handoff, strip_packed_from_visible,
};
pub use registry::{
- all_packed_tool_names, callable_pack_ids, pack, pack_for_tool, pack_index_markdown_filtered,
- CATALOG, PACKS,
+ CATALOG, PACKS, all_packed_tool_names, callable_pack_ids, pack, pack_for_tool,
+ pack_index_markdown_filtered,
};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/tools/toolpacks/ops.rs b/crates/openhuman-core/src/tools/toolpacks/ops.rs
index 2e42a6a17e..7670dea7d5 100644
--- a/crates/openhuman-core/src/tools/toolpacks/ops.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/ops.rs
@@ -4,7 +4,7 @@ use std::collections::HashSet;
use std::sync::{Arc, Weak};
use super::registry;
-use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool, USE_SKILL};
+use tinyagents_harness::tool::packs::{PackRegistryHandle, USE_SKILL, UseSkillTool};
use tinytools::Tool;
/// Append `use_skill` to a freshly built registry.
diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rs
index a9705f65ae..bab39d2be3 100644
--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs
@@ -307,7 +307,13 @@ pub const PACKS: &[ToolPack] = &[
],
// `planner` and `critic` are workflow-run workers, not chat
// delegates; inspecting files is their loop, so they keep the family.
- owners: &["planner", "critic", "image_agent", "video_agent", "vision_agent"],
+ owners: &[
+ "planner",
+ "critic",
+ "image_agent",
+ "video_agent",
+ "vision_agent",
+ ],
guide: include_str!("guides/coding.md"),
},
ToolPack {
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
index 96457af298..d5b09ab615 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests.rs
@@ -8,7 +8,7 @@ use std::collections::HashSet;
use std::sync::Arc;
use async_trait::async_trait;
-use serde_json::{json, Value};
+use serde_json::{Value, json};
use super::*;
use tinyagents_harness::tool::packs::USE_SKILL;
diff --git a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
index 2923575f2d..dd60b6a9d2 100644
--- a/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/toolpacks_tests_scoping_and_visibility_tests.rs
@@ -2,7 +2,7 @@
//! execution distinction the whole pack mechanism rests on.
use super::*;
-use tinyagents_harness::tool::packs::{route_sentence, USE_SKILL};
+use tinyagents_harness::tool::packs::{USE_SKILL, route_sentence};
// ── the index must agree with the gate too ──────────────────────────────────
diff --git a/crates/openhuman-core/src/web_chat/turn_guards/backstop.rs b/crates/openhuman-core/src/web_chat/turn_guards/backstop.rs
index 6a2dccd2ec..4bb8a150b8 100644
--- a/crates/openhuman-core/src/web_chat/turn_guards/backstop.rs
+++ b/crates/openhuman-core/src/web_chat/turn_guards/backstop.rs
@@ -67,5 +67,5 @@ pub fn configured_backstop() -> Option<Duration> {
}
#[cfg(test)]
-#[path = "turn_backstop_tests.rs"]
+#[path = "backstop_tests.rs"]
mod tests;