houserules/packages/chess/src
Joey Yakimowich-Payne 4c8e8467b7
feat(server): room-create accepts profile
Wires the T17 protocol's optional modifier profile through the server's room-create flow:

- rooms.Room gains an optional profile field; RoomRegistry.createRoom/joinRoom accept and echo it.

- GameSession constructor + GameSessionRegistry.create pass the profile through to ChessEngine's EngineOptions so modifier facts get seeded and the integration preset auto-activates at game start.

- broadcast.handleRoomCreate validates an inline profile via chess's validateProfile against the resolved layout, mapping validator codes (E_PROFILE_*) onto the wire protocol's MODIFIER_PROFILE_* family. Invalid profiles produce a non-fatal error and leave room / session state untouched; the creator is not bound.

- room.created and room.joined echo the active profile when present, so late joiners render piece modifier badges on first paint.

- RoomCreatedPayloadSchema and RoomJoinedPayloadSchema gain matching optional profile fields.

- @paratype/chess barrel: re-exports CaptureFlag + validateProfile + ModifierValidation* types so the server can consume them without reaching into internals.

Tests: 5 new cases (happy path, join echo, backward compat, INVULN_KING rejection, layout-invalid precedence). Full check green (1213/1213).
2026-04-18 22:55:24 -06:00
..
app fix(chess): use ref-based guard for shared-link auto-join to prevent StrictMode double-join 2026-04-18 16:26:35 -06:00
assets fix(chess): cylindrical board wraps every piece, plus eliminate piece image flash 2026-04-17 15:17:57 -06:00
hooks feat(chess): flesh out all six remaining stub presets 2026-04-17 16:16:11 -06:00
layouts refactor(chess): unregister Empty layout — keep as internal fixture only 2026-04-18 20:39:08 -06:00
modifiers feat(engine): hot-swap reconciliation 2026-04-18 22:48:31 -06:00
net feat(server): modifier profile protocol schemas + error codes 2026-04-18 22:43:58 -06:00
persist feat(chess): custom-layout editor + saved library (Phase E) 2026-04-18 20:20:41 -06:00
presets feat(engine): add transformMoveGenerator + modifyMoveAttrs preset hooks 2026-04-18 22:08:11 -06:00
rules feat(engine): promotion-override modifier descriptor 2026-04-18 22:22:45 -06:00
ui feat(ui): modifier profile editor shell + rules drawer entry 2026-04-18 22:35:06 -06:00
audio.ts feat(chess): polish UI with SVG pieces, motion animations, sound, and confetti 2026-04-17 12:04:56 -06:00
coord.test.ts feat(chess): add coordinate + color helpers (P2.7) 2026-04-16 14:47:04 -06:00
coord.ts feat(chess): add coordinate + color helpers (P2.7) 2026-04-16 14:47:04 -06:00
engine-presets.test.ts feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
engine.ts feat(engine): apply profile at game start 2026-04-18 22:42:27 -06:00
index.ts feat(server): room-create accepts profile 2026-04-18 22:55:24 -06:00
pgn.ts test(chess): replay 5 classic FIDE games; Phase 2 acceptance gate (P2.23) 2026-04-16 15:18:57 -06:00
schema.test.ts feat(chess): add attribute schema and piece fact shape (P2.5) 2026-04-16 14:46:27 -06:00
schema.ts feat(engine): add 6 modifier attrs to ChessAttrMap 2026-04-18 22:04:21 -06:00
starting-position.test.ts feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
starting-position.ts feat(chess): starting-layout foundation (Phase A) 2026-04-18 19:44:01 -06:00
vite-env.d.ts feat(chess): polish UI with SVG pieces, motion animations, sound, and confetti 2026-04-17 12:04:56 -06:00