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 upstream main into memory-v2
Steven Enamakel955230c0ba79
diff --cc crates/openhuman-core/src/agent/context/README.mdindex f09ddc0756,aa6acf0827..7d96e42992--- a/crates/openhuman-core/src/agent/context/README.md+++ b/crates/openhuman-core/src/agent/context/README.md@@@ -16,10 -17,11 +16,11 @@@ Global context management for agent ses| File | Role || --- | --- || `crates/openhuman-core/src/agent/context/mod.rs` | Module docstring, `pub mod` decls, `pub use` re-exports, and the three shared constants (`DEFAULT_TOOL_RESULT_BUDGET_BYTES`, `CLEARED_PLACEHOLDER`, `DEFAULT_KEEP_RECENT_TOOL_RESULTS`). No other logic. |- | `crates/openhuman-core/src/agent/context/manager.rs` | `ContextManager`: per-session handle agents hold. Owns the default prompt builder, `ContextStatsState`, and the `ContextConfig`-derived knobs. Surfaces `build_system_prompt` / `build_system_prompt_tiered`, `stats()`, the getters the tinyagents turn reads (`tool_result_budget_bytes`, `compaction_enabled`, `microcompact_keep_recent`, `autocompact_enabled`, `prefer_markdown_tool_output`). |- | `crates/openhuman-core/src/agent/context/stats.rs` | `ContextStatsState`: last provider usage, context-window utilisation,. Pure state; issues no LLM calls and does not mutate history. |- | `crates/openhuman-core/src/agent/context/channels_prompt.rs` | Bespoke free functions `build_system_prompt(...)` / `build_system_prompt_with_identity(...)` (plus `PromptIdentityOverride`, `ProjectContextPlacement`, `render_project_context`) for channel runtimes (Discord/Slack/Telegram/…). Byte-stable for prefix-cache hits; injects workspace bootstrap files (`SOUL.md`, `IDENTITY.md`, with profile overrides for `SOUL.md`), tools, safety, skills, runtime, and channel-capabilities sections. |- | `crates/openhuman-core/src/agent/context/manager_tests.rs`, `channels_prompt_tests.rs` | Sibling test files wired via `#[cfg(test)] #[path = "..."] mod tests;` from their source file (the layout check rejects inline test modules). |-| `crates/openhuman-core/src/agent/context/manager.rs` | `ContextManager`: per-session handle agents hold. Owns the default prompt builder, `ContextStatsState`, and the `ContextConfig`-derived knobs. Surfaces `build_system_prompt` / `build_system_prompt_tiered`, `stats()`, the getters the tinyagents turn reads (`tool_result_budget_bytes`, `compaction_enabled`, `microcompact_keep_recent`, `autocompact_enabled`, `compaction()` (trigger override and strategy), `prefer_markdown_tool_output`), and the session-memory trigger/mark methods. |++| `crates/openhuman-core/src/agent/context/manager.rs` | `ContextManager`: per-session handle agents hold. Owns the default prompt builder, `ContextStatsState`, and the `ContextConfig`-derived knobs. Surfaces `build_system_prompt` / `build_system_prompt_tiered`, `stats()`, the getters the tinyagents turn reads (`tool_result_budget_bytes`, `compaction_enabled`, `autocompact_enabled`, `microcompact_keep_recent`, `autocompact_enabled`, `compaction()` (trigger override and strategy), `prefer_markdown_tool_output`), and the session-memory trigger/mark methods. |+ | `crates/openhuman-core/src/agent/context/stats.rs` | `ContextStatsState`: last provider usage, context-window utilisation, and the shared `SessionMemoryHandle` (`Arc<Mutex<SessionMemoryState>>`). Pure state; issues no LLM calls and does not mutate history. |+ | `crates/openhuman-core/src/agent/context/session_memory.rs` | `SessionMemoryState` / `SessionMemoryConfig`: threshold-gated `should_extract` decision (token growth, tool calls, and turns must all cross) and extraction bookkeeping. Holds `ARCHIVIST_EXTRACTION_PROMPT`. State-tracking only; does not spawn the archivist. |+ | `crates/openhuman-core/src/agent/context/channels_prompt.rs` | Bespoke free functions `build_system_prompt(...)` / `build_system_prompt_with_identity(...)` (plus `PromptIdentityOverride`, `ProjectContextPlacement`, `render_project_context`) for channel runtimes (Discord/Slack/Telegram/…). Byte-stable for prefix-cache hits; injects workspace bootstrap files (`SOUL.md`, `IDENTITY.md`, optional `PROFILE.md`/`MEMORY.md`, with profile overrides for `SOUL.md`/`MEMORY.md`), tools, safety, skills, runtime, and channel-capabilities sections. |+ | `crates/openhuman-core/src/agent/context/manager_tests.rs`, `channels_prompt_tests.rs`, `session_memory_tests.rs` | Sibling test files wired via `#[cfg(test)] #[path = "..."] mod tests;` from their source file (the layout check rejects inline test modules). |## History (#4249)diff --cc crates/openhuman-core/src/agent/context/manager.rsindex 85a06250dd,f45652ff1c..728f099cbe--- a/crates/openhuman-core/src/agent/context/manager.rs+++ b/crates/openhuman-core/src/agent/context/manager.rs@@@ -140,9 -161,16 +144,15 @@@ impl ContextManagerself.autocompact_enabled}+ /// The compaction trigger override (benchmarks / debugging) and the+ /// checkpoint strategy.+ pub fn compaction(&self) -> crate::config::CompactionSettings {+ self.compaction+ }+// ─── Budget tracking ──────────────────────────────────────────- /// Feed the latest provider [`BilledUsage`] into utilisation stats and the- /// session-memory state.+ /// Feed the latest provider [`BilledUsage`] into utilisation stats.pub fn record_usage(&mut self, usage: &BilledUsage) {self.stats_state.record_usage(usage);}diff --cc crates/openhuman-core/src/agent/harness/definition_tests.rsindex 6e87f8821a,b1b63b4621..023a406570--- a/crates/openhuman-core/src/agent/harness/definition_tests.rs+++ b/crates/openhuman-core/src/agent/harness/definition_tests.rs@@@ -363,7 -366,16 +363,7 @@@ fn all_builtin_agent_definitions_have_elet expected: &[(&str, usize)] = &[// Extended policy (or high `max_iterations`) -> effective cap raised.- ("orchestrator", 15),- // Raised from 15 to 50 by 7ad30f7c5 (fix(registry): raise orchestrator- // max iterations); the loader registration test moved with it, this- // snapshot did not.+ ("orchestrator", 50),- // #5204: general-purpose read-only flow context/memory retrieval- // agent — `iteration_policy = "extended"` so it can loop across- // several retrievals in one turn. `#[cfg(feature = "flows")]`-gated- // (like the other flow agents), so this audit entry is too.- #[cfg(feature = "flows")]- ("flow_memory_agent", 50),("planner", 50),("task_manager_agent", 50),// Gated with `flows` (#4797) — absent from a slim build.diff --cc crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rsindex 963dda46aa,8bba477dc8..3041990cdf--- a/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs+++ b/crates/openhuman-core/src/agent/registry/agents/loader_tests_builtin_registration_tests.rs@@@ -346,11 -383,12 +346,11 @@@ fn master_agent_has_coding_hint_and_nam}ToolScope::Wildcard => panic!("orchestrator must have named tool allowlist"),}- assert_eq!(def.max_iterations, 15);+ assert_eq!(def.max_iterations, 50);- // Memory retrieval is on-demand (via the `agent_memory` subagent,- // surfaced as `delegate_retrieve_memory`), not an eager pre-turn- // pre-fetch. The allowlist entry is what makes that route reachable- // (see the `agent_memory::tools` allowlist gate).- assert_eq!(def.trigger_memory_agent, TriggerMemoryAgent::Never);+ assert!(+ !def.omit_memory_context,+ "the user-facing agent opens new sessions with the memory context"+ );}/// Regression guard for the `resolve_time` wiring. Agents that emitdiff --cc crates/openhuman-core/src/agent/session_host/runtime_session.rsindex 5c6c299aac,acc0bf804d..b052dfef3b--- a/crates/openhuman-core/src/agent/session_host/runtime_session.rs+++ b/crates/openhuman-core/src/agent/session_host/runtime_session.rs@@@ -243,73 -259,107 +251,149 @@@ impl OpenHumanTurnPreludetools: Some(tools),})}- fn begin_user_effects(&self, state: &mut OpenHumanSessionState, request: &SessionTurnRequest) {- let user_text = request.input.text();- if self.auto_save && crate::agent::turn_origin::current_is_user_authored() {- self.mutable- .lock()- .unwrap_or_else(std::sync::PoisonError::into_inner)- .pending_user_autosave = Some(user_text.clone());- }- state.last_turn_citations.clear();- if let Some(previous) = state.pending_citations.take() {- previous.abort();- }- let memory = self.memory.clone();- state.pending_citations = Some(tokio::spawn(async move {- crate::memory::agent::memory_loader::collect_recall_citations(- memory.as_ref(),- &user_text,- 5,- 0.4,- )- .await- .unwrap_or_default()- }));+ fn begin_user_effects(&self, request: &SessionTurnRequest) {+ let user_text =+ crate::agent::turn_origin::current_is_user_authored().then(|| request.input.text());+ self.mutable+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .pending_user_text = user_text;+ }++ fn build_system_prompt_tiered(&self) -> Result<crate::agent::prompts::TieredPrompt> {+ use crate::agent::prompts::{tool_call_format_from_dialect, PromptContext, PromptTool};+ let surface = self+ .tool_surface+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner);+ let specs = surface+ .visible_tool_specs+ .iter()+ .map(|spec| spec.as_ref().clone())+ .collect::<Vec<_>>();+ let instructions = self.tool_dispatcher.prompt_instructions(&specs);+ let tool_refs = surface+ .tools+ .iter()+ .chain(surface.synthesized_tools.iter())+ .map(|tool| tool.as_ref())+ .collect::<Vec<_>>();+ let mut prompt_tools = PromptTool::from_tool_refs(tool_refs.iter().copied());+ let mut visible_tool_names = surface.tool_policy_session.visible_tool_names_for_prompt();+ crate::agent::prompts::swap_deferred_for_discovery_bridge(+ &mut prompt_tools,+ &mut visible_tool_names,+ &surface.deferred_tool_names,+ );+ let agents_md = if self.config.agents_md_enabled {+ crate::agent::prompts::load_agents_md_layers(&self.workspace_dir, &self.action_dir)+ } else {+ Default::default()+ };+ let mutable = self+ .mutable+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner);+ let context = PromptContext {+ workspace_dir: &self.workspace_dir,+ model_name: &self.model_name,+ agent_id: &self.agent_definition_name,+ tools: &prompt_tools,+ workflows: &mutable.workflows,+ dispatcher_instructions: &instructions,+ visible_tool_names: &visible_tool_names,+ tool_call_format: tool_call_format_from_dialect(+ self.tool_dispatcher.tool_call_format(),+ ),+ connected_integrations: &mutable.connected_integrations,+ connected_identities_md: crate::agent::prompts::render_connected_identities(),+ user_identity: crate::security::credentials::identity::peek_credential_user_identity(),+ personality_roster: vec![],+ agents_md_global: agents_md.global,+ agents_md_local: agents_md.local,+ };+ self.context+ .lock()+ .unwrap_or_else(std::sync::PoisonError::into_inner)+ .build_system_prompt_tiered(&context)}+ async fn fetch_learned_context(&self) -> crate::agent::prompts::LearnedContextData {+ if !self.learning_enabled && !self.explicit_preferences_enabled {+ return Default::default();+ }+ if !self.learning_enabled && self.explicit_preferences_enabled {+ return crate::agent::prompts::LearnedContextData {+ user_profile: crate::memory::preferences::load_general_preferences_on(+ &self.memory,+ crate::memory::preferences::STANDING_PREFS_LIMIT,+ )+ .await,+ ..Default::default()+ };+ }+ use crate::memory::MemoryCategory;+ let observations = self+ .memory+ .list(+ Some("learning_observations"),+ Some(&MemoryCategory::Custom("learning_observations".into())),+ None,+ )+ .await+ .unwrap_or_default();+ let patterns = self+ .memory+ .list(+ Some("learning_patterns"),+ Some(&MemoryCategory::Custom("learning_patterns".into())),+ None,+ )+ .await+ .unwrap_or_default();+ let reflections = self+ .memory+ .list(+ Some(crate::agent::learning::reflection::REFLECTIONS_NAMESPACE),+ Some(&MemoryCategory::Custom(+ crate::agent::learning::reflection::REFLECTIONS_NAMESPACE.into(),+ )),+ None,+ )+ .await+ .unwrap_or_default();+ let limits = self.config.resolved_memory_limits();+ crate::agent::prompts::LearnedContextData {+ observations: observations+ .iter()+ .rev()+ .take(5)+ .map(|entry| sanitize_prelude_entry(&entry.content))+ .collect(),+ patterns: patterns+ .iter()+ .take(3)+ .map(|entry| sanitize_prelude_entry(&entry.content))+ .collect(),+ user_profile: crate::memory::preferences::load_general_preferences_on(+ &self.memory,+ crate::memory::preferences::STANDING_PREFS_LIMIT,+ )+ .await,+ reflections: reflections+ .iter()+ .rev()+ .take(10)+ .map(|entry| sanitize_prelude_entry(&entry.content))+ .collect(),+ tree_root_summaries: collect_prelude_tree_roots(+ limits.per_namespace_max_chars,+ limits.total_tree_max_chars,+ )+ .await,+ }+ }+#[cfg(test)]fn synthesized_tool_names_for_test(&self) -> std::collections::HashSet<String> {self.tool_surfacediff --cc crates/openhuman-core/src/modules/memory/capabilities.rsindex 29ffdaaa8d,29ffdaaa8d..0000000000deleted file mode 100644,100644--- a/crates/openhuman-core/src/modules/memory/capabilities.rs+++ /dev/null@@@ -1,205 -1,205 +1,0 @@@--//! Capability advertisement for the pinned `tinymemory` module release.--//!--//! See [`super`] for why capabilities are answered statically rather than--//! discovered from the loaded module on every call.----use tinymemory_api::capabilities::{Capabilities, Capability};----/// The release whose capability set [`ARTIFACT_CAPABILITIES`] was read from.--///--/// Checked against the registry pin by `the_capability_list_matches_the_pinned_release`,--/// so bumping the pin without re-reading the list is a red test rather than a--/// silent over-claim.--pub(crate) const ARTIFACT_CAPABILITIES_PIN: &str = "1.22.4";----/// The capability families the **pinned artifact** actually serves.--///--/// Deliberately not `Capabilities::all()`. `Capability::ALL` is what the--/// *contract crate this host compiles against* declares; the loaded `cdylib` is--/// a specific release and may serve fewer families.--///--/// Re-read at the published `v1.16.1` tag: its `Capability::ALL` has the--/// same 26 families in the same order as this list. No family was added.--///--/// Re-read at tag `v1.13.3`. v1.13.0 added a `MemoryEvent` variant and two--/// additive audit fields, v1.13.1 fixed the module's source-registry path,--/// v1.13.2 fixed the `Embed` wire order, and v1.13.3 fixed folder-source path--/// resolution; none of those touched families. tinymemory#110 (in v1.13.2)--/// did add `Scoring`--/// (`ExtractEntities`, `EmbedText`, `EmbedderSlug`), which the artifact serves--/// and which `as_scoring` below forwards, so it is advertised here in the same--/// change, the way `Episodic` arrived with `as_episodic`.--/// Re-read at `v1.16.1`: the capability and member declarations are unchanged--/// from `v1.16.0`, so the advertised families stay the same.--/// Re-read at `v1.16.2`: `git diff v1.16.1..v1.16.2 ----/// crates/tinymemory-api/src/capabilities.rs` is empty (the release adds--/// optional linked-module exports and nested pin bumps), so the advertised--/// families stay the same.--/// Re-read at `v1.17.0`: `git diff v1.16.2..v1.17.0 ----/// crates/tinymemory-api/src/capabilities.rs crates/tinymemory-bus/src/capabilities.rs`--/// is empty (the release adds the remote-engine factory, the hosted CortexDB--/// wire and `migrate`, none of which the module serves), so the advertised--/// families stay the same.--/// Re-read at `v1.20.0`: `git diff v1.17.0..v1.20.0 ----/// crates/tinymemory-api/src/capabilities.rs crates/tinymemory-bus/src/capabilities.rs`--/// is empty. v1.18.0 and v1.19.0 moved host-side memory code into library--/// crates, and v1.20.0 adds the hosted families on the TinyHumans wire and--/// the optional `TreeSummary::preview` (contract 4.2); none of that is a family--/// the module serves, so the advertised families stay the same.--/// Re-read at `v1.21.0`: the release adds `EpisodicPortability` (contract--/// 4.3, tinymemory#178), a new family the module serves through the--/// `ExportEpisodic` and `ImportEpisodic` members (wire slots 144 and 145) and--/// [`ModuleMemoryProvider`] forwards, so it is advertised below in the same--/// change, the way `Episodic` arrived with `as_episodic`.--/// Re-read at `v1.21.1`: `git diff v1.21.0..v1.21.1 ----/// crates/tinymemory-api/src/capabilities.rs crates/tinymemory-bus/src/capabilities.rs--/// crates/tinymemory-bus/src/names.rs` is empty. The release fixes the hosted--/// wire's episodic import (tinymemory#179), which the module does not serve,--/// so the advertised families stay the same.--/// Re-read at `v1.22.4`: `git diff v1.21.1..v1.22.4 ----/// crates/tinymemory-api/src/capabilities.rs crates/tinymemory-bus/src/capabilities.rs--/// crates/tinymemory-bus/src/names.rs` is empty. v1.22.0 drops the unread--/// usage plumbing, v1.22.1 fixes the copy's documents step (tinymemory#182),--/// v1.22.2 fixes hosted search across synced sources and a hosted copy run--/// again (tinymemory#183, #184), and v1.22.4 makes `store` return before its--/// vectors are embedded (tinymemory#189). None adds or removes a family.--///--/// Read at tag `v1.3.0`. Unchanged from v1.2.0 — the release added members--/// within existing families (`retry_failed`, the diagnostics trio,--/// `backfill_in_progress`), not families — verified with--/// `git diff v1.2.0..v1.3.0 -- crates/tinymemory-api/src/capabilities.rs`--/// returning empty. v1.2.0 is where four of the five families that v1.0.1--/// lacked arrived: `People`, `Chunks`, `Retrieval` and `Profile` all have bus--/// members there, so the under-claim that made them unreachable is over.--///--/// **`Episodic` is here in the same change that implements `as_episodic`**, as--/// the previous version of this comment required. The pinned module declares--/// the episodic methods (`InsertTurn`, `SessionTurns`, `OpenSegment`, …) and--/// [`ModuleMemoryProvider`] now forwards all of them, so the advertisement is--/// honest in both directions — the archivist writes its turns and segments--/// through this family.--///--/// **Widen this only together with the `version` bump in--/// [`super::registry`].** `the_capability_list_matches_the_pinned_release`--/// fails if the two drift.--pub(crate) const ARTIFACT_CAPABILITIES: &[Capability] = &[-- Capability::Core,-- Capability::Recall,-- Capability::Ingest,-- Capability::Documents,-- Capability::Tree,-- Capability::Entities,-- Capability::Graph,-- Capability::Diff,-- Capability::Goals,-- Capability::ToolMemory,-- Capability::Sources,-- Capability::Maintenance,-- Capability::Portability,-- // Arrived in v1.2.0. Verified against the module's declared `methods` list-- // at that tag rather than against the contract crate, which is always ahead-- // of whatever is pinned.-- Capability::People,-- Capability::Chunks,-- Capability::Retrieval,-- Capability::Profile,-- Capability::Episodic,-- // Arrived in v1.7.0 — the sync-execution and coding-session families that-- // let the host stop reaching into the engine for them. Verified against the-- // module's declared `methods` list at that tag, which serves all ten.-- Capability::SourceSync,-- Capability::CodingSessions,-- // Arrived in v1.13.2 (tinymemory#110): entity extraction, text embedding-- // and embedder identification, served by the module's engine and forwarded-- // by `MemoryScoring for ModuleMemoryProvider` below.-- Capability::Scoring,-- // Re-read at tag `v1.15.1` (tinymemory#142), one commit past v1.15.0. The-- // CortexDB adapter now asks `v1/scopes/list` for every scope instead of-- // accepting the engine's undocumented first fifty, which had been-- // truncating namespace enumeration — a live instance holding 93 listed 50,-- // and everything downstream of `namespace_summaries` reported success on-- // the subset. Behaviour inside a hosted adapter, not the module's surface:-- // `git diff v1.15.0..v1.15.1 -- crates/tinymemory-api/src/capabilities.rs-- // crates/tinymemory-bus/src/capabilities.rs crates/tinymemory-bus/src/names.rs`-- // is empty and `crates/tinymemory-module/` moves only its `Cargo.lock`, so-- // the module declares the same members it did and the list below is-- // unchanged — only the pin advances.-- //-- // Re-read at tag `v1.15.0` (tinymemory#141, openhuman#6025). The connector-- // sink now embeds a whole `accept_source_items` batch together and the-- // vendored engine claims a due `reembed_backfill` ahead of the extraction-- // backlog (tinycortex#168). Behaviour inside `Sources`/`Maintenance`, no-- // new bus member and no new family: `git diff v1.14.1..v1.15.0 ---- // crates/tinymemory-bus/src/capabilities.rs crates/tinymemory-bus/src/names.rs`-- // is empty, so the list below is unchanged and only the pin moves.-- //-- // Re-read at tag `v1.14.1` (tinymemory#136 + #137, openhuman#6012). It adds a bus-- // *member*, `BackfillConnectorTrees`, and no capability: `Capability` is the-- // family enum, and the member is a method inside `Maintenance`, which this-- // build already advertises. `git diff v1.13.8..v1.14.1 ---- // crates/tinymemory-bus/src/capabilities.rs` is empty, so nothing below moves.-- //-- // Re-read at tag `v1.13.8` (tinymemory#134, openhuman#6007): the connector-- // sync path now routes its items into the memory-tree ingest funnel, and-- // `forget_source` sweeps the per-item tree rows it creates. Behaviour inside-- // `Sources`/`Maintenance`, not a new family —-- // `git diff v1.13.7..v1.13.8 -- crates/tinymemory-api/src/capabilities.rs`-- // returns empty, so the list below is unchanged and only the pin moves.-- //-- // v1.13.7 (tinymemory#125 + #127): the typed ingestion round and the-- // answer surface, served and advertised by the pinned artifact.-- Capability::DocumentIngest,-- Capability::ConversationIngest,-- Capability::LearningIngest,-- Capability::EventIngest,-- Capability::Answer,-- // Arrived in v1.21.0 (tinymemory#178): the whole episodic record paged-- // out and written back in, for an engine switch. Forwarded by-- // `MemoryEpisodicPortability for ModuleMemoryProvider`.-- Capability::EpisodicPortability,--];----/// Escape hatch for a locally-built module.--///--/// Set `OPENHUMAN_MEMORY_MODULE_ASSUME_FULL_CAPABILITIES=1` when the loaded--/// library was built from `vendor/tinymemory/crates/tinymemory-module` rather--/// than downloaded from the pinned release — that build serves the whole--/// contract, and pinning it to the older list would hide families it does have.--/// Deliberately **not** keyed off `TINYMEMORY_TEST_MODULE`: CI sets that to the--/// downloaded `v1.0.1` artifact, so keying off it would switch the guard off in--/// exactly the lane that must exercise it.--pub(crate) fn assume_full_capabilities() -> bool {-- matches!(-- std::env::var("OPENHUMAN_MEMORY_MODULE_ASSUME_FULL_CAPABILITIES")-- .ok()-- .as_deref()-- .map(str::trim),-- Some("1") | Some("true") | Some("yes") | Some("on")-- )--}----/// The set this build will advertise for the module driver.--pub(crate) fn artifact_capabilities() -> Capabilities {-- capabilities_for(assume_full_capabilities())--}----/// The advertised set for a given override state.--///--/// Split out from [`artifact_capabilities`] so the pinned-artifact invariants--/// can be asserted on the `false` branch directly. Reading the environment--/// inside the assertion would make those tests fail for anyone who has--/// `OPENHUMAN_MEMORY_MODULE_ASSUME_FULL_CAPABILITIES=1` exported — a documented,--/// supported configuration — and mutating the variable from a test would race--/// the rest of the binary.--pub(crate) fn capabilities_for(assume_full: bool) -> Capabilities {-- if assume_full {-- return Capabilities::all();-- }-- ARTIFACT_CAPABILITIES.iter().copied().collect()--}----/// Whether the pinned artifact serves `capability`. Drives the optional--/// `as_*()` accessors so they agree with [`artifact_capabilities`].--pub(crate) fn artifact_serves(capability: Capability) -> bool {-- assume_full_capabilities() || ARTIFACT_CAPABILITIES.contains(&capability)--}diff --cc scripts/ci/agent-runtime-boundary-baseline.jsonindex d001b1aa76,02672e727d..76bd88cbc6--- a/scripts/ci/agent-runtime-boundary-baseline.json+++ b/scripts/ci/agent-runtime-boundary-baseline.json@@@ -37,7 -44,7 +44,7 @@@{"rule": "openhuman-runtime-bridge","path": "crates/openhuman-core/src/agent/tinyagents/mod.rs",- "line": 85,- "line": 86,++ "line": 87,"text": "pub(crate) use turn_runner::{run_root_turn_via_hosted_agent, run_turn_via_tinyagents_shared};","occurrence": 1},@@@ -422,21 -429,21 +429,21 @@@{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/session_host/runtime_session.rs",- "line": 247,- "text": "let user_text = crate::agent::turn_origin::current_is_user_authored()",- "line": 264,- "text": "if self.auto_save && crate::agent::turn_origin::current_is_user_authored() {",++ "line": 256,++ "text": "crate::agent::turn_origin::current_is_user_authored().then(|| request.input.text());","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/session_host/runtime_session.rs",- "line": 662,- "line": 802,++ "line": 746,"text": "workspace_descriptor: crate::agent::harness::current_parent()","occurrence": 1},{"rule": "openhuman-task-local","path": "crates/openhuman-core/src/agent/session_host/runtime_session.rs",- "line": 954,- "line": 1272,++ "line": 1040,"text": "request_id: crate::agent::turn_origin::current_request_id(),","occurrence": 1},@@@ -1052,7 -1066,7 +1059,7 @@@{"rule": "openhuman-upstream-reexport","path": "crates/openhuman-core/src/inference/mod.rs",-- "line": 47,++ "line": 48,"text": "pub use tinyinference_local::status::{","occurrence": 1},diff --cc scripts/ci/check-module-pins.mjsindex 669f42fe3b,13a40c73a5..1ea5557bca--- a/scripts/ci/check-module-pins.mjs+++ b/scripts/ci/check-module-pins.mjs@@@ -81,7 -86,8 +81,8 @@@ const PIN_MAP =tinychannels: { submodule: "vendor/tinychannels" },tinyhosts: { submodule: "vendor/tinyhosts" },tinydocs: { submodule: "vendor/tinydocs" },- tinywallet: { submodule: "vendor/tinywallet" },+ tinymemory: { submodule: "vendor/tinymemory" },+ tinywallet: { submodule: "vendor/tinywallet" },tinyjuice: { submodule: "vendor/tinyjuice" },tinyvoice: { submodule: "vendor/tinyvoice" },tinyruntime: { submodule: "vendor/tinyruntime" },diff --cc scripts/ci/check-openhuman-rust-layout.mjsindex ef4bbd4149,f5d7bca962..b03c172a25--- 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", 1563],- ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1908],++ ["crates/openhuman-core/src/agent/session_host/runtime_session.rs", 1647],// 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 indiff --cc scripts/ci/ignored-test-baseline.jsonindex 1748e39c5c,16d06c6f32..9a1ab24808--- a/scripts/ci/ignored-test-baseline.json+++ b/scripts/ci/ignored-test-baseline.json@@@ -1,7 -1,7 +1,7 @@@{"openhuman-app": 5,"openhuman-cli": 0,- "openhuman-core": 8,- "openhuman-core": 40,++ "openhuman-core": 17,"openhuman-embed": 0,"openhuman-rpc": 0,"openhuman-tinyhumans": 0,diff --cc scripts/ci/module-pin-exemptions.jsonindex 2898db97f6,f7684b700e..9202d990b0--- a/scripts/ci/module-pin-exemptions.json+++ b/scripts/ci/module-pin-exemptions.json@@@ -9,23 -9,13 +9,18 @@@"is a deliberate edit to this file, which is a reviewable diff.","","Delete an entry the moment the pins are reconciled. An exemption that has",- "stopped being true fails the gate too \u2014 `expect` must still match."+ "stopped being true fails the gate too — `expect` must still match."],"exemptions": [+ {- "id": "tinywallet",- "expect": "v0.7.2-2-g5b18a06",- "reason": "Pin carries the legacy test-file rename commits (#6903) past the release tag; re-pin to the next release of this module once its rename PR is released."++ "id": "tinymemory",++ "expect": "v1.22.4-189-g0aa4a863",++ "reason": "Memory v2 compiles against the newer TinyMemory host APIs while the downloadable module remains the verified v1.22.4 artifact. Keep the artifact version and digest pinned until a module release is published; review bus compatibility before removing this exemption."+ },{- "id": "tinyjuice",- "expect": "v0.5.1-2-gb2f7172",- "reason": "Pin carries the legacy test-file rename commits (#6903) past the release tag; re-pin to the next release of this module once its rename PR is released."- },- {- "id": "tinyvoice",- "expect": "v0.1.10-2-gb8594d5",- "reason": "Pin carries the legacy test-file rename commits (#6903) past the release tag; re-pin to the next release of this module once its rename PR is released."+ "id": "tinywallet",- "expect": "v0.7.3-2-gb539177",- "reason": "Pin carries the legacy test-file rename commits (#6903) past the release tag; re-pin to the next release of this module once its rename PR is released."++ "expect": "v0.7.3-2-gb5391776",++ "reason": "Pin carries the test-file rename commits after the v0.7.3 release; re-pin to the next tinywallet release containing them."},{"id": "tinymcp",diff --cc vendor/tinyagentsindex 53b49e5228,0e502b80bd..c981ce7669--- a/vendor/tinyagents+++ b/vendor/tinyagents@@@ -1,1 -1,1 +1,1 @@@- Subproject commit 53b49e522823b9d65e682b92f3fbe174895d97ab-Subproject commit 0e502b80bd5dff3a43178eb790ebfcc37ceb8914++Subproject commit c981ce76692ad9723b394c4cc8c3df4fc6a2e560