import { FFBLangChainService } from './services/ffb-langchain.service'; import { FFBVectorService } from './services/ffb-vector.service'; // 1. Mock the Gateway (it just needs to not crash when emitThought is called) const mockGateway = { emitThought: (socketId: string, payload: any) => { console.log(`[Studio Thought - ${socketId}]:`, payload.message); } } as any; // 2. Mock the Vector Service // Note: For real data in Studio, you'd connect to your dev Mongo here const mockVectorService = { vectorSearch: async () => [], aggregate: async () => [{ totalValue: 0 }], getDistinct: async () => [], getSchemaContext: async () => "Fields: site, weight, quantity, block, phase" } as any; // 3. Initialize the service const langChainService = new FFBLangChainService(mockVectorService, mockGateway); // 4. Export the compiled graph (Crucial for Studio) export const graph = langChainService['graph'];