peppa/openspec/changes/archive/2026-11-20-pep-225-live-websocket/specs/runner-terminal/spec.md
peppa-bot cfdd66a631
All checks were successful
peppa/build build: success за 14с
peppa/lint lint: success за 1с
peppa/test test: success за 649с
peppa/typecheck typecheck: success за 22с
PEP-225: память проекта, архив change
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-20 21:38:23 +05:00

18 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.

## ADDED Requirements
### Requirement: Терминал через общий канал
Вывод терминала раннера SHALL идти через WebSocket вкладки (область `terminal:<sessionId>`:
`frame`, `out`, `end`), ввод — сообщением `{t:"in", keys|paste}` того же соединения с прежними
правилами: только владелец или участник проекта, живая сессия, ≤1 КБ нажатий, ≤64 КБ вставки,
40 запросов за 5 с. Без WebSocket терминал работает через прежние SSE и POST.
#### Scenario: Ввод через сокет
- **GIVEN** участник проекта подписан на `terminal:<id>` живой сессии
- **WHEN** он шлёт `{t:"in", scope:"terminal:<id>", keys:"ls\r", id:1}`
- **THEN** нажатия уходят в pane, приходит `{t:"ack", id:1}`
#### Scenario: Ввод в завершённую сессию
- **GIVEN** сессия завершена
- **WHEN** приходит `{t:"in", …, id:2}`
- **THEN** приходит `{t:"ack", id:2, error:"…"}`, в pane ничего не уходит