Files
helix-engage-server/src/app.module.ts
saridsa2 eb4000961f feat: SSE agent state, maint module, timestamp fix, missed call lead lookup
- SSE agent state stream: supervisor maintains state map from Ozonetel webhooks, streams via /api/supervisor/agent-state/stream
- Force-logout via SSE: distinct force-logout event type avoids conflict with normal login cycle
- Maint module (/api/maint): OTP-guarded endpoints for force-ready, unlock-agent, backfill-missed-calls, fix-timestamps
- Fix Ozonetel IST→UTC timestamp conversion: istToUtc() in webhook controller and missed-queue service
- Missed call lead lookup: ingestion queries leads by phone, stores leadId + leadName on Call entity
- Timestamp backfill endpoint: throttled at 700ms/mutation, idempotent (skips already-fixed records)
- Structured logging: full JSON payloads for agent/call webhooks, [DISPOSE] trace with agentId
- Fix dead code: agent-state endpoint auto-assign was after return statement
- Export SupervisorService for cross-module injection

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 22:04:31 +05:30

40 lines
1.4 KiB
TypeScript

import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import configuration from './config/configuration';
import { AiModule } from './ai/ai.module';
import { AuthModule } from './auth/auth.module';
import { PlatformModule } from './platform/platform.module';
import { ExotelModule } from './exotel/exotel.module';
import { CallEventsModule } from './call-events/call-events.module';
import { OzonetelAgentModule } from './ozonetel/ozonetel-agent.module';
import { GraphqlProxyModule } from './graphql-proxy/graphql-proxy.module';
import { HealthModule } from './health/health.module';
import { WorklistModule } from './worklist/worklist.module';
import { CallAssistModule } from './call-assist/call-assist.module';
import { SearchModule } from './search/search.module';
import { SupervisorModule } from './supervisor/supervisor.module';
import { MaintModule } from './maint/maint.module';
@Module({
imports: [
ConfigModule.forRoot({
load: [configuration],
isGlobal: true,
}),
AiModule,
AuthModule,
PlatformModule,
ExotelModule,
CallEventsModule,
OzonetelAgentModule,
GraphqlProxyModule,
HealthModule,
WorklistModule,
CallAssistModule,
SearchModule,
SupervisorModule,
MaintModule,
],
})
export class AppModule {}