@agentrun/sdk 0.0.1-test.70561fe → 0.0.1-test.eab07a8

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.cts CHANGED
@@ -2,7 +2,7 @@ import * as openai_core_streaming from 'openai/core/streaming';
2
2
  import * as openai_resources from 'openai/resources';
3
3
  import { ChatCompletionMessageParam } from 'openai/resources';
4
4
  import * as $AgentRun from '@alicloud/agentrun20250910';
5
- import $AgentRun__default from '@alicloud/agentrun20250910';
5
+ import * as ai from 'ai';
6
6
  import * as $Devs from '@alicloud/devs20230714';
7
7
 
8
8
  /**
@@ -1022,6 +1022,8 @@ declare class AgentRuntimeClient {
1022
1022
  * This module defines the base class for control API.
1023
1023
  */
1024
1024
 
1025
+ declare const $AgentRunClient: any;
1026
+ type Client = InstanceType<typeof $AgentRunClient>;
1025
1027
  /**
1026
1028
  * Base class for Control API clients
1027
1029
  *
@@ -1034,7 +1036,7 @@ declare class ControlAPI {
1034
1036
  /**
1035
1037
  * Get the underlying AgentRun client instance
1036
1038
  */
1037
- getClient(config?: Config): $AgentRun__default;
1039
+ getClient(config?: Config): Client;
1038
1040
  }
1039
1041
 
1040
1042
  /**
@@ -1813,26 +1815,6 @@ declare class BrowserDataAPI extends SandboxDataAPI {
1813
1815
  * Generate the WebSocket URL for VNC (Virtual Network Computing) live view connection
1814
1816
  */
1815
1817
  getVncUrl(record?: boolean): string;
1816
- /**
1817
- * Get Playwright sync wrapper
1818
- *
1819
- * Note: Implementation pending - requires playwright integration
1820
- */
1821
- syncPlaywright(params?: {
1822
- browserType?: string;
1823
- record?: boolean;
1824
- config?: Config;
1825
- }): any;
1826
- /**
1827
- * Get Playwright async wrapper
1828
- *
1829
- * Note: Implementation pending - requires playwright integration
1830
- */
1831
- asyncPlaywright(params?: {
1832
- browserType?: string;
1833
- record?: boolean;
1834
- config?: Config;
1835
- }): any;
1836
1818
  /**
1837
1819
  * List all recordings
1838
1820
  */
@@ -2151,6 +2133,7 @@ declare class Sandbox implements SandboxData {
2151
2133
  */
2152
2134
  static get(params: {
2153
2135
  id: string;
2136
+ templateType?: TemplateType;
2154
2137
  config?: Config;
2155
2138
  }): Promise<Sandbox>;
2156
2139
  /**
@@ -2239,26 +2222,6 @@ declare class BrowserSandbox extends Sandbox {
2239
2222
  * Get VNC WebSocket URL for live view
2240
2223
  */
2241
2224
  getVncUrl(record?: boolean): string;
2242
- /**
2243
- * Get Playwright sync wrapper
2244
- *
2245
- * Note: Implementation pending - requires playwright integration
2246
- */
2247
- syncPlaywright(params?: {
2248
- browserType?: string;
2249
- record?: boolean;
2250
- config?: Config;
2251
- }): any;
2252
- /**
2253
- * Get Playwright async wrapper
2254
- *
2255
- * Note: Implementation pending - requires playwright integration
2256
- */
2257
- asyncPlaywright(params?: {
2258
- browserType?: string;
2259
- record?: boolean;
2260
- config?: Config;
2261
- }): any;
2262
2225
  /**
2263
2226
  * List all recordings
2264
2227
  */
@@ -2924,9 +2887,14 @@ declare class SandboxClient {
2924
2887
  }) => Promise<Sandbox>;
2925
2888
  /**
2926
2889
  * Get a Sandbox
2890
+ *
2891
+ * @param params.id - Sandbox ID
2892
+ * @param params.templateType - Template type to cast the result to the appropriate subclass
2893
+ * @param params.config - Configuration
2927
2894
  */
2928
2895
  getSandbox: (params: {
2929
2896
  id: string;
2897
+ templateType?: TemplateType;
2930
2898
  config?: Config;
2931
2899
  }) => Promise<Sandbox>;
