peppa/openspec/changes/pep-67-subscriptions/tasks.md
Асель 11778d98bd PEP-67: OpenSpec change pep-67-subscriptions
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 03:48:25 +05:00

27 lines
1.7 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-67
## 1. Данные
- [ ] 1.1 Схема: subscriptions, subscription_pools, subscription_pool_members, projects.subscription_pool_id, sessions.subscription_id, provider opencode
- [ ] 1.2 Миграция (drizzle-kit generate) + перенос users.claude_token_enc в подписки и пулы
- [ ] 1.3 core: isSuperadmin, CRUD подписок и пулов, пул проекта, выбор подписки, claudeTokenForProject из пула
## 2. Раннер
- [ ] 2.1 Вход: Claude setup-token на подписку, ручной токен; Codex device auth и API-ключ (CODEX_HOME); OpenCode ключ
- [ ] 2.2 «Проверить» (пробный запуск) и статусы
- [ ] 2.3 Провайдер OpenCode (providers.ts, opencode.json, env)
- [ ] 2.4 startSession/resumeSession: выбор подписки, env подписки, sessions.subscription_id
## 3. Моки
- [ ] 3.1 mock-claude -p, mock-codex login/exec, mock-opencode
## 4. Веб
- [ ] 4.1 Меню «Подписки» только суперадмину, /subscriptions (404 остальным)
- [ ] 4.2 Страница подписок: список, добавление трёх провайдеров, проверка, удаление, пулы
- [ ] 4.3 Настройки проекта: пул по умолчанию; форма запуска: пул/подписки; «Раннеры»: подписка
- [ ] 4.4 Убрать «Настройки → Claude», обновить Помощь
## 5. Тесты и документация
- [ ] 5.1 testkit: subscriptions.test.ts (сценарии спеки), перенос claude-auth.test.ts, миграция токенов
- [ ] 5.2 AGENTS.md
- [ ] 5.3 pnpm run ci зелёный