# ============================================================ # 🩺 CyberHuaTuo — 项目配置 # ============================================================ [build-system] requires = ["setuptools>=77.0"] build-backend = "setuptools.build_meta" [project] name = "cyberhuatuo" version = "0.2.5" description = "AI-agent self-rescue via MCP: diagnose tracebacks, apply exact fixes, and save/upload reusable prescriptions" readme = "README.md" license = "Apache-2.0" requires-python = ">=3.10" keywords = [ "ai-agents", "claude", "codex", "debugging", "traceback", "error-diagnosis", "mcp", "agent-safety", "soul-ring", ] classifiers = [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Topic :: Software Development :: Libraries :: Python Modules", ] dependencies = [ "fastapi>=0.115.0", "uvicorn>=0.30.0", "jinja2>=3.1.0", "python-dotenv>=1.0.0", "pyyaml>=6.0", "chromadb>=0.5.0", "litellm>=1.40.0", "python-multipart>=0.0.9", "httpx>=0.27.0", "mcp>=1.0.0", "bandit>=1.7.0", "packaging>=24.0", "tomli>=2.0; python_version < '3.11'", ] [project.optional-dependencies] dev = [ "build>=1.2.0", "pytest>=8.0.0", "pytest-asyncio>=0.23.0", "ruff>=0.8.0", ] [project.scripts] cyberhuatuo = "cyberhuatuo.cli:main" cyberhuatuo-mcp = "cyberhuatuo.mcp_server:main" [project.urls] Homepage = "https://github.com/JinNing6/CyberHuaTuo-Plugin" Repository = "https://github.com/JinNing6/CyberHuaTuo-Plugin" Issues = "https://github.com/JinNing6/CyberHuaTuo-Plugin/issues" "MCP Install Guide" = "https://github.com/JinNing6/CyberHuaTuo-Plugin/blob/main/README_MCP.md" "Marketplace Release Plan" = "https://github.com/JinNing6/CyberHuaTuo-Plugin/blob/main/docs/MARKETPLACE_RELEASE.md" # ===== 包发现与数据文件 ===== [tool.setuptools] include-package-data = true [tool.setuptools.packages.find] include = ["cyberhuatuo*"] [tool.setuptools.package-data] cyberhuatuo = [ "templates/**/*", "cases/**/*.md", "schema/**/*.json", ] [tool.ruff] line-length = 120 target-version = "py39" [tool.ruff.lint] # 启用的规则集 select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # pyflakes "I", # isort "N", # pep8-naming "UP", # pyupgrade "B", # flake8-bugbear "SIM", # flake8-simplify ] # 忽略的规则 ignore = [ "E501", # line too long (由 formatter 处理) "B008", # do not perform function calls in argument defaults (FastAPI 需要) "B905", # zip without strict (Python 3.10 compatibility) "UP007", # Use X | Y for union types (Python 3.10 compatibility) ] [tool.ruff.lint.per-file-ignores] "tests/*" = ["S101"] # 允许测试中使用 assert [tool.ruff.lint.isort] known-first-party = ["cyberhuatuo"] [tool.pytest.ini_options] testpaths = ["tests"] asyncio_mode = "auto" markers = [ "slow: marks tests as slow (deselect with '-m \"not slow\"')", "integration: marks tests requiring external APIs", ] [tool.bandit] exclude_dirs = ["tests", ".github"] skips = ["B101"] # 跳过 assert 检查