Skip to content

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

chore: files changed Cargo.lock,src/openhuman/memory/sources/mod.rs,src/openhuman/memory/sources/rea

Steven Enamakel90bc32acdcaa
diff --git a/Cargo.lock b/Cargo.lock
index 37a6570ee2..23e3026ffc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4166,6 +4166,7 @@ dependencies = [
"tinymemory-api",
"tinymemory-bus",
"tinymemory-core",
+ "tinymemory-sources",
"tinymemory-tinycortex",
"tinyplace",
"tinyruntime-bus",
diff --git a/src/openhuman/memory/sources/mod.rs b/src/openhuman/memory/sources/mod.rs
index 568132adf1..6534cfb582 100644
--- a/src/openhuman/memory/sources/mod.rs
+++ b/src/openhuman/memory/sources/mod.rs
@@ -1,74 +1,78 @@
-//! Host layer over [`tinymemory_core::sources`].
+//! Memory sources: the registry of connectors this workspace ingests from, the
+//! readers that pull items out of them, and the JSON-RPC surface over both.
//!
-//! The domain itself lives in the extracted crate; what stays here is its
-//! JSON-RPC surface — handlers and controller schemas name OpenHuman's
-//! `RpcOutcome` and `ControllerSchema`, which the engine crate cannot see.
-//! The glob re-export keeps every historical `memory::sources::…` path resolving.
+//! # This module no longer globs the engine (#5560)
//!
-//! # Why this glob is still here (#5560), stated so nobody re-derives it
+//! It used to be `pub use tinymemory_core::sources::*;`, which made every
+//! source read in the host a compile-time link to the memory engine. The
+//! previous revision of these docs listed three things standing in the way, and
+//! two of them are now done:
//!
-//! On its face this looks like the easiest facade in the tree to bring home:
-//! the registry it fronts is persisted in **this host's** `config.toml` under
-//! `[[memory_sources]]`, and `tinymemory_core::sources` is mostly a wrapper —
-//! `types` is `pub use tinymemory_sources::…`, `registry` wraps
-//! `tinymemory_sources::registry::SourceRegistry` with the host's config path
-//! and a write lock, and five of the seven readers (`folder`, `conversation`,
-//! `rss`, `web_page`, `github`) delegate to `tinymemory_sources::readers`.
-//! Three things stand between this file and that move, and all three are
-//! outside it:
+//! 1. **The types had a home this crate did not depend on.** They are
+//! `tinymemory-sources`', an engine-neutral crate. It is a direct dependency
+//! now — it costs no crate this manifest did not already have (no
+//! `rusqlite`, no `tinycortex`), so the unlock really was the one
+//! `Cargo.toml` line the note predicted.
+//! 2. **Two of the seven readers had no upstream twin.** `composio` and
+//! `twitter` were implemented in the engine crate but named nothing
+//! engine-shaped, so they came home unchanged. See [`readers`].
+//! 3. **`sync`, `status` and `reconcile` are wired into pieces that have not
+//! moved.** This one still stands, and is why those three are still reached
+//! from the engine by name below rather than through a glob.
//!
-//! 1. **The types have a home this crate does not depend on.** They are
-//! `tinymemory-sources`' — an engine-neutral crate the root manifest does
-//! not list. It is *reachable* without a new dependency: the `tinymemory`
-//! crate this manifest already takes re-exports it as `tinymemory::sources`
-//! behind an off-by-default `sources` feature (the network readers need
-//! `sources-network` on top). So the unlock is a feature line rather than a
-//! new entry — but it is still a `Cargo.toml` decision, not a code one.
-//! 2. **Two of the seven readers have no upstream twin.** `composio` and
-//! `twitter` are implemented in `tinymemory-core` itself. Neither reaches
-//! engine internals — both name only `sources::types`, the host `Config`
-//! and the local `SourceReader` trait — so they are portable, but they are
-//! code to move rather than a re-export to repoint.
-//! 3. **`sources::sync` and `sources::status` are wired into the pieces #5560
-//! has not moved yet.** `sync` reaches `engine::run_source_pipeline`,
-//! `engine::{needs_rebuild, rebuild_tree_from_raw}`,
-//! `queue::store::retry_all_failed`, `sync::composio` and `sync::audit`;
-//! `status` reaches `store::chunks::store::with_connection` — the ingest
-//! pipeline, the re-embed queue and the raw SQLite chunk door. (That last
-//! one is `status`', not `sync`'s; an earlier revision of this note
-//! attributed it to `sync`.) Porting the domain as it stands would move
-//! those into the host rather than behind the bus, which is the opposite of
-//! what the issue is for: a second unpoliced door spelled differently is
-//! still a second unpoliced door.
+//! ## What is still the engine's, and why each one
//!
-//! ## What is *not* blocked, so nobody looks for it here
+//! - [`sync`] reaches `engine::run_source_pipeline`, `engine::{needs_rebuild,
+//! rebuild_tree_from_raw}`, `queue::store::retry_all_failed`,
+//! `sync::composio` and `sync::audit` — the ingest pipeline, the re-embed
+//! queue and the Composio sync half.
+//! - [`status`] reaches `store::chunks::store::with_connection`, the raw SQLite
+//! chunk door. **`MemoryChunks::source_totals` is not a substitute**, and
+//! this is worth stating because it looks like one: `SourceTotal` carries
+//! `chunk_count` and `most_recent_ms` but no `chunks_pending`, and pending —
+//! "has no embedding, was not dropped, was not skipped for re-embed" — is the
+//! whole point of a sync-status row. `source_totals` also omits a source with
+//! zero chunks entirely, where `status_list` returns a row per *configured*
+//! source. Migrating onto it would compile and quietly report a healthy
+//! store. The ask upstream is a pending count.
+//! - [`reconcile`] is Composio source reconciliation, so it moves with
+//! `sync::composio`.
//!
-//! The RPC layer above this glob no longer names the engine at all. [`rpc`]
-//! moved its coding-session, raw-archive-coverage, audit-log and sync-price
-//! calls onto `MemoryCodingSessions` / `MemorySourceSync` when tinymemory
-//! v1.7.0 added them, so the two references left in this domain are the two in
-//! *this file*. Neither is a call site anyone can reroute: they are the shim
-//! itself.
+//! Porting those as they stand would move the ingest pipeline and the raw
+//! chunk door *into* the host rather than behind the bus, which is the opposite
+//! of what #5560 is for: a second unpoliced door spelled differently is still a
+//! second unpoliced door.
//!
-//! The unlock for them is a **manifest** decision, not a code one, and it has
-//! not changed — `tinymemory` re-exports the types as `tinymemory::sources`
-//! behind an off-by-default `sources` feature (`sources-network` on top for the
-//! network readers) that the root `Cargo.toml` does not enable, and even with
-//! it on, points 2 and 3 above still stand.
-//!
-//! So this stays until the queue and the sync pipeline go behind the module.
-//! `MemorySourceSink` is not the answer either — it is `accept_source_items` +
-//! `forget_source` + `forget_matching`, an *ingest* door, with no listing or
-//! CRUD member for a configured connector. And it is the *whole* of
-//! `Capability::Sources`: there is no `MemorySources` family in the contract,
-//! so a listing member is an upstream ask, not a call site nobody routed.
-
-pub use tinymemory_core::sources::*;
+//! `MemorySourceSink` is not the answer for the registry either — it is
+//! `accept_source_items` + `forget_source` + `forget_matching`, an *ingest*
+//! door with no listing or CRUD member for a configured connector, and it is
+//! the whole of `Capability::Sources`. A listing member would be an upstream
+//! ask; the registry did not need one, because the file it reads is this
+//! host's own.
+pub mod readers;
+pub mod registry;
pub mod rpc;
pub mod schemas;
-pub use tinymemory_core::sources::apply_kind_defaults;
+/// The source vocabulary, from the crate that defines it.
+pub mod types {
+ pub use tinymemory_sources::types::{
+ ContentType, MemorySourceEntry, SourceContent, SourceItem, SourceKind,
+ };
+}
+
+pub use registry::{
+ apply_kind_defaults, list_sources, memory_sync_defaults_for_toolkit, upsert_composio_source,
+ ComposioUpsertTarget, MemorySourcePatch,
+};
+pub use types::{ContentType, MemorySourceEntry, SourceContent, SourceItem, SourceKind};
+
+// ── Still the engine's ──────────────────────────────────────────────────────
+//
+// Named rather than globbed, so `grep tinymemory_core` in this domain is an
+// honest inventory of what is left. See the module docs for what blocks each.
+pub use tinymemory_core::sources::{reconcile, status, sync};
// The controller aggregators this domain's RPC surface defines. Aliased
// exactly as the pre-extraction module exported them.
diff --git a/src/openhuman/memory/sources/readers/composio_tests.rs b/src/openhuman/memory/sources/readers/composio_tests.rs
index f7f334b100..aab0d33a07 100644
--- a/src/openhuman/memory/sources/readers/composio_tests.rs
+++ b/src/openhuman/memory/sources/readers/composio_tests.rs
@@ -32,7 +32,7 @@ fn test_source() -> MemorySourceEntry {
#[tokio::test]
async fn list_items_returns_connection_as_item() {
let reader = ComposioReader;
- let config = TestHostConfig::default();
+ let config = Config::default();
let items = reader.list_items(&test_source(), &config).await.unwrap();
assert_eq!(items.len(), 1);
assert_eq!(items[0].id, "cmp_123");
diff --git a/src/openhuman/memory/sources/readers/twitter_tests.rs b/src/openhuman/memory/sources/readers/twitter_tests.rs
index 15239bf71e..0d0e392774 100644
--- a/src/openhuman/memory/sources/readers/twitter_tests.rs
+++ b/src/openhuman/memory/sources/readers/twitter_tests.rs
@@ -32,7 +32,7 @@ fn twitter_source() -> MemorySourceEntry {
async fn list_items_returns_not_configured_error() {
let reader = TwitterReader;
let result = reader
- .list_items(&twitter_source(), &TestHostConfig::default())
+ .list_items(&twitter_source(), &Config::default())
.await;
assert!(result.is_err());
assert!(result.unwrap_err().contains("not yet configured"));