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
fix: handle untracked files in memory source readers\n\nThe GitHub and RSS source readers now properly handle untracked files by checking for their existence before attempting to read them, preventing errors when files are present in the filesystem but not tracked by the memory system.\n\nAuto-committed-on: macbook\n
Steven Enamakel6f0d11f25f23
diff --git a/src/openhuman/memory/sources/readers/github.rs b/src/openhuman/memory/sources/readers/github.rsnew file mode 100644index 0000000000..474b35ba5e--- /dev/null+++ b/src/openhuman/memory/sources/readers/github.rs@@ -0,0 +1,52 @@+//! Product `Config` adapter for the engine-neutral `github` reader.++use async_trait::async_trait;++use crate::openhuman::config::Config;+use crate::openhuman::memory::sources::readers::SourceReader;+use crate::openhuman::memory::sources::types::{+ MemorySourceEntry, SourceContent, SourceItem, SourceKind,+};++pub use tinymemory_sources::readers::github::{repo_archive_source_id, repo_chunk_scope};++/// Reads `github_repo` sources by delegating to+/// [`tinymemory_sources::readers::github`].+pub struct GithubReader;++#[async_trait]+impl SourceReader for GithubReader {+ fn kind(&self) -> SourceKind {+ SourceKind::GithubRepo+ }++ async fn list_items(+ &self,+ source: &MemorySourceEntry,+ config: &Config,+ ) -> Result<Vec<SourceItem>, String> {+ tinymemory_sources::readers::SourceReader::list_items(+ &tinymemory_sources::readers::github::GithubReader,+ source,+ &config.workspace_dir,+ )+ .await+ .map_err(|error| error.to_string())+ }++ async fn read_item(+ &self,+ source: &MemorySourceEntry,+ item_id: &str,+ config: &Config,+ ) -> Result<SourceContent, String> {+ tinymemory_sources::readers::SourceReader::read_item(+ &tinymemory_sources::readers::github::GithubReader,+ source,+ item_id,+ &config.workspace_dir,+ )+ .await+ .map_err(|error| error.to_string())+ }+}diff --git a/src/openhuman/memory/sources/readers/rss.rs b/src/openhuman/memory/sources/readers/rss.rsnew file mode 100644index 0000000000..e977e14317--- /dev/null+++ b/src/openhuman/memory/sources/readers/rss.rs@@ -0,0 +1,73 @@+//! Product `Config` adapter for the engine-neutral `rss` reader.++use async_trait::async_trait;++use crate::openhuman::config::Config;+use crate::openhuman::memory::sources::readers::SourceReader;+use crate::openhuman::memory::sources::types::{+ MemorySourceEntry, SourceContent, SourceItem, SourceKind,+};++/// Reads `rss_feed` sources by delegating to+/// [`tinymemory_sources::readers::rss`].+///+/// The inner reader caches a freshly fetched feed between `list_items` and+/// `read_item`, so constructing it per trait call would turn one sync into N+1+/// downloads. That is why this one owns its delegate where the others are+/// unit structs.+pub struct RssReader {+ inner: tinymemory_sources::readers::rss::RssReader,+}++impl RssReader {+ /// Build a reader with an empty feed cache.+ #[must_use]+ pub fn new() -> Self {+ Self {+ inner: tinymemory_sources::readers::rss::RssReader::new(),+ }+ }+}++impl Default for RssReader {+ fn default() -> Self {+ Self::new()+ }+}++#[async_trait]+impl SourceReader for RssReader {+ fn kind(&self) -> SourceKind {+ SourceKind::RssFeed+ }++ async fn list_items(+ &self,+ source: &MemorySourceEntry,+ config: &Config,+ ) -> Result<Vec<SourceItem>, String> {+ tinymemory_sources::readers::SourceReader::list_items(+ &self.inner,+ source,+ &config.workspace_dir,+ )+ .await+ .map_err(|error| error.to_string())+ }++ async fn read_item(+ &self,+ source: &MemorySourceEntry,+ item_id: &str,+ config: &Config,+ ) -> Result<SourceContent, String> {+ tinymemory_sources::readers::SourceReader::read_item(+ &self.inner,+ source,+ item_id,+ &config.workspace_dir,+ )+ .await+ .map_err(|error| error.to_string())+ }+}