peppa/openspec/changes/archive/2026-11-14-pep-17-agent-sandbox-hosts/tasks.md
Асель ca57f9543b PEP-17/40: agent sandbox per runner (docker + agent relay) and runner hosts over SSH
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 07:57:28 +05:00

27 lines
1.9 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.

# Tasks: PEP-17 + PEP-40
## 1. Основа
- [x] 1.1 Схема и миграция: `runner_hosts`, `sessions.host_id`, `sessions.container`; core `hosts.ts`, `SessionView.host`
- [x] 1.2 Настройки раннеров: `isolation`, `hosts`
- [x] 1.3 `runner/exec.ts` (локально / SSH, ключ Пеппы, `HostUnreachable`), `tmux.ts` по адресу pane, перевод вызовов
## 2. Песочница
- [x] 2.1 `runner/sandbox.ts`: команда `docker run`, монтирования, env, домашний каталог агента, `docker rm -f`
- [x] 2.2 `sessions.ts`: запуск/resume/fresh/stop с контейнером; пути в argv агента
- [x] 2.3 Образ `infra/runner/` (Dockerfile, `peppa-agent.mjs`), `scripts/runner-image.sh`
## 3. Релей
- [x] 3.1 Токен сессии (core), `runner/agent-relay.ts`: hook (wait/rid, транскрипт), mcp, git-прокси
- [x] 3.2 MCP: фабрика сервера агента `packages/mcp/src/agent.ts`, ограничение проектом, `open_pull_request`
- [x] 3.3 Веб-маршруты `/api/agent/*`
## 4. Хосты
- [x] 4.1 `runner/hosts.ts`: проверка, `hostTick`, выбор хоста, клон и каталог запуска на хосте
- [x] 4.2 CLI `peppa host …`, `peppa runner settings isolation= hosts=`
- [x] 4.3 Веб: «Хосты» (суперадмин), настройки раннеров проекта, хост/контейнер в карточке, «Помощь»
## 5. Проверка
- [x] 5.1 `mock-docker run/rm`, `mock-ssh`
- [x] 5.2 e2e: контейнер (env, монтирования, хук и MCP через релей, остановка), релей (токены, чужой проект, git-прокси), хост (запуск, терминал, недоступность, выбор)
- [x] 5.3 AGENTS.md, RULES.md, typecheck, `pnpm run ci`