Skip to content

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

fix(core): remove duplicate bus module in memory

Steven Enamakelc340d85a892c
diff --git a/crates/openhuman-core/src/core/bus.rs b/crates/openhuman-core/src/core/bus.rs
index 2b98a90c82..bbb3efb305 100644
--- a/crates/openhuman-core/src/core/bus.rs
+++ b/crates/openhuman-core/src/core/bus.rs
@@ -75,7 +75,15 @@ pub const EVENTS_INTERFACE: &str = "ai.tinyhumans.openhuman.Events";
/// `1.6.0` retired `SubconsciousTriggerProcessed`, which nothing published
/// after the background-reasoning engine was removed.
/// `1.7.0` added `MemoryDriverChanged` (memory-engine switch, additive).
-pub const EVENTS_VERSION: Version = Version::new(1, 7, 0);
+/// `1.8.0` is memory v2: it retires the v1 memory, memory-diff, memory-tree,
+/// tree-summarizer and learning variants (`MemoryDriverBindFailed`,
+/// `MemoryDriverChanged`, `MemoryGuardDenied`, `MemorySyncRequested`,
+/// `MemorySyncStageChanged`, `MemoryIngestionStarted`/`Completed`,
+/// `MemoryDiff*`, `DocumentCanonicalized`, `TreeSummarizer*`,
+/// `MemoryTreeBuildProgress`, `CacheRebuilt`) — nothing publishes them any
+/// more — and adds `ConversationTurnCommitted` (memory's conversation
+/// ingestion) and `CronSystemJobDue` (host-owned cron jobs).
+pub const EVENTS_VERSION: Version = Version::new(1, 8, 0);
/// The bus. Initialised once by [`init`]; safe to touch before that.
pub static BUS: OnceBus<DomainEvent> = OnceBus::new();
diff --git a/crates/openhuman-core/src/memory/bus.rs b/crates/openhuman-core/src/memory/bus.rs
index b38b4f62bc..a289fa1c2c 100644
--- a/crates/openhuman-core/src/memory/bus.rs
+++ b/crates/openhuman-core/src/memory/bus.rs
@@ -41,6 +41,7 @@ pub fn committed_turn(event: &DomainEvent) -> Option<CommittedTurn> {
user_text,
assistant_text,
tool_calls,
+ ..
} = event
else {
return None;
@@ -49,8 +50,8 @@ pub fn committed_turn(event: &DomainEvent) -> Option<CommittedTurn> {
thread_id: thread_id.clone(),
agent_id: agent_id.clone(),
workspace: workspace.clone(),
- user: user_text.0.clone(),
- assistant: assistant_text.0.clone(),
+ user: user_text.clone(),
+ assistant: assistant_text.clone(),
tool_calls: tool_calls
.iter()
.map(|call| ToolCallRef {
@@ -78,7 +79,10 @@ impl EventHandler<DomainEvent> for ConversationIngestSubscriber {
let Some(turn) = committed_turn(event) else {
return;
};
- match crate::config::rpc::load_config_with_timeout().await {
+ let DomainEvent::ConversationTurnCommitted { workspace_dir, .. } = event else {
+ return;
+ };
+ match crate::config::rpc::load_config_for_workspace_with_timeout(workspace_dir).await {
Ok(config) => super::conversations::record_turn(&config, turn).await,
Err(error) => tracing::debug!(error = %error, "[memory:bus] config unavailable; turn dropped"),
}