mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-04-29 20:20:42 +00:00
refactor: rename state_sync namespace to webui and simplify handler event registration
- Rename /state_sync namespace to /webui throughout codebase - Remove get_event_types() from WebSocketHandler - handlers now process all events for their namespace - Replace per-event handler registration with namespace-wide registration - Add validate_event_type() class method for runtime event name validation - Update UserMessage instantiation to use keyword arguments (message=, attachments=) - Move send_data
This commit is contained in:
parent
651deac6f7
commit
a5620506d5
25 changed files with 255 additions and 258 deletions
|
|
@ -11,19 +11,6 @@ from helpers.websocket import WebSocketHandler, WebSocketResult
|
|||
class DevWebsocketTestHandler(WebSocketHandler):
|
||||
"""Test harness handler powering the developer WebSocket validation component."""
|
||||
|
||||
@classmethod
|
||||
def get_event_types(cls) -> list[str]:
|
||||
return [
|
||||
"ws_tester_emit",
|
||||
"ws_tester_request",
|
||||
"ws_tester_request_delayed",
|
||||
"ws_tester_trigger_persistence",
|
||||
"ws_tester_request_all",
|
||||
"ws_tester_broadcast_demo_trigger",
|
||||
"ws_event_console_subscribe",
|
||||
"ws_event_console_unsubscribe",
|
||||
]
|
||||
|
||||
async def process_event(
|
||||
self, event_type: str, data: Dict[str, Any], sid: str
|
||||
) -> dict[str, Any] | WebSocketResult | None:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue