Skip to content

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

chore: clean up imports and formatting

Steven Enamakel815d2740b28b
diff --git a/crates/openhuman-core/src/agent/harness/mod.rs b/crates/openhuman-core/src/agent/harness/mod.rs
index 88f34d26f2..b718eede17 100644
--- a/crates/openhuman-core/src/agent/harness/mod.rs
+++ b/crates/openhuman-core/src/agent/harness/mod.rs
@@ -26,9 +26,9 @@ pub mod artifact_offload;
pub(crate) mod builtin_definitions;
pub mod definition;
pub(crate) mod definition_loader;
-pub(crate) mod memory_context_safety;
pub mod fork_context;
pub(crate) mod graph;
+pub(crate) mod memory_context_safety;
pub mod sandbox_context;
pub(crate) mod spawn_depth_context;
pub mod task_recency_context;
diff --git a/crates/openhuman-core/src/agent/prompts/mod.rs b/crates/openhuman-core/src/agent/prompts/mod.rs
index eb313285b6..ee64def1b7 100644
--- a/crates/openhuman-core/src/agent/prompts/mod.rs
+++ b/crates/openhuman-core/src/agent/prompts/mod.rs
@@ -20,11 +20,10 @@ pub mod render_helpers;
pub use render_helpers::{
current_datetime_line, default_workspace_file_content, inject_inline_content,
inject_snapshot_content, inject_workspace_file, inject_workspace_file_capped,
- memory_date_label, render_ambient_environment, render_datetime,
- render_identity, render_runtime, render_safety,
- render_subagent_system_prompt, render_subagent_system_prompt_with_format, render_tools,
- render_user_files, render_user_identity, render_user_reflections,
- render_workspace, sync_workspace_file
+ memory_date_label, render_ambient_environment, render_datetime, render_identity,
+ render_runtime, render_safety, render_subagent_system_prompt,
+ render_subagent_system_prompt_with_format, render_tools, render_user_files,
+ render_user_identity, render_user_reflections, render_workspace, sync_workspace_file,
};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/prompts/render_helpers.rs b/crates/openhuman-core/src/agent/prompts/render_helpers.rs
index 9df3f2b052..aad757c777 100644
--- a/crates/openhuman-core/src/agent/prompts/render_helpers.rs
+++ b/crates/openhuman-core/src/agent/prompts/render_helpers.rs
@@ -17,9 +17,9 @@ mod subagent;
mod workspace_files;
pub use section_renderers::{
- current_datetime_line, memory_date_label, render_ambient_environment,
- render_datetime, render_identity, render_runtime, render_safety,
- render_tools, render_user_files, render_user_identity, render_user_reflections, render_workspace,
+ current_datetime_line, memory_date_label, render_ambient_environment, render_datetime,
+ render_identity, render_runtime, render_safety, render_tools, render_user_files,
+ render_user_identity, render_user_reflections, render_workspace,
};
pub(crate) use subagent::harness_json_tool_prompt;
pub use subagent::{render_subagent_system_prompt, render_subagent_system_prompt_with_format};
diff --git a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs
index 4fdfce61aa..7369e83a35 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime/run_loop.rs
@@ -134,5 +134,4 @@ impl OpenHumanSessionHost {
}
}
}
-
}
diff --git a/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs b/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs
index 67fc5361da..ea64a627ee 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime/turn_helpers.rs
@@ -88,5 +88,4 @@ impl OpenHumanSessionHost {
.join(" ");
truncate_with_ellipsis(&scrubbed, Self::EVENT_ERROR_MAX_CHARS)
}
-
}
diff --git a/crates/openhuman-core/src/agent/session_host/turn/context.rs b/crates/openhuman-core/src/agent/session_host/turn/context.rs
index 37a0cb3526..4fc9420f82 100644
--- a/crates/openhuman-core/src/agent/session_host/turn/context.rs
+++ b/crates/openhuman-core/src/agent/session_host/turn/context.rs
@@ -9,7 +9,6 @@ use crate::tools::agent_policy::render_tool_policy_boundary;
use anyhow::Result;
impl OpenHumanSessionHost {
-
/// Builds the system prompt for the current turn, including tool
/// instructions and learned context.
pub fn build_system_prompt(&self, learned: LearnedContextData) -> Result<String> {
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs
index 2e4b75ff38..37bdf50d20 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/budget_gate.rs
@@ -143,7 +143,6 @@ impl OpenHumanBudgetGate {
fn attributed_model(&self) -> String {
self.last_model.read().clone()
}
-
}
#[async_trait]
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
index 67569f7831..ae94e97e58 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/security_gate.rs
@@ -79,7 +79,7 @@ use std::collections::HashMap;
use std::sync::{Arc, Mutex};
use async_trait::async_trait;
-use tinyagents_harness::error::{Result as TaResult};
+use tinyagents_harness::error::Result as TaResult;
use tinyagents_harness::host::security_gate::{
ContentOrigin, GateDecision, ScreenOutcome, SecurityGate, ToolCallRequest,
};
diff --git a/crates/openhuman-core/src/agent/triage/evaluator.rs b/crates/openhuman-core/src/agent/triage/evaluator.rs
index a395d46835..61191e50d9 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator.rs
@@ -38,9 +38,9 @@ pub use arm::TRIGGER_TRIAGE_AGENT_ID;
pub(crate) use chain::begin_outage_attempt;
#[cfg(test)]
pub(crate) use chain::record_outage;
+pub use chain::run_triage;
#[cfg(test)]
pub(crate) use chain::run_triage_with_arms_for_test_with_state;
-pub use chain::{run_triage};
pub use outcome::{TriageOutcome, TriageResolutionPath, TriageRun};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/core/types.rs b/crates/openhuman-core/src/core/types.rs
index 550c915bf0..1a867a84c9 100644
--- a/crates/openhuman-core/src/core/types.rs
+++ b/crates/openhuman-core/src/core/types.rs
@@ -28,7 +28,6 @@ impl InvocationResult {
logs: vec![],
})
}
-
}
/// Formats an [`InvocationResult`] into its standard JSON-RPC format.
diff --git a/crates/openhuman-core/src/cron/scheduler_gate/mod.rs b/crates/openhuman-core/src/cron/scheduler_gate/mod.rs
index 15655f50c4..d128b05379 100644
--- a/crates/openhuman-core/src/cron/scheduler_gate/mod.rs
+++ b/crates/openhuman-core/src/cron/scheduler_gate/mod.rs
@@ -24,8 +24,7 @@
pub mod gate;
pub use gate::{
- current_policy, init_global, is_signed_out, set_signed_out, wait_for_capacity,
- LlmPermit,
+ current_policy, init_global, is_signed_out, set_signed_out, wait_for_capacity, LlmPermit,
};
pub use gate::{PauseReason, Policy, Signals};
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
index 1fdc50467d..70376e0711 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
@@ -1,6 +1,6 @@
use super::*;
-use tinyflows::nodes::integration::agent_prompt::scale_timeout_for_iteration_cap;
use tinyagents_harness::tool::response_fields_from_schema;
+use tinyflows::nodes::integration::agent_prompt::scale_timeout_for_iteration_cap;
/// The tier gate an `http_request` (Network-class) node calls: BLOCKED under
/// a read-only tier, and passed through (to the ApprovalGate) under
diff --git a/crates/openhuman-core/src/inference/provider/mod.rs b/crates/openhuman-core/src/inference/provider/mod.rs
index 4b27440b7d..bd4880bc70 100644
--- a/crates/openhuman-core/src/inference/provider/mod.rs
+++ b/crates/openhuman-core/src/inference/provider/mod.rs
@@ -16,9 +16,7 @@ pub mod ops;
pub mod types;
#[allow(unused_imports)]
-pub use types::{
- ChatResponse, ProviderDelta, UsageInfo, AGENT_TURN_MAX_OUTPUT_TOKENS,
-};
+pub use types::{ChatResponse, ProviderDelta, UsageInfo, AGENT_TURN_MAX_OUTPUT_TOKENS};
pub use error_code::{
backend_error_code_skips_sentry, body_flags_malformed, extract_backend_error_code,
diff --git a/crates/openhuman-core/src/inference/provider/ops/mod.rs b/crates/openhuman-core/src/inference/provider/ops/mod.rs
index cdeaab0810..1e793209b1 100644
--- a/crates/openhuman-core/src/inference/provider/ops/mod.rs
+++ b/crates/openhuman-core/src/inference/provider/ops/mod.rs
@@ -35,8 +35,7 @@ pub use models::{
};
pub use provider_factory::{
- list_providers,
- ProviderInfo, ProviderRuntimeOptions, INFERENCE_BACKEND_ID,
+ list_providers, ProviderInfo, ProviderRuntimeOptions, INFERENCE_BACKEND_ID,
};
// ── test re-exports for ops_tests.rs ──
diff --git a/crates/openhuman-core/src/inference/provider/types.rs b/crates/openhuman-core/src/inference/provider/types.rs
index 60bf91ad3c..cb3c6f93f2 100644
--- a/crates/openhuman-core/src/inference/provider/types.rs
+++ b/crates/openhuman-core/src/inference/provider/types.rs
@@ -24,9 +24,7 @@ pub struct ChatResponse {
pub reasoning_content: Option<String>,
}
-impl ChatResponse {
-
-}
+impl ChatResponse {}
/// A fine-grained streaming event emitted by a provider while serving a
/// `chat()` call. Providers that support SSE/streaming forward these to
diff --git a/crates/openhuman-core/src/runtime/pool/types.rs b/crates/openhuman-core/src/runtime/pool/types.rs
index a81179bac0..46b7703979 100644
--- a/crates/openhuman-core/src/runtime/pool/types.rs
+++ b/crates/openhuman-core/src/runtime/pool/types.rs
@@ -33,7 +33,6 @@ impl PoolLang {
Self::Python => Language::python(),
}
}
-
}
/// The result of running one job on a pooled worker.
diff --git a/crates/openhuman-core/src/security/audit.rs b/crates/openhuman-core/src/security/audit.rs
index 18777bf66a..483e6e9b05 100644
--- a/crates/openhuman-core/src/security/audit.rs
+++ b/crates/openhuman-core/src/security/audit.rs
@@ -149,7 +149,6 @@ impl AuditEvent {
});
self
}
-
}
/// Audit logger
diff --git a/crates/openhuman-core/src/security/devices/crypto.rs b/crates/openhuman-core/src/security/devices/crypto.rs
index 92298ee02c..063ae6f395 100644
--- a/crates/openhuman-core/src/security/devices/crypto.rs
+++ b/crates/openhuman-core/src/security/devices/crypto.rs
@@ -99,7 +99,6 @@ impl DeviceKeypair {
pub fn private_bytes(&self) -> [u8; 32] {
self.private.to_bytes()
}
-
}
// ---------------------------------------------------------------------------
diff --git a/crates/openhuman-core/src/security/devices/rpc.rs b/crates/openhuman-core/src/security/devices/rpc.rs
index 758b0a617b..88546d9526 100644
--- a/crates/openhuman-core/src/security/devices/rpc.rs
+++ b/crates/openhuman-core/src/security/devices/rpc.rs
@@ -15,9 +15,7 @@ use std::sync::{Arc, Mutex};
use crate::config::Config;
use crate::core::Outcome;
-use crate::security::devices::crypto::{
- base64url_encode, DeviceKeypair, TunnelCipher,
-};
+use crate::security::devices::crypto::{base64url_encode, DeviceKeypair, TunnelCipher};
use crate::security::devices::store;
use crate::security::devices::tunnel_client;
use crate::security::devices::types::{
diff --git a/crates/openhuman-core/src/security/encryption/core.rs b/crates/openhuman-core/src/security/encryption/core.rs
index fbb3a20718..350c648e8d 100644
--- a/crates/openhuman-core/src/security/encryption/core.rs
+++ b/crates/openhuman-core/src/security/encryption/core.rs
@@ -84,7 +84,6 @@ impl EncryptionKey {
.decrypt(nonce, payload.ciphertext.as_ref())
.map_err(|e| format!("Decryption failed: {e}"))
}
-
}
/// Get the path to the OpenHuman data directory.
diff --git a/crates/openhuman-core/src/tools/ops.rs b/crates/openhuman-core/src/tools/ops.rs
index ab5839f707..f640c0de63 100644
--- a/crates/openhuman-core/src/tools/ops.rs
+++ b/crates/openhuman-core/src/tools/ops.rs
@@ -446,7 +446,10 @@ pub fn all_tools_with_runtime(
Box::new(ReadDiffTool::new(action_dir.to_path_buf())),
Box::new(RunLinterTool::new(action_dir.to_path_buf())),
Box::new(RunTestsTool::new(action_dir.to_path_buf())),
- Box::new(PushoverTool::new(security.clone(), action_dir.to_path_buf())),
+ Box::new(PushoverTool::new(
+ security.clone(),
+ action_dir.to_path_buf(),
+ )),
// Audio-toolkit podcast tools — gated with the `voice` feature (they
// live in the `audio_toolkit` domain, which is compiled out when voice
// is disabled).
diff --git a/crates/openhuman-core/src/util/mod.rs b/crates/openhuman-core/src/util/mod.rs
index 2861300c05..9cf362c0da 100644
--- a/crates/openhuman-core/src/util/mod.rs
+++ b/crates/openhuman-core/src/util/mod.rs
@@ -36,8 +36,7 @@ pub use params::{read_optional, read_required};
pub use redact::redact_url_for_log;
pub use retry::{is_transient_fs_error, retry_with_backoff, retry_with_backoff_async};
pub use text::{
- ceil_char_boundary, floor_char_boundary, truncate_at_byte_boundary,
- truncate_with_ellipsis, truncate_with_suffix,
- utf8_safe_prefix_at_byte_boundary,
+ ceil_char_boundary, floor_char_boundary, truncate_at_byte_boundary, truncate_with_ellipsis,
+ truncate_with_suffix, utf8_safe_prefix_at_byte_boundary,
};
pub use types::MaybeSet;
diff --git a/crates/openhuman-core/src/voice/audio_toolkit/mod.rs b/crates/openhuman-core/src/voice/audio_toolkit/mod.rs
index d26d445b65..aa4c98f3f0 100644
--- a/crates/openhuman-core/src/voice/audio_toolkit/mod.rs
+++ b/crates/openhuman-core/src/voice/audio_toolkit/mod.rs
@@ -11,7 +11,7 @@ mod types;
pub use ops::{
email_podcast, generate_and_email_podcast, generate_podcast, resolve_email_capture_dir,
};
-pub use schemas::{all_audio_toolkit_registered_controllers};
+pub use schemas::all_audio_toolkit_registered_controllers;
pub use types::{
AudioEmailDeliveryResult, AudioFormat, AudioGenerateRequest, AudioGeneratedArtifact,
AudioToolkitGenerateAndEmailResult, EmailPodcastRequest,