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(host_runtime): update ops module exports and logic
Steven Enamakeldf4c5abe3fc0
diff --git a/crates/openhuman-core/src/inference/host_runtime/ops.rs b/crates/openhuman-core/src/inference/host_runtime/ops.rsindex 3b90031282..8dd82040a2 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops.rs@@ -13,11 +13,12 @@ mod complete_once;mod runtime_ops;mod turn_guards;+pub(crate) use agent_chat::agent_chat_for_with_turn_model_source;pub use agent_chat::{- agent_chat, agent_chat_for, agent_chat_reply_for, agent_chat_simple, AgentChatEnv,- AgentChatReply, AgentChatTarget,+ AgentChatEnv, AgentChatReply, AgentChatTarget, agent_chat, agent_chat_for,+ agent_chat_reply_for, agent_chat_simple,};-pub use complete_once::{complete_once, CompletionEndpoint};+pub use complete_once::{CompletionEndpoint, complete_once};pub use runtime_ops::{local_ai_prompt, local_ai_status, local_ai_summarize, local_ai_transcribe,local_ai_transcribe_bytes, local_ai_tts, local_ai_vision_prompt,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.rsindex e2c557ca00..75a36f9088 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@@ -316,7 +316,7 @@ fn build_turn_agent(OpenHumanSessionHost::from_config_with_definition(ctx, config, &definition)}},- (Some(host), Some(_)) => Err(anyhow::anyhow!(+ (Some(_), Some(_)) => Err(anyhow::anyhow!("explicit turn model source cannot be combined with host tools")),}diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rsindex 054633c972..94dba635de 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/complete_once_tests.rs@@ -1,5 +1,5 @@use super::*;-use serde_json::{json, Value};+use serde_json::{Value, json};use tinyinference_llm::message::Message;use tinyinference_llm::model::ResponseFormat;use tinyinference_llm::tool::ToolSchema;diff --git a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rsindex 1e205115c8..812781e2b7 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops/turn_guards.rs@@ -4,7 +4,7 @@use crate::config::Config;use crate::security::prompt_injection::{- enforce_prompt_input, PromptEnforcementAction, PromptEnforcementContext,+ PromptEnforcementAction, PromptEnforcementContext, enforce_prompt_input,};pub(super) fn prompt_guard_user_message(action: PromptEnforcementAction) -> &'static str {diff --git a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rsindex 1877deed9d..eebbbce151 100644--- a/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs+++ b/crates/openhuman-core/src/inference/host_runtime/ops_tests.rs@@ -280,7 +280,7 @@ async fn effective_origin_defaults_to_direct_chat_outside_any_scope() {/// see, not the blanket `Cli` allowance this RPC would otherwise impose.#[tokio::test]async fn effective_origin_keeps_an_embedder_scoped_label() {- use crate::security::turn_origin::{with_origin, AgentTurnOrigin, TrustedAutomationSource};+ use crate::security::turn_origin::{AgentTurnOrigin, TrustedAutomationSource, with_origin};let observed = with_origin(AgentTurnOrigin::TrustedAutomation {job_id: "run-7".to_string(),@@ -308,7 +308,7 @@ async fn effective_origin_keeps_an_embedder_scoped_label() {/// touched, not a silent fall-through to the orchestrator.#[tokio::test]async fn agent_chat_for_rejects_an_unknown_agent_id() {- use crate::inference::host_runtime::ops::{agent_chat_for, AgentChatTarget};+ use crate::inference::host_runtime::ops::{AgentChatTarget, agent_chat_for};let tmp = tempfile::tempdir().unwrap();let mut config = test_config(&tmp);std::fs::create_dir_all(&config.workspace_dir).unwrap();