/** * Shared DTOs for RouteCodex (mirror of current pipeline interfaces) * * These types intentionally mirror the existing shapes used across the * pipeline so downstream modules can import a single source of truth * without changing behavior. */ export interface SharedRouteRequest { readonly providerId: string; readonly modelId: string; readonly requestId: string; readonly timestamp?: number; readonly pipelineId?: string; } export interface SharedPipelineRequest { readonly data: unknown; readonly route: { providerId: string; modelId: string; requestId: string; timestamp: number; }; readonly metadata: Record; readonly debug: { enabled: boolean; stages: Record; }; } export interface SharedPipelineError { readonly stage: string; readonly code: string; readonly message: string; readonly details?: unknown; readonly timestamp: number; } export interface SharedPipelineResponse { readonly data: T; readonly metadata: { pipelineId: string; processingTime: number; stages: string[]; requestId?: string; errors?: SharedPipelineError[]; }; readonly debug?: { request: unknown; response: unknown; transformations: unknown; timings: Record; }; }