WS handler: auth, heartbeat, chat subscribe/send
All checks were successful
Deploy Tracker / deploy (push) Successful in 17s

This commit is contained in:
Markov 2026-02-20 19:37:16 +01:00
parent d8b2fb4b51
commit c2b6099fac

View File

@ -28,7 +28,13 @@ async def websocket_endpoint(ws: WebSocket, client_type: str = "human", client_i
event = msg.get("event") event = msg.get("event")
if event == "agent.heartbeat": if event == "auth":
# Agent auth — for now accept any token, send auth.ok
token = msg.get("token", "")
logger.info("WS auth from %s, token=%s...", ws_id, token[:8] if token else "none")
await manager.send(ws_id, "auth.ok", {"init": {}})
elif event == "agent.heartbeat":
await manager.send(ws_id, "agent.heartbeat.ack", {}) await manager.send(ws_id, "agent.heartbeat.ack", {})
elif event == "chat.send": elif event == "chat.send":