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:
12
src/runtime_state.py
Normal file
12
src/runtime_state.py
Normal 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
|
||||
Reference in New Issue
Block a user