[host-pvp] Multi-engine host, owned-deck account seats, invites, quick match, Elo, ?v= polling (#56) #77

Merged
claude merged 3 commits from night2/host-pvp/multi-engine-host into night/2026-11-17 2026-11-18 16:13:00 +00:00
3 Commits
Author SHA1 Message Date
claude 2285f49903 Merge night/2026-11-17 into #77 (resolve server/game/index.ts with #74)
# Conflicts:
#	server/game/index.ts
2026-11-18 11:12:44 -05:00
claudeandClaude Opus 5.5 3da3e5ab84 host-pvp: quick match skips stale lobbies; draft pool only for seats (review on #77)
Re-resolve the creator's deck before seating the joiner, so a stale lobby
expires without listing the joiner, and quick match moves on to the next
candidate (or opens a lobby) instead of failing the quick-matcher.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:39:00 -05:00
claudeandClaude Opus 5.5 adc78409fe host-pvp: multi-engine host, owned-deck seats, invites, quick match, Elo, ?v= polling (#56)
- Mode schema wikideck.mode/2: required `engine` (editwar | duel); Night 1
  wikideck.mode/1 documents are rejected with a clear message. Deck policies:
  constructed (owned NFT token ids, minConfirmations), starter (Edit War only),
  draft with source preview (Edit War only) or collections. limits.rated and
  limits.accountsOnly.
- ModeHost runs every engine it is given, chosen per mode. Duel modes refuse
  loaner policies at startup (BRIEF decision 1).
- Seats: eom.dev account via Dex ID token (body or JWT bearer on seat-creating
  routes), player id sha256('acct:'+iss+'\n'+sub); guests only in Edit War.
- Constructed decks resolved through an injected OwnershipPort (#57), cards built
  by the engine's fromChain; creator's deck re-resolved at join.
- Private lobbies + invite codes (GET /invites/:code, POST /invites/:code/join),
  quick match (POST /modes/:id/quick), lobby state version with 204 on ?v=.
- Elo (1200, K 24) per mode for rated account-vs-account matches, recomputed
  from matches.jsonl; records carry engine, rated, tokens. /modes/:id/ladder.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 22:27:37 -05:00