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
chore: reformat code for consistent style
Steven Enamakele4e26a05e453
diff --git a/src/core/runtime/context.rs b/src/core/runtime/context.rsindex ba40ff7f98..06272e6c17 100644--- a/src/core/runtime/context.rs+++ b/src/core/runtime/context.rs@@ -180,12 +180,13 @@ impl CoreContext {.unwrap_or_else(|| cfg.config_path.clone())}).unwrap_or_else(|| {- crate::openhuman::config::default_root_openhuman_dir()- .unwrap_or_else(|_| {+ crate::openhuman::config::default_root_openhuman_dir().unwrap_or_else(+ |_| {dirs::home_dir().unwrap_or_else(|| std::path::PathBuf::from(".")).join(".openhuman")- })+ },+ )});crate::core::auth::init_rpc_token(&token_dir)?;std::env::var(crate::core::auth::CORE_TOKEN_ENV_VAR)@@ -204,9 +205,7 @@ impl CoreContext {// A supplied config is authoritative: no disk read, no env overlay,// and no `Err` arm to reach, because there was nothing to fail.Some(cfg) => {- log::debug!(- "[core-context] init: using caller-supplied config (scoped workspace)"- );+ log::debug!("[core-context] init: using caller-supplied config (scoped workspace)");Ok(cfg)}None => crate::openhuman::config::Config::load_or_init().await,diff --git a/src/embed/harness/mcp.rs b/src/embed/harness/mcp.rsindex 7e336ba2ef..e78460bf6f 100644--- a/src/embed/harness/mcp.rs+++ b/src/embed/harness/mcp.rs@@ -64,18 +64,21 @@ impl std::fmt::Debug for McpAuthDebug<'_> {McpAuthConfig::None => f.write_str("None"),McpAuthConfig::BearerToken { .. } => f.write_str("BearerToken(<redacted>)"),McpAuthConfig::Basic { .. } => f.write_str("Basic(<redacted>)"),- McpAuthConfig::Header { name, .. } => {- f.debug_tuple("Header").field(name).field(&"<redacted>").finish()- }- McpAuthConfig::Headers { headers } => {- f.debug_tuple("Headers")- .field(&headers.len())- .field(&"<redacted>")- .finish()- }- McpAuthConfig::QueryParam { name, .. } => {- f.debug_tuple("QueryParam").field(name).field(&"<redacted>").finish()- }+ McpAuthConfig::Header { name, .. } => f+ .debug_tuple("Header")+ .field(name)+ .field(&"<redacted>")+ .finish(),+ McpAuthConfig::Headers { headers } => f+ .debug_tuple("Headers")+ .field(&headers.len())+ .field(&"<redacted>")+ .finish(),+ McpAuthConfig::QueryParam { name, .. } => f+ .debug_tuple("QueryParam")+ .field(name)+ .field(&"<redacted>")+ .finish(),}}}diff --git a/src/embed/harness/skills_tests.rs b/src/embed/harness/skills_tests.rsindex 4a9b1d105a..e60b2cded3 100644--- a/src/embed/harness/skills_tests.rs+++ b/src/embed/harness/skills_tests.rs@@ -117,7 +117,10 @@ fn a_symlinked_manifest_does_not_make_a_directory_a_bundle() {std::os::unix::fs::symlink(outside.path().join("SKILL.md"), dir.join("SKILL.md")).expect("symlink manifest");- assert!(!is_bundle(&dir), "a symlinked manifest must not be treated as a bundle");+ assert!(+ !is_bundle(&dir),+ "a symlinked manifest must not be treated as a bundle"+ );}#[test]diff --git a/src/embed/harness/workspace.rs b/src/embed/harness/workspace.rsindex 9925660e19..e3f627b523 100644--- a/src/embed/harness/workspace.rs+++ b/src/embed/harness/workspace.rs@@ -125,9 +125,7 @@ impl ResolvedWorkspace {// sibling `action/` and `config.toml` resolve against the// process working directory instead of beside the workspace,// which breaks the credential-isolation invariant below.- let parent = dir- .parent()- .filter(|parent| !parent.as_os_str().is_empty());+ let parent = dir.parent().filter(|parent| !parent.as_os_str().is_empty());let action_dir = action_dir_override.map(Path::to_path_buf)// A sibling, for the `is_workspace_internal_path` reasondiff --git a/src/embed/harness/workspace_tests.rs b/src/embed/harness/workspace_tests.rsindex dd178dfe16..9dd18447c3 100644--- a/src/embed/harness/workspace_tests.rs+++ b/src/embed/harness/workspace_tests.rs@@ -136,8 +136,7 @@ fn a_relative_dir_workspace_does_not_resolve_siblings_against_cwd() {let temp = tempfile::tempdir().expect("tempdir");std::env::set_current_dir(temp.path()).expect("chdir to temp");let result = std::panic::catch_unwind(|| {- let resolved =- ResolvedWorkspace::resolve(&Workspace::dir("ws"), None).expect("resolve");+ let resolved = ResolvedWorkspace::resolve(&Workspace::dir("ws"), None).expect("resolve");assert_eq!(resolved.workspace_dir, std::path::PathBuf::from("ws"));assert_eq!(resolved.action_dir,diff --git a/src/openhuman/security/credentials/ops.rs b/src/openhuman/security/credentials/ops.rsindex 9e641b30b2..d646963801 100644--- a/src/openhuman/security/credentials/ops.rs+++ b/src/openhuman/security/credentials/ops.rs@@ -492,7 +492,10 @@ async fn store_session_inner(// stored below; only the global activation is skipped.let operator_user_activation = !is_embedder_host();- if let Some(ref uid) = resolved_user_id.as_ref().filter(|_| operator_user_activation) {+ if let Some(ref uid) = resolved_user_id+ .as_ref()+ .filter(|_| operator_user_activation)+ {if let Ok(root_dir) = default_root_openhuman_dir() {// Snapshot before we overwrite `active_user.toml` so we can tell// first activation from signed-out vs an in-place account switch.