[Allegro] Evennia-Nexus Bridge - Real-time Event Streaming #804

Closed
opened 2026-04-04 01:24:19 +00:00 by allegro · 1 comment
Member

Objective

Connect the Evennia game server to The Nexus event system so game events (player joins, movements, commands) are streamed in real-time.

Background

Files already exist:

  • nexus/evennia_event_adapter.py
  • nexus/evennia_ws_bridge.py

These need to be wired up and tested with the live Evennia server at 167.99.126.228.

Tasks

  • Review existing evennia_event_adapter.py and evennia_ws_bridge.py
  • Update to work with the new AuditedCharacter audit events
  • Implement WebSocket connection from Nexus to Evennia
  • Stream player login/logout events
  • Stream movement events with room names
  • Stream command execution events
  • Add reconnection logic and error handling

Acceptance Criteria

  • Nexus receives real-time events from Evennia
  • Events include: player_join, player_leave, player_move, command_executed
  • Bridge survives Evennia restarts (auto-reconnect)
  • Event format documented in README
## Objective Connect the Evennia game server to The Nexus event system so game events (player joins, movements, commands) are streamed in real-time. ## Background Files already exist: - `nexus/evennia_event_adapter.py` - `nexus/evennia_ws_bridge.py` These need to be wired up and tested with the live Evennia server at `167.99.126.228`. ## Tasks - [ ] Review existing `evennia_event_adapter.py` and `evennia_ws_bridge.py` - [ ] Update to work with the new AuditedCharacter audit events - [ ] Implement WebSocket connection from Nexus to Evennia - [ ] Stream player login/logout events - [ ] Stream movement events with room names - [ ] Stream command execution events - [ ] Add reconnection logic and error handling ## Acceptance Criteria - [ ] Nexus receives real-time events from Evennia - [ ] Events include: `player_join`, `player_leave`, `player_move`, `command_executed` - [ ] Bridge survives Evennia restarts (auto-reconnect) - [ ] Event format documented in README
allegro self-assigned this 2026-04-04 01:24:19 +00:00
Author
Member

Evennia-Nexus Bridge v2 Implemented

Branch: allegro/evennia-bridge

New Event Types

Event Description
evennia.player_join Account connected (with IP)
evennia.player_leave Account disconnected (with duration + reason)
evennia.player_move Character moved between rooms
evennia.command_executed Command typed by player
evennia.audit_heartbeat Periodic academy state

Architecture

  • LogTailer: Async file watcher with rotation detection
  • Event Queue: 10k buffer between tailers and WebSocket sender
  • Auto-reconnect: Survives both Evennia and Nexus restarts
  • Fallback: Logs to stdout if WebSocket unavailable

How to run

python -m nexus.evennia_ws_bridge live \
  --log-dir /root/workspace/timmy-academy/server/logs \
  --ws ws://127.0.0.1:8765

PR submitted. Closing this issue.

## ✅ Evennia-Nexus Bridge v2 Implemented ### Branch: `allegro/evennia-bridge` ### New Event Types | Event | Description | |-------|-------------| | `evennia.player_join` | Account connected (with IP) | | `evennia.player_leave` | Account disconnected (with duration + reason) | | `evennia.player_move` | Character moved between rooms | | `evennia.command_executed` | Command typed by player | | `evennia.audit_heartbeat` | Periodic academy state | ### Architecture - **LogTailer**: Async file watcher with rotation detection - **Event Queue**: 10k buffer between tailers and WebSocket sender - **Auto-reconnect**: Survives both Evennia and Nexus restarts - **Fallback**: Logs to stdout if WebSocket unavailable ### How to run ```bash python -m nexus.evennia_ws_bridge live \ --log-dir /root/workspace/timmy-academy/server/logs \ --ws ws://127.0.0.1:8765 ``` PR submitted. Closing this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Timmy_Foundation/the-nexus#804