Skip to content

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

docs(learning): update module table to reflect re-exported types

Steven Enamakel8afc79d11095
diff --git a/crates/openhuman-core/src/agent/learning/README.md b/crates/openhuman-core/src/agent/learning/README.md
index d4c2eebb78..9071e43277 100644
--- a/crates/openhuman-core/src/agent/learning/README.md
+++ b/crates/openhuman-core/src/agent/learning/README.md
@@ -20,7 +20,7 @@ The subsystem is organised in phases (issue #566): **Phase 1** the candidate tax
| --- | --- |
| `mod.rs` | Export-focused module root; phase docstrings + `pub use` re-exports. |
| `startup.rs` | Registers the always-on Phase 2/3/4 subscribers (signature producer, rebuild trigger + 30-min loop, `ProfileMdRenderer`) on the global event bus; idempotent, `OnceLock`-guarded (#5003). |
-| `candidate.rs` | Phase 1 taxonomy: `FacetClass`, `CueFamily` (+ `weight()`), `EvidenceRef`, `LearningCandidate`, and the bounded FIFO `Buffer` with a `global()` singleton (cap 1024). |
+| `candidate.rs` | Phase 1 taxonomy re-exported from the contract crate (`tinymemory_api::learning::{FacetClass, CueFamily, LearningCandidate}`, `tinymemory_api::host::EvidenceRef`), plus the bounded FIFO `Buffer` with a `global()` singleton (cap 1024). |
| `cache.rs` | `FacetCache` — typed wrapper over `user_profile_facets`; class↔key helpers (`class_from_key`, `key_with_class`, `class_prefix`). Delegates to the `MemoryProfile` family via `crate::memory::guard::MemoryGuard`. |
| `stability_detector.rs` | Phase 3 `StabilityDetector::rebuild` — the scoring/budget/state-assignment cycle; thresholds, half-lives, budgets, and the `stability()` formula. Publishes `CacheRebuilt`. |
| `scheduler.rs` | Periodic rebuild loop (`spawn_rebuild_loop`, default 30 min) + event-driven debounced trigger (`register_event_trigger`) subscribing to memory/tree-summarizer events. |
@@ -114,7 +114,7 @@ These are subscriber registrations rather than a single `bus.rs`; subscriptions
- `crates/openhuman-core/src/core/all.rs` — registers the `learning.*` controllers + schemas.
- `crates/openhuman-core/src/agent/harness/session/builder/factory.rs` (registers `LearnedContextSection` / `UserProfileSection` and the `ReflectionHook` when `config.learning.enabled`), `builder/helpers.rs` (`MemoryAccessSection` / `MemoryWriteSection` gated by `any_tool_offered`), `turn/context.rs` (reads the `learning_observations` / `learning_patterns` / reflections namespaces into `PromptContext.learned`), `turn/session_io_impl_01_part_02.rs` (`transcript_ingest::ingest_transcript_path`), and `agent/tinyagents/host/learning_sink.rs` (`ToolTrackerHook` + `UserProfileHook` post-turn fan-out).
- `learning::startup::register_learning_subscribers` is the entry point that wires the Phase 2/3/4 subscribers; it is invoked from `crates/openhuman-core/src/core/jsonrpc.rs` (`register_domain_subscribers`, inside the `plan.agent` block — i.e. whenever the `DomainSet` allows `DomainGroup::Agent` — guarded by `learning_first_time()`), not from the skippable `channels::runtime::startup` path — see the "why" note in `startup.rs` (#5003).
-- `crates/openhuman-core/src/modules/memory_part_01.rs` / `memory_part_03.rs` (the loadable memory module's `MemoryProfile` impl backing `FacetCache`), `integrations/composio/profile_md.rs` (`replace_managed_block`, used by `profile_md_renderer.rs`), `tools/impl/system/tool_stats.rs`, `tools/schemas.rs` — consume facet/learning types.
+- `crates/openhuman-core/src/modules/memory_part_03.rs` (`impl MemoryProfile for ModuleMemoryProvider`, the driver `FacetCache` reaches through the guard), `integrations/composio/profile_md.rs` (`replace_managed_block`, used by `profile_md_renderer.rs`), `tools/impl/system/tool_stats.rs`, `tools/schemas.rs` — consume facet/learning types.
## Notes / gotchas