Class WsHandler

java.lang.Object
com.tnsai.server.ws.WsHandler

public final class WsHandler extends Object
WebSocket event handler. Bridges incoming client events to the agent framework and streams LLM responses (with tool execution) back as protocol v1 events.

Phase 2: Full tool execution loop via agent.streamChatWithTools(), with risk-based approval via WsToolApprovalFilter and tool event broadcasting via WsToolCallListener.

Phase 6: Autonomy level management and audit trail integration.

  • Constructor Details

  • Method Details

    • onConnect

      public void onConnect(io.javalin.websocket.WsConnectContext ctx)
    • onClose

      public void onClose(io.javalin.websocket.WsCloseContext ctx)
    • onError

      public void onError(io.javalin.websocket.WsErrorContext ctx)
    • onMessage

      public void onMessage(io.javalin.websocket.WsMessageContext ctx)
    • shutdown

      public void shutdown()