feat(workspace): add repos JSONB field for GitHub repository URLs

Add a `repos` JSONB column to the workspace table for storing
associated repository URLs and descriptions. This enables the daemon
to clone repos and set up git worktrees for agent task execution.

Structure: [{"url": "https://github.com/org/repo", "description": "..."}]

- Migration 014: adds repos column with default '[]'
- UpdateWorkspace query: supports updating repos
- Workspace API: returns repos in GET, accepts in PUT

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
yushen 2026-03-27 15:49:30 +08:00
parent 1deae2a1e9
commit 83111761db
7 changed files with 116 additions and 90 deletions

View file

@ -23,6 +23,7 @@ UPDATE workspace SET
description = COALESCE(sqlc.narg('description'), description),
context = COALESCE(sqlc.narg('context'), context),
settings = COALESCE(sqlc.narg('settings'), settings),
repos = COALESCE(sqlc.narg('repos'), repos),
updated_at = now()
WHERE id = $1
RETURNING *;