feat(driver): add HTTP routes, startup split, and binary envelope support

Wire controller messages through new modules (background tasks, runtime state,
startup) and add binary envelope handling.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-05-03 14:54:12 +12:00
parent 74b4b495f9
commit 3ee89ce3b4
6 changed files with 457 additions and 6 deletions

12
src/runtime_state.py Normal file
View File

@@ -0,0 +1,12 @@
class RuntimeState:
def __init__(self):
self.hello = True
self.ws_client_count = 0
def ws_connected(self):
self.ws_client_count += 1
self.hello = False
def ws_disconnected(self):
self.ws_client_count = max(0, self.ws_client_count - 1)
self.hello = self.ws_client_count == 0