How artem-xox/tavern works
The Last Inn is a browser sandbox game simulating an evening at a border inn with autonomous guests. The main workflow is to open a scenario, run a live world in which guests arrive, choose activities, navigate and interact, and display the evolving evening in the browser. Guests make local or model-assisted choices; conversation turns and intentions add social and reflective behavior. The graph preserves the documented gameplay branches, but several links are based on README descriptions because their implementation files were not sampled.
Main entry points: runtime.py Live session runtime · state.py Authoritative world · lifecycle.py World lifecycle · main.ts Game interface
Components 22
Browser client
- Game interface
frontend/src/main.ts - Evening dashboard
frontend/src/dashboard.ts - Room renderer
frontend/src/scene.ts - Server connection
frontend/src/connection.ts
Session service
- HTTP API
backend/tavern/server/api.py - Session management
backend/tavern/server/sessions.py - Live session runtime
backend/tavern/server/runtime.py
Inn world
- Evening scenario
backend/tavern/evening/scenario.py - Authoritative world
backend/tavern/hall/state.py - World lifecycle
backend/tavern/hall/lifecycle.py - Room and furniture
backend/tavern/hall/room.py - Guest navigation
backend/tavern/hall/routes.py
Guest behavior
- Guest activities
backend/tavern/body/activities.py - Guest queues
backend/tavern/body/queues.py - Attention and hearing
backend/tavern/body/hearing.py
Social and AI
- Guest decisions
backend/tavern/mind/agents.py - Guest intentions
backend/tavern/mind/intentions.py - Conversation scenes
backend/tavern/social/scenes.py - Conversation turns
backend/tavern/social/turns.py - Events and memories
backend/tavern/hall/memory.py
Other components
- Player
- Jev model service
Connections 24
- Player → Game interface: plays
README.md - Game interface → Evening dashboard: renders
frontend/src/main.ts - Game interface → Room renderer: renders
frontend/src/main.ts - Game interface → Server connection: connects
frontend/src/main.ts - Server connection → HTTP API: exchanges state
- HTTP API → Session management: routes requests
- Session management → Live session runtime: manages
backend/tavern/server/sessions.py - Live session runtime → Evening scenario: opens scenario
backend/tavern/server/runtime.py - Live session runtime → Authoritative world: advances
backend/tavern/server/runtime.py - Evening scenario → Authoritative world: creates guests
backend/tavern/evening/scenario.py - World lifecycle → Authoritative world: updates
backend/tavern/hall/lifecycle.py - World lifecycle → Guest activities: runs actions
backend/tavern/hall/lifecycle.py - World lifecycle → Guest queues: updates queues
backend/tavern/hall/lifecycle.py - World lifecycle → Conversation scenes: updates scenes
backend/tavern/hall/lifecycle.py - Guest navigation → Room and furniture: finds routes
backend/tavern/hall/routes.py - Live session runtime → Guest decisions: requests choices
backend/tavern/server/runtime.py - Live session runtime → Guest intentions: requests intentions
backend/tavern/server/runtime.py - Live session runtime → Conversation turns: runs turn writing
backend/tavern/server/runtime.py - Guest decisions → Jev model service: scores options
- Conversation turns → Conversation scenes: speaks in
backend/tavern/social/turns.py - Guest activities → Events and memories: records events
backend/tavern/body/activities.py - Events and memories → Attention and hearing: emits sounds
backend/tavern/hall/memory.py - Authoritative world → Room renderer: supplies snapshot
- Authoritative world → Evening dashboard: supplies status