Skip to content

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

refactor(orchestration): import task status and generate types from source crates

Steven Enamakel47cce3adad26
diff --git a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
index f22182cc0a..0c4f0e417b 100644
--- a/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
+++ b/crates/openhuman-core/src/agent/orchestration/agent_teams/runtime.rs
@@ -33,13 +33,15 @@ use anyhow::{anyhow, Result};
use serde_json::json;
use crate::agent::orchestration::parent_context::with_root_parent;
-use crate::agent::orchestration::{
- AgentOrchestrationSession, OrchestrationTaskStatus, SpawnAgentRequest, WaitAgentOptions,
-};
use crate::config::Config;
use tinyagents_session::run_ledger::{
self, AgentTeamMemberStatus, AgentTeamTask, ClaimOutcome, RunEventAppend,
};
+use {
+ crate::agent::orchestration::AgentOrchestrationSession,
+ crate::agent::orchestration::SpawnAgentRequest, crate::agent::orchestration::WaitAgentOptions,
+ tinyagents_tasks::OrchestrationTaskStatus,
+};
use tinyagents_orchestration::teams::{
build_member_prompt, claimable_task, deliver_pending_messages, run_member_graph,
diff --git a/crates/openhuman-core/src/agent/orchestration/mod.rs b/crates/openhuman-core/src/agent/orchestration/mod.rs
index f168bc5147..5dff677da8 100644
--- a/crates/openhuman-core/src/agent/orchestration/mod.rs
+++ b/crates/openhuman-core/src/agent/orchestration/mod.rs
@@ -68,8 +68,7 @@ pub use subagent_control::{
all_registered_controllers as all_subagent_control_registered_controllers,
};
pub use types::{
- AgentSnapshot, OrchestrationTaskStatus, SpawnAgentRequest, SpawnAgentResponse,
- WaitAgentOptions, WaitAgentResponse,
+ AgentSnapshot, SpawnAgentRequest, SpawnAgentResponse, WaitAgentOptions, WaitAgentResponse,
};
pub use workflow_runs::{
all_workflow_run_controller_schemas, all_workflow_run_registered_controllers,
diff --git a/crates/openhuman-core/src/agent/orchestration/types.rs b/crates/openhuman-core/src/agent/orchestration/types.rs
index 4fd527dedf..169e27c882 100644
--- a/crates/openhuman-core/src/agent/orchestration/types.rs
+++ b/crates/openhuman-core/src/agent/orchestration/types.rs
@@ -9,7 +9,7 @@
use serde::{Deserialize, Serialize};
use std::collections::BTreeMap;
-pub use tinyagents_tasks::OrchestrationTaskStatus;
+use tinyagents_tasks::OrchestrationTaskStatus;
/// Request to spawn a child agent from the current parent agent turn.
#[derive(Debug, Clone, Default, Serialize, Deserialize)]
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 82e4361095..56b6567b3a 100644
--- a/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs
+++ b/crates/openhuman-core/src/agent/orchestration/workflow_runs/host.rs
@@ -12,8 +12,10 @@ use tinyagents_orchestration::workflow::{
};
use crate::agent::harness::definition::{AgentDefinitionRegistry, SandboxMode, ToolScope};
-use crate::agent::orchestration::{
- AgentOrchestrationSession, OrchestrationTaskStatus, SpawnAgentRequest, WaitAgentOptions,
+use {
+ crate::agent::orchestration::AgentOrchestrationSession,
+ crate::agent::orchestration::SpawnAgentRequest, crate::agent::orchestration::WaitAgentOptions,
+ tinyagents_tasks::OrchestrationTaskStatus,
};
/// Product policy deliberately remains in OpenHuman. The portable engine sees
diff --git a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
index 3eb86f6698..6745090fa1 100644
--- a/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/payload_summarizer.rs
@@ -31,7 +31,9 @@ use tracing::debug;
use crate::agent::harness::definition::AgentDefinition;
use crate::agent::subagent_host;
use crate::agent::tinyagents::host::OpenHumanRunContext;
-use crate::inference::tokenjuice::generate::{GenerateRequest, PreparedGenerate};
+use {
+ crate::inference::tokenjuice::generate::PreparedGenerate, tinyjuice_bus::wire::GenerateRequest,
+};
/// Supplies the model call behind TinyJuice's summary stage.
///
diff --git a/crates/openhuman-core/src/inference/tokenjuice/focus.rs b/crates/openhuman-core/src/inference/tokenjuice/focus.rs
index 6517916d16..636669d56b 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/focus.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/focus.rs
@@ -8,7 +8,7 @@
use serde_json::Value;
-pub use tinyjuice_bus::tools::{summary_focus_property, SUMMARY_FOCUS_ARG};
+use tinyjuice_bus::tools::{summary_focus_property, SUMMARY_FOCUS_ARG};
/// Whether a tool's parameter schema declares TinyJuice's `summary_focus`,
/// as opposed to a parameter of its own that happens to share the name.
diff --git a/crates/openhuman-core/src/inference/tokenjuice/generate.rs b/crates/openhuman-core/src/inference/tokenjuice/generate.rs
index d08f64b0e9..9a001547a9 100644
--- a/crates/openhuman-core/src/inference/tokenjuice/generate.rs
+++ b/crates/openhuman-core/src/inference/tokenjuice/generate.rs
@@ -21,7 +21,7 @@ use std::future::Future;
use std::pin::Pin;
use std::sync::{LazyLock, Mutex};
-pub use tinyjuice_bus::wire::GenerateRequest;
+use tinyjuice_bus::wire::GenerateRequest;
/// One model call, bound to the turn that will pay for it.
pub type PreparedGenerate = Box<
diff --git a/crates/openhuman-core/src/tools/impl/network/host.rs b/crates/openhuman-core/src/tools/impl/network/host.rs
index 81e5375c5f..dc978ba534 100644
--- a/crates/openhuman-core/src/tools/impl/network/host.rs
+++ b/crates/openhuman-core/src/tools/impl/network/host.rs
@@ -12,7 +12,7 @@ use tinytools_std::network::{
};
use crate::config::HttpRequestConfig;
-use crate::inference::tokenjuice::focus::{summary_focus_property, SUMMARY_FOCUS_ARG};
+use {tinyjuice_bus::tools::summary_focus_property, tinyjuice_bus::tools::SUMMARY_FOCUS_ARG};
/// The fallbacks for a `0` limit, from the `[http_request]` schema defaults, so
/// the tools, the schema and the 5→6 migration share one source.
diff --git a/crates/openhuman-core/src/tools/impl/network/mcp.rs b/crates/openhuman-core/src/tools/impl/network/mcp.rs
index 646a3a72fd..686aebe33d 100644
--- a/crates/openhuman-core/src/tools/impl/network/mcp.rs
+++ b/crates/openhuman-core/src/tools/impl/network/mcp.rs
@@ -7,8 +7,6 @@
use std::sync::Arc;
-pub use tinymcp::tools::{McpListServersTool, McpListToolsTool};
-
use crate::mcp::config_servers::McpServerRegistry;
use crate::security::{SecurityPolicy, ToolOperation};
diff --git a/crates/openhuman-core/src/voice/cloud_transcribe.rs b/crates/openhuman-core/src/voice/cloud_transcribe.rs
index 8059eb6eaa..8a35ed599a 100644
--- a/crates/openhuman-core/src/voice/cloud_transcribe.rs
+++ b/crates/openhuman-core/src/voice/cloud_transcribe.rs
@@ -4,7 +4,7 @@ use crate::backend::BackendClient;
use crate::config::Config;
use crate::core::Outcome;
-pub use tinyinference_voice::cloud::{CloudTranscribeOptions, CloudTranscribeResult};
+use tinyinference_voice::cloud::{CloudTranscribeOptions, CloudTranscribeResult};
/// Transcribe renderer-supplied base64 audio through the hosted backend.
pub async fn transcribe_cloud(
diff --git a/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs b/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
index fca6598b13..f9e7778a16 100644
--- a/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
+++ b/crates/openhuman-core/src/voice/schemas/handlers/transcribe_tts.rs
@@ -119,7 +119,7 @@ pub(crate) fn handle_voice_cloud_transcribe(params: Map<String, Value>) -> Contr
Box::pin(async move {
let config = config_rpc::load_config_with_timeout().await?;
let p = deserialize_params::<CloudTranscribeParams>(params)?;
- let opts = crate::voice::cloud_transcribe::CloudTranscribeOptions {
+ let opts = tinyinference_voice::cloud::CloudTranscribeOptions {
model: p.model,
language: p.language,
mime_type: p.mime_type,