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.
This commit is contained in:
ai-chess
2026-05-14 23:41:11 +03:00
parent e48f01dcb5
commit 4c5b306a9a
4 changed files with 54 additions and 8 deletions
+6 -5
View File
@@ -51,8 +51,9 @@ tmux split-window -v -p 15 -t chess:0 "tail -F $LOGS/backend.log"
( sleep 12 && curl -fsS -X POST http://127.0.0.1:7833/api/dispatch-first >/dev/null ) &
echo
echo "[ai-chess] open: http://127.0.0.1:7833/"
echo "[ai-chess] attach: tmux attach -t chess"
echo "[ai-chess] first prompt fires in ~12s (after agents boot)"
echo
tmux attach -t chess
echo "[ai-chess] открой в браузере: http://127.0.0.1:7833/"
echo "[ai-chess] первый промпт улетит белому через ~12с (после старта агентов)"
echo "[ai-chess] tmux работает в фоне; если очень хочется подцепиться руками:"
echo " tmux attach -t chess"
echo "[ai-chess] остановить: ./scripts/stop.sh (или вручную:"
echo " tmux kill-session -t chess; pkill -f 'python -m ai_chess')"
+4
View File
@@ -0,0 +1,4 @@
#!/usr/bin/env bash
# scripts/stop.sh — tear down the tmux session and backend
tmux kill-session -t chess 2>/dev/null && echo "[ai-chess] tmux session 'chess' killed" || true
pkill -f 'python -m ai_chess' 2>/dev/null && echo "[ai-chess] backend stopped" || true