협상 카드 카탈로그 팝업 — 서버 카드 목록 API + 발동 중 하이라이트

- GET /v1/nego/cards: 일반 카드 9종(정본 nego_card.json) + 와일드카드 2종, 테스트 추가(15 통과)
- 엔진 판단 패널 '전체 카드' 버튼 → 모달: ID·이름·스크립트, 현재 발동 카드 하이라이트,
  변수 {…} 안내, 로딩·실패 상태, X/배경/ESC 닫기

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP
This commit is contained in:
민헌andClaude Fable 5 committed 2026-08-31 15:07:57 +09:00
1 parent 9f5bf64b02
commit 7bcd7a0f39
5 files changed
+166 -1

No files matched your search

+17
View File
@@ -63,6 +63,23 @@ export async function invalidateSession(sessionId: string): Promise<void> {
})
}
export interface CardInfo {
card_id: string
card_name: string
script: string
}
export interface CardCatalogResponse {
cards: CardInfo[]
wild_cards: CardInfo[]
}
export async function fetchCards(): Promise<CardCatalogResponse> {
const res = await fetch('/api/v1/nego/cards')
if (!res.ok) throw new Error(`서버 응답 오류 (${res.status})`)
return res.json()
}
export async function serverAlive(): Promise<boolean> {
try {
const res = await fetch('/api/health')