Skip to content

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

refactor(agent): flatten prompt module re-exports

Steven Enamakel48ed7c859c20
diff --git a/crates/openhuman-core/src/agent/prompts/README.md b/crates/openhuman-core/src/agent/prompts/README.md
index 17ff2e6d21..ab798dcd67 100644
--- a/crates/openhuman-core/src/agent/prompts/README.md
+++ b/crates/openhuman-core/src/agent/prompts/README.md
@@ -27,9 +27,9 @@ domains use to compose their own prompts.
`DateTimeSection`, `RuntimeSection`, `AgentsInstructionsSection`,
`PersonalityRosterSection`, `ArchetypePromptSection`,
`DynamicPromptSection`, `GroundingSection`).
-- Named re-exports from `render_helpers` ([`render_helpers.rs`](./render_helpers.rs) plus the
- `render_helpers/` submodules `section_renderers.rs`, `subagent.rs`,
- `workspace_files.rs`): free `render_*` functions (thin wrappers over the
+- Named exports from the `render_helpers/` implementation files
+ `section_renderers.rs`, `subagent.rs`, and `workspace_files.rs`: free
+ `render_*` functions (thin wrappers over the
section structs), the workspace-file helpers
(`inject_workspace_file[_capped]`, `inject_inline_content`,
`sync_workspace_file`, `default_workspace_file_content`),
diff --git a/crates/openhuman-core/src/agent/prompts/sections.rs b/crates/openhuman-core/src/agent/prompts/sections.rs
index 3367d90b71..f6fff1407f 100644
--- a/crates/openhuman-core/src/agent/prompts/sections.rs
+++ b/crates/openhuman-core/src/agent/prompts/sections.rs
@@ -2,7 +2,7 @@
//!
//! Each unit struct renders one logical block of the system prompt.
//! The rendering logic delegates to the free helpers in
-//! [`super::render_helpers`] for workspace-file injection and
+//! workspace-file helpers re-exported by [`super`] for workspace-file injection and
//! sub-agent plumbing.
use super::types::*;
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader.rs b/crates/openhuman-core/src/agent/registry/agents/loader.rs
index 13c66b484e..90ec3c02d6 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader.rs
@@ -54,7 +54,7 @@ pub const BUILTINS: &[BuiltinAgent] = &[
BuiltinAgent {
id: "orchestrator",
toml: include_str!("orchestrator/agent.toml"),
- prompt_fn: super::orchestrator::prompt::build,
+ prompt_fn: super::orchestrator::build,
},
// `planner` and `critic` are not delegable from chat (the orchestrator does
// not list them): they exist for the `parallel_research_cross_check`
@@ -65,57 +65,57 @@ pub const BUILTINS: &[BuiltinAgent] = &[
BuiltinAgent {
id: "planner",
toml: include_str!("planner/agent.toml"),
- prompt_fn: super::planner::prompt::build,
+ prompt_fn: super::planner::build,
},
BuiltinAgent {
id: "critic",
toml: include_str!("critic/agent.toml"),
- prompt_fn: super::critic::prompt::build,
+ prompt_fn: super::critic::build,
},
BuiltinAgent {
id: "task_manager_agent",
toml: include_str!("task_manager_agent/agent.toml"),
- prompt_fn: super::task_manager_agent::prompt::build,
+ prompt_fn: super::task_manager_agent::build,
},
BuiltinAgent {
id: "presentation_agent",
toml: include_str!("presentation_agent/agent.toml"),
- prompt_fn: super::presentation_agent::prompt::build,
+ prompt_fn: super::presentation_agent::build,
},
BuiltinAgent {
id: "vision_agent",
toml: include_str!("vision_agent/agent.toml"),
- prompt_fn: super::vision_agent::prompt::build,
+ prompt_fn: super::vision_agent::build,
},
BuiltinAgent {
id: "image_agent",
toml: include_str!("image_agent/agent.toml"),
- prompt_fn: super::image_agent::prompt::build,
+ prompt_fn: super::image_agent::build,
},
BuiltinAgent {
id: "video_agent",
toml: include_str!("video_agent/agent.toml"),
- prompt_fn: super::video_agent::prompt::build,
+ prompt_fn: super::video_agent::build,
},
BuiltinAgent {
id: "trigger_triage",
toml: include_str!("trigger_triage/agent.toml"),
- prompt_fn: super::trigger_triage::prompt::build,
+ prompt_fn: super::trigger_triage::build,
},
BuiltinAgent {
id: "trigger_reactor",
toml: include_str!("trigger_reactor/agent.toml"),
- prompt_fn: super::trigger_reactor::prompt::build,
+ prompt_fn: super::trigger_reactor::build,
},
BuiltinAgent {
id: "morning_briefing",
toml: include_str!("morning_briefing/agent.toml"),
- prompt_fn: super::morning_briefing::prompt::build,
+ prompt_fn: super::morning_briefing::build,
},
BuiltinAgent {
id: "summarizer",
toml: include_str!("summarizer/agent.toml"),
- prompt_fn: super::summarizer::prompt::build,
+ prompt_fn: super::summarizer::build,
},
// Skill agents — `#[cfg]` rather than stub: `include_str!` embeds the
// agent TOML from disk regardless of module gating, so the entry itself
diff --git a/crates/openhuman-core/src/mcp/server/resources.rs b/crates/openhuman-core/src/mcp/server/resources.rs
index 2fb0b37f2d..54ad33a516 100644
--- a/crates/openhuman-core/src/mcp/server/resources.rs
+++ b/crates/openhuman-core/src/mcp/server/resources.rs
@@ -111,7 +111,7 @@ const RESOURCE_CATALOG: &[PromptResource] = &[
uri: "openhuman://prompts/agents/summarizer",
name: "summarizer",
description: "The extraction contract oversized tool results are summarized against.",
- content: crate::agent::registry::agents::summarizer::prompt::ARCHETYPE,
+ content: crate::agent::registry::agents::summarizer::ARCHETYPE,
},
PromptResource {
uri: "openhuman://prompts/agents/presentation_agent",