mcp-xcode
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
50 lines • 1.82 kB
TypeScript
import { SimulatorDevice, SimulatorRuntime, SimulatorDeviceType } from '../types/xcode.js';
export interface SimulatorInfo extends SimulatorDevice {
lastUsed?: Date;
bootHistory: Date[];
performanceMetrics?: {
avgBootTime?: number;
reliability?: number;
};
}
export interface CachedSimulatorList {
devices: {
[runtime: string]: SimulatorInfo[];
};
runtimes: SimulatorRuntime[];
devicetypes: SimulatorDeviceType[];
lastUpdated: Date;
preferredByProject: Map<string, string>;
}
export declare class SimulatorCache {
private cache;
private cacheMaxAge;
private bootStates;
private preferredByProject;
private lastUsed;
setCacheMaxAge(milliseconds: number): void;
getCacheMaxAge(): number;
clearCache(): void;
getSimulatorList(force?: boolean): Promise<CachedSimulatorList>;
getAvailableSimulators(deviceType?: string, runtime?: string): Promise<SimulatorInfo[]>;
getPreferredSimulator(projectPath?: string, deviceType?: string): Promise<SimulatorInfo | null>;
findSimulatorByUdid(udid: string): Promise<SimulatorInfo | null>;
recordSimulatorUsage(udid: string, projectPath?: string): void;
recordBootEvent(udid: string, success: boolean, duration?: number): void;
getBootState(udid: string): 'booted' | 'shutdown' | 'booting' | 'unknown';
getCacheStats(): {
isCached: boolean;
lastUpdated?: Date;
cacheMaxAgeMs: number;
cacheMaxAgeHuman: string;
deviceCount: number;
recentlyUsedCount: number;
isExpired: boolean;
timeUntilExpiry?: string;
};
private isCacheValid;
private findExistingDevice;
private formatDuration;
}
export declare const simulatorCache: SimulatorCache;
//# sourceMappingURL=simulator-cache.d.ts.map