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

[project]
name = "adk-fluent"
dynamic = ["version"]
description = "Fluent builder API for Google's Agent Development Kit (ADK)"
readme = "README.md"
license = "MIT"
requires-python = ">=3.11"
authors = [
    { name = "adk-fluent contributors" },
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: MIT License",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.11",
    "Programming Language :: Python :: 3.12",
    "Programming Language :: Python :: 3.13",
    "Framework :: Pydantic",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
    "Topic :: Software Development :: Libraries :: Python Modules",
    "Typing :: Typed",
]
keywords = ["adk", "google", "agents", "fluent", "builder", "llm"]

dependencies = [
    "google-adk>=1.20.0",
]

[project.optional-dependencies]
yaml = [
    "pyyaml>=6.0",
]
rich = [
    "rich>=13.0",
]
search = [
    "rank-bm25>=0.2.2",
]
a2a = [
    "google-adk[a2a]>=1.20.0",
]
# a2ui = ["a2ui-agent>=0.1.0"]  # Not yet published; uncomment when available
examples = [
    "python-dotenv>=1.0",
]
visual = [
    "fastapi>=0.115",
    "uvicorn>=0.34",
    "python-dotenv>=1.0",
]
dev = [
    "pytest>=7.0",
    "pytest-cov>=4.0",
    "pytest-asyncio>=1.3.0",
    "hypothesis>=6.0",
    "pyright>=1.1",
    "ruff>=0.9",
    "pre-commit>=3.0",
    "watchfiles>=0.21.0",
    "ipython>=8.0.0",
]
docs = [
    "sphinx>=7.0,<10.0.0",
    "myst-parser>=3.0",
    "sphinx-design>=0.6",
    "furo>=2024.0",
    "sphinx-copybutton>=0.5",
    "sphinxcontrib-mermaid>=1.0",
    "sphinx-autobuild>=2024.0",
    "sphinx-hoverxref>=1.4.2",
    "sphinxext-opengraph>=0.13.0",
]
pii = [
    "google-cloud-dlp>=3.12",
]
observability = [
    "opentelemetry-api>=1.20",
    "opentelemetry-sdk>=1.20",
]
temporal = [
    "temporalio>=1.7.0",
]

[project.urls]
Homepage = "https://github.com/vamsiramakrishnan/adk-fluent"
Repository = "https://github.com/vamsiramakrishnan/adk-fluent"
Issues = "https://github.com/vamsiramakrishnan/adk-fluent/issues"
Documentation = "https://vamsiramakrishnan.github.io/adk-fluent/"
Changelog = "https://github.com/vamsiramakrishnan/adk-fluent/blob/master/CHANGELOG.md"

[project.scripts]
adk-fluent = "adk_fluent.cli:main"

[project.entry-points."adk_extensions"]
fluent = "adk_fluent"

[tool.hatch.version]
path = "src/adk_fluent/_version.py"

[tool.hatch.build.targets.wheel]
packages = ["src/adk_fluent"]

[tool.hatch.build.targets.sdist]
exclude = [
    ".venv/",
    "dist/",
    ".git/",
    ".pip-cache/",
    ".pytest_cache/",
    "__pycache__/",
    "*.egg-info/",
    "manifest.json",
]

[tool.pyright]
include = [
    "src/adk_fluent/_base.py",
    "src/adk_fluent/_context.py",
    "src/adk_fluent/_helpers.py",
    "src/adk_fluent/_ir.py",
    "src/adk_fluent/_prompt.py",
    "src/adk_fluent/_routing.py",
    "src/adk_fluent/_transforms.py",
    "src/adk_fluent/_visibility.py",
    "src/adk_fluent/cli.py",
    "src/adk_fluent/viz.py",
    "src/adk_fluent/decorators.py",
    "src/adk_fluent/di.py",
    "src/adk_fluent/middleware.py",
    "src/adk_fluent/prelude.py",
    "src/adk_fluent/presets.py",
    "src/adk_fluent/backends/",
    "src/adk_fluent/testing/",
]
exclude = [
    "src/adk_fluent/agent.py",
    "src/adk_fluent/workflow.py",
    "src/adk_fluent/tool.py",
    "src/adk_fluent/config.py",
    "src/adk_fluent/runtime.py",
    "src/adk_fluent/service.py",
    "src/adk_fluent/plugin.py",
    "src/adk_fluent/executor.py",
    "src/adk_fluent/planner.py",
    "src/adk_fluent/_ir_generated.py",
    "src/adk_fluent/__init__.py",
]
pythonVersion = "3.11"
typeCheckingMode = "strict"

[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["."]
norecursedirs = ["tests/golden"]
markers = [
    "slow: marks tests that take >10s (deselect with '-m \"not slow\"')",
    "integration: marks tests requiring a full ADK install",
    "generated: marks auto-generated test scaffolds",
    "pipeline: marks tests for the codegen pipeline (generator/seed_generator/code_ir)",
    "visual: marks visual regression tests requiring API key",
]

[tool.ruff]
target-version = "py311"
line-length = 120
extend-exclude = ["*.pyi"]   # stubs use forward-ref types without imports

[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = [
    "E501",   # line length handled by formatter
    "B905",   # zip strict — not needed for 3.11+
    "SIM108", # ternary — readability preference
]

[tool.ruff.lint.per-file-ignores]
# Generated builder modules use manifest type annotations as strings
# (from __future__ import annotations) — not importable at check time.
"src/adk_fluent/agent.py" = ["F821"]
"src/adk_fluent/workflow.py" = ["F821"]
"src/adk_fluent/tool.py" = ["F821"]
"src/adk_fluent/config.py" = ["F821"]
"src/adk_fluent/runtime.py" = ["F821"]
"src/adk_fluent/service.py" = ["F821"]
"src/adk_fluent/plugin.py" = ["F821"]
"src/adk_fluent/executor.py" = ["F821"]
"src/adk_fluent/planner.py" = ["F821"]
# __init__.py is a generated re-export hub
"src/adk_fluent/__init__.py" = ["F401", "F811", "I001"]
# _base.py has re-exports at bottom of file (after BuilderBase class definition)
"src/adk_fluent/_base.py" = ["E402", "I001"]
# Generated test scaffolds use patterns ruff dislikes
"tests/generated/*.py" = ["F811", "E711", "E712", "E731"]
# Manual tests use lambdas for quick callback stubs
"tests/**/*.py" = ["E731"]
# Script sub-package __init__.py files manipulate sys.modules before imports
"scripts/*/__init__.py" = ["E402"]
# Golden files are generated snapshots — may reference forward-ref types
"tests/golden/*.py" = ["F821", "I001"]
# Examples prioritize readability over import order
"examples/**/*.py" = ["E402", "I001", "F401", "E721", "B011"]

[tool.ruff.lint.isort]
known-first-party = ["adk_fluent"]

[tool.coverage.run]
source = ["src/adk_fluent"]
omit = ["src/adk_fluent/__init__.py"]

[tool.coverage.report]
show_missing = true
skip_empty = true
fail_under = 60
exclude_lines = [
    "pragma: no cover",
    "if TYPE_CHECKING:",
    "raise NotImplementedError",
]

[dependency-groups]
dev = [
    "pytest-asyncio>=1.3.0",
]
docs = [
    "sphinx-hoverxref>=1.4.2",
    "sphinxext-opengraph>=0.13.0",
]
