[project]
name = "marketing-intelligence"
version = "0.1.0"
description = "Marketing Intelligence AI Agent Service"
authors = [{name = "Sony Music PDE"}]
readme = "README.md"
requires-python = "==3.14.*"
dependencies = [
    "audience-common~=3.5.0",
    "ddtrace~=4.5.3",
    "fastapi~=0.135.1",
    "httpx~=0.28.1",
    "jwtauth>=0.6.1",
    "sentry-sdk[fastapi]~=2.54.0",
    "uvicorn~=0.41.0",
    # Agent / LLM
    "anthropic>=0.40.0",
    "boto3>=1.34",
    # Config / logging
    "pydantic-settings>=2.3",
    "structlog>=26.1.0",
    # Browser automation
    "playwright==1.44.0",
    "camoufox[geoip]>=0.4.11",
    "nodriver>=0.50.3",
    "drissionpage>=4.1.1.4",
    # MCP server
    "fastmcp>=2.0",
    "reportlab>=5.0.0",
]

[project.optional-dependencies]
prod = [
    "snowflake-connector-python>=3.6",
]

[dependency-groups]
dev = [
    "mypy~=1.19.1",
    "ruff~=0.15.5",
    "pytest~=9.0.2",
    "pytest-cov~=7.0.0",
    "pytest-mock~=3.15.1",
    "requests>=2.33.0",
    "respx~=0.22.0",
    "types-requests~=2.33.0",
    "pylint>=4.0.6",
]

# greenlet 3.0.3 (required by playwright 1.44.0) has no wheel for Python 3.14 on Windows.
# Override to 3.5.x which ships prebuilt wheels. Linux Docker is unaffected.
[tool.uv]
override-dependencies = ["greenlet>=3.5.0", "anyio>=4.5"]
index-strategy = "unsafe-best-match"

[tool.uv.sources]
audience-common = { index = "pde" }
jwtauth = { index = "pde" }

[[tool.uv.index]]
name = "pde"
url = "https://pypi.theorchard.io/pypi/"

[tool.mypy]
python_version = "3.14"
strict = true
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = [
    "marketing_intelligence.browser.*",
    "marketing_intelligence.evasion.*",
    "marketing_intelligence.mcp.*",
    "tests.*",
    "tests.*.*",
    "tests.*.*.*",
]
disallow_untyped_decorators = false
disallow_untyped_calls = false
disallow_any_generics = false
disallow_untyped_defs = false

[build-system]
requires = ["uv_build>=0.8.3,<0.9.0"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = ""
module-name = "marketing_intelligence"
