# Issue #163: Add BullMQ Dependencies

## Objective

Add BullMQ and @nestjs/bullmq packages to the API for job queue management required by the M4.2 Infrastructure milestone. These packages enable job progress tracking, automatic retry with exponential backoff, rate limiting, and job dependencies for the mosaic-stitcher wrapper architecture.

## Context

- **Architecture**: Job queue for mosaic-stitcher (control layer wrapper over OpenClaw)
- **Why BullMQ**: Provides advanced queue features over plain Valkey (progress tracking, retries, rate limiting, dependencies)
- **Existing Setup**: API already uses ioredis with Valkey
- **Target Version**: Compatible with existing NestJS 11.1.12 ecosystem

## Approach

1. Add bullmq package (latest stable)
2. Add @nestjs/bullmq adapter (latest stable, compatible with NestJS 11)
3. Verify compatibility with existing ioredis/Valkey setup
4. Run quality gates (pnpm install, pnpm build)
5. Commit with message: `feat(#163): Add BullMQ dependencies`

## Progress

- [x] Add dependencies to apps/api/package.json
- [x] Run pnpm install
- [x] Run pnpm build
- [x] Commit changes

## Testing Plan

1. Run `pnpm install` from workspace root - verify no conflicts
2. Run `pnpm build` in apps/api - verify TypeScript compilation succeeds
3. Check that bullmq and @nestjs/bullmq are in node_modules

## Acceptance Criteria

- [x] Packages installed and `pnpm install` succeeds
- [x] No conflicts with existing dependencies
- [x] `pnpm build` succeeds

## Notes

- Using workspace root for pnpm commands to respect monorepo configuration
- BullMQ works with any Redis-compatible client (ioredis already configured)
- No code changes needed in this task - dependency addition only
