@ornncompute/cli 1.0.139 → 1.0.140
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/evidence-commands.mjs +14 -12
- package/vendor/capabilities/cli.js +231 -211
package/package.json
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { metricsSnapshotCapability, metricsHistoryCapability } from "../vendor/capabilities/cli.js";
|
|
1
2
|
import * as gatewayApi from "../vendor/api-client/gateway.js";
|
|
2
3
|
import { gpuLabeler } from "./gpu-catalog.mjs";
|
|
3
4
|
import { clusterFactLabel, reservationFactsForCluster } from "./kubernetes-commands.mjs";
|
|
@@ -777,19 +778,20 @@ function invalidEvidenceResponse(code) {
|
|
|
777
778
|
async function metricSource(machine, reservation, window, maximum, deps, deadline, signal, live) {
|
|
778
779
|
const response = await fetchEvidence(
|
|
779
780
|
async (requestSignal) => {
|
|
781
|
+
const context = {
|
|
782
|
+
actor: "",
|
|
783
|
+
role: "user",
|
|
784
|
+
fetch: (path, init) => deps.fetch(path, { ...init, signal: requestSignal }),
|
|
785
|
+
};
|
|
786
|
+
const input = { reservationId: reservation, machineId: machine.id };
|
|
780
787
|
const payload = live
|
|
781
|
-
? await
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
deps.fetch,
|
|
789
|
-
reservation,
|
|
790
|
-
{ machine_id: machine.id, start: window.start, end: window.end, max_points: maximum },
|
|
791
|
-
requestSignal
|
|
792
|
-
);
|
|
788
|
+
? (await metricsSnapshotCapability.execute(context, input))[0]
|
|
789
|
+
: await metricsHistoryCapability.execute(context, {
|
|
790
|
+
...input,
|
|
791
|
+
start: window.start,
|
|
792
|
+
end: window.end,
|
|
793
|
+
maxPoints: maximum,
|
|
794
|
+
});
|
|
793
795
|
const points = metricPoints(payload, maximum, window);
|
|
794
796
|
if (points === null) throw invalidEvidenceResponse("invalid_metrics_response");
|
|
795
797
|
return points;
|
|
@@ -4105,43 +4105,6 @@ var machinePushKeysCapability = defineCapability({
|
|
|
4105
4105
|
ssh_key_ids: input.sshKeyIds
|
|
4106
4106
|
})
|
|
4107
4107
|
});
|
|
4108
|
-
var machineMetricsCapabilities = [
|
|
4109
|
-
defineCapability({
|
|
4110
|
-
id: "machine.live_metrics",
|
|
4111
|
-
domain: "access",
|
|
4112
|
-
roles: ["user"],
|
|
4113
|
-
description: "Fetch a live metrics snapshot for one reservation machine.",
|
|
4114
|
-
mutation: "read",
|
|
4115
|
-
input: z17.object({ reservationId: z17.string(), machineId: z17.string() }),
|
|
4116
|
-
mcp: false,
|
|
4117
|
-
slack: false,
|
|
4118
|
-
execute: (ctx, input) => getReservationLiveMetrics(ctx.fetch, input.reservationId, {
|
|
4119
|
-
machine_id: input.machineId
|
|
4120
|
-
})
|
|
4121
|
-
}),
|
|
4122
|
-
defineCapability({
|
|
4123
|
-
id: "machine.telemetry_history",
|
|
4124
|
-
domain: "access",
|
|
4125
|
-
roles: ["user"],
|
|
4126
|
-
description: "Fetch historical telemetry for one reservation machine over a time range.",
|
|
4127
|
-
mutation: "read",
|
|
4128
|
-
input: z17.object({
|
|
4129
|
-
reservationId: z17.string(),
|
|
4130
|
-
machineId: z17.string(),
|
|
4131
|
-
start: z17.string().optional(),
|
|
4132
|
-
end: z17.string().optional(),
|
|
4133
|
-
maxPoints: z17.number().int().positive().optional()
|
|
4134
|
-
}),
|
|
4135
|
-
mcp: false,
|
|
4136
|
-
slack: false,
|
|
4137
|
-
execute: (ctx, input) => getReservationTelemetryHistory(ctx.fetch, input.reservationId, {
|
|
4138
|
-
machine_id: input.machineId,
|
|
4139
|
-
start: input.start || void 0,
|
|
4140
|
-
end: input.end || void 0,
|
|
4141
|
-
max_points: input.maxPoints
|
|
4142
|
-
})
|
|
4143
|
-
})
|
|
4144
|
-
];
|
|
4145
4108
|
|
|
4146
4109
|
// ../../packages/capabilities/dist/capabilities/credits.js
|
|
4147
4110
|
import { z as z18 } from "zod";
|
|
@@ -5042,19 +5005,74 @@ var evidenceCapabilities = [
|
|
|
5042
5005
|
clusterLogsCapability
|
|
5043
5006
|
];
|
|
5044
5007
|
|
|
5045
|
-
// ../../packages/capabilities/dist/capabilities/
|
|
5008
|
+
// ../../packages/capabilities/dist/capabilities/metrics.js
|
|
5046
5009
|
import { z as z23 } from "zod";
|
|
5047
|
-
var
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5010
|
+
var metricInput = z23.object({ reservationId: z23.string(), machineId: z23.string().optional() });
|
|
5011
|
+
async function nodeIds(context, input) {
|
|
5012
|
+
if (input.machineId)
|
|
5013
|
+
return [input.machineId];
|
|
5014
|
+
const { nodes: nodes2 } = await listNodes(context.fetch, {
|
|
5015
|
+
reservation_id: input.reservationId
|
|
5016
|
+
});
|
|
5017
|
+
if (!nodes2.length)
|
|
5018
|
+
throw new Error("No machines were found for this reservation.");
|
|
5019
|
+
return nodes2.map((node) => node.node_id);
|
|
5020
|
+
}
|
|
5021
|
+
var metricsSnapshotCapability = defineCapability({
|
|
5022
|
+
id: "metrics.snapshot",
|
|
5023
|
+
domain: "access",
|
|
5024
|
+
roles: ["user"],
|
|
5025
|
+
mutation: "read",
|
|
5026
|
+
description: "Fetch a live metrics snapshot for a reservation's machine(s) (GPU/CPU/memory utilization, etc). machineId is optional: omit it to resolve every active machine on the reservation, or pass it to scope to one.",
|
|
5027
|
+
input: metricInput,
|
|
5028
|
+
slack: false,
|
|
5029
|
+
execute: async (context, input) => {
|
|
5030
|
+
const snapshots = [];
|
|
5031
|
+
for (const nodeId3 of await nodeIds(context, input)) {
|
|
5032
|
+
snapshots.push(await getReservationLiveMetrics(context.fetch, input.reservationId, {
|
|
5033
|
+
machine_id: nodeId3
|
|
5034
|
+
}));
|
|
5035
|
+
}
|
|
5036
|
+
return snapshots;
|
|
5037
|
+
}
|
|
5038
|
+
});
|
|
5039
|
+
var metricsHistoryCapability = defineCapability({
|
|
5040
|
+
id: "metrics.history",
|
|
5041
|
+
domain: "access",
|
|
5042
|
+
roles: ["user"],
|
|
5043
|
+
mutation: "read",
|
|
5044
|
+
description: "Fetch historical telemetry for a reservation's machine over a time range. machineId is optional: omit it to use the first active machine on the reservation.",
|
|
5045
|
+
input: metricInput.extend({
|
|
5046
|
+
start: z23.string().optional(),
|
|
5047
|
+
end: z23.string().optional(),
|
|
5048
|
+
maxPoints: z23.number().int().positive().optional()
|
|
5049
|
+
}),
|
|
5050
|
+
slack: false,
|
|
5051
|
+
execute: async (context, input) => {
|
|
5052
|
+
const [nodeId3] = await nodeIds(context, input);
|
|
5053
|
+
return getReservationTelemetryHistory(context.fetch, input.reservationId, {
|
|
5054
|
+
machine_id: nodeId3,
|
|
5055
|
+
start: input.start || void 0,
|
|
5056
|
+
end: input.end || void 0,
|
|
5057
|
+
max_points: input.maxPoints
|
|
5058
|
+
});
|
|
5059
|
+
}
|
|
5060
|
+
});
|
|
5061
|
+
var metricsCapabilities = [metricsSnapshotCapability, metricsHistoryCapability];
|
|
5062
|
+
|
|
5063
|
+
// ../../packages/capabilities/dist/capabilities/mounts.js
|
|
5064
|
+
import { z as z24 } from "zod";
|
|
5065
|
+
var mountInput = z24.object({
|
|
5066
|
+
$positionals: z24.array(z24.string()).default([]),
|
|
5067
|
+
access: z24.string().optional(),
|
|
5068
|
+
cursor: z24.string().optional(),
|
|
5069
|
+
idempotencyKey: z24.string().optional(),
|
|
5070
|
+
limit: z24.union([z24.string(), z24.number()]).optional(),
|
|
5071
|
+
noWait: z24.boolean().optional(),
|
|
5072
|
+
timeout: z24.string().optional(),
|
|
5073
|
+
volume: z24.string().optional(),
|
|
5074
|
+
wait: z24.boolean().optional(),
|
|
5075
|
+
yes: z24.boolean().optional()
|
|
5058
5076
|
}).strict();
|
|
5059
5077
|
function mountExecutor(context) {
|
|
5060
5078
|
const interaction = context.cli?.interaction;
|
|
@@ -5163,13 +5181,13 @@ var mountCapabilities = [
|
|
|
5163
5181
|
];
|
|
5164
5182
|
|
|
5165
5183
|
// ../../packages/capabilities/dist/capabilities/identity.js
|
|
5166
|
-
import { z as
|
|
5167
|
-
var emptyInput3 =
|
|
5168
|
-
var loginInput =
|
|
5169
|
-
authBase:
|
|
5170
|
-
noBrowser:
|
|
5171
|
-
pollInterval:
|
|
5172
|
-
timeout:
|
|
5184
|
+
import { z as z25 } from "zod";
|
|
5185
|
+
var emptyInput3 = z25.object({});
|
|
5186
|
+
var loginInput = z25.object({
|
|
5187
|
+
authBase: z25.string().min(1).optional(),
|
|
5188
|
+
noBrowser: z25.boolean().optional(),
|
|
5189
|
+
pollInterval: z25.number().positive().optional(),
|
|
5190
|
+
timeout: z25.number().positive().optional()
|
|
5173
5191
|
});
|
|
5174
5192
|
function executeSession(context, command, input) {
|
|
5175
5193
|
if (!context.cli?.session) {
|
|
@@ -5288,50 +5306,50 @@ var identityCapabilities = [
|
|
|
5288
5306
|
];
|
|
5289
5307
|
|
|
5290
5308
|
// ../../packages/capabilities/dist/capabilities/listings.js
|
|
5291
|
-
import { z as
|
|
5292
|
-
var listingCreateInput =
|
|
5293
|
-
organizationId:
|
|
5294
|
-
organization_id:
|
|
5295
|
-
facilityId:
|
|
5296
|
-
facility_id:
|
|
5297
|
-
kind:
|
|
5298
|
-
gpu:
|
|
5299
|
-
cpu:
|
|
5300
|
-
site:
|
|
5301
|
-
fabric:
|
|
5302
|
-
min_nodes:
|
|
5303
|
-
starts_after:
|
|
5304
|
-
starts_before:
|
|
5305
|
-
ends_after:
|
|
5306
|
-
ends_before:
|
|
5307
|
-
gpu_type:
|
|
5308
|
-
node_model:
|
|
5309
|
-
fabric_type:
|
|
5310
|
-
node_count:
|
|
5311
|
-
gpus_per_node:
|
|
5312
|
-
cores_per_node:
|
|
5313
|
-
site_nickname:
|
|
5314
|
-
site_supplier:
|
|
5315
|
-
ram:
|
|
5316
|
-
storage:
|
|
5317
|
-
internet:
|
|
5318
|
-
network_hardware:
|
|
5319
|
-
available_start_at:
|
|
5320
|
-
available_end_at:
|
|
5321
|
-
available_from:
|
|
5322
|
-
available_to:
|
|
5323
|
-
buy_now_price_per_gpu_hour:
|
|
5324
|
-
deposit_percent:
|
|
5325
|
-
down_payment_cents:
|
|
5326
|
-
access_mode:
|
|
5327
|
-
state:
|
|
5328
|
-
price_omitted:
|
|
5329
|
-
announce:
|
|
5330
|
-
text:
|
|
5331
|
-
confirm:
|
|
5332
|
-
idempotencyKey:
|
|
5333
|
-
});
|
|
5334
|
-
var catalogTermsInput =
|
|
5309
|
+
import { z as z26 } from "zod";
|
|
5310
|
+
var listingCreateInput = z26.object({
|
|
5311
|
+
organizationId: z26.string().optional(),
|
|
5312
|
+
organization_id: z26.string().optional(),
|
|
5313
|
+
facilityId: z26.string().optional(),
|
|
5314
|
+
facility_id: z26.string().optional(),
|
|
5315
|
+
kind: z26.enum(["gpu", "cpu", "node", "link"]).optional(),
|
|
5316
|
+
gpu: z26.string().optional(),
|
|
5317
|
+
cpu: z26.string().optional(),
|
|
5318
|
+
site: z26.string().optional(),
|
|
5319
|
+
fabric: z26.string().optional(),
|
|
5320
|
+
min_nodes: z26.number().int().optional(),
|
|
5321
|
+
starts_after: z26.string().optional(),
|
|
5322
|
+
starts_before: z26.string().optional(),
|
|
5323
|
+
ends_after: z26.string().optional(),
|
|
5324
|
+
ends_before: z26.string().optional(),
|
|
5325
|
+
gpu_type: z26.string().optional(),
|
|
5326
|
+
node_model: z26.string().optional(),
|
|
5327
|
+
fabric_type: z26.string().optional(),
|
|
5328
|
+
node_count: z26.number().int().optional(),
|
|
5329
|
+
gpus_per_node: z26.number().int().optional(),
|
|
5330
|
+
cores_per_node: z26.number().int().optional().describe('CPU listings: cores per node (2 vCPUs each), at least 1, priced per vCPU-hour. Omit gpu_type or set it to "cpu".'),
|
|
5331
|
+
site_nickname: z26.string().optional().describe("A state, city, address, or catalog region such as us-west-3."),
|
|
5332
|
+
site_supplier: z26.string().optional(),
|
|
5333
|
+
ram: z26.string().optional(),
|
|
5334
|
+
storage: z26.string().optional(),
|
|
5335
|
+
internet: z26.string().optional(),
|
|
5336
|
+
network_hardware: z26.string().optional(),
|
|
5337
|
+
available_start_at: z26.string().optional().describe("Start of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5338
|
+
available_end_at: z26.string().optional().describe("End of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5339
|
+
available_from: z26.string().optional().describe("Alias for available_start_at."),
|
|
5340
|
+
available_to: z26.string().optional().describe("Alias for available_end_at."),
|
|
5341
|
+
buy_now_price_per_gpu_hour: z26.number().optional().describe("Price buyers pay, USD per GPU-hour (per vCPU-hour on CPU listings)."),
|
|
5342
|
+
deposit_percent: z26.number().optional(),
|
|
5343
|
+
down_payment_cents: z26.number().int().nonnegative().optional(),
|
|
5344
|
+
access_mode: z26.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
5345
|
+
state: z26.enum(["available", "draft"]).optional(),
|
|
5346
|
+
price_omitted: z26.boolean().optional(),
|
|
5347
|
+
announce: z26.boolean().optional(),
|
|
5348
|
+
text: z26.string().optional(),
|
|
5349
|
+
confirm: z26.boolean().optional(),
|
|
5350
|
+
idempotencyKey: z26.string().min(1).max(200).optional()
|
|
5351
|
+
});
|
|
5352
|
+
var catalogTermsInput = z26.object({ kind: z26.enum(["gpu", "cpu", "node", "link"]).optional() });
|
|
5335
5353
|
var slackListingCreateParams = {
|
|
5336
5354
|
type: "object",
|
|
5337
5355
|
properties: {
|
|
@@ -5629,12 +5647,12 @@ var listingCapabilities = [
|
|
|
5629
5647
|
];
|
|
5630
5648
|
|
|
5631
5649
|
// ../../packages/capabilities/dist/capabilities/organization-invites.js
|
|
5632
|
-
import { z as
|
|
5633
|
-
var organizationInviteInput =
|
|
5634
|
-
organization_id:
|
|
5635
|
-
email:
|
|
5636
|
-
organization_role:
|
|
5637
|
-
send_email:
|
|
5650
|
+
import { z as z27 } from "zod";
|
|
5651
|
+
var organizationInviteInput = z27.object({
|
|
5652
|
+
organization_id: z27.uuid().optional(),
|
|
5653
|
+
email: z27.string().trim().toLowerCase().pipe(z27.email()),
|
|
5654
|
+
organization_role: z27.enum(["consumer", "supplier"]).optional(),
|
|
5655
|
+
send_email: z27.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
|
|
5638
5656
|
}).superRefine((input, ctx) => {
|
|
5639
5657
|
if (!input.organization_id && input.send_email === true) {
|
|
5640
5658
|
ctx.addIssue({
|
|
@@ -5694,33 +5712,33 @@ var organizationInviteCapability = defineCapability({
|
|
|
5694
5712
|
});
|
|
5695
5713
|
|
|
5696
5714
|
// ../../packages/capabilities/dist/capabilities/networks.js
|
|
5697
|
-
import { z as
|
|
5715
|
+
import { z as z28 } from "zod";
|
|
5698
5716
|
var globalInput = {
|
|
5699
|
-
$positionals:
|
|
5700
|
-
guided:
|
|
5701
|
-
idempotencyKey:
|
|
5702
|
-
noBrowser:
|
|
5703
|
-
noWait:
|
|
5704
|
-
overwrite:
|
|
5705
|
-
print:
|
|
5706
|
-
wait:
|
|
5707
|
-
yes:
|
|
5717
|
+
$positionals: z28.array(z28.string()).optional(),
|
|
5718
|
+
guided: z28.boolean().optional(),
|
|
5719
|
+
idempotencyKey: z28.string().optional(),
|
|
5720
|
+
noBrowser: z28.boolean().optional(),
|
|
5721
|
+
noWait: z28.boolean().optional(),
|
|
5722
|
+
overwrite: z28.boolean().optional(),
|
|
5723
|
+
print: z28.boolean().optional(),
|
|
5724
|
+
wait: z28.boolean().optional(),
|
|
5725
|
+
yes: z28.boolean().optional()
|
|
5708
5726
|
};
|
|
5709
|
-
var noOptionsInput =
|
|
5710
|
-
var connectInput2 =
|
|
5727
|
+
var noOptionsInput = z28.object(globalInput).strict();
|
|
5728
|
+
var connectInput2 = z28.object({
|
|
5711
5729
|
...globalInput,
|
|
5712
|
-
identityFile:
|
|
5713
|
-
output:
|
|
5714
|
-
user:
|
|
5730
|
+
identityFile: z28.string().optional(),
|
|
5731
|
+
output: z28.string().optional(),
|
|
5732
|
+
user: z28.string().optional()
|
|
5715
5733
|
}).strict();
|
|
5716
|
-
var listInput =
|
|
5717
|
-
var networkCreateInput =
|
|
5718
|
-
var networkUpdateInput =
|
|
5719
|
-
var vpnConfigureInput =
|
|
5734
|
+
var listInput = z28.object({ ...globalInput, cursor: z28.string().optional(), limit: z28.string().optional() }).strict();
|
|
5735
|
+
var networkCreateInput = z28.object({ ...globalInput, cidr: z28.string().optional(), name: z28.string().optional() }).strict();
|
|
5736
|
+
var networkUpdateInput = z28.object({ ...globalInput, name: z28.string().optional() }).strict();
|
|
5737
|
+
var vpnConfigureInput = z28.object({
|
|
5720
5738
|
...globalInput,
|
|
5721
|
-
name:
|
|
5722
|
-
output:
|
|
5723
|
-
privateKey:
|
|
5739
|
+
name: z28.string().optional(),
|
|
5740
|
+
output: z28.string().optional(),
|
|
5741
|
+
privateKey: z28.string().optional()
|
|
5724
5742
|
}).strict();
|
|
5725
5743
|
function networkExecutor(context) {
|
|
5726
5744
|
const runtime3 = context.cli?.interaction;
|
|
@@ -5965,12 +5983,12 @@ var networkCapabilities = [
|
|
|
5965
5983
|
vpnConnectionDisconnectCapability,
|
|
5966
5984
|
connectCapability
|
|
5967
5985
|
];
|
|
5968
|
-
var networkUpdateFields =
|
|
5969
|
-
networkId:
|
|
5970
|
-
name:
|
|
5971
|
-
description:
|
|
5972
|
-
clearDescription:
|
|
5973
|
-
confirm:
|
|
5986
|
+
var networkUpdateFields = z28.object({
|
|
5987
|
+
networkId: z28.string(),
|
|
5988
|
+
name: z28.string().optional(),
|
|
5989
|
+
description: z28.string().optional(),
|
|
5990
|
+
clearDescription: z28.boolean().optional(),
|
|
5991
|
+
confirm: z28.boolean().optional()
|
|
5974
5992
|
}).refine((input) => !(input.clearDescription && input.description !== void 0), {
|
|
5975
5993
|
message: "Use either description or clearDescription, not both."
|
|
5976
5994
|
}).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
|
|
@@ -5981,7 +5999,7 @@ var networkVerbCapabilities = [
|
|
|
5981
5999
|
roles: ["user"],
|
|
5982
6000
|
description: "List this tenant's private networks.",
|
|
5983
6001
|
mutation: "read",
|
|
5984
|
-
input:
|
|
6002
|
+
input: z28.object({}),
|
|
5985
6003
|
mcp: { name: "networks_list" },
|
|
5986
6004
|
slack: false,
|
|
5987
6005
|
execute: (ctx) => listNetworks(ctx.fetch)
|
|
@@ -5992,7 +6010,7 @@ var networkVerbCapabilities = [
|
|
|
5992
6010
|
roles: ["user"],
|
|
5993
6011
|
description: "Show a single private network by id.",
|
|
5994
6012
|
mutation: "read",
|
|
5995
|
-
input:
|
|
6013
|
+
input: z28.object({ networkId: z28.string() }),
|
|
5996
6014
|
mcp: { name: "networks_show" },
|
|
5997
6015
|
slack: false,
|
|
5998
6016
|
execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
|
|
@@ -6003,11 +6021,11 @@ var networkVerbCapabilities = [
|
|
|
6003
6021
|
roles: ["user"],
|
|
6004
6022
|
description: "Create a private network.",
|
|
6005
6023
|
mutation: "preview-confirm",
|
|
6006
|
-
input:
|
|
6007
|
-
name:
|
|
6008
|
-
cidr:
|
|
6009
|
-
description:
|
|
6010
|
-
confirm:
|
|
6024
|
+
input: z28.object({
|
|
6025
|
+
name: z28.string(),
|
|
6026
|
+
cidr: z28.string().optional(),
|
|
6027
|
+
description: z28.string().optional(),
|
|
6028
|
+
confirm: z28.boolean().optional()
|
|
6011
6029
|
}),
|
|
6012
6030
|
mcp: { name: "networks_create" },
|
|
6013
6031
|
slack: false,
|
|
@@ -6037,7 +6055,7 @@ var networkVerbCapabilities = [
|
|
|
6037
6055
|
roles: ["user"],
|
|
6038
6056
|
description: "Delete a private network.",
|
|
6039
6057
|
mutation: "preview-confirm",
|
|
6040
|
-
input:
|
|
6058
|
+
input: z28.object({ networkId: z28.string(), confirm: z28.boolean().optional() }),
|
|
6041
6059
|
mcp: { name: "networks_delete" },
|
|
6042
6060
|
slack: false,
|
|
6043
6061
|
// The route answers 204, so report which network went.
|
|
@@ -6052,7 +6070,7 @@ var networkVerbCapabilities = [
|
|
|
6052
6070
|
roles: ["user"],
|
|
6053
6071
|
description: "List WireGuard VPN peers registered on a reservation.",
|
|
6054
6072
|
mutation: "read",
|
|
6055
|
-
input:
|
|
6073
|
+
input: z28.object({ reservationId: z28.string() }),
|
|
6056
6074
|
mcp: { name: "vpn_peers_list" },
|
|
6057
6075
|
slack: false,
|
|
6058
6076
|
execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
|
|
@@ -6063,11 +6081,11 @@ var networkVerbCapabilities = [
|
|
|
6063
6081
|
roles: ["user"],
|
|
6064
6082
|
description: "Register a WireGuard VPN peer public key on a reservation.",
|
|
6065
6083
|
mutation: "preview-confirm",
|
|
6066
|
-
input:
|
|
6067
|
-
reservationId:
|
|
6068
|
-
publicKey:
|
|
6069
|
-
label:
|
|
6070
|
-
confirm:
|
|
6084
|
+
input: z28.object({
|
|
6085
|
+
reservationId: z28.string(),
|
|
6086
|
+
publicKey: z28.string(),
|
|
6087
|
+
label: z28.string().optional(),
|
|
6088
|
+
confirm: z28.boolean().optional()
|
|
6071
6089
|
}),
|
|
6072
6090
|
mcp: { name: "vpn_peers_create" },
|
|
6073
6091
|
slack: false,
|
|
@@ -6082,10 +6100,10 @@ var networkVerbCapabilities = [
|
|
|
6082
6100
|
roles: ["user"],
|
|
6083
6101
|
description: "Revoke a WireGuard VPN peer from a reservation.",
|
|
6084
6102
|
mutation: "preview-confirm",
|
|
6085
|
-
input:
|
|
6086
|
-
reservationId:
|
|
6087
|
-
peerId:
|
|
6088
|
-
confirm:
|
|
6103
|
+
input: z28.object({
|
|
6104
|
+
reservationId: z28.string(),
|
|
6105
|
+
peerId: z28.string(),
|
|
6106
|
+
confirm: z28.boolean().optional()
|
|
6089
6107
|
}),
|
|
6090
6108
|
mcp: { name: "vpn_peers_delete" },
|
|
6091
6109
|
slack: false,
|
|
@@ -6094,20 +6112,20 @@ var networkVerbCapabilities = [
|
|
|
6094
6112
|
];
|
|
6095
6113
|
|
|
6096
6114
|
// ../../packages/capabilities/dist/capabilities/registry.js
|
|
6097
|
-
import { z as
|
|
6115
|
+
import { z as z29 } from "zod";
|
|
6098
6116
|
var globalInput2 = {
|
|
6099
|
-
$positionals:
|
|
6100
|
-
yes:
|
|
6117
|
+
$positionals: z29.array(z29.string()).default([]),
|
|
6118
|
+
yes: z29.boolean().optional()
|
|
6101
6119
|
};
|
|
6102
|
-
var emptyInput4 =
|
|
6103
|
-
var repositoryInput =
|
|
6120
|
+
var emptyInput4 = z29.object(globalInput2).strict();
|
|
6121
|
+
var repositoryInput = z29.object({
|
|
6104
6122
|
...globalInput2,
|
|
6105
|
-
repository:
|
|
6123
|
+
repository: z29.string().optional().describe("Repository name, with or without your organization's namespace.")
|
|
6106
6124
|
}).strict();
|
|
6107
|
-
var tagInput =
|
|
6125
|
+
var tagInput = z29.object({
|
|
6108
6126
|
...globalInput2,
|
|
6109
|
-
repository:
|
|
6110
|
-
tag:
|
|
6127
|
+
repository: z29.string().optional().describe("Repository name, with or without your organization's namespace."),
|
|
6128
|
+
tag: z29.string().optional().describe("Tag to delete, such as v1.")
|
|
6111
6129
|
}).strict();
|
|
6112
6130
|
function cliInteraction(context) {
|
|
6113
6131
|
return context.cli?.interaction;
|
|
@@ -6414,14 +6432,14 @@ var registryCapabilities = [
|
|
|
6414
6432
|
];
|
|
6415
6433
|
|
|
6416
6434
|
// ../../packages/capabilities/dist/capabilities/reservation-list.js
|
|
6417
|
-
import { z as
|
|
6418
|
-
var reservationListInput =
|
|
6419
|
-
customerId:
|
|
6420
|
-
listingId:
|
|
6421
|
-
listingTermId:
|
|
6422
|
-
status:
|
|
6423
|
-
cursor:
|
|
6424
|
-
limit:
|
|
6435
|
+
import { z as z30 } from "zod";
|
|
6436
|
+
var reservationListInput = z30.object({
|
|
6437
|
+
customerId: z30.string().uuid().optional(),
|
|
6438
|
+
listingId: z30.string().uuid().optional(),
|
|
6439
|
+
listingTermId: z30.string().uuid().optional(),
|
|
6440
|
+
status: z30.enum(["confirmed", "active", "completed", "cancelled"]).optional(),
|
|
6441
|
+
cursor: z30.string().optional(),
|
|
6442
|
+
limit: z30.number().int().min(1).max(100).optional()
|
|
6425
6443
|
});
|
|
6426
6444
|
var reservationListCapability = defineCapability({
|
|
6427
6445
|
id: "reservation.list",
|
|
@@ -6472,20 +6490,20 @@ var reservationListCapability = defineCapability({
|
|
|
6472
6490
|
});
|
|
6473
6491
|
|
|
6474
6492
|
// ../../packages/capabilities/dist/capabilities/volumes.js
|
|
6475
|
-
import { z as
|
|
6476
|
-
var storageCliInput =
|
|
6477
|
-
$positionals:
|
|
6478
|
-
contentType:
|
|
6479
|
-
cursor:
|
|
6480
|
-
idempotencyKey:
|
|
6481
|
-
limit:
|
|
6482
|
-
name:
|
|
6483
|
-
output:
|
|
6484
|
-
overwrite:
|
|
6485
|
-
path:
|
|
6486
|
-
prefix:
|
|
6487
|
-
source:
|
|
6488
|
-
yes:
|
|
6493
|
+
import { z as z31 } from "zod";
|
|
6494
|
+
var storageCliInput = z31.object({
|
|
6495
|
+
$positionals: z31.array(z31.string()).optional(),
|
|
6496
|
+
contentType: z31.string().optional(),
|
|
6497
|
+
cursor: z31.string().optional(),
|
|
6498
|
+
idempotencyKey: z31.string().optional(),
|
|
6499
|
+
limit: z31.union([z31.string(), z31.number()]).optional(),
|
|
6500
|
+
name: z31.string().optional(),
|
|
6501
|
+
output: z31.string().optional(),
|
|
6502
|
+
overwrite: z31.boolean().optional(),
|
|
6503
|
+
path: z31.string().optional(),
|
|
6504
|
+
prefix: z31.string().optional(),
|
|
6505
|
+
source: z31.string().optional(),
|
|
6506
|
+
yes: z31.boolean().optional()
|
|
6489
6507
|
}).strict();
|
|
6490
6508
|
function storageExecutor(context) {
|
|
6491
6509
|
const interaction = context.cli?.interaction;
|
|
@@ -6521,7 +6539,7 @@ function storageCapability({ id, command, description, mutation, outcome, human,
|
|
|
6521
6539
|
execute: async (context, input) => storageExecutor(context)(id, input)
|
|
6522
6540
|
});
|
|
6523
6541
|
}
|
|
6524
|
-
var filesListInput =
|
|
6542
|
+
var filesListInput = z31.object({ driveId: z31.string(), prefix: z31.string().optional() });
|
|
6525
6543
|
async function* listFiles(context, input) {
|
|
6526
6544
|
const prefix = input.prefix ?? "";
|
|
6527
6545
|
const folder = prefix.includes("/") ? prefix.slice(0, prefix.lastIndexOf("/")) : "";
|
|
@@ -6681,22 +6699,22 @@ var volumeCapabilities = [
|
|
|
6681
6699
|
related: ["volumes files list"]
|
|
6682
6700
|
})
|
|
6683
6701
|
];
|
|
6684
|
-
var reservationInput =
|
|
6685
|
-
var reservationWrite = reservationInput.extend({ confirm:
|
|
6686
|
-
var driveInput =
|
|
6687
|
-
var driveWrite = driveInput.extend({ confirm:
|
|
6688
|
-
var bucketConnectInput =
|
|
6689
|
-
provider:
|
|
6690
|
-
bucket:
|
|
6691
|
-
name:
|
|
6692
|
-
prefix:
|
|
6693
|
-
region:
|
|
6694
|
-
endpointUrl:
|
|
6695
|
-
accountId:
|
|
6696
|
-
accessKeyId:
|
|
6697
|
-
secretAccessKey:
|
|
6698
|
-
readOnly:
|
|
6699
|
-
confirm:
|
|
6702
|
+
var reservationInput = z31.object({ reservationId: z31.string() });
|
|
6703
|
+
var reservationWrite = reservationInput.extend({ confirm: z31.boolean().optional() });
|
|
6704
|
+
var driveInput = z31.object({ driveId: z31.string() });
|
|
6705
|
+
var driveWrite = driveInput.extend({ confirm: z31.boolean().optional() });
|
|
6706
|
+
var bucketConnectInput = z31.object({
|
|
6707
|
+
provider: z31.enum(["gcs", "s3", "r2"]),
|
|
6708
|
+
bucket: z31.string(),
|
|
6709
|
+
name: z31.string().optional(),
|
|
6710
|
+
prefix: z31.string().optional(),
|
|
6711
|
+
region: z31.string().optional(),
|
|
6712
|
+
endpointUrl: z31.string().optional(),
|
|
6713
|
+
accountId: z31.string().optional(),
|
|
6714
|
+
accessKeyId: z31.string().optional(),
|
|
6715
|
+
secretAccessKey: z31.string().optional(),
|
|
6716
|
+
readOnly: z31.boolean().optional(),
|
|
6717
|
+
confirm: z31.boolean().optional()
|
|
6700
6718
|
}).refine((input) => !(input.provider === "gcs" && (input.accessKeyId || input.secretAccessKey)), {
|
|
6701
6719
|
message: "Access key credentials are only supported for S3-compatible buckets."
|
|
6702
6720
|
}).refine((input) => Boolean(input.accessKeyId) === Boolean(input.secretAccessKey), {
|
|
@@ -6711,7 +6729,7 @@ var storageVerbCapabilities = [
|
|
|
6711
6729
|
roles: ["user"],
|
|
6712
6730
|
description: "Attach an existing storage volume (drive) to a reservation -- the inverse of storage_undeploy. Always mounts at the platform path /home/tenant/volume (fuse). There is no customer mount-path override.",
|
|
6713
6731
|
mutation: "preview-confirm",
|
|
6714
|
-
input: reservationWrite.extend({ driveId:
|
|
6732
|
+
input: reservationWrite.extend({ driveId: z31.string(), readOnly: z31.boolean().optional() }),
|
|
6715
6733
|
slack: false,
|
|
6716
6734
|
execute: (ctx, input) => deployReservationStorage(ctx.fetch, input.reservationId, {
|
|
6717
6735
|
drive_id: input.driveId,
|
|
@@ -6744,7 +6762,7 @@ var storageVerbCapabilities = [
|
|
|
6744
6762
|
roles: ["user"],
|
|
6745
6763
|
description: "List reservations that can receive a storage deploy, grouped the same way as the console picker.",
|
|
6746
6764
|
mutation: "read",
|
|
6747
|
-
input:
|
|
6765
|
+
input: z31.object({}),
|
|
6748
6766
|
slack: false,
|
|
6749
6767
|
execute: (ctx) => listStorageTargets(ctx.fetch)
|
|
6750
6768
|
}),
|
|
@@ -6754,9 +6772,9 @@ var storageVerbCapabilities = [
|
|
|
6754
6772
|
roles: ["user"],
|
|
6755
6773
|
description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
|
|
6756
6774
|
mutation: "read",
|
|
6757
|
-
input:
|
|
6758
|
-
limit:
|
|
6759
|
-
cursor:
|
|
6775
|
+
input: z31.object({
|
|
6776
|
+
limit: z31.number().int().min(1).max(100).optional(),
|
|
6777
|
+
cursor: z31.string().optional()
|
|
6760
6778
|
}),
|
|
6761
6779
|
mcp: { name: "storage_volumes_list" },
|
|
6762
6780
|
slack: false,
|
|
@@ -6782,10 +6800,10 @@ var storageVerbCapabilities = [
|
|
|
6782
6800
|
roles: ["user"],
|
|
6783
6801
|
description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
|
|
6784
6802
|
mutation: "preview-confirm",
|
|
6785
|
-
input:
|
|
6786
|
-
name:
|
|
6787
|
-
sourceDriveId:
|
|
6788
|
-
confirm:
|
|
6803
|
+
input: z31.object({
|
|
6804
|
+
name: z31.string(),
|
|
6805
|
+
sourceDriveId: z31.string().optional(),
|
|
6806
|
+
confirm: z31.boolean().optional()
|
|
6789
6807
|
}),
|
|
6790
6808
|
mcp: { name: "storage_volumes_create" },
|
|
6791
6809
|
slack: false,
|
|
@@ -6878,7 +6896,7 @@ var storageVerbCapabilities = [
|
|
|
6878
6896
|
roles: ["user"],
|
|
6879
6897
|
description: "Update a connected S3-compatible bucket's access key credentials.",
|
|
6880
6898
|
mutation: "preview-confirm",
|
|
6881
|
-
input: driveWrite.extend({ accessKeyId:
|
|
6899
|
+
input: driveWrite.extend({ accessKeyId: z31.string(), secretAccessKey: z31.string() }),
|
|
6882
6900
|
mcp: { name: "storage_buckets_update_credentials" },
|
|
6883
6901
|
slack: false,
|
|
6884
6902
|
execute: (ctx, input) => updateDrive(ctx.fetch, input.driveId, {
|
|
@@ -6932,7 +6950,7 @@ var catalog = [
|
|
|
6932
6950
|
...accessVerbCapabilities,
|
|
6933
6951
|
...storageVerbCapabilities,
|
|
6934
6952
|
machinePushKeysCapability,
|
|
6935
|
-
...
|
|
6953
|
+
...metricsCapabilities,
|
|
6936
6954
|
...billingCapabilities,
|
|
6937
6955
|
...registryCapabilities,
|
|
6938
6956
|
...adminNodeLifecycleCapabilities
|
|
@@ -7217,6 +7235,8 @@ export {
|
|
|
7217
7235
|
findLegacyCliMigration,
|
|
7218
7236
|
forRole,
|
|
7219
7237
|
gpuDisplay,
|
|
7238
|
+
metricsHistoryCapability,
|
|
7239
|
+
metricsSnapshotCapability,
|
|
7220
7240
|
parseHardwareCatalog,
|
|
7221
7241
|
volumeFilesListCapability
|
|
7222
7242
|
};
|