Skip to content

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

docs(context): update stale context manager references

Steven Enamakelcd01811571a8
diff --git a/crates/openhuman-core/src/agent/harness/graph.rs b/crates/openhuman-core/src/agent/harness/graph.rs
index b2ed10ef19..436c8470a3 100644
--- a/crates/openhuman-core/src/agent/harness/graph.rs
+++ b/crates/openhuman-core/src/agent/harness/graph.rs
@@ -180,7 +180,7 @@ pub(crate) async fn run_channel_turn_via_graph(
// the standard per-turn budget).
max_output_tokens: Some(crate::inference::provider::AGENT_TURN_MAX_OUTPUT_TOKENS),
// Context middlewares: cache-align + default tool-result byte cap (the
- // channel path has no session `ContextManager` to source config from).
+ // channel path has no session context config to source from).
context_mw:
crate::agent::tinyagents::middleware::turn_context::TurnContextMiddleware::defaults(),
// Channel/CLI path carries its own gating; no session `.tool_policy()`.
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
index 31946d5b59..da54edc8e7 100644
--- a/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
+++ b/crates/openhuman-core/src/agent/subagent_host/ops/graph/dispatch.rs
@@ -550,7 +550,7 @@ fn build_subagent_context_mw(
let ctx = &config.context;
// TokenJuice content-aware compaction gates on the same master
// `[context].compaction_enabled` the chat path reads
- // (`ContextManager::compaction_enabled`).
+ // (`ContextConfig::compaction_enabled`).
mw.tokenjuice_compaction_enabled =
ctx.compaction_enabled && crate::inference::tokenjuice::enabled(config);
mw.tool_result_budget_bytes = ctx.tool_result_budget_bytes;
@@ -561,7 +561,7 @@ fn build_subagent_context_mw(
0
};
// Summarization step honors the `[context].enabled` + autocompact
- // opt-outs, same as `ContextManager::autocompact_enabled`.
+ // opt-outs, same as `ContextConfig::enabled && autocompact_enabled`.
mw.autocompact_enabled = ctx.enabled && ctx.autocompact_enabled;
mw.compaction = ctx.compaction_settings();
tracing::debug!(
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware.rs b/crates/openhuman-core/src/agent/tinyagents/middleware.rs
index a14fdd54e2..8fb4cbe17e 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware.rs
@@ -2,7 +2,7 @@
//! (issue #4249).
//!
//! Historically these ran in the in-house engine's tool/prompt plumbing
-//! (`agent_tool_exec`, `ContextManager`). The tinyagents turn path bypassed
+//! (`agent_tool_exec`, the session context adapter). The tinyagents turn path bypassed
//! them, so they were effectively dead on the live loop. Re-expressing them as
//! [`Middleware`](tinyagents_harness::middleware::Middleware) hooks restores the
//! behaviour and makes the graph the single place cross-cutting context
diff --git a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
index 713a97aa83..d6492bb27f 100644
--- a/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
+++ b/crates/openhuman-core/src/agent/tinyagents/middleware/turn_context.rs
@@ -24,7 +24,7 @@ use tinyjuice_bus::types::AgentTokenjuiceCompression;
use super::tool_output::ToolOutputMiddleware;
/// Default per-tool-result byte cap for the channel / sub-agent paths, which do
-/// not carry a session `ContextManager` to source the configured budget from.
+/// not carry a session context settings to source the configured budget from.
/// Mirrors the `ContextConfig::tool_result_budget_bytes` default (16 KiB).
pub(crate) const DEFAULT_TOOL_RESULT_BUDGET_BYTES: usize = 16 * 1024;
@@ -343,7 +343,7 @@ impl Middleware<(), crate::agent::tinyagents::host::OpenHumanRunContext>
}
impl TurnContextMiddleware {
- /// A sensible default for turn paths without a session `ContextManager`
+ /// A sensible default for turn paths without a session context settings
/// (channel / sub-agent): the default tool-result byte cap, no summarizer or
/// microcompact.
pub(crate) fn defaults() -> Self {
diff --git a/crates/openhuman-core/src/config/schema/context.rs b/crates/openhuman-core/src/config/schema/context.rs
index c2c863f9d9..a816cebf1f 100644
--- a/crates/openhuman-core/src/config/schema/context.rs
+++ b/crates/openhuman-core/src/config/schema/context.rs
@@ -1,7 +1,7 @@
//! Context management configuration.
//!
-//! Knobs for the global `crates/openhuman-core/src/agent/context/` module — budget
-//! thresholds, summarization trigger percentages and microcompact behavior. Wired into the root
+//! Knobs for the agent context middleware — byte budgets, summarization
+//! trigger settings and microcompact behavior. Wired into the root
//! [`super::Config`] as the `context` section; env overrides live in
//! [`super::load`].
@@ -14,8 +14,8 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
#[serde(default)]
pub struct ContextConfig {
- /// Master switch. When `false`, [`crate::agent::context::ContextManager`]
- /// skips every reduction stage and the summarizer is never invoked.
+ /// Master switch. When `false`, the session host disables context
+ /// compression middleware and the summarizer is never invoked.
/// Useful for tests and diagnostics; not recommended for production.
#[serde(default = "default_enabled")]
pub enabled: bool,
diff --git a/crates/openhuman-core/src/config/schema/types/config.rs b/crates/openhuman-core/src/config/schema/types/config.rs
index 61246a9141..32376db9ab 100644
--- a/crates/openhuman-core/src/config/schema/types/config.rs
+++ b/crates/openhuman-core/src/config/schema/types/config.rs
@@ -234,7 +234,7 @@ pub struct Config {
/// Global context management configuration — budget thresholds,
/// summarization trigger, microcompact/autocompact toggles, and the
/// session-memory extraction cadence. Consumed by
- /// [`crate::agent::context::ContextManager`].
+ /// the agent context middleware configuration.
#[serde(default)]
pub context: ContextConfig,