feat: Evennia-Nexus Bridge v2 — Live Event Streaming (#804) #807

Merged
claude merged 1 commits from allegro/evennia-bridge into main 2026-04-04 01:39:38 +00:00
Member

Summary

Upgraded the Evennia-Nexus bridge from log-playback-only to live event streaming.

Changes

nexus/evennia_event_adapter.py (v2)

  • Added player_join event — tracks account connection with IP
  • Added player_leave event — tracks disconnection with session duration + reason
  • Added player_move event — tracks room transitions
  • Added command_executed event — tracks every command with args
  • Added audit_heartbeat event — periodic academy state summary
  • Preserved all v1 event types for backward compatibility

nexus/evennia_ws_bridge.py (v2)

  • NEW: Live mode (python -m nexus.evennia_ws_bridge live)
    • Tails 4 Evennia log files simultaneously (async)
    • Parses log lines into structured Nexus events
    • Streams to Nexus WebSocket in real-time
    • Auto-reconnects on WebSocket failure
    • Falls back to local logging if websockets not installed
  • Preserved: Playback mode (python -m nexus.evennia_ws_bridge playback <file>)
    • Legacy JSONL replay still works
  • Log parsing regex for: AUDIT MOVE, AUDIT CMD, AUDIT SESSION, login/logout
  • Queue-based architecture (10k event buffer)

How to run

# Live mode — streams events from Evennia to Nexus
python -m nexus.evennia_ws_bridge live --log-dir /path/to/evennia/logs --ws ws://nexus:8765

# Playback mode — replays telemetry file
python -m nexus.evennia_ws_bridge playback session.jsonl --ws ws://nexus:8765

Closes #804

## Summary Upgraded the Evennia-Nexus bridge from log-playback-only to live event streaming. ## Changes ### `nexus/evennia_event_adapter.py` (v2) - Added `player_join` event — tracks account connection with IP - Added `player_leave` event — tracks disconnection with session duration + reason - Added `player_move` event — tracks room transitions - Added `command_executed` event — tracks every command with args - Added `audit_heartbeat` event — periodic academy state summary - Preserved all v1 event types for backward compatibility ### `nexus/evennia_ws_bridge.py` (v2) - **NEW: Live mode** (`python -m nexus.evennia_ws_bridge live`) - Tails 4 Evennia log files simultaneously (async) - Parses log lines into structured Nexus events - Streams to Nexus WebSocket in real-time - Auto-reconnects on WebSocket failure - Falls back to local logging if `websockets` not installed - **Preserved: Playback mode** (`python -m nexus.evennia_ws_bridge playback <file>`) - Legacy JSONL replay still works - Log parsing regex for: AUDIT MOVE, AUDIT CMD, AUDIT SESSION, login/logout - Queue-based architecture (10k event buffer) ## How to run ```bash # Live mode — streams events from Evennia to Nexus python -m nexus.evennia_ws_bridge live --log-dir /path/to/evennia/logs --ws ws://nexus:8765 # Playback mode — replays telemetry file python -m nexus.evennia_ws_bridge playback session.jsonl --ws ws://nexus:8765 ``` ## Closes #804
allegro self-assigned this 2026-04-04 01:38:17 +00:00
allegro added 1 commit 2026-04-04 01:38:18 +00:00
feat: upgrade Evennia-Nexus bridge for live event streaming (#804)
Some checks failed
CI / validate (pull_request) Has been cancelled
9a22d26b9c
claude merged commit 8645798ed4 into main 2026-04-04 01:39:38 +00:00
Sign in to join this conversation.