Title#
feat: add Redis (BullMQ) foundation to agent-core
Problem#
Agent-core lacks Redis connectivity and queue infrastructure needed to support async phase dispatch (AW-4, AW-5, AW-7, AW-9).
Task / Link#
Closes #439
Changes#
- Added
@nestjs/bullmq,bullmq, andioredisas runtime dependencies - Added
REDIS_HOST(default:localhost) andREDIS_PORT(default:6379) to Joi config schema - Registered
BullModule.forRootAsync()inAppModulewith ConfigService-driven connection - Registered
phase-invokeandphase-resultqueues viaBullModule.registerQueue() - Added a dedicated
ioredisclient provider inHealthModulefor health probes - Updated
HealthService.getHealth()to returnredis: "connected" | "disconnected"via asyncping() - Added
health.service.spec.tscovering connected and disconnected Redis states
Notes#
- Redis health check uses a separate
ioredisinstance (withlazyConnect: true) to avoid coupling probes to BullMQ's internal connection lifecycle. - BullMQ will fail fast at startup if Redis is unavailable — no silent swallowing.
Testing#
- Unit tests:
npm run test— 802 tests pass, no regressions - Build:
npm run build— zero errors - Lint:
npm run lint— zero warnings