b545665e2d3471deaed3367d789065eae2c47b1d
- handle_ci_status: fallback git branch -r --contains when branches[] empty - webhook router: handle pull_request_approved event type - handle_pr: map review.type to review.state for new Gitea format - launcher: auto-advance stage after agent completion (_try_advance_stage) - plane_sync: notify Plane on stage changes - stages.py: stage machine with QG definitions - notifications.py: stage change notifications - safe.directory fix for container git operations
Multi-Agent Orchestrator
FastAPI-сервис для оркестрации мульти-агентного пайплайна разработки.
Что делает
- Принимает webhooks от Plane (task management) и Gitea (git events)
- Проверяет Quality Gates перед переходом между стадиями
- Запускает Claude CLI агентов (analyst, architect, developer, reviewer, tester)
- Ведёт журнал событий в SQLite
API Endpoints
| Method | Path | Описание |
|---|---|---|
| GET | /health |
Health check |
| GET | /status |
Активные задачи |
| POST | /webhook/plane |
Plane webhook receiver |
| POST | /webhook/gitea |
Gitea webhook receiver |
Настройка
cp .env.example .env
# Заполнить токены в .env
Запуск (Docker)
docker compose up -d --build
Запуск (dev)
pip install -r requirements.txt
uvicorn src.main:app --reload --port 8500
Тесты
pip install pytest
pytest tests/ -v
Переменные окружения
| Переменная | Описание | Default |
|---|---|---|
ORCH_PLANE_API_URL |
Plane API URL | http://localhost:8091 |
ORCH_PLANE_API_TOKEN |
Plane API token | — |
ORCH_PLANE_WEBHOOK_SECRET |
Webhook secret для верификации | — |
ORCH_GITEA_URL |
Gitea URL | http://localhost:3000 |
ORCH_GITEA_TOKEN |
Gitea API token | — |
ORCH_GITEA_WEBHOOK_SECRET |
Gitea webhook secret | — |
ORCH_CLAUDE_BIN |
Путь к Claude CLI | /usr/bin/claude |
ORCH_REPOS_DIR |
Директория с репозиториями | /home/slin/repos |
ORCH_DB_PATH |
Путь к SQLite БД | /app/data/orchestrator.db |
Архитектура
Plane webhook ──┐
├──► Orchestrator ──► Quality Gates ──► Agent Launcher ──► Claude CLI
Gitea webhook ──┘ │
▼
SQLite (events, tasks, agent_runs)
Description
Languages
Python
99.3%
Shell
0.5%
Dockerfile
0.2%