import { Global, Module } from '@nestjs/common';
import { AgentService } from './agent.service.js';
import { ProviderService } from './provider.service.js';
import { ProviderCredentialsService } from './provider-credentials.service.js';
import { RoutingService } from './routing.service.js';
import { RoutingEngineService } from './routing/routing-engine.service.js';
import { SkillLoaderService } from './skill-loader.service.js';
import { ProvidersController } from './providers.controller.js';
import { SessionsController } from './sessions.controller.js';
import { AgentConfigsController } from './agent-configs.controller.js';
import { RoutingController } from './routing/routing.controller.js';
import { CoordModule } from '../coord/coord.module.js';
import { McpClientModule } from '../mcp-client/mcp-client.module.js';
import { SkillsModule } from '../skills/skills.module.js';
import { GCModule } from '../gc/gc.module.js';

@Global()
@Module({
  imports: [CoordModule, McpClientModule, SkillsModule, GCModule],
  providers: [
    ProviderService,
    ProviderCredentialsService,
    RoutingService,
    RoutingEngineService,
    SkillLoaderService,
    AgentService,
  ],
  controllers: [ProvidersController, SessionsController, AgentConfigsController, RoutingController],
  exports: [
    AgentService,
    ProviderService,
    ProviderCredentialsService,
    RoutingService,
    RoutingEngineService,
    SkillLoaderService,
  ],
})
export class AgentModule {}
