test-wuying-agentbay-sdk 0.13.0-beta.20251212103901 → 0.13.0-beta.20251212112552
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 +60 -24
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +60 -24
- package/dist/index.d.ts +60 -24
- package/dist/index.mjs +60 -24
- package/dist/index.mjs.map +1 -1
- package/docs/api/common-features/advanced/browser-use-agent.md +14 -9
- package/docs/api/common-features/advanced/computer-use-agent.md +13 -7
- package/docs/api/common-features/basics/command.md +1 -1
- package/docs/api/computer-use/computer.md +1 -1
- package/package.json +1 -1
|
@@ -37,10 +37,12 @@ ExecutionResult containing success status, task output, and
|
|
|
37
37
|
const agentBay = new AgentBay({ apiKey: 'your_api_key' });
|
|
38
38
|
const result = await agentBay.create({ imageId: 'linux_latest' });
|
|
39
39
|
if (result.success) {
|
|
40
|
-
const taskResult = await
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
40
|
+
const taskResult = await result.session.agent.browser.executeTask(
|
|
41
|
+
'Navigate to baidu and query the weather of Shanghai',
|
|
42
|
+
10
|
|
43
|
+
);
|
|
44
|
+
console.log(`Task status: ${taskResult.taskStatus}`);
|
|
45
|
+
await result.session.delete();
|
|
44
46
|
}
|
|
45
47
|
```
|
|
46
48
|
|
|
@@ -101,12 +103,15 @@ ExecutionResult containing success status, task output, and
|
|
|
101
103
|
|
|
102
104
|
```typescript
|
|
103
105
|
const agentBay = new AgentBay({ apiKey: 'your_api_key' });
|
|
104
|
-
const result = await agentBay.create({ imageId: '
|
|
106
|
+
const result = await agentBay.create({ imageId: 'linux_latest' });
|
|
105
107
|
if (result.success) {
|
|
106
|
-
const taskResult = await
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
108
|
+
const taskResult = await result.session.agent.browser.executeTask(
|
|
109
|
+
'Navigate to baidu and query the weather of Shanghai',
|
|
110
|
+
10
|
|
111
|
+
);
|
|
112
|
+
const terminateResult = await result.session.agent.browser.terminateTask(
|
|
113
|
+
taskResult.taskId
|
|
114
|
+
);
|
|
110
115
|
console.log(`Terminated: ${terminateResult.taskStatus}`);
|
|
111
116
|
await result.session.delete();
|
|
112
117
|
}
|
|
@@ -38,9 +38,12 @@ ExecutionResult containing success status, task output, and error
|
|
|
38
38
|
const agentBay = new AgentBay({ apiKey: 'your_api_key' });
|
|
39
39
|
const result = await agentBay.create({ imageId: 'windows_latest' });
|
|
40
40
|
if (result.success) {
|
|
41
|
-
const taskResult = await result.session.agent.computer.executeTask(
|
|
42
|
-
notepad',
|
|
43
|
-
|
|
41
|
+
const taskResult = await result.session.agent.computer.executeTask(
|
|
42
|
+
'Open notepad',
|
|
43
|
+
10
|
|
44
|
+
);
|
|
45
|
+
console.log(`Task status: ${taskResult.taskStatus}`);
|
|
46
|
+
await result.session.delete();
|
|
44
47
|
}
|
|
45
48
|
```
|
|
46
49
|
|
|
@@ -69,10 +72,13 @@ ExecutionResult containing success status, task output, and
|
|
|
69
72
|
const agentBay = new AgentBay({ apiKey: 'your_api_key' });
|
|
70
73
|
const result = await agentBay.create({ imageId: 'windows_latest' });
|
|
71
74
|
if (result.success) {
|
|
72
|
-
const taskResult = await
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
const taskResult = await result.session.agent.computer.executeTask(
|
|
76
|
+
'Open notepad',
|
|
77
|
+
5
|
|
78
|
+
);
|
|
79
|
+
const terminateResult = await result.session.agent.computer.terminateTask(
|
|
80
|
+
taskResult.taskId
|
|
81
|
+
);
|
|
76
82
|
console.log(`Terminated: ${terminateResult.taskStatus}`);
|
|
77
83
|
await result.session.delete();
|
|
78
84
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
## Overview
|
|
8
8
|
|
|
9
9
|
The Command module provides methods for executing shell commands within a session in the AgentBay cloud environment.
|
|
10
|
-
|
|
10
|
+
Commands support configurable timeouts and optional working directory or environment settings.
|
|
11
11
|
|
|
12
12
|
Handles command execution operations in the AgentBay cloud environment.
|
|
13
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "test-wuying-agentbay-sdk",
|
|
3
|
-
"version": "0.13.0-beta.
|
|
3
|
+
"version": "0.13.0-beta.20251212112552",
|
|
4
4
|
"description": "TypeScript SDK for interacting with the Wuying AgentBay cloud runtime environment",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.mjs",
|