## Prompt Boundaries - Positive prompt (正向提示词): Realtime server logs and the management terminal must use one platform-owned push stream per open view, with bounded history replay and no periodic `/log-streams/query` polling. - Directional prompt (方向提示词): Work inside `platform/`, `platform_web/`, and `run/`, preserve durable Run log ingest, plugin-declared log-source ownership, platform session authorization, existing UI controls, and Nginx proxying; verify with focused Go/frontend tests plus structure checks. - Boundary prompt (任务边界): Do not add browser-to-Run sockets, raw credentials, host paths, plugin-owned auth keys, billing/cloud workflows, or game-specific SCUM paths/commands to platform/run code. ## 1. Platform SSE Contract - [x] 1.1 Add safe log event DTOs and a server-scoped SSE route. - [x] 1.2 Publish newly accepted log batch entries to non-blocking server-instance subscribers. - [x] 1.3 Replay bounded recent history on stream open while keeping cursor query available for explicit history. ## 2. Frontend Realtime Logs - [x] 2.1 Add EventSource client support for server log events. - [x] 2.2 Replace live log drawer and management terminal `/log-streams/query` intervals with SSE. - [x] 2.3 Replace server detail log polling with SSE history replay and live append. ## 3. Proxy And Verification - [x] 3.1 Disable Nginx buffering for the log events route. - [x] 3.2 Add focused backend/frontend tests for SSE behavior and no terminal polling. - [x] 3.3 Run final verification: platform Go tests, platform_web tests/typecheck, `scripts/check-structure.sh`, and strict OpenSpec validation. ## 4. Run Process Log Capture - [x] 4.1 Capture supervised process stdout/stderr through Run-owned durable capture files instead of game-specific log inspection. - [x] 4.2 Resume managed process log tailing after Run restart using the persisted process journal and capture offsets. - [x] 4.3 Keep plugin-declared log source keys optional for runtime readiness; explicit file backfill still uses the requested plugin source.