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(agent): drop context manager and stats modules
Steven Enamakel746624bf2742
diff --git a/crates/openhuman-core/src/agent/context/mod.rs b/crates/openhuman-core/src/agent/context/mod.rsindex 3c5bbe4fc5..92900c4c65 100644--- a/crates/openhuman-core/src/agent/context/mod.rs+++ b/crates/openhuman-core/src/agent/context/mod.rs@@ -8,21 +8,14 @@//! and channels all build their opening system prompts through this//! module; there is no parallel implementation elsewhere in the crate.//!-//! 2. **Mechanical history bookkeeping** — [`stats::ContextStatsState`] records-//! provider usage. Live reduction runs in the TinyAgents middleware stack.+//! 2. **Middleware configuration** — `ContextConfig` configures the TinyAgents+//! turn middleware stack.//!-//! Agents hold a single [`ContextManager`] per session. The manager owns-//! per-conversation state (budget, utilisation) while prompt assembly remains-//! centralized here.-//!-//! Submodules are added incrementally as the `agent/` → `context/`-//! migration lands (see plan `misty-bubbling-bunny.md`).+//! Session hosts hold their prompt builder and context settings directly;+//! TinyAgents owns live transcript reduction and middleware execution.pub mod channels_prompt;-pub mod manager;-pub mod stats;-pub use manager::{ContextManager, ContextStats};/// Default number of most-recent tool-result envelopes the TinyAgents/// microcompact middleware leaves intact.pub const DEFAULT_KEEP_RECENT_TOOL_RESULTS: usize = 5;diff --git a/crates/openhuman-core/src/agent/session_store/splice_fixture_tests.rs b/crates/openhuman-core/src/agent/session_store/splice_fixture_tests.rsindex 51f56c2eb0..0b1f9c60cb 100644--- a/crates/openhuman-core/src/agent/session_store/splice_fixture_tests.rs+++ b/crates/openhuman-core/src/agent/session_store/splice_fixture_tests.rs@@ -1,23 +1,13 @@-//! Test fixtures: read a thread's head transcript out of a transcript store and-//! write an edited copy back through the store port.-//!-//! Tests that need a transcript in a state the real writer never produces (an-//! orphaned tool head, a replayed `[Tool results]` round) used to splice raw-//! JSONL rows into the file the session host wrote. The host writes through a-//! store port now, so the splice goes through the same port.+//! Test helpers for editing transcript-store fixtures through the locator API.use std::sync::Arc;-use tinyagents_session::port::{DriverSessionStores, SessionStoreProvider};use tinyagents_session::transcript::{TranscriptLocator, TranscriptMessage, TranscriptMeta};/// A fresh transcript store over the driver ports on memory (the production/// store, minus the disk), shared by cloning the `Arc`.pub(crate) fn memory_locator() -> Arc<dyn TranscriptLocator> {- DriverSessionStores::new(Arc::new(crate::storage::MemoryStorage::new()))- .expect("driver session stores over memory")- .for_agent("fixture")- .transcripts+ tinyagents_session::testkit::in_memory_transcript()}/// A thread's head transcript as the model reads it.