Skip to content

feat(core): add headless protocol core - #1

Merged
lutz-grex merged 9 commits into
mainfrom
feat/core-protocol
Nov 14, 2026
Merged

lutz-grex merged 9 commits into
mainfrom
feat/core-protocol

Conversation

@lutz-grex

Copy link
Copy Markdown
Contributor

Summary

Adds the headless core of the Flutter stream SDK: protocol constants, binary control message encoders, typed signalling messages and the reconnect controller. All of it is pure Dart (no WebRTC, network or UI) and is proven against the shared conformance fixtures at v0.1.0, so it behaves like @mobilerun/react.

Changes

  • lib/src/protocol/: constants generated from constants.json (generator in tool/), encoders for touch, scroll, hover, keycode, text and set-clipboard, signalling models for every client and server message with the phase-dependent ignore rules, and stream timing and data channel constants.
  • lib/src/core/: ReconnectController (backoff 1–30 s with ±25 % jitter, 6 attempts, 30 s stability refill, one heal per cycle, wake handling, target-change deferral, 45 s watchdog) driven through an injectable Scheduler and random source; TimerScheduler adapts dart:async timers.
  • conformance/: vendored fixtures plus VERSION, refreshed with tool/sync-conformance.sh TAG CLONE_PATH.
  • Package files, lints (flutter_lints, public_member_api_docs), README and a CI workflow (analyze, format check, test on Flutter 3.47.9).

Testing

  • flutter analyze and dart format --set-exit-if-changed . are clean.
  • flutter test: 230 tests pass, data-driven over every fixture case, named after the case: 127 control cases, 13 signalling examples, 22 reconnect scenarios, 24 backoff delay cases, plus constants and policy equality. Each test file asserts that executed cases equal the cases in the fixture files.
  • Breaking the heal-cycle logic on purpose makes the scenario replay fail.

Runtime

n/a — pure core, fixture-tested

@lutz-grex
lutz-grex merged commit 41e615a into main Nov 14, 2026
1 check passed
@lutz-grex
lutz-grex deleted the feat/core-protocol branch November 14, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant