Files
browser/openspec/changes/stream-live-server-logs-sse/proposal.md
T

1.2 KiB

Why

The browser terminal and server log detail view were polling POST /api/v1/log-streams/query on a short interval, and terminal polling multiplied that request count by every candidate log stream. This wastes HTTP requests and can overload the platform or reverse proxy while still failing to feel truly realtime.

What Changes

  • Add a platform-owned GET /api/v1/server-instances/{id}/logs/events Server-Sent Events stream for browser live logs.
  • Keep Run-to-Platform log transport as durable signed HTTP batch ingest with local spool, sequence acknowledgement, and cursor query for history/reconnect repair.
  • Switch the server detail log view, live log drawer, and management terminal to a single EventSource connection with bounded initial history instead of periodic /log-streams/query polling.
  • Add Nginx proxy settings for unbuffered SSE forwarding.

Impact

  • Affects platform/ API, DTO, service log ingest fan-out, tests, and protocol docs.
  • Affects platform_web/ API types/client, log UI components, tests, and Nginx config.
  • Does not add WebSocket terminal transport, direct browser-to-Run connections, plugin-held platform keys, host paths, credentials, or game-specific log behavior in platform/run.