PlayerView is a typed pydantic model. RefereeView.state is dict, the raw save payload from session_state. The view that carries the most information has the least structure, and the front ends that need it most (osr-editor and osr-web's referee side) read state["dungeon_state"]["..."] by hand.
The reviewer of #97, working from the Adventure, DungeonSpec, and LevelSpec docstrings alone, got a session running and moving in one attempt and then took five attempts to read the party's position back through the referee view. That is the largest single point of friction a new front-end author hits.
Proposal: a typed RefereeView whose fields are the same groups the save serializes (party, location, dungeon state, encounter and battle state, ledger, clock, flags, journal, quests, event log), built from the session's own models rather than from a model_dump. Keep session_state for persistence. The docstrings in crawl/views.py and crawl/session.py say what the referee view contains today; the acceptance test is that every key the docstring names is a typed field. This is a schema decision for schema_version of the view if the view is serialized anywhere; check osr-web before choosing.
PlayerViewis a typed pydantic model.RefereeView.stateisdict, the raw save payload fromsession_state. The view that carries the most information has the least structure, and the front ends that need it most (osr-editor and osr-web's referee side) readstate["dungeon_state"]["..."]by hand.The reviewer of #97, working from the
Adventure,DungeonSpec, andLevelSpecdocstrings alone, got a session running and moving in one attempt and then took five attempts to read the party's position back through the referee view. That is the largest single point of friction a new front-end author hits.Proposal: a typed
RefereeViewwhose fields are the same groups the save serializes (party, location, dungeon state, encounter and battle state, ledger, clock, flags, journal, quests, event log), built from the session's own models rather than from amodel_dump. Keepsession_statefor persistence. The docstrings incrawl/views.pyandcrawl/session.pysay what the referee view contains today; the acceptance test is that every key the docstring names is a typed field. This is a schema decision forschema_versionof the view if the view is serialized anywhere; check osr-web before choosing.