joao-paulo-santos/dsh-event-relay ↗★ 0
dsh-event-relay
Event relay: one SSE channel pushing host-side notifications to subscribed browser surfaces. Client opens the stream with the union of subscribed topic prefixes (server-side filtering) and signals reconnects via __relay/open. Change broadcasts should be DOORBELLS — topic only, no payload; consumers fetch their own truth.
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:joao-paulo-santos/dsh-event-relay说明文档
阅读完整 README ↗dsh-event-relay
The ONE host→browser push channel for DSH plugins: a single SSE route
(/relay/events) that holds every subscriber's response open and streams
JSON frames {"topic","payload"} as things happen.
Producers (host plugins)
const relay = ctx.get('eventRelay') // optional — degrade if absent
relay.publish('my-topic', payload) // direct
relay.forward('my/event') // tap an existing Cordis event (idempotent)
Consumers (browser bundles)
const relay = ctx.get('eventRelay') // provided by this package's client half
const off = relay.subscribe('kanban', (topic, payload) => { ... }) // prefix match
// or raw: new EventSource('/relay/events?topics=kanban,notifications')
Design
Transport, not a bus: Cordis events remain the host-side event system; this
only carries them across the plane boundary. Liveness, not correctness —
consumers should fall back to pull-on-focus when the relay is absent.
Route roots are composition-level contracts (/api, /plugins,
/workspace-history, /notifications, /granular-settings are taken).