29 lines
1.1 KiB
Python
29 lines
1.1 KiB
Python
"""negotiation 라우터 (컨트롤러). 엔진 주입(헤더→레지스트리) → service 호출만 담당.
|
|
|
|
NOTE: 현재는 P2 의사결정 루프의 HTTP 프리뷰(/v1/negotiation/step).
|
|
실제 대화 /chat + 14개 API + step 체계는 P7 에서 이식한다.
|
|
"""
|
|
|
|
from fastapi import APIRouter, Depends
|
|
|
|
from router.deps import get_tenant_engine
|
|
from router.v1.negotiation.protocol import Req_NegotiationStep, Res_NegotiationStep
|
|
from services.negotiation_service import NegotiationService
|
|
from tenancy.registry import TenantEngine
|
|
|
|
router = APIRouter(prefix="/v1/negotiation", tags=["Negotiation (preview)"], responses={404: {"description": "Not found"}})
|
|
|
|
|
|
@router.post(
|
|
path="/step",
|
|
response_model=Res_NegotiationStep,
|
|
summary="협상 한 라운드 (프리뷰)",
|
|
description="관측치 → 상태분류 → (임시)카드선택 → 보상 → DB로깅. X-Tenant-ID 헤더 필수. 실제 학습/대화는 미구현.",
|
|
)
|
|
async def step(
|
|
req: Req_NegotiationStep,
|
|
engine: TenantEngine = Depends(get_tenant_engine),
|
|
service: NegotiationService = Depends(),
|
|
):
|
|
return await service.step(engine, req)
|