@agentrun/sdk 0.0.2 → 0.0.3
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 +6873 -6997
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +563 -363
- package/dist/index.d.ts +563 -363
- package/dist/index.js +7024 -7136
- package/dist/index.js.map +1 -1
- package/package.json +3 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
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
|
+
import { KeyOf } from 'zod/v4/core/util.cjs';
|
|
4
5
|
import * as $AgentRun from '@alicloud/agentrun20250910';
|
|
5
6
|
import * as ai from 'ai';
|
|
6
|
-
import * as $Devs from '@alicloud/devs20230714';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Configuration Management Module
|
|
@@ -253,6 +253,46 @@ interface InvokeArgs {
|
|
|
253
253
|
config?: Config;
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
/**
|
|
257
|
+
资源基类模板 / Resource Base Template
|
|
258
|
+
|
|
259
|
+
此模板用于生成资源对象的基类代码。
|
|
260
|
+
This template is used to generate base class code for resource objects.
|
|
261
|
+
*/
|
|
262
|
+
|
|
263
|
+
interface ParamsWithConfig {
|
|
264
|
+
config?: Config;
|
|
265
|
+
}
|
|
266
|
+
declare abstract class ResourceBase {
|
|
267
|
+
status?: Status;
|
|
268
|
+
protected _config?: Config;
|
|
269
|
+
abstract get(params?: ParamsWithConfig): Promise<any>;
|
|
270
|
+
abstract delete(params?: ParamsWithConfig): Promise<any>;
|
|
271
|
+
waitUntil: (params: {
|
|
272
|
+
checkFinishedCallback: (resource: ResourceBase) => boolean | Promise<boolean>;
|
|
273
|
+
intervalSeconds?: number;
|
|
274
|
+
timeoutSeconds?: number;
|
|
275
|
+
}) => Promise<ResourceBase>;
|
|
276
|
+
waitUntilReadyOrFailed: (params?: {
|
|
277
|
+
callback?: (resource: ResourceBase) => void | Promise<void>;
|
|
278
|
+
intervalSeconds?: number;
|
|
279
|
+
timeoutSeconds?: number;
|
|
280
|
+
}) => Promise<ResourceBase>;
|
|
281
|
+
deleteAndWaitUntilFinished: (params?: {
|
|
282
|
+
callback?: (resource: ResourceBase) => void | Promise<void>;
|
|
283
|
+
intervalSeconds?: number;
|
|
284
|
+
timeoutSeconds?: number;
|
|
285
|
+
}) => Promise<ResourceBase | undefined>;
|
|
286
|
+
refresh: (params?: ParamsWithConfig) => Promise<any>;
|
|
287
|
+
/**
|
|
288
|
+
* 更新实例自身的属性 / Update instance properties
|
|
289
|
+
*
|
|
290
|
+
* @param source - 源对象 / Source object
|
|
291
|
+
*/
|
|
292
|
+
updateSelf(source: any): void;
|
|
293
|
+
setConfig: (config: Config) => this;
|
|
294
|
+
}
|
|
295
|
+
|
|
256
296
|
/**
|
|
257
297
|
* Agent Runtime Data Models
|
|
258
298
|
*
|
|
@@ -569,7 +609,7 @@ interface AgentRuntimeEndpointData {
|
|
|
569
609
|
/**
|
|
570
610
|
* Agent Runtime Endpoint resource class
|
|
571
611
|
*/
|
|
572
|
-
declare class AgentRuntimeEndpoint implements AgentRuntimeEndpointData {
|
|
612
|
+
declare class AgentRuntimeEndpoint extends ResourceBase implements AgentRuntimeEndpointData {
|
|
573
613
|
agentRuntimeEndpointArn?: string;
|
|
574
614
|
agentRuntimeEndpointId?: string;
|
|
575
615
|
agentRuntimeEndpointName?: string;
|
|
@@ -582,14 +622,11 @@ declare class AgentRuntimeEndpoint implements AgentRuntimeEndpointData {
|
|
|
582
622
|
statusReason?: string;
|
|
583
623
|
tags?: string[];
|
|
584
624
|
targetVersion?: string;
|
|
585
|
-
|
|
625
|
+
protected _config?: Config;
|
|
586
626
|
private _dataApi?;
|
|
587
627
|
private _agentRuntimeName?;
|
|
588
|
-
constructor(data?:
|
|
589
|
-
|
|
590
|
-
* Create endpoint from SDK response object
|
|
591
|
-
*/
|
|
592
|
-
static fromInnerObject(obj: $AgentRun.AgentRuntimeEndpoint, config?: Config): AgentRuntimeEndpoint;
|
|
628
|
+
constructor(data?: any, config?: Config);
|
|
629
|
+
uniqIdCallback: () => string | undefined;
|
|
593
630
|
private static getClient;
|
|
594
631
|
/**
|
|
595
632
|
* Create an endpoint by Agent Runtime ID
|
|
@@ -627,11 +664,18 @@ declare class AgentRuntimeEndpoint implements AgentRuntimeEndpointData {
|
|
|
627
664
|
/**
|
|
628
665
|
* List endpoints by Agent Runtime ID
|
|
629
666
|
*/
|
|
630
|
-
static
|
|
667
|
+
static list(params: {
|
|
631
668
|
agentRuntimeId: string;
|
|
632
669
|
input?: AgentRuntimeEndpointListInput;
|
|
633
670
|
config?: Config;
|
|
634
671
|
}): Promise<AgentRuntimeEndpoint[]>;
|
|
672
|
+
static listAll: (params: {
|
|
673
|
+
agentRuntimeId: string;
|
|
674
|
+
config?: Config;
|
|
675
|
+
} & Omit<AgentRuntimeEndpointListInput, KeyOf<PageableInput>>) => Promise<any[]>;
|
|
676
|
+
get: (params?: {
|
|
677
|
+
config?: Config;
|
|
678
|
+
}) => Promise<AgentRuntimeEndpoint>;
|
|
635
679
|
/**
|
|
636
680
|
* Delete this endpoint
|
|
637
681
|
*/
|
|
@@ -651,14 +695,6 @@ declare class AgentRuntimeEndpoint implements AgentRuntimeEndpointData {
|
|
|
651
695
|
refresh: (params?: {
|
|
652
696
|
config?: Config;
|
|
653
697
|
}) => Promise<AgentRuntimeEndpoint>;
|
|
654
|
-
/**
|
|
655
|
-
* Wait until the endpoint is ready
|
|
656
|
-
*/
|
|
657
|
-
waitUntilReady: (options?: {
|
|
658
|
-
timeoutSeconds?: number;
|
|
659
|
-
intervalSeconds?: number;
|
|
660
|
-
beforeCheck?: (endpoint: AgentRuntimeEndpoint) => void;
|
|
661
|
-
}, config?: Config) => Promise<AgentRuntimeEndpoint>;
|
|
662
698
|
/**
|
|
663
699
|
* Invoke agent runtime using OpenAI-compatible API through this endpoint
|
|
664
700
|
*
|
|
@@ -690,7 +726,7 @@ declare class AgentRuntimeEndpoint implements AgentRuntimeEndpointData {
|
|
|
690
726
|
/**
|
|
691
727
|
* Agent Runtime resource class
|
|
692
728
|
*/
|
|
693
|
-
declare class AgentRuntime implements AgentRuntimeData {
|
|
729
|
+
declare class AgentRuntime extends ResourceBase implements AgentRuntimeData {
|
|
694
730
|
agentRuntimeArn?: string;
|
|
695
731
|
agentRuntimeId?: string;
|
|
696
732
|
agentRuntimeName?: string;
|
|
@@ -717,13 +753,10 @@ declare class AgentRuntime implements AgentRuntimeData {
|
|
|
717
753
|
status?: Status;
|
|
718
754
|
statusReason?: string;
|
|
719
755
|
tags?: string[];
|
|
720
|
-
|
|
756
|
+
protected _config?: Config;
|
|
721
757
|
private _dataApiCache;
|
|
722
|
-
constructor(data?:
|
|
723
|
-
|
|
724
|
-
* Create runtime from SDK response object
|
|
725
|
-
*/
|
|
726
|
-
static fromInnerObject(obj: $AgentRun.AgentRuntime, config?: Config): AgentRuntime;
|
|
758
|
+
constructor(data?: any, config?: Config);
|
|
759
|
+
uniqIdCallback: () => string | undefined;
|
|
727
760
|
private static getClient;
|
|
728
761
|
/**
|
|
729
762
|
* Create a new Agent Runtime
|
|
@@ -757,15 +790,13 @@ declare class AgentRuntime implements AgentRuntimeData {
|
|
|
757
790
|
/**
|
|
758
791
|
* List Agent Runtimes
|
|
759
792
|
*/
|
|
760
|
-
static list(
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
static listAll(
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
searchMode?: string;
|
|
768
|
-
}, config?: Config): Promise<AgentRuntime[]>;
|
|
793
|
+
static list(params?: {
|
|
794
|
+
input?: AgentRuntimeListInput;
|
|
795
|
+
config?: Config;
|
|
796
|
+
}): Promise<AgentRuntime[]>;
|
|
797
|
+
static listAll: (params?: (Omit<AgentRuntimeListInput, "pageNumber" | "pageSize"> & {
|
|
798
|
+
config?: Config;
|
|
799
|
+
}) | undefined) => Promise<any[]>;
|
|
769
800
|
/**
|
|
770
801
|
* List Agent Runtime versions by ID
|
|
771
802
|
*/
|
|
@@ -790,7 +821,7 @@ declare class AgentRuntime implements AgentRuntimeData {
|
|
|
790
821
|
/**
|
|
791
822
|
* Refresh this runtime's data
|
|
792
823
|
*/
|
|
793
|
-
|
|
824
|
+
get: (params?: {
|
|
794
825
|
config?: Config;
|
|
795
826
|
}) => Promise<AgentRuntime>;
|
|
796
827
|
/**
|
|
@@ -834,24 +865,6 @@ declare class AgentRuntime implements AgentRuntimeData {
|
|
|
834
865
|
listVersions: (params?: {
|
|
835
866
|
config?: Config;
|
|
836
867
|
}) => Promise<AgentRuntimeVersion[]>;
|
|
837
|
-
/**
|
|
838
|
-
* Wait until the runtime is ready
|
|
839
|
-
*/
|
|
840
|
-
waitUntilReady: (options?: {
|
|
841
|
-
timeoutSeconds?: number;
|
|
842
|
-
intervalSeconds?: number;
|
|
843
|
-
beforeCheck?: (runtime: AgentRuntime) => void;
|
|
844
|
-
}, config?: Config) => Promise<AgentRuntime>;
|
|
845
|
-
/**
|
|
846
|
-
* Wait until agent runtime reaches READY or any FAILED state
|
|
847
|
-
* Similar to waitUntilReady but does not throw on FAILED states
|
|
848
|
-
* Compatible with Python SDK's wait_until_ready_or_failed method
|
|
849
|
-
*/
|
|
850
|
-
waitUntilReadyOrFailed: (options?: {
|
|
851
|
-
timeoutSeconds?: number;
|
|
852
|
-
intervalSeconds?: number;
|
|
853
|
-
beforeCheck?: (runtime: AgentRuntime) => void;
|
|
854
|
-
}, config?: Config) => Promise<AgentRuntime>;
|
|
855
868
|
/**
|
|
856
869
|
* Invoke agent runtime using OpenAI-compatible API
|
|
857
870
|
*
|
|
@@ -926,17 +939,6 @@ declare class AgentRuntimeClient {
|
|
|
926
939
|
input?: AgentRuntimeListInput;
|
|
927
940
|
config?: Config;
|
|
928
941
|
}) => Promise<AgentRuntime[]>;
|
|
929
|
-
/**
|
|
930
|
-
* List all Agent Runtimes (with pagination)
|
|
931
|
-
*/
|
|
932
|
-
listAll: (params?: {
|
|
933
|
-
options?: {
|
|
934
|
-
agentRuntimeName?: string;
|
|
935
|
-
tags?: string;
|
|
936
|
-
searchMode?: string;
|
|
937
|
-
};
|
|
938
|
-
config?: Config;
|
|
939
|
-
}) => Promise<AgentRuntime[]>;
|
|
940
942
|
/**
|
|
941
943
|
* Create an endpoint for an Agent Runtime
|
|
942
944
|
*/
|
|
@@ -1227,67 +1229,6 @@ declare class AgentRuntimeControlAPI extends ControlAPI {
|
|
|
1227
1229
|
}) => Promise<$AgentRun.ListAgentRuntimeVersionsOutput>;
|
|
1228
1230
|
}
|
|
1229
1231
|
|
|
1230
|
-
/**
|
|
1231
|
-
资源基类模板 / Resource Base Template
|
|
1232
|
-
|
|
1233
|
-
此模板用于生成资源对象的基类代码。
|
|
1234
|
-
This template is used to generate base class code for resource objects.
|
|
1235
|
-
*/
|
|
1236
|
-
|
|
1237
|
-
declare abstract class ResourceBase {
|
|
1238
|
-
status?: Status;
|
|
1239
|
-
protected _config?: Config;
|
|
1240
|
-
abstract get(params?: {
|
|
1241
|
-
config?: Config;
|
|
1242
|
-
}): Promise<any>;
|
|
1243
|
-
abstract delete(params?: {
|
|
1244
|
-
config?: Config;
|
|
1245
|
-
}): Promise<any>;
|
|
1246
|
-
static list(_params: {
|
|
1247
|
-
input?: PageableInput;
|
|
1248
|
-
config?: Config;
|
|
1249
|
-
}): Promise<ThisType<ResourceBase>[]>;
|
|
1250
|
-
static listAll(params: {
|
|
1251
|
-
uniqIdCallback: (item: any) => string;
|
|
1252
|
-
input?: Record<string, any>;
|
|
1253
|
-
config?: Config;
|
|
1254
|
-
}): Promise<any[]>;
|
|
1255
|
-
waitUntil: (params: {
|
|
1256
|
-
checkFinishedCallback: (resource: ResourceBase) => Promise<boolean>;
|
|
1257
|
-
intervalSeconds?: number;
|
|
1258
|
-
timeoutSeconds?: number;
|
|
1259
|
-
}) => Promise<ResourceBase>;
|
|
1260
|
-
waitUntilReadyOrFailed: (params: {
|
|
1261
|
-
callback: (resource: ResourceBase) => Promise<void>;
|
|
1262
|
-
intervalSeconds?: number;
|
|
1263
|
-
timeoutSeconds?: number;
|
|
1264
|
-
}) => Promise<ResourceBase>;
|
|
1265
|
-
delete_and_wait_until_finished: (params: {
|
|
1266
|
-
callback: (resource: ResourceBase) => Promise<void>;
|
|
1267
|
-
intervalSeconds?: number;
|
|
1268
|
-
timeoutSeconds?: number;
|
|
1269
|
-
}) => Promise<ResourceBase | undefined>;
|
|
1270
|
-
refresh: (params?: {
|
|
1271
|
-
config?: Config;
|
|
1272
|
-
}) => Promise<any>;
|
|
1273
|
-
/**
|
|
1274
|
-
* 更新实例自身的属性 / Update instance properties
|
|
1275
|
-
*
|
|
1276
|
-
* @param source - 源对象 / Source object
|
|
1277
|
-
*/
|
|
1278
|
-
updateSelf(source: any): void;
|
|
1279
|
-
/**
|
|
1280
|
-
* 列出所有资源(带去重)/ List all resources (with deduplication)
|
|
1281
|
-
*
|
|
1282
|
-
* @param uniqIdCallback - 唯一ID回调函数 / Unique ID callback function
|
|
1283
|
-
* @param config - 配置 / Configuration
|
|
1284
|
-
* @param kwargs - 其他查询参数 / Other query parameters
|
|
1285
|
-
* @returns 资源列表 / Resource list
|
|
1286
|
-
*/
|
|
1287
|
-
protected static listAllResources(uniqIdCallback: (item: any) => string, config?: Config, kwargs?: Record<string, any>): Promise<any[]>;
|
|
1288
|
-
setConfig: (config: Config) => this;
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
1232
|
/** 凭证认证类型 / Credential Authentication Types */
|
|
1292
1233
|
type CredentialAuthType = 'jwt' | 'api_key' | 'basic' | 'aksk' | 'custom_header';
|
|
1293
1234
|
/** 凭证来源类型 / Credential Source Types */
|
|
@@ -1402,6 +1343,7 @@ declare class CredentialListOutput {
|
|
|
1402
1343
|
relatedResourceCount?: number;
|
|
1403
1344
|
updatedAt?: string;
|
|
1404
1345
|
constructor(data?: any);
|
|
1346
|
+
uniqIdCallback: () => string | undefined;
|
|
1405
1347
|
toCredential: (params?: {
|
|
1406
1348
|
config?: Config;
|
|
1407
1349
|
}) => Promise<Credential>;
|
|
@@ -1412,13 +1354,6 @@ declare class CredentialListOutput {
|
|
|
1412
1354
|
interface CredentialInterface extends CredentialMutableProps, CredentialImmutableProps, CredentialSystemProps, CredentialConfigInterface {
|
|
1413
1355
|
}
|
|
1414
1356
|
|
|
1415
|
-
/**
|
|
1416
|
-
* Credential Resource
|
|
1417
|
-
*
|
|
1418
|
-
* 此模块定义 Credential 资源类。
|
|
1419
|
-
* This module defines the Credential resource class.
|
|
1420
|
-
*/
|
|
1421
|
-
|
|
1422
1357
|
declare class Credential extends ResourceBase implements CredentialInterface {
|
|
1423
1358
|
credentialName?: string;
|
|
1424
1359
|
/** 描述 */
|
|
@@ -1438,7 +1373,7 @@ declare class Credential extends ResourceBase implements CredentialInterface {
|
|
|
1438
1373
|
/** 凭证密钥 */
|
|
1439
1374
|
credentialSecret?: string;
|
|
1440
1375
|
protected _config?: Config;
|
|
1441
|
-
constructor(data?:
|
|
1376
|
+
constructor(data?: any, config?: Config);
|
|
1442
1377
|
private static getClient;
|
|
1443
1378
|
/**
|
|
1444
1379
|
* Create a new Credential
|
|
@@ -1460,10 +1395,9 @@ declare class Credential extends ResourceBase implements CredentialInterface {
|
|
|
1460
1395
|
* List all Credentials (with pagination)
|
|
1461
1396
|
*/
|
|
1462
1397
|
static list: (paramsOrUndefined?: any) => Promise<CredentialListOutput[]>;
|
|
1463
|
-
static listAll: (params?: {
|
|
1464
|
-
input?: CredentialListInput;
|
|
1398
|
+
static listAll: (params?: (Omit<any, "pageNumber" | "pageSize"> & {
|
|
1465
1399
|
config?: Config;
|
|
1466
|
-
}) => Promise<
|
|
1400
|
+
}) | undefined) => Promise<any[]>;
|
|
1467
1401
|
/**
|
|
1468
1402
|
* Delete this credential
|
|
1469
1403
|
*/
|
|
@@ -1527,7 +1461,7 @@ declare class CredentialClient {
|
|
|
1527
1461
|
/**
|
|
1528
1462
|
* List Credentials
|
|
1529
1463
|
*/
|
|
1530
|
-
list: (params
|
|
1464
|
+
list: (params?: {
|
|
1531
1465
|
input?: CredentialListInput;
|
|
1532
1466
|
config?: Config;
|
|
1533
1467
|
}) => Promise<CredentialListOutput[]>;
|
|
@@ -1760,10 +1694,14 @@ declare class SandboxDataAPI {
|
|
|
1760
1694
|
}>;
|
|
1761
1695
|
/**
|
|
1762
1696
|
* Create sandbox from template
|
|
1697
|
+
* 从模板创建沙箱 / Create Sandbox from Template
|
|
1763
1698
|
*/
|
|
1764
1699
|
createSandbox: (params: {
|
|
1765
1700
|
templateName: string;
|
|
1766
1701
|
sandboxIdleTimeoutSeconds?: number;
|
|
1702
|
+
nasConfig?: Record<string, any>;
|
|
1703
|
+
ossMountConfig?: Record<string, any>;
|
|
1704
|
+
polarFsConfig?: Record<string, any>;
|
|
1767
1705
|
config?: Config;
|
|
1768
1706
|
}) => Promise<any>;
|
|
1769
1707
|
/**
|
|
@@ -1900,6 +1838,140 @@ declare enum TemplateOSSPermission {
|
|
|
1900
1838
|
declare enum CodeLanguage {
|
|
1901
1839
|
PYTHON = "python"
|
|
1902
1840
|
}
|
|
1841
|
+
/**
|
|
1842
|
+
* NAS mount configuration
|
|
1843
|
+
* NAS 挂载配置 / NAS Mount Configuration
|
|
1844
|
+
*
|
|
1845
|
+
* 定义 NAS 文件系统的挂载配置。
|
|
1846
|
+
* Defines the mount configuration for NAS file system.
|
|
1847
|
+
*/
|
|
1848
|
+
interface NASMountConfig {
|
|
1849
|
+
/**
|
|
1850
|
+
* 是否启用 TLS 加密 / Whether to enable TLS encryption
|
|
1851
|
+
*/
|
|
1852
|
+
enableTLS?: boolean;
|
|
1853
|
+
/**
|
|
1854
|
+
* 挂载目录 / Mount Directory
|
|
1855
|
+
* @example "/home/test"
|
|
1856
|
+
*/
|
|
1857
|
+
mountDir?: string;
|
|
1858
|
+
/**
|
|
1859
|
+
* NAS 服务器地址 / NAS Server Address
|
|
1860
|
+
* @example "***-uni85.cn-hangzhou.nas.com:/"
|
|
1861
|
+
*/
|
|
1862
|
+
serverAddr?: string;
|
|
1863
|
+
}
|
|
1864
|
+
/**
|
|
1865
|
+
* NAS configuration
|
|
1866
|
+
* NAS 配置 / NAS Configuration
|
|
1867
|
+
*
|
|
1868
|
+
* 定义 NAS 文件系统的配置。
|
|
1869
|
+
* Defines the configuration for NAS file system.
|
|
1870
|
+
*/
|
|
1871
|
+
interface NASConfig {
|
|
1872
|
+
/**
|
|
1873
|
+
* 组 ID / Group ID
|
|
1874
|
+
* @example 100
|
|
1875
|
+
*/
|
|
1876
|
+
groupId?: number;
|
|
1877
|
+
/**
|
|
1878
|
+
* 挂载点列表 / Mount Points List
|
|
1879
|
+
*/
|
|
1880
|
+
mountPoints?: NASMountConfig[];
|
|
1881
|
+
/**
|
|
1882
|
+
* 用户 ID / User ID
|
|
1883
|
+
* @example 100
|
|
1884
|
+
*/
|
|
1885
|
+
userId?: number;
|
|
1886
|
+
}
|
|
1887
|
+
/**
|
|
1888
|
+
* OSS mount point
|
|
1889
|
+
* OSS 挂载点 / OSS Mount Point
|
|
1890
|
+
*
|
|
1891
|
+
* 定义 OSS 存储的挂载点配置。
|
|
1892
|
+
* Defines the mount point configuration for OSS storage.
|
|
1893
|
+
*/
|
|
1894
|
+
interface OSSMountPoint {
|
|
1895
|
+
/**
|
|
1896
|
+
* OSS 存储桶名称 / OSS Bucket Name
|
|
1897
|
+
* @example "my-bucket"
|
|
1898
|
+
*/
|
|
1899
|
+
bucketName?: string;
|
|
1900
|
+
/**
|
|
1901
|
+
* OSS 存储桶路径 / OSS Bucket Path
|
|
1902
|
+
* @example "/my-dir"
|
|
1903
|
+
*/
|
|
1904
|
+
bucketPath?: string;
|
|
1905
|
+
/**
|
|
1906
|
+
* OSS 端点 / OSS Endpoint
|
|
1907
|
+
* @example "http://oss-cn-shanghai.aliyuncs.com"
|
|
1908
|
+
*/
|
|
1909
|
+
endpoint?: string;
|
|
1910
|
+
/**
|
|
1911
|
+
* 挂载目录 / Mount Directory
|
|
1912
|
+
* @example "/mnt/dir"
|
|
1913
|
+
*/
|
|
1914
|
+
mountDir?: string;
|
|
1915
|
+
/**
|
|
1916
|
+
* 是否只读 / Read Only
|
|
1917
|
+
*/
|
|
1918
|
+
readOnly?: boolean;
|
|
1919
|
+
}
|
|
1920
|
+
/**
|
|
1921
|
+
* OSS mount configuration
|
|
1922
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
1923
|
+
*
|
|
1924
|
+
* 定义 OSS 存储的挂载配置。
|
|
1925
|
+
* Defines the mount configuration for OSS storage.
|
|
1926
|
+
*/
|
|
1927
|
+
interface OSSMountConfig {
|
|
1928
|
+
/**
|
|
1929
|
+
* 挂载点列表 / Mount Points List
|
|
1930
|
+
*/
|
|
1931
|
+
mountPoints?: OSSMountPoint[];
|
|
1932
|
+
}
|
|
1933
|
+
/**
|
|
1934
|
+
* PolarFS mount configuration
|
|
1935
|
+
* PolarFS 挂载配置 / PolarFS Mount Configuration
|
|
1936
|
+
*
|
|
1937
|
+
* 定义 PolarFS 文件系统的挂载配置。
|
|
1938
|
+
* Defines the mount configuration for PolarFS file system.
|
|
1939
|
+
*/
|
|
1940
|
+
interface PolarFsMountConfig {
|
|
1941
|
+
/**
|
|
1942
|
+
* 实例 ID / Instance ID
|
|
1943
|
+
*/
|
|
1944
|
+
instanceId?: string;
|
|
1945
|
+
/**
|
|
1946
|
+
* 挂载目录 / Mount Directory
|
|
1947
|
+
*/
|
|
1948
|
+
mountDir?: string;
|
|
1949
|
+
/**
|
|
1950
|
+
* 远程目录 / Remote Directory
|
|
1951
|
+
*/
|
|
1952
|
+
remoteDir?: string;
|
|
1953
|
+
}
|
|
1954
|
+
/**
|
|
1955
|
+
* PolarFS configuration
|
|
1956
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
1957
|
+
*
|
|
1958
|
+
* 定义 PolarFS 文件系统的配置。
|
|
1959
|
+
* Defines the configuration for PolarFS file system.
|
|
1960
|
+
*/
|
|
1961
|
+
interface PolarFsConfig {
|
|
1962
|
+
/**
|
|
1963
|
+
* 组 ID / Group ID
|
|
1964
|
+
*/
|
|
1965
|
+
groupId?: number;
|
|
1966
|
+
/**
|
|
1967
|
+
* 挂载点列表 / Mount Points List
|
|
1968
|
+
*/
|
|
1969
|
+
mountPoints?: PolarFsMountConfig[];
|
|
1970
|
+
/**
|
|
1971
|
+
* 用户 ID / User ID
|
|
1972
|
+
*/
|
|
1973
|
+
userId?: number;
|
|
1974
|
+
}
|
|
1903
1975
|
/**
|
|
1904
1976
|
* Template network configuration
|
|
1905
1977
|
*/
|
|
@@ -1963,6 +2035,7 @@ interface TemplateMcpState {
|
|
|
1963
2035
|
}
|
|
1964
2036
|
/**
|
|
1965
2037
|
* Template create input
|
|
2038
|
+
* 模板创建输入 / Template Create Input
|
|
1966
2039
|
*/
|
|
1967
2040
|
interface TemplateCreateInput {
|
|
1968
2041
|
templateName?: string;
|
|
@@ -1983,6 +2056,10 @@ interface TemplateCreateInput {
|
|
|
1983
2056
|
armsConfiguration?: TemplateArmsConfiguration;
|
|
1984
2057
|
containerConfiguration?: TemplateContainerConfiguration;
|
|
1985
2058
|
diskSize?: number;
|
|
2059
|
+
/**
|
|
2060
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2061
|
+
*/
|
|
2062
|
+
allowAnonymousManage?: boolean;
|
|
1986
2063
|
}
|
|
1987
2064
|
/**
|
|
1988
2065
|
* Template update input
|
|
@@ -2012,10 +2089,33 @@ interface TemplateListInput extends PageableInput {
|
|
|
2012
2089
|
}
|
|
2013
2090
|
/**
|
|
2014
2091
|
* Sandbox create input
|
|
2092
|
+
* 沙箱创建输入 / Sandbox Create Input
|
|
2015
2093
|
*/
|
|
2016
2094
|
interface SandboxCreateInput {
|
|
2095
|
+
/**
|
|
2096
|
+
* 模板名称 / Template Name
|
|
2097
|
+
*/
|
|
2017
2098
|
templateName: string;
|
|
2099
|
+
/**
|
|
2100
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2101
|
+
*/
|
|
2018
2102
|
sandboxIdleTimeoutSeconds?: number;
|
|
2103
|
+
/**
|
|
2104
|
+
* 沙箱 ID(可选,用户可指定) / Sandbox ID (optional, user can specify)
|
|
2105
|
+
*/
|
|
2106
|
+
sandboxId?: string;
|
|
2107
|
+
/**
|
|
2108
|
+
* NAS 配置 / NAS Configuration
|
|
2109
|
+
*/
|
|
2110
|
+
nasConfig?: NASConfig;
|
|
2111
|
+
/**
|
|
2112
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
2113
|
+
*/
|
|
2114
|
+
ossMountConfig?: OSSMountConfig;
|
|
2115
|
+
/**
|
|
2116
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
2117
|
+
*/
|
|
2118
|
+
polarFsConfig?: PolarFsConfig;
|
|
2019
2119
|
}
|
|
2020
2120
|
/**
|
|
2021
2121
|
* Sandbox list input
|
|
@@ -2029,39 +2129,139 @@ interface SandboxListInput {
|
|
|
2029
2129
|
}
|
|
2030
2130
|
/**
|
|
2031
2131
|
* Template data
|
|
2132
|
+
* 模板数据 / Template Data
|
|
2032
2133
|
*/
|
|
2033
2134
|
interface TemplateData {
|
|
2135
|
+
/**
|
|
2136
|
+
* 模板 ARN / Template ARN
|
|
2137
|
+
*/
|
|
2034
2138
|
templateArn?: string;
|
|
2139
|
+
/**
|
|
2140
|
+
* 模板 ID / Template ID
|
|
2141
|
+
*/
|
|
2035
2142
|
templateId?: string;
|
|
2143
|
+
/**
|
|
2144
|
+
* 模板名称 / Template Name
|
|
2145
|
+
*/
|
|
2036
2146
|
templateName?: string;
|
|
2147
|
+
/**
|
|
2148
|
+
* 模板类型 / Template Type
|
|
2149
|
+
*/
|
|
2037
2150
|
templateType?: TemplateType;
|
|
2151
|
+
/**
|
|
2152
|
+
* CPU 核数 / CPU Cores
|
|
2153
|
+
*/
|
|
2038
2154
|
cpu?: number;
|
|
2155
|
+
/**
|
|
2156
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
2157
|
+
*/
|
|
2039
2158
|
memory?: number;
|
|
2159
|
+
/**
|
|
2160
|
+
* 创建时间 / Creation Time
|
|
2161
|
+
*/
|
|
2040
2162
|
createdAt?: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* 描述 / Description
|
|
2165
|
+
*/
|
|
2041
2166
|
description?: string;
|
|
2167
|
+
/**
|
|
2168
|
+
* 执行角色 ARN / Execution Role ARN
|
|
2169
|
+
*/
|
|
2042
2170
|
executionRoleArn?: string;
|
|
2171
|
+
/**
|
|
2172
|
+
* 最后更新时间 / Last Updated Time
|
|
2173
|
+
*/
|
|
2043
2174
|
lastUpdatedAt?: string;
|
|
2175
|
+
/**
|
|
2176
|
+
* 资源名称 / Resource Name
|
|
2177
|
+
*/
|
|
2044
2178
|
resourceName?: string;
|
|
2179
|
+
/**
|
|
2180
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2181
|
+
*/
|
|
2045
2182
|
sandboxIdleTimeoutInSeconds?: number;
|
|
2183
|
+
/**
|
|
2184
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
2185
|
+
*/
|
|
2046
2186
|
sandboxTtlInSeconds?: number;
|
|
2187
|
+
/**
|
|
2188
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
2189
|
+
*/
|
|
2047
2190
|
shareConcurrencyLimitPerSandbox?: number;
|
|
2191
|
+
/**
|
|
2192
|
+
* 状态 / Status
|
|
2193
|
+
*/
|
|
2048
2194
|
status?: Status;
|
|
2195
|
+
/**
|
|
2196
|
+
* 状态原因 / Status Reason
|
|
2197
|
+
*/
|
|
2049
2198
|
statusReason?: string;
|
|
2199
|
+
/**
|
|
2200
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
2201
|
+
*/
|
|
2050
2202
|
diskSize?: number;
|
|
2203
|
+
/**
|
|
2204
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2205
|
+
*/
|
|
2206
|
+
allowAnonymousManage?: boolean;
|
|
2051
2207
|
}
|
|
2052
2208
|
/**
|
|
2053
2209
|
* Sandbox data
|
|
2210
|
+
* 沙箱数据 / Sandbox Data
|
|
2054
2211
|
*/
|
|
2055
2212
|
interface SandboxData {
|
|
2213
|
+
/**
|
|
2214
|
+
* 沙箱 ID / Sandbox ID
|
|
2215
|
+
*/
|
|
2056
2216
|
sandboxId?: string;
|
|
2217
|
+
/**
|
|
2218
|
+
* 沙箱名称 / Sandbox Name
|
|
2219
|
+
*/
|
|
2057
2220
|
sandboxName?: string;
|
|
2221
|
+
/**
|
|
2222
|
+
* 模板 ID / Template ID
|
|
2223
|
+
*/
|
|
2058
2224
|
templateId?: string;
|
|
2225
|
+
/**
|
|
2226
|
+
* 模板名称 / Template Name
|
|
2227
|
+
*/
|
|
2059
2228
|
templateName?: string;
|
|
2229
|
+
/**
|
|
2230
|
+
* 沙箱状态 / Sandbox State
|
|
2231
|
+
*/
|
|
2060
2232
|
state?: SandboxState;
|
|
2233
|
+
/**
|
|
2234
|
+
* 状态原因 / State Reason
|
|
2235
|
+
*/
|
|
2061
2236
|
stateReason?: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2239
|
+
*/
|
|
2062
2240
|
createdAt?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* 最后更新时间 / Last Updated Time
|
|
2243
|
+
*/
|
|
2063
2244
|
lastUpdatedAt?: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2247
|
+
*/
|
|
2064
2248
|
sandboxIdleTimeoutSeconds?: number;
|
|
2249
|
+
/**
|
|
2250
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2251
|
+
*/
|
|
2252
|
+
endedAt?: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* 元数据 / Metadata
|
|
2255
|
+
*/
|
|
2256
|
+
metadata?: Record<string, any>;
|
|
2257
|
+
/**
|
|
2258
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2259
|
+
*/
|
|
2260
|
+
sandboxArn?: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2263
|
+
*/
|
|
2264
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2065
2265
|
}
|
|
2066
2266
|
/**
|
|
2067
2267
|
* Code execution result
|
|
@@ -2092,26 +2292,73 @@ interface FileInfo {
|
|
|
2092
2292
|
|
|
2093
2293
|
/**
|
|
2094
2294
|
* Base Sandbox resource class
|
|
2295
|
+
* 基础沙箱资源类 / Base Sandbox Resource Class
|
|
2095
2296
|
*/
|
|
2096
|
-
declare class Sandbox implements SandboxData {
|
|
2297
|
+
declare class Sandbox extends ResourceBase implements SandboxData {
|
|
2298
|
+
templateType?: TemplateType;
|
|
2299
|
+
/**
|
|
2300
|
+
* 沙箱 ID / Sandbox ID
|
|
2301
|
+
*/
|
|
2097
2302
|
sandboxId?: string;
|
|
2303
|
+
/**
|
|
2304
|
+
* 沙箱名称 / Sandbox Name
|
|
2305
|
+
*/
|
|
2098
2306
|
sandboxName?: string;
|
|
2307
|
+
/**
|
|
2308
|
+
* 模板 ID / Template ID
|
|
2309
|
+
*/
|
|
2099
2310
|
templateId?: string;
|
|
2311
|
+
/**
|
|
2312
|
+
* 模板名称 / Template Name
|
|
2313
|
+
*/
|
|
2100
2314
|
templateName?: string;
|
|
2315
|
+
/**
|
|
2316
|
+
* 沙箱状态 / Sandbox State
|
|
2317
|
+
*/
|
|
2101
2318
|
state?: SandboxState;
|
|
2319
|
+
/**
|
|
2320
|
+
* 状态原因 / State Reason
|
|
2321
|
+
*/
|
|
2102
2322
|
stateReason?: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2325
|
+
*/
|
|
2103
2326
|
createdAt?: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* 最后更新时间 / Last Updated Time
|
|
2329
|
+
*/
|
|
2104
2330
|
lastUpdatedAt?: string;
|
|
2331
|
+
/**
|
|
2332
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2333
|
+
*/
|
|
2105
2334
|
sandboxIdleTimeoutSeconds?: number;
|
|
2335
|
+
/**
|
|
2336
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2337
|
+
*/
|
|
2338
|
+
endedAt?: string;
|
|
2339
|
+
/**
|
|
2340
|
+
* 元数据 / Metadata
|
|
2341
|
+
*/
|
|
2342
|
+
metadata?: Record<string, any>;
|
|
2343
|
+
/**
|
|
2344
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2345
|
+
*/
|
|
2346
|
+
sandboxArn?: string;
|
|
2347
|
+
/**
|
|
2348
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2349
|
+
*/
|
|
2350
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2106
2351
|
protected _config?: Config;
|
|
2107
2352
|
constructor(data?: Partial<SandboxData>, config?: Config);
|
|
2108
2353
|
/**
|
|
2109
2354
|
* Create sandbox from SDK response object
|
|
2355
|
+
* 从 SDK 响应对象创建沙箱 / Create Sandbox from SDK Response Object
|
|
2110
2356
|
*/
|
|
2111
2357
|
static fromInnerObject(obj: any, config?: Config): Sandbox;
|
|
2112
|
-
|
|
2358
|
+
private static getClient;
|
|
2113
2359
|
/**
|
|
2114
2360
|
* Create a new Sandbox
|
|
2361
|
+
* 创建新沙箱 / Create a New Sandbox
|
|
2115
2362
|
*/
|
|
2116
2363
|
static create(input: SandboxCreateInput, config?: Config): Promise<Sandbox>;
|
|
2117
2364
|
/**
|
|
@@ -2140,10 +2387,9 @@ declare class Sandbox implements SandboxData {
|
|
|
2140
2387
|
* List Sandboxes
|
|
2141
2388
|
*/
|
|
2142
2389
|
static list(input?: SandboxListInput, config?: Config): Promise<Sandbox[]>;
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
protected static handleError(error: unknown): never;
|
|
2390
|
+
get: (params?: {
|
|
2391
|
+
config?: Config;
|
|
2392
|
+
}) => Promise<Sandbox>;
|
|
2147
2393
|
/**
|
|
2148
2394
|
* Delete this sandbox
|
|
2149
2395
|
*/
|
|
@@ -2188,9 +2434,13 @@ declare class BrowserSandbox extends Sandbox {
|
|
|
2188
2434
|
static templateType: TemplateType;
|
|
2189
2435
|
/**
|
|
2190
2436
|
* Create a Browser Sandbox from template
|
|
2437
|
+
* 从模板创建浏览器沙箱 / Create Browser Sandbox from Template
|
|
2191
2438
|
*/
|
|
2192
2439
|
static createFromTemplate(templateName: string, options?: {
|
|
2193
2440
|
sandboxIdleTimeoutSeconds?: number;
|
|
2441
|
+
nasConfig?: NASConfig;
|
|
2442
|
+
ossMountConfig?: OSSMountConfig;
|
|
2443
|
+
polarFsConfig?: PolarFsConfig;
|
|
2194
2444
|
}, config?: Config): Promise<BrowserSandbox>;
|
|
2195
2445
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2196
2446
|
private _dataApi?;
|
|
@@ -2207,13 +2457,6 @@ declare class BrowserSandbox extends Sandbox {
|
|
|
2207
2457
|
status: string;
|
|
2208
2458
|
[key: string]: any;
|
|
2209
2459
|
}>;
|
|
2210
|
-
/**
|
|
2211
|
-
* Wait for browser sandbox to be ready (polls health check)
|
|
2212
|
-
*/
|
|
2213
|
-
waitUntilReady: (params?: {
|
|
2214
|
-
maxRetries?: number;
|
|
2215
|
-
retryIntervalMs?: number;
|
|
2216
|
-
}) => Promise<void>;
|
|
2217
2460
|
/**
|
|
2218
2461
|
* Get CDP WebSocket URL for browser automation
|
|
2219
2462
|
*/
|
|
@@ -2612,9 +2855,13 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2612
2855
|
static templateType: TemplateType;
|
|
2613
2856
|
/**
|
|
2614
2857
|
* Create a Code Interpreter Sandbox from template
|
|
2858
|
+
* 从模板创建代码解释器沙箱 / Create Code Interpreter Sandbox from Template
|
|
2615
2859
|
*/
|
|
2616
2860
|
static createFromTemplate(templateName: string, options?: {
|
|
2617
2861
|
sandboxIdleTimeoutSeconds?: number;
|
|
2862
|
+
nasConfig?: NASConfig;
|
|
2863
|
+
ossMountConfig?: OSSMountConfig;
|
|
2864
|
+
polarFsConfig?: PolarFsConfig;
|
|
2618
2865
|
}, config?: Config): Promise<CodeInterpreterSandbox>;
|
|
2619
2866
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2620
2867
|
private _dataApi?;
|
|
@@ -2651,13 +2898,6 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2651
2898
|
status: string;
|
|
2652
2899
|
[key: string]: any;
|
|
2653
2900
|
}>;
|
|
2654
|
-
/**
|
|
2655
|
-
* Wait for sandbox to be ready (polls health check)
|
|
2656
|
-
*/
|
|
2657
|
-
waitUntilReady: (params?: {
|
|
2658
|
-
maxRetries?: number;
|
|
2659
|
-
retryIntervalMs?: number;
|
|
2660
|
-
}) => Promise<void>;
|
|
2661
2901
|
/**
|
|
2662
2902
|
* Execute code (convenience method delegating to context.execute)
|
|
2663
2903
|
*/
|
|
@@ -2678,31 +2918,84 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2678
2918
|
|
|
2679
2919
|
/**
|
|
2680
2920
|
* Template resource class
|
|
2921
|
+
* 模板资源类 / Template Resource Class
|
|
2681
2922
|
*/
|
|
2682
|
-
declare class Template implements TemplateData {
|
|
2923
|
+
declare class Template extends ResourceBase implements TemplateData {
|
|
2924
|
+
/**
|
|
2925
|
+
* 模板 ARN / Template ARN
|
|
2926
|
+
*/
|
|
2683
2927
|
templateArn?: string;
|
|
2928
|
+
/**
|
|
2929
|
+
* 模板 ID / Template ID
|
|
2930
|
+
*/
|
|
2684
2931
|
templateId?: string;
|
|
2932
|
+
/**
|
|
2933
|
+
* 模板名称 / Template Name
|
|
2934
|
+
*/
|
|
2685
2935
|
templateName?: string;
|
|
2936
|
+
/**
|
|
2937
|
+
* 模板类型 / Template Type
|
|
2938
|
+
*/
|
|
2686
2939
|
templateType?: TemplateType;
|
|
2940
|
+
/**
|
|
2941
|
+
* CPU 核数 / CPU Cores
|
|
2942
|
+
*/
|
|
2687
2943
|
cpu?: number;
|
|
2944
|
+
/**
|
|
2945
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
2946
|
+
*/
|
|
2688
2947
|
memory?: number;
|
|
2948
|
+
/**
|
|
2949
|
+
* 创建时间 / Creation Time
|
|
2950
|
+
*/
|
|
2689
2951
|
createdAt?: string;
|
|
2952
|
+
/**
|
|
2953
|
+
* 描述 / Description
|
|
2954
|
+
*/
|
|
2690
2955
|
description?: string;
|
|
2956
|
+
/**
|
|
2957
|
+
* 执行角色 ARN / Execution Role ARN
|
|
2958
|
+
*/
|
|
2691
2959
|
executionRoleArn?: string;
|
|
2960
|
+
/**
|
|
2961
|
+
* 最后更新时间 / Last Updated Time
|
|
2962
|
+
*/
|
|
2692
2963
|
lastUpdatedAt?: string;
|
|
2964
|
+
/**
|
|
2965
|
+
* 资源名称 / Resource Name
|
|
2966
|
+
*/
|
|
2693
2967
|
resourceName?: string;
|
|
2968
|
+
/**
|
|
2969
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2970
|
+
*/
|
|
2694
2971
|
sandboxIdleTimeoutInSeconds?: number;
|
|
2972
|
+
/**
|
|
2973
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
2974
|
+
*/
|
|
2695
2975
|
sandboxTtlInSeconds?: number;
|
|
2976
|
+
/**
|
|
2977
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
2978
|
+
*/
|
|
2696
2979
|
shareConcurrencyLimitPerSandbox?: number;
|
|
2980
|
+
/**
|
|
2981
|
+
* 状态 / Status
|
|
2982
|
+
*/
|
|
2697
2983
|
status?: Status;
|
|
2984
|
+
/**
|
|
2985
|
+
* 状态原因 / Status Reason
|
|
2986
|
+
*/
|
|
2698
2987
|
statusReason?: string;
|
|
2988
|
+
/**
|
|
2989
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
2990
|
+
*/
|
|
2699
2991
|
diskSize?: number;
|
|
2700
|
-
private _config?;
|
|
2701
|
-
constructor(data?: Partial<TemplateData>, config?: Config);
|
|
2702
2992
|
/**
|
|
2703
|
-
*
|
|
2993
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2704
2994
|
*/
|
|
2705
|
-
|
|
2995
|
+
allowAnonymousManage?: boolean;
|
|
2996
|
+
protected _config?: Config;
|
|
2997
|
+
constructor(data?: any, config?: Config);
|
|
2998
|
+
uniqIdCallback: () => string | undefined;
|
|
2706
2999
|
private static getClient;
|
|
2707
3000
|
/**
|
|
2708
3001
|
* Create a new Template
|
|
@@ -2711,14 +3004,6 @@ declare class Template implements TemplateData {
|
|
|
2711
3004
|
input: TemplateCreateInput;
|
|
2712
3005
|
config?: Config;
|
|
2713
3006
|
}): Promise<Template>;
|
|
2714
|
-
/**
|
|
2715
|
-
* Get defaults based on template type
|
|
2716
|
-
*/
|
|
2717
|
-
private static getDefaults;
|
|
2718
|
-
/**
|
|
2719
|
-
* Validate template configuration
|
|
2720
|
-
*/
|
|
2721
|
-
private static validate;
|
|
2722
3007
|
/**
|
|
2723
3008
|
* Delete a Template by name
|
|
2724
3009
|
*/
|
|
@@ -2744,17 +3029,19 @@ declare class Template implements TemplateData {
|
|
|
2744
3029
|
/**
|
|
2745
3030
|
* List Templates
|
|
2746
3031
|
*/
|
|
2747
|
-
static list(
|
|
3032
|
+
static list(params?: {
|
|
3033
|
+
input?: TemplateListInput;
|
|
3034
|
+
config?: Config;
|
|
3035
|
+
}): Promise<Template[]>;
|
|
2748
3036
|
/**
|
|
2749
3037
|
* List all Templates (with pagination)
|
|
2750
3038
|
*/
|
|
2751
|
-
static listAll(
|
|
2752
|
-
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
private static handleError;
|
|
3039
|
+
static listAll: (params?: (Omit<TemplateListInput, "pageNumber" | "pageSize"> & {
|
|
3040
|
+
config?: Config;
|
|
3041
|
+
}) | undefined) => Promise<any[]>;
|
|
3042
|
+
get: (params?: {
|
|
3043
|
+
config?: Config;
|
|
3044
|
+
}) => Promise<Template>;
|
|
2758
3045
|
/**
|
|
2759
3046
|
* Delete this template
|
|
2760
3047
|
*/
|
|
@@ -2774,14 +3061,6 @@ declare class Template implements TemplateData {
|
|
|
2774
3061
|
refresh: (params?: {
|
|
2775
3062
|
config?: Config;
|
|
2776
3063
|
}) => Promise<Template>;
|
|
2777
|
-
/**
|
|
2778
|
-
* Wait until the template is ready
|
|
2779
|
-
*/
|
|
2780
|
-
waitUntilReady: (options?: {
|
|
2781
|
-
timeoutSeconds?: number;
|
|
2782
|
-
intervalSeconds?: number;
|
|
2783
|
-
beforeCheck?: (template: Template) => void;
|
|
2784
|
-
}, config?: Config) => Promise<Template>;
|
|
2785
3064
|
}
|
|
2786
3065
|
|
|
2787
3066
|
/**
|
|
@@ -2798,6 +3077,7 @@ declare class Template implements TemplateData {
|
|
|
2798
3077
|
*/
|
|
2799
3078
|
declare class SandboxClient {
|
|
2800
3079
|
private config?;
|
|
3080
|
+
private controlApi;
|
|
2801
3081
|
constructor(config?: Config);
|
|
2802
3082
|
/**
|
|
2803
3083
|
* Create a Template
|
|
@@ -2835,15 +3115,6 @@ declare class SandboxClient {
|
|
|
2835
3115
|
input?: TemplateListInput;
|
|
2836
3116
|
config?: Config;
|
|
2837
3117
|
}) => Promise<Template[]>;
|
|
2838
|
-
/**
|
|
2839
|
-
* List all Templates
|
|
2840
|
-
*/
|
|
2841
|
-
listAllTemplates: (params?: {
|
|
2842
|
-
options?: {
|
|
2843
|
-
templateType?: TemplateType;
|
|
2844
|
-
};
|
|
2845
|
-
config?: Config;
|
|
2846
|
-
}) => Promise<Template[]>;
|
|
2847
3118
|
/**
|
|
2848
3119
|
* Create a Sandbox
|
|
2849
3120
|
*/
|
|
@@ -2853,21 +3124,29 @@ declare class SandboxClient {
|
|
|
2853
3124
|
}) => Promise<Sandbox>;
|
|
2854
3125
|
/**
|
|
2855
3126
|
* Create a Code Interpreter Sandbox
|
|
3127
|
+
* 创建代码解释器沙箱 / Create Code Interpreter Sandbox
|
|
2856
3128
|
*/
|
|
2857
3129
|
createCodeInterpreterSandbox: (params: {
|
|
2858
3130
|
templateName: string;
|
|
2859
3131
|
options?: {
|
|
2860
3132
|
sandboxIdleTimeoutSeconds?: number;
|
|
3133
|
+
nasConfig?: NASConfig;
|
|
3134
|
+
ossMountConfig?: OSSMountConfig;
|
|
3135
|
+
polarFsConfig?: PolarFsConfig;
|
|
2861
3136
|
};
|
|
2862
3137
|
config?: Config;
|
|
2863
3138
|
}) => Promise<CodeInterpreterSandbox>;
|
|
2864
3139
|
/**
|
|
2865
3140
|
* Create a Browser Sandbox
|
|
3141
|
+
* 创建浏览器沙箱 / Create Browser Sandbox
|
|
2866
3142
|
*/
|
|
2867
3143
|
createBrowserSandbox: (params: {
|
|
2868
3144
|
templateName: string;
|
|
2869
3145
|
options?: {
|
|
2870
3146
|
sandboxIdleTimeoutSeconds?: number;
|
|
3147
|
+
nasConfig?: NASConfig;
|
|
3148
|
+
ossMountConfig?: OSSMountConfig;
|
|
3149
|
+
polarFsConfig?: PolarFsConfig;
|
|
2871
3150
|
};
|
|
2872
3151
|
config?: Config;
|
|
2873
3152
|
}) => Promise<BrowserSandbox>;
|
|
@@ -2904,6 +3183,9 @@ declare class SandboxClient {
|
|
|
2904
3183
|
input?: SandboxListInput;
|
|
2905
3184
|
config?: Config;
|
|
2906
3185
|
}) => Promise<Sandbox[]>;
|
|
3186
|
+
private prepareTemplateCreateInput;
|
|
3187
|
+
private getTemplateDefaults;
|
|
3188
|
+
private validateTemplateCreateInput;
|
|
2907
3189
|
}
|
|
2908
3190
|
|
|
2909
3191
|
/**
|
|
@@ -3134,9 +3416,13 @@ declare class AioSandbox extends Sandbox {
|
|
|
3134
3416
|
static templateType: TemplateType;
|
|
3135
3417
|
/**
|
|
3136
3418
|
* Create an AIO Sandbox from template
|
|
3419
|
+
* 从模板创建 AIO 沙箱 / Create AIO Sandbox from Template
|
|
3137
3420
|
*/
|
|
3138
3421
|
static createFromTemplate(templateName: string, options?: {
|
|
3139
3422
|
sandboxIdleTimeoutSeconds?: number;
|
|
3423
|
+
nasConfig?: NASConfig;
|
|
3424
|
+
ossMountConfig?: OSSMountConfig;
|
|
3425
|
+
polarFsConfig?: PolarFsConfig;
|
|
3140
3426
|
}, config?: Config): Promise<AioSandbox>;
|
|
3141
3427
|
constructor(sandbox: Sandbox, config?: Config);
|
|
3142
3428
|
private _dataApi?;
|
|
@@ -3173,13 +3459,6 @@ declare class AioSandbox extends Sandbox {
|
|
|
3173
3459
|
status: string;
|
|
3174
3460
|
[key: string]: any;
|
|
3175
3461
|
}>;
|
|
3176
|
-
/**
|
|
3177
|
-
* Wait for sandbox to be ready (polls health check)
|
|
3178
|
-
*/
|
|
3179
|
-
waitUntilReady: (params?: {
|
|
3180
|
-
maxRetries?: number;
|
|
3181
|
-
retryIntervalMs?: number;
|
|
3182
|
-
}) => Promise<void>;
|
|
3183
3462
|
/**
|
|
3184
3463
|
* Get CDP WebSocket URL for browser automation
|
|
3185
3464
|
*/
|
|
@@ -3437,6 +3716,45 @@ interface ModelProxyListInput extends PageableInput {
|
|
|
3437
3716
|
status?: Status;
|
|
3438
3717
|
}
|
|
3439
3718
|
|
|
3719
|
+
interface ModelInfo {
|
|
3720
|
+
model?: string;
|
|
3721
|
+
apiKey?: string;
|
|
3722
|
+
baseUrl?: string;
|
|
3723
|
+
headers?: Record<string, string>;
|
|
3724
|
+
provider?: string;
|
|
3725
|
+
}
|
|
3726
|
+
type GetModelInfo = (params?: {
|
|
3727
|
+
config?: Config;
|
|
3728
|
+
}) => Promise<ModelInfo>;
|
|
3729
|
+
declare class ModelAPI {
|
|
3730
|
+
getModelInfo: GetModelInfo;
|
|
3731
|
+
constructor(getModelInfo: GetModelInfo);
|
|
3732
|
+
private getProvider;
|
|
3733
|
+
private getModel;
|
|
3734
|
+
private getEmbeddingModel;
|
|
3735
|
+
completion: (params: {
|
|
3736
|
+
messages: any[];
|
|
3737
|
+
model?: string;
|
|
3738
|
+
stream?: boolean;
|
|
3739
|
+
config?: Config;
|
|
3740
|
+
[key: string]: any;
|
|
3741
|
+
}) => Promise<ai.StreamTextResult<ai.ToolSet, any> | ai.GenerateTextResult<ai.ToolSet, any>>;
|
|
3742
|
+
embedding: (params: {
|
|
3743
|
+
values: string[];
|
|
3744
|
+
model?: string;
|
|
3745
|
+
stream?: boolean;
|
|
3746
|
+
config?: Config;
|
|
3747
|
+
[key: string]: any;
|
|
3748
|
+
}) => Promise<ai.EmbedManyResult>;
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3751
|
+
/**
|
|
3752
|
+
* Model Proxy 高层 API / Model Proxy High-Level API
|
|
3753
|
+
*
|
|
3754
|
+
* 此模块定义模型代理资源的高级API。
|
|
3755
|
+
* This module defines the high-level API for model proxy resources.
|
|
3756
|
+
*/
|
|
3757
|
+
|
|
3440
3758
|
/**
|
|
3441
3759
|
* 模型代理 / Model Proxy
|
|
3442
3760
|
*/
|
|
@@ -3460,12 +3778,17 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3460
3778
|
createdAt?: string;
|
|
3461
3779
|
lastUpdatedAt?: string;
|
|
3462
3780
|
status?: ModelProxySystemProps['status'];
|
|
3781
|
+
private modelApi;
|
|
3782
|
+
constructor();
|
|
3783
|
+
completion: (typeof ModelAPI)['prototype']['completion'];
|
|
3784
|
+
embedding: (typeof ModelAPI)['prototype']['embedding'];
|
|
3463
3785
|
/**
|
|
3464
3786
|
* 获取客户端 / Get client
|
|
3465
3787
|
*
|
|
3466
3788
|
* @returns ModelClient 实例
|
|
3467
3789
|
*/
|
|
3468
3790
|
private static getClient;
|
|
3791
|
+
uniqIdCallback: () => string | undefined;
|
|
3469
3792
|
/**
|
|
3470
3793
|
* 创建模型代理 / Create model proxy
|
|
3471
3794
|
*
|
|
@@ -3515,19 +3838,13 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3515
3838
|
* @param kwargs - 其他查询参数 / Other query parameters
|
|
3516
3839
|
* @returns 模型代理列表 / Model proxy list
|
|
3517
3840
|
*/
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
* @param config - 配置 / Configuration
|
|
3524
|
-
* @returns 模型代理列表 / Model proxy list
|
|
3525
|
-
*/
|
|
3526
|
-
static listAll(options?: {
|
|
3527
|
-
proxyMode?: string;
|
|
3528
|
-
status?: Status;
|
|
3841
|
+
static list: (params?: {
|
|
3842
|
+
input?: ModelProxyListInput;
|
|
3843
|
+
config?: Config;
|
|
3844
|
+
}) => Promise<ModelProxy[]>;
|
|
3845
|
+
static listAll: (params?: (Omit<ModelProxyListInput, "pageNumber" | "pageSize"> & {
|
|
3529
3846
|
config?: Config;
|
|
3530
|
-
})
|
|
3847
|
+
}) | undefined) => Promise<any[]>;
|
|
3531
3848
|
/**
|
|
3532
3849
|
* 更新模型代理 / Update model proxy
|
|
3533
3850
|
*
|
|
@@ -3566,52 +3883,16 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3566
3883
|
*/
|
|
3567
3884
|
modelInfo: (params?: {
|
|
3568
3885
|
config?: Config;
|
|
3569
|
-
}) => Promise<
|
|
3570
|
-
apiKey: string;
|
|
3571
|
-
baseUrl: string;
|
|
3572
|
-
model?: string;
|
|
3573
|
-
headers?: Record<string, string>;
|
|
3574
|
-
}>;
|
|
3575
|
-
/**
|
|
3576
|
-
* 调用模型完成 / Call model completion
|
|
3577
|
-
*
|
|
3578
|
-
* @param params - 参数 / Parameters
|
|
3579
|
-
* @returns 完成结果 / Completion result
|
|
3580
|
-
*/
|
|
3581
|
-
completions: (params: {
|
|
3582
|
-
messages: any[];
|
|
3583
|
-
model?: string;
|
|
3584
|
-
stream?: boolean;
|
|
3585
|
-
config?: Config;
|
|
3586
|
-
[key: string]: any;
|
|
3587
|
-
}) => Promise<ai.StreamTextResult<ai.ToolSet, any> | ai.GenerateTextResult<ai.ToolSet, any>>;
|
|
3588
|
-
/**
|
|
3589
|
-
* 获取响应 / Get responses
|
|
3590
|
-
*
|
|
3591
|
-
* @param params - 参数 / Parameters
|
|
3592
|
-
* @returns 响应结果 / Response result
|
|
3593
|
-
*/
|
|
3594
|
-
responses: (params: {
|
|
3595
|
-
messages: any[];
|
|
3596
|
-
model?: string;
|
|
3597
|
-
stream?: boolean;
|
|
3598
|
-
config?: Config;
|
|
3599
|
-
[key: string]: any;
|
|
3600
|
-
}) => Promise<any>;
|
|
3601
|
-
/**
|
|
3602
|
-
* 等待模型代理就绪 / Wait until model proxy is ready
|
|
3603
|
-
*
|
|
3604
|
-
* @param options - 选项 / Options
|
|
3605
|
-
* @param config - 配置 / Configuration
|
|
3606
|
-
* @returns 模型代理对象 / Model proxy object
|
|
3607
|
-
*/
|
|
3608
|
-
waitUntilReady: (options?: {
|
|
3609
|
-
timeoutSeconds?: number;
|
|
3610
|
-
intervalSeconds?: number;
|
|
3611
|
-
beforeCheck?: (proxy: ModelProxy) => void;
|
|
3612
|
-
}, config?: Config) => Promise<ModelProxy>;
|
|
3886
|
+
}) => Promise<ModelInfo>;
|
|
3613
3887
|
}
|
|
3614
3888
|
|
|
3889
|
+
/**
|
|
3890
|
+
* Model Service 高层 API / Model Service High-Level API
|
|
3891
|
+
*
|
|
3892
|
+
* 此模块定义模型服务资源的高级API。
|
|
3893
|
+
* This module defines the high-level API for model service resources.
|
|
3894
|
+
*/
|
|
3895
|
+
|
|
3615
3896
|
/**
|
|
3616
3897
|
* 模型服务 / Model Service
|
|
3617
3898
|
*/
|
|
@@ -3629,12 +3910,17 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3629
3910
|
lastUpdatedAt?: string;
|
|
3630
3911
|
status?: ModelServiceSystemProps['status'];
|
|
3631
3912
|
modelType?: ModelServiceImmutableProps['modelType'];
|
|
3913
|
+
private modelApi;
|
|
3914
|
+
constructor();
|
|
3915
|
+
completion: (typeof ModelAPI)['prototype']['completion'];
|
|
3916
|
+
embedding: (typeof ModelAPI)['prototype']['embedding'];
|
|
3632
3917
|
/**
|
|
3633
3918
|
* 获取客户端 / Get client
|
|
3634
3919
|
*
|
|
3635
3920
|
* @returns ModelClient 实例
|
|
3636
3921
|
*/
|
|
3637
3922
|
private static getClient;
|
|
3923
|
+
uniqIdCallback: () => string | undefined;
|
|
3638
3924
|
/**
|
|
3639
3925
|
* 创建模型服务 / Create model service
|
|
3640
3926
|
*
|
|
@@ -3684,19 +3970,13 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3684
3970
|
* @param kwargs - 其他查询参数 / Other query parameters
|
|
3685
3971
|
* @returns 模型服务列表 / Model service list
|
|
3686
3972
|
*/
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3691
|
-
|
|
3692
|
-
* @param config - 配置 / Configuration
|
|
3693
|
-
* @returns 模型服务列表 / Model service list
|
|
3694
|
-
*/
|
|
3695
|
-
static listAll(options?: {
|
|
3696
|
-
modelType?: ModelType;
|
|
3697
|
-
provider?: string;
|
|
3973
|
+
static list: (params?: {
|
|
3974
|
+
input?: ModelServiceListInput;
|
|
3975
|
+
config?: Config;
|
|
3976
|
+
}) => Promise<ModelService[]>;
|
|
3977
|
+
static listAll: (params?: (Omit<ModelServiceListInput, "pageNumber" | "pageSize"> & {
|
|
3698
3978
|
config?: Config;
|
|
3699
|
-
})
|
|
3979
|
+
}) | undefined) => Promise<any[]>;
|
|
3700
3980
|
/**
|
|
3701
3981
|
* 更新模型服务 / Update model service
|
|
3702
3982
|
*
|
|
@@ -3741,50 +4021,6 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3741
4021
|
headers?: Record<string, string>;
|
|
3742
4022
|
provider?: string;
|
|
3743
4023
|
}>;
|
|
3744
|
-
/**
|
|
3745
|
-
* 调用模型完成 / Call model completion
|
|
3746
|
-
*
|
|
3747
|
-
* @param messages - 消息列表 / Message list
|
|
3748
|
-
* @param model - 模型名称(可选)/ Model name (optional)
|
|
3749
|
-
* @param stream - 是否流式输出 / Whether to stream output
|
|
3750
|
-
* @param kwargs - 其他参数 / Other parameters
|
|
3751
|
-
* @returns 完成结果 / Completion result
|
|
3752
|
-
*/
|
|
3753
|
-
completions: (params: {
|
|
3754
|
-
messages: any[];
|
|
3755
|
-
model?: string;
|
|
3756
|
-
stream?: boolean;
|
|
3757
|
-
config?: Config;
|
|
3758
|
-
[key: string]: any;
|
|
3759
|
-
}) => Promise<ai.StreamTextResult<ai.ToolSet, any> | ai.GenerateTextResult<ai.ToolSet, any>>;
|
|
3760
|
-
/**
|
|
3761
|
-
* 获取响应 / Get responses
|
|
3762
|
-
*
|
|
3763
|
-
* @param input - 输入 / Input
|
|
3764
|
-
* @param model - 模型名称(可选)/ Model name (optional)
|
|
3765
|
-
* @param stream - 是否流式输出 / Whether to stream output
|
|
3766
|
-
* @param kwargs - 其他参数 / Other parameters
|
|
3767
|
-
* @returns 响应结果 / Response result
|
|
3768
|
-
*/
|
|
3769
|
-
responses: (params: {
|
|
3770
|
-
input: string | any;
|
|
3771
|
-
model?: string;
|
|
3772
|
-
stream?: boolean;
|
|
3773
|
-
config?: Config;
|
|
3774
|
-
[key: string]: any;
|
|
3775
|
-
}) => Promise<any>;
|
|
3776
|
-
/**
|
|
3777
|
-
* 等待模型服务就绪 / Wait until model service is ready
|
|
3778
|
-
*
|
|
3779
|
-
* @param options - 选项 / Options
|
|
3780
|
-
* @param config - 配置 / Configuration
|
|
3781
|
-
* @returns 模型服务对象 / Model service object
|
|
3782
|
-
*/
|
|
3783
|
-
waitUntilReady: (options?: {
|
|
3784
|
-
timeoutSeconds?: number;
|
|
3785
|
-
intervalSeconds?: number;
|
|
3786
|
-
beforeCheck?: (service: ModelService) => void;
|
|
3787
|
-
}, config?: Config) => Promise<ModelService>;
|
|
3788
4024
|
}
|
|
3789
4025
|
|
|
3790
4026
|
/**
|
|
@@ -3801,8 +4037,8 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3801
4037
|
* Provides create, delete, update and query functions for model services and model proxies.
|
|
3802
4038
|
*/
|
|
3803
4039
|
declare class ModelClient {
|
|
3804
|
-
private controlApi;
|
|
3805
4040
|
private config?;
|
|
4041
|
+
private controlApi;
|
|
3806
4042
|
/**
|
|
3807
4043
|
* 初始化客户端 / Initialize client
|
|
3808
4044
|
*
|
|
@@ -3869,8 +4105,8 @@ declare class ModelClient {
|
|
|
3869
4105
|
* @param params - 参数 / Parameters
|
|
3870
4106
|
* @returns 模型服务列表 / Model service list
|
|
3871
4107
|
*/
|
|
3872
|
-
list: (params
|
|
3873
|
-
input
|
|
4108
|
+
list: (params?: {
|
|
4109
|
+
input?: ModelServiceListInput | ModelProxyListInput;
|
|
3874
4110
|
config?: Config;
|
|
3875
4111
|
}) => Promise<ModelService[] | ModelProxy[]>;
|
|
3876
4112
|
}
|
|
@@ -3944,6 +4180,7 @@ interface MCPToolMeta {
|
|
|
3944
4180
|
* Tool description
|
|
3945
4181
|
*/
|
|
3946
4182
|
description?: string;
|
|
4183
|
+
inputSchema?: Record<string, any>;
|
|
3947
4184
|
}
|
|
3948
4185
|
/**
|
|
3949
4186
|
* ToolSet status outputs
|
|
@@ -4081,23 +4318,7 @@ declare class ToolSet implements ToolSetData {
|
|
|
4081
4318
|
spec?: ToolSetSpec;
|
|
4082
4319
|
status?: ToolSetStatus;
|
|
4083
4320
|
private _config?;
|
|
4084
|
-
constructor(data?:
|
|
4085
|
-
/**
|
|
4086
|
-
* Get ToolSet name (alias for name)
|
|
4087
|
-
*/
|
|
4088
|
-
get toolSetName(): string | undefined;
|
|
4089
|
-
/**
|
|
4090
|
-
* Get ToolSet ID (alias for uid)
|
|
4091
|
-
*/
|
|
4092
|
-
get toolSetId(): string | undefined;
|
|
4093
|
-
/**
|
|
4094
|
-
* Check if the toolset is ready
|
|
4095
|
-
*/
|
|
4096
|
-
get isReady(): boolean;
|
|
4097
|
-
/**
|
|
4098
|
-
* Create toolset from SDK response object
|
|
4099
|
-
*/
|
|
4100
|
-
static fromInnerObject(obj: $Devs.Toolset, config?: Config): ToolSet;
|
|
4321
|
+
constructor(data?: any, config?: Config);
|
|
4101
4322
|
/**
|
|
4102
4323
|
* Get DevS client
|
|
4103
4324
|
*/
|
|
@@ -4142,10 +4363,6 @@ declare class ToolSet implements ToolSetData {
|
|
|
4142
4363
|
input: ToolSetUpdateInput;
|
|
4143
4364
|
config?: Config;
|
|
4144
4365
|
}): Promise<ToolSet>;
|
|
4145
|
-
/**
|
|
4146
|
-
* Handle API errors
|
|
4147
|
-
*/
|
|
4148
|
-
private static handleError;
|
|
4149
4366
|
/**
|
|
4150
4367
|
* Delete this toolset
|
|
4151
4368
|
*/
|
|
@@ -4165,14 +4382,6 @@ declare class ToolSet implements ToolSetData {
|
|
|
4165
4382
|
refresh: (params?: {
|
|
4166
4383
|
config?: Config;
|
|
4167
4384
|
}) => Promise<ToolSet>;
|
|
4168
|
-
/**
|
|
4169
|
-
* Wait until the toolset is ready
|
|
4170
|
-
*/
|
|
4171
|
-
waitUntilReady: (options?: {
|
|
4172
|
-
timeoutSeconds?: number;
|
|
4173
|
-
intervalSeconds?: number;
|
|
4174
|
-
beforeCheck?: (toolset: ToolSet) => void;
|
|
4175
|
-
}, config?: Config) => Promise<ToolSet>;
|
|
4176
4385
|
/**
|
|
4177
4386
|
* Get toolset type
|
|
4178
4387
|
* 获取工具集类型
|
|
@@ -4233,53 +4442,44 @@ declare class ToolSet implements ToolSetData {
|
|
|
4233
4442
|
*/
|
|
4234
4443
|
declare class ToolSetClient {
|
|
4235
4444
|
private config?;
|
|
4445
|
+
private controlApi;
|
|
4236
4446
|
constructor(config?: Config);
|
|
4237
4447
|
/**
|
|
4238
4448
|
* Create a ToolSet
|
|
4239
4449
|
*/
|
|
4240
|
-
|
|
4450
|
+
create: (params: {
|
|
4241
4451
|
input: ToolSetCreateInput;
|
|
4242
4452
|
config?: Config;
|
|
4243
4453
|
}) => Promise<ToolSet>;
|
|
4244
4454
|
/**
|
|
4245
4455
|
* Delete a ToolSet by name
|
|
4246
4456
|
*/
|
|
4247
|
-
|
|
4457
|
+
delete: (params: {
|
|
4248
4458
|
name: string;
|
|
4249
4459
|
config?: Config;
|
|
4250
4460
|
}) => Promise<ToolSet>;
|
|
4251
4461
|
/**
|
|
4252
|
-
*
|
|
4462
|
+
* Update a ToolSet by name
|
|
4253
4463
|
*/
|
|
4254
|
-
|
|
4464
|
+
update: (params: {
|
|
4255
4465
|
name: string;
|
|
4466
|
+
input: ToolSetUpdateInput;
|
|
4256
4467
|
config?: Config;
|
|
4257
4468
|
}) => Promise<ToolSet>;
|
|
4258
4469
|
/**
|
|
4259
|
-
*
|
|
4470
|
+
* Get a ToolSet by name
|
|
4260
4471
|
*/
|
|
4261
|
-
|
|
4472
|
+
get: (params: {
|
|
4262
4473
|
name: string;
|
|
4263
|
-
input: ToolSetUpdateInput;
|
|
4264
4474
|
config?: Config;
|
|
4265
4475
|
}) => Promise<ToolSet>;
|
|
4266
4476
|
/**
|
|
4267
4477
|
* List ToolSets
|
|
4268
4478
|
*/
|
|
4269
|
-
|
|
4479
|
+
list: (params?: {
|
|
4270
4480
|
input?: ToolSetListInput;
|
|
4271
4481
|
config?: Config;
|
|
4272
4482
|
}) => Promise<ToolSet[]>;
|
|
4273
|
-
/**
|
|
4274
|
-
* List all ToolSets with pagination
|
|
4275
|
-
*/
|
|
4276
|
-
listAllToolSets: (params?: {
|
|
4277
|
-
options?: {
|
|
4278
|
-
prefix?: string;
|
|
4279
|
-
labels?: Record<string, string>;
|
|
4280
|
-
};
|
|
4281
|
-
config?: Config;
|
|
4282
|
-
}) => Promise<ToolSet[]>;
|
|
4283
4483
|
}
|
|
4284
4484
|
|
|
4285
4485
|
/**
|