Commit Graph
6 Commits
Author SHA1 Message Date
ai-chess ab38cda1bd feat(menu): unified home screen + ai-vs-ai/play split + human mode
Routes:
- GET /        → menu.html (new home/menu).
- GET /ai-vs-ai → old index.html (AI-vs-AI live game).
- GET /play    → same index.html; app.js detects the human side from
  bindings and enables chessground move input on that side only.
- GET /games   → unchanged.

Backend:
- coordinator: 'human' is now an allowed agent type alongside claude/codex.
  start_new_game accepts overrides[side].agent = 'human'. _send_first /
  _send_turn / watchdog skip human sides.
- POST /api/human-move: humans submit moves from the browser (UCI/SAN
  + optional comment); rejected if it's not their turn or side isn't human.
- /api/options now also returns 'all_agents' = AI agents + 'human' for the
  human-vs-AI configurator.
- pane-agent.sh: when binding agent is 'human', the pane just prints a
  note and sleeps — no claude/codex is launched for that side.

Frontend menu (new public/menu.{html,css,js}):
- 'underground tournament' aesthetic: Major Mono Display title, JetBrains
  Mono body (Google Fonts), warm gold (#c0a060) / crimson (#c04040)
  accents, subtle film-grain overlay.
- Three big mode cards: 01 AI×AI, 02 HUMAN×AI, 03 GAMES·STATS.
- Inline configurator below the cards: WHITE / VS / BLACK columns with
  agent / model / persona selects, persona description preview, swap +
  randomize tools, abort-current warning that links to /api/abort-game.
- Start button routes to /ai-vs-ai or /play depending on whether a human
  side was picked. Enter submits.
- HUD strip with tmux / stockfish / games-played counters.

app.js changes:
- Chessground constructed with viewOnly toggling; renderBoard rebuilds
  movable.color + dests = legal moves at the live FEN from chess.js for
  the human's turn only; board is read-only when scrubbing history,
  during the AI's turn, or in AI-vs-AI.
- humanSide() helper reads bindings; orientation auto-flips when the
  human plays black.
2026-05-15 01:10:47 +03:00
ai-chess 4c5b306a9a fix(mcp,start): JSON-RPC notifications return 202; no tmux attach
- mcp_post: notifications (no `id` field) → HTTP 202 with empty body,
  per streamable-HTTP MCP transport spec. Fixes rmcp 'transport channel
  closed' on codex's notifications/initialized.
- start.sh: don't attach to tmux; print URL only. Backend + tmux session
  run in background. UI is the only viewing surface.
- scripts/stop.sh: convenience teardown.
2026-05-14 23:41:11 +03:00
ai-chess 33d6af764a fix: ulid API + tolerate missing tmux + dispatch-first endpoint
- coordinator: use `ulid.new().str` (ulid-py 1.x API), not `ULID()`
- coordinator._submit: swallow tmux errors so game logic continues
- app: split first-prompt dispatch into POST /api/dispatch-first
- start.sh: POST /api/dispatch-first ~12s after tmux create
- test_coordinator: isolate GAMES_DIR via tmp_path
2026-05-14 23:34:03 +03:00
ai-chess de850a9a05 feat(scripts): start.sh — install deps, run backend, open tmux 2026-05-14 23:29:16 +03:00
ai-chess 266ff07a93 feat(scripts): pane-agent.sh launches claude/codex per side 2026-05-14 23:29:02 +03:00
ai-chess c53c666739 feat(vendor): fetch chessground/chess.js/xterm.js to public/vendor 2026-05-14 23:25:18 +03:00