pub struct Setup {
pub cases: Vec<CaseSeed>,
pub records: Vec<SeededRecord>,
pub history: Vec<PriorExchange>,
}Expand description
The world before the turn.
Fields§
§cases: Vec<CaseSeed>Cases the harness seeds and the actor is authorized to address.
records: Vec<SeededRecord>Things the world holds that are not cases.
A case is work in progress; many scenarios need something that is simply there, a traveler already registered or a past booking, which a case about it would misdescribe.
The library knows nothing about what a record IS. It carries a kind and a payload, and the harness that owns the domain decides what to do with them — the same bargain as a case’s state, which crosses as JSON for the same reason.
history: Vec<PriorExchange>What was already said in this conversation, oldest first.
Part of the world and not of the turn, which is why it sits here: the turn is what the person does next, and this is what they and the assistant had already said when they did it.
It is text, not a replay. Seeding an exchange does not re-run it:
nothing is journaled, no case moves, no card opens. What a previous turn
DID belongs in Self::cases, and keeping the two consistent is the
author’s job — a history saying «done» beside a case that never moved
describes a product that lies, which is a fine scenario to write on
purpose and a bad one to write by accident.