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
chore: files changed src/openhuman/agent/orchestration/tools/archetype_delegation.rs
Steven Enamakel582e98e07e29
diff --git a/src/openhuman/agent/orchestration/tools/archetype_delegation.rs b/src/openhuman/agent/orchestration/tools/archetype_delegation.rsindex 12b97d7dfa..3f0e5d4f0f 100644--- a/src/openhuman/agent/orchestration/tools/archetype_delegation.rs+++ b/src/openhuman/agent/orchestration/tools/archetype_delegation.rs@@ -3,7 +3,7 @@ use serde_json::json;use serde_json::Value;use crate::openhuman::tools::traits::{- PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolResult, ToolTimeout,+ PermissionLevel, Tool, ToolCallOptions, ToolCategory, ToolExposure, ToolResult, ToolTimeout,};use tinytools::ToolRunContext;@@ -23,33 +23,12 @@ impl Tool for ArchetypeDelegationTool {&self.tool_description}- /// The delegation envelope — deliberately description-light.+ /// The delegation envelope, shared with the collapsed [`DelegateTool`].///- /// This one literal is emitted for **every** synthesised `delegate_*` tool- /// (19 of them on the Master Agent after tool-pack withholding), so each- /// word of `description` here is billed 19× on every single turn. Fully- /// described the envelope was 356 tokens × 19 = 6,764 tokens — 39% of the- /// orchestrator's whole tool-schema budget, for the same JSON 19 times.+ /// See [`delegation_envelope_properties`] for why it is description-light+ /// and where the field semantics live instead.///- /// The field *semantics* now live once in the parent's system prompt- /// (`registry/agents/orchestrator/prompt.md`, "Structured handoffs"),- /// which is where policy like "only observed facts" belonged anyway. The- /// property names stay self-describing, and they are the only thing- /// `render_structured_handoff` below reads.- ///- /// Four descriptions survive, each well under the 50-token cap, because- /// their property name does not carry the meaning:- ///- /// * `blocking` — the default is behaviour-critical and not inferable from- /// the name. Getting it wrong is silent and asymmetric: async when it- /// should have blocked finalizes the turn before the result lands, the- /// exact failure the prompt's result-gating rule exists to prevent.- /// * `evidence` — "actually observed" is the anti-fabrication contract,- /// not a label.- /// * `citation_requirement` / `model` — a bare name reads as neither.- ///- /// Enforced by `envelope_descriptions_stay_within_budget` below. If you- /// are about to add a description here, put it in prompt.md instead.+ /// [`DelegateTool`]: super::DelegateToolfn parameters_schema(&self) -> serde_json::Value {json!({"type": "object",@@ -62,6 +41,20 @@ impl Tool for ArchetypeDelegationTool {PermissionLevel::Execute}+ /// Off the wire, still callable.+ ///+ /// The collapsed [`DelegateTool`] advertises this hand-off as an `agent`+ /// enum value, so advertising the member as well would ship both surfaces+ /// and save nothing. It stays registered — and therefore dispatchable — so+ /// a replayed transcript, a saved skill or a flow node that names+ /// `research` still resolves. Same treatment as the members of the+ /// collapsed `cron` and `memory` tools.+ ///+ /// [`DelegateTool`]: super::DelegateTool+ fn exposure(&self) -> ToolExposure {+ ToolExposure::Hidden+ }+fn category(&self) -> ToolCategory {ToolCategory::System}