Skip to content

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

chore: reformat code to comply with rustfmt

Steven Enamakel897a42ba6892
diff --git a/src/openhuman/agent/agent_tests.rs b/src/openhuman/agent/agent_tests.rs
index b9b597ec7c..6f8abd0d9a 100644
--- a/src/openhuman/agent/agent_tests.rs
+++ b/src/openhuman/agent/agent_tests.rs
@@ -104,9 +104,7 @@ impl ChatModel<()> for FailingProvider {
_state: &(),
_request: ModelRequest,
) -> tinyinference::Result<ModelResponse> {
- Err(tinyinference::Error::Model(
- "provider error".to_string(),
- ))
+ Err(tinyinference::Error::Model("provider error".to_string()))
}
}
diff --git a/src/openhuman/agent/dispatcher.rs b/src/openhuman/agent/dispatcher.rs
index f4795be6f0..7824e50f38 100644
--- a/src/openhuman/agent/dispatcher.rs
+++ b/src/openhuman/agent/dispatcher.rs
@@ -39,11 +39,11 @@ use crate::openhuman::agent::pformat::PFormatRegistry;
use crate::openhuman::inference::provider::{ChatResponse, ToolCall};
use crate::openhuman::tools::{Tool, ToolSpec};
use serde_json::Value;
-use tinyinference::tool::ToolSchema;
use tinyagents_harness::tool_calling::dialect::{
DialectMessage, DialectResponse, DialectRole, NativeDialect, NativeToolCall, PFormatDialect,
ToolDialect, ToolOutcome, ToolResultEntry, TranscriptEntry, XmlDialect,
};
+use tinyinference::tool::ToolSchema;
/// A parsed tool call representation after being extracted from an LLM response.
#[derive(Debug, Clone)]
diff --git a/src/openhuman/agent/harness/graph_tests.rs b/src/openhuman/agent/harness/graph_tests.rs
index acda052a04..b6a187049d 100644
--- a/src/openhuman/agent/harness/graph_tests.rs
+++ b/src/openhuman/agent/harness/graph_tests.rs
@@ -1,9 +1,9 @@
use super::*;
use crate::openhuman::tools::ToolResult;
use async_trait::async_trait;
+use tinyagents_harness::testkit::ScriptedModel;
use tinyinference::message::AssistantMessage;
use tinyinference::model::{ChatModel, ModelProfile, ModelResponse};
-use tinyagents_harness::testkit::ScriptedModel;
use tinyinference::tool::ToolCall;
struct PingTool;
diff --git a/src/openhuman/agent/harness/session/builder/factory.rs b/src/openhuman/agent/harness/session/builder/factory.rs
index 8695913ec4..bda5d419e9 100644
--- a/src/openhuman/agent/harness/session/builder/factory.rs
+++ b/src/openhuman/agent/harness/session/builder/factory.rs
@@ -665,20 +665,19 @@ impl Agent {
let full_config = Arc::clone(&base_config);
// For cloud reflection, wrap the provider in an Arc.
// For local, no provider needed.
- let reflection_provider: Option<
- Arc<dyn tinyinference::model::ChatModel<()>>,
- > = if config.learning.reflection_source
- == crate::openhuman::config::ReflectionSource::Cloud
- {
- let (model, resolved_model) =
- provider::create_chat_model_with_model_id("reasoning", config, 0.3)?;
- log::debug!(
+ let reflection_provider: Option<Arc<dyn tinyinference::model::ChatModel<()>>> =
+ if config.learning.reflection_source
+ == crate::openhuman::config::ReflectionSource::Cloud
+ {
+ let (model, resolved_model) =
+ provider::create_chat_model_with_model_id("reasoning", config, 0.3)?;
+ log::debug!(
"[learning] built crate-native reflection model resolved_model={resolved_model}"
);
- Some(model)
- } else {
- None
- };
+ Some(model)
+ } else {
+ None
+ };
post_turn_hooks.push(Arc::new(
crate::openhuman::agent::learning::ReflectionHook::new(
config.learning.clone(),
diff --git a/src/openhuman/agent/harness/session/runtime_tests.rs b/src/openhuman/agent/harness/session/runtime_tests.rs
index be5751966b..4be97902ec 100644
--- a/src/openhuman/agent/harness/session/runtime_tests.rs
+++ b/src/openhuman/agent/harness/session/runtime_tests.rs
@@ -9,9 +9,7 @@ use anyhow::anyhow;
use async_trait::async_trait;
use parking_lot::Mutex;
use std::sync::Arc;
-use tinyinference::model::{
- ChatModel, ModelRequest, ModelResponse, ModelStream, ModelStreamItem,
-};
+use tinyinference::model::{ChatModel, ModelRequest, ModelResponse, ModelStream, ModelStreamItem};
use tokio::sync::Mutex as AsyncMutex;
use tokio::time::{sleep, Duration};
@@ -44,7 +42,11 @@ impl ChatModel<()> for StaticModel {
}
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let response = self.invoke(state, request).await?;
Ok(Box::pin(futures::stream::iter(vec![
ModelStreamItem::Started,
@@ -93,9 +95,7 @@ impl ChatModel<()> for PersistentErrModel {
_state: &(),
_request: ModelRequest,
) -> tinyinference::Result<ModelResponse> {
- Err(tinyinference::Error::Model(
- self.build_error().to_string(),
- ))
+ Err(tinyinference::Error::Model(self.build_error().to_string()))
}
}
diff --git a/src/openhuman/agent/harness/session/session_tests.rs b/src/openhuman/agent/harness/session/session_tests.rs
index 2e09f3af26..9437488206 100644
--- a/src/openhuman/agent/harness/session/session_tests.rs
+++ b/src/openhuman/agent/harness/session/session_tests.rs
@@ -56,7 +56,11 @@ impl ChatModel<()> for MockProvider {
)
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let response = self.invoke(state, request).await?;
Ok(Box::pin(futures::stream::iter(vec![
ModelStreamItem::Started,
@@ -121,7 +125,11 @@ impl ChatModel<()> for RecordingProvider {
)
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let response = self.invoke(state, request).await?;
Ok(Box::pin(futures::stream::iter(vec![
ModelStreamItem::Started,
@@ -366,7 +374,11 @@ impl tinyagents_harness::memory::ChatHistory for FakeSessionHistory {
async fn append(&self, _thread_id: &str, _message: Message) -> tinyagents_harness::Result<()> {
Ok(())
}
- async fn replace(&self, _thread_id: &str, _messages: Vec<Message>) -> tinyagents_harness::Result<()> {
+ async fn replace(
+ &self,
+ _thread_id: &str,
+ _messages: Vec<Message>,
+ ) -> tinyagents_harness::Result<()> {
Ok(())
}
async fn clear(&self, _thread_id: &str) -> tinyagents_harness::Result<()> {
diff --git a/src/openhuman/agent/harness/session/transcript_history.rs b/src/openhuman/agent/harness/session/transcript_history.rs
index ef2d41d73c..b6b6ae5cda 100644
--- a/src/openhuman/agent/harness/session/transcript_history.rs
+++ b/src/openhuman/agent/harness/session/transcript_history.rs
@@ -153,8 +153,8 @@ use std::sync::Arc;
use async_trait::async_trait;
use tinyagents_harness::memory::ChatHistory;
-use tinyinference::message::Message;
use tinyagents_harness::{Result as TaResult, TinyAgentsError};
+use tinyinference::message::Message;
use crate::openhuman::agent::message_convert::{history_to_messages, message_to_chat_message};
use crate::openhuman::agent::messages::ChatMessage;
diff --git a/src/openhuman/agent/harness/session/transcript_history_tests.rs b/src/openhuman/agent/harness/session/transcript_history_tests.rs
index 9040e7bd7e..47e52a51fc 100644
--- a/src/openhuman/agent/harness/session/transcript_history_tests.rs
+++ b/src/openhuman/agent/harness/session/transcript_history_tests.rs
@@ -43,9 +43,7 @@ fn history(dir: &TempDir) -> SessionTranscriptHistory {
fn user(text: &str) -> Message {
Message::User(tinyinference::message::UserMessage {
- content: vec![tinyinference::message::ContentBlock::Text(
- text.to_string(),
- )],
+ content: vec![tinyinference::message::ContentBlock::Text(text.to_string())],
})
}
diff --git a/src/openhuman/agent/harness/session/turn_tests.rs b/src/openhuman/agent/harness/session/turn_tests.rs
index 5737493a68..531f308f70 100644
--- a/src/openhuman/agent/harness/session/turn_tests.rs
+++ b/src/openhuman/agent/harness/session/turn_tests.rs
@@ -104,7 +104,11 @@ impl ChatModel<()> for SequenceProvider {
}
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
// The legacy fixture implemented `chat` but did not write provider
// deltas. Preserve that non-streaming wire behavior: the harness still
// receives the authoritative completed response, while turn-owned
diff --git a/src/openhuman/agent/harness/subagent_runner/ops/graph_tests.rs b/src/openhuman/agent/harness/subagent_runner/ops/graph_tests.rs
index ab7d288dbd..0350d632f3 100644
--- a/src/openhuman/agent/harness/subagent_runner/ops/graph_tests.rs
+++ b/src/openhuman/agent/harness/subagent_runner/ops/graph_tests.rs
@@ -146,7 +146,11 @@ impl ChatModel<()> for ThinkingStreamProvider {
Ok(ModelResponse::assistant("Hello"))
}
- async fn stream(&self, _state: &(), _request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ _state: &(),
+ _request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let response = ModelResponse::assistant("Hello");
Ok(Box::pin(futures::stream::iter(vec![
ModelStreamItem::Started,
diff --git a/src/openhuman/agent/harness/subagent_runner/ops_tests.rs b/src/openhuman/agent/harness/subagent_runner/ops_tests.rs
index f3ee9c1382..783411da68 100644
--- a/src/openhuman/agent/harness/subagent_runner/ops_tests.rs
+++ b/src/openhuman/agent/harness/subagent_runner/ops_tests.rs
@@ -157,7 +157,11 @@ impl ChatModel<()> for ScriptedProvider {
Ok(self.take_response(request))
}
- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ _state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let response = self.take_response(request);
let reasoning = response
.message
diff --git a/src/openhuman/agent/harness/tool_result_artifacts/mod.rs b/src/openhuman/agent/harness/tool_result_artifacts/mod.rs
index dca1dcb190..c77c040015 100644
--- a/src/openhuman/agent/harness/tool_result_artifacts/mod.rs
+++ b/src/openhuman/agent/harness/tool_result_artifacts/mod.rs
@@ -136,7 +136,12 @@ impl Store for ToolResultArtifactIndexStore {
Ok(guard.get(namespace).and_then(|ns| ns.get(key).cloned()))
}
- async fn put(&self, namespace: &str, key: &str, value: Value) -> tinyagents_harness::Result<()> {
+ async fn put(
+ &self,
+ namespace: &str,
+ key: &str,
+ value: Value,
+ ) -> tinyagents_harness::Result<()> {
let mut guard = self.data.lock().map_err(|_| {
tinyagents_harness::TinyAgentsError::Memory("tool artifact index poisoned".into())
})?;
diff --git a/src/openhuman/agent/orchestration/agent_teams/runtime_tests.rs b/src/openhuman/agent/orchestration/agent_teams/runtime_tests.rs
index f18f49cee7..c9210db6bb 100644
--- a/src/openhuman/agent/orchestration/agent_teams/runtime_tests.rs
+++ b/src/openhuman/agent/orchestration/agent_teams/runtime_tests.rs
@@ -21,11 +21,11 @@ use crate::openhuman::agent::harness::fork_context::{with_parent_context, Parent
use crate::openhuman::config::{AgentConfig, Config};
use crate::openhuman::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};
use crate::openhuman::tools::{Tool, ToolSpec};
-use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};
use tinyagents_session::run_ledger::{
self, AgentTeamMemberStatus, AgentTeamMemberUpsert, AgentTeamStatus, AgentTeamTaskStatus,
AgentTeamTaskUpsert, AgentTeamUpsert,
};
+use tinyinference::model::{ChatModel, ModelRequest, ModelResponse};
// ── Mocks (mirror workflow_runs::engine_tests) ──────────────────────────────
diff --git a/src/openhuman/agent/orchestration/tools/tools_e2e_tests.rs b/src/openhuman/agent/orchestration/tools/tools_e2e_tests.rs
index cb56bf413e..138da84bfb 100644
--- a/src/openhuman/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/src/openhuman/agent/orchestration/tools/tools_e2e_tests.rs
@@ -12,9 +12,9 @@ use parking_lot::Mutex;
use serde_json::json;
use std::path::Path;
use std::sync::Arc;
+use tinycortex::memory::conversations;
use tinyinference::message::Message;
use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
-use tinycortex::memory::conversations;
const SPAWN_SUBAGENT_CANARY: &str = "tool-e2e-spawn-subagent-canary";
const ARCHETYPE_DELEGATION_CANARY: &str = "tool-e2e-archetype-delegation-canary";
diff --git a/src/openhuman/agent/orchestration/workflow_runs/engine_tests.rs b/src/openhuman/agent/orchestration/workflow_runs/engine_tests.rs
index 7bf43a5a22..5859fe282a 100644
--- a/src/openhuman/agent/orchestration/workflow_runs/engine_tests.rs
+++ b/src/openhuman/agent/orchestration/workflow_runs/engine_tests.rs
@@ -30,8 +30,8 @@ use crate::openhuman::agent::harness::fork_context::{with_parent_context, Parent
use crate::openhuman::config::{AgentConfig, Config};
use crate::openhuman::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};
use crate::openhuman::tools::{Tool, ToolSpec};
-use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use tinyagents_session::run_ledger::{get_workflow_run, upsert_workflow_run, WorkflowRunUpsert};
+use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
use super::super::types::{WorkflowDefinition, WorkflowPhase, WorkflowSafetyTier};
diff --git a/src/openhuman/agent/prompts/sections.rs b/src/openhuman/agent/prompts/sections.rs
index 61ef764216..6e1da38294 100644
--- a/src/openhuman/agent/prompts/sections.rs
+++ b/src/openhuman/agent/prompts/sections.rs
@@ -12,8 +12,8 @@ use super::render_helpers::{
use super::types::*;
use anyhow::Result;
use std::fmt::Write;
-use tinyinference::tool::ToolSchema;
use tinyagents_harness::tool_calling::dialect::render_pformat_catalogue;
+use tinyinference::tool::ToolSchema;
// ─────────────────────────────────────────────────────────────────────────────
// Special sections (archetype, dynamic, reflection)
diff --git a/src/openhuman/agent/registry/agents/researcher/graph.rs b/src/openhuman/agent/registry/agents/researcher/graph.rs
index 2988f6f1c1..95085ff9a0 100644
--- a/src/openhuman/agent/registry/agents/researcher/graph.rs
+++ b/src/openhuman/agent/registry/agents/researcher/graph.rs
@@ -11,9 +11,7 @@ use std::pin::Pin;
use std::sync::Arc;
use tinyagents_graph::export::GraphTopology;
-use tinyagents_graph::{
- ClosureStateReducer, CompiledGraph, GraphBuilder, NodeContext, NodeResult,
-};
+use tinyagents_graph::{ClosureStateReducer, CompiledGraph, GraphBuilder, NodeContext, NodeResult};
use tokio::sync::Mutex;
use crate::openhuman::agent::harness::agent_graph::{
@@ -43,8 +41,9 @@ enum ResearcherGraphUpdate {
PhaseEntered(&'static str),
}
-type ResearcherGraphNodeFuture =
- Pin<Box<dyn Future<Output = tinyagents_harness::Result<NodeResult<ResearcherGraphUpdate>>> + Send>>;
+type ResearcherGraphNodeFuture = Pin<
+ Box<dyn Future<Output = tinyagents_harness::Result<NodeResult<ResearcherGraphUpdate>>> + Send>,
+>;
fn phase_node(
phase: &'static str,
diff --git a/src/openhuman/agent/tinyagents/delegation.rs b/src/openhuman/agent/tinyagents/delegation.rs
index 6d339e5131..e657c72241 100644
--- a/src/openhuman/agent/tinyagents/delegation.rs
+++ b/src/openhuman/agent/tinyagents/delegation.rs
@@ -112,8 +112,7 @@ where
F: Fn(DelegationStage, DelegationState) -> Fut + Clone + Send + Sync + 'static,
Fut: Future<Output = Result<DelegationStageOutput, String>> + Send + 'static,
{
- tinyagents_graph::delegation::run_delegation_durable(with_tracing_sink(config), run_stage)
- .await
+ tinyagents_graph::delegation::run_delegation_durable(with_tracing_sink(config), run_stage).await
}
/// Resume a delegation graph parked on a durable human-approval interrupt,
diff --git a/src/openhuman/agent/tinyagents/host/model_resolver.rs b/src/openhuman/agent/tinyagents/host/model_resolver.rs
index a351926822..49dd56b524 100644
--- a/src/openhuman/agent/tinyagents/host/model_resolver.rs
+++ b/src/openhuman/agent/tinyagents/host/model_resolver.rs
@@ -69,10 +69,8 @@ use std::sync::{Arc, Mutex};
use async_trait::async_trait;
use tinyagents_harness::error::TinyAgentsError;
use tinyagents_harness::host::{ModelResolveRequest, ModelResolver};
-use tinyinference::model::{
- ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream,
-};
use tinyagents_harness::Result as TaResult;
+use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse, ModelStream};
use crate::openhuman::config::Config;
use crate::openhuman::inference::provider::{create_chat_model_with_model_id, role_for_model_tier};
diff --git a/src/openhuman/agent/tinyagents/host/model_resolver_tests.rs b/src/openhuman/agent/tinyagents/host/model_resolver_tests.rs
index 91a103c717..027df55003 100644
--- a/src/openhuman/agent/tinyagents/host/model_resolver_tests.rs
+++ b/src/openhuman/agent/tinyagents/host/model_resolver_tests.rs
@@ -138,7 +138,11 @@ struct EchoModel(&'static str);
#[async_trait]
impl ChatModel<()> for EchoModel {
- async fn invoke(&self, _state: &(), _request: ModelRequest) -> tinyinference::Result<ModelResponse> {
+ async fn invoke(
+ &self,
+ _state: &(),
+ _request: ModelRequest,
+ ) -> tinyinference::Result<ModelResponse> {
Ok(ModelResponse::assistant(self.0))
}
}
diff --git a/src/openhuman/agent/tinyagents/middleware_tests.rs b/src/openhuman/agent/tinyagents/middleware_tests.rs
index 0d75d648a8..61db505206 100644
--- a/src/openhuman/agent/tinyagents/middleware_tests.rs
+++ b/src/openhuman/agent/tinyagents/middleware_tests.rs
@@ -1,10 +1,10 @@
use super::*;
use serde_json::json;
use tinyagents_harness::context::{RunConfig, RunContext};
-use tinyinference::model::ModelRequest;
use tinyagents_harness::no_progress::{
DEFAULT_REPEAT_CALL_THRESHOLD, DEFAULT_REPEAT_OUTPUT_THRESHOLD,
};
+use tinyinference::model::ModelRequest;
fn ctx() -> RunContext<()> {
RunContext::new(RunConfig::new("mw-test"), ())
diff --git a/src/openhuman/agent/tinyagents/model.rs b/src/openhuman/agent/tinyagents/model.rs
index 3fc5dec8a9..1fabd88b24 100644
--- a/src/openhuman/agent/tinyagents/model.rs
+++ b/src/openhuman/agent/tinyagents/model.rs
@@ -440,12 +440,20 @@ impl ChatModel<()> for RouteRecordingModel {
self.inner.profile()
}
- async fn invoke(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelResponse> {
+ async fn invoke(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelResponse> {
self.record_route();
self.inner.invoke(state, request).await
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
self.record_route();
self.inner.stream(state, request).await
}
@@ -488,13 +496,21 @@ impl ChatModel<()> for ProfileOverrideModel {
Some(&self.profile)
}
- async fn invoke(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelResponse> {
+ async fn invoke(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelResponse> {
self.inner
.invoke(state, self.pin_request_options(request))
.await
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
self.inner
.stream(state, self.pin_request_options(request))
.await
@@ -522,11 +538,19 @@ impl ChatModel<()> for MaxTokensModel {
self.inner.profile()
}
- async fn invoke(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelResponse> {
+ async fn invoke(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelResponse> {
self.inner.invoke(state, self.cap(request)).await
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
self.inner.stream(state, self.cap(request)).await
}
}
diff --git a/src/openhuman/agent/tinyagents/retriever.rs b/src/openhuman/agent/tinyagents/retriever.rs
index f55c295414..c39f293b09 100644
--- a/src/openhuman/agent/tinyagents/retriever.rs
+++ b/src/openhuman/agent/tinyagents/retriever.rs
@@ -43,10 +43,10 @@ use std::collections::HashSet;
use std::sync::{Arc, OnceLock};
use serde_json::json;
+use tinyagents_harness::events::{AgentEvent, EventSink};
use tinyinference::embeddings::{
EmbeddingModel as TaEmbeddingModel, InMemoryVectorStore, Retriever, ScoredDoc,
};
-use tinyagents_harness::events::{AgentEvent, EventSink};
use super::ProviderEmbeddingModel;
use crate::openhuman::inference::embeddings::EmbeddingProvider;
diff --git a/src/openhuman/agent/tinyagents/routes.rs b/src/openhuman/agent/tinyagents/routes.rs
index 88b55c221a..78fbf1af8f 100644
--- a/src/openhuman/agent/tinyagents/routes.rs
+++ b/src/openhuman/agent/tinyagents/routes.rs
@@ -6,9 +6,9 @@ use async_trait::async_trait;
use tinyagents_harness::context::RunContext;
use tinyagents_harness::events::AgentEvent;
use tinyagents_harness::middleware::{MiddlewareModelOutcome, ModelHandler, ModelMiddleware};
-use tinyinference::model::{CapabilitySet, ModelRequest};
use tinyagents_harness::retry::FallbackPolicy;
use tinyagents_registry::{ModelRouter, WorkloadRoute};
+use tinyinference::model::{CapabilitySet, ModelRequest};
use crate::openhuman::config::{
MODEL_AGENTIC_V1, MODEL_BURST_V1, MODEL_CHAT_V1, MODEL_CODING_V1, MODEL_REASONING_V1,
diff --git a/src/openhuman/agent/tinyagents/steering_forwarder.rs b/src/openhuman/agent/tinyagents/steering_forwarder.rs
index b872ec7c8f..df05d38040 100644
--- a/src/openhuman/agent/tinyagents/steering_forwarder.rs
+++ b/src/openhuman/agent/tinyagents/steering_forwarder.rs
@@ -28,8 +28,8 @@ use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::time::Duration;
-use tinyinference::message::Message as TaMessage;
use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};
+use tinyinference::message::Message as TaMessage;
use crate::core::bus::BUS;
use crate::core::events::DomainEvent;
diff --git a/src/openhuman/agent/tinyagents/stop_hooks.rs b/src/openhuman/agent/tinyagents/stop_hooks.rs
index fd26ccbc05..0afc5bcb78 100644
--- a/src/openhuman/agent/tinyagents/stop_hooks.rs
+++ b/src/openhuman/agent/tinyagents/stop_hooks.rs
@@ -27,8 +27,8 @@ use std::sync::{Arc, Mutex};
use async_trait::async_trait;
use tinyagents_harness::context::RunContext;
use tinyagents_harness::middleware::Middleware;
-use tinyinference::model::ModelResponse;
use tinyagents_harness::steering::{SteeringCommand, SteeringHandle};
+use tinyinference::model::ModelResponse;
use crate::openhuman::agent::cost::TurnCost;
use crate::openhuman::agent::stop_hooks::{StopDecision, StopHook, TurnState};
diff --git a/src/openhuman/agent/tinyagents/summarize.rs b/src/openhuman/agent/tinyagents/summarize.rs
index e0fe95398c..0fd7af566b 100644
--- a/src/openhuman/agent/tinyagents/summarize.rs
+++ b/src/openhuman/agent/tinyagents/summarize.rs
@@ -28,10 +28,10 @@ use std::sync::{Arc, Mutex};
use async_trait::async_trait;
use tinyagents_harness::error::{Result as TaResult, TinyAgentsError};
-use tinyinference::message::Message as TaMessage;
use tinyagents_harness::summarization::{
estimate_tokens, CompressionProvenance, SummarizationPolicy, Summarizer, SummaryRecord,
};
+use tinyinference::message::Message as TaMessage;
use tinyinference::message::Message as HarnessMessage;
use tinyinference::model::{ChatModel, ModelRequest};
diff --git a/src/openhuman/agent/tinyagents/tools.rs b/src/openhuman/agent/tinyagents/tools.rs
index 03bdbe78f6..cd23d37380 100644
--- a/src/openhuman/agent/tinyagents/tools.rs
+++ b/src/openhuman/agent/tinyagents/tools.rs
@@ -108,7 +108,11 @@ impl Tool<()> for ToolAdapter {
tool_policy_from_openhuman_tool(self.inner.as_ref())
}
- async fn call(&self, _state: &(), call: TaToolCall) -> tinyagents_harness::Result<TaToolResult> {
+ async fn call(
+ &self,
+ _state: &(),
+ call: TaToolCall,
+ ) -> tinyagents_harness::Result<TaToolResult> {
Ok(execute_openhuman_tool(self.inner.as_ref(), call, None).await)
}
@@ -376,7 +380,11 @@ impl Tool<()> for SharedToolAdapter {
self.policy.clone()
}
- async fn call(&self, _state: &(), call: TaToolCall) -> tinyagents_harness::Result<TaToolResult> {
+ async fn call(
+ &self,
+ _state: &(),
+ call: TaToolCall,
+ ) -> tinyagents_harness::Result<TaToolResult> {
self.call_openhuman_tool(call, None).await
}
diff --git a/src/openhuman/flows/tinyflows/caps/ops.rs b/src/openhuman/flows/tinyflows/caps/ops.rs
index 2034fcd5a5..70d9b9f3a5 100644
--- a/src/openhuman/flows/tinyflows/caps/ops.rs
+++ b/src/openhuman/flows/tinyflows/caps/ops.rs
@@ -225,7 +225,9 @@ async fn flow_tool_allowed(
/// offline (a registry lookup) so the common cataloged-toolkit path never pays
/// for a connected-set fetch.
fn slug_needs_connected_set(slug: &str) -> bool {
- use crate::openhuman::integrations::composio::providers::{catalog_for_toolkit, toolkit_from_slug};
+ use crate::openhuman::integrations::composio::providers::{
+ catalog_for_toolkit, toolkit_from_slug,
+ };
match toolkit_from_slug(slug) {
Some(toolkit) => catalog_for_toolkit(&toolkit).is_none(),
None => false,
diff --git a/src/openhuman/inference/local/service/model_rpc.rs b/src/openhuman/inference/local/service/model_rpc.rs
index afefd02d59..5549cf5fb9 100644
--- a/src/openhuman/inference/local/service/model_rpc.rs
+++ b/src/openhuman/inference/local/service/model_rpc.rs
@@ -152,9 +152,7 @@ fn model_outcome(
.content
.iter()
.filter_map(|block| match block {
- tinyinference::message::ContentBlock::Thinking { text, .. } => {
- Some(text.as_str())
- }
+ tinyinference::message::ContentBlock::Thinking { text, .. } => Some(text.as_str()),
_ => None,
})
.collect::<Vec<_>>()
diff --git a/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs b/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
index fb6aaf5776..9a1d69fcd2 100644
--- a/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
+++ b/src/openhuman/inference/provider/claude_agent_sdk/subprocess.rs
@@ -2,9 +2,9 @@
use anyhow::Context;
use async_trait::async_trait;
+use tinyagents_harness::tool::{coalesce_prompt_tool_results, with_prompt_tool_instructions};
use tinyinference::message::Message;
use tinyinference::model::{ChatModel, ModelProfile, ModelRequest, ModelResponse};
-use tinyagents_harness::tool::{coalesce_prompt_tool_results, with_prompt_tool_instructions};
use tokio::io::{AsyncBufReadExt, AsyncWriteExt, BufReader};
use tokio::process::Command;
use tokio::time::{timeout, Duration};
diff --git a/src/openhuman/inference/provider/claude_code/mod.rs b/src/openhuman/inference/provider/claude_code/mod.rs
index d113655172..d742230d09 100644
--- a/src/openhuman/inference/provider/claude_code/mod.rs
+++ b/src/openhuman/inference/provider/claude_code/mod.rs
@@ -235,7 +235,11 @@ impl ChatModel<()> for ClaudeCodeProvider {
Ok(crate::openhuman::agent::tinyagents::model::native_model_response(&response))
}
- async fn stream(&self, _state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ _state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let provider = self.clone();
let label = self.model.clone();
let (item_tx, item_rx) = tokio::sync::mpsc::unbounded_channel::<ModelStreamItem>();
diff --git a/src/openhuman/inference/provider/factory_tests_part_02_tests.rs b/src/openhuman/inference/provider/factory_tests_part_02_tests.rs
index a3b9e1f95a..45787281da 100644
--- a/src/openhuman/inference/provider/factory_tests_part_02_tests.rs
+++ b/src/openhuman/inference/provider/factory_tests_part_02_tests.rs
@@ -74,9 +74,9 @@ fn enforce_local_only_inference_errors_on_external_when_local_only() {
#[tokio::test]
async fn create_chat_model_uses_native_test_override() {
use std::sync::Arc;
+ use tinyagents_harness::testkit::ScriptedModel;
use tinyinference::message::Message;
use tinyinference::model::ModelRequest;
- use tinyagents_harness::testkit::ScriptedModel;
let _guard = crate::openhuman::inference::inference_test_guard();
diff --git a/src/openhuman/inference/provider/openhuman_backend_model.rs b/src/openhuman/inference/provider/openhuman_backend_model.rs
index f13b4e7d63..c944c17a50 100644
--- a/src/openhuman/inference/provider/openhuman_backend_model.rs
+++ b/src/openhuman/inference/provider/openhuman_backend_model.rs
@@ -481,7 +481,11 @@ impl ChatModel<()> for OpenHumanBackendModel {
Some(&self.profile)
}
- async fn invoke(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelResponse> {
+ async fn invoke(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelResponse> {
let model = self.build_wire_model()?;
let response = match model.invoke(state, with_thread_id(request)).await {
Ok(response) => response,
@@ -494,7 +498,11 @@ impl ChatModel<()> for OpenHumanBackendModel {
Ok(project_managed_usage(response))
}
- async fn stream(&self, state: &(), request: ModelRequest) -> tinyinference::Result<ModelStream> {
+ async fn stream(
+ &self,
+ state: &(),
+ request: ModelRequest,
+ ) -> tinyinference::Result<ModelStream> {
let model = self.build_wire_model()?;
// NOTE (streaming billing parity): the crate SSE parser sets `raw: None`
// on the terminal `Completed` response, so the `openhuman.billing` envelope
diff --git a/src/openhuman/integrations/composio/identity_store.rs b/src/openhuman/integrations/composio/identity_store.rs
index 2e01ae13ae..14cd19ab5d 100644
--- a/src/openhuman/integrations/composio/identity_store.rs
+++ b/src/openhuman/integrations/composio/identity_store.rs
@@ -22,7 +22,10 @@
use crate::openhuman::config::Config;
use crate::openhuman::memory::api::provider::FacetType;
-use tinymemory_api::composio::{canonicalize, normalize_connection_identifier, ConnectedIdentity, IdentityKind, ProviderUserProfile};
+use tinymemory_api::composio::{
+ canonicalize, normalize_connection_identifier, ConnectedIdentity, IdentityKind,
+ ProviderUserProfile,
+};
/// Persist one [`ProviderUserProfile`] as identity facets, returning how many
/// rows were written.
@@ -62,7 +65,15 @@ pub async fn persist_provider_profile(
let key = format!("skill:{toolkit}:{identifier}:{}", kind.as_str());
let facet_id = format!("skill-{toolkit}-{identifier}-{}", kind.as_str());
match profile_family
- .upsert_provider_facet(&facet_id, FacetType::Workflow, &key, &value, kind.confidence(), None, now)
+ .upsert_provider_facet(
+ &facet_id,
+ FacetType::Workflow,
+ &key,
+ &value,
+ kind.confidence(),
+ None,
+ now,
+ )
.await
{
Ok(()) => written += 1,
@@ -92,7 +103,10 @@ pub async fn persist_provider_profile(
/// Expand a [`ProviderUserProfile`] (and provider-specific `extras`) into the
/// canonical `(kind, value)` rows. **All per-toolkit quirks live here**; the
/// matcher only sees normalized tuples.
-fn expand_identity_rows(toolkit: &str, profile: &ProviderUserProfile) -> Vec<(IdentityKind, String)> {
+fn expand_identity_rows(
+ toolkit: &str,
+ profile: &ProviderUserProfile,
+) -> Vec<(IdentityKind, String)> {
let mut rows: Vec<(IdentityKind, String)> = Vec::new();
let mut push = |kind: IdentityKind, raw: Option<&str>| {
if let Some(v) = raw.and_then(|s| canonicalize(kind, s)) {
diff --git a/src/openhuman/integrations/composio/mod.rs b/src/openhuman/integrations/composio/mod.rs
index 8d7ec8c0cf..aab5d1e747 100644
--- a/src/openhuman/integrations/composio/mod.rs
+++ b/src/openhuman/integrations/composio/mod.rs
@@ -48,10 +48,10 @@ pub mod execute_dispatch;
pub mod execute_prepare;
pub mod googlecalendar_args;
pub mod identity;
+pub mod identity_store;
pub mod module_client;
pub mod oauth_handoff;
pub mod ops;
-pub mod identity_store;
pub mod periodic;
pub mod profile_md;
pub mod providers;
@@ -62,12 +62,13 @@ pub mod trigger_history;
pub mod types;
pub use crate::openhuman::agent::prompts::types::ConnectedIntegration;
-pub use crate::openhuman::integrations::composio::providers::{ProviderUserProfile, SyncOutcome, SyncReason};
+pub use crate::openhuman::integrations::composio::providers::{
+ ProviderUserProfile, SyncOutcome, SyncReason,
+};
pub use crate::openhuman::memory::sync::composio::bus::{
register_composio_trigger_subscriber, ComposioConfigChangedSubscriber,
ComposioTriggerSubscriber,
};
-pub use periodic::{record_sync_success, start_periodic_sync};
pub use action_tool::ComposioActionTool;
pub use client::ComposioClient;
pub use identity::connection_identity;
@@ -76,6 +77,7 @@ pub use ops::{
fetch_connected_integrations, fetch_connected_integrations_status, fetch_toolkit_actions,
invalidate_connected_integrations_cache, FetchConnectedIntegrationsStatus,
};
+pub use periodic::{record_sync_success, start_periodic_sync};
pub use schemas::{
all_controller_schemas as all_composio_controller_schemas,
all_registered_controllers as all_composio_registered_controllers,
diff --git a/src/openhuman/integrations/composio/ops/connections.rs b/src/openhuman/integrations/composio/ops/connections.rs
index d84276a897..8dbb4962ed 100644
--- a/src/openhuman/integrations/composio/ops/connections.rs
+++ b/src/openhuman/integrations/composio/ops/connections.rs
@@ -11,13 +11,13 @@ use super::super::connected_integrations::{
sync_cache_with_connections, FetchConnectedIntegrationsStatus,
};
use super::super::identity_store::{delete_connected_identity_facets, load_connected_identities};
-use tinymemory_api::composio::normalize_connection_identifier;
use super::super::types::{
ComposioAuthorizeRequest, ComposioAuthorizeResponse, ComposioConnectionsResponse,
ComposioDeleteConnectionRequest, ComposioDeleteResponse,
};
use super::error_utils::{direct_mode_without_key, report_composio_op_error, OpResult};
use super::memory_cleanup::composio_memory_targets_for_connection;
+use tinymemory_api::composio::normalize_connection_identifier;
pub async fn composio_list_connections(
config: &Config,
@@ -274,13 +274,15 @@ pub(crate) async fn enrich_connections_with_identity(
config: &Config,
mut resp: ComposioConnectionsResponse,
) -> ComposioConnectionsResponse {
- let identities = load_connected_identities(config).await.unwrap_or_else(|error| {
- tracing::debug!(
- %error,
- "[composio] enrich_connections_with_identity: load_connected_identities failed"
- );
- Vec::new()
- });
+ let identities = load_connected_identities(config)
+ .await
+ .unwrap_or_else(|error| {
+ tracing::debug!(
+ %error,
+ "[composio] enrich_connections_with_identity: load_connected_identities failed"
+ );
+ Vec::new()
+ });
if identities.is_empty() {
tracing::debug!(
"[composio] enrich_connections_with_identity: no cached identities yet \
diff --git a/src/openhuman/integrations/composio/ops/toolkits.rs b/src/openhuman/integrations/composio/ops/toolkits.rs
index 2f82acc310..17e1396b05 100644
--- a/src/openhuman/integrations/composio/ops/toolkits.rs
+++ b/src/openhuman/integrations/composio/ops/toolkits.rs
@@ -54,15 +54,13 @@ pub async fn composio_list_capabilities(
// in-process pipeline by tinymemory v1.13.4. The connector module now
// answers this directly — `ListCapabilities` already returns exactly
// this reply shape, so there is no host-side matrix or conversion left.
- let resp = connectors::call_bare::<ComposioCapabilitiesResponse>(
- config,
- methods::LIST_CAPABILITIES,
- )
- .await
- .map_err(|error| {
- report_composio_op_error("list_capabilities", &anyhow::anyhow!("{error}"));
- format!("[composio] list_capabilities failed: {error}")
- })?;
+ let resp =
+ connectors::call_bare::<ComposioCapabilitiesResponse>(config, methods::LIST_CAPABILITIES)
+ .await
+ .map_err(|error| {
+ report_composio_op_error("list_capabilities", &anyhow::anyhow!("{error}"));
+ format!("[composio] list_capabilities failed: {error}")
+ })?;
let count = resp.capabilities.len();
Ok(RpcOutcome::new(
resp,
diff --git a/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs b/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
index 7d87bc6ea3..f7c161a932 100644
--- a/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
+++ b/src/openhuman/integrations/composio/ops_tests_part_02_tests.rs
@@ -352,7 +352,6 @@ async fn composio_get_user_profile_via_mock_returns_provider_profile() {
// TEST_ENV_LOCK alone does not serialize against those. Hold both.
let _backend_env_guard = crate::api::config::backend_env_test_lock();
-
let app = Router::new()
.route(
"/agent-integrations/composio/connections",
@@ -506,7 +505,6 @@ async fn composio_sync_gmail_via_mock_ingests_records_and_updates_outcome() {
// medulla's tests on the same process-global var.
let _backend_env_guard = crate::api::config::backend_env_test_lock();
-
let app = Router::new()
.route(
"/agent-integrations/composio/connections",
diff --git a/src/openhuman/integrations/task_sources/pipeline_tests.rs b/src/openhuman/integrations/task_sources/pipeline_tests.rs
index 068c5e14a9..ebe9bfda0a 100644
--- a/src/openhuman/integrations/task_sources/pipeline_tests.rs
+++ b/src/openhuman/integrations/task_sources/pipeline_tests.rs
@@ -100,7 +100,10 @@ async fn refusal_records_a_fetch_history_entry() {
// source has never ingested anything, rather than looking silently idle.
let sources = store::list_sources(&config).unwrap();
let recorded = sources.iter().find(|s| s.id == source.id);
- assert!(recorded.is_some(), "source must still be listed after a refused fetch");
+ assert!(
+ recorded.is_some(),
+ "source must still be listed after a refused fetch"
+ );
}
#[tokio::test]
diff --git a/src/openhuman/memory/read_rpc/admin.rs b/src/openhuman/memory/read_rpc/admin.rs
index e44006d3fb..b994f24569 100644
--- a/src/openhuman/memory/read_rpc/admin.rs
+++ b/src/openhuman/memory/read_rpc/admin.rs
@@ -1,9 +1,9 @@
use anyhow::{Context, Result};
use crate::openhuman::config::Config;
-use tinycortex::memory::sync::state::STATE_NAMESPACE as KV_NAMESPACE;
use crate::openhuman::memory::api::provider::ForgetSelector;
use crate::rpc::RpcOutcome;
+use tinycortex::memory::sync::state::STATE_NAMESPACE as KV_NAMESPACE;
use tinymemory_api::chunks::SourceKind;
use super::types::{
diff --git a/src/openhuman/memory/read_rpc_tests.rs b/src/openhuman/memory/read_rpc_tests.rs
index b337554b7d..135f7cb801 100644
--- a/src/openhuman/memory/read_rpc_tests.rs
+++ b/src/openhuman/memory/read_rpc_tests.rs
@@ -1,11 +1,11 @@
use super::*;
use crate::openhuman::inference::embeddings::NoopEmbedding;
-use tinycortex::memory::sync::state::STATE_NAMESPACE as KV_NAMESPACE;
use chrono::{TimeZone, Utc};
use rusqlite::params;
use std::sync::Arc;
use tempfile::TempDir;
use tinycortex::memory::ingest::canonicalize::chat::{ChatBatch, ChatMessage};
+use tinycortex::memory::sync::state::STATE_NAMESPACE as KV_NAMESPACE;
use tinymemory_core::ingest_pipeline::ingest_chat;
use tinymemory_core::queue::drain_until_idle;
use tinymemory_core::store::content::raw::{write_raw_items, RawItem, RawKind};
diff --git a/src/openhuman/memory/sources/reconcile.rs b/src/openhuman/memory/sources/reconcile.rs
index 3004aa841f..1f3119b315 100644
--- a/src/openhuman/memory/sources/reconcile.rs
+++ b/src/openhuman/memory/sources/reconcile.rs
@@ -87,7 +87,8 @@ pub async fn ensure_composio_sources() -> Option<HashSet<String>> {
// Run the one-time caps migration after the reconcile loop so any
// sources upserted just above are also considered. Still the engine's —
// it only ever read the registry, never the deleted pipeline.
- if let Err(e) = tinymemory_core::sources::reconcile::apply_composio_source_caps_migration().await
+ if let Err(e) =
+ tinymemory_core::sources::reconcile::apply_composio_source_caps_migration().await
{
tracing::warn!(
error = %e,
diff --git a/src/openhuman/modules/memory_host.rs b/src/openhuman/modules/memory_host.rs
index 80b06e1a3e..2099885d88 100644
--- a/src/openhuman/modules/memory_host.rs
+++ b/src/openhuman/modules/memory_host.rs
@@ -35,9 +35,9 @@
use crate::core::bus::BUS;
use crate::openhuman::config::Config;
use std::sync::Arc;
-use tinyinference::model::{ModelRequest, ModelResponse};
use tinybus::ObjectPath;
use tinyconnectors_bus::{ComposioConnection, ComposioExecuteResponse};
+use tinyinference::model::{ModelRequest, ModelResponse};
use tinymemory_api::host::{MemoryEvent, SpacyResponse};
const EMBEDDING_NAME: &str = "ai.tinyhumans.tinymemory.EmbeddingHost";
diff --git a/src/openhuman/threads/goals/mod.rs b/src/openhuman/threads/goals/mod.rs
index ed0227b48c..998d6bfdd6 100644
--- a/src/openhuman/threads/goals/mod.rs
+++ b/src/openhuman/threads/goals/mod.rs
@@ -15,6 +15,6 @@ mod schemas;
pub mod store;
pub mod tools;
-pub use tinyagents_graph::goals::{ThreadGoal, ThreadGoalStatus};
pub use schemas::{all_thread_goals_controller_schemas, all_thread_goals_registered_controllers};
+pub use tinyagents_graph::goals::{ThreadGoal, ThreadGoalStatus};
pub use tools::{GoalCompleteTool, GoalGetTool, GoalSetTool};
diff --git a/src/openhuman/web_chat/progress_bridge.rs b/src/openhuman/web_chat/progress_bridge.rs
index b440c7ec4f..23f139f7c4 100644
--- a/src/openhuman/web_chat/progress_bridge.rs
+++ b/src/openhuman/web_chat/progress_bridge.rs
@@ -142,8 +142,7 @@ pub(super) fn ledger_append_event(
config: &crate::openhuman::config::Config,
event: tinyagents_session::run_ledger::RunEventAppend,
) {
- if let Err(err) =
- tinyagents_session::run_ledger::append_run_event(&config.workspace_dir, event)
+ if let Err(err) = tinyagents_session::run_ledger::append_run_event(&config.workspace_dir, event)
{
log::warn!("[run_ledger][web_channel] failed to append event: {err}");
}
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index 1fc16027be..77ed5cb8b7 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -10785,7 +10785,11 @@ async fn json_rpc_task_sources_fetch_pipeline_e2e() {
.as_array()
.expect("tasks array")
.clone();
- assert_eq!(tasks_arr.len(), 0, "nothing can be routed without fetch_tasks");
+ assert_eq!(
+ tasks_arr.len(),
+ 0,
+ "nothing can be routed without fetch_tasks"
+ );
// A second fetch refuses identically — the refusal is not a one-shot
// fluke, it is the pipeline's steady state for every toolkit.