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

56 lines 2.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SystemApi = void 0; /** * API endpoints for system operations */ class SystemApi { /** * Creates a new instance of the SystemApi * @param client The SmoothOperatorClient instance */ constructor(client) { this.client = client; } /** * Gets detailed overview of computer state including open applications and windows * @returns OverviewResponse with FocusInfo, Windows array and Chrome details */ async getOverview() { return this.client.post('/tools-api/system/overview', {}); } /** * Gets detailed UI automation information for a window * @param windowId Window ID from getOverview * @returns WindowDetailInfosDTO with element hierarchy and properties */ async getWindowDetails(windowId) { return this.client.post('/tools-api/automation/get-details', { windowId }); } /** * Opens Chrome browser (Playwright-managed instance) * @param url Optional URL to navigate to immediately * @param strategy Optional strategy for opening Chrome * @returns SimpleResponse indicating success or failure */ async openChrome(url, strategy) { return this.client.post('/tools-api/system/open-chrome', { url, strategy }); } /** * 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). For chrome don't use this, use openChrome instead. * @returns SimpleResponse indicating success or failure */ async openApplication(appNameOrPath) { return this.client.post('/tools-api/system/open-application', { appNameOrPath }); } /** * Returns a string representation of the SystemApi class. * @returns The string "SystemApi". */ toString() { return 'SystemApi'; } } exports.SystemApi = SystemApi; //# sourceMappingURL=system-api.js.map