- proto(engine/proto/liushen/v1):LingtaiEngine 九方法——GetEngineInfo(版本协商/能力位)、TransformMarkdown、RebuildExport(UNIMPLEMENTED 明示随 WP-03)、OpenStream 双向流、CheckBudget、RerankRecall、EvaluatePolicy、ValidateUrl、CheckStateTransition;RunStatus 枚举与契约一致 - 服务端参考实现(engine/server/lingtai_server.py):进程内直链 nanobind 引擎核心——双形态同核同 golden;开发档 127.0.0.1 明文(生产 mTLS,文案明示);状态转换表按 agent-runtime 第 3 节 - 集成测试 6 项:进程内随机端口起服——版本协商、双形态 golden(服务输出==进程内引擎输出,ADR-017 核心不变量首次实证)、双向流 envelope 序号单调、决策表/URL/状态机、RebuildExport UNIMPLEMENTED 明确拒绝(不伪造) - Makefile:lingtai-proto(stub 再生)与 lingtai-server(启动服务)目标 - 注:C++ 原生二进制(hunjing-lingtai-server)随交叉编译矩阵交付;Python 参考实现保证 proto 与语义先行锁定 - 测试 102 项全绿(+6);ruff/mypy 干净
59 lines
1.1 KiB
TOML
59 lines
1.1 KiB
TOML
[project]
|
|
name = "hunjing-backend"
|
|
version = "0.1.0"
|
|
description = "Hunjing 后端服务(FastAPI 模块化单体)"
|
|
requires-python = ">=3.12"
|
|
dependencies = [
|
|
"fastapi>=0.115",
|
|
"uvicorn[standard]>=0.32",
|
|
"pydantic>=2.9",
|
|
"pydantic-settings>=2.6",
|
|
"sqlalchemy>=2.0",
|
|
"alembic>=1.14",
|
|
"asyncpg>=0.30",
|
|
"uuid-utils>=0.10",
|
|
"greenlet>=3.5.5",
|
|
"hunjing-lingtai",
|
|
"grpcio>=1.83.1",
|
|
"grpcio-tools>=1.83.1",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"pytest>=8.3",
|
|
"pytest-asyncio>=0.24",
|
|
"httpx>=0.27",
|
|
"ruff>=0.8",
|
|
"mypy>=1.13",
|
|
]
|
|
|
|
[build-system]
|
|
requires = ["hatchling"]
|
|
build-backend = "hatchling.build"
|
|
|
|
[tool.hatch.build.targets.wheel]
|
|
packages = ["app"]
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
target-version = "py312"
|
|
|
|
[tool.ruff.lint]
|
|
select = ["E", "F", "I", "UP", "B", "ASYNC"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"alembic/*" = ["E402"]
|
|
"alembic/versions/*" = ["E501"]
|
|
|
|
[tool.mypy]
|
|
python_version = "3.12"
|
|
strict = true
|
|
mypy_path = "typings"
|
|
|
|
[tool.pytest.ini_options]
|
|
asyncio_mode = "auto"
|
|
testpaths = ["tests"]
|
|
|
|
[tool.uv.sources]
|
|
hunjing-lingtai = { path = "../engine/bindings", editable = true }
|