Skip to content

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

refactor(agent): move agent definition registry out of harness

Steven Enamakel57037589ff5f
diff --git a/crates/openhuman-core/src/agent/context/README.md b/crates/openhuman-core/src/agent/context/README.md
index 294e686b7f..a13201fdc1 100644
--- a/crates/openhuman-core/src/agent/context/README.md
+++ b/crates/openhuman-core/src/agent/context/README.md
@@ -74,7 +74,7 @@ No `store.rs`. State is per-session and in-memory:
- `agent::harness`: the primary consumer: `session/builder/builder_build.rs` constructs the `ContextManager`; `session/turn/core/harness_turn.rs` reads the budget/compaction getters into the tinyagents turn config; `session/turn/session_io/{transcript_persist,background_tasks}.rs` read `stats()`; `fork_context.rs` and [`../subagent_host/`](../subagent_host/) consume prompt types.
- `agent::tinyagents`: `turn_middleware.rs` reads `CLEARED_PLACEHOLDER` when configuring `MicrocompactMiddleware`; `payload_summarizer.rs` and `host/context_composer.rs` build `PromptContext`s through `agent::prompts`.
-- **`agent::registry::agents/*/prompt.rs`**, `flows/agents/*/prompt.rs`, `skills/*/agent/*/prompt.rs`: archetype prompt modules pull prompt sections/builder through `agent::prompts`.
+- **`agent_registry::agents/*/prompt.rs`**, `flows/agents/*/prompt.rs`, `skills/*/agent/*/prompt.rs`: archetype prompt modules pull prompt sections/builder through `agent::prompts`.
- `channels`: [`channels/system_prompt.rs`](../../channels/system_prompt.rs) (`ChannelSystemPrompt`, used by [`channels/runtime/startup/start_channels.rs`](../../channels/runtime/startup/start_channels.rs)) calls `channels_prompt::build_system_prompt_with_identity`; [`channels/mod.rs`](../../channels/mod.rs) re-exports `build_system_prompt`; the `channels/tests/*` prompt/identity tests call it directly.
- `agent::triage`, `agent::debug`, `agent::orchestration::tools` (spawn_subagent and friends), `tools::orchestrator_tools`, `integrations::composio`: consume prompt types (`PromptContext`, `PromptSection`, `ToolCallFormat`, `ConnectedIntegration`, …) via `agent::prompts`.
diff --git a/crates/openhuman-core/src/agent/debug/mod.rs b/crates/openhuman-core/src/agent/debug/mod.rs
index 0c086a2c54..2124a800ee 100644
--- a/crates/openhuman-core/src/agent/debug/mod.rs
+++ b/crates/openhuman-core/src/agent/debug/mod.rs
@@ -22,7 +22,7 @@ pub mod wire;
pub use dump_writer::{write_prompt_dumps, DumpWriteSummary};
pub use wire::render as render_wire_dump;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::session_host::OpenHumanSessionHost;
use crate::config::Config;
use tinytools::ToolCategory;
diff --git a/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs b/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs
index 05cea7a6d7..f257a62ab3 100644
--- a/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs
+++ b/crates/openhuman-core/src/agent/debug/prompt_size_tests.rs
@@ -77,7 +77,7 @@ fn tools_are_ranked_by_cost_not_registration_order() {
/// ~200 tools, so every `tool_bytes` budget described a belt no agent carries.
#[test]
fn session_report_measures_the_visible_belt_not_the_registry() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.unwrap();
let tmp = tempfile::TempDir::new().unwrap();
let config = crate::config::Config {
diff --git a/crates/openhuman-core/src/agent/harness/README.md b/crates/openhuman-core/src/agent/harness/README.md
index 2b1e1e34b8..a75d89be64 100644
--- a/crates/openhuman-core/src/agent/harness/README.md
+++ b/crates/openhuman-core/src/agent/harness/README.md
@@ -39,7 +39,7 @@ used here (not defined here) by [`fork_context.rs`](./fork_context.rs).
| Module | Role |
| --- | --- |
-| [`host_definition.rs`](./host_definition.rs) | The host side of agent definitions: `AgentExt` (prompt omissions, TokenJuice profile, MCP flag, prompt builder) over `tinyagents_definition::AgentDefinition<X>`, plus `AgentDefinitionRegistry` (a `DefinitionSet<AgentExt>` with the process/context singleton) and user-definition path resolution. The vocabulary (`ModelSpec`, `ToolScope`, `SandboxMode`, `AgentTier`, `PromptSource`, ...) and the TOML directory loader live in `tinyagents-definition`. Built-ins come from `crate::agent::registry::agents`. |
+| [`host_definition.rs`](./host_definition.rs) | The host side of agent definitions: `AgentExt` (prompt omissions, TokenJuice profile, MCP flag, prompt builder) over `tinyagents_definition::AgentDefinition<X>`, plus `AgentDefinitionRegistry` (a `DefinitionSet<AgentExt>` with the process/context singleton) and user-definition path resolution. The vocabulary (`ModelSpec`, `ToolScope`, `SandboxMode`, `AgentTier`, `PromptSource`, ...) and the TOML directory loader live in `tinyagents-definition`. Built-ins come from `crate::agent_registry::agents`. |
| `fork_context.rs` | The `ParentExecutionContext` snapshot a spawning agent hands to sub-agents, carried explicitly on the run context. `fork_context.rs` also carries the `RunQueue` handle (from `tinyagents_harness::run_queue`) down to a forked turn. |
| `graph.rs` | `run_channel_turn_via_graph` (`pub(crate)`): the channel/CLI turn graph, thin over `TurnSpec::run`; called by the `agent.run_turn` native-bus handler in [`agent/bus.rs`](../bus.rs). |
| `artifact_offload/` | The `outputs/` / `workspace/` convention under `action_dir`: prompt half (`contract.rs`) and host policy half (`policy.rs`); mechanics (thresholds, path resolution, pointer rendering, the writer) live in `tinyagents_harness::artifacts` and are re-exported here. |
@@ -78,7 +78,7 @@ turn lifecycle are in `../session_host/`; `run_subagent`,
(`<tool_call>` tags, fenced blocks, bare JSON, `<invoke>` XML, GLM grammar,
p-format). This crate is a test-only dependency of `harness/`; the parsers
are not called from production code here.
-- `crate::agent::registry::agents`: built-in agent archetype TOML/prompt
+- `crate::agent_registry::agents`: built-in agent archetype TOML/prompt
bundles; custom bundles are loaded by `tinyagents_definition`.
- `crate::security::SecurityPolicy`: workspace containment policy plumbed
into `artifact_offload::new_artifact_offload`.
diff --git a/crates/openhuman-core/src/agent/harness/test_support.rs b/crates/openhuman-core/src/agent/harness/test_support.rs
index 000b1dbc7e..1601bfcc75 100644
--- a/crates/openhuman-core/src/agent/harness/test_support.rs
+++ b/crates/openhuman-core/src/agent/harness/test_support.rs
@@ -40,7 +40,7 @@ pub(crate) fn test_main_def() -> AgentDefinition {
delegate_name: None,
agent_tier: AgentTier::Chat,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
@@ -86,7 +86,7 @@ pub(crate) fn test_inherit_echo_def() -> AgentDefinition {
delegate_name: None,
agent_tier: tinyagents_definition::AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
@@ -128,7 +128,7 @@ pub(crate) fn test_inherit_parallel_worker_def() -> AgentDefinition {
delegate_name: None,
agent_tier: tinyagents_definition::AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/agent/host_agents.rs b/crates/openhuman-core/src/agent/host_agents.rs
index 4ec8045ab3..a8bc2ab2f7 100644
--- a/crates/openhuman-core/src/agent/host_agents.rs
+++ b/crates/openhuman-core/src/agent/host_agents.rs
@@ -30,7 +30,7 @@
use crate::core::runtime::DispatchCtx;
use std::sync::{Arc, LazyLock, PoisonError, RwLock};
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::{HostTools, OpenHumanSessionHost};
use crate::config::Config;
use crate::core::runtime::CoreContext;
diff --git a/crates/openhuman-core/src/agent/host_agents_tests.rs b/crates/openhuman-core/src/agent/host_agents_tests.rs
index 48573c184b..0df95517cc 100644
--- a/crates/openhuman-core/src/agent/host_agents_tests.rs
+++ b/crates/openhuman-core/src/agent/host_agents_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::core::runtime::DomainSet;
/// The resolver slot is process-wide; every test in the crate that installs
@@ -13,7 +13,7 @@ pub(crate) fn lock() -> std::sync::MutexGuard<'static, ()> {
fn definition(id: &str) -> AgentDefinition {
let mut definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.expect("the orchestrator is built in");
diff --git a/crates/openhuman-core/src/agent/mod.rs b/crates/openhuman-core/src/agent/mod.rs
index 5039bd1718..c4d1f763dd 100644
--- a/crates/openhuman-core/src/agent/mod.rs
+++ b/crates/openhuman-core/src/agent/mod.rs
@@ -9,7 +9,7 @@
//! - **[`session_host::OpenHumanSessionHost`]**: The primary entry point for running a
//! conversation. It manages the loop of sending prompts to a provider and
//! executing the resulting tool calls.
-//! - **[`crate::agent::registry::agents`]**: Definitions for built-in
+//! - **[`crate::agent_registry::agents`]**: Definitions for built-in
//! specialized agents (Orchestrator, Code Executor, Researcher, etc.).
//! - **[`triage`]**: A high-performance pipeline for classifying and responding
//! to external triggers (webhooks, cron jobs) using small local models.
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs
index 33aabf834a..43a97e3ef6 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime_tests.rs
@@ -15,7 +15,7 @@ use async_trait::async_trait;
use super::*;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::config::{AgentConfig, Config};
use tinyagents_orchestration::teams::{SessionTeamLedger, TeamService};
use tinyagents_session::run_ledger::{
diff --git a/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs b/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
index af459e4f84..2612f5cb70 100644
--- a/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
+++ b/crates/openhuman-core/src/agent/orchestration/command_center/schemas.rs
@@ -7,7 +7,7 @@ use serde_json::{Map, Value};
use tinyagents_session::run_ledger::command_center::ControlVerb;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::core::Outcome;
use crate::core::all::{ControllerFuture, RegisteredController};
use crate::core::{ControllerSchema, FieldSchema, TypeSchema};
diff --git a/crates/openhuman-core/src/agent/orchestration/delegation.rs b/crates/openhuman-core/src/agent/orchestration/delegation.rs
index 7247b41fdb..7e214ab8ce 100644
--- a/crates/openhuman-core/src/agent/orchestration/delegation.rs
+++ b/crates/openhuman-core/src/agent/orchestration/delegation.rs
@@ -17,7 +17,7 @@
use std::sync::Arc;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,
diff --git a/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs b/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs
index 7d131993f9..0506dea2aa 100644
--- a/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs
+++ b/crates/openhuman-core/src/agent/orchestration/fleet_tools.rs
@@ -13,7 +13,7 @@
//! "does this parent see tool X?", so both texts only ever name tools that
//! are in the caller's belt.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use tinyagents_definition::ToolScope;
/// The fleet-control tools whose availability shapes the delegation texts.
diff --git a/crates/openhuman-core/src/agent/orchestration/fleet_tools_tests.rs b/crates/openhuman-core/src/agent/orchestration/fleet_tools_tests.rs
index aed6a7d9f5..6d73a835ce 100644
--- a/crates/openhuman-core/src/agent/orchestration/fleet_tools_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/fleet_tools_tests.rs
@@ -56,7 +56,7 @@ fn all_is_the_full_vocabulary() {
/// module: it must not be told about wait/steer/close tools.
#[test]
fn builtin_orchestrator_has_no_wait_or_steer() {
- let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only();
+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();
let def = registry.get("orchestrator").expect("built-in orchestrator");
let set = FleetToolSet::from_scope(&def.tools, &def.disallowed_tools);
assert!(set.has("list_subagents"));
diff --git a/crates/openhuman-core/src/agent/orchestration/ops.rs b/crates/openhuman-core/src/agent/orchestration/ops.rs
index 6e1e90010b..31cbe9d046 100644
--- a/crates/openhuman-core/src/agent/orchestration/ops.rs
+++ b/crates/openhuman-core/src/agent/orchestration/ops.rs
@@ -26,7 +26,7 @@ use super::types::{
AgentSnapshot, SpawnAgentRequest, SpawnAgentResponse, WaitAgentOptions, WaitAgentResponse,
};
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::agent::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunError, SubagentRunOptions, SubagentRunOutcome, SubagentRunStatus, run_subagent,
diff --git a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
index 5a80ee7d46..c15f6c0591 100644
--- a/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/ops_tests.rs
@@ -1,6 +1,6 @@
use super::*;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::config::AgentConfig;
use async_trait::async_trait;
use parking_lot::Mutex;
diff --git a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs
index 72eabf3d6f..a63e1f24a7 100644
--- a/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs
+++ b/crates/openhuman-core/src/agent/orchestration/parent_context/builder.rs
@@ -62,9 +62,9 @@ pub(crate) async fn build_root_parent(
// engines can also be reached from contexts that only built the HTTP router
// (e.g. the JSON-RPC e2e harness) — so init defensively here. `OnceLock`
// makes this idempotent: a no-op when the registry is already loaded.
- if crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_none() {
+ if crate::agent_registry::host_definition::AgentDefinitionRegistry::global().is_none() {
if let Err(err) =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
{
@@ -73,7 +73,7 @@ pub(crate) async fn build_root_parent(
// the registry is *still* `None`, init genuinely failed — fail fast
// here rather than letting every downstream `spawn_agent` fail later
// with `NoParentContext` after orchestration state has advanced.
- if crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_none() {
+ if crate::agent_registry::host_definition::AgentDefinitionRegistry::global().is_none() {
return Err(err)
.context("initialize AgentDefinitionRegistry for orchestration root parent");
}
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
index f1ceacc7ce..4bb5070d9c 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tenant_tests.rs
@@ -248,7 +248,7 @@ async fn unscoped_async_spawn_refuses_before_persisting_a_running_session() {
use crate::agent::orchestration::subagent_sessions::SubagentSessionStore;
use crate::agent::orchestration::tools::{SpawnAsyncSubagentDispatch, SpawnAsyncSubagentTool};
use tinyagents_harness::tool::ToolDispatch;
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let workspace = tempfile::tempdir().unwrap();
assert!(
crate::storage::installed().is_none(),
diff --git a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
index d2d1078b71..7efa1c047b 100644
--- a/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/running_subagents_tests.rs
@@ -293,7 +293,7 @@ async fn snapshot_and_block_scope_to_parent_and_reflect_live_status() {
// The shipped orchestrator has no wait/steer/close tools (#5701): the
// guidance must not name them and must say results arrive on their own.
{
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
let registry = AgentDefinitionRegistry::builtins_only();
let def = registry.get("orchestrator").expect("built-in orchestrator");
let fleet = FleetToolSet::from_scope(&def.tools, &def.disallowed_tools);
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
index 33f8374f10..0cfbc09def 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/dispatch.rs
@@ -12,7 +12,7 @@ use tinytools::WorkspaceDescriptor;
use tokio::sync::mpsc::Sender;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::orchestration::worktree;
use crate::agent::progress::AgentProgress;
use tinyagents_definition::SandboxMode;
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs
index 6e28bb7a82..048005e375 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/run.rs
@@ -11,7 +11,7 @@ use std::path::PathBuf;
use tinyagents_harness::CancellationToken;
use tinytools::WorkspaceDescriptor;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use super::collect::{
SpawnParallelGraphOutcome, collect_spawn_parallel_results, project_spawn_parallel_result,
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
index aa674cf473..b46d929186 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/staging.rs
@@ -22,7 +22,7 @@ use tinyagents_orchestration::parallel::{
};
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use tinyagents_definition::{SandboxMode, ToolScope};
use tinyagents_harness::workspace::GitWorktreeBaseRef;
use tinytools::PermissionLevel;
diff --git a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/types.rs b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/types.rs
index 0bff351a0c..07467f90ce 100644
--- a/crates/openhuman-core/src/agent/orchestration/spawn_parallel/types.rs
+++ b/crates/openhuman-core/src/agent/orchestration/spawn_parallel/types.rs
@@ -6,7 +6,7 @@ use std::path::PathBuf;
use serde::{Deserialize, Serialize};
use tinytools::WorkspaceDescriptor;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
/// One worker admitted by the `spawn_parallel_agents` tool.
///
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
index 34277fe094..54fae2b1f4 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
fn sample_tool() -> ArchetypeDelegationTool {
ArchetypeDelegationTool {
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
index 86c4ccfd5d..a5e9ffbd1d 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/continue_subagent.rs
@@ -8,7 +8,7 @@
//! resume the same sub-agent from its checkpoint with the user's response
//! appended to the conversation history.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
use crate::agent::progress::AgentProgress;
use crate::agent::subagent_host::{
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs b/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
index dc85844b49..4d6cb6eac6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/delegate_graph.rs
@@ -10,7 +10,7 @@
//! Use it for non-trivial sub-tasks that benefit from a self-review/revision
//! loop; use `spawn_subagent` for a single focused hand-off.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::delegation::run_subagent_delegation_with_parent_context;
use async_trait::async_trait;
use serde_json::json;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
index 9e2a07d851..11a722bf32 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch.rs
@@ -1,6 +1,6 @@
//! Subagent dispatch logic shared by all agent delegation tools.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::progress::AgentProgress;
use crate::agent::subagent_host::{
SubagentRunOptions, SubagentRunStatus, run_subagent_with_parent,
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
index 4aa2091b40..fd9e101ec6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/dispatch_tests.rs
@@ -60,7 +60,7 @@ impl Tool for DelegationRegistrationTool {
#[test]
fn typed_dispatch_registration_recognises_every_synthesised_delegate_surface() {
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let collapsed: Arc<dyn Tool> = Arc::new(
CollapsedDelegationTool::for_targets(vec![DelegateTarget {
tool_name: "research".to_string(),
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
index 22f13357b7..e9d50aafae 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent.rs
@@ -5,7 +5,7 @@
//! events and, when possible, persisted in the child worker thread.
use super::subagent_abort_report::AbortReport;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::fleet_tools::FleetToolSet;
use crate::agent::orchestration::running_subagents;
use crate::agent::orchestration::subagent_sessions::{
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
index 549df3e4d1..fab47ba995 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_async_subagent_tests.rs
@@ -1,6 +1,6 @@
use super::*;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::config::AgentConfig;
use std::collections::HashSet;
use std::path::Path;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
index cac55f3020..1335e7c41b 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents.rs
@@ -1,6 +1,6 @@
//! Tool: `spawn_parallel_agents` — fan out independent sub-agent tasks.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
#[cfg(test)]
use crate::agent::orchestration::spawn_parallel::ParallelAgentLineage;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
index c2bb3c40b5..2477c97237 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_parallel_agents_tests.rs
@@ -1,8 +1,8 @@
use super::*;
use crate::agent::OpenHumanSessionHost;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinition;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::spawn_parallel::{
ParallelTaskRejectionKind, SpawnParallelTaskPreflight, prepare_spawn_parallel_tasks_from_defs,
};
@@ -169,7 +169,7 @@ fn definition_with_tool_scope(
delegate_name: None,
agent_tier: AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
index de0ab4b3c5..408afc750f 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_subagent.rs
@@ -12,7 +12,7 @@
//! Sub-agents always run in "typed" mode: a narrow archetype-specific
//! prompt with a filtered tool list, on a cheaper model where applicable.
//!
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::tools::dispatch::{incomplete_stop, stopped_subagent_result};
use crate::agent::progress::AgentProgress;
use crate::agent::subagent_host::{
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
index 5a9ef4ab45..837da9f790 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/spawn_worker_thread.rs
@@ -9,7 +9,7 @@
//! Worker threads carry a hard cap on depth: a worker thread cannot spawn
//! another worker thread.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::subagent_host::{SubagentRunOptions, run_subagent_with_parent};
use crate::threads::store as conversations;
use async_trait::async_trait;
diff --git a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
index f32f89a0bd..4c6bb3a9f6 100644
--- a/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
+++ b/crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs
@@ -1,6 +1,6 @@
use super::{ArchetypeDelegationTool, DelegationTarget, SpawnSubagentTool, SpawnWorkerThreadTool};
use crate::agent::harness::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::prompts::ConnectedIntegration;
use crate::threads::store as conversations;
use async_trait::async_trait;
diff --git a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs
index 81a76fc2c3..861fd7be58 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs
@@ -12,7 +12,7 @@ use tinyagents_orchestration::workflow::{
};
use crate::agent::harness::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use tinyagents_definition::{SandboxMode, ToolScope};
use {
crate::agent::orchestration::AgentOrchestrationSession,
diff --git a/crates/openhuman-core/src/agent/prompts/README.md b/crates/openhuman-core/src/agent/prompts/README.md
index ab798dcd67..b400667af5 100644
--- a/crates/openhuman-core/src/agent/prompts/README.md
+++ b/crates/openhuman-core/src/agent/prompts/README.md
@@ -88,7 +88,7 @@ Other domains contribute prompt content without living in this directory:
session-scoped bytes land at the tail of the prompt.
Built-in archetype system prompts (orchestrator, planner, image_agent,
-and so on) live in `agent/registry/agents/<name>/prompt.rs` and
+and so on) live in `agent_registry/agents/<name>/prompt.rs` and
`flows/agents/{flow_discovery,workflow_builder}/prompt.rs`, not here. Each is a
`PromptSource::Dynamic` function that hand-assembles its body via the
`render_*` helpers; [`agent/session_host/builder/factory.rs`](../session_host/builder/factory.rs) wraps it with
diff --git a/crates/openhuman-core/src/agent/prompts/builder.rs b/crates/openhuman-core/src/agent/prompts/builder.rs
index 37d8bcdff0..5d9dfed728 100644
--- a/crates/openhuman-core/src/agent/prompts/builder.rs
+++ b/crates/openhuman-core/src/agent/prompts/builder.rs
@@ -131,7 +131,7 @@ impl SystemPromptBuilder {
///
/// The sub-agent's archetype prompt is registered as a dedicated
/// section that always renders first. The remaining sections respect
- /// the `omit_*` flags from the [`crate::agent::harness::host_definition::AgentDefinition`]:
+ /// the `omit_*` flags from the [`crate::agent_registry::host_definition::AgentDefinition`]:
/// `omit_identity` skips the project-context dump, `omit_safety_preamble`
/// skips the safety rules, and so on. The `WorkspaceSection` is always
/// included so the sub-agent knows its working directory.
@@ -219,7 +219,7 @@ impl SystemPromptBuilder {
/// rendered bytes are then frozen for the rest of the session the
/// same way `from_final_body` freezes them — the difference is just
/// *when* the freeze happens.
- pub fn from_dynamic(builder: crate::agent::harness::host_definition::PromptBuilder) -> Self {
+ pub fn from_dynamic(builder: crate::agent_registry::host_definition::PromptBuilder) -> Self {
Self {
sections: vec![
Box::new(DynamicPromptSection::new(builder)),
diff --git a/crates/openhuman-core/src/agent/prompts/sections.rs b/crates/openhuman-core/src/agent/prompts/sections.rs
index f6fff1407f..9ee9b4ad0f 100644
--- a/crates/openhuman-core/src/agent/prompts/sections.rs
+++ b/crates/openhuman-core/src/agent/prompts/sections.rs
@@ -18,7 +18,7 @@ use tinytools_agent::dialect::render_pformat_catalogue;
// ─────────────────────────────────────────────────────────────────────────────
/// Sub-agent role prompt — pre-loaded text from an
-/// [`crate::agent::harness::host_definition::AgentDefinition`]'s
+/// [`crate::agent_registry::host_definition::AgentDefinition`]'s
/// `system_prompt` field. Always rendered first when present.
pub struct ArchetypePromptSection {
body: String,
@@ -43,18 +43,18 @@ impl PromptSection for ArchetypePromptSection {
}
}
-/// Section that defers to a [`crate::agent::harness::host_definition::PromptBuilder`]
+/// Section that defers to a [`crate::agent_registry::host_definition::PromptBuilder`]
/// every time it renders, so dynamic prompts (orchestrator, welcome, …)
/// get to see the live runtime
/// [`PromptContext`] — including `connected_integrations`, which are
/// fetched asynchronously after the builder itself has been
/// constructed.
pub struct DynamicPromptSection {
- builder: crate::agent::harness::host_definition::PromptBuilder,
+ builder: crate::agent_registry::host_definition::PromptBuilder,
}
impl DynamicPromptSection {
- pub fn new(builder: crate::agent::harness::host_definition::PromptBuilder) -> Self {
+ pub fn new(builder: crate::agent_registry::host_definition::PromptBuilder) -> Self {
Self { builder }
}
}
diff --git a/crates/openhuman-core/src/agent/prompts/types.rs b/crates/openhuman-core/src/agent/prompts/types.rs
index 58876451f3..5ff00d7f2a 100644
--- a/crates/openhuman-core/src/agent/prompts/types.rs
+++ b/crates/openhuman-core/src/agent/prompts/types.rs
@@ -441,7 +441,7 @@ pub fn split_prompt_tiers(body: &str, default_tier: PromptTier) -> Vec<(PromptTi
/// Per-definition rendering flags passed into the sub-agent prompt
/// renderer. Mirrors the `omit_*` fields on
-/// [`crate::agent::harness::host_definition::AgentDefinition`]
+/// [`crate::agent_registry::host_definition::AgentDefinition`]
/// but inverted into positive-sense `include_*` form.
#[derive(Debug, Clone, Copy, Default)]
pub struct SubagentRenderOptions {
diff --git a/crates/openhuman-core/src/agent/schemas.rs b/crates/openhuman-core/src/agent/schemas.rs
index 329f62f74d..0897cdf50d 100644
--- a/crates/openhuman-core/src/agent/schemas.rs
+++ b/crates/openhuman-core/src/agent/schemas.rs
@@ -307,7 +307,7 @@ fn handle_server_status(_ctx: DispatchCtx, _params: Map<String, Value>) -> Contr
fn handle_list_definitions(ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
- let defs = crate::agent::library::list_definition_metadata(&ctx).await?;
+ let defs = crate::agent_registry::library::list_definition_metadata(&ctx).await?;
Ok(serde_json::json!({ "definitions": defs }))
})
}
@@ -320,7 +320,7 @@ struct GetDefinitionParams {
fn handle_get_definition(_ctx: DispatchCtx, params: Map<String, Value>) -> ControllerFuture {
Box::pin(async move {
let p = deserialize_params::<GetDefinitionParams>(params)?;
- let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
.ok_or_else(|| "AgentDefinitionRegistry not initialised".to_string())?;
match registry.get(p.id.trim()) {
Some(def) => Ok(serde_json::json!({ "definition": def })),
@@ -335,7 +335,7 @@ fn handle_reload_definitions(_ctx: DispatchCtx, _params: Map<String, Value>) ->
// no-op in v1. Reply with a status payload that explains this
// and tells the caller how to refresh.
let already_loaded =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::global().is_some();
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::global().is_some();
Ok(serde_json::json!({
"status": "noop",
"registry_initialised": already_loaded,
@@ -483,7 +483,7 @@ fn handle_triage_evaluate(ctx: DispatchCtx, params: Map<String, Value>) -> Contr
fn handle_graph_topologies(_ctx: DispatchCtx, _params: Map<String, Value>) -> ControllerFuture {
Box::pin(async {
let reports = tinyagents_orchestration::topology::all_graph_topologies();
- let agents = crate::agent::registry::agents::load_builtins()
+ let agents = crate::agent_registry::agents::load_builtins()
.map_err(|e| format!("loading built-in agent graph resolutions: {e}"))?
.into_iter()
.map(|def| {
@@ -634,7 +634,7 @@ fn handle_registry_snapshot(ctx: DispatchCtx, _params: Map<String, Value>) -> Co
}
// ── Agents: built-in archetypes ─────────────────────────────────────
- let agent_defs = crate::agent::registry::agents::load_builtins()
+ let agent_defs = crate::agent_registry::agents::load_builtins()
.map_err(|e| format!("loading built-in agents for registry snapshot: {e}"))?;
let agent_count = agent_defs.len();
for def in &agent_defs {
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs
index 8c49c7e103..15106c3b4c 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_build.rs
@@ -182,7 +182,7 @@ impl SessionHostBuilder {
deferred_names.retain(|name| !self.withheld_tool_names.contains(name));
if visible_names.is_empty() {
visible_names
- .insert(crate::agent::harness::host_definition::NO_TOOLS_SENTINEL.to_string());
+ .insert(crate::agent_registry::host_definition::NO_TOOLS_SENTINEL.to_string());
}
}
visible_names.extend(self.permanent_tool_names.iter().cloned());
@@ -341,13 +341,13 @@ impl SessionHostBuilder {
let hosted_config = Arc::new(hosted_config);
#[cfg(test)]
let definitions = Some(
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current().unwrap_or_else(|| {
- Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only())
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current().unwrap_or_else(|| {
+ Arc::new(crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only())
}),
);
#[cfg(not(test))]
let definitions =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current();
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current();
// A caller that brought its own definition is the authority for this
// session, so it does not need a process registry to exist before it
// may run a turn. The stand-in is deliberately *empty* rather than
@@ -360,7 +360,7 @@ impl SessionHostBuilder {
let session_definition = self.session_definition;
let definitions = definitions.or_else(|| {
session_definition.is_some().then(|| {
- Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::default())
+ Arc::new(crate::agent_registry::host_definition::AgentDefinitionRegistry::default())
})
});
let hosted_base = definitions.map(|definitions| {
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.rs
index 0a4757128f..3d152b0702 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
@@ -36,8 +36,8 @@ fn test_config(tmp: &tempfile::TempDir) -> crate::config::Config {
/// bundled TOML files, entirely independent of the global registry
/// singleton (so tests can't be poisoned by another test's
/// `AgentDefinitionRegistry::init_global*` call, and can't poison later ones).
-fn builtin_def(id: &str) -> crate::agent::harness::host_definition::AgentDefinition {
- crate::agent::registry::agents::load_builtins()
+fn builtin_def(id: &str) -> crate::agent_registry::host_definition::AgentDefinition {
+ crate::agent_registry::agents::load_builtins()
.unwrap()
.into_iter()
.find(|def| def.id == id)
@@ -48,7 +48,7 @@ fn builtin_def(id: &str) -> crate::agent::harness::host_definition::AgentDefinit
/// wire. No built-in keeps a wildcard belt any more (the generalist
/// `tools_agent` was removed), so the shape is synthesised from a real
/// built-in: same parsing and defaults, only the id and the belt differ.
-fn wildcard_probe_def() -> crate::agent::harness::host_definition::AgentDefinition {
+fn wildcard_probe_def() -> crate::agent_registry::host_definition::AgentDefinition {
let mut def = builtin_def("summarizer");
def.id = "wildcard_probe".to_string();
def.delegate_name = None;
@@ -331,7 +331,7 @@ async fn an_empty_named_scope_advertises_no_tools_at_all() {
// Tolerant of an already-initialised singleton: this binary shares one
// `OnceLock` across every test, so whether we are first is a property of
// test ordering, not of this test.
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -345,7 +345,7 @@ async fn an_empty_named_scope_advertises_no_tools_at_all() {
let visible = &agent.visible_tool_names;
let real: Vec<&String> = visible
.iter()
- .filter(|n| n.as_str() != crate::agent::harness::host_definition::NO_TOOLS_SENTINEL)
+ .filter(|n| n.as_str() != crate::agent_registry::host_definition::NO_TOOLS_SENTINEL)
.collect();
assert!(
real.is_empty(),
@@ -365,7 +365,7 @@ async fn a_zero_tool_agent_does_not_gain_the_compaction_recovery_tool() {
// Tolerant of an already-initialised singleton: this binary shares one
// `OnceLock` across every test, so whether we are first is a property of
// test ordering, not of this test.
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -389,14 +389,14 @@ fn the_no_tools_sentinel_can_never_name_a_real_tool() {
// The value is load-bearing: it works only because no registry can contain
// it. Leading underscores are not a legal tool name for any provider's
// function-calling schema, which is why this shape was chosen.
- use crate::agent::harness::host_definition::NO_TOOLS_SENTINEL;
+ use crate::agent_registry::host_definition::NO_TOOLS_SENTINEL;
assert!(NO_TOOLS_SENTINEL.starts_with("__"));
assert!(!NO_TOOLS_SENTINEL.chars().next().unwrap().is_alphanumeric());
}
#[test]
fn is_empty_tool_scope_distinguishes_the_three_states() {
- use crate::agent::harness::host_definition::{NO_TOOLS_SENTINEL, is_empty_tool_scope};
+ use crate::agent_registry::host_definition::{NO_TOOLS_SENTINEL, is_empty_tool_scope};
use std::collections::HashSet;
// Unset — the historical "everything" sentinel.
@@ -423,7 +423,7 @@ async fn a_summarized_agent_sees_the_recovery_tool_with_compaction_off() {
// that gets them, so it must see the tool whatever the router says.
use crate::agent::session_host::types::OpenHumanSessionHost;
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let tmp = tempfile::TempDir::new().unwrap();
let mut config = test_config(&tmp);
@@ -463,7 +463,7 @@ fn the_recovery_tool_joins_a_belt_only_when_something_can_point_at_it() {
#[test]
fn the_repl_tools_join_a_belt_only_while_handle_mode_is_active() {
- use crate::agent::harness::host_definition::NO_TOOLS_SENTINEL;
+ use crate::agent_registry::host_definition::NO_TOOLS_SENTINEL;
let belt = || std::collections::HashSet::from(["web_fetch".to_string()]);
let mut inactive = belt();
@@ -500,7 +500,7 @@ async fn a_curated_orchestrator_sees_and_holds_every_juice_tool_in_handle_mode()
// could not dispatch.
use crate::agent::session_host::types::OpenHumanSessionHost;
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let tmp = tempfile::TempDir::new().unwrap();
let mut config = test_config(&tmp);
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_explicit_definition_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_explicit_definition_tests.rs
index 7873e38538..759cbc2fc2 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_explicit_definition_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_explicit_definition_tests.rs
@@ -4,11 +4,11 @@
//! registry.
use super::*;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::session_host::types::OpenHumanSessionHost;
use tinyagents_definition::{PromptSource, SandboxMode, ToolScope};
-fn explicit_definition(id: &str) -> crate::agent::harness::host_definition::AgentDefinition {
+fn explicit_definition(id: &str) -> crate::agent_registry::host_definition::AgentDefinition {
let mut def = AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
index ef01754c11..c615d7e006 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_host_only_tests.rs
@@ -60,8 +60,8 @@ fn request(tool: &str) -> (RunContext<OpenHumanRunContext>, ToolCall) {
/// The orchestrator's definition is the embed default, and the widest one:
/// every registered tool, delegation and memory. Host-only must narrow it.
-fn orchestrator_def() -> crate::agent::harness::host_definition::AgentDefinition {
- let mut def = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+fn orchestrator_def() -> crate::agent_registry::host_definition::AgentDefinition {
+ let mut def = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.expect("built-in orchestrator");
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 a4b5609a1c..2503c55d2d 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
@@ -32,7 +32,7 @@ impl tinytools::Tool for Marker {
}
}
-fn definition() -> crate::agent::harness::host_definition::AgentDefinition {
+fn definition() -> crate::agent_registry::host_definition::AgentDefinition {
super::wildcard_probe_def()
}
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs
index 7a720e3ee5..541abad3c5 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_session_definition_tests.rs
@@ -7,7 +7,7 @@
//! builder caller had no equivalent, and fell back to the process registry.
//! These tests pin the route that closes that gap.
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::agent::tinyagents::host::OpenHumanDefinitionRegistry;
use std::sync::Arc;
use tinyagents_definition::DefinitionRegistry;
diff --git a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
index 7b56dd060a..d6b7454ff8 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/builder_tests_tool_exposure_tests.rs
@@ -2,7 +2,7 @@ use super::*;
fn visible_names(agent_id: &str) -> std::collections::HashSet<String> {
let definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get(agent_id)
.cloned()
.unwrap_or_else(|| panic!("built-in agent definition not found: {agent_id}"));
@@ -10,7 +10,7 @@ fn visible_names(agent_id: &str) -> std::collections::HashSet<String> {
}
fn visible_names_for(
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
) -> std::collections::HashSet<String> {
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
@@ -228,7 +228,7 @@ fn orchestrator_reaches_the_replaced_specialists_tools_through_discovery() {
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
let definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.expect("orchestrator built-in definition");
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.rs
index 6e978bc886..4795f071bb 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
@@ -12,7 +12,7 @@ use super::*;
/// One spec is exempt by design — see the `use_skill` branch below.
#[test]
fn the_three_spec_views_share_their_leaf_schemas() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.unwrap();
let tmp = tempfile::TempDir::new().unwrap();
let config = test_config(&tmp);
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 d536773b1e..9bab2badd1 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/factory.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/factory.rs
@@ -1,7 +1,7 @@
//! `OpenHumanSessionHost::from_config` factory methods and internal `build_session_agent_inner` constructor.
use super::should_synthesize_delegation_tools;
-use crate::agent::harness::host_definition::{
+use crate::agent_registry::host_definition::{
AgentDefinitionExt, AgentDefinitionRegistry, NO_TOOLS_SENTINEL,
};
use crate::agent::host_runtime;
@@ -136,7 +136,7 @@ impl OpenHumanSessionHost {
ctx: &DispatchCtx,
config: &Config,
agent_id: &str,
- target_def: Option<&crate::agent::harness::host_definition::AgentDefinition>,
+ target_def: Option<&crate::agent_registry::host_definition::AgentDefinition>,
host_only: bool,
host: Option<&super::HostTools>,
session_id: Option<&str>,
@@ -418,7 +418,7 @@ impl OpenHumanSessionHost {
Option<std::collections::HashSet<String>>,
) = match (
target_def,
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current(),
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current(),
) {
// Host-only: no delegation; the host's names join an empty belt.
_ if host_only => (Vec::new(), Some(super::host_only::empty_belt())),
@@ -705,7 +705,7 @@ impl OpenHumanSessionHost {
let payload_summarizer: Option<
std::sync::Arc<crate::agent::tinyagents::payload_summarizer::DynPayloadSummarizer>,
> = if !host_only && super::summarizes_tool_output(agent_id, config) {
- match crate::agent::harness::host_definition::AgentDefinitionRegistry::current() {
+ match crate::agent_registry::host_definition::AgentDefinitionRegistry::current() {
Some(reg) => match reg.get("summarizer") {
Some(summarizer_def) => {
log::info!(
@@ -870,7 +870,7 @@ impl OpenHumanSessionHost {
pub(super) fn resolve_target_definition(
config: &Config,
agent_id: &str,
-) -> Result<Option<crate::agent::harness::host_definition::AgentDefinition>> {
+) -> Result<Option<crate::agent_registry::host_definition::AgentDefinition>> {
let registry = AgentDefinitionRegistry::current();
if let Some(reg) = registry.as_deref() {
@@ -882,7 +882,7 @@ pub(super) fn resolve_target_definition(
// Harness registry miss (or not yet initialised). Before failing, check
// the config-backed custom agent registry — the one place custom
// (non-shipped) agents live.
- if let Some(entry) = crate::agent::registry::find_custom_in_config(config, agent_id) {
+ if let Some(entry) = crate::agent_registry::find_custom_in_config(config, agent_id) {
log::info!(
"[agent::builder] agent_id={} not found in the harness AgentDefinitionRegistry — \
synthesizing a definition from its custom agent_registry entry so it runs with its \
@@ -890,7 +890,7 @@ pub(super) fn resolve_target_definition(
agent_id
);
return Ok(Some(
- crate::agent::registry::definition_from_registry_entry(&entry),
+ crate::agent_registry::definition_from_registry_entry(&entry),
));
}
@@ -941,7 +941,7 @@ mod provider_role_tests;
/// Flow readiness shares this path so it checks the provider used at runtime.
pub(crate) fn provider_role_for_definition(
default_model: Option<&str>,
- target_def: Option<&crate::agent::harness::host_definition::AgentDefinition>,
+ target_def: Option<&crate::agent_registry::host_definition::AgentDefinition>,
) -> &'static str {
let master_hint = default_model
.is_none()
diff --git a/crates/openhuman-core/src/agent/session_host/builder/host_only.rs b/crates/openhuman-core/src/agent/session_host/builder/host_only.rs
index 97c04322b4..4dbafa2fdb 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/host_only.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/host_only.rs
@@ -24,7 +24,7 @@ use std::sync::Arc;
use async_trait::async_trait;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use tinyagents_harness::context::RunContext;
use tinyagents_harness::middleware::{PolicyDecision, ToolCallPolicy};
use tinyinference_llm::tool::ToolCall;
@@ -99,7 +99,7 @@ impl ToolCallPolicy<OpenHumanRunContext> for HostOnlyToolPolicy {
/// The visible set of a host-only belt before the host's names are merged in:
/// explicitly zero tools (an empty set would mean "no filter").
pub(super) fn empty_belt() -> HashSet<String> {
- HashSet::from([crate::agent::harness::host_definition::NO_TOOLS_SENTINEL.to_string()])
+ HashSet::from([crate::agent_registry::host_definition::NO_TOOLS_SENTINEL.to_string()])
}
/// The session gate: on a host-only belt, [`HostOnlyToolPolicy`] over the
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 9646b79ed9..e544c03186 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
@@ -215,9 +215,9 @@ pub(super) struct MergedHostTurnTools {
}
pub(super) fn add_permanent_tools(
- mut definition: crate::agent::harness::host_definition::AgentDefinition,
+ mut definition: crate::agent_registry::host_definition::AgentDefinition,
permanent: &HashSet<String>,
-) -> crate::agent::harness::host_definition::AgentDefinition {
+) -> crate::agent_registry::host_definition::AgentDefinition {
definition.extra_tools.extend(permanent.iter().cloned());
definition.extra_tools.sort();
definition.extra_tools.dedup();
@@ -225,9 +225,9 @@ pub(super) fn add_permanent_tools(
}
pub(super) fn scope_def(
- definition: Option<&crate::agent::harness::host_definition::AgentDefinition>,
+ definition: Option<&crate::agent_registry::host_definition::AgentDefinition>,
host_tools: &MergedHostTurnTools,
-) -> Option<crate::agent::harness::host_definition::AgentDefinition> {
+) -> Option<crate::agent_registry::host_definition::AgentDefinition> {
let mut definition = definition.cloned()?;
if let tinyagents_definition::ToolScope::Named(names) = &mut definition.tools {
names.retain(|name| !host_tools.withheld.contains(name));
@@ -397,7 +397,7 @@ impl OpenHumanSessionHost {
pub fn from_config_with_host_tools(
ctx: &crate::core::runtime::DispatchCtx,
config: &Config,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
host: &super::HostTools,
session_id: Option<&str>,
) -> Result<Self> {
@@ -425,7 +425,7 @@ impl OpenHumanSessionHost {
pub fn from_config_with_definition(
ctx: &crate::core::runtime::DispatchCtx,
config: &Config,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
) -> Result<Self> {
log::debug!(
"[agent] from_config_with_definition id={} sandbox={:?}",
diff --git a/crates/openhuman-core/src/agent/session_host/builder/iteration_cap.rs b/crates/openhuman-core/src/agent/session_host/builder/iteration_cap.rs
index 597504b857..ff2ad22ba2 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/iteration_cap.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/iteration_cap.rs
@@ -1,6 +1,6 @@
//! The single resolution point for a turn's tool-iteration cap.
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::config::AgentConfig;
/// The tool-iteration cap a turn built from `agent` runs under.
diff --git a/crates/openhuman-core/src/agent/session_host/builder/mod.rs b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
index 1f88741409..d1a460ed5b 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/mod.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/mod.rs
@@ -23,7 +23,7 @@ pub use host_tools::{HostTools, HostTurnTools, TurnContext};
#[cfg(test)]
mod builder_tests;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use std::sync::Arc;
use tinyagents_definition::ToolScope;
use tinytools::ToolPolicySession;
@@ -208,7 +208,7 @@ pub(super) fn ensure_recovery_tool_visible(
// recovery tool has nothing to recover for one — there are no tool outputs
// to truncate. Adding it would turn "no tools" into "one tool" and put a
// schema back on a turn whose whole point is that it stays flat.
- if !crate::agent::harness::host_definition::is_empty_tool_scope(visible) {
+ if !crate::agent_registry::host_definition::is_empty_tool_scope(visible) {
for name in crate::inference::tokenjuice::RECOVERY_TOOL_VISIBLE {
visible.insert((*name).to_string());
}
@@ -245,7 +245,7 @@ pub(super) fn ensure_repl_tools_visible(
if !handle_mode_active {
return;
}
- if !crate::agent::harness::host_definition::is_empty_tool_scope(visible) {
+ if !crate::agent_registry::host_definition::is_empty_tool_scope(visible) {
for name in tinyjuice_bus::tools::REPL_TOOLS {
visible.insert((*name).to_string());
}
@@ -272,7 +272,7 @@ pub(super) fn should_synthesize_delegation_tools(def: &AgentDefinition) -> bool
/// the name extends at an `_` boundary. Empty when the registry is not up or
/// the id resolves to nothing, which leaves the schema untouched.
fn allowed_subagent_ids_for(agent_id: &str) -> Vec<String> {
- let Some(registry) = crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ let Some(registry) = crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
else {
return Vec::new();
};
diff --git a/crates/openhuman-core/src/agent/session_host/builder/setters.rs b/crates/openhuman-core/src/agent/session_host/builder/setters.rs
index 3c6d88764a..6a8089972e 100644
--- a/crates/openhuman-core/src/agent/session_host/builder/setters.rs
+++ b/crates/openhuman-core/src/agent/session_host/builder/setters.rs
@@ -330,7 +330,7 @@ impl SessionHostBuilder {
/// [`OpenHumanDefinitionRegistry::with_session_definition`]: crate::agent::tinyagents::host::OpenHumanDefinitionRegistry::with_session_definition
pub fn agent_definition(
mut self,
- definition: Arc<crate::agent::harness::host_definition::AgentDefinition>,
+ definition: Arc<crate::agent_registry::host_definition::AgentDefinition>,
) -> Self {
self.session_definition = Some(definition);
self
diff --git a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
index 85fbc92eb1..97b42fde37 100644
--- a/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/orphaned_head_resume_tests.rs
@@ -33,7 +33,7 @@ async fn resumed_orphaned_tool_head_is_repaired_before_the_request() {
// definitions (core/jsonrpc.rs), which routes a root turn through the
// hosted harness. Without this the result depended on whether another test
// in the process had installed them first.
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let root = tempfile::tempdir().expect("tempdir");
let locator = memory_locator();
// The native dialect resolves from the model's profile (`Native` means
diff --git a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
index ee1de3e39b..acbb5430ac 100644
--- a/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
+++ b/crates/openhuman-core/src/agent/session_host/prelude_integrations.rs
@@ -23,8 +23,8 @@ impl OpenHumanTurnPrelude {
/// The session's own definition, else the catalogue's entry for its id.
pub(super) fn session_definition(
&self,
- registry: &crate::agent::harness::host_definition::AgentDefinitionRegistry,
- ) -> Option<crate::agent::harness::host_definition::AgentDefinition> {
+ registry: &crate::agent_registry::host_definition::AgentDefinitionRegistry,
+ ) -> Option<crate::agent_registry::host_definition::AgentDefinition> {
let definition = self
.definition
.as_deref()
@@ -102,7 +102,7 @@ impl OpenHumanTurnPrelude {
/// error instead of an unknown-tool failure.
pub(super) fn rebuilt_recorded_tools(
&self,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
base: &[Box<dyn tinytools::Tool>],
synthesized: &[Box<dyn tinytools::Tool>],
integrations: &[crate::agent::prompts::ConnectedIntegration],
diff --git a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs
index 3f6c63d809..e826a8cd1d 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime/accessors.rs
@@ -129,9 +129,9 @@ impl OpenHumanSessionHost {
/// them replaced by a same-id registry entry.
pub(crate) fn resolved_definition(
&self,
- ) -> Option<Arc<crate::agent::harness::host_definition::AgentDefinition>> {
+ ) -> Option<Arc<crate::agent_registry::host_definition::AgentDefinition>> {
self.definition.clone().or_else(|| {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
.and_then(|registry| registry.get(&self.agent_definition_id).cloned())
.map(Arc::new)
})
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 d4a1993301..e3a47ebeab 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs
@@ -102,7 +102,7 @@ struct OpenHumanTurnPrelude {
host_env: crate::agent::turn_env::HostTurnEnv,
allowed_subagent_ids: std::collections::HashSet<String>,
sandbox_mode: tinyagents_definition::SandboxMode,
- definition: Option<Arc<crate::agent::harness::host_definition::AgentDefinition>>,
+ definition: Option<Arc<crate::agent_registry::host_definition::AgentDefinition>>,
runtime_config: Option<Arc<crate::config::Config>>,
/// This session's tool-rule layers; see `tool_rules.rs`.
tool_rules: Arc<tinytools::ToolRuleSet>,
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session/tool_rules_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session/tool_rules_tests.rs
index 2fb2867479..ea51412721 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session/tool_rules_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session/tool_rules_tests.rs
@@ -16,7 +16,7 @@ fn config_with_rules(tmp: &tempfile::TempDir) -> crate::config::Config {
fn a_session_composes_the_operator_and_definition_layers() {
let tmp = tempfile::TempDir::new().unwrap();
let config = config_with_rules(&tmp);
- let mut definition = crate::agent::registry::agents::load_builtins()
+ let mut definition = crate::agent_registry::agents::load_builtins()
.unwrap()
.into_iter()
.find(|def| def.id == "orchestrator")
@@ -52,7 +52,7 @@ fn a_session_composes_the_operator_and_definition_layers() {
/// A text-dialect session over the per-thread goal tools under `rules`,
/// returning its rendered prompt and declared tool names.
async fn goal_session_prompt(rules: serde_json::Value) -> (String, Vec<String>) {
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let action_dir = tempfile::tempdir().expect("tempdir");
let config = crate::config::Config {
tool_rules: serde_json::from_value(rules).expect("rules"),
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
index 466e788eb2..ab360e9f98 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_juice_tests.rs
@@ -6,7 +6,7 @@ use super::*;
async fn a_resumed_thread_keeps_recorded_juice_specs_and_executors_when_repl_is_off() {
use crate::inference::tokenjuice::repl_tools_for;
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin definitions");
let tmp = tempfile::tempdir().expect("tempdir");
let mut active_config = crate::config::Config {
@@ -157,7 +157,7 @@ async fn a_resumed_thread_keeps_recorded_juice_specs_and_executors_when_repl_is_
async fn resumed_juice_snapshot_does_not_add_live_repl_declarations() {
use crate::inference::tokenjuice::repl_tools_for;
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin definitions");
let tmp = tempfile::tempdir().expect("tempdir");
let mut config = crate::config::Config {
@@ -249,7 +249,7 @@ async fn juice_off_turn_loads_no_module_and_passes_tool_output_through() {
use tinyagents_harness::context::{RunConfig, RunContext};
use tinyagents_harness::middleware::{Middleware, ToolInvocationIdentity};
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin definitions");
let tmp = tempfile::tempdir().expect("tempdir");
let mut config = crate::config::Config {
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
index acce3bd477..4fa74e3d08 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs
@@ -207,7 +207,7 @@ fn spec(name: &str) -> ToolSpec {
#[cfg(feature = "mcp")]
#[test]
fn connected_mcp_actions_enter_search_and_leave_on_disconnect() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin definitions");
let tmp = tempfile::tempdir().expect("tempdir");
let config = crate::config::Config {
@@ -278,7 +278,7 @@ fn connected_mcp_actions_enter_search_and_leave_on_disconnect() {
#[cfg(feature = "mcp")]
#[tokio::test]
async fn resumed_mcp_snapshot_survives_a_cold_catalog_and_keeps_its_frozen_spec() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin definitions");
let tmp = tempfile::tempdir().expect("tempdir");
let config = crate::config::Config {
@@ -453,7 +453,7 @@ async fn desktop_browser_setting_keeps_deferred_tools_in_fresh_and_resumed_surfa
/// current integration authorization snapshot confirms Gmail is connected.
#[tokio::test]
async fn a_resumed_orchestrator_keeps_the_integration_actions_it_was_sent() {
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let action_dir = tempfile::tempdir().expect("tempdir");
let model: Arc<dyn tinyinference_llm::model::ChatModel<()>> =
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
@@ -555,7 +555,7 @@ const SURFACED_GOAL_TOOL: &str = "goal_complete";
fn text_dialect_host(
thread_id: Option<&str>,
) -> (crate::agent::OpenHumanSessionHost, tempfile::TempDir) {
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let action_dir = tempfile::tempdir().expect("tempdir");
let model: Arc<dyn tinyinference_llm::model::ChatModel<()>> =
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
@@ -672,7 +672,7 @@ async fn newly_connected_action_cannot_shadow_a_permanent_source() {
Ok(tinytools::ToolResult::success("host"))
}
}
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let action_dir = tempfile::tempdir().unwrap();
let model: Arc<dyn tinyinference_llm::model::ChatModel<()>> =
Arc::new(tinyagents_harness::testkit::ScriptedModel::new(Vec::new()));
diff --git a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
index fd2ab651c6..33047ab4b6 100644
--- a/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
+++ b/crates/openhuman-core/src/agent/session_host/runtime_session_tool_surface.rs
@@ -25,7 +25,7 @@ impl OpenHumanTurnPrelude {
/// removed from the executable source, schema, and policy together before
/// this request is prepared.
pub(super) fn refresh_delegation_tool_surface(&self) -> anyhow::Result<()> {
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::tools::orchestrator_tools::collect_orchestrator_tools;
use tinytools::ToolPolicyEngine;
diff --git a/crates/openhuman-core/src/agent/session_host/turn/tools.rs b/crates/openhuman-core/src/agent/session_host/turn/tools.rs
index ecc920cbea..2548a3953b 100644
--- a/crates/openhuman-core/src/agent/session_host/turn/tools.rs
+++ b/crates/openhuman-core/src/agent/session_host/turn/tools.rs
@@ -100,7 +100,7 @@ impl OpenHumanSessionHost {
/// no longer a way for this to half-apply, so the `bool` it used to hand
/// back — and the caller rollback keyed on it — had no reachable `false`.
pub fn refresh_delegation_tools(&mut self) {
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::tools::orchestrator_tools::collect_orchestrator_tools;
let Some(reg) = AgentDefinitionRegistry::current() else {
diff --git a/crates/openhuman-core/src/agent/session_host/types.rs b/crates/openhuman-core/src/agent/session_host/types.rs
index 15a6bfef6e..589ee430a0 100644
--- a/crates/openhuman-core/src/agent/session_host/types.rs
+++ b/crates/openhuman-core/src/agent/session_host/types.rs
@@ -317,7 +317,7 @@ pub struct OpenHumanSessionHost {
/// `subagents` list post-fetch) stay correct even after the web
/// channel's per-thread rename.
///
- /// [`AgentDefinitionRegistry`]: crate::agent::harness::host_definition::AgentDefinitionRegistry
+ /// [`AgentDefinitionRegistry`]: crate::agent_registry::host_definition::AgentDefinitionRegistry
pub(super) agent_definition_id: String,
/// Injected transcript locator, or `None` to resolve the session store for
/// this agent key.
@@ -415,7 +415,7 @@ pub struct OpenHumanSessionHost {
/// built from an explicit definition (a library host's per-agent spec)
/// keeps those settings instead of having them silently replaced by
/// whatever the process-global registry holds under the same id.
- pub(super) definition: Option<Arc<crate::agent::harness::host_definition::AgentDefinition>>,
+ pub(super) definition: Option<Arc<crate::agent_registry::host_definition::AgentDefinition>>,
/// Built by `from_config_host_only`: the belt is the host's tools alone.
pub(super) host_only: bool,
/// The next messages are untrusted data, so `run_single` skips the
@@ -603,9 +603,9 @@ pub struct SessionHostBuilder {
///
/// `None` (the default) leaves every existing caller as it was.
///
- /// [`AgentDefinitionRegistry`]: crate::agent::harness::host_definition::AgentDefinitionRegistry
+ /// [`AgentDefinitionRegistry`]: crate::agent_registry::host_definition::AgentDefinitionRegistry
pub(super) session_definition:
- Option<Arc<crate::agent::harness::host_definition::AgentDefinition>>,
+ Option<Arc<crate::agent_registry::host_definition::AgentDefinition>>,
/// Directory chain of parent session keys for a sub-agent. `None`
/// (default) means this is a root session — its transcript lands
/// flat in `session_raw/DDMMYYYY/{session_key}.jsonl`. Populated
diff --git a/crates/openhuman-core/src/agent/subagent_host/README.md b/crates/openhuman-core/src/agent/subagent_host/README.md
index 87292cc05f..bcea3d74aa 100644
--- a/crates/openhuman-core/src/agent/subagent_host/README.md
+++ b/crates/openhuman-core/src/agent/subagent_host/README.md
@@ -32,7 +32,7 @@ survive that boundary on its own.
## Where next
-- `crate::agent::harness::host_definition` for `AgentDefinition` (and `tinyagents_definition` for `AgentTier`,
+- `crate::agent_registry::host_definition` for `AgentDefinition` (and `tinyagents_definition` for `AgentTier`,
`SandboxMode`), and the other archetype shapes this module resolves against.
- `crate::agent::orchestration` for `spawn_subagent` and the other
user-facing tools that call into this runner.
diff --git a/crates/openhuman-core/src/agent/subagent_host/autonomous.rs b/crates/openhuman-core/src/agent/subagent_host/autonomous.rs
index d61426a23c..5ace3c9aa1 100644
--- a/crates/openhuman-core/src/agent/subagent_host/autonomous.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/autonomous.rs
@@ -39,7 +39,7 @@ pub fn subagent_iter_cap_with_autonomous_lift(autonomous_cap: Option<usize>, bas
/// A definition's iteration cap under the run context's autonomous lift.
pub fn definition_iter_cap(
run_context: &crate::agent::tinyagents::host::OpenHumanRunContext,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
) -> usize {
subagent_iter_cap_with_autonomous_lift(
run_context.autonomous_iter_cap,
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
index 3df4e33b30..2c8efc165c 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs
@@ -50,7 +50,7 @@ fn root_context_from_options(
/// therefore preserves root, parent, thread, and cancellation lineage.
pub async fn run_subagent_with_parent(
parent: &RunContext<crate::agent::tinyagents::host::OpenHumanRunContext>,
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
input: impl Into<String>,
options: SubagentRunOptions,
) -> Result<SubagentRunOutcome, SubagentRunError> {
@@ -62,7 +62,7 @@ pub async fn run_subagent_with_parent(
/// context. It creates the one explicit root context, then drives the same
/// neutral lifecycle as nested callers.
pub async fn run_subagent(
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
input: &str,
options: SubagentRunOptions,
) -> Result<SubagentRunOutcome, SubagentRunError> {
@@ -78,7 +78,7 @@ pub async fn run_subagent(
pub async fn continue_subagent_with_parent(
parent: &RunContext<crate::agent::tinyagents::host::OpenHumanRunContext>,
original_key: SubagentTaskKey,
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
input: impl Into<String>,
options: SubagentRunOptions,
) -> Result<SubagentRunOutcome, SubagentRunError> {
@@ -91,7 +91,7 @@ pub async fn continue_subagent_with_parent(
/// OpenHuman carrier. The original durable key is mandatory.
pub async fn continue_subagent(
original_key: SubagentTaskKey,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
input: &str,
options: SubagentRunOptions,
) -> Result<SubagentRunOutcome, SubagentRunError> {
@@ -118,7 +118,7 @@ pub(crate) fn load_subagent_checkpoint(
/// for one caller-owned lifecycle; process-wide persistence remains the source
/// of truth for cross-process continuation and duplicate terminal effects.
pub struct OpenHumanSubagentHost {
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
options: SubagentRunOptions,
}
@@ -214,7 +214,7 @@ pub(super) fn host_in_flight(ctx: &crate::core::runtime::DispatchCtx) -> Arc<Hos
impl OpenHumanSubagentHost {
pub fn new(
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
options: SubagentRunOptions,
) -> Self {
Self {
@@ -413,12 +413,12 @@ impl OpenHumanSubagentHost {
#[derive(Clone)]
struct HostRequest {
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
options: SubagentRunOptions,
}
struct PreparedHostPlan {
- definition: crate::agent::harness::host_definition::AgentDefinition,
+ definition: crate::agent_registry::host_definition::AgentDefinition,
options: SubagentRunOptions,
}
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
index 472d5b99f9..8833831a0c 100644
--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle_outcome.rs
@@ -7,7 +7,7 @@ pub(super) type HostInFlightMap = AsyncMutex<HashMap<HostLifecycleKey, Arc<HostI
pub(super) fn host_outcome_to_neutral(
outcome: SubagentRunOutcome,
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
options: &SubagentRunOptions,
) -> SubagentOutcome {
let status = match outcome.status {
diff --git a/crates/openhuman-core/src/agent/subagent_host/mod.rs b/crates/openhuman-core/src/agent/subagent_host/mod.rs
index b3ecf424ea..4c3f3ea2ac 100644
--- a/crates/openhuman-core/src/agent/subagent_host/mod.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/mod.rs
@@ -1,6 +1,6 @@
//! OpenHuman adapters for the neutral TinyAgents subagent lifecycle.
//!
-//! Given an [`crate::agent::harness::host_definition::AgentDefinition`] and a task prompt, the
+//! Given an [`crate::agent_registry::host_definition::AgentDefinition`] and a task prompt, the
//! runner:
//!
//! 1. Reads the [`super::fork_context::ParentExecutionContext`] the parent
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
index 6cf1aef902..a053562b89 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/mod.rs
@@ -61,7 +61,7 @@ pub(super) use super::types::{SubagentMode, SubagentRunError, SubagentRunOptions
#[cfg(test)]
pub(super) use crate::agent::harness::fork_context::ParentExecutionContext;
#[cfg(test)]
-pub(super) use crate::agent::harness::host_definition::AgentDefinition;
+pub(super) use crate::agent_registry::host_definition::AgentDefinition;
#[cfg(test)]
pub(super) use crate::agent::tinyagents::budget::MAX_SPAWN_DEPTH;
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
index ff69a269db..741f6bd855 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs
@@ -11,7 +11,7 @@ use std::time::Instant;
use crate::agent::harness::artifact_offload::offload_run_result;
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::agent::prompts::{
PromptContext, SubagentRenderOptions, render_subagent_system_prompt_with_format,
};
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs
index 9b22c07073..d460fcc043 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops_tests.rs
@@ -27,7 +27,7 @@ fn make_def_named_tools(names: &[&str]) -> AgentDefinition {
delegate_name: None,
agent_tier: tinyagents_definition::AgentTier::Worker,
source: tinyagents_definition::DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
index 9b50b11831..d790529128 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep.rs
@@ -5,7 +5,7 @@
//! actually see?).
use super::types::SubagentRunError;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::prompts::PromptContext;
use tinyagents_definition::{PromptSource, ToolScope};
use tinytools::Tool;
@@ -75,7 +75,7 @@ pub(super) fn is_subagent_spawn_tool(name: &str) -> bool {
// surface. Resolve the override names via the registry so the strip
// stays in lockstep with `collect_orchestrator_tools`'s naming.
if let Some(registry) =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
{
return registry
.list()
diff --git a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
index 7f7ae1b21e..a384fec215 100644
--- a/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/tool_prep_tests.rs
@@ -14,7 +14,7 @@ fn unprefixed_delegate_name_overrides_are_treated_as_spawn_tools() {
// They must be stripped from every sub-agent surface, exactly like
// the `delegate_*`-prefixed defaults.
let tmp = tempfile::TempDir::new().unwrap();
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(tmp.path())
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(tmp.path())
.unwrap();
for delegate in [
"plan",
diff --git a/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs b/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs
index 09e54d093d..b317b5fcd8 100644
--- a/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/budget_stop_turn_tests.rs
@@ -100,7 +100,7 @@ fn hosted_base() -> Arc<crate::agent::tinyagents::host::OpenHumanHostBase> {
Arc::new(crate::agent::tinyagents::host::OpenHumanHostBase {
config: Arc::new(crate::config::Config::default()),
definitions: Arc::new(
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only(),
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only(),
),
security_policy: Arc::new(crate::security::policy::SecurityPolicy::default()),
session_definition: None,
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/bundle.rs b/crates/openhuman-core/src/agent/tinyagents/host/bundle.rs
index 68b333b9c5..693c8cb191 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/bundle.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/bundle.rs
@@ -12,7 +12,7 @@ use tinyagents_harness::host::{
SecurityGate, StaticContextComposer, ToolOutcomeClassifier,
};
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::config::Config;
use crate::security::policy::SecurityPolicy;
use tinytools::Tool;
@@ -37,7 +37,7 @@ pub struct OpenHumanHostBundleInputs {
/// The current turn's already-selected model route set.
pub model_resolver: Arc<dyn ModelResolver<()>>,
/// See [`OpenHumanHostBase::session_definition`].
- pub session_definition: Option<Arc<crate::agent::harness::host_definition::AgentDefinition>>,
+ pub session_definition: Option<Arc<crate::agent_registry::host_definition::AgentDefinition>>,
}
/// Process/session-owned dependencies shared by hosted invocations.
@@ -56,7 +56,7 @@ pub struct OpenHumanHostBase {
/// the registry it outranks, because it is fixed for the session's lifetime:
/// one `Runtime` hosts several independently defined agents, but each gets
/// its own session and therefore its own base.
- pub session_definition: Option<Arc<crate::agent::harness::host_definition::AgentDefinition>>,
+ pub session_definition: Option<Arc<crate::agent_registry::host_definition::AgentDefinition>>,
}
/// Explicit inputs which vary for every hosted agent invocation.
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 d77052e8c7..41f066efca 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry.rs
@@ -3,13 +3,13 @@
//! Adapts two OpenHuman domains onto
//! [`tinyagents_harness::host::DefinitionRegistry`]:
//!
-//! * [`crate::agent::harness::host_definition::AgentDefinitionRegistry`] —
-//! the harness registry of built-in ([`load_builtins`](crate::agent::registry::agents::load_builtins)-parsed
+//! * [`crate::agent_registry::host_definition::AgentDefinitionRegistry`] —
+//! the harness registry of built-in ([`load_builtins`](crate::agent_registry::agents::load_builtins)-parsed
//! `agent.toml`)
//! and workspace-override agent definitions, plus the config-backed
//! user-authored fallback
-//! ([`crate::agent::registry::find_custom_in_config`] →
-//! [`crate::agent::registry::definition_from_registry_entry`]).
+//! ([`crate::agent_registry::find_custom_in_config`] →
+//! [`crate::agent_registry::definition_from_registry_entry`]).
//!
//! This is `docs/specs/plan-agents.md` Phase 4. The crate-side
//! [`AgentDefinition`] is inert (`serde` + `std`); OpenHuman's harness
@@ -23,7 +23,7 @@
//! this: an agent may list a subagent id that a feature gate compiled out of
//! the build (`presentation_agent` without `documents`), and both existing resolution sites
//! tolerate it (`collect_orchestrator_tools` warns and skips;
-//! [`validate_tier_hierarchy`](crate::agent::registry::agents::validate_tier_hierarchy) explicitly `continue`s past unknown ids). So
+//! [`validate_tier_hierarchy`](crate::agent_registry::agents::validate_tier_hierarchy) explicitly `continue`s past unknown ids). So
//! `OpenHumanDefinitionRegistry::resolve` returns `Ok(None)` for every miss
//! and this adapter has no error path at all.
//!
@@ -33,9 +33,9 @@
//! the tier hierarchy, so `delegates_for` applies
//! [`validate_tier_transition`](tinyagents_definition::validate_tier_transition)
//! — the same single source of truth
-//! [`validate_tier_hierarchy`](crate::agent::registry::agents::validate_tier_hierarchy) walks at boot — per declared pair. A `Worker`
+//! [`validate_tier_hierarchy`](crate::agent_registry::agents::validate_tier_hierarchy) walks at boot — per declared pair. A `Worker`
//! parent yields an empty list; a tier-illegal child is dropped. Unknown child
-//! ids are **kept**, matching both [`validate_tier_hierarchy`](crate::agent::registry::agents::validate_tier_hierarchy)'s `continue` and
+//! ids are **kept**, matching both [`validate_tier_hierarchy`](crate::agent_registry::agents::validate_tier_hierarchy)'s `continue` and
//! the trait's note that an authorized id may still fail to resolve.
//!
//! **3. Tool scopes remain host-materialized.** The portable definition
@@ -58,11 +58,11 @@ use async_trait::async_trait;
use tinyagents_definition::Result;
use tinyagents_definition::{AgentDefinition, DefinitionRegistry};
-use crate::agent::harness::host_definition::NO_TOOLS_SENTINEL;
-use crate::agent::harness::host_definition::{
+use crate::agent_registry::host_definition::NO_TOOLS_SENTINEL;
+use crate::agent_registry::host_definition::{
AgentDefinition as HostAgentDefinition, AgentDefinitionRegistry,
};
-use crate::agent::registry::{definition_from_registry_entry, find_custom_in_config};
+use crate::agent_registry::{definition_from_registry_entry, find_custom_in_config};
use crate::config::Config;
use tinyagents_definition::{AgentTier, ToolScope};
@@ -402,7 +402,7 @@ impl OpenHumanDefinitionRegistry {
/// Tier-checked delegate ids for `def`.
///
/// Reuses [`tinyagents_definition::validate_tier_transition`]
- /// — the single source of truth [`validate_tier_hierarchy`](crate::agent::registry::agents::validate_tier_hierarchy) walks at boot —
+ /// — the single source of truth [`validate_tier_hierarchy`](crate::agent_registry::agents::validate_tier_hierarchy) walks at boot —
/// so this seam can never disagree with the host's boot-time validation.
fn authorized_delegates(&self, def: &HostAgentDefinition) -> Vec<String> {
if def.agent_tier == AgentTier::Worker {
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs
index 1f229a693c..5331c71c13 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/definition_registry_tests.rs
@@ -14,7 +14,7 @@ impl NamedToolScope for tinyagents_definition::ToolScope {
}
}
}
-use crate::agent::registry::types::{AgentRegistryEntry, AgentRegistrySource, AgentSubagentPolicy};
+use crate::agent_registry::types::{AgentRegistryEntry, AgentRegistrySource, AgentSubagentPolicy};
fn builtins() -> OpenHumanDefinitionRegistry {
OpenHumanDefinitionRegistry::builtins_only()
@@ -157,7 +157,7 @@ async fn authorized_delegates_are_declared_by_builtins() {
// The upstream DefinitionSet validates the built-in hierarchy during
// loading. This test checks the host registry's authorization view.
let builtin_defs =
- crate::agent::registry::agents::load_builtins().expect("built-in TOML must parse");
+ crate::agent_registry::agents::load_builtins().expect("built-in TOML must parse");
let registry = builtins();
for def in &builtin_defs {
diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
index 689b6e9159..00769aea44 100644
--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
@@ -29,7 +29,7 @@ use tinyagents_harness::summarization::payload_summarizer::{
};
use tracing::debug;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::subagent_host;
use crate::agent::tinyagents::host::OpenHumanRunContext;
use {
diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs
index 92b4ac8007..23f1c0665c 100644
--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer_tests.rs
@@ -32,7 +32,7 @@ fn dummy_definition() -> AgentDefinition {
delegate_name: None,
agent_tier: tinyagents_definition::AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
index 5e0f49d89a..9cbd04df59 100644
--- a/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/tool_registration.rs
@@ -246,11 +246,11 @@ pub(crate) fn capability_diagnostics(
// (built-ins plus workspace/config overrides, already merged by id) first,
// then the `agent_registry` built-in loader, deduped by id.
let runtime_ids: Vec<String> =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
.map(|runtime| runtime.list().iter().map(|def| def.id.clone()).collect())
.unwrap_or_default();
let runtime_agent_count = project_descriptors(&mut registry, ComponentKind::Agent, runtime_ids);
- let builtin_supplement_count = match crate::agent::registry::agents::load_builtins() {
+ let builtin_supplement_count = match crate::agent_registry::agents::load_builtins() {
Ok(builtins) => project_descriptors(
&mut registry,
ComponentKind::Agent,
diff --git a/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs b/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs
index a2b48ce8d0..80fb57207f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/turn_exec_tests.rs
@@ -66,7 +66,7 @@ fn hosted_base() -> Arc<crate::agent::tinyagents::host::OpenHumanHostBase> {
Arc::new(crate::agent::tinyagents::host::OpenHumanHostBase {
config: Arc::new(crate::config::Config::default()),
definitions: Arc::new(
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only(),
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only(),
),
security_policy: Arc::new(crate::security::policy::SecurityPolicy::default()),
session_definition: None,
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.rs
index 555701d00d..ba3102cf76 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
@@ -14,7 +14,7 @@
//! that failure and is the fastest way to see these tests fail red.
use super::*;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::harness::ParentExecutionContext;
use crate::agent::tinyagents::tool_registration::shared_tool_adapter;
use async_trait::async_trait;
@@ -31,7 +31,7 @@ use tinytools_agent::dialect::ToolCallFormat;
/// A stub archetype-delegate tool: only its name has to match `image_agent`'s
/// `delegate_name` ("create_image", set in
-/// `agent/registry/agents/image_agent/agent.toml`) for
+/// `agent_registry/agents/image_agent/agent.toml`) for
/// `DelegationDispatch::for_tool` to select the archetype path. The typed
/// archetype test dispatches straight to
/// `execute_archetype_delegation_with_live_parent`; the separate packed-target
diff --git a/crates/openhuman-core/src/agent/triage/README.md b/crates/openhuman-core/src/agent/triage/README.md
index ae616fec84..848411ca43 100644
--- a/crates/openhuman-core/src/agent/triage/README.md
+++ b/crates/openhuman-core/src/agent/triage/README.md
@@ -103,10 +103,10 @@ Re-exported from [`mod.rs`](./mod.rs):
## Related
-- [`crates/openhuman-core/src/agent/registry/agents/trigger_triage/`](../registry/agents/trigger_triage/): the
+- [`crates/openhuman-core/src/agent_registry/agents/trigger_triage/`](../registry/agents/trigger_triage/): the
classifier agent definition; `prompt.md` describes the JSON contract
`decision.rs` parses.
-- [`crates/openhuman-core/src/agent/registry/agents/trigger_reactor/`](../registry/agents/trigger_reactor/): the
+- [`crates/openhuman-core/src/agent_registry/agents/trigger_reactor/`](../registry/agents/trigger_reactor/): the
single-step sub-agent `react` decisions dispatch to.
- [`crates/openhuman-core/src/cron/scheduler_gate/README.md`](../../cron/scheduler_gate/README.md): the LLM-permit
gate the local arm waits on.
diff --git a/crates/openhuman-core/src/agent/triage/decision.rs b/crates/openhuman-core/src/agent/triage/decision.rs
index 1f5d26c304..13c7ca6a16 100644
--- a/crates/openhuman-core/src/agent/triage/decision.rs
+++ b/crates/openhuman-core/src/agent/triage/decision.rs
@@ -3,7 +3,7 @@
//! local model is likely to produce.
//!
//! The contract is described in
-//! `crates/openhuman-core/src/agent/registry/agents/trigger_triage/prompt.md` — the triage
+//! `crates/openhuman-core/src/agent_registry/agents/trigger_triage/prompt.md` — the triage
//! agent must end its reply with a JSON object of the form:
//!
//! ```json
diff --git a/crates/openhuman-core/src/agent/triage/escalation.rs b/crates/openhuman-core/src/agent/triage/escalation.rs
index 21f372da29..8cd9dcffe9 100644
--- a/crates/openhuman-core/src/agent/triage/escalation.rs
+++ b/crates/openhuman-core/src/agent/triage/escalation.rs
@@ -20,7 +20,7 @@ use crate::core::runtime::DispatchCtx;
use anyhow::{anyhow, Context};
use crate::agent::harness::fork_context::ParentExecutionContext;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::orchestration::parent_context::build_root_parent;
use crate::agent::subagent_host::{self, SubagentRunOptions};
use crate::config::Config;
diff --git a/crates/openhuman-core/src/agent/triage/escalation_tests.rs b/crates/openhuman-core/src/agent/triage/escalation_tests.rs
index 5f9150a3cd..047c27ac91 100644
--- a/crates/openhuman-core/src/agent/triage/escalation_tests.rs
+++ b/crates/openhuman-core/src/agent/triage/escalation_tests.rs
@@ -1,5 +1,5 @@
use super::*;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::core::events::DomainEvent;
use serde_json::json;
use tokio::time::{sleep, timeout, Duration};
diff --git a/crates/openhuman-core/src/agent/triage/evaluator.rs b/crates/openhuman-core/src/agent/triage/evaluator.rs
index a696bc90ff..da7e858490 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator.rs
@@ -48,7 +48,7 @@ use super::envelope::TriggerEnvelope;
#[cfg(test)]
use super::routing::ResolvedProvider;
#[cfg(test)]
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
#[cfg(test)]
pub(crate) use arm::{classify_error, ArmError};
#[cfg(test)]
diff --git a/crates/openhuman-core/src/agent/triage/evaluator/arm.rs b/crates/openhuman-core/src/agent/triage/evaluator/arm.rs
index f92e177ada..af061401f9 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator/arm.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator/arm.rs
@@ -8,7 +8,7 @@ use std::time::Instant;
use anyhow::anyhow;
use crate::agent::bus::{AgentTurnRequest, AgentTurnResponse, AGENT_RUN_TURN_METHOD};
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::config::MultimodalConfig;
use crate::core::bus::BUS;
use crate::inference::provider::error_classify::{
diff --git a/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs b/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
index db2ee9f804..b4b0d6a806 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
@@ -1,7 +1,7 @@
//! Prompt assembly for the classifier turn: the system prompt from the
//! built-in agent definition and the rendered user message.
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use tinyagents_definition::PromptSource;
use tinytools_agent::dialect::ToolCallFormat;
diff --git a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs b/crates/openhuman-core/src/agent/triage/evaluator_tests.rs
index 8ebd09fdeb..73362786e3 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator_tests.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator_tests.rs
@@ -1,7 +1,7 @@
use super::*;
use crate::agent::bus::{mock_agent_run_turn, AgentTurnResponse};
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
-use crate::agent::registry::agents::BUILTINS;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::agents::BUILTINS;
use serde_json::json;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc as StdArc;
diff --git a/crates/openhuman-core/src/agent_registry/README.md b/crates/openhuman-core/src/agent_registry/README.md
index 7e75200149..f89724b8ea 100644
--- a/crates/openhuman-core/src/agent_registry/README.md
+++ b/crates/openhuman-core/src/agent_registry/README.md
@@ -136,7 +136,7 @@ ranking works.
`DomainGroup::Agent`.
- [`config/schema/`](../../config/schema/): `Config.agent_registry: AgentRegistryConfig` is the
persisted store every `ops.rs` function reads and writes.
-- [`agent/harness/host_definition.rs`](../harness/host_definition.rs): seeds the
+- [`agent_registry/host_definition.rs`](../harness/host_definition.rs): seeds the
process-global `AgentDefinitionRegistry` from `registry::agents::load_builtins()`;
TinyAgents validates the merged hierarchy when workspace overrides load.
- [`agent/session_host/builder/factory.rs`](../session_host/builder/factory.rs):
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.rs
index 0d19e1afb8..3a48aa66c1 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
@@ -6,7 +6,7 @@
//! anyone writing a test for it.
use super::load_builtins;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::agent::prompts::PromptContext;
use std::collections::{BTreeMap, BTreeSet, HashSet};
use std::sync::Arc;
diff --git a/crates/openhuman-core/src/agent_registry/agents/loader.rs b/crates/openhuman-core/src/agent_registry/agents/loader.rs
index 90ec3c02d6..489e747b91 100644
--- a/crates/openhuman-core/src/agent_registry/agents/loader.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/loader.rs
@@ -29,7 +29,7 @@
//! into the global registry, where they replace built-ins on `id`
//! collision.
-use crate::agent::harness::host_definition::{AgentDefinition, PromptBuilder};
+use crate::agent_registry::host_definition::{AgentDefinition, PromptBuilder};
use anyhow::{Context, Result};
use tinyagents_definition::{DefinitionSet, DefinitionSource, PromptSource};
@@ -206,7 +206,7 @@ fn builtin_enabled(_b: &BuiltinAgent) -> bool {
/// 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::host_definition::AgentDefinitionRegistry::load`]
+/// [`crate::agent_registry::host_definition::AgentDefinitionRegistry::load`]
/// after workspace-local TOML overrides are merged, so custom user
/// agents that violate the contract fail the boot rather than crashing
/// at spawn time.
diff --git a/crates/openhuman-core/src/agent_registry/agents/mod.rs b/crates/openhuman-core/src/agent_registry/agents/mod.rs
index 6fcd0549a8..84ab043db6 100644
--- a/crates/openhuman-core/src/agent_registry/agents/mod.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/mod.rs
@@ -6,7 +6,7 @@
//!
//! * `agent.toml` — id, `when_to_use`, model, tool scope, sandbox mode,
//! iteration cap, tier, and `omit_*` flags. Parsed directly into
-//! [`crate::agent::harness::host_definition::AgentDefinition`]; ships without
+//! [`crate::agent_registry::host_definition::AgentDefinition`]; ships without
//! a `system_prompt`.
//! * `prompt.md` — the static archetype body. `prompt.rs` embeds it with
//! `include_str!`; nothing else reads it.
diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs
index 78ad090e83..38e03d3bf4 100644
--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs
@@ -10,7 +10,7 @@
//! delegate to any more. That prose lives here (not in the shared prompts
//! module) so nobody has to branch on `agent_id` in a shared section impl.
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::prompts::{
ConnectedIntegration, PromptContext, render_datetime, render_identity, render_tools,
render_workspace,
@@ -361,7 +361,7 @@ fn strip_route_lines(archetype: &str, skills: bool, mcp: bool, composio: bool) -
fn resolve_definition<'r>(
registry: &'r AgentDefinitionRegistry,
agent_id: &str,
-) -> Option<&'r crate::agent::harness::host_definition::AgentDefinition> {
+) -> Option<&'r crate::agent_registry::host_definition::AgentDefinition> {
if let Some(found) = registry.get(agent_id) {
return Some(found);
}
diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs
index e17c0bb27e..e57559aec9 100644
--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests.rs
@@ -605,7 +605,7 @@ fn the_rendered_prompt_never_names_a_withheld_tool() {
/// Packed tool names `text` presents as directly callable — the shared helper
/// scoped to the packs withheld from the orchestrator.
fn withheld_names_presented_as_callable(text: &str) -> Vec<&'static str> {
- crate::agent::registry::agents::fleet_prompt_tests::names_presented_as_callable(
+ crate::agent_registry::agents::fleet_prompt_tests::names_presented_as_callable(
text,
crate::tools::toolpacks::registry::packed_tool_names_for_agent("orchestrator"),
)
diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
index c8686f30e9..3d8a0e8e03 100644
--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt_tests_session_routing_tests.rs
@@ -11,9 +11,9 @@ use super::*;
fn a_thread_renamed_session_still_resolves_to_its_registry_entry() {
// The process-global registry is not initialised in unit tests, and
// initialising it here would leak into every other test in the binary.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin agent definitions must load");
- let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::global()
+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::global()
.expect("init_global_builtins publishes the registry");
let exact = resolve_definition(registry, "orchestrator").expect("exact id must resolve");
@@ -39,7 +39,7 @@ fn a_thread_renamed_session_still_resolves_to_its_registry_entry() {
/// naming a real route.
#[test]
fn the_withheld_block_renders_for_a_renamed_session_with_a_filter() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin agent definitions must load");
// A visible set shaped like the live one: the advertised delegates are in,
@@ -81,7 +81,7 @@ fn the_withheld_block_renders_for_a_renamed_session_with_a_filter() {
/// The generated intro must not carry the source's line-continuation padding.
#[test]
fn the_generated_block_has_no_stray_whitespace_runs() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin agent definitions must load");
let visible: HashSet<String> = ["file_read".to_string()].into_iter().collect();
let mut ctx = ctx_with(&[]);
@@ -126,7 +126,7 @@ fn prompt_routes_workflow_authoring_to_the_builder_not_use_skill() {
pack.owners
);
- let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only();
+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();
let builder = registry
.get("workflow_builder")
.expect("workflow_builder is a registered agent");
@@ -157,7 +157,7 @@ fn prompt_routes_workflow_authoring_to_the_builder_not_use_skill() {
#[cfg(all(feature = "mcp", feature = "skills"))]
#[test]
fn skill_sections_name_the_hand_off_this_session_can_call() {
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("builtin agent definitions must load");
let belt: HashSet<String> = ["setup_skills", "run_workflow", "file_read", "use_skill"]
.iter()
diff --git a/crates/openhuman-core/src/agent_registry/defaults.rs b/crates/openhuman-core/src/agent_registry/defaults.rs
index ba86d78385..76d83ef8a7 100644
--- a/crates/openhuman-core/src/agent_registry/defaults.rs
+++ b/crates/openhuman-core/src/agent_registry/defaults.rs
@@ -2,7 +2,7 @@
use serde_json::Value;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use tinyagents_definition::{
AgentTier, DefinitionSource, IterationPolicy, ModelSpec, PromptSource, SandboxMode,
SubagentEntry, ToolScope,
@@ -11,7 +11,7 @@ use tinyagents_definition::{
use super::types::{AgentRegistryEntry, AgentRegistrySource, AgentSubagentPolicy};
pub fn default_agents() -> Vec<AgentRegistryEntry> {
- crate::agent::registry::agents::load_builtins()
+ crate::agent_registry::agents::load_builtins()
.map(|defs| {
defs.into_iter()
.map(default_entry_from_definition)
diff --git a/crates/openhuman-core/src/agent_registry/host_definition.rs b/crates/openhuman-core/src/agent_registry/host_definition.rs
index 9d3f76bd8a..3026c8e2d4 100644
--- a/crates/openhuman-core/src/agent_registry/host_definition.rs
+++ b/crates/openhuman-core/src/agent_registry/host_definition.rs
@@ -165,16 +165,16 @@ impl AgentDefinitionRegistry {
/// Build a registry containing only the built-in definitions.
pub fn builtins_only() -> Self {
let mut reg = Self::default();
- for def in crate::agent::registry::agents::load_builtins()
+ for def in crate::agent_registry::agents::load_builtins()
.expect("built-in agent TOML must always parse")
{
reg.insert(def);
}
#[cfg(test)]
for def in [
- super::test_support::test_main_def(),
- super::test_support::test_inherit_echo_def(),
- super::test_support::test_inherit_parallel_worker_def(),
+ crate::agent::harness::test_support::test_main_def(),
+ crate::agent::harness::test_support::test_inherit_echo_def(),
+ crate::agent::harness::test_support::test_inherit_parallel_worker_def(),
] {
reg.insert(def);
}
diff --git a/crates/openhuman-core/src/agent_registry/host_definition_tests.rs b/crates/openhuman-core/src/agent_registry/host_definition_tests.rs
index 52a0664c08..c2e46e2caa 100644
--- a/crates/openhuman-core/src/agent_registry/host_definition_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/host_definition_tests.rs
@@ -259,7 +259,7 @@ inline = "custom prompt"
// audit table this list mirrors.
#[test]
fn all_builtin_agent_definitions_have_expected_effective_max_iterations() {
- let defs = crate::agent::registry::agents::load_builtins()
+ let defs = crate::agent_registry::agents::load_builtins()
.expect("built-in agent TOML must always parse");
let expected: &[(&str, usize)] = &[
@@ -282,7 +282,7 @@ fn all_builtin_agent_definitions_have_expected_effective_max_iterations() {
("trigger_triage", 2),
("video_agent", 8),
("vision_agent", 6),
- // Compiled out with the `documents` gate — see `openhuman::agent::registry::agents::loader::builtin_enabled`.
+ // Compiled out with the `documents` gate — see `openhuman::agent_registry::agents::loader::builtin_enabled`.
#[cfg(feature = "documents")]
("presentation_agent", 10),
// Compiled out with the `skills` gate — see `openhuman::skills::stub`.
@@ -387,7 +387,7 @@ tokenjuice_compression = "light"
#[test]
fn builtin_dynamic_prompts_carry_their_builder_beside_an_inert_marker() {
- let defs = crate::agent::registry::agents::load_builtins().unwrap();
+ let defs = crate::agent_registry::agents::load_builtins().unwrap();
assert!(!defs.is_empty());
for def in &defs {
assert!(
diff --git a/crates/openhuman-core/src/agent_registry/library/ops.rs b/crates/openhuman-core/src/agent_registry/library/ops.rs
index d078c39539..97886f66dd 100644
--- a/crates/openhuman-core/src/agent_registry/library/ops.rs
+++ b/crates/openhuman-core/src/agent_registry/library/ops.rs
@@ -1,4 +1,4 @@
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::core::runtime::DispatchCtx;
use tinyagents_definition::{AgentTier, ModelSpec, SandboxMode, SubagentEntry, ToolScope};
diff --git a/crates/openhuman-core/src/agent_registry/library/ops_tests.rs b/crates/openhuman-core/src/agent_registry/library/ops_tests.rs
index 330f2a2587..a6ab39e327 100644
--- a/crates/openhuman-core/src/agent_registry/library/ops_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/library/ops_tests.rs
@@ -31,7 +31,7 @@ fn definition() -> AgentDefinition {
delegate_name: None,
agent_tier: AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/agent_registry/mod.rs b/crates/openhuman-core/src/agent_registry/mod.rs
index 5fdaa491c7..93ea2cb1f1 100644
--- a/crates/openhuman-core/src/agent_registry/mod.rs
+++ b/crates/openhuman-core/src/agent_registry/mod.rs
@@ -6,6 +6,8 @@
//! execution harness and prompt/runtime implementation.
pub mod agents;
+pub mod host_definition;
+pub mod library;
mod defaults;
mod ops;
mod rpc;
diff --git a/crates/openhuman-core/src/agent_registry/ops.rs b/crates/openhuman-core/src/agent_registry/ops.rs
index b65c570fa6..7418486920 100644
--- a/crates/openhuman-core/src/agent_registry/ops.rs
+++ b/crates/openhuman-core/src/agent_registry/ops.rs
@@ -2,7 +2,7 @@
use std::collections::HashMap;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::OpenHumanSessionHost;
use crate::config::Config;
use crate::core::runtime::DispatchCtx;
diff --git a/crates/openhuman-core/src/agent_registry/ops_tests.rs b/crates/openhuman-core/src/agent_registry/ops_tests.rs
index 5fcba107e5..a96c8c4ffe 100644
--- a/crates/openhuman-core/src/agent_registry/ops_tests.rs
+++ b/crates/openhuman-core/src/agent_registry/ops_tests.rs
@@ -1,7 +1,7 @@
use serde_json::Value;
use super::*;
-use crate::agent::registry::types::AgentSubagentPolicy;
+use crate::agent_registry::types::AgentSubagentPolicy;
fn custom_agent(id: &str, enabled: bool) -> AgentRegistryEntry {
AgentRegistryEntry {
@@ -127,7 +127,7 @@ fn a_patch_sets_and_clears_tool_rules() {
},
);
assert_eq!(entry.tool_rules, Some(rules));
- let definition = crate::agent::registry::defaults::definition_from_registry_entry(&entry);
+ let definition = crate::agent_registry::defaults::definition_from_registry_entry(&entry);
assert!(
definition.tool_rules.is_some(),
"the entry's rules reach the definition"
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
index 0eacd8df78..f984505f23 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/dispatch_tests.rs
@@ -204,7 +204,7 @@ impl HostAgentResolver for OneHostAgent {
return None;
}
let mut definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.unwrap();
@@ -320,7 +320,7 @@ async fn bound_channel_runs_its_host_agent() {
let tmp = tempfile::tempdir().unwrap();
// Every host boots the definition registry; a session's hosted authority
// is built from it.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.unwrap();
let mut agent_config = config(&tmp, None);
agent_config.default_model = Some("fixture".into());
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs
index 9a00a48d80..78b993f54f 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/host_agent/mod.rs
@@ -60,7 +60,7 @@ pub(crate) fn route(ctx: &ChannelRuntimeContext, channel: &str) -> HostRoute {
if let (Some(context), Some(config), Some(definitions)) = (
dispatch.core().cloned(),
ctx.config.as_ref(),
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current(),
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current(),
) {
if let Some(definition) = definitions.get("orchestrator") {
let mut definition = definition.clone();
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs
index 808153942f..26739ae1bf 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/mod_scoping_tests_tests.rs
@@ -11,7 +11,7 @@
//! the test environment).
use super::*;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use async_trait::async_trait;
use tinyagents_definition::{DefinitionSource, ModelSpec, PromptSource, SandboxMode, ToolScope};
use tinytools::{PermissionLevel, Tool, ToolCategory, ToolResult};
@@ -69,7 +69,7 @@ fn def_with_scope(scope: ToolScope) -> AgentDefinition {
delegate_name: None,
agent_tier: tinyagents_definition::AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs
index 803fd74a03..364a882f84 100644
--- a/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs
+++ b/crates/openhuman-core/src/channels/runtime/dispatch/routing.rs
@@ -6,7 +6,7 @@
//! agent and synthesise its delegation tool surface.
//! * [`build_visible_tool_set`] — union of named tools + extra (delegation) tools.
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::agent::prompts::ConnectedIntegration;
use crate::config::Config;
use crate::integrations::composio::{
diff --git a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
index 180573e918..892badc273 100644
--- a/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
+++ b/crates/openhuman-core/src/channels/runtime/startup/start_channels.rs
@@ -84,7 +84,7 @@ async fn start_channels_inner(mut config: Config, session: CancellationToken) ->
// Initialise the sub-agent definition registry from this workspace.
// Idempotent — `bootstrap_core_runtime` may also call it.
- if let Err(err) = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ if let Err(err) = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
) {
tracing::warn!(
diff --git a/crates/openhuman-core/src/channels/runtime/test_support.rs b/crates/openhuman-core/src/channels/runtime/test_support.rs
index acba794bd0..ef3fd4ce8c 100644
--- a/crates/openhuman-core/src/channels/runtime/test_support.rs
+++ b/crates/openhuman-core/src/channels/runtime/test_support.rs
@@ -287,7 +287,7 @@ pub async fn run_dispatch_harness(options: DispatchHarnessOptions) -> DispatchHa
.get()
.expect("bus initialised")
.receiver();
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let handler_roles = Arc::new(Mutex::new(Vec::new()));
let handler_text = Arc::new(Mutex::new(String::new()));
diff --git a/crates/openhuman-core/src/config/schema/types/config.rs b/crates/openhuman-core/src/config/schema/types/config.rs
index 32376db9ab..cb62824ced 100644
--- a/crates/openhuman-core/src/config/schema/types/config.rs
+++ b/crates/openhuman-core/src/config/schema/types/config.rs
@@ -328,7 +328,7 @@ pub struct Config {
/// User-facing agent registry — shipped default agents plus user-authored
/// custom agents and persisted enable/disable/tool-policy overrides.
#[serde(default)]
- pub agent_registry: crate::agent::registry::types::AgentRegistryConfig,
+ pub agent_registry: crate::agent_registry::types::AgentRegistryConfig,
#[serde(default)]
pub agents: HashMap<String, DelegateAgentConfig>,
diff --git a/crates/openhuman-core/src/config/schema/types/defaults.rs b/crates/openhuman-core/src/config/schema/types/defaults.rs
index 61279ec7cf..6f6fd9216a 100644
--- a/crates/openhuman-core/src/config/schema/types/defaults.rs
+++ b/crates/openhuman-core/src/config/schema/types/defaults.rs
@@ -87,7 +87,7 @@ impl Default for Config {
proxy: ProxyConfig::default(),
cost: CostConfig::default(),
legacy_memory_sources: Vec::new(),
- agent_registry: crate::agent::registry::types::AgentRegistryConfig::default(),
+ agent_registry: crate::agent_registry::types::AgentRegistryConfig::default(),
agents: HashMap::new(),
local_ai: LocalAiConfig::default(),
claude_agent_sdk: ClaudeAgentSdkConfig::default(),
diff --git a/crates/openhuman-core/src/core/agent_cli.rs b/crates/openhuman-core/src/core/agent_cli.rs
index dfb85de1fd..4aa2e03be5 100644
--- a/crates/openhuman-core/src/core/agent_cli.rs
+++ b/crates/openhuman-core/src/core/agent_cli.rs
@@ -27,7 +27,7 @@ use crate::agent::debug::prompt_size::{render_text, PromptSizeReport};
use crate::agent::debug::{
dump_agent_prompt, dump_all_agent_prompts, write_prompt_dumps, DumpPromptOptions, DumpedPrompt,
};
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
/// Entry point for `openhuman agent <subcommand>`.
pub fn run_agent_command(args: &[String]) -> Result<()> {
diff --git a/crates/openhuman-core/src/core/all.rs b/crates/openhuman-core/src/core/all.rs
index fed3b160c3..f8553ea8de 100644
--- a/crates/openhuman-core/src/core/all.rs
+++ b/crates/openhuman-core/src/core/all.rs
@@ -383,7 +383,7 @@ fn build_registered_controllers() -> Vec<GroupedController> {
push(
&mut controllers,
DomainGroup::Agent,
- crate::agent::registry::all_agent_registry_registered_controllers(),
+ crate::agent_registry::all_agent_registry_registered_controllers(),
);
// System and process health monitoring
push(
diff --git a/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs b/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs
index a170e8b0f5..f622292a4f 100644
--- a/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/agent_scope_tests.rs
@@ -69,7 +69,7 @@ fn derive_with_carries_policy_catalogue_and_approval_flag() {
..SecurityPolicy::default()
});
let definitions =
- Arc::new(crate::agent::harness::host_definition::AgentDefinitionRegistry::default());
+ Arc::new(crate::agent_registry::host_definition::AgentDefinitionRegistry::default());
let mut spec = overlay("/tmp/agent-scope-ws")
.session_agent("alpha")
.agent_policy(Arc::clone(&policy))
diff --git a/crates/openhuman-core/src/core/runtime/bootstrap.rs b/crates/openhuman-core/src/core/runtime/bootstrap.rs
index b13698d42c..bfa74d6ab4 100644
--- a/crates/openhuman-core/src/core/runtime/bootstrap.rs
+++ b/crates/openhuman-core/src/core/runtime/bootstrap.rs
@@ -190,7 +190,7 @@ pub(crate) async fn bootstrap_core_runtime(
// multiple times. Uses the per-user scoped workspace_dir.
if agent_enabled {
if let Err(err) =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&workspace_dir,
)
{
diff --git a/crates/openhuman-core/src/core/runtime/context_agent.rs b/crates/openhuman-core/src/core/runtime/context_agent.rs
index beb4ca4f61..8d198d0f0a 100644
--- a/crates/openhuman-core/src/core/runtime/context_agent.rs
+++ b/crates/openhuman-core/src/core/runtime/context_agent.rs
@@ -10,7 +10,7 @@ pub(super) struct AgentParts {
policy: Option<Arc<crate::security::SecurityPolicy>>,
approvals_disabled: bool,
/// `None` resolves through the process registry.
- definitions: Option<Arc<crate::agent::harness::host_definition::AgentDefinitionRegistry>>,
+ definitions: Option<Arc<crate::agent_registry::host_definition::AgentDefinitionRegistry>>,
/// Shared by every turn context derived from the same agent context.
state: Arc<super::super::agent_scope::AgentScopedState>,
}
@@ -72,7 +72,7 @@ impl CoreContext {
/// The sub-agent catalogue of the agent this context was derived for.
pub fn definitions(
&self,
- ) -> Option<Arc<crate::agent::harness::host_definition::AgentDefinitionRegistry>> {
+ ) -> Option<Arc<crate::agent_registry::host_definition::AgentDefinitionRegistry>> {
self.agent.definitions.clone()
}
diff --git a/crates/openhuman-core/src/core/runtime/context_overlay.rs b/crates/openhuman-core/src/core/runtime/context_overlay.rs
index bcd5531de5..ff166e122a 100644
--- a/crates/openhuman-core/src/core/runtime/context_overlay.rs
+++ b/crates/openhuman-core/src/core/runtime/context_overlay.rs
@@ -45,7 +45,7 @@ pub struct ContextOverlay {
/// Turn the interactive approval gate off for this agent.
pub approvals_disabled: bool,
/// The agent's own sub-agent catalogue. `None` keeps the parent's.
- pub definitions: Option<Arc<crate::agent::harness::host_definition::AgentDefinitionRegistry>>,
+ pub definitions: Option<Arc<crate::agent_registry::host_definition::AgentDefinitionRegistry>>,
}
impl ContextOverlay {
@@ -106,7 +106,7 @@ impl ContextOverlay {
/// Give the derived context its own sub-agent catalogue.
pub fn definitions(
mut self,
- definitions: Arc<crate::agent::harness::host_definition::AgentDefinitionRegistry>,
+ definitions: Arc<crate::agent_registry::host_definition::AgentDefinitionRegistry>,
) -> Self {
self.definitions = Some(definitions);
self
diff --git a/crates/openhuman-core/src/core/runtime/saas.rs b/crates/openhuman-core/src/core/runtime/saas.rs
index 6592665367..f2640804f8 100644
--- a/crates/openhuman-core/src/core/runtime/saas.rs
+++ b/crates/openhuman-core/src/core/runtime/saas.rs
@@ -483,7 +483,7 @@ pub async fn build_with_profile_capabilities(
// first initialiser wins, so seed it before the core builds: a lazy init
// during the build would otherwise load one user's workspace definitions
// for everyone.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()?;
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()?;
let mut builder = CoreBuilder::new(HostKind::Saas)
.token(TokenSource::Fixed(Arc::new(bearer)))
@@ -501,7 +501,7 @@ pub async fn build_with_profile_capabilities(
// Whoever initialised first won; refuse to serve users from a registry
// that holds anything but the built-ins.
verify_builtin_definitions(
- crate::agent::harness::host_definition::AgentDefinitionRegistry::global(),
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::global(),
)?;
// A relayed platform message (`channel_relay_inbound`) runs through the
// channel dispatch pipeline, which asks the native bus for an
@@ -539,7 +539,7 @@ pub async fn build_with_profile_capabilities(
/// Refuse boot unless the process-wide agent definition registry is seeded and
/// holds the built-ins only.
pub(crate) fn verify_builtin_definitions(
- registry: Option<&crate::agent::harness::host_definition::AgentDefinitionRegistry>,
+ registry: Option<&crate::agent_registry::host_definition::AgentDefinitionRegistry>,
) -> anyhow::Result<()> {
let Some(registry) = registry else {
anyhow::bail!("[saas] the agent definition registry was not seeded");
diff --git a/crates/openhuman-core/src/core/runtime/saas_tests.rs b/crates/openhuman-core/src/core/runtime/saas_tests.rs
index 5e416fc16a..26afd7dada 100644
--- a/crates/openhuman-core/src/core/runtime/saas_tests.rs
+++ b/crates/openhuman-core/src/core/runtime/saas_tests.rs
@@ -128,13 +128,13 @@ fn boot_refuses_an_unseeded_definition_registry() {
#[test]
fn boot_accepts_a_builtins_only_registry() {
- let registry = crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only();
+ let registry = crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only();
verify_builtin_definitions(Some(&registry)).unwrap();
}
#[test]
fn boot_refuses_a_registry_with_workspace_definitions() {
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use tinyagents_definition::DefinitionSource;
let mut custom = AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
diff --git a/crates/openhuman-core/src/cron/scheduler/agent_run.rs b/crates/openhuman-core/src/cron/scheduler/agent_run.rs
index 9e582933a3..0b66355471 100644
--- a/crates/openhuman-core/src/cron/scheduler/agent_run.rs
+++ b/crates/openhuman-core/src/cron/scheduler/agent_run.rs
@@ -67,7 +67,7 @@ pub(super) async fn run_agent_job_for_run(
} else {
let agent_id = selected_agent_id;
if let Some(registry) =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
{
if let Some(def) = registry.get(agent_id) {
tracing::debug!(
diff --git a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs
index 82f5618815..1929776220 100644
--- a/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler_halt_and_persist_tests.rs
@@ -331,7 +331,7 @@ async fn cron_agent_job_uses_agent_definition_tool_scope() {
// than relied upon from another test: `install_for_tests` is
// `Once`-guarded, so a test that omits it passes only while some
// earlier test in the same binary happened to run first.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("init built-in agent definitions");
let tmp = TempDir::new().unwrap();
let config = test_config(&tmp).await;
diff --git a/crates/openhuman-core/src/cron/scheduler_host_agent_tests.rs b/crates/openhuman-core/src/cron/scheduler_host_agent_tests.rs
index f043e64c3d..a7445cd13a 100644
--- a/crates/openhuman-core/src/cron/scheduler_host_agent_tests.rs
+++ b/crates/openhuman-core/src/cron/scheduler_host_agent_tests.rs
@@ -37,7 +37,7 @@ impl HostAgentResolver for Host {
return None;
}
let mut definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.unwrap();
diff --git a/crates/openhuman-core/src/flows/README.md b/crates/openhuman-core/src/flows/README.md
index 6a9aaa97df..fa9d15bdd1 100644
--- a/crates/openhuman-core/src/flows/README.md
+++ b/crates/openhuman-core/src/flows/README.md
@@ -193,7 +193,7 @@ above.
Two built-in sub-agents live under `agents/`, each with an `agent.toml` and a
`prompt::build`, registered by path from the `BUILTINS` slice in
-[`agent/registry/agents/loader.rs`](../agent/registry/agents/loader.rs):
+[`agent_registry/agents/loader.rs`](../agent_registry/agents/loader.rs):
- `workflow_builder` is the authoring copilot. `flows_build` (in
[`ops/builder.rs`](./ops/builder.rs)) runs one turn of it from a structured request (create,
diff --git a/crates/openhuman-core/src/flows/agents/mod.rs b/crates/openhuman-core/src/flows/agents/mod.rs
index 73a1f91111..1a3f98e47f 100644
--- a/crates/openhuman-core/src/flows/agents/mod.rs
+++ b/crates/openhuman-core/src/flows/agents/mod.rs
@@ -1,7 +1,7 @@
//! Flow-domain agents: the specialist agents that author and discover flows.
//!
//! These are first-class built-in agents (registered in the global
-//! `agent_registry` via [`crate::agent::registry::agents::loader`]),
+//! `agent_registry` via [`crate::agent_registry::agents::loader`]),
//! but their definitions live here — inside the flows high-level module —
//! alongside the flows data model, tools, and RPCs they operate on, so the whole
//! feature is one cohesive unit. The loader's `BUILTINS` slice points at these
diff --git a/crates/openhuman-core/src/flows/builder_host.rs b/crates/openhuman-core/src/flows/builder_host.rs
index 8082c2d451..7e866ec3b3 100644
--- a/crates/openhuman-core/src/flows/builder_host.rs
+++ b/crates/openhuman-core/src/flows/builder_host.rs
@@ -231,7 +231,7 @@ impl BuilderGates for FlowsHost {
#[async_trait]
impl AgentDirectory for FlowsHost {
async fn list(&self) -> PortResult<Vec<AgentDefinition>> {
- let agents = crate::agent::registry::list_agents(&self.ctx(), false)
+ let agents = crate::agent_registry::list_agents(&self.ctx(), false)
.await
.map_err(|e| e.to_string())?;
Ok(agents
diff --git a/crates/openhuman-core/src/flows/mod.rs b/crates/openhuman-core/src/flows/mod.rs
index d94542df4c..0e7b9a8b11 100644
--- a/crates/openhuman-core/src/flows/mod.rs
+++ b/crates/openhuman-core/src/flows/mod.rs
@@ -15,7 +15,7 @@
//! every symbol reached from outside is a *registration site* (`core::all`,
//! `core::runtime::subscribers`' `FlowTriggerSubscriber`, `core::runtime::services`' boot
//! reconcile, the agent-tool `vec!` in `tools::ops`, the `workflow_builder` /
-//! `flow_discovery` entries in `agent::registry`'s `BUILTINS`), and a registration site wants
+//! `flow_discovery` entries in `agent_registry`'s `BUILTINS`), and a registration site wants
//! *absence*, not a disabled-error stub — otherwise `flows.*` becomes a known
//! method that fails at runtime.
//!
diff --git a/crates/openhuman-core/src/flows/ops/builder.rs b/crates/openhuman-core/src/flows/ops/builder.rs
index f826df29aa..a9786e027a 100644
--- a/crates/openhuman-core/src/flows/ops/builder.rs
+++ b/crates/openhuman-core/src/flows/ops/builder.rs
@@ -77,7 +77,7 @@ pub(crate) async fn flows_build_with_extra_hidden_tools(
// The registry must be initialised before building a named builtin agent
// (idempotent — mirrors `flows_discover`).
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.map_err(|e| format!("failed to initialise agent registry: {e}"))?;
diff --git a/crates/openhuman-core/src/flows/ops/builder_gates.rs b/crates/openhuman-core/src/flows/ops/builder_gates.rs
index fa471ec240..24a878afd5 100644
--- a/crates/openhuman-core/src/flows/ops/builder_gates.rs
+++ b/crates/openhuman-core/src/flows/ops/builder_gates.rs
@@ -320,11 +320,11 @@ pub(crate) async fn build_builder_proposal(
/// `RegistryFallback` "unknown agent_ref" hard error mid-run
/// (`run_via_registry_fallback` in `tinyflows/caps.rs`) — a real ref is one
/// that resolves via [`crate::flows::tinyflows::caps::route_for_agent_ref`]
-/// to a harness [`AgentDefinition`](crate::agent::harness::host_definition::AgentDefinition)
+/// to a harness [`AgentDefinition`](crate::agent_registry::host_definition::AgentDefinition)
/// (`AgentRoute::Harness`), OR — when it routes to `AgentRoute::RegistryFallback`
/// — resolves to an *enabled*
-/// [`AgentRegistryEntry`](crate::agent::registry::AgentRegistryEntry)
-/// via [`crate::agent::registry::get_agent`]. Both are exactly the
+/// [`AgentRegistryEntry`](crate::agent_registry::AgentRegistryEntry)
+/// via [`crate::agent_registry::get_agent`]. Both are exactly the
/// checks `OpenHumanAgentRunner::run_agent` performs at run time, reused here
/// rather than duplicated so the two planes cannot drift.
///
@@ -360,8 +360,8 @@ pub(crate) async fn validate_agent_refs(
config: &Config,
graph: &WorkflowGraph,
) -> Vec<String> {
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
- use crate::agent::registry::AgentRegistryEntry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::AgentRegistryEntry;
use crate::flows::tinyflows::caps::{route_for_agent_ref, AgentRoute};
let mut errors = Vec::new();
@@ -403,7 +403,7 @@ pub(crate) async fn validate_agent_refs(
}
AgentRoute::RegistryFallback => {
if custom_registry.is_none() {
- custom_registry = Some(crate::agent::registry::list_agents(ctx, true).await);
+ custom_registry = Some(crate::agent_registry::list_agents(ctx, true).await);
}
match custom_registry.as_ref().expect("just populated") {
Ok(entries) => match entries.iter().find(|entry| entry.id == agent_ref) {
diff --git a/crates/openhuman-core/src/flows/ops/discovery.rs b/crates/openhuman-core/src/flows/ops/discovery.rs
index a1a6afd31b..75b93f034a 100644
--- a/crates/openhuman-core/src/flows/ops/discovery.rs
+++ b/crates/openhuman-core/src/flows/ops/discovery.rs
@@ -53,7 +53,7 @@ pub async fn flows_discover(
// The registry must be initialised before building a named builtin agent
// (mirrors `agent_registry::ops::available_tools`); it is idempotent, so a
// second call from an already-booted core is a cheap no-op.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.map_err(|e| format!("failed to initialise agent registry: {e}"))?;
diff --git a/crates/openhuman-core/src/flows/ops/inference_readiness.rs b/crates/openhuman-core/src/flows/ops/inference_readiness.rs
index 7ed90dde25..a2c66f4b55 100644
--- a/crates/openhuman-core/src/flows/ops/inference_readiness.rs
+++ b/crates/openhuman-core/src/flows/ops/inference_readiness.rs
@@ -152,12 +152,12 @@ pub(super) async fn cached_probe_inference_readiness(
/// 1. Node `config.model` — a managed tier or `hint:*` alias, translated via
/// [`role_for_model_tier`](crate::inference::provider::role_for_model_tier).
/// 2. A static (non-`=`) `agent_ref` whose custom
-/// [`AgentRegistryEntry`](crate::agent::registry::AgentRegistryEntry)
+/// [`AgentRegistryEntry`](crate::agent_registry::AgentRegistryEntry)
/// itself pins a `model` (e.g. `hint:reasoning`) — resolved the same way
/// [`OpenHumanAgentRunner::run_via_harness`](crate::flows::tinyflows::caps::OpenHumanAgentRunner)
/// does via `resolve_node_model(&request, entry_model)`, using the same
/// sync, config-only accessor
-/// ([`find_custom_in_config`](crate::agent::registry::find_custom_in_config))
+/// ([`find_custom_in_config`](crate::agent_registry::find_custom_in_config))
/// it calls.
/// 3. Otherwise, caps.rs's own default role (`"summarization"`, its fallback
/// absent a `role` field on the completion request).
@@ -173,13 +173,13 @@ pub(super) fn agent_node_role(config: &Config, node: &tinyflows::model::Node) ->
.map(str::trim)
.filter(|s| !s.is_empty() && !s.starts_with('='))
{
- use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+ use crate::agent_registry::host_definition::AgentDefinitionRegistry;
if let Err(error) = AgentDefinitionRegistry::init_global(&config.workspace_dir) {
tracing::debug!(target: "flows", %error,
"[flows] readiness: agent definition registry unavailable; using registry fallback");
}
let definition = AgentDefinitionRegistry::current().and_then(|r| r.get(agent_ref).cloned());
- let custom = crate::agent::registry::find_custom_in_config(config, agent_ref);
+ let custom = crate::agent_registry::find_custom_in_config(config, agent_ref);
if definition.is_some() || custom.is_some() {
let entry_model = if definition.is_some() {
None
diff --git a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs
index 040834f492..0b66a1d80d 100644
--- a/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_agent_binding_tests.rs
@@ -496,7 +496,7 @@ async fn harness_readiness_checks_session_for_execution_provider() {
/// never cross.
#[tokio::test]
async fn agent_ref_gate_reads_the_registry_of_the_explicit_context() {
- use crate::agent::registry::types::{AgentRegistryEntry, AgentRegistrySource};
+ use crate::agent_registry::types::{AgentRegistryEntry, AgentRegistrySource};
use crate::core::runtime::{CoreContext, DispatchCtx, DomainSet};
let entry = AgentRegistryEntry {
diff --git a/crates/openhuman-core/src/flows/ops_inference_gate_tests.rs b/crates/openhuman-core/src/flows/ops_inference_gate_tests.rs
index 62d4b3150d..3280c54899 100644
--- a/crates/openhuman-core/src/flows/ops_inference_gate_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_inference_gate_tests.rs
@@ -189,7 +189,7 @@ fn agent_node_role_prefers_custom_registry_entry_model_pin_over_default() {
// precedence `OpenHumanAgentRunner::run_via_harness` applies via
// `resolve_node_model(&request, entry_model)`, reusing the same sync,
// config-only accessor (`find_custom_in_config`) it calls.
- use crate::agent::registry::types::{AgentRegistryEntry, AgentRegistrySource};
+ use crate::agent_registry::types::{AgentRegistryEntry, AgentRegistrySource};
let tmp = TempDir::new().unwrap();
let mut config = test_config(&tmp);
diff --git a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
index 46053d9346..50d6bb539c 100644
--- a/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_migration_and_side_effect_tests.rs
@@ -14,11 +14,11 @@ async fn flows_discover_applies_the_flow_discovery_definitions_effective_iterati
// Building an agent constructs a memory client, which needs the host seams
// wired. `Once`-guarded, so this is free when another test got there first.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.expect("agent registry init");
- let def = crate::agent::harness::host_definition::AgentDefinitionRegistry::global()
+ let def = crate::agent_registry::host_definition::AgentDefinitionRegistry::global()
.expect("registry initialised")
.get("flow_discovery")
.expect("flow_discovery definition registered")
diff --git a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs
index 0b7e9c8a92..394e273998 100644
--- a/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs
+++ b/crates/openhuman-core/src/flows/ops_run_status_and_prompt_binding_tests.rs
@@ -146,7 +146,7 @@ async fn flows_build_hides_the_live_run_tool_from_the_builder_belt() {
// Building an agent constructs a memory client, which needs the host seams
// wired. `Once`-guarded, so this is free when another test got there first.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.expect("agent registry init");
@@ -249,7 +249,7 @@ async fn flows_build_copilot_toolset_unhides_the_live_run_tools() {
// Building an agent constructs a memory client, which needs the host seams
// wired. `Once`-guarded, so this is free when another test got there first.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.expect("agent registry init");
@@ -315,11 +315,11 @@ async fn flows_build_applies_the_builder_definitions_effective_iteration_cap() {
// Building an agent constructs a memory client, which needs the host seams
// wired. `Once`-guarded, so this is free when another test got there first.
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.expect("agent registry init");
- let def = crate::agent::harness::host_definition::AgentDefinitionRegistry::global()
+ let def = crate::agent_registry::host_definition::AgentDefinitionRegistry::global()
.expect("registry initialised")
.get("workflow_builder")
.expect("workflow_builder definition registered")
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/agent.rs b/crates/openhuman-core/src/flows/tinyflows/caps/agent.rs
index 3d9935ad57..f96cfd8714 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/agent.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/agent.rs
@@ -24,7 +24,7 @@ use crate::inference::provider::{is_raw_passthrough_model, role_for_model_tier};
/// agent kind by one of two paths, chosen by [`route_for_agent_ref`]:
///
/// 1. **Full harness turn** (the common case, Phase A). When `agent_ref` names a
-/// harness [`AgentDefinition`](crate::agent::harness::host_definition::AgentDefinition),
+/// harness [`AgentDefinition`](crate::agent_registry::host_definition::AgentDefinition),
/// the node builds a real session agent
/// ([`OpenHumanSessionHost::from_config_for_agent`](crate::agent::OpenHumanSessionHost::from_config_for_agent)
/// + `set_agent_definition_name`) and drives one full turn via
@@ -39,7 +39,7 @@ use crate::inference::provider::{is_raw_passthrough_model, role_for_model_tier};
/// the flow's tinyagents graph.
/// 2. **Persona-shaping completion fallback** (no regression for custom agents).
/// When `agent_ref` only resolves to a custom
-/// [`AgentRegistryEntry`](crate::agent::registry::AgentRegistryEntry)
+/// [`AgentRegistryEntry`](crate::agent_registry::AgentRegistryEntry)
/// (no harness definition), the node keeps the original single-completion
/// behavior: the entry's `system_prompt` / `model` are shaped on top of the
/// node request and run through [`OpenHumanLlm::complete`].
@@ -138,7 +138,7 @@ pub(crate) fn route_for_agent_ref(agent_ref: &str) -> AgentRoute {
if crate::agent::host_agents::resolve(agent_ref).is_some() {
return AgentRoute::HostAgent;
}
- let has_definition = crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ let has_definition = crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
.map(|reg| reg.get(agent_ref).is_some())
.unwrap_or(false);
if has_definition {
@@ -183,7 +183,7 @@ impl AgentRunner for OpenHumanAgentRunner {
// build a named agent. Idempotent: a booted core already did this at
// startup; a bare flow run (tests, standalone) has not. A failure here
// is non-fatal — we log and fall through to the registry-entry route.
- if let Err(e) = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ if let Err(e) = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&self.config.workspace_dir,
) {
tracing::warn!(
@@ -241,7 +241,7 @@ impl AgentRunner for OpenHumanAgentRunner {
// are disabled, which `run_via_registry_fallback` already
// rejects with a clear error).
let custom_entry =
- crate::agent::registry::find_custom_in_config(&self.config, agent_ref);
+ crate::agent_registry::find_custom_in_config(&self.config, agent_ref);
let entry_model = custom_entry.as_ref().and_then(|e| e.model.clone());
match route_custom_entry_lookup(custom_entry.as_ref()) {
AgentRoute::Harness | AgentRoute::HostAgent => {
@@ -297,7 +297,7 @@ impl AgentRunner for OpenHumanAgentRunner {
/// over the lookup result so the decision is unit-testable without a live
/// `Config`/registry.
pub(crate) fn route_custom_entry_lookup(
- entry: Option<&crate::agent::registry::AgentRegistryEntry>,
+ entry: Option<&crate::agent_registry::AgentRegistryEntry>,
) -> AgentRoute {
match entry {
Some(e) if e.enabled => AgentRoute::Harness,
@@ -513,7 +513,7 @@ impl OpenHumanAgentRunner {
}
/// Persona-shaping single-completion fallback for a custom
- /// [`AgentRegistryEntry`](crate::agent::registry::AgentRegistryEntry)
+ /// [`AgentRegistryEntry`](crate::agent_registry::AgentRegistryEntry)
/// with no harness definition — the pre-Phase-A behavior, kept so custom
/// agents don't regress.
async fn run_via_registry_fallback(
@@ -524,7 +524,7 @@ impl OpenHumanAgentRunner {
conn: Option<&str>,
) -> Result<Value> {
// Resolve + validate the requested agent kind against the registry.
- let entry = crate::agent::registry::get_agent(dispatch, agent_ref)
+ let entry = crate::agent_registry::get_agent(dispatch, agent_ref)
.await
.map_err(EngineError::Capability)?
.ok_or_else(|| {
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/agent_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/agent_tests.rs
index 2f9953793e..9c913b7f11 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/agent_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/agent_tests.rs
@@ -39,7 +39,7 @@ impl crate::agent::host_agents::HostAgentResolver for FlowsHost {
return None;
}
let mut definition =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.get("orchestrator")
.cloned()
.unwrap();
diff --git a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
index 2b1ab3b393..8e87d76c00 100644
--- a/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/caps/ops_tier_gate_and_timeouts_tests.rs
@@ -404,11 +404,11 @@ fn agent_node_runtime_resolves_to_the_definitions_effective_iteration_cap() {
let config = resolver_test_config(&tmp);
assert_eq!(config.agent.max_tool_iterations, 10);
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global(
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global(
&config.workspace_dir,
)
.expect("agent registry init");
- let def = crate::agent::harness::host_definition::AgentDefinitionRegistry::global()
+ let def = crate::agent_registry::host_definition::AgentDefinitionRegistry::global()
.expect("registry initialised")
.get("planner")
.expect("planner definition registered")
diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
index c1c10ecb17..60bb9b5286 100644
--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_capabilities_tests.rs
@@ -463,7 +463,7 @@ fn harness_model_default_override_forwards_raw_byok_models_verbatim() {
fn route_for_agent_ref_selects_harness_for_definitions_else_fallback() {
// Ensure the global registry is populated (idempotent no-op if another test
// already initialised it; builtins are always present either way).
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
// A shipped harness definition → full-loop harness path.
assert_eq!(route_for_agent_ref("workflow_builder"), AgentRoute::Harness);
diff --git a/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs b/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
index 293720ee06..96a2bdde15 100644
--- a/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
+++ b/crates/openhuman-core/src/flows/tinyflows/tinyflows_tests.rs
@@ -144,9 +144,9 @@ use super::caps::{
// ── B38 (Gap 2): a custom agent_ref must route to the harness (real tools),
// not the persona-only completion fallback ─────────────────────────────────
-fn custom_registry_entry(enabled: bool) -> crate::agent::registry::AgentRegistryEntry {
- use crate::agent::registry::types::{AgentRegistrySource, AgentSubagentPolicy};
- crate::agent::registry::AgentRegistryEntry {
+fn custom_registry_entry(enabled: bool) -> crate::agent_registry::AgentRegistryEntry {
+ use crate::agent_registry::types::{AgentRegistrySource, AgentSubagentPolicy};
+ crate::agent_registry::AgentRegistryEntry {
id: "finance_analyst".to_string(),
name: "Finance Analyst".to_string(),
description: "Reviews spend and drafts finance summaries.".to_string(),
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs
index b6276ed8d7..ad3837da4f 100644
--- a/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs
+++ b/crates/openhuman-core/src/inference/host_runtime/ops/agent_chat.rs
@@ -161,7 +161,7 @@ pub enum AgentChatTarget<'a> {
/// can honour it: the other two resolve a definition the caller does not
/// hold, so there is no agent for a host belt to belong to.
Definition {
- definition: &'a crate::agent::harness::host_definition::AgentDefinition,
+ definition: &'a crate::agent_registry::host_definition::AgentDefinition,
host: Option<&'a crate::agent::HostTools>,
/// History to seed this turn with, as `(role, content)` rows, instead
/// of whatever the session would otherwise resume.
@@ -254,9 +254,9 @@ impl std::fmt::Debug for AgentChatTarget<'_> {
// Definitions are reusable snapshots. A turn override belongs only to the
// definition passed to this call's factory, which otherwise wins over Config.
fn definition_for_turn(
- definition: &crate::agent::harness::host_definition::AgentDefinition,
+ definition: &crate::agent_registry::host_definition::AgentDefinition,
temperature: Option<f64>,
-) -> std::borrow::Cow<'_, crate::agent::harness::host_definition::AgentDefinition> {
+) -> std::borrow::Cow<'_, crate::agent_registry::host_definition::AgentDefinition> {
match temperature {
Some(temperature) => {
let mut scoped = definition.clone();
diff --git a/crates/openhuman-core/src/mcp/registry/ops_tests.rs b/crates/openhuman-core/src/mcp/registry/ops_tests.rs
index e88ac7147e..6a0945e749 100644
--- a/crates/openhuman-core/src/mcp/registry/ops_tests.rs
+++ b/crates/openhuman-core/src/mcp/registry/ops_tests.rs
@@ -205,7 +205,7 @@ fn refusals_name_only_tools_on_every_listing_belt() {
"the unknown-id refusal names the status tool"
);
- let belts: Vec<_> = crate::agent::registry::agents::load_builtins()
+ let belts: Vec<_> = crate::agent_registry::agents::load_builtins()
.expect("built-ins load")
.into_iter()
.filter_map(|def| {
diff --git a/crates/openhuman-core/src/mcp/server/resources.rs b/crates/openhuman-core/src/mcp/server/resources.rs
index 35dbeb9790..7d0d11f2b5 100644
--- a/crates/openhuman-core/src/mcp/server/resources.rs
+++ b/crates/openhuman-core/src/mcp/server/resources.rs
@@ -57,73 +57,73 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
uri: "openhuman://prompts/agents/orchestrator",
name: "orchestrator",
description: "Chat-tier orchestrator that routes tasks to specialist subagents.",
- content: include_str!("../../agent/registry/agents/orchestrator/prompt.md"),
+ content: include_str!("../../agent_registry/agents/orchestrator/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/planner",
name: "planner",
description: "Read-only reasoning worker that decomposes and researches a question for workflow runs.",
- content: include_str!("../../agent/registry/agents/planner/prompt.md"),
+ content: include_str!("../../agent_registry/agents/planner/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/critic",
name: "critic",
description: "Read-only worker that cross-checks claims and reviews changes for workflow runs.",
- content: include_str!("../../agent/registry/agents/critic/prompt.md"),
+ content: include_str!("../../agent_registry/agents/critic/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/vision_agent",
name: "vision_agent",
description: "Multimodal worker that analyses attached images for the vision tier.",
- content: include_str!("../../agent/registry/agents/vision_agent/prompt.md"),
+ content: include_str!("../../agent_registry/agents/vision_agent/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/image_agent",
name: "image_agent",
description: "Worker that generates or edits images via GMI and saves them to the configured Files folder.",
- content: include_str!("../../agent/registry/agents/image_agent/prompt.md"),
+ content: include_str!("../../agent_registry/agents/image_agent/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/video_agent",
name: "video_agent",
description: "Worker that generates short videos via GMI and saves them to the configured Files folder.",
- content: include_str!("../../agent/registry/agents/video_agent/prompt.md"),
+ content: include_str!("../../agent_registry/agents/video_agent/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/trigger_triage",
name: "trigger_triage",
description: "Read-only worker that classifies incoming automation triggers.",
- content: include_str!("../../agent/registry/agents/trigger_triage/prompt.md"),
+ content: include_str!("../../agent_registry/agents/trigger_triage/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/trigger_reactor",
name: "trigger_reactor",
description: "Worker that executes actions in response to classified triggers.",
- content: include_str!("../../agent/registry/agents/trigger_reactor/prompt.md"),
+ content: include_str!("../../agent_registry/agents/trigger_reactor/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/morning_briefing",
name: "morning_briefing",
description: "Read-only worker that assembles a personalised morning briefing.",
- content: include_str!("../../agent/registry/agents/morning_briefing/prompt.md"),
+ content: include_str!("../../agent_registry/agents/morning_briefing/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/summarizer",
name: "summarizer",
description: "The extraction contract oversized tool results are summarized against.",
- content: crate::agent::registry::agents::summarizer::ARCHETYPE,
+ content: crate::agent_registry::agents::summarizer::ARCHETYPE,
},
PromptResource {
uri: "openhuman://prompts/agents/presentation_agent",
name: "presentation_agent",
description: "Specialist worker for evidence-grounded presentation generation.",
- content: include_str!("../../agent/registry/agents/presentation_agent/prompt.md"),
+ content: include_str!("../../agent_registry/agents/presentation_agent/prompt.md"),
},
PromptResource {
uri: "openhuman://prompts/agents/task_manager_agent",
name: "task_manager_agent",
description: "Specialist worker for task-source feeds, workflow bundles, and artifacts.",
- content: include_str!("../../agent/registry/agents/task_manager_agent/prompt.md"),
+ content: include_str!("../../agent_registry/agents/task_manager_agent/prompt.md"),
},
#[cfg(feature = "flows")]
PromptResource {
diff --git a/crates/openhuman-core/src/mcp/server/resources_tests.rs b/crates/openhuman-core/src/mcp/server/resources_tests.rs
index d0395617c9..56cbf9fcd9 100644
--- a/crates/openhuman-core/src/mcp/server/resources_tests.rs
+++ b/crates/openhuman-core/src/mcp/server/resources_tests.rs
@@ -2,7 +2,7 @@ use super::*;
#[test]
fn catalog_mirrors_builtins() {
- use crate::agent::registry::agents::BUILTINS;
+ use crate::agent_registry::agents::BUILTINS;
for b in BUILTINS {
let expected_uri = format!("openhuman://prompts/agents/{}", b.id);
@@ -78,7 +78,7 @@ fn read_resource_returns_minus_32002_for_unknown_uri() {
#[test]
fn read_resource_returns_content_for_each_subagent() {
- use crate::agent::registry::agents::BUILTINS;
+ use crate::agent_registry::agents::BUILTINS;
for b in BUILTINS {
let uri = format!("openhuman://prompts/agents/{}", b.id);
let result = read_resource(&uri)
diff --git a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
index c6a1b569c5..2fe88f5418 100644
--- a/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
+++ b/crates/openhuman-core/src/mcp/server/tools/dispatch.rs
@@ -2,7 +2,7 @@ use crate::core::runtime::DispatchCtx;
use serde_json::{json, Map, Value};
use tinyinference_llm::tool::ToolSchema;
-use crate::agent::harness::host_definition::AgentDefinitionRegistry;
+use crate::agent_registry::host_definition::AgentDefinitionRegistry;
use crate::agent::OpenHumanSessionHost;
use crate::core::all;
use crate::security::{SecurityPolicy, ToolOperation};
diff --git a/crates/openhuman-core/src/profiles/capabilities.rs b/crates/openhuman-core/src/profiles/capabilities.rs
index 5dac03cc93..672024879c 100644
--- a/crates/openhuman-core/src/profiles/capabilities.rs
+++ b/crates/openhuman-core/src/profiles/capabilities.rs
@@ -58,7 +58,7 @@ impl ProfileCapabilities {
/// Make `definition` render the operator's system prompt, if one is set.
pub fn apply_system_prompt(
&self,
- definition: &mut crate::agent::harness::host_definition::AgentDefinition,
+ definition: &mut crate::agent_registry::host_definition::AgentDefinition,
) {
if let Some(prompt) = &self.system_prompt {
definition.system_prompt =
diff --git a/crates/openhuman-core/src/skills/README.md b/crates/openhuman-core/src/skills/README.md
index 6d9770239e..6af48f4ad4 100644
--- a/crates/openhuman-core/src/skills/README.md
+++ b/crates/openhuman-core/src/skills/README.md
@@ -217,7 +217,7 @@ rather than re-implementing it:
| Bundled-skill validate, digest, install, `is_current_materialization` | The `BUNDLED` table and the builtin root |
Other owners: the orchestrator prompt renders the catalog
-(`agent/registry/agents/orchestrator/prompt.rs`), channel turns render their
+(`agent_registry/agents/orchestrator/prompt.rs`), channel turns render their
own skills list (`agent/context/channels_prompt.rs`), fork context carries the
parent's skill list to sub-agents (`agent/harness/fork_context.rs`), and the
flows domain contributes `Flow`-scope entries (`flows/catalogue.rs`).
diff --git a/crates/openhuman-core/src/skills/catalog/README.md b/crates/openhuman-core/src/skills/catalog/README.md
index c3c6ae77be..07687b74b4 100644
--- a/crates/openhuman-core/src/skills/catalog/README.md
+++ b/crates/openhuman-core/src/skills/catalog/README.md
@@ -95,7 +95,7 @@ LLM-callable tools (`SkillRegistryBrowseTool`, `SkillRegistrySearchTool`,
`setup_skills`) whose tool belt is the five tools above plus
`list_workflows`, `describe_workflow`, `install_workflow_from_url`,
`uninstall_workflow`, and `ask_user_clarification`. It is registered in
-`crates/openhuman-core/src/agent/registry/agents/loader.rs` behind
+`crates/openhuman-core/src/agent_registry/agents/loader.rs` behind
`#[cfg(feature = "skills")]`, which embeds [`agent/skill_setup/agent.toml`](./agent/skill_setup/agent.toml) via
`include_str!` and wires `agent/skill_setup/prompt.rs::build` as its prompt
builder.
diff --git a/crates/openhuman-core/src/skills/registry.rs b/crates/openhuman-core/src/skills/registry.rs
index b248397555..a2e677eab4 100644
--- a/crates/openhuman-core/src/skills/registry.rs
+++ b/crates/openhuman-core/src/skills/registry.rs
@@ -12,7 +12,7 @@ use std::path::Path;
use serde::{Deserialize, Serialize};
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use tinyagents_definition::PromptSource;
use tinyskills::Skill as Workflow;
@@ -172,7 +172,7 @@ fn load_workflows_and_discovered(workspace_dir: &Path) -> (Vec<WorkflowDefinitio
let mut workflows: Vec<WorkflowDefinition> = Vec::new();
- if let Ok(builtins) = crate::agent::registry::agents::load_builtins() {
+ if let Ok(builtins) = crate::agent_registry::agents::load_builtins() {
for definition in builtins {
workflows.push(WorkflowDefinition {
definition,
diff --git a/crates/openhuman-core/src/storage/import/sessions.rs b/crates/openhuman-core/src/storage/import/sessions.rs
index 43587d2f5d..7b70f3020f 100644
--- a/crates/openhuman-core/src/storage/import/sessions.rs
+++ b/crates/openhuman-core/src/storage/import/sessions.rs
@@ -18,7 +18,7 @@
//! the desktop's own work resolves them. A transcript stem names the agent
//! definition that wrote it, but only as a digest, so each stem is matched
//! against the digests of the known definitions
-//! ([`crate::agent::harness::host_definition::AgentDefinitionRegistry`]) and
+//! ([`crate::agent_registry::host_definition::AgentDefinitionRegistry`]) and
//! imported into that definition's scope, which is where the session host
//! resumes it. A stem that matches none lands in the default agent.
//! - **Once.** A marker (like the other domains') is written when the whole
@@ -132,13 +132,13 @@ fn import(backend: &Arc<dyn StorageBackend>, config: &Config) -> Result<Outcome>
/// encode to in a stem.
fn known_agents() -> HashMap<String, String> {
let mut ids: Vec<String> =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::builtins_only()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::builtins_only()
.list()
.iter()
.map(|def| def.id.clone())
.collect();
if let Some(current) =
- crate::agent::harness::host_definition::AgentDefinitionRegistry::current()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::current()
{
ids.extend(current.list().iter().map(|def| def.id.clone()));
}
diff --git a/crates/openhuman-core/src/threads/ops/edit_tests.rs b/crates/openhuman-core/src/threads/ops/edit_tests.rs
index 778330c6c6..f63a2751b0 100644
--- a/crates/openhuman-core/src/threads/ops/edit_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/edit_tests.rs
@@ -392,7 +392,7 @@ async fn transcript_store_reads_the_profile_from_the_request_context() {
#[tokio::test]
async fn edit_and_regenerate_use_the_threads_recorded_key_after_a_chat_agent_change() {
use crate::core::runtime::{ContextOverlay, CoreContext, DispatchCtx, DomainSet};
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let dir = TempDir::new().expect("tempdir");
let ctx_with = |chat_agent: Option<&str>| {
let mut config = crate::config::Config {
diff --git a/crates/openhuman-core/src/threads/ops/transcript_tests.rs b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
index 49aaa6cd3c..73e533bb17 100644
--- a/crates/openhuman-core/src/threads/ops/transcript_tests.rs
+++ b/crates/openhuman-core/src/threads/ops/transcript_tests.rs
@@ -203,7 +203,7 @@ async fn a_blank_thread_id_is_refused() {
/// recorded with the thread, not the one the current config would derive.
#[tokio::test]
async fn changing_the_chat_agent_does_not_strand_an_existing_threads_turns() {
- let _ = crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let dir = tempfile::tempdir().unwrap();
let before = ctx_with_chat_agent(dir.path(), None, None);
let after = ctx_with_chat_agent(dir.path(), None, Some("planner"));
diff --git a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
index df5b6e8be6..ab07ceed2a 100644
--- a/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
+++ b/crates/openhuman-core/src/tools/ops_tests_default_registry_tests.rs
@@ -124,7 +124,7 @@ fn every_packed_tool_name_resolves_to_a_registered_tool() {
// into the binary and must always parse, so an `Err` here is a broken
// invariant worth failing loudly on rather than absorbing.
let delegates: std::collections::HashSet<String> =
- crate::agent::registry::agents::load_builtins()
+ crate::agent_registry::agents::load_builtins()
.expect("built-in agent registry must load; without it every pack delegate would be reported as a phantom name")
.into_iter()
.filter_map(|d| d.delegate_name)
diff --git a/crates/openhuman-core/src/tools/orchestrator_tools.rs b/crates/openhuman-core/src/tools/orchestrator_tools.rs
index 89745d636a..1e5e43b64e 100644
--- a/crates/openhuman-core/src/tools/orchestrator_tools.rs
+++ b/crates/openhuman-core/src/tools/orchestrator_tools.rs
@@ -28,11 +28,11 @@
//! registry (for delegation target lookups), and the current list of
//! connected Composio integrations.
//!
-//! [`AgentDefinition::when_to_use`]: crate::agent::harness::host_definition::AgentDefinition::when_to_use
+//! [`AgentDefinition::when_to_use`]: crate::agent_registry::host_definition::AgentDefinition::when_to_use
//! [`SubagentEntry::AgentId`]: tinyagents_definition::SubagentEntry::AgentId
//! [`SubagentEntry::Skills`]: tinyagents_definition::SubagentEntry::Skills
-use crate::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use crate::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use crate::agent::prompts::ConnectedIntegration;
use crate::integrations::composio::ComposioActionTool;
use tinyagents_definition::SubagentEntry;
diff --git a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
index c3e647a32e..cde2293585 100644
--- a/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
+++ b/crates/openhuman-core/src/tools/orchestrator_tools_tests.rs
@@ -28,7 +28,7 @@ fn def(id: &str, when_to_use: &str, delegate_name: Option<&str>) -> AgentDefinit
delegate_name: delegate_name.map(String::from),
agent_tier: tinyagents_definition::AgentTier::Worker,
source: DefinitionSource::Builtin,
- extensions: crate::agent::harness::host_definition::AgentExt {
+ extensions: crate::agent_registry::host_definition::AgentExt {
omit_identity: true,
omit_memory_context: true,
omit_safety_preamble: true,
diff --git a/crates/openhuman-core/src/tools/rules/ops.rs b/crates/openhuman-core/src/tools/rules/ops.rs
index 8caaea2bbb..1e3f31592b 100644
--- a/crates/openhuman-core/src/tools/rules/ops.rs
+++ b/crates/openhuman-core/src/tools/rules/ops.rs
@@ -5,7 +5,7 @@ use std::sync::Arc;
use tinyagents_harness::tool::ToolRulePolicy;
use tinytools::{glob_matches, RuleContext, RuleEffect, ToolRule, ToolRuleSet, ToolRules};
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::config::Config;
/// Whether any entry of a definition tool list matches `name`.
diff --git a/crates/openhuman-core/src/tools/rules/ops_tests.rs b/crates/openhuman-core/src/tools/rules/ops_tests.rs
index 49b398c2f5..275247cd51 100644
--- a/crates/openhuman-core/src/tools/rules/ops_tests.rs
+++ b/crates/openhuman-core/src/tools/rules/ops_tests.rs
@@ -2,14 +2,14 @@ use super::*;
use std::sync::Arc;
-use crate::agent::harness::host_definition::AgentDefinition;
+use crate::agent_registry::host_definition::AgentDefinition;
use crate::config::Config;
use tinytools::ToolRuleSet;
use tinytools::{Surface, ToolSubject};
fn definition(id: &str) -> AgentDefinition {
- crate::agent::registry::agents::load_builtins()
+ crate::agent_registry::agents::load_builtins()
.expect("built-ins load")
.into_iter()
.next()
diff --git a/crates/openhuman-core/src/tools/toolpacks/README.md b/crates/openhuman-core/src/tools/toolpacks/README.md
index dea67a1e20..d1b70398ea 100644
--- a/crates/openhuman-core/src/tools/toolpacks/README.md
+++ b/crates/openhuman-core/src/tools/toolpacks/README.md
@@ -111,7 +111,7 @@ to load the skill. The two such rules (an explicit yes before moving funds or
executing a swap, bridge or contract call, and an explicit yes before
stopping, shutting down, uninstalling or updating OpenHuman's service) live
in the orchestrator prompt's `## Skills` section
-(`agent/registry/agents/orchestrator/prompt.md`). Lookup detail and the step
+(`agent_registry/agents/orchestrator/prompt.md`). Lookup detail and the step
by step loop belong in the guide.
[`toolpacks_tests.rs`](./toolpacks_tests.rs) keeps guides honest: every guided pack must carry a
@@ -158,7 +158,7 @@ listing offers the hand-off beside the raw registry tools.
tool-policy session lets that tool run (`blocks_execution()` is false), and
never on a turn without a session (sub-agent, channel/CLI), where an
unregistered name was excluded by the registration allowlist.
-- `agent/registry/agents/orchestrator/prompt.rs`: `pack_for_tool` to tell
+- `agent_registry/agents/orchestrator/prompt.rs`: `pack_for_tool` to tell
the orchestrator which pack a withheld delegate lives in.
- `crates/openhuman-embed/`: re-exports `GroupMode` and `ToolGroups` and
exposes `Harness::builder().tool_groups(..)`.
diff --git a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
index cc38a08422..a87bbe1a8b 100644
--- a/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
+++ b/crates/openhuman-core/src/web_chat/session_checkout_tests.rs
@@ -552,7 +552,7 @@ fn fingerprint_diff_reports_every_differing_field() {
#[test]
fn chat_agent_id_selects_the_web_chat_agent_and_defaults_to_the_orchestrator() {
use super::pick_target_agent_id;
- crate::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ crate::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.unwrap();
let mut config = crate::config::Config::default();
diff --git a/crates/openhuman-embed/src/agent/build.rs b/crates/openhuman-embed/src/agent/build.rs
index af5bef46ac..ec9b7e5a1f 100644
--- a/crates/openhuman-embed/src/agent/build.rs
+++ b/crates/openhuman-embed/src/agent/build.rs
@@ -7,7 +7,7 @@
use std::path::Path;
-use openhuman_core::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use openhuman_core::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use openhuman_core::core::all::DomainGroup;
use openhuman_core::core::runtime::{ContextOverlay, DomainSet};
use openhuman_core::tools::toolpacks::{GroupMode, ToolGroups};
diff --git a/crates/openhuman-embed/src/agent/definition.rs b/crates/openhuman-embed/src/agent/definition.rs
index 914b122670..10219f4312 100644
--- a/crates/openhuman-embed/src/agent/definition.rs
+++ b/crates/openhuman-embed/src/agent/definition.rs
@@ -1,7 +1,7 @@
//! What an agent *is*: prompt, tool scope, sandbox mode, iteration cap.
//!
//! A thin re-spelling of the core's
-//! [`AgentDefinition`](openhuman_core::agent::harness::host_definition::AgentDefinition)
+//! [`AgentDefinition`](openhuman_core::agent_registry::host_definition::AgentDefinition)
//! so the library surface does not track that thirty-field struct
//! field-by-field. The default is the built-in orchestrator's definition
//! under the agent's own id — the same dynamic prompt and delegation
@@ -12,7 +12,7 @@
//! server expects to call it, so the host narrows with
//! [`AgentDefinitionSpec::tools`] rather than widening.
-use openhuman_core::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use openhuman_core::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use tinyagents_definition::{PromptSource, SandboxMode, ToolScope};
use super::AgentError;
diff --git a/crates/openhuman-embed/src/agent/mod.rs b/crates/openhuman-embed/src/agent/mod.rs
index 030fce0cd2..eb95b6e3d7 100644
--- a/crates/openhuman-embed/src/agent/mod.rs
+++ b/crates/openhuman-embed/src/agent/mod.rs
@@ -5,7 +5,7 @@
//! [`Runtime::agent`](crate::Runtime::agent) assembled from an
//! [`AgentSpec`]: its own `Config` (provider route and model, MCP servers,
//! autonomy tier, `action_dir`), its
-//! [`AgentDefinition`](openhuman_core::agent::harness::host_definition::AgentDefinition)
+//! [`AgentDefinition`](openhuman_core::agent_registry::host_definition::AgentDefinition)
//! (system prompt, tool scope, sandbox mode), its
//! derived
//! [`CoreContext`](openhuman_core::core::runtime::CoreContext) every turn
@@ -33,7 +33,7 @@ pub use spec::{AgentSpec, MemoryBinding};
use std::path::Path;
use std::sync::Arc;
-use openhuman_core::agent::harness::host_definition::AgentDefinition;
+use openhuman_core::agent_registry::host_definition::AgentDefinition;
use openhuman_core::config::Config;
use openhuman_core::core::runtime::{CoreContext, CoreRuntime};
diff --git a/crates/openhuman-embed/src/lib.rs b/crates/openhuman-embed/src/lib.rs
index 417408baf4..9f8f40c95f 100644
--- a/crates/openhuman-embed/src/lib.rs
+++ b/crates/openhuman-embed/src/lib.rs
@@ -64,7 +64,7 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
/// Complete definition accepted by [`AgentDefinitionSpec::from_base`].
-pub use openhuman_core::agent::harness::host_definition::AgentDefinition;
+pub use openhuman_core::agent_registry::host_definition::AgentDefinition;
pub use openhuman_core::agent::turn_origin::{AgentTurnOrigin, TrustedAutomationSource};
/// The origin of the executing turn, with its original chat or channel route.
diff --git a/crates/openhuman-embed/src/runtime/mod.rs b/crates/openhuman-embed/src/runtime/mod.rs
index 45ebdd143b..b145aa7c98 100644
--- a/crates/openhuman-embed/src/runtime/mod.rs
+++ b/crates/openhuman-embed/src/runtime/mod.rs
@@ -41,7 +41,7 @@
//! [`ServiceSet`], the compiled-and-registered [`DomainSet`] and the API key.
//! An agent owns everything the core reads through its ambient context:
//! its `Config` (provider route and model, MCP servers, autonomy tier,
-//! `action_dir`), its [`AgentDefinition`](openhuman_core::agent::harness::host_definition::AgentDefinition)
+//! `action_dir`), its [`AgentDefinition`](openhuman_core::agent_registry::host_definition::AgentDefinition)
//! (system prompt, tool scope, sandbox mode), its profile (allowlists,
//! dedicated memory and transcripts), its skills root, its narrowed
//! `DomainSet` and [`ToolGroups`], its approval settings, sub-agents, MCP
diff --git a/docs/TEST-COVERAGE-MATRIX.md b/docs/TEST-COVERAGE-MATRIX.md
index 0a784d829c..1e010593ee 100644
--- a/docs/TEST-COVERAGE-MATRIX.md
+++ b/docs/TEST-COVERAGE-MATRIX.md
@@ -289,7 +289,7 @@ End-to-end coverage of the agent harness via the web-chat RPC surface against an
| 6.3.1 | Steer a running sub-agent | RU | `crates/openhuman-core/src/agent/orchestration/running_subagents.rs`, `crates/openhuman-core/src/agent/orchestration/tools/steer_subagent.rs` | ✅ | `steer_subagent` injects a steer/collect message into a running async sub-agent's run-queue; registry enforces parent ownership + terminal guard. |
| 6.3.2 | Wait for a sub-agent result | RU | `crates/openhuman-core/src/agent/orchestration/running_subagents.rs`, `crates/openhuman-core/src/agent/orchestration/tools/wait_subagent.rs` | ✅ | `wait_subagent` blocks on the completion `watch` with a timeout; prunes terminal entries, leaves entries intact on timeout. |
| 6.3.3 | Steer lands in child history | RU | `crates/openhuman-core/src/agent/subagent_host/ops_tests_slug_filter_typed_mode_tests.rs::run_queue_steer_lands_in_subagent_history` | 🟡 | Migration coverage: the direct host adapter retains the child queue/history assertion while Phase 6 completes its lifecycle and persistence cutover. |
-| 6.3.9 | Vision sub-agent reads attached images | RU | `crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs::vision_agent_loads_on_vision_hint`, `crates/openhuman-core/src/inference/model_context_tests.rs::oh_tier_vision_map_is_exhaustively_pinned`, `crates/openhuman-core/src/agent/tinyagents/routes_tests.rs::turn_required_capabilities_gates_only_vision`, `crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs::extract_image_placeholders_pulls_att_tokens_in_order` | ✅ | Orchestrator keeps the image as a placeholder, delegates to `vision_agent` on the `vision` route, which rehydrates the on-disk attachment and reads it. Engine gate prefers per-tier `current_model_vision`; turn placeholders forwarded into the sub-agent prompt. |
+| 6.3.9 | Vision sub-agent reads attached images | RU | `crates/openhuman-core/src/agent_registry/agents/loader_tests_builtin_registration_tests.rs::vision_agent_loads_on_vision_hint`, `crates/openhuman-core/src/inference/model_context_tests.rs::oh_tier_vision_map_is_exhaustively_pinned`, `crates/openhuman-core/src/agent/tinyagents/routes_tests.rs::turn_required_capabilities_gates_only_vision`, `crates/openhuman-core/src/agent/multimodal_attachment_handling_tests.rs::extract_image_placeholders_pulls_att_tokens_in_order` | ✅ | Orchestrator keeps the image as a placeholder, delegates to `vision_agent` on the `vision` route, which rehydrates the on-disk attachment and reads it. Engine gate prefers per-tier `current_model_vision`; turn placeholders forwarded into the sub-agent prompt. |
| 6.3.11 | Async-by-default archetype delegation (durable ref) | RU | `crates/openhuman-core/src/agent/orchestration/tools/tools_e2e_tests.rs::archetype_delegation_defaults_to_async_with_durable_session_e2e`, `crates/openhuman-core/src/agent/orchestration/tools/archetype_delegation.rs::parameters_schema_advertises_async_default_blocking_opt_in` | ✅ | `delegate_*` / `build_workflow` with a parent turn + chat thread return `[async_subagent_ref]` (task_id + subagent_session_id) immediately, persist a durable reusable session, and queue the result for background delivery as a new turn; `blocking: true` opts back into inline dispatch, and no-thread contexts fall back automatically. |
| 6.3.12 | Cross-turn sub-agent roster (durable store merge) | RU | `crates/openhuman-core/src/agent/orchestration/running_subagents.rs::snapshot_and_block_scope_to_parent_and_reflect_live_status` | ✅ | `[active_subagents]` merges the in-memory registry with the per-workspace `subagent_sessions` store, so a cold-booted parent still sees earlier workers (id, status, task title) and resumes instead of re-delegating; Closed sessions excluded, other parents' sessions never leak. |
@@ -519,7 +519,7 @@ The thread JSONL store moved to `tinyagents_session::threads` (`vendor/tinyagent
| 11.1.12 | MCP UI surface (Servers / mcp.json / Registry tabs) | VU/RU | `app/src/components/channels/mcp/McpServersPage.test.tsx`, `app/src/components/channels/mcp/McpJsonEditor.test.tsx`, `app/src/components/channels/mcp/mcpJson.test.ts`, `app/src/components/channels/mcp/McpRegistryBrowser.test.tsx`, `app/src/components/channels/mcp/registryAdd.test.ts`, `app/src/services/api/mcpClientsApi.test.ts`, `crates/openhuman-core/src/mcp/registry/schemas_tests.rs`, `vendor/tinymcp/crates/tinymcp/src/registry/{curation,sources}/` (vendored `tinymcp`) | ✅ | Connections → MCP Servers owns its page header with three tabs in it, after the OpenCompany MCP page: the server rows (icon, name → detail, transport and status, the command or endpoint, icon controls for connect/disconnect, enable/disable, remove), the `mcp.json` editor (local shape check, core refusal shown verbatim, Save/Revert, re-reads the rows after a save) and the Registry (one-click add for hosted servers that need no setup, declared into mcp.json then connected or signed in; any other row opens the server's own page); curated catalog with official-vendor badge + official-first order; namespace-stripped relevance search + server-side Stdio/Hosted transport filter |
| 11.1.17 | MCP server tools as `mcp_<server>_<tool>` agent tools + persistent tool cache | RU/RI | `vendor/tinymcp/crates/tinymcp/src/tools/` (vendored `tinymcp`, `tools` feature), `crates/openhuman-core/src/mcp/registry/action_tool_tests.rs`, `crates/openhuman-core/src/tools/impl/network/mcp_server_tools_tests.rs`, `crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs::connected_mcp_actions_enter_search_and_leave_on_disconnect`, `crates/openhuman-embed/src/agent/build_tests.rs`, `tests/agent_harness_e2e.rs` (`orchestrator_calls_a_connected_mcp_tool_directly`) | ✅ | Each remote tool is its own agent tool, deferred behind `tool_search` by default or direct via `expose`/`direct_tools`; installed and configured servers' tool lists persist in tinymcp's `mcp_tool_cache` (fingerprinted by definition, dropped on disable/uninstall/credential change) so tools are offered before reconnect while calls still require a live connection; recorded pre-readable hashed names are restored as aliases on resume; configured-server output is scrubbed of credentials |
| 11.1.13 | MCP HTTP-remote auth (token / Bearer / OAuth) + redirect resolution | RU/VU | `vendor/tinymcp/crates/tinymcp/src/registry/connections/` (`build_http_auth*`, `resolve_final_url`), `vendor/tinymcp/crates/tinymcp/src/registry/oauth/` (PKCE/token/bundle/callback port) (vendored `tinymcp`), `app/src/components/channels/mcp/ConnectAuthModal.test.tsx` (#3495) | ✅ | Bearer/raw scheme + custom headers; redirect-final-URL resolved before auth; OAuth dynamic client registration + PKCE + refresh; tokens MERGED into stored env; credentials stored encrypted locally, never sent to backend |
-| 11.1.15 | Agent uses connected MCP servers in chat | RU | `crates/openhuman-core/src/agent/registry/agents/loader.rs` (`orchestrator_does_not_delegate_mcp_calls`, `orchestrator_reaches_mcp_directly_and_skills_through_hand_offs`, `planner_has_readonly_mcp_discovery_not_execute`), `crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.rs` (`connected_mcp_block_*`), `crates/openhuman-core/src/agent/session_host/turn_tests.rs` (`mcp_announcement_fires_once_for_new_server`), `tests/agent_harness_e2e.rs` (`orchestrator_calls_a_connected_mcp_tool_directly`: `tool_search` → deferred MCP action via `tool_call`), `crates/openhuman-core/src/mcp/registry/action_tool_tests.rs`, `crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs` (`connected_mcp_actions_enter_search_and_leave_on_disconnect`), `crates/openhuman-core/src/mcp/registry/tools_tests.rs`, `vendor/tinymcp/crates/tinymcp/src/registry/connections/` (vendored `tinymcp`) (#3495) | ✅ | connected MCP actions enter the JEV-backed `tool_search` catalogue as deferred tools and call directly; generic `mcp_registry_list_tools` / `mcp_registry_tool_call` remain a fallback; orchestrator `## Connected MCP Servers` prompt block + mid-session connect announcement on the user turn; planner read-only MCP discovery (no `tool_call`) |
+| 11.1.15 | Agent uses connected MCP servers in chat | RU | `crates/openhuman-core/src/agent_registry/agents/loader.rs` (`orchestrator_does_not_delegate_mcp_calls`, `orchestrator_reaches_mcp_directly_and_skills_through_hand_offs`, `planner_has_readonly_mcp_discovery_not_execute`), `crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs` (`connected_mcp_block_*`), `crates/openhuman-core/src/agent/session_host/turn_tests.rs` (`mcp_announcement_fires_once_for_new_server`), `tests/agent_harness_e2e.rs` (`orchestrator_calls_a_connected_mcp_tool_directly`: `tool_search` → deferred MCP action via `tool_call`), `crates/openhuman-core/src/mcp/registry/action_tool_tests.rs`, `crates/openhuman-core/src/agent/session_host/runtime_session_tests.rs` (`connected_mcp_actions_enter_search_and_leave_on_disconnect`), `crates/openhuman-core/src/mcp/registry/tools_tests.rs`, `vendor/tinymcp/crates/tinymcp/src/registry/connections/` (vendored `tinymcp`) (#3495) | ✅ | connected MCP actions enter the JEV-backed `tool_search` catalogue as deferred tools and call directly; generic `mcp_registry_list_tools` / `mcp_registry_tool_call` remain a fallback; orchestrator `## Connected MCP Servers` prompt block + mid-session connect announcement on the user turn; planner read-only MCP discovery (no `tool_call`) |
| 11.1.16 | MCP supervisor observability (Event Log + notifications) | RU | `crates/openhuman-core/src/mcp/registry/supervisor_events_tests.rs`, `crates/openhuman-core/src/core/events_tests.rs` (`mcp_supervisor_events_*`, `mcp_lifecycle_events_*`), `crates/openhuman-core/src/desktop/notifications/bus_tests_2_tests.rs` (`mcp_*`, `*_workspace*`, `an_outage_is_filed_under_its_own_workspace_not_the_bridge_s`, `*_announced`), `app/src/components/settings/panels/__tests__/EventLogPanel.test.tsx` (detail line + filter), `vendor/tinymcp/crates/tinymcp/src/registry/supervisor/test.rs` ("The report" section) (#5931) | ✅ | `tinymcp::Supervisor::tick` returns a `TickReport`; the host maps it to `McpServer{ProbeTimedOut,TransportDropped,Reconnected,ReconnectFailed,Parked}` domain events (Event Log, `mcp_client` domain, server name in the agent column, failure reason via `DomainEvent::log_detail`) and the notification bridge notifies only on the first failed reconnect of an episode, on recovery after failures, and on a parked server — filing each under the workspace the event names and announcing it only when that workspace is live, since one process supervises every workspace it has opened and the bridge's own binding may be the stale half after a switch |
<!-- 11.1.9 Vault Markdown Writes — removed: Knowledge Vaults dropped (vault domain + VaultPanel deleted). -->
diff --git a/docs/gitbooks/en/developing/architecture/agent-harness.md b/docs/gitbooks/en/developing/architecture/agent-harness.md
index 09256dcf1b..528b865be4 100644
--- a/docs/gitbooks/en/developing/architecture/agent-harness.md
+++ b/docs/gitbooks/en/developing/architecture/agent-harness.md
@@ -478,7 +478,7 @@ Why the rules.
Enforcement. Two layers:
-1. Loader-time (static). [`agents::loader::validate_tier_hierarchy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent/registry/agents/loader.rs) runs over the merged registry (built-ins + workspace TOMLs) and refuses to boot a registry that lists a same-tier or worker-with-subagents entry. Built-in archetypes are checked at compile-test time; user-shipped TOMLs are checked at workspace load.
+1. Loader-time (static). [`agents::loader::validate_tier_hierarchy`](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-core/src/agent_registry/agents/loader.rs) runs over the merged registry (built-ins + workspace TOMLs) and refuses to boot a registry that lists a same-tier or worker-with-subagents entry. Built-in archetypes are checked at compile-test time; user-shipped TOMLs are checked at workspace load.
2. Runtime depth gate (dynamic). Independent of tier, the sub-agent runner caps total spawn chain depth at `MAX_SPAWN_DEPTH = 3` via a task-local counter incremented across `run_subagent`, surfaced as a `SpawnDepthExceeded` agent error. This makes a user-shipped TOML that drops the tier annotation still unable to recurse past three hops.
> Status: the loader-time tier check, `agent_tier` field, and runtime depth-counter task-local are live. Depth is bounded by both the static loader contract and the runtime `MAX_SPAWN_DEPTH = 3` guard.
@@ -615,7 +615,7 @@ None of these change the loop's shape, they just make the common failure modes r
## Where to look in the code
-The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinyagents adapter seam in `crates/openhuman-core/src/agent/tinyagents/` and archetype definitions in `crates/openhuman-core/src/agent/registry/`. The README in `crates/openhuman-core/src/agent/` enumerates the public surface; the most load-bearing files (paths relative to `crates/openhuman-core/src/agent/` unless prefixed) are:
+The harness shell lives under `crates/openhuman-core/src/agent/`, with the tinyagents adapter seam in `crates/openhuman-core/src/agent/tinyagents/` and archetype definitions in `crates/openhuman-core/src/agent_registry/`. The README in `crates/openhuman-core/src/agent/` enumerates the public surface; the most load-bearing files (paths relative to `crates/openhuman-core/src/agent/` unless prefixed) are:
| File / dir | What lives there |
| ---------------------------------------- | ------------------------------------------------------------------------------------------------------------- |
diff --git a/docs/plans/extract-remaining-harness-session-and-subagent-runner.md b/docs/plans/extract-remaining-harness-session-and-subagent-runner.md
index fb8b648d6e..7c48399834 100644
--- a/docs/plans/extract-remaining-harness-session-and-subagent-runner.md
+++ b/docs/plans/extract-remaining-harness-session-and-subagent-runner.md
@@ -325,7 +325,7 @@ where no neutral session adapter exists. Its durable identity is the complete
that original key instead of deriving one from a fresh turn. Migrate
`agent/orchestration/{ops.rs,delegation.rs,running_subagents/**,
spawn_parallel_graph/**,subagent_sessions/**,tools/**}`, `agent/triage/**`,
-`agent/registry/**`, `tools/orchestrator_tools.rs` and integration/raw tests.
+`agent_registry/**`, `tools/orchestrator_tools.rs` and integration/raw tests.
`agent/task_dispatcher/**` is obsolete after upstream removed tasks: remove its
poller, executor, public module, callers and tests rather than carrying it into
the new host layer.
diff --git a/docs/plans/migrate-agent-runtime-to-tinyagents.md b/docs/plans/migrate-agent-runtime-to-tinyagents.md
index c13bc718f5..d9769865fc 100644
--- a/docs/plans/migrate-agent-runtime-to-tinyagents.md
+++ b/docs/plans/migrate-agent-runtime-to-tinyagents.md
@@ -278,7 +278,7 @@ OpenHuman dependencies.
- `vendor/tinyagents/crates/tinyagents-registry/src/definition/` and tests.
- `crates/openhuman-core/src/agent/harness/{definition*,builtin_definitions*,
agent_graph.rs}`.
-- OpenHuman `agent/registry/` and host `definition_registry.rs`.
+- OpenHuman `agent_registry/` and host `definition_registry.rs`.
**RED**
diff --git a/docs/prompt-evals.md b/docs/prompt-evals.md
index ac57b87368..390bb38aca 100644
--- a/docs/prompt-evals.md
+++ b/docs/prompt-evals.md
@@ -34,7 +34,7 @@ those agents: Composio actions are reached by the orchestrator through
`tool_search`, and reminders through the `scheduling` skill (`use_skill`,
then `cron`).
Fleet-wide static coverage of all agents lives in the prompt tests under
-`crates/openhuman-core/src/agent/registry/agents/`, not here.
+`crates/openhuman-core/src/agent_registry/agents/`, not here.
```sh
cargo test -p openhuman-cli --test in_process_all agent_prompt_comprehension_e2e
diff --git a/docs/specs/agent-runtime-upstream-boundary.md b/docs/specs/agent-runtime-upstream-boundary.md
index e4d3f48a03..6e44e330c6 100644
--- a/docs/specs/agent-runtime-upstream-boundary.md
+++ b/docs/specs/agent-runtime-upstream-boundary.md
@@ -3,7 +3,7 @@
> **Status, verified 2026-10-07.** The migration this spec governs is mostly
> executed. Its audit matrix is the original work-list, so several rows name
> paths that have since been deleted and several "Delete" rows are already
-> done; one Package A target, `crates/openhuman-core/src/agent/registry/tools.rs`,
+> done; one Package A target, `crates/openhuman-core/src/agent_registry/tools.rs`,
> is still present. Read
> [`../plans/README.md`](../plans/README.md) for the per-plan status and the
> commands that re-check it, and treat the matrix below as the record of intent
diff --git a/scripts/ci/self-hosted/lanes-plan.mjs b/scripts/ci/self-hosted/lanes-plan.mjs
index 8d9d4b5e98..baf2bf6303 100644
--- a/scripts/ci/self-hosted/lanes-plan.mjs
+++ b/scripts/ci/self-hosted/lanes-plan.mjs
@@ -463,7 +463,7 @@ export function buildPlan({ profile, areas, env = {}, isPullRequest = true }) {
run:
"cargo test --manifest-path Cargo.toml -p openhuman --no-default-features --lib --" +
" core::all:: core::cli:: core::invoke:: core::session_expiry:: core::legacy_aliases:: core::runtime::" +
- " agent::registry::agents::loader:: commands::ops::tests:: memory::people::contacts_gate_tests::" +
+ " agent_registry::agents::loader:: commands::ops::tests:: memory::people::contacts_gate_tests::" +
" memory::layout_migration::" +
" openhuman::config:: openhuman::platform::socket::event_handlers:: tools::schemas:: tools::ops::tests::",
},
diff --git a/tests/agent_harness_e2e.rs b/tests/agent_harness_e2e.rs
index 19cd45576b..1898afe72e 100644
--- a/tests/agent_harness_e2e.rs
+++ b/tests/agent_harness_e2e.rs
@@ -37,7 +37,7 @@ use futures_util::StreamExt;
use serde_json::{json, Value};
use tempfile::tempdir;
-use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;
+use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;
use openhuman_core::core::auth::{init_rpc_token, CORE_TOKEN_ENV_VAR};
use openhuman_rpc::server::build_core_http_router;
@@ -944,7 +944,7 @@ async fn multi_turn_state_persistence_inner() {
// ─── Task 3: Subagent delegation happy path ───────────────────────────────────
//
// Tool surface (crates/openhuman-core/src/tools/orchestrator_tools.rs,
-// crates/openhuman-core/src/agent/registry/agents/vision_agent/agent.toml):
+// crates/openhuman-core/src/agent_registry/agents/vision_agent/agent.toml):
// - vision_agent has `delegate_name = "analyze_image"`, so the
// orchestrator LLM sees a tool named "analyze_image" synthesised by collect_orchestrator_tools.
// - The tool takes { "prompt": string, ... } per ArchetypeDelegationTool schema.
@@ -1991,7 +1991,7 @@ async fn provider_error_retry_inner() {
// multi_hop_delegation_chain:
// Depth-1 subagents (vision_agent, task_manager_agent, etc.) do NOT have
// spawn tools in their named lists. Verified: vision_agent's agent.toml
-// (agent/registry/agents/vision_agent/agent.toml) names only `file_read` and
+// (agent_registry/agents/vision_agent/agent.toml) names only `file_read` and
// `image_info`. It contains no
// spawn_subagent, spawn_worker_thread, or spawn_parallel_agents. The only
// agents with spawn tools are orchestrator and trigger_reactor (loader.rs:383,
@@ -2195,7 +2195,7 @@ async fn multi_hop_delegation_chain_inner() {
std::fs::copy(&fixture_path, &image_path).expect("copy vision fixture");
reset_script(vec![
// request[0]: Orchestrator delegates to vision_agent via
- // `analyze_image` (its delegate_name, agent/registry/agents/vision_agent/agent.toml:3).
+ // `analyze_image` (its delegate_name, agent_registry/agents/vision_agent/agent.toml:3).
tool_call_completion(
"analyze_image",
json!({
@@ -2320,7 +2320,7 @@ async fn multi_hop_delegation_chain_inner() {
mod streaming_support {
use async_trait::async_trait;
- use openhuman_core::agent::harness::host_definition::{
+ use openhuman_core::agent_registry::host_definition::{
AgentDefinition, AgentDefinitionRegistry,
};
use openhuman_core::agent::OpenHumanSessionHost;
diff --git a/tests/composio_list_tools_stack_overflow_regression.rs b/tests/composio_list_tools_stack_overflow_regression.rs
index 6498f9bed0..2ff90cfed9 100644
--- a/tests/composio_list_tools_stack_overflow_regression.rs
+++ b/tests/composio_list_tools_stack_overflow_regression.rs
@@ -108,7 +108,7 @@
#![cfg(not(coverage))]
use async_trait::async_trait;
-use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;
+use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;
use openhuman_core::agent::harness::ParentExecutionContext;
use openhuman_core::agent::subagent_host::{run_subagent, SubagentRunOptions};
use openhuman_core::config::AgentConfig;
diff --git a/tests/in_process/agent_prompt_comprehension_e2e.rs b/tests/in_process/agent_prompt_comprehension_e2e.rs
index 0c08af5624..ccaf916b17 100644
--- a/tests/in_process/agent_prompt_comprehension_e2e.rs
+++ b/tests/in_process/agent_prompt_comprehension_e2e.rs
@@ -34,7 +34,7 @@ use futures_util::StreamExt;
use serde_json::{json, Value};
use tempfile::tempdir;
-use openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry;
+use openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry;
use openhuman_rpc::server::build_core_http_router;
// ─── Env serialization ──────────────────────────────────────────────────────
diff --git a/tests/in_process/agent_turn_overrides_e2e.rs b/tests/in_process/agent_turn_overrides_e2e.rs
index 9336fb0aa5..e590c34d18 100644
--- a/tests/in_process/agent_turn_overrides_e2e.rs
+++ b/tests/in_process/agent_turn_overrides_e2e.rs
@@ -34,7 +34,7 @@ use std::sync::{Arc, Mutex};
use tempfile::TempDir;
use openhuman_core::agent::goals::{runtime as goal_runtime, store as goal_store};
-use openhuman_core::agent::harness::host_definition::{AgentDefinition, AgentDefinitionRegistry};
+use openhuman_core::agent_registry::host_definition::{AgentDefinition, AgentDefinitionRegistry};
use openhuman_core::agent::session_host::TurnOverrides;
use openhuman_core::agent::OpenHumanSessionHost;
use openhuman_core::config::{AgentConfig, ContextConfig};
diff --git a/tests/in_process/calendar_grounding_e2e.rs b/tests/in_process/calendar_grounding_e2e.rs
index a99e641b77..a8dae0c276 100644
--- a/tests/in_process/calendar_grounding_e2e.rs
+++ b/tests/in_process/calendar_grounding_e2e.rs
@@ -114,7 +114,7 @@ async fn test_orchestrator_has_current_date_context() -> Result<()> {
let model = calendar_model(captured_messages.clone());
let workspace = tempfile::tempdir()?;
let _ =
- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let mut agent = OpenHumanSessionHost::builder()
.chat_model(model)
@@ -164,7 +164,7 @@ async fn test_subagent_has_current_date_context() -> Result<()> {
let model = calendar_model(captured_messages.clone());
let _ =
- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let parent = openhuman_core::agent::harness::ParentExecutionContext {
agent_definition_id: "orchestrator".into(),
@@ -197,7 +197,7 @@ async fn test_subagent_has_current_date_context() -> Result<()> {
};
let mut def =
- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::global()
+ openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::global()
.unwrap()
.get("critic")
.unwrap()
diff --git a/tests/in_process/orchestrator_parallel_fanout_routing.rs b/tests/in_process/orchestrator_parallel_fanout_routing.rs
index 0d84977ca6..75e1e23c06 100644
--- a/tests/in_process/orchestrator_parallel_fanout_routing.rs
+++ b/tests/in_process/orchestrator_parallel_fanout_routing.rs
@@ -22,7 +22,7 @@
//! asserting against a prompt that no longer mentions it.
const ORCHESTRATOR_PROMPT: &str =
- include_str!("../../crates/openhuman-core/src/agent/registry/agents/orchestrator/prompt.md");
+ include_str!("../../crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.md");
#[test]
fn prompt_routes_fanout_to_concurrent_async_spawns() {
diff --git a/tests/in_process/orchestrator_presentation_wiring.rs b/tests/in_process/orchestrator_presentation_wiring.rs
index 171b76d337..9fb6cee710 100644
--- a/tests/in_process/orchestrator_presentation_wiring.rs
+++ b/tests/in_process/orchestrator_presentation_wiring.rs
@@ -14,10 +14,10 @@
//! cannot satisfy the assertion accidentally.
const ORCHESTRATOR_TOML: &str =
- include_str!("../../crates/openhuman-core/src/agent/registry/agents/orchestrator/agent.toml");
+ include_str!("../../crates/openhuman-core/src/agent_registry/agents/orchestrator/agent.toml");
const PRESENTATION_AGENT_TOML: &str = include_str!(
- "../../crates/openhuman-core/src/agent/registry/agents/presentation_agent/agent.toml"
+ "../../crates/openhuman-core/src/agent_registry/agents/presentation_agent/agent.toml"
);
const TOOLPACK_REGISTRY: &str =
diff --git a/tests/in_process/worker_b_domain_e2e.rs b/tests/in_process/worker_b_domain_e2e.rs
index 6c28cee0f1..59f189a270 100644
--- a/tests/in_process/worker_b_domain_e2e.rs
+++ b/tests/in_process/worker_b_domain_e2e.rs
@@ -40,7 +40,7 @@ async fn setup() -> TestHarness {
EnvVarGuard::set("OPENHUMAN_MEMORY_EMBED_MODEL", ""),
];
- let _ = openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let (addr, join) = serve_rpc().await;
TestHarness {
diff --git a/tests/json_rpc_e2e.rs b/tests/json_rpc_e2e.rs
index 44e546b3ef..8476479df3 100644
--- a/tests/json_rpc_e2e.rs
+++ b/tests/json_rpc_e2e.rs
@@ -63,7 +63,7 @@ where
// execute the full core boot sequence. Hosted turns still need
// the same built-in definition registry that boot initializes in
// production, so install it before constructing the router.
- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins()
+ openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins()
.expect("initialize built-in agent definitions for JSON-RPC E2E");
let rt = tokio::runtime::Builder::new_multi_thread()
.worker_threads(2)
diff --git a/tests/memory_v2_e2e.rs b/tests/memory_v2_e2e.rs
index c59c796aa4..c30fa03734 100644
--- a/tests/memory_v2_e2e.rs
+++ b/tests/memory_v2_e2e.rs
@@ -1716,7 +1716,7 @@ async fn wait_for_request(f: &Fixture, what: &str, found: impl Fn(&str, &str) ->
async fn a_later_chat_turn_carries_cached_memory_and_is_logged() {
// Chat sessions resolve their hosted authority from the agent definition
// registry, which the full runtime initialises at startup.
- openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins(
+ openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins(
)
.expect("builtin agent definitions");
let f = Fixture::new(true).await;
diff --git a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
index d031b814cc..339d0b10b5 100644
--- a/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
+++ b/tests/raw_coverage/worker_b_raw_coverage_e2e.rs
@@ -274,7 +274,7 @@ async fn setup() -> TestHarness {
EnvVarGuard::set("OPENHUMAN_MEMORY_EMBED_MODEL", ""),
];
- let _ = openhuman_core::agent::harness::host_definition::AgentDefinitionRegistry::init_global_builtins();
+ let _ = openhuman_core::agent_registry::host_definition::AgentDefinitionRegistry::init_global_builtins();
let (addr, rpc_join) = serve_rpc().await;
TestHarness {