@agentrun/sdk 0.0.2-test.20909811203 → 0.0.2-test.20911071940
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 +148 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +389 -0
- package/dist/index.d.ts +389 -0
- package/dist/index.js +148 -10
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1760,10 +1760,14 @@ declare class SandboxDataAPI {
|
|
|
1760
1760
|
}>;
|
|
1761
1761
|
/**
|
|
1762
1762
|
* Create sandbox from template
|
|
1763
|
+
* 从模板创建沙箱 / Create Sandbox from Template
|
|
1763
1764
|
*/
|
|
1764
1765
|
createSandbox: (params: {
|
|
1765
1766
|
templateName: string;
|
|
1766
1767
|
sandboxIdleTimeoutSeconds?: number;
|
|
1768
|
+
nasConfig?: Record<string, any>;
|
|
1769
|
+
ossMountConfig?: Record<string, any>;
|
|
1770
|
+
polarFsConfig?: Record<string, any>;
|
|
1767
1771
|
config?: Config;
|
|
1768
1772
|
}) => Promise<any>;
|
|
1769
1773
|
/**
|
|
@@ -1900,6 +1904,140 @@ declare enum TemplateOSSPermission {
|
|
|
1900
1904
|
declare enum CodeLanguage {
|
|
1901
1905
|
PYTHON = "python"
|
|
1902
1906
|
}
|
|
1907
|
+
/**
|
|
1908
|
+
* NAS mount configuration
|
|
1909
|
+
* NAS 挂载配置 / NAS Mount Configuration
|
|
1910
|
+
*
|
|
1911
|
+
* 定义 NAS 文件系统的挂载配置。
|
|
1912
|
+
* Defines the mount configuration for NAS file system.
|
|
1913
|
+
*/
|
|
1914
|
+
interface NASMountConfig {
|
|
1915
|
+
/**
|
|
1916
|
+
* 是否启用 TLS 加密 / Whether to enable TLS encryption
|
|
1917
|
+
*/
|
|
1918
|
+
enableTLS?: boolean;
|
|
1919
|
+
/**
|
|
1920
|
+
* 挂载目录 / Mount Directory
|
|
1921
|
+
* @example "/home/test"
|
|
1922
|
+
*/
|
|
1923
|
+
mountDir?: string;
|
|
1924
|
+
/**
|
|
1925
|
+
* NAS 服务器地址 / NAS Server Address
|
|
1926
|
+
* @example "***-uni85.cn-hangzhou.nas.com:/"
|
|
1927
|
+
*/
|
|
1928
|
+
serverAddr?: string;
|
|
1929
|
+
}
|
|
1930
|
+
/**
|
|
1931
|
+
* NAS configuration
|
|
1932
|
+
* NAS 配置 / NAS Configuration
|
|
1933
|
+
*
|
|
1934
|
+
* 定义 NAS 文件系统的配置。
|
|
1935
|
+
* Defines the configuration for NAS file system.
|
|
1936
|
+
*/
|
|
1937
|
+
interface NASConfig {
|
|
1938
|
+
/**
|
|
1939
|
+
* 组 ID / Group ID
|
|
1940
|
+
* @example 100
|
|
1941
|
+
*/
|
|
1942
|
+
groupId?: number;
|
|
1943
|
+
/**
|
|
1944
|
+
* 挂载点列表 / Mount Points List
|
|
1945
|
+
*/
|
|
1946
|
+
mountPoints?: NASMountConfig[];
|
|
1947
|
+
/**
|
|
1948
|
+
* 用户 ID / User ID
|
|
1949
|
+
* @example 100
|
|
1950
|
+
*/
|
|
1951
|
+
userId?: number;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* OSS mount point
|
|
1955
|
+
* OSS 挂载点 / OSS Mount Point
|
|
1956
|
+
*
|
|
1957
|
+
* 定义 OSS 存储的挂载点配置。
|
|
1958
|
+
* Defines the mount point configuration for OSS storage.
|
|
1959
|
+
*/
|
|
1960
|
+
interface OSSMountPoint {
|
|
1961
|
+
/**
|
|
1962
|
+
* OSS 存储桶名称 / OSS Bucket Name
|
|
1963
|
+
* @example "my-bucket"
|
|
1964
|
+
*/
|
|
1965
|
+
bucketName?: string;
|
|
1966
|
+
/**
|
|
1967
|
+
* OSS 存储桶路径 / OSS Bucket Path
|
|
1968
|
+
* @example "/my-dir"
|
|
1969
|
+
*/
|
|
1970
|
+
bucketPath?: string;
|
|
1971
|
+
/**
|
|
1972
|
+
* OSS 端点 / OSS Endpoint
|
|
1973
|
+
* @example "http://oss-cn-shanghai.aliyuncs.com"
|
|
1974
|
+
*/
|
|
1975
|
+
endpoint?: string;
|
|
1976
|
+
/**
|
|
1977
|
+
* 挂载目录 / Mount Directory
|
|
1978
|
+
* @example "/mnt/dir"
|
|
1979
|
+
*/
|
|
1980
|
+
mountDir?: string;
|
|
1981
|
+
/**
|
|
1982
|
+
* 是否只读 / Read Only
|
|
1983
|
+
*/
|
|
1984
|
+
readOnly?: boolean;
|
|
1985
|
+
}
|
|
1986
|
+
/**
|
|
1987
|
+
* OSS mount configuration
|
|
1988
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
1989
|
+
*
|
|
1990
|
+
* 定义 OSS 存储的挂载配置。
|
|
1991
|
+
* Defines the mount configuration for OSS storage.
|
|
1992
|
+
*/
|
|
1993
|
+
interface OSSMountConfig {
|
|
1994
|
+
/**
|
|
1995
|
+
* 挂载点列表 / Mount Points List
|
|
1996
|
+
*/
|
|
1997
|
+
mountPoints?: OSSMountPoint[];
|
|
1998
|
+
}
|
|
1999
|
+
/**
|
|
2000
|
+
* PolarFS mount configuration
|
|
2001
|
+
* PolarFS 挂载配置 / PolarFS Mount Configuration
|
|
2002
|
+
*
|
|
2003
|
+
* 定义 PolarFS 文件系统的挂载配置。
|
|
2004
|
+
* Defines the mount configuration for PolarFS file system.
|
|
2005
|
+
*/
|
|
2006
|
+
interface PolarFsMountConfig {
|
|
2007
|
+
/**
|
|
2008
|
+
* 实例 ID / Instance ID
|
|
2009
|
+
*/
|
|
2010
|
+
instanceId?: string;
|
|
2011
|
+
/**
|
|
2012
|
+
* 挂载目录 / Mount Directory
|
|
2013
|
+
*/
|
|
2014
|
+
mountDir?: string;
|
|
2015
|
+
/**
|
|
2016
|
+
* 远程目录 / Remote Directory
|
|
2017
|
+
*/
|
|
2018
|
+
remoteDir?: string;
|
|
2019
|
+
}
|
|
2020
|
+
/**
|
|
2021
|
+
* PolarFS configuration
|
|
2022
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
2023
|
+
*
|
|
2024
|
+
* 定义 PolarFS 文件系统的配置。
|
|
2025
|
+
* Defines the configuration for PolarFS file system.
|
|
2026
|
+
*/
|
|
2027
|
+
interface PolarFsConfig {
|
|
2028
|
+
/**
|
|
2029
|
+
* 组 ID / Group ID
|
|
2030
|
+
*/
|
|
2031
|
+
groupId?: number;
|
|
2032
|
+
/**
|
|
2033
|
+
* 挂载点列表 / Mount Points List
|
|
2034
|
+
*/
|
|
2035
|
+
mountPoints?: PolarFsMountConfig[];
|
|
2036
|
+
/**
|
|
2037
|
+
* 用户 ID / User ID
|
|
2038
|
+
*/
|
|
2039
|
+
userId?: number;
|
|
2040
|
+
}
|
|
1903
2041
|
/**
|
|
1904
2042
|
* Template network configuration
|
|
1905
2043
|
*/
|
|
@@ -1963,6 +2101,7 @@ interface TemplateMcpState {
|
|
|
1963
2101
|
}
|
|
1964
2102
|
/**
|
|
1965
2103
|
* Template create input
|
|
2104
|
+
* 模板创建输入 / Template Create Input
|
|
1966
2105
|
*/
|
|
1967
2106
|
interface TemplateCreateInput {
|
|
1968
2107
|
templateName?: string;
|
|
@@ -1983,6 +2122,10 @@ interface TemplateCreateInput {
|
|
|
1983
2122
|
armsConfiguration?: TemplateArmsConfiguration;
|
|
1984
2123
|
containerConfiguration?: TemplateContainerConfiguration;
|
|
1985
2124
|
diskSize?: number;
|
|
2125
|
+
/**
|
|
2126
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2127
|
+
*/
|
|
2128
|
+
allowAnonymousManage?: boolean;
|
|
1986
2129
|
}
|
|
1987
2130
|
/**
|
|
1988
2131
|
* Template update input
|
|
@@ -2012,10 +2155,33 @@ interface TemplateListInput extends PageableInput {
|
|
|
2012
2155
|
}
|
|
2013
2156
|
/**
|
|
2014
2157
|
* Sandbox create input
|
|
2158
|
+
* 沙箱创建输入 / Sandbox Create Input
|
|
2015
2159
|
*/
|
|
2016
2160
|
interface SandboxCreateInput {
|
|
2161
|
+
/**
|
|
2162
|
+
* 模板名称 / Template Name
|
|
2163
|
+
*/
|
|
2017
2164
|
templateName: string;
|
|
2165
|
+
/**
|
|
2166
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2167
|
+
*/
|
|
2018
2168
|
sandboxIdleTimeoutSeconds?: number;
|
|
2169
|
+
/**
|
|
2170
|
+
* 沙箱 ID(可选,用户可指定) / Sandbox ID (optional, user can specify)
|
|
2171
|
+
*/
|
|
2172
|
+
sandboxId?: string;
|
|
2173
|
+
/**
|
|
2174
|
+
* NAS 配置 / NAS Configuration
|
|
2175
|
+
*/
|
|
2176
|
+
nasConfig?: NASConfig;
|
|
2177
|
+
/**
|
|
2178
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
2179
|
+
*/
|
|
2180
|
+
ossMountConfig?: OSSMountConfig;
|
|
2181
|
+
/**
|
|
2182
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
2183
|
+
*/
|
|
2184
|
+
polarFsConfig?: PolarFsConfig;
|
|
2019
2185
|
}
|
|
2020
2186
|
/**
|
|
2021
2187
|
* Sandbox list input
|
|
@@ -2029,39 +2195,139 @@ interface SandboxListInput {
|
|
|
2029
2195
|
}
|
|
2030
2196
|
/**
|
|
2031
2197
|
* Template data
|
|
2198
|
+
* 模板数据 / Template Data
|
|
2032
2199
|
*/
|
|
2033
2200
|
interface TemplateData {
|
|
2201
|
+
/**
|
|
2202
|
+
* 模板 ARN / Template ARN
|
|
2203
|
+
*/
|
|
2034
2204
|
templateArn?: string;
|
|
2205
|
+
/**
|
|
2206
|
+
* 模板 ID / Template ID
|
|
2207
|
+
*/
|
|
2035
2208
|
templateId?: string;
|
|
2209
|
+
/**
|
|
2210
|
+
* 模板名称 / Template Name
|
|
2211
|
+
*/
|
|
2036
2212
|
templateName?: string;
|
|
2213
|
+
/**
|
|
2214
|
+
* 模板类型 / Template Type
|
|
2215
|
+
*/
|
|
2037
2216
|
templateType?: TemplateType;
|
|
2217
|
+
/**
|
|
2218
|
+
* CPU 核数 / CPU Cores
|
|
2219
|
+
*/
|
|
2038
2220
|
cpu?: number;
|
|
2221
|
+
/**
|
|
2222
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
2223
|
+
*/
|
|
2039
2224
|
memory?: number;
|
|
2225
|
+
/**
|
|
2226
|
+
* 创建时间 / Creation Time
|
|
2227
|
+
*/
|
|
2040
2228
|
createdAt?: string;
|
|
2229
|
+
/**
|
|
2230
|
+
* 描述 / Description
|
|
2231
|
+
*/
|
|
2041
2232
|
description?: string;
|
|
2233
|
+
/**
|
|
2234
|
+
* 执行角色 ARN / Execution Role ARN
|
|
2235
|
+
*/
|
|
2042
2236
|
executionRoleArn?: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* 最后更新时间 / Last Updated Time
|
|
2239
|
+
*/
|
|
2043
2240
|
lastUpdatedAt?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* 资源名称 / Resource Name
|
|
2243
|
+
*/
|
|
2044
2244
|
resourceName?: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2247
|
+
*/
|
|
2045
2248
|
sandboxIdleTimeoutInSeconds?: number;
|
|
2249
|
+
/**
|
|
2250
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
2251
|
+
*/
|
|
2046
2252
|
sandboxTtlInSeconds?: number;
|
|
2253
|
+
/**
|
|
2254
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
2255
|
+
*/
|
|
2047
2256
|
shareConcurrencyLimitPerSandbox?: number;
|
|
2257
|
+
/**
|
|
2258
|
+
* 状态 / Status
|
|
2259
|
+
*/
|
|
2048
2260
|
status?: Status;
|
|
2261
|
+
/**
|
|
2262
|
+
* 状态原因 / Status Reason
|
|
2263
|
+
*/
|
|
2049
2264
|
statusReason?: string;
|
|
2265
|
+
/**
|
|
2266
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
2267
|
+
*/
|
|
2050
2268
|
diskSize?: number;
|
|
2269
|
+
/**
|
|
2270
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2271
|
+
*/
|
|
2272
|
+
allowAnonymousManage?: boolean;
|
|
2051
2273
|
}
|
|
2052
2274
|
/**
|
|
2053
2275
|
* Sandbox data
|
|
2276
|
+
* 沙箱数据 / Sandbox Data
|
|
2054
2277
|
*/
|
|
2055
2278
|
interface SandboxData {
|
|
2279
|
+
/**
|
|
2280
|
+
* 沙箱 ID / Sandbox ID
|
|
2281
|
+
*/
|
|
2056
2282
|
sandboxId?: string;
|
|
2283
|
+
/**
|
|
2284
|
+
* 沙箱名称 / Sandbox Name
|
|
2285
|
+
*/
|
|
2057
2286
|
sandboxName?: string;
|
|
2287
|
+
/**
|
|
2288
|
+
* 模板 ID / Template ID
|
|
2289
|
+
*/
|
|
2058
2290
|
templateId?: string;
|
|
2291
|
+
/**
|
|
2292
|
+
* 模板名称 / Template Name
|
|
2293
|
+
*/
|
|
2059
2294
|
templateName?: string;
|
|
2295
|
+
/**
|
|
2296
|
+
* 沙箱状态 / Sandbox State
|
|
2297
|
+
*/
|
|
2060
2298
|
state?: SandboxState;
|
|
2299
|
+
/**
|
|
2300
|
+
* 状态原因 / State Reason
|
|
2301
|
+
*/
|
|
2061
2302
|
stateReason?: string;
|
|
2303
|
+
/**
|
|
2304
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2305
|
+
*/
|
|
2062
2306
|
createdAt?: string;
|
|
2307
|
+
/**
|
|
2308
|
+
* 最后更新时间 / Last Updated Time
|
|
2309
|
+
*/
|
|
2063
2310
|
lastUpdatedAt?: string;
|
|
2311
|
+
/**
|
|
2312
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2313
|
+
*/
|
|
2064
2314
|
sandboxIdleTimeoutSeconds?: number;
|
|
2315
|
+
/**
|
|
2316
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2317
|
+
*/
|
|
2318
|
+
endedAt?: string;
|
|
2319
|
+
/**
|
|
2320
|
+
* 元数据 / Metadata
|
|
2321
|
+
*/
|
|
2322
|
+
metadata?: Record<string, any>;
|
|
2323
|
+
/**
|
|
2324
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2325
|
+
*/
|
|
2326
|
+
sandboxArn?: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2329
|
+
*/
|
|
2330
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2065
2331
|
}
|
|
2066
2332
|
/**
|
|
2067
2333
|
* Code execution result
|
|
@@ -2092,26 +2358,72 @@ interface FileInfo {
|
|
|
2092
2358
|
|
|
2093
2359
|
/**
|
|
2094
2360
|
* Base Sandbox resource class
|
|
2361
|
+
* 基础沙箱资源类 / Base Sandbox Resource Class
|
|
2095
2362
|
*/
|
|
2096
2363
|
declare class Sandbox implements SandboxData {
|
|
2364
|
+
/**
|
|
2365
|
+
* 沙箱 ID / Sandbox ID
|
|
2366
|
+
*/
|
|
2097
2367
|
sandboxId?: string;
|
|
2368
|
+
/**
|
|
2369
|
+
* 沙箱名称 / Sandbox Name
|
|
2370
|
+
*/
|
|
2098
2371
|
sandboxName?: string;
|
|
2372
|
+
/**
|
|
2373
|
+
* 模板 ID / Template ID
|
|
2374
|
+
*/
|
|
2099
2375
|
templateId?: string;
|
|
2376
|
+
/**
|
|
2377
|
+
* 模板名称 / Template Name
|
|
2378
|
+
*/
|
|
2100
2379
|
templateName?: string;
|
|
2380
|
+
/**
|
|
2381
|
+
* 沙箱状态 / Sandbox State
|
|
2382
|
+
*/
|
|
2101
2383
|
state?: SandboxState;
|
|
2384
|
+
/**
|
|
2385
|
+
* 状态原因 / State Reason
|
|
2386
|
+
*/
|
|
2102
2387
|
stateReason?: string;
|
|
2388
|
+
/**
|
|
2389
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2390
|
+
*/
|
|
2103
2391
|
createdAt?: string;
|
|
2392
|
+
/**
|
|
2393
|
+
* 最后更新时间 / Last Updated Time
|
|
2394
|
+
*/
|
|
2104
2395
|
lastUpdatedAt?: string;
|
|
2396
|
+
/**
|
|
2397
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2398
|
+
*/
|
|
2105
2399
|
sandboxIdleTimeoutSeconds?: number;
|
|
2400
|
+
/**
|
|
2401
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2402
|
+
*/
|
|
2403
|
+
endedAt?: string;
|
|
2404
|
+
/**
|
|
2405
|
+
* 元数据 / Metadata
|
|
2406
|
+
*/
|
|
2407
|
+
metadata?: Record<string, any>;
|
|
2408
|
+
/**
|
|
2409
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2410
|
+
*/
|
|
2411
|
+
sandboxArn?: string;
|
|
2412
|
+
/**
|
|
2413
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2414
|
+
*/
|
|
2415
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2106
2416
|
protected _config?: Config;
|
|
2107
2417
|
constructor(data?: Partial<SandboxData>, config?: Config);
|
|
2108
2418
|
/**
|
|
2109
2419
|
* Create sandbox from SDK response object
|
|
2420
|
+
* 从 SDK 响应对象创建沙箱 / Create Sandbox from SDK Response Object
|
|
2110
2421
|
*/
|
|
2111
2422
|
static fromInnerObject(obj: any, config?: Config): Sandbox;
|
|
2112
2423
|
protected static getClient(config?: Config): $AgentRun.default;
|
|
2113
2424
|
/**
|
|
2114
2425
|
* Create a new Sandbox
|
|
2426
|
+
* 创建新沙箱 / Create a New Sandbox
|
|
2115
2427
|
*/
|
|
2116
2428
|
static create(input: SandboxCreateInput, config?: Config): Promise<Sandbox>;
|
|
2117
2429
|
/**
|
|
@@ -2188,9 +2500,13 @@ declare class BrowserSandbox extends Sandbox {
|
|
|
2188
2500
|
static templateType: TemplateType;
|
|
2189
2501
|
/**
|
|
2190
2502
|
* Create a Browser Sandbox from template
|
|
2503
|
+
* 从模板创建浏览器沙箱 / Create Browser Sandbox from Template
|
|
2191
2504
|
*/
|
|
2192
2505
|
static createFromTemplate(templateName: string, options?: {
|
|
2193
2506
|
sandboxIdleTimeoutSeconds?: number;
|
|
2507
|
+
nasConfig?: NASConfig;
|
|
2508
|
+
ossMountConfig?: OSSMountConfig;
|
|
2509
|
+
polarFsConfig?: PolarFsConfig;
|
|
2194
2510
|
}, config?: Config): Promise<BrowserSandbox>;
|
|
2195
2511
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2196
2512
|
private _dataApi?;
|
|
@@ -2612,9 +2928,13 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2612
2928
|
static templateType: TemplateType;
|
|
2613
2929
|
/**
|
|
2614
2930
|
* Create a Code Interpreter Sandbox from template
|
|
2931
|
+
* 从模板创建代码解释器沙箱 / Create Code Interpreter Sandbox from Template
|
|
2615
2932
|
*/
|
|
2616
2933
|
static createFromTemplate(templateName: string, options?: {
|
|
2617
2934
|
sandboxIdleTimeoutSeconds?: number;
|
|
2935
|
+
nasConfig?: NASConfig;
|
|
2936
|
+
ossMountConfig?: OSSMountConfig;
|
|
2937
|
+
polarFsConfig?: PolarFsConfig;
|
|
2618
2938
|
}, config?: Config): Promise<CodeInterpreterSandbox>;
|
|
2619
2939
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2620
2940
|
private _dataApi?;
|
|
@@ -2678,29 +2998,86 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2678
2998
|
|
|
2679
2999
|
/**
|
|
2680
3000
|
* Template resource class
|
|
3001
|
+
* 模板资源类 / Template Resource Class
|
|
2681
3002
|
*/
|
|
2682
3003
|
declare class Template implements TemplateData {
|
|
3004
|
+
/**
|
|
3005
|
+
* 模板 ARN / Template ARN
|
|
3006
|
+
*/
|
|
2683
3007
|
templateArn?: string;
|
|
3008
|
+
/**
|
|
3009
|
+
* 模板 ID / Template ID
|
|
3010
|
+
*/
|
|
2684
3011
|
templateId?: string;
|
|
3012
|
+
/**
|
|
3013
|
+
* 模板名称 / Template Name
|
|
3014
|
+
*/
|
|
2685
3015
|
templateName?: string;
|
|
3016
|
+
/**
|
|
3017
|
+
* 模板类型 / Template Type
|
|
3018
|
+
*/
|
|
2686
3019
|
templateType?: TemplateType;
|
|
3020
|
+
/**
|
|
3021
|
+
* CPU 核数 / CPU Cores
|
|
3022
|
+
*/
|
|
2687
3023
|
cpu?: number;
|
|
3024
|
+
/**
|
|
3025
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
3026
|
+
*/
|
|
2688
3027
|
memory?: number;
|
|
3028
|
+
/**
|
|
3029
|
+
* 创建时间 / Creation Time
|
|
3030
|
+
*/
|
|
2689
3031
|
createdAt?: string;
|
|
3032
|
+
/**
|
|
3033
|
+
* 描述 / Description
|
|
3034
|
+
*/
|
|
2690
3035
|
description?: string;
|
|
3036
|
+
/**
|
|
3037
|
+
* 执行角色 ARN / Execution Role ARN
|
|
3038
|
+
*/
|
|
2691
3039
|
executionRoleArn?: string;
|
|
3040
|
+
/**
|
|
3041
|
+
* 最后更新时间 / Last Updated Time
|
|
3042
|
+
*/
|
|
2692
3043
|
lastUpdatedAt?: string;
|
|
3044
|
+
/**
|
|
3045
|
+
* 资源名称 / Resource Name
|
|
3046
|
+
*/
|
|
2693
3047
|
resourceName?: string;
|
|
3048
|
+
/**
|
|
3049
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
3050
|
+
*/
|
|
2694
3051
|
sandboxIdleTimeoutInSeconds?: number;
|
|
3052
|
+
/**
|
|
3053
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
3054
|
+
*/
|
|
2695
3055
|
sandboxTtlInSeconds?: number;
|
|
3056
|
+
/**
|
|
3057
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
3058
|
+
*/
|
|
2696
3059
|
shareConcurrencyLimitPerSandbox?: number;
|
|
3060
|
+
/**
|
|
3061
|
+
* 状态 / Status
|
|
3062
|
+
*/
|
|
2697
3063
|
status?: Status;
|
|
3064
|
+
/**
|
|
3065
|
+
* 状态原因 / Status Reason
|
|
3066
|
+
*/
|
|
2698
3067
|
statusReason?: string;
|
|
3068
|
+
/**
|
|
3069
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
3070
|
+
*/
|
|
2699
3071
|
diskSize?: number;
|
|
3072
|
+
/**
|
|
3073
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
3074
|
+
*/
|
|
3075
|
+
allowAnonymousManage?: boolean;
|
|
2700
3076
|
private _config?;
|
|
2701
3077
|
constructor(data?: Partial<TemplateData>, config?: Config);
|
|
2702
3078
|
/**
|
|
2703
3079
|
* Create template from SDK response object
|
|
3080
|
+
* 从 SDK 响应对象创建模板 / Create Template from SDK Response Object
|
|
2704
3081
|
*/
|
|
2705
3082
|
static fromInnerObject(obj: $AgentRun.Template, config?: Config): Template;
|
|
2706
3083
|
private static getClient;
|
|
@@ -2853,21 +3230,29 @@ declare class SandboxClient {
|
|
|
2853
3230
|
}) => Promise<Sandbox>;
|
|
2854
3231
|
/**
|
|
2855
3232
|
* Create a Code Interpreter Sandbox
|
|
3233
|
+
* 创建代码解释器沙箱 / Create Code Interpreter Sandbox
|
|
2856
3234
|
*/
|
|
2857
3235
|
createCodeInterpreterSandbox: (params: {
|
|
2858
3236
|
templateName: string;
|
|
2859
3237
|
options?: {
|
|
2860
3238
|
sandboxIdleTimeoutSeconds?: number;
|
|
3239
|
+
nasConfig?: NASConfig;
|
|
3240
|
+
ossMountConfig?: OSSMountConfig;
|
|
3241
|
+
polarFsConfig?: PolarFsConfig;
|
|
2861
3242
|
};
|
|
2862
3243
|
config?: Config;
|
|
2863
3244
|
}) => Promise<CodeInterpreterSandbox>;
|
|
2864
3245
|
/**
|
|
2865
3246
|
* Create a Browser Sandbox
|
|
3247
|
+
* 创建浏览器沙箱 / Create Browser Sandbox
|
|
2866
3248
|
*/
|
|
2867
3249
|
createBrowserSandbox: (params: {
|
|
2868
3250
|
templateName: string;
|
|
2869
3251
|
options?: {
|
|
2870
3252
|
sandboxIdleTimeoutSeconds?: number;
|
|
3253
|
+
nasConfig?: NASConfig;
|
|
3254
|
+
ossMountConfig?: OSSMountConfig;
|
|
3255
|
+
polarFsConfig?: PolarFsConfig;
|
|
2871
3256
|
};
|
|
2872
3257
|
config?: Config;
|
|
2873
3258
|
}) => Promise<BrowserSandbox>;
|
|
@@ -3134,9 +3519,13 @@ declare class AioSandbox extends Sandbox {
|
|
|
3134
3519
|
static templateType: TemplateType;
|
|
3135
3520
|
/**
|
|
3136
3521
|
* Create an AIO Sandbox from template
|
|
3522
|
+
* 从模板创建 AIO 沙箱 / Create AIO Sandbox from Template
|
|
3137
3523
|
*/
|
|
3138
3524
|
static createFromTemplate(templateName: string, options?: {
|
|
3139
3525
|
sandboxIdleTimeoutSeconds?: number;
|
|
3526
|
+
nasConfig?: NASConfig;
|
|
3527
|
+
ossMountConfig?: OSSMountConfig;
|
|
3528
|
+
polarFsConfig?: PolarFsConfig;
|
|
3140
3529
|
}, config?: Config): Promise<AioSandbox>;
|
|
3141
3530
|
constructor(sandbox: Sandbox, config?: Config);
|
|
3142
3531
|
private _dataApi?;
|