docs: 同步当前工程实现与验证基线

This commit is contained in:
2026-08-30 15:15:00 +08:00
parent bec308b5d1
commit 3872ef3304
15 changed files with 155 additions and 47 deletions
+12 -1
View File
@@ -1,7 +1,9 @@
# Backend
# Notes Agent Backend
FastAPI + Pydantic 的本地 AI Core / Agent Core。项目使用 uv 管理依赖和虚拟环境。
当前实现包含 Knowledge/Retrieval、Chat、Agent Runtime、Tool/Permission、Skill/Plugin、Provider Adapter、任务、索引和开发阶段凭据加密存储。Provider 支持 Mock、OpenAI Chat/OpenAI-Compatible 与 OllamaOpenAI Responses、Anthropic Messages、MCP 独立 Host 和真实语音模型仍属于后续阶段。
```powershell
uv sync
uv run uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
@@ -13,6 +15,15 @@ uv run uvicorn app.main:app --reload --host 127.0.0.1 --port 8000
- 健康检查:<http://127.0.0.1:8000/health>
- API 文档:<http://127.0.0.1:8000/docs>
- OpenAPI<http://127.0.0.1:8000/openapi.json>
运行回归测试:
```powershell
uv run pytest
```
当前基线为 71 项测试通过。Provider API Key 可通过前端设置页写入,也可用 `OPENAI_API_KEY``DEEPSEEK_API_KEY``AINOTE_CREDENTIAL_<ID>` 注入;不要把真实密钥写入仓库。
团队接口清单见 `../docs/后端接口契约-开发版.md`,机器可读契约以运行时的 `/openapi.json` 为准。