The baseball feed is driven by a manual scorekeeper. A scout works a board where each play spans
pitch → end; runs, outs, and bases are asserted by hand. The inning never advances automatically — an explicit inning_advance press does it.Game state
Every WebSocket frame carries a fullGameState snapshot. The history backfill returns events only — to rebuild this state from the log, replay the events; each event’s entry below specifies its exact effect on state. Fields are camelCase on the wire. See the Sports overview for the conventions and cross-sport events (score_set, game_end, undo) shared across every sport.
Score
Inning clock
Baseball counts outs, not a run clock. The inning advances on an explicitinning_advance press.
Baserunners
The bases are confirmed-runner flags, not verified occupancy, and carry no runner identities.true means the scout has confirmed a runner safe on that base. false means no confirmed runner — an absence of a claim (never marked, cleared by contact or a half-inning advance, or retracted) — not a statement that the base was checked and found empty. Read the flags as the scoring threat the scout has confirmed so far, not as a complete picture of who is on base.
Bases
Play flags
These fields track the manual scorekeeper’s open-play span (pitch → end).
Enum values
Half values
Events
The scout operates as a manual scorekeeper. A “play” spanspitch → end; runs, outs, and bases are asserted by hand. The inning never advances automatically — an explicit inning_advance press does it.
Play lifecycle
pitch — open a play
pitch — open a play
The pitcher begins the delivery — a play is live. The press is anchored at the start of the delivery, not at release: it is the earliest warning that an outcome may be imminent. Sets
live and clears the per-play contact/hr flags. Does nothing if a play is already open or the half-inning already has three outs.No payload fields.end — close the play
end — close the play
The play is over. Clears
live and the per-play contact/hr flags. Does nothing when no play is open.No payload fields.Within a live play
contact — batter makes contact
contact — batter makes contact
The batter makes bat-on-ball contact. This claims contact only — at press time fair or foul (let alone a safe reach) is not yet known, so it is not the official “hit” statistic: contact can resolve into an out, an error, or a foul closed by
end with nothing else recorded. Sets the contact flag, which a home_run press requires, and clears every base — a ball off the bat puts every runner’s safety back in question, so the scout re-marks who’s safe with set_base rather than the feed assuming everyone advances. (A following home_run press still credits the runners who were on base at the moment of contact — the clear doesn’t cost them their runs.) Runs are credited separately with run/home_run. Does nothing unless a play is live.No payload fields.out — record one out
out — record one out
Records one out within the live play. Recording the third out does not advance the half-inning on its own — wait for an explicit
inning_advance. Does nothing unless a play is live.No payload fields.run — credit one run
run — credit one run
Credits one run to the batting side (top = side B, bottom = side A). It detects a walk-off right away: if the home side takes the lead in the ninth inning or later, the game ends. Does nothing unless a play is live.No payload fields.
home_run — bases-clearing homer
home_run — bases-clearing homer
A home run: scores every confirmed runner plus the batter, then clears the bases. Requires recorded
contact this play, and fires once per play. It also ends the game on a walk-off. Does nothing otherwise.No payload fields.Baserunners
set_base — mark a runner safe on a base
set_base — mark a runner safe on a base
Sets one base’s confirmed-runner flag.
occupied: true asserts the scout confirmed a runner safe on the base; occupied: false retracts that claim — it means no confirmed runner, not that the base was checked and found empty. Operationally: on a steal/advance, clear the old base and set the next one only once the runner is confirmed safe; if the runner is out, send false and report the out via out. Absolute, so re-sending is harmless. Editable any screen except the next-inning prompt (the bases are about to clear).inning_advance — advance the half-inning
inning_advance — advance the half-inning
Advances the inning clock: top → bottom (same inning) or bottom → top (next inning). Resets outs and clears the bases. Ends the game when the side that just finished batting in the ninth inning or later trails.Does nothing during a live play.No payload fields.
Corrections
score_set — manual score correction
score_set — manual score correction
Overwrites the run totals. Scoring continues from the new values.
game_end — game is final
game_end — game is final
Terminal: sets
final. Consumers should close the WebSocket after receiving this — no further frames will arrive.No payload fields.undo — retract last press
undo — retract last press
Retracts the most recent scout press. Both the original press and the
undo appear in /history as raw events — a client replaying the log resolves it there: each undo cancels the most recent non-undo event.The scout sends no payload fields; the served payload carries the server-stamped retractsSeq — the seq of the press the undo cancelled (null when nothing remained) — on the live frame and in /history alike, so a display can strike the retracted row without replaying.