"""Type definitions for the Tokengrip SDK."""

from __future__ import annotations

from typing import Any, Dict, Optional

try:
    from typing import TypedDict
except ImportError:
    from typing_extensions import TypedDict  # type: ignore[assignment]


class TrackUsagePayload(TypedDict, total=False):
    """Payload sent to the Tokengrip tracking API.

    Field names use camelCase to match the server's Zod schema.
    """

    provider: str
    model: str
    inputTokens: int
    outputTokens: int
    totalTokens: int
    latencyMs: int
    projectId: str
    agentName: str
    taskType: str
    metadata: Dict[str, Any]
    promptContent: str
    responseContent: str


class WrapOptions(TypedDict, total=False):
    """Options for AI client wrappers."""

    project_id: str
    agent_name: str
    task_type: str
    capture_content: bool
