chore: Add full-page terminal SSH sessions to Factory sandbox inventory (#13780)
This PR adds a full-page terminal SSH session affordance to the
Turborepo Factory operator page.
Changes:
- Added a "Terminal" button to each sandbox card in the inventory. Only
running sandboxes are clickable.
- Clicking the button opens a full-screen xterm.js terminal overlay that
takes over the page.
- Added a new `/api/sandbox/terminal` API route that uses
`Sandbox.openInteractive()` to return a WebSocket URL and token.
- Added reusable protocol helpers for the Vercel Sandbox interactive
shell WebSocket protocol (start/resize/exit messages and token
authentication).
- The overlay returns to the main Factory UI when the server reports an
`exit` control frame (i.e., when the user runs `exit` in the shell).
- Added tests for session creation, the API request handler, and the
WebSocket protocol helpers.
Notes:
- The WebSocket protocol matches the implementation used by the official
`sandbox connect` CLI command.
- The backend only allows interactive sessions for sandboxes whose names
start with `ai-sdk-harness`, matching the existing inventory query.
---------
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>