peppa/openspec/changes/archive/2026-11-14-pep-9-web-terminal/tasks.md
Асель 09d2750d75 PEP-9: live runner terminal in the web — xterm.js over SSE, input via POST
- runner/terminal.ts: TerminalFeed polls the pane (capture-pane -e, one loop per runner
  shared by viewers), sends changed lines, scrolled-off lines and the cursor; terminalInput
  (send-keys -H / paste-buffer -p) with access, liveness, size and rate checks, resets
  auto_nudges, logs terminal_input; terminalSse with 15 s pings for Cloudflare
- web: GET/POST /api/runners/[id]/terminal, RunnerTerminal (xterm.js) in the runner panel
  and on the story page; help
- testkit: terminal.test.ts — real tmux into a headless xterm, history, input, access, limits, SSE
- OpenSpec change archived; new spec runner-terminal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-14 04:45:32 +05:00

15 lines
1.2 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-9
## 1. Runner
- [x] 1.1 tmux: `paneInfo` (курсор, размер, history_size), `capturePaneAnsi`, `sendHex`
- [x] 1.2 `terminal.ts`: `TerminalFeed` (опрос, кадры, история, общий на раннер), `normalizeAnsiLines`, `terminalInput` (проверки, лимиты, сброс автопродолжений, журнал)
## 2. Веб
- [x] 2.1 `GET/POST /api/runners/[id]/terminal`: доступ, SSE с пингом, ввод с лимитами
- [x] 2.2 `RunnerTerminal` на xterm.js: просмотр/ввод, вставка, A−/A+, полноэкранный, переподключение, статус
- [x] 2.3 Панель раннера и страница стори (активная сессия); «Помощь»
## 3. Проверка
- [x] 3.1 e2e в testkit: кадр и изменения из настоящего tmux, история, ввод (буквы, Enter, вставка), запрет чужому и в завершённую сессию, лимиты, сброс автопродолжений и журнал, SSE route
- [x] 3.2 Свой `next dev` против копии базы: терминал в панели раннера