peppa/openspec/changes/archive/2026-11-12-pep-13-connect-claude/tasks.md
Асель 3f55248150 PEP-13: connect Claude from the web for remote users
- 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>
2026-11-12 22:06:37 +05:00

985 B
Raw Blame History

Tasks: PEP-13

1. Токен

  • 1.1 Миграция users.claude_token_enc, claude_token_set_at; core: set/clear/get (шифрование)
  • 1.2 runner: процесс claude setup-token в tmux (peppa-auth-u<id>): старт → ссылка; ввод кода → токен или ошибка; таймаут и уборка
  • 1.3 runner: сессии Claude получают CLAUDE_CODE_OAUTH_TOKEN владельца проекта

2. Веб

  • 2.1 Настройки → Claude: статус, «Подключить» (ссылка + поле кода), «Отключить»

3. Проверка

  • 3.1 mock-claude setup-token; тесты: подключение, неверный код, токен в env сессии, отключение; весь набор зелёный
  • 3.2 Выкатка; на проде «Подключить» показывает настоящую ссылку claude.com; openspec validate