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(registry): handle missing source in graph read RPC
Steven Enamakel5fbe5050d8c5
diff --git a/crates/openhuman-core/src/memory/read_rpc/graph.rs b/crates/openhuman-core/src/memory/read_rpc/graph.rsindex a04b4cb071..33314f7e2d 100644--- a/crates/openhuman-core/src/memory/read_rpc/graph.rs+++ b/crates/openhuman-core/src/memory/read_rpc/graph.rs@@ -398,16 +398,6 @@ fn document_label(child_id: &str) -> String {}}-#[allow(dead_code)]-pub(super) fn source_id_to_scope(source_id: &str) -> String {- let parts: Vec<&str> = source_id.splitn(3, ':').collect();- if parts.len() >= 2 {- format!("{}:{}", parts[0], parts[1])- } else {- source_id.to_string()- }-}-// ── collect_contacts_graph ───────────────────────────────────────────────async fn collect_contacts_graph(cfg: &Config) -> Result<(Vec<GraphNode>, Vec<GraphEdge>), String> {diff --git a/crates/openhuman-core/src/memory/sources/registry.rs b/crates/openhuman-core/src/memory/sources/registry.rsindex 5601364200..922713454d 100644--- a/crates/openhuman-core/src/memory/sources/registry.rs+++ b/crates/openhuman-core/src/memory/sources/registry.rs@@ -235,27 +235,3 @@ pub async fn apply_all_in() -> Result<Vec<MemorySourceEntry>, String> {.apply_all_in().map_err(|error| error.to_string())}--/// Decode the source registry a host config carries.-///-/// The registry crosses the memory host seam as JSON, so this is where it-/// becomes typed again.-///-/// A malformed or absent registry yields an empty list rather than an error.-/// Every caller is a background loop deciding what to sync, and "nothing is-/// registered" is the fail-closed answer there; propagating would take the loop-/// down over one bad row.-#[must_use]-pub fn decode_memory_sources(config: &Config) -> Vec<MemorySourceEntry> {- use tinymemory_api::host::MemoryHostConfig as _;- match config.memory_sources_json() {- Ok(value) => serde_json::from_value(value).unwrap_or_else(|e| {- log::warn!("[memory_sources:registry] could not decode memory sources: {e:#}");- Vec::new()- }),- Err(e) => {- log::warn!("[memory_sources:registry] could not read memory sources: {e:#}");- Vec::new()- }- }-}diff --git a/crates/openhuman-core/src/memory/sync/composio/providers/slack/schemas.rs b/crates/openhuman-core/src/memory/sync/composio/providers/slack/schemas.rsindex 7c331aa028..2264b68a2f 100644--- a/crates/openhuman-core/src/memory/sync/composio/providers/slack/schemas.rs+++ b/crates/openhuman-core/src/memory/sync/composio/providers/slack/schemas.rs@@ -21,11 +21,6 @@ use crate::core::{ControllerSchema, FieldSchema, TypeSchema};const NAMESPACE: &str = "slack_memory";-/// Returns every schema published by the Slack-ingestion namespace.-pub fn all_slack_memory_controller_schemas() -> Vec<ControllerSchema> {- vec![schemas("sync_trigger"), schemas("sync_status")]-}-/// Returns every controller (schema + handler pair) for the Slack-ingestion namespace.pub fn all_slack_memory_registered_controllers() -> Vec<RegisteredController> {vec![diff --git a/crates/openhuman-core/src/memory/tool_memory/store.rs b/crates/openhuman-core/src/memory/tool_memory/store.rsindex 7d233ca1b7..5c0d85199e 100644--- a/crates/openhuman-core/src/memory/tool_memory/store.rs+++ b/crates/openhuman-core/src/memory/tool_memory/store.rs@@ -223,54 +223,6 @@ impl ToolMemoryStore {Ok(rules)}- /// Fetch a single rule by `(tool_name, rule_id)`.- ///- /// `Ok(None)` means the rule is absent, which is not an error: the RPC- /// surface answers a missing rule with a null body rather than a failure.- ///- /// # Errors- ///- /// Backend failures only.- pub async fn get_rule(- &self,- tool_name: &str,- rule_id: &str,- ) -> Result<Option<ToolMemoryRule>, String> {- let namespace = tool_memory_namespace(tool_name);- let key = ToolMemoryRule::storage_key(rule_id);- self.fetch_rule(&namespace, &key).await- }-- /// Delete a rule. Returns `true` when the rule existed.- ///- /// # Errors- ///- /// Backend failures only; deleting an absent rule is `Ok(false)`.- pub async fn delete_rule(&self, tool_name: &str, rule_id: &str) -> Result<bool, String> {- let namespace = tool_memory_namespace(tool_name);- let key = ToolMemoryRule::storage_key(rule_id);- self.memory- .forget(&namespace, &key)- .await- .map_err(|e| format!("forget tool rule: {e:#}"))- }-- /// Render one tool's rules as JSON for an RPC envelope, priority- /// descending.- ///- /// The shape is `serde_json::to_value` over the same `Vec<ToolMemoryRule>`- /// [`Self::list_rules`] returns, so `tool_rules_json` stays byte-compatible- /// with what the dashboard already parses.- ///- /// # Errors- ///- /// Backend failures, or a serialisation failure that cannot occur for this- /// type but is surfaced rather than unwrapped.- pub async fn list_rules_json(&self, tool_name: &str) -> Result<serde_json::Value, String> {- let rules = self.list_rules(tool_name).await?;- serde_json::to_value(rules).map_err(|e| e.to_string())- }-/// The rules that must be surfaced eagerly (Critical + High), grouped by/// tool name.///