Skip to content

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

refactor(agent): update comments to reflect skills wildcard expansion

Steven Enamakeldf56a37be0b7
diff --git a/crates/openhuman-core/src/agent/harness/definition/tier.rs b/crates/openhuman-core/src/agent/harness/definition/tier.rs
index 73d734c170..9cdf67cb79 100644
--- a/crates/openhuman-core/src/agent/harness/definition/tier.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/tier.rs
@@ -79,10 +79,9 @@ impl std::fmt::Display for AgentTier {
/// pairs at boot (see
/// [`crate::agent::registry::agents::validate_tier_hierarchy`]). The
/// runtime spawn gate (`run_subagent`) reuses it as defense-in-depth, but
-/// deliberately exempts worker *parents* — at runtime a worker only reaches the
-/// spawn chokepoint via the documented collapsed `delegate_to_integrations_agent`
-/// path (→ `integrations_agent`, itself a worker), which the loader intentionally
-/// leaves untouched.
+/// deliberately exempts worker *parents* — a worker's `subagents` list holds
+/// no agent id (the loader rejects one), so the only runtime spawn a worker
+/// reaches is one the host dispatched for it, not one it chose.
pub fn validate_tier_transition(parent: AgentTier, child: AgentTier) -> Result<(), String> {
match (parent, child) {
(AgentTier::Worker, _) => Err(format!(
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader.rs b/crates/openhuman-core/src/agent/registry/agents/loader.rs
index 368cc03a58..5160a04393 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader.rs
@@ -349,15 +349,12 @@ fn builtin_enabled(_b: &BuiltinAgent) -> bool {
/// * `Reasoning` agents MUST NOT list another `Reasoning` agent in
/// `subagents`.
/// * `Worker` agents MUST NOT list any [`SubagentEntry::AgentId`]
-/// entries. (Workflow wildcards are allowed: they expand to the generic
-/// `integrations_agent`, which is itself a `Worker`, and the call
-/// happens via a single delegation tool rather than recursive spawn.)
+/// entries. (Skills wildcards are allowed: they expand to the connected
+/// integrations' actions as searchable tools on the agent's own belt,
+/// not to a spawn.)
///
-/// Workflow-wildcard entries (`{ skills = "*" }`) are intentionally
-/// untouched: they collapse to one `delegate_to_integrations_agent`
-/// tool whose target is a `Worker` and whose use sites are well
-/// understood. Mis-tiering of the `integrations_agent` itself is still
-/// caught because it appears as a normal entry elsewhere.
+/// Skills-wildcard entries (`{ skills = "*" }`) are intentionally
+/// untouched: they name no agent, so there is no tier pair to check.
///
/// Called from [`load_builtins`] for the bundled archetype set and from
/// [`crate::agent::harness::definition::AgentDefinitionRegistry::load`]
@@ -372,9 +369,8 @@ pub fn validate_tier_hierarchy(defs: &[AgentDefinition]) -> Result<()> {
for entry in &def.subagents {
let child_id = match entry {
SubagentEntry::AgentId(id) => id.as_str(),
- // Workflow wildcards always route to `integrations_agent`
- // (a Worker) via a single collapsed delegation tool —
- // not subject to the tier-mismatch rule.
+ // Skills wildcards expand to searchable integration
+ // actions, not to an agent — nothing to tier-check.
SubagentEntry::Skills(_) => continue,
};
diff --git a/crates/openhuman-core/src/agent/session_host/builder/factory.rs b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
index 64a2f994b2..f643255b3c 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -583,10 +583,9 @@ impl OpenHumanSessionHost {
//
// For an agent with `[subagents] allowlist = [...]` in its TOML (today:
// orchestrator), `collect_orchestrator_tools` synthesises one
- // `ArchetypeDelegationTool` per named sub-agent plus a single
- // collapsed `SkillDelegationTool`
- // (`delegate_to_integrations_agent`) whose `toolkit` argument
- // selects among the connected Composio toolkits (#1335).
+ // `ArchetypeDelegationTool` per named sub-agent plus, for the
+ // `{ skills = "*" }` wildcard, one `Deferred` action tool per
+ // connected Composio action (reached through `tool_search`).
//
// For an agent without `subagents` (today: welcome, critic,
// archivist, etc.), no delegation tools are synthesised — the
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 c1ccc0eda4..97b9237526 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
@@ -59,9 +59,9 @@
//! [`Self::with_registered_tools`], failing closed when that is absent.
//!
//! **4. `SubagentEntry::Skills` entries are omitted.** A `{ skills = "*" }`
-//! entry is not an agent id — it collapses into the single
-//! `delegate_to_integrations_agent` tool. Emitting a synthetic id here would
-//! invent a delegate the host never authorized.
+//! entry is not an agent id — it expands to the connected integrations'
+//! actions as searchable tools. Emitting a synthetic id here would invent a
+//! delegate the host never authorized.
//!
use std::collections::HashSet;
@@ -397,8 +397,8 @@ impl OpenHumanDefinitionRegistry {
/// Declared subagent **agent ids** only.
///
/// [`SubagentEntry::Skills`] entries are skipped: they are a wildcard that
-/// collapses to the single `delegate_to_integrations_agent` tool, not an agent
-/// the parent may address by id.
+/// expands to searchable integration actions, not an agent the parent may
+/// address by id.
fn declared_subagent_ids(def: &HostAgentDefinition) -> Vec<String> {
def.subagents
.iter()