@ornncompute/cli 1.0.115 → 1.0.117
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/package.json +1 -1
- package/src/api-client.mjs +3 -3
- package/src/evidence-commands.mjs +22 -20
- package/src/external-bucket-commands.mjs +16 -20
- package/src/kubernetes-commands.mjs +52 -52
- package/src/mount-commands.mjs +19 -30
- package/src/vm-commands.mjs +21 -25
- package/vendor/api-client/commerce.js +60 -6
- package/vendor/api-client/gateway.js +363 -0
- package/vendor/capabilities/cli.js +173 -94
|
@@ -93,19 +93,19 @@ var listingPath = (id) => `${BASE}/${encodeURIComponent(id)}`;
|
|
|
93
93
|
var termsPath = (id) => `${listingPath(id)}/terms`;
|
|
94
94
|
var replayHeaders = (key) => key ? { headers: { "Idempotency-Key": key } } : {};
|
|
95
95
|
function listCapacityListings(request, input = {}, signal) {
|
|
96
|
-
const
|
|
96
|
+
const query3 = new URLSearchParams();
|
|
97
97
|
for (const [key, value] of Object.entries(input)) {
|
|
98
98
|
if (value == null || value === "")
|
|
99
99
|
continue;
|
|
100
100
|
if (key === "sortLabels" || key === "searchTokens")
|
|
101
|
-
|
|
101
|
+
query3.set(key, JSON.stringify(value));
|
|
102
102
|
else if (Array.isArray(value)) {
|
|
103
103
|
if (value.length)
|
|
104
|
-
|
|
104
|
+
query3.set(key, value.join(","));
|
|
105
105
|
} else
|
|
106
|
-
|
|
106
|
+
query3.set(key, String(value));
|
|
107
107
|
}
|
|
108
|
-
const search =
|
|
108
|
+
const search = query3.toString();
|
|
109
109
|
return request(`${BASE}${search ? `?${search}` : ""}`, {
|
|
110
110
|
method: "GET",
|
|
111
111
|
...signal ? { signal } : {}
|
|
@@ -138,17 +138,17 @@ function editCapacityTerms(request, id, termId, body2, idempotencyKey) {
|
|
|
138
138
|
var BASE2 = "/commerce/reservations";
|
|
139
139
|
var reservationPath = (id) => `${BASE2}/${encodeURIComponent(id)}`;
|
|
140
140
|
function listReservations(request, input = {}, signal) {
|
|
141
|
-
const
|
|
141
|
+
const query3 = new URLSearchParams();
|
|
142
142
|
for (const [key, value] of Object.entries(input)) {
|
|
143
143
|
if (value == null || value === "")
|
|
144
144
|
continue;
|
|
145
145
|
if (Array.isArray(value)) {
|
|
146
146
|
if (value.length)
|
|
147
|
-
|
|
147
|
+
query3.set(key, value.join(","));
|
|
148
148
|
} else
|
|
149
|
-
|
|
149
|
+
query3.set(key, String(value));
|
|
150
150
|
}
|
|
151
|
-
const search =
|
|
151
|
+
const search = query3.toString();
|
|
152
152
|
return request(`${BASE2}${search ? `?${search}` : ""}`, {
|
|
153
153
|
method: "GET",
|
|
154
154
|
...signal ? { signal } : {}
|
|
@@ -182,11 +182,11 @@ function listReservationInvoices(request, id, signal) {
|
|
|
182
182
|
|
|
183
183
|
// ../../packages/api-client/dist/commerce/query.js
|
|
184
184
|
function queryString(input) {
|
|
185
|
-
const
|
|
185
|
+
const query3 = new URLSearchParams();
|
|
186
186
|
for (const [key, value] of Object.entries(input))
|
|
187
187
|
if (value !== void 0 && value !== null && value !== "")
|
|
188
|
-
|
|
189
|
-
const search =
|
|
188
|
+
query3.set(key, String(value));
|
|
189
|
+
const search = query3.toString();
|
|
190
190
|
return search ? `?${search}` : "";
|
|
191
191
|
}
|
|
192
192
|
|
|
@@ -238,17 +238,17 @@ function ensureFacility(request, body2) {
|
|
|
238
238
|
|
|
239
239
|
// ../../packages/api-client/dist/authorization/paths.js
|
|
240
240
|
function withQuery(path, values) {
|
|
241
|
-
const
|
|
241
|
+
const query3 = new URLSearchParams();
|
|
242
242
|
for (const [key, value] of Object.entries(values)) {
|
|
243
243
|
if (value !== void 0 && value !== null && value !== "")
|
|
244
|
-
|
|
244
|
+
query3.set(key, Array.isArray(value) ? value.join(",") : String(value));
|
|
245
245
|
}
|
|
246
|
-
return
|
|
246
|
+
return query3.size ? `${path}?${query3}` : path;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
// ../../packages/api-client/dist/authorization/organizations.js
|
|
250
|
-
function listOrganizations(request,
|
|
251
|
-
return request(withQuery("/v1/organizations",
|
|
250
|
+
function listOrganizations(request, query3 = {}, signal) {
|
|
251
|
+
return request(withQuery("/v1/organizations", query3), { method: "GET", signal });
|
|
252
252
|
}
|
|
253
253
|
async function listSupplierOrganizations(request, signal) {
|
|
254
254
|
const rows = [];
|
|
@@ -575,12 +575,12 @@ var fleetCapabilities = [
|
|
|
575
575
|
var base = "/v1/observability";
|
|
576
576
|
var nodePath = (id) => `${base}/nodes/${encodeURIComponent(id)}`;
|
|
577
577
|
function queryPath2(path, input) {
|
|
578
|
-
const
|
|
578
|
+
const query3 = new URLSearchParams();
|
|
579
579
|
for (const [key, value] of Object.entries(input)) {
|
|
580
580
|
if (value !== void 0)
|
|
581
|
-
|
|
581
|
+
query3.set(key, String(value));
|
|
582
582
|
}
|
|
583
|
-
return
|
|
583
|
+
return query3.size ? `${path}?${query3}` : path;
|
|
584
584
|
}
|
|
585
585
|
function getNodeLatestTelemetry(request, id, input = {}, signal) {
|
|
586
586
|
return request(queryPath2(`${nodePath(id)}/telemetry/latest`, input), {
|
|
@@ -617,11 +617,11 @@ function nodeLogsSubscribePath(id, stream) {
|
|
|
617
617
|
// ../../packages/capabilities/dist/capabilities/observability.js
|
|
618
618
|
import { z as z3 } from "zod";
|
|
619
619
|
function tailPath(path, input) {
|
|
620
|
-
const
|
|
620
|
+
const query3 = new URLSearchParams({
|
|
621
621
|
duration: String(input.duration ?? 20),
|
|
622
622
|
max_events: String(input.max_events ?? 40)
|
|
623
623
|
});
|
|
624
|
-
return `${path}${path.includes("?") ? "&" : "?"}${
|
|
624
|
+
return `${path}${path.includes("?") ? "&" : "?"}${query3}`;
|
|
625
625
|
}
|
|
626
626
|
var latestInput = z3.object({
|
|
627
627
|
node_id: z3.string().min(1),
|
|
@@ -1029,13 +1029,13 @@ var usersListInput = z5.object({
|
|
|
1029
1029
|
function directoryMembers(organization) {
|
|
1030
1030
|
return organization.members ?? [];
|
|
1031
1031
|
}
|
|
1032
|
-
function organizationMatchesQuery(organization,
|
|
1033
|
-
return organization.name.toLowerCase().includes(
|
|
1032
|
+
function organizationMatchesQuery(organization, query3) {
|
|
1033
|
+
return organization.name.toLowerCase().includes(query3) || organization.id.toLowerCase() === query3 || [
|
|
1034
1034
|
organization.company_profile?.company_name,
|
|
1035
1035
|
organization.company_profile?.contact_name,
|
|
1036
1036
|
organization.company_profile?.contact_email,
|
|
1037
1037
|
organization.company_profile?.work_email
|
|
1038
|
-
].some((value) => value?.toLowerCase().includes(
|
|
1038
|
+
].some((value) => value?.toLowerCase().includes(query3));
|
|
1039
1039
|
}
|
|
1040
1040
|
var organizationListCapability = defineCapability({
|
|
1041
1041
|
id: "organization.list",
|
|
@@ -1954,8 +1954,8 @@ var HARDWARE_LISTING_FILTERS = [
|
|
|
1954
1954
|
{ field: "cpu", kind: "cpu" },
|
|
1955
1955
|
{ field: "fabric", kind: "link" }
|
|
1956
1956
|
];
|
|
1957
|
-
function looksLikeSpecDump(
|
|
1958
|
-
const trimmed =
|
|
1957
|
+
function looksLikeSpecDump(query3) {
|
|
1958
|
+
const trimmed = query3.trim();
|
|
1959
1959
|
if (!trimmed)
|
|
1960
1960
|
return false;
|
|
1961
1961
|
if ([...trimmed].length > 72)
|
|
@@ -2004,11 +2004,11 @@ function gpuDisplay(terms, slug) {
|
|
|
2004
2004
|
return "";
|
|
2005
2005
|
return terms.find((term) => term.kind === "gpu" && term.canonical === slug)?.display ?? UNKNOWN_GPU;
|
|
2006
2006
|
}
|
|
2007
|
-
function resolveCatalogTerm(terms, kind,
|
|
2008
|
-
if (looksLikeSpecDump(
|
|
2007
|
+
function resolveCatalogTerm(terms, kind, query3) {
|
|
2008
|
+
if (looksLikeSpecDump(query3) || !normalizeCatalogQuery(query3) || !kind.trim()) {
|
|
2009
2009
|
return { canonical: null, display: null, hint: UNRESOLVED_CATALOG_HINT };
|
|
2010
2010
|
}
|
|
2011
|
-
const needle = normalizeCatalogQuery(
|
|
2011
|
+
const needle = normalizeCatalogQuery(query3);
|
|
2012
2012
|
for (const term of terms) {
|
|
2013
2013
|
if (term.kind.toLowerCase() !== kind.toLowerCase())
|
|
2014
2014
|
continue;
|
|
@@ -3181,6 +3181,101 @@ var billingCapabilities = [
|
|
|
3181
3181
|
})
|
|
3182
3182
|
];
|
|
3183
3183
|
|
|
3184
|
+
// ../../packages/api-client/dist/gateway/compute.js
|
|
3185
|
+
var compute = "/v1/workflows/compute";
|
|
3186
|
+
function query2(input) {
|
|
3187
|
+
const params = new URLSearchParams();
|
|
3188
|
+
for (const [key, value] of Object.entries(input))
|
|
3189
|
+
if (value !== void 0 && value !== null)
|
|
3190
|
+
params.set(key, String(value));
|
|
3191
|
+
return params.size ? `?${params}` : "";
|
|
3192
|
+
}
|
|
3193
|
+
function reservationPath2(id, resource) {
|
|
3194
|
+
return `${compute}/nodes/reservations/${encodeURIComponent(id)}/${resource}`;
|
|
3195
|
+
}
|
|
3196
|
+
function clusterPath(kind, id, resource) {
|
|
3197
|
+
return `${compute}/${kind}/reservations/${encodeURIComponent(id)}/${resource}`;
|
|
3198
|
+
}
|
|
3199
|
+
function listClusters(request) {
|
|
3200
|
+
return request(`${compute}/clusters`, { method: "GET" });
|
|
3201
|
+
}
|
|
3202
|
+
function getReservationCluster(request, kind, id, signal) {
|
|
3203
|
+
return request(clusterPath(kind, id, "cluster"), {
|
|
3204
|
+
method: "GET",
|
|
3205
|
+
...signal ? { signal } : {}
|
|
3206
|
+
});
|
|
3207
|
+
}
|
|
3208
|
+
function getReservationClusterCredentials(request, kind, id, signal) {
|
|
3209
|
+
return request(clusterPath(kind, id, "credentials"), {
|
|
3210
|
+
method: "GET",
|
|
3211
|
+
...signal ? { signal } : {}
|
|
3212
|
+
});
|
|
3213
|
+
}
|
|
3214
|
+
function teardownReservationCluster(request, kind, id, options) {
|
|
3215
|
+
return request(clusterPath(kind, id, "cluster/teardown"), { ...options, method: "POST" });
|
|
3216
|
+
}
|
|
3217
|
+
function getReservationLiveMetrics(request, id, input, signal) {
|
|
3218
|
+
return request(`${reservationPath2(id, "live-metrics")}${query2(input)}`, {
|
|
3219
|
+
method: "GET",
|
|
3220
|
+
...signal ? { signal } : {}
|
|
3221
|
+
});
|
|
3222
|
+
}
|
|
3223
|
+
function getReservationTelemetryHistory(request, id, input, signal) {
|
|
3224
|
+
return request(`${reservationPath2(id, "telemetry-history")}${query2(input)}`, {
|
|
3225
|
+
method: "GET",
|
|
3226
|
+
...signal ? { signal } : {}
|
|
3227
|
+
});
|
|
3228
|
+
}
|
|
3229
|
+
function deployReservationStorage(request, id, body2, options) {
|
|
3230
|
+
return request(reservationPath2(id, "storage-deployment"), { ...options, method: "POST", body: body2 });
|
|
3231
|
+
}
|
|
3232
|
+
function getReservationStorageAttachment(request, id, signal) {
|
|
3233
|
+
return request(reservationPath2(id, "storage-attachment"), {
|
|
3234
|
+
method: "GET",
|
|
3235
|
+
...signal ? { signal } : {}
|
|
3236
|
+
});
|
|
3237
|
+
}
|
|
3238
|
+
function detachReservationStorage(request, id, input = {}, options) {
|
|
3239
|
+
return request(`${reservationPath2(id, "storage-attachment")}${query2(input)}`, {
|
|
3240
|
+
...options,
|
|
3241
|
+
method: "DELETE"
|
|
3242
|
+
});
|
|
3243
|
+
}
|
|
3244
|
+
function listAccountSshKeys(request, input) {
|
|
3245
|
+
return request(`${compute}/nodes/organizations/me/ssh-keys${query2(input)}`, { method: "GET" });
|
|
3246
|
+
}
|
|
3247
|
+
function createAccountSshKey(request, body2, options) {
|
|
3248
|
+
return request(`${compute}/nodes/organizations/me/ssh-keys`, {
|
|
3249
|
+
...options,
|
|
3250
|
+
method: "POST",
|
|
3251
|
+
body: body2
|
|
3252
|
+
});
|
|
3253
|
+
}
|
|
3254
|
+
function deleteAccountSshKey(request, id, options) {
|
|
3255
|
+
return request(`${compute}/nodes/organizations/me/ssh-keys/${encodeURIComponent(id)}`, {
|
|
3256
|
+
...options,
|
|
3257
|
+
method: "DELETE"
|
|
3258
|
+
});
|
|
3259
|
+
}
|
|
3260
|
+
function listClusterUserKeys(request, input) {
|
|
3261
|
+
return request(`${compute}/nodes/organizations/me/cluster-users${query2(input)}`, {
|
|
3262
|
+
method: "GET"
|
|
3263
|
+
});
|
|
3264
|
+
}
|
|
3265
|
+
function createClusterUserKey(request, body2) {
|
|
3266
|
+
return request(`${compute}/nodes/organizations/me/cluster-users`, { method: "POST", body: body2 });
|
|
3267
|
+
}
|
|
3268
|
+
function deleteClusterUserKey(request, id) {
|
|
3269
|
+
return request(`${compute}/nodes/organizations/me/cluster-users/${encodeURIComponent(id)}`, {
|
|
3270
|
+
method: "DELETE"
|
|
3271
|
+
});
|
|
3272
|
+
}
|
|
3273
|
+
|
|
3274
|
+
// ../../packages/api-client/dist/gateway/index.js
|
|
3275
|
+
function getCliStatus(request) {
|
|
3276
|
+
return request("/v1/cli/status", { method: "GET" });
|
|
3277
|
+
}
|
|
3278
|
+
|
|
3184
3279
|
// ../../packages/capabilities/dist/capabilities/compute.js
|
|
3185
3280
|
import { z as z17 } from "zod";
|
|
3186
3281
|
var positionals2 = z17.array(z17.string()).default([]);
|
|
@@ -3693,12 +3788,6 @@ var CLUSTER_USERS_ROUTE = `${NODES_ROUTE}/organizations/me/cluster-users`;
|
|
|
3693
3788
|
function reservationNodesRoute(reservationId, suffix) {
|
|
3694
3789
|
return `${NODES_ROUTE}/reservations/${encodeURIComponent(reservationId)}/${suffix}`;
|
|
3695
3790
|
}
|
|
3696
|
-
function pagedQuery(input) {
|
|
3697
|
-
const query2 = new URLSearchParams({ status: "all", limit: String(input.limit ?? 25) });
|
|
3698
|
-
if (input.cursor)
|
|
3699
|
-
query2.set("cursor", input.cursor);
|
|
3700
|
-
return query2.toString();
|
|
3701
|
-
}
|
|
3702
3791
|
var pageInput = z17.object({
|
|
3703
3792
|
limit: z17.number().int().min(1).max(500).optional(),
|
|
3704
3793
|
cursor: z17.string().optional()
|
|
@@ -3853,7 +3942,11 @@ var accessVerbCapabilities = [
|
|
|
3853
3942
|
http: { method: "GET", path: ORG_SSH_KEYS_ROUTE },
|
|
3854
3943
|
input: pageInput,
|
|
3855
3944
|
slack: false,
|
|
3856
|
-
execute: (ctx, input) => ctx.fetch
|
|
3945
|
+
execute: (ctx, input) => listAccountSshKeys(ctx.fetch, {
|
|
3946
|
+
status: "all",
|
|
3947
|
+
limit: input.limit ?? 25,
|
|
3948
|
+
...input.cursor ? { cursor: input.cursor } : {}
|
|
3949
|
+
})
|
|
3857
3950
|
}),
|
|
3858
3951
|
defineCapability({
|
|
3859
3952
|
id: "ssh_keys.add",
|
|
@@ -3864,9 +3957,9 @@ var accessVerbCapabilities = [
|
|
|
3864
3957
|
http: { method: "POST", path: ORG_SSH_KEYS_ROUTE },
|
|
3865
3958
|
input: publicKeyInput,
|
|
3866
3959
|
slack: false,
|
|
3867
|
-
execute: (ctx, input) => ctx.fetch
|
|
3868
|
-
|
|
3869
|
-
|
|
3960
|
+
execute: (ctx, input) => createAccountSshKey(ctx.fetch, {
|
|
3961
|
+
public_key: input.publicKey,
|
|
3962
|
+
label: input.label
|
|
3870
3963
|
})
|
|
3871
3964
|
}),
|
|
3872
3965
|
defineCapability({
|
|
@@ -3878,9 +3971,7 @@ var accessVerbCapabilities = [
|
|
|
3878
3971
|
http: { method: "DELETE", path: `${ORG_SSH_KEYS_ROUTE}/{keyId}` },
|
|
3879
3972
|
input: keyIdInput,
|
|
3880
3973
|
slack: false,
|
|
3881
|
-
execute: async (ctx, input) => await ctx.fetch
|
|
3882
|
-
method: "DELETE"
|
|
3883
|
-
}) ?? { deleted: true }
|
|
3974
|
+
execute: async (ctx, input) => await deleteAccountSshKey(ctx.fetch, input.keyId) ?? { deleted: true }
|
|
3884
3975
|
}),
|
|
3885
3976
|
defineCapability({
|
|
3886
3977
|
id: "cluster_users.list",
|
|
@@ -3891,7 +3982,11 @@ var accessVerbCapabilities = [
|
|
|
3891
3982
|
http: { method: "GET", path: CLUSTER_USERS_ROUTE },
|
|
3892
3983
|
input: pageInput,
|
|
3893
3984
|
slack: false,
|
|
3894
|
-
execute: (ctx, input) => ctx.fetch
|
|
3985
|
+
execute: (ctx, input) => listClusterUserKeys(ctx.fetch, {
|
|
3986
|
+
status: "all",
|
|
3987
|
+
limit: input.limit ?? 25,
|
|
3988
|
+
...input.cursor ? { cursor: input.cursor } : {}
|
|
3989
|
+
})
|
|
3895
3990
|
}),
|
|
3896
3991
|
defineCapability({
|
|
3897
3992
|
id: "cluster_users.add",
|
|
@@ -3902,9 +3997,9 @@ var accessVerbCapabilities = [
|
|
|
3902
3997
|
http: { method: "POST", path: CLUSTER_USERS_ROUTE },
|
|
3903
3998
|
input: publicKeyInput,
|
|
3904
3999
|
slack: false,
|
|
3905
|
-
execute: (ctx, input) => ctx.fetch
|
|
3906
|
-
|
|
3907
|
-
|
|
4000
|
+
execute: (ctx, input) => createClusterUserKey(ctx.fetch, {
|
|
4001
|
+
public_key: input.publicKey,
|
|
4002
|
+
label: input.label
|
|
3908
4003
|
})
|
|
3909
4004
|
}),
|
|
3910
4005
|
defineCapability({
|
|
@@ -3916,9 +4011,7 @@ var accessVerbCapabilities = [
|
|
|
3916
4011
|
http: { method: "DELETE", path: `${CLUSTER_USERS_ROUTE}/{keyId}` },
|
|
3917
4012
|
input: keyIdInput,
|
|
3918
4013
|
slack: false,
|
|
3919
|
-
execute: async (ctx, input) => await ctx.fetch
|
|
3920
|
-
method: "DELETE"
|
|
3921
|
-
}) ?? { deleted: true }
|
|
4014
|
+
execute: async (ctx, input) => await deleteClusterUserKey(ctx.fetch, input.keyId) ?? { deleted: true }
|
|
3922
4015
|
})
|
|
3923
4016
|
];
|
|
3924
4017
|
var machinePushKeysCapability = defineCapability({
|
|
@@ -3952,7 +4045,9 @@ var machineMetricsCapabilities = [
|
|
|
3952
4045
|
input: z17.object({ reservationId: z17.string(), machineId: z17.string() }),
|
|
3953
4046
|
mcp: false,
|
|
3954
4047
|
slack: false,
|
|
3955
|
-
execute: (ctx, input) => ctx.fetch
|
|
4048
|
+
execute: (ctx, input) => getReservationLiveMetrics(ctx.fetch, input.reservationId, {
|
|
4049
|
+
machine_id: input.machineId
|
|
4050
|
+
})
|
|
3956
4051
|
}),
|
|
3957
4052
|
defineCapability({
|
|
3958
4053
|
id: "machine.telemetry_history",
|
|
@@ -3970,18 +4065,12 @@ var machineMetricsCapabilities = [
|
|
|
3970
4065
|
}),
|
|
3971
4066
|
mcp: false,
|
|
3972
4067
|
slack: false,
|
|
3973
|
-
execute: (ctx, input) => {
|
|
3974
|
-
|
|
3975
|
-
|
|
3976
|
-
|
|
3977
|
-
|
|
3978
|
-
|
|
3979
|
-
if (input.maxPoints !== void 0)
|
|
3980
|
-
query2.set("max_points", String(input.maxPoints));
|
|
3981
|
-
return ctx.fetch(`${reservationNodesRoute(input.reservationId, "telemetry-history")}?${query2}`, {
|
|
3982
|
-
method: "GET"
|
|
3983
|
-
});
|
|
3984
|
-
}
|
|
4068
|
+
execute: (ctx, input) => getReservationTelemetryHistory(ctx.fetch, input.reservationId, {
|
|
4069
|
+
machine_id: input.machineId,
|
|
4070
|
+
start: input.start || void 0,
|
|
4071
|
+
end: input.end || void 0,
|
|
4072
|
+
max_points: input.maxPoints
|
|
4073
|
+
})
|
|
3985
4074
|
})
|
|
3986
4075
|
];
|
|
3987
4076
|
|
|
@@ -4360,9 +4449,6 @@ var controllerNode = z20.object({
|
|
|
4360
4449
|
nodeId: z20.string(),
|
|
4361
4450
|
confirm: z20.boolean().optional()
|
|
4362
4451
|
});
|
|
4363
|
-
function reservationClusterPath(input, suffix) {
|
|
4364
|
-
return `/v1/workflows/compute/${input.type}/reservations/${encodeURIComponent(input.reservationId)}/${suffix}`;
|
|
4365
|
-
}
|
|
4366
4452
|
function controllerNodePath(input) {
|
|
4367
4453
|
return `/v1/orchestrator/controllers/${encodeURIComponent(input.controllerId)}/nodes/${encodeURIComponent(input.nodeId)}`;
|
|
4368
4454
|
}
|
|
@@ -4377,7 +4463,7 @@ var clusterCapabilities = [
|
|
|
4377
4463
|
input: z20.object({}),
|
|
4378
4464
|
mcp: { name: "clusters_list" },
|
|
4379
4465
|
slack: false,
|
|
4380
|
-
execute: (ctx) => ctx.fetch
|
|
4466
|
+
execute: (ctx) => listClusters(ctx.fetch)
|
|
4381
4467
|
}),
|
|
4382
4468
|
defineCapability({
|
|
4383
4469
|
id: "cluster.reservations.list",
|
|
@@ -4439,7 +4525,7 @@ var clusterCapabilities = [
|
|
|
4439
4525
|
input: reservationCluster,
|
|
4440
4526
|
mcp: { name: "clusters_show" },
|
|
4441
4527
|
slack: false,
|
|
4442
|
-
execute: (ctx, input) => ctx.fetch
|
|
4528
|
+
execute: (ctx, input) => getReservationCluster(ctx.fetch, input.type, input.reservationId)
|
|
4443
4529
|
}),
|
|
4444
4530
|
defineCapability({
|
|
4445
4531
|
id: "cluster.credentials",
|
|
@@ -4454,7 +4540,7 @@ var clusterCapabilities = [
|
|
|
4454
4540
|
input: reservationCluster,
|
|
4455
4541
|
mcp: { name: "clusters_credentials" },
|
|
4456
4542
|
slack: false,
|
|
4457
|
-
execute: (ctx, input) => ctx.fetch
|
|
4543
|
+
execute: (ctx, input) => getReservationClusterCredentials(ctx.fetch, input.type, input.reservationId)
|
|
4458
4544
|
}),
|
|
4459
4545
|
defineCapability({
|
|
4460
4546
|
id: "cluster.kubeconfig",
|
|
@@ -4470,7 +4556,7 @@ var clusterCapabilities = [
|
|
|
4470
4556
|
mcp: { name: "clusters_kubeconfig" },
|
|
4471
4557
|
slack: false,
|
|
4472
4558
|
execute: async (ctx, input) => {
|
|
4473
|
-
const credentials = await ctx.fetch
|
|
4559
|
+
const credentials = await getReservationClusterCredentials(ctx.fetch, "kubernetes", input.reservationId);
|
|
4474
4560
|
const kubeconfig = String(credentials?.kubeconfig || "");
|
|
4475
4561
|
if (!kubeconfig.trim())
|
|
4476
4562
|
throw new Error("Kubernetes kubeconfig is not ready yet.");
|
|
@@ -4514,7 +4600,7 @@ var clusterCapabilities = [
|
|
|
4514
4600
|
input: reservationCluster.extend({ confirm: z20.boolean().optional() }),
|
|
4515
4601
|
mcp: { name: "clusters_teardown" },
|
|
4516
4602
|
slack: false,
|
|
4517
|
-
execute: (ctx, input) => ctx.fetch
|
|
4603
|
+
execute: (ctx, input) => teardownReservationCluster(ctx.fetch, input.type, input.reservationId)
|
|
4518
4604
|
})
|
|
4519
4605
|
];
|
|
4520
4606
|
|
|
@@ -5068,7 +5154,7 @@ var statusCapability = defineCapability({
|
|
|
5068
5154
|
mutation: "read",
|
|
5069
5155
|
http: { method: "GET", path: "/v1/cli/status" },
|
|
5070
5156
|
input: emptyInput3,
|
|
5071
|
-
execute: async (ctx) => ctx.fetch
|
|
5157
|
+
execute: async (ctx) => getCliStatus(ctx.fetch),
|
|
5072
5158
|
cli: {
|
|
5073
5159
|
command: ["status"],
|
|
5074
5160
|
vnext: {
|
|
@@ -7390,9 +7476,6 @@ var STORAGE_DRIVES_ROUTE = "/v1/workflows/compute/nodes/storage-drives";
|
|
|
7390
7476
|
function storageDrivePath(driveId, action) {
|
|
7391
7477
|
return `${STORAGE_DRIVES_ROUTE}/${encodeURIComponent(driveId)}/${action}`;
|
|
7392
7478
|
}
|
|
7393
|
-
function reservationStorageRoute(reservationId, suffix) {
|
|
7394
|
-
return `/v1/workflows/compute/nodes/reservations/${encodeURIComponent(reservationId)}/${suffix}`;
|
|
7395
|
-
}
|
|
7396
7479
|
var reservationInput = z30.object({ reservationId: z30.string() });
|
|
7397
7480
|
var reservationWrite = reservationInput.extend({ confirm: z30.boolean().optional() });
|
|
7398
7481
|
var driveInput = z30.object({ driveId: z30.string() });
|
|
@@ -7429,9 +7512,9 @@ var storageVerbCapabilities = [
|
|
|
7429
7512
|
},
|
|
7430
7513
|
input: reservationWrite.extend({ driveId: z30.string(), readOnly: z30.boolean().optional() }),
|
|
7431
7514
|
slack: false,
|
|
7432
|
-
execute: (ctx, input) => ctx.fetch
|
|
7433
|
-
|
|
7434
|
-
|
|
7515
|
+
execute: (ctx, input) => deployReservationStorage(ctx.fetch, input.reservationId, {
|
|
7516
|
+
drive_id: input.driveId,
|
|
7517
|
+
access_mode: input.readOnly ? "read-only" : "read-write"
|
|
7435
7518
|
})
|
|
7436
7519
|
}),
|
|
7437
7520
|
defineCapability({
|
|
@@ -7446,9 +7529,7 @@ var storageVerbCapabilities = [
|
|
|
7446
7529
|
},
|
|
7447
7530
|
input: reservationWrite,
|
|
7448
7531
|
slack: false,
|
|
7449
|
-
execute: (ctx, input) => ctx.fetch
|
|
7450
|
-
method: "DELETE"
|
|
7451
|
-
})
|
|
7532
|
+
execute: (ctx, input) => detachReservationStorage(ctx.fetch, input.reservationId)
|
|
7452
7533
|
}),
|
|
7453
7534
|
defineCapability({
|
|
7454
7535
|
id: "storage.deployment_status",
|
|
@@ -7462,9 +7543,7 @@ var storageVerbCapabilities = [
|
|
|
7462
7543
|
},
|
|
7463
7544
|
input: reservationInput,
|
|
7464
7545
|
slack: false,
|
|
7465
|
-
execute: (ctx, input) => ctx.fetch
|
|
7466
|
-
method: "GET"
|
|
7467
|
-
})
|
|
7546
|
+
execute: (ctx, input) => getReservationStorageAttachment(ctx.fetch, input.reservationId)
|
|
7468
7547
|
}),
|
|
7469
7548
|
defineCapability({
|
|
7470
7549
|
id: "storage.targets",
|
|
@@ -7491,10 +7570,10 @@ var storageVerbCapabilities = [
|
|
|
7491
7570
|
mcp: { name: "storage_volumes_list" },
|
|
7492
7571
|
slack: false,
|
|
7493
7572
|
execute: (ctx, input) => {
|
|
7494
|
-
const
|
|
7573
|
+
const query3 = new URLSearchParams({ limit: String(input.limit ?? 25) });
|
|
7495
7574
|
if (input.cursor)
|
|
7496
|
-
|
|
7497
|
-
return ctx.fetch(`${DRIVES_ROUTE}?${
|
|
7575
|
+
query3.set("cursor", input.cursor);
|
|
7576
|
+
return ctx.fetch(`${DRIVES_ROUTE}?${query3}`, { method: "GET" });
|
|
7498
7577
|
}
|
|
7499
7578
|
}),
|
|
7500
7579
|
defineCapability({
|
|
@@ -7648,10 +7727,10 @@ var storageCompositionCapabilities = [
|
|
|
7648
7727
|
mcp: false,
|
|
7649
7728
|
slack: false,
|
|
7650
7729
|
execute: (ctx, input) => {
|
|
7651
|
-
const
|
|
7730
|
+
const query3 = new URLSearchParams({ limit: String(input.limit ?? 25), scope: "external" });
|
|
7652
7731
|
if (input.cursor)
|
|
7653
|
-
|
|
7654
|
-
return ctx.fetch(`${DRIVES_ROUTE}?${
|
|
7732
|
+
query3.set("cursor", input.cursor);
|
|
7733
|
+
return ctx.fetch(`${DRIVES_ROUTE}?${query3}`, { method: "GET" });
|
|
7655
7734
|
}
|
|
7656
7735
|
}),
|
|
7657
7736
|
defineCapability({
|
|
@@ -7669,12 +7748,12 @@ var storageCompositionCapabilities = [
|
|
|
7669
7748
|
mcp: false,
|
|
7670
7749
|
slack: false,
|
|
7671
7750
|
execute: (ctx, input) => {
|
|
7672
|
-
const
|
|
7751
|
+
const query3 = new URLSearchParams({ recursive: "true" });
|
|
7673
7752
|
if (input.path)
|
|
7674
|
-
|
|
7753
|
+
query3.set("path", input.path);
|
|
7675
7754
|
if (input.cursor)
|
|
7676
|
-
|
|
7677
|
-
return ctx.fetch(`${drivePath(input.driveId)}/contents?${
|
|
7755
|
+
query3.set("cursor", String(input.cursor));
|
|
7756
|
+
return ctx.fetch(`${drivePath(input.driveId)}/contents?${query3}`, { method: "GET" });
|
|
7678
7757
|
}
|
|
7679
7758
|
})
|
|
7680
7759
|
];
|