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

[project]
name = "an-web"
version = "0.4.1"
description = "AN-Web: AI-Native Web Browser Engine — executes the web as an actionable state machine for AI agents"
readme = "README.md"
requires-python = ">=3.12"
license = { text = "Apache-2.0" }
keywords = ["browser", "ai", "web", "automation", "headless", "agent", "llm"]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.12",
    "Topic :: Internet :: WWW/HTTP :: Browsers",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Typing :: Typed",
]

dependencies = [
    "httpx>=0.27.0",
    "selectolax>=0.3.21",
    "html5lib>=1.1",
    "pydantic>=2.7.0",
    "cssselect>=1.2.0",
    "quickjs>=1.19.0",
]

[project.optional-dependencies]
dev = [
    "pytest>=8.0.0",
    "pytest-asyncio>=0.23.0",
    "pytest-cov>=5.0.0",
    "respx>=0.22.0",
    "mypy>=1.10.0",
    "ruff>=0.4.0",
]

[project.urls]
Homepage = "https://github.com/CocoRoF/an-web"
Repository = "https://github.com/CocoRoF/an-web"
Issues = "https://github.com/CocoRoF/an-web/issues"

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]

[tool.ruff]
line-length = 110
target-version = "py312"

[tool.ruff.lint]
select = ["E", "F", "I", "UP"]
ignore = ["E501"]  # Long lines in embedded JS strings and schemas are acceptable

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

[dependency-groups]
dev = [
    "pytest>=9.0.2",
    "pytest-asyncio>=1.3.0",
    "respx>=0.22.0",
]
