git-perf
by HQIT
README.md
# git-perf
独立的 **Git 绩效 / 评审台账**(与 [NANA-OS / DiOS](../NANA-OS) **同级、另仓**)。
- DiOS 只负责事件与 Agent,**不承载**绩效业务模型
- 本产品提供 **Web + REST + MCP**,供人查看、供 Agent 写入
```
Git Host ──webhook──► DiOS ──► Reviewer Agent ──MCP──► git-perf ──► Web
```
## 目标与契约(必读)
| 文档 | 内容 |
|------|------|
| [docs/GOALS.md](./docs/GOALS.md) | 产品目标、非目标、成功标准、与 DiOS 边界 |
| [docs/CONTRACT.md](./docs/CONTRACT.md) | **契约 v0.1.3**:demogo Web `/git-perf/`;MCP 仅内网 |
实现与改动须遵守 CONTRACT;破坏性变更先改契约版本号。
## 快速启动
```bash
cd /home/xu/workspace/git-perf
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
uvicorn app.main:app --host 0.0.0.0 --port 8090 --reload
```
- Web:http://localhost:8090/
- OpenAPI:http://localhost:8090/docs
- **远程 MCP(主路径)**:http://localhost:8090/mcp
## 冒烟验收
```bash
# 临时 DB + 临时端口;不写正式 data/
./scripts/smoke.sh
```
覆盖:REST 闭环 + 远程 Streamable HTTP MCP(`/mcp` list_tools + call_tool)。
## MCP(注册到 DiOS)
| 环境 | url |
|------|-----|
| demogo 生产 | `http://git-perf:8090/mcp`(Docker 内网;**不**暴露公网) |
| 本地 | `http://127.0.0.1:8090/mcp` 或 `python -m mcp_server`(stdio 调试) |
| 字段 | 值 |
|------|-----|
| name | `git-perf` |
| transport | `streamable_http` |
详见 [CONTRACT §5](./docs/CONTRACT.md#5-与-dios-集成契约)、[§3](./docs/CONTRACT.md#3-mcp-契约agent-主路径)。
## demogo.work 部署
```bash
docker compose -f docker-compose.demogo.yml -p git-perf up -d --build
```
- Web:`https://demogo.work/git-perf/`
- 公网 `/git-perf/mcp` → 404(刻意)
- 步骤与 Caddy 片段见 [deploy/demogo/README.md](./deploy/demogo/README.md)
## 仓库状态
独立 Git 仓库(勿并入 NANA-OS)。远端:[`HQIT/dios-mcp-git-perf`](https://github.com/HQIT/dios-mcp-git-perf)(public)。
## 数据
默认 SQLite:`data/git_perf.db`(可用环境变量 `GIT_PERF_DB` 覆盖)。
This server cannot be deployed
Maintenance
ActivitySlowing
ResponsivenessNo issues