@airtop/sdk 1.0.0-alpha2.41 → 1.0.0-alpha2.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +25 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +25 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -9,7 +9,7 @@ var require_package = __commonJS({
|
|
|
9
9
|
module.exports = {
|
|
10
10
|
name: "@airtop/sdk",
|
|
11
11
|
description: "Airtop SDK for TypeScript",
|
|
12
|
-
version: "1.0.0-alpha2.
|
|
12
|
+
version: "1.0.0-alpha2.42",
|
|
13
13
|
type: "module",
|
|
14
14
|
main: "./dist/index.cjs",
|
|
15
15
|
module: "./dist/index.js",
|
|
@@ -48,7 +48,7 @@ var require_package = __commonJS({
|
|
|
48
48
|
"verify-types": "tsc --noEmit && tsc --noEmit --project tsconfig.e2e.json"
|
|
49
49
|
},
|
|
50
50
|
dependencies: {
|
|
51
|
-
"@airtop/core": "0.1.0-alpha.
|
|
51
|
+
"@airtop/core": "0.1.0-alpha.52",
|
|
52
52
|
"@airtop/json-schema-adapter": "workspace:*",
|
|
53
53
|
"date-fns": "4.1.0",
|
|
54
54
|
loglayer: "8.1.0",
|
|
@@ -1133,6 +1133,29 @@ var AirtopWindowClient = class extends AirtopBase {
|
|
|
1133
1133
|
)
|
|
1134
1134
|
);
|
|
1135
1135
|
}
|
|
1136
|
+
/**
|
|
1137
|
+
* Executes a computer use action in the window using AI-driven browser automation.
|
|
1138
|
+
* @param prompt - A natural language description of the action to perform
|
|
1139
|
+
* @param config - Configuration options for the computer use action
|
|
1140
|
+
* @param requestOptions - Request options
|
|
1141
|
+
* @returns Promise resolving to the computer use operation result
|
|
1142
|
+
*/
|
|
1143
|
+
async computerUse(prompt, config, requestOptions = {}) {
|
|
1144
|
+
return await withRequestCompletionPolling(
|
|
1145
|
+
this.client,
|
|
1146
|
+
() => this.client.windows.computerUse(
|
|
1147
|
+
this.getWindowId(),
|
|
1148
|
+
{
|
|
1149
|
+
sessionId: this.sessionId,
|
|
1150
|
+
prompt,
|
|
1151
|
+
...config || {}
|
|
1152
|
+
},
|
|
1153
|
+
{
|
|
1154
|
+
...this.resolveRequestOptions(requestOptions)
|
|
1155
|
+
}
|
|
1156
|
+
)
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1136
1159
|
};
|
|
1137
1160
|
|
|
1138
1161
|
// src/window/AirtopWindow.ts
|