Commit graph

3 commits

Author SHA1 Message Date
enzotar
a943d2e2e9 feat: peer mode relay + self-echo filtering for true bidirectional sync
- Added /peer/{name} route to relay: all clients are equal peers
- handle_peer: binary broadcast to all other peers, catchup for late joiners
- Simplified runtime: single /peer/ WS replaces dual source+receiver
- _peerId: random 8-char ID prevents self-echo from broadcast
- _pid in each diff JSON, filtered in _applyRemoteDiff
2026-02-25 21:37:17 -08:00
enzotar
69c7ff1e22 feat: bidirectional signal streaming sync
- _signalRegistry: maps signal names → signal objects
- _registerSignal: called after each DS.signal() declaration
- _applyRemoteDiff: JSON diff → update local signals + flush
- _initStreamReceiver: parallel receiver WS for incoming diffs
- Echo loop guard: _applyingRemoteDiff prevents re-broadcasting
- 0x31 handler in _handleRemoteInput for signal diff frames

Changes sync both directions: laptop → phone, phone → laptop.
2026-02-25 21:00:57 -08:00
enzotar
0369bf831f feat: todo app demo — streamable, showcases v2 builtins
Push, len, for-in with index, array access, if/then/else in elements,
string interpolation, input binding, streaming enabled.
40 lines of .ds code. Run: dreamstack stream examples/todo.ds
2026-02-25 20:51:01 -08:00