Skip to content

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

refactor(core): adjust imports and reorder items

Steven Enamakeld7cfe051e973
diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
index ca547cb91d..ce212b6148 100644
--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
@@ -22,12 +22,12 @@
use std::sync::Arc;
-use anyhow::{Result, anyhow};
+use anyhow::{anyhow, Result};
use tinyagents_harness::context::RunContext;
use tinyagents_harness::summarization::payload_summarizer::{
- PayloadSummarizer as HarnessPayloadSummarizer, run_unary_summary, summary_child_config,
+ run_unary_summary, summary_child_config, PayloadSummarizer as HarnessPayloadSummarizer,
};
-use tinyagents_orchestration::subagent::{SubagentRole, subagent_framing};
+use tinyagents_orchestration::subagent::{subagent_framing, SubagentRole};
use tracing::debug;
use crate::agent::subagent_host;
@@ -46,10 +46,10 @@ use {
/// way supplies its own. The prompt is not part of this — TinyJuice writes it
/// and sends it in the [`GenerateRequest`].
pub type DynPayloadSummarizer = dyn HarnessPayloadSummarizer<
- OpenHumanRunContext,
- Prepared = PreparedGenerate,
- Error = anyhow::Error,
- >;
+ OpenHumanRunContext,
+ Prepared = PreparedGenerate,
+ Error = anyhow::Error,
+>;
/// Runs the `summarizer` agent definition's model as a unary child of the turn.
pub struct SubagentPayloadSummarizer {
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops.rs b/crates/openhuman-core/src/inference/host_runtime/ops.rs
index 57014e5b60..bd9ac3d152 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops.rs
@@ -14,11 +14,11 @@ mod runtime_ops;
mod turn_guards;
pub use agent_chat::{
- AgentChatEnv, AgentChatReply, AgentChatTarget, agent_chat, agent_chat_for,
- agent_chat_reply_for, agent_chat_reply_for_controlled, agent_chat_simple,
+ agent_chat, agent_chat_for, agent_chat_reply_for, agent_chat_reply_for_controlled,
+ agent_chat_simple, AgentChatEnv, AgentChatReply, AgentChatTarget,
};
pub use complete_once::{
- CompletionEndpoint, complete_once, complete_once_controlled, complete_once_observed,
+ complete_once, complete_once_controlled, complete_once_observed, CompletionEndpoint,
};
pub use runtime_ops::{
local_ai_prompt, local_ai_status, local_ai_summarize, local_ai_transcribe,
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs
index 94dba635de..054633c972 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use serde_json::{Value, json};
+use serde_json::{json, Value};
use tinyinference_llm::message::Message;
use tinyinference_llm::model::ResponseFormat;
use tinyinference_llm::tool::ToolSchema;
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs
index 812781e2b7..1e205115c8 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs
@@ -4,7 +4,7 @@
use crate::config::Config;
use crate::security::prompt_injection::{
- PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,
+ enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,
};
pub(super) fn prompt_guard_user_message(action: PromptEnforcementAction) -> &'static str {
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs
index eebbbce151..1877deed9d 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs
@@ -280,7 +280,7 @@ async fn effective_origin_defaults_to_direct_chat_outside_any_scope() {
/// see, not the blanket `Cli` allowance this RPC would otherwise impose.
#[tokio::test]
async fn effective_origin_keeps_an_embedder_scoped_label() {
- use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource, with_origin};
+ use crate::security::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};
let observed = with_origin(
AgentTurnOrigin::TrustedAutomation {
job_id: "run-7".to_string(),
@@ -308,7 +308,7 @@ async fn effective_origin_keeps_an_embedder_scoped_label() {
/// touched, not a silent fall-through to the orchestrator.
#[tokio::test]
async fn agent_chat_for_rejects_an_unknown_agent_id() {
- use crate::inference::host_runtime::ops::{AgentChatTarget, agent_chat_for};
+ use crate::inference::host_runtime::ops::{agent_chat_for, AgentChatTarget};
let tmp = tempfile::tempdir().unwrap();
let mut config = test_config(&tmp);
std::fs::create_dir_all(&config.workspace_dir).unwrap();