@agentrun/sdk 0.0.3 → 0.0.4
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/README.md +20 -15
- package/dist/agent-runtime/api/index.cjs +907 -0
- package/dist/agent-runtime/api/index.cjs.map +1 -0
- package/dist/agent-runtime/api/index.d.cts +193 -0
- package/dist/agent-runtime/api/index.d.ts +193 -0
- package/dist/agent-runtime/api/index.js +882 -0
- package/dist/agent-runtime/api/index.js.map +1 -0
- package/dist/agent-runtime/index.cjs +2528 -0
- package/dist/agent-runtime/index.cjs.map +1 -0
- package/dist/agent-runtime/index.d.cts +778 -0
- package/dist/agent-runtime/index.d.ts +778 -0
- package/dist/agent-runtime/index.js +2496 -0
- package/dist/agent-runtime/index.js.map +1 -0
- package/dist/base-K1GMfJbH.d.ts +59 -0
- package/dist/base-xcWt5bua.d.cts +59 -0
- package/dist/client-DHXxjuo3.d.ts +58 -0
- package/dist/client-DPUTs69s.d.cts +58 -0
- package/dist/config-07gMelJP.d.cts +125 -0
- package/dist/config-07gMelJP.d.ts +125 -0
- package/dist/control-api-BWD4eua5.d.cts +27 -0
- package/dist/control-api-d-82Sgpr.d.ts +27 -0
- package/dist/credential/api/index.cjs +655 -0
- package/dist/credential/api/index.cjs.map +1 -0
- package/dist/credential/api/index.d.cts +93 -0
- package/dist/credential/api/index.d.ts +93 -0
- package/dist/credential/api/index.js +630 -0
- package/dist/credential/api/index.js.map +1 -0
- package/dist/credential/index.cjs +1286 -0
- package/dist/credential/index.cjs.map +1 -0
- package/dist/credential/index.d.cts +246 -0
- package/dist/credential/index.d.ts +246 -0
- package/dist/credential/index.js +1263 -0
- package/dist/credential/index.js.map +1 -0
- package/dist/data-api-B-4h9_Vf.d.ts +166 -0
- package/dist/data-api-DsG-8JRQ.d.cts +166 -0
- package/dist/exception-DM9H2Rpo.d.cts +68 -0
- package/dist/exception-DM9H2Rpo.d.ts +68 -0
- package/dist/index.cjs +29281 -1427
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +38 -4485
- package/dist/index.d.ts +38 -4485
- package/dist/index.js +29259 -1426
- package/dist/index.js.map +1 -1
- package/dist/integration/builtin/index.cjs +9399 -0
- package/dist/integration/builtin/index.cjs.map +1 -0
- package/dist/integration/builtin/index.d.cts +692 -0
- package/dist/integration/builtin/index.d.ts +692 -0
- package/dist/integration/builtin/index.js +9363 -0
- package/dist/integration/builtin/index.js.map +1 -0
- package/dist/integration/index.cjs +9524 -0
- package/dist/integration/index.cjs.map +1 -0
- package/dist/integration/index.d.cts +98 -0
- package/dist/integration/index.d.ts +98 -0
- package/dist/integration/index.js +9481 -0
- package/dist/integration/index.js.map +1 -0
- package/dist/integration/mastra/index.cjs +9383 -0
- package/dist/integration/mastra/index.cjs.map +1 -0
- package/dist/integration/mastra/index.d.cts +186 -0
- package/dist/integration/mastra/index.d.ts +186 -0
- package/dist/integration/mastra/index.js +9348 -0
- package/dist/integration/mastra/index.js.map +1 -0
- package/dist/model/index.cjs +2392 -0
- package/dist/model/index.cjs.map +1 -0
- package/dist/model/index.d.cts +97 -0
- package/dist/model/index.d.ts +97 -0
- package/dist/model/index.js +2368 -0
- package/dist/model/index.js.map +1 -0
- package/dist/model--I90nCqy.d.cts +66 -0
- package/dist/model--I90nCqy.d.ts +66 -0
- package/dist/model-BV7A6Trb.d.cts +512 -0
- package/dist/model-DGBy-o_L.d.cts +176 -0
- package/dist/model-DGBy-o_L.d.ts +176 -0
- package/dist/model-RiiiZnou.d.ts +512 -0
- package/dist/model-service-D-P2FZNi.d.ts +540 -0
- package/dist/model-service-VpzBb7rV.d.cts +540 -0
- package/dist/resource-CQovFUeh.d.cts +44 -0
- package/dist/resource-DnE_DEka.d.ts +44 -0
- package/dist/sandbox/index.cjs +3557 -0
- package/dist/sandbox/index.cjs.map +1 -0
- package/dist/sandbox/index.d.cts +1598 -0
- package/dist/sandbox/index.d.ts +1598 -0
- package/dist/sandbox/index.js +3532 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/server/adapter/index.cjs +24886 -0
- package/dist/server/adapter/index.cjs.map +1 -0
- package/dist/server/adapter/index.d.cts +68 -0
- package/dist/server/adapter/index.d.ts +68 -0
- package/dist/server/adapter/index.js +24883 -0
- package/dist/server/adapter/index.js.map +1 -0
- package/dist/server/core/index.cjs +313 -0
- package/dist/server/core/index.cjs.map +1 -0
- package/dist/server/core/index.d.cts +58 -0
- package/dist/server/core/index.d.ts +58 -0
- package/dist/server/core/index.js +309 -0
- package/dist/server/core/index.js.map +1 -0
- package/dist/server/index.cjs +25098 -0
- package/dist/server/index.cjs.map +1 -0
- package/dist/server/index.d.cts +73 -0
- package/dist/server/index.d.ts +73 -0
- package/dist/server/index.js +25067 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/protocol/index.cjs +1057 -0
- package/dist/server/protocol/index.cjs.map +1 -0
- package/dist/server/protocol/index.d.cts +135 -0
- package/dist/server/protocol/index.d.ts +135 -0
- package/dist/server/protocol/index.js +1053 -0
- package/dist/server/protocol/index.js.map +1 -0
- package/dist/tool-CG0LY-ov.d.cts +155 -0
- package/dist/tool-JJHam0ms.d.ts +155 -0
- package/dist/toolset/api/index.cjs +754 -0
- package/dist/toolset/api/index.cjs.map +1 -0
- package/dist/toolset/api/index.d.cts +207 -0
- package/dist/toolset/api/index.d.ts +207 -0
- package/dist/toolset/api/index.js +727 -0
- package/dist/toolset/api/index.js.map +1 -0
- package/dist/toolset/index.cjs +1945 -0
- package/dist/toolset/index.cjs.map +1 -0
- package/dist/toolset/index.d.cts +182 -0
- package/dist/toolset/index.d.ts +182 -0
- package/dist/toolset/index.js +1920 -0
- package/dist/toolset/index.js.map +1 -0
- package/dist/toolset-BYDvhwRp.d.cts +394 -0
- package/dist/toolset-CSRsJxCb.d.ts +394 -0
- package/dist/utils/index.cjs +994 -0
- package/dist/utils/index.cjs.map +1 -0
- package/dist/utils/index.d.cts +30 -0
- package/dist/utils/index.d.ts +30 -0
- package/dist/utils/index.js +951 -0
- package/dist/utils/index.js.map +1 -0
- package/package.json +65 -13
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common data models for AgentRun SDK
|
|
3
|
+
*
|
|
4
|
+
* 此模块定义通用的数据模型。
|
|
5
|
+
* This module defines common data models.
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Resource status enum
|
|
9
|
+
*/
|
|
10
|
+
type Status = 'CREATING' | 'CREATE_FAILED' | 'READY' | 'UPDATING' | 'UPDATE_FAILED' | 'DELETING' | 'DELETE_FAILED';
|
|
11
|
+
declare const Status: {
|
|
12
|
+
CREATING: Status;
|
|
13
|
+
CREATE_FAILED: Status;
|
|
14
|
+
READY: Status;
|
|
15
|
+
UPDATING: Status;
|
|
16
|
+
UPDATE_FAILED: Status;
|
|
17
|
+
DELETING: Status;
|
|
18
|
+
DELETE_FAILED: Status;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Network mode enum
|
|
22
|
+
*/
|
|
23
|
+
type NetworkMode = 'PUBLIC' | 'PRIVATE' | 'PUBLIC_AND_PRIVATE';
|
|
24
|
+
declare const NetworkMode: {
|
|
25
|
+
PUBLIC: NetworkMode;
|
|
26
|
+
PRIVATE: NetworkMode;
|
|
27
|
+
PUBLIC_AND_PRIVATE: NetworkMode;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Pageable input for list operations
|
|
31
|
+
*/
|
|
32
|
+
interface PageableInput {
|
|
33
|
+
pageNumber?: number;
|
|
34
|
+
pageSize?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Network configuration
|
|
38
|
+
*/
|
|
39
|
+
interface NetworkConfig {
|
|
40
|
+
networkMode?: NetworkMode;
|
|
41
|
+
vpcId?: string;
|
|
42
|
+
vSwitchIds?: string[];
|
|
43
|
+
securityGroupId?: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Helper to convert camelCase to snake_case
|
|
47
|
+
*/
|
|
48
|
+
declare function toSnakeCase(str: string): string;
|
|
49
|
+
/**
|
|
50
|
+
* Helper to convert snake_case to camelCase
|
|
51
|
+
*/
|
|
52
|
+
declare function toCamelCase(str: string): string;
|
|
53
|
+
/**
|
|
54
|
+
* Convert object keys from camelCase to snake_case
|
|
55
|
+
*/
|
|
56
|
+
declare function toSnakeCaseKeys<T extends Record<string, unknown>>(obj: T): Record<string, unknown>;
|
|
57
|
+
/**
|
|
58
|
+
* Convert object keys from snake_case to camelCase
|
|
59
|
+
*/
|
|
60
|
+
declare function toCamelCaseKeys<T extends Record<string, unknown>>(obj: T): Record<string, unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* Remove undefined values from object
|
|
63
|
+
*/
|
|
64
|
+
declare function removeUndefined<T extends Record<string, unknown>>(obj: T): Partial<T>;
|
|
65
|
+
|
|
66
|
+
export { type NetworkConfig as N, type PageableInput as P, Status as S, NetworkMode as a, toCamelCaseKeys as b, toSnakeCase as c, toSnakeCaseKeys as d, removeUndefined as r, toCamelCase as t };
|
|
@@ -0,0 +1,512 @@
|
|
|
1
|
+
import { S as Status, P as PageableInput } from './model--I90nCqy.cjs';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Sandbox Data Models
|
|
5
|
+
*
|
|
6
|
+
* 此模块定义 Sandbox 相关的所有数据模型。
|
|
7
|
+
* This module defines all data models related to Sandbox.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Template type enum
|
|
12
|
+
*/
|
|
13
|
+
declare enum TemplateType {
|
|
14
|
+
CODE_INTERPRETER = "CodeInterpreter",
|
|
15
|
+
BROWSER = "Browser",
|
|
16
|
+
AIO = "AllInOne",
|
|
17
|
+
/**
|
|
18
|
+
* 自定义镜像 / Custom Image
|
|
19
|
+
*/
|
|
20
|
+
CUSTOM = "CustomImage"
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Sandbox state enum
|
|
24
|
+
*/
|
|
25
|
+
declare enum SandboxState {
|
|
26
|
+
CREATING = "Creating",
|
|
27
|
+
RUNNING = "Running",
|
|
28
|
+
READY = "READY",// API返回的就绪状态,等同于Running
|
|
29
|
+
STOPPED = "Stopped",
|
|
30
|
+
FAILED = "Failed",
|
|
31
|
+
DELETING = "Deleting"
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Template network mode enum
|
|
35
|
+
*/
|
|
36
|
+
declare enum TemplateNetworkMode {
|
|
37
|
+
PUBLIC = "PUBLIC",
|
|
38
|
+
PRIVATE = "PRIVATE",
|
|
39
|
+
PUBLIC_AND_PRIVATE = "PUBLIC_AND_PRIVATE"
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* OSS permission enum
|
|
43
|
+
*/
|
|
44
|
+
declare enum TemplateOSSPermission {
|
|
45
|
+
READ_WRITE = "READ_WRITE",
|
|
46
|
+
READ_ONLY = "READ_ONLY"
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Code language enum
|
|
50
|
+
*/
|
|
51
|
+
declare enum CodeLanguage {
|
|
52
|
+
PYTHON = "python",
|
|
53
|
+
JAVASCRIPT = "javascript"
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* NAS mount configuration
|
|
57
|
+
* NAS 挂载配置 / NAS Mount Configuration
|
|
58
|
+
*
|
|
59
|
+
* 定义 NAS 文件系统的挂载配置。
|
|
60
|
+
* Defines the mount configuration for NAS file system.
|
|
61
|
+
*/
|
|
62
|
+
interface NASMountConfig {
|
|
63
|
+
/**
|
|
64
|
+
* 是否启用 TLS 加密 / Whether to enable TLS encryption
|
|
65
|
+
*/
|
|
66
|
+
enableTLS?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* 挂载目录 / Mount Directory
|
|
69
|
+
* @example "/home/test"
|
|
70
|
+
*/
|
|
71
|
+
mountDir?: string;
|
|
72
|
+
/**
|
|
73
|
+
* NAS 服务器地址 / NAS Server Address
|
|
74
|
+
* @example "***-uni85.cn-hangzhou.nas.com:/"
|
|
75
|
+
*/
|
|
76
|
+
serverAddr?: string;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* NAS configuration
|
|
80
|
+
* NAS 配置 / NAS Configuration
|
|
81
|
+
*
|
|
82
|
+
* 定义 NAS 文件系统的配置。
|
|
83
|
+
* Defines the configuration for NAS file system.
|
|
84
|
+
*/
|
|
85
|
+
interface NASConfig {
|
|
86
|
+
/**
|
|
87
|
+
* 组 ID / Group ID
|
|
88
|
+
* @example 100
|
|
89
|
+
*/
|
|
90
|
+
groupId?: number;
|
|
91
|
+
/**
|
|
92
|
+
* 挂载点列表 / Mount Points List
|
|
93
|
+
*/
|
|
94
|
+
mountPoints?: NASMountConfig[];
|
|
95
|
+
/**
|
|
96
|
+
* 用户 ID / User ID
|
|
97
|
+
* @example 100
|
|
98
|
+
*/
|
|
99
|
+
userId?: number;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* OSS mount point
|
|
103
|
+
* OSS 挂载点 / OSS Mount Point
|
|
104
|
+
*
|
|
105
|
+
* 定义 OSS 存储的挂载点配置。
|
|
106
|
+
* Defines the mount point configuration for OSS storage.
|
|
107
|
+
*/
|
|
108
|
+
interface OSSMountPoint {
|
|
109
|
+
/**
|
|
110
|
+
* OSS 存储桶名称 / OSS Bucket Name
|
|
111
|
+
* @example "my-bucket"
|
|
112
|
+
*/
|
|
113
|
+
bucketName?: string;
|
|
114
|
+
/**
|
|
115
|
+
* OSS 存储桶路径 / OSS Bucket Path
|
|
116
|
+
* @example "/my-dir"
|
|
117
|
+
*/
|
|
118
|
+
bucketPath?: string;
|
|
119
|
+
/**
|
|
120
|
+
* OSS 端点 / OSS Endpoint
|
|
121
|
+
* @example "http://oss-cn-shanghai.aliyuncs.com"
|
|
122
|
+
*/
|
|
123
|
+
endpoint?: string;
|
|
124
|
+
/**
|
|
125
|
+
* 挂载目录 / Mount Directory
|
|
126
|
+
* @example "/mnt/dir"
|
|
127
|
+
*/
|
|
128
|
+
mountDir?: string;
|
|
129
|
+
/**
|
|
130
|
+
* 是否只读 / Read Only
|
|
131
|
+
*/
|
|
132
|
+
readOnly?: boolean;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* OSS mount configuration
|
|
136
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
137
|
+
*
|
|
138
|
+
* 定义 OSS 存储的挂载配置。
|
|
139
|
+
* Defines the mount configuration for OSS storage.
|
|
140
|
+
*/
|
|
141
|
+
interface OSSMountConfig {
|
|
142
|
+
/**
|
|
143
|
+
* 挂载点列表 / Mount Points List
|
|
144
|
+
*/
|
|
145
|
+
mountPoints?: OSSMountPoint[];
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* PolarFS mount configuration
|
|
149
|
+
* PolarFS 挂载配置 / PolarFS Mount Configuration
|
|
150
|
+
*
|
|
151
|
+
* 定义 PolarFS 文件系统的挂载配置。
|
|
152
|
+
* Defines the mount configuration for PolarFS file system.
|
|
153
|
+
*/
|
|
154
|
+
interface PolarFsMountConfig {
|
|
155
|
+
/**
|
|
156
|
+
* 实例 ID / Instance ID
|
|
157
|
+
*/
|
|
158
|
+
instanceId?: string;
|
|
159
|
+
/**
|
|
160
|
+
* 挂载目录 / Mount Directory
|
|
161
|
+
*/
|
|
162
|
+
mountDir?: string;
|
|
163
|
+
/**
|
|
164
|
+
* 远程目录 / Remote Directory
|
|
165
|
+
*/
|
|
166
|
+
remoteDir?: string;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* PolarFS configuration
|
|
170
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
171
|
+
*
|
|
172
|
+
* 定义 PolarFS 文件系统的配置。
|
|
173
|
+
* Defines the configuration for PolarFS file system.
|
|
174
|
+
*/
|
|
175
|
+
interface PolarFsConfig {
|
|
176
|
+
/**
|
|
177
|
+
* 组 ID / Group ID
|
|
178
|
+
*/
|
|
179
|
+
groupId?: number;
|
|
180
|
+
/**
|
|
181
|
+
* 挂载点列表 / Mount Points List
|
|
182
|
+
*/
|
|
183
|
+
mountPoints?: PolarFsMountConfig[];
|
|
184
|
+
/**
|
|
185
|
+
* 用户 ID / User ID
|
|
186
|
+
*/
|
|
187
|
+
userId?: number;
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Template network configuration
|
|
191
|
+
*/
|
|
192
|
+
interface TemplateNetworkConfiguration {
|
|
193
|
+
networkMode?: TemplateNetworkMode;
|
|
194
|
+
securityGroupId?: string;
|
|
195
|
+
vpcId?: string;
|
|
196
|
+
vswitchIds?: string[];
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Template OSS configuration
|
|
200
|
+
*/
|
|
201
|
+
interface TemplateOssConfiguration {
|
|
202
|
+
bucketName: string;
|
|
203
|
+
mountPoint: string;
|
|
204
|
+
permission?: TemplateOSSPermission;
|
|
205
|
+
prefix: string;
|
|
206
|
+
region: string;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Template log configuration
|
|
210
|
+
*/
|
|
211
|
+
interface TemplateLogConfiguration {
|
|
212
|
+
project?: string;
|
|
213
|
+
logstore?: string;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Template credential configuration
|
|
217
|
+
*/
|
|
218
|
+
interface TemplateCredentialConfiguration {
|
|
219
|
+
credentialName?: string;
|
|
220
|
+
}
|
|
221
|
+
/**
|
|
222
|
+
* Template ARMS configuration
|
|
223
|
+
*/
|
|
224
|
+
interface TemplateArmsConfiguration {
|
|
225
|
+
armsLicenseKey?: string;
|
|
226
|
+
enableArms: boolean;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Template container configuration
|
|
230
|
+
*/
|
|
231
|
+
interface TemplateContainerConfiguration {
|
|
232
|
+
image?: string;
|
|
233
|
+
command?: string[];
|
|
234
|
+
/**
|
|
235
|
+
* ACR 实例 ID / ACR Instance ID
|
|
236
|
+
*/
|
|
237
|
+
acrInstanceId?: string;
|
|
238
|
+
/**
|
|
239
|
+
* 镜像注册表类型 / Image Registry Type
|
|
240
|
+
*/
|
|
241
|
+
imageRegistryType?: string;
|
|
242
|
+
/**
|
|
243
|
+
* 端口 / Port
|
|
244
|
+
*/
|
|
245
|
+
port?: number;
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Template MCP options
|
|
249
|
+
*/
|
|
250
|
+
interface TemplateMcpOptions {
|
|
251
|
+
enabledTools?: string[];
|
|
252
|
+
transport?: string;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* Template MCP state
|
|
256
|
+
*/
|
|
257
|
+
interface TemplateMcpState {
|
|
258
|
+
accessEndpoint?: string;
|
|
259
|
+
status?: string;
|
|
260
|
+
statusReason?: string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Template create input
|
|
264
|
+
* 模板创建输入 / Template Create Input
|
|
265
|
+
*/
|
|
266
|
+
interface TemplateCreateInput {
|
|
267
|
+
templateName?: string;
|
|
268
|
+
templateType: TemplateType;
|
|
269
|
+
cpu?: number;
|
|
270
|
+
memory?: number;
|
|
271
|
+
executionRoleArn?: string;
|
|
272
|
+
sandboxIdleTimeoutInSeconds?: number;
|
|
273
|
+
sandboxTtlInSeconds?: number;
|
|
274
|
+
shareConcurrencyLimitPerSandbox?: number;
|
|
275
|
+
templateConfiguration?: Record<string, unknown>;
|
|
276
|
+
description?: string;
|
|
277
|
+
environmentVariables?: Record<string, string>;
|
|
278
|
+
networkConfiguration?: TemplateNetworkConfiguration;
|
|
279
|
+
ossConfiguration?: TemplateOssConfiguration[];
|
|
280
|
+
logConfiguration?: TemplateLogConfiguration;
|
|
281
|
+
credentialConfiguration?: TemplateCredentialConfiguration;
|
|
282
|
+
armsConfiguration?: TemplateArmsConfiguration;
|
|
283
|
+
containerConfiguration?: TemplateContainerConfiguration;
|
|
284
|
+
diskSize?: number;
|
|
285
|
+
/**
|
|
286
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
287
|
+
*/
|
|
288
|
+
allowAnonymousManage?: boolean;
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* Template update input
|
|
292
|
+
*/
|
|
293
|
+
interface TemplateUpdateInput {
|
|
294
|
+
cpu?: number;
|
|
295
|
+
memory?: number;
|
|
296
|
+
executionRoleArn?: string;
|
|
297
|
+
sandboxIdleTimeoutInSeconds?: number;
|
|
298
|
+
sandboxTtlInSeconds?: number;
|
|
299
|
+
shareConcurrencyLimitPerSandbox?: number;
|
|
300
|
+
description?: string;
|
|
301
|
+
environmentVariables?: Record<string, string>;
|
|
302
|
+
networkConfiguration?: TemplateNetworkConfiguration;
|
|
303
|
+
ossConfiguration?: TemplateOssConfiguration[];
|
|
304
|
+
logConfiguration?: TemplateLogConfiguration;
|
|
305
|
+
credentialConfiguration?: TemplateCredentialConfiguration;
|
|
306
|
+
armsConfiguration?: TemplateArmsConfiguration;
|
|
307
|
+
containerConfiguration?: TemplateContainerConfiguration;
|
|
308
|
+
diskSize?: number;
|
|
309
|
+
}
|
|
310
|
+
/**
|
|
311
|
+
* Template list input
|
|
312
|
+
*/
|
|
313
|
+
interface TemplateListInput extends PageableInput {
|
|
314
|
+
templateType?: TemplateType;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Sandbox create input
|
|
318
|
+
* 沙箱创建输入 / Sandbox Create Input
|
|
319
|
+
*/
|
|
320
|
+
interface SandboxCreateInput {
|
|
321
|
+
/**
|
|
322
|
+
* 模板名称 / Template Name
|
|
323
|
+
*/
|
|
324
|
+
templateName: string;
|
|
325
|
+
/**
|
|
326
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
327
|
+
*/
|
|
328
|
+
sandboxIdleTimeoutSeconds?: number;
|
|
329
|
+
/**
|
|
330
|
+
* 沙箱 ID(可选,用户可指定) / Sandbox ID (optional, user can specify)
|
|
331
|
+
*/
|
|
332
|
+
sandboxId?: string;
|
|
333
|
+
/**
|
|
334
|
+
* NAS 配置 / NAS Configuration
|
|
335
|
+
*/
|
|
336
|
+
nasConfig?: NASConfig;
|
|
337
|
+
/**
|
|
338
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
339
|
+
*/
|
|
340
|
+
ossMountConfig?: OSSMountConfig;
|
|
341
|
+
/**
|
|
342
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
343
|
+
*/
|
|
344
|
+
polarFsConfig?: PolarFsConfig;
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Sandbox list input
|
|
348
|
+
*/
|
|
349
|
+
interface SandboxListInput {
|
|
350
|
+
maxResults?: number;
|
|
351
|
+
nextToken?: string;
|
|
352
|
+
status?: string;
|
|
353
|
+
templateName?: string;
|
|
354
|
+
templateType?: TemplateType;
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* Template data
|
|
358
|
+
* 模板数据 / Template Data
|
|
359
|
+
*/
|
|
360
|
+
interface TemplateData {
|
|
361
|
+
/**
|
|
362
|
+
* 模板 ARN / Template ARN
|
|
363
|
+
*/
|
|
364
|
+
templateArn?: string;
|
|
365
|
+
/**
|
|
366
|
+
* 模板 ID / Template ID
|
|
367
|
+
*/
|
|
368
|
+
templateId?: string;
|
|
369
|
+
/**
|
|
370
|
+
* 模板名称 / Template Name
|
|
371
|
+
*/
|
|
372
|
+
templateName?: string;
|
|
373
|
+
/**
|
|
374
|
+
* 模板类型 / Template Type
|
|
375
|
+
*/
|
|
376
|
+
templateType?: TemplateType;
|
|
377
|
+
/**
|
|
378
|
+
* CPU 核数 / CPU Cores
|
|
379
|
+
*/
|
|
380
|
+
cpu?: number;
|
|
381
|
+
/**
|
|
382
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
383
|
+
*/
|
|
384
|
+
memory?: number;
|
|
385
|
+
/**
|
|
386
|
+
* 创建时间 / Creation Time
|
|
387
|
+
*/
|
|
388
|
+
createdAt?: string;
|
|
389
|
+
/**
|
|
390
|
+
* 描述 / Description
|
|
391
|
+
*/
|
|
392
|
+
description?: string;
|
|
393
|
+
/**
|
|
394
|
+
* 执行角色 ARN / Execution Role ARN
|
|
395
|
+
*/
|
|
396
|
+
executionRoleArn?: string;
|
|
397
|
+
/**
|
|
398
|
+
* 最后更新时间 / Last Updated Time
|
|
399
|
+
*/
|
|
400
|
+
lastUpdatedAt?: string;
|
|
401
|
+
/**
|
|
402
|
+
* 资源名称 / Resource Name
|
|
403
|
+
*/
|
|
404
|
+
resourceName?: string;
|
|
405
|
+
/**
|
|
406
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
407
|
+
*/
|
|
408
|
+
sandboxIdleTimeoutInSeconds?: number;
|
|
409
|
+
/**
|
|
410
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
411
|
+
*/
|
|
412
|
+
sandboxTtlInSeconds?: number;
|
|
413
|
+
/**
|
|
414
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
415
|
+
*/
|
|
416
|
+
shareConcurrencyLimitPerSandbox?: number;
|
|
417
|
+
/**
|
|
418
|
+
* 状态 / Status
|
|
419
|
+
*/
|
|
420
|
+
status?: Status;
|
|
421
|
+
/**
|
|
422
|
+
* 状态原因 / Status Reason
|
|
423
|
+
*/
|
|
424
|
+
statusReason?: string;
|
|
425
|
+
/**
|
|
426
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
427
|
+
*/
|
|
428
|
+
diskSize?: number;
|
|
429
|
+
/**
|
|
430
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
431
|
+
*/
|
|
432
|
+
allowAnonymousManage?: boolean;
|
|
433
|
+
}
|
|
434
|
+
/**
|
|
435
|
+
* Sandbox data
|
|
436
|
+
* 沙箱数据 / Sandbox Data
|
|
437
|
+
*/
|
|
438
|
+
interface SandboxData {
|
|
439
|
+
/**
|
|
440
|
+
* 沙箱 ID / Sandbox ID
|
|
441
|
+
*/
|
|
442
|
+
sandboxId?: string;
|
|
443
|
+
/**
|
|
444
|
+
* 沙箱名称 / Sandbox Name
|
|
445
|
+
*/
|
|
446
|
+
sandboxName?: string;
|
|
447
|
+
/**
|
|
448
|
+
* 模板 ID / Template ID
|
|
449
|
+
*/
|
|
450
|
+
templateId?: string;
|
|
451
|
+
/**
|
|
452
|
+
* 模板名称 / Template Name
|
|
453
|
+
*/
|
|
454
|
+
templateName?: string;
|
|
455
|
+
/**
|
|
456
|
+
* 沙箱状态 / Sandbox State
|
|
457
|
+
*/
|
|
458
|
+
state?: SandboxState;
|
|
459
|
+
/**
|
|
460
|
+
* 状态原因 / State Reason
|
|
461
|
+
*/
|
|
462
|
+
stateReason?: string;
|
|
463
|
+
/**
|
|
464
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
465
|
+
*/
|
|
466
|
+
createdAt?: string;
|
|
467
|
+
/**
|
|
468
|
+
* 最后更新时间 / Last Updated Time
|
|
469
|
+
*/
|
|
470
|
+
lastUpdatedAt?: string;
|
|
471
|
+
/**
|
|
472
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
473
|
+
*/
|
|
474
|
+
sandboxIdleTimeoutSeconds?: number;
|
|
475
|
+
/**
|
|
476
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
477
|
+
*/
|
|
478
|
+
endedAt?: string;
|
|
479
|
+
/**
|
|
480
|
+
* 元数据 / Metadata
|
|
481
|
+
*/
|
|
482
|
+
metadata?: Record<string, any>;
|
|
483
|
+
/**
|
|
484
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
485
|
+
*/
|
|
486
|
+
sandboxArn?: string;
|
|
487
|
+
/**
|
|
488
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
489
|
+
*/
|
|
490
|
+
sandboxIdleTTLInSeconds?: number;
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* Code execution result
|
|
494
|
+
*/
|
|
495
|
+
interface ExecuteCodeResult {
|
|
496
|
+
stdout?: string;
|
|
497
|
+
stderr?: string;
|
|
498
|
+
exitCode?: number;
|
|
499
|
+
error?: string;
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* File info
|
|
503
|
+
*/
|
|
504
|
+
interface FileInfo {
|
|
505
|
+
name: string;
|
|
506
|
+
path: string;
|
|
507
|
+
size?: number;
|
|
508
|
+
isDirectory?: boolean;
|
|
509
|
+
modifiedAt?: string;
|
|
510
|
+
}
|
|
511
|
+
|
|
512
|
+
export { CodeLanguage as C, type ExecuteCodeResult as E, type FileInfo as F, type NASConfig as N, type OSSMountConfig as O, type PolarFsConfig as P, type SandboxCreateInput as S, type TemplateArmsConfiguration as T, type SandboxData as a, type SandboxListInput as b, SandboxState as c, type TemplateContainerConfiguration as d, type TemplateCreateInput as e, type TemplateCredentialConfiguration as f, type TemplateData as g, type TemplateListInput as h, type TemplateLogConfiguration as i, type TemplateMcpOptions as j, type TemplateMcpState as k, type TemplateNetworkConfiguration as l, TemplateNetworkMode as m, TemplateOSSPermission as n, type TemplateOssConfiguration as o, TemplateType as p, type TemplateUpdateInput as q, type NASMountConfig as r, type OSSMountPoint as s, type PolarFsMountConfig as t };
|