Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ import mcpServer from './mcp/mcp-server.js';
* It also serves as the entry point for starting the MCP server.
*/

// Local imports for internal use
import { IDBManager } from './idb/IDBManager.js';
import { NLParser } from './parser/NLParser.js';
import { MCPOrchestrator } from './orchestrator/MCPOrchestrator.js';

// Export interfaces
export { IIDBManager, SimulatorInfo, AppInfo, SessionConfig } from './idb/interfaces/IIDBManager.js';
export { IParser, ParseResult, ValidationResult } from './parser/interfaces/IParser.js';
Expand All @@ -54,23 +49,6 @@ export { MCPOrchestrator } from './orchestrator/MCPOrchestrator.js';
export { ParserToOrchestrator } from './adapters/ParserToOrchestrator.js';
export { OrchestratorToIDB } from './adapters/OrchestratorToIDB.js';

/**
* Create a complete MCP Server instance
* @returns Object with all necessary instances
*/
export function createMCPServer() {
// Create instances
const idbManager = new IDBManager();
const parser = new NLParser();
const orchestrator = new MCPOrchestrator(parser, idbManager);

return {
idbManager,
parser,
orchestrator
};
}

/**
* Main entry point for the MCP server
*
Expand Down
22 changes: 21 additions & 1 deletion src/mcp/mcp-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@ import fs from 'fs';
import path from 'path';
import { fileURLToPath } from 'url';

import { createMCPServer } from '../index.js';
// Export implementations
import { IDBManager } from '../idb/IDBManager.js';
import { NLParser } from '../parser/NLParser.js';
import { MCPOrchestrator } from '../orchestrator/MCPOrchestrator.js';

// Log configuration
// Get the directory name using ESM approach
Expand All @@ -35,6 +38,23 @@ const logToFile = (message: string, level: string = 'info') => {
}
};

/**
* Create a complete MCP Server instance
* @returns Object with all necessary instances
*/
export function createMCPServer() {
// Create instances
const idbManager = new IDBManager();
const parser = new NLParser();
const orchestrator = new MCPOrchestrator(parser, idbManager);

return {
idbManager,
parser,
orchestrator
};
}

/**
* MCP Server implementation for iOS simulator
*/
Expand Down