Honcho: route per-user chat turns onto shared bus, expose to plugins
Nightly Build / build (push) Failing after 6m13s
Nightly Build / build (push) Failing after 6m13s
The honcho memory sink needs to observe every user's completed chat turns from one subscription, keyed by ChatEvent.user_id. But each UserContext minted its own per-user ChatEventBus, so a single global subscription saw nothing. - UserContext now publishes onto the shared Runtime.event_bus (the one Skald::subscribe_chat_events reads) instead of a fresh per-user bus. - Expose that bus to plugins as PluginContext.chat_bus (distinct from system_bus, which carries only infra lifecycle events). - plugin-honcho subscribes via ctx.chat_bus. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -892,7 +892,7 @@ impl core_api::plugin::Plugin for HonchoPlugin {
|
||||
self.honcho_memory.activate(Arc::clone(&client), workspace_id.clone(), Arc::clone(&user_config));
|
||||
|
||||
let session_map = Arc::clone(&self.honcho_memory.session_map);
|
||||
let mut rx = ctx.event_bus.subscribe();
|
||||
let mut rx = ctx.chat_bus.subscribe();
|
||||
let cancel = CancellationToken::new();
|
||||
let cancel_clone = cancel.clone();
|
||||
let running = Arc::clone(&self.running);
|
||||
|
||||
Reference in New Issue
Block a user