UNPKG

hdc-mcp

Version:

MCP server for HDC (OpenHarmony Device Connector) tools

70 lines 3.17 kB
export interface HdcDevice { connectKey: string; connectionType: 'USB' | 'TCP'; status: 'Connected' | 'Disconnected'; deviceName?: string; } export interface HdcAppInfo { bundleName: string; version: string; label: string; debuggable: boolean; } export interface DeviceInfo { name: string; brand: string; model: string; version: string; apiVersion: string; cpuArch: string; resolution: string; ipAddress: string; battery: number; temperature: number; } export interface UIOperationResult { success: boolean; message: string; x?: number; y?: number; direction?: 'left' | 'right' | 'up' | 'down'; text?: string; } export declare class HdcWrapper { private hdcPath; constructor(); private findHdcPath; private executeCommand; getVersion(): Promise<string>; listDevices(): Promise<HdcDevice[]>; getDeviceInfo(deviceId: string): Promise<DeviceInfo>; installApp(deviceId: string, appPath: string): Promise<string>; uninstallApp(deviceId: string, bundleName: string): Promise<string>; listApps(deviceId: string): Promise<HdcAppInfo[]>; startApp(deviceId: string, bundleName: string, abilityName?: string): Promise<string>; stopApp(deviceId: string, bundleName: string): Promise<string>; clearAppData(deviceId: string, bundleName: string): Promise<string>; pushFile(deviceId: string, localPath: string, remotePath: string): Promise<string>; pullFile(deviceId: string, remotePath: string, localPath: string): Promise<string>; takeScreenshot(deviceId: string, savePath: string): Promise<string>; getUIHierarchy(deviceId: string): Promise<string>; rebootDevice(deviceId: string): Promise<string>; getLogs(deviceId: string, tag?: string, lines?: number): Promise<string>; click(deviceId: string, x: number, y: number): Promise<string>; doubleClick(deviceId: string, x: number, y: number): Promise<string>; longClick(deviceId: string, x: number, y: number): Promise<string>; swipe(deviceId: string, fromX: number, fromY: number, toX: number, toY: number, velocity?: number): Promise<string>; fling(deviceId: string, fromX: number, fromY: number, toX: number, toY: number, velocity?: number, stepLength?: number): Promise<string>; drag(deviceId: string, fromX: number, fromY: number, toX: number, toY: number, velocity?: number): Promise<string>; dircFling(deviceId: string, direction: 0 | 1 | 2 | 3, velocity?: number, stepLength?: number): Promise<string>; inputText(deviceId: string, x: number, y: number, text: string): Promise<string>; keyEvent(deviceId: string, keyId: number, keyId2?: number): Promise<string>; swipeLeft(deviceId: string, velocity?: number): Promise<string>; swipeRight(deviceId: string, velocity?: number): Promise<string>; swipeUp(deviceId: string, velocity?: number): Promise<string>; swipeDown(deviceId: string, velocity?: number): Promise<string>; goHome(deviceId: string): Promise<string>; goBack(deviceId: string): Promise<string>; paste(deviceId: string): Promise<string>; } //# sourceMappingURL=hdc-wrapper.d.ts.map