feat(service): P4.3 AssignmentService — event-driven least-loaded assignment

Consumes support.ticket.created -> picks least-loaded available agent within
capacity -> ticket OPEN, activeCount++, agent joins linked thread(s), base
thread untouched; idempotent (processed-event + assignedActorId guard). Queue/
team admin (createQueue/addMember/setAvailability, re-scan on available). 45 tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-01 11:55:31 +05:30
parent 2695f0ffee
commit 859124914c
4 changed files with 245 additions and 2 deletions
+2
View File
@@ -7,6 +7,7 @@ import { OutboxModule } from './outbox/outbox.module';
import { ThreadsModule } from './threads/threads.module';
import { MessageModule } from './messaging/message.module';
import { InboxModule } from './inbox/inbox.module';
import { SupportModule } from './support/support.module';
import { HealthController } from './health.controller';
import { DevController } from './dev/dev.controller';
@@ -20,6 +21,7 @@ import { DevController } from './dev/dev.controller';
ThreadsModule,
MessageModule,
InboxModule,
SupportModule,
],
controllers: [HealthController, DevController],
})