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(composio): thread dispatch context through scope prefs and reformat
Steven Enamakel6a0f807720fc
diff --git a/crates/openhuman-core/src/agent/prompts/connected_identities.rs b/crates/openhuman-core/src/agent/prompts/connected_identities.rsindex 57c78efb98..e20ae8e1af 100644--- a/crates/openhuman-core/src/agent/prompts/connected_identities.rs+++ b/crates/openhuman-core/src/agent/prompts/connected_identities.rs@@ -35,19 +35,20 @@ async fn render_section(ctx: &crate::core::runtime::DispatchCtx) -> String {return String::new();}};- let identities =- match crate::integrations::composio::identity_store::load_connected_identities(ctx, &config)- .await- {- Ok(identities) => identities,- Err(error) => {- tracing::debug!(- %error,- "[prompts] render_connected_identities: load_connected_identities failed"- );- return String::new();- }- };+ let identities = match crate::integrations::composio::identity_store::load_connected_identities(+ ctx, &config,+ )+ .await+ {+ Ok(identities) => identities,+ Err(error) => {+ tracing::debug!(+ %error,+ "[prompts] render_connected_identities: load_connected_identities failed"+ );+ return String::new();+ }+ };// The section is rendered by the connector module (`NormalizeIdentities`).crate::integrations::composio::contract::render_connected_identities_section(&config,diff --git a/crates/openhuman-core/src/flows/ops/builder_gates.rs b/crates/openhuman-core/src/flows/ops/builder_gates.rsindex db316c66f9..aa080f831e 100644--- a/crates/openhuman-core/src/flows/ops/builder_gates.rs+++ b/crates/openhuman-core/src/flows/ops/builder_gates.rs@@ -217,11 +217,9 @@ pub(crate) async fn build_builder_proposal(// Connector onboarding (Phase 5, item 18): tell the proposal card which// toolkits this graph needs and whether they're connected, so it can render// "Connect <toolkit>" CTAs instead of a bare gate error later.- let required_connections = compute_required_connections(- &crate::core::runtime::DispatchCtx::ambient(),- config,- graph,- ).await;+ let required_connections =+ compute_required_connections(&crate::core::runtime::DispatchCtx::ambient(), config, graph)+ .await;// B45 (design correction): the LLM-provider-connectivity evaluation is// ADVISORY here, never a rejection — `run_builder_gates` above no longer// includes it (that used to hard-block `propose_workflow`/`edit_workflow`diff --git a/crates/openhuman-core/src/integrations/composio/bus/connection_created_subscriber.rs b/crates/openhuman-core/src/integrations/composio/bus/connection_created_subscriber.rsindex 1a16a8c6e7..0366b5af9c 100644--- a/crates/openhuman-core/src/integrations/composio/bus/connection_created_subscriber.rs+++ b/crates/openhuman-core/src/integrations/composio/bus/connection_created_subscriber.rs@@ -95,9 +95,7 @@ impl EventHandler<DomainEvent> for ComposioConnectionCreatedSubscriber {// The cache refresh runs for every toolkit; only the profile fetch is gated on a native provider.let toolkit = toolkit.clone();let connection_id = connection_id.clone();- tokio::spawn(async move {- on_connection_created(&ctx, toolkit, connection_id).await- });+ tokio::spawn(async move { on_connection_created(&ctx, toolkit, connection_id).await });}}diff --git a/crates/openhuman-core/src/integrations/composio/ops/scope_prefs.rs b/crates/openhuman-core/src/integrations/composio/ops/scope_prefs.rsindex 0e366e078b..99be30e28f 100644--- a/crates/openhuman-core/src/integrations/composio/ops/scope_prefs.rs+++ b/crates/openhuman-core/src/integrations/composio/ops/scope_prefs.rs@@ -65,7 +65,9 @@ async fn migrate_legacy(config: &Config) {{return;}- let rows = match file_store::load::<LegacyScopeFile>(config, USER_SCOPES_FILE).await {+ // Transitional (#7801): the scope-pref readers carry no context yet.+ let ctx = crate::core::runtime::DispatchCtx::ambient();+ let rows = match file_store::load::<LegacyScopeFile>(&ctx, config, USER_SCOPES_FILE).await {Ok(rows) => rows,Err(error) => {// Unreadable is not "no rows": keep the file and try again later.@@ -90,12 +92,16 @@ async fn migrate_legacy(config: &Config) {}}if !rows.is_empty() {- let cleared =- file_store::update(config, USER_SCOPES_FILE, |prefs: &mut LegacyScopeFile| {+ let cleared = file_store::update(+ &ctx,+ config,+ USER_SCOPES_FILE,+ |prefs: &mut LegacyScopeFile| {prefs.clear();((), true)- })- .await;+ },+ )+ .await;if let Err(error) = cleared {tracing::warn!(%error, "{LOG} legacy pref file could not be emptied");return;