test-wuying-agentbay-sdk 0.13.1-beta.20251223163333 → 0.13.1-beta.20251223203147

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -80,6 +80,37 @@ interface GetSessionData {
80
80
  /** List of contexts associated with the session */
81
81
  contexts?: ContextInfo[];
82
82
  }
83
+ /**
84
+ * Interface for GetSessionDetail data
85
+ */
86
+ interface GetSessionDetailData {
87
+ aliuid: string;
88
+ apikeyId: string;
89
+ appInstanceGroupId: string;
90
+ appInstanceId: string;
91
+ appUserId: string;
92
+ bizType: number;
93
+ endReason: string;
94
+ id: number;
95
+ imageId: string;
96
+ imageType: string;
97
+ isDeleted: number;
98
+ policyId: string;
99
+ regionId: string;
100
+ resourceConfigId: string;
101
+ status: string;
102
+ }
103
+ /**
104
+ * Interface for GetSessionDetail operation responses
105
+ */
106
+ interface GetSessionDetailResult extends ApiResponse {
107
+ requestId: string;
108
+ httpStatusCode: number;
109
+ code: string;
110
+ success: boolean;
111
+ data?: GetSessionDetailData;
112
+ errorMessage?: string;
113
+ }
83
114
  /**
84
115
  * Interface for GetSession operation responses
85
116
  */
@@ -706,6 +737,34 @@ declare class GetSessionResponseBodyData extends $dara.Model {
706
737
  });
707
738
  }
708
739
 
740
+ declare class GetSessionDetailResponseBodyData extends $dara.Model {
741
+ aliuid?: string;
742
+ apikeyId?: string;
743
+ appInstanceGroupId?: string;
744
+ appInstanceId?: string;
745
+ appUserId?: string;
746
+ bizType?: number;
747
+ endReason?: string;
748
+ id?: number;
749
+ imageId?: string;
750
+ imageType?: string;
751
+ isDeleted?: number;
752
+ policyId?: string;
753
+ regionId?: string;
754
+ resourceConfigId?: string;
755
+ status?: string;
756
+ static names(): {
757
+ [key: string]: string;
758
+ };
759
+ static types(): {
760
+ [key: string]: any;
761
+ };
762
+ validate(): void;
763
+ constructor(map?: {
764
+ [key: string]: any;
765
+ });
766
+ }
767
+
709
768
  declare class GetLinkResponseBodyData extends $dara.Model {
710
769
  url?: string;
711
770
  static names(): {
@@ -1377,6 +1436,58 @@ declare class GetSessionResponse extends $dara.Model {
1377
1436
  });
1378
1437
  }
1379
1438
 
