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(agent): apply discovery-deferred filtering after synthesized tool refresh
Steven Enamakelcecc6aecce17
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rsindex 7a72730f69..49560d176e 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs@@ -14,16 +14,16 @@ fn reconcile_surface_names(discovery_deferred: Option<std::collections::HashSet<String>>,strip_packed: impl FnOnce(&mut std::collections::HashSet<String>),) {- if let Some(names) = &discovery_deferred {- visible.retain(|name| !names.contains(name));- *deferred = names.clone();- }let mut managed = tinyagents_runtime::ManagedToolNames {visible: std::mem::take(visible),deferred: std::mem::take(deferred),permanent: std::mem::take(permanent),};managed.refresh_synthesized(previous_synthesized, synthesized, auto_include_new);+ if let Some(names) = &discovery_deferred {+ managed.visible.retain(|name| !names.contains(name));+ managed.deferred = names.clone();+ }// New wildcard-synthesized names must participate in packed-tool// filtering so a withheld name can add its `use_skill` route. Restore// permanent names afterward, preserving their precedence over bothdiff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface_tests.rsindex 1c7bbb6870..7a7f26e1de 100644--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface_tests.rs@@ -49,12 +49,13 @@ fn permanent_tools_survive_packed_and_deferred_filters_but_revocation_wins() {}#[test]-fn newly_synthesized_packed_tool_keeps_its_use_skill_route_visible() {+fn packed_deferred_tool_keeps_its_use_skill_route_visible() {let mut visible = std::collections::HashSet::new();let mut deferred = std::collections::HashSet::new();let mut permanent = std::collections::HashSet::new();let previous = std::collections::HashSet::new();- let next = ["packed_delegate".to_string()].into_iter().collect();+ let next = ["packed_deferred_tool".to_string()].into_iter().collect();+ let discovery_deferred = ["packed_deferred_tool".to_string()].into_iter().collect();reconcile_surface_names(&mut visible,@@ -63,14 +64,15 @@ fn newly_synthesized_packed_tool_keeps_its_use_skill_route_visible() {&previous,&next,true,- None,+ Some(discovery_deferred),|visible| {- if visible.remove("packed_delegate") {+ if visible.remove("packed_deferred_tool") {visible.insert("use_skill".to_string());}},);assert!(visible.contains("use_skill"));- assert!(!visible.contains("packed_delegate"));+ assert!(!visible.contains("packed_deferred_tool"));+ assert!(deferred.contains("packed_deferred_tool"));}