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
refactor: replace `crate::tools::toolpacks::USE_SKILL` with `tinyagents_harness::tool::packs::USE_SK
Steven Enamakel3cce875e65b8
diff --git a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rsindex 49f80650d3..62bfbcffef 100644--- a/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs+++ b/crates/openhuman-core/src/agent/harness/tool_result_artifacts/mod.rs@@ -38,7 +38,7 @@ const FILE_READ_TOOL: &str = "file_read";/// wrapped tool's result — is followed into the tool it runs (#6284). Any/// other tool that happens to carry `tool`/`args` fields is not a wrapper.pub(crate) fn artifact_read_target(tool_name: &str, args: &Value) -> Option<ArtifactRead> {- if tool_name == crate::tools::toolpacks::USE_SKILL {+ if tool_name == tinyagents_harness::tool::packs::USE_SKILL {let inner_tool = args.get("tool").and_then(Value::as_str)?;return artifact_read_target(inner_tool, args.get("args")?);}diff --git a/crates/openhuman-core/src/agent/registry/agents/fleet_prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/fleet_prompt_tests.rsindex 6ca077c8e5..31a527b722 100644--- a/crates/openhuman-core/src/agent/registry/agents/fleet_prompt_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/fleet_prompt_tests.rs@@ -134,7 +134,7 @@ fn on_belt(def: &AgentDefinition, tool: &str) -> bool {/// whenever the pack table withheld something (`strip_packed_from_visible`).fn can_call(def: &AgentDefinition, tool: &str, universe: &BTreeSet<String>) -> bool {use crate::tools::toolpacks::ops::is_withheld_from;- if tool == crate::tools::toolpacks::USE_SKILL {+ if tool == tinyagents_harness::tool::packs::USE_SKILL {return universe.iter().any(|n| on_belt(def, n) && is_withheld_from(&def.id, n));diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rsindex 10a3297f5c..1d2500fe5f 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests.rs@@ -112,7 +112,7 @@ fn use_skill_spec_from_registry() -> ToolSpec {crate::tools::toolpacks::append_pack_tools(&mut tools);let tool = tools.iter()- .find(|t| t.name() == crate::tools::toolpacks::USE_SKILL)+ .find(|t| t.name() == tinyagents_harness::tool::packs::USE_SKILL).expect("append_pack_tools registers use_skill");ToolSpec {name: tool.name().to_string(),@@ -132,12 +132,12 @@ fn visible_specs_scope_use_skills_index_to_the_session() {let visible: std::collections::HashSet<String> = specs.iter().map(|s| s.name.clone()).collect();// Reachable: one workflows tool. Everything else in every other pack is// denied, exactly like the orchestrator against `system` / `audio`.- let session = session_allowing(&["run_workflow", crate::tools::toolpacks::USE_SKILL]);+ let session = session_allowing(&["run_workflow", tinyagents_harness::tool::packs::USE_SKILL]);let out = visible_tool_specs_for_policy(&specs, &visible, &session);let load = out.iter()- .find(|s| s.name == crate::tools::toolpacks::USE_SKILL)+ .find(|s| s.name == tinyagents_harness::tool::packs::USE_SKILL).expect("use_skill is still offered — workflows is reachable");assert!(@@ -169,7 +169,7 @@ fn visible_specs_drop_the_pack_tool_when_no_pack_is_reachable() {let specs: Vec<std::sync::Arc<ToolSpec>> =vec![std::sync::Arc::new(use_skill_spec_from_registry())];let visible: std::collections::HashSet<String> = specs.iter().map(|s| s.name.clone()).collect();- let session = session_allowing(&[crate::tools::toolpacks::USE_SKILL]);+ let session = session_allowing(&[tinyagents_harness::tool::packs::USE_SKILL]);let out = visible_tool_specs_for_policy(&specs, &visible, &session);assert!(@@ -246,12 +246,12 @@ fn a_realistic_withheld_session_keeps_its_packs_advertised() {let names: Vec<&str> = out.iter().map(|s| s.name.as_str()).collect();assert!(- names.contains(&crate::tools::toolpacks::USE_SKILL),+ names.contains(&tinyagents_harness::tool::packs::USE_SKILL),"use_skill must survive — the pack it opens is reachable: {names:?}");let load = out.iter()- .find(|s| s.name == crate::tools::toolpacks::USE_SKILL)+ .find(|s| s.name == tinyagents_harness::tool::packs::USE_SKILL).expect("use_skill spec");assert!(load.description.contains("`goals`"),@@ -281,7 +281,7 @@ fn use_skill_survives_a_ceiling_that_excludes_it_when_a_pack_is_still_reachable(assert!(!session.allowed_tool_names- .contains(crate::tools::toolpacks::USE_SKILL),+ .contains(tinyagents_harness::tool::packs::USE_SKILL),"precondition: use_skill itself is not in the allowlist");@@ -292,7 +292,7 @@ fn use_skill_survives_a_ceiling_that_excludes_it_when_a_pack_is_still_reachable(let out = visible_tool_specs_for_policy(&specs, &visible, &session);let load = out.iter()- .find(|s| s.name == crate::tools::toolpacks::USE_SKILL)+ .find(|s| s.name == tinyagents_harness::tool::packs::USE_SKILL).expect("use_skill must survive even though it is not itself in allowed_tool_names — \its listing action is always ReadOnly and the workflows pack is reachable",diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rsindex 7765b1956b..caa8f55989 100644--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_spec_views_tests.rs@@ -57,7 +57,7 @@ fn the_three_spec_views_share_their_leaf_schemas() {// rewrite mutate in place would silently scope the durable set, and a// change that deep-copied everything again would still pass an// exclusion-only test.- let use_skill = crate::tools::toolpacks::USE_SKILL;+ let use_skill = tinyagents_harness::tool::packs::USE_SKILL;let mut saw_scoped_use_skill = false;let mut saw_scoped_spawn = false;diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rsindex 5ef8af2a48..ec0b570adc 100644--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs@@ -139,7 +139,7 @@ pub(super) fn visible_tool_specs_for_policy(// below already does the real per-tool narrowing via `is_callable`// (and drops the spec entirely when nothing survives), so this// filter only needs to gate *other* tools on the static ceiling.- spec.name == crate::tools::toolpacks::USE_SKILL || tool_policy.is_allowed(&spec.name)+ spec.name == tinyagents_harness::tool::packs::USE_SKILL || tool_policy.is_allowed(&spec.name)}).cloned().filter_map(|mut spec| {@@ -155,7 +155,7 @@ pub(super) fn visible_tool_specs_for_policy(}return Some(spec);}- if spec.name == crate::tools::toolpacks::USE_SKILL {+ if spec.name == tinyagents_harness::tool::packs::USE_SKILL {// `false` means no pack has a callable tool: an empty index and// an empty enum are not a tool, so drop it rather than ship one.// `Arc::make_mut`, not `&mut spec`: the three spec views sharediff --git a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rsindex 3fe222b86e..236a0bcbf9 100644--- a/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_tool_registration.rs@@ -23,7 +23,7 @@ use crate::agent::tinyagents::turn_policy::is_subagent_spawn_or_delegate_tool;use crate::agent::tinyagents::use_skill_dispatch::UseSkillDispatch;use crate::agent::tools::{DelegateToolDispatch, TodoToolDispatch};use crate::memory::agent::CallMemoryAgentDispatch;-use crate::tools::toolpacks::USE_SKILL;+use tinyagents_harness::tool::packs::USE_SKILL;/// Typed-dispatch selection shared by the direct per-turn registration below/// and by [`UseSkillDispatch`], which must resolve the SAME live-parentdiff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rsindex 5d9ea5defb..8a6e11d7ae 100644--- a/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/tool_policy.rs@@ -118,9 +118,9 @@ impl ToolPolicyMiddleware {/// the tools in it this session can call, or the pack's route when none.pub(crate) fn no_such_pack_tool<'a>(&self,- pack: &'static crate::tools::toolpacks::ToolPack,+ pack: &'static tinyagents_harness::tool::packs::ToolPack,tool: &'a str,- ) -> crate::tools::toolpacks::NoSuchPackTool<'a> {+ ) -> tinyagents_harness::tool::packs::NoSuchPackTool<'a> {let callable = pack.tools.iter()@@ -130,7 +130,7 @@ impl ToolPolicyMiddleware {&& !self.session.decision_for(name).blocks_execution()}).collect();- crate::tools::toolpacks::NoSuchPackTool {+ tinyagents_harness::tool::packs::NoSuchPackTool {skill: pack.id,tool,callable,@@ -139,8 +139,8 @@ impl ToolPolicyMiddleware {}/// The route sentence for a pack, resolved against THIS session.- pub(crate) fn route_for_pack(&self, pack: &crate::tools::toolpacks::ToolPack) -> String {- crate::tools::toolpacks::route_sentence(+ pub(crate) fn route_for_pack(&self, pack: &tinyagents_harness::tool::packs::ToolPack) -> String {+ tinyagents_harness::tool::packs::route_sentence(&self.callable_delegates_for(pack.owners),pack.owners,)@@ -157,7 +157,7 @@ impl ToolPolicyMiddleware {/// tool named, no `skill` argument, no pack handle), so the call falls/// through to the tool's own `execute` unchanged.pub(crate) fn render_skill_for_session(&self, call: &TaToolCall) -> Option<TaToolResult> {- if crate::tools::toolpacks::named_tool(&call.arguments).is_some() {+ if tinyagents_harness::tool::packs::named_tool(&call.arguments).is_some() {return None;}let skill = call@@ -403,7 +403,7 @@ impl ToolMiddleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>// `use_skill` that the session forbids, or that the policy denies or// holds for approval, still hand back a full pack listing — the gates// would be advisory for this one tool.- if call.name == crate::tools::toolpacks::USE_SKILL {+ if call.name == tinyagents_harness::tool::packs::USE_SKILL {if let Some(result) = self.render_skill_for_session(&call) {return Ok(MiddlewareToolOutcome::Result(result));}diff --git a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rsindex 5a5c76a8b2..59489fb4c1 100644--- a/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs+++ b/crates/openhuman-core/src/agent/tinyagents/use_skill_dispatch_tests.rs@@ -19,7 +19,7 @@ use crate::agent::harness::ParentExecutionContext;use crate::agent::prompts::ToolCallFormat;use crate::agent::tinyagents::tools::CanonicalSharedToolAdapter;use crate::memory::{Memory, MemoryCategory, MemoryEntry, NamespaceSummary, RecallOpts};-use crate::tools::toolpacks::tools::{PackRegistryHandle, UseSkillTool};+use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool};use async_trait::async_trait;use serde_json::json;use std::path::Path;@@ -184,7 +184,7 @@ fn build_use_skill_dispatch() -> UseSkillDispatch {handle.bind(Arc::downgrade(&durable));let adapter =- CanonicalSharedToolAdapter::for_name(vec![durable], crate::tools::toolpacks::USE_SKILL)+ CanonicalSharedToolAdapter::for_name(vec![durable], tinyagents_harness::tool::packs::USE_SKILL).expect("use_skill resolves in the durable registry it was just placed in");UseSkillDispatch::new(Arc::new(adapter), handle)}diff --git a/tests/raw_coverage/tools_erased_host_extension_raw_coverage_e2e.rs b/tests/raw_coverage/tools_erased_host_extension_raw_coverage_e2e.rsindex cc1f118dd2..d02bede6b7 100644--- a/tests/raw_coverage/tools_erased_host_extension_raw_coverage_e2e.rs+++ b/tests/raw_coverage/tools_erased_host_extension_raw_coverage_e2e.rs@@ -32,7 +32,7 @@ use openhuman_core::agent::tool_policy::{};use openhuman_core::skills::types::tool_result_from_mcp;use openhuman_core::tools::toolpacks::registry::PACKS;-use openhuman_core::tools::toolpacks::tools::{PackRegistryHandle, UseSkillTool};+use tinyagents_harness::tool::packs::{PackRegistryHandle, UseSkillTool};use openhuman_core::tools::host_extensions::{generated_runtime_context, pack_registry_handle};use tinytools::{PermissionLevel, Tool, ToolResult};