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
fix(orchestrator): handle missing channel startup gracefully
Steven Enamakeledae1c226b7b
diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rsindex 151d005003..53cceeeb28 100644--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs@@ -26,25 +26,6 @@ use std::sync::{Arc, Mutex};use tinychannels::runtime::compute_max_in_flight_messages;use tokio_util::task::AbortOnDropHandle;-/// What the channel-server banner prints on its `π§ Memory:` line.-///-/// This used to call `tinymemory_core::store::effective_memory_backend_name(-/// &config.memory.backend, Some(&config.storage.provider.config))`, which is-/// how it reads in `git log` β as if the label were derived from those two-/// settings. It never was: that function ignores **both** arguments and-/// returns the literal `"namespace"` unconditionally (`tinymemory-core`-/// `store/factories.rs`, and its own doc says so β "Currently, this always-/// returns 'namespace' as the unified memory system is the standard"). Its-/// engine-side test is named `effective_memory_backend_name_always_returns_-/// namespace`.-///-/// So this is a display constant, not a capability, and it came home rather-/// than crossing the bus (openhuman#5560): "which label does the banner show"-/// is not something a second memory driver would answer differently, and-/// widening the contract for a fixed string would be the worst of both. The-/// printed line is byte-identical to before.-const EFFECTIVE_MEMORY_BACKEND_LABEL: &str = "namespace";-pub async fn start_channels(config: Config) -> Result<()> {start_channels_with_session(config, super::super::session::channel_session()).await}@@ -66,7 +47,6 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {crate::threads::store::register_conversation_persistence_subscriber(config.workspace_dir.clone(),);- crate::memory::sync_events_bridge::register_sync_stage_bridge(&config);crate::integrations::composio::register_composio_trigger_subscriber();// Surface parked ApprovalGate requests as chat messages so the user can// answer yes/no in the thread (chat-native approval, issue #1339).@@ -98,10 +78,6 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {// is intentionally cheap and the loop body no-ops when there are// no connections.crate::integrations::composio::start_periodic_sync();- // The folder, GitHub, RSS and web sources a driver without a source- // pipeline of its own (hosted memory) needs refreshed; each tick checks the- // driver bound at that moment.- crate::memory::sources::start_hosted_periodic_sync();// Task-sources: subscribe to Composio connection-created events for// one-shot fetches, and spawn the periodic poll that pulls work from// configured external sources onto the agent's todo board.@@ -368,9 +344,12 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {println!("π¦ OpenHuman Channel Server");println!(" π€ Model: {model}");println!(- " π§ Memory: {} (auto-save: {})",- EFFECTIVE_MEMORY_BACKEND_LABEL,- if config.memory.auto_save { "on" } else { "off" }+ " π§ Memory: {}",+ if crate::memory::memory_is_on(&config) {+ config.memory.engine.as_str()+ } else {+ "off"+ });println!(" π‘ Channels: {}",@@ -482,10 +461,6 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {crate::channels::host::ChannelApprovalSurfaceSubscriber::new(Arc::clone(&channels_by_name)),));tracing::debug!("[channels] registered turn-state and approval-surface subscribers");- // Register the tree summarizer event subscriber for observability logging.- let _tree_summarizer_handle = bus.subscribe(Arc::new(- crate::memory::tree::tree_runtime::bus::TreeSummarizerEventSubscriber::new(),- ));let listener_count = channels.len() + relay_config.as_ref().map(|_| 1).unwrap_or_default();let max_in_flight_messages = compute_max_in_flight_messages(listener_count);@@ -499,16 +474,11 @@ async fn start_channels_inner(mut config: Config) -> Result<()> {channels_by_name,turn_model_source: None,default_provider: Arc::new(provider_name),- memory: crate::memory::ops::guard::active_memory_guard()- .await- .map_err(|e| anyhow::anyhow!("channels startup: memory unavailable: {e}"))?,tools_registry: Arc::clone(&tools_registry),system_prompt,model: Arc::new(model.clone()),temperature,- auto_save_memory: config.memory.auto_save,max_tool_iterations: config.agent.max_tool_iterations,- min_relevance_score: config.memory.min_relevance_score,conversation_histories: Arc::new(Mutex::new(HashMap::new())),turn_model_source_cache: Arc::new(Mutex::new(HashMap::new())),route_overrides: Arc::new(Mutex::new(HashMap::new())),diff --git a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rsindex be57dcc881..ef64e8469d 100644--- a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs+++ b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs@@ -42,7 +42,7 @@ fn sample_orchestrator() -> AgentDefinition {let mut orch = def("orchestrator", "Routes work to the right specialist", None);orch.subagents = vec![SubagentEntry::AgentId("researcher".into()),- SubagentEntry::AgentId("archivist".into()),+ SubagentEntry::AgentId("critic".into()),SubagentEntry::Skills(SkillsWildcard { skills: "*".into() }),];orch@@ -55,11 +55,11 @@ fn registry_with_targets() -> AgentDefinitionRegistry {"Web & docs crawler β reads real documentation",Some("research"),));- // `archivist` has no `delegate_name` override β tool name should- // fall back to `delegate_archivist`.+ // `critic` has no `delegate_name` override β tool name should+ // fall back to `delegate_critic`.reg.insert(def(- "archivist",- "Background librarian β extracts lessons from a completed session",+ "critic",+ "Adversarial reviewer β cross-checks claims and diffs",None,));reg@@ -129,7 +129,7 @@ fn collects_agentid_entries_and_expands_skills_wildcard_to_deferred_actions() {// when the registration in `collect_orchestrator_tools` is// restored."research", // researcher's delegate_name override- "delegate_archivist", // archivist has no delegate_name β default+ "delegate_critic", // critic has no delegate_name β default// Actions sorted by toolkit, then action name."GITHUB_CREATE_ISSUE","GMAIL_FETCH_EMAILS",@@ -206,7 +206,7 @@ fn skills_wildcard_with_no_integrations_produces_no_integration_tools() {let tools = collect_orchestrator_tools(&orch, ®, &[]);let names: Vec<&str> = tools.iter().map(|t| t.name()).collect();// `spawn_worker_thread` is temporarily disabled β see #1624.- assert_eq!(names, vec!["research", "delegate_archivist"]);+ assert_eq!(names, vec!["research", "delegate_critic"]);}/// An AgentId entry whose target carries a `delegate_name` override