feat: add sqlite-backed API docs and tests
All checks were successful
ci / test-and-build (push) Successful in 11m21s
All checks were successful
ci / test-and-build (push) Successful in 11m21s
This commit is contained in:
33
README.md
Normal file
33
README.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# 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
|
||||
Reference in New Issue
Block a user