[project]
name = "codex-autorunner"
version = "1.9.15"
description = "Codex autorunner CLI per DESIGN-V1"
readme = "README.md"
license = {file = "LICENSE"}
authors = [{name = "Codex"}]
requires-python = ">=3.9"
dependencies = [
  "typer>=0.9",
  "click<8.2",
  "pyyaml>=6.0",
  "fastapi>=0.111",
  "pydantic>=2.0",
  "uvicorn[standard]>=0.30",
  "ptyprocess>=0.7",
  "python-multipart>=0.0.9",
  "python-dotenv>=1.0",
  "httpx>=0.27",
  "tenacity>=8.0",
]
classifiers = [
  "License :: OSI Approved :: MIT License",
  "Programming Language :: Python :: 3",
  "Programming Language :: Python :: 3 :: Only",
  "Operating System :: OS Independent",
]
keywords = ["codex", "automation", "agent", "cli", "fastapi"]

[project.urls]
Homepage = "https://github.com/Git-on-my-level/codex-autorunner"
Repository = "https://github.com/Git-on-my-level/codex-autorunner"
Issues = "https://github.com/Git-on-my-level/codex-autorunner/issues"

[project.optional-dependencies]
dev = [
  "black==25.11.0",
  "mypy>=1.10",
  "pytest>=7.0",
  "pytest-asyncio>=0.23",
  "pytest-timeout>=2.0",
  "pytest-xdist>=3.0",
  "ruff>=0.5.0",
  "types-PyYAML",
]
telegram = [
  "httpx>=0.27",
]
voice = [
  "httpx>=0.27",
  "python-multipart>=0.0.9",
]
voice-local = [
  "faster-whisper>=1.1.0",
]
voice-mlx = [
  "mlx-whisper>=0.4.2; platform_system == 'Darwin' and platform_machine == 'arm64'",
]
github = []
discord = [
  "websockets>=12",
]
browser = [
  "playwright>=1.40",
]

[project.scripts]
codex-autorunner = "codex_autorunner.cli:app"
car = "codex_autorunner.cli:app"

[build-system]
requires = ["setuptools", "wheel"]
build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
where = ["src"]

[tool.setuptools]
include-package-data = true

[tool.setuptools.package-data]
codex_autorunner = [
  "static/generated/*.js",
  "static/*.css",
  "static/*.html",
  "static/vendor/**",
  "static/assets.json",
]

[tool.setuptools.exclude-package-data]
codex_autorunner = ["static_src/*", "static_src/**/*"]

[tool.typer]
completions = true

[tool.pytest.ini_options]
cache_dir = ".codex-autorunner/pytest-cache"
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
norecursedirs = ["worktrees", ".git", ".venv", ".codex-autorunner"]
markers = [
    "integration: marks tests as integration tests that require external dependencies (deselect with '-m \"not integration\"')",
    "slow: marks tests as slow (deselect with '-m \"not slow\"' for fast runs)",
    "timeout(seconds): per-test timeout (provided by pytest-timeout)",
]
filterwarnings = [
    # Cancelled auto-restart tasks can emit noisy unraisable warnings when the event
    # loop shuts down; we explicitly clean these up, so silence the residual notice.
    "ignore::pytest.PytestUnraisableExceptionWarning",
]

[tool.ruff]
line-length = 88
target-version = "py39"
src = ["src"]

[tool.black]
target-version = ["py39"]

[tool.ruff.lint]
select = ["E", "F", "W", "I", "B"]
ignore = ["E501"]

[tool.ruff.lint.per-file-ignores]
"src/codex_autorunner/logging_utils.py" = ["F403"]
"src/codex_autorunner/pty_session.py" = ["F403"]
"src/codex_autorunner/static_assets.py" = ["F403"]
"src/codex_autorunner/cli.py" = ["B008"]
"src/codex_autorunner/surfaces/cli/cli.py" = ["B008"]
"src/codex_autorunner/surfaces/cli/pma_cli.py" = ["B008"]
"src/codex_autorunner/surfaces/cli/commands/*.py" = ["B008"]
"src/codex_autorunner/surfaces/web/routes/terminal_images.py" = ["B008"]
"src/codex_autorunner/surfaces/web/routes/voice.py" = ["B008"]

[tool.mypy]
python_version = "3.9"
warn_return_any = true
no_implicit_optional = true
ignore_missing_imports = true
warn_unused_ignores = true
check_untyped_defs = true
files = [
  "src/codex_autorunner",
]

[[tool.mypy.overrides]]
module = ["codex_autorunner.core", "codex_autorunner.core.*"]
ignore_errors = false

[[tool.mypy.overrides]]
module = [
  "codex_autorunner.integrations.app_server",
  "codex_autorunner.integrations.app_server.*",
]
ignore_errors = false

[[tool.mypy.overrides]]
module = [
  "codex_autorunner.integrations.telegram",
  "codex_autorunner.integrations.telegram.*",
]
ignore_errors = true
