content: [project]
  name = "adk-agui-middleware"
  version = "1.4.2"
  description = "Python middleware bridging Google ADK agents with AGUI protocol via Server-Sent Events for real-time agent interactions"
  readme = "README.md"
  requires-python = ">=3.10"
  license = {file = "LICENSE"}
  authors = [
      {name = "denny_lee", email = "denny_lee@trendmicro.com"},
  ]
  maintainers = [
      {name = "denny_lee", email = "denny_lee@trendmicro.com"},
  ]
  keywords = ["agent", "middleware", "sse", "fastapi", "google-adk", "agui"]
  classifiers = [
      "Development Status :: 3 - Alpha",
      "Intended Audience :: Developers",
      "License :: OSI Approved :: MIT License",
      "Operating System :: OS Independent",
      "Programming Language :: Python :: 3",
      "Programming Language :: Python :: 3.10",
      "Programming Language :: Python :: 3.11",
      "Programming Language :: Python :: 3.12",
      "Programming Language :: Python :: 3.13",
      "Topic :: Software Development :: Libraries :: Python Modules",
      "Topic :: Internet :: WWW/HTTP :: HTTP Servers",
      "Topic :: Scientific/Engineering :: Artificial Intelligence",
  ]
  dependencies = [
      "ag-ui-protocol>=0.1.7",
      "google-adk>=1.9.0",
      "pydantic>=2.11.7",
      "pydantic-settings>=2.10.1",
      "fastapi>=0.104.0",
      "sse-starlette>=1.6.5",
      "jsonpatch>=1.33",
  ]
  
  [dependency-groups]
  dev = [
      "mypy>=1.17.1",
      "ruff>=0.12.8",
      "coverage>=7.0.0",
      "bandit[toml]>=1.7.0",
      "pytest>=8.0.0",
      "pytest-asyncio>=0.23.0",
      "pytest-cov>=4.0.0",
      "httpx>=0.25.0",
  ]
  
  [project.urls]
  Homepage = "https://github.com/trendmicro/adk-agui-middleware"
  Repository = "https://github.com/trendmicro/adk-agui-middleware.git"
  Documentation = "https://github.com/trendmicro/adk-agui-middleware#readme"
  "Bug Tracker" = "https://github.com/trendmicro/adk-agui-middleware/issues"
  
  [build-system]
  requires = ["hatchling"]
  build-backend = "hatchling.build"
  
  [tool.hatch.build.targets.wheel]
  packages = ["src/adk_agui_middleware"]
  
  [tool.hatch.build.targets.sdist]
  include = [
      "/src",
      "/README.md",
      "/LICENSE",
      "/pyproject.toml",
  ]
  # ---------------- Ruff ----------------
  
  [tool.ruff]
  line-length = 88
  target-version = "py313"
  src = ["src"]
  exclude = ["tests"]
  
  [tool.ruff.lint.isort]
  combine-as-imports = true
  force-single-line = false
  lines-after-imports = 2
  
  [tool.ruff.format]
  quote-style = "double"
  indent-style = "space"
  skip-magic-trailing-comma = false
  line-ending = "auto"
  docstring-code-format = true
  
  [tool.ruff.lint]
  # Enable comprehensive linting rules for high code quality
  select = [
      "E", # pycodestyle errors – PEP 8 outright violations (indentation, whitespace, etc.)
      "W", # pycodestyle warnings – stylistic issues like excessive line length
      "F", # Pyflakes – logical errors (unused imports, undefined names, etc.)
      "UP", # pyupgrade – suggest modern Python syntax (f-strings, pathlib, etc.)
      "B", # flake8-bugbear – common bugs and design problems
      "SIM", # flake8-simplify – propose simpler, more readable constructs
      "I", # isort – import grouping and ordering
      "N", # pep8-naming – enforce naming conventions
      "C90", # mccabe – cyclomatic complexity checks
      "ARG", # flake8-unused-arguments – detect unused or redundant arguments
      "S", # flake8-bandit – security-oriented code issues
      "T20", # flake8-print – forbid stray print/debug statements
      "RET", # flake8-return – ensure explicit and consistent return patterns
      "ICN", # flake8-import-conventions – enforce import aliasing rules (e.g., `import numpy as np`)
      "PIE", # flake8-pie – miscellaneous correctness & readability improvements
      "PL", # Pylint subset – broader code-quality checks (convention, error, refactor, warning)
      "TRY", # tryceratops – encourage explicit, focused exception handling
      "FLY", # flynt – suggest converting old string formatting to f-strings
      "PERF", # perflint – flag patterns with measurable performance overhead
      "ANN" # flake8-annotations – enforce type annotations for function signatures
  ]
  
  ignore = [
      "UP047",  # Generic function `create_function_with_params` should use type parameters
  
      "E501",   # line-too-long
  
      "COM819", # prohibited-trailing-comma
  
      "TRY003", # raise-vanilla-args (avoid specifying long messages outside the exception class)
  
      "PERF203", # try-except-in-loop (try-except within a loop incurs performance overhead)
  
      "ANN204", # missing-return-type-special-method
      "ANN401", # any-type (dynamically typed expressions (typing.Any) are disallowed)
  ]
  
  # Configure pydocstyle to use Google docstring convention
  [tool.ruff.lint.pydocstyle]
  convention = "google" # Use Google-style docstrings (Args:, Returns:, Raises:)
  
  [tool.ruff.lint.mccabe]
  max-complexity = 10
  
  # ---------------- mypy ----------------
  
  [tool.mypy]
  python_version = "3.13"
  strict = true
  plugins = ["pydantic.mypy"]
  disallow_untyped_defs = true
  disallow_incomplete_defs = true
  disallow_untyped_calls = true
  disallow_any_generics = true
  no_implicit_optional = true
  warn_unused_ignores = true
  warn_redundant_casts = true
  files = ["src"]
  exclude = ["tests"]
  
  # ---------------- pytest ----------------
  
  [tool.pytest.ini_options]
  minversion = "8.0"
  addopts = [
      "-ra",
      "--strict-markers",
      "--strict-config",
      "--cov=src",
      "--cov-report=term-missing",
      "--cov-report=html",
      "--cov-report=xml",
      "--disable-warnings",
  ]
  testpaths = ["tests"]
  python_files = ["test_*.py"]
  python_classes = ["Test*"]
  python_functions = ["test_*"]
  asyncio_mode = "auto"
  asyncio_default_fixture_loop_scope = "function"
  markers = [
      "slow: marks tests as slow (deselect with '-m \"not slow\"')",
      "integration: marks tests as integration tests",
      "unit: marks tests as unit tests",
  ]
  filterwarnings = [
      "ignore::DeprecationWarning",
      "ignore::RuntimeWarning",
      "ignore::UserWarning",
  ]
  
  # ---------------- coverage ----------------
  
  [tool.coverage.run]
  source = ["src"]
  branch = true
  parallel = false
  omit = [
      "tests/*",
      "*/venv/*",
      "*/__pycache__/*",
      "*/site-packages/*",
      "*/test_*",
  ]
  
  [tool.coverage.paths]
  source = [
      "src/",
      "*/site-packages/",
  ]
  
  [tool.coverage.report]
  show_missing = true
  skip_covered = false
  fail_under = 0
  exclude_lines = [
      "pragma: no cover",
      "def __repr__",
      "if self.debug:",
      "if settings.DEBUG",
      "raise AssertionError",
      "raise NotImplementedError",
      "if 0:",
      "if __name__ == .__main__.:",
      "class .*\\bProtocol\\):",
      "@(abc\\.)?abstractmethod",
  ]
  
  [tool.coverage.html]
  directory = "htmlcov"
  
  # ---------------- bandit ----------------
  
  [tool.bandit]
  targets = ["src"]
  exclude_dirs = ["tests", ".venv", "venv", "env", ".env"]
  skips = ["B101", "B601"]
  [tool.bandit.assert_used]
  skips = ["**/test_*.py", "**/tests/**"]
  