WS handler: auth, heartbeat, chat subscribe/send
All checks were successful
Deploy Tracker / deploy (push) Successful in 17s
All checks were successful
Deploy Tracker / deploy (push) Successful in 17s
This commit is contained in:
parent
d8b2fb4b51
commit
c2b6099fac
@ -28,7 +28,13 @@ async def websocket_endpoint(ws: WebSocket, client_type: str = "human", client_i
|
||||
|
||||
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", {})
|
||||
|
||||
elif event == "chat.send":
|
||||
|
||||
Loading…
Reference in New Issue
Block a user