smooth-operator-agent-tools
Version:
Node.js client library for Smooth Operator Agent Tools - a toolkit for programmers developing Computer Use Agents on Windows systems
75 lines (74 loc) • 2.91 kB
TypeScript
import { ActionResponse, SimpleResponse, WindowDetailInfosDTO } from '../models/models';
import { SmoothOperatorClient } from '../smooth-operator-client';
/**
* API endpoints for Windows automation operations
*/
export declare class AutomationApi {
private client;
/**
* Creates a new instance of the AutomationApi
* @param client The SmoothOperatorClient instance
*/
constructor(client: SmoothOperatorClient);
/**
* Launches an application by path or name
* @param appNameOrPath Full path to executable or application name, alternatively exe name if in path (e.g. notepad, calc)
* @returns SimpleResponse indicating success or failure
*/
openApplication(appNameOrPath: string): Promise<SimpleResponse>;
/**
* Invokes default action on Windows UI element (e.g. click button)
* @param elementId Element ID from getOverview/getWindowDetails
* @returns SimpleResponse indicating success or failure
*/
invoke(elementId: string): Promise<SimpleResponse>;
/**
* Set the value of a UI element
* @param elementId ID of the UI element
* @param value Value to set
* @returns SimpleResponse indicating success or failure
*/
setValue(elementId: string, value: string): Promise<SimpleResponse>;
/**
* Set focus to a UI element
* @param elementId ID of the UI element
* @returns SimpleResponse indicating success or failure
*/
setFocus(elementId: string): Promise<SimpleResponse>;
/**
* Gets detailed UI automation information for a window
* @param windowId Window ID from getOverview
* @returns WindowDetailInfosDTO with element hierarchy and properties
*/
getWindowDetails(windowId: string): Promise<WindowDetailInfosDTO>;
/**
* Bring a window to the front
* @param windowId ID of the window
* @returns SimpleResponse indicating success or failure
*/
bringToFront(windowId: string): Promise<SimpleResponse>;
/**
* Find and click a Windows UI element by description
* @param description Description of the UI element
* @returns Action response
*/
clickElement(description: string): Promise<ActionResponse>;
/**
* Find a Windows UI element by description and type text into it
* @param description Description of the UI element
* @param text Text to type
* @returns Action response
*/
typeInElement(description: string, text: string): Promise<ActionResponse>;
/**
* Get text from a Windows UI element by description
* @param description Description of the UI element
* @returns Action response with element text
*/
getElementText(description: string): Promise<ActionResponse>;
/**
* Returns a string representation of the AutomationApi class.
* @returns The string "AutomationApi".
*/
toString(): string;
}