xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
72 lines • 2.23 kB
TypeScript
export interface ProjectConfig {
lastUsedSimulator?: string;
lastUsedSimulatorName?: string;
lastBuildTime?: number;
buildCount?: number;
successfulBuilds?: number;
}
export interface XCMCPConfig {
version: string;
projectConfigs: Map<string, ProjectConfig>;
lastUpdated: Date;
}
/**
* ConfigManager handles project-local configuration with auto-learning capabilities.
* Stores `.xc-mcp/config.json` in project directories for persistent preferences.
*
* Features:
* - Project-specific simulator preferences
* - Build history tracking
* - Atomic writes (temp file + rename)
* - Graceful degradation if config unavailable
*/
export declare class ConfigManager {
private configDir;
private projectConfigs;
private readonly schemaVersion;
private readonly configFileName;
constructor(projectPath?: string);
/**
* Get the full path to the config file
*/
private getConfigPath;
/**
* Get project-specific configuration
*/
getProjectConfig(projectPath: string): Promise<ProjectConfig>;
/**
* Update project configuration
*/
updateProjectConfig(projectPath: string, updates: Partial<ProjectConfig>): Promise<void>;
/**
* Record a successful build with simulator preference
*/
recordSuccessfulBuild(projectPath: string, simulatorUDID?: string, simulatorName?: string): Promise<void>;
/**
* Get last used simulator for project
*/
getLastUsedSimulator(projectPath: string): Promise<string | undefined>;
/**
* Get build success rate for project
*/
getBuildSuccessRate(projectPath: string): Promise<number>;
/**
* Load entire config from disk
*/
private loadConfigFromDisk;
/**
* Save entire config to disk with atomic writes
*/
private saveConfigToDisk;
/**
* Clear all configurations
*/
clear(): Promise<void>;
/**
* Get all project configurations
*/
getAllProjectConfigs(): Map<string, ProjectConfig>;
}
export declare function createConfigManager(projectPath?: string): ConfigManager;
export declare function getConfigManager(projectPath?: string): ConfigManager;
//# sourceMappingURL=config.d.ts.map