feat: v4 — TUI fight loop, rate limiting, webhook tooling, expanded choreographies

- Fight loop CLI with TUI renderer (ink-style terminal UI)
- Rate limiting middleware for API routes
- Queue cooldowns wired into orchestrator after fights
- Webhook test utility for bot debugging
- API docs route
- Expanded FightScene choreographies and weapon props
- Fix Drizzle transaction execution in orchestrator
- Schema additions, scoring/challenge/mock expansions

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-07 00:14:46 +00:00
co-authored by Claude Opus 4.6
parent 2c0323d5fb
commit 4d8b18a58a
24 changed files with 2973 additions and 721 deletions
+5 -2
View File
@@ -84,11 +84,14 @@ function mapHp(hp: number, winnerId: string | null, botId: string | undefined):
return Math.round((hp / 200) * 100)
}
onUnmounted(() => { scene?.destroy(); scene = null })
onUnmounted(() => {
if (scene) { scene.destroy(); scene = null }
})
async function initScene() {
if (!canvasRef.value || !props.fight.botA || !props.fight.botB) return
if (scene) { scene.k.go('fight'); return }
// Destroy previous scene to avoid "KAPLAY already initialized" warning
if (scene) { scene.destroy(); scene = null }
const container = canvasRef.value.parentElement
if (container) {