Architecture: How to resolve conflicting type exports between GenerationRo...
Documentation for Sessions
🏗️ Architecture: How to resolve conflicting type exports between GenerationRo...
Date: 2026-01-22
Time: 15:56:34 UTC
Session: editor2-57.9
Agent: backend
Confidence: 90%
Status: ✅ Documented
📋 Decision Context
Question:
How to resolve conflicting type exports between GenerationRouterService and IntelligenceCoordinatorService?
Task: Session 57.3: Fix duplicate type export conflicts
🎯 Decision Made
Chosen:
Renamed router types with 'Router' prefix (RouterGenerationResult, RouterGeneratedCode, RouterGeneratedData, etc.)
Options Considered:
- Merge types into single definition
- Remove one set of types
- Rename router types with 'Router' prefix to coexist
💭 Reasoning
Both services serve different purposes: IntelligenceCoordinatorService handles client-side AI coordination with detailed result types (code, confidence, suggestions, mockApi), while GenerationRouterService is a simple routing layer to backend-api. Rather than merging (which would couple them) or removing (which would break consumers), prefixing router types maintains separation of concerns and allows both to evolve independently. The IntelligenceCoordinatorService types are more mature and widely used, so those kept original names.
📁 Files Involved
libs/libs-ai/gograb-ai/src/lib/services/generation-router.service.tslibs/libs-ai/gograb-ai/src/lib/services/index.ts
🔗 Related
- Decision ID:
dev_1769097394278_t0wv7er - Session: 57
- Workspace: editor2
Auto-generated by MCP Smart Consolidation