# work-queue-api Lightweight internal work queue API for TheLab agents. ## Features - Go HTTP API with chi router - SQLite storage, auto-migrated on startup - Projects and work items endpoints from `SPEC.md` - Dispatch history tracking - Enforces one `in_progress` item per agent - No auth, binds to port `8080` by default ## Run locally ```bash export DATABASE_URL=./work_queue.db export PORT=8080 ~/.local/go/bin/go run ./cmd/work-queue-api ``` ## Build ```bash ~/.local/go/bin/go build ./cmd/work-queue-api ``` ## Endpoints - `GET /health` - `POST/GET/PATCH /projects` - `POST/GET/PATCH/DELETE /work` ## Notes - `POST /work` accepts `assigned_agent`, but still creates the item in `queued` - `PATCH /work/:id` enforces status transitions from the spec - `DELETE /work/:id` cancels queued or dispatched work items