Skip to content

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

chore: files changed crates/openhuman-core/src/agent/prompts/mod_tests.rs,crates/openhuman-core/src/

Steven Enamakel2069232c7f2c
diff --git a/crates/openhuman-core/src/agent/prompts/mod_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests.rs
index 8f36616c2f..e05ed30ba0 100644
--- a/crates/openhuman-core/src/agent/prompts/mod_tests.rs
+++ b/crates/openhuman-core/src/agent/prompts/mod_tests.rs
@@ -50,6 +50,7 @@ fn ctx_with_identity(identity: Option<UserIdentity>) -> PromptContext<'static> {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
}
}
@@ -75,6 +76,7 @@ fn agents_md_ctx(global: Option<String>, local: Option<String>) -> PromptContext
personality_roster: vec![],
agents_md_global: global,
agents_md_local: local,
+ flow_archetype_text: None,
}
}
diff --git a/crates/openhuman-core/src/agent/prompts/mod_tests_builder_sections_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests_builder_sections_tests.rs
index e43f43991f..a3f62565f3 100644
--- a/crates/openhuman-core/src/agent/prompts/mod_tests_builder_sections_tests.rs
+++ b/crates/openhuman-core/src/agent/prompts/mod_tests_builder_sections_tests.rs
@@ -20,6 +20,7 @@ fn prompt_builder_assembles_sections() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = SystemPromptBuilder::with_defaults().build(&ctx).unwrap();
assert!(rendered.contains("## Tools"));
@@ -46,6 +47,7 @@ fn grounding_contract_appended_to_every_build_path() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
// A distinctive clause from GROUNDING_BODY — present regardless of which
@@ -134,6 +136,7 @@ fn identity_section_creates_missing_workspace_files() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let section = IdentitySection;
@@ -211,6 +214,7 @@ fn datetime_section_is_static_grounding_rule_without_volatile_timestamp() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = DateTimeSection.build(&ctx).unwrap();
@@ -295,6 +299,7 @@ fn datetime_section_appends_resolve_time_rule_only_when_tool_present() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered_with = DateTimeSection.build(&ctx_with).unwrap();
assert!(
@@ -448,6 +453,7 @@ fn tools_section_pformat_renders_signature_not_schema() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
@@ -502,6 +508,7 @@ fn tools_section_renders_invalid_schema_tool_without_arguments() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
@@ -567,6 +574,7 @@ fn tools_section_code_formats_render_function_signatures() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
assert!(
@@ -613,6 +621,7 @@ fn tools_section_uses_pformat_signature_for_text_dispatchers() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
assert!(
@@ -655,6 +664,7 @@ fn tools_section_json_with_an_embedded_catalogue_lists_tools_once() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
assert_eq!(
@@ -683,6 +693,7 @@ fn verbatim_builder_renders_the_body_and_nothing_else() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = SystemPromptBuilder::verbatim("Review the diff.".to_string())
.build(&ctx)
diff --git a/crates/openhuman-core/src/agent/prompts/mod_tests_tools_sections_tests.rs b/crates/openhuman-core/src/agent/prompts/mod_tests_tools_sections_tests.rs
index b177d592e8..260806fdea 100644
--- a/crates/openhuman-core/src/agent/prompts/mod_tests_tools_sections_tests.rs
+++ b/crates/openhuman-core/src/agent/prompts/mod_tests_tools_sections_tests.rs
@@ -138,6 +138,7 @@ fn deferred_browser_prompt_has_only_discovery_hint_in_native_and_text_modes() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let rendered = ToolsSection.build(&ctx).unwrap();
assert!(rendered.contains("For website tasks, use tool_search to find browser tools."));
@@ -168,6 +169,7 @@ fn tools_section_empty_for_native() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let out = ToolsSection.build(&ctx).unwrap();
assert!(
@@ -197,6 +199,7 @@ fn tools_section_nonempty_for_pformat() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let out = ToolsSection.build(&ctx).unwrap();
assert!(
@@ -228,6 +231,7 @@ fn tools_section_native_with_dispatcher_instructions_returns_instructions() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let out = ToolsSection.build(&ctx).unwrap();
assert!(
diff --git a/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs b/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs
index d2a68cd677..072b12c976 100644
--- a/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs
+++ b/crates/openhuman-core/src/agent/prompts/render_helpers/section_renderers.rs
@@ -205,5 +205,6 @@ fn empty_prompt_context_for_static_sections() -> PromptContext<'static> {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
}
}
diff --git a/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs b/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs
index dd4a731b69..9bc6822505 100644
--- a/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs
+++ b/crates/openhuman-core/src/agent/prompts/render_helpers/subagent.rs
@@ -103,6 +103,7 @@ pub fn render_subagent_system_prompt_with_format(
_connected_integrations: &[ConnectedIntegration],
agents_md_global: Option<&str>,
agents_md_local: Option<&str>,
+ flow_archetype_text: None,
) -> String {
let mut out = String::new();
diff --git a/crates/openhuman-core/src/agent/prompts/types.rs b/crates/openhuman-core/src/agent/prompts/types.rs
index e9cd52d9c4..7adc7ad16b 100644
--- a/crates/openhuman-core/src/agent/prompts/types.rs
+++ b/crates/openhuman-core/src/agent/prompts/types.rs
@@ -330,6 +330,7 @@ pub struct PromptContext<'a> {
/// absent/empty, deduplicated against the global layer (same dir), or the
/// gate is off. Rendered after the global layer.
pub agents_md_local: Option<String>,
+ flow_archetype_text: None,
}
// ─────────────────────────────────────────────────────────────────────────────
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..7aa3c3a0ba 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
@@ -71,6 +71,7 @@ fn render(def: &AgentDefinition, definitions: &[AgentDefinition]) -> String {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body = build(&ctx).unwrap_or_else(|e| panic!("`{}` prompt failed to build: {e}", def.id));
assert!(
diff --git a/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt_tests.rs
index c3578ddf91..f362f56c8e 100644
--- a/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt_tests.rs
@@ -20,6 +20,7 @@ fn build_returns_nonempty_body() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body = build(&ctx).unwrap();
assert!(body.contains("Image-generation specialist"));
diff --git a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs
index 99955e988e..d82ab3dfc7 100644
--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs
@@ -179,6 +179,7 @@ fn every_builtin_has_a_prompt_body() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body =
build(&ctx).unwrap_or_else(|e| panic!("{} prompt build failed: {e}", def.id));
diff --git a/crates/openhuman-core/src/agent/registry/agents/morning_briefing/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/morning_briefing/prompt_tests.rs
index e73aa8c786..6728f66e48 100644
--- a/crates/openhuman-core/src/agent/registry/agents/morning_briefing/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/morning_briefing/prompt_tests.rs
@@ -24,6 +24,7 @@ fn ctx_with_identity(identity: Option<UserIdentity>) -> PromptContext<'static> {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
}
}
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 aef1458827..4e6c737dc9 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
@@ -42,6 +42,7 @@ fn ctx_with<'a>(integrations: &'a [ConnectedIntegration]) -> PromptContext<'a> {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
}
}
diff --git a/crates/openhuman-core/src/agent/registry/agents/presentation_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/presentation_agent/prompt_tests.rs
index 3c79b481c8..b999bdfaa2 100644
--- a/crates/openhuman-core/src/agent/registry/agents/presentation_agent/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/presentation_agent/prompt_tests.rs
@@ -20,6 +20,7 @@ fn build_returns_grounding_contract() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body = build(&ctx).unwrap();
assert!(body.contains("Presentation Agent"));
diff --git a/crates/openhuman-core/src/agent/registry/agents/task_manager_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/task_manager_agent/prompt_tests.rs
index a405b0e22e..ad7f2781b9 100644
--- a/crates/openhuman-core/src/agent/registry/agents/task_manager_agent/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/task_manager_agent/prompt_tests.rs
@@ -20,6 +20,7 @@ fn build_returns_task_manager_contract() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body = build(&ctx).unwrap();
assert!(body.contains("Task Manager Agent"));
diff --git a/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt_tests.rs
index 8ea35fc18d..45772a21d8 100644
--- a/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt_tests.rs
@@ -20,6 +20,7 @@ fn build_returns_nonempty_body() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let body = build(&ctx).unwrap();
assert!(body.contains("Video-generation specialist"));
diff --git a/crates/openhuman-core/src/agent/registry/agents/workflow_builder/prompt_tests.rs b/crates/openhuman-core/src/agent/registry/agents/workflow_builder/prompt_tests.rs
index 7ba4dcac26..51b37a71c4 100644
--- a/crates/openhuman-core/src/agent/registry/agents/workflow_builder/prompt_tests.rs
+++ b/crates/openhuman-core/src/agent/registry/agents/workflow_builder/prompt_tests.rs
@@ -21,6 +21,7 @@ fn builder_prompt_composes_supplied_archetype_tools_and_workspace() {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
let prompt = super::prompt::build(&context).expect("render builder prompt");
diff --git a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs
index 98c3143b82..1b15512ef8 100644
--- a/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/host/context_composer.rs
@@ -228,6 +228,7 @@ impl ContextComposer for OpenHumanContextComposer {
personality_roster: Vec::new(),
agents_md_global: agents_md.global,
agents_md_local: agents_md.local,
+ flow_archetype_text: None,
};
self.builder.build(&ctx).map_err(|e| {
diff --git a/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs b/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
index db2ee9f804..8fb1d1359a 100644
--- a/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
+++ b/crates/openhuman-core/src/agent/triage/evaluator/prompt.rs
@@ -37,6 +37,7 @@ pub(crate) fn extract_inline_prompt(def: &AgentDefinition) -> Option<String> {
personality_roster: vec![],
agents_md_global: None,
agents_md_local: None,
+ flow_archetype_text: None,
};
match build(&ctx) {
Ok(body) if !body.is_empty() => Some(body),