feat: add human http agent

This commit is contained in:
qianrui.mmmy
2026-05-11 19:53:40 +08:00
parent e46b2b84c5
commit 6014ec0707
5 changed files with 335 additions and 41 deletions
+8
View File
@@ -152,6 +152,7 @@ class HandSummary:
board: list[Card]
actions: list[ActionRecord]
awards: list[PotAward]
showdown_hands: dict[str, list[Card]] = field(default_factory=dict)
started_at: float = field(default_factory=time)
finished_at: float = field(default_factory=time)
@@ -163,6 +164,13 @@ class HandSummary:
"board": [str(card) for card in self.board],
"actions": [record.to_dict() for record in self.actions],
"awards": [award.to_dict() for award in self.awards],
# ``showdown_hands`` is only populated when more than one player
# remained eligible for a pot; empty dict means the hand ended
# without a showdown (e.g. everyone folded but the winner).
"showdown_hands": {
player_id: [str(card) for card in cards]
for player_id, cards in self.showdown_hands.items()
},
"started_at": self.started_at,
"finished_at": self.finished_at,
}