Skip to content

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

fix(embed): retain native tools on fresh permanent attachments

Steven Enamakel481bc8025278
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
index c16bcb7f25..e8594b224b 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_tools_tests.rs
@@ -341,3 +341,66 @@ fn a_host_tool_overrides_a_config_tool_of_the_same_name() {
"the tool that runs must be the host's, matching the spec advertised for it"
);
}
+
+/// Attaching a permanent tool before turn one must retain the original wildcard
+/// native surface; the empty visible set is its builder sentinel.
+#[test]
+fn permanent_attachment_preserves_a_fresh_wildcard_belt() {
+ let tmp = tempfile::TempDir::new().unwrap();
+ let config = test_config(&tmp);
+ let definition = definition();
+ let baseline =
+ crate::agent::OpenHumanSessionHost::from_config_with_definition(&config, &definition)
+ .unwrap();
+ let original: std::collections::HashSet<_> = baseline
+ .visible_tool_specs_arc()
+ .iter()
+ .map(|spec| spec.name.clone())
+ .collect();
+ assert!(!original.is_empty());
+ let host: crate::agent::HostTools = Arc::new(|_| {
+ let mut tools =
+ crate::agent::HostTurnTools::advertised(vec![Box::new(Marker("attached_marker"))]);
+ tools.permanent.insert("attached_marker".into());
+ tools
+ });
+ let attached = crate::agent::OpenHumanSessionHost::from_config_with_host_tools(
+ &config,
+ &definition,
+ &host,
+ None,
+ )
+ .unwrap();
+ let names: std::collections::HashSet<_> = attached
+ .visible_tool_specs_arc()
+ .iter()
+ .map(|spec| spec.name.clone())
+ .collect();
+ assert!(
+ original.is_subset(&names),
+ "native names lost: {:?}",
+ original.difference(&names).collect::<Vec<_>>()
+ );
+ assert!(names.contains("attached_marker"));
+}
+
+#[test]
+fn permanent_metadata_without_a_source_is_rejected_before_build() {
+ let tmp = tempfile::TempDir::new().unwrap();
+ let config = test_config(&tmp);
+ let host: crate::agent::HostTools = Arc::new(|_| crate::agent::HostTurnTools {
+ permanent: std::collections::HashSet::from(["missing_source".into()]),
+ ..Default::default()
+ });
+ let error = crate::agent::OpenHumanSessionHost::from_config_with_host_tools(
+ &config,
+ &definition(),
+ &host,
+ None,
+ )
+ .err()
+ .expect("inconsistent permanent metadata must be rejected");
+ assert!(error
+ .to_string()
+ .contains("permanent tool must have exactly one source: missing_source"));
+}
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 1dbb545051..608cf3db0f 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -156,7 +156,7 @@ impl OpenHumanSessionHost {
host: Option<&super::HostTools>,
session_id: Option<&str>,
) -> Result<Self> {
- let workspace_descriptor = derive_turn_workspace_descriptor();
+ let workspace_descriptor = super::helpers::derive_turn_workspace_descriptor();
let runtime: Arc<dyn host_runtime::RuntimeAdapter> = Arc::from(
host_runtime::create_runtime(&config.runtime, config.shell.hide_window)?,
@@ -978,60 +978,42 @@ impl OpenHumanSessionHost {
);
effective_agent_config.max_tool_iterations = def_cap;
}
- // Host-first, so a host tool wins a name collision -- see
- // `HostTurnTools::merge_into`, which owns that rule and why.
- let (host_policy, withheld_tool_names, permanent_tool_names) =
- super::host_tools::merge_for_turn(
- host,
- agent_id,
- session_id,
- &mut tools,
- &mut visible,
- )?;
- let mut builder = OpenHumanSessionHost::builder()
- .crate_native_provider(provider_role, Arc::clone(&base_config))
- .tools(tools)
- .synthesized_tools(delegation_tools)
- .visible_tool_names(visible)
- .withheld_tool_names(withheld_tool_names)
- .permanent_tool_names(permanent_tool_names)
- .deferred_tools(target_def.map_or_else(Vec::new, |d| d.deferred_tools.clone()))
- .memory(memory)
- .auto_recall(Some(auto_recall))
- .tool_dispatcher(tool_dispatcher)
- .prompt_builder(prompt_builder)
- .config(effective_agent_config)
- .context_config(config.context.clone())
- .model_name(model_name)
- .model_vision(model_vision)
- .temperature(effective_temperature)
- .workspace_dir(config.workspace_dir.clone())
- .action_dir(config.action_dir.clone())
- .workspace_descriptor(workspace_descriptor)
- .workflows({
- let mut catalogue = crate::skills::load_workflow_metadata(&config.workspace_dir);
- #[cfg(feature = "flows")]
- catalogue.extend(crate::flows::catalogue::flow_entries(config));
- catalogue
- })
- .auto_save(config.memory.auto_save)
- .post_turn_hooks(post_turn_hooks)
- .learning_enabled(config.learning.enabled)
- .explicit_preferences_enabled(config.learning.explicit_preferences_enabled)
- .agent_definition_name(agent_id.to_string())
- .omit_profile(effective_omit_profile)
- .omit_memory_md(effective_omit_memory_md)
- .trigger_memory_agent(effective_trigger_memory_agent)
- .tokenjuice_compression(effective_tokenjuice_compression);
+ let mut builder =
+ super::host_tools::tool_builder(host, agent_id, session_id, tools, visible)?
+ .crate_native_provider(provider_role, Arc::clone(&base_config))
+ .synthesized_tools(delegation_tools)
+ .deferred_tools(target_def.map_or_else(Vec::new, |d| d.deferred_tools.clone()))
+ .memory(memory)
+ .auto_recall(Some(auto_recall))
+ .tool_dispatcher(tool_dispatcher)
+ .prompt_builder(prompt_builder)
+ .config(effective_agent_config)
+ .context_config(config.context.clone())
+ .model_name(model_name)
+ .model_vision(model_vision)
+ .temperature(effective_temperature)
+ .workspace_dir(config.workspace_dir.clone())
+ .action_dir(config.action_dir.clone())
+ .workspace_descriptor(workspace_descriptor)
+ .workflows({
+ let mut catalogue =
+ crate::skills::load_workflow_metadata(&config.workspace_dir);
+ #[cfg(feature = "flows")]
+ catalogue.extend(crate::flows::catalogue::flow_entries(config));
+ catalogue
+ })
+ .auto_save(config.memory.auto_save)
+ .post_turn_hooks(post_turn_hooks)
+ .learning_enabled(config.learning.enabled)
+ .explicit_preferences_enabled(config.learning.explicit_preferences_enabled)
+ .agent_definition_name(agent_id.to_string())
+ .omit_profile(effective_omit_profile)
+ .omit_memory_md(effective_omit_memory_md)
+ .trigger_memory_agent(effective_trigger_memory_agent)
+ .tokenjuice_compression(effective_tokenjuice_compression);
if let Some(ps) = payload_summarizer {
builder = builder.payload_summarizer(ps);
}
- // A host gate REPLACES the session's rather than fronting it --
- // `tool_policy` assigns. `HostTurnTools::with_policy` says why, and
- // what it costs a host that gates only its own names.
- if let Some(policy) = host_policy {
- builder = builder.tool_policy(policy);
- }
builder = builder.archivist_hook(archivist_hook_arc);
let mut agent = builder.build()?;
let connected_integrations_initialized = prewarmed_integrations.is_some();
@@ -1214,20 +1196,3 @@ pub(crate) fn provider_role_for_definition(
.flatten();
provider_role_for(master_hint.as_deref().or(default_model))
}
-
-fn derive_turn_workspace_descriptor() -> Option<tinytools::WorkspaceDescriptor> {
- let root = crate::agent::turn_workspace::current()?;
- if !root.is_dir() {
- tracing::warn!(
- root = %root.display(),
- "[turn_workspace] scoped root is not an existing directory — \
- falling back to the shared action_dir cwd for this turn"
- );
- return None;
- }
- tracing::debug!(
- root = %root.display(),
- "[turn_workspace] turn bound to the embedder's per-turn root as default cwd"
- );
- Some(tinytools::WorkspaceDescriptor::new(root).with_policy_id("turn-workspace"))
-}
diff --git a/crates/openhuman-core/src/agent/session_host/builder/helpers.rs b/crates/openhuman-core/src/agent/session_host/builder/helpers.rs
index a732364d0d..dbac09ff14 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/helpers.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/helpers.rs
@@ -190,3 +190,20 @@ pub(super) fn add_memory_prompt_sections(
}
prompt_builder
}
+
+pub(super) fn derive_turn_workspace_descriptor() -> Option<tinytools::WorkspaceDescriptor> {
+ let root = crate::agent::turn_workspace::current()?;
+ if !root.is_dir() {
+ tracing::warn!(
+ root = %root.display(),
+ "[turn_workspace] scoped root is not an existing directory — \
+ falling back to the shared action_dir cwd for this turn"
+ );
+ return None;
+ }
+ tracing::debug!(
+ root = %root.display(),
+ "[turn_workspace] turn bound to the embedder's per-turn root as default cwd"
+ );
+ Some(tinytools::WorkspaceDescriptor::new(root).with_policy_id("turn-workspace"))
+}
diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
index 3ec8036156..b223fc580c 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/host_tools.rs
@@ -38,11 +38,11 @@ use anyhow::Result;
/// One turn's worth of host-supplied belt.
///
-/// `visible` is the provider-visible allow-list to union into the session's
-/// own; leaving it empty makes the tools reachable but unadvertised, which is
-/// rarely what a host wants. `policy`, when set, becomes the session's gate --
-/// see [`with_policy`](Self::with_policy), which is not what "host tools"
-/// might suggest.
+/// `visible` adds names to a named session allow-list. A wildcard session
+/// retains its native registry and applies each tool's exposure metadata;
+/// `permanent` explicitly forces selected host tools into the prompt and schema.
+/// `policy`, when set, becomes the whole session's gate; see
+/// [`with_policy`](Self::with_policy).
#[derive(Default)]
pub struct HostTurnTools {
/// The tools themselves, placed **ahead of** the config-derived belt so a
@@ -50,7 +50,8 @@ pub struct HostTurnTools {
pub tools: Vec<Box<dyn Tool>>,
/// Tool names permanently advertised directly and rendered in a managed prompt section.
pub permanent: HashSet<String>,
- /// Names to add to the provider-visible allow-list.
+ /// Names to add to a named provider-visible allow-list.
+ /// Wildcard sessions already expand the registry subject to tool exposure.
pub visible: HashSet<String>,
/// Names to remove from the provider-visible allow-list for this turn.
///
@@ -97,7 +98,6 @@ impl HostTurnTools {
/// gate: there is nothing to admit.
///
/// [`dedup_visible_tool_specs`]: super::dedup_visible_tool_specs
- #[must_use]
pub(super) fn merge_into(
self,
agent_id: &str,
@@ -126,7 +126,7 @@ impl HostTurnTools {
);
anyhow::ensure!(
self.tools.iter().filter(|tool| tool.name() == name).count() == 1,
- "duplicate permanent tool name: {name}"
+ "permanent tool must have exactly one source: {name}"
);
}
let permanent = &self.permanent;
@@ -140,7 +140,12 @@ impl HostTurnTools {
}
}),
);
- visible.extend(self.visible);
+ // An empty set represents the original wildcard scope until build().
+ // Filling it with an attached source's names would turn it into a
+ // literal allowlist and silently discard the native registry.
+ if !visible.is_empty() {
+ visible.extend(self.visible);
+ }
Ok(MergedHostTurnTools {
policy: self.policy,
withheld: self.withheld,
@@ -175,6 +180,7 @@ impl HostTurnTools {
&& self.visible.is_empty()
&& self.withheld.is_empty()
&& self.policy.is_none()
+ && self.permanent.is_empty()
}
}
@@ -192,20 +198,17 @@ pub(super) fn merge_for_turn(
session_id: Option<&str>,
tools: &mut Vec<Box<dyn Tool>>,
visible: &mut HashSet<String>,
-) -> Result<(
- Option<Arc<dyn ToolPolicy>>,
- HashSet<String>,
- HashSet<String>,
-)> {
+) -> Result<MergedHostTurnTools> {
match host
.map(|build| build(TurnContext::new(agent_id, session_id)))
.map(|host_tools| host_tools.merge_into(agent_id, tools, visible))
{
- Some(merged) => {
- let merged = merged?;
- Ok((merged.policy, merged.withheld, merged.permanent))
- }
- None => Ok((None, HashSet::new(), HashSet::new())),
+ Some(merged) => merged,
+ None => Ok(MergedHostTurnTools {
+ policy: None,
+ withheld: HashSet::new(),
+ permanent: HashSet::new(),
+ }),
}
}
@@ -324,3 +327,24 @@ impl OpenHumanSessionHost {
)
}
}
+
+/// Compose the host belt before adding the remaining product configuration.
+pub(super) fn tool_builder(
+ host: Option<&HostTools>,
+ agent_id: &str,
+ session_id: Option<&str>,
+ mut tools: Vec<Box<dyn Tool>>,
+ mut visible: HashSet<String>,
+) -> Result<super::super::SessionHostBuilder> {
+ let merged = merge_for_turn(host, agent_id, session_id, &mut tools, &mut visible)?;
+ let mut builder = OpenHumanSessionHost::builder()
+ .tools(tools)
+ .visible_tool_names(visible)
+ .withheld_tool_names(merged.withheld)
+ .permanent_tool_names(merged.permanent);
+ // A supplied gate retains the existing replacement semantics.
+ if let Some(policy) = merged.policy {
+ builder = builder.tool_policy(policy);
+ }
+ Ok(builder)
+}
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session.rs b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
index fcf9e1e7d4..48e359656d 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
@@ -5,6 +5,7 @@
//! prefix reconciliation, tool snapshots, resume and persistence remain inside
//! the runtime session.
+mod permanent;
mod prompt;
use std::sync::Arc;
@@ -431,36 +432,13 @@ impl OpenHumanTurnPrelude {
synthesized_names.clone(),
);
let auto_include_new_synthesized_tools = surface.auto_include_new_synthesized_tools;
- let agent_definition_name = surface.agent_definition_name.clone();
reconcile_synthesized_visibility(
&mut surface.visible_tool_names,
&previous_synthesized,
&synthesized_names,
auto_include_new_synthesized_tools,
);
- crate::tools::toolpacks::strip_packed_from_visible(
- &mut surface.visible_tool_names,
- &agent_definition_name,
- );
- // Same split as the session host's `recompute_deferred_tool_names`:
- // a `Deferred` synthesised tool leaves the wire and joins the
- // searchable set, on a belt that opted into discovery.
- if surface.discovery_enabled {
- let deferred = crate::tools::implementations::meta::deferred_set(
- surface.tools.as_slice(),
- synthesized.as_slice(),
- &surface.requested_deferred_tools,
- );
- surface
- .visible_tool_names
- .retain(|name| !deferred.contains(name));
- surface.deferred_tool_names = deferred;
- }
- let permanent = surface.permanent_tool_names.clone();
- surface.visible_tool_names.extend(permanent.iter().cloned());
- surface
- .deferred_tool_names
- .retain(|name| !permanent.contains(name));
+ permanent::refresh_visibility(&mut surface, &synthesized);
let specs = surface
.durable_tool_specs
@@ -1594,18 +1572,7 @@ impl OpenHumanSessionHost {
.map_err(|error| {
tinyagents_runtime::RuntimeError::Driver(error.to_string())
})?;
- {
- let surface = prelude
- .tool_surface
- .lock()
- .unwrap_or_else(std::sync::PoisonError::into_inner);
- preparation.prefix = super::managed_tools::refresh_prefix(
- preparation.prefix.as_ref().unwrap_or(view.prefix),
- &surface.visible_tool_specs,
- &surface.permanent_tool_names,
- )
- .or(preparation.prefix);
- }
+ prelude.refresh_permanent_prefix(&mut preparation, view.prefix);
if overrides.suppress_tools {
// One-off tool-less turn: must not become the
// thread's recorded tool list.
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs
new file mode 100644
index 0000000000..7c071ecc36
--- /dev/null
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session/permanent.rs
@@ -0,0 +1,52 @@
+//! Permanent host tool visibility and the managed prompt catalogue.
+
+use super::{OpenHumanTurnPrelude, OpenHumanTurnToolSurface};
+use tinyagents_runtime::{PrefixSnapshot, TurnPreparation};
+
+pub(super) fn refresh_visibility(
+ surface: &mut OpenHumanTurnToolSurface,
+ synthesized: &[Box<dyn tinytools::Tool>],
+) {
+ crate::tools::toolpacks::strip_packed_from_visible(
+ &mut surface.visible_tool_names,
+ &surface.agent_definition_name.clone(),
+ );
+ // Same split as the session host's `recompute_deferred_tool_names`:
+ // a `Deferred` synthesised tool leaves the wire and joins the
+ // searchable set, on a belt that opted into discovery.
+ if surface.discovery_enabled {
+ let deferred = crate::tools::implementations::meta::deferred_set(
+ surface.tools.as_slice(),
+ synthesized,
+ &surface.requested_deferred_tools,
+ );
+ surface
+ .visible_tool_names
+ .retain(|name| !deferred.contains(name));
+ surface.deferred_tool_names = deferred;
+ }
+ let permanent = surface.permanent_tool_names.clone();
+ surface.visible_tool_names.extend(permanent.iter().cloned());
+ surface
+ .deferred_tool_names
+ .retain(|name| !permanent.contains(name));
+}
+
+impl OpenHumanTurnPrelude {
+ pub(super) fn refresh_permanent_prefix(
+ &self,
+ preparation: &mut TurnPreparation,
+ current: &PrefixSnapshot,
+ ) {
+ let surface = self
+ .tool_surface
+ .lock()
+ .unwrap_or_else(std::sync::PoisonError::into_inner);
+ preparation.prefix = super::super::managed_tools::refresh_prefix(
+ preparation.prefix.as_ref().unwrap_or(current),
+ &surface.visible_tool_specs,
+ &surface.permanent_tool_names,
+ )
+ .or(preparation.prefix.take());
+ }
+}
diff --git a/crates/openhuman-embed/tests/attached_tools.rs b/crates/openhuman-embed/tests/attached_tools.rs
index efa9e5b4c0..ba60c1dea7 100644
--- a/crates/openhuman-embed/tests/attached_tools.rs
+++ b/crates/openhuman-embed/tests/attached_tools.rs
@@ -7,6 +7,10 @@ use openhuman_embed::{
use std::sync::Arc;
use wiremock::matchers::{method, path};
use wiremock::{Mock, ResponseTemplate};
+// Runtime is process-wide. Keep the guard on the synchronous test caller;
+// it outlives block_on and the scoped Runtime/Agent teardown inside its future.
+static RUNTIME_LOCK: std::sync::Mutex<()> = std::sync::Mutex::new(());
+
struct Marker(&'static str);
#[async_trait::async_trait]
impl Tool for Marker {
@@ -31,6 +35,9 @@ impl Tool for Marker {
}
#[test]
fn attached_tools_survive_clones_and_session_resume() {
+ let _runtime = RUNTIME_LOCK
+ .lock()
+ .unwrap_or_else(std::sync::PoisonError::into_inner);
let collision = openhuman_core::agent::OpenHumanSessionHost::builder()
.tools(vec![Box::new(Marker("mcp_fixture_send"))])
.synthesized_tools(vec![Box::new(Marker("mcp_fixture_send"))])
@@ -208,3 +215,72 @@ fn attached_tools_survive_clones_and_session_resume() {
.unwrap();
});
}
+
+#[test]
+fn attaching_before_first_turn_preserves_and_executes_native_tools() {
+ let _runtime = RUNTIME_LOCK
+ .lock()
+ .unwrap_or_else(std::sync::PoisonError::into_inner);
+ runtime().block_on(async {
+ tokio::spawn(async {
+ struct NativeCall(std::sync::atomic::AtomicUsize);
+ impl wiremock::Respond for NativeCall {
+ fn respond(&self, _: &wiremock::Request) -> ResponseTemplate {
+ let body = if self.0.fetch_add(1, std::sync::atomic::Ordering::SeqCst) == 0 {
+ serde_json::json!({
+ "id":"fresh-wildcard", "object":"chat.completion", "model":"fixture",
+ "choices":[{"index":0,"finish_reason":"tool_calls","message":{
+ "role":"assistant","content":null,"tool_calls":[{
+ "id":"native-shell","type":"function","function":{
+ "name":"shell","arguments":"{\"command\":\"printf native-wildcard-survived\"}"
+ }
+ }]
+ }}]
+ })
+ } else {
+ chat_completion("native tool completed")
+ };
+ ResponseTemplate::new(200).set_body_json(body)
+ }
+ }
+ let backend = stub_backend().await;
+ let provider = wiremock::MockServer::start().await;
+ Mock::given(method("POST"))
+ .and(path("/v1/chat/completions"))
+ .respond_with(NativeCall(std::sync::atomic::AtomicUsize::new(0)))
+ .mount(&provider).await;
+ let runtime = Runtime::builder()
+ .config(offline_config()).workspace(Workspace::Ephemeral)
+ .backend_url(backend.uri()).build().await.unwrap();
+ let agent = runtime.agent(AgentSpec::new("fresh-attached")
+ .provider(Provider::openai_compatible(format!("{}/v1",provider.uri()),"fixture").model("fixture"))
+ .definition(AgentDefinitionSpec::new().system_prompt("ORIGINAL_FRESH_HOST_PROMPT")
+ .tools(ToolScopeSpec::Wildcard))).unwrap();
+ let attachment: HostTools = Arc::new(|_| HostTurnTools::advertised(vec![Box::new(Marker("hivemind_message"))]));
+ agent.attach_tools("hivemind", attachment).unwrap();
+ agent.run("Run the native tool").await.unwrap();
+ let requests = chat_requests(&provider).await;
+ assert_eq!(requests.len(), 2);
+ let first: serde_json::Value = serde_json::from_slice(&requests[0].body).unwrap();
+ let names: Vec<_> = first["tools"].as_array().unwrap().iter()
+ .filter_map(|tool| tool["function"]["name"].as_str()).collect();
+ assert!(names.contains(&"shell"), "native wildcard tool missing: {names:?}");
+ assert!(names.contains(&"hivemind_message"));
+ let second: serde_json::Value = serde_json::from_slice(&requests[1].body).unwrap();
+ assert!(second["messages"].as_array().unwrap().iter().any(|message|
+ message["role"] == "tool" && message["content"].as_str().is_some_and(|text|
+ text.contains("native-wildcard-survived") && !text.contains("unknown tool"))),
+ "the native executor must actually run: {second}");
+ assert!(first["messages"].to_string().contains("ORIGINAL_FRESH_HOST_PROMPT"));
+ }).await.unwrap();
+ });
+}
+
+#[test]
+fn permanent_metadata_requires_a_real_source() {
+ let factory = HostTurnTools {
+ permanent: std::collections::HashSet::from(["missing_source".into()]),
+ ..Default::default()
+ };
+ assert!(!factory.is_empty(), "metadata must reach source validation");
+}
diff --git a/scripts/ci/agent-runtime-boundary-baseline.json b/scripts/ci/agent-runtime-boundary-baseline.json
index 02672e727d..62344b80cc 100644
--- a/scripts/ci/agent-runtime-boundary-baseline.json
+++ b/scripts/ci/agent-runtime-boundary-baseline.json
@@ -421,8 +421,8 @@
},
{
"rule": "openhuman-task-local",
- "path": "crates/openhuman-core/src/agent/session_host/builder/factory.rs",
- "line": 1198,
+ "path": "crates/openhuman-core/src/agent/session_host/builder/helpers.rs",
+ "line": 195,
"text": "let root = crate::agent::turn_workspace::current()?;",
"occurrence": 1
},
@@ -1088,7 +1088,7 @@
"rule": "openhuman-upstream-reexport",
"path": "crates/openhuman-core/src/tools/mod.rs",
"line": 70,
- "text": "pub use tinytools::{PermissionLevel, Tool, ToolCategory, ToolResult, ToolScope, ToolSpec};",
+ "text": "pub use tinytools::{",
"occurrence": 1
},
{
diff --git a/scripts/ci/check-openhuman-rust-layout.mjs b/scripts/ci/check-openhuman-rust-layout.mjs
index f5d7bca962..bc87e78b1b 100644
--- a/scripts/ci/check-openhuman-rust-layout.mjs
+++ b/scripts/ci/check-openhuman-rust-layout.mjs
@@ -38,12 +38,12 @@ const LEGACY_LIMIT_ENTRIES = [
// under the general 750 limit, so it needs no exception at all.
// The session-todo integration added transcript metadata construction to
// this already-exempt composition seam. Keep its allowance exact.
- ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1908],
+ ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1903],
// Session-host factory still assembles the product's deliberately coupled
// provider, security, memory, tool and prompt policy. Generic session
// state moved to tinyagents-runtime; this remaining composition is split in
// a follow-up without reintroducing an old harness/session exception.
- ["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 1212],
+ ["crates/openhuman-core/src/agent/session_host/builder/factory.rs", 1198],
["crates/openhuman-core/src/agent/subagent_host/lifecycle.rs", 1309],
["crates/openhuman-core/src/agent/subagent_host/ops/runner.rs", 1427],
["crates/openhuman-core/src/tools/ops.rs", 1322],