The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
style: format code with rustfmt
Steven Enamakel76732bf7d8eb
diff --git a/crates/openhuman-core/src/agent/artifacts/ops_tests.rs b/crates/openhuman-core/src/agent/artifacts/ops_tests.rsindex e997100544..28aee5976e 100644--- a/crates/openhuman-core/src/agent/artifacts/ops_tests.rs+++ b/crates/openhuman-core/src/agent/artifacts/ops_tests.rs@@ -187,15 +187,39 @@ async fn delete_missing_id_error() {async fn regenerate_rejects_empty_id() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);- assert!(ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, "", "t", "c").await.is_err());+ assert!(ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "",+ "t",+ "c"+ )+ .await+ .is_err());}#[tokio::test]async fn regenerate_requires_thread_and_client() {let tmp = TempDir::new().unwrap();let config = test_config(&tmp);- assert!(ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, "id", "", "c").await.is_err());- assert!(ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, "id", "t", "").await.is_err());+ assert!(ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "id",+ "",+ "c"+ )+ .await+ .is_err());+ assert!(ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "id",+ "t",+ ""+ )+ .await+ .is_err());}#[tokio::test]@@ -228,7 +252,15 @@ async fn regenerate_rejects_non_presentation_kind() {.await.unwrap();- let err = ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, "doc-1", "t", "c").await.unwrap_err();+ let err = ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ "doc-1",+ "t",+ "c",+ )+ .await+ .unwrap_err();assert!(err.contains("only supported for presentations"),"unexpected error: {err}"@@ -259,9 +291,15 @@ async fn regenerate_errors_when_args_missing() {).await.unwrap();- let err = ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, &meta.id, "t", "c")- .await- .unwrap_err();+ let err = ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &meta.id,+ "t",+ "c",+ )+ .await+ .unwrap_err();assert!(err.contains("not regenerable"), "unexpected error: {err}");}@@ -298,9 +336,15 @@ async fn regenerate_reruns_producer_and_reuses_id() {.await.unwrap();- let outcome = ai_regenerate(&crate::core::runtime::DispatchCtx::ambient(), &config, &meta.id, "thread-1", "client-1")- .await- .unwrap();+ let outcome = ai_regenerate(+ &crate::core::runtime::DispatchCtx::ambient(),+ &config,+ &meta.id,+ "thread-1",+ "client-1",+ )+ .await+ .unwrap();let value = outcome.into_cli_compatible_json().unwrap();assert_eq!(value["artifact_id"], meta.id);assert_eq!(value["regenerated"], true);@@ -371,7 +415,9 @@ async fn get_returns_the_files_folder_path() {.await.unwrap();std::fs::write(&path, b"plan").unwrap();- finalize_artifact(tmp.path(), &meta.id, 4, None).await.unwrap();+ finalize_artifact(tmp.path(), &meta.id, 4, None)+ .await+ .unwrap();let value = ai_get_artifact(&config, &meta.id).await@@ -403,7 +449,9 @@ async fn get_reports_a_ready_file_removed_outside_openhuman() {.await.unwrap();std::fs::write(&path, b"plan").unwrap();- finalize_artifact(tmp.path(), &meta.id, 4, None).await.unwrap();+ finalize_artifact(tmp.path(), &meta.id, 4, None)+ .await+ .unwrap();std::fs::remove_file(&path).unwrap();let err = ai_get_artifact(&config, &meta.id).await.unwrap_err();diff --git a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rsindex 4b81254389..98c3143b82 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs@@ -215,9 +215,9 @@ impl ContextComposer for OpenHumanContextComposer {visible_tool_names: &visible_tool_names,tool_call_format: self.tool_call_format,connected_integrations: &self.connected_integrations,- connected_identities_md: render_connected_identities(- &DispatchCtx::from_weak(self.dispatch.as_ref()),- ),+ connected_identities_md: render_connected_identities(&DispatchCtx::from_weak(+ self.dispatch.as_ref(),+ )),user_identity: crate::security::credentials::identity::peek_credential_user_identity(),// TODO(phase4): the master agent's personality roster is built// from the profiles domain (`crate::profiles`); thediff --git a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rsindex abe5c12e72..b1b8df1577 100644--- a/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs+++ b/crates/openhuman-core/src/agent/tinyagents/host/run_context.rs@@ -414,11 +414,11 @@ pub(crate) struct HarnessHostPolicy {#[cfg(test)]pub(crate) use super::operation_context::tool_context_with_approval;+pub use super::operation_context::OpenHumanRunExt;pub(crate) use super::operation_context::{approval_for_tool, dispatch_ctx_for_tool, memory_identity_for_tool, parent_agent_id_for_tool,sandbox_mode_for_tool, task_recency_window_for_tool, HostOperationContext,};-pub use super::operation_context::OpenHumanRunExt;impl Default for OpenHumanRunContext {fn default() -> Self {