"""Shared constants for Rosetta MCP V2."""

ENV_ROSETTA_SERVER_URL = "ROSETTA_SERVER_URL"
ENV_VERSION = "VERSION"
ENV_ROSETTA_API_KEY = "ROSETTA_API_KEY"
ENV_POSTHOG_API_KEY = "POSTHOG_API_KEY"
ENV_POSTHOG_HOST = "POSTHOG_HOST"
ENV_IMS_DEBUG = "IMS_DEBUG"
ENV_INSTRUCTION_ROOT_FILTER = "INSTRUCTION_ROOT_FILTER"

DEFAULT_SERVER_URL = "http://localhost:80"
DEFAULT_VERSION = "r1"
DEFAULT_POSTHOG_HOST = "https://us.i.posthog.com"
DEFAULT_SORT_ORDER = 1_000_000

TAG_MCP_SERVER_INSTRUCTIONS = "MCP_SERVER_INSTRUCTIONS"
TAG_BOOTSTRAP = "bootstrap"

INSTRUCTION_DATASET_TEMPLATE = "aia-{version}"

XML_FILE_OPEN = '<rosetta:file id="{id}" dataset="{dataset}" name="{name}" tags="{tags}">\n'
XML_FILE_CLOSE = "</rosetta:file>\n"
XML_DATASET = '<rosetta:dataset id="{id}" name="{name}"/>\n'

ANALYTICS_MCP_SERVER = "Rosetta"
TECHNICAL_PARAMS = {
    "limit",
    "offset",
    "page",
    "compact_view",
    "model",
    "temperature",
    "max_tokens",
}

POSTHOG_PLACEHOLDER = "__POSTHOG_API_KEY_PLACEHOLDER__"
DISABLE_VALUES = {"", "NO", "DISABLED", "DISABLE", "0", "FALSE", "OFF"}

TOOL_GET_CONTEXT_INSTRUCTIONS = "get_context_instructions"
TOOL_QUERY_INSTRUCTIONS = "query_instructions"
TOOL_SUBMIT_FEEDBACK = "submit_feedback"
TOOL_QUERY_PROJECT_CONTEXT = "query_project_context"
TOOL_STORE_PROJECT_CONTEXT = "store_project_context"
TOOL_DISCOVER_PROJECTS = "discover_projects"

REPOSITORY_CACHE_TTL_SECONDS = 300
