UNPKG

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

52 lines 1.55 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.KeyboardApi = void 0; /** * API endpoints for keyboard operations */ class KeyboardApi { /** * Creates a new instance of the KeyboardApi * @param client The SmoothOperatorClient instance */ constructor(client) { this.client = client; } /** * Type text at the current cursor position * @param text Text to type * @returns Action response */ async type(text) { return this.client.post('/tools-api/keyboard/type', { text }); } /** * Presses key or hotkey combination (e.g. "Ctrl+C" or "Alt+F4") * @param key Key name or combination * @returns Action response with success status */ async press(key) { return this.client.post('/tools-api/keyboard/press', { key }); } /** * Find a UI element based on a text description and type text into it * @param elementDescription Text description of the UI element * @param textToType Text to type * @returns Action response */ async typeAtElement(elementDescription, textToType) { return this.client.post('/tools-api/keyboard/type-at-element', { elementDescription, textToType }); } /** * Returns a string representation of the KeyboardApi class. * @returns The string "KeyboardApi". */ toString() { return 'KeyboardApi'; } } exports.KeyboardApi = KeyboardApi; //# sourceMappingURL=keyboard-api.js.map