[project]
name = "kiss-agent-framework"
dynamic = ["version"]
description = "KISS Agent Framework - A simple and portable agent framework for building and evolving AI agents"
readme = "README.md"
requires-python = ">=3.13"
authors = [
    {name = "Koushik Sen", email = "ksen@berkeley.edu"},
]
license = {text = "Apache-2.0"}
keywords = [
    "llm",
    "agent",
    "ai",
    "framework",
    "react",
    "function-calling",
    "openai",
    "anthropic",
    "gemini",
    "together",
    "docker",
    "evolution",
    "genetic-algorithm",
    "swe-bench",
    "rag",
]
classifiers = [
    "Development Status :: 4 - Beta",
    "Intended Audience :: Developers",
    "License :: OSI Approved :: Apache Software License",
    "Operating System :: OS Independent",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3.13",
    "Topic :: Scientific/Engineering :: Artificial Intelligence",
]
dependencies = [
    "openai>=2.13.0",
    "anthropic>=0.40.0",
    "rich>=14.2.0",
    "docker>=7.0.0",
    "google-genai>=0.30.0",
    "pyyaml>=6.0.0",
    "numpy>=1.26.0",
    "pydantic>=2.0.0",
    "pydantic-settings>=2.0.0",
    "flask>=3.0.0",
    "playwright>=1.40.0",
    "uvicorn>=0.30.0",
    "starlette>=0.38.0",
    "slack_sdk>=3.30.0",
    "google-api-python-client>=2.100.0",
    "google-auth-oauthlib>=1.2.0",
    "google-auth-httplib2>=0.2.0",
    "filelock>=3.25.2",
]

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

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

[tool.hatch.build.targets.wheel]
packages = ["src/kiss"]
# JSON files in package directories are included automatically by hatchling

[dependency-groups]
dev = [
    "mypy>=1.19.1",
    "ruff>=0.14.9",
    "pytest>=9.0.2",
    "pytest-cov>=7.0.0",
    "pytest-timeout>=2.4.0",
    "mdformat>=1.0.0",
    "nbconvert>=7.17.0",
    "requests>=2.28.0",
    "types-requests>=2.32.4.20260107",
    "pyright>=1.1.408",
]

# Minimal dependencies for kiss.core module only
core = [
    "pydantic>=2.0.0",
    "pydantic-settings>=2.0.0",
    "pyyaml>=6.0.0",
    "rich>=14.2.0",
]

# Core + Anthropic Claude support
claude = [
    {include-group = "core"},
    "anthropic>=0.40.0",
]

# Core + OpenAI support
openai = [
    {include-group = "core"},
    "openai>=2.13.0",
]

# Core + Google Gemini support
gemini = [
    {include-group = "core"},
    "google-genai>=0.30.0",
]

# Dependencies for kiss.agents.sorcar (web tools, browser UI)
sorcar = [
    "playwright>=1.40.0",
    "uvicorn>=0.30.0",
    "starlette>=0.38.0",
]

docker = [
    "docker>=7.0.0",
]

[tool.pytest.ini_options]
testpaths = ["src/kiss/tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
markers = [
    "slow: marks tests as slow (deselect with '-m \"not slow\"')",
    "redundancy_check: marks tests for redundancy check",
]
# Disable timeout so tests run without time limit
timeout = 0
addopts = "--cov=src/kiss --cov-branch"

[tool.coverage.run]
branch = true
parallel = true
source = ["src/kiss"]
omit = ["src/kiss/tests/*"]
concurrency = ["greenlet", "thread"]
data_file = ".coverage"

[tool.coverage.report]
exclude_lines = [
    "pragma: no cover",
    "if __name__ == .__main__.:",
]

[tool.mypy]
python_version = "3.13"
warn_return_any = true
warn_unused_configs = true
disallow_untyped_defs = true
ignore_missing_imports = false

[[tool.mypy.overrides]]
module = "backports.zstd.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "rich.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "google.genai.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "google.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "google_auth_oauthlib.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "googleapiclient.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "yaml.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "docker.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "openai.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "playwright.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "slack_sdk.*"
ignore_missing_imports = true

[[tool.mypy.overrides]]
module = "kiss.tests.*"
disallow_untyped_defs = false

[[tool.mypy.overrides]]
module = "kiss.viz_trajectory.*"
disallow_untyped_defs = false

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

[tool.ruff.lint]
select = ["E", "F", "W", "I", "N", "UP"]
ignore = []

[tool.uv.workspace]
members = [
    "kiss_ai",
]

[project.urls]
Homepage = "https://github.com/ksen/kiss"
Repository = "https://github.com/ksen/kiss"

[project.scripts]
check = "kiss.scripts.check:main"
generate-api-docs = "kiss.scripts.generate_api_docs:main"
sorcar = "kiss.agents.sorcar.sorcar:main"
