[build-system]
requires = ["hatchling>=1.27"]
build-backend = "hatchling.build"

[project]
name = "datagallery-dataagent"
version = "0.2.0"
description = "Local DataAgent product built on native Deep Agents and AG-UI"
readme = "README.md"
requires-python = ">=3.11,<3.13"
dependencies = [
  "langchain==1.3.18",
  "langchain-anthropic==1.7.1",
  "langchain-core==1.6.1",
  "langsmith[otel]==0.12.5",
  "langchain-openai==1.6.0",
  "langchain-mcp-adapters==0.3.2",
  "langgraph==1.2.11",
  "langgraph-checkpoint-sqlite==3.1.1",
  "aiosqlite>=0.22,<1",
  "anyio>=4,<5",
  "ag-ui-langgraph==0.0.44",
  "ag-ui-protocol==0.1.22",
  "fastapi==0.141.1",
  "uvicorn==0.52.4",
  "pydantic>=2.12,<3",
  "python-dotenv>=1.1,<2",
  "pyyaml>=6,<7",
  "wcmatch>=11,<12",
  "jinja2>=3.1,<4",
  "sqlglot==28.1.0",
  "sqlparse>=0.5.5",
  "pymysql[rsa]>=1.1.2,<2",
  "psycopg2-binary>=2.9.10,<3",
  "json-repair>=0.63.4",
  "httpx>=0.28,<1",
  "opentelemetry-exporter-otlp-proto-http>=1.27,<2",
  "a2a-sdk[http-server]>=1.0.2",
]

[project.optional-dependencies]
all = ["datagallery-dataagent[spark,video]"]
spark = ["pyspark>=4.0,<4.1"]
video = ["av>=16,<17", "pillow>=12,<13"]

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

[dependency-groups]
dev = ["pytest>=8,<10", "pytest-asyncio>=1,<2", "pytest-xdist>=3,<4", "ruff>=0.12"]

[tool.hatch.build.targets.wheel]
packages = ["dataagent"]

[tool.hatch.build.targets.sdist]
only-include = ["dataagent", "LICENSE", "README.md", "pyproject.toml"]

[tool.pytest.ini_options]
testpaths = ["tests"]
asyncio_mode = "auto"
addopts = "-m 'not tui and not live'"
markers = [
  "live: requires explicitly configured real model credentials",
  "tui: requires a built TUI and a POSIX pseudoterminal",
]

[tool.ruff]
target-version = "py311"
line-length = 100

[tool.ruff.lint]
select = ["E4", "E7", "E9", "F", "I"]