| import { FastifyInstance } from 'fastify'; |
| import { healthRoutes } from './health.route.js'; |
| import { triageRoutes } from './triage.route.js'; |
| import { cvRoutes } from './cv.route.js'; |
| import { triageRulesRoutes } from './triage-rules.route.js'; |
| import { ragRoutes } from './rag.route.js'; |
| import { mapsRoutes } from './maps.route.js'; |
| import { sessionsRoutes } from './sessions.route.js'; |
| import { conversationRoutes } from './conversation.route.js'; |
| import { websocketRoutes } from './websocket.route.js'; |
| import { reportRoutes } from './report.route.js'; |
| import { MedagenAgent } from '../agent/agent-executor.js'; |
| import { SupabaseService } from '../services/supabase.service.js'; |
| import { MapsService } from '../services/maps.service.js'; |
| import { ConversationHistoryService } from '../services/conversation-history.service.js'; |
| import { ToolExecutionTrackerService } from '../services/tool-execution-tracker.service.js'; |
|
|
| export async function registerRoutes( |
| fastify: FastifyInstance, |
| agent: MedagenAgent, |
| supabaseService: SupabaseService, |
| mapsService: MapsService |
| ) { |
| |
| await healthRoutes(fastify); |
|
|
| |
| await websocketRoutes(fastify); |
|
|
| |
| const conversationService = new ConversationHistoryService(supabaseService.getClient()); |
| const toolTracker = new ToolExecutionTrackerService(supabaseService.getClient()); |
|
|
| |
| await triageRoutes(fastify, agent, supabaseService, mapsService); |
|
|
| |
| await cvRoutes(fastify); |
|
|
| |
| await triageRulesRoutes(fastify); |
|
|
| |
| await ragRoutes(fastify, supabaseService); |
|
|
| |
| await mapsRoutes(fastify); |
|
|
| |
| await sessionsRoutes(fastify, supabaseService); |
| await conversationRoutes(fastify, supabaseService); |
| |
| |
| await reportRoutes(fastify, supabaseService, conversationService, toolTracker); |
| } |
|
|
|
|