[project]
name = "blackbox"
version = "0.1.0"
description = "Flight data recorder for AI coding agent sessions"
requires-python = ">=3.12"
dependencies = [
    "attrs>=24.2.0",
    "danom>=0.13.0",
    "fastapi[standard]>=0.115.0",
    "jinja2>=3.1.0",
    "sse-starlette>=2.0.0",
    "uvicorn>=0.30.0",
    "watchdog>=4.0.0",
]

[project.scripts]
blackbox = "blackbox.cli:main"

[build-system]
requires = ["uv_build>=0.7.2,<0.8"]
build-backend = "uv_build"

[tool.uv.sources]
danom = { git = "https://github.com/KRRT7/danom.git", branch = "feat/add-py-typed" }

[dependency-groups]
dev = [
    "pytest>=9.0.3",
    "pytest-cov>=6.2.1",
    "ruff>=0.15.12",
    "interrogate>=1.7.0",
    "pytest-asyncio>=1.3.0",
    "ty>=0.0.33",
    "pytest-playwright>=0.7.2",
]
typing = [
    "mypy>=1.20.2",
]

[tool.ty.environment]
python-version = "3.12"

[tool.mypy]
strict = true
warn_return_any = true
warn_unused_configs = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
markers = [
    "e2e: end-to-end browser tests (requires playwright)",
]

[tool.coverage.run]
source = ["blackbox"]
branch = true

[tool.coverage.report]
show_missing = true
skip_empty = true

[tool.interrogate]
fail-under = 100
verbose = 2

[tool.ruff]
line-length = 120

[tool.ruff.lint]
select = ["ALL"]
ignore = [
    "A",
    "ANN",
    "ARG",
    "ASYNC240",
    "COM812",
    "D",
    "E501",
    "EM",
    "FBT",
    "ISC001",
    "PLR2004",
    "RET504",
    "S",
    "SIM300",
    "TC003",
    "TRY003",
]

[tool.ruff.lint.per-file-ignores]
"tests/**" = [
    "PLC0415",
    "SIM300",
    "SLF001",
]