2932
2900
  /**
@@ -3243,6 +3211,15 @@ declare class AioSandbox extends Sandbox {
3243
3211
  filename: string;
3244
3212
  config?: Config;
3245
3213
  }) => Promise<any>;
3214
+ /**
3215
+ * Execute code (convenience method delegating to context.execute)
3216
+ */
3217
+ execute: (params: {
3218
+ code: string;
3219
+ language?: CodeLanguage;
3220
+ contextId?: string;
3221
+ timeout?: number;
3222
+ }) => Promise<any>;
3246
3223
  }
3247
3224
 
3248
3225
  /**
@@ -3460,13 +3437,6 @@ interface ModelProxyListInput extends PageableInput {
3460
3437
  status?: Status;
3461
3438
  }
3462
3439
 
3463
- /**
3464
- * Model Proxy 高层 API / Model Proxy High-Level API
3465
- *
3466
- * 此模块定义模型代理资源的高级API。
3467
- * This module defines the high-level API for model proxy resources.
3468
- */
3469
-
3470
3440
  /**
3471
3441
  * 模型代理 / Model Proxy
3472
3442
  */
@@ -3614,7 +3584,7 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
3614
3584
  stream?: boolean;
3615
3585
  config?: Config;
3616
3586
  [key: string]: any;
3617
- }) => Promise<any>;
3587
+ }) => Promise<ai.StreamTextResult<Record<string, ai.CoreTool>, never> | ai.GenerateTextResult<Record<string, ai.CoreTool>, never>>;
3618
3588
  /**
3619
3589
  * 获取响应 / Get responses
3620
3590
  *
@@ -3642,13 +3612,6 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
3642
3612
  }, config?: Config) => Promise<ModelProxy>;
3643
3613
  }
3644
3614
 
3645
- /**
3646
- * Model Service 高层 API / Model Service High-Level API
3647
- *
3648
- * 此模块定义模型服务资源的高级API。
3649
- * This module defines the high-level API for model service resources.
3650
- */
3651
-
3652
3615
  /**
3653
3616
  * 模型服务 / Model Service
3654
3617
  */
@@ -3793,7 +3756,7 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
3793
3756
  stream?: boolean;
3794
3757
  config?: Config;
3795
3758
  [key: string]: any;
3796
- }) => Promise<any>;
3759
+ }) => Promise<ai.StreamTextResult<Record<string, ai.CoreTool>, never> | ai.GenerateTextResult<Record<string, ai.CoreTool>, never>>;
3797
3760
  /**
3798
3761
  * 获取响应 / Get responses
3799
3762
  *
package/dist/index.d.ts CHANGED
@@ -2,7 +2,7 @@ import * as openai_core_streaming from 'openai/core/streaming';
2
2
  import * as openai_resources from 'openai/resources';
3
3
  import { ChatCompletionMessageParam } from 'openai/resources';
4
4
  import * as $AgentRun from '@alicloud/agentrun20250910';
5
- import $AgentRun__default from '@alicloud/agentrun20250910';
5
+ import * as ai from 'ai';
6
6
  import * as $Devs from '@alicloud/devs20230714';
7
7
 
8
8
  /**
@@ -1022,6 +1022,8 @@ declare class AgentRuntimeClient {
1022
1022
  * This module defines the base class for control API.
1023
1023
  */
1024
1024
 
1025
+ declare const $AgentRunClient: any;
1026
+ type Client = InstanceType<typeof $AgentRunClient>;
1025
1027
  /**
1026
1028
  * Base class for Control API clients
1027
1029
  *
@@ -1034,7 +1036,7 @@ declare class ControlAPI {
1034
1036
  /**
1035
1037
  * Get the underlying AgentRun client instance
1036
1038
  */
1037
- getClient(config?: Config): $AgentRun__default;
1039
+ getClient(config?: Config): Client;
1038
1040
  }
1039
1041
 
1040
1042
  /**
@@ -1813,26 +1815,6 @@ declare class BrowserDataAPI extends SandboxDataAPI {
1813
1815
  * Generate the WebSocket URL for VNC (Virtual Network Computing) live view connection
1814
1816
  */
1815
1817
  getVncUrl(record?: boolean): string;
1816
- /**
1817
- * Get Playwright sync wrapper
1818
- *
1819
- * Note: Implementation pending - requires playwright integration
1820
- */
1821
- syncPlaywright(params?: {
1822
- browserType?: string;
1823
- record?: boolean;
1824
- config?: Config;
1825
- }): any;
1826
- /**
1827
- * Get Playwright async wrapper
1828
- *
1829
- * Note: Implementation pending - requires playwright integration
1830
- */
1831
- asyncPlaywright(params?: {
1832
- browserType?: string;
1833
- record?: boolean;
1834
- config?: Config;
1835
- }): any;
1836
1818
  /**
1837
1819
  * List all recordings
1838
1820
  */
