wuying-agentbay-sdk 0.5.1 → 0.6.1
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/README.md +84 -153
- package/dist/index.cjs +1153 -167
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +455 -33
- package/dist/index.d.ts +455 -33
- package/dist/index.mjs +1140 -154
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -489,7 +489,7 @@ init_cjs_shims();
|
|
|
489
489
|
|
|
490
490
|
// src/api/client.ts
|
|
491
491
|
init_cjs_shims();
|
|
492
|
-
var _typescript = require('@darabonba/typescript'); var $
|
|
492
|
+
var _typescript = require('@darabonba/typescript'); var $dara77 = _interopRequireWildcard(_typescript); var $dara = _interopRequireWildcard(_typescript); var $dara2 = _interopRequireWildcard(_typescript); var $dara3 = _interopRequireWildcard(_typescript); var $dara4 = _interopRequireWildcard(_typescript); var $dara5 = _interopRequireWildcard(_typescript); var $dara6 = _interopRequireWildcard(_typescript); var $dara7 = _interopRequireWildcard(_typescript); var $dara8 = _interopRequireWildcard(_typescript); var $dara9 = _interopRequireWildcard(_typescript); var $dara10 = _interopRequireWildcard(_typescript); var $dara11 = _interopRequireWildcard(_typescript); var $dara12 = _interopRequireWildcard(_typescript); var $dara13 = _interopRequireWildcard(_typescript); var $dara14 = _interopRequireWildcard(_typescript); var $dara15 = _interopRequireWildcard(_typescript); var $dara16 = _interopRequireWildcard(_typescript); var $dara17 = _interopRequireWildcard(_typescript); var $dara18 = _interopRequireWildcard(_typescript); var $dara19 = _interopRequireWildcard(_typescript); var $dara20 = _interopRequireWildcard(_typescript); var $dara21 = _interopRequireWildcard(_typescript); var $dara22 = _interopRequireWildcard(_typescript); var $dara23 = _interopRequireWildcard(_typescript); var $dara24 = _interopRequireWildcard(_typescript); var $dara25 = _interopRequireWildcard(_typescript); var $dara26 = _interopRequireWildcard(_typescript); var $dara27 = _interopRequireWildcard(_typescript); var $dara28 = _interopRequireWildcard(_typescript); var $dara29 = _interopRequireWildcard(_typescript); var $dara30 = _interopRequireWildcard(_typescript); var $dara31 = _interopRequireWildcard(_typescript); var $dara32 = _interopRequireWildcard(_typescript); var $dara33 = _interopRequireWildcard(_typescript); var $dara34 = _interopRequireWildcard(_typescript); var $dara35 = _interopRequireWildcard(_typescript); var $dara36 = _interopRequireWildcard(_typescript); var $dara37 = _interopRequireWildcard(_typescript); var $dara38 = _interopRequireWildcard(_typescript); var $dara39 = _interopRequireWildcard(_typescript); var $dara40 = _interopRequireWildcard(_typescript); var $dara42 = _interopRequireWildcard(_typescript); var $dara41 = _interopRequireWildcard(_typescript); var $dara43 = _interopRequireWildcard(_typescript); var $dara44 = _interopRequireWildcard(_typescript); var $dara45 = _interopRequireWildcard(_typescript); var $dara46 = _interopRequireWildcard(_typescript); var $dara47 = _interopRequireWildcard(_typescript); var $dara48 = _interopRequireWildcard(_typescript); var $dara49 = _interopRequireWildcard(_typescript); var $dara50 = _interopRequireWildcard(_typescript); var $dara51 = _interopRequireWildcard(_typescript); var $dara52 = _interopRequireWildcard(_typescript); var $dara53 = _interopRequireWildcard(_typescript); var $dara54 = _interopRequireWildcard(_typescript); var $dara55 = _interopRequireWildcard(_typescript); var $dara56 = _interopRequireWildcard(_typescript); var $dara57 = _interopRequireWildcard(_typescript); var $dara58 = _interopRequireWildcard(_typescript); var $dara59 = _interopRequireWildcard(_typescript); var $dara60 = _interopRequireWildcard(_typescript); var $dara61 = _interopRequireWildcard(_typescript); var $dara62 = _interopRequireWildcard(_typescript); var $dara63 = _interopRequireWildcard(_typescript); var $dara64 = _interopRequireWildcard(_typescript); var $dara65 = _interopRequireWildcard(_typescript); var $dara66 = _interopRequireWildcard(_typescript); var $dara67 = _interopRequireWildcard(_typescript); var $dara68 = _interopRequireWildcard(_typescript); var $dara69 = _interopRequireWildcard(_typescript); var $dara70 = _interopRequireWildcard(_typescript); var $dara71 = _interopRequireWildcard(_typescript); var $dara72 = _interopRequireWildcard(_typescript); var $dara73 = _interopRequireWildcard(_typescript); var $dara74 = _interopRequireWildcard(_typescript); var $dara75 = _interopRequireWildcard(_typescript); var $dara76 = _interopRequireWildcard(_typescript);
|
|
493
493
|
|
|
494
494
|
|
|
495
495
|
|
|
@@ -1041,6 +1041,7 @@ var _CreateMcpSessionRequest = class _CreateMcpSessionRequest extends $dara18.Mo
|
|
|
1041
1041
|
externalUserId: "ExternalUserId",
|
|
1042
1042
|
imageId: "ImageId",
|
|
1043
1043
|
labels: "Labels",
|
|
1044
|
+
mcpPolicyId: "McpPolicyId",
|
|
1044
1045
|
persistenceDataList: "PersistenceDataList",
|
|
1045
1046
|
sessionId: "SessionId",
|
|
1046
1047
|
vpcResource: "VpcResource"
|
|
@@ -1053,6 +1054,7 @@ var _CreateMcpSessionRequest = class _CreateMcpSessionRequest extends $dara18.Mo
|
|
|
1053
1054
|
externalUserId: "string",
|
|
1054
1055
|
imageId: "string",
|
|
1055
1056
|
labels: "string",
|
|
1057
|
+
mcpPolicyId: "string",
|
|
1056
1058
|
persistenceDataList: { "type": "array", "itemType": CreateMcpSessionRequestPersistenceDataList },
|
|
1057
1059
|
sessionId: "string",
|
|
1058
1060
|
vpcResource: "boolean"
|
|
@@ -1082,6 +1084,7 @@ var _CreateMcpSessionShrinkRequest = class _CreateMcpSessionShrinkRequest extend
|
|
|
1082
1084
|
externalUserId: "ExternalUserId",
|
|
1083
1085
|
imageId: "ImageId",
|
|
1084
1086
|
labels: "Labels",
|
|
1087
|
+
mcpPolicyId: "McpPolicyId",
|
|
1085
1088
|
persistenceDataListShrink: "PersistenceDataList",
|
|
1086
1089
|
sessionId: "SessionId",
|
|
1087
1090
|
vpcResource: "VpcResource"
|
|
@@ -1094,6 +1097,7 @@ var _CreateMcpSessionShrinkRequest = class _CreateMcpSessionShrinkRequest extend
|
|
|
1094
1097
|
externalUserId: "string",
|
|
1095
1098
|
imageId: "string",
|
|
1096
1099
|
labels: "string",
|
|
1100
|
+
mcpPolicyId: "string",
|
|
1097
1101
|
persistenceDataListShrink: "string",
|
|
1098
1102
|
sessionId: "string",
|
|
1099
1103
|
vpcResource: "boolean"
|
|
@@ -1787,14 +1791,16 @@ var _InitBrowserRequest = class _InitBrowserRequest extends $dara40.Model {
|
|
|
1787
1791
|
return {
|
|
1788
1792
|
authorization: "Authorization",
|
|
1789
1793
|
persistentPath: "PersistentPath",
|
|
1790
|
-
sessionId: "SessionId"
|
|
1794
|
+
sessionId: "SessionId",
|
|
1795
|
+
browserOption: "BrowserOption"
|
|
1791
1796
|
};
|
|
1792
1797
|
}
|
|
1793
1798
|
static types() {
|
|
1794
1799
|
return {
|
|
1795
1800
|
authorization: "string",
|
|
1796
1801
|
persistentPath: "string",
|
|
1797
|
-
sessionId: "string"
|
|
1802
|
+
sessionId: "string",
|
|
1803
|
+
browserOption: { "type": "map", "keyType": "string", "valueType": "any" }
|
|
1798
1804
|
};
|
|
1799
1805
|
}
|
|
1800
1806
|
validate() {
|
|
@@ -2563,13 +2569,461 @@ var _SyncContextResponseBody = class _SyncContextResponseBody extends $dara63.Mo
|
|
|
2563
2569
|
super(map);
|
|
2564
2570
|
}
|
|
2565
2571
|
};
|
|
2566
|
-
__name(_SyncContextResponseBody, "SyncContextResponseBody");
|
|
2567
|
-
var SyncContextResponseBody = _SyncContextResponseBody;
|
|
2572
|
+
__name(_SyncContextResponseBody, "SyncContextResponseBody");
|
|
2573
|
+
var SyncContextResponseBody = _SyncContextResponseBody;
|
|
2574
|
+
|
|
2575
|
+
// src/api/models/SyncContextResponse.ts
|
|
2576
|
+
init_cjs_shims();
|
|
2577
|
+
|
|
2578
|
+
var _SyncContextResponse = class _SyncContextResponse extends $dara64.Model {
|
|
2579
|
+
static names() {
|
|
2580
|
+
return {
|
|
2581
|
+
headers: "headers",
|
|
2582
|
+
statusCode: "statusCode",
|
|
2583
|
+
body: "body"
|
|
2584
|
+
};
|
|
2585
|
+
}
|
|
2586
|
+
static types() {
|
|
2587
|
+
return {
|
|
2588
|
+
headers: { "type": "map", "keyType": "string", "valueType": "string" },
|
|
2589
|
+
statusCode: "number",
|
|
2590
|
+
body: SyncContextResponseBody
|
|
2591
|
+
};
|
|
2592
|
+
}
|
|
2593
|
+
validate() {
|
|
2594
|
+
if (this.headers) {
|
|
2595
|
+
$dara64.Model.validateMap(this.headers);
|
|
2596
|
+
}
|
|
2597
|
+
if (this.body && typeof this.body.validate === "function") {
|
|
2598
|
+
this.body.validate();
|
|
2599
|
+
}
|
|
2600
|
+
super.validate();
|
|
2601
|
+
}
|
|
2602
|
+
constructor(map) {
|
|
2603
|
+
super(map);
|
|
2604
|
+
}
|
|
2605
|
+
};
|
|
2606
|
+
__name(_SyncContextResponse, "SyncContextResponse");
|
|
2607
|
+
var SyncContextResponse = _SyncContextResponse;
|
|
2608
|
+
|
|
2609
|
+
// src/api/models/DeleteContextFileRequest.ts
|
|
2610
|
+
init_cjs_shims();
|
|
2611
|
+
|
|
2612
|
+
var _DeleteContextFileRequest = class _DeleteContextFileRequest extends $dara65.Model {
|
|
2613
|
+
static names() {
|
|
2614
|
+
return {
|
|
2615
|
+
authorization: "Authorization",
|
|
2616
|
+
contextId: "ContextId",
|
|
2617
|
+
filePath: "FilePath"
|
|
2618
|
+
};
|
|
2619
|
+
}
|
|
2620
|
+
static types() {
|
|
2621
|
+
return {
|
|
2622
|
+
authorization: "string",
|
|
2623
|
+
contextId: "string",
|
|
2624
|
+
filePath: "string"
|
|
2625
|
+
};
|
|
2626
|
+
}
|
|
2627
|
+
validate() {
|
|
2628
|
+
super.validate();
|
|
2629
|
+
}
|
|
2630
|
+
constructor(map) {
|
|
2631
|
+
super(map);
|
|
2632
|
+
}
|
|
2633
|
+
};
|
|
2634
|
+
__name(_DeleteContextFileRequest, "DeleteContextFileRequest");
|
|
2635
|
+
var DeleteContextFileRequest = _DeleteContextFileRequest;
|
|
2636
|
+
|
|
2637
|
+
// src/api/models/DeleteContextFileResponseBody.ts
|
|
2638
|
+
init_cjs_shims();
|
|
2639
|
+
|
|
2640
|
+
var _DeleteContextFileResponseBody = class _DeleteContextFileResponseBody extends $dara66.Model {
|
|
2641
|
+
static names() {
|
|
2642
|
+
return {
|
|
2643
|
+
code: "Code",
|
|
2644
|
+
httpStatusCode: "HttpStatusCode",
|
|
2645
|
+
message: "Message",
|
|
2646
|
+
requestId: "RequestId",
|
|
2647
|
+
success: "Success"
|
|
2648
|
+
};
|
|
2649
|
+
}
|
|
2650
|
+
static types() {
|
|
2651
|
+
return {
|
|
2652
|
+
code: "string",
|
|
2653
|
+
httpStatusCode: "number",
|
|
2654
|
+
message: "string",
|
|
2655
|
+
requestId: "string",
|
|
2656
|
+
success: "boolean"
|
|
2657
|
+
};
|
|
2658
|
+
}
|
|
2659
|
+
validate() {
|
|
2660
|
+
super.validate();
|
|
2661
|
+
}
|
|
2662
|
+
constructor(map) {
|
|
2663
|
+
super(map);
|
|
2664
|
+
}
|
|
2665
|
+
};
|
|
2666
|
+
__name(_DeleteContextFileResponseBody, "DeleteContextFileResponseBody");
|
|
2667
|
+
var DeleteContextFileResponseBody = _DeleteContextFileResponseBody;
|
|
2668
|
+
|
|
2669
|
+
// src/api/models/DeleteContextFileResponse.ts
|
|
2670
|
+
init_cjs_shims();
|
|
2671
|
+
|
|
2672
|
+
var _DeleteContextFileResponse = class _DeleteContextFileResponse extends $dara67.Model {
|
|
2673
|
+
static names() {
|
|
2674
|
+
return {
|
|
2675
|
+
headers: "headers",
|
|
2676
|
+
statusCode: "statusCode",
|
|
2677
|
+
body: "body"
|
|
2678
|
+
};
|
|
2679
|
+
}
|
|
2680
|
+
static types() {
|
|
2681
|
+
return {
|
|
2682
|
+
headers: { type: "map", keyType: "string", valueType: "string" },
|
|
2683
|
+
statusCode: "number",
|
|
2684
|
+
body: DeleteContextFileResponseBody
|
|
2685
|
+
};
|
|
2686
|
+
}
|
|
2687
|
+
validate() {
|
|
2688
|
+
super.validate();
|
|
2689
|
+
}
|
|
2690
|
+
constructor(map) {
|
|
2691
|
+
super(map);
|
|
2692
|
+
}
|
|
2693
|
+
};
|
|
2694
|
+
__name(_DeleteContextFileResponse, "DeleteContextFileResponse");
|
|
2695
|
+
var DeleteContextFileResponse = _DeleteContextFileResponse;
|
|
2696
|
+
|
|
2697
|
+
// src/api/models/DescribeContextFilesRequest.ts
|
|
2698
|
+
init_cjs_shims();
|
|
2699
|
+
|
|
2700
|
+
var _DescribeContextFilesRequest = class _DescribeContextFilesRequest extends $dara68.Model {
|
|
2701
|
+
static names() {
|
|
2702
|
+
return {
|
|
2703
|
+
authorization: "Authorization",
|
|
2704
|
+
pageNumber: "PageNumber",
|
|
2705
|
+
pageSize: "PageSize",
|
|
2706
|
+
parentFolderPath: "ParentFolderPath",
|
|
2707
|
+
contextId: "ContextId"
|
|
2708
|
+
};
|
|
2709
|
+
}
|
|
2710
|
+
static types() {
|
|
2711
|
+
return {
|
|
2712
|
+
authorization: "string",
|
|
2713
|
+
pageNumber: "number",
|
|
2714
|
+
pageSize: "number",
|
|
2715
|
+
parentFolderPath: "string",
|
|
2716
|
+
contextId: "string"
|
|
2717
|
+
};
|
|
2718
|
+
}
|
|
2719
|
+
validate() {
|
|
2720
|
+
super.validate();
|
|
2721
|
+
}
|
|
2722
|
+
constructor(map) {
|
|
2723
|
+
super(map);
|
|
2724
|
+
}
|
|
2725
|
+
};
|
|
2726
|
+
__name(_DescribeContextFilesRequest, "DescribeContextFilesRequest");
|
|
2727
|
+
var DescribeContextFilesRequest = _DescribeContextFilesRequest;
|
|
2728
|
+
|
|
2729
|
+
// src/api/models/DescribeContextFilesResponseBody.ts
|
|
2730
|
+
init_cjs_shims();
|
|
2731
|
+
|
|
2732
|
+
var _DescribeContextFilesResponseBodyData = class _DescribeContextFilesResponseBodyData extends $dara69.Model {
|
|
2733
|
+
static names() {
|
|
2734
|
+
return {
|
|
2735
|
+
fileId: "FileId",
|
|
2736
|
+
fileName: "FileName",
|
|
2737
|
+
filePath: "FilePath",
|
|
2738
|
+
fileType: "FileType",
|
|
2739
|
+
gmtCreate: "GmtCreate",
|
|
2740
|
+
gmtModified: "GmtModified",
|
|
2741
|
+
size: "Size",
|
|
2742
|
+
status: "Status"
|
|
2743
|
+
};
|
|
2744
|
+
}
|
|
2745
|
+
static types() {
|
|
2746
|
+
return {
|
|
2747
|
+
fileId: "string",
|
|
2748
|
+
fileName: "string",
|
|
2749
|
+
filePath: "string",
|
|
2750
|
+
fileType: "string",
|
|
2751
|
+
gmtCreate: "string",
|
|
2752
|
+
gmtModified: "string",
|
|
2753
|
+
size: "number",
|
|
2754
|
+
status: "string"
|
|
2755
|
+
};
|
|
2756
|
+
}
|
|
2757
|
+
validate() {
|
|
2758
|
+
super.validate();
|
|
2759
|
+
}
|
|
2760
|
+
constructor(map) {
|
|
2761
|
+
super(map);
|
|
2762
|
+
}
|
|
2763
|
+
};
|
|
2764
|
+
__name(_DescribeContextFilesResponseBodyData, "DescribeContextFilesResponseBodyData");
|
|
2765
|
+
var DescribeContextFilesResponseBodyData = _DescribeContextFilesResponseBodyData;
|
|
2766
|
+
var _DescribeContextFilesResponseBody = class _DescribeContextFilesResponseBody extends $dara69.Model {
|
|
2767
|
+
static names() {
|
|
2768
|
+
return {
|
|
2769
|
+
code: "Code",
|
|
2770
|
+
count: "Count",
|
|
2771
|
+
data: "Data",
|
|
2772
|
+
httpStatusCode: "HttpStatusCode",
|
|
2773
|
+
message: "Message",
|
|
2774
|
+
requestId: "RequestId",
|
|
2775
|
+
success: "Success"
|
|
2776
|
+
};
|
|
2777
|
+
}
|
|
2778
|
+
static types() {
|
|
2779
|
+
return {
|
|
2780
|
+
code: "string",
|
|
2781
|
+
count: "number",
|
|
2782
|
+
data: { type: "array", itemType: DescribeContextFilesResponseBodyData },
|
|
2783
|
+
httpStatusCode: "number",
|
|
2784
|
+
message: "string",
|
|
2785
|
+
requestId: "string",
|
|
2786
|
+
success: "boolean"
|
|
2787
|
+
};
|
|
2788
|
+
}
|
|
2789
|
+
validate() {
|
|
2790
|
+
super.validate();
|
|
2791
|
+
}
|
|
2792
|
+
constructor(map) {
|
|
2793
|
+
super(map);
|
|
2794
|
+
}
|
|
2795
|
+
};
|
|
2796
|
+
__name(_DescribeContextFilesResponseBody, "DescribeContextFilesResponseBody");
|
|
2797
|
+
var DescribeContextFilesResponseBody = _DescribeContextFilesResponseBody;
|
|
2798
|
+
|
|
2799
|
+
// src/api/models/DescribeContextFilesResponse.ts
|
|
2800
|
+
init_cjs_shims();
|
|
2801
|
+
|
|
2802
|
+
var _DescribeContextFilesResponse = class _DescribeContextFilesResponse extends $dara70.Model {
|
|
2803
|
+
static names() {
|
|
2804
|
+
return {
|
|
2805
|
+
headers: "headers",
|
|
2806
|
+
statusCode: "statusCode",
|
|
2807
|
+
body: "body"
|
|
2808
|
+
};
|
|
2809
|
+
}
|
|
2810
|
+
static types() {
|
|
2811
|
+
return {
|
|
2812
|
+
headers: { type: "map", keyType: "string", valueType: "string" },
|
|
2813
|
+
statusCode: "number",
|
|
2814
|
+
body: DescribeContextFilesResponseBody
|
|
2815
|
+
};
|
|
2816
|
+
}
|
|
2817
|
+
validate() {
|
|
2818
|
+
super.validate();
|
|
2819
|
+
}
|
|
2820
|
+
constructor(map) {
|
|
2821
|
+
super(map);
|
|
2822
|
+
}
|
|
2823
|
+
};
|
|
2824
|
+
__name(_DescribeContextFilesResponse, "DescribeContextFilesResponse");
|
|
2825
|
+
var DescribeContextFilesResponse = _DescribeContextFilesResponse;
|
|
2826
|
+
|
|
2827
|
+
// src/api/models/GetContextFileDownloadUrlRequest.ts
|
|
2828
|
+
init_cjs_shims();
|
|
2829
|
+
|
|
2830
|
+
var _GetContextFileDownloadUrlRequest = class _GetContextFileDownloadUrlRequest extends $dara71.Model {
|
|
2831
|
+
static names() {
|
|
2832
|
+
return {
|
|
2833
|
+
authorization: "Authorization",
|
|
2834
|
+
contextId: "ContextId",
|
|
2835
|
+
filePath: "FilePath"
|
|
2836
|
+
};
|
|
2837
|
+
}
|
|
2838
|
+
static types() {
|
|
2839
|
+
return {
|
|
2840
|
+
authorization: "string",
|
|
2841
|
+
contextId: "string",
|
|
2842
|
+
filePath: "string"
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
validate() {
|
|
2846
|
+
super.validate();
|
|
2847
|
+
}
|
|
2848
|
+
constructor(map) {
|
|
2849
|
+
super(map);
|
|
2850
|
+
}
|
|
2851
|
+
};
|
|
2852
|
+
__name(_GetContextFileDownloadUrlRequest, "GetContextFileDownloadUrlRequest");
|
|
2853
|
+
var GetContextFileDownloadUrlRequest = _GetContextFileDownloadUrlRequest;
|
|
2854
|
+
|
|
2855
|
+
// src/api/models/GetContextFileDownloadUrlResponseBody.ts
|
|
2856
|
+
init_cjs_shims();
|
|
2857
|
+
|
|
2858
|
+
var _GetContextFileDownloadUrlResponseBodyData = class _GetContextFileDownloadUrlResponseBodyData extends $dara72.Model {
|
|
2859
|
+
static names() {
|
|
2860
|
+
return {
|
|
2861
|
+
expireTime: "ExpireTime",
|
|
2862
|
+
url: "Url"
|
|
2863
|
+
};
|
|
2864
|
+
}
|
|
2865
|
+
static types() {
|
|
2866
|
+
return {
|
|
2867
|
+
expireTime: "number",
|
|
2868
|
+
url: "string"
|
|
2869
|
+
};
|
|
2870
|
+
}
|
|
2871
|
+
validate() {
|
|
2872
|
+
super.validate();
|
|
2873
|
+
}
|
|
2874
|
+
constructor(map) {
|
|
2875
|
+
super(map);
|
|
2876
|
+
}
|
|
2877
|
+
};
|
|
2878
|
+
__name(_GetContextFileDownloadUrlResponseBodyData, "GetContextFileDownloadUrlResponseBodyData");
|
|
2879
|
+
var GetContextFileDownloadUrlResponseBodyData = _GetContextFileDownloadUrlResponseBodyData;
|
|
2880
|
+
var _GetContextFileDownloadUrlResponseBody = class _GetContextFileDownloadUrlResponseBody extends $dara72.Model {
|
|
2881
|
+
static names() {
|
|
2882
|
+
return {
|
|
2883
|
+
code: "Code",
|
|
2884
|
+
data: "Data",
|
|
2885
|
+
httpStatusCode: "HttpStatusCode",
|
|
2886
|
+
message: "Message",
|
|
2887
|
+
requestId: "RequestId",
|
|
2888
|
+
success: "Success"
|
|
2889
|
+
};
|
|
2890
|
+
}
|
|
2891
|
+
static types() {
|
|
2892
|
+
return {
|
|
2893
|
+
code: "string",
|
|
2894
|
+
data: GetContextFileDownloadUrlResponseBodyData,
|
|
2895
|
+
httpStatusCode: "number",
|
|
2896
|
+
message: "string",
|
|
2897
|
+
requestId: "string",
|
|
2898
|
+
success: "boolean"
|
|
2899
|
+
};
|
|
2900
|
+
}
|
|
2901
|
+
validate() {
|
|
2902
|
+
super.validate();
|
|
2903
|
+
}
|
|
2904
|
+
constructor(map) {
|
|
2905
|
+
super(map);
|
|
2906
|
+
}
|
|
2907
|
+
};
|
|
2908
|
+
__name(_GetContextFileDownloadUrlResponseBody, "GetContextFileDownloadUrlResponseBody");
|
|
2909
|
+
var GetContextFileDownloadUrlResponseBody = _GetContextFileDownloadUrlResponseBody;
|
|
2910
|
+
|
|
2911
|
+
// src/api/models/GetContextFileDownloadUrlResponse.ts
|
|
2912
|
+
init_cjs_shims();
|
|
2913
|
+
|
|
2914
|
+
var _GetContextFileDownloadUrlResponse = class _GetContextFileDownloadUrlResponse extends $dara73.Model {
|
|
2915
|
+
static names() {
|
|
2916
|
+
return {
|
|
2917
|
+
headers: "headers",
|
|
2918
|
+
statusCode: "statusCode",
|
|
2919
|
+
body: "body"
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
static types() {
|
|
2923
|
+
return {
|
|
2924
|
+
headers: { type: "map", keyType: "string", valueType: "string" },
|
|
2925
|
+
statusCode: "number",
|
|
2926
|
+
body: GetContextFileDownloadUrlResponseBody
|
|
2927
|
+
};
|
|
2928
|
+
}
|
|
2929
|
+
validate() {
|
|
2930
|
+
super.validate();
|
|
2931
|
+
}
|
|
2932
|
+
constructor(map) {
|
|
2933
|
+
super(map);
|
|
2934
|
+
}
|
|
2935
|
+
};
|
|
2936
|
+
__name(_GetContextFileDownloadUrlResponse, "GetContextFileDownloadUrlResponse");
|
|
2937
|
+
var GetContextFileDownloadUrlResponse = _GetContextFileDownloadUrlResponse;
|
|
2938
|
+
|
|
2939
|
+
// src/api/models/GetContextFileUploadUrlRequest.ts
|
|
2940
|
+
init_cjs_shims();
|
|
2941
|
+
|
|
2942
|
+
var _GetContextFileUploadUrlRequest = class _GetContextFileUploadUrlRequest extends $dara74.Model {
|
|
2943
|
+
static names() {
|
|
2944
|
+
return {
|
|
2945
|
+
authorization: "Authorization",
|
|
2946
|
+
contextId: "ContextId",
|
|
2947
|
+
filePath: "FilePath"
|
|
2948
|
+
};
|
|
2949
|
+
}
|
|
2950
|
+
static types() {
|
|
2951
|
+
return {
|
|
2952
|
+
authorization: "string",
|
|
2953
|
+
contextId: "string",
|
|
2954
|
+
filePath: "string"
|
|
2955
|
+
};
|
|
2956
|
+
}
|
|
2957
|
+
validate() {
|
|
2958
|
+
super.validate();
|
|
2959
|
+
}
|
|
2960
|
+
constructor(map) {
|
|
2961
|
+
super(map);
|
|
2962
|
+
}
|
|
2963
|
+
};
|
|
2964
|
+
__name(_GetContextFileUploadUrlRequest, "GetContextFileUploadUrlRequest");
|
|
2965
|
+
var GetContextFileUploadUrlRequest = _GetContextFileUploadUrlRequest;
|
|
2966
|
+
|
|
2967
|
+
// src/api/models/GetContextFileUploadUrlResponseBody.ts
|
|
2968
|
+
init_cjs_shims();
|
|
2969
|
+
|
|
2970
|
+
var _GetContextFileUploadUrlResponseBodyData = class _GetContextFileUploadUrlResponseBodyData extends $dara75.Model {
|
|
2971
|
+
static names() {
|
|
2972
|
+
return {
|
|
2973
|
+
expireTime: "ExpireTime",
|
|
2974
|
+
url: "Url"
|
|
2975
|
+
};
|
|
2976
|
+
}
|
|
2977
|
+
static types() {
|
|
2978
|
+
return {
|
|
2979
|
+
expireTime: "number",
|
|
2980
|
+
url: "string"
|
|
2981
|
+
};
|
|
2982
|
+
}
|
|
2983
|
+
validate() {
|
|
2984
|
+
super.validate();
|
|
2985
|
+
}
|
|
2986
|
+
constructor(map) {
|
|
2987
|
+
super(map);
|
|
2988
|
+
}
|
|
2989
|
+
};
|
|
2990
|
+
__name(_GetContextFileUploadUrlResponseBodyData, "GetContextFileUploadUrlResponseBodyData");
|
|
2991
|
+
var GetContextFileUploadUrlResponseBodyData = _GetContextFileUploadUrlResponseBodyData;
|
|
2992
|
+
var _GetContextFileUploadUrlResponseBody = class _GetContextFileUploadUrlResponseBody extends $dara75.Model {
|
|
2993
|
+
static names() {
|
|
2994
|
+
return {
|
|
2995
|
+
code: "Code",
|
|
2996
|
+
data: "Data",
|
|
2997
|
+
httpStatusCode: "HttpStatusCode",
|
|
2998
|
+
message: "Message",
|
|
2999
|
+
requestId: "RequestId",
|
|
3000
|
+
success: "Success"
|
|
3001
|
+
};
|
|
3002
|
+
}
|
|
3003
|
+
static types() {
|
|
3004
|
+
return {
|
|
3005
|
+
code: "string",
|
|
3006
|
+
data: GetContextFileUploadUrlResponseBodyData,
|
|
3007
|
+
httpStatusCode: "number",
|
|
3008
|
+
message: "string",
|
|
3009
|
+
requestId: "string",
|
|
3010
|
+
success: "boolean"
|
|
3011
|
+
};
|
|
3012
|
+
}
|
|
3013
|
+
validate() {
|
|
3014
|
+
super.validate();
|
|
3015
|
+
}
|
|
3016
|
+
constructor(map) {
|
|
3017
|
+
super(map);
|
|
3018
|
+
}
|
|
3019
|
+
};
|
|
3020
|
+
__name(_GetContextFileUploadUrlResponseBody, "GetContextFileUploadUrlResponseBody");
|
|
3021
|
+
var GetContextFileUploadUrlResponseBody = _GetContextFileUploadUrlResponseBody;
|
|
2568
3022
|
|
|
2569
|
-
// src/api/models/
|
|
3023
|
+
// src/api/models/GetContextFileUploadUrlResponse.ts
|
|
2570
3024
|
init_cjs_shims();
|
|
2571
3025
|
|
|
2572
|
-
var
|
|
3026
|
+
var _GetContextFileUploadUrlResponse = class _GetContextFileUploadUrlResponse extends $dara76.Model {
|
|
2573
3027
|
static names() {
|
|
2574
3028
|
return {
|
|
2575
3029
|
headers: "headers",
|
|
@@ -2579,26 +3033,20 @@ var _SyncContextResponse = class _SyncContextResponse extends $dara64.Model {
|
|
|
2579
3033
|
}
|
|
2580
3034
|
static types() {
|
|
2581
3035
|
return {
|
|
2582
|
-
headers: {
|
|
3036
|
+
headers: { type: "map", keyType: "string", valueType: "string" },
|
|
2583
3037
|
statusCode: "number",
|
|
2584
|
-
body:
|
|
3038
|
+
body: GetContextFileUploadUrlResponseBody
|
|
2585
3039
|
};
|
|
2586
3040
|
}
|
|
2587
3041
|
validate() {
|
|
2588
|
-
if (this.headers) {
|
|
2589
|
-
$dara64.Model.validateMap(this.headers);
|
|
2590
|
-
}
|
|
2591
|
-
if (this.body && typeof this.body.validate === "function") {
|
|
2592
|
-
this.body.validate();
|
|
2593
|
-
}
|
|
2594
3042
|
super.validate();
|
|
2595
3043
|
}
|
|
2596
3044
|
constructor(map) {
|
|
2597
3045
|
super(map);
|
|
2598
3046
|
}
|
|
2599
3047
|
};
|
|
2600
|
-
__name(
|
|
2601
|
-
var
|
|
3048
|
+
__name(_GetContextFileUploadUrlResponse, "GetContextFileUploadUrlResponse");
|
|
3049
|
+
var GetContextFileUploadUrlResponse = _GetContextFileUploadUrlResponse;
|
|
2602
3050
|
|
|
2603
3051
|
// src/api/client.ts
|
|
2604
3052
|
var _Client = class _Client extends _openapicore2.default {
|
|
@@ -2618,10 +3066,10 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2618
3066
|
);
|
|
2619
3067
|
}
|
|
2620
3068
|
getEndpoint(productId, regionId, endpointRule, network, suffix, endpointMap, endpoint) {
|
|
2621
|
-
if (!$
|
|
3069
|
+
if (!$dara77.isNull(endpoint)) {
|
|
2622
3070
|
return endpoint;
|
|
2623
3071
|
}
|
|
2624
|
-
if (!$
|
|
3072
|
+
if (!$dara77.isNull(endpointMap) && !$dara77.isNull(endpointMap[regionId])) {
|
|
2625
3073
|
return endpointMap[regionId];
|
|
2626
3074
|
}
|
|
2627
3075
|
return _openapicore.OpenApiUtil.getEndpointRules(
|
|
@@ -2642,28 +3090,28 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2642
3090
|
async callMcpToolWithOptions(request, runtime) {
|
|
2643
3091
|
request.validate();
|
|
2644
3092
|
const body = {};
|
|
2645
|
-
if (!$
|
|
3093
|
+
if (!$dara77.isNull(request.args)) {
|
|
2646
3094
|
body["Args"] = request.args;
|
|
2647
3095
|
}
|
|
2648
|
-
if (!$
|
|
3096
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2649
3097
|
body["Authorization"] = request.authorization;
|
|
2650
3098
|
}
|
|
2651
|
-
if (!$
|
|
3099
|
+
if (!$dara77.isNull(request.externalUserId)) {
|
|
2652
3100
|
body["ExternalUserId"] = request.externalUserId;
|
|
2653
3101
|
}
|
|
2654
|
-
if (!$
|
|
3102
|
+
if (!$dara77.isNull(request.imageId)) {
|
|
2655
3103
|
body["ImageId"] = request.imageId;
|
|
2656
3104
|
}
|
|
2657
|
-
if (!$
|
|
3105
|
+
if (!$dara77.isNull(request.name)) {
|
|
2658
3106
|
body["Name"] = request.name;
|
|
2659
3107
|
}
|
|
2660
|
-
if (!$
|
|
3108
|
+
if (!$dara77.isNull(request.server)) {
|
|
2661
3109
|
body["Server"] = request.server;
|
|
2662
3110
|
}
|
|
2663
|
-
if (!$
|
|
3111
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
2664
3112
|
body["SessionId"] = request.sessionId;
|
|
2665
3113
|
}
|
|
2666
|
-
if (!$
|
|
3114
|
+
if (!$dara77.isNull(request.tool)) {
|
|
2667
3115
|
body["Tool"] = request.tool;
|
|
2668
3116
|
}
|
|
2669
3117
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2680,7 +3128,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2680
3128
|
reqBodyType: "formData",
|
|
2681
3129
|
bodyType: "json"
|
|
2682
3130
|
});
|
|
2683
|
-
return $
|
|
3131
|
+
return $dara77.cast(
|
|
2684
3132
|
await this.callApi(params, req, runtime),
|
|
2685
3133
|
new CallMcpToolResponse({})
|
|
2686
3134
|
);
|
|
@@ -2692,7 +3140,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2692
3140
|
* @returns CallMcpToolResponse
|
|
2693
3141
|
*/
|
|
2694
3142
|
async callMcpTool(request) {
|
|
2695
|
-
const runtime = new $
|
|
3143
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2696
3144
|
return await this.callMcpToolWithOptions(request, runtime);
|
|
2697
3145
|
}
|
|
2698
3146
|
/**
|
|
@@ -2706,7 +3154,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2706
3154
|
tmpReq.validate();
|
|
2707
3155
|
const request = new CreateMcpSessionShrinkRequest({});
|
|
2708
3156
|
_openapicore.OpenApiUtil.convert(tmpReq, request);
|
|
2709
|
-
if (!$
|
|
3157
|
+
if (!$dara77.isNull(tmpReq.persistenceDataList)) {
|
|
2710
3158
|
request.persistenceDataListShrink = _openapicore.OpenApiUtil.arrayToStringWithSpecifiedStyle(
|
|
2711
3159
|
tmpReq.persistenceDataList,
|
|
2712
3160
|
"PersistenceDataList",
|
|
@@ -2714,28 +3162,31 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2714
3162
|
);
|
|
2715
3163
|
}
|
|
2716
3164
|
const body = {};
|
|
2717
|
-
if (!$
|
|
3165
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2718
3166
|
body["Authorization"] = request.authorization;
|
|
2719
3167
|
}
|
|
2720
|
-
if (!$
|
|
3168
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
2721
3169
|
body["ContextId"] = request.contextId;
|
|
2722
3170
|
}
|
|
2723
|
-
if (!$
|
|
3171
|
+
if (!$dara77.isNull(request.externalUserId)) {
|
|
2724
3172
|
body["ExternalUserId"] = request.externalUserId;
|
|
2725
3173
|
}
|
|
2726
|
-
if (!$
|
|
3174
|
+
if (!$dara77.isNull(request.imageId)) {
|
|
2727
3175
|
body["ImageId"] = request.imageId;
|
|
2728
3176
|
}
|
|
2729
|
-
if (!$
|
|
3177
|
+
if (!$dara77.isNull(request.labels)) {
|
|
2730
3178
|
body["Labels"] = request.labels;
|
|
2731
3179
|
}
|
|
2732
|
-
if (!$
|
|
3180
|
+
if (!$dara77.isNull(request.mcpPolicyId)) {
|
|
3181
|
+
body["McpPolicyId"] = request.mcpPolicyId;
|
|
3182
|
+
}
|
|
3183
|
+
if (!$dara77.isNull(request.persistenceDataListShrink)) {
|
|
2733
3184
|
body["PersistenceDataList"] = request.persistenceDataListShrink;
|
|
2734
3185
|
}
|
|
2735
|
-
if (!$
|
|
3186
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
2736
3187
|
body["SessionId"] = request.sessionId;
|
|
2737
3188
|
}
|
|
2738
|
-
if (!$
|
|
3189
|
+
if (!$dara77.isNull(request.vpcResource)) {
|
|
2739
3190
|
body["VpcResource"] = request.vpcResource;
|
|
2740
3191
|
}
|
|
2741
3192
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2752,7 +3203,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2752
3203
|
reqBodyType: "formData",
|
|
2753
3204
|
bodyType: "json"
|
|
2754
3205
|
});
|
|
2755
|
-
return $
|
|
3206
|
+
return $dara77.cast(
|
|
2756
3207
|
await this.callApi(params, req, runtime),
|
|
2757
3208
|
new CreateMcpSessionResponse({})
|
|
2758
3209
|
);
|
|
@@ -2764,7 +3215,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2764
3215
|
* @returns CreateMcpSessionResponse
|
|
2765
3216
|
*/
|
|
2766
3217
|
async createMcpSession(request) {
|
|
2767
|
-
const runtime = new $
|
|
3218
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2768
3219
|
return await this.createMcpSessionWithOptions(request, runtime);
|
|
2769
3220
|
}
|
|
2770
3221
|
/**
|
|
@@ -2777,10 +3228,10 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2777
3228
|
async deleteContextWithOptions(request, runtime) {
|
|
2778
3229
|
request.validate();
|
|
2779
3230
|
const body = {};
|
|
2780
|
-
if (!$
|
|
3231
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2781
3232
|
body["Authorization"] = request.authorization;
|
|
2782
3233
|
}
|
|
2783
|
-
if (!$
|
|
3234
|
+
if (!$dara77.isNull(request.id)) {
|
|
2784
3235
|
body["Id"] = request.id;
|
|
2785
3236
|
}
|
|
2786
3237
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2797,7 +3248,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2797
3248
|
reqBodyType: "formData",
|
|
2798
3249
|
bodyType: "json"
|
|
2799
3250
|
});
|
|
2800
|
-
return $
|
|
3251
|
+
return $dara77.cast(
|
|
2801
3252
|
await this.callApi(params, req, runtime),
|
|
2802
3253
|
new DeleteContextResponse({})
|
|
2803
3254
|
);
|
|
@@ -2809,7 +3260,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2809
3260
|
* @returns DeleteContextResponse
|
|
2810
3261
|
*/
|
|
2811
3262
|
async deleteContext(request) {
|
|
2812
|
-
const runtime = new $
|
|
3263
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2813
3264
|
return await this.deleteContextWithOptions(request, runtime);
|
|
2814
3265
|
}
|
|
2815
3266
|
/**
|
|
@@ -2822,13 +3273,13 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2822
3273
|
async getContextWithOptions(request, runtime) {
|
|
2823
3274
|
request.validate();
|
|
2824
3275
|
const body = {};
|
|
2825
|
-
if (!$
|
|
3276
|
+
if (!$dara77.isNull(request.allowCreate)) {
|
|
2826
3277
|
body["AllowCreate"] = request.allowCreate;
|
|
2827
3278
|
}
|
|
2828
|
-
if (!$
|
|
3279
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2829
3280
|
body["Authorization"] = request.authorization;
|
|
2830
3281
|
}
|
|
2831
|
-
if (!$
|
|
3282
|
+
if (!$dara77.isNull(request.name)) {
|
|
2832
3283
|
body["Name"] = request.name;
|
|
2833
3284
|
}
|
|
2834
3285
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2845,7 +3296,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2845
3296
|
reqBodyType: "formData",
|
|
2846
3297
|
bodyType: "json"
|
|
2847
3298
|
});
|
|
2848
|
-
return $
|
|
3299
|
+
return $dara77.cast(
|
|
2849
3300
|
await this.callApi(params, req, runtime),
|
|
2850
3301
|
new GetContextResponse({})
|
|
2851
3302
|
);
|
|
@@ -2857,7 +3308,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2857
3308
|
* @returns GetContextResponse
|
|
2858
3309
|
*/
|
|
2859
3310
|
async getContext(request) {
|
|
2860
|
-
const runtime = new $
|
|
3311
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2861
3312
|
return await this.getContextWithOptions(request, runtime);
|
|
2862
3313
|
}
|
|
2863
3314
|
/**
|
|
@@ -2870,19 +3321,19 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2870
3321
|
async getContextInfoWithOptions(request, runtime) {
|
|
2871
3322
|
request.validate();
|
|
2872
3323
|
const body = {};
|
|
2873
|
-
if (!$
|
|
3324
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2874
3325
|
body["Authorization"] = request.authorization;
|
|
2875
3326
|
}
|
|
2876
|
-
if (!$
|
|
3327
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
2877
3328
|
body["ContextId"] = request.contextId;
|
|
2878
3329
|
}
|
|
2879
|
-
if (!$
|
|
3330
|
+
if (!$dara77.isNull(request.path)) {
|
|
2880
3331
|
body["Path"] = request.path;
|
|
2881
3332
|
}
|
|
2882
|
-
if (!$
|
|
3333
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
2883
3334
|
body["SessionId"] = request.sessionId;
|
|
2884
3335
|
}
|
|
2885
|
-
if (!$
|
|
3336
|
+
if (!$dara77.isNull(request.taskType)) {
|
|
2886
3337
|
body["TaskType"] = request.taskType;
|
|
2887
3338
|
}
|
|
2888
3339
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2899,7 +3350,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2899
3350
|
reqBodyType: "formData",
|
|
2900
3351
|
bodyType: "json"
|
|
2901
3352
|
});
|
|
2902
|
-
return $
|
|
3353
|
+
return $dara77.cast(
|
|
2903
3354
|
await this.callApi(params, req, runtime),
|
|
2904
3355
|
new GetContextInfoResponse({})
|
|
2905
3356
|
);
|
|
@@ -2911,7 +3362,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2911
3362
|
* @returns GetContextInfoResponse
|
|
2912
3363
|
*/
|
|
2913
3364
|
async getContextInfo(request) {
|
|
2914
|
-
const runtime = new $
|
|
3365
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2915
3366
|
return await this.getContextInfoWithOptions(request, runtime);
|
|
2916
3367
|
}
|
|
2917
3368
|
/**
|
|
@@ -2924,16 +3375,16 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2924
3375
|
async getLabelWithOptions(request, runtime) {
|
|
2925
3376
|
request.validate();
|
|
2926
3377
|
const body = {};
|
|
2927
|
-
if (!$
|
|
3378
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2928
3379
|
body["Authorization"] = request.authorization;
|
|
2929
3380
|
}
|
|
2930
|
-
if (!$
|
|
3381
|
+
if (!$dara77.isNull(request.maxResults)) {
|
|
2931
3382
|
body["MaxResults"] = request.maxResults;
|
|
2932
3383
|
}
|
|
2933
|
-
if (!$
|
|
3384
|
+
if (!$dara77.isNull(request.nextToken)) {
|
|
2934
3385
|
body["NextToken"] = request.nextToken;
|
|
2935
3386
|
}
|
|
2936
|
-
if (!$
|
|
3387
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
2937
3388
|
body["SessionId"] = request.sessionId;
|
|
2938
3389
|
}
|
|
2939
3390
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -2950,7 +3401,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2950
3401
|
reqBodyType: "formData",
|
|
2951
3402
|
bodyType: "json"
|
|
2952
3403
|
});
|
|
2953
|
-
return $
|
|
3404
|
+
return $dara77.cast(
|
|
2954
3405
|
await this.callApi(params, req, runtime),
|
|
2955
3406
|
new GetLabelResponse({})
|
|
2956
3407
|
);
|
|
@@ -2962,7 +3413,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2962
3413
|
* @returns GetLabelResponse
|
|
2963
3414
|
*/
|
|
2964
3415
|
async getLabel(request) {
|
|
2965
|
-
const runtime = new $
|
|
3416
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
2966
3417
|
return await this.getLabelWithOptions(request, runtime);
|
|
2967
3418
|
}
|
|
2968
3419
|
/**
|
|
@@ -2975,16 +3426,16 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
2975
3426
|
async getLinkWithOptions(request, runtime) {
|
|
2976
3427
|
request.validate();
|
|
2977
3428
|
const body = {};
|
|
2978
|
-
if (!$
|
|
3429
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
2979
3430
|
body["Authorization"] = request.authorization;
|
|
2980
3431
|
}
|
|
2981
|
-
if (!$
|
|
3432
|
+
if (!$dara77.isNull(request.port)) {
|
|
2982
3433
|
body["Port"] = request.port;
|
|
2983
3434
|
}
|
|
2984
|
-
if (!$
|
|
3435
|
+
if (!$dara77.isNull(request.protocolType)) {
|
|
2985
3436
|
body["ProtocolType"] = request.protocolType;
|
|
2986
3437
|
}
|
|
2987
|
-
if (!$
|
|
3438
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
2988
3439
|
body["SessionId"] = request.sessionId;
|
|
2989
3440
|
}
|
|
2990
3441
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3001,7 +3452,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3001
3452
|
reqBodyType: "formData",
|
|
3002
3453
|
bodyType: "json"
|
|
3003
3454
|
});
|
|
3004
|
-
return $
|
|
3455
|
+
return $dara77.cast(
|
|
3005
3456
|
await this.callApi(params, req, runtime),
|
|
3006
3457
|
new GetLinkResponse({})
|
|
3007
3458
|
);
|
|
@@ -3013,7 +3464,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3013
3464
|
* @returns GetLinkResponse
|
|
3014
3465
|
*/
|
|
3015
3466
|
async getLink(request) {
|
|
3016
|
-
const runtime = new $
|
|
3467
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3017
3468
|
return await this.getLinkWithOptions(request, runtime);
|
|
3018
3469
|
}
|
|
3019
3470
|
/**
|
|
@@ -3026,10 +3477,10 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3026
3477
|
async getMcpResourceWithOptions(request, runtime) {
|
|
3027
3478
|
request.validate();
|
|
3028
3479
|
const body = {};
|
|
3029
|
-
if (!$
|
|
3480
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3030
3481
|
body["Authorization"] = request.authorization;
|
|
3031
3482
|
}
|
|
3032
|
-
if (!$
|
|
3483
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3033
3484
|
body["SessionId"] = request.sessionId;
|
|
3034
3485
|
}
|
|
3035
3486
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3046,7 +3497,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3046
3497
|
reqBodyType: "formData",
|
|
3047
3498
|
bodyType: "json"
|
|
3048
3499
|
});
|
|
3049
|
-
return $
|
|
3500
|
+
return $dara77.cast(
|
|
3050
3501
|
await this.callApi(params, req, runtime),
|
|
3051
3502
|
new GetMcpResourceResponse({})
|
|
3052
3503
|
);
|
|
@@ -3058,7 +3509,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3058
3509
|
* @returns GetMcpResourceResponse
|
|
3059
3510
|
*/
|
|
3060
3511
|
async getMcpResource(request) {
|
|
3061
|
-
const runtime = new $
|
|
3512
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3062
3513
|
return await this.getMcpResourceWithOptions(request, runtime);
|
|
3063
3514
|
}
|
|
3064
3515
|
/**
|
|
@@ -3071,13 +3522,13 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3071
3522
|
async listContextsWithOptions(request, runtime) {
|
|
3072
3523
|
request.validate();
|
|
3073
3524
|
const body = {};
|
|
3074
|
-
if (!$
|
|
3525
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3075
3526
|
body["Authorization"] = request.authorization;
|
|
3076
3527
|
}
|
|
3077
|
-
if (!$
|
|
3528
|
+
if (!$dara77.isNull(request.maxResults)) {
|
|
3078
3529
|
body["MaxResults"] = request.maxResults;
|
|
3079
3530
|
}
|
|
3080
|
-
if (!$
|
|
3531
|
+
if (!$dara77.isNull(request.nextToken)) {
|
|
3081
3532
|
body["NextToken"] = request.nextToken;
|
|
3082
3533
|
}
|
|
3083
3534
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3094,7 +3545,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3094
3545
|
reqBodyType: "formData",
|
|
3095
3546
|
bodyType: "json"
|
|
3096
3547
|
});
|
|
3097
|
-
return $
|
|
3548
|
+
return $dara77.cast(
|
|
3098
3549
|
await this.callApi(params, req, runtime),
|
|
3099
3550
|
new ListContextsResponse({})
|
|
3100
3551
|
);
|
|
@@ -3106,7 +3557,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3106
3557
|
* @returns ListContextsResponse
|
|
3107
3558
|
*/
|
|
3108
3559
|
async listContexts(request) {
|
|
3109
|
-
const runtime = new $
|
|
3560
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3110
3561
|
return await this.listContextsWithOptions(request, runtime);
|
|
3111
3562
|
}
|
|
3112
3563
|
/**
|
|
@@ -3119,10 +3570,10 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3119
3570
|
async listMcpToolsWithOptions(request, runtime) {
|
|
3120
3571
|
request.validate();
|
|
3121
3572
|
const body = {};
|
|
3122
|
-
if (!$
|
|
3573
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3123
3574
|
body["Authorization"] = request.authorization;
|
|
3124
3575
|
}
|
|
3125
|
-
if (!$
|
|
3576
|
+
if (!$dara77.isNull(request.imageId)) {
|
|
3126
3577
|
body["ImageId"] = request.imageId;
|
|
3127
3578
|
}
|
|
3128
3579
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3139,7 +3590,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3139
3590
|
reqBodyType: "formData",
|
|
3140
3591
|
bodyType: "json"
|
|
3141
3592
|
});
|
|
3142
|
-
return $
|
|
3593
|
+
return $dara77.cast(
|
|
3143
3594
|
await this.callApi(params, req, runtime),
|
|
3144
3595
|
new ListMcpToolsResponse({})
|
|
3145
3596
|
);
|
|
@@ -3151,7 +3602,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3151
3602
|
* @returns ListMcpToolsResponse
|
|
3152
3603
|
*/
|
|
3153
3604
|
async listMcpTools(request) {
|
|
3154
|
-
const runtime = new $
|
|
3605
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3155
3606
|
return await this.listMcpToolsWithOptions(request, runtime);
|
|
3156
3607
|
}
|
|
3157
3608
|
/**
|
|
@@ -3164,16 +3615,16 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3164
3615
|
async listSessionWithOptions(request, runtime) {
|
|
3165
3616
|
request.validate();
|
|
3166
3617
|
const body = {};
|
|
3167
|
-
if (!$
|
|
3618
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3168
3619
|
body["Authorization"] = request.authorization;
|
|
3169
3620
|
}
|
|
3170
|
-
if (!$
|
|
3621
|
+
if (!$dara77.isNull(request.labels)) {
|
|
3171
3622
|
body["Labels"] = request.labels;
|
|
3172
3623
|
}
|
|
3173
|
-
if (!$
|
|
3624
|
+
if (!$dara77.isNull(request.maxResults)) {
|
|
3174
3625
|
body["MaxResults"] = request.maxResults;
|
|
3175
3626
|
}
|
|
3176
|
-
if (!$
|
|
3627
|
+
if (!$dara77.isNull(request.nextToken)) {
|
|
3177
3628
|
body["NextToken"] = request.nextToken;
|
|
3178
3629
|
}
|
|
3179
3630
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3190,7 +3641,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3190
3641
|
reqBodyType: "formData",
|
|
3191
3642
|
bodyType: "json"
|
|
3192
3643
|
});
|
|
3193
|
-
return $
|
|
3644
|
+
return $dara77.cast(
|
|
3194
3645
|
await this.callApi(params, req, runtime),
|
|
3195
3646
|
new ListSessionResponse({})
|
|
3196
3647
|
);
|
|
@@ -3202,7 +3653,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3202
3653
|
* @returns ListSessionResponse
|
|
3203
3654
|
*/
|
|
3204
3655
|
async listSession(request) {
|
|
3205
|
-
const runtime = new $
|
|
3656
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3206
3657
|
return await this.listSessionWithOptions(request, runtime);
|
|
3207
3658
|
}
|
|
3208
3659
|
/**
|
|
@@ -3215,13 +3666,13 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3215
3666
|
async modifyContextWithOptions(request, runtime) {
|
|
3216
3667
|
request.validate();
|
|
3217
3668
|
const body = {};
|
|
3218
|
-
if (!$
|
|
3669
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3219
3670
|
body["Authorization"] = request.authorization;
|
|
3220
3671
|
}
|
|
3221
|
-
if (!$
|
|
3672
|
+
if (!$dara77.isNull(request.id)) {
|
|
3222
3673
|
body["Id"] = request.id;
|
|
3223
3674
|
}
|
|
3224
|
-
if (!$
|
|
3675
|
+
if (!$dara77.isNull(request.name)) {
|
|
3225
3676
|
body["Name"] = request.name;
|
|
3226
3677
|
}
|
|
3227
3678
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3238,7 +3689,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3238
3689
|
reqBodyType: "formData",
|
|
3239
3690
|
bodyType: "json"
|
|
3240
3691
|
});
|
|
3241
|
-
return $
|
|
3692
|
+
return $dara77.cast(
|
|
3242
3693
|
await this.callApi(params, req, runtime),
|
|
3243
3694
|
new ModifyContextResponse({})
|
|
3244
3695
|
);
|
|
@@ -3250,7 +3701,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3250
3701
|
* @returns ModifyContextResponse
|
|
3251
3702
|
*/
|
|
3252
3703
|
async modifyContext(request) {
|
|
3253
|
-
const runtime = new $
|
|
3704
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3254
3705
|
return await this.modifyContextWithOptions(request, runtime);
|
|
3255
3706
|
}
|
|
3256
3707
|
/**
|
|
@@ -3263,10 +3714,10 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3263
3714
|
async releaseMcpSessionWithOptions(request, runtime) {
|
|
3264
3715
|
request.validate();
|
|
3265
3716
|
const body = {};
|
|
3266
|
-
if (!$
|
|
3717
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3267
3718
|
body["Authorization"] = request.authorization;
|
|
3268
3719
|
}
|
|
3269
|
-
if (!$
|
|
3720
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3270
3721
|
body["SessionId"] = request.sessionId;
|
|
3271
3722
|
}
|
|
3272
3723
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3283,7 +3734,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3283
3734
|
reqBodyType: "formData",
|
|
3284
3735
|
bodyType: "json"
|
|
3285
3736
|
});
|
|
3286
|
-
return $
|
|
3737
|
+
return $dara77.cast(
|
|
3287
3738
|
await this.callApi(params, req, runtime),
|
|
3288
3739
|
new ReleaseMcpSessionResponse({})
|
|
3289
3740
|
);
|
|
@@ -3295,7 +3746,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3295
3746
|
* @returns ReleaseMcpSessionResponse
|
|
3296
3747
|
*/
|
|
3297
3748
|
async releaseMcpSession(request) {
|
|
3298
|
-
const runtime = new $
|
|
3749
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3299
3750
|
return await this.releaseMcpSessionWithOptions(request, runtime);
|
|
3300
3751
|
}
|
|
3301
3752
|
/**
|
|
@@ -3308,13 +3759,13 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3308
3759
|
async setLabelWithOptions(request, runtime) {
|
|
3309
3760
|
request.validate();
|
|
3310
3761
|
const body = {};
|
|
3311
|
-
if (!$
|
|
3762
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3312
3763
|
body["Authorization"] = request.authorization;
|
|
3313
3764
|
}
|
|
3314
|
-
if (!$
|
|
3765
|
+
if (!$dara77.isNull(request.labels)) {
|
|
3315
3766
|
body["Labels"] = request.labels;
|
|
3316
3767
|
}
|
|
3317
|
-
if (!$
|
|
3768
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3318
3769
|
body["SessionId"] = request.sessionId;
|
|
3319
3770
|
}
|
|
3320
3771
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3331,7 +3782,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3331
3782
|
reqBodyType: "formData",
|
|
3332
3783
|
bodyType: "json"
|
|
3333
3784
|
});
|
|
3334
|
-
return $
|
|
3785
|
+
return $dara77.cast(
|
|
3335
3786
|
await this.callApi(params, req, runtime),
|
|
3336
3787
|
new SetLabelResponse({})
|
|
3337
3788
|
);
|
|
@@ -3343,7 +3794,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3343
3794
|
* @returns SetLabelResponse
|
|
3344
3795
|
*/
|
|
3345
3796
|
async setLabel(request) {
|
|
3346
|
-
const runtime = new $
|
|
3797
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3347
3798
|
return await this.setLabelWithOptions(request, runtime);
|
|
3348
3799
|
}
|
|
3349
3800
|
/**
|
|
@@ -3356,20 +3807,20 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3356
3807
|
async syncContextWithOptions(request, runtime) {
|
|
3357
3808
|
request.validate();
|
|
3358
3809
|
const query = {};
|
|
3359
|
-
if (!$
|
|
3810
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3360
3811
|
query["Authorization"] = request.authorization;
|
|
3361
3812
|
}
|
|
3362
3813
|
const body = {};
|
|
3363
|
-
if (!$
|
|
3814
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
3364
3815
|
body["ContextId"] = request.contextId;
|
|
3365
3816
|
}
|
|
3366
|
-
if (!$
|
|
3817
|
+
if (!$dara77.isNull(request.mode)) {
|
|
3367
3818
|
body["Mode"] = request.mode;
|
|
3368
3819
|
}
|
|
3369
|
-
if (!$
|
|
3820
|
+
if (!$dara77.isNull(request.path)) {
|
|
3370
3821
|
body["Path"] = request.path;
|
|
3371
3822
|
}
|
|
3372
|
-
if (!$
|
|
3823
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3373
3824
|
body["SessionId"] = request.sessionId;
|
|
3374
3825
|
}
|
|
3375
3826
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
@@ -3387,7 +3838,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3387
3838
|
reqBodyType: "formData",
|
|
3388
3839
|
bodyType: "json"
|
|
3389
3840
|
});
|
|
3390
|
-
return $
|
|
3841
|
+
return $dara77.cast(
|
|
3391
3842
|
await this.callApi(params, req, runtime),
|
|
3392
3843
|
new SyncContextResponse({})
|
|
3393
3844
|
);
|
|
@@ -3399,7 +3850,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3399
3850
|
* @returns SyncContextResponse
|
|
3400
3851
|
*/
|
|
3401
3852
|
async syncContext(request) {
|
|
3402
|
-
const runtime = new $
|
|
3853
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3403
3854
|
return await this.syncContextWithOptions(request, runtime);
|
|
3404
3855
|
}
|
|
3405
3856
|
/**
|
|
@@ -3412,15 +3863,18 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3412
3863
|
async initBrowserWithOptions(request, runtime) {
|
|
3413
3864
|
request.validate();
|
|
3414
3865
|
const body = {};
|
|
3415
|
-
if (!$
|
|
3866
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3416
3867
|
body["Authorization"] = request.authorization;
|
|
3417
3868
|
}
|
|
3418
|
-
if (!$
|
|
3869
|
+
if (!$dara77.isNull(request.persistentPath)) {
|
|
3419
3870
|
body["PersistentPath"] = request.persistentPath;
|
|
3420
3871
|
}
|
|
3421
|
-
if (!$
|
|
3872
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3422
3873
|
body["SessionId"] = request.sessionId;
|
|
3423
3874
|
}
|
|
3875
|
+
if (!$dara77.isNull(request.browserOption)) {
|
|
3876
|
+
body["BrowserOption"] = JSON.stringify(request.browserOption);
|
|
3877
|
+
}
|
|
3424
3878
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
3425
3879
|
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
3426
3880
|
});
|
|
@@ -3435,7 +3889,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3435
3889
|
reqBodyType: "formData",
|
|
3436
3890
|
bodyType: "json"
|
|
3437
3891
|
});
|
|
3438
|
-
return $
|
|
3892
|
+
return $dara77.cast(
|
|
3439
3893
|
await this.callApi(params, req, runtime),
|
|
3440
3894
|
new InitBrowserResponse({})
|
|
3441
3895
|
);
|
|
@@ -3447,7 +3901,7 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3447
3901
|
* @returns InitBrowserResponse
|
|
3448
3902
|
*/
|
|
3449
3903
|
async initBrowser(request) {
|
|
3450
|
-
const runtime = new $
|
|
3904
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3451
3905
|
return await this.initBrowserWithOptions(request, runtime);
|
|
3452
3906
|
}
|
|
3453
3907
|
/**
|
|
@@ -3457,18 +3911,21 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3457
3911
|
* @returns InitBrowserResponse
|
|
3458
3912
|
*/
|
|
3459
3913
|
initBrowserSync(request) {
|
|
3460
|
-
const runtime = new $
|
|
3914
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3461
3915
|
request.validate();
|
|
3462
3916
|
const body = {};
|
|
3463
|
-
if (!$
|
|
3917
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3464
3918
|
body["Authorization"] = request.authorization;
|
|
3465
3919
|
}
|
|
3466
|
-
if (!$
|
|
3920
|
+
if (!$dara77.isNull(request.persistentPath)) {
|
|
3467
3921
|
body["PersistentPath"] = request.persistentPath;
|
|
3468
3922
|
}
|
|
3469
|
-
if (!$
|
|
3923
|
+
if (!$dara77.isNull(request.sessionId)) {
|
|
3470
3924
|
body["SessionId"] = request.sessionId;
|
|
3471
3925
|
}
|
|
3926
|
+
if (!$dara77.isNull(request.browserOption)) {
|
|
3927
|
+
body["BrowserOption"] = JSON.stringify(request.browserOption);
|
|
3928
|
+
}
|
|
3472
3929
|
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
3473
3930
|
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
3474
3931
|
});
|
|
@@ -3483,11 +3940,209 @@ var _Client = class _Client extends _openapicore2.default {
|
|
|
3483
3940
|
reqBodyType: "formData",
|
|
3484
3941
|
bodyType: "json"
|
|
3485
3942
|
});
|
|
3486
|
-
return $
|
|
3943
|
+
return $dara77.cast(
|
|
3487
3944
|
this.callApi(params, req, runtime),
|
|
3488
3945
|
new InitBrowserResponse({})
|
|
3489
3946
|
);
|
|
3490
3947
|
}
|
|
3948
|
+
/**
|
|
3949
|
+
* 获取上传context文件url
|
|
3950
|
+
*
|
|
3951
|
+
* @param request - DeleteContextFileRequest
|
|
3952
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
3953
|
+
* @returns DeleteContextFileResponse
|
|
3954
|
+
*/
|
|
3955
|
+
async deleteContextFileWithOptions(request, runtime) {
|
|
3956
|
+
request.validate();
|
|
3957
|
+
const body = {};
|
|
3958
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
3959
|
+
body["Authorization"] = request.authorization;
|
|
3960
|
+
}
|
|
3961
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
3962
|
+
body["ContextId"] = request.contextId;
|
|
3963
|
+
}
|
|
3964
|
+
if (!$dara77.isNull(request.filePath)) {
|
|
3965
|
+
body["FilePath"] = request.filePath;
|
|
3966
|
+
}
|
|
3967
|
+
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
3968
|
+
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
3969
|
+
});
|
|
3970
|
+
const params = new _openapicore.$OpenApiUtil.Params({
|
|
3971
|
+
action: "DeleteContextFile",
|
|
3972
|
+
version: "2025-05-06",
|
|
3973
|
+
protocol: "HTTPS",
|
|
3974
|
+
pathname: "/",
|
|
3975
|
+
method: "POST",
|
|
3976
|
+
authType: "Anonymous",
|
|
3977
|
+
style: "RPC",
|
|
3978
|
+
reqBodyType: "formData",
|
|
3979
|
+
bodyType: "json"
|
|
3980
|
+
});
|
|
3981
|
+
return $dara77.cast(
|
|
3982
|
+
await this.callApi(params, req, runtime),
|
|
3983
|
+
new DeleteContextFileResponse({})
|
|
3984
|
+
);
|
|
3985
|
+
}
|
|
3986
|
+
/**
|
|
3987
|
+
* 获取上传context文件url
|
|
3988
|
+
*
|
|
3989
|
+
* @param request - DeleteContextFileRequest
|
|
3990
|
+
* @returns DeleteContextFileResponse
|
|
3991
|
+
*/
|
|
3992
|
+
async deleteContextFile(request) {
|
|
3993
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
3994
|
+
return await this.deleteContextFileWithOptions(request, runtime);
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3997
|
+
* 查询context特定目录文件
|
|
3998
|
+
*
|
|
3999
|
+
* @param request - DescribeContextFilesRequest
|
|
4000
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
4001
|
+
* @returns DescribeContextFilesResponse
|
|
4002
|
+
*/
|
|
4003
|
+
async describeContextFilesWithOptions(request, runtime) {
|
|
4004
|
+
request.validate();
|
|
4005
|
+
const body = {};
|
|
4006
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
4007
|
+
body["Authorization"] = request.authorization;
|
|
4008
|
+
}
|
|
4009
|
+
if (!$dara77.isNull(request.pageNumber)) {
|
|
4010
|
+
body["PageNumber"] = request.pageNumber;
|
|
4011
|
+
}
|
|
4012
|
+
if (!$dara77.isNull(request.pageSize)) {
|
|
4013
|
+
body["PageSize"] = request.pageSize;
|
|
4014
|
+
}
|
|
4015
|
+
if (!$dara77.isNull(request.parentFolderPath)) {
|
|
4016
|
+
body["ParentFolderPath"] = request.parentFolderPath;
|
|
4017
|
+
}
|
|
4018
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
4019
|
+
body["ContextId"] = request.contextId;
|
|
4020
|
+
}
|
|
4021
|
+
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
4022
|
+
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
4023
|
+
});
|
|
4024
|
+
const params = new _openapicore.$OpenApiUtil.Params({
|
|
4025
|
+
action: "DescribeContextFiles",
|
|
4026
|
+
version: "2025-05-06",
|
|
4027
|
+
protocol: "HTTPS",
|
|
4028
|
+
pathname: "/",
|
|
4029
|
+
method: "POST",
|
|
4030
|
+
authType: "Anonymous",
|
|
4031
|
+
style: "RPC",
|
|
4032
|
+
reqBodyType: "formData",
|
|
4033
|
+
bodyType: "json"
|
|
4034
|
+
});
|
|
4035
|
+
return $dara77.cast(
|
|
4036
|
+
await this.callApi(params, req, runtime),
|
|
4037
|
+
new DescribeContextFilesResponse({})
|
|
4038
|
+
);
|
|
4039
|
+
}
|
|
4040
|
+
/**
|
|
4041
|
+
* 查询context特定目录文件
|
|
4042
|
+
*
|
|
4043
|
+
* @param request - DescribeContextFilesRequest
|
|
4044
|
+
* @returns DescribeContextFilesResponse
|
|
4045
|
+
*/
|
|
4046
|
+
async describeContextFiles(request) {
|
|
4047
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
4048
|
+
return await this.describeContextFilesWithOptions(request, runtime);
|
|
4049
|
+
}
|
|
4050
|
+
/**
|
|
4051
|
+
* 获取上传context文件url
|
|
4052
|
+
*
|
|
4053
|
+
* @param request - GetContextFileDownloadUrlRequest
|
|
4054
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
4055
|
+
* @returns GetContextFileDownloadUrlResponse
|
|
4056
|
+
*/
|
|
4057
|
+
async getContextFileDownloadUrlWithOptions(request, runtime) {
|
|
4058
|
+
request.validate();
|
|
4059
|
+
const body = {};
|
|
4060
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
4061
|
+
body["Authorization"] = request.authorization;
|
|
4062
|
+
}
|
|
4063
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
4064
|
+
body["ContextId"] = request.contextId;
|
|
4065
|
+
}
|
|
4066
|
+
if (!$dara77.isNull(request.filePath)) {
|
|
4067
|
+
body["FilePath"] = request.filePath;
|
|
4068
|
+
}
|
|
4069
|
+
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
4070
|
+
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
4071
|
+
});
|
|
4072
|
+
const params = new _openapicore.$OpenApiUtil.Params({
|
|
4073
|
+
action: "GetContextFileDownloadUrl",
|
|
4074
|
+
version: "2025-05-06",
|
|
4075
|
+
protocol: "HTTPS",
|
|
4076
|
+
pathname: "/",
|
|
4077
|
+
method: "POST",
|
|
4078
|
+
authType: "Anonymous",
|
|
4079
|
+
style: "RPC",
|
|
4080
|
+
reqBodyType: "formData",
|
|
4081
|
+
bodyType: "json"
|
|
4082
|
+
});
|
|
4083
|
+
return $dara77.cast(
|
|
4084
|
+
await this.callApi(params, req, runtime),
|
|
4085
|
+
new GetContextFileDownloadUrlResponse({})
|
|
4086
|
+
);
|
|
4087
|
+
}
|
|
4088
|
+
/**
|
|
4089
|
+
* 获取上传context文件url
|
|
4090
|
+
*
|
|
4091
|
+
* @param request - GetContextFileDownloadUrlRequest
|
|
4092
|
+
* @returns GetContextFileDownloadUrlResponse
|
|
4093
|
+
*/
|
|
4094
|
+
async getContextFileDownloadUrl(request) {
|
|
4095
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
4096
|
+
return await this.getContextFileDownloadUrlWithOptions(request, runtime);
|
|
4097
|
+
}
|
|
4098
|
+
/**
|
|
4099
|
+
* 获取上传context文件url
|
|
4100
|
+
*
|
|
4101
|
+
* @param request - GetContextFileUploadUrlRequest
|
|
4102
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
4103
|
+
* @returns GetContextFileUploadUrlResponse
|
|
4104
|
+
*/
|
|
4105
|
+
async getContextFileUploadUrlWithOptions(request, runtime) {
|
|
4106
|
+
request.validate();
|
|
4107
|
+
const body = {};
|
|
4108
|
+
if (!$dara77.isNull(request.authorization)) {
|
|
4109
|
+
body["Authorization"] = request.authorization;
|
|
4110
|
+
}
|
|
4111
|
+
if (!$dara77.isNull(request.contextId)) {
|
|
4112
|
+
body["ContextId"] = request.contextId;
|
|
4113
|
+
}
|
|
4114
|
+
if (!$dara77.isNull(request.filePath)) {
|
|
4115
|
+
body["FilePath"] = request.filePath;
|
|
4116
|
+
}
|
|
4117
|
+
const req = new _openapicore.$OpenApiUtil.OpenApiRequest({
|
|
4118
|
+
body: _openapicore.OpenApiUtil.parseToMap(body)
|
|
4119
|
+
});
|
|
4120
|
+
const params = new _openapicore.$OpenApiUtil.Params({
|
|
4121
|
+
action: "GetContextFileUploadUrl",
|
|
4122
|
+
version: "2025-05-06",
|
|
4123
|
+
protocol: "HTTPS",
|
|
4124
|
+
pathname: "/",
|
|
4125
|
+
method: "POST",
|
|
4126
|
+
authType: "Anonymous",
|
|
4127
|
+
style: "RPC",
|
|
4128
|
+
reqBodyType: "formData",
|
|
4129
|
+
bodyType: "json"
|
|
4130
|
+
});
|
|
4131
|
+
return $dara77.cast(
|
|
4132
|
+
await this.callApi(params, req, runtime),
|
|
4133
|
+
new GetContextFileUploadUrlResponse({})
|
|
4134
|
+
);
|
|
4135
|
+
}
|
|
4136
|
+
/**
|
|
4137
|
+
* 获取上传context文件url
|
|
4138
|
+
*
|
|
4139
|
+
* @param request - GetContextFileUploadUrlRequest
|
|
4140
|
+
* @returns GetContextFileUploadUrlResponse
|
|
4141
|
+
*/
|
|
4142
|
+
async getContextFileUploadUrl(request) {
|
|
4143
|
+
const runtime = new $dara77.RuntimeOptions({});
|
|
4144
|
+
return await this.getContextFileUploadUrlWithOptions(request, runtime);
|
|
4145
|
+
}
|
|
3491
4146
|
};
|
|
3492
4147
|
__name(_Client, "Client");
|
|
3493
4148
|
var Client = _Client;
|
|
@@ -3815,6 +4470,112 @@ var _ContextService = class _ContextService {
|
|
|
3815
4470
|
};
|
|
3816
4471
|
}
|
|
3817
4472
|
}
|
|
4473
|
+
/**
|
|
4474
|
+
* Get a presigned upload URL for a file in a context.
|
|
4475
|
+
*/
|
|
4476
|
+
async getFileUploadUrl(contextId, filePath) {
|
|
4477
|
+
log("API Call: GetContextFileUploadUrl");
|
|
4478
|
+
log(`Request: ContextId=${contextId}, FilePath=${filePath}`);
|
|
4479
|
+
const req = new GetContextFileUploadUrlRequest({
|
|
4480
|
+
authorization: `Bearer ${this.agentBay.getAPIKey()}`,
|
|
4481
|
+
contextId,
|
|
4482
|
+
filePath
|
|
4483
|
+
});
|
|
4484
|
+
const resp = await this.agentBay.getClient().getContextFileUploadUrl(req);
|
|
4485
|
+
log("Response from GetContextFileUploadUrl:", resp.body);
|
|
4486
|
+
const requestId = extractRequestId(resp) || "";
|
|
4487
|
+
const body = resp.body;
|
|
4488
|
+
const data = _optionalChain([body, 'optionalAccess', _23 => _23.data]);
|
|
4489
|
+
return {
|
|
4490
|
+
requestId,
|
|
4491
|
+
success: !!(body && body.success),
|
|
4492
|
+
url: _optionalChain([data, 'optionalAccess', _24 => _24.url]) || "",
|
|
4493
|
+
expireTime: _optionalChain([data, 'optionalAccess', _25 => _25.expireTime])
|
|
4494
|
+
};
|
|
4495
|
+
}
|
|
4496
|
+
/**
|
|
4497
|
+
* Get a presigned download URL for a file in a context.
|
|
4498
|
+
*/
|
|
4499
|
+
async getFileDownloadUrl(contextId, filePath) {
|
|
4500
|
+
log("API Call: GetContextFileDownloadUrl");
|
|
4501
|
+
log(`Request: ContextId=${contextId}, FilePath=${filePath}`);
|
|
4502
|
+
const req = new GetContextFileDownloadUrlRequest({
|
|
4503
|
+
authorization: `Bearer ${this.agentBay.getAPIKey()}`,
|
|
4504
|
+
contextId,
|
|
4505
|
+
filePath
|
|
4506
|
+
});
|
|
4507
|
+
const resp = await this.agentBay.getClient().getContextFileDownloadUrl(req);
|
|
4508
|
+
log("Response from GetContextFileDownloadUrl:", resp.body);
|
|
4509
|
+
const requestId = extractRequestId(resp) || "";
|
|
4510
|
+
const body = resp.body;
|
|
4511
|
+
const data = _optionalChain([body, 'optionalAccess', _26 => _26.data]);
|
|
4512
|
+
return {
|
|
4513
|
+
requestId,
|
|
4514
|
+
success: !!(body && body.success),
|
|
4515
|
+
url: _optionalChain([data, 'optionalAccess', _27 => _27.url]) || "",
|
|
4516
|
+
expireTime: _optionalChain([data, 'optionalAccess', _28 => _28.expireTime])
|
|
4517
|
+
};
|
|
4518
|
+
}
|
|
4519
|
+
/**
|
|
4520
|
+
* Delete a file in a context.
|
|
4521
|
+
*/
|
|
4522
|
+
async deleteFile(contextId, filePath) {
|
|
4523
|
+
log("API Call: DeleteContextFile");
|
|
4524
|
+
log(`Request: ContextId=${contextId}, FilePath=${filePath}`);
|
|
4525
|
+
const req = new DeleteContextFileRequest({
|
|
4526
|
+
authorization: `Bearer ${this.agentBay.getAPIKey()}`,
|
|
4527
|
+
contextId,
|
|
4528
|
+
filePath
|
|
4529
|
+
});
|
|
4530
|
+
const resp = await this.agentBay.getClient().deleteContextFile(req);
|
|
4531
|
+
log("Response from DeleteContextFile:", resp.body);
|
|
4532
|
+
const requestId = extractRequestId(resp) || "";
|
|
4533
|
+
const body = resp.body;
|
|
4534
|
+
const success = !!(body && body.success);
|
|
4535
|
+
return {
|
|
4536
|
+
requestId,
|
|
4537
|
+
success,
|
|
4538
|
+
data: success,
|
|
4539
|
+
errorMessage: success ? "" : `Delete failed: ${_optionalChain([body, 'optionalAccess', _29 => _29.code]) || ""}`
|
|
4540
|
+
};
|
|
4541
|
+
}
|
|
4542
|
+
/**
|
|
4543
|
+
* List files under a specific folder path in a context.
|
|
4544
|
+
*/
|
|
4545
|
+
async listFiles(contextId, parentFolderPath, pageNumber = 1, pageSize = 50) {
|
|
4546
|
+
log("API Call: DescribeContextFiles");
|
|
4547
|
+
log(
|
|
4548
|
+
`Request: ContextId=${contextId}, ParentFolderPath=${parentFolderPath}, PageNumber=${pageNumber}, PageSize=${pageSize}`
|
|
4549
|
+
);
|
|
4550
|
+
const req = new DescribeContextFilesRequest({
|
|
4551
|
+
authorization: `Bearer ${this.agentBay.getAPIKey()}`,
|
|
4552
|
+
pageNumber,
|
|
4553
|
+
pageSize,
|
|
4554
|
+
parentFolderPath,
|
|
4555
|
+
contextId
|
|
4556
|
+
});
|
|
4557
|
+
const resp = await this.agentBay.getClient().describeContextFiles(req);
|
|
4558
|
+
log("Response from DescribeContextFiles:", resp.body);
|
|
4559
|
+
const requestId = extractRequestId(resp) || "";
|
|
4560
|
+
const body = resp.body;
|
|
4561
|
+
const rawList = _optionalChain([body, 'optionalAccess', _30 => _30.data]) || [];
|
|
4562
|
+
const entries = rawList.map((it) => ({
|
|
4563
|
+
fileId: it.fileId,
|
|
4564
|
+
fileName: it.fileName,
|
|
4565
|
+
filePath: it.filePath || "",
|
|
4566
|
+
fileType: it.fileType,
|
|
4567
|
+
gmtCreate: it.gmtCreate,
|
|
4568
|
+
gmtModified: it.gmtModified,
|
|
4569
|
+
size: it.size,
|
|
4570
|
+
status: it.status
|
|
4571
|
+
}));
|
|
4572
|
+
return {
|
|
4573
|
+
requestId,
|
|
4574
|
+
success: !!(body && body.success),
|
|
4575
|
+
entries,
|
|
4576
|
+
count: _optionalChain([body, 'optionalAccess', _31 => _31.count])
|
|
4577
|
+
};
|
|
4578
|
+
}
|
|
3818
4579
|
};
|
|
3819
4580
|
__name(_ContextService, "ContextService");
|
|
3820
4581
|
var ContextService = _ContextService;
|
|
@@ -4582,11 +5343,11 @@ var _ContextManager = class _ContextManager {
|
|
|
4582
5343
|
try {
|
|
4583
5344
|
const response = await this.session.getClient().getContextInfo(request);
|
|
4584
5345
|
const requestId = extractRequestId(response) || "";
|
|
4585
|
-
if (_optionalChain([response, 'optionalAccess',
|
|
5346
|
+
if (_optionalChain([response, 'optionalAccess', _32 => _32.body])) {
|
|
4586
5347
|
log("Response from GetContextInfo:", response.body);
|
|
4587
5348
|
}
|
|
4588
5349
|
const contextStatusData = [];
|
|
4589
|
-
if (_optionalChain([response, 'optionalAccess',
|
|
5350
|
+
if (_optionalChain([response, 'optionalAccess', _33 => _33.body, 'optionalAccess', _34 => _34.data, 'optionalAccess', _35 => _35.contextStatus])) {
|
|
4590
5351
|
try {
|
|
4591
5352
|
const contextStatusStr = response.body.data.contextStatus;
|
|
4592
5353
|
const statusItems = JSON.parse(contextStatusStr);
|
|
@@ -4641,11 +5402,11 @@ var _ContextManager = class _ContextManager {
|
|
|
4641
5402
|
try {
|
|
4642
5403
|
const response = await this.session.getClient().syncContext(request);
|
|
4643
5404
|
const requestId = extractRequestId(response) || "";
|
|
4644
|
-
if (_optionalChain([response, 'optionalAccess',
|
|
5405
|
+
if (_optionalChain([response, 'optionalAccess', _36 => _36.body])) {
|
|
4645
5406
|
log("Response from SyncContext:", response.body);
|
|
4646
5407
|
}
|
|
4647
5408
|
let success = false;
|
|
4648
|
-
if (_optionalChain([response, 'optionalAccess',
|
|
5409
|
+
if (_optionalChain([response, 'optionalAccess', _37 => _37.body, 'optionalAccess', _38 => _38.success]) !== void 0) {
|
|
4649
5410
|
success = response.body.success;
|
|
4650
5411
|
}
|
|
4651
5412
|
return {
|
|
@@ -6227,7 +6988,7 @@ var _BrowserAgent = class _BrowserAgent {
|
|
|
6227
6988
|
throw new BrowserError("Browser must be initialized before calling act.");
|
|
6228
6989
|
}
|
|
6229
6990
|
try {
|
|
6230
|
-
const [pageIndex, contextIndex] = this.
|
|
6991
|
+
const [pageIndex, contextIndex] = await this._getPageAndContextIndexAsync(page);
|
|
6231
6992
|
log(`Acting on page: ${page}, pageIndex: ${pageIndex}, contextIndex: ${contextIndex}`);
|
|
6232
6993
|
const args = {
|
|
6233
6994
|
context_id: contextIndex,
|
|
@@ -6278,7 +7039,7 @@ var _BrowserAgent = class _BrowserAgent {
|
|
|
6278
7039
|
throw new BrowserError("Browser must be initialized before calling observe.");
|
|
6279
7040
|
}
|
|
6280
7041
|
try {
|
|
6281
|
-
const [pageIndex, contextIndex] = this.
|
|
7042
|
+
const [pageIndex, contextIndex] = await this._getPageAndContextIndexAsync(page);
|
|
6282
7043
|
log(`Observing page: ${page}, pageIndex: ${pageIndex}, contextIndex: ${contextIndex}`);
|
|
6283
7044
|
const args = {
|
|
6284
7045
|
context_id: contextIndex,
|
|
@@ -6341,7 +7102,7 @@ var _BrowserAgent = class _BrowserAgent {
|
|
|
6341
7102
|
throw new BrowserError("Browser must be initialized before calling extract.");
|
|
6342
7103
|
}
|
|
6343
7104
|
try {
|
|
6344
|
-
const [pageIndex, contextIndex] = this.
|
|
7105
|
+
const [pageIndex, contextIndex] = await this._getPageAndContextIndexAsync(page);
|
|
6345
7106
|
const tempInstance = new options.schema();
|
|
6346
7107
|
const schema = tempInstance.constructor.name;
|
|
6347
7108
|
const args = {
|
|
@@ -6417,12 +7178,35 @@ var _BrowserAgent = class _BrowserAgent {
|
|
|
6417
7178
|
throw new BrowserError("Page is null");
|
|
6418
7179
|
}
|
|
6419
7180
|
try {
|
|
6420
|
-
|
|
6421
|
-
|
|
6422
|
-
|
|
7181
|
+
if (page.context && typeof page.context === "function") {
|
|
7182
|
+
const context = page.context();
|
|
7183
|
+
if (context && typeof context.newCDPSession === "function") {
|
|
7184
|
+
const cdpSession = await context.newCDPSession(page);
|
|
7185
|
+
const targetInfo = await cdpSession.send("Target.getTargetInfo");
|
|
7186
|
+
const pageIndex2 = targetInfo && targetInfo.targetInfo && targetInfo.targetInfo.targetId ? targetInfo.targetInfo.targetId : "default-page-id";
|
|
7187
|
+
if (typeof cdpSession.detach === "function") {
|
|
7188
|
+
await cdpSession.detach();
|
|
7189
|
+
}
|
|
7190
|
+
let contextIndex2 = 0;
|
|
7191
|
+
if (typeof context.browser === "function") {
|
|
7192
|
+
const browserObj = context.browser();
|
|
7193
|
+
if (browserObj && typeof browserObj.contexts === "function") {
|
|
7194
|
+
const contexts = browserObj.contexts();
|
|
7195
|
+
const idx = contexts.indexOf(context);
|
|
7196
|
+
if (idx >= 0) {
|
|
7197
|
+
contextIndex2 = idx;
|
|
7198
|
+
}
|
|
7199
|
+
}
|
|
7200
|
+
}
|
|
7201
|
+
return [pageIndex2, contextIndex2];
|
|
7202
|
+
}
|
|
7203
|
+
}
|
|
6423
7204
|
} catch (error) {
|
|
6424
|
-
|
|
7205
|
+
log(`CDP targetId retrieval failed, fallback to defaults: ${error}`);
|
|
6425
7206
|
}
|
|
7207
|
+
const pageIndex = "default-page-id";
|
|
7208
|
+
const contextIndex = 0;
|
|
7209
|
+
return [pageIndex, contextIndex];
|
|
6426
7210
|
}
|
|
6427
7211
|
async _callMcpTool(toolName, args) {
|
|
6428
7212
|
return this.session.callMcpTool(toolName, args);
|
|
@@ -6432,6 +7216,164 @@ __name(_BrowserAgent, "BrowserAgent");
|
|
|
6432
7216
|
var BrowserAgent = _BrowserAgent;
|
|
6433
7217
|
|
|
6434
7218
|
// src/browser/browser.ts
|
|
7219
|
+
var _BrowserProxyClass = class _BrowserProxyClass {
|
|
7220
|
+
constructor(proxyType, server, username, password, strategy, pollsize) {
|
|
7221
|
+
this.type = proxyType;
|
|
7222
|
+
this.server = server;
|
|
7223
|
+
this.username = username;
|
|
7224
|
+
this.password = password;
|
|
7225
|
+
this.strategy = strategy;
|
|
7226
|
+
this.pollsize = pollsize;
|
|
7227
|
+
if (proxyType !== "custom" && proxyType !== "wuying") {
|
|
7228
|
+
throw new Error("proxy_type must be custom or wuying");
|
|
7229
|
+
}
|
|
7230
|
+
if (proxyType === "custom" && !server) {
|
|
7231
|
+
throw new Error("server is required for custom proxy type");
|
|
7232
|
+
}
|
|
7233
|
+
if (proxyType === "wuying" && !strategy) {
|
|
7234
|
+
throw new Error("strategy is required for wuying proxy type");
|
|
7235
|
+
}
|
|
7236
|
+
if (proxyType === "wuying" && strategy !== "restricted" && strategy !== "polling") {
|
|
7237
|
+
throw new Error("strategy must be restricted or polling for wuying proxy type");
|
|
7238
|
+
}
|
|
7239
|
+
if (proxyType === "wuying" && strategy === "polling" && pollsize !== void 0 && pollsize <= 0) {
|
|
7240
|
+
throw new Error("pollsize must be greater than 0 for polling strategy");
|
|
7241
|
+
}
|
|
7242
|
+
}
|
|
7243
|
+
toMap() {
|
|
7244
|
+
const proxyMap = {
|
|
7245
|
+
type: this.type
|
|
7246
|
+
};
|
|
7247
|
+
if (this.type === "custom") {
|
|
7248
|
+
proxyMap.server = this.server;
|
|
7249
|
+
if (this.username) {
|
|
7250
|
+
proxyMap.username = this.username;
|
|
7251
|
+
}
|
|
7252
|
+
if (this.password) {
|
|
7253
|
+
proxyMap.password = this.password;
|
|
7254
|
+
}
|
|
7255
|
+
} else if (this.type === "wuying") {
|
|
7256
|
+
proxyMap.strategy = this.strategy;
|
|
7257
|
+
if (this.strategy === "polling") {
|
|
7258
|
+
proxyMap.pollsize = this.pollsize;
|
|
7259
|
+
}
|
|
7260
|
+
}
|
|
7261
|
+
return proxyMap;
|
|
7262
|
+
}
|
|
7263
|
+
static fromMap(m) {
|
|
7264
|
+
if (!m || typeof m !== "object") {
|
|
7265
|
+
return null;
|
|
7266
|
+
}
|
|
7267
|
+
const proxyType = m.type;
|
|
7268
|
+
if (!proxyType) {
|
|
7269
|
+
return null;
|
|
7270
|
+
}
|
|
7271
|
+
if (proxyType === "custom") {
|
|
7272
|
+
return new _BrowserProxyClass(
|
|
7273
|
+
proxyType,
|
|
7274
|
+
m.server,
|
|
7275
|
+
m.username,
|
|
7276
|
+
m.password
|
|
7277
|
+
);
|
|
7278
|
+
} else if (proxyType === "wuying") {
|
|
7279
|
+
return new _BrowserProxyClass(
|
|
7280
|
+
proxyType,
|
|
7281
|
+
void 0,
|
|
7282
|
+
void 0,
|
|
7283
|
+
void 0,
|
|
7284
|
+
m.strategy,
|
|
7285
|
+
m.pollsize || 10
|
|
7286
|
+
);
|
|
7287
|
+
} else {
|
|
7288
|
+
throw new Error(`Unsupported proxy type: ${proxyType}`);
|
|
7289
|
+
}
|
|
7290
|
+
}
|
|
7291
|
+
};
|
|
7292
|
+
__name(_BrowserProxyClass, "BrowserProxyClass");
|
|
7293
|
+
var BrowserProxyClass = _BrowserProxyClass;
|
|
7294
|
+
var _BrowserOptionClass = class _BrowserOptionClass {
|
|
7295
|
+
constructor(useStealth = false, userAgent, viewport, screen, fingerprint, proxies) {
|
|
7296
|
+
this.useStealth = useStealth;
|
|
7297
|
+
this.userAgent = userAgent;
|
|
7298
|
+
this.viewport = viewport;
|
|
7299
|
+
this.screen = screen;
|
|
7300
|
+
this.fingerprint = fingerprint;
|
|
7301
|
+
this.proxies = proxies;
|
|
7302
|
+
if (proxies !== void 0) {
|
|
7303
|
+
if (!Array.isArray(proxies)) {
|
|
7304
|
+
throw new Error("proxies must be a list");
|
|
7305
|
+
}
|
|
7306
|
+
if (proxies.length > 1) {
|
|
7307
|
+
throw new Error("proxies list length must be limited to 1");
|
|
7308
|
+
}
|
|
7309
|
+
}
|
|
7310
|
+
}
|
|
7311
|
+
toMap() {
|
|
7312
|
+
const optionMap = {};
|
|
7313
|
+
if (this.useStealth !== void 0) {
|
|
7314
|
+
optionMap["useStealth"] = this.useStealth;
|
|
7315
|
+
}
|
|
7316
|
+
if (this.userAgent !== void 0) {
|
|
7317
|
+
optionMap["userAgent"] = this.userAgent;
|
|
7318
|
+
}
|
|
7319
|
+
if (this.viewport !== void 0) {
|
|
7320
|
+
optionMap["viewport"] = { width: this.viewport.width, height: this.viewport.height };
|
|
7321
|
+
}
|
|
7322
|
+
if (this.screen !== void 0) {
|
|
7323
|
+
optionMap["screen"] = { width: this.screen.width, height: this.screen.height };
|
|
7324
|
+
}
|
|
7325
|
+
if (this.fingerprint !== void 0) {
|
|
7326
|
+
const fp = {};
|
|
7327
|
+
if (this.fingerprint.devices) fp["devices"] = this.fingerprint.devices;
|
|
7328
|
+
if (this.fingerprint.operatingSystems) fp["operatingSystems"] = this.fingerprint.operatingSystems;
|
|
7329
|
+
if (this.fingerprint.locales) fp["locales"] = this.fingerprint.locales;
|
|
7330
|
+
optionMap["fingerprint"] = fp;
|
|
7331
|
+
}
|
|
7332
|
+
if (this.proxies !== void 0) {
|
|
7333
|
+
optionMap["proxies"] = this.proxies.map((proxy) => proxy.toMap());
|
|
7334
|
+
}
|
|
7335
|
+
return optionMap;
|
|
7336
|
+
}
|
|
7337
|
+
fromMap(m) {
|
|
7338
|
+
const map = m || {};
|
|
7339
|
+
if (map.useStealth !== void 0) {
|
|
7340
|
+
this.useStealth = map.useStealth;
|
|
7341
|
+
} else {
|
|
7342
|
+
this.useStealth = false;
|
|
7343
|
+
}
|
|
7344
|
+
if (map.userAgent !== void 0) {
|
|
7345
|
+
this.userAgent = map.userAgent;
|
|
7346
|
+
}
|
|
7347
|
+
if (map.viewport !== void 0) {
|
|
7348
|
+
this.viewport = { width: map.viewport.width, height: map.viewport.height };
|
|
7349
|
+
}
|
|
7350
|
+
if (map.screen !== void 0) {
|
|
7351
|
+
this.screen = { width: map.screen.width, height: map.screen.height };
|
|
7352
|
+
}
|
|
7353
|
+
if (map.fingerprint !== void 0) {
|
|
7354
|
+
const fp = {};
|
|
7355
|
+
if (map.fingerprint.devices) fp.devices = map.fingerprint.devices;
|
|
7356
|
+
if (map.fingerprint.operatingSystems) fp.operatingSystems = map.fingerprint.operatingSystems;
|
|
7357
|
+
if (map.fingerprint.locales) fp.locales = map.fingerprint.locales;
|
|
7358
|
+
this.fingerprint = fp;
|
|
7359
|
+
}
|
|
7360
|
+
if (map.proxies !== void 0) {
|
|
7361
|
+
const proxyList = map.proxies;
|
|
7362
|
+
if (proxyList.length > 1) {
|
|
7363
|
+
throw new Error("proxies list length must be limited to 1");
|
|
7364
|
+
}
|
|
7365
|
+
this.proxies = proxyList.map((proxyData) => {
|
|
7366
|
+
if (proxyData instanceof BrowserProxyClass) {
|
|
7367
|
+
return proxyData;
|
|
7368
|
+
}
|
|
7369
|
+
return BrowserProxyClass.fromMap(proxyData);
|
|
7370
|
+
}).filter(Boolean);
|
|
7371
|
+
}
|
|
7372
|
+
return this;
|
|
7373
|
+
}
|
|
7374
|
+
};
|
|
7375
|
+
__name(_BrowserOptionClass, "BrowserOptionClass");
|
|
7376
|
+
var BrowserOptionClass = _BrowserOptionClass;
|
|
6435
7377
|
var _Browser = class _Browser {
|
|
6436
7378
|
constructor(session) {
|
|
6437
7379
|
this._endpointUrl = null;
|
|
@@ -6453,12 +7395,23 @@ var _Browser = class _Browser {
|
|
|
6453
7395
|
request.authorization = `Bearer ${this.session.getAPIKey()}`;
|
|
6454
7396
|
request.persistentPath = BROWSER_DATA_PATH;
|
|
6455
7397
|
request.sessionId = this.session.getSessionId();
|
|
7398
|
+
let browserOption;
|
|
7399
|
+
if (option instanceof BrowserOptionClass) {
|
|
7400
|
+
browserOption = option;
|
|
7401
|
+
} else {
|
|
7402
|
+
browserOption = new BrowserOptionClass();
|
|
7403
|
+
browserOption.fromMap(option);
|
|
7404
|
+
}
|
|
7405
|
+
const browserOptionMap = browserOption.toMap();
|
|
7406
|
+
if (Object.keys(browserOptionMap).length > 0) {
|
|
7407
|
+
request.browserOption = browserOptionMap;
|
|
7408
|
+
}
|
|
6456
7409
|
const response = this.session.getClient().initBrowserSync(request);
|
|
6457
|
-
log(`Response from init_browser data:`, _optionalChain([response, 'access',
|
|
6458
|
-
const success = _optionalChain([response, 'access',
|
|
7410
|
+
log(`Response from init_browser data:`, _optionalChain([response, 'access', _39 => _39.body, 'optionalAccess', _40 => _40.data]));
|
|
7411
|
+
const success = _optionalChain([response, 'access', _41 => _41.body, 'optionalAccess', _42 => _42.data, 'optionalAccess', _43 => _43.port]) !== null && _optionalChain([response, 'access', _44 => _44.body, 'optionalAccess', _45 => _45.data, 'optionalAccess', _46 => _46.port]) !== void 0;
|
|
6459
7412
|
if (success) {
|
|
6460
7413
|
this._initialized = true;
|
|
6461
|
-
this._option =
|
|
7414
|
+
this._option = browserOption;
|
|
6462
7415
|
log("Browser instance was successfully initialized.");
|
|
6463
7416
|
}
|
|
6464
7417
|
return success;
|
|
@@ -6483,12 +7436,23 @@ var _Browser = class _Browser {
|
|
|
6483
7436
|
request.authorization = `Bearer ${this.session.getAPIKey()}`;
|
|
6484
7437
|
request.persistentPath = BROWSER_DATA_PATH;
|
|
6485
7438
|
request.sessionId = this.session.getSessionId();
|
|
7439
|
+
let browserOption;
|
|
7440
|
+
if (option instanceof BrowserOptionClass) {
|
|
7441
|
+
browserOption = option;
|
|
7442
|
+
} else {
|
|
7443
|
+
browserOption = new BrowserOptionClass();
|
|
7444
|
+
browserOption.fromMap(option);
|
|
7445
|
+
}
|
|
7446
|
+
const browserOptionMap = browserOption.toMap();
|
|
7447
|
+
if (Object.keys(browserOptionMap).length > 0) {
|
|
7448
|
+
request.browserOption = browserOptionMap;
|
|
7449
|
+
}
|
|
6486
7450
|
const response = await this.session.getClient().initBrowser(request);
|
|
6487
|
-
log(`Response from init_browser data:`, _optionalChain([response, 'access',
|
|
6488
|
-
const success = _optionalChain([response, 'access',
|
|
7451
|
+
log(`Response from init_browser data:`, _optionalChain([response, 'access', _47 => _47.body, 'optionalAccess', _48 => _48.data]));
|
|
7452
|
+
const success = _optionalChain([response, 'access', _49 => _49.body, 'optionalAccess', _50 => _50.data, 'optionalAccess', _51 => _51.port]) !== null && _optionalChain([response, 'access', _52 => _52.body, 'optionalAccess', _53 => _53.data, 'optionalAccess', _54 => _54.port]) !== void 0;
|
|
6489
7453
|
if (success) {
|
|
6490
7454
|
this._initialized = true;
|
|
6491
|
-
this._option =
|
|
7455
|
+
this._option = browserOption;
|
|
6492
7456
|
log("Browser instance successfully initialized");
|
|
6493
7457
|
}
|
|
6494
7458
|
return success;
|
|
@@ -6528,6 +7492,16 @@ var _Browser = class _Browser {
|
|
|
6528
7492
|
isInitialized() {
|
|
6529
7493
|
return this._initialized;
|
|
6530
7494
|
}
|
|
7495
|
+
/**
|
|
7496
|
+
* Stop the browser instance, internal use only.
|
|
7497
|
+
*/
|
|
7498
|
+
_stopBrowser() {
|
|
7499
|
+
if (this.isInitialized()) {
|
|
7500
|
+
this.session.callMcpTool("stopChrome", {});
|
|
7501
|
+
} else {
|
|
7502
|
+
throw new BrowserError("Browser is not initialized. Cannot stop browser.");
|
|
7503
|
+
}
|
|
7504
|
+
}
|
|
6531
7505
|
};
|
|
6532
7506
|
__name(_Browser, "Browser");
|
|
6533
7507
|
var Browser = _Browser;
|
|
@@ -6692,7 +7666,7 @@ var _Session = class _Session {
|
|
|
6692
7666
|
log(`Response from release_mcp_session: ${JSON.stringify(response)}`);
|
|
6693
7667
|
const requestId = extractRequestId(response) || "";
|
|
6694
7668
|
const responseBody = response.body;
|
|
6695
|
-
const success = _optionalChain([responseBody, 'optionalAccess',
|
|
7669
|
+
const success = _optionalChain([responseBody, 'optionalAccess', _55 => _55.success]) !== false;
|
|
6696
7670
|
if (!success) {
|
|
6697
7671
|
return {
|
|
6698
7672
|
requestId,
|
|
@@ -6812,9 +7786,9 @@ var _Session = class _Session {
|
|
|
6812
7786
|
});
|
|
6813
7787
|
const response = await this.getClient().getLabel(request);
|
|
6814
7788
|
const requestId = extractRequestId(response) || "";
|
|
6815
|
-
const responseBody = _optionalChain([response, 'optionalAccess',
|
|
6816
|
-
const data = _optionalChain([responseBody, 'optionalAccess',
|
|
6817
|
-
const labelsJSON = _optionalChain([data, 'optionalAccess',
|
|
7789
|
+
const responseBody = _optionalChain([response, 'optionalAccess', _56 => _56.body]);
|
|
7790
|
+
const data = _optionalChain([responseBody, 'optionalAccess', _57 => _57.data]);
|
|
7791
|
+
const labelsJSON = _optionalChain([data, 'optionalAccess', _58 => _58.labels]);
|
|
6818
7792
|
let labels = {};
|
|
6819
7793
|
if (labelsJSON) {
|
|
6820
7794
|
labels = JSON.parse(labelsJSON);
|
|
@@ -6849,16 +7823,16 @@ var _Session = class _Session {
|
|
|
6849
7823
|
log(`Response from GetMcpResource: ${JSON.stringify(response)}`);
|
|
6850
7824
|
const requestId = extractRequestId(response) || "";
|
|
6851
7825
|
const responseBody = response.body;
|
|
6852
|
-
const data = _optionalChain([responseBody, 'optionalAccess',
|
|
7826
|
+
const data = _optionalChain([responseBody, 'optionalAccess', _59 => _59.data]);
|
|
6853
7827
|
const sessionInfo = new SessionInfoClass();
|
|
6854
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
7828
|
+
if (_optionalChain([data, 'optionalAccess', _60 => _60.sessionId])) {
|
|
6855
7829
|
sessionInfo.sessionId = data.sessionId;
|
|
6856
7830
|
}
|
|
6857
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
7831
|
+
if (_optionalChain([data, 'optionalAccess', _61 => _61.resourceUrl])) {
|
|
6858
7832
|
sessionInfo.resourceUrl = data.resourceUrl;
|
|
6859
7833
|
this.resourceUrl = data.resourceUrl;
|
|
6860
7834
|
}
|
|
6861
|
-
if (_optionalChain([data, 'optionalAccess',
|
|
7835
|
+
if (_optionalChain([data, 'optionalAccess', _62 => _62.desktopInfo])) {
|
|
6862
7836
|
const desktopInfo = data.desktopInfo;
|
|
6863
7837
|
if (desktopInfo.appId) {
|
|
6864
7838
|
sessionInfo.appId = desktopInfo.appId;
|
|
@@ -6955,13 +7929,13 @@ var _Session = class _Session {
|
|
|
6955
7929
|
});
|
|
6956
7930
|
const response = await this.agentBay.getClient().getLink(request);
|
|
6957
7931
|
const requestId = extractRequestId(response) || "";
|
|
6958
|
-
const responseBody = _optionalChain([response, 'optionalAccess',
|
|
7932
|
+
const responseBody = _optionalChain([response, 'optionalAccess', _63 => _63.body]);
|
|
6959
7933
|
if (typeof responseBody !== "object") {
|
|
6960
7934
|
throw new Error(
|
|
6961
7935
|
"Invalid response format: expected a dictionary from response body"
|
|
6962
7936
|
);
|
|
6963
7937
|
}
|
|
6964
|
-
let data = _optionalChain([responseBody, 'optionalAccess',
|
|
7938
|
+
let data = _optionalChain([responseBody, 'optionalAccess', _64 => _64.data]) || {};
|
|
6965
7939
|
log(`Data: ${JSON.stringify(data)}`);
|
|
6966
7940
|
if (typeof data !== "object") {
|
|
6967
7941
|
try {
|
|
@@ -7113,7 +8087,7 @@ var _Session = class _Session {
|
|
|
7113
8087
|
args: argsJSON
|
|
7114
8088
|
});
|
|
7115
8089
|
const response = await this.getClient().callMcpTool(callToolRequest);
|
|
7116
|
-
if (!_optionalChain([response, 'access',
|
|
8090
|
+
if (!_optionalChain([response, 'access', _65 => _65.body, 'optionalAccess', _66 => _66.data])) {
|
|
7117
8091
|
return {
|
|
7118
8092
|
success: false,
|
|
7119
8093
|
data: "",
|
|
@@ -7202,15 +8176,15 @@ var _AgentBay = class _AgentBay {
|
|
|
7202
8176
|
const request = new CreateMcpSessionRequest({
|
|
7203
8177
|
authorization: "Bearer " + this.apiKey
|
|
7204
8178
|
});
|
|
7205
|
-
if (params.contextId) {
|
|
7206
|
-
request.contextId = params.contextId;
|
|
7207
|
-
}
|
|
7208
8179
|
if (params.labels) {
|
|
7209
8180
|
request.labels = JSON.stringify(params.labels);
|
|
7210
8181
|
}
|
|
7211
8182
|
if (params.imageId) {
|
|
7212
8183
|
request.imageId = params.imageId;
|
|
7213
8184
|
}
|
|
8185
|
+
if (params.mcpPolicyId) {
|
|
8186
|
+
request.mcpPolicyId = params.mcpPolicyId;
|
|
8187
|
+
}
|
|
7214
8188
|
request.vpcResource = params.isVpc || false;
|
|
7215
8189
|
let hasPersistenceData = false;
|
|
7216
8190
|
if (params.contextSync && params.contextSync.length > 0) {
|
|
@@ -7249,9 +8223,6 @@ var _AgentBay = class _AgentBay {
|
|
|
7249
8223
|
}
|
|
7250
8224
|
log("API Call: CreateMcpSession");
|
|
7251
8225
|
let requestLog = "Request: ";
|
|
7252
|
-
if (request.contextId) {
|
|
7253
|
-
requestLog += `ContextId=${request.contextId}, `;
|
|
7254
|
-
}
|
|
7255
8226
|
if (request.imageId) {
|
|
7256
8227
|
requestLog += `ImageId=${request.imageId}, `;
|
|
7257
8228
|
}
|
|
@@ -7270,8 +8241,11 @@ var _AgentBay = class _AgentBay {
|
|
|
7270
8241
|
}
|
|
7271
8242
|
log(requestLog);
|
|
7272
8243
|
const response = await this.client.createMcpSession(request);
|
|
7273
|
-
log("response data =", _optionalChain([response, 'access', _58 => _58.body, 'optionalAccess', _59 => _59.data]));
|
|
7274
8244
|
const requestId = extractRequestId(response) || "";
|
|
8245
|
+
log("response data =", _optionalChain([response, 'access', _67 => _67.body, 'optionalAccess', _68 => _68.data]));
|
|
8246
|
+
if (requestId) {
|
|
8247
|
+
log(`requestId = ${requestId}`);
|
|
8248
|
+
}
|
|
7275
8249
|
const sessionData = response.body;
|
|
7276
8250
|
if (!sessionData || typeof sessionData !== "object") {
|
|
7277
8251
|
return {
|
|
@@ -7409,8 +8383,8 @@ var _AgentBay = class _AgentBay {
|
|
|
7409
8383
|
);
|
|
7410
8384
|
const response = await this.client.listSession(listSessionRequest);
|
|
7411
8385
|
const body = response.body;
|
|
7412
|
-
const requestId = extractRequestId(_optionalChain([body, 'optionalAccess',
|
|
7413
|
-
if (_optionalChain([body, 'optionalAccess',
|
|
8386
|
+
const requestId = extractRequestId(_optionalChain([body, 'optionalAccess', _69 => _69.requestId])) || "";
|
|
8387
|
+
if (_optionalChain([body, 'optionalAccess', _70 => _70.data]) && typeof body.data === "object" && body.success && body.success !== true) {
|
|
7414
8388
|
return {
|
|
7415
8389
|
requestId,
|
|
7416
8390
|
success: false,
|
|
@@ -7431,7 +8405,7 @@ var _AgentBay = class _AgentBay {
|
|
|
7431
8405
|
maxResults = parseInt(String(body.maxResults || 0)) || maxResults;
|
|
7432
8406
|
totalCount = parseInt(String(body.totalCount || 0));
|
|
7433
8407
|
}
|
|
7434
|
-
const responseData = _optionalChain([body, 'optionalAccess',
|
|
8408
|
+
const responseData = _optionalChain([body, 'optionalAccess', _71 => _71.data]);
|
|
7435
8409
|
if (Array.isArray(responseData)) {
|
|
7436
8410
|
for (const sessionData of responseData) {
|
|
7437
8411
|
if (sessionData && typeof sessionData === "object") {
|
|
@@ -7636,13 +8610,6 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
7636
8610
|
this.labels = labels;
|
|
7637
8611
|
return this;
|
|
7638
8612
|
}
|
|
7639
|
-
/**
|
|
7640
|
-
* WithContextID sets the context ID for the session parameters and returns the updated parameters.
|
|
7641
|
-
*/
|
|
7642
|
-
withContextID(contextId) {
|
|
7643
|
-
this.contextId = contextId;
|
|
7644
|
-
return this;
|
|
7645
|
-
}
|
|
7646
8613
|
/**
|
|
7647
8614
|
* WithImageId sets the image ID for the session parameters and returns the updated parameters.
|
|
7648
8615
|
*/
|
|
@@ -7664,6 +8631,13 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
7664
8631
|
this.isVpc = isVpc;
|
|
7665
8632
|
return this;
|
|
7666
8633
|
}
|
|
8634
|
+
/**
|
|
8635
|
+
* WithMcpPolicyId sets the MCP policy id for the session parameters and returns the updated parameters.
|
|
8636
|
+
*/
|
|
8637
|
+
withMcpPolicyId(mcpPolicyId) {
|
|
8638
|
+
this.mcpPolicyId = mcpPolicyId;
|
|
8639
|
+
return this;
|
|
8640
|
+
}
|
|
7667
8641
|
/**
|
|
7668
8642
|
* GetLabelsJSON returns the labels as a JSON string.
|
|
7669
8643
|
* Returns an object with success status and result/error message to match Go version behavior.
|
|
@@ -7710,11 +8684,11 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
7710
8684
|
toJSON() {
|
|
7711
8685
|
return {
|
|
7712
8686
|
labels: this.labels,
|
|
7713
|
-
contextId: this.contextId,
|
|
7714
8687
|
imageId: this.imageId,
|
|
7715
8688
|
contextSync: this.contextSync,
|
|
7716
8689
|
browserContext: this.browserContext,
|
|
7717
|
-
isVpc: this.isVpc
|
|
8690
|
+
isVpc: this.isVpc,
|
|
8691
|
+
mcpPolicyId: this.mcpPolicyId
|
|
7718
8692
|
};
|
|
7719
8693
|
}
|
|
7720
8694
|
/**
|
|
@@ -7723,11 +8697,11 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
7723
8697
|
static fromJSON(config) {
|
|
7724
8698
|
const params = new _CreateSessionParams();
|
|
7725
8699
|
params.labels = config.labels || {};
|
|
7726
|
-
params.contextId = config.contextId;
|
|
7727
8700
|
params.imageId = config.imageId;
|
|
7728
8701
|
params.contextSync = config.contextSync || [];
|
|
7729
8702
|
params.browserContext = config.browserContext;
|
|
7730
8703
|
params.isVpc = config.isVpc || false;
|
|
8704
|
+
params.mcpPolicyId = config.mcpPolicyId;
|
|
7731
8705
|
return params;
|
|
7732
8706
|
}
|
|
7733
8707
|
};
|
|
@@ -7844,5 +8818,17 @@ __name(newCreateSessionParams, "newCreateSessionParams");
|
|
|
7844
8818
|
|
|
7845
8819
|
|
|
7846
8820
|
|
|
7847
|
-
|
|
8821
|
+
|
|
8822
|
+
|
|
8823
|
+
|
|
8824
|
+
|
|
8825
|
+
|
|
8826
|
+
|
|
8827
|
+
|
|
8828
|
+
|
|
8829
|
+
|
|
8830
|
+
|
|
8831
|
+
|
|
8832
|
+
|
|
8833
|
+
exports.APIError = APIError; exports.Agent = Agent; exports.AgentBay = AgentBay; exports.AgentBayError = AgentBayError; exports.Application = Application; exports.ApplicationError = ApplicationError; exports.ApplyMqttTokenRequest = ApplyMqttTokenRequest; exports.ApplyMqttTokenResponse = ApplyMqttTokenResponse; exports.ApplyMqttTokenResponseBody = ApplyMqttTokenResponseBody; exports.ApplyMqttTokenResponseBodyData = ApplyMqttTokenResponseBodyData; exports.AuthenticationError = AuthenticationError; exports.Browser = Browser; exports.BrowserAgent = BrowserAgent; exports.BrowserError = BrowserError; exports.BrowserOptionClass = BrowserOptionClass; exports.BrowserProxyClass = BrowserProxyClass; exports.CallMcpToolRequest = CallMcpToolRequest; exports.CallMcpToolResponse = CallMcpToolResponse; exports.CallMcpToolResponseBody = CallMcpToolResponseBody; exports.Client = Client; exports.Command = Command; exports.CommandError = CommandError; exports.Context = Context; exports.ContextManager = ContextManager; exports.ContextService = ContextService; exports.ContextSync = ContextSync; exports.CreateMcpSessionRequest = CreateMcpSessionRequest; exports.CreateMcpSessionRequestPersistenceDataList = CreateMcpSessionRequestPersistenceDataList; exports.CreateMcpSessionResponse = CreateMcpSessionResponse; exports.CreateMcpSessionResponseBody = CreateMcpSessionResponseBody; exports.CreateMcpSessionResponseBodyData = CreateMcpSessionResponseBodyData; exports.CreateMcpSessionShrinkRequest = CreateMcpSessionShrinkRequest; exports.CreateSessionParams = CreateSessionParams; exports.DeleteContextFileRequest = DeleteContextFileRequest; exports.DeleteContextFileResponse = DeleteContextFileResponse; exports.DeleteContextFileResponseBody = DeleteContextFileResponseBody; exports.DeleteContextRequest = DeleteContextRequest; exports.DeleteContextResponse = DeleteContextResponse; exports.DeleteContextResponseBody = DeleteContextResponseBody; exports.DescribeContextFilesRequest = DescribeContextFilesRequest; exports.DescribeContextFilesResponse = DescribeContextFilesResponse; exports.DescribeContextFilesResponseBody = DescribeContextFilesResponseBody; exports.DownloadStrategy = DownloadStrategy; exports.FileError = FileError; exports.FileSystem = FileSystem; exports.GetContextFileDownloadUrlRequest = GetContextFileDownloadUrlRequest; exports.GetContextFileDownloadUrlResponse = GetContextFileDownloadUrlResponse; exports.GetContextFileDownloadUrlResponseBody = GetContextFileDownloadUrlResponseBody; exports.GetContextFileUploadUrlRequest = GetContextFileUploadUrlRequest; exports.GetContextFileUploadUrlResponse = GetContextFileUploadUrlResponse; exports.GetContextFileUploadUrlResponseBody = GetContextFileUploadUrlResponseBody; exports.GetContextInfoRequest = GetContextInfoRequest; exports.GetContextInfoResponse = GetContextInfoResponse; exports.GetContextInfoResponseBody = GetContextInfoResponseBody; exports.GetContextInfoResponseBodyData = GetContextInfoResponseBodyData; exports.GetContextRequest = GetContextRequest; exports.GetContextResponse = GetContextResponse; exports.GetContextResponseBody = GetContextResponseBody; exports.GetContextResponseBodyData = GetContextResponseBodyData; exports.GetLabelRequest = GetLabelRequest; exports.GetLabelResponse = GetLabelResponse; exports.GetLabelResponseBody = GetLabelResponseBody; exports.GetLabelResponseBodyData = GetLabelResponseBodyData; exports.GetLinkRequest = GetLinkRequest; exports.GetLinkResponse = GetLinkResponse; exports.GetLinkResponseBody = GetLinkResponseBody; exports.GetLinkResponseBodyData = GetLinkResponseBodyData; exports.GetMcpResourceRequest = GetMcpResourceRequest; exports.GetMcpResourceResponse = GetMcpResourceResponse; exports.GetMcpResourceResponseBody = GetMcpResourceResponseBody; exports.GetMcpResourceResponseBodyData = GetMcpResourceResponseBodyData; exports.GetMcpResourceResponseBodyDataDesktopInfo = GetMcpResourceResponseBodyDataDesktopInfo; exports.InitBrowserRequest = InitBrowserRequest; exports.InitBrowserResponse = InitBrowserResponse; exports.InitBrowserResponseBody = InitBrowserResponseBody; exports.InitBrowserResponseBodyData = InitBrowserResponseBodyData; exports.KeyCode = KeyCode; exports.ListContextsRequest = ListContextsRequest; exports.ListContextsResponse = ListContextsResponse; exports.ListContextsResponseBody = ListContextsResponseBody; exports.ListContextsResponseBodyData = ListContextsResponseBodyData; exports.ListMcpToolsRequest = ListMcpToolsRequest; exports.ListMcpToolsResponse = ListMcpToolsResponse; exports.ListMcpToolsResponseBody = ListMcpToolsResponseBody; exports.ListSessionRequest = ListSessionRequest; exports.ListSessionResponse = ListSessionResponse; exports.ListSessionResponseBody = ListSessionResponseBody; exports.ListSessionResponseBodyData = ListSessionResponseBodyData; exports.ModifyContextRequest = ModifyContextRequest; exports.ModifyContextResponse = ModifyContextResponse; exports.ModifyContextResponseBody = ModifyContextResponseBody; exports.Oss = Oss; exports.OssError = OssError; exports.ReleaseMcpSessionRequest = ReleaseMcpSessionRequest; exports.ReleaseMcpSessionResponse = ReleaseMcpSessionResponse; exports.ReleaseMcpSessionResponseBody = ReleaseMcpSessionResponseBody; exports.Session = Session; exports.SessionError = SessionError; exports.SetLabelRequest = SetLabelRequest; exports.SetLabelResponse = SetLabelResponse; exports.SetLabelResponseBody = SetLabelResponseBody; exports.SyncContextRequest = SyncContextRequest; exports.SyncContextResponse = SyncContextResponse; exports.SyncContextResponseBody = SyncContextResponseBody; exports.SyncPolicyImpl = SyncPolicyImpl; exports.UI = UI; exports.UIError = UIError; exports.UploadStrategy = UploadStrategy; exports.log = log; exports.logError = logError; exports.newContextManager = newContextManager; exports.newContextSync = newContextSync; exports.newCreateSessionParams = newCreateSessionParams; exports.newDeletePolicy = newDeletePolicy; exports.newDownloadPolicy = newDownloadPolicy; exports.newSyncPolicy = newSyncPolicy; exports.newSyncPolicyWithDefaults = newSyncPolicyWithDefaults; exports.newUploadPolicy = newUploadPolicy;
|
|
7848
8834
|
//# sourceMappingURL=index.cjs.map
|