wuying-agentbay-sdk 0.4.0 → 0.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +274 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +110 -5
- package/dist/index.d.ts +110 -5
- package/dist/index.mjs +274 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1753,6 +1753,11 @@ declare class ContextSync {
|
|
|
1753
1753
|
constructor(contextId: string, path: string, policy?: SyncPolicy);
|
|
1754
1754
|
withPolicy(policy: SyncPolicy): ContextSync;
|
|
1755
1755
|
}
|
|
1756
|
+
declare function newUploadPolicy(): UploadPolicy;
|
|
1757
|
+
declare function newDownloadPolicy(): DownloadPolicy;
|
|
1758
|
+
declare function newDeletePolicy(): DeletePolicy;
|
|
1759
|
+
declare function newSyncPolicy(): SyncPolicy;
|
|
1760
|
+
declare function newContextSync(contextId: string, path: string, policy?: SyncPolicy): ContextSync;
|
|
1756
1761
|
|
|
1757
1762
|
/**
|
|
1758
1763
|
* Represents an installed application.
|
|
@@ -1913,6 +1918,10 @@ interface ContextStatusData {
|
|
|
1913
1918
|
finishTime: number;
|
|
1914
1919
|
taskType: string;
|
|
1915
1920
|
}
|
|
1921
|
+
interface ContextStatusItem {
|
|
1922
|
+
type: string;
|
|
1923
|
+
data: string;
|
|
1924
|
+
}
|
|
1916
1925
|
interface ContextInfoResult extends ApiResponse {
|
|
1917
1926
|
contextStatusData: ContextStatusData[];
|
|
1918
1927
|
}
|
|
@@ -1932,6 +1941,7 @@ declare class ContextManager {
|
|
|
1932
1941
|
sync(): Promise<ContextSyncResult>;
|
|
1933
1942
|
syncWithParams(contextId?: string, path?: string, mode?: string): Promise<ContextSyncResult>;
|
|
1934
1943
|
}
|
|
1944
|
+
declare function newContextManager(session: SessionInterface): ContextManager;
|
|
1935
1945
|
|
|
1936
1946
|
/**
|
|
1937
1947
|
* FileInfo represents information about a file or directory
|
|
@@ -2414,9 +2424,10 @@ declare class Session {
|
|
|
2414
2424
|
/**
|
|
2415
2425
|
* Delete this session.
|
|
2416
2426
|
*
|
|
2427
|
+
* @param syncContext - Whether to sync context data (trigger file uploads) before deleting the session. Defaults to false.
|
|
2417
2428
|
* @returns DeleteResult indicating success or failure and request ID
|
|
2418
2429
|
*/
|
|
2419
|
-
delete(): Promise<DeleteResult>;
|
|
2430
|
+
delete(syncContext?: boolean): Promise<DeleteResult>;
|
|
2420
2431
|
/**
|
|
2421
2432
|
* Sets the labels for this session.
|
|
2422
2433
|
*
|
|
@@ -2488,7 +2499,7 @@ interface SessionListResult extends ApiResponse {
|
|
|
2488
2499
|
/**
|
|
2489
2500
|
* Parameters for creating a session.
|
|
2490
2501
|
*/
|
|
2491
|
-
interface CreateSessionParams {
|
|
2502
|
+
interface CreateSessionParams$1 {
|
|
2492
2503
|
contextId?: string;
|
|
2493
2504
|
labels?: Record<string, string>;
|
|
2494
2505
|
imageId?: string;
|
|
@@ -2524,7 +2535,7 @@ declare class AgentBay {
|
|
|
2524
2535
|
* @param params - Optional parameters for creating the session
|
|
2525
2536
|
* @returns SessionResult containing the created session and request ID
|
|
2526
2537
|
*/
|
|
2527
|
-
create(params?: CreateSessionParams): Promise<SessionResult>;
|
|
2538
|
+
create(params?: CreateSessionParams$1): Promise<SessionResult>;
|
|
2528
2539
|
/**
|
|
2529
2540
|
* List all available sessions.
|
|
2530
2541
|
*
|
|
@@ -2545,9 +2556,10 @@ declare class AgentBay {
|
|
|
2545
2556
|
* Delete a session by session object.
|
|
2546
2557
|
*
|
|
2547
2558
|
* @param session - The session to delete.
|
|
2559
|
+
* @param syncContext - Whether to sync context data (trigger file uploads) before deleting the session. Defaults to false.
|
|
2548
2560
|
* @returns DeleteResult indicating success or failure and request ID
|
|
2549
2561
|
*/
|
|
2550
|
-
delete(session: Session): Promise<DeleteResult>;
|
|
2562
|
+
delete(session: Session, syncContext?: boolean): Promise<DeleteResult>;
|
|
2551
2563
|
/**
|
|
2552
2564
|
*
|
|
2553
2565
|
* @param sessionId - The ID of the session to remove.
|
|
@@ -2614,6 +2626,99 @@ declare class UIError extends AgentBayError {
|
|
|
2614
2626
|
constructor(message?: string, extra?: Record<string, any>);
|
|
2615
2627
|
}
|
|
2616
2628
|
|
|
2629
|
+
/**
|
|
2630
|
+
* Configuration interface for CreateSessionParams
|
|
2631
|
+
*/
|
|
2632
|
+
interface CreateSessionParamsConfig {
|
|
2633
|
+
labels: Record<string, string>;
|
|
2634
|
+
/**
|
|
2635
|
+
* @deprecated This field is deprecated and will be removed in a future version.
|
|
2636
|
+
* Please use contextSync instead for more flexible and powerful data persistence.
|
|
2637
|
+
*/
|
|
2638
|
+
contextId?: string;
|
|
2639
|
+
imageId?: string;
|
|
2640
|
+
contextSync: ContextSync[];
|
|
2641
|
+
}
|
|
2642
|
+
/**
|
|
2643
|
+
* CreateSessionParams provides a way to configure the parameters for creating a new session
|
|
2644
|
+
* in the AgentBay cloud environment.
|
|
2645
|
+
*/
|
|
2646
|
+
declare class CreateSessionParams implements CreateSessionParamsConfig {
|
|
2647
|
+
/** Custom labels for the Session. These can be used for organizing and filtering sessions. */
|
|
2648
|
+
labels: Record<string, string>;
|
|
2649
|
+
/**
|
|
2650
|
+
* ID of the context to bind to the session.
|
|
2651
|
+
* The context can include various types of persistence like file system (volume) and cookies.
|
|
2652
|
+
*
|
|
2653
|
+
* @deprecated This field is deprecated and will be removed in a future version.
|
|
2654
|
+
* Please use contextSync instead for more flexible and powerful data persistence.
|
|
2655
|
+
*
|
|
2656
|
+
* Important Limitations:
|
|
2657
|
+
* 1. One session at a time: A context can only be used by one session at a time.
|
|
2658
|
+
* If you try to create a session with a context ID that is already in use by another active session,
|
|
2659
|
+
* the session creation will fail.
|
|
2660
|
+
*
|
|
2661
|
+
* 2. OS binding: A context is bound to the operating system of the first session that uses it.
|
|
2662
|
+
* When a context is first used with a session, it becomes bound to that session's OS.
|
|
2663
|
+
* Any attempt to use the context with a session running on a different OS will fail.
|
|
2664
|
+
* For example, if a context is first used with a Linux session, it cannot later be used
|
|
2665
|
+
* with a Windows or Android session.
|
|
2666
|
+
*/
|
|
2667
|
+
contextId?: string;
|
|
2668
|
+
/** Image ID to use for the session. */
|
|
2669
|
+
imageId?: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* List of context synchronization configurations.
|
|
2672
|
+
* These configurations define how contexts should be synchronized and mounted.
|
|
2673
|
+
*/
|
|
2674
|
+
contextSync: ContextSync[];
|
|
2675
|
+
constructor();
|
|
2676
|
+
/**
|
|
2677
|
+
* WithLabels sets the labels for the session parameters and returns the updated parameters.
|
|
2678
|
+
*/
|
|
2679
|
+
withLabels(labels: Record<string, string>): CreateSessionParams;
|
|
2680
|
+
/**
|
|
2681
|
+
* WithContextID sets the context ID for the session parameters and returns the updated parameters.
|
|
2682
|
+
*/
|
|
2683
|
+
withContextID(contextId: string): CreateSessionParams;
|
|
2684
|
+
/**
|
|
2685
|
+
* WithImageId sets the image ID for the session parameters and returns the updated parameters.
|
|
2686
|
+
*/
|
|
2687
|
+
withImageId(imageId: string): CreateSessionParams;
|
|
2688
|
+
/**
|
|
2689
|
+
* GetLabelsJSON returns the labels as a JSON string.
|
|
2690
|
+
* Returns an object with success status and result/error message to match Go version behavior.
|
|
2691
|
+
*/
|
|
2692
|
+
getLabelsJSON(): {
|
|
2693
|
+
result: string;
|
|
2694
|
+
error?: string;
|
|
2695
|
+
};
|
|
2696
|
+
/**
|
|
2697
|
+
* AddContextSync adds a context sync configuration to the session parameters.
|
|
2698
|
+
*/
|
|
2699
|
+
addContextSync(contextId: string, path: string, policy?: SyncPolicy): CreateSessionParams;
|
|
2700
|
+
/**
|
|
2701
|
+
* AddContextSyncConfig adds a pre-configured context sync to the session parameters.
|
|
2702
|
+
*/
|
|
2703
|
+
addContextSyncConfig(contextSync: ContextSync): CreateSessionParams;
|
|
2704
|
+
/**
|
|
2705
|
+
* WithContextSync sets the context sync configurations for the session parameters.
|
|
2706
|
+
*/
|
|
2707
|
+
withContextSync(contextSyncs: ContextSync[]): CreateSessionParams;
|
|
2708
|
+
/**
|
|
2709
|
+
* Convert to plain object for JSON serialization
|
|
2710
|
+
*/
|
|
2711
|
+
toJSON(): CreateSessionParamsConfig;
|
|
2712
|
+
/**
|
|
2713
|
+
* Create from plain object
|
|
2714
|
+
*/
|
|
2715
|
+
static fromJSON(config: CreateSessionParamsConfig): CreateSessionParams;
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* NewCreateSessionParams creates a new CreateSessionParams with default values.
|
|
2719
|
+
*/
|
|
2720
|
+
declare function newCreateSessionParams(): CreateSessionParams;
|
|
2721
|
+
|
|
2617
2722
|
/**
|
|
2618
2723
|
* Utility functions for logging in a clean format
|
|
2619
2724
|
*/
|
|
@@ -2630,4 +2735,4 @@ declare function log(message: string, ...args: any[]): void;
|
|
|
2630
2735
|
*/
|
|
2631
2736
|
declare function logError(message: string, error?: any): void;
|
|
2632
2737
|
|
|
2633
|
-
export { APIError, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, Context, ContextService, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DirectoryEntry, FileError, type FileInfo, FileSystem, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, type InstalledApp, KeyCode, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, Oss, OssError, type Process, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, UI, type UIElement, UIError, log, logError };
|
|
2738
|
+
export { APIError, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, type CreateSessionParams$1 as CreateSessionParams, type CreateSessionParamsConfig, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, FileError, type FileInfo, FileSystem, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, type InstalledApp, KeyCode, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, Oss, OssError, type Process, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, type SessionInterface, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, UI, type UIElement, UIError, type UploadPolicy, UploadStrategy, type WhiteList, log, logError, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newSyncPolicy, newUploadPolicy };
|
package/dist/index.d.ts
CHANGED
|
@@ -1753,6 +1753,11 @@ declare class ContextSync {
|
|
|
1753
1753
|
constructor(contextId: string, path: string, policy?: SyncPolicy);
|
|
1754
1754
|
withPolicy(policy: SyncPolicy): ContextSync;
|
|
1755
1755
|
}
|
|
1756
|
+
declare function newUploadPolicy(): UploadPolicy;
|
|
1757
|
+
declare function newDownloadPolicy(): DownloadPolicy;
|
|
1758
|
+
declare function newDeletePolicy(): DeletePolicy;
|
|
1759
|
+
declare function newSyncPolicy(): SyncPolicy;
|
|
1760
|
+
declare function newContextSync(contextId: string, path: string, policy?: SyncPolicy): ContextSync;
|
|
1756
1761
|
|
|
1757
1762
|
/**
|
|
1758
1763
|
* Represents an installed application.
|
|
@@ -1913,6 +1918,10 @@ interface ContextStatusData {
|
|
|
1913
1918
|
finishTime: number;
|
|
1914
1919
|
taskType: string;
|
|
1915
1920
|
}
|
|
1921
|
+
interface ContextStatusItem {
|
|
1922
|
+
type: string;
|
|
1923
|
+
data: string;
|
|
1924
|
+
}
|
|
1916
1925
|
interface ContextInfoResult extends ApiResponse {
|
|
1917
1926
|
contextStatusData: ContextStatusData[];
|
|
1918
1927
|
}
|
|
@@ -1932,6 +1941,7 @@ declare class ContextManager {
|
|
|
1932
1941
|
sync(): Promise<ContextSyncResult>;
|
|
1933
1942
|
syncWithParams(contextId?: string, path?: string, mode?: string): Promise<ContextSyncResult>;
|
|
1934
1943
|
}
|
|
1944
|
+
declare function newContextManager(session: SessionInterface): ContextManager;
|
|
1935
1945
|
|
|
1936
1946
|
/**
|
|
1937
1947
|
* FileInfo represents information about a file or directory
|
|
@@ -2414,9 +2424,10 @@ declare class Session {
|
|
|
2414
2424
|
/**
|
|
2415
2425
|
* Delete this session.
|
|
2416
2426
|
*
|
|
2427
|
+
* @param syncContext - Whether to sync context data (trigger file uploads) before deleting the session. Defaults to false.
|
|
2417
2428
|
* @returns DeleteResult indicating success or failure and request ID
|
|
2418
2429
|
*/
|
|
2419
|
-
delete(): Promise<DeleteResult>;
|
|
2430
|
+
delete(syncContext?: boolean): Promise<DeleteResult>;
|
|
2420
2431
|
/**
|
|
2421
2432
|
* Sets the labels for this session.
|
|
2422
2433
|
*
|
|
@@ -2488,7 +2499,7 @@ interface SessionListResult extends ApiResponse {
|
|
|
2488
2499
|
/**
|
|
2489
2500
|
* Parameters for creating a session.
|
|
2490
2501
|
*/
|
|
2491
|
-
interface CreateSessionParams {
|
|
2502
|
+
interface CreateSessionParams$1 {
|
|
2492
2503
|
contextId?: string;
|
|
2493
2504
|
labels?: Record<string, string>;
|
|
2494
2505
|
imageId?: string;
|
|
@@ -2524,7 +2535,7 @@ declare class AgentBay {
|
|
|
2524
2535
|
* @param params - Optional parameters for creating the session
|
|
2525
2536
|
* @returns SessionResult containing the created session and request ID
|
|
2526
2537
|
*/
|
|
2527
|
-
create(params?: CreateSessionParams): Promise<SessionResult>;
|
|
2538
|
+
create(params?: CreateSessionParams$1): Promise<SessionResult>;
|
|
2528
2539
|
/**
|
|
2529
2540
|
* List all available sessions.
|
|
2530
2541
|
*
|
|
@@ -2545,9 +2556,10 @@ declare class AgentBay {
|
|
|
2545
2556
|
* Delete a session by session object.
|
|
2546
2557
|
*
|
|
2547
2558
|
* @param session - The session to delete.
|
|
2559
|
+
* @param syncContext - Whether to sync context data (trigger file uploads) before deleting the session. Defaults to false.
|
|
2548
2560
|
* @returns DeleteResult indicating success or failure and request ID
|
|
2549
2561
|
*/
|
|
2550
|
-
delete(session: Session): Promise<DeleteResult>;
|
|
2562
|
+
delete(session: Session, syncContext?: boolean): Promise<DeleteResult>;
|
|
2551
2563
|
/**
|
|
2552
2564
|
*
|
|
2553
2565
|
* @param sessionId - The ID of the session to remove.
|
|
@@ -2614,6 +2626,99 @@ declare class UIError extends AgentBayError {
|
|
|
2614
2626
|
constructor(message?: string, extra?: Record<string, any>);
|
|
2615
2627
|
}
|
|
2616
2628
|
|
|
2629
|
+
/**
|
|
2630
|
+
* Configuration interface for CreateSessionParams
|
|
2631
|
+
*/
|
|
2632
|
+
interface CreateSessionParamsConfig {
|
|
2633
|
+
labels: Record<string, string>;
|
|
2634
|
+
/**
|
|
2635
|
+
* @deprecated This field is deprecated and will be removed in a future version.
|
|
2636
|
+
* Please use contextSync instead for more flexible and powerful data persistence.
|
|
2637
|
+
*/
|
|
2638
|
+
contextId?: string;
|
|
2639
|
+
imageId?: string;
|
|
2640
|
+
contextSync: ContextSync[];
|
|
2641
|
+
}
|
|
2642
|
+
/**
|
|
2643
|
+
* CreateSessionParams provides a way to configure the parameters for creating a new session
|
|
2644
|
+
* in the AgentBay cloud environment.
|
|
2645
|
+
*/
|
|
2646
|
+
declare class CreateSessionParams implements CreateSessionParamsConfig {
|
|
2647
|
+
/** Custom labels for the Session. These can be used for organizing and filtering sessions. */
|
|
2648
|
+
labels: Record<string, string>;
|
|
2649
|
+
/**
|
|
2650
|
+
* ID of the context to bind to the session.
|
|
2651
|
+
* The context can include various types of persistence like file system (volume) and cookies.
|
|
2652
|
+
*
|
|
2653
|
+
* @deprecated This field is deprecated and will be removed in a future version.
|
|
2654
|
+
* Please use contextSync instead for more flexible and powerful data persistence.
|
|
2655
|
+
*
|
|
2656
|
+
* Important Limitations:
|
|
2657
|
+
* 1. One session at a time: A context can only be used by one session at a time.
|
|
2658
|
+
* If you try to create a session with a context ID that is already in use by another active session,
|
|
2659
|
+
* the session creation will fail.
|
|
2660
|
+
*
|
|
2661
|
+
* 2. OS binding: A context is bound to the operating system of the first session that uses it.
|
|
2662
|
+
* When a context is first used with a session, it becomes bound to that session's OS.
|
|
2663
|
+
* Any attempt to use the context with a session running on a different OS will fail.
|
|
2664
|
+
* For example, if a context is first used with a Linux session, it cannot later be used
|
|
2665
|
+
* with a Windows or Android session.
|
|
2666
|
+
*/
|
|
2667
|
+
contextId?: string;
|
|
2668
|
+
/** Image ID to use for the session. */
|
|
2669
|
+
imageId?: string;
|
|
2670
|
+
/**
|
|
2671
|
+
* List of context synchronization configurations.
|
|
2672
|
+
* These configurations define how contexts should be synchronized and mounted.
|
|
2673
|
+
*/
|
|
2674
|
+
contextSync: ContextSync[];
|
|
2675
|
+
constructor();
|
|
2676
|
+
/**
|
|
2677
|
+
* WithLabels sets the labels for the session parameters and returns the updated parameters.
|
|
2678
|
+
*/
|
|
2679
|
+
withLabels(labels: Record<string, string>): CreateSessionParams;
|
|
2680
|
+
/**
|
|
2681
|
+
* WithContextID sets the context ID for the session parameters and returns the updated parameters.
|
|
2682
|
+
*/
|
|
2683
|
+
withContextID(contextId: string): CreateSessionParams;
|
|
2684
|
+
/**
|
|
2685
|
+
* WithImageId sets the image ID for the session parameters and returns the updated parameters.
|
|
2686
|
+
*/
|
|
2687
|
+
withImageId(imageId: string): CreateSessionParams;
|
|
2688
|
+
/**
|
|
2689
|
+
* GetLabelsJSON returns the labels as a JSON string.
|
|
2690
|
+
* Returns an object with success status and result/error message to match Go version behavior.
|
|
2691
|
+
*/
|
|
2692
|
+
getLabelsJSON(): {
|
|
2693
|
+
result: string;
|
|
2694
|
+
error?: string;
|
|
2695
|
+
};
|
|
2696
|
+
/**
|
|
2697
|
+
* AddContextSync adds a context sync configuration to the session parameters.
|
|
2698
|
+
*/
|
|
2699
|
+
addContextSync(contextId: string, path: string, policy?: SyncPolicy): CreateSessionParams;
|
|
2700
|
+
/**
|
|
2701
|
+
* AddContextSyncConfig adds a pre-configured context sync to the session parameters.
|
|
2702
|
+
*/
|
|
2703
|
+
addContextSyncConfig(contextSync: ContextSync): CreateSessionParams;
|
|
2704
|
+
/**
|
|
2705
|
+
* WithContextSync sets the context sync configurations for the session parameters.
|
|
2706
|
+
*/
|
|
2707
|
+
withContextSync(contextSyncs: ContextSync[]): CreateSessionParams;
|
|
2708
|
+
/**
|
|
2709
|
+
* Convert to plain object for JSON serialization
|
|
2710
|
+
*/
|
|
2711
|
+
toJSON(): CreateSessionParamsConfig;
|
|
2712
|
+
/**
|
|
2713
|
+
* Create from plain object
|
|
2714
|
+
*/
|
|
2715
|
+
static fromJSON(config: CreateSessionParamsConfig): CreateSessionParams;
|
|
2716
|
+
}
|
|
2717
|
+
/**
|
|
2718
|
+
* NewCreateSessionParams creates a new CreateSessionParams with default values.
|
|
2719
|
+
*/
|
|
2720
|
+
declare function newCreateSessionParams(): CreateSessionParams;
|
|
2721
|
+
|
|
2617
2722
|
/**
|
|
2618
2723
|
* Utility functions for logging in a clean format
|
|
2619
2724
|
*/
|
|
@@ -2630,4 +2735,4 @@ declare function log(message: string, ...args: any[]): void;
|
|
|
2630
2735
|
*/
|
|
2631
2736
|
declare function logError(message: string, error?: any): void;
|
|
2632
2737
|
|
|
2633
|
-
export { APIError, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, Context, ContextService, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DirectoryEntry, FileError, type FileInfo, FileSystem, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, type InstalledApp, KeyCode, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, Oss, OssError, type Process, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, UI, type UIElement, UIError, log, logError };
|
|
2738
|
+
export { APIError, AgentBay, AgentBayError, Application, ApplicationError, ApplyMqttTokenRequest, ApplyMqttTokenResponse, ApplyMqttTokenResponseBody, ApplyMqttTokenResponseBodyData, AuthenticationError, type BWList, CallMcpToolRequest, CallMcpToolResponse, CallMcpToolResponseBody, Client, Command, CommandError, Context, type ContextInfoResult, ContextManager, ContextService, type ContextStatusData, type ContextStatusItem, ContextSync, type ContextSyncResult, CreateMcpSessionRequest, CreateMcpSessionRequestPersistenceDataList, CreateMcpSessionResponse, CreateMcpSessionResponseBody, CreateMcpSessionResponseBodyData, CreateMcpSessionShrinkRequest, type CreateSessionParams$1 as CreateSessionParams, type CreateSessionParamsConfig, DeleteContextRequest, DeleteContextResponse, DeleteContextResponseBody, type DeletePolicy, type DirectoryEntry, type DownloadPolicy, DownloadStrategy, FileError, type FileInfo, FileSystem, GetContextInfoRequest, GetContextInfoResponse, GetContextInfoResponseBody, GetContextInfoResponseBodyData, GetContextRequest, GetContextResponse, GetContextResponseBody, GetContextResponseBodyData, GetLabelRequest, GetLabelResponse, GetLabelResponseBody, GetLabelResponseBodyData, GetLinkRequest, GetLinkResponse, GetLinkResponseBody, GetLinkResponseBodyData, GetMcpResourceRequest, GetMcpResourceResponse, GetMcpResourceResponseBody, GetMcpResourceResponseBodyData, GetMcpResourceResponseBodyDataDesktopInfo, type InstalledApp, KeyCode, ListContextsRequest, ListContextsResponse, ListContextsResponseBody, ListContextsResponseBodyData, ListMcpToolsRequest, ListMcpToolsResponse, ListMcpToolsResponseBody, type ListSessionParams, ListSessionRequest, ListSessionResponse, ListSessionResponseBody, ListSessionResponseBodyData, ModifyContextRequest, ModifyContextResponse, ModifyContextResponseBody, Oss, OssError, type Process, ReleaseMcpSessionRequest, ReleaseMcpSessionResponse, ReleaseMcpSessionResponseBody, Session, SessionError, type SessionInterface, SetLabelRequest, SetLabelResponse, SetLabelResponseBody, SyncContextRequest, SyncContextResponse, SyncContextResponseBody, type SyncPolicy, UI, type UIElement, UIError, type UploadPolicy, UploadStrategy, type WhiteList, log, logError, newContextManager, newContextSync, newCreateSessionParams, newDeletePolicy, newDownloadPolicy, newSyncPolicy, newUploadPolicy };
|