Skip to content

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

style: format code to satisfy rustfmt

Steven Enamakel5ced97d9e123
diff --git a/crates/openhuman-core/src/agent/session_host/stop_summary.rs b/crates/openhuman-core/src/agent/session_host/stop_summary.rs
index ff8ca92b81..d43e4328b0 100644
--- a/crates/openhuman-core/src/agent/session_host/stop_summary.rs
+++ b/crates/openhuman-core/src/agent/session_host/stop_summary.rs
@@ -189,7 +189,10 @@ impl StopReasonKind {
};
tinyagents_harness::turn_stop::render_copy(
&OpenHumanStopCopy,
- &CopyRequest::TurnStop { key, operation: None },
+ &CopyRequest::TurnStop {
+ key,
+ operation: None,
+ },
)
}
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
index c16b596725..6cd72e7d23 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/repeated_failure.rs
@@ -16,9 +16,9 @@ use tinyagents_harness::middleware::{
};
use tinyagents_harness::no_progress::FailurePolicy;
use tinyagents_harness::steering::SteeringHandle;
+use tinyagents_harness::turn_stop::CopyProvider;
use tinyagents_hooks::stop::StopLatch;
use tinyagents_hooks::stop::{self, TerminalInferenceFailureKind};
-use tinyagents_harness::turn_stop::CopyProvider;
use tinyinference_llm::tool::ToolCall as TaToolCall;
use tinytools::ToolResult as TaToolResult;
@@ -31,7 +31,10 @@ use tinyinference_llm::failure::is_recoverable_failure_text as is_recoverable_to
struct OpenHumanHaltCopy;
impl CopyProvider for OpenHumanHaltCopy {
- fn copy_override(&self, request: &tinyagents_harness::turn_stop::CopyRequest<'_>) -> Option<String> {
+ fn copy_override(
+ &self,
+ request: &tinyagents_harness::turn_stop::CopyRequest<'_>,
+ ) -> Option<String> {
use tinyagents_harness::turn_stop::{CopyRequest, TurnStopCopyKey};
match request {
@@ -78,11 +81,17 @@ pub(crate) fn user_actionable_escalation(tool: &str, error: &str) -> Option<Stri
})
}
-pub(crate) fn terminal_inference_failure_kind(result: &str) -> Option<TerminalInferenceFailureKind> {
+pub(crate) fn terminal_inference_failure_kind(
+ result: &str,
+) -> Option<TerminalInferenceFailureKind> {
tinyagents_hooks::stop::terminal_inference_failure_kind(result)
}
-pub(crate) fn terminal_inference_halt_summary(kind: TerminalInferenceFailureKind, tool: &str, error: &str) -> String {
+pub(crate) fn terminal_inference_halt_summary(
+ kind: TerminalInferenceFailureKind,
+ tool: &str,
+ error: &str,
+) -> String {
match kind {
TerminalInferenceFailureKind::BudgetExhausted => {
stop::halt_summary::budget(&OpenHumanHaltCopy, tool, error).summary
@@ -97,7 +106,11 @@ pub(crate) fn recoverable_identical_halt_summary(tool: &str, count: u32, error:
stop::halt_summary::retry_exhausted(&OpenHumanHaltCopy, tool, count, error).summary
}
-pub(crate) fn recoverable_no_progress_halt_summary(consecutive: u32, tool: &str, error: &str) -> String {
+pub(crate) fn recoverable_no_progress_halt_summary(
+ consecutive: u32,
+ tool: &str,
+ error: &str,
+) -> String {
stop::halt_summary::no_progress(&OpenHumanHaltCopy, consecutive, tool, error).summary
}
@@ -364,7 +377,8 @@ impl FailureScopePolicy<OpenHumanRunContext> for HostFailurePolicy {
class: match kind {
TerminalInferenceFailureKind::BudgetExhausted => "out_of_credits",
TerminalInferenceFailureKind::ProviderConfig => "provider_config",
- }.to_owned(),
+ }
+ .to_owned(),
operation: call.name.clone(),
summary,
}),
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs
index 3d39b2da40..5d690fc7c6 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_loop_guard_tests.rs
@@ -1,5 +1,7 @@
use super::*;
-use crate::agent::tinyagents::middleware::repeated_failure::RepeatedToolFailureMiddleware;
+use crate::agent::tinyagents::middleware::repeated_failure::{
+ user_actionable_escalation, RepeatedToolFailureMiddleware,
+};
#[test]
fn repeated_tool_failure_middleware_observes_outcomes_after_control_requests() {
diff --git a/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs b/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs
index f996e37863..9b71b5abab 100644
--- a/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs
+++ b/crates/openhuman-core/src/web_chat/web_tests_error_copy_fixture_tests.rs
@@ -255,8 +255,9 @@ fn shared_budget_matcher_reproduces_each_legacy_matcher_on_the_corpus() {
);
let delegated = format!("All providers/models failed: {message}");
assert_eq!(
- crate::agent::tinyagents::middleware::repeated_failure::terminal_inference_failure_kind(&delegated)
- == Some(tinyagents_hooks::stop::TerminalInferenceFailureKind::BudgetExhausted),
+ crate::agent::tinyagents::middleware::repeated_failure::terminal_inference_failure_kind(
+ &delegated
+ ) == Some(tinyagents_hooks::stop::TerminalInferenceFailureKind::BudgetExhausted),
legacy_billing_matcher(message),
"loop-guard matcher drifted on {message:?}"
);