@agentrun/sdk 0.0.2 → 0.0.3-test.21197424453
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 +7073 -7071
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +580 -364
- package/dist/index.d.ts +580 -364
- package/dist/index.js +6551 -6537
- 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
|
/**
|
|
@@ -1866,7 +1804,11 @@ declare class BrowserDataAPI extends SandboxDataAPI {
|
|
|
1866
1804
|
declare enum TemplateType {
|
|
1867
1805
|
CODE_INTERPRETER = "CodeInterpreter",
|
|
1868
1806
|
BROWSER = "Browser",
|
|
1869
|
-
AIO = "AllInOne"
|
|
1807
|
+
AIO = "AllInOne",
|
|
1808
|
+
/**
|
|
1809
|
+
* 自定义镜像 / Custom Image
|
|
1810
|
+
*/
|
|
1811
|
+
CUSTOM = "CustomImage"
|
|
1870
1812
|
}
|
|
1871
1813
|
/**
|
|
1872
1814
|
* Sandbox state enum
|
|
@@ -1900,6 +1842,140 @@ declare enum TemplateOSSPermission {
|
|
|
1900
1842
|
declare enum CodeLanguage {
|
|
1901
1843
|
PYTHON = "python"
|
|
1902
1844
|
}
|
|
1845
|
+
/**
|
|
1846
|
+
* NAS mount configuration
|
|
1847
|
+
* NAS 挂载配置 / NAS Mount Configuration
|
|
1848
|
+
*
|
|
1849
|
+
* 定义 NAS 文件系统的挂载配置。
|
|
1850
|
+
* Defines the mount configuration for NAS file system.
|
|
1851
|
+
*/
|
|
1852
|
+
interface NASMountConfig {
|
|
1853
|
+
/**
|
|
1854
|
+
* 是否启用 TLS 加密 / Whether to enable TLS encryption
|
|
1855
|
+
*/
|
|
1856
|
+
enableTLS?: boolean;
|
|
1857
|
+
/**
|
|
1858
|
+
* 挂载目录 / Mount Directory
|
|
1859
|
+
* @example "/home/test"
|
|
1860
|
+
*/
|
|
1861
|
+
mountDir?: string;
|
|
1862
|
+
/**
|
|
1863
|
+
* NAS 服务器地址 / NAS Server Address
|
|
1864
|
+
* @example "***-uni85.cn-hangzhou.nas.com:/"
|
|
1865
|
+
*/
|
|
1866
|
+
serverAddr?: string;
|
|
1867
|
+
}
|
|
1868
|
+
/**
|
|
1869
|
+
* NAS configuration
|
|
1870
|
+
* NAS 配置 / NAS Configuration
|
|
1871
|
+
*
|
|
1872
|
+
* 定义 NAS 文件系统的配置。
|
|
1873
|
+
* Defines the configuration for NAS file system.
|
|
1874
|
+
*/
|
|
1875
|
+
interface NASConfig {
|
|
1876
|
+
/**
|
|
1877
|
+
* 组 ID / Group ID
|
|
1878
|
+
* @example 100
|
|
1879
|
+
*/
|
|
1880
|
+
groupId?: number;
|
|
1881
|
+
/**
|
|
1882
|
+
* 挂载点列表 / Mount Points List
|
|
1883
|
+
*/
|
|
1884
|
+
mountPoints?: NASMountConfig[];
|
|
1885
|
+
/**
|
|
1886
|
+
* 用户 ID / User ID
|
|
1887
|
+
* @example 100
|
|
1888
|
+
*/
|
|
1889
|
+
userId?: number;
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* OSS mount point
|
|
1893
|
+
* OSS 挂载点 / OSS Mount Point
|
|
1894
|
+
*
|
|
1895
|
+
* 定义 OSS 存储的挂载点配置。
|
|
1896
|
+
* Defines the mount point configuration for OSS storage.
|
|
1897
|
+
*/
|
|
1898
|
+
interface OSSMountPoint {
|
|
1899
|
+
/**
|
|
1900
|
+
* OSS 存储桶名称 / OSS Bucket Name
|
|
1901
|
+
* @example "my-bucket"
|
|
1902
|
+
*/
|
|
1903
|
+
bucketName?: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* OSS 存储桶路径 / OSS Bucket Path
|
|
1906
|
+
* @example "/my-dir"
|
|
1907
|
+
*/
|
|
1908
|
+
bucketPath?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* OSS 端点 / OSS Endpoint
|
|
1911
|
+
* @example "http://oss-cn-shanghai.aliyuncs.com"
|
|
1912
|
+
*/
|
|
1913
|
+
endpoint?: string;
|
|
1914
|
+
/**
|
|
1915
|
+
* 挂载目录 / Mount Directory
|
|
1916
|
+
* @example "/mnt/dir"
|
|
1917
|
+
*/
|
|
1918
|
+
mountDir?: string;
|
|
1919
|
+
/**
|
|
1920
|
+
* 是否只读 / Read Only
|
|
1921
|
+
*/
|
|
1922
|
+
readOnly?: boolean;
|
|
1923
|
+
}
|
|
1924
|
+
/**
|
|
1925
|
+
* OSS mount configuration
|
|
1926
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
1927
|
+
*
|
|
1928
|
+
* 定义 OSS 存储的挂载配置。
|
|
1929
|
+
* Defines the mount configuration for OSS storage.
|
|
1930
|
+
*/
|
|
1931
|
+
interface OSSMountConfig {
|
|
1932
|
+
/**
|
|
1933
|
+
* 挂载点列表 / Mount Points List
|
|
1934
|
+
*/
|
|
1935
|
+
mountPoints?: OSSMountPoint[];
|
|
1936
|
+
}
|
|
1937
|
+
/**
|
|
1938
|
+
* PolarFS mount configuration
|
|
1939
|
+
* PolarFS 挂载配置 / PolarFS Mount Configuration
|
|
1940
|
+
*
|
|
1941
|
+
* 定义 PolarFS 文件系统的挂载配置。
|
|
1942
|
+
* Defines the mount configuration for PolarFS file system.
|
|
1943
|
+
*/
|
|
1944
|
+
interface PolarFsMountConfig {
|
|
1945
|
+
/**
|
|
1946
|
+
* 实例 ID / Instance ID
|
|
1947
|
+
*/
|
|
1948
|
+
instanceId?: string;
|
|
1949
|
+
/**
|
|
1950
|
+
* 挂载目录 / Mount Directory
|
|
1951
|
+
*/
|
|
1952
|
+
mountDir?: string;
|
|
1953
|
+
/**
|
|
1954
|
+
* 远程目录 / Remote Directory
|
|
1955
|
+
*/
|
|
1956
|
+
remoteDir?: string;
|
|
1957
|
+
}
|
|
1958
|
+
/**
|
|
1959
|
+
* PolarFS configuration
|
|
1960
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
1961
|
+
*
|
|
1962
|
+
* 定义 PolarFS 文件系统的配置。
|
|
1963
|
+
* Defines the configuration for PolarFS file system.
|
|
1964
|
+
*/
|
|
1965
|
+
interface PolarFsConfig {
|
|
1966
|
+
/**
|
|
1967
|
+
* 组 ID / Group ID
|
|
1968
|
+
*/
|
|
1969
|
+
groupId?: number;
|
|
1970
|
+
/**
|
|
1971
|
+
* 挂载点列表 / Mount Points List
|
|
1972
|
+
*/
|
|
1973
|
+
mountPoints?: PolarFsMountConfig[];
|
|
1974
|
+
/**
|
|
1975
|
+
* 用户 ID / User ID
|
|
1976
|
+
*/
|
|
1977
|
+
userId?: number;
|
|
1978
|
+
}
|
|
1903
1979
|
/**
|
|
1904
1980
|
* Template network configuration
|
|
1905
1981
|
*/
|
|
@@ -1945,6 +2021,18 @@ interface TemplateArmsConfiguration {
|
|
|
1945
2021
|
interface TemplateContainerConfiguration {
|
|
1946
2022
|
image?: string;
|
|
1947
2023
|
command?: string[];
|
|
2024
|
+
/**
|
|
2025
|
+
* ACR 实例 ID / ACR Instance ID
|
|
2026
|
+
*/
|
|
2027
|
+
acrInstanceId?: string;
|
|
2028
|
+
/**
|
|
2029
|
+
* 镜像注册表类型 / Image Registry Type
|
|
2030
|
+
*/
|
|
2031
|
+
imageRegistryType?: string;
|
|
2032
|
+
/**
|
|
2033
|
+
* 端口 / Port
|
|
2034
|
+
*/
|
|
2035
|
+
port?: number;
|
|
1948
2036
|
}
|
|
1949
2037
|
/**
|
|
1950
2038
|
* Template MCP options
|
|
@@ -1963,6 +2051,7 @@ interface TemplateMcpState {
|
|
|
1963
2051
|
}
|
|
1964
2052
|
/**
|
|
1965
2053
|
* Template create input
|
|
2054
|
+
* 模板创建输入 / Template Create Input
|
|
1966
2055
|
*/
|
|
1967
2056
|
interface TemplateCreateInput {
|
|
1968
2057
|
templateName?: string;
|
|
@@ -1983,6 +2072,10 @@ interface TemplateCreateInput {
|
|
|
1983
2072
|
armsConfiguration?: TemplateArmsConfiguration;
|
|
1984
2073
|
containerConfiguration?: TemplateContainerConfiguration;
|
|
1985
2074
|
diskSize?: number;
|
|
2075
|
+
/**
|
|
2076
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2077
|
+
*/
|
|
2078
|
+
allowAnonymousManage?: boolean;
|
|
1986
2079
|
}
|
|
1987
2080
|
/**
|
|
1988
2081
|
* Template update input
|
|
@@ -2012,10 +2105,33 @@ interface TemplateListInput extends PageableInput {
|
|
|
2012
2105
|
}
|
|
2013
2106
|
/**
|
|
2014
2107
|
* Sandbox create input
|
|
2108
|
+
* 沙箱创建输入 / Sandbox Create Input
|
|
2015
2109
|
*/
|
|
2016
2110
|
interface SandboxCreateInput {
|
|
2111
|
+
/**
|
|
2112
|
+
* 模板名称 / Template Name
|
|
2113
|
+
*/
|
|
2017
2114
|
templateName: string;
|
|
2115
|
+
/**
|
|
2116
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2117
|
+
*/
|
|
2018
2118
|
sandboxIdleTimeoutSeconds?: number;
|
|
2119
|
+
/**
|
|
2120
|
+
* 沙箱 ID(可选,用户可指定) / Sandbox ID (optional, user can specify)
|
|
2121
|
+
*/
|
|
2122
|
+
sandboxId?: string;
|
|
2123
|
+
/**
|
|
2124
|
+
* NAS 配置 / NAS Configuration
|
|
2125
|
+
*/
|
|
2126
|
+
nasConfig?: NASConfig;
|
|
2127
|
+
/**
|
|
2128
|
+
* OSS 挂载配置 / OSS Mount Configuration
|
|
2129
|
+
*/
|
|
2130
|
+
ossMountConfig?: OSSMountConfig;
|
|
2131
|
+
/**
|
|
2132
|
+
* PolarFS 配置 / PolarFS Configuration
|
|
2133
|
+
*/
|
|
2134
|
+
polarFsConfig?: PolarFsConfig;
|
|
2019
2135
|
}
|
|
2020
2136
|
/**
|
|
2021
2137
|
* Sandbox list input
|
|
@@ -2029,39 +2145,139 @@ interface SandboxListInput {
|
|
|
2029
2145
|
}
|
|
2030
2146
|
/**
|
|
2031
2147
|
* Template data
|
|
2148
|
+
* 模板数据 / Template Data
|
|
2032
2149
|
*/
|
|
2033
2150
|
interface TemplateData {
|
|
2151
|
+
/**
|
|
2152
|
+
* 模板 ARN / Template ARN
|
|
2153
|
+
*/
|
|
2034
2154
|
templateArn?: string;
|
|
2155
|
+
/**
|
|
2156
|
+
* 模板 ID / Template ID
|
|
2157
|
+
*/
|
|
2035
2158
|
templateId?: string;
|
|
2159
|
+
/**
|
|
2160
|
+
* 模板名称 / Template Name
|
|
2161
|
+
*/
|
|
2036
2162
|
templateName?: string;
|
|
2163
|
+
/**
|
|
2164
|
+
* 模板类型 / Template Type
|
|
2165
|
+
*/
|
|
2037
2166
|
templateType?: TemplateType;
|
|
2167
|
+
/**
|
|
2168
|
+
* CPU 核数 / CPU Cores
|
|
2169
|
+
*/
|
|
2038
2170
|
cpu?: number;
|
|
2171
|
+
/**
|
|
2172
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
2173
|
+
*/
|
|
2039
2174
|
memory?: number;
|
|
2175
|
+
/**
|
|
2176
|
+
* 创建时间 / Creation Time
|
|
2177
|
+
*/
|
|
2040
2178
|
createdAt?: string;
|
|
2179
|
+
/**
|
|
2180
|
+
* 描述 / Description
|
|
2181
|
+
*/
|
|
2041
2182
|
description?: string;
|
|
2183
|
+
/**
|
|
2184
|
+
* 执行角色 ARN / Execution Role ARN
|
|
2185
|
+
*/
|
|
2042
2186
|
executionRoleArn?: string;
|
|
2187
|
+
/**
|
|
2188
|
+
* 最后更新时间 / Last Updated Time
|
|
2189
|
+
*/
|
|
2043
2190
|
lastUpdatedAt?: string;
|
|
2191
|
+
/**
|
|
2192
|
+
* 资源名称 / Resource Name
|
|
2193
|
+
*/
|
|
2044
2194
|
resourceName?: string;
|
|
2195
|
+
/**
|
|
2196
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2197
|
+
*/
|
|
2045
2198
|
sandboxIdleTimeoutInSeconds?: number;
|
|
2199
|
+
/**
|
|
2200
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
2201
|
+
*/
|
|
2046
2202
|
sandboxTtlInSeconds?: number;
|
|
2203
|
+
/**
|
|
2204
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
2205
|
+
*/
|
|
2047
2206
|
shareConcurrencyLimitPerSandbox?: number;
|
|
2207
|
+
/**
|
|
2208
|
+
* 状态 / Status
|
|
2209
|
+
*/
|
|
2048
2210
|
status?: Status;
|
|
2211
|
+
/**
|
|
2212
|
+
* 状态原因 / Status Reason
|
|
2213
|
+
*/
|
|
2049
2214
|
statusReason?: string;
|
|
2215
|
+
/**
|
|
2216
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
2217
|
+
*/
|
|
2050
2218
|
diskSize?: number;
|
|
2219
|
+
/**
|
|
2220
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2221
|
+
*/
|
|
2222
|
+
allowAnonymousManage?: boolean;
|
|
2051
2223
|
}
|
|
2052
2224
|
/**
|
|
2053
2225
|
* Sandbox data
|
|
2226
|
+
* 沙箱数据 / Sandbox Data
|
|
2054
2227
|
*/
|
|
2055
2228
|
interface SandboxData {
|
|
2229
|
+
/**
|
|
2230
|
+
* 沙箱 ID / Sandbox ID
|
|
2231
|
+
*/
|
|
2056
2232
|
sandboxId?: string;
|
|
2233
|
+
/**
|
|
2234
|
+
* 沙箱名称 / Sandbox Name
|
|
2235
|
+
*/
|
|
2057
2236
|
sandboxName?: string;
|
|
2237
|
+
/**
|
|
2238
|
+
* 模板 ID / Template ID
|
|
2239
|
+
*/
|
|
2058
2240
|
templateId?: string;
|
|
2241
|
+
/**
|
|
2242
|
+
* 模板名称 / Template Name
|
|
2243
|
+
*/
|
|
2059
2244
|
templateName?: string;
|
|
2245
|
+
/**
|
|
2246
|
+
* 沙箱状态 / Sandbox State
|
|
2247
|
+
*/
|
|
2060
2248
|
state?: SandboxState;
|
|
2249
|
+
/**
|
|
2250
|
+
* 状态原因 / State Reason
|
|
2251
|
+
*/
|
|
2061
2252
|
stateReason?: string;
|
|
2253
|
+
/**
|
|
2254
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2255
|
+
*/
|
|
2062
2256
|
createdAt?: string;
|
|
2257
|
+
/**
|
|
2258
|
+
* 最后更新时间 / Last Updated Time
|
|
2259
|
+
*/
|
|
2063
2260
|
lastUpdatedAt?: string;
|
|
2261
|
+
/**
|
|
2262
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2263
|
+
*/
|
|
2064
2264
|
sandboxIdleTimeoutSeconds?: number;
|
|
2265
|
+
/**
|
|
2266
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2267
|
+
*/
|
|
2268
|
+
endedAt?: string;
|
|
2269
|
+
/**
|
|
2270
|
+
* 元数据 / Metadata
|
|
2271
|
+
*/
|
|
2272
|
+
metadata?: Record<string, any>;
|
|
2273
|
+
/**
|
|
2274
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2275
|
+
*/
|
|
2276
|
+
sandboxArn?: string;
|
|
2277
|
+
/**
|
|
2278
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2279
|
+
*/
|
|
2280
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2065
2281
|
}
|
|
2066
2282
|
/**
|
|
2067
2283
|
* Code execution result
|
|
@@ -2092,26 +2308,73 @@ interface FileInfo {
|
|
|
2092
2308
|
|
|
2093
2309
|
/**
|
|
2094
2310
|
* Base Sandbox resource class
|
|
2311
|
+
* 基础沙箱资源类 / Base Sandbox Resource Class
|
|
2095
2312
|
*/
|
|
2096
|
-
declare class Sandbox implements SandboxData {
|
|
2313
|
+
declare class Sandbox extends ResourceBase implements SandboxData {
|
|
2314
|
+
templateType?: TemplateType;
|
|
2315
|
+
/**
|
|
2316
|
+
* 沙箱 ID / Sandbox ID
|
|
2317
|
+
*/
|
|
2097
2318
|
sandboxId?: string;
|
|
2319
|
+
/**
|
|
2320
|
+
* 沙箱名称 / Sandbox Name
|
|
2321
|
+
*/
|
|
2098
2322
|
sandboxName?: string;
|
|
2323
|
+
/**
|
|
2324
|
+
* 模板 ID / Template ID
|
|
2325
|
+
*/
|
|
2099
2326
|
templateId?: string;
|
|
2327
|
+
/**
|
|
2328
|
+
* 模板名称 / Template Name
|
|
2329
|
+
*/
|
|
2100
2330
|
templateName?: string;
|
|
2331
|
+
/**
|
|
2332
|
+
* 沙箱状态 / Sandbox State
|
|
2333
|
+
*/
|
|
2101
2334
|
state?: SandboxState;
|
|
2335
|
+
/**
|
|
2336
|
+
* 状态原因 / State Reason
|
|
2337
|
+
*/
|
|
2102
2338
|
stateReason?: string;
|
|
2339
|
+
/**
|
|
2340
|
+
* 沙箱创建时间 / Sandbox Creation Time
|
|
2341
|
+
*/
|
|
2103
2342
|
createdAt?: string;
|
|
2343
|
+
/**
|
|
2344
|
+
* 最后更新时间 / Last Updated Time
|
|
2345
|
+
*/
|
|
2104
2346
|
lastUpdatedAt?: string;
|
|
2347
|
+
/**
|
|
2348
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2349
|
+
*/
|
|
2105
2350
|
sandboxIdleTimeoutSeconds?: number;
|
|
2351
|
+
/**
|
|
2352
|
+
* 沙箱结束时间 / Sandbox End Time
|
|
2353
|
+
*/
|
|
2354
|
+
endedAt?: string;
|
|
2355
|
+
/**
|
|
2356
|
+
* 元数据 / Metadata
|
|
2357
|
+
*/
|
|
2358
|
+
metadata?: Record<string, any>;
|
|
2359
|
+
/**
|
|
2360
|
+
* 沙箱全局唯一资源名称 / Sandbox ARN
|
|
2361
|
+
*/
|
|
2362
|
+
sandboxArn?: string;
|
|
2363
|
+
/**
|
|
2364
|
+
* 沙箱空闲 TTL(秒) / Sandbox Idle TTL (seconds)
|
|
2365
|
+
*/
|
|
2366
|
+
sandboxIdleTTLInSeconds?: number;
|
|
2106
2367
|
protected _config?: Config;
|
|
2107
2368
|
constructor(data?: Partial<SandboxData>, config?: Config);
|
|
2108
2369
|
/**
|
|
2109
2370
|
* Create sandbox from SDK response object
|
|
2371
|
+
* 从 SDK 响应对象创建沙箱 / Create Sandbox from SDK Response Object
|
|
2110
2372
|
*/
|
|
2111
2373
|
static fromInnerObject(obj: any, config?: Config): Sandbox;
|
|
2112
|
-
|
|
2374
|
+
private static getClient;
|
|
2113
2375
|
/**
|
|
2114
2376
|
* Create a new Sandbox
|
|
2377
|
+
* 创建新沙箱 / Create a New Sandbox
|
|
2115
2378
|
*/
|
|
2116
2379
|
static create(input: SandboxCreateInput, config?: Config): Promise<Sandbox>;
|
|
2117
2380
|
/**
|
|
@@ -2140,10 +2403,9 @@ declare class Sandbox implements SandboxData {
|
|
|
2140
2403
|
* List Sandboxes
|
|
2141
2404
|
*/
|
|
2142
2405
|
static list(input?: SandboxListInput, config?: Config): Promise<Sandbox[]>;
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
protected static handleError(error: unknown): never;
|
|
2406
|
+
get: (params?: {
|
|
2407
|
+
config?: Config;
|
|
2408
|
+
}) => Promise<Sandbox>;
|
|
2147
2409
|
/**
|
|
2148
2410
|
* Delete this sandbox
|
|
2149
2411
|
*/
|
|
@@ -2188,9 +2450,13 @@ declare class BrowserSandbox extends Sandbox {
|
|
|
2188
2450
|
static templateType: TemplateType;
|
|
2189
2451
|
/**
|
|
2190
2452
|
* Create a Browser Sandbox from template
|
|
2453
|
+
* 从模板创建浏览器沙箱 / Create Browser Sandbox from Template
|
|
2191
2454
|
*/
|
|
2192
2455
|
static createFromTemplate(templateName: string, options?: {
|
|
2193
2456
|
sandboxIdleTimeoutSeconds?: number;
|
|
2457
|
+
nasConfig?: NASConfig;
|
|
2458
|
+
ossMountConfig?: OSSMountConfig;
|
|
2459
|
+
polarFsConfig?: PolarFsConfig;
|
|
2194
2460
|
}, config?: Config): Promise<BrowserSandbox>;
|
|
2195
2461
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2196
2462
|
private _dataApi?;
|
|
@@ -2207,13 +2473,6 @@ declare class BrowserSandbox extends Sandbox {
|
|
|
2207
2473
|
status: string;
|
|
2208
2474
|
[key: string]: any;
|
|
2209
2475
|
}>;
|
|
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
2476
|
/**
|
|
2218
2477
|
* Get CDP WebSocket URL for browser automation
|
|
2219
2478
|
*/
|
|
@@ -2612,9 +2871,13 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2612
2871
|
static templateType: TemplateType;
|
|
2613
2872
|
/**
|
|
2614
2873
|
* Create a Code Interpreter Sandbox from template
|
|
2874
|
+
* 从模板创建代码解释器沙箱 / Create Code Interpreter Sandbox from Template
|
|
2615
2875
|
*/
|
|
2616
2876
|
static createFromTemplate(templateName: string, options?: {
|
|
2617
2877
|
sandboxIdleTimeoutSeconds?: number;
|
|
2878
|
+
nasConfig?: NASConfig;
|
|
2879
|
+
ossMountConfig?: OSSMountConfig;
|
|
2880
|
+
polarFsConfig?: PolarFsConfig;
|
|
2618
2881
|
}, config?: Config): Promise<CodeInterpreterSandbox>;
|
|
2619
2882
|
constructor(sandbox: Sandbox, config?: Config);
|
|
2620
2883
|
private _dataApi?;
|
|
@@ -2651,13 +2914,6 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2651
2914
|
status: string;
|
|
2652
2915
|
[key: string]: any;
|
|
2653
2916
|
}>;
|
|
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
2917
|
/**
|
|
2662
2918
|
* Execute code (convenience method delegating to context.execute)
|
|
2663
2919
|
*/
|
|
@@ -2678,31 +2934,84 @@ declare class CodeInterpreterSandbox extends Sandbox {
|
|
|
2678
2934
|
|
|
2679
2935
|
/**
|
|
2680
2936
|
* Template resource class
|
|
2937
|
+
* 模板资源类 / Template Resource Class
|
|
2681
2938
|
*/
|
|
2682
|
-
declare class Template implements TemplateData {
|
|
2939
|
+
declare class Template extends ResourceBase implements TemplateData {
|
|
2940
|
+
/**
|
|
2941
|
+
* 模板 ARN / Template ARN
|
|
2942
|
+
*/
|
|
2683
2943
|
templateArn?: string;
|
|
2944
|
+
/**
|
|
2945
|
+
* 模板 ID / Template ID
|
|
2946
|
+
*/
|
|
2684
2947
|
templateId?: string;
|
|
2948
|
+
/**
|
|
2949
|
+
* 模板名称 / Template Name
|
|
2950
|
+
*/
|
|
2685
2951
|
templateName?: string;
|
|
2952
|
+
/**
|
|
2953
|
+
* 模板类型 / Template Type
|
|
2954
|
+
*/
|
|
2686
2955
|
templateType?: TemplateType;
|
|
2956
|
+
/**
|
|
2957
|
+
* CPU 核数 / CPU Cores
|
|
2958
|
+
*/
|
|
2687
2959
|
cpu?: number;
|
|
2960
|
+
/**
|
|
2961
|
+
* 内存大小(MB) / Memory Size (MB)
|
|
2962
|
+
*/
|
|
2688
2963
|
memory?: number;
|
|
2964
|
+
/**
|
|
2965
|
+
* 创建时间 / Creation Time
|
|
2966
|
+
*/
|
|
2689
2967
|
createdAt?: string;
|
|
2968
|
+
/**
|
|
2969
|
+
* 描述 / Description
|
|
2970
|
+
*/
|
|
2690
2971
|
description?: string;
|
|
2972
|
+
/**
|
|
2973
|
+
* 执行角色 ARN / Execution Role ARN
|
|
2974
|
+
*/
|
|
2691
2975
|
executionRoleArn?: string;
|
|
2976
|
+
/**
|
|
2977
|
+
* 最后更新时间 / Last Updated Time
|
|
2978
|
+
*/
|
|
2692
2979
|
lastUpdatedAt?: string;
|
|
2980
|
+
/**
|
|
2981
|
+
* 资源名称 / Resource Name
|
|
2982
|
+
*/
|
|
2693
2983
|
resourceName?: string;
|
|
2984
|
+
/**
|
|
2985
|
+
* 沙箱空闲超时时间(秒) / Sandbox Idle Timeout (seconds)
|
|
2986
|
+
*/
|
|
2694
2987
|
sandboxIdleTimeoutInSeconds?: number;
|
|
2988
|
+
/**
|
|
2989
|
+
* 沙箱存活时间(秒) / Sandbox TTL (seconds)
|
|
2990
|
+
*/
|
|
2695
2991
|
sandboxTtlInSeconds?: number;
|
|
2992
|
+
/**
|
|
2993
|
+
* 每个沙箱的最大并发会话数 / Max Concurrency Limit Per Sandbox
|
|
2994
|
+
*/
|
|
2696
2995
|
shareConcurrencyLimitPerSandbox?: number;
|
|
2996
|
+
/**
|
|
2997
|
+
* 状态 / Status
|
|
2998
|
+
*/
|
|
2697
2999
|
status?: Status;
|
|
3000
|
+
/**
|
|
3001
|
+
* 状态原因 / Status Reason
|
|
3002
|
+
*/
|
|
2698
3003
|
statusReason?: string;
|
|
3004
|
+
/**
|
|
3005
|
+
* 磁盘大小(GB) / Disk Size (GB)
|
|
3006
|
+
*/
|
|
2699
3007
|
diskSize?: number;
|
|
2700
|
-
private _config?;
|
|
2701
|
-
constructor(data?: Partial<TemplateData>, config?: Config);
|
|
2702
3008
|
/**
|
|
2703
|
-
*
|
|
3009
|
+
* 是否允许匿名管理 / Whether to allow anonymous management
|
|
2704
3010
|
*/
|
|
2705
|
-
|
|
3011
|
+
allowAnonymousManage?: boolean;
|
|
3012
|
+
protected _config?: Config;
|
|
3013
|
+
constructor(data?: any, config?: Config);
|
|
3014
|
+
uniqIdCallback: () => string | undefined;
|
|
2706
3015
|
private static getClient;
|
|
2707
3016
|
/**
|
|
2708
3017
|
* Create a new Template
|
|
@@ -2711,14 +3020,6 @@ declare class Template implements TemplateData {
|
|
|
2711
3020
|
input: TemplateCreateInput;
|
|
2712
3021
|
config?: Config;
|
|
2713
3022
|
}): 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
3023
|
/**
|
|
2723
3024
|
* Delete a Template by name
|
|
2724
3025
|
*/
|
|
@@ -2744,17 +3045,19 @@ declare class Template implements TemplateData {
|
|
|
2744
3045
|
/**
|
|
2745
3046
|
* List Templates
|
|
2746
3047
|
*/
|
|
2747
|
-
static list(
|
|
3048
|
+
static list(params?: {
|
|
3049
|
+
input?: TemplateListInput;
|
|
3050
|
+
config?: Config;
|
|
3051
|
+
}): Promise<Template[]>;
|
|
2748
3052
|
/**
|
|
2749
3053
|
* List all Templates (with pagination)
|
|
2750
3054
|
*/
|
|
2751
|
-
static listAll(
|
|
2752
|
-
|
|
2753
|
-
}
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2757
|
-
private static handleError;
|
|
3055
|
+
static listAll: (params?: (Omit<TemplateListInput, "pageNumber" | "pageSize"> & {
|
|
3056
|
+
config?: Config;
|
|
3057
|
+
}) | undefined) => Promise<any[]>;
|
|
3058
|
+
get: (params?: {
|
|
3059
|
+
config?: Config;
|
|
3060
|
+
}) => Promise<Template>;
|
|
2758
3061
|
/**
|
|
2759
3062
|
* Delete this template
|
|
2760
3063
|
*/
|
|
@@ -2774,14 +3077,6 @@ declare class Template implements TemplateData {
|
|
|
2774
3077
|
refresh: (params?: {
|
|
2775
3078
|
config?: Config;
|
|
2776
3079
|
}) => 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
3080
|
}
|
|
2786
3081
|
|
|
2787
3082
|
/**
|
|
@@ -2798,6 +3093,7 @@ declare class Template implements TemplateData {
|
|
|
2798
3093
|
*/
|
|
2799
3094
|
declare class SandboxClient {
|
|
2800
3095
|
private config?;
|
|
3096
|
+
private controlApi;
|
|
2801
3097
|
constructor(config?: Config);
|
|
2802
3098
|
/**
|
|
2803
3099
|
* Create a Template
|
|
@@ -2835,15 +3131,6 @@ declare class SandboxClient {
|
|
|
2835
3131
|
input?: TemplateListInput;
|
|
2836
3132
|
config?: Config;
|
|
2837
3133
|
}) => Promise<Template[]>;
|
|
2838
|
-
/**
|
|
2839
|
-
* List all Templates
|
|
2840
|
-
*/
|
|
2841
|
-
listAllTemplates: (params?: {
|
|
2842
|
-
options?: {
|
|
2843
|
-
templateType?: TemplateType;
|
|
2844
|
-
};
|
|
2845
|
-
config?: Config;
|
|
2846
|
-
}) => Promise<Template[]>;
|
|
2847
3134
|
/**
|
|
2848
3135
|
* Create a Sandbox
|
|
2849
3136
|
*/
|
|
@@ -2853,21 +3140,29 @@ declare class SandboxClient {
|
|
|
2853
3140
|
}) => Promise<Sandbox>;
|
|
2854
3141
|
/**
|
|
2855
3142
|
* Create a Code Interpreter Sandbox
|
|
3143
|
+
* 创建代码解释器沙箱 / Create Code Interpreter Sandbox
|
|
2856
3144
|
*/
|
|
2857
3145
|
createCodeInterpreterSandbox: (params: {
|
|
2858
3146
|
templateName: string;
|
|
2859
3147
|
options?: {
|
|
2860
3148
|
sandboxIdleTimeoutSeconds?: number;
|
|
3149
|
+
nasConfig?: NASConfig;
|
|
3150
|
+
ossMountConfig?: OSSMountConfig;
|
|
3151
|
+
polarFsConfig?: PolarFsConfig;
|
|
2861
3152
|
};
|
|
2862
3153
|
config?: Config;
|
|
2863
3154
|
}) => Promise<CodeInterpreterSandbox>;
|
|
2864
3155
|
/**
|
|
2865
3156
|
* Create a Browser Sandbox
|
|
3157
|
+
* 创建浏览器沙箱 / Create Browser Sandbox
|
|
2866
3158
|
*/
|
|
2867
3159
|
createBrowserSandbox: (params: {
|
|
2868
3160
|
templateName: string;
|
|
2869
3161
|
options?: {
|
|
2870
3162
|
sandboxIdleTimeoutSeconds?: number;
|
|
3163
|
+
nasConfig?: NASConfig;
|
|
3164
|
+
ossMountConfig?: OSSMountConfig;
|
|
3165
|
+
polarFsConfig?: PolarFsConfig;
|
|
2871
3166
|
};
|
|
2872
3167
|
config?: Config;
|
|
2873
3168
|
}) => Promise<BrowserSandbox>;
|
|
@@ -2904,6 +3199,9 @@ declare class SandboxClient {
|
|
|
2904
3199
|
input?: SandboxListInput;
|
|
2905
3200
|
config?: Config;
|
|
2906
3201
|
}) => Promise<Sandbox[]>;
|
|
3202
|
+
private prepareTemplateCreateInput;
|
|
3203
|
+
private getTemplateDefaults;
|
|
3204
|
+
private validateTemplateCreateInput;
|
|
2907
3205
|
}
|
|
2908
3206
|
|
|
2909
3207
|
/**
|
|
@@ -3134,9 +3432,13 @@ declare class AioSandbox extends Sandbox {
|
|
|
3134
3432
|
static templateType: TemplateType;
|
|
3135
3433
|
/**
|
|
3136
3434
|
* Create an AIO Sandbox from template
|
|
3435
|
+
* 从模板创建 AIO 沙箱 / Create AIO Sandbox from Template
|
|
3137
3436
|
*/
|
|
3138
3437
|
static createFromTemplate(templateName: string, options?: {
|
|
3139
3438
|
sandboxIdleTimeoutSeconds?: number;
|
|
3439
|
+
nasConfig?: NASConfig;
|
|
3440
|
+
ossMountConfig?: OSSMountConfig;
|
|
3441
|
+
polarFsConfig?: PolarFsConfig;
|
|
3140
3442
|
}, config?: Config): Promise<AioSandbox>;
|
|
3141
3443
|
constructor(sandbox: Sandbox, config?: Config);
|
|
3142
3444
|
private _dataApi?;
|
|
@@ -3173,13 +3475,6 @@ declare class AioSandbox extends Sandbox {
|
|
|
3173
3475
|
status: string;
|
|
3174
3476
|
[key: string]: any;
|
|
3175
3477
|
}>;
|
|
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
3478
|
/**
|
|
3184
3479
|
* Get CDP WebSocket URL for browser automation
|
|
3185
3480
|
*/
|
|
@@ -3437,6 +3732,45 @@ interface ModelProxyListInput extends PageableInput {
|
|
|
3437
3732
|
status?: Status;
|
|
3438
3733
|
}
|
|
3439
3734
|
|
|
3735
|
+
interface ModelInfo {
|
|
3736
|
+
model?: string;
|
|
3737
|
+
apiKey?: string;
|
|
3738
|
+
baseUrl?: string;
|
|
3739
|
+
headers?: Record<string, string>;
|
|
3740
|
+
provider?: string;
|
|
3741
|
+
}
|
|
3742
|
+
type GetModelInfo = (params?: {
|
|
3743
|
+
config?: Config;
|
|
3744
|
+
}) => Promise<ModelInfo>;
|
|
3745
|
+
declare class ModelAPI {
|
|
3746
|
+
getModelInfo: GetModelInfo;
|
|
3747
|
+
constructor(getModelInfo: GetModelInfo);
|
|
3748
|
+
private getProvider;
|
|
3749
|
+
private getModel;
|
|
3750
|
+
private getEmbeddingModel;
|
|
3751
|
+
completion: (params: {
|
|
3752
|
+
messages: any[];
|
|
3753
|
+
model?: string;
|
|
3754
|
+
stream?: boolean;
|
|
3755
|
+
config?: Config;
|
|
3756
|
+
[key: string]: any;
|
|
3757
|
+
}) => Promise<ai.StreamTextResult<ai.ToolSet, any> | ai.GenerateTextResult<ai.ToolSet, any>>;
|
|
3758
|
+
embedding: (params: {
|
|
3759
|
+
values: string[];
|
|
3760
|
+
model?: string;
|
|
3761
|
+
stream?: boolean;
|
|
3762
|
+
config?: Config;
|
|
3763
|
+
[key: string]: any;
|
|
3764
|
+
}) => Promise<ai.EmbedManyResult>;
|
|
3765
|
+
}
|
|
3766
|
+
|
|
3767
|
+
/**
|
|
3768
|
+
* Model Proxy 高层 API / Model Proxy High-Level API
|
|
3769
|
+
*
|
|
3770
|
+
* 此模块定义模型代理资源的高级API。
|
|
3771
|
+
* This module defines the high-level API for model proxy resources.
|
|
3772
|
+
*/
|
|
3773
|
+
|
|
3440
3774
|
/**
|
|
3441
3775
|
* 模型代理 / Model Proxy
|
|
3442
3776
|
*/
|
|
@@ -3460,12 +3794,17 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3460
3794
|
createdAt?: string;
|
|
3461
3795
|
lastUpdatedAt?: string;
|
|
3462
3796
|
status?: ModelProxySystemProps['status'];
|
|
3797
|
+
private modelApi;
|
|
3798
|
+
constructor();
|
|
3799
|
+
completion: (typeof ModelAPI)['prototype']['completion'];
|
|
3800
|
+
embedding: (typeof ModelAPI)['prototype']['embedding'];
|
|
3463
3801
|
/**
|
|
3464
3802
|
* 获取客户端 / Get client
|
|
3465
3803
|
*
|
|
3466
3804
|
* @returns ModelClient 实例
|
|
3467
3805
|
*/
|
|
3468
3806
|
private static getClient;
|
|
3807
|
+
uniqIdCallback: () => string | undefined;
|
|
3469
3808
|
/**
|
|
3470
3809
|
* 创建模型代理 / Create model proxy
|
|
3471
3810
|
*
|
|
@@ -3515,19 +3854,13 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3515
3854
|
* @param kwargs - 其他查询参数 / Other query parameters
|
|
3516
3855
|
* @returns 模型代理列表 / Model proxy list
|
|
3517
3856
|
*/
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
* 列出所有模型代理 / List all model proxies
|
|
3521
|
-
*
|
|
3522
|
-
* @param options - 查询选项 / Query options
|
|
3523
|
-
* @param config - 配置 / Configuration
|
|
3524
|
-
* @returns 模型代理列表 / Model proxy list
|
|
3525
|
-
*/
|
|
3526
|
-
static listAll(options?: {
|
|
3527
|
-
proxyMode?: string;
|
|
3528
|
-
status?: Status;
|
|
3857
|
+
static list: (params?: {
|
|
3858
|
+
input?: ModelProxyListInput;
|
|
3529
3859
|
config?: Config;
|
|
3530
|
-
})
|
|
3860
|
+
}) => Promise<ModelProxy[]>;
|
|
3861
|
+
static listAll: (params?: (Omit<ModelProxyListInput, "pageNumber" | "pageSize"> & {
|
|
3862
|
+
config?: Config;
|
|
3863
|
+
}) | undefined) => Promise<any[]>;
|
|
3531
3864
|
/**
|
|
3532
3865
|
* 更新模型代理 / Update model proxy
|
|
3533
3866
|
*
|
|
@@ -3566,52 +3899,16 @@ declare class ModelProxy extends ResourceBase implements ModelProxyImmutableProp
|
|
|
3566
3899
|
*/
|
|
3567
3900
|
modelInfo: (params?: {
|
|
3568
3901
|
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>;
|
|
3902
|
+
}) => Promise<ModelInfo>;
|
|
3613
3903
|
}
|
|
3614
3904
|
|
|
3905
|
+
/**
|
|
3906
|
+
* Model Service 高层 API / Model Service High-Level API
|
|
3907
|
+
*
|
|
3908
|
+
* 此模块定义模型服务资源的高级API。
|
|
3909
|
+
* This module defines the high-level API for model service resources.
|
|
3910
|
+
*/
|
|
3911
|
+
|
|
3615
3912
|
/**
|
|
3616
3913
|
* 模型服务 / Model Service
|
|
3617
3914
|
*/
|
|
@@ -3629,12 +3926,17 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3629
3926
|
lastUpdatedAt?: string;
|
|
3630
3927
|
status?: ModelServiceSystemProps['status'];
|
|
3631
3928
|
modelType?: ModelServiceImmutableProps['modelType'];
|
|
3929
|
+
private modelApi;
|
|
3930
|
+
constructor();
|
|
3931
|
+
completion: (typeof ModelAPI)['prototype']['completion'];
|
|
3932
|
+
embedding: (typeof ModelAPI)['prototype']['embedding'];
|
|
3632
3933
|
/**
|
|
3633
3934
|
* 获取客户端 / Get client
|
|
3634
3935
|
*
|
|
3635
3936
|
* @returns ModelClient 实例
|
|
3636
3937
|
*/
|
|
3637
3938
|
private static getClient;
|
|
3939
|
+
uniqIdCallback: () => string | undefined;
|
|
3638
3940
|
/**
|
|
3639
3941
|
* 创建模型服务 / Create model service
|
|
3640
3942
|
*
|
|
@@ -3684,19 +3986,13 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3684
3986
|
* @param kwargs - 其他查询参数 / Other query parameters
|
|
3685
3987
|
* @returns 模型服务列表 / Model service list
|
|
3686
3988
|
*/
|
|
3687
|
-
|
|
3688
|
-
|
|
3689
|
-
* 列出所有模型服务 / List all model services
|
|
3690
|
-
*
|
|
3691
|
-
* @param options - 查询选项 / Query options
|
|
3692
|
-
* @param config - 配置 / Configuration
|
|
3693
|
-
* @returns 模型服务列表 / Model service list
|
|
3694
|
-
*/
|
|
3695
|
-
static listAll(options?: {
|
|
3696
|
-
modelType?: ModelType;
|
|
3697
|
-
provider?: string;
|
|
3989
|
+
static list: (params?: {
|
|
3990
|
+
input?: ModelServiceListInput;
|
|
3698
3991
|
config?: Config;
|
|
3699
|
-
})
|
|
3992
|
+
}) => Promise<ModelService[]>;
|
|
3993
|
+
static listAll: (params?: (Omit<ModelServiceListInput, "pageNumber" | "pageSize"> & {
|
|
3994
|
+
config?: Config;
|
|
3995
|
+
}) | undefined) => Promise<any[]>;
|
|
3700
3996
|
/**
|
|
3701
3997
|
* 更新模型服务 / Update model service
|
|
3702
3998
|
*
|
|
@@ -3741,50 +4037,6 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3741
4037
|
headers?: Record<string, string>;
|
|
3742
4038
|
provider?: string;
|
|
3743
4039
|
}>;
|
|
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
4040
|
}
|
|
3789
4041
|
|
|
3790
4042
|
/**
|
|
@@ -3801,8 +4053,8 @@ declare class ModelService extends ResourceBase implements ModelServiceImmutable
|
|
|
3801
4053
|
* Provides create, delete, update and query functions for model services and model proxies.
|
|
3802
4054
|
*/
|
|
3803
4055
|
declare class ModelClient {
|
|
3804
|
-
private controlApi;
|
|
3805
4056
|
private config?;
|
|
4057
|
+
private controlApi;
|
|
3806
4058
|
/**
|
|
3807
4059
|
* 初始化客户端 / Initialize client
|
|
3808
4060
|
*
|
|
@@ -3869,8 +4121,8 @@ declare class ModelClient {
|
|
|
3869
4121
|
* @param params - 参数 / Parameters
|
|
3870
4122
|
* @returns 模型服务列表 / Model service list
|
|
3871
4123
|
*/
|
|
3872
|
-
list: (params
|
|
3873
|
-
input
|
|
4124
|
+
list: (params?: {
|
|
4125
|
+
input?: ModelServiceListInput | ModelProxyListInput;
|
|
3874
4126
|
config?: Config;
|
|
3875
4127
|
}) => Promise<ModelService[] | ModelProxy[]>;
|
|
3876
4128
|
}
|
|
@@ -3944,6 +4196,7 @@ interface MCPToolMeta {
|
|
|
3944
4196
|
* Tool description
|
|
3945
4197
|
*/
|
|
3946
4198
|
description?: string;
|
|
4199
|
+
inputSchema?: Record<string, any>;
|
|
3947
4200
|
}
|
|
3948
4201
|
/**
|
|
3949
4202
|
* ToolSet status outputs
|
|
@@ -4081,23 +4334,7 @@ declare class ToolSet implements ToolSetData {
|
|
|
4081
4334
|
spec?: ToolSetSpec;
|
|
4082
4335
|
status?: ToolSetStatus;
|
|
4083
4336
|
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;
|
|
4337
|
+
constructor(data?: any, config?: Config);
|
|
4101
4338
|
/**
|
|
4102
4339
|
* Get DevS client
|
|
4103
4340
|
*/
|
|
@@ -4142,10 +4379,6 @@ declare class ToolSet implements ToolSetData {
|
|
|
4142
4379
|
input: ToolSetUpdateInput;
|
|
4143
4380
|
config?: Config;
|
|
4144
4381
|
}): Promise<ToolSet>;
|
|
4145
|
-
/**
|
|
4146
|
-
* Handle API errors
|
|
4147
|
-
*/
|
|
4148
|
-
private static handleError;
|
|
4149
4382
|
/**
|
|
4150
4383
|
* Delete this toolset
|
|
4151
4384
|
*/
|
|
@@ -4165,14 +4398,6 @@ declare class ToolSet implements ToolSetData {
|
|
|
4165
4398
|
refresh: (params?: {
|
|
4166
4399
|
config?: Config;
|
|
4167
4400
|
}) => 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
4401
|
/**
|
|
4177
4402
|
* Get toolset type
|
|
4178
4403
|
* 获取工具集类型
|
|
@@ -4233,53 +4458,44 @@ declare class ToolSet implements ToolSetData {
|
|
|
4233
4458
|
*/
|
|
4234
4459
|
declare class ToolSetClient {
|
|
4235
4460
|
private config?;
|
|
4461
|
+
private controlApi;
|
|
4236
4462
|
constructor(config?: Config);
|
|
4237
4463
|
/**
|
|
4238
4464
|
* Create a ToolSet
|
|
4239
4465
|
*/
|
|
4240
|
-
|
|
4466
|
+
create: (params: {
|
|
4241
4467
|
input: ToolSetCreateInput;
|
|
4242
4468
|
config?: Config;
|
|
4243
4469
|
}) => Promise<ToolSet>;
|
|
4244
4470
|
/**
|
|
4245
4471
|
* Delete a ToolSet by name
|
|
4246
4472
|
*/
|
|
4247
|
-
|
|
4473
|
+
delete: (params: {
|
|
4248
4474
|
name: string;
|
|
4249
4475
|
config?: Config;
|
|
4250
4476
|
}) => Promise<ToolSet>;
|
|
4251
4477
|
/**
|
|
4252
|
-
*
|
|
4478
|
+
* Update a ToolSet by name
|
|
4253
4479
|
*/
|
|
4254
|
-
|
|
4480
|
+
update: (params: {
|
|
4255
4481
|
name: string;
|
|
4482
|
+
input: ToolSetUpdateInput;
|
|
4256
4483
|
config?: Config;
|
|
4257
4484
|
}) => Promise<ToolSet>;
|
|
4258
4485
|
/**
|
|
4259
|
-
*
|
|
4486
|
+
* Get a ToolSet by name
|
|
4260
4487
|
*/
|
|
4261
|
-
|
|
4488
|
+
get: (params: {
|
|
4262
4489
|
name: string;
|
|
4263
|
-
input: ToolSetUpdateInput;
|
|
4264
4490
|
config?: Config;
|
|
4265
4491
|
}) => Promise<ToolSet>;
|
|
4266
4492
|
/**
|
|
4267
4493
|
* List ToolSets
|
|
4268
4494
|
*/
|
|
4269
|
-
|
|
4495
|
+
list: (params?: {
|
|
4270
4496
|
input?: ToolSetListInput;
|
|
4271
4497
|
config?: Config;
|
|
4272
4498
|
}) => 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
4499
|
}
|
|
4284
4500
|
|
|
4285
4501
|
/**
|