# Add GET /api/jobs/active endpoint

## Description

## Summary

Add endpoint to retrieve the currently active job ID in a structured format.

## Motivation

Currently when POST /api/sync returns 409 CONFLICT, the error message is:

```
Job <uuid> already running
```

Clients must parse the UUID from the string, which is fragile.

## Implementation

```typescript
// GET /api/jobs/active
// Returns the active job if one exists, null otherwise

export async function handleGetActiveJob(): Promise<Response> {
  const activeId = getActiveJobId(); // expose from jobs.ts
  if (!activeId) {
    return Response.json({ activeJob: null });
  }
  const job = getJobStatus(activeId);
  return Response.json({ activeJob: job });
}
```

## Alternative

Enhance 409 response to include structured details:

```json
{
  "error": {
    "code": "CONFLICT",
    "message": "Job abc-123 already running",
    "details": { "activeJobId": "abc-123" }
  }
}
```

Either approach works. The endpoint is more RESTful; the enhanced error is simpler.

## Files to Change

- src/serve/jobs.ts - export getActiveJobId()
- src/serve/routes/api.ts - add handler
- src/serve/server.ts - add route
- docs/API.md - document endpoint

## Acceptance

- [ ] Implementation complete
- [ ] Tests passing
- [ ] Documentation updated

## Done summary

Implemented structured active-job discovery for the REST API.

Changes:

- added `GET /api/jobs/active`
- added structured `error.details.activeJobId` on job-conflict 409 responses
- documented the new route and conflict payload in API docs
- bumped package version to 0.32.0
- added route and job tracker tests

## Evidence

- Commits:
- Tests: bun test test/serve/jobs.test.ts test/serve/api-jobs.test.ts, bun run lint:check, bun run typecheck, bun test, bun run docs:verify
- PRs:
