| """Debug dump of live session state.""" | |
| from __future__ import annotations | |
| import json | |
| from game.sim.session import GameSession | |
| from game.sim.day_cycle import Pace | |
| from game.sim.stats import summarize_director | |
| def dump_session(seed: int = 0) -> dict: | |
| s = GameSession(rng_seed=seed, pace=Pace.BRISK) | |
| s.open_shop() | |
| for _ in range(20): | |
| s.tick(0.25) | |
| return { | |
| "phase": s.day.phase.value, | |
| "wallet": s.economy.wallet, | |
| "atmosphere": s.atmosphere.snapshot, | |
| "director": summarize_director(s.director.stats), | |
| "agents": [a.to_dict() for a in s.director.agents], | |
| } | |
| if __name__ == "__main__": | |
| print(json.dumps(dump_session(), ensure_ascii=False, indent=2)) | |
| # reseal-product R16 | |