@phala/cloud 0.3.0 → 0.4.0
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/actions/apps/get_app_attestation.d.ts +17 -7
- package/dist/actions/cvms/commit_cvm_provision.d.ts +6 -0
- package/dist/actions/cvms/get_cvm_compose_file.d.ts +156 -12
- package/dist/actions/cvms/get_cvm_list.d.ts +8 -10
- package/dist/actions/cvms/get_cvm_status_batch.d.ts +247 -24
- package/dist/actions/cvms/patch_cvm.d.ts +16 -0
- package/dist/actions/cvms/provision_cvm.d.ts +900 -51
- package/dist/actions/cvms/provision_cvm_compose_file_update.d.ts +215 -5
- package/dist/actions/cvms/update_cvm_envs.d.ts +16 -0
- package/dist/actions/cvms/update_cvm_resources.d.ts +24 -2
- package/dist/actions/cvms/update_cvm_visibility.d.ts +2 -0
- package/dist/actions/cvms/update_docker_compose.d.ts +31 -0
- package/dist/actions/cvms/update_prelaunch_script.d.ts +31 -0
- package/dist/actions/cvms/upgrade_prelaunch_script.d.ts +16 -0
- package/dist/actions/get_available_nodes.d.ts +259 -0
- package/dist/actions/get_cvm_create_resources.d.ts +351 -0
- package/dist/actions/index.d.ts +6 -2
- package/dist/actions/kms/get_kms_contract.d.ts +59 -0
- package/dist/actions/kms/get_kms_list.d.ts +15 -0
- package/dist/actions/kms/get_kms_onchain_detail.d.ts +54 -0
- package/dist/actions/kms/list_kms_contract_nodes.d.ts +98 -0
- package/dist/actions/kms/list_kms_contracts.d.ts +152 -0
- package/dist/actions/workspaces/get_workspace.d.ts +4 -0
- package/dist/actions/workspaces/get_workspace_nodes.d.ts +161 -0
- package/dist/actions/workspaces/list_workspaces.d.ts +126 -0
- package/dist/client.d.ts +4 -1
- package/dist/create-client.d.ts +48 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1527 -1207
- package/dist/index.mjs +1452 -1151
- package/dist/types/app_compose.d.ts +50 -5
- package/dist/types/app_info_v20251028.d.ts +44 -0
- package/dist/types/app_info_v20260121.d.ts +2324 -0
- package/dist/types/client.d.ts +2 -2
- package/dist/types/cvm_info_v20251028.d.ts +23 -0
- package/dist/types/cvm_info_v20260121.d.ts +977 -0
- package/dist/types/kms_contract.d.ts +64 -0
- package/dist/types/kms_info.d.ts +8 -0
- package/dist/types/version-mappings.d.ts +6 -6
- package/dist/utils/error_codes.d.ts +1 -0
- package/dist/utils/errors.d.ts +30 -1
- package/dist/utils/get_compose_hash.d.ts +24 -0
- package/dist/utils/get_mr_config_id.d.ts +55 -0
- package/dist/utils/index.d.ts +3 -2
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -33,6 +33,13 @@ function extractRequestId(data) {
|
|
|
33
33
|
function extractRequestIdFromResponse(response) {
|
|
34
34
|
return response?.headers?.get("X-Request-ID") ?? void 0;
|
|
35
35
|
}
|
|
36
|
+
function extractRequestMethod(method) {
|
|
37
|
+
if (typeof method !== "string") {
|
|
38
|
+
return void 0;
|
|
39
|
+
}
|
|
40
|
+
const normalized = method.trim().toUpperCase();
|
|
41
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
42
|
+
}
|
|
36
43
|
var PhalaCloudError = class extends Error {
|
|
37
44
|
constructor(message, data) {
|
|
38
45
|
super(message);
|
|
@@ -41,6 +48,9 @@ var PhalaCloudError = class extends Error {
|
|
|
41
48
|
this.statusText = data.statusText;
|
|
42
49
|
this.detail = data.detail;
|
|
43
50
|
this.requestId = data.requestId;
|
|
51
|
+
this.request = data.request;
|
|
52
|
+
this.requestMethod = data.requestMethod;
|
|
53
|
+
this.data = data.data;
|
|
44
54
|
this.code = data.code;
|
|
45
55
|
if (Error.captureStackTrace) {
|
|
46
56
|
Error.captureStackTrace(this, this.constructor);
|
|
@@ -54,12 +64,16 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
54
64
|
statusText: options?.statusText ?? "Unknown Error",
|
|
55
65
|
detail: options?.detail || message,
|
|
56
66
|
requestId: options?.requestId,
|
|
67
|
+
request: options?.request,
|
|
68
|
+
requestMethod: options?.requestMethod,
|
|
69
|
+
data: options?.data,
|
|
57
70
|
code: options?.code
|
|
58
71
|
});
|
|
59
72
|
this.name = "RequestError";
|
|
60
73
|
this.isRequestError = true;
|
|
61
74
|
this.data = options?.data;
|
|
62
75
|
this.request = options?.request;
|
|
76
|
+
this.requestMethod = options?.requestMethod;
|
|
63
77
|
this.response = options?.response;
|
|
64
78
|
this.type = options?.type;
|
|
65
79
|
}
|
|
@@ -70,6 +84,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
70
84
|
const bodyRequestId = extractRequestId(error.data);
|
|
71
85
|
const headerRequestId = extractRequestIdFromResponse(error.response);
|
|
72
86
|
const requestId = bodyRequestId ?? headerRequestId;
|
|
87
|
+
const requestMethod = extractRequestMethod(error.options?.method);
|
|
73
88
|
const parseResult = ApiErrorSchema.safeParse(error.data);
|
|
74
89
|
if (parseResult.success) {
|
|
75
90
|
const detail = parseResult.data.detail ?? (error.data && typeof error.data === "object" && "error_code" in error.data ? error.data : void 0);
|
|
@@ -78,6 +93,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
78
93
|
statusText: error.statusText ?? void 0,
|
|
79
94
|
data: error.data,
|
|
80
95
|
request: error.request ?? void 0,
|
|
96
|
+
requestMethod,
|
|
81
97
|
response: error.response ?? void 0,
|
|
82
98
|
detail,
|
|
83
99
|
code: parseResult.data.code ?? void 0,
|
|
@@ -93,6 +109,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
93
109
|
statusText: "Request Timeout",
|
|
94
110
|
data: error.data,
|
|
95
111
|
request: error.request ?? void 0,
|
|
112
|
+
requestMethod,
|
|
96
113
|
response: error.response ?? void 0,
|
|
97
114
|
detail: message,
|
|
98
115
|
code: "TIMEOUT",
|
|
@@ -104,6 +121,7 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
104
121
|
statusText: error.statusText ?? void 0,
|
|
105
122
|
data: error.data,
|
|
106
123
|
request: error.request ?? void 0,
|
|
124
|
+
requestMethod,
|
|
107
125
|
response: error.response ?? void 0,
|
|
108
126
|
detail: error.data?.detail || error.message || "Unknown API error",
|
|
109
127
|
code: error.status?.toString() ?? void 0,
|
|
@@ -113,9 +131,10 @@ var RequestError = class _RequestError extends PhalaCloudError {
|
|
|
113
131
|
/**
|
|
114
132
|
* Create RequestError from generic Error
|
|
115
133
|
*/
|
|
116
|
-
static fromError(error, request) {
|
|
134
|
+
static fromError(error, request, requestMethod) {
|
|
117
135
|
return new _RequestError(error.message, {
|
|
118
136
|
request: request ?? void 0,
|
|
137
|
+
requestMethod: extractRequestMethod(requestMethod),
|
|
119
138
|
detail: error.message
|
|
120
139
|
});
|
|
121
140
|
}
|
|
@@ -234,6 +253,9 @@ function parseApiError(requestError) {
|
|
|
234
253
|
statusText,
|
|
235
254
|
detail,
|
|
236
255
|
requestId: structured.request_id ?? requestError.requestId,
|
|
256
|
+
request: requestError.request,
|
|
257
|
+
requestMethod: requestError.requestMethod,
|
|
258
|
+
data: requestError.data,
|
|
237
259
|
errorCode: structured.error_code,
|
|
238
260
|
structuredDetails: structured.details,
|
|
239
261
|
suggestions: structured.suggestions,
|
|
@@ -247,6 +269,9 @@ function parseApiError(requestError) {
|
|
|
247
269
|
statusText,
|
|
248
270
|
detail,
|
|
249
271
|
requestId: requestError.requestId,
|
|
272
|
+
request: requestError.request,
|
|
273
|
+
requestMethod: requestError.requestMethod,
|
|
274
|
+
data: requestError.data,
|
|
250
275
|
code: requestError.code
|
|
251
276
|
};
|
|
252
277
|
if (errorType === "validation" && Array.isArray(detail)) {
|
|
@@ -310,6 +335,16 @@ function getErrorMessage(error) {
|
|
|
310
335
|
}
|
|
311
336
|
return "Unknown error occurred";
|
|
312
337
|
}
|
|
338
|
+
function formatStructuredErrorDetailValue(value) {
|
|
339
|
+
if (value === null || value === void 0) return "";
|
|
340
|
+
if (typeof value === "string") return value;
|
|
341
|
+
if (typeof value === "number" || typeof value === "boolean") return String(value);
|
|
342
|
+
try {
|
|
343
|
+
return JSON.stringify(value);
|
|
344
|
+
} catch {
|
|
345
|
+
return String(value);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
313
348
|
var ResourceError = class extends BusinessError {
|
|
314
349
|
constructor(message, data) {
|
|
315
350
|
super(message, data);
|
|
@@ -355,7 +390,7 @@ function formatStructuredError(error, options) {
|
|
|
355
390
|
if (d.message) {
|
|
356
391
|
parts.push(` - ${d.message}`);
|
|
357
392
|
} else if (d.field && d.value !== void 0) {
|
|
358
|
-
parts.push(` - ${d.field}: ${d.value}`);
|
|
393
|
+
parts.push(` - ${d.field}: ${formatStructuredErrorDetailValue(d.value)}`);
|
|
359
394
|
}
|
|
360
395
|
});
|
|
361
396
|
}
|
|
@@ -386,9 +421,10 @@ function isAppIdConflictError(error) {
|
|
|
386
421
|
var SUPPORTED_API_VERSIONS = [
|
|
387
422
|
"2025-10-28",
|
|
388
423
|
"2026-01-21",
|
|
389
|
-
"2026-05-22"
|
|
424
|
+
"2026-05-22",
|
|
425
|
+
"2026-06-23"
|
|
390
426
|
];
|
|
391
|
-
var DEFAULT_API_VERSION = "2026-
|
|
427
|
+
var DEFAULT_API_VERSION = "2026-06-23";
|
|
392
428
|
var logger = debug("phala::api-client");
|
|
393
429
|
function formatHeaders(headers) {
|
|
394
430
|
return Object.entries(headers).map(([key, value]) => ` -H "${key}: ${value}"`).join("\n");
|
|
@@ -859,6 +895,12 @@ async function safeGetCurrentUser(client, parameters) {
|
|
|
859
895
|
}
|
|
860
896
|
|
|
861
897
|
// src/actions/get_available_nodes.ts
|
|
898
|
+
import { z as z7 } from "zod";
|
|
899
|
+
|
|
900
|
+
// src/types/cvm_info_v20260121.ts
|
|
901
|
+
import { z as z6 } from "zod";
|
|
902
|
+
|
|
903
|
+
// src/types/cvm_info_v20251028.ts
|
|
862
904
|
import { z as z5 } from "zod";
|
|
863
905
|
|
|
864
906
|
// src/types/kms_info.ts
|
|
@@ -880,7 +922,8 @@ var KmsInfoBaseSchema = z4.object({
|
|
|
880
922
|
version: z4.string(),
|
|
881
923
|
chain_id: z4.number().nullable(),
|
|
882
924
|
kms_contract_address: z4.string().nullable().transform((val) => val),
|
|
883
|
-
gateway_app_id: z4.string().nullable().transform((val) => val)
|
|
925
|
+
gateway_app_id: z4.string().nullable().transform((val) => val),
|
|
926
|
+
k256_pubkey: z4.string().nullable().optional()
|
|
884
927
|
}).passthrough();
|
|
885
928
|
var KmsInfoSchema = KmsInfoBaseSchema.transform((data) => {
|
|
886
929
|
if (data.chain_id != null) {
|
|
@@ -892,6 +935,262 @@ var KmsInfoSchema = KmsInfoBaseSchema.transform((data) => {
|
|
|
892
935
|
return data;
|
|
893
936
|
});
|
|
894
937
|
|
|
938
|
+
// src/types/cvm_info_v20251028.ts
|
|
939
|
+
var TableIdSchema = z5.union([z5.number(), z5.string()]);
|
|
940
|
+
var VmInfoV20251028Schema = z5.object({
|
|
941
|
+
id: z5.string(),
|
|
942
|
+
name: z5.string(),
|
|
943
|
+
status: z5.string(),
|
|
944
|
+
uptime: z5.string(),
|
|
945
|
+
app_url: z5.string().nullable(),
|
|
946
|
+
app_id: z5.string(),
|
|
947
|
+
instance_id: z5.string().nullable(),
|
|
948
|
+
configuration: z5.any().optional(),
|
|
949
|
+
exited_at: z5.string().nullable(),
|
|
950
|
+
boot_progress: z5.string().nullable(),
|
|
951
|
+
boot_error: z5.string().nullable(),
|
|
952
|
+
shutdown_progress: z5.string().nullable(),
|
|
953
|
+
image_version: z5.string().nullable()
|
|
954
|
+
});
|
|
955
|
+
var ManagedUserV20251028Schema = z5.object({
|
|
956
|
+
id: TableIdSchema,
|
|
957
|
+
username: z5.string()
|
|
958
|
+
});
|
|
959
|
+
var CvmNodeV20251028Schema = z5.object({
|
|
960
|
+
id: z5.number(),
|
|
961
|
+
name: z5.string(),
|
|
962
|
+
region_identifier: z5.string().nullable().optional()
|
|
963
|
+
});
|
|
964
|
+
var MachineInfoV20251028Schema = z5.object({
|
|
965
|
+
vcpu: z5.number(),
|
|
966
|
+
memory: z5.number(),
|
|
967
|
+
disk_size: z5.number(),
|
|
968
|
+
gpu_count: z5.number().default(0)
|
|
969
|
+
});
|
|
970
|
+
var CvmNetworkUrlsV20251028Schema = z5.object({
|
|
971
|
+
app: z5.string(),
|
|
972
|
+
instance: z5.string()
|
|
973
|
+
});
|
|
974
|
+
var CvmInfoV20251028Schema = z5.object({
|
|
975
|
+
hosted: VmInfoV20251028Schema,
|
|
976
|
+
name: z5.string(),
|
|
977
|
+
managed_user: ManagedUserV20251028Schema.nullable(),
|
|
978
|
+
node: CvmNodeV20251028Schema.nullable(),
|
|
979
|
+
listed: z5.boolean().default(false),
|
|
980
|
+
status: z5.string(),
|
|
981
|
+
in_progress: z5.boolean().default(false),
|
|
982
|
+
dapp_dashboard_url: z5.string().nullable(),
|
|
983
|
+
syslog_endpoint: z5.string().nullable(),
|
|
984
|
+
allow_upgrade: z5.boolean().default(false),
|
|
985
|
+
project_id: z5.string().nullable(),
|
|
986
|
+
project_type: z5.string().nullable(),
|
|
987
|
+
billing_period: z5.string().nullable(),
|
|
988
|
+
kms_info: KmsInfoSchema.nullable(),
|
|
989
|
+
vcpu: z5.number().nullable(),
|
|
990
|
+
memory: z5.number().nullable(),
|
|
991
|
+
disk_size: z5.number().nullable(),
|
|
992
|
+
gateway_domain: z5.string().nullable(),
|
|
993
|
+
public_urls: z5.array(CvmNetworkUrlsV20251028Schema),
|
|
994
|
+
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
995
|
+
updated_at: z5.string().nullable().optional()
|
|
996
|
+
});
|
|
997
|
+
var CvmDetailV20251028Schema = z5.object({
|
|
998
|
+
id: TableIdSchema,
|
|
999
|
+
name: z5.string(),
|
|
1000
|
+
status: z5.string(),
|
|
1001
|
+
in_progress: z5.boolean().optional().default(false),
|
|
1002
|
+
teepod_id: z5.number().nullable(),
|
|
1003
|
+
teepod: CvmNodeV20251028Schema.optional().nullable(),
|
|
1004
|
+
app_id: z5.string(),
|
|
1005
|
+
vm_uuid: z5.string().nullable(),
|
|
1006
|
+
instance_id: z5.string().nullable(),
|
|
1007
|
+
vcpu: z5.number(),
|
|
1008
|
+
memory: z5.number(),
|
|
1009
|
+
disk_size: z5.number(),
|
|
1010
|
+
base_image: z5.string().nullable(),
|
|
1011
|
+
encrypted_env_pubkey: z5.string().nullable(),
|
|
1012
|
+
listed: z5.boolean().optional().default(false),
|
|
1013
|
+
project_id: z5.string().optional().nullable(),
|
|
1014
|
+
project_type: z5.string().optional().nullable(),
|
|
1015
|
+
instance_type: z5.string().optional().nullable(),
|
|
1016
|
+
public_sysinfo: z5.boolean().optional().default(false),
|
|
1017
|
+
public_logs: z5.boolean().optional().default(false),
|
|
1018
|
+
dapp_dashboard_url: z5.string().optional().nullable(),
|
|
1019
|
+
syslog_endpoint: z5.string().optional().nullable(),
|
|
1020
|
+
kms_info: KmsInfoSchema.optional().nullable(),
|
|
1021
|
+
contract_address: z5.string().optional().nullable(),
|
|
1022
|
+
deployer_address: z5.string().optional().nullable(),
|
|
1023
|
+
scheduled_delete_at: z5.string().optional().nullable(),
|
|
1024
|
+
public_urls: z5.array(CvmNetworkUrlsV20251028Schema).optional().default([]),
|
|
1025
|
+
gateway_domain: z5.string().optional().nullable(),
|
|
1026
|
+
machine_info: MachineInfoV20251028Schema.optional().nullable(),
|
|
1027
|
+
updated_at: z5.string().optional().nullable()
|
|
1028
|
+
});
|
|
1029
|
+
var PaginatedCvmInfosV20251028Schema = z5.object({
|
|
1030
|
+
items: z5.array(CvmInfoV20251028Schema),
|
|
1031
|
+
total: z5.number(),
|
|
1032
|
+
page: z5.number(),
|
|
1033
|
+
page_size: z5.number(),
|
|
1034
|
+
pages: z5.number()
|
|
1035
|
+
});
|
|
1036
|
+
|
|
1037
|
+
// src/types/cvm_info_v20260121.ts
|
|
1038
|
+
var BillingPeriodSchema = z6.enum(["skip", "hourly", "monthly"]);
|
|
1039
|
+
var KmsTypeSchema = z6.enum(["phala", "ethereum", "base", "legacy"]);
|
|
1040
|
+
var UserRefSchema = z6.object({
|
|
1041
|
+
object_type: z6.literal("user"),
|
|
1042
|
+
id: z6.string().nullable().optional(),
|
|
1043
|
+
username: z6.string().nullable().optional(),
|
|
1044
|
+
avatar_url: z6.string().nullable().optional()
|
|
1045
|
+
});
|
|
1046
|
+
var WorkspaceRefSchema = z6.object({
|
|
1047
|
+
object_type: z6.literal("workspace"),
|
|
1048
|
+
id: z6.string(),
|
|
1049
|
+
name: z6.string(),
|
|
1050
|
+
slug: z6.string().nullable().optional(),
|
|
1051
|
+
avatar_url: z6.string().nullable().optional()
|
|
1052
|
+
});
|
|
1053
|
+
var CvmResourceInfoV20260121Schema = z6.object({
|
|
1054
|
+
instance_type: z6.string().nullable().optional(),
|
|
1055
|
+
vcpu: z6.number().int().nullable().optional(),
|
|
1056
|
+
memory_in_gb: z6.number().nullable().optional(),
|
|
1057
|
+
disk_in_gb: z6.number().int().nullable().optional(),
|
|
1058
|
+
gpus: z6.number().int().nullable().optional(),
|
|
1059
|
+
compute_billing_price: z6.string().nullable().optional(),
|
|
1060
|
+
billing_period: BillingPeriodSchema.nullable().optional()
|
|
1061
|
+
});
|
|
1062
|
+
var CvmHourlyRateV20260121Schema = z6.object({
|
|
1063
|
+
total: z6.string().nullable().optional(),
|
|
1064
|
+
compute: z6.string().nullable().optional(),
|
|
1065
|
+
disk: z6.string().nullable().optional()
|
|
1066
|
+
});
|
|
1067
|
+
var CvmGpuRentalOrderInfoV20260121Schema = z6.object({
|
|
1068
|
+
order_id: z6.string(),
|
|
1069
|
+
status: z6.string(),
|
|
1070
|
+
pricing_plan: z6.string().nullable().optional(),
|
|
1071
|
+
commitment_days: z6.number().int().nullable().optional(),
|
|
1072
|
+
agreed_hourly_rate: z6.string().nullable().optional(),
|
|
1073
|
+
hourly_billing_start_time: z6.string().nullable().optional(),
|
|
1074
|
+
activated_at: z6.string().nullable().optional(),
|
|
1075
|
+
completed_at: z6.string().nullable().optional(),
|
|
1076
|
+
cancelled_at: z6.string().nullable().optional(),
|
|
1077
|
+
decoupled_at: z6.string().nullable().optional(),
|
|
1078
|
+
sku_code: z6.string().nullable().optional(),
|
|
1079
|
+
sku_display_name: z6.string().nullable().optional()
|
|
1080
|
+
});
|
|
1081
|
+
var CvmOsInfoV20260121Schema = z6.object({
|
|
1082
|
+
name: z6.string().nullable().optional(),
|
|
1083
|
+
version: z6.string().nullable().optional(),
|
|
1084
|
+
is_dev: z6.boolean().nullable().optional(),
|
|
1085
|
+
os_image_hash: z6.string().nullable().optional()
|
|
1086
|
+
});
|
|
1087
|
+
var CvmKmsInfoV20260121BaseSchema = z6.object({
|
|
1088
|
+
chain_id: z6.number().int().nullable().optional(),
|
|
1089
|
+
dstack_kms_address: z6.string().nullable().optional(),
|
|
1090
|
+
dstack_app_address: z6.string().nullable().optional(),
|
|
1091
|
+
deployer_address: z6.string().nullable().optional(),
|
|
1092
|
+
rpc_endpoint: z6.string().nullable().optional(),
|
|
1093
|
+
encrypted_env_pubkey: z6.string().nullable().optional()
|
|
1094
|
+
});
|
|
1095
|
+
var CvmKmsInfoV20260121Schema = CvmKmsInfoV20260121BaseSchema.transform((data) => {
|
|
1096
|
+
if (data.chain_id != null) {
|
|
1097
|
+
const chain = SUPPORTED_CHAINS[data.chain_id];
|
|
1098
|
+
if (chain) {
|
|
1099
|
+
return { ...data, chain };
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
return data;
|
|
1103
|
+
});
|
|
1104
|
+
var CvmProgressInfoV20260121Schema = z6.object({
|
|
1105
|
+
target: z6.string().nullable().optional(),
|
|
1106
|
+
started_at: z6.string().nullable().optional(),
|
|
1107
|
+
correlation_id: z6.string().nullable().optional()
|
|
1108
|
+
});
|
|
1109
|
+
var CvmGatewayInfoV20260121Schema = z6.object({
|
|
1110
|
+
base_domain: z6.string().nullable().optional(),
|
|
1111
|
+
cname: z6.string().nullable().optional()
|
|
1112
|
+
});
|
|
1113
|
+
var CvmLogUrlsV20260121Schema = z6.object({
|
|
1114
|
+
serial: z6.string().nullable().optional(),
|
|
1115
|
+
stdout: z6.string().nullable().optional(),
|
|
1116
|
+
stderr: z6.string().nullable().optional(),
|
|
1117
|
+
container_log_base: z6.string().nullable().optional()
|
|
1118
|
+
});
|
|
1119
|
+
var DeviceIdEntrySchema = z6.object({
|
|
1120
|
+
device_id: z6.string(),
|
|
1121
|
+
algorithm_version: z6.string(),
|
|
1122
|
+
enabled: z6.boolean()
|
|
1123
|
+
});
|
|
1124
|
+
var NodeRefSchema = z6.object({
|
|
1125
|
+
object_type: z6.literal("node"),
|
|
1126
|
+
id: z6.number().int().nullable().optional(),
|
|
1127
|
+
name: z6.string().nullable().optional(),
|
|
1128
|
+
region: z6.string().nullable().optional(),
|
|
1129
|
+
// Deprecated: resolved single device_id. Use device_ids for the full matrix.
|
|
1130
|
+
device_id: z6.string().nullable().optional(),
|
|
1131
|
+
device_ids: z6.array(DeviceIdEntrySchema).default([]),
|
|
1132
|
+
ppid: z6.string().nullable().optional(),
|
|
1133
|
+
status: z6.string().nullable().optional(),
|
|
1134
|
+
version: z6.string().nullable().optional()
|
|
1135
|
+
});
|
|
1136
|
+
var CvmNodeInfoV20260121Schema = NodeRefSchema;
|
|
1137
|
+
var CvmInfoV20260121Schema = z6.object({
|
|
1138
|
+
id: z6.string(),
|
|
1139
|
+
name: z6.string(),
|
|
1140
|
+
app_id: z6.string().nullable().optional(),
|
|
1141
|
+
vm_uuid: z6.string().nullable().optional(),
|
|
1142
|
+
instance_id: z6.string().nullable().optional(),
|
|
1143
|
+
resource: CvmResourceInfoV20260121Schema,
|
|
1144
|
+
node_info: NodeRefSchema.nullable().optional(),
|
|
1145
|
+
os: CvmOsInfoV20260121Schema.nullable().optional(),
|
|
1146
|
+
kms_type: KmsTypeSchema.nullable().optional(),
|
|
1147
|
+
kms_info: CvmKmsInfoV20260121Schema.nullable().optional(),
|
|
1148
|
+
status: z6.string(),
|
|
1149
|
+
in_progress: z6.boolean().optional().default(false),
|
|
1150
|
+
progress: CvmProgressInfoV20260121Schema.nullable().optional(),
|
|
1151
|
+
compose_hash: z6.string().nullable().optional(),
|
|
1152
|
+
docker_compose_hash: z6.string().nullable().optional(),
|
|
1153
|
+
pre_launch_script_hash: z6.string().nullable().optional(),
|
|
1154
|
+
gateway: CvmGatewayInfoV20260121Schema,
|
|
1155
|
+
logs: CvmLogUrlsV20260121Schema.optional().default({}),
|
|
1156
|
+
services: z6.array(z6.record(z6.any())).optional().default([]),
|
|
1157
|
+
endpoints: z6.array(CvmNetworkUrlsV20251028Schema).nullable().optional(),
|
|
1158
|
+
public_logs: z6.boolean().optional(),
|
|
1159
|
+
public_sysinfo: z6.boolean().optional(),
|
|
1160
|
+
public_tcbinfo: z6.boolean().optional(),
|
|
1161
|
+
gateway_enabled: z6.boolean().optional(),
|
|
1162
|
+
secure_time: z6.boolean().optional(),
|
|
1163
|
+
listed: z6.boolean().optional().default(false),
|
|
1164
|
+
storage_fs: z6.string().optional(),
|
|
1165
|
+
workspace: WorkspaceRefSchema.nullable().optional(),
|
|
1166
|
+
creator: UserRefSchema.nullable().optional(),
|
|
1167
|
+
created_at: z6.string().nullable().optional(),
|
|
1168
|
+
deleted_at: z6.string().nullable().optional(),
|
|
1169
|
+
project_type: z6.string().nullable().optional(),
|
|
1170
|
+
hourly_rate: CvmHourlyRateV20260121Schema.nullable().optional(),
|
|
1171
|
+
billing_interval: z6.string().nullable().optional(),
|
|
1172
|
+
gpu_rental_order: CvmGpuRentalOrderInfoV20260121Schema.nullable().optional()
|
|
1173
|
+
});
|
|
1174
|
+
var CvmInfoV20260522Schema = CvmInfoV20260121Schema.extend({
|
|
1175
|
+
id: z6.string()
|
|
1176
|
+
});
|
|
1177
|
+
var CvmInfoDetailV20260121Schema = CvmInfoV20260121Schema.extend({
|
|
1178
|
+
compose_file: z6.union([z6.record(z6.any()), z6.string()]).nullable().optional()
|
|
1179
|
+
});
|
|
1180
|
+
var CvmInfoDetailV20260522Schema = CvmInfoV20260522Schema.extend({
|
|
1181
|
+
compose_file: z6.union([z6.record(z6.any()), z6.string()]).nullable().optional()
|
|
1182
|
+
});
|
|
1183
|
+
var PaginatedCvmInfosV20260121Schema = z6.object({
|
|
1184
|
+
items: z6.array(CvmInfoV20260121Schema),
|
|
1185
|
+
total: z6.number(),
|
|
1186
|
+
page: z6.number(),
|
|
1187
|
+
page_size: z6.number(),
|
|
1188
|
+
pages: z6.number()
|
|
1189
|
+
});
|
|
1190
|
+
var PaginatedCvmInfosV20260522Schema = PaginatedCvmInfosV20260121Schema.extend({
|
|
1191
|
+
items: z6.array(CvmInfoV20260522Schema)
|
|
1192
|
+
});
|
|
1193
|
+
|
|
895
1194
|
// src/utils/validate-parameters.ts
|
|
896
1195
|
function validateActionParameters(parameters) {
|
|
897
1196
|
if (parameters?.schema !== void 0 && parameters?.schema !== false) {
|
|
@@ -1039,43 +1338,44 @@ function defineAction(schema, fn) {
|
|
|
1039
1338
|
}
|
|
1040
1339
|
|
|
1041
1340
|
// src/actions/get_available_nodes.ts
|
|
1042
|
-
var AvailableOSImageSchema =
|
|
1043
|
-
name:
|
|
1044
|
-
is_dev:
|
|
1045
|
-
version:
|
|
1046
|
-
|
|
1047
|
-
|
|
1341
|
+
var AvailableOSImageSchema = z7.object({
|
|
1342
|
+
name: z7.string(),
|
|
1343
|
+
is_dev: z7.boolean(),
|
|
1344
|
+
version: z7.union([
|
|
1345
|
+
z7.tuple([z7.number(), z7.number(), z7.number()]),
|
|
1346
|
+
z7.tuple([z7.number(), z7.number(), z7.number(), z7.number()])
|
|
1048
1347
|
]),
|
|
1049
|
-
os_image_hash:
|
|
1348
|
+
os_image_hash: z7.string().nullable().optional()
|
|
1050
1349
|
}).passthrough();
|
|
1051
|
-
var TeepodCapacitySchema =
|
|
1052
|
-
teepod_id:
|
|
1053
|
-
name:
|
|
1054
|
-
listed:
|
|
1055
|
-
resource_score:
|
|
1056
|
-
remaining_vcpu:
|
|
1057
|
-
remaining_memory:
|
|
1058
|
-
remaining_cvm_slots:
|
|
1059
|
-
images:
|
|
1060
|
-
support_onchain_kms:
|
|
1061
|
-
fmspc:
|
|
1062
|
-
device_id:
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1350
|
+
var TeepodCapacitySchema = z7.object({
|
|
1351
|
+
teepod_id: z7.number(),
|
|
1352
|
+
name: z7.string(),
|
|
1353
|
+
listed: z7.boolean(),
|
|
1354
|
+
resource_score: z7.number(),
|
|
1355
|
+
remaining_vcpu: z7.number(),
|
|
1356
|
+
remaining_memory: z7.number(),
|
|
1357
|
+
remaining_cvm_slots: z7.number(),
|
|
1358
|
+
images: z7.array(AvailableOSImageSchema),
|
|
1359
|
+
support_onchain_kms: z7.boolean().optional(),
|
|
1360
|
+
fmspc: z7.string().nullable().optional(),
|
|
1361
|
+
device_id: z7.string().nullable().optional(),
|
|
1362
|
+
device_ids: z7.array(DeviceIdEntrySchema).default([]),
|
|
1363
|
+
region_identifier: z7.string().nullable().optional(),
|
|
1364
|
+
default_kms: z7.string().nullable().optional(),
|
|
1365
|
+
kms_list: z7.array(z7.string()).default([])
|
|
1066
1366
|
}).passthrough();
|
|
1067
|
-
var ResourceThresholdSchema =
|
|
1068
|
-
max_instances:
|
|
1069
|
-
max_vcpu:
|
|
1070
|
-
max_memory:
|
|
1071
|
-
max_disk:
|
|
1367
|
+
var ResourceThresholdSchema = z7.object({
|
|
1368
|
+
max_instances: z7.number().nullable().optional(),
|
|
1369
|
+
max_vcpu: z7.number().nullable().optional(),
|
|
1370
|
+
max_memory: z7.number().nullable().optional(),
|
|
1371
|
+
max_disk: z7.number().nullable().optional()
|
|
1072
1372
|
}).passthrough();
|
|
1073
|
-
var AvailableNodesSchema =
|
|
1074
|
-
tier:
|
|
1373
|
+
var AvailableNodesSchema = z7.object({
|
|
1374
|
+
tier: z7.string(),
|
|
1075
1375
|
// TeamTier is string enum
|
|
1076
1376
|
capacity: ResourceThresholdSchema,
|
|
1077
|
-
nodes:
|
|
1078
|
-
kms_list:
|
|
1377
|
+
nodes: z7.array(TeepodCapacitySchema),
|
|
1378
|
+
kms_list: z7.array(KmsInfoSchema)
|
|
1079
1379
|
}).passthrough();
|
|
1080
1380
|
var { action: getAvailableNodes, safeAction: safeGetAvailableNodes } = defineSimpleAction(
|
|
1081
1381
|
AvailableNodesSchema,
|
|
@@ -1085,42 +1385,42 @@ var { action: getAvailableNodes, safeAction: safeGetAvailableNodes } = defineSim
|
|
|
1085
1385
|
);
|
|
1086
1386
|
|
|
1087
1387
|
// src/actions/get_cvm_create_resources.ts
|
|
1088
|
-
import { z as
|
|
1089
|
-
var ResourceIdV20260121Schema =
|
|
1090
|
-
var HashIdSchema =
|
|
1091
|
-
var GpuAvailabilitySchema =
|
|
1092
|
-
has_reserved_gpus:
|
|
1093
|
-
reserved_gpu_count:
|
|
1094
|
-
has_public_gpus:
|
|
1095
|
-
public_gpu_count:
|
|
1388
|
+
import { z as z8 } from "zod";
|
|
1389
|
+
var ResourceIdV20260121Schema = z8.union([z8.number(), z8.string()]);
|
|
1390
|
+
var HashIdSchema = z8.string();
|
|
1391
|
+
var GpuAvailabilitySchema = z8.object({
|
|
1392
|
+
has_reserved_gpus: z8.boolean(),
|
|
1393
|
+
reserved_gpu_count: z8.number(),
|
|
1394
|
+
has_public_gpus: z8.boolean(),
|
|
1395
|
+
public_gpu_count: z8.number()
|
|
1096
1396
|
}).passthrough();
|
|
1097
|
-
var CvmCreateKmsResourceV20260121Schema =
|
|
1397
|
+
var CvmCreateKmsResourceV20260121Schema = z8.object({
|
|
1098
1398
|
id: ResourceIdV20260121Schema,
|
|
1099
|
-
slug:
|
|
1100
|
-
url:
|
|
1101
|
-
version:
|
|
1102
|
-
kms_type:
|
|
1103
|
-
chain_id:
|
|
1399
|
+
slug: z8.string().nullable().optional(),
|
|
1400
|
+
url: z8.string(),
|
|
1401
|
+
version: z8.string().nullable().optional(),
|
|
1402
|
+
kms_type: z8.string(),
|
|
1403
|
+
chain_id: z8.number().nullable().optional(),
|
|
1104
1404
|
kms_contract_id: ResourceIdV20260121Schema.nullable().optional(),
|
|
1105
|
-
kms_contract_address:
|
|
1106
|
-
gateway_app_id:
|
|
1107
|
-
supported_os_images:
|
|
1405
|
+
kms_contract_address: z8.string().nullable().optional(),
|
|
1406
|
+
gateway_app_id: z8.string().nullable().optional(),
|
|
1407
|
+
supported_os_images: z8.array(z8.string()).default([])
|
|
1108
1408
|
}).passthrough();
|
|
1109
|
-
var CvmCreateNodeKmsRelationV20260121Schema =
|
|
1110
|
-
teepod_id:
|
|
1409
|
+
var CvmCreateNodeKmsRelationV20260121Schema = z8.object({
|
|
1410
|
+
teepod_id: z8.number(),
|
|
1111
1411
|
kms_id: ResourceIdV20260121Schema,
|
|
1112
|
-
kms_type:
|
|
1412
|
+
kms_type: z8.string(),
|
|
1113
1413
|
kms_contract_id: ResourceIdV20260121Schema.nullable().optional(),
|
|
1114
|
-
kms_contract_address:
|
|
1115
|
-
supported_os_images:
|
|
1414
|
+
kms_contract_address: z8.string().nullable().optional(),
|
|
1415
|
+
supported_os_images: z8.array(z8.string()).default([])
|
|
1116
1416
|
}).passthrough();
|
|
1117
|
-
var CvmCreateGatewayResourceV20260121Schema =
|
|
1417
|
+
var CvmCreateGatewayResourceV20260121Schema = z8.object({
|
|
1118
1418
|
id: ResourceIdV20260121Schema,
|
|
1119
|
-
teepod_id:
|
|
1419
|
+
teepod_id: z8.number().nullable().optional(),
|
|
1120
1420
|
kms_contract_id: ResourceIdV20260121Schema,
|
|
1121
|
-
rpc_url:
|
|
1122
|
-
domain_suffix:
|
|
1123
|
-
enabled:
|
|
1421
|
+
rpc_url: z8.string().nullable().optional(),
|
|
1422
|
+
domain_suffix: z8.string().nullable().optional(),
|
|
1423
|
+
enabled: z8.boolean()
|
|
1124
1424
|
}).passthrough();
|
|
1125
1425
|
var CvmCreateKmsResourceSchema = CvmCreateKmsResourceV20260121Schema.extend({
|
|
1126
1426
|
id: HashIdSchema,
|
|
@@ -1134,31 +1434,31 @@ var CvmCreateGatewayResourceSchema = CvmCreateGatewayResourceV20260121Schema.ext
|
|
|
1134
1434
|
id: HashIdSchema,
|
|
1135
1435
|
kms_contract_id: HashIdSchema
|
|
1136
1436
|
});
|
|
1137
|
-
var CvmCreateInstanceTypeResourceSchema =
|
|
1138
|
-
id:
|
|
1139
|
-
name:
|
|
1140
|
-
vcpu:
|
|
1141
|
-
memory_mb:
|
|
1142
|
-
default_disk_size_gb:
|
|
1143
|
-
requires_gpu:
|
|
1144
|
-
requires_gpu_count:
|
|
1145
|
-
family:
|
|
1146
|
-
display_order:
|
|
1437
|
+
var CvmCreateInstanceTypeResourceSchema = z8.object({
|
|
1438
|
+
id: z8.string(),
|
|
1439
|
+
name: z8.string(),
|
|
1440
|
+
vcpu: z8.number(),
|
|
1441
|
+
memory_mb: z8.number(),
|
|
1442
|
+
default_disk_size_gb: z8.number(),
|
|
1443
|
+
requires_gpu: z8.boolean(),
|
|
1444
|
+
requires_gpu_count: z8.number(),
|
|
1445
|
+
family: z8.string().nullable().optional(),
|
|
1446
|
+
display_order: z8.number().nullable().optional()
|
|
1147
1447
|
}).passthrough();
|
|
1148
|
-
var CvmCreateResourceGraphV20260121Schema =
|
|
1149
|
-
tier:
|
|
1448
|
+
var CvmCreateResourceGraphV20260121Schema = z8.object({
|
|
1449
|
+
tier: z8.string(),
|
|
1150
1450
|
capacity: ResourceThresholdSchema,
|
|
1151
|
-
nodes:
|
|
1152
|
-
kms_nodes:
|
|
1153
|
-
node_kms_relations:
|
|
1154
|
-
gateway_nodes:
|
|
1155
|
-
instance_types:
|
|
1451
|
+
nodes: z8.array(TeepodCapacitySchema),
|
|
1452
|
+
kms_nodes: z8.array(CvmCreateKmsResourceV20260121Schema),
|
|
1453
|
+
node_kms_relations: z8.array(CvmCreateNodeKmsRelationV20260121Schema),
|
|
1454
|
+
gateway_nodes: z8.array(CvmCreateGatewayResourceV20260121Schema),
|
|
1455
|
+
instance_types: z8.array(CvmCreateInstanceTypeResourceSchema),
|
|
1156
1456
|
gpu_availability: GpuAvailabilitySchema
|
|
1157
1457
|
}).passthrough();
|
|
1158
1458
|
var CvmCreateResourceGraphV20260522Schema = CvmCreateResourceGraphV20260121Schema.extend({
|
|
1159
|
-
kms_nodes:
|
|
1160
|
-
node_kms_relations:
|
|
1161
|
-
gateway_nodes:
|
|
1459
|
+
kms_nodes: z8.array(CvmCreateKmsResourceSchema),
|
|
1460
|
+
node_kms_relations: z8.array(CvmCreateNodeKmsRelationSchema),
|
|
1461
|
+
gateway_nodes: z8.array(CvmCreateGatewayResourceSchema)
|
|
1162
1462
|
});
|
|
1163
1463
|
var CvmCreateResourceGraphSchema = CvmCreateResourceGraphV20260522Schema;
|
|
1164
1464
|
function getSchemaForVersion2(version) {
|
|
@@ -1186,33 +1486,33 @@ async function safeGetCvmCreateResources(client, parameters) {
|
|
|
1186
1486
|
}
|
|
1187
1487
|
|
|
1188
1488
|
// src/actions/list-instance-types.ts
|
|
1189
|
-
import { z as
|
|
1190
|
-
var InstanceTypeSchema =
|
|
1191
|
-
id:
|
|
1192
|
-
name:
|
|
1193
|
-
description:
|
|
1194
|
-
vcpu:
|
|
1195
|
-
memory_mb:
|
|
1196
|
-
hourly_rate:
|
|
1197
|
-
requires_gpu:
|
|
1198
|
-
default_disk_size_gb:
|
|
1199
|
-
family:
|
|
1489
|
+
import { z as z9 } from "zod";
|
|
1490
|
+
var InstanceTypeSchema = z9.object({
|
|
1491
|
+
id: z9.string(),
|
|
1492
|
+
name: z9.string(),
|
|
1493
|
+
description: z9.string(),
|
|
1494
|
+
vcpu: z9.number(),
|
|
1495
|
+
memory_mb: z9.number(),
|
|
1496
|
+
hourly_rate: z9.string(),
|
|
1497
|
+
requires_gpu: z9.boolean(),
|
|
1498
|
+
default_disk_size_gb: z9.number().default(20),
|
|
1499
|
+
family: z9.string().nullable()
|
|
1200
1500
|
}).passthrough();
|
|
1201
|
-
var FamilyGroupSchema =
|
|
1202
|
-
name:
|
|
1203
|
-
items:
|
|
1204
|
-
total:
|
|
1501
|
+
var FamilyGroupSchema = z9.object({
|
|
1502
|
+
name: z9.string(),
|
|
1503
|
+
items: z9.array(InstanceTypeSchema),
|
|
1504
|
+
total: z9.number()
|
|
1205
1505
|
}).strict();
|
|
1206
|
-
var AllFamiliesResponseSchema =
|
|
1207
|
-
result:
|
|
1506
|
+
var AllFamiliesResponseSchema = z9.object({
|
|
1507
|
+
result: z9.array(FamilyGroupSchema)
|
|
1208
1508
|
}).strict();
|
|
1209
|
-
var FamilyInstanceTypesResponseSchema =
|
|
1210
|
-
items:
|
|
1211
|
-
total:
|
|
1212
|
-
family:
|
|
1509
|
+
var FamilyInstanceTypesResponseSchema = z9.object({
|
|
1510
|
+
items: z9.array(InstanceTypeSchema),
|
|
1511
|
+
total: z9.number(),
|
|
1512
|
+
family: z9.string()
|
|
1213
1513
|
}).strict();
|
|
1214
|
-
var ListFamilyInstanceTypesRequestSchema =
|
|
1215
|
-
family:
|
|
1514
|
+
var ListFamilyInstanceTypesRequestSchema = z9.object({
|
|
1515
|
+
family: z9.string()
|
|
1216
1516
|
}).strict();
|
|
1217
1517
|
var { action: listAllInstanceTypeFamilies, safeAction: safeListAllInstanceTypeFamilies } = defineAction(
|
|
1218
1518
|
AllFamiliesResponseSchema,
|
|
@@ -1226,25 +1526,32 @@ var { action: listFamilyInstanceTypes, safeAction: safeListFamilyInstanceTypes }
|
|
|
1226
1526
|
});
|
|
1227
1527
|
|
|
1228
1528
|
// src/actions/workspaces/list_workspaces.ts
|
|
1229
|
-
import { z as
|
|
1230
|
-
var WorkspaceResponseSchema =
|
|
1231
|
-
id:
|
|
1232
|
-
name:
|
|
1233
|
-
slug:
|
|
1234
|
-
avatar_url:
|
|
1235
|
-
tier:
|
|
1236
|
-
role:
|
|
1237
|
-
is_default:
|
|
1238
|
-
created_at:
|
|
1239
|
-
confidential_models_enabled:
|
|
1529
|
+
import { z as z10 } from "zod";
|
|
1530
|
+
var WorkspaceResponseSchema = z10.object({
|
|
1531
|
+
id: z10.string(),
|
|
1532
|
+
name: z10.string(),
|
|
1533
|
+
slug: z10.string().nullable(),
|
|
1534
|
+
avatar_url: z10.string().nullable().optional(),
|
|
1535
|
+
tier: z10.string(),
|
|
1536
|
+
role: z10.string(),
|
|
1537
|
+
is_default: z10.boolean(),
|
|
1538
|
+
created_at: z10.string(),
|
|
1539
|
+
confidential_models_enabled: z10.boolean().optional(),
|
|
1540
|
+
/**
|
|
1541
|
+
* Billing lifecycle state. A suspended workspace still runs but owes money;
|
|
1542
|
+
* an abandoned one is closed and read-only until its balance is settled.
|
|
1543
|
+
*/
|
|
1544
|
+
billing_status: z10.enum(["active", "suspended", "abandoned"]).default("active"),
|
|
1545
|
+
/** When the workspace was suspended. Null unless billing_status is suspended. */
|
|
1546
|
+
suspended_at: z10.string().nullable().optional()
|
|
1240
1547
|
}).passthrough();
|
|
1241
|
-
var PaginationMetadataSchema =
|
|
1242
|
-
has_more:
|
|
1243
|
-
next_cursor:
|
|
1244
|
-
total:
|
|
1548
|
+
var PaginationMetadataSchema = z10.object({
|
|
1549
|
+
has_more: z10.boolean(),
|
|
1550
|
+
next_cursor: z10.string().nullable(),
|
|
1551
|
+
total: z10.number().nullable()
|
|
1245
1552
|
}).passthrough();
|
|
1246
|
-
var ListWorkspacesSchema =
|
|
1247
|
-
data:
|
|
1553
|
+
var ListWorkspacesSchema = z10.object({
|
|
1554
|
+
data: z10.array(WorkspaceResponseSchema),
|
|
1248
1555
|
pagination: PaginationMetadataSchema
|
|
1249
1556
|
}).passthrough();
|
|
1250
1557
|
var { action: listWorkspaces, safeAction: safeListWorkspaces } = defineAction(ListWorkspacesSchema, async (client, request) => {
|
|
@@ -1260,235 +1567,6 @@ var { action: getWorkspace, safeAction: safeGetWorkspace } = defineAction(Worksp
|
|
|
1260
1567
|
return await client.get(`/workspaces/${teamSlug}`);
|
|
1261
1568
|
});
|
|
1262
1569
|
|
|
1263
|
-
// src/types/cvm_info_v20251028.ts
|
|
1264
|
-
import { z as z9 } from "zod";
|
|
1265
|
-
var TableIdSchema = z9.union([z9.number(), z9.string()]);
|
|
1266
|
-
var VmInfoV20251028Schema = z9.object({
|
|
1267
|
-
id: z9.string(),
|
|
1268
|
-
name: z9.string(),
|
|
1269
|
-
status: z9.string(),
|
|
1270
|
-
uptime: z9.string(),
|
|
1271
|
-
app_url: z9.string().nullable(),
|
|
1272
|
-
app_id: z9.string(),
|
|
1273
|
-
instance_id: z9.string().nullable(),
|
|
1274
|
-
configuration: z9.any().optional(),
|
|
1275
|
-
exited_at: z9.string().nullable(),
|
|
1276
|
-
boot_progress: z9.string().nullable(),
|
|
1277
|
-
boot_error: z9.string().nullable(),
|
|
1278
|
-
shutdown_progress: z9.string().nullable(),
|
|
1279
|
-
image_version: z9.string().nullable()
|
|
1280
|
-
});
|
|
1281
|
-
var ManagedUserV20251028Schema = z9.object({
|
|
1282
|
-
id: TableIdSchema,
|
|
1283
|
-
username: z9.string()
|
|
1284
|
-
});
|
|
1285
|
-
var CvmNodeV20251028Schema = z9.object({
|
|
1286
|
-
id: z9.number(),
|
|
1287
|
-
name: z9.string(),
|
|
1288
|
-
region_identifier: z9.string().nullable().optional()
|
|
1289
|
-
});
|
|
1290
|
-
var MachineInfoV20251028Schema = z9.object({
|
|
1291
|
-
vcpu: z9.number(),
|
|
1292
|
-
memory: z9.number(),
|
|
1293
|
-
disk_size: z9.number(),
|
|
1294
|
-
gpu_count: z9.number().default(0)
|
|
1295
|
-
});
|
|
1296
|
-
var CvmNetworkUrlsV20251028Schema = z9.object({
|
|
1297
|
-
app: z9.string(),
|
|
1298
|
-
instance: z9.string()
|
|
1299
|
-
});
|
|
1300
|
-
var CvmInfoV20251028Schema = z9.object({
|
|
1301
|
-
hosted: VmInfoV20251028Schema,
|
|
1302
|
-
name: z9.string(),
|
|
1303
|
-
managed_user: ManagedUserV20251028Schema.nullable(),
|
|
1304
|
-
node: CvmNodeV20251028Schema.nullable(),
|
|
1305
|
-
listed: z9.boolean().default(false),
|
|
1306
|
-
status: z9.string(),
|
|
1307
|
-
in_progress: z9.boolean().default(false),
|
|
1308
|
-
dapp_dashboard_url: z9.string().nullable(),
|
|
1309
|
-
syslog_endpoint: z9.string().nullable(),
|
|
1310
|
-
allow_upgrade: z9.boolean().default(false),
|
|
1311
|
-
project_id: z9.string().nullable(),
|
|
1312
|
-
project_type: z9.string().nullable(),
|
|
1313
|
-
billing_period: z9.string().nullable(),
|
|
1314
|
-
kms_info: KmsInfoSchema.nullable(),
|
|
1315
|
-
vcpu: z9.number().nullable(),
|
|
1316
|
-
memory: z9.number().nullable(),
|
|
1317
|
-
disk_size: z9.number().nullable(),
|
|
1318
|
-
gateway_domain: z9.string().nullable(),
|
|
1319
|
-
public_urls: z9.array(CvmNetworkUrlsV20251028Schema),
|
|
1320
|
-
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
1321
|
-
updated_at: z9.string().nullable().optional()
|
|
1322
|
-
});
|
|
1323
|
-
var CvmDetailV20251028Schema = z9.object({
|
|
1324
|
-
id: TableIdSchema,
|
|
1325
|
-
name: z9.string(),
|
|
1326
|
-
status: z9.string(),
|
|
1327
|
-
in_progress: z9.boolean().optional().default(false),
|
|
1328
|
-
teepod_id: z9.number().nullable(),
|
|
1329
|
-
teepod: CvmNodeV20251028Schema.optional().nullable(),
|
|
1330
|
-
app_id: z9.string(),
|
|
1331
|
-
vm_uuid: z9.string().nullable(),
|
|
1332
|
-
instance_id: z9.string().nullable(),
|
|
1333
|
-
vcpu: z9.number(),
|
|
1334
|
-
memory: z9.number(),
|
|
1335
|
-
disk_size: z9.number(),
|
|
1336
|
-
base_image: z9.string().nullable(),
|
|
1337
|
-
encrypted_env_pubkey: z9.string().nullable(),
|
|
1338
|
-
listed: z9.boolean().optional().default(false),
|
|
1339
|
-
project_id: z9.string().optional().nullable(),
|
|
1340
|
-
project_type: z9.string().optional().nullable(),
|
|
1341
|
-
instance_type: z9.string().optional().nullable(),
|
|
1342
|
-
public_sysinfo: z9.boolean().optional().default(false),
|
|
1343
|
-
public_logs: z9.boolean().optional().default(false),
|
|
1344
|
-
dapp_dashboard_url: z9.string().optional().nullable(),
|
|
1345
|
-
syslog_endpoint: z9.string().optional().nullable(),
|
|
1346
|
-
kms_info: KmsInfoSchema.optional().nullable(),
|
|
1347
|
-
contract_address: z9.string().optional().nullable(),
|
|
1348
|
-
deployer_address: z9.string().optional().nullable(),
|
|
1349
|
-
scheduled_delete_at: z9.string().optional().nullable(),
|
|
1350
|
-
public_urls: z9.array(CvmNetworkUrlsV20251028Schema).optional().default([]),
|
|
1351
|
-
gateway_domain: z9.string().optional().nullable(),
|
|
1352
|
-
machine_info: MachineInfoV20251028Schema.optional().nullable(),
|
|
1353
|
-
updated_at: z9.string().optional().nullable()
|
|
1354
|
-
});
|
|
1355
|
-
var PaginatedCvmInfosV20251028Schema = z9.object({
|
|
1356
|
-
items: z9.array(CvmInfoV20251028Schema),
|
|
1357
|
-
total: z9.number(),
|
|
1358
|
-
page: z9.number(),
|
|
1359
|
-
page_size: z9.number(),
|
|
1360
|
-
pages: z9.number()
|
|
1361
|
-
});
|
|
1362
|
-
|
|
1363
|
-
// src/types/cvm_info_v20260121.ts
|
|
1364
|
-
import { z as z10 } from "zod";
|
|
1365
|
-
var BillingPeriodSchema = z10.enum(["skip", "hourly", "monthly"]);
|
|
1366
|
-
var KmsTypeSchema = z10.enum(["phala", "ethereum", "base", "legacy"]);
|
|
1367
|
-
var UserRefSchema = z10.object({
|
|
1368
|
-
object_type: z10.literal("user"),
|
|
1369
|
-
id: z10.string().nullable().optional(),
|
|
1370
|
-
username: z10.string().nullable().optional(),
|
|
1371
|
-
avatar_url: z10.string().nullable().optional()
|
|
1372
|
-
});
|
|
1373
|
-
var WorkspaceRefSchema = z10.object({
|
|
1374
|
-
object_type: z10.literal("workspace"),
|
|
1375
|
-
id: z10.string(),
|
|
1376
|
-
name: z10.string(),
|
|
1377
|
-
slug: z10.string().nullable().optional(),
|
|
1378
|
-
avatar_url: z10.string().nullable().optional()
|
|
1379
|
-
});
|
|
1380
|
-
var CvmResourceInfoV20260121Schema = z10.object({
|
|
1381
|
-
instance_type: z10.string().nullable().optional(),
|
|
1382
|
-
vcpu: z10.number().int().nullable().optional(),
|
|
1383
|
-
memory_in_gb: z10.number().nullable().optional(),
|
|
1384
|
-
disk_in_gb: z10.number().int().nullable().optional(),
|
|
1385
|
-
gpus: z10.number().int().nullable().optional(),
|
|
1386
|
-
compute_billing_price: z10.string().nullable().optional(),
|
|
1387
|
-
billing_period: BillingPeriodSchema.nullable().optional()
|
|
1388
|
-
});
|
|
1389
|
-
var CvmOsInfoV20260121Schema = z10.object({
|
|
1390
|
-
name: z10.string().nullable().optional(),
|
|
1391
|
-
version: z10.string().nullable().optional(),
|
|
1392
|
-
is_dev: z10.boolean().nullable().optional(),
|
|
1393
|
-
os_image_hash: z10.string().nullable().optional()
|
|
1394
|
-
});
|
|
1395
|
-
var CvmKmsInfoV20260121BaseSchema = z10.object({
|
|
1396
|
-
chain_id: z10.number().int().nullable().optional(),
|
|
1397
|
-
dstack_kms_address: z10.string().nullable().optional(),
|
|
1398
|
-
dstack_app_address: z10.string().nullable().optional(),
|
|
1399
|
-
deployer_address: z10.string().nullable().optional(),
|
|
1400
|
-
rpc_endpoint: z10.string().nullable().optional(),
|
|
1401
|
-
encrypted_env_pubkey: z10.string().nullable().optional()
|
|
1402
|
-
});
|
|
1403
|
-
var CvmKmsInfoV20260121Schema = CvmKmsInfoV20260121BaseSchema.transform((data) => {
|
|
1404
|
-
if (data.chain_id != null) {
|
|
1405
|
-
const chain = SUPPORTED_CHAINS[data.chain_id];
|
|
1406
|
-
if (chain) {
|
|
1407
|
-
return { ...data, chain };
|
|
1408
|
-
}
|
|
1409
|
-
}
|
|
1410
|
-
return data;
|
|
1411
|
-
});
|
|
1412
|
-
var CvmProgressInfoV20260121Schema = z10.object({
|
|
1413
|
-
target: z10.string().nullable().optional(),
|
|
1414
|
-
started_at: z10.string().nullable().optional(),
|
|
1415
|
-
correlation_id: z10.string().nullable().optional()
|
|
1416
|
-
});
|
|
1417
|
-
var CvmGatewayInfoV20260121Schema = z10.object({
|
|
1418
|
-
base_domain: z10.string().nullable().optional(),
|
|
1419
|
-
cname: z10.string().nullable().optional()
|
|
1420
|
-
});
|
|
1421
|
-
var CvmLogUrlsV20260121Schema = z10.object({
|
|
1422
|
-
serial: z10.string().nullable().optional(),
|
|
1423
|
-
stdout: z10.string().nullable().optional(),
|
|
1424
|
-
stderr: z10.string().nullable().optional(),
|
|
1425
|
-
container_log_base: z10.string().nullable().optional()
|
|
1426
|
-
});
|
|
1427
|
-
var NodeRefSchema = z10.object({
|
|
1428
|
-
object_type: z10.literal("node"),
|
|
1429
|
-
id: z10.number().int().nullable().optional(),
|
|
1430
|
-
name: z10.string().nullable().optional(),
|
|
1431
|
-
region: z10.string().nullable().optional(),
|
|
1432
|
-
device_id: z10.string().nullable().optional(),
|
|
1433
|
-
ppid: z10.string().nullable().optional(),
|
|
1434
|
-
status: z10.string().nullable().optional(),
|
|
1435
|
-
version: z10.string().nullable().optional()
|
|
1436
|
-
});
|
|
1437
|
-
var CvmNodeInfoV20260121Schema = NodeRefSchema;
|
|
1438
|
-
var CvmInfoV20260121Schema = z10.object({
|
|
1439
|
-
id: z10.string(),
|
|
1440
|
-
name: z10.string(),
|
|
1441
|
-
app_id: z10.string().nullable().optional(),
|
|
1442
|
-
vm_uuid: z10.string().nullable().optional(),
|
|
1443
|
-
instance_id: z10.string().nullable().optional(),
|
|
1444
|
-
resource: CvmResourceInfoV20260121Schema,
|
|
1445
|
-
node_info: NodeRefSchema.nullable().optional(),
|
|
1446
|
-
os: CvmOsInfoV20260121Schema.nullable().optional(),
|
|
1447
|
-
kms_type: KmsTypeSchema.nullable().optional(),
|
|
1448
|
-
kms_info: CvmKmsInfoV20260121Schema.nullable().optional(),
|
|
1449
|
-
status: z10.string(),
|
|
1450
|
-
in_progress: z10.boolean().optional().default(false),
|
|
1451
|
-
progress: CvmProgressInfoV20260121Schema.nullable().optional(),
|
|
1452
|
-
compose_hash: z10.string().nullable().optional(),
|
|
1453
|
-
docker_compose_hash: z10.string().nullable().optional(),
|
|
1454
|
-
pre_launch_script_hash: z10.string().nullable().optional(),
|
|
1455
|
-
gateway: CvmGatewayInfoV20260121Schema,
|
|
1456
|
-
logs: CvmLogUrlsV20260121Schema.optional().default({}),
|
|
1457
|
-
services: z10.array(z10.record(z10.any())).optional().default([]),
|
|
1458
|
-
endpoints: z10.array(CvmNetworkUrlsV20251028Schema).nullable().optional(),
|
|
1459
|
-
public_logs: z10.boolean().optional(),
|
|
1460
|
-
public_sysinfo: z10.boolean().optional(),
|
|
1461
|
-
public_tcbinfo: z10.boolean().optional(),
|
|
1462
|
-
gateway_enabled: z10.boolean().optional(),
|
|
1463
|
-
secure_time: z10.boolean().optional(),
|
|
1464
|
-
listed: z10.boolean().optional().default(false),
|
|
1465
|
-
storage_fs: z10.string().optional(),
|
|
1466
|
-
workspace: WorkspaceRefSchema.nullable().optional(),
|
|
1467
|
-
creator: UserRefSchema.nullable().optional(),
|
|
1468
|
-
created_at: z10.string().nullable().optional(),
|
|
1469
|
-
deleted_at: z10.string().nullable().optional(),
|
|
1470
|
-
project_type: z10.string().nullable().optional()
|
|
1471
|
-
});
|
|
1472
|
-
var CvmInfoV20260522Schema = CvmInfoV20260121Schema.extend({
|
|
1473
|
-
id: z10.string()
|
|
1474
|
-
});
|
|
1475
|
-
var CvmInfoDetailV20260121Schema = CvmInfoV20260121Schema.extend({
|
|
1476
|
-
compose_file: z10.union([z10.record(z10.any()), z10.string()]).nullable().optional()
|
|
1477
|
-
});
|
|
1478
|
-
var CvmInfoDetailV20260522Schema = CvmInfoV20260522Schema.extend({
|
|
1479
|
-
compose_file: z10.union([z10.record(z10.any()), z10.string()]).nullable().optional()
|
|
1480
|
-
});
|
|
1481
|
-
var PaginatedCvmInfosV20260121Schema = z10.object({
|
|
1482
|
-
items: z10.array(CvmInfoV20260121Schema),
|
|
1483
|
-
total: z10.number(),
|
|
1484
|
-
page: z10.number(),
|
|
1485
|
-
page_size: z10.number(),
|
|
1486
|
-
pages: z10.number()
|
|
1487
|
-
});
|
|
1488
|
-
var PaginatedCvmInfosV20260522Schema = PaginatedCvmInfosV20260121Schema.extend({
|
|
1489
|
-
items: z10.array(CvmInfoV20260522Schema)
|
|
1490
|
-
});
|
|
1491
|
-
|
|
1492
1570
|
// src/types/cvm_id.ts
|
|
1493
1571
|
import { z as z11 } from "zod";
|
|
1494
1572
|
|
|
@@ -1639,9 +1717,8 @@ import { z as z12 } from "zod";
|
|
|
1639
1717
|
var GetCvmListRequestSchema = z12.object({
|
|
1640
1718
|
page: z12.number().int().min(1).optional(),
|
|
1641
1719
|
page_size: z12.number().int().min(1).optional(),
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
user_id: z12.string().optional()
|
|
1720
|
+
family: z12.enum(["all", "cpu", "gpu"]).optional(),
|
|
1721
|
+
instance_types: z12.array(z12.string()).optional()
|
|
1645
1722
|
}).strict();
|
|
1646
1723
|
function getSchemaForVersion4(version) {
|
|
1647
1724
|
if (version === "2025-10-28") return PaginatedCvmInfosV20251028Schema;
|
|
@@ -1698,10 +1775,18 @@ var LooseAppComposeSchema = z13.object({
|
|
|
1698
1775
|
features: z13.array(z13.string()).optional(),
|
|
1699
1776
|
name: z13.string().optional(),
|
|
1700
1777
|
manifest_version: z13.number().optional(),
|
|
1778
|
+
runner: z13.string().optional(),
|
|
1701
1779
|
kms_enabled: z13.boolean().optional(),
|
|
1780
|
+
gateway_enabled: z13.boolean().optional(),
|
|
1781
|
+
tproxy_enabled: z13.boolean().optional(),
|
|
1782
|
+
local_key_provider_enabled: z13.boolean().optional(),
|
|
1783
|
+
key_provider: z13.enum(["none", "kms", "local", "tpm"]).optional(),
|
|
1784
|
+
key_provider_id: z13.string().optional(),
|
|
1702
1785
|
public_logs: z13.boolean().optional(),
|
|
1703
1786
|
public_sysinfo: z13.boolean().optional(),
|
|
1704
|
-
|
|
1787
|
+
public_tcbinfo: z13.boolean().optional(),
|
|
1788
|
+
no_instance_id: z13.boolean().optional(),
|
|
1789
|
+
secure_time: z13.boolean().optional(),
|
|
1705
1790
|
port_policy: z13.object({
|
|
1706
1791
|
ports: z13.array(
|
|
1707
1792
|
z13.object({
|
|
@@ -1712,6 +1797,7 @@ var LooseAppComposeSchema = z13.object({
|
|
|
1712
1797
|
restrict_mode: z13.boolean()
|
|
1713
1798
|
}).optional(),
|
|
1714
1799
|
storage_fs: z13.enum(["ext4", "zfs"]).optional(),
|
|
1800
|
+
swap_size: z13.string().optional(),
|
|
1715
1801
|
pre_launch_script: z13.string().optional(),
|
|
1716
1802
|
env_pubkey: z13.string().optional(),
|
|
1717
1803
|
salt: z13.string().optional().nullable()
|
|
@@ -1732,7 +1818,9 @@ var ProvisionCvmSchema = z14.object({
|
|
|
1732
1818
|
teepod_id: z14.number().nullable().optional(),
|
|
1733
1819
|
// Will be transformed to node_id
|
|
1734
1820
|
node_id: z14.number().nullable().optional(),
|
|
1735
|
-
|
|
1821
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
1822
|
+
kms_id: z14.string().nullable().optional(),
|
|
1823
|
+
kms_contract_id: z14.union([z14.string(), z14.number()]).nullable().optional()
|
|
1736
1824
|
}).passthrough().transform((data) => {
|
|
1737
1825
|
if ("teepod_id" in data && data.teepod_id !== void 0) {
|
|
1738
1826
|
const { teepod_id, ...rest } = data;
|
|
@@ -1764,13 +1852,24 @@ var ProvisionCvmRequestSchema = z14.object({
|
|
|
1764
1852
|
name: z14.string().optional().default(""),
|
|
1765
1853
|
// optional with default empty string
|
|
1766
1854
|
kms_enabled: z14.boolean().optional(),
|
|
1767
|
-
public_logs: z14.boolean().optional(),
|
|
1768
|
-
public_sysinfo: z14.boolean().optional(),
|
|
1769
1855
|
gateway_enabled: z14.boolean().optional(),
|
|
1770
1856
|
// recommended
|
|
1771
1857
|
tproxy_enabled: z14.boolean().optional(),
|
|
1772
1858
|
// deprecated, for compatibility
|
|
1773
|
-
|
|
1859
|
+
local_key_provider_enabled: z14.boolean().optional(),
|
|
1860
|
+
key_provider: z14.enum(["none", "kms", "local", "tpm"]).optional(),
|
|
1861
|
+
key_provider_id: z14.string().optional(),
|
|
1862
|
+
public_logs: z14.boolean().optional(),
|
|
1863
|
+
public_sysinfo: z14.boolean().optional(),
|
|
1864
|
+
public_tcbinfo: z14.boolean().optional(),
|
|
1865
|
+
no_instance_id: z14.boolean().optional(),
|
|
1866
|
+
secure_time: z14.boolean().optional(),
|
|
1867
|
+
storage_fs: z14.enum(["ext4", "zfs"]).optional(),
|
|
1868
|
+
swap_size: z14.string().optional(),
|
|
1869
|
+
port_policy: z14.object({
|
|
1870
|
+
ports: z14.array(z14.object({ port: z14.number(), pp: z14.boolean() })),
|
|
1871
|
+
restrict_mode: z14.boolean()
|
|
1872
|
+
}).optional()
|
|
1774
1873
|
}).passthrough().superRefine((data, ctx) => {
|
|
1775
1874
|
validateComposePayloadSize(data.docker_compose_file, data.pre_launch_script, ctx);
|
|
1776
1875
|
}),
|
|
@@ -1871,7 +1970,9 @@ var CommitCvmProvisionRequestSchema = z15.object({
|
|
|
1871
1970
|
encrypted_env: z15.string().optional().nullable(),
|
|
1872
1971
|
app_id: z15.string(),
|
|
1873
1972
|
compose_hash: z15.string(),
|
|
1973
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
1874
1974
|
kms_id: z15.string().optional(),
|
|
1975
|
+
kms_contract_id: z15.union([z15.string(), z15.number()]).optional(),
|
|
1875
1976
|
contract_address: z15.string().optional(),
|
|
1876
1977
|
deployer_address: z15.string().optional(),
|
|
1877
1978
|
env_keys: z15.array(z15.string()).optional().nullable()
|
|
@@ -1993,7 +2094,8 @@ var ProvisionCvmComposeFileUpdateResultSchema = z16.object({
|
|
|
1993
2094
|
device_id: z16.string().nullable(),
|
|
1994
2095
|
compose_hash: z16.string(),
|
|
1995
2096
|
kms_info: KmsInfoSchema.nullable().optional(),
|
|
1996
|
-
compose_hash_registered: z16.boolean().optional().default(false)
|
|
2097
|
+
compose_hash_registered: z16.boolean().optional().default(false),
|
|
2098
|
+
compose_unchanged: z16.boolean().optional().default(false)
|
|
1997
2099
|
}).passthrough();
|
|
1998
2100
|
var { action: provisionCvmComposeFileUpdate, safeAction: safeProvisionCvmComposeFileUpdate } = defineAction(ProvisionCvmComposeFileUpdateResultSchema, async (client, request) => {
|
|
1999
2101
|
const validatedRequest = ProvisionCvmComposeFileUpdateRequestSchema.parse(request);
|
|
@@ -2157,9 +2259,14 @@ var UpdateDockerComposePreconditionRequiredSchema = z19.object({
|
|
|
2157
2259
|
device_id: z19.string(),
|
|
2158
2260
|
kms_info: KmsInfoSchema
|
|
2159
2261
|
});
|
|
2262
|
+
var UpdateDockerComposeNoChangeSchema = z19.object({
|
|
2263
|
+
status: z19.literal("no_change"),
|
|
2264
|
+
message: z19.string()
|
|
2265
|
+
});
|
|
2160
2266
|
var UpdateDockerComposeResultSchema = z19.union([
|
|
2161
2267
|
UpdateDockerComposeInProgressSchema,
|
|
2162
|
-
UpdateDockerComposePreconditionRequiredSchema
|
|
2268
|
+
UpdateDockerComposePreconditionRequiredSchema,
|
|
2269
|
+
UpdateDockerComposeNoChangeSchema
|
|
2163
2270
|
]);
|
|
2164
2271
|
var { action: updateDockerCompose, safeAction: safeUpdateDockerCompose } = defineAction(UpdateDockerComposeResultSchema, async (client, request) => {
|
|
2165
2272
|
const validatedRequest = UpdateDockerComposeRequestSchema.parse(request);
|
|
@@ -2241,9 +2348,14 @@ var UpdatePreLaunchScriptPreconditionRequiredSchema = z20.object({
|
|
|
2241
2348
|
device_id: z20.string(),
|
|
2242
2349
|
kms_info: KmsInfoSchema
|
|
2243
2350
|
});
|
|
2351
|
+
var UpdatePreLaunchScriptNoChangeSchema = z20.object({
|
|
2352
|
+
status: z20.literal("no_change"),
|
|
2353
|
+
message: z20.string()
|
|
2354
|
+
});
|
|
2244
2355
|
var UpdatePreLaunchScriptResultSchema = z20.union([
|
|
2245
2356
|
UpdatePreLaunchScriptInProgressSchema,
|
|
2246
|
-
UpdatePreLaunchScriptPreconditionRequiredSchema
|
|
2357
|
+
UpdatePreLaunchScriptPreconditionRequiredSchema,
|
|
2358
|
+
UpdatePreLaunchScriptNoChangeSchema
|
|
2247
2359
|
]);
|
|
2248
2360
|
var { action: updatePreLaunchScript, safeAction: safeUpdatePreLaunchScript } = defineAction(UpdatePreLaunchScriptResultSchema, async (client, request) => {
|
|
2249
2361
|
const validatedRequest = UpdatePreLaunchScriptRequestSchema.parse(request);
|
|
@@ -2405,7 +2517,9 @@ var GetKmsInfoRequestSchema = z24.object({
|
|
|
2405
2517
|
});
|
|
2406
2518
|
var { action: getKmsInfo, safeAction: safeGetKmsInfo } = defineAction(KmsInfoSchema, async (client, request) => {
|
|
2407
2519
|
const validatedRequest = GetKmsInfoRequestSchema.parse(request);
|
|
2408
|
-
return await client.get(`/kms/${validatedRequest.kms_id}
|
|
2520
|
+
return await client.get(`/kms/${validatedRequest.kms_id}`, {
|
|
2521
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
2522
|
+
});
|
|
2409
2523
|
});
|
|
2410
2524
|
|
|
2411
2525
|
// src/actions/kms/get_kms_list.ts
|
|
@@ -2424,37 +2538,119 @@ var GetKmsListSchema = z25.object({
|
|
|
2424
2538
|
}).strict();
|
|
2425
2539
|
var { action: getKmsList, safeAction: safeGetKmsList } = defineAction(GetKmsListSchema, async (client, request) => {
|
|
2426
2540
|
const validatedRequest = GetKmsListRequestSchema.parse(request ?? {});
|
|
2427
|
-
return await client.get("/kms", {
|
|
2541
|
+
return await client.get("/kms", {
|
|
2542
|
+
params: validatedRequest,
|
|
2543
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
2544
|
+
});
|
|
2428
2545
|
});
|
|
2429
2546
|
|
|
2430
|
-
// src/actions/kms/
|
|
2547
|
+
// src/actions/kms/list_kms_contracts.ts
|
|
2548
|
+
import { z as z27 } from "zod";
|
|
2549
|
+
|
|
2550
|
+
// src/types/kms_contract.ts
|
|
2431
2551
|
import { z as z26 } from "zod";
|
|
2432
|
-
var
|
|
2433
|
-
|
|
2434
|
-
|
|
2552
|
+
var KmsContractInfoSchema = z26.object({
|
|
2553
|
+
id: z26.string(),
|
|
2554
|
+
slug: z26.string().nullable(),
|
|
2555
|
+
label: z26.string().nullable(),
|
|
2556
|
+
contract_address: z26.string(),
|
|
2557
|
+
chain_id: z26.number(),
|
|
2558
|
+
k256_pubkey: z26.string().nullable(),
|
|
2559
|
+
ca_pubkey: z26.string().nullable(),
|
|
2560
|
+
node_count: z26.number()
|
|
2561
|
+
}).passthrough();
|
|
2562
|
+
var KmsContractNodeSchema = z26.object({
|
|
2563
|
+
id: z26.string(),
|
|
2564
|
+
slug: z26.string().nullable(),
|
|
2565
|
+
url: z26.string(),
|
|
2566
|
+
version: z26.string(),
|
|
2567
|
+
kms_type: z26.string()
|
|
2568
|
+
}).passthrough();
|
|
2569
|
+
|
|
2570
|
+
// src/actions/kms/list_kms_contracts.ts
|
|
2571
|
+
var KMS_CONTRACT_API_VERSION = "2026-06-23";
|
|
2572
|
+
var ListKmsContractsRequestSchema = z27.object({
|
|
2573
|
+
page: z27.number().int().min(1).optional(),
|
|
2574
|
+
page_size: z27.number().int().min(1).optional(),
|
|
2575
|
+
is_onchain: z27.boolean().optional()
|
|
2576
|
+
}).strict();
|
|
2577
|
+
var ListKmsContractsSchema = z27.object({
|
|
2578
|
+
items: z27.array(KmsContractInfoSchema),
|
|
2579
|
+
total: z27.number(),
|
|
2580
|
+
page: z27.number(),
|
|
2581
|
+
page_size: z27.number(),
|
|
2582
|
+
pages: z27.number()
|
|
2583
|
+
}).strict();
|
|
2584
|
+
var { action: listKmsContracts, safeAction: safeListKmsContracts } = defineAction(ListKmsContractsSchema, async (client, request) => {
|
|
2585
|
+
const validatedRequest = ListKmsContractsRequestSchema.parse(request ?? {});
|
|
2586
|
+
return await client.get("/kms", {
|
|
2587
|
+
params: validatedRequest,
|
|
2588
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION }
|
|
2589
|
+
});
|
|
2590
|
+
});
|
|
2591
|
+
|
|
2592
|
+
// src/actions/kms/get_kms_contract.ts
|
|
2593
|
+
import { z as z28 } from "zod";
|
|
2594
|
+
var KMS_CONTRACT_API_VERSION2 = "2026-06-23";
|
|
2595
|
+
var GetKmsContractRequestSchema = z28.object({
|
|
2596
|
+
// Contract slug (documented). A kc_ hashed id also resolves.
|
|
2597
|
+
slug: z28.string().min(1, "KMS contract slug is required")
|
|
2598
|
+
}).strict();
|
|
2599
|
+
var { action: getKmsContract, safeAction: safeGetKmsContract } = defineAction(KmsContractInfoSchema, async (client, payload) => {
|
|
2600
|
+
const { slug } = GetKmsContractRequestSchema.parse(payload);
|
|
2601
|
+
return await client.get(`/kms/${slug}`, {
|
|
2602
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION2 }
|
|
2603
|
+
});
|
|
2604
|
+
});
|
|
2605
|
+
|
|
2606
|
+
// src/actions/kms/list_kms_contract_nodes.ts
|
|
2607
|
+
import { z as z29 } from "zod";
|
|
2608
|
+
var KMS_CONTRACT_API_VERSION3 = "2026-06-23";
|
|
2609
|
+
var ListKmsContractNodesRequestSchema = z29.object({
|
|
2610
|
+
// Contract slug (documented). A kc_ hashed id also resolves.
|
|
2611
|
+
slug: z29.string().min(1, "KMS contract slug is required")
|
|
2612
|
+
}).strict();
|
|
2613
|
+
var ListKmsContractNodesSchema = z29.object({
|
|
2614
|
+
items: z29.array(KmsContractNodeSchema),
|
|
2615
|
+
total: z29.number()
|
|
2616
|
+
}).strict();
|
|
2617
|
+
var { action: listKmsContractNodes, safeAction: safeListKmsContractNodes } = defineAction(ListKmsContractNodesSchema, async (client, payload) => {
|
|
2618
|
+
const { slug } = ListKmsContractNodesRequestSchema.parse(payload);
|
|
2619
|
+
return await client.get(`/kms/${slug}/nodes`, {
|
|
2620
|
+
headers: { "X-Phala-Version": KMS_CONTRACT_API_VERSION3 }
|
|
2621
|
+
});
|
|
2622
|
+
});
|
|
2623
|
+
|
|
2624
|
+
// src/actions/kms/get_app_env_encrypt_pubkey.ts
|
|
2625
|
+
import { z as z30 } from "zod";
|
|
2626
|
+
var GetAppEnvEncryptPubKeyRequestSchema = z30.object({
|
|
2627
|
+
kms: z30.string().min(1, "KMS ID or slug is required"),
|
|
2628
|
+
app_id: z30.string().refine(
|
|
2435
2629
|
(val) => val.length === 40 || val.startsWith("0x") && val.length === 42,
|
|
2436
2630
|
"App ID must be exactly 40 characters or 42 characters with 0x prefix"
|
|
2437
2631
|
)
|
|
2438
2632
|
}).strict();
|
|
2439
|
-
var GetAppEnvEncryptPubKeySchema =
|
|
2440
|
-
public_key:
|
|
2441
|
-
signature:
|
|
2633
|
+
var GetAppEnvEncryptPubKeySchema = z30.object({
|
|
2634
|
+
public_key: z30.string(),
|
|
2635
|
+
signature: z30.string()
|
|
2442
2636
|
}).strict();
|
|
2443
2637
|
var { action: getAppEnvEncryptPubKey, safeAction: safeGetAppEnvEncryptPubKey } = defineAction(GetAppEnvEncryptPubKeySchema, async (client, payload) => {
|
|
2444
2638
|
const validatedRequest = GetAppEnvEncryptPubKeyRequestSchema.parse(payload);
|
|
2445
|
-
return await client.get(`/kms/${validatedRequest.kms}/pubkey/${validatedRequest.app_id}
|
|
2639
|
+
return await client.get(`/kms/${validatedRequest.kms}/pubkey/${validatedRequest.app_id}`, {
|
|
2640
|
+
headers: { "X-Phala-Version": "2026-05-22" }
|
|
2641
|
+
});
|
|
2446
2642
|
});
|
|
2447
2643
|
|
|
2448
2644
|
// src/actions/kms/next_app_ids.ts
|
|
2449
|
-
import { z as
|
|
2450
|
-
var NextAppIdsRequestSchema =
|
|
2451
|
-
counts:
|
|
2645
|
+
import { z as z31 } from "zod";
|
|
2646
|
+
var NextAppIdsRequestSchema = z31.object({
|
|
2647
|
+
counts: z31.number().int().min(1).max(20).optional().default(1)
|
|
2452
2648
|
}).strict();
|
|
2453
|
-
var NextAppIdsSchema =
|
|
2454
|
-
app_ids:
|
|
2455
|
-
|
|
2456
|
-
app_id:
|
|
2457
|
-
nonce:
|
|
2649
|
+
var NextAppIdsSchema = z31.object({
|
|
2650
|
+
app_ids: z31.array(
|
|
2651
|
+
z31.object({
|
|
2652
|
+
app_id: z31.string(),
|
|
2653
|
+
nonce: z31.number().int().min(0)
|
|
2458
2654
|
})
|
|
2459
2655
|
)
|
|
2460
2656
|
}).strict();
|
|
@@ -2466,41 +2662,41 @@ var { action: nextAppIds, safeAction: safeNextAppIds } = defineAction(NextAppIds
|
|
|
2466
2662
|
});
|
|
2467
2663
|
|
|
2468
2664
|
// src/types/cvm_info.ts
|
|
2469
|
-
import { z as
|
|
2470
|
-
var VMBaseSchema =
|
|
2471
|
-
name:
|
|
2472
|
-
status:
|
|
2473
|
-
teepod_id:
|
|
2474
|
-
teepod:
|
|
2475
|
-
id:
|
|
2476
|
-
name:
|
|
2477
|
-
region_identifier:
|
|
2665
|
+
import { z as z32 } from "zod";
|
|
2666
|
+
var VMBaseSchema = z32.object({
|
|
2667
|
+
name: z32.string(),
|
|
2668
|
+
status: z32.string(),
|
|
2669
|
+
teepod_id: z32.number(),
|
|
2670
|
+
teepod: z32.object({
|
|
2671
|
+
id: z32.number(),
|
|
2672
|
+
name: z32.string(),
|
|
2673
|
+
region_identifier: z32.string().nullable().optional()
|
|
2478
2674
|
}).optional().nullable(),
|
|
2479
|
-
app_id:
|
|
2480
|
-
vm_uuid:
|
|
2481
|
-
instance_id:
|
|
2482
|
-
app_url:
|
|
2483
|
-
base_image:
|
|
2484
|
-
vcpu:
|
|
2485
|
-
memory:
|
|
2486
|
-
disk_size:
|
|
2487
|
-
manifest_version:
|
|
2488
|
-
version:
|
|
2489
|
-
runner:
|
|
2490
|
-
docker_compose_file:
|
|
2491
|
-
features:
|
|
2492
|
-
created_at:
|
|
2493
|
-
encrypted_env_pubkey:
|
|
2675
|
+
app_id: z32.string(),
|
|
2676
|
+
vm_uuid: z32.string().nullable(),
|
|
2677
|
+
instance_id: z32.string().nullable(),
|
|
2678
|
+
app_url: z32.string().optional().nullable(),
|
|
2679
|
+
base_image: z32.string().optional().nullable(),
|
|
2680
|
+
vcpu: z32.number(),
|
|
2681
|
+
memory: z32.number(),
|
|
2682
|
+
disk_size: z32.number(),
|
|
2683
|
+
manifest_version: z32.number().optional().nullable(),
|
|
2684
|
+
version: z32.string().optional().nullable(),
|
|
2685
|
+
runner: z32.string().optional().nullable(),
|
|
2686
|
+
docker_compose_file: z32.string().optional().nullable(),
|
|
2687
|
+
features: z32.array(z32.string()).optional().nullable(),
|
|
2688
|
+
created_at: z32.string(),
|
|
2689
|
+
encrypted_env_pubkey: z32.string().nullable()
|
|
2494
2690
|
});
|
|
2495
2691
|
var VMV20260121Schema = VMBaseSchema.extend({
|
|
2496
|
-
id:
|
|
2497
|
-
user_id:
|
|
2692
|
+
id: z32.number(),
|
|
2693
|
+
user_id: z32.number().optional().nullable()
|
|
2498
2694
|
});
|
|
2499
2695
|
var VMV20260522Schema = VMBaseSchema.extend({
|
|
2500
|
-
id:
|
|
2501
|
-
user_id:
|
|
2696
|
+
id: z32.string(),
|
|
2697
|
+
user_id: z32.string().optional().nullable()
|
|
2502
2698
|
});
|
|
2503
|
-
var VMAnySchema =
|
|
2699
|
+
var VMAnySchema = z32.union([VMV20260121Schema, VMV20260522Schema]);
|
|
2504
2700
|
var VMSchema = VMV20260522Schema;
|
|
2505
2701
|
function getVMSchemaForVersion(version) {
|
|
2506
2702
|
if (version === "2026-01-21") return VMV20260121Schema;
|
|
@@ -2583,10 +2779,10 @@ async function safeShutdownCvm(client, request) {
|
|
|
2583
2779
|
}
|
|
2584
2780
|
|
|
2585
2781
|
// src/actions/cvms/restart_cvm.ts
|
|
2586
|
-
import { z as
|
|
2782
|
+
import { z as z33 } from "zod";
|
|
2587
2783
|
var RestartCvmRequestSchema = refineCvmId(
|
|
2588
2784
|
CvmIdObjectSchema.extend({
|
|
2589
|
-
force:
|
|
2785
|
+
force: z33.boolean().optional()
|
|
2590
2786
|
})
|
|
2591
2787
|
);
|
|
2592
2788
|
async function restartCvm(client, request) {
|
|
@@ -2615,10 +2811,10 @@ async function safeRestartCvm(client, request) {
|
|
|
2615
2811
|
}
|
|
2616
2812
|
|
|
2617
2813
|
// src/actions/cvms/delete_cvm.ts
|
|
2618
|
-
import { z as
|
|
2814
|
+
import { z as z34 } from "zod";
|
|
2619
2815
|
var DeleteCvmRequestSchema = CvmIdSchema;
|
|
2620
2816
|
var { action: deleteCvm, safeAction: safeDeleteCvm } = defineAction(
|
|
2621
|
-
|
|
2817
|
+
z34.void(),
|
|
2622
2818
|
async (client, request) => {
|
|
2623
2819
|
const { cvmId } = DeleteCvmRequestSchema.parse(request);
|
|
2624
2820
|
await client.delete(`/cvms/${cvmId}`);
|
|
@@ -2627,41 +2823,41 @@ var { action: deleteCvm, safeAction: safeDeleteCvm } = defineAction(
|
|
|
2627
2823
|
);
|
|
2628
2824
|
|
|
2629
2825
|
// src/actions/cvms/get_cvm_stats.ts
|
|
2630
|
-
import { z as
|
|
2631
|
-
var DiskInfoSchema =
|
|
2632
|
-
name:
|
|
2633
|
-
mount_point:
|
|
2634
|
-
total_size:
|
|
2635
|
-
free_size:
|
|
2636
|
-
});
|
|
2637
|
-
var SystemInfoSchema =
|
|
2638
|
-
os_name:
|
|
2639
|
-
os_version:
|
|
2640
|
-
kernel_version:
|
|
2641
|
-
cpu_model:
|
|
2642
|
-
num_cpus:
|
|
2643
|
-
total_memory:
|
|
2644
|
-
available_memory:
|
|
2645
|
-
used_memory:
|
|
2646
|
-
free_memory:
|
|
2647
|
-
total_swap:
|
|
2648
|
-
used_swap:
|
|
2649
|
-
free_swap:
|
|
2650
|
-
uptime:
|
|
2651
|
-
loadavg_one:
|
|
2652
|
-
loadavg_five:
|
|
2653
|
-
loadavg_fifteen:
|
|
2654
|
-
disks:
|
|
2655
|
-
});
|
|
2656
|
-
var CvmSystemInfoSchema =
|
|
2657
|
-
is_online:
|
|
2658
|
-
is_public:
|
|
2659
|
-
error:
|
|
2826
|
+
import { z as z35 } from "zod";
|
|
2827
|
+
var DiskInfoSchema = z35.object({
|
|
2828
|
+
name: z35.string(),
|
|
2829
|
+
mount_point: z35.string(),
|
|
2830
|
+
total_size: z35.number(),
|
|
2831
|
+
free_size: z35.number()
|
|
2832
|
+
});
|
|
2833
|
+
var SystemInfoSchema = z35.object({
|
|
2834
|
+
os_name: z35.string(),
|
|
2835
|
+
os_version: z35.string(),
|
|
2836
|
+
kernel_version: z35.string(),
|
|
2837
|
+
cpu_model: z35.string(),
|
|
2838
|
+
num_cpus: z35.number(),
|
|
2839
|
+
total_memory: z35.number(),
|
|
2840
|
+
available_memory: z35.number(),
|
|
2841
|
+
used_memory: z35.number(),
|
|
2842
|
+
free_memory: z35.number(),
|
|
2843
|
+
total_swap: z35.number(),
|
|
2844
|
+
used_swap: z35.number(),
|
|
2845
|
+
free_swap: z35.number(),
|
|
2846
|
+
uptime: z35.number(),
|
|
2847
|
+
loadavg_one: z35.number(),
|
|
2848
|
+
loadavg_five: z35.number(),
|
|
2849
|
+
loadavg_fifteen: z35.number(),
|
|
2850
|
+
disks: z35.array(DiskInfoSchema)
|
|
2851
|
+
});
|
|
2852
|
+
var CvmSystemInfoSchema = z35.object({
|
|
2853
|
+
is_online: z35.boolean(),
|
|
2854
|
+
is_public: z35.boolean().default(false),
|
|
2855
|
+
error: z35.string().nullable(),
|
|
2660
2856
|
sysinfo: SystemInfoSchema.nullable(),
|
|
2661
|
-
status:
|
|
2662
|
-
in_progress:
|
|
2663
|
-
boot_progress:
|
|
2664
|
-
boot_error:
|
|
2857
|
+
status: z35.string().nullable(),
|
|
2858
|
+
in_progress: z35.boolean().default(false),
|
|
2859
|
+
boot_progress: z35.string().nullable(),
|
|
2860
|
+
boot_error: z35.string().nullable()
|
|
2665
2861
|
});
|
|
2666
2862
|
var GetCvmStatsRequestSchema = CvmIdSchema;
|
|
2667
2863
|
var { action: getCvmStats, safeAction: safeGetCvmStats } = defineAction(CvmSystemInfoSchema, async (client, request) => {
|
|
@@ -2670,18 +2866,18 @@ var { action: getCvmStats, safeAction: safeGetCvmStats } = defineAction(CvmSyste
|
|
|
2670
2866
|
});
|
|
2671
2867
|
|
|
2672
2868
|
// src/actions/cvms/get_cvm_network.ts
|
|
2673
|
-
import { z as
|
|
2674
|
-
var CvmNetworkUrlsSchema =
|
|
2675
|
-
app:
|
|
2676
|
-
instance:
|
|
2677
|
-
});
|
|
2678
|
-
var CvmNetworkSchema =
|
|
2679
|
-
is_online:
|
|
2680
|
-
is_public:
|
|
2681
|
-
error:
|
|
2682
|
-
internal_ip:
|
|
2683
|
-
latest_handshake:
|
|
2684
|
-
public_urls:
|
|
2869
|
+
import { z as z36 } from "zod";
|
|
2870
|
+
var CvmNetworkUrlsSchema = z36.object({
|
|
2871
|
+
app: z36.string(),
|
|
2872
|
+
instance: z36.string()
|
|
2873
|
+
});
|
|
2874
|
+
var CvmNetworkSchema = z36.object({
|
|
2875
|
+
is_online: z36.boolean(),
|
|
2876
|
+
is_public: z36.boolean().default(true),
|
|
2877
|
+
error: z36.string().nullable(),
|
|
2878
|
+
internal_ip: z36.string().nullable(),
|
|
2879
|
+
latest_handshake: z36.string().nullable(),
|
|
2880
|
+
public_urls: z36.array(CvmNetworkUrlsSchema).nullable()
|
|
2685
2881
|
});
|
|
2686
2882
|
var GetCvmNetworkRequestSchema = CvmIdSchema;
|
|
2687
2883
|
var { action: getCvmNetwork, safeAction: safeGetCvmNetwork } = defineAction(CvmNetworkSchema, async (client, request) => {
|
|
@@ -2690,36 +2886,36 @@ var { action: getCvmNetwork, safeAction: safeGetCvmNetwork } = defineAction(CvmN
|
|
|
2690
2886
|
});
|
|
2691
2887
|
|
|
2692
2888
|
// src/actions/cvms/get_cvm_docker_compose.ts
|
|
2693
|
-
import { z as
|
|
2889
|
+
import { z as z37 } from "zod";
|
|
2694
2890
|
var GetCvmDockerComposeRequestSchema = CvmIdSchema;
|
|
2695
|
-
var { action: getCvmDockerCompose, safeAction: safeGetCvmDockerCompose } = defineAction(
|
|
2891
|
+
var { action: getCvmDockerCompose, safeAction: safeGetCvmDockerCompose } = defineAction(z37.string(), async (client, request) => {
|
|
2696
2892
|
const { cvmId } = GetCvmDockerComposeRequestSchema.parse(request);
|
|
2697
2893
|
return await client.get(`/cvms/${cvmId}/docker-compose.yml`);
|
|
2698
2894
|
});
|
|
2699
2895
|
|
|
2700
2896
|
// src/actions/cvms/get_cvm_containers_stats.ts
|
|
2701
|
-
import { z as
|
|
2702
|
-
var ContainerInfoSchema =
|
|
2703
|
-
id:
|
|
2704
|
-
names:
|
|
2705
|
-
image:
|
|
2706
|
-
image_id:
|
|
2707
|
-
command:
|
|
2708
|
-
created:
|
|
2709
|
-
state:
|
|
2710
|
-
status:
|
|
2711
|
-
log_endpoint:
|
|
2712
|
-
});
|
|
2713
|
-
var CvmContainersStatsSchema =
|
|
2714
|
-
is_online:
|
|
2715
|
-
is_public:
|
|
2716
|
-
error:
|
|
2717
|
-
docker_compose_file:
|
|
2718
|
-
manifest_version:
|
|
2719
|
-
version:
|
|
2720
|
-
runner:
|
|
2721
|
-
features:
|
|
2722
|
-
containers:
|
|
2897
|
+
import { z as z38 } from "zod";
|
|
2898
|
+
var ContainerInfoSchema = z38.object({
|
|
2899
|
+
id: z38.string(),
|
|
2900
|
+
names: z38.array(z38.string()),
|
|
2901
|
+
image: z38.string(),
|
|
2902
|
+
image_id: z38.string(),
|
|
2903
|
+
command: z38.string().nullable().optional(),
|
|
2904
|
+
created: z38.number(),
|
|
2905
|
+
state: z38.string(),
|
|
2906
|
+
status: z38.string(),
|
|
2907
|
+
log_endpoint: z38.string().nullable()
|
|
2908
|
+
});
|
|
2909
|
+
var CvmContainersStatsSchema = z38.object({
|
|
2910
|
+
is_online: z38.boolean(),
|
|
2911
|
+
is_public: z38.boolean().default(true),
|
|
2912
|
+
error: z38.string().nullable(),
|
|
2913
|
+
docker_compose_file: z38.string().nullable(),
|
|
2914
|
+
manifest_version: z38.number().nullable(),
|
|
2915
|
+
version: z38.string().nullable(),
|
|
2916
|
+
runner: z38.string().nullable(),
|
|
2917
|
+
features: z38.array(z38.string()).nullable(),
|
|
2918
|
+
containers: z38.array(ContainerInfoSchema).nullable()
|
|
2723
2919
|
});
|
|
2724
2920
|
var GetCvmContainersStatsRequestSchema = CvmIdSchema;
|
|
2725
2921
|
var { action: getCvmContainersStats, safeAction: safeGetCvmContainersStats } = defineAction(CvmContainersStatsSchema, async (client, request) => {
|
|
@@ -2728,62 +2924,62 @@ var { action: getCvmContainersStats, safeAction: safeGetCvmContainersStats } = d
|
|
|
2728
2924
|
});
|
|
2729
2925
|
|
|
2730
2926
|
// src/actions/cvms/get_cvm_attestation.ts
|
|
2731
|
-
import { z as
|
|
2732
|
-
var CertificateSubjectSchema =
|
|
2733
|
-
common_name:
|
|
2734
|
-
organization:
|
|
2735
|
-
country:
|
|
2736
|
-
state:
|
|
2737
|
-
locality:
|
|
2738
|
-
});
|
|
2739
|
-
var CertificateIssuerSchema =
|
|
2740
|
-
common_name:
|
|
2741
|
-
organization:
|
|
2742
|
-
country:
|
|
2743
|
-
});
|
|
2744
|
-
var CertificateSchema =
|
|
2927
|
+
import { z as z39 } from "zod";
|
|
2928
|
+
var CertificateSubjectSchema = z39.object({
|
|
2929
|
+
common_name: z39.string().nullable(),
|
|
2930
|
+
organization: z39.string().nullable(),
|
|
2931
|
+
country: z39.string().nullable(),
|
|
2932
|
+
state: z39.string().nullable(),
|
|
2933
|
+
locality: z39.string().nullable()
|
|
2934
|
+
});
|
|
2935
|
+
var CertificateIssuerSchema = z39.object({
|
|
2936
|
+
common_name: z39.string().nullable(),
|
|
2937
|
+
organization: z39.string().nullable(),
|
|
2938
|
+
country: z39.string().nullable()
|
|
2939
|
+
});
|
|
2940
|
+
var CertificateSchema = z39.object({
|
|
2745
2941
|
subject: CertificateSubjectSchema,
|
|
2746
2942
|
issuer: CertificateIssuerSchema,
|
|
2747
|
-
serial_number:
|
|
2748
|
-
not_before:
|
|
2943
|
+
serial_number: z39.string(),
|
|
2944
|
+
not_before: z39.string(),
|
|
2749
2945
|
// datetime serialized as ISO string
|
|
2750
|
-
not_after:
|
|
2946
|
+
not_after: z39.string(),
|
|
2751
2947
|
// datetime serialized as ISO string
|
|
2752
|
-
version:
|
|
2753
|
-
fingerprint:
|
|
2754
|
-
signature_algorithm:
|
|
2755
|
-
sans:
|
|
2756
|
-
is_ca:
|
|
2757
|
-
position_in_chain:
|
|
2758
|
-
quote:
|
|
2759
|
-
app_id:
|
|
2760
|
-
cert_usage:
|
|
2761
|
-
});
|
|
2762
|
-
var EventLogSchema =
|
|
2763
|
-
imr:
|
|
2764
|
-
event_type:
|
|
2765
|
-
digest:
|
|
2766
|
-
event:
|
|
2767
|
-
event_payload:
|
|
2768
|
-
});
|
|
2769
|
-
var TcbInfoSchema =
|
|
2770
|
-
mrtd:
|
|
2771
|
-
rootfs_hash:
|
|
2772
|
-
rtmr0:
|
|
2773
|
-
rtmr1:
|
|
2774
|
-
rtmr2:
|
|
2775
|
-
rtmr3:
|
|
2776
|
-
event_log:
|
|
2777
|
-
app_compose:
|
|
2778
|
-
});
|
|
2779
|
-
var CvmAttestationSchema =
|
|
2780
|
-
name:
|
|
2781
|
-
is_online:
|
|
2782
|
-
is_public:
|
|
2783
|
-
error:
|
|
2784
|
-
app_certificates:
|
|
2948
|
+
version: z39.string(),
|
|
2949
|
+
fingerprint: z39.string(),
|
|
2950
|
+
signature_algorithm: z39.string(),
|
|
2951
|
+
sans: z39.array(z39.string()).nullable(),
|
|
2952
|
+
is_ca: z39.boolean(),
|
|
2953
|
+
position_in_chain: z39.number().nullable(),
|
|
2954
|
+
quote: z39.string().nullable(),
|
|
2955
|
+
app_id: z39.string().nullable().optional(),
|
|
2956
|
+
cert_usage: z39.string().nullable().optional()
|
|
2957
|
+
});
|
|
2958
|
+
var EventLogSchema = z39.object({
|
|
2959
|
+
imr: z39.number(),
|
|
2960
|
+
event_type: z39.number(),
|
|
2961
|
+
digest: z39.string(),
|
|
2962
|
+
event: z39.string(),
|
|
2963
|
+
event_payload: z39.string()
|
|
2964
|
+
});
|
|
2965
|
+
var TcbInfoSchema = z39.object({
|
|
2966
|
+
mrtd: z39.string(),
|
|
2967
|
+
rootfs_hash: z39.string().nullable().optional(),
|
|
2968
|
+
rtmr0: z39.string(),
|
|
2969
|
+
rtmr1: z39.string(),
|
|
2970
|
+
rtmr2: z39.string(),
|
|
2971
|
+
rtmr3: z39.string(),
|
|
2972
|
+
event_log: z39.array(EventLogSchema),
|
|
2973
|
+
app_compose: z39.string()
|
|
2974
|
+
});
|
|
2975
|
+
var CvmAttestationSchema = z39.object({
|
|
2976
|
+
name: z39.string().nullable(),
|
|
2977
|
+
is_online: z39.boolean(),
|
|
2978
|
+
is_public: z39.boolean().default(true),
|
|
2979
|
+
error: z39.string().nullable(),
|
|
2980
|
+
app_certificates: z39.array(CertificateSchema).nullable(),
|
|
2785
2981
|
tcb_info: TcbInfoSchema.nullable(),
|
|
2786
|
-
compose_file:
|
|
2982
|
+
compose_file: z39.string().nullable()
|
|
2787
2983
|
});
|
|
2788
2984
|
var GetCvmAttestationRequestSchema = CvmIdSchema;
|
|
2789
2985
|
var { action: getCvmAttestation, safeAction: safeGetCvmAttestation } = defineAction(CvmAttestationSchema, async (client, request) => {
|
|
@@ -2792,31 +2988,35 @@ var { action: getCvmAttestation, safeAction: safeGetCvmAttestation } = defineAct
|
|
|
2792
2988
|
});
|
|
2793
2989
|
|
|
2794
2990
|
// src/actions/cvms/update_cvm_resources.ts
|
|
2795
|
-
import { z as
|
|
2991
|
+
import { z as z40 } from "zod";
|
|
2796
2992
|
var UpdateCvmResourcesRequestSchema = refineCvmId(
|
|
2797
2993
|
CvmIdObjectSchema.extend({
|
|
2798
|
-
vcpu:
|
|
2799
|
-
memory:
|
|
2800
|
-
disk_size:
|
|
2801
|
-
instance_type:
|
|
2802
|
-
allow_restart:
|
|
2994
|
+
vcpu: z40.number().optional(),
|
|
2995
|
+
memory: z40.number().optional(),
|
|
2996
|
+
disk_size: z40.number().optional(),
|
|
2997
|
+
instance_type: z40.string().optional(),
|
|
2998
|
+
allow_restart: z40.boolean().optional()
|
|
2803
2999
|
})
|
|
2804
3000
|
);
|
|
2805
|
-
var
|
|
3001
|
+
var UpdateCvmResourcesResponseSchema = z40.object({
|
|
3002
|
+
message: z40.string(),
|
|
3003
|
+
correlation_id: z40.string(),
|
|
3004
|
+
status: z40.string()
|
|
3005
|
+
});
|
|
3006
|
+
var { action: updateCvmResources, safeAction: safeUpdateCvmResources } = defineAction(UpdateCvmResourcesResponseSchema, async (client, request) => {
|
|
2806
3007
|
const parsed = UpdateCvmResourcesRequestSchema.parse(request);
|
|
2807
3008
|
const { cvmId } = CvmIdSchema.parse(parsed);
|
|
2808
3009
|
const { ...body } = parsed;
|
|
2809
|
-
await client.patch(`/cvms/${cvmId}
|
|
2810
|
-
return void 0;
|
|
3010
|
+
return await client.patch(`/cvms/${cvmId}`, body);
|
|
2811
3011
|
});
|
|
2812
3012
|
|
|
2813
3013
|
// src/actions/cvms/update_cvm_visibility.ts
|
|
2814
|
-
import { z as
|
|
3014
|
+
import { z as z41 } from "zod";
|
|
2815
3015
|
var UpdateCvmVisibilityRequestSchema = refineCvmId(
|
|
2816
3016
|
CvmIdObjectSchema.extend({
|
|
2817
|
-
public_sysinfo:
|
|
2818
|
-
public_logs:
|
|
2819
|
-
public_tcbinfo:
|
|
3017
|
+
public_sysinfo: z41.boolean(),
|
|
3018
|
+
public_logs: z41.boolean(),
|
|
3019
|
+
public_tcbinfo: z41.boolean().optional()
|
|
2820
3020
|
})
|
|
2821
3021
|
);
|
|
2822
3022
|
var { action: updateCvmVisibility, safeAction: safeUpdateCvmVisibility } = defineAction(CvmDetailV20251028Schema, async (client, request) => {
|
|
@@ -2831,21 +3031,21 @@ var { action: updateCvmVisibility, safeAction: safeUpdateCvmVisibility } = defin
|
|
|
2831
3031
|
});
|
|
2832
3032
|
|
|
2833
3033
|
// src/actions/cvms/get_available_os_images.ts
|
|
2834
|
-
import { z as
|
|
2835
|
-
var OSImageVariantSchema =
|
|
2836
|
-
name:
|
|
2837
|
-
os_image_hash:
|
|
2838
|
-
is_current:
|
|
2839
|
-
});
|
|
2840
|
-
var AvailableOSImageSchema3 =
|
|
2841
|
-
version:
|
|
2842
|
-
|
|
2843
|
-
|
|
3034
|
+
import { z as z42 } from "zod";
|
|
3035
|
+
var OSImageVariantSchema = z42.object({
|
|
3036
|
+
name: z42.string(),
|
|
3037
|
+
os_image_hash: z42.string().nullable(),
|
|
3038
|
+
is_current: z42.boolean()
|
|
3039
|
+
});
|
|
3040
|
+
var AvailableOSImageSchema3 = z42.object({
|
|
3041
|
+
version: z42.union([
|
|
3042
|
+
z42.tuple([z42.number(), z42.number(), z42.number(), z42.number()]),
|
|
3043
|
+
z42.tuple([z42.number(), z42.number(), z42.number()])
|
|
2844
3044
|
]),
|
|
2845
3045
|
prod: OSImageVariantSchema.nullable(),
|
|
2846
3046
|
dev: OSImageVariantSchema.nullable()
|
|
2847
3047
|
});
|
|
2848
|
-
var GetAvailableOSImagesResponseSchema =
|
|
3048
|
+
var GetAvailableOSImagesResponseSchema = z42.array(AvailableOSImageSchema3);
|
|
2849
3049
|
var GetAvailableOSImagesRequestSchema = CvmIdSchema;
|
|
2850
3050
|
var { action: getAvailableOsImages, safeAction: safeGetAvailableOsImages } = defineAction(GetAvailableOSImagesResponseSchema, async (client, request) => {
|
|
2851
3051
|
const { cvmId } = GetAvailableOSImagesRequestSchema.parse(request);
|
|
@@ -2853,13 +3053,13 @@ var { action: getAvailableOsImages, safeAction: safeGetAvailableOsImages } = def
|
|
|
2853
3053
|
});
|
|
2854
3054
|
|
|
2855
3055
|
// src/actions/cvms/update_os_image.ts
|
|
2856
|
-
import { z as
|
|
3056
|
+
import { z as z43 } from "zod";
|
|
2857
3057
|
var UpdateOsImageRequestSchema = refineCvmId(
|
|
2858
3058
|
CvmIdObjectSchema.extend({
|
|
2859
|
-
os_image_name:
|
|
3059
|
+
os_image_name: z43.string().min(1, "OS image name is required")
|
|
2860
3060
|
})
|
|
2861
3061
|
);
|
|
2862
|
-
var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(
|
|
3062
|
+
var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(z43.void(), async (client, request) => {
|
|
2863
3063
|
const parsed = UpdateOsImageRequestSchema.parse(request);
|
|
2864
3064
|
const { cvmId } = CvmIdSchema.parse(parsed);
|
|
2865
3065
|
const { os_image_name } = parsed;
|
|
@@ -2868,17 +3068,17 @@ var { action: updateOsImage, safeAction: safeUpdateOsImage } = defineAction(z39.
|
|
|
2868
3068
|
});
|
|
2869
3069
|
|
|
2870
3070
|
// src/actions/cvms/get_cvm_state.ts
|
|
2871
|
-
import { z as
|
|
2872
|
-
var CvmStateSchema =
|
|
2873
|
-
id:
|
|
2874
|
-
instance_id:
|
|
2875
|
-
name:
|
|
2876
|
-
status:
|
|
2877
|
-
uptime:
|
|
2878
|
-
exited_at:
|
|
2879
|
-
boot_progress:
|
|
2880
|
-
boot_error:
|
|
2881
|
-
shutdown_progress:
|
|
3071
|
+
import { z as z44 } from "zod";
|
|
3072
|
+
var CvmStateSchema = z44.object({
|
|
3073
|
+
id: z44.string().optional(),
|
|
3074
|
+
instance_id: z44.string().optional(),
|
|
3075
|
+
name: z44.string(),
|
|
3076
|
+
status: z44.string(),
|
|
3077
|
+
uptime: z44.string().optional(),
|
|
3078
|
+
exited_at: z44.string().optional(),
|
|
3079
|
+
boot_progress: z44.string().optional(),
|
|
3080
|
+
boot_error: z44.string().optional(),
|
|
3081
|
+
shutdown_progress: z44.string().optional()
|
|
2882
3082
|
});
|
|
2883
3083
|
var GetCvmStateRequestSchema = CvmIdSchema;
|
|
2884
3084
|
var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmStateSchema, async (client, request) => {
|
|
@@ -2887,21 +3087,21 @@ var { action: getCvmState, safeAction: safeGetCvmState } = defineAction(CvmState
|
|
|
2887
3087
|
});
|
|
2888
3088
|
|
|
2889
3089
|
// src/actions/ssh_keys/list_ssh_keys.ts
|
|
2890
|
-
import { z as
|
|
2891
|
-
var SshKeySchema =
|
|
2892
|
-
id:
|
|
2893
|
-
user_id:
|
|
2894
|
-
name:
|
|
2895
|
-
public_key:
|
|
2896
|
-
fingerprint:
|
|
2897
|
-
key_type:
|
|
2898
|
-
source:
|
|
2899
|
-
key_metadata:
|
|
2900
|
-
last_synced_at:
|
|
2901
|
-
created_at:
|
|
2902
|
-
updated_at:
|
|
2903
|
-
});
|
|
2904
|
-
var ListSshKeysResponseSchema =
|
|
3090
|
+
import { z as z45 } from "zod";
|
|
3091
|
+
var SshKeySchema = z45.object({
|
|
3092
|
+
id: z45.string(),
|
|
3093
|
+
user_id: z45.string(),
|
|
3094
|
+
name: z45.string(),
|
|
3095
|
+
public_key: z45.string(),
|
|
3096
|
+
fingerprint: z45.string(),
|
|
3097
|
+
key_type: z45.string(),
|
|
3098
|
+
source: z45.string(),
|
|
3099
|
+
key_metadata: z45.record(z45.unknown()).nullable().optional(),
|
|
3100
|
+
last_synced_at: z45.string().nullable().optional(),
|
|
3101
|
+
created_at: z45.string(),
|
|
3102
|
+
updated_at: z45.string()
|
|
3103
|
+
});
|
|
3104
|
+
var ListSshKeysResponseSchema = z45.array(SshKeySchema);
|
|
2905
3105
|
async function listSshKeys(client) {
|
|
2906
3106
|
const response = await client.get("/user/ssh-keys");
|
|
2907
3107
|
return ListSshKeysResponseSchema.parse(response);
|
|
@@ -2925,15 +3125,15 @@ async function safeListSshKeys(client) {
|
|
|
2925
3125
|
}
|
|
2926
3126
|
|
|
2927
3127
|
// src/actions/ssh_keys/import_github_profile.ts
|
|
2928
|
-
import { z as
|
|
2929
|
-
var ImportGithubProfileRequestSchema =
|
|
2930
|
-
github_username:
|
|
3128
|
+
import { z as z46 } from "zod";
|
|
3129
|
+
var ImportGithubProfileRequestSchema = z46.object({
|
|
3130
|
+
github_username: z46.string().min(1)
|
|
2931
3131
|
});
|
|
2932
|
-
var ImportGithubProfileResponseSchema =
|
|
2933
|
-
github_username:
|
|
2934
|
-
keys_added:
|
|
2935
|
-
keys_skipped:
|
|
2936
|
-
errors:
|
|
3132
|
+
var ImportGithubProfileResponseSchema = z46.object({
|
|
3133
|
+
github_username: z46.string(),
|
|
3134
|
+
keys_added: z46.number().int(),
|
|
3135
|
+
keys_skipped: z46.number().int(),
|
|
3136
|
+
errors: z46.array(z46.string()).default([])
|
|
2937
3137
|
});
|
|
2938
3138
|
var { action: importGithubProfileSshKeys, safeAction: safeImportGithubProfileSshKeys } = defineAction(
|
|
2939
3139
|
ImportGithubProfileResponseSchema,
|
|
@@ -2944,10 +3144,10 @@ var { action: importGithubProfileSshKeys, safeAction: safeImportGithubProfileSsh
|
|
|
2944
3144
|
);
|
|
2945
3145
|
|
|
2946
3146
|
// src/actions/ssh_keys/create_ssh_key.ts
|
|
2947
|
-
import { z as
|
|
2948
|
-
var CreateSshKeyRequestSchema =
|
|
2949
|
-
name:
|
|
2950
|
-
public_key:
|
|
3147
|
+
import { z as z47 } from "zod";
|
|
3148
|
+
var CreateSshKeyRequestSchema = z47.object({
|
|
3149
|
+
name: z47.string().min(1),
|
|
3150
|
+
public_key: z47.string().min(1)
|
|
2951
3151
|
});
|
|
2952
3152
|
var { action: createSshKey, safeAction: safeCreateSshKey } = defineAction(SshKeySchema, async (client, request) => {
|
|
2953
3153
|
const { name, public_key } = CreateSshKeyRequestSchema.parse(request);
|
|
@@ -2955,24 +3155,24 @@ var { action: createSshKey, safeAction: safeCreateSshKey } = defineAction(SshKey
|
|
|
2955
3155
|
});
|
|
2956
3156
|
|
|
2957
3157
|
// src/actions/ssh_keys/delete_ssh_key.ts
|
|
2958
|
-
import { z as
|
|
2959
|
-
var DeleteSshKeyRequestSchema =
|
|
2960
|
-
keyId:
|
|
3158
|
+
import { z as z48 } from "zod";
|
|
3159
|
+
var DeleteSshKeyRequestSchema = z48.object({
|
|
3160
|
+
keyId: z48.string().min(1)
|
|
2961
3161
|
});
|
|
2962
|
-
var { action: deleteSshKey, safeAction: safeDeleteSshKey } = defineAction(
|
|
3162
|
+
var { action: deleteSshKey, safeAction: safeDeleteSshKey } = defineAction(z48.void(), async (client, request) => {
|
|
2963
3163
|
const { keyId } = DeleteSshKeyRequestSchema.parse(request);
|
|
2964
3164
|
await client.delete(`/user/ssh-keys/${keyId}`);
|
|
2965
3165
|
return void 0;
|
|
2966
3166
|
});
|
|
2967
3167
|
|
|
2968
3168
|
// src/actions/ssh_keys/sync_github_ssh_keys.ts
|
|
2969
|
-
import { z as
|
|
2970
|
-
var SyncGithubSshKeysResponseSchema =
|
|
2971
|
-
synced_count:
|
|
2972
|
-
keys_added:
|
|
2973
|
-
keys_updated:
|
|
2974
|
-
keys_removed:
|
|
2975
|
-
errors:
|
|
3169
|
+
import { z as z49 } from "zod";
|
|
3170
|
+
var SyncGithubSshKeysResponseSchema = z49.object({
|
|
3171
|
+
synced_count: z49.number().int(),
|
|
3172
|
+
keys_added: z49.number().int(),
|
|
3173
|
+
keys_updated: z49.number().int(),
|
|
3174
|
+
keys_removed: z49.number().int(),
|
|
3175
|
+
errors: z49.array(z49.string()).default([])
|
|
2976
3176
|
});
|
|
2977
3177
|
var { action: syncGithubSshKeys, safeAction: safeSyncGithubSshKeys } = defineSimpleAction(
|
|
2978
3178
|
SyncGithubSshKeysResponseSchema,
|
|
@@ -2982,26 +3182,26 @@ var { action: syncGithubSshKeys, safeAction: safeSyncGithubSshKeys } = defineSim
|
|
|
2982
3182
|
);
|
|
2983
3183
|
|
|
2984
3184
|
// src/actions/os_images/get_os_images.ts
|
|
2985
|
-
import { z as
|
|
2986
|
-
var OSImagePublicSchema =
|
|
2987
|
-
name:
|
|
2988
|
-
slug:
|
|
2989
|
-
version:
|
|
2990
|
-
os_image_hash:
|
|
2991
|
-
is_dev:
|
|
2992
|
-
requires_gpu:
|
|
3185
|
+
import { z as z50 } from "zod";
|
|
3186
|
+
var OSImagePublicSchema = z50.object({
|
|
3187
|
+
name: z50.string(),
|
|
3188
|
+
slug: z50.string(),
|
|
3189
|
+
version: z50.string(),
|
|
3190
|
+
os_image_hash: z50.string().nullable(),
|
|
3191
|
+
is_dev: z50.boolean(),
|
|
3192
|
+
requires_gpu: z50.boolean()
|
|
2993
3193
|
}).passthrough();
|
|
2994
|
-
var GetOsImagesRequestSchema =
|
|
2995
|
-
page:
|
|
2996
|
-
page_size:
|
|
2997
|
-
is_dev:
|
|
3194
|
+
var GetOsImagesRequestSchema = z50.object({
|
|
3195
|
+
page: z50.number().int().min(1).optional(),
|
|
3196
|
+
page_size: z50.number().int().min(1).optional(),
|
|
3197
|
+
is_dev: z50.boolean().optional()
|
|
2998
3198
|
}).strict();
|
|
2999
|
-
var GetOsImagesResponseSchema =
|
|
3000
|
-
items:
|
|
3001
|
-
total:
|
|
3002
|
-
page:
|
|
3003
|
-
page_size:
|
|
3004
|
-
pages:
|
|
3199
|
+
var GetOsImagesResponseSchema = z50.object({
|
|
3200
|
+
items: z50.array(OSImagePublicSchema),
|
|
3201
|
+
total: z50.number(),
|
|
3202
|
+
page: z50.number(),
|
|
3203
|
+
page_size: z50.number(),
|
|
3204
|
+
pages: z50.number()
|
|
3005
3205
|
}).passthrough();
|
|
3006
3206
|
var { action: getOsImages, safeAction: safeGetOsImages } = defineAction(GetOsImagesResponseSchema, async (client, request) => {
|
|
3007
3207
|
const validatedRequest = GetOsImagesRequestSchema.parse(request ?? {});
|
|
@@ -3009,32 +3209,35 @@ var { action: getOsImages, safeAction: safeGetOsImages } = defineAction(GetOsIma
|
|
|
3009
3209
|
});
|
|
3010
3210
|
|
|
3011
3211
|
// src/actions/kms/get_kms_onchain_detail.ts
|
|
3012
|
-
import { z as
|
|
3013
|
-
var OnChainDeviceSchema =
|
|
3014
|
-
device_id:
|
|
3015
|
-
node_name:
|
|
3016
|
-
on_chain_allowed:
|
|
3212
|
+
import { z as z51 } from "zod";
|
|
3213
|
+
var OnChainDeviceSchema = z51.object({
|
|
3214
|
+
device_id: z51.string(),
|
|
3215
|
+
node_name: z51.string().nullable().optional(),
|
|
3216
|
+
on_chain_allowed: z51.boolean().nullable()
|
|
3017
3217
|
}).passthrough();
|
|
3018
|
-
var OnChainOsImageSchema =
|
|
3019
|
-
name:
|
|
3020
|
-
version:
|
|
3021
|
-
os_image_hash:
|
|
3022
|
-
on_chain_allowed:
|
|
3218
|
+
var OnChainOsImageSchema = z51.object({
|
|
3219
|
+
name: z51.string(),
|
|
3220
|
+
version: z51.string(),
|
|
3221
|
+
os_image_hash: z51.string().nullable(),
|
|
3222
|
+
on_chain_allowed: z51.boolean().nullable()
|
|
3023
3223
|
}).passthrough();
|
|
3024
|
-
var OnChainKmsContractSchema =
|
|
3025
|
-
contract_address:
|
|
3026
|
-
chain_id:
|
|
3027
|
-
chain_name:
|
|
3028
|
-
|
|
3029
|
-
|
|
3224
|
+
var OnChainKmsContractSchema = z51.object({
|
|
3225
|
+
contract_address: z51.string(),
|
|
3226
|
+
chain_id: z51.number(),
|
|
3227
|
+
chain_name: z51.string(),
|
|
3228
|
+
k256_pubkey: z51.string().nullable().optional(),
|
|
3229
|
+
ca_pubkey: z51.string().nullable().optional(),
|
|
3230
|
+
gateway_contract_address: z51.string().nullable().optional(),
|
|
3231
|
+
devices: z51.array(OnChainDeviceSchema),
|
|
3232
|
+
os_images: z51.array(OnChainOsImageSchema)
|
|
3030
3233
|
}).passthrough();
|
|
3031
|
-
var GetKmsOnChainDetailResponseSchema =
|
|
3032
|
-
chain_name:
|
|
3033
|
-
chain_id:
|
|
3034
|
-
contracts:
|
|
3234
|
+
var GetKmsOnChainDetailResponseSchema = z51.object({
|
|
3235
|
+
chain_name: z51.string(),
|
|
3236
|
+
chain_id: z51.number(),
|
|
3237
|
+
contracts: z51.array(OnChainKmsContractSchema)
|
|
3035
3238
|
}).passthrough();
|
|
3036
|
-
var GetKmsOnChainDetailRequestSchema =
|
|
3037
|
-
chain:
|
|
3239
|
+
var GetKmsOnChainDetailRequestSchema = z51.object({
|
|
3240
|
+
chain: z51.string()
|
|
3038
3241
|
}).strict();
|
|
3039
3242
|
var { action: getKmsOnChainDetail, safeAction: safeGetKmsOnChainDetail } = defineAction(GetKmsOnChainDetailResponseSchema, async (client, request) => {
|
|
3040
3243
|
const { chain } = GetKmsOnChainDetailRequestSchema.parse(request);
|
|
@@ -3117,6 +3320,12 @@ function createClient2(config = {}) {
|
|
|
3117
3320
|
safeGetKmsInfo,
|
|
3118
3321
|
getKmsList,
|
|
3119
3322
|
safeGetKmsList,
|
|
3323
|
+
listKmsContracts,
|
|
3324
|
+
safeListKmsContracts,
|
|
3325
|
+
getKmsContract,
|
|
3326
|
+
safeGetKmsContract,
|
|
3327
|
+
listKmsContractNodes,
|
|
3328
|
+
safeListKmsContractNodes,
|
|
3120
3329
|
getAppEnvEncryptPubKey,
|
|
3121
3330
|
safeGetAppEnvEncryptPubKey,
|
|
3122
3331
|
nextAppIds,
|
|
@@ -3142,139 +3351,141 @@ function createClient2(config = {}) {
|
|
|
3142
3351
|
}
|
|
3143
3352
|
|
|
3144
3353
|
// src/types/app_info_v20251028.ts
|
|
3145
|
-
import { z as
|
|
3146
|
-
var CvmBasicInfoV20251028Schema =
|
|
3147
|
-
vm_uuid:
|
|
3148
|
-
app_id:
|
|
3149
|
-
name:
|
|
3150
|
-
status:
|
|
3151
|
-
vcpu:
|
|
3152
|
-
memory:
|
|
3153
|
-
disk_size:
|
|
3154
|
-
teepod_id:
|
|
3155
|
-
teepod_name:
|
|
3156
|
-
region_identifier:
|
|
3157
|
-
kms_type:
|
|
3158
|
-
instance_type:
|
|
3159
|
-
listed:
|
|
3160
|
-
base_image:
|
|
3161
|
-
kms_slug:
|
|
3162
|
-
|
|
3163
|
-
|
|
3354
|
+
import { z as z52 } from "zod";
|
|
3355
|
+
var CvmBasicInfoV20251028Schema = z52.object({
|
|
3356
|
+
vm_uuid: z52.string().nullable(),
|
|
3357
|
+
app_id: z52.string(),
|
|
3358
|
+
name: z52.string().default(""),
|
|
3359
|
+
status: z52.string(),
|
|
3360
|
+
vcpu: z52.number().int(),
|
|
3361
|
+
memory: z52.number().int(),
|
|
3362
|
+
disk_size: z52.number().int(),
|
|
3363
|
+
teepod_id: z52.number().int(),
|
|
3364
|
+
teepod_name: z52.string(),
|
|
3365
|
+
region_identifier: z52.string().nullable().optional(),
|
|
3366
|
+
kms_type: z52.string().nullable().optional(),
|
|
3367
|
+
instance_type: z52.string().nullable().optional(),
|
|
3368
|
+
listed: z52.boolean().nullable().optional(),
|
|
3369
|
+
base_image: z52.string().nullable().optional(),
|
|
3370
|
+
kms_slug: z52.string().nullable().optional(),
|
|
3371
|
+
/** @deprecated Identifies a KMS node, not the on-chain KMS contract. Use kms_contract_id. */
|
|
3372
|
+
kms_id: z52.string().nullable().optional(),
|
|
3373
|
+
kms_contract_id: z52.string().nullable().optional(),
|
|
3374
|
+
instance_id: z52.string().nullable().optional(),
|
|
3164
3375
|
machine_info: MachineInfoV20251028Schema.nullable().optional(),
|
|
3165
|
-
updated_at:
|
|
3166
|
-
});
|
|
3167
|
-
var AppProfileSchema =
|
|
3168
|
-
display_name:
|
|
3169
|
-
avatar_url:
|
|
3170
|
-
description:
|
|
3171
|
-
custom_domain:
|
|
3172
|
-
});
|
|
3173
|
-
var DstackAppFullResponseV20251028Schema =
|
|
3174
|
-
id:
|
|
3175
|
-
name:
|
|
3176
|
-
app_id:
|
|
3177
|
-
app_provision_type:
|
|
3178
|
-
app_icon_url:
|
|
3179
|
-
created_at:
|
|
3180
|
-
kms_type:
|
|
3376
|
+
updated_at: z52.string().nullable().optional()
|
|
3377
|
+
});
|
|
3378
|
+
var AppProfileSchema = z52.object({
|
|
3379
|
+
display_name: z52.string().nullable().optional(),
|
|
3380
|
+
avatar_url: z52.string().nullable().optional(),
|
|
3381
|
+
description: z52.string().nullable().optional(),
|
|
3382
|
+
custom_domain: z52.string().nullable().optional()
|
|
3383
|
+
});
|
|
3384
|
+
var DstackAppFullResponseV20251028Schema = z52.object({
|
|
3385
|
+
id: z52.string(),
|
|
3386
|
+
name: z52.string(),
|
|
3387
|
+
app_id: z52.string(),
|
|
3388
|
+
app_provision_type: z52.string().nullable().optional(),
|
|
3389
|
+
app_icon_url: z52.string().nullable().optional(),
|
|
3390
|
+
created_at: z52.string(),
|
|
3391
|
+
kms_type: z52.string(),
|
|
3181
3392
|
profile: AppProfileSchema.nullable().optional(),
|
|
3182
3393
|
current_cvm: CvmBasicInfoV20251028Schema.nullable().optional(),
|
|
3183
|
-
cvms:
|
|
3184
|
-
cvm_count:
|
|
3394
|
+
cvms: z52.array(CvmBasicInfoV20251028Schema).default([]),
|
|
3395
|
+
cvm_count: z52.number().int().default(0)
|
|
3185
3396
|
});
|
|
3186
3397
|
var DstackAppWithCvmResponseV20251028Schema = DstackAppFullResponseV20251028Schema;
|
|
3187
|
-
var DstackAppListResponseV20251028Schema =
|
|
3188
|
-
dstack_apps:
|
|
3189
|
-
page:
|
|
3190
|
-
page_size:
|
|
3191
|
-
total:
|
|
3192
|
-
total_pages:
|
|
3398
|
+
var DstackAppListResponseV20251028Schema = z52.object({
|
|
3399
|
+
dstack_apps: z52.array(DstackAppWithCvmResponseV20251028Schema),
|
|
3400
|
+
page: z52.number().int(),
|
|
3401
|
+
page_size: z52.number().int(),
|
|
3402
|
+
total: z52.number().int(),
|
|
3403
|
+
total_pages: z52.number().int()
|
|
3193
3404
|
});
|
|
3194
3405
|
|
|
3195
3406
|
// src/types/app_info_v20260121.ts
|
|
3196
|
-
import { z as
|
|
3197
|
-
var DstackAppFullResponseV20260121Schema =
|
|
3198
|
-
id:
|
|
3199
|
-
name:
|
|
3200
|
-
app_id:
|
|
3201
|
-
app_provision_type:
|
|
3202
|
-
app_icon_url:
|
|
3203
|
-
created_at:
|
|
3204
|
-
kms_type:
|
|
3205
|
-
profile:
|
|
3206
|
-
display_name:
|
|
3207
|
-
avatar_url:
|
|
3208
|
-
description:
|
|
3209
|
-
custom_domain:
|
|
3407
|
+
import { z as z53 } from "zod";
|
|
3408
|
+
var DstackAppFullResponseV20260121Schema = z53.object({
|
|
3409
|
+
id: z53.string(),
|
|
3410
|
+
name: z53.string(),
|
|
3411
|
+
app_id: z53.string(),
|
|
3412
|
+
app_provision_type: z53.string().nullable().optional(),
|
|
3413
|
+
app_icon_url: z53.string().nullable().optional(),
|
|
3414
|
+
created_at: z53.string(),
|
|
3415
|
+
kms_type: z53.string(),
|
|
3416
|
+
profile: z53.object({
|
|
3417
|
+
display_name: z53.string().nullable().optional(),
|
|
3418
|
+
avatar_url: z53.string().nullable().optional(),
|
|
3419
|
+
description: z53.string().nullable().optional(),
|
|
3420
|
+
custom_domain: z53.string().nullable().optional()
|
|
3210
3421
|
}).nullable().optional(),
|
|
3211
3422
|
current_cvm: CvmInfoV20260121Schema.nullable().optional(),
|
|
3212
|
-
cvms:
|
|
3213
|
-
cvm_count:
|
|
3423
|
+
cvms: z53.array(CvmInfoV20260121Schema).default([]),
|
|
3424
|
+
cvm_count: z53.number().int().default(0)
|
|
3214
3425
|
});
|
|
3215
3426
|
var DstackAppFullResponseV20260522Schema = DstackAppFullResponseV20260121Schema.extend({
|
|
3216
3427
|
current_cvm: CvmInfoV20260522Schema.nullable().optional(),
|
|
3217
|
-
cvms:
|
|
3428
|
+
cvms: z53.array(CvmInfoV20260522Schema).default([])
|
|
3218
3429
|
});
|
|
3219
3430
|
var DstackAppWithCvmResponseV20260121Schema = DstackAppFullResponseV20260121Schema;
|
|
3220
3431
|
var DstackAppWithCvmResponseV20260522Schema = DstackAppFullResponseV20260522Schema;
|
|
3221
|
-
var DstackAppListResponseV20260121Schema =
|
|
3222
|
-
dstack_apps:
|
|
3223
|
-
page:
|
|
3224
|
-
page_size:
|
|
3225
|
-
total:
|
|
3226
|
-
total_pages:
|
|
3432
|
+
var DstackAppListResponseV20260121Schema = z53.object({
|
|
3433
|
+
dstack_apps: z53.array(DstackAppWithCvmResponseV20260121Schema),
|
|
3434
|
+
page: z53.number().int(),
|
|
3435
|
+
page_size: z53.number().int(),
|
|
3436
|
+
total: z53.number().int(),
|
|
3437
|
+
total_pages: z53.number().int()
|
|
3227
3438
|
});
|
|
3228
3439
|
var DstackAppListResponseV20260522Schema = DstackAppListResponseV20260121Schema.extend({
|
|
3229
|
-
dstack_apps:
|
|
3440
|
+
dstack_apps: z53.array(DstackAppWithCvmResponseV20260522Schema)
|
|
3230
3441
|
});
|
|
3231
3442
|
|
|
3232
3443
|
// src/types/app_revision.ts
|
|
3233
|
-
import { z as
|
|
3234
|
-
var CvmRefSchema =
|
|
3235
|
-
object_type:
|
|
3236
|
-
id:
|
|
3237
|
-
name:
|
|
3238
|
-
app_id:
|
|
3239
|
-
vm_uuid:
|
|
3240
|
-
});
|
|
3241
|
-
var AppRevisionResponseSchema =
|
|
3242
|
-
revision_id:
|
|
3243
|
-
app_id:
|
|
3244
|
-
vm_uuid:
|
|
3245
|
-
compose_hash:
|
|
3246
|
-
created_at:
|
|
3247
|
-
trace_id:
|
|
3248
|
-
operation_type:
|
|
3444
|
+
import { z as z54 } from "zod";
|
|
3445
|
+
var CvmRefSchema = z54.object({
|
|
3446
|
+
object_type: z54.literal("cvm"),
|
|
3447
|
+
id: z54.string().nullable().optional(),
|
|
3448
|
+
name: z54.string().nullable().optional(),
|
|
3449
|
+
app_id: z54.string().nullable().optional(),
|
|
3450
|
+
vm_uuid: z54.string().nullable().optional()
|
|
3451
|
+
});
|
|
3452
|
+
var AppRevisionResponseSchema = z54.object({
|
|
3453
|
+
revision_id: z54.string(),
|
|
3454
|
+
app_id: z54.string(),
|
|
3455
|
+
vm_uuid: z54.string(),
|
|
3456
|
+
compose_hash: z54.string(),
|
|
3457
|
+
created_at: z54.string(),
|
|
3458
|
+
trace_id: z54.string().nullable().optional(),
|
|
3459
|
+
operation_type: z54.string(),
|
|
3249
3460
|
triggered_by: UserRefSchema.nullable().optional(),
|
|
3250
3461
|
cvm: CvmRefSchema.nullable().optional(),
|
|
3251
3462
|
workspace: WorkspaceRefSchema.nullable().optional()
|
|
3252
3463
|
});
|
|
3253
|
-
var AppRevisionDetailResponseSchema =
|
|
3254
|
-
revision_id:
|
|
3255
|
-
app_id:
|
|
3256
|
-
vm_uuid:
|
|
3257
|
-
compose_hash:
|
|
3258
|
-
compose_file:
|
|
3259
|
-
encrypted_env:
|
|
3260
|
-
user_config:
|
|
3261
|
-
created_at:
|
|
3262
|
-
trace_id:
|
|
3263
|
-
operation_type:
|
|
3464
|
+
var AppRevisionDetailResponseSchema = z54.object({
|
|
3465
|
+
revision_id: z54.string(),
|
|
3466
|
+
app_id: z54.string(),
|
|
3467
|
+
vm_uuid: z54.string(),
|
|
3468
|
+
compose_hash: z54.string(),
|
|
3469
|
+
compose_file: z54.union([z54.record(z54.any()), z54.string()]).nullable().optional(),
|
|
3470
|
+
encrypted_env: z54.string(),
|
|
3471
|
+
user_config: z54.string(),
|
|
3472
|
+
created_at: z54.string(),
|
|
3473
|
+
trace_id: z54.string().nullable().optional(),
|
|
3474
|
+
operation_type: z54.string(),
|
|
3264
3475
|
triggered_by: UserRefSchema.nullable().optional(),
|
|
3265
3476
|
cvm: CvmRefSchema.nullable().optional(),
|
|
3266
3477
|
workspace: WorkspaceRefSchema.nullable().optional()
|
|
3267
3478
|
});
|
|
3268
|
-
var AppRevisionsResponseSchema =
|
|
3269
|
-
revisions:
|
|
3270
|
-
total:
|
|
3271
|
-
page:
|
|
3272
|
-
page_size:
|
|
3273
|
-
total_pages:
|
|
3479
|
+
var AppRevisionsResponseSchema = z54.object({
|
|
3480
|
+
revisions: z54.array(AppRevisionResponseSchema),
|
|
3481
|
+
total: z54.number().int(),
|
|
3482
|
+
page: z54.number().int(),
|
|
3483
|
+
page_size: z54.number().int(),
|
|
3484
|
+
total_pages: z54.number().int()
|
|
3274
3485
|
});
|
|
3275
3486
|
|
|
3276
3487
|
// src/actions/blockchains/deploy_app_auth.ts
|
|
3277
|
-
import { z as
|
|
3488
|
+
import { z as z55 } from "zod";
|
|
3278
3489
|
import {
|
|
3279
3490
|
createPublicClient as createPublicClient2,
|
|
3280
3491
|
createWalletClient as createWalletClient2,
|
|
@@ -3287,6 +3498,49 @@ import { privateKeyToAccount as privateKeyToAccount2 } from "viem/accounts";
|
|
|
3287
3498
|
// src/utils/index.ts
|
|
3288
3499
|
import { encryptEnvVars } from "@phala/dstack-sdk/encrypt-env-vars";
|
|
3289
3500
|
|
|
3501
|
+
// src/utils/get_mr_config_id.ts
|
|
3502
|
+
import { keccak256, toBytes, toHex } from "viem";
|
|
3503
|
+
var MR_CONFIG_ID_LENGTH = 48;
|
|
3504
|
+
var KEY_PROVIDER_BYTE = {
|
|
3505
|
+
none: 0,
|
|
3506
|
+
local: 1,
|
|
3507
|
+
kms: 2,
|
|
3508
|
+
tpm: 3
|
|
3509
|
+
};
|
|
3510
|
+
function getMrConfigIdV1(composeHash) {
|
|
3511
|
+
const result = new Uint8Array(MR_CONFIG_ID_LENGTH);
|
|
3512
|
+
result[0] = 1;
|
|
3513
|
+
result.set(toBytes(composeHash), 1);
|
|
3514
|
+
return toHex(result);
|
|
3515
|
+
}
|
|
3516
|
+
function getMrConfigId(input) {
|
|
3517
|
+
const composeHashBytes = toBytes(input.compose_hash);
|
|
3518
|
+
const appIdBytes = toBytes(input.app_id);
|
|
3519
|
+
const kpByte = KEY_PROVIDER_BYTE[input.key_provider_type];
|
|
3520
|
+
const kpIdBytes = input.key_provider_id === "0x" ? new Uint8Array(0) : toBytes(input.key_provider_id);
|
|
3521
|
+
const payload = new Uint8Array(
|
|
3522
|
+
composeHashBytes.length + appIdBytes.length + 1 + kpIdBytes.length
|
|
3523
|
+
);
|
|
3524
|
+
let offset = 0;
|
|
3525
|
+
payload.set(composeHashBytes, offset);
|
|
3526
|
+
offset += composeHashBytes.length;
|
|
3527
|
+
payload.set(appIdBytes, offset);
|
|
3528
|
+
offset += appIdBytes.length;
|
|
3529
|
+
payload[offset] = kpByte;
|
|
3530
|
+
offset += 1;
|
|
3531
|
+
payload.set(kpIdBytes, offset);
|
|
3532
|
+
const hash = keccak256(payload);
|
|
3533
|
+
const hashBytes = toBytes(hash);
|
|
3534
|
+
const result = new Uint8Array(MR_CONFIG_ID_LENGTH);
|
|
3535
|
+
result[0] = 2;
|
|
3536
|
+
result.set(hashBytes, 1);
|
|
3537
|
+
return toHex(result);
|
|
3538
|
+
}
|
|
3539
|
+
function verifyMrConfigId(mrConfigId, input) {
|
|
3540
|
+
const expected = getMrConfigId(input);
|
|
3541
|
+
return expected.toLowerCase() === mrConfigId.toLowerCase();
|
|
3542
|
+
}
|
|
3543
|
+
|
|
3290
3544
|
// src/utils/as-hex.ts
|
|
3291
3545
|
import { isHex } from "viem";
|
|
3292
3546
|
function asHex(value) {
|
|
@@ -3342,7 +3596,8 @@ var ErrorCodes = {
|
|
|
3342
3596
|
TOKEN_LIMIT_EXCEEDED: "ERR-05-001",
|
|
3343
3597
|
TOKEN_RATE_LIMIT: "ERR-05-002",
|
|
3344
3598
|
// Module 06: Auth
|
|
3345
|
-
OAUTH_EMAIL_INVALID: "ERR-06-001"
|
|
3599
|
+
OAUTH_EMAIL_INVALID: "ERR-06-001",
|
|
3600
|
+
PERMISSION_DENIED: "ERR-06-006"
|
|
3346
3601
|
};
|
|
3347
3602
|
|
|
3348
3603
|
// src/utils/network.ts
|
|
@@ -3980,25 +4235,25 @@ var kmsAuthAbi = [
|
|
|
3980
4235
|
anonymous: false
|
|
3981
4236
|
}
|
|
3982
4237
|
];
|
|
3983
|
-
var DeployAppAuthRequestBaseSchema =
|
|
4238
|
+
var DeployAppAuthRequestBaseSchema = z55.object({
|
|
3984
4239
|
// Chain configuration (conditionally required)
|
|
3985
|
-
chain:
|
|
3986
|
-
rpcUrl:
|
|
4240
|
+
chain: z55.unknown().optional(),
|
|
4241
|
+
rpcUrl: z55.string().optional(),
|
|
3987
4242
|
// Contract configuration (required)
|
|
3988
|
-
kmsContractAddress:
|
|
4243
|
+
kmsContractAddress: z55.string(),
|
|
3989
4244
|
// Authentication mode: either privateKey OR walletClient (required, mutually exclusive)
|
|
3990
|
-
privateKey:
|
|
3991
|
-
walletClient:
|
|
4245
|
+
privateKey: z55.string().optional(),
|
|
4246
|
+
walletClient: z55.unknown().optional(),
|
|
3992
4247
|
// Public client (optional, will create default if not provided)
|
|
3993
|
-
publicClient:
|
|
4248
|
+
publicClient: z55.unknown().optional(),
|
|
3994
4249
|
// App configuration (optional)
|
|
3995
|
-
allowAnyDevice:
|
|
3996
|
-
deviceId:
|
|
3997
|
-
composeHash:
|
|
3998
|
-
disableUpgrades:
|
|
4250
|
+
allowAnyDevice: z55.boolean().optional().default(false),
|
|
4251
|
+
deviceId: z55.string().optional().default("0000000000000000000000000000000000000000000000000000000000000000"),
|
|
4252
|
+
composeHash: z55.string().optional().default("0000000000000000000000000000000000000000000000000000000000000000"),
|
|
4253
|
+
disableUpgrades: z55.boolean().optional().default(false),
|
|
3999
4254
|
// Validation configuration (optional)
|
|
4000
|
-
skipPrerequisiteChecks:
|
|
4001
|
-
minBalance:
|
|
4255
|
+
skipPrerequisiteChecks: z55.boolean().optional().default(false),
|
|
4256
|
+
minBalance: z55.string().optional()
|
|
4002
4257
|
// ETH amount as string, e.g., "0.01"
|
|
4003
4258
|
}).passthrough();
|
|
4004
4259
|
var DeployAppAuthRequestSchema = DeployAppAuthRequestBaseSchema.refine(
|
|
@@ -4026,13 +4281,13 @@ var DeployAppAuthRequestSchema = DeployAppAuthRequestBaseSchema.refine(
|
|
|
4026
4281
|
path: ["chain"]
|
|
4027
4282
|
}
|
|
4028
4283
|
);
|
|
4029
|
-
var DeployAppAuthSchema =
|
|
4030
|
-
appId:
|
|
4031
|
-
appAuthAddress:
|
|
4032
|
-
deployer:
|
|
4033
|
-
transactionHash:
|
|
4034
|
-
blockNumber:
|
|
4035
|
-
gasUsed:
|
|
4284
|
+
var DeployAppAuthSchema = z55.object({
|
|
4285
|
+
appId: z55.string(),
|
|
4286
|
+
appAuthAddress: z55.string(),
|
|
4287
|
+
deployer: z55.string(),
|
|
4288
|
+
transactionHash: z55.string(),
|
|
4289
|
+
blockNumber: z55.bigint().optional(),
|
|
4290
|
+
gasUsed: z55.bigint().optional()
|
|
4036
4291
|
}).passthrough();
|
|
4037
4292
|
function parseDeploymentResult(receipt, deployer, kmsContractAddress) {
|
|
4038
4293
|
try {
|
|
@@ -4278,7 +4533,7 @@ async function safeDeployAppAuth(request, parameters) {
|
|
|
4278
4533
|
}
|
|
4279
4534
|
|
|
4280
4535
|
// src/actions/blockchains/add_compose_hash.ts
|
|
4281
|
-
import { z as
|
|
4536
|
+
import { z as z56 } from "zod";
|
|
4282
4537
|
import {
|
|
4283
4538
|
createPublicClient as createPublicClient3,
|
|
4284
4539
|
createWalletClient as createWalletClient3,
|
|
@@ -4302,29 +4557,29 @@ var appAuthAbi = [
|
|
|
4302
4557
|
anonymous: false
|
|
4303
4558
|
}
|
|
4304
4559
|
];
|
|
4305
|
-
var AddComposeHashRequestSchema =
|
|
4560
|
+
var AddComposeHashRequestSchema = z56.object({
|
|
4306
4561
|
// Chain configuration (conditionally required)
|
|
4307
|
-
chain:
|
|
4308
|
-
rpcUrl:
|
|
4309
|
-
appId:
|
|
4310
|
-
composeHash:
|
|
4562
|
+
chain: z56.unknown().optional(),
|
|
4563
|
+
rpcUrl: z56.string().optional(),
|
|
4564
|
+
appId: z56.string(),
|
|
4565
|
+
composeHash: z56.string(),
|
|
4311
4566
|
// Authentication mode: either privateKey OR walletClient (required, mutually exclusive)
|
|
4312
|
-
privateKey:
|
|
4313
|
-
walletClient:
|
|
4567
|
+
privateKey: z56.string().optional(),
|
|
4568
|
+
walletClient: z56.unknown().optional(),
|
|
4314
4569
|
// Public client (optional, will create default if not provided)
|
|
4315
|
-
publicClient:
|
|
4570
|
+
publicClient: z56.unknown().optional(),
|
|
4316
4571
|
// Validation configuration (optional)
|
|
4317
|
-
skipPrerequisiteChecks:
|
|
4318
|
-
minBalance:
|
|
4572
|
+
skipPrerequisiteChecks: z56.boolean().optional().default(false),
|
|
4573
|
+
minBalance: z56.string().optional(),
|
|
4319
4574
|
// ETH amount as string, e.g., "0.01"
|
|
4320
4575
|
// Transaction control options
|
|
4321
|
-
timeout:
|
|
4322
|
-
retryOptions:
|
|
4323
|
-
signal:
|
|
4576
|
+
timeout: z56.number().optional().default(12e4),
|
|
4577
|
+
retryOptions: z56.unknown().optional(),
|
|
4578
|
+
signal: z56.unknown().optional(),
|
|
4324
4579
|
// Progress callbacks
|
|
4325
|
-
onTransactionStateChange:
|
|
4326
|
-
onTransactionSubmitted:
|
|
4327
|
-
onTransactionConfirmed:
|
|
4580
|
+
onTransactionStateChange: z56.function().optional(),
|
|
4581
|
+
onTransactionSubmitted: z56.function().optional(),
|
|
4582
|
+
onTransactionConfirmed: z56.function().optional()
|
|
4328
4583
|
}).passthrough().refine(
|
|
4329
4584
|
(data) => {
|
|
4330
4585
|
const hasPrivateKey = !!data.privateKey;
|
|
@@ -4348,12 +4603,12 @@ var AddComposeHashRequestSchema = z52.object({
|
|
|
4348
4603
|
path: ["chain"]
|
|
4349
4604
|
}
|
|
4350
4605
|
);
|
|
4351
|
-
var AddComposeHashSchema =
|
|
4352
|
-
composeHash:
|
|
4353
|
-
appId:
|
|
4354
|
-
transactionHash:
|
|
4355
|
-
blockNumber:
|
|
4356
|
-
gasUsed:
|
|
4606
|
+
var AddComposeHashSchema = z56.object({
|
|
4607
|
+
composeHash: z56.string(),
|
|
4608
|
+
appId: z56.string(),
|
|
4609
|
+
transactionHash: z56.string(),
|
|
4610
|
+
blockNumber: z56.bigint().optional(),
|
|
4611
|
+
gasUsed: z56.bigint().optional()
|
|
4357
4612
|
}).passthrough();
|
|
4358
4613
|
function parseComposeHashResult(receipt, composeHash, appAuthAddress, appId) {
|
|
4359
4614
|
console.log(receipt.logs);
|
|
@@ -4563,7 +4818,7 @@ async function safeAddComposeHash(request, parameters) {
|
|
|
4563
4818
|
}
|
|
4564
4819
|
|
|
4565
4820
|
// src/actions/blockchains/add_device.ts
|
|
4566
|
-
import { z as
|
|
4821
|
+
import { z as z57 } from "zod";
|
|
4567
4822
|
import {
|
|
4568
4823
|
createPublicClient as createPublicClient4,
|
|
4569
4824
|
createWalletClient as createWalletClient4,
|
|
@@ -4658,22 +4913,22 @@ var dstackAppAbi = [
|
|
|
4658
4913
|
];
|
|
4659
4914
|
|
|
4660
4915
|
// src/actions/blockchains/add_device.ts
|
|
4661
|
-
var AddDeviceRequestSchema =
|
|
4662
|
-
chain:
|
|
4663
|
-
rpcUrl:
|
|
4664
|
-
appAddress:
|
|
4665
|
-
deviceId:
|
|
4666
|
-
privateKey:
|
|
4667
|
-
walletClient:
|
|
4668
|
-
publicClient:
|
|
4669
|
-
skipPrerequisiteChecks:
|
|
4670
|
-
minBalance:
|
|
4671
|
-
timeout:
|
|
4672
|
-
retryOptions:
|
|
4673
|
-
signal:
|
|
4674
|
-
onTransactionStateChange:
|
|
4675
|
-
onTransactionSubmitted:
|
|
4676
|
-
onTransactionConfirmed:
|
|
4916
|
+
var AddDeviceRequestSchema = z57.object({
|
|
4917
|
+
chain: z57.unknown().optional(),
|
|
4918
|
+
rpcUrl: z57.string().optional(),
|
|
4919
|
+
appAddress: z57.string(),
|
|
4920
|
+
deviceId: z57.string(),
|
|
4921
|
+
privateKey: z57.string().optional(),
|
|
4922
|
+
walletClient: z57.unknown().optional(),
|
|
4923
|
+
publicClient: z57.unknown().optional(),
|
|
4924
|
+
skipPrerequisiteChecks: z57.boolean().optional().default(false),
|
|
4925
|
+
minBalance: z57.string().optional(),
|
|
4926
|
+
timeout: z57.number().optional().default(12e4),
|
|
4927
|
+
retryOptions: z57.unknown().optional(),
|
|
4928
|
+
signal: z57.unknown().optional(),
|
|
4929
|
+
onTransactionStateChange: z57.function().optional(),
|
|
4930
|
+
onTransactionSubmitted: z57.function().optional(),
|
|
4931
|
+
onTransactionConfirmed: z57.function().optional()
|
|
4677
4932
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
4678
4933
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
4679
4934
|
path: ["privateKey", "walletClient"]
|
|
@@ -4687,12 +4942,12 @@ var AddDeviceRequestSchema = z53.object({
|
|
|
4687
4942
|
path: ["chain"]
|
|
4688
4943
|
}
|
|
4689
4944
|
);
|
|
4690
|
-
var AddDeviceSchema =
|
|
4691
|
-
appAddress:
|
|
4692
|
-
deviceId:
|
|
4693
|
-
transactionHash:
|
|
4694
|
-
blockNumber:
|
|
4695
|
-
gasUsed:
|
|
4945
|
+
var AddDeviceSchema = z57.object({
|
|
4946
|
+
appAddress: z57.string(),
|
|
4947
|
+
deviceId: z57.string(),
|
|
4948
|
+
transactionHash: z57.string(),
|
|
4949
|
+
blockNumber: z57.bigint().optional(),
|
|
4950
|
+
gasUsed: z57.bigint().optional()
|
|
4696
4951
|
}).passthrough();
|
|
4697
4952
|
async function addDevice(request, parameters) {
|
|
4698
4953
|
const validatedRequest = AddDeviceRequestSchema.parse(request);
|
|
@@ -4840,7 +5095,7 @@ async function safeAddDevice(request, parameters) {
|
|
|
4840
5095
|
}
|
|
4841
5096
|
|
|
4842
5097
|
// src/actions/blockchains/remove_device.ts
|
|
4843
|
-
import { z as
|
|
5098
|
+
import { z as z58 } from "zod";
|
|
4844
5099
|
import {
|
|
4845
5100
|
createPublicClient as createPublicClient5,
|
|
4846
5101
|
createWalletClient as createWalletClient5,
|
|
@@ -4848,22 +5103,22 @@ import {
|
|
|
4848
5103
|
parseEther as parseEther4
|
|
4849
5104
|
} from "viem";
|
|
4850
5105
|
import { privateKeyToAccount as privateKeyToAccount5 } from "viem/accounts";
|
|
4851
|
-
var RemoveDeviceRequestSchema =
|
|
4852
|
-
chain:
|
|
4853
|
-
rpcUrl:
|
|
4854
|
-
appAddress:
|
|
4855
|
-
deviceId:
|
|
4856
|
-
privateKey:
|
|
4857
|
-
walletClient:
|
|
4858
|
-
publicClient:
|
|
4859
|
-
skipPrerequisiteChecks:
|
|
4860
|
-
minBalance:
|
|
4861
|
-
timeout:
|
|
4862
|
-
retryOptions:
|
|
4863
|
-
signal:
|
|
4864
|
-
onTransactionStateChange:
|
|
4865
|
-
onTransactionSubmitted:
|
|
4866
|
-
onTransactionConfirmed:
|
|
5106
|
+
var RemoveDeviceRequestSchema = z58.object({
|
|
5107
|
+
chain: z58.unknown().optional(),
|
|
5108
|
+
rpcUrl: z58.string().optional(),
|
|
5109
|
+
appAddress: z58.string(),
|
|
5110
|
+
deviceId: z58.string(),
|
|
5111
|
+
privateKey: z58.string().optional(),
|
|
5112
|
+
walletClient: z58.unknown().optional(),
|
|
5113
|
+
publicClient: z58.unknown().optional(),
|
|
5114
|
+
skipPrerequisiteChecks: z58.boolean().optional().default(false),
|
|
5115
|
+
minBalance: z58.string().optional(),
|
|
5116
|
+
timeout: z58.number().optional().default(12e4),
|
|
5117
|
+
retryOptions: z58.unknown().optional(),
|
|
5118
|
+
signal: z58.unknown().optional(),
|
|
5119
|
+
onTransactionStateChange: z58.function().optional(),
|
|
5120
|
+
onTransactionSubmitted: z58.function().optional(),
|
|
5121
|
+
onTransactionConfirmed: z58.function().optional()
|
|
4867
5122
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
4868
5123
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
4869
5124
|
path: ["privateKey", "walletClient"]
|
|
@@ -4877,12 +5132,12 @@ var RemoveDeviceRequestSchema = z54.object({
|
|
|
4877
5132
|
path: ["chain"]
|
|
4878
5133
|
}
|
|
4879
5134
|
);
|
|
4880
|
-
var RemoveDeviceSchema =
|
|
4881
|
-
appAddress:
|
|
4882
|
-
deviceId:
|
|
4883
|
-
transactionHash:
|
|
4884
|
-
blockNumber:
|
|
4885
|
-
gasUsed:
|
|
5135
|
+
var RemoveDeviceSchema = z58.object({
|
|
5136
|
+
appAddress: z58.string(),
|
|
5137
|
+
deviceId: z58.string(),
|
|
5138
|
+
transactionHash: z58.string(),
|
|
5139
|
+
blockNumber: z58.bigint().optional(),
|
|
5140
|
+
gasUsed: z58.bigint().optional()
|
|
4886
5141
|
}).passthrough();
|
|
4887
5142
|
async function removeDevice(request, parameters) {
|
|
4888
5143
|
const validatedRequest = RemoveDeviceRequestSchema.parse(request);
|
|
@@ -5020,7 +5275,7 @@ async function safeRemoveDevice(request, parameters) {
|
|
|
5020
5275
|
}
|
|
5021
5276
|
|
|
5022
5277
|
// src/actions/blockchains/set_allow_any_device.ts
|
|
5023
|
-
import { z as
|
|
5278
|
+
import { z as z59 } from "zod";
|
|
5024
5279
|
import {
|
|
5025
5280
|
createPublicClient as createPublicClient6,
|
|
5026
5281
|
createWalletClient as createWalletClient6,
|
|
@@ -5028,22 +5283,22 @@ import {
|
|
|
5028
5283
|
parseEther as parseEther5
|
|
5029
5284
|
} from "viem";
|
|
5030
5285
|
import { privateKeyToAccount as privateKeyToAccount6 } from "viem/accounts";
|
|
5031
|
-
var SetAllowAnyDeviceRequestSchema =
|
|
5032
|
-
chain:
|
|
5033
|
-
rpcUrl:
|
|
5034
|
-
appAddress:
|
|
5035
|
-
allow:
|
|
5036
|
-
privateKey:
|
|
5037
|
-
walletClient:
|
|
5038
|
-
publicClient:
|
|
5039
|
-
skipPrerequisiteChecks:
|
|
5040
|
-
minBalance:
|
|
5041
|
-
timeout:
|
|
5042
|
-
retryOptions:
|
|
5043
|
-
signal:
|
|
5044
|
-
onTransactionStateChange:
|
|
5045
|
-
onTransactionSubmitted:
|
|
5046
|
-
onTransactionConfirmed:
|
|
5286
|
+
var SetAllowAnyDeviceRequestSchema = z59.object({
|
|
5287
|
+
chain: z59.unknown().optional(),
|
|
5288
|
+
rpcUrl: z59.string().optional(),
|
|
5289
|
+
appAddress: z59.string(),
|
|
5290
|
+
allow: z59.boolean(),
|
|
5291
|
+
privateKey: z59.string().optional(),
|
|
5292
|
+
walletClient: z59.unknown().optional(),
|
|
5293
|
+
publicClient: z59.unknown().optional(),
|
|
5294
|
+
skipPrerequisiteChecks: z59.boolean().optional().default(false),
|
|
5295
|
+
minBalance: z59.string().optional(),
|
|
5296
|
+
timeout: z59.number().optional().default(12e4),
|
|
5297
|
+
retryOptions: z59.unknown().optional(),
|
|
5298
|
+
signal: z59.unknown().optional(),
|
|
5299
|
+
onTransactionStateChange: z59.function().optional(),
|
|
5300
|
+
onTransactionSubmitted: z59.function().optional(),
|
|
5301
|
+
onTransactionConfirmed: z59.function().optional()
|
|
5047
5302
|
}).passthrough().refine((data) => !!data.privateKey !== !!data.walletClient, {
|
|
5048
5303
|
message: "Either 'privateKey' or 'walletClient' must be provided, but not both",
|
|
5049
5304
|
path: ["privateKey", "walletClient"]
|
|
@@ -5057,12 +5312,12 @@ var SetAllowAnyDeviceRequestSchema = z55.object({
|
|
|
5057
5312
|
path: ["chain"]
|
|
5058
5313
|
}
|
|
5059
5314
|
);
|
|
5060
|
-
var SetAllowAnyDeviceSchema =
|
|
5061
|
-
appAddress:
|
|
5062
|
-
allow:
|
|
5063
|
-
transactionHash:
|
|
5064
|
-
blockNumber:
|
|
5065
|
-
gasUsed:
|
|
5315
|
+
var SetAllowAnyDeviceSchema = z59.object({
|
|
5316
|
+
appAddress: z59.string(),
|
|
5317
|
+
allow: z59.boolean(),
|
|
5318
|
+
transactionHash: z59.string(),
|
|
5319
|
+
blockNumber: z59.bigint().optional(),
|
|
5320
|
+
gasUsed: z59.bigint().optional()
|
|
5066
5321
|
}).passthrough();
|
|
5067
5322
|
async function setAllowAnyDevice(request, parameters) {
|
|
5068
5323
|
const validatedRequest = SetAllowAnyDeviceRequestSchema.parse(request);
|
|
@@ -5199,13 +5454,13 @@ async function safeSetAllowAnyDevice(request, parameters) {
|
|
|
5199
5454
|
}
|
|
5200
5455
|
|
|
5201
5456
|
// src/actions/blockchains/get_allowed_devices.ts
|
|
5202
|
-
import { z as
|
|
5457
|
+
import { z as z60 } from "zod";
|
|
5203
5458
|
import { createPublicClient as createPublicClient7, http as http7 } from "viem";
|
|
5204
|
-
var GetAllowedDevicesSchema =
|
|
5205
|
-
appAddress:
|
|
5206
|
-
owner:
|
|
5207
|
-
allowAnyDevice:
|
|
5208
|
-
devices:
|
|
5459
|
+
var GetAllowedDevicesSchema = z60.object({
|
|
5460
|
+
appAddress: z60.string(),
|
|
5461
|
+
owner: z60.string(),
|
|
5462
|
+
allowAnyDevice: z60.boolean(),
|
|
5463
|
+
devices: z60.array(z60.string())
|
|
5209
5464
|
});
|
|
5210
5465
|
async function getAllowedDevices(request) {
|
|
5211
5466
|
const { chain, rpcUrl, appAddress, deviceIds, publicClient: providedPublicClient } = request;
|
|
@@ -5399,15 +5654,15 @@ async function safeCheckOnChainPrerequisites(request) {
|
|
|
5399
5654
|
}
|
|
5400
5655
|
|
|
5401
5656
|
// src/actions/workspaces/get_workspace_nodes.ts
|
|
5402
|
-
import { z as
|
|
5657
|
+
import { z as z61 } from "zod";
|
|
5403
5658
|
var NodeRefSchema2 = NodeRefSchema;
|
|
5404
5659
|
var NodeInfoSchema = NodeRefSchema2;
|
|
5405
|
-
var GetWorkspaceNodesSchema =
|
|
5406
|
-
items:
|
|
5407
|
-
total:
|
|
5408
|
-
page:
|
|
5409
|
-
page_size:
|
|
5410
|
-
pages:
|
|
5660
|
+
var GetWorkspaceNodesSchema = z61.object({
|
|
5661
|
+
items: z61.array(NodeRefSchema2),
|
|
5662
|
+
total: z61.number(),
|
|
5663
|
+
page: z61.number(),
|
|
5664
|
+
page_size: z61.number(),
|
|
5665
|
+
pages: z61.number()
|
|
5411
5666
|
}).passthrough();
|
|
5412
5667
|
var { action: getWorkspaceNodes, safeAction: safeGetWorkspaceNodes } = defineAction(GetWorkspaceNodesSchema, async (client, request) => {
|
|
5413
5668
|
const { teamSlug, page, pageSize } = request;
|
|
@@ -5419,39 +5674,39 @@ var { action: getWorkspaceNodes, safeAction: safeGetWorkspaceNodes } = defineAct
|
|
|
5419
5674
|
});
|
|
5420
5675
|
|
|
5421
5676
|
// src/actions/workspaces/get_workspace_quotas.ts
|
|
5422
|
-
import { z as
|
|
5423
|
-
var QuotaMetricSchema =
|
|
5424
|
-
limit:
|
|
5425
|
-
remaining:
|
|
5677
|
+
import { z as z62 } from "zod";
|
|
5678
|
+
var QuotaMetricSchema = z62.object({
|
|
5679
|
+
limit: z62.number(),
|
|
5680
|
+
remaining: z62.number()
|
|
5426
5681
|
}).passthrough();
|
|
5427
|
-
var WorkspaceQuotasSchema =
|
|
5682
|
+
var WorkspaceQuotasSchema = z62.object({
|
|
5428
5683
|
vm_slots: QuotaMetricSchema,
|
|
5429
5684
|
vcpu: QuotaMetricSchema,
|
|
5430
5685
|
memory_mb: QuotaMetricSchema,
|
|
5431
5686
|
disk_gb: QuotaMetricSchema
|
|
5432
5687
|
}).passthrough();
|
|
5433
|
-
var WorkspaceReservedGpuQuotaSchema =
|
|
5688
|
+
var WorkspaceReservedGpuQuotaSchema = z62.object({
|
|
5434
5689
|
gpus: QuotaMetricSchema,
|
|
5435
|
-
in_use:
|
|
5436
|
-
misconfigured:
|
|
5690
|
+
in_use: z62.number(),
|
|
5691
|
+
misconfigured: z62.number()
|
|
5437
5692
|
}).passthrough();
|
|
5438
|
-
var GetWorkspaceQuotasSchema =
|
|
5439
|
-
team_slug:
|
|
5440
|
-
tier:
|
|
5693
|
+
var GetWorkspaceQuotasSchema = z62.object({
|
|
5694
|
+
team_slug: z62.string(),
|
|
5695
|
+
tier: z62.string(),
|
|
5441
5696
|
quotas: WorkspaceQuotasSchema,
|
|
5442
5697
|
reserved_nodes: QuotaMetricSchema,
|
|
5443
5698
|
reserved_gpu: WorkspaceReservedGpuQuotaSchema,
|
|
5444
|
-
as_of:
|
|
5699
|
+
as_of: z62.string()
|
|
5445
5700
|
}).passthrough();
|
|
5446
5701
|
var { action: getWorkspaceQuotas, safeAction: safeGetWorkspaceQuotas } = defineAction(GetWorkspaceQuotasSchema, async (client, request) => {
|
|
5447
5702
|
return await client.get(`/workspaces/${request.teamSlug}/quotas`);
|
|
5448
5703
|
});
|
|
5449
5704
|
|
|
5450
5705
|
// src/actions/cvms/replicate_cvm.ts
|
|
5451
|
-
import { z as
|
|
5706
|
+
import { z as z63 } from "zod";
|
|
5452
5707
|
var ReplicateCvmRequestSchema = refineCvmId(
|
|
5453
5708
|
CvmIdObjectSchema.extend({
|
|
5454
|
-
node_id:
|
|
5709
|
+
node_id: z63.number().optional()
|
|
5455
5710
|
})
|
|
5456
5711
|
);
|
|
5457
5712
|
async function replicateCvm(client, request) {
|
|
@@ -5480,13 +5735,13 @@ async function safeReplicateCvm(client, request) {
|
|
|
5480
5735
|
}
|
|
5481
5736
|
|
|
5482
5737
|
// src/actions/cvms/watch_cvm_state.ts
|
|
5483
|
-
import { z as
|
|
5484
|
-
var WatchCvmStateParamsSchema =
|
|
5485
|
-
target:
|
|
5486
|
-
interval:
|
|
5487
|
-
timeout:
|
|
5488
|
-
maxRetries:
|
|
5489
|
-
retryDelay:
|
|
5738
|
+
import { z as z64 } from "zod";
|
|
5739
|
+
var WatchCvmStateParamsSchema = z64.object({
|
|
5740
|
+
target: z64.string().describe("Target status to wait for (e.g., 'running', 'stopped')"),
|
|
5741
|
+
interval: z64.number().min(5).max(30).default(5).describe("Polling interval in seconds"),
|
|
5742
|
+
timeout: z64.number().min(10).max(600).default(300).describe("Timeout per attempt in seconds"),
|
|
5743
|
+
maxRetries: z64.number().min(0).default(Number.POSITIVE_INFINITY).describe("Maximum number of retry attempts (Infinity for unlimited)"),
|
|
5744
|
+
retryDelay: z64.number().min(0).default(5e3).describe("Delay between retries in milliseconds")
|
|
5490
5745
|
});
|
|
5491
5746
|
var WatchCvmStateRequestSchema = WatchCvmStateParamsSchema;
|
|
5492
5747
|
var WatchAbortedError = class extends Error {
|
|
@@ -5674,57 +5929,57 @@ function sleep(ms, signal) {
|
|
|
5674
5929
|
}
|
|
5675
5930
|
|
|
5676
5931
|
// src/actions/cvms/patch_cvm.ts
|
|
5677
|
-
import { z as
|
|
5932
|
+
import { z as z65 } from "zod";
|
|
5678
5933
|
var PatchCvmRequestSchema = refineCvmId(
|
|
5679
5934
|
CvmIdObjectSchema.extend({
|
|
5680
5935
|
// Compose-hash-affecting fields
|
|
5681
|
-
docker_compose_file:
|
|
5682
|
-
pre_launch_script:
|
|
5683
|
-
allowed_envs:
|
|
5936
|
+
docker_compose_file: z65.string().optional(),
|
|
5937
|
+
pre_launch_script: z65.string().optional(),
|
|
5938
|
+
allowed_envs: z65.array(z65.string()).optional(),
|
|
5684
5939
|
// Visibility
|
|
5685
|
-
public_logs:
|
|
5686
|
-
public_sysinfo:
|
|
5687
|
-
public_tcbinfo:
|
|
5940
|
+
public_logs: z65.boolean().optional(),
|
|
5941
|
+
public_sysinfo: z65.boolean().optional(),
|
|
5942
|
+
public_tcbinfo: z65.boolean().optional(),
|
|
5688
5943
|
// Non-compose-hash config
|
|
5689
|
-
encrypted_env:
|
|
5690
|
-
user_config:
|
|
5691
|
-
gpus:
|
|
5692
|
-
count:
|
|
5693
|
-
product_name:
|
|
5944
|
+
encrypted_env: z65.string().optional(),
|
|
5945
|
+
user_config: z65.string().optional(),
|
|
5946
|
+
gpus: z65.object({
|
|
5947
|
+
count: z65.number(),
|
|
5948
|
+
product_name: z65.string().optional()
|
|
5694
5949
|
}).optional(),
|
|
5695
5950
|
// Resources
|
|
5696
|
-
vcpu:
|
|
5697
|
-
memory:
|
|
5698
|
-
disk_size:
|
|
5951
|
+
vcpu: z65.number().optional(),
|
|
5952
|
+
memory: z65.number().optional(),
|
|
5953
|
+
disk_size: z65.number().optional(),
|
|
5699
5954
|
// OS image
|
|
5700
|
-
image:
|
|
5955
|
+
image: z65.string().optional(),
|
|
5701
5956
|
// Shutdown behavior
|
|
5702
|
-
shutdown_timeout:
|
|
5703
|
-
allow_force_stop:
|
|
5957
|
+
shutdown_timeout: z65.number().optional(),
|
|
5958
|
+
allow_force_stop: z65.boolean().optional(),
|
|
5704
5959
|
// Prepare-only mode (for multisig workflows)
|
|
5705
|
-
prepareOnly:
|
|
5960
|
+
prepareOnly: z65.boolean().optional()
|
|
5706
5961
|
})
|
|
5707
5962
|
);
|
|
5708
|
-
var PatchCvmAcceptedSchema =
|
|
5709
|
-
requiresOnChainHash:
|
|
5710
|
-
correlationId:
|
|
5711
|
-
});
|
|
5712
|
-
var PatchCvmHashRequiredSchema =
|
|
5713
|
-
requiresOnChainHash:
|
|
5714
|
-
composeHash:
|
|
5715
|
-
appId:
|
|
5716
|
-
deviceId:
|
|
5963
|
+
var PatchCvmAcceptedSchema = z65.object({
|
|
5964
|
+
requiresOnChainHash: z65.literal(false),
|
|
5965
|
+
correlationId: z65.string()
|
|
5966
|
+
});
|
|
5967
|
+
var PatchCvmHashRequiredSchema = z65.object({
|
|
5968
|
+
requiresOnChainHash: z65.literal(true),
|
|
5969
|
+
composeHash: z65.string(),
|
|
5970
|
+
appId: z65.string(),
|
|
5971
|
+
deviceId: z65.string(),
|
|
5717
5972
|
kmsInfo: KmsInfoSchema,
|
|
5718
|
-
commitToken:
|
|
5719
|
-
commitUrl:
|
|
5720
|
-
apiCommitUrl:
|
|
5721
|
-
onchainStatus:
|
|
5722
|
-
compose_hash_allowed:
|
|
5723
|
-
device_id_allowed:
|
|
5724
|
-
is_allowed:
|
|
5973
|
+
commitToken: z65.string().optional(),
|
|
5974
|
+
commitUrl: z65.string().optional(),
|
|
5975
|
+
apiCommitUrl: z65.string().optional(),
|
|
5976
|
+
onchainStatus: z65.object({
|
|
5977
|
+
compose_hash_allowed: z65.boolean(),
|
|
5978
|
+
device_id_allowed: z65.boolean(),
|
|
5979
|
+
is_allowed: z65.boolean()
|
|
5725
5980
|
}).optional()
|
|
5726
5981
|
});
|
|
5727
|
-
var PatchCvmResultSchema =
|
|
5982
|
+
var PatchCvmResultSchema = z65.discriminatedUnion("requiresOnChainHash", [
|
|
5728
5983
|
PatchCvmAcceptedSchema,
|
|
5729
5984
|
PatchCvmHashRequiredSchema
|
|
5730
5985
|
]);
|
|
@@ -5773,15 +6028,15 @@ var { action: patchCvm, safeAction: safePatchCvm } = defineAction(PatchCvmResult
|
|
|
5773
6028
|
});
|
|
5774
6029
|
|
|
5775
6030
|
// src/actions/cvms/confirm_cvm_patch.ts
|
|
5776
|
-
import { z as
|
|
6031
|
+
import { z as z66 } from "zod";
|
|
5777
6032
|
var ConfirmCvmPatchRequestSchema = refineCvmId(
|
|
5778
6033
|
CvmIdObjectSchema.extend({
|
|
5779
|
-
composeHash:
|
|
5780
|
-
transactionHash:
|
|
6034
|
+
composeHash: z66.string().describe("Compose hash from patchCvm Phase 1 response"),
|
|
6035
|
+
transactionHash: z66.string().describe("Transaction hash proving on-chain registration")
|
|
5781
6036
|
})
|
|
5782
6037
|
);
|
|
5783
|
-
var ConfirmCvmPatchResultSchema =
|
|
5784
|
-
correlationId:
|
|
6038
|
+
var ConfirmCvmPatchResultSchema = z66.object({
|
|
6039
|
+
correlationId: z66.string()
|
|
5785
6040
|
});
|
|
5786
6041
|
var { action: confirmCvmPatch, safeAction: safeConfirmCvmPatch } = defineAction(ConfirmCvmPatchResultSchema, async (client, request) => {
|
|
5787
6042
|
const parsed = ConfirmCvmPatchRequestSchema.parse(request);
|
|
@@ -5802,17 +6057,17 @@ var { action: confirmCvmPatch, safeAction: safeConfirmCvmPatch } = defineAction(
|
|
|
5802
6057
|
});
|
|
5803
6058
|
|
|
5804
6059
|
// src/actions/cvms/commit_cvm_update.ts
|
|
5805
|
-
import { z as
|
|
6060
|
+
import { z as z67 } from "zod";
|
|
5806
6061
|
var CommitCvmUpdateRequestSchema = refineCvmId(
|
|
5807
6062
|
CvmIdObjectSchema.extend({
|
|
5808
|
-
token:
|
|
5809
|
-
composeHash:
|
|
5810
|
-
transactionHash:
|
|
6063
|
+
token: z67.string().describe("One-time commit token from prepare-only flow"),
|
|
6064
|
+
composeHash: z67.string().describe("Compose hash from Phase 1 response"),
|
|
6065
|
+
transactionHash: z67.string().describe("Transaction hash proving on-chain registration")
|
|
5811
6066
|
})
|
|
5812
6067
|
);
|
|
5813
|
-
var CommitCvmUpdateResultSchema =
|
|
5814
|
-
correlationId:
|
|
5815
|
-
status:
|
|
6068
|
+
var CommitCvmUpdateResultSchema = z67.object({
|
|
6069
|
+
correlationId: z67.string(),
|
|
6070
|
+
status: z67.string()
|
|
5816
6071
|
});
|
|
5817
6072
|
var { action: commitCvmUpdate, safeAction: safeCommitCvmUpdate } = defineAction(CommitCvmUpdateResultSchema, async (client, request) => {
|
|
5818
6073
|
const parsed = CommitCvmUpdateRequestSchema.parse(request);
|
|
@@ -5829,31 +6084,31 @@ var { action: commitCvmUpdate, safeAction: safeCommitCvmUpdate } = defineAction(
|
|
|
5829
6084
|
});
|
|
5830
6085
|
|
|
5831
6086
|
// src/actions/cvms/refresh_cvm_instance_id.ts
|
|
5832
|
-
import { z as
|
|
5833
|
-
var InstanceIdRefreshResultBaseSchema =
|
|
5834
|
-
identifier:
|
|
5835
|
-
status:
|
|
5836
|
-
old_instance_id:
|
|
5837
|
-
new_instance_id:
|
|
5838
|
-
source:
|
|
5839
|
-
verified_with_gateway:
|
|
5840
|
-
reason:
|
|
6087
|
+
import { z as z68 } from "zod";
|
|
6088
|
+
var InstanceIdRefreshResultBaseSchema = z68.object({
|
|
6089
|
+
identifier: z68.string(),
|
|
6090
|
+
status: z68.enum(["updated", "unchanged", "skipped", "conflict", "error"]),
|
|
6091
|
+
old_instance_id: z68.string().nullable().optional(),
|
|
6092
|
+
new_instance_id: z68.string().nullable().optional(),
|
|
6093
|
+
source: z68.enum(["teepod_state", "teepod_info", "gateway", "none"]),
|
|
6094
|
+
verified_with_gateway: z68.boolean(),
|
|
6095
|
+
reason: z68.string().nullable().optional()
|
|
5841
6096
|
});
|
|
5842
6097
|
var InstanceIdRefreshResultV20260121Schema = InstanceIdRefreshResultBaseSchema.extend({
|
|
5843
|
-
cvm_id:
|
|
6098
|
+
cvm_id: z68.number().nullable()
|
|
5844
6099
|
});
|
|
5845
6100
|
var InstanceIdRefreshResultV20260522Schema = InstanceIdRefreshResultBaseSchema.extend({
|
|
5846
|
-
cvm_id:
|
|
6101
|
+
cvm_id: z68.string().nullable()
|
|
5847
6102
|
});
|
|
5848
|
-
var InstanceIdRefreshResultAnySchema =
|
|
6103
|
+
var InstanceIdRefreshResultAnySchema = z68.union([
|
|
5849
6104
|
InstanceIdRefreshResultV20260121Schema,
|
|
5850
6105
|
InstanceIdRefreshResultV20260522Schema
|
|
5851
6106
|
]);
|
|
5852
6107
|
var InstanceIdRefreshResultSchema = InstanceIdRefreshResultV20260522Schema;
|
|
5853
6108
|
var RefreshCvmInstanceIdRequestSchema = refineCvmId(
|
|
5854
6109
|
CvmIdObjectSchema.extend({
|
|
5855
|
-
overwrite:
|
|
5856
|
-
dry_run:
|
|
6110
|
+
overwrite: z68.boolean().optional(),
|
|
6111
|
+
dry_run: z68.boolean().optional()
|
|
5857
6112
|
})
|
|
5858
6113
|
);
|
|
5859
6114
|
function getSchemaForVersion6(version) {
|
|
@@ -5888,33 +6143,33 @@ async function safeRefreshCvmInstanceId(client, request) {
|
|
|
5888
6143
|
}
|
|
5889
6144
|
|
|
5890
6145
|
// src/actions/cvms/refresh_cvm_instance_ids.ts
|
|
5891
|
-
import { z as
|
|
5892
|
-
var RefreshCvmInstanceIdsRequestSchema =
|
|
5893
|
-
cvm_ids:
|
|
5894
|
-
running_only:
|
|
5895
|
-
missing_only:
|
|
5896
|
-
overwrite:
|
|
5897
|
-
limit:
|
|
5898
|
-
dry_run:
|
|
6146
|
+
import { z as z69 } from "zod";
|
|
6147
|
+
var RefreshCvmInstanceIdsRequestSchema = z69.object({
|
|
6148
|
+
cvm_ids: z69.array(z69.string()).optional(),
|
|
6149
|
+
running_only: z69.boolean().optional(),
|
|
6150
|
+
missing_only: z69.boolean().optional(),
|
|
6151
|
+
overwrite: z69.boolean().optional(),
|
|
6152
|
+
limit: z69.number().int().min(1).max(500).optional(),
|
|
6153
|
+
dry_run: z69.boolean().optional()
|
|
5899
6154
|
}).strict();
|
|
5900
|
-
var RefreshCvmInstanceIdsResponseBaseSchema =
|
|
5901
|
-
total:
|
|
5902
|
-
scanned:
|
|
5903
|
-
updated:
|
|
5904
|
-
unchanged:
|
|
5905
|
-
skipped:
|
|
5906
|
-
conflicts:
|
|
5907
|
-
errors:
|
|
6155
|
+
var RefreshCvmInstanceIdsResponseBaseSchema = z69.object({
|
|
6156
|
+
total: z69.number().int(),
|
|
6157
|
+
scanned: z69.number().int(),
|
|
6158
|
+
updated: z69.number().int(),
|
|
6159
|
+
unchanged: z69.number().int(),
|
|
6160
|
+
skipped: z69.number().int(),
|
|
6161
|
+
conflicts: z69.number().int(),
|
|
6162
|
+
errors: z69.number().int()
|
|
5908
6163
|
});
|
|
5909
6164
|
var RefreshCvmInstanceIdsResponseV20260121Schema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
5910
|
-
items:
|
|
6165
|
+
items: z69.array(InstanceIdRefreshResultV20260121Schema)
|
|
5911
6166
|
});
|
|
5912
6167
|
var RefreshCvmInstanceIdsResponseV20260522Schema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
5913
|
-
items:
|
|
6168
|
+
items: z69.array(InstanceIdRefreshResultV20260522Schema)
|
|
5914
6169
|
});
|
|
5915
6170
|
var RefreshCvmInstanceIdsResponseAnySchema = RefreshCvmInstanceIdsResponseBaseSchema.extend({
|
|
5916
|
-
items:
|
|
5917
|
-
|
|
6171
|
+
items: z69.array(
|
|
6172
|
+
z69.union([InstanceIdRefreshResultV20260121Schema, InstanceIdRefreshResultV20260522Schema])
|
|
5918
6173
|
)
|
|
5919
6174
|
});
|
|
5920
6175
|
var RefreshCvmInstanceIdsResponseSchema = RefreshCvmInstanceIdsResponseV20260522Schema;
|
|
@@ -5948,21 +6203,41 @@ async function safeRefreshCvmInstanceIds(client, request) {
|
|
|
5948
6203
|
}
|
|
5949
6204
|
|
|
5950
6205
|
// src/actions/cvms/get_cvm_status_batch.ts
|
|
5951
|
-
import { z as
|
|
5952
|
-
var
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
6206
|
+
import { z as z70 } from "zod";
|
|
6207
|
+
var CvmResourceUsageSchema = z70.object({
|
|
6208
|
+
cpu_percent: z70.number().nullable().optional(),
|
|
6209
|
+
memory_used_bytes: z70.number().nullable().optional(),
|
|
6210
|
+
memory_total_bytes: z70.number().nullable().optional(),
|
|
6211
|
+
disk_used_bytes: z70.number().nullable().optional(),
|
|
6212
|
+
disk_total_bytes: z70.number().nullable().optional(),
|
|
6213
|
+
egress_bytes: z70.number().nullable().optional()
|
|
6214
|
+
});
|
|
6215
|
+
var CvmStatusSchema = z70.object({
|
|
6216
|
+
vm_uuid: z70.string(),
|
|
6217
|
+
status: z70.string(),
|
|
6218
|
+
uptime: z70.string().nullable().optional(),
|
|
6219
|
+
in_progress: z70.boolean(),
|
|
6220
|
+
boot_progress: z70.string().nullable().optional(),
|
|
6221
|
+
boot_error: z70.string().nullable().optional(),
|
|
6222
|
+
shutdown_progress: z70.string().nullable().optional(),
|
|
6223
|
+
events: z70.array(
|
|
6224
|
+
z70.object({
|
|
6225
|
+
event: z70.string(),
|
|
6226
|
+
body: z70.string(),
|
|
6227
|
+
timestamp: z70.number()
|
|
6228
|
+
})
|
|
6229
|
+
).default([]),
|
|
6230
|
+
operation: z70.object({
|
|
6231
|
+
type: z70.string().nullable().optional(),
|
|
6232
|
+
phase: z70.string().nullable().optional(),
|
|
6233
|
+
started_at: z70.string().nullable().optional(),
|
|
6234
|
+
correlation_id: z70.string().nullable().optional()
|
|
6235
|
+
}).nullable().optional(),
|
|
6236
|
+
resource_usage: CvmResourceUsageSchema.nullable().optional()
|
|
6237
|
+
});
|
|
6238
|
+
var GetCvmStatusBatchResponseSchema = z70.record(z70.string(), CvmStatusSchema);
|
|
6239
|
+
var GetCvmStatusBatchRequestSchema = z70.object({
|
|
6240
|
+
vmUuids: z70.array(z70.string())
|
|
5966
6241
|
});
|
|
5967
6242
|
var { action: getCvmStatusBatch, safeAction: safeGetCvmStatusBatch } = defineAction(GetCvmStatusBatchResponseSchema, async (client, request) => {
|
|
5968
6243
|
const { vmUuids } = GetCvmStatusBatchRequestSchema.parse(request);
|
|
@@ -5970,11 +6245,11 @@ var { action: getCvmStatusBatch, safeAction: safeGetCvmStatusBatch } = defineAct
|
|
|
5970
6245
|
});
|
|
5971
6246
|
|
|
5972
6247
|
// src/actions/cvms/get_cvm_user_config.ts
|
|
5973
|
-
import { z as
|
|
5974
|
-
var CvmUserConfigSchema =
|
|
5975
|
-
hostname:
|
|
5976
|
-
ssh_authorized_keys:
|
|
5977
|
-
default_gateway_domain:
|
|
6248
|
+
import { z as z71 } from "zod";
|
|
6249
|
+
var CvmUserConfigSchema = z71.object({
|
|
6250
|
+
hostname: z71.string().nullable().optional(),
|
|
6251
|
+
ssh_authorized_keys: z71.array(z71.string()).default([]),
|
|
6252
|
+
default_gateway_domain: z71.string().nullable().optional()
|
|
5978
6253
|
});
|
|
5979
6254
|
var GetCvmUserConfigRequestSchema = CvmIdSchema;
|
|
5980
6255
|
var { action: getCvmUserConfig, safeAction: safeGetCvmUserConfig } = defineAction(CvmUserConfigSchema, async (client, request) => {
|
|
@@ -5983,33 +6258,33 @@ var { action: getCvmUserConfig, safeAction: safeGetCvmUserConfig } = defineActio
|
|
|
5983
6258
|
});
|
|
5984
6259
|
|
|
5985
6260
|
// src/actions/cvms/check_cvm_is_allowed.ts
|
|
5986
|
-
import { z as
|
|
5987
|
-
var IsAllowedResultBaseSchema =
|
|
5988
|
-
app_contract_address:
|
|
5989
|
-
compose_hash:
|
|
5990
|
-
device_id:
|
|
5991
|
-
compose_hash_allowed:
|
|
5992
|
-
allow_any_device:
|
|
5993
|
-
device_id_allowed:
|
|
5994
|
-
is_allowed:
|
|
5995
|
-
error:
|
|
6261
|
+
import { z as z72 } from "zod";
|
|
6262
|
+
var IsAllowedResultBaseSchema = z72.object({
|
|
6263
|
+
app_contract_address: z72.string(),
|
|
6264
|
+
compose_hash: z72.string(),
|
|
6265
|
+
device_id: z72.string(),
|
|
6266
|
+
compose_hash_allowed: z72.boolean(),
|
|
6267
|
+
allow_any_device: z72.boolean(),
|
|
6268
|
+
device_id_allowed: z72.boolean().nullable().optional(),
|
|
6269
|
+
is_allowed: z72.boolean(),
|
|
6270
|
+
error: z72.string().nullable().optional()
|
|
5996
6271
|
});
|
|
5997
6272
|
var IsAllowedResultV20260121Schema = IsAllowedResultBaseSchema.extend({
|
|
5998
|
-
cvm_id:
|
|
6273
|
+
cvm_id: z72.number().optional()
|
|
5999
6274
|
});
|
|
6000
6275
|
var IsAllowedResultV20260522Schema = IsAllowedResultBaseSchema.extend({
|
|
6001
|
-
cvm_id:
|
|
6276
|
+
cvm_id: z72.string().optional()
|
|
6002
6277
|
});
|
|
6003
|
-
var IsAllowedResultAnySchema =
|
|
6278
|
+
var IsAllowedResultAnySchema = z72.union([
|
|
6004
6279
|
IsAllowedResultV20260121Schema,
|
|
6005
6280
|
IsAllowedResultV20260522Schema
|
|
6006
6281
|
]);
|
|
6007
6282
|
var IsAllowedResultSchema = IsAllowedResultV20260522Schema;
|
|
6008
|
-
var CheckCvmIsAllowedInputSchema =
|
|
6009
|
-
cvmId:
|
|
6010
|
-
compose_hash:
|
|
6011
|
-
node_id:
|
|
6012
|
-
device_id:
|
|
6283
|
+
var CheckCvmIsAllowedInputSchema = z72.object({
|
|
6284
|
+
cvmId: z72.string().min(1),
|
|
6285
|
+
compose_hash: z72.string().optional(),
|
|
6286
|
+
node_id: z72.number().optional(),
|
|
6287
|
+
device_id: z72.string().optional()
|
|
6013
6288
|
});
|
|
6014
6289
|
var CheckCvmIsAllowedRequestSchema = CheckCvmIsAllowedInputSchema;
|
|
6015
6290
|
function getSchemaForVersion8(version) {
|
|
@@ -6040,13 +6315,13 @@ async function safeCheckCvmIsAllowed(client, request) {
|
|
|
6040
6315
|
}
|
|
6041
6316
|
|
|
6042
6317
|
// src/actions/apps/check_app_is_allowed.ts
|
|
6043
|
-
import { z as
|
|
6044
|
-
var CheckAppIsAllowedRequestSchema =
|
|
6045
|
-
appId:
|
|
6046
|
-
compose_hash:
|
|
6047
|
-
node_id:
|
|
6048
|
-
device_id:
|
|
6049
|
-
chain_id:
|
|
6318
|
+
import { z as z73 } from "zod";
|
|
6319
|
+
var CheckAppIsAllowedRequestSchema = z73.object({
|
|
6320
|
+
appId: z73.string().min(1),
|
|
6321
|
+
compose_hash: z73.string(),
|
|
6322
|
+
node_id: z73.number().optional(),
|
|
6323
|
+
device_id: z73.string().optional(),
|
|
6324
|
+
chain_id: z73.number().optional()
|
|
6050
6325
|
});
|
|
6051
6326
|
var { action: checkAppIsAllowed, safeAction: safeCheckAppIsAllowed } = defineAction(IsAllowedResultSchema, async (client, request) => {
|
|
6052
6327
|
const { appId, ...body } = CheckAppIsAllowedRequestSchema.parse(request);
|
|
@@ -6054,29 +6329,29 @@ var { action: checkAppIsAllowed, safeAction: safeCheckAppIsAllowed } = defineAct
|
|
|
6054
6329
|
});
|
|
6055
6330
|
|
|
6056
6331
|
// src/actions/apps/check_app_cvms_is_allowed.ts
|
|
6057
|
-
import { z as
|
|
6058
|
-
var AppCvmsBatchIsAllowedResponseBaseSchema =
|
|
6059
|
-
is_onchain:
|
|
6060
|
-
total:
|
|
6061
|
-
allowed_count:
|
|
6062
|
-
denied_count:
|
|
6063
|
-
error_count:
|
|
6332
|
+
import { z as z74 } from "zod";
|
|
6333
|
+
var AppCvmsBatchIsAllowedResponseBaseSchema = z74.object({
|
|
6334
|
+
is_onchain: z74.boolean(),
|
|
6335
|
+
total: z74.number().default(0),
|
|
6336
|
+
allowed_count: z74.number().default(0),
|
|
6337
|
+
denied_count: z74.number().default(0),
|
|
6338
|
+
error_count: z74.number().default(0)
|
|
6064
6339
|
});
|
|
6065
6340
|
var AppCvmsBatchIsAllowedResponseV20260121Schema = AppCvmsBatchIsAllowedResponseBaseSchema.extend({
|
|
6066
|
-
results:
|
|
6067
|
-
skipped_cvm_ids:
|
|
6341
|
+
results: z74.array(IsAllowedResultV20260121Schema.extend({ cvm_id: z74.number() })).default([]),
|
|
6342
|
+
skipped_cvm_ids: z74.array(z74.number()).default([])
|
|
6068
6343
|
});
|
|
6069
6344
|
var AppCvmsBatchIsAllowedResponseV20260522Schema = AppCvmsBatchIsAllowedResponseBaseSchema.extend({
|
|
6070
|
-
results:
|
|
6071
|
-
skipped_cvm_ids:
|
|
6345
|
+
results: z74.array(IsAllowedResultV20260522Schema.extend({ cvm_id: z74.string() })).default([]),
|
|
6346
|
+
skipped_cvm_ids: z74.array(z74.string()).default([])
|
|
6072
6347
|
});
|
|
6073
|
-
var AppCvmsBatchIsAllowedResponseAnySchema =
|
|
6348
|
+
var AppCvmsBatchIsAllowedResponseAnySchema = z74.union([
|
|
6074
6349
|
AppCvmsBatchIsAllowedResponseV20260121Schema,
|
|
6075
6350
|
AppCvmsBatchIsAllowedResponseV20260522Schema
|
|
6076
6351
|
]);
|
|
6077
6352
|
var AppCvmsBatchIsAllowedResponseSchema = AppCvmsBatchIsAllowedResponseV20260522Schema;
|
|
6078
|
-
var CheckAppCvmsIsAllowedRequestSchema =
|
|
6079
|
-
appId:
|
|
6353
|
+
var CheckAppCvmsIsAllowedRequestSchema = z74.object({
|
|
6354
|
+
appId: z74.string().min(1)
|
|
6080
6355
|
});
|
|
6081
6356
|
function getSchemaForVersion9(version) {
|
|
6082
6357
|
if (version === "2026-01-21") return AppCvmsBatchIsAllowedResponseV20260121Schema;
|
|
@@ -6108,19 +6383,19 @@ async function safeCheckAppCvmsIsAllowed(client, request) {
|
|
|
6108
6383
|
}
|
|
6109
6384
|
|
|
6110
6385
|
// src/actions/apps/get_app_list.ts
|
|
6111
|
-
import { z as
|
|
6112
|
-
var GetAppListRequestSchema =
|
|
6113
|
-
page:
|
|
6114
|
-
page_size:
|
|
6115
|
-
search:
|
|
6116
|
-
status:
|
|
6117
|
-
listed:
|
|
6118
|
-
base_image:
|
|
6119
|
-
instance_type:
|
|
6120
|
-
kms_slug:
|
|
6121
|
-
kms_type:
|
|
6122
|
-
node:
|
|
6123
|
-
region:
|
|
6386
|
+
import { z as z75 } from "zod";
|
|
6387
|
+
var GetAppListRequestSchema = z75.object({
|
|
6388
|
+
page: z75.number().int().min(1).optional(),
|
|
6389
|
+
page_size: z75.number().int().min(1).max(100).optional(),
|
|
6390
|
+
search: z75.string().optional(),
|
|
6391
|
+
status: z75.array(z75.string()).optional(),
|
|
6392
|
+
listed: z75.boolean().optional(),
|
|
6393
|
+
base_image: z75.string().optional(),
|
|
6394
|
+
instance_type: z75.string().optional(),
|
|
6395
|
+
kms_slug: z75.string().optional(),
|
|
6396
|
+
kms_type: z75.string().optional(),
|
|
6397
|
+
node: z75.string().optional(),
|
|
6398
|
+
region: z75.string().optional()
|
|
6124
6399
|
}).strict();
|
|
6125
6400
|
function getSchemaForVersion10(version) {
|
|
6126
6401
|
if (version === "2025-10-28") return DstackAppListResponseV20251028Schema;
|
|
@@ -6152,9 +6427,9 @@ async function safeGetAppList(client, request) {
|
|
|
6152
6427
|
}
|
|
6153
6428
|
|
|
6154
6429
|
// src/actions/apps/get_app_info.ts
|
|
6155
|
-
import { z as
|
|
6156
|
-
var GetAppInfoRequestSchema =
|
|
6157
|
-
appId:
|
|
6430
|
+
import { z as z76 } from "zod";
|
|
6431
|
+
var GetAppInfoRequestSchema = z76.object({
|
|
6432
|
+
appId: z76.string().min(1)
|
|
6158
6433
|
}).strict();
|
|
6159
6434
|
function getSchemaForVersion11(version) {
|
|
6160
6435
|
if (version === "2025-10-28") return DstackAppWithCvmResponseV20251028Schema;
|
|
@@ -6186,14 +6461,14 @@ async function safeGetAppInfo(client, request) {
|
|
|
6186
6461
|
}
|
|
6187
6462
|
|
|
6188
6463
|
// src/actions/apps/get_app_cvms.ts
|
|
6189
|
-
import { z as
|
|
6190
|
-
var GetAppCvmsRequestSchema =
|
|
6191
|
-
appId:
|
|
6464
|
+
import { z as z77 } from "zod";
|
|
6465
|
+
var GetAppCvmsRequestSchema = z77.object({
|
|
6466
|
+
appId: z77.string().min(1)
|
|
6192
6467
|
}).strict();
|
|
6193
6468
|
function getSchemaForVersion12(version) {
|
|
6194
|
-
if (version === "2025-10-28") return
|
|
6195
|
-
if (version === "2026-01-21") return
|
|
6196
|
-
return
|
|
6469
|
+
if (version === "2025-10-28") return z77.array(CvmInfoV20251028Schema);
|
|
6470
|
+
if (version === "2026-01-21") return z77.array(CvmInfoV20260121Schema);
|
|
6471
|
+
return z77.array(CvmInfoV20260522Schema);
|
|
6197
6472
|
}
|
|
6198
6473
|
async function getAppCvms(client, request) {
|
|
6199
6474
|
const { appId } = GetAppCvmsRequestSchema.parse(request);
|
|
@@ -6220,17 +6495,17 @@ async function safeGetAppCvms(client, request) {
|
|
|
6220
6495
|
}
|
|
6221
6496
|
|
|
6222
6497
|
// src/actions/apps/create_app_instance.ts
|
|
6223
|
-
import { z as
|
|
6224
|
-
var CreateAppInstanceRequestSchema =
|
|
6225
|
-
appId:
|
|
6226
|
-
name:
|
|
6227
|
-
node_id:
|
|
6228
|
-
docker_compose_file:
|
|
6229
|
-
pre_launch_script:
|
|
6230
|
-
encrypted_env:
|
|
6231
|
-
compose_hash:
|
|
6232
|
-
token:
|
|
6233
|
-
transaction_hash:
|
|
6498
|
+
import { z as z78 } from "zod";
|
|
6499
|
+
var CreateAppInstanceRequestSchema = z78.object({
|
|
6500
|
+
appId: z78.string().min(1),
|
|
6501
|
+
name: z78.string().optional(),
|
|
6502
|
+
node_id: z78.number().optional(),
|
|
6503
|
+
docker_compose_file: z78.string().optional(),
|
|
6504
|
+
pre_launch_script: z78.string().optional(),
|
|
6505
|
+
encrypted_env: z78.string().optional(),
|
|
6506
|
+
compose_hash: z78.string().optional(),
|
|
6507
|
+
token: z78.string().optional(),
|
|
6508
|
+
transaction_hash: z78.string().optional()
|
|
6234
6509
|
}).strict();
|
|
6235
6510
|
var { action: createAppInstance, safeAction: safeCreateAppInstance } = defineAction(VMSchema, async (client, request) => {
|
|
6236
6511
|
const parsed = CreateAppInstanceRequestSchema.parse(request);
|
|
@@ -6239,36 +6514,36 @@ var { action: createAppInstance, safeAction: safeCreateAppInstance } = defineAct
|
|
|
6239
6514
|
});
|
|
6240
6515
|
|
|
6241
6516
|
// src/actions/apps/get_app_device_allowlist.ts
|
|
6242
|
-
import { z as
|
|
6243
|
-
var DeviceAllowlistItemBaseSchema =
|
|
6244
|
-
device_id:
|
|
6245
|
-
node_name:
|
|
6246
|
-
allowed_onchain:
|
|
6247
|
-
status:
|
|
6517
|
+
import { z as z79 } from "zod";
|
|
6518
|
+
var DeviceAllowlistItemBaseSchema = z79.object({
|
|
6519
|
+
device_id: z79.string(),
|
|
6520
|
+
node_name: z79.string().nullable(),
|
|
6521
|
+
allowed_onchain: z79.boolean(),
|
|
6522
|
+
status: z79.string()
|
|
6248
6523
|
});
|
|
6249
6524
|
var DeviceAllowlistItemV20260121Schema = DeviceAllowlistItemBaseSchema.extend({
|
|
6250
|
-
cvm_ids:
|
|
6525
|
+
cvm_ids: z79.array(z79.number())
|
|
6251
6526
|
});
|
|
6252
6527
|
var DeviceAllowlistItemV20260522Schema = DeviceAllowlistItemBaseSchema.extend({
|
|
6253
|
-
cvm_ids:
|
|
6528
|
+
cvm_ids: z79.array(z79.string())
|
|
6254
6529
|
});
|
|
6255
|
-
var DeviceAllowlistResponseBaseSchema =
|
|
6256
|
-
is_onchain_kms:
|
|
6257
|
-
allow_any_device:
|
|
6258
|
-
chain_id:
|
|
6259
|
-
app_contract_address:
|
|
6530
|
+
var DeviceAllowlistResponseBaseSchema = z79.object({
|
|
6531
|
+
is_onchain_kms: z79.boolean(),
|
|
6532
|
+
allow_any_device: z79.boolean().nullable().optional(),
|
|
6533
|
+
chain_id: z79.number().nullable().optional(),
|
|
6534
|
+
app_contract_address: z79.string().nullable().optional()
|
|
6260
6535
|
});
|
|
6261
6536
|
var DeviceAllowlistResponseV20260121Schema = DeviceAllowlistResponseBaseSchema.extend({
|
|
6262
|
-
devices:
|
|
6537
|
+
devices: z79.array(DeviceAllowlistItemV20260121Schema).optional().default([])
|
|
6263
6538
|
});
|
|
6264
6539
|
var DeviceAllowlistResponseV20260522Schema = DeviceAllowlistResponseBaseSchema.extend({
|
|
6265
|
-
devices:
|
|
6540
|
+
devices: z79.array(DeviceAllowlistItemV20260522Schema).optional().default([])
|
|
6266
6541
|
});
|
|
6267
|
-
var DeviceAllowlistItemAnySchema =
|
|
6542
|
+
var DeviceAllowlistItemAnySchema = z79.union([
|
|
6268
6543
|
DeviceAllowlistItemV20260121Schema,
|
|
6269
6544
|
DeviceAllowlistItemV20260522Schema
|
|
6270
6545
|
]);
|
|
6271
|
-
var DeviceAllowlistResponseAnySchema =
|
|
6546
|
+
var DeviceAllowlistResponseAnySchema = z79.union([
|
|
6272
6547
|
DeviceAllowlistResponseV20260121Schema,
|
|
6273
6548
|
DeviceAllowlistResponseV20260522Schema
|
|
6274
6549
|
]);
|
|
@@ -6276,8 +6551,8 @@ function getSchemaForVersion13(version) {
|
|
|
6276
6551
|
if (version === "2026-01-21") return DeviceAllowlistResponseV20260121Schema;
|
|
6277
6552
|
return DeviceAllowlistResponseV20260522Schema;
|
|
6278
6553
|
}
|
|
6279
|
-
var GetAppDeviceAllowlistRequestSchema =
|
|
6280
|
-
appId:
|
|
6554
|
+
var GetAppDeviceAllowlistRequestSchema = z79.object({
|
|
6555
|
+
appId: z79.string().min(1)
|
|
6281
6556
|
}).strict();
|
|
6282
6557
|
async function getAppDeviceAllowlist(client, request) {
|
|
6283
6558
|
const { appId } = GetAppDeviceAllowlistRequestSchema.parse(request);
|
|
@@ -6305,11 +6580,11 @@ async function safeGetAppDeviceAllowlist(client, request) {
|
|
|
6305
6580
|
}
|
|
6306
6581
|
|
|
6307
6582
|
// src/actions/apps/get_app_revisions.ts
|
|
6308
|
-
import { z as
|
|
6309
|
-
var GetAppRevisionsRequestSchema =
|
|
6310
|
-
appId:
|
|
6311
|
-
page:
|
|
6312
|
-
page_size:
|
|
6583
|
+
import { z as z80 } from "zod";
|
|
6584
|
+
var GetAppRevisionsRequestSchema = z80.object({
|
|
6585
|
+
appId: z80.string().min(1),
|
|
6586
|
+
page: z80.number().int().min(1).optional(),
|
|
6587
|
+
page_size: z80.number().int().min(1).max(1e3).optional()
|
|
6313
6588
|
}).strict();
|
|
6314
6589
|
async function getAppRevisions(client, request) {
|
|
6315
6590
|
const { appId, ...params } = GetAppRevisionsRequestSchema.parse(request);
|
|
@@ -6335,11 +6610,11 @@ async function safeGetAppRevisions(client, request) {
|
|
|
6335
6610
|
}
|
|
6336
6611
|
|
|
6337
6612
|
// src/actions/apps/get_app_revision_detail.ts
|
|
6338
|
-
import { z as
|
|
6339
|
-
var GetAppRevisionDetailRequestSchema =
|
|
6340
|
-
appId:
|
|
6341
|
-
revisionId:
|
|
6342
|
-
rawComposeFile:
|
|
6613
|
+
import { z as z81 } from "zod";
|
|
6614
|
+
var GetAppRevisionDetailRequestSchema = z81.object({
|
|
6615
|
+
appId: z81.string().min(1),
|
|
6616
|
+
revisionId: z81.string().min(1),
|
|
6617
|
+
rawComposeFile: z81.boolean().optional()
|
|
6343
6618
|
}).strict();
|
|
6344
6619
|
async function getAppRevisionDetail(client, request) {
|
|
6345
6620
|
const { appId, revisionId, rawComposeFile } = GetAppRevisionDetailRequestSchema.parse(request);
|
|
@@ -6366,15 +6641,15 @@ async function safeGetAppRevisionDetail(client, request) {
|
|
|
6366
6641
|
}
|
|
6367
6642
|
|
|
6368
6643
|
// src/actions/apps/get_app_filter_options.ts
|
|
6369
|
-
import { z as
|
|
6370
|
-
var AppFilterOptionsSchema =
|
|
6371
|
-
statuses:
|
|
6372
|
-
image_versions:
|
|
6373
|
-
instance_types:
|
|
6374
|
-
kms_slugs:
|
|
6375
|
-
kms_types:
|
|
6376
|
-
regions:
|
|
6377
|
-
nodes:
|
|
6644
|
+
import { z as z82 } from "zod";
|
|
6645
|
+
var AppFilterOptionsSchema = z82.object({
|
|
6646
|
+
statuses: z82.array(z82.string()),
|
|
6647
|
+
image_versions: z82.array(z82.string()),
|
|
6648
|
+
instance_types: z82.array(z82.string()),
|
|
6649
|
+
kms_slugs: z82.array(z82.string()),
|
|
6650
|
+
kms_types: z82.array(z82.string()),
|
|
6651
|
+
regions: z82.array(z82.string()),
|
|
6652
|
+
nodes: z82.array(z82.string())
|
|
6378
6653
|
});
|
|
6379
6654
|
async function getAppFilterOptions(client) {
|
|
6380
6655
|
const response = await client.get("/apps/filter-options");
|
|
@@ -6399,52 +6674,53 @@ async function safeGetAppFilterOptions(client) {
|
|
|
6399
6674
|
}
|
|
6400
6675
|
|
|
6401
6676
|
// src/actions/apps/get_app_attestation.ts
|
|
6402
|
-
import { z as
|
|
6403
|
-
var KmsInfoSchema2 =
|
|
6404
|
-
contract_address:
|
|
6405
|
-
chain_id:
|
|
6406
|
-
version:
|
|
6407
|
-
url:
|
|
6408
|
-
gateway_app_id:
|
|
6409
|
-
gateway_app_url:
|
|
6410
|
-
kms_type:
|
|
6411
|
-
});
|
|
6412
|
-
var GuestAgentInfoSchema =
|
|
6413
|
-
app_id:
|
|
6414
|
-
instance_id:
|
|
6415
|
-
app_name:
|
|
6416
|
-
device_id:
|
|
6677
|
+
import { z as z83 } from "zod";
|
|
6678
|
+
var KmsInfoSchema2 = z83.object({
|
|
6679
|
+
contract_address: z83.string(),
|
|
6680
|
+
chain_id: z83.number().nullable(),
|
|
6681
|
+
version: z83.string(),
|
|
6682
|
+
url: z83.string(),
|
|
6683
|
+
gateway_app_id: z83.string().nullable(),
|
|
6684
|
+
gateway_app_url: z83.string(),
|
|
6685
|
+
kms_type: z83.string()
|
|
6686
|
+
});
|
|
6687
|
+
var GuestAgentInfoSchema = z83.object({
|
|
6688
|
+
app_id: z83.string().optional(),
|
|
6689
|
+
instance_id: z83.string().optional(),
|
|
6690
|
+
app_name: z83.string().optional(),
|
|
6691
|
+
device_id: z83.string().optional()
|
|
6417
6692
|
}).passthrough().nullable();
|
|
6418
|
-
var AppAttestationInstanceSchema =
|
|
6419
|
-
vm_uuid:
|
|
6420
|
-
name:
|
|
6421
|
-
instance_id:
|
|
6422
|
-
status:
|
|
6423
|
-
image_version:
|
|
6424
|
-
quote:
|
|
6425
|
-
ppid:
|
|
6426
|
-
ppid_sha256:
|
|
6427
|
-
device_id:
|
|
6428
|
-
fmspc:
|
|
6429
|
-
tee_tcb_svn:
|
|
6430
|
-
|
|
6431
|
-
|
|
6693
|
+
var AppAttestationInstanceSchema = z83.object({
|
|
6694
|
+
vm_uuid: z83.string().nullable().optional(),
|
|
6695
|
+
name: z83.string().optional(),
|
|
6696
|
+
instance_id: z83.string().nullable().optional(),
|
|
6697
|
+
status: z83.string().optional(),
|
|
6698
|
+
image_version: z83.string().nullable().optional(),
|
|
6699
|
+
quote: z83.string().nullable().optional(),
|
|
6700
|
+
ppid: z83.string().optional(),
|
|
6701
|
+
ppid_sha256: z83.string().nullable().optional(),
|
|
6702
|
+
device_id: z83.string().optional(),
|
|
6703
|
+
fmspc: z83.string().nullable().optional(),
|
|
6704
|
+
tee_tcb_svn: z83.string().nullable().optional(),
|
|
6705
|
+
mr_config_id: z83.string().nullable().optional(),
|
|
6706
|
+
cpusvn: z83.string().nullable().optional(),
|
|
6707
|
+
pcesvn: z83.number().nullable().optional(),
|
|
6432
6708
|
tcb_info: TcbInfoSchema.nullable().optional(),
|
|
6433
|
-
app_certificates:
|
|
6434
|
-
compose_file:
|
|
6435
|
-
error:
|
|
6709
|
+
app_certificates: z83.array(CertificateSchema).nullable().optional(),
|
|
6710
|
+
compose_file: z83.string().nullable().optional(),
|
|
6711
|
+
error: z83.string().nullable().optional()
|
|
6436
6712
|
});
|
|
6437
|
-
var AppAttestationResponseSchema =
|
|
6438
|
-
app_id:
|
|
6439
|
-
contract_address:
|
|
6713
|
+
var AppAttestationResponseSchema = z83.object({
|
|
6714
|
+
app_id: z83.string(),
|
|
6715
|
+
contract_address: z83.string(),
|
|
6440
6716
|
kms_info: KmsInfoSchema2,
|
|
6441
|
-
instances:
|
|
6717
|
+
instances: z83.array(AppAttestationInstanceSchema),
|
|
6442
6718
|
kms_guest_agent_info: GuestAgentInfoSchema,
|
|
6443
6719
|
gateway_guest_agent_info: GuestAgentInfoSchema,
|
|
6444
|
-
qemu_version:
|
|
6720
|
+
qemu_version: z83.string().nullable()
|
|
6445
6721
|
});
|
|
6446
|
-
var GetAppAttestationRequestSchema =
|
|
6447
|
-
appId:
|
|
6722
|
+
var GetAppAttestationRequestSchema = z83.object({
|
|
6723
|
+
appId: z83.string().min(1)
|
|
6448
6724
|
}).strict();
|
|
6449
6725
|
var { action: getAppAttestation, safeAction: safeGetAppAttestation } = defineAction(AppAttestationResponseSchema, async (client, request) => {
|
|
6450
6726
|
const { appId } = GetAppAttestationRequestSchema.parse(request);
|
|
@@ -6487,7 +6763,10 @@ import {
|
|
|
6487
6763
|
encryptEnvVars as encryptEnvVars2
|
|
6488
6764
|
} from "@phala/dstack-sdk/encrypt-env-vars";
|
|
6489
6765
|
import { getComposeHash as getComposeHash2 } from "@phala/dstack-sdk/get-compose-hash";
|
|
6490
|
-
import {
|
|
6766
|
+
import {
|
|
6767
|
+
verifyEnvEncryptPublicKey,
|
|
6768
|
+
verifyEnvEncryptPublicKeyLegacy
|
|
6769
|
+
} from "@phala/dstack-sdk/verify-env-encrypt-public-key";
|
|
6491
6770
|
export {
|
|
6492
6771
|
AddComposeHashSchema,
|
|
6493
6772
|
AddDeviceSchema,
|
|
@@ -6539,6 +6818,8 @@ export {
|
|
|
6539
6818
|
CvmCreateResourceGraphV20260522Schema,
|
|
6540
6819
|
CvmDetailV20251028Schema,
|
|
6541
6820
|
CvmGatewayInfoV20260121Schema,
|
|
6821
|
+
CvmGpuRentalOrderInfoV20260121Schema,
|
|
6822
|
+
CvmHourlyRateV20260121Schema,
|
|
6542
6823
|
CvmIdBaseSchema,
|
|
6543
6824
|
CvmIdObjectSchema,
|
|
6544
6825
|
CvmIdSchema,
|
|
@@ -6557,6 +6838,7 @@ export {
|
|
|
6557
6838
|
CvmProgressInfoV20260121Schema,
|
|
6558
6839
|
CvmRefSchema,
|
|
6559
6840
|
CvmResourceInfoV20260121Schema,
|
|
6841
|
+
CvmResourceUsageSchema,
|
|
6560
6842
|
CvmStateSchema,
|
|
6561
6843
|
CvmStatusSchema,
|
|
6562
6844
|
CvmSystemInfoSchema,
|
|
@@ -6565,6 +6847,7 @@ export {
|
|
|
6565
6847
|
DeleteSshKeyRequestSchema,
|
|
6566
6848
|
DeployAppAuthRequestSchema,
|
|
6567
6849
|
DeployAppAuthSchema,
|
|
6850
|
+
DeviceIdEntrySchema,
|
|
6568
6851
|
DstackAppFullResponseV20251028Schema,
|
|
6569
6852
|
DstackAppFullResponseV20260121Schema,
|
|
6570
6853
|
DstackAppFullResponseV20260522Schema,
|
|
@@ -6603,6 +6886,7 @@ export {
|
|
|
6603
6886
|
GetCvmStatusBatchRequestSchema,
|
|
6604
6887
|
GetCvmStatusBatchResponseSchema,
|
|
6605
6888
|
GetCvmUserConfigRequestSchema,
|
|
6889
|
+
GetKmsContractRequestSchema,
|
|
6606
6890
|
GetKmsInfoRequestSchema,
|
|
6607
6891
|
GetKmsListRequestSchema,
|
|
6608
6892
|
GetKmsListSchema,
|
|
@@ -6619,9 +6903,15 @@ export {
|
|
|
6619
6903
|
InstanceIdRefreshResultSchema,
|
|
6620
6904
|
InstanceTypeSchema,
|
|
6621
6905
|
IsAllowedResultSchema,
|
|
6906
|
+
KmsContractInfoSchema,
|
|
6907
|
+
KmsContractNodeSchema,
|
|
6622
6908
|
KmsInfoSchema,
|
|
6623
6909
|
KmsTypeSchema,
|
|
6624
6910
|
ListFamilyInstanceTypesRequestSchema,
|
|
6911
|
+
ListKmsContractNodesRequestSchema,
|
|
6912
|
+
ListKmsContractNodesSchema,
|
|
6913
|
+
ListKmsContractsRequestSchema,
|
|
6914
|
+
ListKmsContractsSchema,
|
|
6625
6915
|
ListSshKeysResponseSchema,
|
|
6626
6916
|
ListWorkspacesSchema,
|
|
6627
6917
|
LooseAppComposeSchema,
|
|
@@ -6740,6 +7030,7 @@ export {
|
|
|
6740
7030
|
extractNetworkClients,
|
|
6741
7031
|
formatErrorMessage,
|
|
6742
7032
|
formatStructuredError,
|
|
7033
|
+
formatStructuredErrorDetailValue,
|
|
6743
7034
|
formatValidationErrors,
|
|
6744
7035
|
generateDefaultCvmName,
|
|
6745
7036
|
generateFallbackHostname,
|
|
@@ -6771,9 +7062,12 @@ export {
|
|
|
6771
7062
|
getCvmStatusBatch,
|
|
6772
7063
|
getCvmUserConfig,
|
|
6773
7064
|
getErrorMessage,
|
|
7065
|
+
getKmsContract,
|
|
6774
7066
|
getKmsInfo,
|
|
6775
7067
|
getKmsList,
|
|
6776
7068
|
getKmsOnChainDetail,
|
|
7069
|
+
getMrConfigId,
|
|
7070
|
+
getMrConfigIdV1,
|
|
6777
7071
|
getOsImages,
|
|
6778
7072
|
getPreLaunchScriptUpgradeStatus,
|
|
6779
7073
|
getVMSchemaForVersion,
|
|
@@ -6787,6 +7081,8 @@ export {
|
|
|
6787
7081
|
isValidHostname,
|
|
6788
7082
|
listAllInstanceTypeFamilies,
|
|
6789
7083
|
listFamilyInstanceTypes,
|
|
7084
|
+
listKmsContractNodes,
|
|
7085
|
+
listKmsContracts,
|
|
6790
7086
|
listSshKeys,
|
|
6791
7087
|
listWorkspaces,
|
|
6792
7088
|
nextAppIds,
|
|
@@ -6846,6 +7142,7 @@ export {
|
|
|
6846
7142
|
safeGetCvmStats,
|
|
6847
7143
|
safeGetCvmStatusBatch,
|
|
6848
7144
|
safeGetCvmUserConfig,
|
|
7145
|
+
safeGetKmsContract,
|
|
6849
7146
|
safeGetKmsInfo,
|
|
6850
7147
|
safeGetKmsList,
|
|
6851
7148
|
safeGetKmsOnChainDetail,
|
|
@@ -6857,6 +7154,8 @@ export {
|
|
|
6857
7154
|
safeImportGithubProfileSshKeys,
|
|
6858
7155
|
safeListAllInstanceTypeFamilies,
|
|
6859
7156
|
safeListFamilyInstanceTypes,
|
|
7157
|
+
safeListKmsContractNodes,
|
|
7158
|
+
safeListKmsContracts,
|
|
6860
7159
|
safeListSshKeys,
|
|
6861
7160
|
safeListWorkspaces,
|
|
6862
7161
|
safeNextAppIds,
|
|
@@ -6899,6 +7198,8 @@ export {
|
|
|
6899
7198
|
validateComposePayloadSize,
|
|
6900
7199
|
validateNetworkPrerequisites,
|
|
6901
7200
|
verifyEnvEncryptPublicKey,
|
|
7201
|
+
verifyEnvEncryptPublicKeyLegacy,
|
|
7202
|
+
verifyMrConfigId,
|
|
6902
7203
|
waitForTransactionReceipt,
|
|
6903
7204
|
watchCvmState,
|
|
6904
7205
|
withComposeMethods
|