xc-mcp
Version:
MCP server that wraps Xcode command-line tools for iOS/macOS development workflows
67 lines • 2.19 kB
TypeScript
import { SimulatorRuntime, SimulatorDeviceType } from '../types/xcode.js';
export interface SimulatorInfo {
udid: string;
name: string;
deviceTypeIdentifier: string;
state: string;
isAvailable: boolean;
availability: string;
availabilityError?: string;
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;
constructor();
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;
/**
* Load persisted state from disk
*/
private loadPersistedState;
/**
* Persist state to disk with debouncing
*/
private saveStateTimeout;
private persistStateDebounced;
}
export declare const simulatorCache: SimulatorCache;
//# sourceMappingURL=simulator-cache.d.ts.map