undef-engine 2026-01-10
Undef Dice game, NPC handler framework, and D1 storage backends
86 files · 5,763+ · 3,971-

NPC handler framework

11 files changed
  • __init__.py Created NPC handlers package
  • base.py Added base NPC handler
  • framework.py Added NPC handler framework
  • protocols.py Added NPC handler protocols
  • bluffalo.py Added Bluffalo NPC handler
  • submission.py Added CAW submission handler
  • winner_pick.py Added CAW winner pick handler
  • debate_club.py Added Debate Club NPC handler
  • hive_mind.py Added Hive Mind NPC handler
  • sick_day.py Added Sick Day NPC handler
  • terrible_psychiatrist.py Added Terrible Psychiatrist NPC handler
  • Created NPC handler framework with base handler, protocols, and game-specific implementations instantiate behavioral
    3 files
    • base.py
    • framework.py
    • protocols.py
  • Added NPC handlers for Bluffalo, CAW, Debate Club, Dial In, Hive Mind, Peer Review, Sick Day, and Terrible Psychiatrist instantiate internal
    4 files
    • bluffalo.py
    • debate_club.py
    • hive_mind.py
    • sick_day.py

Cloudflare D1 storage backends

6 files changed
  • __init__.py Created D1 storage backend
  • auth.py D1 auth storage
  • chat.py D1 chat storage
  • content.py D1 content storage
  • sessions.py D1 session storage
  • factory.py Updated storage factory for D1
  • Added D1 storage backends for auth, chat, content, and sessions instantiate internal
    4 files
    • auth.py
    • chat.py
    • content.py
    • sessions.py
  • Updated storage factory to support D1 backend selection decouple internal
    1 file
    • factory.py

Test coverage improvements

5 files changed
  • test_handler.py Added CAW handler tests
  • test_hooks.py Added CAW hooks tests
  • test_chat_integration.py Added chat integration tests
  • test_websocket_race_conditions.py Added WebSocket race condition tests
  • test_room_privacy.py Added room privacy tests
  • Added unit tests for CAW handler, hooks, models, and properties qualify internal
    2 files
    • test_handler.py
    • test_hooks.py
  • Added integration tests for chat, WebSocket race conditions, room privacy, and spectator upgrade qualify internal
    2 files
    • test_chat_integration.py
    • test_websocket_race_conditions.py