Skip to content

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

chore: files changed src/openhuman/agent/harness/fork_context.rs,src/openhuman/agent/harness/session

Steven Enamakel7a4b90682b6c
diff --git a/src/openhuman/agent/harness/fork_context.rs b/src/openhuman/agent/harness/fork_context.rs
index 6663e98e58..c873930893 100644
--- a/src/openhuman/agent/harness/fork_context.rs
+++ b/src/openhuman/agent/harness/fork_context.rs
@@ -54,7 +54,7 @@ pub struct ParentExecutionContext {
/// the provider for prefix-cache reuse. The parent's synthesised
/// delegation specs are deliberately absent: a sub-agent is never handed a
/// `delegate_*` tool (#4452), so there is no instance here for one.
- pub all_tool_specs: Arc<Vec<ToolSpec>>,
+ pub all_tool_specs: Arc<Vec<Arc<ToolSpec>>>,
/// Names of the tools the parent actually advertises and will execute this
/// turn. Consumers that recommend or directly invoke parent tools consult
@@ -68,7 +68,7 @@ pub struct ParentExecutionContext {
/// building a child's tool set — that is [`Self::all_tools`] +
/// [`Self::all_tool_specs`], which carry no delegate. Empty when the
/// builder does not know the parent's surface.
- pub visible_tool_specs: Arc<Vec<ToolSpec>>,
+ pub visible_tool_specs: Arc<Vec<Arc<ToolSpec>>>,
/// Explicit profile/channel ceiling inherited by child agents. This is not
/// the parent's role-specific visible surface: an orchestrator may delegate
diff --git a/src/openhuman/agent/harness/session/runtime_impl_01_part_01.rs b/src/openhuman/agent/harness/session/runtime_impl_01_part_01.rs
index dfb80caee4..70cb96572b 100644
--- a/src/openhuman/agent/harness/session/runtime_impl_01_part_01.rs
+++ b/src/openhuman/agent/harness/session/runtime_impl_01_part_01.rs
@@ -88,25 +88,25 @@ impl Agent {
/// Borrow the agent's tool specs (pre-serialised). Captured at
/// turn-start so sub-agents can pass byte-identical schemas to the
/// provider for prefix-cache reuse.
- pub fn tool_specs(&self) -> &[ToolSpec] {
+ pub fn tool_specs(&self) -> &[Arc<ToolSpec>] {
self.tool_specs.as_slice()
}
/// Clone the agent's full tool specs `Arc` (durable and synthesised).
- pub fn tool_specs_arc(&self) -> Arc<Vec<ToolSpec>> {
+ pub fn tool_specs_arc(&self) -> Arc<Vec<Arc<ToolSpec>>> {
Arc::clone(&self.tool_specs)
}
/// Clone the agent's provider-facing spec list: visible, policy-allowed,
/// de-duplicated, synthesised delegates included.
- pub fn visible_tool_specs_arc(&self) -> Arc<Vec<ToolSpec>> {
+ pub fn visible_tool_specs_arc(&self) -> Arc<Vec<Arc<ToolSpec>>> {
Arc::clone(&self.visible_tool_specs)
}
/// Clone the specs of the durable registry alone, index for index with
/// [`Self::tools_arc`] — the pair a sub-agent is handed, so a child never
/// sees a spec for a synthesised delegate it holds no instance for.
- pub fn durable_tool_specs_arc(&self) -> Arc<Vec<ToolSpec>> {
+ pub fn durable_tool_specs_arc(&self) -> Arc<Vec<Arc<ToolSpec>>> {
Arc::clone(&self.durable_tool_specs)
}