From b7fd98c8c759e52fabfa6efce33d2100c465be72 Mon Sep 17 00:00:00 2001 From: gahusb Date: Sun, 24 May 2026 00:07:48 +0900 Subject: [PATCH] =?UTF-8?q?feat(agent-office):=20Tarot=20Pydantic=20?= =?UTF-8?q?=EB=AA=A8=EB=8D=B8=20+=20config=20=EC=B6=94=EA=B0=80=20(T2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.7 (1M context) --- agent-office/app/config.py | 6 +++++ agent-office/app/models.py | 47 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/agent-office/app/config.py b/agent-office/app/config.py index a7edf7a..c0716bd 100644 --- a/agent-office/app/config.py +++ b/agent-office/app/config.py @@ -38,3 +38,9 @@ LOTTO_DIGEST_HOUR = int(os.getenv("LOTTO_DIGEST_HOUR", "9")) LOTTO_DIGEST_MIN = int(os.getenv("LOTTO_DIGEST_MIN", "25")) LOTTO_THROTTLE_HOURS = int(os.getenv("LOTTO_THROTTLE_HOURS", "6")) LOTTO_URGENT_DAILY_MAX = int(os.getenv("LOTTO_URGENT_DAILY_MAX", "3")) + +# Tarot Lab +TAROT_MODEL = os.getenv("TAROT_MODEL", "claude-sonnet-4-6") +TAROT_COST_INPUT_PER_M = float(os.getenv("TAROT_COST_INPUT_PER_M", "3.0")) +TAROT_COST_OUTPUT_PER_M = float(os.getenv("TAROT_COST_OUTPUT_PER_M", "15.0")) +TAROT_TIMEOUT_SEC = int(os.getenv("TAROT_TIMEOUT_SEC", "60")) diff --git a/agent-office/app/models.py b/agent-office/app/models.py index 891c19f..538ca0a 100644 --- a/agent-office/app/models.py +++ b/agent-office/app/models.py @@ -1,5 +1,5 @@ -from pydantic import BaseModel -from typing import Optional +from pydantic import BaseModel, Field +from typing import Optional, List, Literal class CommandRequest(BaseModel): @@ -33,3 +33,46 @@ class ComposeCommand(BaseModel): style: Optional[str] = None model: Optional[str] = "V4" instrumental: Optional[bool] = False + + +class TarotCardDraw(BaseModel): + position: str + card_id: str + reversed: bool = False + + +class TarotInterpretRequest(BaseModel): + spread_type: Literal["one_card", "three_card"] + category: Optional[str] = None + question: Optional[str] = None + cards: List[TarotCardDraw] + cards_reference: str = Field(..., min_length=1) + context_meta: dict = Field(default_factory=dict) + + +class TarotInterpretResponse(BaseModel): + interpretation_json: dict + model: str + tokens_in: int + tokens_out: int + cost_usd: float + latency_ms: int + reroll_count: int = 0 + + +class TarotSaveRequest(BaseModel): + spread_type: Literal["one_card", "three_card"] + category: Optional[str] = None + question: Optional[str] = None + cards: List[TarotCardDraw] + interpretation_json: dict + model: str + tokens_in: int + tokens_out: int + cost_usd: float + confidence: Optional[str] = None + + +class TarotPatchRequest(BaseModel): + favorite: Optional[bool] = None + note: Optional[str] = None