- server/: FastAPI 협상 엔진 (5라운드, Q-Table/UCB, 페르소나 계측, :53117) - frontend/: 데모 콘솔 (React+Tailwind → nginx, /api 프록시) - eval/·testdata/: 지표 8종 측정 하네스 + 재현 가능 테스트셋 - results/: 측정 증빙 (지표별 result+provenance, raw 원본 동결+SHA256) ① 86.0 · ② 76.0 · ③ 5.99% · ⑥ p95 3.61ms · ⑦ 611만/년 · ⑧ 91/100 · ⑨ 99.71 · ⑩ 97.99 - docker-compose.yml + run.sh: backend+frontend 일괄 기동 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0112XUWF4bc3gGrEt8vsYCzy
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
"""상태 확인 엔드포인트."""
|
|
|
|
from fastapi import APIRouter, Request
|
|
|
|
from router.v1.nego.protocol import HealthResponse
|
|
|
|
router = APIRouter(tags=["admin"])
|
|
|
|
|
|
@router.get("/health", response_model=HealthResponse)
|
|
async def health_check():
|
|
return HealthResponse(status="OK", message="NEGO_AGENT server is running")
|
|
|
|
|
|
@router.get("/v1/nego/config")
|
|
async def get_config(request: Request):
|
|
"""현재 서버 설정 상태 — profiling on/off, 계측 경로 등."""
|
|
config = request.app.state.config
|
|
engine = request.app.state.engine
|
|
return {
|
|
"server": config.server.name,
|
|
"port": config.server.port,
|
|
"profiling": {
|
|
"enabled": config.profiling.enabled,
|
|
"active": engine.profiler is not None,
|
|
"model": config.openai.model,
|
|
},
|
|
"instrument": {
|
|
"tension_log": config.instrument.tension_log,
|
|
"response_time_log": config.instrument.response_time_log,
|
|
},
|
|
"cards": engine.card_script_repo.count(),
|
|
}
|