Add real-time WebSocket connection to Hermes gateway #210

Closed
opened 2026-03-24 04:30:09 +00:00 by Timmy · 2 comments
Owner

Replace the WebSocket stub (ws-client.js) with a real connection attempt to the Hermes gateway on the VPS. Handle: connect, reconnect with backoff, message routing. On message, dispatch to appropriate handler (chat, status update, PR notification).
Files: ws-client.js, app.js

Replace the WebSocket stub (ws-client.js) with a real connection attempt to the Hermes gateway on the VPS. Handle: connect, reconnect with backoff, message routing. On message, dispatch to appropriate handler (chat, status update, PR notification). Files: ws-client.js, app.js
Timmy added the p1-important3d-world labels 2026-03-24 04:30:09 +00:00
claude self-assigned this 2026-03-24 04:30:31 +00:00
Member

PR created: #216

Replaced the stub WebSocket (wss://localhost:8080) with a real connection to the Hermes gateway at ws://143.198.27.163/api/world/ws. Changes:

  • Exponential backoff reconnect (up to 10 attempts, 30s max)
  • Lifecycle events: ws-connected, ws-disconnected, ws-failed
  • Message routing for chat/chat-message, status-update, pr-notification, player-joined, player-left
  • Added status-update and pr-notification listeners in app.js
PR created: #216 Replaced the stub WebSocket (`wss://localhost:8080`) with a real connection to the Hermes gateway at `ws://143.198.27.163/api/world/ws`. Changes: - Exponential backoff reconnect (up to 10 attempts, 30s max) - Lifecycle events: `ws-connected`, `ws-disconnected`, `ws-failed` - Message routing for `chat`/`chat-message`, `status-update`, `pr-notification`, `player-joined`, `player-left` - Added `status-update` and `pr-notification` listeners in `app.js`
Timmy closed this issue 2026-03-24 04:36:06 +00:00
Member

PR created: #225

Summary of changes:

  • ws-client.js: replaced stub with real Hermes gateway connection to wss://143.198.27.163/api/world/ws
    • Exponential-backoff reconnect (up to 10 attempts, 30 s cap)
    • Routes chat-message, status-update, pr-notification, player-joined, player-left to window CustomEvents
    • Emits ws-connected / ws-disconnected / ws-failed lifecycle events
    • _destroyed flag ensures intentional disconnect() permanently halts reconnect loop
    • Uses wss:// for encrypted transport
  • app.js: added handlers for status-update and pr-notification events
PR created: #225 Summary of changes: - `ws-client.js`: replaced stub with real Hermes gateway connection to `wss://143.198.27.163/api/world/ws` - Exponential-backoff reconnect (up to 10 attempts, 30 s cap) - Routes `chat-message`, `status-update`, `pr-notification`, `player-joined`, `player-left` to window CustomEvents - Emits `ws-connected` / `ws-disconnected` / `ws-failed` lifecycle events - `_destroyed` flag ensures intentional `disconnect()` permanently halts reconnect loop - Uses `wss://` for encrypted transport - `app.js`: added handlers for `status-update` and `pr-notification` events
Sign in to join this conversation.
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#210