test-wuying-agentbay-sdk 0.13.0-beta.20251217175633 → 0.13.0-beta.20251218114222
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VEHDE3LU.mjs → chunk-P2CXYF4T.mjs} +99 -2
- package/dist/chunk-P2CXYF4T.mjs.map +1 -0
- package/dist/{chunk-QYUGADDC.cjs → chunk-WVWGLZDT.cjs} +100 -3
- package/dist/chunk-WVWGLZDT.cjs.map +1 -0
- package/dist/index.cjs +173 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +70 -3
- package/dist/index.d.ts +70 -3
- package/dist/index.mjs +114 -10
- package/dist/index.mjs.map +1 -1
- package/dist/{model-NXNY7XBJ.mjs → model-BRLR6F3P.mjs} +8 -2
- package/dist/model-KJHN3WYY.cjs +214 -0
- package/dist/{model-TL7UT6WY.cjs.map → model-KJHN3WYY.cjs.map} +1 -1
- package/docs/api/common-features/basics/agentbay.md +3 -2
- package/docs/api/common-features/basics/session-params.md +322 -11
- package/package.json +1 -1
- package/dist/chunk-QYUGADDC.cjs.map +0 -1
- package/dist/chunk-VEHDE3LU.mjs.map +0 -1
- package/dist/model-TL7UT6WY.cjs +0 -208
- /package/dist/{model-NXNY7XBJ.mjs.map → model-BRLR6F3P.mjs.map} +0 -0
package/dist/index.d.mts
CHANGED
|
@@ -886,6 +886,7 @@ declare class ClearContextResponse extends $dara.Model {
|
|
|
886
886
|
declare class CreateMcpSessionRequest extends $dara.Model {
|
|
887
887
|
authorization?: string;
|
|
888
888
|
contextId?: string;
|
|
889
|
+
enableRecord?: boolean;
|
|
889
890
|
externalUserId?: string;
|
|
890
891
|
imageId?: string;
|
|
891
892
|
labels?: string;
|
|
@@ -2380,6 +2381,57 @@ declare class ResumeSessionAsyncResponse extends $dara.Model {
|
|
|
2380
2381
|
}): ResumeSessionAsyncResponse;
|
|
2381
2382
|
}
|
|
2382
2383
|
|
|
2384
|
+
declare class DeleteSessionAsyncRequest extends $dara.Model {
|
|
2385
|
+
authorization?: string;
|
|
2386
|
+
sessionId?: string;
|
|
2387
|
+
static names(): {
|
|
2388
|
+
[key: string]: string;
|
|
2389
|
+
};
|
|
2390
|
+
static types(): {
|
|
2391
|
+
[key: string]: any;
|
|
2392
|
+
};
|
|
2393
|
+
validate(): void;
|
|
2394
|
+
constructor(map?: {
|
|
2395
|
+
[key: string]: any;
|
|
2396
|
+
});
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
declare class DeleteSessionAsyncResponseBody extends $dara.Model {
|
|
2400
|
+
code?: string;
|
|
2401
|
+
httpStatusCode?: number;
|
|
2402
|
+
message?: string;
|
|
2403
|
+
requestId?: string;
|
|
2404
|
+
success?: boolean;
|
|
2405
|
+
static names(): {
|
|
2406
|
+
[key: string]: string;
|
|
2407
|
+
};
|
|
2408
|
+
static types(): {
|
|
2409
|
+
[key: string]: any;
|
|
2410
|
+
};
|
|
2411
|
+
validate(): void;
|
|
2412
|
+
constructor(map?: {
|
|
2413
|
+
[key: string]: any;
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
declare class DeleteSessionAsyncResponse extends $dara.Model {
|
|
2418
|
+
headers?: {
|
|
2419
|
+
[key: string]: string;
|
|
2420
|
+
};
|
|
2421
|
+
statusCode?: number;
|
|
2422
|
+
body?: DeleteSessionAsyncResponseBody;
|
|
2423
|
+
static names(): {
|
|
2424
|
+
[key: string]: string;
|
|
2425
|
+
};
|
|
2426
|
+
static types(): {
|
|
2427
|
+
[key: string]: any;
|
|
2428
|
+
};
|
|
2429
|
+
validate(): void;
|
|
2430
|
+
constructor(map?: {
|
|
2431
|
+
[key: string]: any;
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2383
2435
|
declare class Client extends OpenApi {
|
|
2384
2436
|
constructor(config: $OpenApiUtil.Config);
|
|
2385
2437
|
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
|
|
@@ -2430,6 +2482,21 @@ declare class Client extends OpenApi {
|
|
|
2430
2482
|
* @returns CreateMcpSessionResponse
|
|
2431
2483
|
*/
|
|
2432
2484
|
createMcpSession(request: CreateMcpSessionRequest): Promise<CreateMcpSessionResponse>;
|
|
2485
|
+
/**
|
|
2486
|
+
* Delete session
|
|
2487
|
+
*
|
|
2488
|
+
* @param request - DeleteSessionAsyncRequest
|
|
2489
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2490
|
+
* @returns DeleteSessionAsyncResponse
|
|
2491
|
+
*/
|
|
2492
|
+
deleteSessionAsyncWithOptions(request: DeleteSessionAsyncRequest, runtime: $dara.RuntimeOptions): Promise<DeleteSessionAsyncResponse>;
|
|
2493
|
+
/**
|
|
2494
|
+
* Delete session
|
|
2495
|
+
*
|
|
2496
|
+
* @param request - DeleteSessionAsyncRequest
|
|
2497
|
+
* @returns DeleteSessionAsyncResponse
|
|
2498
|
+
*/
|
|
2499
|
+
deleteSessionAsync(request: DeleteSessionAsyncRequest): Promise<DeleteSessionAsyncResponse>;
|
|
2433
2500
|
/**
|
|
2434
2501
|
* Delete persistent context
|
|
2435
2502
|
*
|
|
@@ -6719,8 +6786,8 @@ declare class CreateSessionParams implements CreateSessionParamsConfig {
|
|
|
6719
6786
|
isVpc: boolean;
|
|
6720
6787
|
/** Policy id to apply when creating the session. */
|
|
6721
6788
|
policyId?: string;
|
|
6722
|
-
/** Whether to enable browser recording for the session. Defaults to
|
|
6723
|
-
enableBrowserReplay
|
|
6789
|
+
/** Whether to enable browser recording for the session. Defaults to undefined (use default behavior, enabled by default). */
|
|
6790
|
+
enableBrowserReplay?: boolean;
|
|
6724
6791
|
/** Extra configuration settings for different session types (e.g., mobile) */
|
|
6725
6792
|
extraConfigs?: ExtraConfigs;
|
|
6726
6793
|
/** Framework name for SDK statistics tracking */
|
|
@@ -7388,4 +7455,4 @@ declare function logWarn(message: string, ...args: any[]): void;
|
|
|
7388
7455
|
*/
|
|
7389
7456
|
declare function logError(message: string, error?: any): void;
|
|
7390
7457
|
|
|
7391
|
-
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, 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 };
|
|
7458
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -886,6 +886,7 @@ declare class ClearContextResponse extends $dara.Model {
|
|
|
886
886
|
declare class CreateMcpSessionRequest extends $dara.Model {
|
|
887
887
|
authorization?: string;
|
|
888
888
|
contextId?: string;
|
|
889
|
+
enableRecord?: boolean;
|
|
889
890
|
externalUserId?: string;
|
|
890
891
|
imageId?: string;
|
|
891
892
|
labels?: string;
|
|
@@ -2380,6 +2381,57 @@ declare class ResumeSessionAsyncResponse extends $dara.Model {
|
|
|
2380
2381
|
}): ResumeSessionAsyncResponse;
|
|
2381
2382
|
}
|
|
2382
2383
|
|
|
2384
|
+
declare class DeleteSessionAsyncRequest extends $dara.Model {
|
|
2385
|
+
authorization?: string;
|
|
2386
|
+
sessionId?: string;
|
|
2387
|
+
static names(): {
|
|
2388
|
+
[key: string]: string;
|
|
2389
|
+
};
|
|
2390
|
+
static types(): {
|
|
2391
|
+
[key: string]: any;
|
|
2392
|
+
};
|
|
2393
|
+
validate(): void;
|
|
2394
|
+
constructor(map?: {
|
|
2395
|
+
[key: string]: any;
|
|
2396
|
+
});
|
|
2397
|
+
}
|
|
2398
|
+
|
|
2399
|
+
declare class DeleteSessionAsyncResponseBody extends $dara.Model {
|
|
2400
|
+
code?: string;
|
|
2401
|
+
httpStatusCode?: number;
|
|
2402
|
+
message?: string;
|
|
2403
|
+
requestId?: string;
|
|
2404
|
+
success?: boolean;
|
|
2405
|
+
static names(): {
|
|
2406
|
+
[key: string]: string;
|
|
2407
|
+
};
|
|
2408
|
+
static types(): {
|
|
2409
|
+
[key: string]: any;
|
|
2410
|
+
};
|
|
2411
|
+
validate(): void;
|
|
2412
|
+
constructor(map?: {
|
|
2413
|
+
[key: string]: any;
|
|
2414
|
+
});
|
|
2415
|
+
}
|
|
2416
|
+
|
|
2417
|
+
declare class DeleteSessionAsyncResponse extends $dara.Model {
|
|
2418
|
+
headers?: {
|
|
2419
|
+
[key: string]: string;
|
|
2420
|
+
};
|
|
2421
|
+
statusCode?: number;
|
|
2422
|
+
body?: DeleteSessionAsyncResponseBody;
|
|
2423
|
+
static names(): {
|
|
2424
|
+
[key: string]: string;
|
|
2425
|
+
};
|
|
2426
|
+
static types(): {
|
|
2427
|
+
[key: string]: any;
|
|
2428
|
+
};
|
|
2429
|
+
validate(): void;
|
|
2430
|
+
constructor(map?: {
|
|
2431
|
+
[key: string]: any;
|
|
2432
|
+
});
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2383
2435
|
declare class Client extends OpenApi {
|
|
2384
2436
|
constructor(config: $OpenApiUtil.Config);
|
|
2385
2437
|
getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: {
|
|
@@ -2430,6 +2482,21 @@ declare class Client extends OpenApi {
|
|
|
2430
2482
|
* @returns CreateMcpSessionResponse
|
|
2431
2483
|
*/
|
|
2432
2484
|
createMcpSession(request: CreateMcpSessionRequest): Promise<CreateMcpSessionResponse>;
|
|
2485
|
+
/**
|
|
2486
|
+
* Delete session
|
|
2487
|
+
*
|
|
2488
|
+
* @param request - DeleteSessionAsyncRequest
|
|
2489
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
2490
|
+
* @returns DeleteSessionAsyncResponse
|
|
2491
|
+
*/
|
|
2492
|
+
deleteSessionAsyncWithOptions(request: DeleteSessionAsyncRequest, runtime: $dara.RuntimeOptions): Promise<DeleteSessionAsyncResponse>;
|
|
2493
|
+
/**
|
|
2494
|
+
* Delete session
|
|
2495
|
+
*
|
|
2496
|
+
* @param request - DeleteSessionAsyncRequest
|
|
2497
|
+
* @returns DeleteSessionAsyncResponse
|
|
2498
|
+
*/
|
|
2499
|
+
deleteSessionAsync(request: DeleteSessionAsyncRequest): Promise<DeleteSessionAsyncResponse>;
|
|
2433
2500
|
/**
|
|
2434
2501
|
* Delete persistent context
|
|
2435
2502
|
*
|
|
@@ -6719,8 +6786,8 @@ declare class CreateSessionParams implements CreateSessionParamsConfig {
|
|
|
6719
6786
|
isVpc: boolean;
|
|
6720
6787
|
/** Policy id to apply when creating the session. */
|
|
6721
6788
|
policyId?: string;
|
|
6722
|
-
/** Whether to enable browser recording for the session. Defaults to
|
|
6723
|
-
enableBrowserReplay
|
|
6789
|
+
/** Whether to enable browser recording for the session. Defaults to undefined (use default behavior, enabled by default). */
|
|
6790
|
+
enableBrowserReplay?: boolean;
|
|
6724
6791
|
/** Extra configuration settings for different session types (e.g., mobile) */
|
|
6725
6792
|
extraConfigs?: ExtraConfigs;
|
|
6726
6793
|
/** Framework name for SDK statistics tracking */
|
|
@@ -7388,4 +7455,4 @@ declare function logWarn(message: string, ...args: any[]): void;
|
|
|
7388
7455
|
*/
|
|
7389
7456
|
declare function logError(message: string, error?: any): void;
|
|
7390
7457
|
|
|
7391
|
-
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, 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 };
|
|
7458
|
+
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 };
|
package/dist/index.mjs
CHANGED
|
@@ -34,6 +34,9 @@ import {
|
|
|
34
34
|
DeleteContextRequest,
|
|
35
35
|
DeleteContextResponse,
|
|
36
36
|
DeleteContextResponseBody,
|
|
37
|
+
DeleteSessionAsyncRequest,
|
|
38
|
+
DeleteSessionAsyncResponse,
|
|
39
|
+
DeleteSessionAsyncResponseBody,
|
|
37
40
|
DescribeContextFilesRequest,
|
|
38
41
|
DescribeContextFilesResponse,
|
|
39
42
|
DescribeContextFilesResponseBody,
|
|
@@ -113,7 +116,7 @@ import {
|
|
|
113
116
|
SyncContextRequest,
|
|
114
117
|
SyncContextResponse,
|
|
115
118
|
SyncContextResponseBody
|
|
116
|
-
} from "./chunk-
|
|
119
|
+
} from "./chunk-P2CXYF4T.mjs";
|
|
117
120
|
import {
|
|
118
121
|
__commonJS,
|
|
119
122
|
__dirname,
|
|
@@ -762,6 +765,9 @@ var _Client = class _Client extends (OpenApi.default || OpenApi) {
|
|
|
762
765
|
if (!$dara.isNull(request.contextId)) {
|
|
763
766
|
body["ContextId"] = request.contextId;
|
|
764
767
|
}
|
|
768
|
+
if (!$dara.isNull(request.enableRecord)) {
|
|
769
|
+
body["EnableRecord"] = request.enableRecord;
|
|
770
|
+
}
|
|
765
771
|
if (!$dara.isNull(request.externalUserId)) {
|
|
766
772
|
body["ExternalUserId"] = request.externalUserId;
|
|
767
773
|
}
|
|
@@ -821,6 +827,48 @@ var _Client = class _Client extends (OpenApi.default || OpenApi) {
|
|
|
821
827
|
const runtime = new $dara.RuntimeOptions({});
|
|
822
828
|
return await this.createMcpSessionWithOptions(request, runtime);
|
|
823
829
|
}
|
|
830
|
+
/**
|
|
831
|
+
* Delete session
|
|
832
|
+
*
|
|
833
|
+
* @param request - DeleteSessionAsyncRequest
|
|
834
|
+
* @param runtime - runtime options for this request RuntimeOptions
|
|
835
|
+
* @returns DeleteSessionAsyncResponse
|
|
836
|
+
*/
|
|
837
|
+
async deleteSessionAsyncWithOptions(request, runtime) {
|
|
838
|
+
request.validate();
|
|
839
|
+
let body = {};
|
|
840
|
+
if (!$dara.isNull(request.authorization)) {
|
|
841
|
+
body["Authorization"] = request.authorization;
|
|
842
|
+
}
|
|
843
|
+
if (!$dara.isNull(request.sessionId)) {
|
|
844
|
+
body["SessionId"] = request.sessionId;
|
|
845
|
+
}
|
|
846
|
+
let req = new $OpenApiUtil.OpenApiRequest({
|
|
847
|
+
body: OpenApiUtil.parseToMap(body)
|
|
848
|
+
});
|
|
849
|
+
let params = new $OpenApiUtil.Params({
|
|
850
|
+
action: "DeleteSessionAsync",
|
|
851
|
+
version: "2025-05-06",
|
|
852
|
+
protocol: "HTTPS",
|
|
853
|
+
pathname: "/",
|
|
854
|
+
method: "POST",
|
|
855
|
+
authType: "Anonymous",
|
|
856
|
+
style: "RPC",
|
|
857
|
+
reqBodyType: "formData",
|
|
858
|
+
bodyType: "json"
|
|
859
|
+
});
|
|
860
|
+
return $dara.cast(await this.doRPCRequest(params.action, params.version, params.protocol, params.method, params.authType, params.bodyType, req, runtime), new DeleteSessionAsyncResponse({}));
|
|
861
|
+
}
|
|
862
|
+
/**
|
|
863
|
+
* Delete session
|
|
864
|
+
*
|
|
865
|
+
* @param request - DeleteSessionAsyncRequest
|
|
866
|
+
* @returns DeleteSessionAsyncResponse
|
|
867
|
+
*/
|
|
868
|
+
async deleteSessionAsync(request) {
|
|
869
|
+
let runtime = new $dara.RuntimeOptions({});
|
|
870
|
+
return await this.deleteSessionAsyncWithOptions(request, runtime);
|
|
871
|
+
}
|
|
824
872
|
/**
|
|
825
873
|
* Delete persistent context
|
|
826
874
|
*
|
|
@@ -10926,7 +10974,7 @@ var _Browser = class _Browser {
|
|
|
10926
10974
|
logDebug(`VPC mode, endpoint_router_port: ${this.session.httpPort}`);
|
|
10927
10975
|
this._endpointUrl = `ws://${this.session.networkInterfaceIp}:${this.session.httpPort}`;
|
|
10928
10976
|
} else {
|
|
10929
|
-
const { GetCdpLinkRequest: GetCdpLinkRequest2 } = await import("./model-
|
|
10977
|
+
const { GetCdpLinkRequest: GetCdpLinkRequest2 } = await import("./model-BRLR6F3P.mjs");
|
|
10930
10978
|
const request = new GetCdpLinkRequest2({
|
|
10931
10979
|
authorization: `Bearer ${this.session.getAPIKey()}`,
|
|
10932
10980
|
sessionId: this.session.sessionId
|
|
@@ -15072,7 +15120,7 @@ var _Mobile = class _Mobile {
|
|
|
15072
15120
|
async getAdbUrl(adbkeyPub) {
|
|
15073
15121
|
try {
|
|
15074
15122
|
const optionsJson = JSON.stringify({ adbkey_pub: adbkeyPub });
|
|
15075
|
-
const { GetAdbLinkRequest: GetAdbLinkRequest2 } = await import("./model-
|
|
15123
|
+
const { GetAdbLinkRequest: GetAdbLinkRequest2 } = await import("./model-BRLR6F3P.mjs");
|
|
15076
15124
|
const request = new GetAdbLinkRequest2({
|
|
15077
15125
|
authorization: `Bearer ${this.session.getAPIKey()}`,
|
|
15078
15126
|
sessionId: this.session.sessionId,
|
|
@@ -15872,31 +15920,81 @@ var _Session = class _Session {
|
|
|
15872
15920
|
);
|
|
15873
15921
|
}
|
|
15874
15922
|
}
|
|
15875
|
-
const request = new
|
|
15923
|
+
const request = new DeleteSessionAsyncRequest({
|
|
15876
15924
|
authorization: `Bearer ${this.getAPIKey()}`,
|
|
15877
15925
|
sessionId: this.sessionId
|
|
15878
15926
|
});
|
|
15879
|
-
const response = await this.getClient().
|
|
15927
|
+
const response = await this.getClient().deleteSessionAsync(request);
|
|
15880
15928
|
logDebug(
|
|
15881
|
-
`Response from
|
|
15929
|
+
`Response from delete_session_async: ${JSON.stringify(response)}`
|
|
15882
15930
|
);
|
|
15883
15931
|
const requestId = extractRequestId(response) || "";
|
|
15884
15932
|
const responseBody = response.body;
|
|
15885
15933
|
const success = responseBody?.success !== false;
|
|
15886
15934
|
if (!success) {
|
|
15887
15935
|
const errorMessage = `[${responseBody?.code || "Unknown"}] ${responseBody?.message || "Failed to delete session"}`;
|
|
15936
|
+
logAPIResponseWithDetails(
|
|
15937
|
+
"DeleteSessionAsync",
|
|
15938
|
+
requestId,
|
|
15939
|
+
false,
|
|
15940
|
+
{},
|
|
15941
|
+
JSON.stringify(responseBody, null, 2)
|
|
15942
|
+
);
|
|
15888
15943
|
return {
|
|
15889
15944
|
requestId,
|
|
15890
15945
|
success: false,
|
|
15891
15946
|
errorMessage
|
|
15892
15947
|
};
|
|
15893
15948
|
}
|
|
15949
|
+
logInfo(`\u{1F504} Waiting for session ${this.sessionId} to be deleted...`);
|
|
15950
|
+
const pollTimeout = 5e4;
|
|
15951
|
+
const pollInterval = 1e3;
|
|
15952
|
+
const pollStartTime = Date.now();
|
|
15953
|
+
while (true) {
|
|
15954
|
+
const elapsedTime = Date.now() - pollStartTime;
|
|
15955
|
+
if (elapsedTime >= pollTimeout) {
|
|
15956
|
+
const errorMessage = `Timeout waiting for session deletion after ${pollTimeout}ms`;
|
|
15957
|
+
logWarn(`\u23F1\uFE0F ${errorMessage}`);
|
|
15958
|
+
return {
|
|
15959
|
+
requestId,
|
|
15960
|
+
success: false,
|
|
15961
|
+
errorMessage
|
|
15962
|
+
};
|
|
15963
|
+
}
|
|
15964
|
+
const sessionResult = await this.agentBay.getSession(this.sessionId);
|
|
15965
|
+
if (!sessionResult.success) {
|
|
15966
|
+
const errorCode = sessionResult.code || "";
|
|
15967
|
+
const errorMessage = sessionResult.errorMessage || "";
|
|
15968
|
+
const httpStatusCode = sessionResult.httpStatusCode || 0;
|
|
15969
|
+
const isNotFound = errorCode === "InvalidMcpSession.NotFound" || httpStatusCode === 400 && (errorMessage.toLowerCase().includes("not found") || errorMessage.includes("NotFound") || errorCode.toLowerCase().includes("not found")) || errorMessage.toLowerCase().includes("not found");
|
|
15970
|
+
if (isNotFound) {
|
|
15971
|
+
logInfo(`\u2705 Session ${this.sessionId} successfully deleted (NotFound)`);
|
|
15972
|
+
break;
|
|
15973
|
+
} else {
|
|
15974
|
+
logDebug(`\u26A0\uFE0F Get session error (will retry): ${errorMessage}`);
|
|
15975
|
+
}
|
|
15976
|
+
} else if (sessionResult.data && sessionResult.data.status) {
|
|
15977
|
+
const status = sessionResult.data.status;
|
|
15978
|
+
logDebug(`\u{1F4CA} Session status: ${status}`);
|
|
15979
|
+
if (status === "FINISH") {
|
|
15980
|
+
logInfo(`\u2705 Session ${this.sessionId} successfully deleted`);
|
|
15981
|
+
break;
|
|
15982
|
+
}
|
|
15983
|
+
}
|
|
15984
|
+
await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
|
|
15985
|
+
}
|
|
15986
|
+
logAPIResponseWithDetails(
|
|
15987
|
+
"DeleteSessionAsync",
|
|
15988
|
+
requestId,
|
|
15989
|
+
true,
|
|
15990
|
+
{ sessionId: this.sessionId }
|
|
15991
|
+
);
|
|
15894
15992
|
return {
|
|
15895
15993
|
requestId,
|
|
15896
15994
|
success: true
|
|
15897
15995
|
};
|
|
15898
15996
|
} catch (error) {
|
|
15899
|
-
logError("Error calling
|
|
15997
|
+
logError("Error calling delete_session_async:", error);
|
|
15900
15998
|
return {
|
|
15901
15999
|
requestId: "",
|
|
15902
16000
|
success: false,
|
|
@@ -17090,6 +17188,9 @@ var _AgentBay = class _AgentBay {
|
|
|
17090
17188
|
const request = new CreateMcpSessionRequest({
|
|
17091
17189
|
authorization: "Bearer " + this.apiKey
|
|
17092
17190
|
});
|
|
17191
|
+
if (params.enableBrowserReplay === false) {
|
|
17192
|
+
request.enableRecord = false;
|
|
17193
|
+
}
|
|
17093
17194
|
const framework = params?.framework || "";
|
|
17094
17195
|
const sdkStatsJson = `{"source":"sdk","sdk_language":"typescript","sdk_version":"${VERSION}","is_release":${IS_RELEASE},"framework":"${framework}"}`;
|
|
17095
17196
|
request.sdkStats = sdkStatsJson;
|
|
@@ -17610,7 +17711,7 @@ var _AgentBay = class _AgentBay {
|
|
|
17610
17711
|
const errorStr = String(error);
|
|
17611
17712
|
const errorCode = error?.data?.Code || error?.code || "";
|
|
17612
17713
|
if (errorCode === "InvalidMcpSession.NotFound" || errorStr.includes("NotFound")) {
|
|
17613
|
-
|
|
17714
|
+
logInfo(`Session not found: ${sessionId}`);
|
|
17614
17715
|
logDebug(`GetSession error details: ${errorStr}`);
|
|
17615
17716
|
return {
|
|
17616
17717
|
requestId: "",
|
|
@@ -18768,7 +18869,7 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
18768
18869
|
this.labels = {};
|
|
18769
18870
|
this.contextSync = [];
|
|
18770
18871
|
this.isVpc = false;
|
|
18771
|
-
this.enableBrowserReplay =
|
|
18872
|
+
this.enableBrowserReplay = void 0;
|
|
18772
18873
|
}
|
|
18773
18874
|
/**
|
|
18774
18875
|
* WithLabels sets the labels for the session parameters and returns the updated parameters.
|
|
@@ -18965,7 +19066,7 @@ var _CreateSessionParams = class _CreateSessionParams {
|
|
|
18965
19066
|
}
|
|
18966
19067
|
params.isVpc = config.isVpc || false;
|
|
18967
19068
|
params.policyId = config.policyId;
|
|
18968
|
-
params.enableBrowserReplay = config.enableBrowserReplay
|
|
19069
|
+
params.enableBrowserReplay = config.enableBrowserReplay;
|
|
18969
19070
|
params.extraConfigs = config.extraConfigs;
|
|
18970
19071
|
return params;
|
|
18971
19072
|
}
|
|
@@ -19025,6 +19126,9 @@ export {
|
|
|
19025
19126
|
DeleteContextRequest,
|
|
19026
19127
|
DeleteContextResponse,
|
|
19027
19128
|
DeleteContextResponseBody,
|
|
19129
|
+
DeleteSessionAsyncRequest,
|
|
19130
|
+
DeleteSessionAsyncResponse,
|
|
19131
|
+
DeleteSessionAsyncResponseBody,
|
|
19028
19132
|
DescribeContextFilesRequest,
|
|
19029
19133
|
DescribeContextFilesResponse,
|
|
19030
19134
|
DescribeContextFilesResponseBody,
|