← ClaudeAtlas

session-processeslisted

ShipIt session worker processes: Claude CLI spawning and NDJSON parsing, agent abstraction (AgentProcess, ProxyAgentProcess), Docker Compose services (ServiceManager), file watcher, terminal PTY, session worker endpoints. Load when working on Claude process management, compose services, file watcher, terminal, or agent adapters.
nikzlabs/shipit · ★ 5 · AI & Automation · score 73
Install: claude install-skill nikzlabs/shipit
# Session Worker Processes Each session runs in a Docker container with a Fastify server (port 9100) that manages the Claude CLI, preview server, file watcher, and terminal. The orchestrator communicates with session workers via HTTP (commands) and SSE (events). ## Session Worker `src/server/session/session-worker.ts` — Fastify server running inside each container. ### Endpoints | Method | Path | Purpose | |--------|------|---------| | `POST` | `/agent/start` | Start Claude with prompt, images, system prompt | | `POST` | `/agent/interrupt` | Graceful interrupt (Ctrl+C) | | `POST` | `/agent/kill` | Force terminate | | `POST` | `/agent/stdin` | Write to agent stdin (answer questions) | | `POST` | `/terminal/start` | Start interactive shell | | `POST` | `/terminal/input` | Write to terminal | | `POST` | `/terminal/resize` | Resize terminal | | `POST` | `/files/watch` | Start file watcher (idempotent) | | `POST` | `/files/unwatch` | Stop file watcher | | `GET` | `/files/tree` | Scan file tree | | `GET` | `/events` | SSE event stream | | `GET` | `/health` | Health check | ### SSE Event Stream The `/events` endpoint is a long-lived SSE connection. The worker broadcasts events from all managed processes: | Event | Source | Data | |-------|--------|------| | `agent_event` | Claude CLI | Parsed NDJSON agent events | | `agent_done` | Claude CLI | Exit code | | `agent_error` | Claude CLI | Error message | | `agent_auth_required` | Claude CLI | Auth URL | | `agent_log` | Claude C