Honcho: route per-user chat turns onto shared bus, expose to plugins
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:
2026-07-20 00:07:33 +01:00
co-authored by Claude Opus 4.8
parent bee1b4cddb
commit cb1b48a15d
4 changed files with 18 additions and 2 deletions
+1
View File
@@ -187,6 +187,7 @@ impl PluginManager {
api_provider_registry: Arc::clone(skald.provider_registry()) as _,
location: Arc::clone(skald.location_manager()) as _,
system_bus: Arc::clone(skald.system_bus()),
chat_bus: Arc::clone(skald.event_bus()),
user_channel: self.skald()? as Arc<dyn core_api::user_channel::UserChannelApi>,
user_config: Arc::clone(&self.user_config) as _,
i18n: self.i18n(),