1439
+ declare class GetSessionDetailRequest extends $dara.Model {
1440
+ authorization?: string;
1441
+ sessionId?: string;
1442
+ static names(): {
1443
+ [key: string]: string;
1444
+ };
1445
+ static types(): {
1446
+ [key: string]: any;
1447
+ };
1448
+ validate(): void;
1449
+ constructor(map?: {
1450
+ [key: string]: any;
1451
+ });
1452
+ }
1453
+
1454
+ declare class GetSessionDetailResponseBody extends $dara.Model {
1455
+ code?: string;
1456
+ data?: GetSessionDetailResponseBodyData;
1457
+ httpStatusCode?: number;
1458
+ message?: string;
1459
+ requestId?: string;
1460
+ success?: boolean;
1461
+ static names(): {
1462
+ [key: string]: string;
1463
+ };
1464
+ static types(): {
1465
+ [key: string]: any;
1466
+ };
1467
+ validate(): void;
1468
+ constructor(map?: {
1469
+ [key: string]: any;
1470
+ });
1471
+ }
1472
+
1473
+ declare class GetSessionDetailResponse extends $dara.Model {
1474
+ headers?: {
1475
+ [key: string]: string;
1476
+ };
1477
+ statusCode?: number;
1478
+ body?: GetSessionDetailResponseBody;
1479
+ static names(): {
1480
+ [key: string]: string;
1481
+ };
1482
+ static types(): {
1483
+ [key: string]: any;
1484
+ };
1485
+ validate(): void;
1486
+ constructor(map?: {
1487
+ [key: string]: any;
1488
+ });
1489
+ }
1490
+
1380
1491
  declare class GetLinkRequest extends $dara.Model {
1381
1492
  authorization?: string;
1382
1493
  port?: number;
@@ -2640,6 +2751,21 @@ declare class Client extends OpenApi {
2640
2751
  * @returns GetSessionResponse
2641
2752
  */
2642
2753
  getSession(request: GetSessionRequest): Promise<GetSessionResponse>;
2754
+ /**
2755
+ * Get basic session information by session ID
2756
+ *
2757
+ * @param request - GetSessionDetailRequest
2758
+ * @param runtime - runtime options for this request RuntimeOptions
2759
+ * @returns GetSessionDetailResponse
2760
+ */
2761
+ getSessionDetailWithOptions(request: GetSessionDetailRequest, runtime: $dara.RuntimeOptions): Promise<GetSessionDetailResponse>;
2762
+ /**
2763
+ * Get basic session information by session ID
2764
+ *
2765
+ * @param request - GetSessionDetailRequest
2766
+ * @returns GetSessionDetailResponse
2767
+ */
2768
+ getSessionDetail(request: GetSessionDetailRequest): Promise<GetSessionDetailResponse>;
2643
2769
  /**
2644
2770
  * Pause session async
2645
2771
  *
@@ -7171,6 +7297,13 @@ declare class AgentBay {
7171
7297
  * @returns GetSessionResult containing session information
7172
7298
  */
7173
7299
  getSession(sessionId: string): Promise<GetSessionResult>;
7300
+ /**
7301
+ * Get basic session information by session ID.
7302
+ *
7303
+ * @param sessionId - The ID of the session to retrieve.
7304
+ * @returns GetSessionDetailResult containing basic session information
7305
+ */
7306
+ getSessionDetail(sessionId: string): Promise<GetSessionDetailResult>;
7174
7307
  /**
7175
7308
  * Get a session by its ID.
7176
7309
  *
@@ -7595,4 +7728,4 @@ declare function logWarn(message: string, ...args: any[]): void;
7595
7728
  */
7596
7729
  declare function logError(message: string, error?: any): void;
7597
7730
 
7598
- export { APIError, APP_BLACKLIST_TEMPLATE, APP_WHITELIST_TEMPLATE, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, type AgentOptions, type ApiResponse, type ApiResponseWithData, type AppManagerRule, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, type Brand, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, BrowserFingerprintContext, BrowserFingerprintGenerator, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, BrowserUseAgent, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, ClearContextRequest, ClearContextResponse, ClearContextResponseBody, Client, Code, Command, Computer, ComputerUseAgent, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DeleteResult, DeleteSessionAsyncRequest, DeleteSessionAsyncResponse, DeleteSessionAsyncResponseBody, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtraConfigs, type ExtraProperties, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, type Fingerprint, FingerprintFormat, GetAdbLinkRequest, GetAdbLinkResponse, GetAdbLinkResponseBody, GetAdbLinkResponseBodyData, GetAndLoadInternalContextRequest, GetAndLoadInternalContextResponse, GetAndLoadInternalContextResponseBody, GetAndLoadInternalContextResponseBodyData, GetCdpLinkRequest, GetCdpLinkResponse, GetCdpLinkResponseBody, GetCdpLinkResponseBodyData, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, GetSessionRequest, GetSessionResponse, GetSessionResponseBody, GetSessionResponseBodyData, HIDE_NAVIGATION_BAR_TEMPLATE, IS_RELEASE, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InitializationResult, Lifecycle, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type LogLevel, type LoggerConfig, MOBILE_COMMAND_TEMPLATES, type MappingPolicy, type McpSession, type McpToolResult, Mobile, type MobileExtraConfig, type MobileSimulateConfig, MobileSimulateMode, MobileSimulateService, type MobileSimulateUploadResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type NavigatorFingerprint, type ObserveOptions, ObserveResult, Oss, OssError, PauseSessionAsyncRequest, PauseSessionAsyncResponse, PauseSessionAsyncResponseBody, type QueryResult, RESOLUTION_LOCK_TEMPLATE, type RecyclePolicy, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, ResumeSessionAsyncRequest, ResumeSessionAsyncResponse, ResumeSessionAsyncResponseBody, SHOW_NAVIGATION_BAR_TEMPLATE, type ScreenFingerprint, Session, SessionError, type SessionInterface, type SessionListResult, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, type SyncCallback, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UNINSTALL_BLACKLIST_TEMPLATE, UploadMode, type UploadPolicy, UploadStrategy, type UserAgentData, VERSION, type VideoCard, type WhiteList, WhiteListValidator, createListSessionParams, extraConfigsFromJSON, extraConfigsToJSON, extractRequestId, getLogLevel, getMobileCommandTemplate, hasMobileCommandTemplate, log, logDebug, logError, logInfo, logWarn, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newMappingPolicy, newRecyclePolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy, replaceTemplatePlaceholders, setLogLevel, setupLogger, validateAppManagerRule, validateExtraConfigs, validateMobileExtraConfig, validateMobileSimulateConfig };
7731
+ export { APIError, APP_BLACKLIST_TEMPLATE, APP_WHITELIST_TEMPLATE, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, type AgentOptions, type ApiResponse, type ApiResponseWithData, type AppManagerRule, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, type Brand, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, BrowserFingerprintContext, BrowserFingerprintGenerator, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, BrowserUseAgent, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, ClearContextRequest, ClearContextResponse, ClearContextResponseBody, Client, Code, Command, Computer, ComputerUseAgent, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DeleteResult, DeleteSessionAsyncRequest, DeleteSessionAsyncResponse, DeleteSessionAsyncResponseBody, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtraConfigs, type ExtraProperties, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, type Fingerprint, FingerprintFormat, GetAdbLinkRequest, GetAdbLinkResponse, GetAdbLinkResponseBody, GetAdbLinkResponseBodyData, GetAndLoadInternalContextRequest, GetAndLoadInternalContextResponse, GetAndLoadInternalContextResponseBody, GetAndLoadInternalContextResponseBodyData, GetCdpLinkRequest, GetCdpLinkResponse, GetCdpLinkResponseBody, GetCdpLinkResponseBodyData, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, GetSessionDetailRequest, GetSessionDetailResponse, GetSessionDetailResponseBody, GetSessionDetailResponseBodyData, GetSessionRequest, GetSessionResponse, GetSessionResponseBody, GetSessionResponseBodyData, HIDE_NAVIGATION_BAR_TEMPLATE, IS_RELEASE, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InitializationResult, Lifecycle, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type LogLevel, type LoggerConfig, MOBILE_COMMAND_TEMPLATES, type MappingPolicy, type McpSession, type McpToolResult, Mobile, type MobileExtraConfig, type MobileSimulateConfig, MobileSimulateMode, MobileSimulateService, type MobileSimulateUploadResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type NavigatorFingerprint, type ObserveOptions, ObserveResult, Oss, OssError, PauseSessionAsyncRequest, PauseSessionAsyncResponse, PauseSessionAsyncResponseBody, type QueryResult, RESOLUTION_LOCK_TEMPLATE, type RecyclePolicy, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, ResumeSessionAsyncRequest, ResumeSessionAsyncResponse, ResumeSessionAsyncResponseBody, SHOW_NAVIGATION_BAR_TEMPLATE, type ScreenFingerprint, Session, SessionError, type SessionInterface, type SessionListResult, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, type SyncCallback, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UNINSTALL_BLACKLIST_TEMPLATE, UploadMode, type UploadPolicy, UploadStrategy, type UserAgentData, VERSION, type VideoCard, type WhiteList, WhiteListValidator, createListSessionParams, extraConfigsFromJSON, extraConfigsToJSON, extractRequestId, getLogLevel, getMobileCommandTemplate, hasMobileCommandTemplate, log, logDebug, logError, logInfo, logWarn, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newMappingPolicy, newRecyclePolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy, replaceTemplatePlaceholders, setLogLevel, setupLogger, validateAppManagerRule, validateExtraConfigs, validateMobileExtraConfig, validateMobileSimulateConfig };
package/dist/index.d.ts CHANGED
@@ -80,6 +80,37 @@ interface GetSessionData {
80
80
  /** List of contexts associated with the session */
81
81
  contexts?: ContextInfo[];
82
82
  }
83
+ /**
84
+ * Interface for GetSessionDetail data
85
+ */
86
+ interface GetSessionDetailData {
87
+ aliuid: string;
88
+ apikeyId: string;
89
+ appInstanceGroupId: string;
90
+ appInstanceId: string;
91
+ appUserId: string;
92
+ bizType: number;
93
+ endReason: string;
94
+ id: number;
95
+ imageId: string;
96
+ imageType: string;
97
+ isDeleted: number;
98
+ policyId: string;
99
+ regionId: string;
100
+ resourceConfigId: string;
101
+ status: string;
102
+ }
103
+ /**
104
+ * Interface for GetSessionDetail operation responses
105
+ */
106
+ interface GetSessionDetailResult extends ApiResponse {
107
+ requestId: string;
108
+ httpStatusCode: number;
109
+ code: string;
110
+ success: boolean;
111
+ data?: GetSessionDetailData;
112
+ errorMessage?: string;
113
+ }
83
114
  /**
84
115
  * Interface for GetSession operation responses
85
116
  */
@@ -706,6 +737,34 @@ declare class GetSessionResponseBodyData extends $dara.Model {
706
737
  });
707
738
  }
