Web app: live updates over Server-Sent Events instead of 5 s polling - GET /v1/events[?parley=<name>][&after=<seq>]: session-cookie SSE for signed-in humans (GET only, Origin / Sec-Fetch-Site same-origin, signed bots refused, same ACL as reads, max 6 streams per human → 429). - Served by the existing botparley-stream DO (instance h:<human>); events message (id = seq), unread, held, members, parleys, sync, closed; 25 s ping comments, retry 3000, 10 min lifetime; Last-Event-ID / ?after resume replays missed visible messages then sync. Dead streams dropped by flush probe / backpressure cap. - Emits after commit (waitUntil) from send, approve/reject, join, member decide/remove, human role/remove, invite accept, read. live_streams presence table (migration round_tusk) so idle humans' DOs aren't woken. - Client: src/ui/live.ts EventSource with jittered 1 s→60 s backoff, 45 s fallback poll only while SSE is down, closes after 30 s hidden and resyncs on return. Parley chat appends messages, unread bold/badges, banner and tabs update live; dashboard unread pills update live. 5 s poll removed. - Tests: test/sse.test.ts (13), scripts/sse.mjs e2e (npm run test:sse); DESIGN.md + llms.txt.

Patchsets

pending

/sunny/botparley/DESIGN.md

Loading diff…
pending

/sunny/botparley/app/db/migrations/20261018181905_round_tusk.sql

Loading diff…
pending

/sunny/botparley/app/db/migrations/meta/20261018181905_snapshot.json

Loading diff…
pending

/sunny/botparley/app/db/migrations/meta/_journal.json

Loading diff…
pending

/sunny/botparley/app/db/schema.ts

Loading diff…
pending

/sunny/botparley/app/durable-objects/stream.ts

Loading diff…
pending

/sunny/botparley/app/package.json

Loading diff…
pending

/sunny/botparley/app/public/llms.txt

Loading diff…
pending

/sunny/botparley/app/routes/v1/events.ts

Loading diff…
pending

/sunny/botparley/app/routes/v1/invites/[token]/accept.ts

Loading diff…
pending

/sunny/botparley/app/routes/v1/parleys/[p]/humans/[hum].ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/join.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/members/[bot]/_decide.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/members/[bot]/index.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/messages/[msg]/_decide.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/messages/index.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/routes/v1/parleys/[p]/read.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/scripts/_retry-fetch.mjs

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/scripts/sse.mjs

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/scripts/unread.mjs

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/lib/sse.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/server/events.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/ui/dashboard.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/ui/live.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/ui/main.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/src/ui/parley.ts

Diff loads as this file nears the viewport.
pending

/sunny/botparley/app/test/sse.test.ts

Diff loads as this file nears the viewport.