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: files changed crates/openhuman-core/src/agent/session_host/prelude_integrations.rs,crates/ope
Steven Enamakelff41ef42ce45
diff --git a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rsindex 3f187b7cf4..0638a8a623 100644--- a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs+++ b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs@@ -387,7 +387,7 @@ async fn load_connected_integrations(FetchConnectedIntegrationsStatus::Authoritative(connected) => Some((connected, true)),FetchConnectedIntegrationsStatus::Unavailable => {let stale =- crate::integrations::composio::cached_active_integrations_including_expired(config);+ crate::integrations::composio::cached_active_integrations(config);log::warn!("[session] integrations fetch unavailable; using stale snapshot={}",stale.as_ref().map_or(0, Vec::len)diff --git a/crates/openhuman-core/src/agent/tool_policy.rs b/crates/openhuman-core/src/agent/tool_policy.rsindex ed70737655..e6936140a5 100644--- a/crates/openhuman-core/src/agent/tool_policy.rs+++ b/crates/openhuman-core/src/agent/tool_policy.rs@@ -69,30 +69,16 @@ pub struct ToolPolicyRequest {pub tool_name: String,pub arguments: serde_json::Value,pub context: ToolCallContext,- /// Backward-compatible mirror of `context.session_id`.- #[deprecated(note = "use context.session_id")]- pub session_id: String,- /// Backward-compatible mirror of `context.channel`.- #[deprecated(note = "use context.channel")]- pub channel: String,- /// Backward-compatible mirror of `context.agent_definition_id`.- #[deprecated(note = "use context.agent_definition_id")]- pub agent_definition_id: String,+}impl fmt::Debug for ToolPolicyRequest {fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {- #[allow(deprecated)]- {- f.debug_struct("ToolPolicyRequest")- .field("tool_name", &self.tool_name)- .field("arguments", &"<redacted>")- .field("context", &self.context)- .field("session_id", &redact_for_debug(&self.session_id))- .field("channel", &redact_for_debug(&self.channel))- .field("agent_definition_id", &self.agent_definition_id)- .finish()- }+ f.debug_struct("ToolPolicyRequest")+ .field("tool_name", &self.tool_name)+ .field("arguments", &"<redacted>")+ .field("context", &self.context)+ .finish()}}@@ -102,16 +88,10 @@ impl ToolPolicyRequest {arguments: serde_json::Value,context: ToolCallContext,) -> Self {- #[allow(deprecated)]- {- Self {- tool_name: tool_name.into(),- arguments,- session_id: context.session_id.clone(),- channel: context.channel.clone(),- agent_definition_id: context.agent_definition_id.clone(),- context,- }+ Self {+ tool_name: tool_name.into(),+ arguments,+ context,}}}diff --git a/crates/openhuman-core/src/agent/tool_policy_tests.rs b/crates/openhuman-core/src/agent/tool_policy_tests.rsindex 942292da1b..2666fd2552 100644--- a/crates/openhuman-core/src/agent/tool_policy_tests.rs+++ b/crates/openhuman-core/src/agent/tool_policy_tests.rs@@ -10,15 +10,9 @@ async fn allow_all_policy_allows_every_call() {);assert_eq!(policy.check(&request).await, ToolPolicyDecision::Allow);- #[allow(deprecated)]- {- assert_eq!(request.session_id, request.context.session_id);- assert_eq!(request.channel, request.context.channel);- assert_eq!(- request.agent_definition_id,- request.context.agent_definition_id- );- }+ assert_eq!(request.context.session_id, "session");+ assert_eq!(request.context.channel, "chat");+ assert_eq!(request.context.agent_definition_id, "orchestrator");assert_eq!(request.context.source, ToolCallSource::Session);assert_eq!(request.context.call_id, "call-1");}diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rsindex 7a41460140..3ae1944279 100644--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs@@ -10,7 +10,7 @@ use crate::agent::harness::definition::{AgentDefinition, AgentDefinitionRegistryuse crate::agent::prompts::ConnectedIntegration;use crate::config::Config;use crate::integrations::composio::{- cached_active_integrations_including_expired, fetch_connected_integrations_status,+ cached_active_integrations, fetch_connected_integrations_status,FetchConnectedIntegrationsStatus,};use crate::tools::orchestrator_tools;@@ -146,7 +146,7 @@ pub(super) async fn resolve_target_agent(channel: &str) -> AgentScoping {// integrations rather than collapse tool-calling to an empty set.let connected = connected_with_fallback(fetched,- cached_active_integrations_including_expired(&config),+ cached_active_integrations(&config),);tracing::debug!(channel = %channel,diff --git a/crates/openhuman-core/src/config/schema/local_ai.rs b/crates/openhuman-core/src/config/schema/local_ai.rsindex 8632e9d66f..bc12e1b6a6 100644--- a/crates/openhuman-core/src/config/schema/local_ai.rs+++ b/crates/openhuman-core/src/config/schema/local_ai.rs@@ -179,26 +179,7 @@ impl LocalAiConfig {self.runtime_enabled}- /// **Deprecated** — read from `Config::workload_uses_local("embeddings")`- /// instead. This helper only consults the legacy `usage.*` booleans, which- /// are no longer the source of truth after the unified AI settings- /// migration (schema_version >= 2).- #[deprecated(note = "Use Config::workload_uses_local(\"embeddings\")")]- pub fn use_local_for_embeddings(&self) -> bool {- self.runtime_enabled && self.usage.embeddings- }-- /// **Deprecated** — read from `Config::workload_uses_local("heartbeat")`.- #[deprecated(note = "Use Config::workload_uses_local(\"heartbeat\")")]- pub fn use_local_for_heartbeat(&self) -> bool {- self.runtime_enabled && self.usage.heartbeat- }- /// **Deprecated** — read from `Config::workload_uses_local("subconscious")`.- #[deprecated(note = "Use Config::workload_uses_local(\"subconscious\")")]- pub fn use_local_for_subconscious(&self) -> bool {- self.runtime_enabled && self.usage.subconscious- }}impl Default for LocalAiConfig {diff --git a/crates/openhuman-core/src/config/schema/local_ai_tests.rs b/crates/openhuman-core/src/config/schema/local_ai_tests.rsindex ea4f6f0874..22db93178c 100644--- a/crates/openhuman-core/src/config/schema/local_ai_tests.rs+++ b/crates/openhuman-core/src/config/schema/local_ai_tests.rs@@ -6,12 +6,6 @@ use super::*;fn defaults_keep_local_runtime_and_every_usage_gate_off() {let cfg = LocalAiConfig::default();assert!(!cfg.is_active());- #[allow(deprecated)]- {- assert!(!cfg.use_local_for_embeddings());- assert!(!cfg.use_local_for_heartbeat());- assert!(!cfg.use_local_for_subconscious());- }assert_eq!(cfg.embedding_model_id, "bge-m3");}diff --git a/crates/openhuman-core/src/core/runtime/services.rs b/crates/openhuman-core/src/core/runtime/services.rsindex 151a1576fb..de9e629364 100644--- a/crates/openhuman-core/src/core/runtime/services.rs+++ b/crates/openhuman-core/src/core/runtime/services.rs@@ -160,7 +160,7 @@ pub fn spawn_login_gated_services(embedded_core: bool) -> tokio::task::JoinHandlif already_logged_in {// User has an active session — start all services now.log::info!("[services] existing session found, starting services");- crate::security::credentials::ops::start_login_gated_services(&config).await;+ crate::security::credentials::ops::start_credential_gated_services(&config).await;} else {log::info!("[services] no active session — deferring service startup until login"diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rsindex 9e57be3247..16cf876594 100644--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops.rs@@ -231,14 +231,14 @@ fn slug_needs_connected_set(slug: &str) -> bool {/// nothing to go on (the caller then fails closed).async fn connected_toolkit_slugs(config: &Config) -> Option<Vec<String>> {use crate::integrations::composio::{- cached_active_integrations_including_expired, fetch_connected_integrations_status,+ cached_active_integrations, fetch_connected_integrations_status,FetchConnectedIntegrationsStatus,};let integrations = match fetch_connected_integrations_status(config).await {FetchConnectedIntegrationsStatus::Authoritative(v) => v,FetchConnectedIntegrationsStatus::Unavailable => {- match cached_active_integrations_including_expired(config) {+ match cached_active_integrations(config) {Some(v) => {tracing::warn!(target: "flows", "[flows] connected-toolkit lookup: backend unavailable — using last-known (possibly stale) cached connections for the tool_call allowlist");vdiff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations.rsindex 80ce83a410..b5649f8e55 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations.rs@@ -16,7 +16,7 @@ mod catalog_description_tests;pub(crate) use cache::sync_cache_with_connections;pub use cache::{- cached_active_integrations, cached_active_integrations_including_expired, connected_set_hash,+ cached_active_integrations, connected_set_hash,invalidate_connected_integrations_cache,};#[cfg(test)]diff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rsindex fbea19b828..f17869b028 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/cache.rs@@ -1,6 +1,6 @@//! The process-wide connected-integrations cache: [`CachedIntegrations`],//! [`INTEGRATIONS_CACHE`], its readers/invalidation-//! ([`cached_active_integrations`], [`cached_active_integrations_including_expired`],+//! ([`cached_active_integrations`],//! [`invalidate_connected_integrations_cache`]), and the reconciliation//! helpers ([`connected_set_hash`], [`sync_cache_with_connections`]) that//! keep it in sync with a fresh backend `list_connections` response.@@ -153,14 +153,6 @@ pub fn cached_active_integrations(config: &Config) -> Option<Vec<ConnectedIntegrread_cached_integrations(config)}-/// Compatibility alias for callers preserving the last-known snapshot when a-/// connection-change refresh fails. Entries have no time-based expiry.-pub fn cached_active_integrations_including_expired(- config: &Config,-) -> Option<Vec<ConnectedIntegration>> {- read_cached_integrations(config)-}-fn read_cached_integrations(config: &Config) -> Option<Vec<ConnectedIntegration>> {read_cached_integrations_from(&INTEGRATIONS_CACHE, config)}diff --git a/crates/openhuman-core/src/integrations/composio/mod.rs b/crates/openhuman-core/src/integrations/composio/mod.rsindex 755a3f82ad..e5f8b28d7a 100644--- a/crates/openhuman-core/src/integrations/composio/mod.rs+++ b/crates/openhuman-core/src/integrations/composio/mod.rs@@ -69,7 +69,7 @@ pub use bus::{};pub use identity::connection_identity;pub use ops::{- cached_active_integrations, cached_active_integrations_including_expired, connected_set_hash,+ cached_active_integrations, connected_set_hash,fetch_connected_integrations, fetch_connected_integrations_status,invalidate_connected_integrations_cache, FetchConnectedIntegrationsStatus,};diff --git a/crates/openhuman-core/src/integrations/composio/ops/mod.rs b/crates/openhuman-core/src/integrations/composio/ops/mod.rsindex 66533c5cb8..5eb1c209ca 100644--- a/crates/openhuman-core/src/integrations/composio/ops/mod.rs+++ b/crates/openhuman-core/src/integrations/composio/ops/mod.rs@@ -62,7 +62,7 @@ pub(crate) use user_scopes::{// (originally at the bottom of ops.rs)pub use super::connected_integrations::{- cached_active_integrations, cached_active_integrations_including_expired, connected_set_hash,+ cached_active_integrations, connected_set_hash,fetch_connected_integrations, fetch_connected_integrations_status,invalidate_connected_integrations_cache, FetchConnectedIntegrationsStatus,};diff --git a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rsindex 59069dbd5a..7f99d82188 100644--- a/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs+++ b/crates/openhuman-core/src/integrations/composio/ops_fetch_integrations_and_triggers_tests.rs@@ -340,7 +340,7 @@ fn fallback_reader_matches_main_reader_without_time_based_expiry() {guard.get_mut(&key).unwrap().cached_at = Instant::now() - Duration::from_secs(3600);}assert!(cached_active_integrations(&config).is_some());- let stale = cached_active_integrations_including_expired(&config)+ let stale = cached_active_integrations(&config).expect("expired entry should still be returned by the fallback read");assert_eq!(stale.len(), 1);assert_eq!(stale[0].toolkit, "gmail");diff --git a/crates/openhuman-core/src/security/credentials/ops.rs b/crates/openhuman-core/src/security/credentials/ops.rsindex 3a26d7eda3..4e4ffdfabb 100644--- a/crates/openhuman-core/src/security/credentials/ops.rs+++ b/crates/openhuman-core/src/security/credentials/ops.rs@@ -21,8 +21,7 @@ pub use credential::{PENDING_BACKEND_VALIDATION_FIELD,};pub use gated_services::{- start_credential_gated_services, start_login_gated_services, stop_credential_gated_services,- stop_login_gated_services,+ start_credential_gated_services, stop_credential_gated_services,};pub use provider_credentials::{list_provider_credentials, list_provider_credentials_by_prefix, remove_provider_credentials,diff --git a/crates/openhuman-core/src/security/credentials/ops/gated_services.rs b/crates/openhuman-core/src/security/credentials/ops/gated_services.rsindex a47db81290..2009f7e3bb 100644--- a/crates/openhuman-core/src/security/credentials/ops/gated_services.rs+++ b/crates/openhuman-core/src/security/credentials/ops/gated_services.rs@@ -222,6 +222,3 @@ pub async fn stop_credential_gated_services(config: &Config) {log::info!("[services] all login-gated services stopped");}-/// Historical names, kept for call sites outside this module.-pub use start_credential_gated_services as start_login_gated_services;-pub use stop_credential_gated_services as stop_login_gated_services;diff --git a/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs b/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rsindex b6aa3ddccf..50ea6e28c9 100644--- a/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs+++ b/crates/openhuman-core/src/security/credentials/ops_provider_oauth_tests.rs@@ -463,7 +463,7 @@ async fn each_account_workspace_holds_its_own_credential_data() {assert_eq!(result_b.value[0].provider, "anthropic");}-/// #3490 regression: `start_login_gated_services` must launch its services+/// #3490 regression: `start_credential_gated_services` must launch its services/// concurrently (independent `tokio::spawn` tasks) and return, rather than/// awaiting them serially. With an all-disabled config every `start_if_enabled`/// is a no-op, so this drives the spawn/await/join orchestration (the changed@@ -475,7 +475,7 @@ async fn each_account_workspace_holds_its_own_credential_data() {/// per-service cold-starts to the slowest single one; this test guards that the/// orchestration keeps returning (and never deadlocks/panics on join).#[tokio::test]-async fn start_login_gated_services_completes_with_all_services_disabled() {+async fn start_credential_gated_services_completes_with_all_services_disabled() {// Serialize with the other env-mutating tests: this test sets a process-wide// opt-in env var below, and the lock keeps it from leaking into a// concurrently-running `store_session` test that would then start real@@ -483,7 +483,7 @@ async fn start_login_gated_services_completes_with_all_services_disabled() {// the HOME-mutating tests.)let _env_guard = crate::config::TEST_ENV_LOCK.lock().await;let tmp = TempDir::new().unwrap();- // Under `#[cfg(test)]` `start_login_gated_services` skips the real services+ // Under `#[cfg(test)]` `start_credential_gated_services` skips the real services// by default (they leak across the parallel test run); opt this one test// back in so it actually drives the concurrent spawn/await path it guards.// Only presence is checked, so the value (a temp path) is irrelevant.@@ -502,8 +502,8 @@ async fn start_login_gated_services_completes_with_all_services_disabled() {// immediately; the generous ceiling only guards against a deadlock.tokio::time::timeout(std::time::Duration::from_secs(30),- start_login_gated_services(&config),+ start_credential_gated_services(&config),).await- .expect("start_login_gated_services must return, not block");+ .expect("start_credential_gated_services must return, not block");}diff --git a/tests/in_process/config_auth_app_state_connectivity_e2e.rs b/tests/in_process/config_auth_app_state_connectivity_e2e.rsindex 5c2f5709f6..f8036853bb 100644--- a/tests/in_process/config_auth_app_state_connectivity_e2e.rs+++ b/tests/in_process/config_auth_app_state_connectivity_e2e.rs@@ -448,15 +448,16 @@ fn config_schema_defaults_cover_dashboard_capability_memory_and_security_shapes(..Default::default()};assert!(!local_ai.is_active());- #[allow(deprecated)]- {- assert!(!local_ai.use_local_for_embeddings());- local_ai.runtime_enabled = true;- assert!(local_ai.is_active());- assert!(local_ai.use_local_for_embeddings());- assert!(local_ai.use_local_for_heartbeat());- assert!(local_ai.use_local_for_subconscious());- }+ local_ai.runtime_enabled = true;+ assert!(local_ai.is_active());+ let routing = openhuman_core::config::Config {+ local_ai,+ embeddings_provider: Some("ollama:nomic-embed-text".into()),+ ..Default::default()+ };+ assert!(routing.workload_uses_local("embeddings"));+ assert!(!routing.workload_uses_local("heartbeat"));+ assert!(!routing.workload_uses_local("subconscious"));let mut search = openhuman_core::config::schema::SearchConfig {brave: openhuman_core::config::schema::SearchEngineCredentials {@@ -1696,8 +1697,8 @@ async fn credentials_public_ops_cover_service_and_missing_session_error_paths()std::fs::create_dir_all(config.config_path.parent().expect("config parent")).expect("create config parent");- openhuman_core::security::credentials::start_login_gated_services(&config).await;- openhuman_core::security::credentials::stop_login_gated_services(&config).await;+ openhuman_core::security::credentials::start_credential_gated_services(&config).await;+ openhuman_core::security::credentials::stop_credential_gated_services(&config).await;// The account-bound link-token and OAuth ops live in `openhuman-tinyhumans`// (`hosted::{channel_link, oauth}`); validation still runs first, and a