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: reformat long expressions to satisfy line width limits
Steven Enamakel56af2141a6bb
diff --git a/crates/openhuman-core/src/modules/storage_grants.rs b/crates/openhuman-core/src/modules/storage_grants.rsindex 6aeb26a39e..f68fd4bbb9 100644--- a/crates/openhuman-core/src/modules/storage_grants.rs+++ b/crates/openhuman-core/src/modules/storage_grants.rs@@ -426,7 +426,11 @@ fn streams(grant: &StorageGrant, selector: &str, request: &Value) -> Result<PlanStorageGrant::prefixed(&grant.stream_prefixes, name)?;Ok(forward(name))}- "Append" | "AppendBatch" | "AppendBatchIfOffset" | "TruncateBefore" | "DeleteStream"+ "Append"+ | "AppendBatch"+ | "AppendBatchIfOffset"+ | "TruncateBefore"+ | "DeleteStream"| "Seal" => {let name = text(request, "stream")?;StorageGrant::prefixed(&grant.stream_prefixes, name)?;diff --git a/crates/openhuman-core/src/modules/storage_grants_tests.rs b/crates/openhuman-core/src/modules/storage_grants_tests.rsindex 16748e2ba3..0eeecf1cf0 100644--- a/crates/openhuman-core/src/modules/storage_grants_tests.rs+++ b/crates/openhuman-core/src/modules/storage_grants_tests.rs@@ -581,20 +581,46 @@ fn every_selector_of_a_granted_object_is_decided_rather_than_refused_as_malforme#[test]fn the_selectors_added_to_the_wire_keep_the_grants_prefixes_and_read_only_rule() {assert_eq!(- authorize(&grant(), Object::Streams, "Seal", &json!({"stream": "audit/a"})),+ authorize(+ &grant(),+ Object::Streams,+ "Seal",+ &json!({"stream": "audit/a"})+ ),Err(Denied::Target));assert_eq!(- authorize(&grant(), Object::Secrets, "SetIf", &json!({"name": "other.a"})),+ authorize(+ &grant(),+ Object::Secrets,+ "SetIf",+ &json!({"name": "other.a"})+ ),Err(Denied::Target));assert_eq!(- authorize(&read_only(), Object::Streams, "Seal", &json!({"stream": "log/a"})),+ authorize(+ &read_only(),+ Object::Streams,+ "Seal",+ &json!({"stream": "log/a"})+ ),Err(Denied::ReadOnly));assert_eq!(- authorize(&read_only(), Object::Secrets, "SetIf", &json!({"name": "token.a"})),+ authorize(+ &read_only(),+ Object::Secrets,+ "SetIf",+ &json!({"name": "token.a"})+ ),Err(Denied::ReadOnly));- assert!(authorize(&read_only(), Object::Streams, "Info", &json!({"stream": "log/a"})).is_ok());+ assert!(authorize(+ &read_only(),+ Object::Streams,+ "Info",+ &json!({"stream": "log/a"})+ )+ .is_ok());}diff --git a/crates/openhuman-embed/tests/mcp_module.rs b/crates/openhuman-embed/tests/mcp_module.rsindex 15e1ad4e44..d6f4865f5f 100644--- a/crates/openhuman-embed/tests/mcp_module.rs+++ b/crates/openhuman-embed/tests/mcp_module.rs@@ -8,7 +8,9 @@ mod common;use common::{chat_completion, offline_config, route, runtime, scripted_provider, stub_backend};use openhuman_core::config::schema::{ModuleOverride, ModuleSourceMode};-use openhuman_embed::{Access, AgentSpec, McpServer, Runtime, RuntimeModule, ServiceSet, Workspace};+use openhuman_embed::{+ Access, AgentSpec, McpServer, Runtime, RuntimeModule, ServiceSet, Workspace,+};struct McpStub;@@ -30,8 +32,9 @@ impl wiremock::Respond for McpStub {"tools/call" => serde_json::json!({ "content": [{ "type": "text", "text": "sunny" }] }),_ => serde_json::json!({}),};- wiremock::ResponseTemplate::new(200)- .set_body_json(serde_json::json!({ "jsonrpc": "2.0", "id": body["id"], "result": result }))+ wiremock::ResponseTemplate::new(200).set_body_json(+ serde_json::json!({ "jsonrpc": "2.0", "id": body["id"], "result": result }),+ )}}@@ -111,10 +114,20 @@ fn scenario() {.await.expect("recorded").iter()- .filter_map(|r| serde_json::from_slice::<serde_json::Value>(&r.body).ok()?["method"].as_str().map(str::to_string))+ .filter_map(|r| {+ serde_json::from_slice::<serde_json::Value>(&r.body).ok()?["method"]+ .as_str()+ .map(str::to_string)+ }).collect();- eprintln!("REPLY={} RESULTS={results} METHODS={methods:?}", reply.reply);- assert!(methods.iter().any(|m| m == "tools/call"), "{methods:?} / {results}");+ eprintln!(+ "REPLY={} RESULTS={results} METHODS={methods:?}",+ reply.reply+ );+ assert!(+ methods.iter().any(|m| m == "tools/call"),+ "{methods:?} / {results}"+ );assert!(results.contains("sunny"), "{results}");let _ = chat_completion;});