feat: session_state read tool so she can see the HUD

She could write everything the HUD shows but not read most of it back (stack,
live net, alligator state, scar/confidence entries) — so "what's my live net?"
or "what's in my confidence bank?" was a memory guess.

- session_state tool returns the same bundle the HUD renders, as a readable
  summary; added to the Cash toolset.
- Cash card tells her the HUD exists, that she and it share the same data, and to
  answer where-am-I questions from session_state, never memory.
- test_modes.py +1; 42 green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 23:16:40 +00:00
parent 974ee33f71
commit 35c973df05
3 changed files with 55 additions and 2 deletions
+16
View File
@@ -159,6 +159,22 @@ def test_rituals_in_hud(lyra):
assert len(r["scars"]) == 1 and len(r["confidence"]) == 1 and len(r["resets"]) == 1
def test_session_state_readback(lyra):
_, poker, _, tools = lyra
assert "no live session" in tools.dispatch("session_state", {}, {}).lower()
poker.start_session(venue="Meadows", stakes="2/5", buy_in=500)
tools.dispatch("log_stack", {"amount": 720}, {})
tools.dispatch("confidence_bank", {"content": "great river fold"}, {})
tools.dispatch("alligator_blood", {"on": True}, {})
out = tools.dispatch("session_state", {}, {})
assert "720" in out # current stack
assert "+220" in out or "220" in out # live net
assert "Alligator Blood is ON" in out
assert "great river fold" in out
def test_rituals_require_live_session(lyra):
_, poker, _, tools = lyra
# tools degrade gracefully (no exception) when nothing is open