Implementation: How to decouple Vitto from backend-ai-api without breaking t...
Documentation for Sessions
⚙️ Implementation: How to decouple Vitto from backend-ai-api without breaking t...
Date: 2026-02-07
Time: 18:11:11 UTC
Session: gspace1-98.5
Agent: backend
Confidence: 97%
Status: ✅ Documented
📋 Decision Context
Question:
How to decouple Vitto from backend-ai-api without breaking the agentic process?
Task: Vitto decoupling from backend-ai-api
🎯 Decision Made
Chosen:
Extract only processDirectChat into a new ChatService, remove VittoModule from app.module.ts and chat.module.ts. HandoffService, AgentService, NativeWsGateway, HandoffTimeoutService all verified to have zero Vitto dependencies.
Options Considered:
- Remove VittoModule entirely
- Keep VittoModule but disable auto-connect
- Extract chat only, keep rest
- Gradual deprecation over multiple sessions
💭 Reasoning
Only 3 files outside vitto/ referenced VittoModule: app.module.ts (root import), chat.module.ts (for chat feature), chat.controller.ts (calls processDirectChat). The entire agent communication infrastructure (WebSocket, handoffs, agent registry, MCP gateway, Chrome/VSCode extensions) is completely independent of Vitto. Chat was the only real dependency — extracted into standalone ChatService with same Anthropic/Bottleneck setup.
📁 Files Involved
apis/backend-ai-api/src/app/chat/chat.service.tsapis/backend-ai-api/src/app/chat/chat.module.tsapis/backend-ai-api/src/app/chat/chat.controller.tsapis/backend-ai-api/src/app/app.module.ts
🔗 Related
- Decision ID:
dev_1770487871202_6vobfax - Session: 98
- Workspace: gspace1
Auto-generated by MCP Smart Consolidation