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 CHANGED
@@ -3571,6 +3571,29 @@ var _SyncPolicyImpl = class _SyncPolicyImpl {
3571
3571
  _chunk4IPTHWLMcjs.__name.call(void 0, _SyncPolicyImpl, "SyncPolicyImpl");
3572
3572
  var SyncPolicyImpl = _SyncPolicyImpl;
3573
3573
  var _ContextSync = class _ContextSync {
3574
+ /**
3575
+ * Defines a full context sync configuration with optional policy overrides.
3576
+ *
3577
+ * @example
3578
+ * ```typescript
3579
+ * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
3580
+ * const result = await agentBay.create();
3581
+ * if (result.success) {
3582
+ * const policy = new SyncPolicyImpl({
3583
+ * uploadPolicy: newUploadPolicy(),
3584
+ * downloadPolicy: newDownloadPolicy(),
3585
+ * recyclePolicy: newRecyclePolicy(),
3586
+ * });
3587
+ * const syncResult = await result.session.context.sync(
3588
+ * 'project-data',
3589
+ * '/mnt/shared',
3590
+ * 'upload'
3591
+ * );
3592
+ * console.log('Context sync:', syncResult.success);
3593
+ * await result.session.delete();
3594
+ * }
3595
+ * ```
3596
+ */
3574
3597
  constructor(contextId, path6, policy) {
3575
3598
  if (policy) {
3576
3599
  validateSyncPolicy(policy);
@@ -3726,9 +3749,12 @@ var _ComputerUseAgent = class _ComputerUseAgent {
3726
3749
  * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
3727
3750
  * const result = await agentBay.create({ imageId: 'windows_latest' });
3728
3751
  * if (result.success) {
3729
- * const taskResult = await result.session.agent.computer.executeTask('Open
3730
- * notepad', 10); console.log(`Task status: ${taskResult.taskStatus}`); await
3731
- * result.session.delete();
3752
+ * const taskResult = await result.session.agent.computer.executeTask(
3753
+ * 'Open notepad',
3754
+ * 10
3755
+ * );
3756
+ * console.log(`Task status: ${taskResult.taskStatus}`);
3757
+ * await result.session.delete();
3732
3758
  * }
3733
3759
  * ```
3734
3760
  */
@@ -3912,10 +3938,13 @@ var _ComputerUseAgent = class _ComputerUseAgent {
3912
3938
  * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
3913
3939
  * const result = await agentBay.create({ imageId: 'windows_latest' });
3914
3940
  * if (result.success) {
3915
- * const taskResult = await
3916
- * result.session.agent.computer.executeTask('Open notepad', 5); const
3917
- * terminateResult = await
3918
- * result.session.agent.computer.terminateTask(taskResult.taskId);
3941
+ * const taskResult = await result.session.agent.computer.executeTask(
3942
+ * 'Open notepad',
3943
+ * 5
3944
+ * );
3945
+ * const terminateResult = await result.session.agent.computer.terminateTask(
3946
+ * taskResult.taskId
3947
+ * );
3919
3948
  * console.log(`Terminated: ${terminateResult.taskStatus}`);
3920
3949
  * await result.session.delete();
3921
3950
  * }
@@ -4039,10 +4068,12 @@ var _BrowserUseAgent = class _BrowserUseAgent {
4039
4068
  * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
4040
4069
  * const result = await agentBay.create({ imageId: 'linux_latest' });
4041
4070
  * if (result.success) {
4042
- * const taskResult = await
4043
- * result.session.agent.browser.executeTask('Navigate to baidu and query the
4044
- * weather of Shanghai', 10); console.log(`Task status:
4045
- * ${taskResult.taskStatus}`); await result.session.delete();
4071
+ * const taskResult = await result.session.agent.browser.executeTask(
4072
+ * 'Navigate to baidu and query the weather of Shanghai',
4073
+ * 10
4074
+ * );
4075
+ * console.log(`Task status: ${taskResult.taskStatus}`);
4076
+ * await result.session.delete();
4046
4077
  * }
4047
4078
  * ```
4048
4079
  */
@@ -4158,15 +4189,17 @@ var _BrowserUseAgent = class _BrowserUseAgent {
4158
4189
  * @example
4159
4190
  * ```typescript
4160
4191
  * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
4161
- * const result = await agentBay.create({ imageId: 'windows_latest' });
4192
+ * const result = await agentBay.create({ imageId: 'linux_latest' });
4162
4193
  * if (result.success) {
4163
- * const taskResult = await
4164
- * result.session.agent.browser.executeTask(Navigate to baidu and query the
4165
- * weather of Shanghai, 10); const statusResult = await
4166
- * result.session.agent.browser.getTaskStatus(taskResult.taskId);
4167
- * console.log(`Status:
4168
- * ${JSON.parse(statusResult.output).status}`); await
4169
- * result.session.delete();
4194
+ * const taskResult = await result.session.agent.browser.executeTask(
4195
+ * 'Navigate to baidu and query the weather of Shanghai',
4196
+ * 10
4197
+ * );
4198
+ * const statusResult = await result.session.agent.browser.getTaskStatus(
4199
+ * taskResult.taskId
4200
+ * );
4201
+ * console.log(`Status: ${statusResult.taskStatus}`);
4202
+ * await result.session.delete();
4170
4203
  * }
4171
4204
  * ```
4172
4205
  */
@@ -4226,12 +4259,15 @@ var _BrowserUseAgent = class _BrowserUseAgent {
4226
4259
  * @example
4227
4260
  * ```typescript
4228
4261
  * const agentBay = new AgentBay({ apiKey: 'your_api_key' });
4229
- * const result = await agentBay.create({ imageId: 'windows_latest' });
4262
+ * const result = await agentBay.create({ imageId: 'linux_latest' });
4230
4263
  * if (result.success) {
4231
- * const taskResult = await
4232
- * result.session.agent.browser.executeTask(Navigate to baidu and query the
4233
- * weather of Shanghai, 10); const terminateResult = await
4234
- * result.session.agent.browser.terminateTask(taskResult.taskId);
4264
+ * const taskResult = await result.session.agent.browser.executeTask(
4265
+ * 'Navigate to baidu and query the weather of Shanghai',
4266
+ * 10
4267
+ * );
4268
+ * const terminateResult = await result.session.agent.browser.terminateTask(
4269
+ * taskResult.taskId
4270
+ * );
4235
4271
  * console.log(`Terminated: ${terminateResult.taskStatus}`);
4236
4272
  * await result.session.delete();
4237
4273
  * }