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
chore: 姫路城のことを教えてください。
Steven Enamakel431a029afa81
diff --git a/crates/openhuman-core/src/agent/host_overrides.rs b/crates/openhuman-core/src/agent/host_overrides.rsindex d0d9493cff..78275cc2d0 100644--- a/crates/openhuman-core/src/agent/host_overrides.rs+++ b/crates/openhuman-core/src/agent/host_overrides.rs@@ -10,7 +10,6 @@ use std::sync::{Arc, RwLock};use crate::agent::hooks::{PostTurnHook, ToolHook};use tinyinference_llm::model::ChatModel;-use tinyagents_harness::cancel::CancellationToken;/// Runtime or agent host adapters, shared by every context derived from it.#[derive(Default)]@@ -140,21 +139,6 @@ impl HostOverrides {}}-tokio::task_local! { static TURN_CANCELLATION: CancellationToken; }--/// Run a turn with a caller-owned cancellation token, shared with child runs.-pub async fn with_cancellation<F: std::future::Future>(- token: CancellationToken,- future: F,-) -> F::Output {- TURN_CANCELLATION.scope(token, future).await-}--/// The caller's token, or a fresh token for entrypoints without one.-pub fn current_cancellation() -> CancellationToken {- TURN_CANCELLATION.try_with(Clone::clone).unwrap_or_default()-}-#[cfg(test)]#[path = "host_overrides_tests.rs"]mod tests;diff --git a/crates/openhuman-core/src/agent/tinyagents/budget.rs b/crates/openhuman-core/src/agent/tinyagents/budget.rsindex 68992cccd2..d9039891f1 100644--- a/crates/openhuman-core/src/agent/tinyagents/budget.rs+++ b/crates/openhuman-core/src/agent/tinyagents/budget.rs@@ -1,4 +1,5 @@-//! Host budget policy, scoped once at admission and carried explicitly to children.+//! Host budget policy, handed to the turn once at admission and carried+//! explicitly to children (`HostTurnEnv::model_budget` -> `OpenHumanRunContext`).use std::sync::Arc;/// Product recursion ceiling shared by native and MCP delegation.@@ -33,25 +34,6 @@ impl ModelBudget {))}}-tokio::task_local! { static MODEL_BUDGET: ModelBudget; }-/// Scope host policy around turn admission; the explicit run carrier copies it.-pub async fn with_budget<F: std::future::Future>(budget: ModelBudget, future: F) -> F::Output {- MODEL_BUDGET.scope(budget, Box::pin(future)).await-}-pub(crate) fn current() -> Option<ModelBudget> {- MODEL_BUDGET.try_with(Clone::clone).ok()-}--// Fanout leaves narrow the existing host depth policy at admission.-tokio::task_local! { static SPAWN_DEPTH_LIMIT: usize; }-/// Run a typed fanout call with a narrower model-directed child-depth ceiling.-pub async fn with_spawn_depth_limit<F: std::future::Future>(limit: usize, future: F) -> F::Output {- SPAWN_DEPTH_LIMIT.scope(limit, Box::pin(future)).await-}-pub(crate) fn spawn_depth_limit() -> Option<usize> {- SPAWN_DEPTH_LIMIT.try_with(|limit| *limit).ok()-}-/// Effective host depth ceiling, never wider than product policy.pub(crate) fn depth(context: &super::host::OpenHumanRunContext) -> usize {contextdiff --git a/crates/openhuman-core/src/agent/turn_deadline.rs b/crates/openhuman-core/src/agent/turn_deadline.rsindex cb1ec2895e..413a545c71 100644--- a/crates/openhuman-core/src/agent/turn_deadline.rs+++ b/crates/openhuman-core/src/agent/turn_deadline.rs@@ -10,7 +10,7 @@//!//! The deadline value (`tinyagents_harness::turn_deadline::TurnDeadline`)//! owns the two points the harness derives from the backstop; this module-//! keeps the host side (env override, task-local scope):+//! keeps the host side (the env override)://!//! * **wind-down** (`backstop - min(120s, backstop/5)`, 780s by default): the//! harness pauses the run at the next safe point, after a model call or a@@ -30,7 +30,6 @@//! context. Turns with no backstop, such as other channels or the CLI, carry//! `None` and keep their previous behaviour.-use std::future::Future;use std::time::Duration;use tinyagents_harness::turn_deadline::{parse_backstop, TurnDeadline};@@ -57,23 +56,6 @@ pub fn configured_backstop() -> Option<Duration> {parse_backstop(std::env::var(TURN_BACKSTOP_ENV).ok().as_deref())}-tokio::task_local! {- static CURRENT_TURN_DEADLINE: TurnDeadline;-}--/// The deadline scoped on the current task, if any.-pub fn current() -> Option<TurnDeadline> {- CURRENT_TURN_DEADLINE.try_with(|deadline| *deadline).ok()-}--/// Run `future` with `deadline` scoped on the task (a no-op scope for `None`).-pub async fn with_turn_deadline<F: Future>(deadline: Option<TurnDeadline>, future: F) -> F::Output {- match deadline {- Some(deadline) => CURRENT_TURN_DEADLINE.scope(deadline, future).await,- None => future.await,- }-}-#[cfg(test)]#[path = "turn_deadline_tests.rs"]mod tests;