Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix: restore single-line signature for `companion_tool_names`

Steven Enamakelac748de77eb5
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
index 4695764a74..5dd4676ed6 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
@@ -338,7 +338,8 @@ impl OpenHumanDefinitionRegistry {
if let (Some(config), Some(registered)) =
(self.config.as_deref(), self.registered_tools.as_deref())
{
- for name in crate::inference::tokenjuice::companion_tool_names(&def.id, config)
+ for name in
+ crate::inference::tokenjuice::companion_tool_names(&def.id, config)
{
if registered.iter().any(|r| r == name) {
names.push(name.to_string());
diff --git a/crates/openhuman-core/src/inference/tokenjuice/mod.rs b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
index 8f875b2c2c..a01b0ba3d4 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/mod.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/mod.rs
@@ -64,10 +64,7 @@ pub fn summarizes_tool_output(agent_id: &str, config: &crate::config::Config) ->
/// advertised in the prompt and the tool declarations yet answered as an
/// unknown tool at dispatch, so the model burns its failure budget on a tool it
/// was told to call.
-pub fn companion_tool_names(
- agent_id: &str,
- config: &crate::config::Config,
-) -> Vec<&'static str> {
+pub fn companion_tool_names(agent_id: &str, config: &crate::config::Config) -> Vec<&'static str> {
let mut names: Vec<&'static str> = Vec::new();
if config.context.compaction_enabled || summarizes_tool_output(agent_id, config) {
names.extend(RECOVERY_TOOL_VISIBLE.iter().copied());