resonate-state-bus-pattern-typescript

Installation
SKILL.md

Resonate State Bus Pattern (TypeScript)

Overview

A long-running Resonate workflow often needs to surface progress to a live UI. If the worker is short-lived (Cloud Function, Lambda) or scales to zero, holding an SSE or WebSocket connection for the workflow's lifetime isn't an option — the connection outlives the worker process.

The state bus pattern decouples the two sides:

  1. The workflow writes its current state to an external realtime bus via ctx.run.
  2. The browser (or any subscriber) subscribes to that bus directly.

The worker stays stateless, progress becomes durable (ctx.run guarantees it), and the UI becomes a pure read view — the workflow can run with or without anyone watching.

Mental Model

Installs
2
GitHub Stars
6
First Seen
Jun 20, 2026
resonate-state-bus-pattern-typescript — resonatehq/resonate-skills