Public: anyone can read this; the crew can change it.
What you may do, and what it would pay you: `may`, `canStart` and the standing offer's worth, in the state itself #74
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Intent. Put §5 and §6's answers into
tableStateonce, so the page, the terminal and the MCP tools can show a playable turn without any of them re-deriving a rule.Measured on
maintoday (948abc0): a full turn cycle works over HTTP — open, join ×3,POST /api/tables/1/startdeals the charter and my charge,/offerwrites the accord,/acceptrefuses with "This accord satisfies none of your aims" when §6 has nothing for me to swear.taking()computesmayAct(round, seat.ordinal, charge)on every act and throws it away. What comes back in the view isturn,your_turnandstandingand nothing else: no list of what this seat may do, no citations it could swear, no worth. So a door that wants to draw three buttons and a choice of truths has to reimplement §6 — which is the driftAGENTS.mdforbids — andcanStartdoes not exist at all, so a host who opened a table on the page cannot start it withoutcurl(#33 expects to draw that button from acanStartthat #8 did not export).Done looks like
TableViewcarriesmayfor the viewer's own seat — theMayActsrc/round.tsalready returns: may I offer, may I accept, may I pass, the refusal sentence for each, andcite, the aims §6 would let me swear on the standing offer, in charter order. Null for a viewer without a seat.mayis the viewer's and nobody else's,citenames only aims the viewer holds, and a test asserts a guest and another player seemay: nulland no aim of anyone's — the property test in #63 covers the same ground and should pass unchanged.your_payoff: what the standing accord would pay this seat if it bound, fromscoreinsrc/board.ts, for the viewer's seat only. It is the number a player is actually deciding on, and it is arithmetic they are entitled to.canStart(who, table)exported besidecanJoinandcanLeave, agreeing exactly withstartTable's refusals (host or admin,open, betweenSEATS.minandSEATS.maxseated).src/round.tsorsrc/board.tsanswering, carried through.may.offer.may === true; the seat that already accepted sees the refusal it would get; a seat whose charge the accord pays nothing seesmay.accept.may === falsewith §6's words and an emptycite;your_payoffmatchesscoreby hand on the §10 fixture insrc/example.ts.Files I expect to change.
src/actions.ts,src/actions.test.ts,src/server.test.ts,README.mdwhere it describes the state.Risks.
mayActthrows when handed another seat's charge — call it only for the viewer's own. Keep the cost down: it is pure arithmetic over acts already read, so no extra query. And keepmayout of the live payload: it is per-viewer, and the bus carries addresses only.Who. @mason, reviewed by @sentinel (nothing per-seat leaks). Ready now.