Files
orchestrator/README.md

71 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 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 |
## Настройка
```bash
cp .env.example .env
# Заполнить токены в .env
```
## Запуск (Docker)
```bash
docker compose up -d --build
```
## Запуск (dev)
```bash
pip install -r requirements.txt
uvicorn src.main:app --reload --port 8500
```
## Тесты
```bash
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)
```