Skip to content

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

chore(scope): reorder module declarations and clean up formatting

Steven Enamakeld3ad4681d3be
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs
index 9be35ffb7d..e1102f9203 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/final_call_wrap_up.rs
@@ -227,7 +227,6 @@ impl FinalCallWrapUpMiddleware {
}
restored
}
-
}
impl FinalCallWrapUpMiddleware {
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_budget_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_budget_tests.rs
index 0ddd06243f..e705581fdf 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_budget_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_budget_tests.rs
@@ -95,6 +95,7 @@ async fn wrap_up_stops_restoring_at_the_input_budget() {
let big = "x".repeat(4_000);
let mw = FinalCallWrapUpMiddleware::new(
"CONCLUDE NOW",
+ "WRITE NOW",
sink_with(&[("call-1", &big), ("call-2", &big), ("call-3", &big)]),
// Room for roughly one of them, not three.
1_200,
@@ -282,7 +283,8 @@ async fn wrap_up_restoration_stays_bounded_when_no_window_is_advertised() {
.map(|(a, b)| (a.as_str(), b.as_str()))
.collect();
let (_toc, restore) = split_input_allowance(0);
- let mw = FinalCallWrapUpMiddleware::new("CONCLUDE NOW", "WRITE NOW", sink_with(&borrowed), restore);
+ let mw =
+ FinalCallWrapUpMiddleware::new("CONCLUDE NOW", "WRITE NOW", sink_with(&borrowed), restore);
let mut ctx = RunContext::new(
RunConfig::new("mw-test").with_max_model_calls(2),
crate::agent::tinyagents::host::OpenHumanRunContext::new(),
@@ -362,10 +364,15 @@ async fn both_middlewares_together_stay_inside_the_no_window_allowance() {
};
// Registration order at the install site: wrap-up first, contents list after.
- FinalCallWrapUpMiddleware::new("CONCLUDE NOW", "WRITE NOW", sink_with(&borrowed), restore_allowance)
- .before_model(&mut ctx, &(), &mut request)
- .await
- .unwrap();
+ FinalCallWrapUpMiddleware::new(
+ "CONCLUDE NOW",
+ "WRITE NOW",
+ sink_with(&borrowed),
+ restore_allowance,
+ )
+ .before_model(&mut ctx, &(), &mut request)
+ .await
+ .unwrap();
ArtifactIndexTocMiddleware::new(toc_allowance)
.before_model(&mut ctx, &(), &mut request)
.await
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs
index 8f3aaa7631..d0eb588255 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware_wrap_up_toc_tests.rs
@@ -220,6 +220,7 @@ async fn wrap_up_withdraws_tools_and_appends_the_instruction_on_the_last_call()
async fn wrap_up_restores_tool_results_microcompact_cleared() {
let mw = FinalCallWrapUpMiddleware::new(
"CONCLUDE NOW",
+ "WRITE NOW",
sink_with(&[
("call-old", "issue #41: auth bypass"),
("call-new", "issue #42: leak"),
@@ -261,8 +262,12 @@ async fn wrap_up_restores_tool_results_microcompact_cleared() {
/// the sink holds a different (e.g. later-truncated) copy for that id.
#[tokio::test]
async fn wrap_up_does_not_rewrite_a_result_that_was_never_cleared() {
- let mw =
- FinalCallWrapUpMiddleware::new("CONCLUDE NOW", "WRITE NOW", sink_with(&[("call-1", "FROM SINK")]), 0);
+ let mw = FinalCallWrapUpMiddleware::new(
+ "CONCLUDE NOW",
+ "WRITE NOW",
+ sink_with(&[("call-1", "FROM SINK")]),
+ 0,
+ );
let mut ctx = RunContext::new(
RunConfig::new("mw-test").with_max_model_calls(2),
crate::agent::tinyagents::host::OpenHumanRunContext::new(),
diff --git a/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs b/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs
index b0a290e055..d2e3a16399 100644
--- a/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs
+++ b/crates/openhuman-core/src/security/policy/policy_action_dir_tests.rs
@@ -82,4 +82,3 @@ fn from_config_does_not_grant_an_action_dir_covering_the_workspace() {
policy.trusted_roots
);
}
-
diff --git a/crates/openhuman-core/src/security/policy/policy_tests.rs b/crates/openhuman-core/src/security/policy/policy_tests.rs
index 9d27679132..7ac4d0d8f3 100644
--- a/crates/openhuman-core/src/security/policy/policy_tests.rs
+++ b/crates/openhuman-core/src/security/policy/policy_tests.rs
@@ -73,14 +73,14 @@ fn turn_workspace_policy() -> (tempfile::TempDir, PathBuf, SecurityPolicy) {
(root, checkout, policy)
}
+#[path = "policy_action_dir_tests.rs"]
+mod action_dir_tests;
#[path = "policy_allowlist_tests.rs"]
mod allowlist_tests;
#[path = "policy_injection_tests.rs"]
mod injection_tests;
#[path = "policy_paths_and_risk_tests.rs"]
mod paths_and_risk_tests;
-#[path = "policy_action_dir_tests.rs"]
-mod action_dir_tests;
#[path = "policy_trusted_roots_tests.rs"]
mod trusted_roots_tests;
#[path = "policy_workspace_internal_tests.rs"]
diff --git a/crates/openhuman-core/src/tools/toolpacks/registry.rs b/crates/openhuman-core/src/tools/toolpacks/registry.rs
index 941c244173..f4f60be124 100644
--- a/crates/openhuman-core/src/tools/toolpacks/registry.rs
+++ b/crates/openhuman-core/src/tools/toolpacks/registry.rs
@@ -254,13 +254,7 @@ pub const PACKS: &[ToolPack] = &[
// no file at all, and `meal-plan` burned eleven rounds discovering it
// had no writer. One ~300 B schema per turn is the right price for the
// single most common assistant task.
- tools: &[
- "file_read",
- "grep",
- "glob",
- "list",
- "git_operations",
- ],
+ tools: &["file_read", "grep", "glob", "list", "git_operations"],
owners: &[
"code_executor",
"critic",