Files
loki/scripts
Mao NakamotoandClaude Opus 4.8 992aee23a8 feat(workspaces): Phase 2 — stream the owned PTY to the browser xterm
Connection plane for the agent-execution platform: the FleetCrown-owned PTY now
reaches the UI with no zellij in the path.

- Renamed the module src/lib/executor -> src/lib/agent-execution to avoid
  colliding with the pre-existing command-executor (src/lib/executor.ts:
  direct-zellij vs cloud pending_commands), which was shadowing the dir import.
- API: POST /api/workspaces (provision, idempotent per user+project) + GET
  (list); GET /api/workspaces/[id]/stream (SSE: replays retained history via
  Last-Event-ID, then live output/status/exit); POST /api/workspaces/[id]
  (input / resize / terminate). Auth by workspace-id prefix (userId:projectKey)
  — multi-tenant safe, node runtime.
- WorkspaceTerminal.tsx: wraps the @xterm/xterm already shipped, fed by the SSE
  stream, keystrokes -> POST. Drop-in replacement for the zellij screen-dump peek.

Executor test still 11/11 green. Next: wire Control's 'Open workspace' at this
+ provision-on-launch, then SandboxExecutor for multi-tenant prod.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-17 02:38:41 +02:00
..