- Settings → Claude: Peppa runs 'claude setup-token' in tmux, shows the claude.com sign-in link, the user pastes the code into the form; the 1-year token is stored encrypted on the user (users.claude_token_enc) - Claude sessions of the owner's projects get CLAUDE_CODE_OAUTH_TOKEN; projects without an owner token keep using the machine login - disconnect / reconnect; setup times out after 10 min and its tmux session (and scrollback with the token) is killed right after saving - mock-claude setup-token; 2 new tests (56 e2e total, green) - verified on prod: the button yields the real claude.com authorize URL - OpenSpec: pep-13 archived into spec agent-credentials Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
17 lines
985 B
Markdown
17 lines
985 B
Markdown
# Tasks: PEP-13
|
||
|
||
## 1. Токен
|
||
|
||
- [x] 1.1 Миграция `users.claude_token_enc`, `claude_token_set_at`; core: set/clear/get (шифрование)
|
||
- [x] 1.2 runner: процесс `claude setup-token` в tmux (`peppa-auth-u<id>`): старт → ссылка; ввод кода → токен или ошибка; таймаут и уборка
|
||
- [x] 1.3 runner: сессии Claude получают `CLAUDE_CODE_OAUTH_TOKEN` владельца проекта
|
||
|
||
## 2. Веб
|
||
|
||
- [x] 2.1 Настройки → Claude: статус, «Подключить» (ссылка + поле кода), «Отключить»
|
||
|
||
## 3. Проверка
|
||
|
||
- [x] 3.1 mock-claude `setup-token`; тесты: подключение, неверный код, токен в env сессии, отключение; весь набор зелёный
|
||
- [x] 3.2 Выкатка; на проде «Подключить» показывает настоящую ссылку claude.com; `openspec validate`
|