feat: poker session history — browse, delete, and Lyra lookup

Answers three gaps: no way to delete a single poker session (only clear_all),
no way to browse past sessions, and Lyra could only see aggregate stats.

- poker.list_sessions() (per-session summary + hand count + recap flag) and
  poker.delete_session() (removes a session + its hands/reads/observations/
  stacks/rituals; keeps the persistent villain file).
- /history page (date, stakes, venue, net, hours, recap link, per-row delete with
  confirm) + /history/data + DELETE /history/{id}. Nav links from chat + HUD.
- recent_sessions read tool, added to the shared lookups so Lyra can answer
  "how'd my last few sessions go?" in either mode.
- Delete is UI/CLI only — deliberately not a Lyra tool.
- test_modes.py +2 (list/delete, recent_sessions); 44 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-20 00:21:48 +00:00
parent 35c973df05
commit e1e89c07e4
8 changed files with 223 additions and 3 deletions
+4 -3
View File
@@ -31,9 +31,10 @@ class Mode:
tools: tuple[str, ...] # tool names offered in this mode (must exist in tools.TOOLS)
# Read-only poker lookups — safe in any mode, so "how am I running this year?" or
# "what do we have on Round Mike?" works even when we're just talking.
_LOOKUPS = ("player_profile", "get_villain_file", "running_stats")
# Read-only poker lookups — safe in any mode, so "how am I running this year?",
# "what do we have on Round Mike?", or "how'd my last few sessions go?" all work
# even when we're just talking.
_LOOKUPS = ("player_profile", "get_villain_file", "running_stats", "recent_sessions")
# Always-available core tools (her own agency: journaling/notes).
_BASE = ("journal_write", "note")