@@ -2151,6 +2133,7 @@ declare class Sandbox implements SandboxData {
2151
2133
  */
2152
2134
  static get(params: {
2153
2135
  id: string;
2136
+ templateType?: TemplateType;
2154
2137
  config?: Config;
2155
2138
  }): Promise<Sandbox>;
2156
2139
  /**
@@ -2239,26 +2222,6 @@ declare class BrowserSandbox extends Sandbox {
2239
2222
  * Get VNC WebSocket URL for live view
2240
2223
  */
2241
2224
  getVncUrl(record?: boolean): string;
2242
- /**
2243
- * Get Playwright sync wrapper
2244
- *
2245
- * Note: Implementation pending - requires playwright integration
2246
- */
2247
- syncPlaywright(params?: {
2248
- browserType?: string;
2249
- record?: boolean;
2250
- config?: Config;
2251
- }): any;
2252
- /**
2253
- * Get Playwright async wrapper
2254
- *
2255
- * Note: Implementation pending - requires playwright integration
2256
- */
2257
- asyncPlaywright(params?: {
2258
- browserType?: string;
2259
- record?: boolean;
2260
- config?: Config;
2261
- }): any;
2262
2225
  /**
2263
2226
  * List all recordings
2264
2227
  */
@@ -2924,9 +2887,14 @@ declare class SandboxClient {
2924
2887
  }) => Promise<Sandbox>;
2925
2888
  /**
2926
2889
  * Get a Sandbox
2890
+ *
2891
+ * @param params.id - Sandbox ID
2892
+ * @param params.templateType - Template type to cast the result to the appropriate subclass
2893
+ * @param params.config - Configuration
2927
2894
  */
2928
2895
  getSandbox: (params: {
2929
2896
  id: string;
2897
+ templateType?: TemplateType;
2930
2898
  config?: Config;
2931
2899
  }) => Promise<Sandbox>;
2932
2900
  /**
@@ -3243,6 +3211,15 @@ declare class AioSandbox extends Sandbox {
3243
3211
  filename: string;
3244
3212
  config?: Config;
3245
3213
  }) => Promise<any>;
3214
+ /**
3215
+ * Execute code (convenience method delegating to context.execute)
3216
+ */
3217
+ execute: (params: {
3218
+ code: string;
3219
+ language?: CodeLanguage;
3220
+ contextId?: string;
3221
+ timeout?: number;
3222
+ }) => Promise<any>;
3246
3223
  }
3247
3224
 
3248
3225
  /**
@@ -3460,13 +3437,6 @@ interface ModelProxyListInput extends PageableInput {
3460
3437
  status?: Status;
3461
3438
  }
3462
3439
 
3463
- /**
3464
- * Model Proxy 高层 API / Model Proxy High-Level API
3465
- *
3466
- * 此模块定义模型代理资源的高级API。
3467
- * This module defines the high-level API for model proxy resources.
3468
- */
3469
-
3470
3440
  /**
3471
3441
  * 模型代理 / Model Proxy
3472
3442
  */
@@ -3614,7 +3584,7 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
3614
3584
  stream?: boolean;
3615
3585
  config?: Config;
3616
3586
  [key: string]: any;
3617
- }) => Promise<any>;
3587
+ }) => Promise<ai.StreamTextResult<Record<string, ai.CoreTool>, never> | ai.GenerateTextResult<Record<string, ai.CoreTool>, never>>;
3618
3588
  /**
3619
3589
  * 获取响应 / Get responses
3620
3590
  *
@@ -3642,13 +3612,6 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
3642
3612
  }, config?: Config) => Promise<ModelProxy>;
3643
3613
  }
3644
3614
 
3645
- /**
3646
- * Model Service 高层 API / Model Service High-Level API
3647
- *
3648
- * 此模块定义模型服务资源的高级API。
3649
- * This module defines the high-level API for model service resources.
3650
- */
3651
-
3652
3615
  /**
3653
3616
  * 模型服务 / Model Service
3654
3617
  */
@@ -3793,7 +3756,7 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
3793
3756
  stream?: boolean;
3794
3757
  config?: Config;
3795
3758
  [key: string]: any;
3796
- }) => Promise<any>;
3759
+ }) => Promise<ai.StreamTextResult<Record<string, ai.CoreTool>, never> | ai.GenerateTextResult<Record<string, ai.CoreTool>, never>>;
3797
3760
  /**
3798
3761
  * 获取响应 / Get responses
3799
3762
  *