The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
refactor(core): clean up imports and module structure
Steven Enamakelaa9665fedc5b
diff --git a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rsindex 1770cdd3c1..07dec4e70e 100644--- a/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs+++ b/crates/openhuman-core/src/agent/subagent_host/lifecycle.rs@@ -737,8 +737,6 @@ mod persistence;#[path = "lifecycle_store.rs"]mod store;-#[path = "lifecycle_outcome.rs"]-mod outcome;pub(super) use driver_adapter::{HostRequest, OpenHumanDriverBundle};fn map_lifecycle_error(error: SubagentError) -> SubagentRunError {diff --git a/crates/openhuman-core/src/agent_registry/agents/flow_prompts.rs b/crates/openhuman-core/src/agent_registry/agents/flow_prompts.rsindex 49b159195f..a872071177 100644--- a/crates/openhuman-core/src/agent_registry/agents/flow_prompts.rs+++ b/crates/openhuman-core/src/agent_registry/agents/flow_prompts.rs@@ -2,7 +2,8 @@use anyhow::Result;-use crate::agent::prompts::{render_tools, render_workspace, PromptContext};+use crate::agent::prompts::PromptContext;+use crate::prompts::{render_tools, render_workspace};/// Combine module-owned archetype text with OpenHuman's scoped runtime sections.pub(super) fn build_with_archetype(diff --git a/crates/openhuman-core/src/flows/caps_host/agent.rs b/crates/openhuman-core/src/flows/caps_host/agent.rsindex b15313d431..d081f067c9 100644--- a/crates/openhuman-core/src/flows/caps_host/agent.rs+++ b/crates/openhuman-core/src/flows/caps_host/agent.rs@@ -17,6 +17,7 @@ use crate::config::Config;use crate::flows::agent_route::{harness_model_default_override, route_custom_entry_lookup, route_for_agent_ref, AgentRoute,};+use super::prompt::build_completion_messages;use crate::modules::tinyflows as module;#[path = "agent_fallback.rs"]diff --git a/crates/openhuman-core/src/flows/caps_host/agent_harness.rs b/crates/openhuman-core/src/flows/caps_host/agent_harness.rsindex 523dc64ee0..3b19b3abef 100644--- a/crates/openhuman-core/src/flows/caps_host/agent_harness.rs+++ b/crates/openhuman-core/src/flows/caps_host/agent_harness.rs@@ -1,4 +1,6 @@use super::*;+use std::borrow::Cow;+use super::tier::escalated_origin_for_nested_harness;impl OpenHumanAgentRunner {/// Full harness turn: build a real session agent for `agent_ref` and drivediff --git a/crates/openhuman-core/src/flows/caps_host/tools/composio.rs b/crates/openhuman-core/src/flows/caps_host/tools/composio.rsindex 4e4225cc8b..43a6d9bc2e 100644--- a/crates/openhuman-core/src/flows/caps_host/tools/composio.rs+++ b/crates/openhuman-core/src/flows/caps_host/tools/composio.rs@@ -24,9 +24,13 @@ impl FlowCallPolicy for FlowPolicy {security: &SecurityPolicy,class: tinybox_bus::CommandClass,) -> std::result::Result<GateDecision, String> {- let policy =- super::super::tier_policy_from_config(dispatch, captured, Some(live), security)- .map_err(capability_payload)?;+ let policy = super::super::tier::tier_policy_from_config(+ dispatch,+ captured,+ Some(live),+ security,+ )+ .map_err(capability_payload)?;super::super::enforce_node_tier_gate(&policy, class, "tool_call").map_err(capability_payload)}diff --git a/crates/openhuman-core/src/flows/draft_store.rs b/crates/openhuman-core/src/flows/draft_store.rsindex a0625ef0bc..865480dc61 100644--- a/crates/openhuman-core/src/flows/draft_store.rs+++ b/crates/openhuman-core/src/flows/draft_store.rs@@ -6,6 +6,7 @@ use tinyflows_bus::catalog::{self, CreateDraftRequest, DraftIdRequest, FlowDraft as WireDraft, UpdateDraftRequest,};use tinyflows_catalog::DraftOrigin;+use tinyflows_catalog::FlowDraft;use crate::config::Config;use crate::flows::{catalog_storage, store};diff --git a/crates/openhuman-core/src/flows/ops/drafts.rs b/crates/openhuman-core/src/flows/ops/drafts.rsindex c3e96c4fbf..02dd32d1cb 100644--- a/crates/openhuman-core/src/flows/ops/drafts.rs+++ b/crates/openhuman-core/src/flows/ops/drafts.rs@@ -101,9 +101,9 @@ pub(crate) async fn flows_draft_promote_with_context(require_approval: Option<bool>,) -> Result<Outcome<Flow>, String> {ctx.enter(async move {- let callbacks = super::authoring_host::register(Arc::new(config.clone()), ctx.clone())+ let callbacks = crate::flows::authoring_host::register(Arc::new(config.clone()), ctx.clone()).await?;- let storage = super::catalog_storage::register(ctx, config).await?;+ let storage = crate::flows::catalog_storage::register(ctx, config).await?;let proxy = crate::modules::tinyflows::catalog_proxy(config).await?;let response: tinyflows_bus::catalog::PromoteDraftResponse = proxy.call(diff --git a/crates/openhuman-core/src/flows/tinyflows/mod.rs b/crates/openhuman-core/src/flows/tinyflows/mod.rsindex 8f651cb080..ec6b3facb3 100644--- a/crates/openhuman-core/src/flows/tinyflows/mod.rs+++ b/crates/openhuman-core/src/flows/tinyflows/mod.rs@@ -6,3 +6,5 @@//! generic graph model and legacy graph migration needed by host-facing APIs.pub use ::tinyflows::{migrate, model};++pub(crate) mod langfuse_export;diff --git a/crates/openhuman-core/src/skills/ops.rs b/crates/openhuman-core/src/skills/ops.rsindex 3493d8c35f..0c4f3966d4 100644--- a/crates/openhuman-core/src/skills/ops.rs+++ b/crates/openhuman-core/src/skills/ops.rs@@ -32,7 +32,7 @@pub use super::bundled::install_bundled_skills;pub use super::ops_create::{create_workflow, CreateWorkflowParams, WorkflowCreateInputDef};pub use super::ops_discover::{- discover_automations, discover_workflows, init_workflows_dir, is_workspace_trusted,+ discover_automations, discover_workflows, is_workspace_trusted,load_workflow_metadata, load_workflow_metadata_for, read_workflow_resource,read_workflow_resource_for,};diff --git a/crates/openhuman-core/src/skills/ops_discover.rs b/crates/openhuman-core/src/skills/ops_discover.rsindex 146c10a9a2..8400383604 100644--- a/crates/openhuman-core/src/skills/ops_discover.rs+++ b/crates/openhuman-core/src/skills/ops_discover.rs@@ -17,8 +17,8 @@ mod scan;use std::path::Path;pub use api::{- discover_automations, discover_workflows, discovery_home_dir, init_workflows_dir,- is_workspace_trusted, load_workflow_metadata, load_workflow_metadata_for,+ discover_automations, discover_workflows, discovery_home_dir, is_workspace_trusted,+ load_workflow_metadata, load_workflow_metadata_for,};pub use resource::{read_workflow_resource, read_workflow_resource_for};