708
739
 
740
+ declare class GetSessionDetailResponseBodyData extends $dara.Model {
741
+ aliuid?: string;
742
+ apikeyId?: string;
743
+ appInstanceGroupId?: string;
744
+ appInstanceId?: string;
745
+ appUserId?: string;
746
+ bizType?: number;
747
+ endReason?: string;
748
+ id?: number;
749
+ imageId?: string;
750
+ imageType?: string;
751
+ isDeleted?: number;
752
+ policyId?: string;
753
+ regionId?: string;
754
+ resourceConfigId?: string;
755
+ status?: string;
756
+ static names(): {
757
+ [key: string]: string;
758
+ };
759
+ static types(): {
760
+ [key: string]: any;
761
+ };
762
+ validate(): void;
763
+ constructor(map?: {
764
+ [key: string]: any;
765
+ });
766
+ }
767
+
709
768
  declare class GetLinkResponseBodyData extends $dara.Model {
710
769
  url?: string;
711
770
  static names(): {
@@ -1377,6 +1436,58 @@ declare class GetSessionResponse extends $dara.Model {
1377
1436
  });
1378
1437
  }
1379
1438
 
1439
+ declare class GetSessionDetailRequest extends $dara.Model {
1440
+ authorization?: string;
1441
+ sessionId?: string;
1442
+ static names(): {
1443
+ [key: string]: string;
1444
+ };
1445
+ static types(): {
1446
+ [key: string]: any;
1447
+ };
1448
+ validate(): void;
1449
+ constructor(map?: {
1450
+ [key: string]: any;
1451
+ });
1452
+ }
1453
+
1454
+ declare class GetSessionDetailResponseBody extends $dara.Model {
1455
+ code?: string;
1456
+ data?: GetSessionDetailResponseBodyData;
1457
+ httpStatusCode?: number;
1458
+ message?: string;
1459
+ requestId?: string;
1460
+ success?: boolean;
1461
+ static names(): {
1462
+ [key: string]: string;
1463
+ };
1464
+ static types(): {
1465
+ [key: string]: any;
1466
+ };
1467
+ validate(): void;
1468
+ constructor(map?: {
1469
+ [key: string]: any;
1470
+ });
1471
+ }
1472
+
1473
+ declare class GetSessionDetailResponse extends $dara.Model {
1474
+ headers?: {
1475
+ [key: string]: string;
1476
+ };
1477
+ statusCode?: number;
1478
+ body?: GetSessionDetailResponseBody;
1479
+ static names(): {
1480
+ [key: string]: string;
1481
+ };
1482
+ static types(): {
1483
+ [key: string]: any;
1484
+ };
1485
+ validate(): void;
1486
+ constructor(map?: {
1487
+ [key: string]: any;
1488
+ });
1489
+ }
1490
+
1380
1491
  declare class GetLinkRequest extends $dara.Model {
1381
1492
  authorization?: string;
1382
1493
  port?: number;
@@ -2640,6 +2751,21 @@ declare class Client extends OpenApi {
2640
2751
  * @returns GetSessionResponse
2641
2752
  */
2642
2753
  getSession(request: GetSessionRequest): Promise<GetSessionResponse>;
2754
+ /**
2755
+ * Get basic session information by session ID
2756
+ *
2757
+ * @param request - GetSessionDetailRequest
2758
+ * @param runtime - runtime options for this request RuntimeOptions
2759
+ * @returns GetSessionDetailResponse
2760
+ */
2761
+ getSessionDetailWithOptions(request: GetSessionDetailRequest, runtime: $dara.RuntimeOptions): Promise<GetSessionDetailResponse>;
2762
+ /**
2763
+ * Get basic session information by session ID
2764
+ *
2765
+ * @param request - GetSessionDetailRequest
2766
+ * @returns GetSessionDetailResponse
2767
+ */
2768
+ getSessionDetail(request: GetSessionDetailRequest): Promise<GetSessionDetailResponse>;
2643
2769
  /**
2644
2770
  * Pause session async
2645
2771
  *
@@ -7171,6 +7297,13 @@ declare class AgentBay {
7171
7297
  * @returns GetSessionResult containing session information
7172
7298
  */
7173
7299
  getSession(sessionId: string): Promise<GetSessionResult>;
7300
+ /**
7301
+ * Get basic session information by session ID.
7302
+ *
7303
+ * @param sessionId - The ID of the session to retrieve.
7304
+ * @returns GetSessionDetailResult containing basic session information
7305
+ */
7306
+ getSessionDetail(sessionId: string): Promise<GetSessionDetailResult>;
7174
7307
  /**
7175
7308
  * Get a session by its ID.
7176
7309
  *
@@ -7595,4 +7728,4 @@ declare function logWarn(message: string, ...args: any[]): void;
7595
7728
  */
7596
7729
  declare function logError(message: string, error?: any): void;
7597
7730
 
7598
- export { APIError, APP_BLACKLIST_TEMPLATE, APP_WHITELIST_TEMPLATE, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, type AgentOptions, type ApiResponse, type ApiResponseWithData, type AppManagerRule, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, type Brand, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, BrowserFingerprintContext, BrowserFingerprintGenerator, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, BrowserUseAgent, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, ClearContextRequest, ClearContextResponse, ClearContextResponseBody, Client, Code, Command, Computer, ComputerUseAgent, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DeleteResult, DeleteSessionAsyncRequest, DeleteSessionAsyncResponse, DeleteSessionAsyncResponseBody, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtraConfigs, type ExtraProperties, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, type Fingerprint, FingerprintFormat, GetAdbLinkRequest, GetAdbLinkResponse, GetAdbLinkResponseBody, GetAdbLinkResponseBodyData, GetAndLoadInternalContextRequest, GetAndLoadInternalContextResponse, GetAndLoadInternalContextResponseBody, GetAndLoadInternalContextResponseBodyData, GetCdpLinkRequest, GetCdpLinkResponse, GetCdpLinkResponseBody, GetCdpLinkResponseBodyData, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, GetSessionRequest, GetSessionResponse, GetSessionResponseBody, GetSessionResponseBodyData, HIDE_NAVIGATION_BAR_TEMPLATE, IS_RELEASE, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InitializationResult, Lifecycle, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type LogLevel, type LoggerConfig, MOBILE_COMMAND_TEMPLATES, type MappingPolicy, type McpSession, type McpToolResult, Mobile, type MobileExtraConfig, type MobileSimulateConfig, MobileSimulateMode, MobileSimulateService, type MobileSimulateUploadResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type NavigatorFingerprint, type ObserveOptions, ObserveResult, Oss, OssError, PauseSessionAsyncRequest, PauseSessionAsyncResponse, PauseSessionAsyncResponseBody, type QueryResult, RESOLUTION_LOCK_TEMPLATE, type RecyclePolicy, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, ResumeSessionAsyncRequest, ResumeSessionAsyncResponse, ResumeSessionAsyncResponseBody, SHOW_NAVIGATION_BAR_TEMPLATE, type ScreenFingerprint, Session, SessionError, type SessionInterface, type SessionListResult, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, type SyncCallback, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UNINSTALL_BLACKLIST_TEMPLATE, UploadMode, type UploadPolicy, UploadStrategy, type UserAgentData, VERSION, type VideoCard, type WhiteList, WhiteListValidator, createListSessionParams, extraConfigsFromJSON, extraConfigsToJSON, extractRequestId, getLogLevel, getMobileCommandTemplate, hasMobileCommandTemplate, log, logDebug, logError, logInfo, logWarn, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newMappingPolicy, newRecyclePolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy, replaceTemplatePlaceholders, setLogLevel, setupLogger, validateAppManagerRule, validateExtraConfigs, validateMobileExtraConfig, validateMobileSimulateConfig };
7731
+ export { APIError, APP_BLACKLIST_TEMPLATE, APP_WHITELIST_TEMPLATE, type ActOptions, ActResult, Agent, AgentBay, AgentBayError, type AgentOptions, type ApiResponse, type ApiResponseWithData, type AppManagerRule, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, type Brand, Browser, BrowserAgent, BrowserContext, BrowserError, type BrowserFingerprint, BrowserFingerprintContext, BrowserFingerprintGenerator, type BrowserOption, BrowserOptionClass, type BrowserProxy, BrowserProxyClass, type BrowserScreen, BrowserUseAgent, type BrowserViewport, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, ClearContextRequest, ClearContextResponse, ClearContextResponseBody, Client, Code, Command, Computer, ComputerUseAgent, type Config, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, CreateSessionParams, type CreateSessionParamsConfig, DeleteContextFileRequest, DeleteContextFileResponse, DeleteContextFileResponseBody, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DeleteResult, DeleteSessionAsyncRequest, DeleteSessionAsyncResponse, DeleteSessionAsyncResponseBody, DescribeContextFilesRequest, DescribeContextFilesResponse, DescribeContextFilesResponseBody, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, type ExecutionResult, Extension, ExtensionOption, ExtensionsService, type ExtraConfigs, type ExtraProperties, type ExtractOptions, type ExtractPolicy, ExtractPolicyClass, type FileChangeEvent, FileChangeEventHelper, type FileChangeResult, FileChangeResultHelper, FileError, type FileInfo, FileSystem, type Fingerprint, FingerprintFormat, GetAdbLinkRequest, GetAdbLinkResponse, GetAdbLinkResponseBody, GetAdbLinkResponseBodyData, GetAndLoadInternalContextRequest, GetAndLoadInternalContextResponse, GetAndLoadInternalContextResponseBody, GetAndLoadInternalContextResponseBodyData, GetCdpLinkRequest, GetCdpLinkResponse, GetCdpLinkResponseBody, GetCdpLinkResponseBodyData, GetContextFileDownloadUrlRequest, GetContextFileDownloadUrlResponse, GetContextFileDownloadUrlResponseBody, GetContextFileUploadUrlRequest, GetContextFileUploadUrlResponse, GetContextFileUploadUrlResponseBody, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, GetSessionDetailRequest, GetSessionDetailResponse, GetSessionDetailResponseBody, GetSessionDetailResponseBodyData, GetSessionRequest, GetSessionResponse, GetSessionResponseBody, GetSessionResponseBodyData, HIDE_NAVIGATION_BAR_TEMPLATE, IS_RELEASE, InitBrowserRequest, InitBrowserResponse, InitBrowserResponseBody, InitBrowserResponseBodyData, type InitializationResult, Lifecycle, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, type LogLevel, type LoggerConfig, MOBILE_COMMAND_TEMPLATES, type MappingPolicy, type McpSession, type McpToolResult, Mobile, type MobileExtraConfig, type MobileSimulateConfig, MobileSimulateMode, MobileSimulateService, type MobileSimulateUploadResult, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, type NavigatorFingerprint, type ObserveOptions, ObserveResult, Oss, OssError, PauseSessionAsyncRequest, PauseSessionAsyncResponse, PauseSessionAsyncResponseBody, type QueryResult, RESOLUTION_LOCK_TEMPLATE, type RecyclePolicy, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, ResumeSessionAsyncRequest, ResumeSessionAsyncResponse, ResumeSessionAsyncResponseBody, SHOW_NAVIGATION_BAR_TEMPLATE, type ScreenFingerprint, Session, SessionError, type SessionInterface, type SessionListResult, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, type SyncCallback, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, SyncPolicyImpl, UNINSTALL_BLACKLIST_TEMPLATE, UploadMode, type UploadPolicy, UploadStrategy, type UserAgentData, VERSION, type VideoCard, type WhiteList, WhiteListValidator, createListSessionParams, extraConfigsFromJSON, extraConfigsToJSON, extractRequestId, getLogLevel, getMobileCommandTemplate, hasMobileCommandTemplate, log, logDebug, logError, logInfo, logWarn, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newExtractPolicy, newMappingPolicy, newRecyclePolicy, newSyncPolicy, newSyncPolicyWithDefaults, newUploadPolicy, replaceTemplatePlaceholders, setLogLevel, setupLogger, validateAppManagerRule, validateExtraConfigs, validateMobileExtraConfig, validateMobileSimulateConfig };
package/dist/index.mjs CHANGED
@@ -79,6 +79,10 @@ import {
79
79
  GetMcpResourceResponseBody,
80
80
  GetMcpResourceResponseBodyData,
81
81
  GetMcpResourceResponseBodyDataDesktopInfo,
82
+ GetSessionDetailRequest,
83
+ GetSessionDetailResponse,
84
+ GetSessionDetailResponseBody,
85
+ GetSessionDetailResponseBodyData,
82
86
  GetSessionRequest,
83
87
  GetSessionResponse,
84
88
  GetSessionResponseBody,
@@ -116,7 +120,7 @@ import {
116
120
  SyncContextRequest,
117
121
  SyncContextResponse,
118
122
  SyncContextResponseBody
119
- } from "./chunk-P2CXYF4T.mjs";
123
+ } from "./chunk-GQ4JBIRO.mjs";
120
124
  import {
121
125
  __commonJS,
122
126
  __dirname,
@@ -1118,6 +1122,53 @@ var _Client = class _Client extends (OpenApi.default || OpenApi) {
1118
1122
  const runtime = new $dara.RuntimeOptions({});
1119
1123
  return await this.getSessionWithOptions(request, runtime);
1120
1124
  }
1125
+ /**
1126
+ * Get basic session information by session ID
1127
+ *
1128
+ * @param request - GetSessionDetailRequest
1129
+ * @param runtime - runtime options for this request RuntimeOptions
1130
+ * @returns GetSessionDetailResponse
1131
+ */
1132
+ async getSessionDetailWithOptions(request, runtime) {
1133
+ request.validate();
1134
+ const query = {};
1135
+ if (!$dara.isNull(request.sessionId)) {
1136
+ query["SessionId"] = request.sessionId;
1137
+ }
1138
+ const body = {};
1139
+ if (!$dara.isNull(request.authorization)) {
1140
+ body["Authorization"] = request.authorization;
1141
+ }
1142
+ const req = new $OpenApiUtil.OpenApiRequest({
1143
+ query: OpenApiUtil.query(query),
1144
+ body: OpenApiUtil.parseToMap(body)
1145
+ });
1146
+ const params = new $OpenApiUtil.Params({
1147
+ action: "GetSessionDetail",
1148
+ version: "2025-05-06",
1149
+ protocol: "HTTPS",
1150
+ pathname: "/",
1151
+ method: "POST",
1152
+ authType: "Anonymous",
1153
+ style: "RPC",
1154
+ reqBodyType: "formData",
1155
+ bodyType: "json"
1156
+ });
1157
+ return $dara.cast(
1158
+ await this.callApi(params, req, runtime),
1159
+ new GetSessionDetailResponse({})
1160
+ );
1161
+ }
1162
+ /**
1163
+ * Get basic session information by session ID
1164
+ *
1165
+ * @param request - GetSessionDetailRequest
1166
+ * @returns GetSessionDetailResponse
1167
+ */
1168
+ async getSessionDetail(request) {
1169
+ const runtime = new $dara.RuntimeOptions({});
1170
+ return await this.getSessionDetailWithOptions(request, runtime);
1171
+ }
1121
1172
  /**
1122
1173
  * Pause session async
1123
1174
  *
@@ -10974,7 +11025,7 @@ var _Browser = class _Browser {
10974
11025
  logDebug(`VPC mode, endpoint_router_port: ${this.session.httpPort}`);
10975
11026
  this._endpointUrl = `ws://${this.session.networkInterfaceIp}:${this.session.httpPort}`;
10976
11027
  } else {
10977
- const { GetCdpLinkRequest: GetCdpLinkRequest2 } = await import("./model-BRLR6F3P.mjs");
11028
+ const { GetCdpLinkRequest: GetCdpLinkRequest2 } = await import("./model-O3ASLZ3Y.mjs");
10978
11029
  const request = new GetCdpLinkRequest2({
10979
11030
  authorization: `Bearer ${this.session.getAPIKey()}`,
10980
11031
  sessionId: this.session.sessionId
@@ -13249,10 +13300,11 @@ var _FileTransfer = class _FileTransfer {
13249
13300
  error: `Upload exception: ${e.message || e}`
13250
13301
  };
13251
13302
  }
13303
+ const remoteDir = this.remoteDir(remotePath);
13252
13304
  let reqIdSync;
13253
13305
  try {
13254
13306
  logDebug("Triggering sync to cloud disk");
13255
- reqIdSync = await this.awaitSync("download", remotePath, this.contextId);
13307
+ reqIdSync = await this.awaitSync("download", remoteDir, this.contextId);
13256
13308
  } catch (e) {
13257
13309
  return {
13258
13310
  success: false,
@@ -13272,7 +13324,7 @@ var _FileTransfer = class _FileTransfer {
13272
13324
  if (wait) {
13273
13325
  const { success, error } = await this.waitForTask({
13274
13326
  contextId: this.contextId,
13275
- remotePath,
13327
+ remotePath: remoteDir,
13276
13328
  taskType: "download",
13277
13329
  timeout: waitTimeout,
13278
13330
  interval: pollInterval
@@ -13342,9 +13394,10 @@ var _FileTransfer = class _FileTransfer {
13342
13394
  };
13343
13395
  }
13344
13396
  }
13397
+ const remoteDir = this.remoteDir(remotePath);
13345
13398
  let reqIdSync;
13346
13399
  try {
13347
- reqIdSync = await this.awaitSync("upload", remotePath, this.contextId);
13400
+ reqIdSync = await this.awaitSync("upload", remoteDir, this.contextId);
13348
13401
  } catch (e) {
13349
13402
  return {
13350
13403
  success: false,
@@ -13358,7 +13411,7 @@ var _FileTransfer = class _FileTransfer {
13358
13411
  if (wait) {
13359
13412
  const { success, error } = await this.waitForTask({
13360
13413
  contextId: this.contextId,
13361
- remotePath,
13414
+ remotePath: remoteDir,
13362
13415
  taskType: "upload",
13363
13416
  timeout: waitTimeout,
13364
13417
  interval: pollInterval
@@ -13452,6 +13505,18 @@ var _FileTransfer = class _FileTransfer {
13452
13505
  }
13453
13506
  }
13454
13507
  // ========== Internal Utilities ==========
13508
+ /**
13509
+ * Ensure sync path is a directory: strip filename, keep directory inputs.
13510
+ */
13511
+ remoteDir(remotePath) {
13512
+ if (!remotePath) return "";
13513
+ if (remotePath.endsWith("/")) {
13514
+ const trimmed = remotePath.replace(/\/+$/, "");
13515
+ return trimmed || "/";
13516
+ }
13517
+ const dir = path4.posix.dirname(remotePath);
13518
+ return dir === "." ? "/" : dir;
13519
+ }
13455
13520
  /**
13456
13521
  * Compatibility wrapper for session.context.sync which may be sync or async:
13457
13522
  * - Try async call first
@@ -15281,7 +15346,7 @@ var _Mobile = class _Mobile {
15281
15346
  async getAdbUrl(adbkeyPub) {
15282
15347
  try {
15283
15348
  const optionsJson = JSON.stringify({ adbkey_pub: adbkeyPub });
15284
- const { GetAdbLinkRequest: GetAdbLinkRequest2 } = await import("./model-BRLR6F3P.mjs");
15349
+ const { GetAdbLinkRequest: GetAdbLinkRequest2 } = await import("./model-O3ASLZ3Y.mjs");
15285
15350
  const request = new GetAdbLinkRequest2({
15286
15351
  authorization: `Bearer ${this.session.getAPIKey()}`,
15287
15352
  sessionId: this.session.sessionId,
@@ -17911,6 +17976,91 @@ var _AgentBay = class _AgentBay {
17911
17976
  }
17912
17977
  }
17913
17978
  }
17979
+ /**
17980
+ * Get basic session information by session ID.
17981
+ *
17982
+ * @param sessionId - The ID of the session to retrieve.
17983
+ * @returns GetSessionDetailResult containing basic session information
17984
+ */
17985
+ async getSessionDetail(sessionId) {
17986
+ try {
17987
+ logAPICall("GetSessionDetail", { sessionId });
17988
+ const request = new GetSessionDetailRequest({
17989
+ authorization: `Bearer ${this.apiKey}`,
17990
+ sessionId
17991
+ });
17992
+ const response = await this.client.getSessionDetail(request);
17993
+ const body = response.body;
17994
+ const requestId = extractRequestId(response) || body?.requestId || "";
17995
+ setRequestId(requestId);
17996
+ if (body?.success === false && body.code) {
17997
+ logAPIResponseWithDetails(
17998
+ "GetSessionDetail",
17999
+ requestId,
18000
+ false,
18001
+ {},
18002
+ `[${body.code}] ${body.message || "Unknown error"}`
18003
+ );
18004
+ logDebug(
18005
+ "Full GetSessionDetail response:",
18006
+ JSON.stringify(body, null, 2)
18007
+ );
18008
+ return {
18009
+ requestId,
18010
+ httpStatusCode: body.httpStatusCode || 0,
18011
+ code: body.code,
18012
+ success: false,
18013
+ errorMessage: `[${body.code}] ${body.message || "Unknown error"}`
18014
+ };
18015
+ }
18016
+ const result = {
18017
+ requestId,
18018
+ httpStatusCode: body?.httpStatusCode || 0,
18019
+ code: body?.code || "",
18020
+ success: body?.success || false,
18021
+ errorMessage: ""
18022
+ };
18023
+ if (body?.data) {
18024
+ result.data = {
18025
+ aliuid: body.data.aliuid || "",
18026
+ apikeyId: body.data.apikeyId || "",
18027
+ appInstanceGroupId: body.data.appInstanceGroupId || "",
18028
+ appInstanceId: body.data.appInstanceId || "",
18029
+ appUserId: body.data.appUserId || "",
18030
+ bizType: body.data.bizType || 0,
18031
+ endReason: body.data.endReason || "",
18032
+ id: body.data.id || 0,
18033
+ imageId: body.data.imageId || "",
18034
+ imageType: body.data.imageType || "",
18035
+ isDeleted: body.data.isDeleted || 0,
18036
+ policyId: body.data.policyId || "",
18037
+ regionId: body.data.regionId || "",
18038
+ resourceConfigId: body.data.resourceConfigId || "",
18039
+ status: body.data.status || ""
18040
+ };
18041
+ logAPIResponseWithDetails(
18042
+ "GetSessionDetail",
18043
+ requestId,
18044
+ true,
18045
+ {
18046
+ appInstanceId: result.data.appInstanceId,
18047
+ regionId: result.data.regionId,
18048
+ status: result.data.status
18049
+ }
18050
+ );
18051
+ }
18052
+ return result;
18053
+ } catch (error) {
18054
+ logError("Error calling GetSessionDetail:", error);
18055
+ return {
18056
+ requestId: "",
18057
+ httpStatusCode: 0,
18058
+ code: "",
18059
+ success: false,
18060
+ errorMessage: `Failed to get session detail ${sessionId}: ${error}`
18061
+ };
18062
+ }
18063
+ }
17914
18064
  /**
17915
18065
  * Get a session by its ID.
17916
18066
  *
@@ -19394,6 +19544,10 @@ export {
19394
19544
  GetMcpResourceResponseBody,
19395
19545
  GetMcpResourceResponseBodyData,
19396
19546
  GetMcpResourceResponseBodyDataDesktopInfo,
19547
+ GetSessionDetailRequest,
19548
+ GetSessionDetailResponse,
19549
+ GetSessionDetailResponseBody,
19550
+ GetSessionDetailResponseBodyData,
19397
19551
  GetSessionRequest,
19398
19552
  GetSessionResponse,
19399
19553
  GetSessionResponseBody,