import { Module } from '@nestjs/common';
import { AiClientModule } from '../ai-client/ai-client.module';
import { AiBridgeController } from './ai-bridge.controller';

/**
 * Hosts `AiBridgeController` and depends on `AiClientModule` for
 * the four wrapper clients (`ChatClient`, `RagClient`,
 * `ModelsClient`, plus `PrincipalMapper`). `AiClientModule`'s
 * `OnApplicationShutdown` lifecycle closes the gRPC stubs at
 * process termination — wiring this module into `AppModule`
 * brings both the controller AND the shutdown contract along.
 *
 * Per [ADR-0024](../../../../../docs/decisions/0024-ai-service-relay-grpc-sse-bridge.md)
 * §"Out of scope for this ADR" the ingestion surface is not
 * exposed via the BFF in v1 — `IngestionClient` is in
 * `AiClientModule` for future reuse but `AiBridgeController`
 * does not surface it. The CLI under `apf-ai-service/tools/Apf.Ai.Ingest/`
 * is the v1 ingestion path.
 */
@Module({
  imports: [AiClientModule],
  controllers: [AiBridgeController],
})
export class AiBridgeModule {}
