Skip to content

feat: add WebSocket transport and migrate Telegram client#90

Draft
Gerifield wants to merge 1 commit into
mainfrom
feat/websocket-transport
Draft

feat: add WebSocket transport and migrate Telegram client#90
Gerifield wants to merge 1 commit into
mainfrom
feat/websocket-transport

Conversation

@Gerifield
Copy link
Copy Markdown
Owner

  • Add GET /ws/{session_id} handler to the bot server using coder/websocket
  • Implement thread-safe ConnectionManager (session → []conn) with Broadcast() for future server-initiated pushes (e.g. from MCP tools)
  • Add pkg/wsBotter with ConnectedClient (persistent per-session conn) and Client (reconnecting listener with exponential backoff)
  • Migrate Telegram client from HTTP to WebSocket: one ConnectedClient per chat, cached by session ID, evicted on error so next message re-dials
  • Replace background typing-indicator loop with a single SendChatAction call

- Add GET /ws/{session_id} handler to the bot server using coder/websocket
- Implement thread-safe ConnectionManager (session → []conn) with Broadcast()
  for future server-initiated pushes (e.g. from MCP tools)
- Add pkg/wsBotter with ConnectedClient (persistent per-session conn) and
  Client (reconnecting listener with exponential backoff)
- Migrate Telegram client from HTTP to WebSocket: one ConnectedClient per
  chat, cached by session ID, evicted on error so next message re-dials
- Replace background typing-indicator loop with a single SendChatAction call
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant