Files
kwcode/pyproject.toml
Val-sss 5a6803fc30 release: v2.1.0 — ReAct多轮交互循环,Eval 22%→53% (26/50 PASS)
新增ReAct循环(kaiwu/agent/react_loop.py):
- 工具集: read_file/write_file/run_test/grep/list_dir/submit
- 门控: retry_count≥1时触发,小模型5步/中8步/大10步
- 上下文管理: 保留system+初始user+最近6轮,早期压缩
- 安全: 写入前Python语法检查,禁写测试文件,失败恢复

Eval结果 (qwen2.5-coder:32b-instruct-q4_K_M, 50题):
- 总通过率: 26/50 (53%), 对比v2.0.0的8/36(22%)提升141%
- Go题: 6/9 PASS (t42/t43/t44/t46/t56/t57)
- 多文件API: 3/3 全过 (t51/t52/t53)
- 综合题: t10_comprehensive PASS (425s, 之前timeout)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-14 07:11:38 +08:00

98 lines
2.2 KiB
TOML

[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
[project]
name = "kwcode"
version = "2.1.0"
description = "KwCode - Local-model coding agent with MoE expert pipeline"
requires-python = ">=3.10"
readme = "README.md"
license = {text = "Apache-2.0"}
keywords = ["coding-agent", "local-llm", "ollama", "code-generation"]
classifiers = [
"Development Status :: 4 - Beta",
"Environment :: Console",
"Intended Audience :: Developers",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Code Generators",
]
dependencies = [
"typer>=0.12.0",
"rich>=13.0.0",
"httpx>=0.27.0",
"psutil>=5.9.0",
"beautifulsoup4>=4.12.0",
"trafilatura>=1.12.0",
"pyyaml>=6.0",
"rank-bm25>=0.2.2",
"prompt-toolkit>=3.0.0",
"tree-sitter>=0.23.0",
"tree-sitter-python>=0.23.0",
]
[project.optional-dependencies]
rerank = ["sentence-transformers>=2.7.0"]
multimodal = ["Pillow>=10.0"]
local = ["llama-cpp-python>=0.2.90"]
multilang = [
"tree-sitter-javascript>=0.23.0",
"tree-sitter-typescript>=0.23.0",
"tree-sitter-go>=0.23.0",
"tree-sitter-rust>=0.23.0",
"tree-sitter-java>=0.23.0",
"ast-grep-py>=0.30.0",
]
server = [
"fastapi>=0.115.0",
"uvicorn>=0.30.0",
"sse-starlette>=2.0.0",
]
tui = [
"textual>=0.80.0",
]
full = [
"kwcode[local]",
"kwcode[multilang]",
"kwcode[server]",
"kwcode[tui]",
]
dev = [
"pytest>=7.0.0",
"kwcode[full]",
]
[project.scripts]
kwcode = "kaiwu.cli.main:app"
[project.urls]
Homepage = "https://github.com/val1813/kwcode"
Repository = "https://github.com/val1813/kwcode"
Issues = "https://github.com/val1813/kwcode/issues"
[tool.setuptools.packages.find]
where = ["."]
include = ["kaiwu*"]
[tool.setuptools.package-data]
"kaiwu.builtin_experts" = ["*.yaml"]
[tool.ruff]
line-length = 100
target-version = "py311"
[tool.ruff.lint]
select = ["E", "F", "W", "I"]
ignore = ["E501"]
[tool.mypy]
python_version = "3.11"
warn_return_any = true
warn_unused_configs = true
ignore_missing_imports = true