Skip to content

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

feat(session): filter hidden delegation tools and constrain citation requirement

Steven Enamakel16f53fff81bf
diff --git a/src/openhuman/agent/harness/session/builder/factory.rs b/src/openhuman/agent/harness/session/builder/factory.rs
index 3d807c2627..f00af3de7b 100644
--- a/src/openhuman/agent/harness/session/builder/factory.rs
+++ b/src/openhuman/agent/harness/session/builder/factory.rs
@@ -954,6 +954,9 @@ impl Agent {
Some(set) => set,
None => delegation_tools
.iter()
+ .filter(|t| {
+ t.exposure() != crate::openhuman::tools::traits::ToolExposure::Hidden
+ })
.map(|t| t.name().to_string())
.collect(),
};
@@ -974,7 +977,15 @@ impl Agent {
visible = tools
.iter()
.map(|t| t.name().to_string())
- .chain(delegation_tools.iter().map(|t| t.name().to_string()))
+ .chain(
+ delegation_tools
+ .iter()
+ .filter(|t| {
+ t.exposure()
+ != crate::openhuman::tools::traits::ToolExposure::Hidden
+ })
+ .map(|t| t.name().to_string()),
+ )
.filter(|name| !definition_disallows_tool(&def.disallowed_tools, name))
.collect();
}
diff --git a/src/openhuman/agent/orchestration/tools/archetype_delegation.rs b/src/openhuman/agent/orchestration/tools/archetype_delegation.rs
index 450992b28a..85ba571f01 100644
--- a/src/openhuman/agent/orchestration/tools/archetype_delegation.rs
+++ b/src/openhuman/agent/orchestration/tools/archetype_delegation.rs
@@ -227,7 +227,10 @@ pub(super) fn delegation_envelope_properties() -> Value {
"constraints": {"type": "array", "items": {"type": "string"}},
"must_not_assume": {"type": "array", "items": {"type": "string"}},
"expected_output": {"type": "string"},
- "citation_requirement": {"type": "string"},
+ "citation_requirement": {
+ "type": "string",
+ "enum": ["none", "file_paths", "urls", "retrieval_hits", "tool_outputs"]
+ },
"model": {"type": "string"},
"blocking": {"type": "boolean"}
})
diff --git a/vendor/tinyagents b/vendor/tinyagents
index 0eb7a81ea2..3536708941 160000
--- a/vendor/tinyagents
+++ b/vendor/tinyagents
@@ -1 +1 @@
-Subproject commit 0eb7a81ea2d43f5f56d1d3f3640e4a8d08956ddd
+Subproject commit 35367089414bad1c1a38ea64218121f7d3a9a61b