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
merge: integrate main while preserving attachment intake
Steven Enamakeld9dbaff3a415
diff --cc crates/openhuman-core/src/agent/session_host/runtime_session.rsindex 662023a090,f5790e2885..7e6e714272--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@@ -563,8 -492,51 +494,9 @@@ impl OpenHumanTurnPreludesurface.synthesized_tools = synthesized_tools;surface.visible_tool_specs = Arc::new(visible);surface.tool_policy_session = policy;+ Ok(())}- fn drain_host_events(&self) -> bool {- let mut mutable = self- .mutable- .lock()- .unwrap_or_else(std::sync::PoisonError::into_inner);- if mutable.composio_events.is_none() {- mutable.composio_events = crate::core::bus::BUS.get().map(|bus| bus.receiver());- }- if mutable.skill_events.is_none() {- mutable.skill_events = crate::core::bus::BUS.get().map(|bus| bus.receiver());- }- let drain = |receiver: &mut Option<- tinybus::events::EventReceiver<crate::core::events::DomainEvent>,- >| {- let Some(receiver) = receiver.as_mut() else {- return false;- };- let mut skills_changed = false;- loop {- use tinybus::TryRecvError;- match receiver.try_recv() {- Ok(crate::core::events::DomainEvent::WorkflowsChanged { .. }) => {- skills_changed = true- }- Ok(crate::core::events::DomainEvent::ComposioIntegrationsChanged {- ..- })- | Ok(_) => {}- Err(TryRecvError::Empty) => break,- Err(TryRecvError::Lagged(_)) => {- skills_changed = true;- break;- }- Err(TryRecvError::Closed) => break,- }- }- skills_changed- };- let composio_skills_changed = drain(&mut mutable.composio_events);- composio_skills_changed | drain(&mut mutable.skill_events)- }-/// Assemble every dynamic, host-owned user-turn addition after the runtime/// has selected/resumed its transcript. The returned message is then the/// sole input which `Session` appends to generic history.diff --cc crates/openhuman-core/src/agent/session_host/types.rsindex f0aad73d92,58088db1e6..e587aa90ba--- a/crates/openhuman-core/src/agent/session_host/types.rs+++ b/crates/openhuman-core/src/agent/session_host/types.rs@@@ -542,9 -543,8 +543,10 @@@ pub struct OpenHumanSessionHost/// A builder for creating `OpenHumanSessionHost` instances with custom configuration.pub struct SessionHostBuilder {+ pub(super) permanent_tool_names: std::collections::HashSet<String>,pub(super) turn_model_source: Option<TurnModelSource>,+ /// Explicit host config for injected-model attachment staging and services.+ pub(super) runtime_config: Option<Arc<crate::config::Config>>,pub(super) tools: Option<Vec<Box<dyn Tool>>>,/// Delegation tools synthesised for the session's initial connection set./// Held in [`OpenHumanSessionHost::synthesized_tools`], never inside [`OpenHumanSessionHost::tools`].diff --cc crates/openhuman-core/src/agent/tinyagents/harness_assembly.rsindex f24ae7ff28,411ba4d5b7..62dcf0562b--- a/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs+++ b/crates/openhuman-core/src/agent/tinyagents/harness_assembly.rs@@@ -306,9 -312,9 +312,6 @@@ pub(super) fn assemble_turn_harness// recover policy from a task-local while the harness is driving.let stop_hooks_installed = stop_hooks;-- // A single steering handle drives mid-flight steering (run queue), the-- // early-exit pause, the model-call-cap pause, and stop-hook pauses, so they-- // all reach the same loop. Created when any of them is active.// A steering handle is always created now: besides run-queue steering, the// early-exit / cap / stop-hook pauses, the repeated-tool-failure breaker// (below) also pauses through it, and it wants to fire on every path@@@ -329,13 -335,13 +332,11 @@@// Shared by the two breakers below: whichever halts writes the root cause here.let halt_summary: HaltSummarySlot = std::sync::Arc::new(std::sync::Mutex::new(None));-- // Repeat-progress breaker (issue #4463, restoring #4088 / #4095): the failure-- // breaker below resets on every success, so a model looping on a *successful*-- // no-op tool or re-emitting an identical narration+call never trips it. This-- // guard halts on identical successful `(tool, args)` batches / identical-- // outputs, and on one call returning the identical result again with other-- // calls in between (#6275), sharing the same halt-summary slot + steering-- // handle. Polling tools (`wait_subagent`) stay exempt.++ // Repeat-progress breaker (#4463, restoring #4088/#4095): the failure++ // breaker resets on success, so it misses successful no-op loops and repeated++ // narration+call batches. This guard catches identical successful calls or++ // outputs, including repeats with other calls between them (#6275). Polling++ // tools (`wait_subagent`) stay exempt.//// Pushed first / outermost: `after_tool` runs in reverse registration order,// so this guard fingerprints a result only after every other middlewarediff --cc scripts/ci/check-openhuman-rust-layout.mjsindex 9c18050fbe,92dbf0bd46..4fdf68abda--- a/scripts/ci/check-openhuman-rust-layout.mjs+++ b/scripts/ci/check-openhuman-rust-layout.mjs@@@ -38,7 -38,7 +38,7 @@@ const LEGACY_LIMIT_ENTRIES =// under the general 750 limit, so it needs no exception at all.// The session-todo integration added transcript metadata construction to// this already-exempt composition seam. Keep its allowance exact.- ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1938],- ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1902],++ ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1875],// Session-host factory still assembles the product's deliberately coupled// provider, security, memory, tool and prompt policy. Generic session// state moved to tinyagents-runtime; this remaining composition is split in