Files
work-queue-api/README.md
Steve W f0275c41d0
All checks were successful
ci / test-and-build (push) Successful in 11m21s
feat: add sqlite-backed API docs and tests
2026-04-11 18:42:05 +00:00

34 lines
822 B
Markdown

# 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