Session model:
- agent_sessions table (auto-created on first use): id, project_id,
app_name, app_path, task, status, output (JSONB log), changed_files,
error, timestamps
- POST /agent/sessions — create session, fires off to agent-runner
(gracefully degrades when runner not yet wired)
- GET /agent/sessions — list sessions newest first
- GET /agent/sessions/[id] — full session state for polling
- PATCH /agent/sessions/[id] — internal: agent-runner appends output lines
- POST /agent/sessions/[id]/stop — stop running session
Build > Code section now has three mode tabs:
- Browse — existing file tree + code viewer
- Agent — task input, session list sidebar, live output stream,
changed files panel, Approve & commit / Open in Theia actions,
2s polling (Phase 3 will replace with WebSocket)
- Terminal — xterm.js placeholder (Phase 4)
Architecture documented in AGENT_EXECUTION_ARCHITECTURE.md
Made-with: Cursor
41 KiB
41 KiB