Ordered change stream (sync)

An app declares "sync": true at the top level of forge.json and gets a per-app ordered change stream from the forge, with no dependency. A change is any JSON value (at most 8 KB) appended to a room; the forge numbers it, gap-free within the app, so every client reads the same order.

Whoever may enter the app (canEnterApp) may read and append. An app that has not declared sync answers 404 not_synced; a room name is letters, digits, _, ., - (64); an append over the rate (100 a second per app) is refused 429 (retry-after: 1); a body or value over the size is 413/422; a read-only token is 403. Rows live in <data>/changes/<app>.sqlite (bun:sqlite) on the forge, so they survive a restart. Code: src/apps/changes.ts, src/apps/room_presence.ts, src/actions/app_changes.ts; test test/app-changes.test.ts.

In the terminal: the palette's "Change stream" opens the lobby room (src/tui/screens/app_changes.ts); o picks another room, a appends a JSON value, r reads again. It goes through the same readChanges/appendChange as the API, so what is written there is what API readers see.

Not yet: a push channel (clients poll since), retention, and per-room permissions.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs