wuying-agentbay-sdk 0.11.0 → 0.12.0
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/{chunk-E7QC5S76.mjs → chunk-BVWUCG4J.mjs} +264 -5
- package/dist/chunk-BVWUCG4J.mjs.map +1 -0
- package/dist/{chunk-ZUB35HKV.cjs → chunk-SL5GCAQE.cjs} +265 -6
- package/dist/chunk-SL5GCAQE.cjs.map +1 -0
- package/dist/index.cjs +1295 -317
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +1694 -1125
- package/dist/index.d.ts +1694 -1125
- package/dist/index.mjs +1228 -250
- package/dist/index.mjs.map +1 -1
- package/dist/model-CNCGFWJH.cjs +200 -0
- package/dist/{model-2G37RFQQ.cjs.map → model-CNCGFWJH.cjs.map} +1 -1
- package/dist/{model-ZFTLKEMC.mjs → model-LGWQJWKQ.mjs} +14 -2
- package/docs/api/common-features/basics/agentbay.md +96 -0
- package/docs/api/common-features/basics/context-manager.md +21 -2
- package/docs/api/common-features/basics/session.md +130 -0
- package/docs/examples/browser-use/extension-example/extension-example.ts +2 -1
- package/docs/examples/common-features/basics/session-pause-resume/README.md +53 -0
- package/docs/examples/common-features/basics/session-pause-resume/session-pause-resume.ts +237 -0
- package/docs/examples/mobile-use/mobile-simulate-basic-usage.ts +202 -0
- package/docs/examples/mobile-use/mobile-simulate-with-ctx.ts +170 -0
- package/package.json +2 -2
- package/dist/chunk-E7QC5S76.mjs.map +0 -1
- package/dist/chunk-ZUB35HKV.cjs.map +0 -1
- package/dist/model-2G37RFQQ.cjs +0 -188
- /package/dist/{model-ZFTLKEMC.mjs.map → model-LGWQJWKQ.mjs.map} +0 -0
|
@@ -204,6 +204,28 @@ var GetLabelResponseBodyData = _GetLabelResponseBodyData;
|
|
|
204
204
|
// src/api/models/GetSessionResponseBodyData.ts
|
|
205
205
|
init_esm_shims();
|
|
206
206
|
import * as $dara7 from "@darabonba/typescript";
|
|
207
|
+
var _GetSessionResponseBodyDataContexts = class _GetSessionResponseBodyDataContexts extends $dara7.Model {
|
|
208
|
+
static names() {
|
|
209
|
+
return {
|
|
210
|
+
id: "id",
|
|
211
|
+
name: "name"
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
static types() {
|
|
215
|
+
return {
|
|
216
|
+
id: "string",
|
|
217
|
+
name: "string"
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
validate() {
|
|
221
|
+
super.validate();
|
|
222
|
+
}
|
|
223
|
+
constructor(map) {
|
|
224
|
+
super(map);
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
__name(_GetSessionResponseBodyDataContexts, "GetSessionResponseBodyDataContexts");
|
|
228
|
+
var GetSessionResponseBodyDataContexts = _GetSessionResponseBodyDataContexts;
|
|
207
229
|
var _GetSessionResponseBodyData = class _GetSessionResponseBodyData extends $dara7.Model {
|
|
208
230
|
static names() {
|
|
209
231
|
return {
|
|
@@ -215,7 +237,9 @@ var _GetSessionResponseBodyData = class _GetSessionResponseBodyData extends $dar
|
|
|
215
237
|
networkInterfaceIp: "NetworkInterfaceIp",
|
|
216
238
|
token: "Token",
|
|
217
239
|
vpcResource: "VpcResource",
|
|
218
|
-
resourceUrl: "ResourceUrl"
|
|
240
|
+
resourceUrl: "ResourceUrl",
|
|
241
|
+
status: "Status",
|
|
242
|
+
contexts: "contexts"
|
|
219
243
|
};
|
|
220
244
|
}
|
|
221
245
|
static types() {
|
|
@@ -228,10 +252,15 @@ var _GetSessionResponseBodyData = class _GetSessionResponseBodyData extends $dar
|
|
|
228
252
|
networkInterfaceIp: "string",
|
|
229
253
|
token: "string",
|
|
230
254
|
vpcResource: "boolean",
|
|
231
|
-
|
|
255
|
+
contexts: { "type": "array", "itemType": GetSessionResponseBodyDataContexts },
|
|
256
|
+
resourceUrl: "string",
|
|
257
|
+
status: "string"
|
|
232
258
|
};
|
|
233
259
|
}
|
|
234
260
|
validate() {
|
|
261
|
+
if (Array.isArray(this.contexts)) {
|
|
262
|
+
$dara7.Model.validateArray(this.contexts);
|
|
263
|
+
}
|
|
235
264
|
super.validate();
|
|
236
265
|
}
|
|
237
266
|
constructor(map) {
|
|
@@ -3047,6 +3076,230 @@ var _GetContextFileUploadUrlResponse = class _GetContextFileUploadUrlResponse ex
|
|
|
3047
3076
|
__name(_GetContextFileUploadUrlResponse, "GetContextFileUploadUrlResponse");
|
|
3048
3077
|
var GetContextFileUploadUrlResponse = _GetContextFileUploadUrlResponse;
|
|
3049
3078
|
|
|
3079
|
+
// src/api/models/PauseSessionAsyncRequest.ts
|
|
3080
|
+
init_esm_shims();
|
|
3081
|
+
import * as $dara90 from "@darabonba/typescript";
|
|
3082
|
+
var _PauseSessionAsyncRequest = class _PauseSessionAsyncRequest extends $dara90.Model {
|
|
3083
|
+
static names() {
|
|
3084
|
+
return {
|
|
3085
|
+
authorization: "Authorization",
|
|
3086
|
+
sessionId: "SessionId"
|
|
3087
|
+
};
|
|
3088
|
+
}
|
|
3089
|
+
static types() {
|
|
3090
|
+
return {
|
|
3091
|
+
authorization: "string",
|
|
3092
|
+
sessionId: "string"
|
|
3093
|
+
};
|
|
3094
|
+
}
|
|
3095
|
+
validate() {
|
|
3096
|
+
super.validate();
|
|
3097
|
+
}
|
|
3098
|
+
constructor(map) {
|
|
3099
|
+
super(map);
|
|
3100
|
+
}
|
|
3101
|
+
};
|
|
3102
|
+
__name(_PauseSessionAsyncRequest, "PauseSessionAsyncRequest");
|
|
3103
|
+
var PauseSessionAsyncRequest = _PauseSessionAsyncRequest;
|
|
3104
|
+
|
|
3105
|
+
// src/api/models/PauseSessionAsyncResponseBody.ts
|
|
3106
|
+
init_esm_shims();
|
|
3107
|
+
import * as $dara91 from "@darabonba/typescript";
|
|
3108
|
+
var _PauseSessionAsyncResponseBody = class _PauseSessionAsyncResponseBody extends $dara91.Model {
|
|
3109
|
+
static names() {
|
|
3110
|
+
return {
|
|
3111
|
+
code: "Code",
|
|
3112
|
+
httpStatusCode: "HttpStatusCode",
|
|
3113
|
+
message: "Message",
|
|
3114
|
+
requestId: "RequestId",
|
|
3115
|
+
success: "Success"
|
|
3116
|
+
};
|
|
3117
|
+
}
|
|
3118
|
+
static types() {
|
|
3119
|
+
return {
|
|
3120
|
+
code: "string",
|
|
3121
|
+
httpStatusCode: "number",
|
|
3122
|
+
message: "string",
|
|
3123
|
+
requestId: "string",
|
|
3124
|
+
success: "boolean"
|
|
3125
|
+
};
|
|
3126
|
+
}
|
|
3127
|
+
validate() {
|
|
3128
|
+
super.validate();
|
|
3129
|
+
}
|
|
3130
|
+
constructor(map) {
|
|
3131
|
+
super(map);
|
|
3132
|
+
}
|
|
3133
|
+
};
|
|
3134
|
+
__name(_PauseSessionAsyncResponseBody, "PauseSessionAsyncResponseBody");
|
|
3135
|
+
var PauseSessionAsyncResponseBody = _PauseSessionAsyncResponseBody;
|
|
3136
|
+
|
|
3137
|
+
// src/api/models/PauseSessionAsyncResponse.ts
|
|
3138
|
+
init_esm_shims();
|
|
3139
|
+
import * as $dara92 from "@darabonba/typescript";
|
|
3140
|
+
var _PauseSessionAsyncResponse = class _PauseSessionAsyncResponse extends $dara92.Model {
|
|
3141
|
+
static names() {
|
|
3142
|
+
return {
|
|
3143
|
+
body: "body",
|
|
3144
|
+
headers: "headers",
|
|
3145
|
+
statusCode: "statusCode"
|
|
3146
|
+
};
|
|
3147
|
+
}
|
|
3148
|
+
static types() {
|
|
3149
|
+
return {
|
|
3150
|
+
body: PauseSessionAsyncResponseBody,
|
|
3151
|
+
headers: { "type": "map", "keyType": "string", "valueType": "string" },
|
|
3152
|
+
statusCode: "number"
|
|
3153
|
+
};
|
|
3154
|
+
}
|
|
3155
|
+
validate() {
|
|
3156
|
+
super.validate();
|
|
3157
|
+
}
|
|
3158
|
+
constructor(map) {
|
|
3159
|
+
super(map);
|
|
3160
|
+
}
|
|
3161
|
+
toMapRecursive() {
|
|
3162
|
+
const map = {};
|
|
3163
|
+
if (this.body !== void 0) {
|
|
3164
|
+
map["body"] = this.body?.toMap();
|
|
3165
|
+
}
|
|
3166
|
+
if (this.headers !== void 0) {
|
|
3167
|
+
map["headers"] = this.headers;
|
|
3168
|
+
}
|
|
3169
|
+
if (this.statusCode !== void 0) {
|
|
3170
|
+
map["statusCode"] = this.statusCode;
|
|
3171
|
+
}
|
|
3172
|
+
return map;
|
|
3173
|
+
}
|
|
3174
|
+
fromMapRecursive(map) {
|
|
3175
|
+
if (map["body"] !== void 0) {
|
|
3176
|
+
const temp_model = new PauseSessionAsyncResponseBody();
|
|
3177
|
+
this.body = temp_model.fromMap(map["body"]);
|
|
3178
|
+
}
|
|
3179
|
+
if (map["headers"] !== void 0) {
|
|
3180
|
+
this.headers = map["headers"];
|
|
3181
|
+
}
|
|
3182
|
+
if (map["statusCode"] !== void 0) {
|
|
3183
|
+
this.statusCode = map["statusCode"];
|
|
3184
|
+
}
|
|
3185
|
+
return this;
|
|
3186
|
+
}
|
|
3187
|
+
};
|
|
3188
|
+
__name(_PauseSessionAsyncResponse, "PauseSessionAsyncResponse");
|
|
3189
|
+
var PauseSessionAsyncResponse = _PauseSessionAsyncResponse;
|
|
3190
|
+
|
|
3191
|
+
// src/api/models/ResumeSessionAsyncRequest.ts
|
|
3192
|
+
init_esm_shims();
|
|
3193
|
+
import * as $dara93 from "@darabonba/typescript";
|
|
3194
|
+
var _ResumeSessionAsyncRequest = class _ResumeSessionAsyncRequest extends $dara93.Model {
|
|
3195
|
+
static names() {
|
|
3196
|
+
return {
|
|
3197
|
+
authorization: "Authorization",
|
|
3198
|
+
sessionId: "SessionId"
|
|
3199
|
+
};
|
|
3200
|
+
}
|
|
3201
|
+
static types() {
|
|
3202
|
+
return {
|
|
3203
|
+
authorization: "string",
|
|
3204
|
+
sessionId: "string"
|
|
3205
|
+
};
|
|
3206
|
+
}
|
|
3207
|
+
validate() {
|
|
3208
|
+
super.validate();
|
|
3209
|
+
}
|
|
3210
|
+
constructor(map) {
|
|
3211
|
+
super(map);
|
|
3212
|
+
}
|
|
3213
|
+
};
|
|
3214
|
+
__name(_ResumeSessionAsyncRequest, "ResumeSessionAsyncRequest");
|
|
3215
|
+
var ResumeSessionAsyncRequest = _ResumeSessionAsyncRequest;
|
|
3216
|
+
|
|
3217
|
+
// src/api/models/ResumeSessionAsyncResponseBody.ts
|
|
3218
|
+
init_esm_shims();
|
|
3219
|
+
import * as $dara94 from "@darabonba/typescript";
|
|
3220
|
+
var _ResumeSessionAsyncResponseBody = class _ResumeSessionAsyncResponseBody extends $dara94.Model {
|
|
3221
|
+
static names() {
|
|
3222
|
+
return {
|
|
3223
|
+
code: "Code",
|
|
3224
|
+
httpStatusCode: "HttpStatusCode",
|
|
3225
|
+
message: "Message",
|
|
3226
|
+
requestId: "RequestId",
|
|
3227
|
+
success: "Success"
|
|
3228
|
+
};
|
|
3229
|
+
}
|
|
3230
|
+
static types() {
|
|
3231
|
+
return {
|
|
3232
|
+
code: "string",
|
|
3233
|
+
httpStatusCode: "number",
|
|
3234
|
+
message: "string",
|
|
3235
|
+
requestId: "string",
|
|
3236
|
+
success: "boolean"
|
|
3237
|
+
};
|
|
3238
|
+
}
|
|
3239
|
+
validate() {
|
|
3240
|
+
super.validate();
|
|
3241
|
+
}
|
|
3242
|
+
constructor(map) {
|
|
3243
|
+
super(map);
|
|
3244
|
+
}
|
|
3245
|
+
};
|
|
3246
|
+
__name(_ResumeSessionAsyncResponseBody, "ResumeSessionAsyncResponseBody");
|
|
3247
|
+
var ResumeSessionAsyncResponseBody = _ResumeSessionAsyncResponseBody;
|
|
3248
|
+
|
|
3249
|
+
// src/api/models/ResumeSessionAsyncResponse.ts
|
|
3250
|
+
init_esm_shims();
|
|
3251
|
+
import * as $dara95 from "@darabonba/typescript";
|
|
3252
|
+
var _ResumeSessionAsyncResponse = class _ResumeSessionAsyncResponse extends $dara95.Model {
|
|
3253
|
+
static names() {
|
|
3254
|
+
return {
|
|
3255
|
+
body: "body",
|
|
3256
|
+
headers: "headers",
|
|
3257
|
+
statusCode: "statusCode"
|
|
3258
|
+
};
|
|
3259
|
+
}
|
|
3260
|
+
static types() {
|
|
3261
|
+
return {
|
|
3262
|
+
body: ResumeSessionAsyncResponseBody,
|
|
3263
|
+
headers: { "type": "map", "keyType": "string", "valueType": "string" },
|
|
3264
|
+
statusCode: "number"
|
|
3265
|
+
};
|
|
3266
|
+
}
|
|
3267
|
+
validate() {
|
|
3268
|
+
super.validate();
|
|
3269
|
+
}
|
|
3270
|
+
constructor(map) {
|
|
3271
|
+
super(map);
|
|
3272
|
+
}
|
|
3273
|
+
toMapRecursive() {
|
|
3274
|
+
const map = {};
|
|
3275
|
+
if (this.body !== void 0) {
|
|
3276
|
+
map["body"] = this.body?.toMap();
|
|
3277
|
+
}
|
|
3278
|
+
if (this.headers !== void 0) {
|
|
3279
|
+
map["headers"] = this.headers;
|
|
3280
|
+
}
|
|
3281
|
+
if (this.statusCode !== void 0) {
|
|
3282
|
+
map["statusCode"] = this.statusCode;
|
|
3283
|
+
}
|
|
3284
|
+
return map;
|
|
3285
|
+
}
|
|
3286
|
+
fromMapRecursive(map) {
|
|
3287
|
+
if (map["body"] !== void 0) {
|
|
3288
|
+
const temp_model = new ResumeSessionAsyncResponseBody();
|
|
3289
|
+
this.body = temp_model.fromMap(map["body"]);
|
|
3290
|
+
}
|
|
3291
|
+
if (map["headers"] !== void 0) {
|
|
3292
|
+
this.headers = map["headers"];
|
|
3293
|
+
}
|
|
3294
|
+
if (map["statusCode"] !== void 0) {
|
|
3295
|
+
this.statusCode = map["statusCode"];
|
|
3296
|
+
}
|
|
3297
|
+
return this;
|
|
3298
|
+
}
|
|
3299
|
+
};
|
|
3300
|
+
__name(_ResumeSessionAsyncResponse, "ResumeSessionAsyncResponse");
|
|
3301
|
+
var ResumeSessionAsyncResponse = _ResumeSessionAsyncResponse;
|
|
3302
|
+
|
|
3050
3303
|
export {
|
|
3051
3304
|
ApplyMqttTokenResponseBodyData,
|
|
3052
3305
|
CreateMcpSessionRequestPersistenceDataList,
|
|
@@ -3138,6 +3391,12 @@ export {
|
|
|
3138
3391
|
GetContextFileDownloadUrlResponse,
|
|
3139
3392
|
GetContextFileUploadUrlRequest,
|
|
3140
3393
|
GetContextFileUploadUrlResponseBody,
|
|
3141
|
-
GetContextFileUploadUrlResponse
|
|
3142
|
-
|
|
3143
|
-
|
|
3394
|
+
GetContextFileUploadUrlResponse,
|
|
3395
|
+
PauseSessionAsyncRequest,
|
|
3396
|
+
PauseSessionAsyncResponseBody,
|
|
3397
|
+
PauseSessionAsyncResponse,
|
|
3398
|
+
ResumeSessionAsyncRequest,
|
|
3399
|
+
ResumeSessionAsyncResponseBody,
|
|
3400
|
+
ResumeSessionAsyncResponse
|
|
3401
|
+
};
|
|
3402
|
+
//# sourceMappingURL=chunk-BVWUCG4J.mjs.map
|