@ornncompute/cli 1.0.223 → 1.0.225
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/README.md +4 -0
- package/package.json +1 -1
- package/src/admin-credits.mjs +7 -3
- package/src/admin-shell.mjs +1 -0
- package/vendor/api-client/orchestrator.js +44 -57
- package/vendor/capabilities/cli.js +804 -878
|
@@ -366,6 +366,9 @@ function rebootVirtualMachine(request, nodeId3, id, body2 = {}) {
|
|
|
366
366
|
}
|
|
367
367
|
|
|
368
368
|
// ../../packages/capabilities/dist/capabilities/supplier-networking.js
|
|
369
|
+
import { z as z2 } from "zod";
|
|
370
|
+
|
|
371
|
+
// ../../packages/capabilities/dist/capability.js
|
|
369
372
|
import { z } from "zod";
|
|
370
373
|
|
|
371
374
|
// ../../packages/capabilities/dist/names.js
|
|
@@ -395,18 +398,18 @@ function defineCapability(spec) {
|
|
|
395
398
|
}
|
|
396
399
|
|
|
397
400
|
// ../../packages/capabilities/dist/capabilities/supplier-networking.js
|
|
398
|
-
var uuid =
|
|
399
|
-
var name =
|
|
400
|
-
var idInput =
|
|
401
|
-
var connectionCreateInput =
|
|
402
|
-
|
|
403
|
-
|
|
401
|
+
var uuid = z2.uuid();
|
|
402
|
+
var name = z2.string().trim().min(1).max(128);
|
|
403
|
+
var idInput = z2.strictObject({ id: uuid });
|
|
404
|
+
var connectionCreateInput = z2.discriminatedUnion("kind", [
|
|
405
|
+
z2.strictObject({ organization_id: uuid, name, kind: z2.literal("reverse_ssh") }),
|
|
406
|
+
z2.strictObject({
|
|
404
407
|
organization_id: uuid,
|
|
405
408
|
name,
|
|
406
|
-
kind:
|
|
407
|
-
netbird_management_url:
|
|
408
|
-
netbird_setup_key_secret_ref:
|
|
409
|
-
netbird_version:
|
|
409
|
+
kind: z2.literal("netbird"),
|
|
410
|
+
netbird_management_url: z2.url(),
|
|
411
|
+
netbird_setup_key_secret_ref: z2.string().regex(/^projects\/[^/]+\/secrets\/[^/]+\/versions\/[1-9]\d*$/),
|
|
412
|
+
netbird_version: z2.string().trim().min(1)
|
|
410
413
|
})
|
|
411
414
|
]);
|
|
412
415
|
function supplierCommand(spec) {
|
|
@@ -419,7 +422,6 @@ function supplierCommand(spec) {
|
|
|
419
422
|
mutation: spec.write ? "immediate" : "read",
|
|
420
423
|
input: spec.input,
|
|
421
424
|
mcp: false,
|
|
422
|
-
slack: false,
|
|
423
425
|
cli: {
|
|
424
426
|
command: ["admin", "suppliers", ...spec.command],
|
|
425
427
|
vnext: {
|
|
@@ -442,11 +444,11 @@ var supplierNetworkingCapabilities = [
|
|
|
442
444
|
supplierCommand({
|
|
443
445
|
id: "supplier-connection.list",
|
|
444
446
|
command: ["connections", "list"],
|
|
445
|
-
input:
|
|
447
|
+
input: z2.strictObject({
|
|
446
448
|
organization_id: uuid.optional(),
|
|
447
449
|
gateway_id: uuid.optional(),
|
|
448
450
|
after: uuid.optional(),
|
|
449
|
-
limit:
|
|
451
|
+
limit: z2.number().int().min(1).max(100).optional()
|
|
450
452
|
}),
|
|
451
453
|
description: "List saved supplier connection configs and their gateway IDs. Pass a returned config ID to enrollment; forward next_cursor unchanged as --cursor.",
|
|
452
454
|
usage: "[--supplier UUID] [--gateway UUID] [--cursor UUID] [--limit 1-100]",
|
|
@@ -480,12 +482,12 @@ var supplierNetworkingCapabilities = [
|
|
|
480
482
|
id: "supplier-gateway.register",
|
|
481
483
|
command: ["gateways", "register"],
|
|
482
484
|
write: true,
|
|
483
|
-
input:
|
|
485
|
+
input: z2.strictObject({
|
|
484
486
|
organization_id: uuid,
|
|
485
487
|
name,
|
|
486
|
-
address:
|
|
487
|
-
ssh_port:
|
|
488
|
-
ssh_username:
|
|
488
|
+
address: z2.string().trim().min(1).max(253),
|
|
489
|
+
ssh_port: z2.number().int().min(1).max(65535).default(22),
|
|
490
|
+
ssh_username: z2.string().trim().min(1).max(32).default("admin")
|
|
489
491
|
}),
|
|
490
492
|
description: "Register an existing Supplier Jump Host and its connection config for enrollment. Does not provision a VM. Then list connections with --gateway using the returned gateway ID to obtain the enrollment connection ID. If a response is lost, inspect saved connections by supplier before retrying.",
|
|
491
493
|
usage: "--supplier UUID --name NAME --address IP_OR_HOSTNAME [--ssh-port PORT] [--ssh-username USER]",
|
|
@@ -499,7 +501,7 @@ var supplierNetworkingCapabilities = [
|
|
|
499
501
|
supplierCommand({
|
|
500
502
|
id: "supplier-gateway.regions",
|
|
501
503
|
command: ["gateways", "regions"],
|
|
502
|
-
input:
|
|
504
|
+
input: z2.strictObject({}),
|
|
503
505
|
description: "List supported gateway provisioning regions and the environment default.",
|
|
504
506
|
usage: "",
|
|
505
507
|
related: ["admin suppliers gateways create"],
|
|
@@ -509,10 +511,10 @@ var supplierNetworkingCapabilities = [
|
|
|
509
511
|
id: "supplier-gateway.create",
|
|
510
512
|
command: ["gateways", "create"],
|
|
511
513
|
write: true,
|
|
512
|
-
input:
|
|
514
|
+
input: z2.strictObject({
|
|
513
515
|
connection_config_id: uuid,
|
|
514
|
-
region:
|
|
515
|
-
retry:
|
|
516
|
+
region: z2.string().trim().min(1).optional(),
|
|
517
|
+
retry: z2.boolean().optional()
|
|
516
518
|
}),
|
|
517
519
|
description: "Provision a billable Fabric gateway for a saved NetBird or reverse-SSH config. Choose a supported region for creation; --retry explicitly retries a failed attempt using its saved placement. Existing supplier jump hosts use gateways register.",
|
|
518
520
|
usage: "--connection-config-id UUID [--region REGION] [--retry]",
|
|
@@ -535,7 +537,7 @@ var supplierNetworkingCapabilities = [
|
|
|
535
537
|
];
|
|
536
538
|
|
|
537
539
|
// ../../packages/capabilities/dist/capabilities/admin-ssh.js
|
|
538
|
-
import { z as
|
|
540
|
+
import { z as z3 } from "zod";
|
|
539
541
|
var adminSshCapability = defineCapability({
|
|
540
542
|
id: "node.ssh",
|
|
541
543
|
domain: "fleet",
|
|
@@ -555,14 +557,14 @@ var adminSshCapability = defineCapability({
|
|
|
555
557
|
automation: "Requires an interactive terminal."
|
|
556
558
|
}
|
|
557
559
|
},
|
|
558
|
-
input:
|
|
560
|
+
input: z3.object({ node_id: z3.string().uuid(), public_key: z3.string().min(1) }),
|
|
559
561
|
execute: (ctx, input) => issueNodeSshCertificate(ctx.fetch, input.node_id, {
|
|
560
562
|
public_key: input.public_key
|
|
561
563
|
})
|
|
562
564
|
});
|
|
563
565
|
|
|
564
566
|
// ../../packages/capabilities/dist/capabilities/admin.js
|
|
565
|
-
import { z as
|
|
567
|
+
import { z as z4 } from "zod";
|
|
566
568
|
var ADMIN_CLI_ROOTS = [
|
|
567
569
|
{ name: "users" },
|
|
568
570
|
{ name: "organizations" },
|
|
@@ -575,7 +577,7 @@ var ADMIN_CLI_ROOTS = [
|
|
|
575
577
|
{ name: "ssh" },
|
|
576
578
|
{ name: "gifts" }
|
|
577
579
|
];
|
|
578
|
-
var nodeInput =
|
|
580
|
+
var nodeInput = z4.object({ node_id: z4.string().min(1) });
|
|
579
581
|
var adminNodeHealthCapability = defineCapability({
|
|
580
582
|
id: "nodes.health",
|
|
581
583
|
domain: "fleet",
|
|
@@ -596,8 +598,7 @@ var adminNodeHealthCapability = defineCapability({
|
|
|
596
598
|
}
|
|
597
599
|
},
|
|
598
600
|
mcp: { name: "node_show" },
|
|
599
|
-
|
|
600
|
-
input: z3.object({ nodeId: z3.string() }),
|
|
601
|
+
input: z4.object({ nodeId: z4.string() }),
|
|
601
602
|
execute: async (ctx, input) => {
|
|
602
603
|
return getNode(ctx.fetch, input.nodeId);
|
|
603
604
|
}
|
|
@@ -734,6 +735,9 @@ function createGift(request, body2) {
|
|
|
734
735
|
|
|
735
736
|
// ../../packages/api-client/dist/commerce/staff.js
|
|
736
737
|
var adjustments = (organizationId) => `/internal/v1/organizations/${encodeURIComponent(organizationId)}/credit-adjustments`;
|
|
738
|
+
function listCreditAdjustments(request, organizationId, signal) {
|
|
739
|
+
return request(adjustments(organizationId), { method: "GET", signal });
|
|
740
|
+
}
|
|
737
741
|
function createCreditAdjustment(request, organizationId, body2) {
|
|
738
742
|
return request(adjustments(organizationId), {
|
|
739
743
|
method: "POST",
|
|
@@ -848,7 +852,7 @@ function listOffers(request, filter = {}, signal) {
|
|
|
848
852
|
}
|
|
849
853
|
|
|
850
854
|
// ../../packages/capabilities/dist/capabilities/admin-capacity-reservations.js
|
|
851
|
-
import { z as
|
|
855
|
+
import { z as z7 } from "zod";
|
|
852
856
|
|
|
853
857
|
// ../../packages/capabilities/dist/capabilities/staff-shared.js
|
|
854
858
|
function statusOf(error) {
|
|
@@ -885,7 +889,7 @@ function unplacedLocation(place) {
|
|
|
885
889
|
var LOCATION_LOOKUP_UNAVAILABLE = "Ornn's location lookup is unavailable right now. Keep this location and try again in a moment.";
|
|
886
890
|
|
|
887
891
|
// ../../packages/capabilities/dist/capabilities/native-listing.js
|
|
888
|
-
import { z as
|
|
892
|
+
import { z as z6 } from "zod";
|
|
889
893
|
|
|
890
894
|
// ../../packages/capabilities/dist/compute-units.js
|
|
891
895
|
var CPU_SLUG = "cpu";
|
|
@@ -901,10 +905,10 @@ function unitsPerNode(listing) {
|
|
|
901
905
|
}
|
|
902
906
|
|
|
903
907
|
// ../../packages/capabilities/dist/capabilities/market-shared.js
|
|
904
|
-
import { z as
|
|
905
|
-
var positionals =
|
|
906
|
-
var microUsd =
|
|
907
|
-
var flag =
|
|
908
|
+
import { z as z5 } from "zod";
|
|
909
|
+
var positionals = z5.array(z5.string()).max(0).default([]);
|
|
910
|
+
var microUsd = z5.coerce.number().int().positive();
|
|
911
|
+
var flag = z5.preprocess((value) => value === "true" ? true : value === "false" ? false : value, z5.boolean());
|
|
908
912
|
function resolveIdempotencyKey(ctx, supplied) {
|
|
909
913
|
return ctx.cli?.interaction?.idempotencyKey(supplied) ?? supplied?.trim();
|
|
910
914
|
}
|
|
@@ -929,18 +933,18 @@ function microUsdLabel(value) {
|
|
|
929
933
|
|
|
930
934
|
// ../../packages/capabilities/dist/capabilities/native-listing.js
|
|
931
935
|
var nativeTermFields = {
|
|
932
|
-
network:
|
|
933
|
-
type:
|
|
934
|
-
minDurationHours:
|
|
935
|
-
maxDurationHours:
|
|
936
|
-
pricePerGpuHourMicroUsd:
|
|
937
|
-
downPaymentCents:
|
|
936
|
+
network: z6.string().refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional().describe("Reserved network and interconnect for this choice. Immutable per term ID; create a new term for a different network."),
|
|
937
|
+
type: z6.enum(["reserved", "spot", "on-demand"]).nullable().optional(),
|
|
938
|
+
minDurationHours: z6.coerce.number().nonnegative(),
|
|
939
|
+
maxDurationHours: z6.coerce.number().nonnegative(),
|
|
940
|
+
pricePerGpuHourMicroUsd: z6.coerce.number().int().positive().describe("Micro-USD per unit-hour: per GPU, or per vCPU on CPU capacity."),
|
|
941
|
+
downPaymentCents: z6.coerce.number().int().nonnegative().nullable().optional(),
|
|
938
942
|
renewable: flag,
|
|
939
|
-
preemptNoticeSeconds:
|
|
943
|
+
preemptNoticeSeconds: z6.coerce.number().int().nonnegative().optional()
|
|
940
944
|
};
|
|
941
|
-
var nativeTermInput =
|
|
945
|
+
var nativeTermInput = z6.object(nativeTermFields).strict();
|
|
942
946
|
function jsonArray(item) {
|
|
943
|
-
return
|
|
947
|
+
return z6.preprocess((value) => {
|
|
944
948
|
if (typeof value !== "string")
|
|
945
949
|
return value;
|
|
946
950
|
try {
|
|
@@ -948,36 +952,36 @@ function jsonArray(item) {
|
|
|
948
952
|
} catch {
|
|
949
953
|
return value;
|
|
950
954
|
}
|
|
951
|
-
},
|
|
955
|
+
}, z6.array(item));
|
|
952
956
|
}
|
|
953
957
|
var nativeTermsInput = jsonArray(nativeTermInput);
|
|
954
958
|
var listingWriteControls = {
|
|
955
|
-
confirm:
|
|
956
|
-
idempotencyKey:
|
|
959
|
+
confirm: z6.boolean().optional(),
|
|
960
|
+
idempotencyKey: z6.string().min(1).max(200)
|
|
957
961
|
};
|
|
958
|
-
var listingLocation =
|
|
962
|
+
var listingLocation = z6.string().trim().min(1).max(256).optional().describe("Instead of facilityId: a state, city, address, or catalog region such as us-west-3. Ornn places it in a catalog region and uses the supplier's facility there.");
|
|
959
963
|
var CPU_CORES_MESSAGE = "CPU capacity is sold in whole cores (2 vCPUs each).";
|
|
960
|
-
var coresPerNode =
|
|
961
|
-
var nativeListingCreateInput =
|
|
962
|
-
organizationId:
|
|
963
|
-
kind:
|
|
964
|
-
gpuSlug:
|
|
965
|
-
gpusPerNode:
|
|
964
|
+
var coresPerNode = z6.coerce.number().int(CPU_CORES_MESSAGE).min(1, CPU_CORES_MESSAGE).nullable().optional().describe("CPU capacity only: cores per node (2 vCPUs each), priced per vCPU-hour.");
|
|
965
|
+
var nativeListingCreateInput = z6.object({
|
|
966
|
+
organizationId: z6.string().uuid().nullable().optional(),
|
|
967
|
+
kind: z6.enum(["primary", "secondary"]).default("primary"),
|
|
968
|
+
gpuSlug: z6.string().min(1).nullable().describe('Catalog GPU slug; null or "cpu" lists CPU capacity sold per vCPU-hour.'),
|
|
969
|
+
gpusPerNode: z6.coerce.number().int().nonnegative().optional().describe("GPUs per node; 0 or omitted on CPU capacity."),
|
|
966
970
|
coresPerNode,
|
|
967
|
-
capacityNodeCount:
|
|
968
|
-
nodeIds: jsonArray(
|
|
969
|
-
facilityId:
|
|
971
|
+
capacityNodeCount: z6.coerce.number().int().positive().optional().describe("Defaults to the number of nodeIds."),
|
|
972
|
+
nodeIds: jsonArray(z6.string().uuid()).optional(),
|
|
973
|
+
facilityId: z6.string().uuid().optional(),
|
|
970
974
|
location: listingLocation,
|
|
971
|
-
provisioningType:
|
|
972
|
-
state:
|
|
973
|
-
availableAt:
|
|
974
|
-
availableUntil:
|
|
975
|
-
daysToRfs:
|
|
976
|
-
cpu:
|
|
977
|
-
ram:
|
|
978
|
-
storage:
|
|
979
|
-
fabricType:
|
|
980
|
-
internet:
|
|
975
|
+
provisioningType: z6.enum(["bare-metal", "virtual-machine"]),
|
|
976
|
+
state: z6.enum(["draft", "available"]),
|
|
977
|
+
availableAt: z6.iso.datetime({ offset: true }).nullable().optional().describe("Primary capacity takes availableAt and availableUntil, or daysToRfs, not both."),
|
|
978
|
+
availableUntil: z6.iso.datetime({ offset: true }).nullable().optional(),
|
|
979
|
+
daysToRfs: z6.coerce.number().int().nonnegative().optional().describe("Days until ready for service; 0 when ready now. Required unless both dates are set."),
|
|
980
|
+
cpu: z6.string().optional(),
|
|
981
|
+
ram: z6.string().optional(),
|
|
982
|
+
storage: z6.string().optional(),
|
|
983
|
+
fabricType: z6.string().optional(),
|
|
984
|
+
internet: z6.string().optional(),
|
|
981
985
|
terms: nativeTermsInput,
|
|
982
986
|
...listingWriteControls
|
|
983
987
|
}).strict().refine((value) => Boolean(value.facilityId) !== Boolean(value.location), {
|
|
@@ -1016,22 +1020,22 @@ var nativeListingCreateInput = z5.object({
|
|
|
1016
1020
|
});
|
|
1017
1021
|
});
|
|
1018
1022
|
var nativeListingUpdateFields = {
|
|
1019
|
-
state:
|
|
1020
|
-
nodeCount:
|
|
1021
|
-
gpuSlug:
|
|
1022
|
-
gpusPerNode:
|
|
1023
|
+
state: z6.enum(["draft", "available", "delisted"]).optional(),
|
|
1024
|
+
nodeCount: z6.coerce.number().int().positive().optional(),
|
|
1025
|
+
gpuSlug: z6.string().min(1).nullable().optional().describe('Catalog GPU slug; null or "cpu" for CPU capacity.'),
|
|
1026
|
+
gpusPerNode: z6.coerce.number().int().nonnegative().optional(),
|
|
1023
1027
|
coresPerNode,
|
|
1024
|
-
facilityId:
|
|
1028
|
+
facilityId: z6.string().uuid().optional(),
|
|
1025
1029
|
location: listingLocation,
|
|
1026
|
-
provisioningType:
|
|
1027
|
-
availableAt:
|
|
1028
|
-
availableUntil:
|
|
1029
|
-
daysToRfs:
|
|
1030
|
-
cpu:
|
|
1031
|
-
ram:
|
|
1032
|
-
storage:
|
|
1033
|
-
fabricType:
|
|
1034
|
-
internet:
|
|
1030
|
+
provisioningType: z6.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
1031
|
+
availableAt: z6.iso.datetime({ offset: true }).optional(),
|
|
1032
|
+
availableUntil: z6.iso.datetime({ offset: true }).nullable().optional(),
|
|
1033
|
+
daysToRfs: z6.coerce.number().int().nonnegative().optional(),
|
|
1034
|
+
cpu: z6.string().optional(),
|
|
1035
|
+
ram: z6.string().optional(),
|
|
1036
|
+
storage: z6.string().optional(),
|
|
1037
|
+
fabricType: z6.string().optional(),
|
|
1038
|
+
internet: z6.string().optional()
|
|
1035
1039
|
};
|
|
1036
1040
|
|
|
1037
1041
|
// ../../packages/capabilities/dist/capabilities/admin-capacity-reservations.js
|
|
@@ -1053,7 +1057,6 @@ var adminCapacityOffersCreateCapability = defineCapability({
|
|
|
1053
1057
|
description: "Create native capacity with an organization, a facilityId or a location, hardware, availability and advertised terms. A location is any state, city, address, or catalog region (us-west-3); Ornn places it in a catalog region and uses the organization's facility there. Primary capacity needs daysToRfs (0 when ready now) or both availableAt and availableUntil. nodeIds attach nodes at creation. Returns {listing, terms}. Requires an idempotencyKey reused on retries and confirm: true.",
|
|
1054
1058
|
mutation: "preview-confirm",
|
|
1055
1059
|
input: nativeListingCreateInput,
|
|
1056
|
-
slack: false,
|
|
1057
1060
|
cli: {
|
|
1058
1061
|
command: ["admin", "capacity-offers", "create"],
|
|
1059
1062
|
vnext: adminHelp("Create native capacity and its advertised financial terms.", "ornn admin capacity-offers create --gpu-slug GPU|cpu (--gpus-per-node COUNT | --cores-per-node COUNT) (--facility-id UUID | --location PLACE) --provisioning-type bare-metal|virtual-machine --state draft|available --terms JSON --idempotency-key KEY (--days-to-rfs DAYS | --available-at TIME --available-until TIME) [--capacity-node-count COUNT] [--node-ids JSON] [--organization-id UUID]", "Requires an eligible human terminal; --location also needs --organization-id; reuse --idempotency-key on retries.", "Review the native parent fields and each financial term before default-no consent.")
|
|
@@ -1072,16 +1075,16 @@ var adminCapacityOffersCreateCapability = defineCapability({
|
|
|
1072
1075
|
return createCapacityListing(ctx.fetch, { ...body2, facilityId }, resolveIdempotencyKey(ctx, idempotencyKey));
|
|
1073
1076
|
}
|
|
1074
1077
|
});
|
|
1075
|
-
var wholeSecondInstant =
|
|
1076
|
-
var reservationCreateInput =
|
|
1077
|
-
organizationId:
|
|
1078
|
-
listingId:
|
|
1079
|
-
listingTermId:
|
|
1080
|
-
nodes:
|
|
1078
|
+
var wholeSecondInstant = z7.iso.datetime({ offset: true }).refine((value) => !/\.\d*[1-9]/.test(value), "Use a time in whole seconds.");
|
|
1079
|
+
var reservationCreateInput = z7.object({
|
|
1080
|
+
organizationId: z7.string().uuid().describe("The customer organization the window is booked for."),
|
|
1081
|
+
listingId: z7.string().uuid().describe("The listing's capacityListingId. Staff may book any available listing."),
|
|
1082
|
+
listingTermId: z7.string().uuid().describe("The listingTermsId of a non-renewable Reserved term on that listing."),
|
|
1083
|
+
nodes: z7.number().int().positive().max(2147483647).describe("Whole nodes to book."),
|
|
1081
1084
|
startsAt: wholeSecondInstant.describe("RFC 3339 start of the window in whole seconds, no more than five minutes ago."),
|
|
1082
1085
|
endsAt: wholeSecondInstant.describe("RFC 3339 end of the window in whole seconds, at least an hour after the start and within the term's duration range."),
|
|
1083
1086
|
pricePerGpuHourMicroUsd: microUsd.describe("The term's price in micro-USD per GPU-hour (per vCPU-hour on CPU capacity). A changed price refuses the booking."),
|
|
1084
|
-
idempotencyKey:
|
|
1087
|
+
idempotencyKey: z7.string().trim().min(1).max(200).describe("Reuse this key when retrying the same booking.")
|
|
1085
1088
|
});
|
|
1086
1089
|
var adminReservationsCreateCapability = defineCapability({
|
|
1087
1090
|
id: "reservations.create",
|
|
@@ -1093,7 +1096,6 @@ var adminReservationsCreateCapability = defineCapability({
|
|
|
1093
1096
|
command: ["admin", "reservations", "create"],
|
|
1094
1097
|
vnext: adminHelp("Book a listing term window for a customer organization.", "ornn admin reservations create --organization-id UUID --listing-id UUID --listing-term-id UUID --nodes COUNT --starts-at TIME --ends-at TIME --price-per-gpu-hour-micro-usd N --idempotency-key KEY", "Requires an eligible human terminal. Reuse --idempotency-key when retrying the same booking.", "Customer organization, listing, term, nodes, window, price, and idempotency key are reviewed before default-no consent.")
|
|
1095
1098
|
},
|
|
1096
|
-
slack: false,
|
|
1097
1099
|
input: reservationCreateInput,
|
|
1098
1100
|
execute: async (ctx, input) => {
|
|
1099
1101
|
const { organizationId, idempotencyKey, ...leg } = reservationCreateInput.parse(input);
|
|
@@ -1109,7 +1111,7 @@ var adminCapacityReservationCapabilities = [
|
|
|
1109
1111
|
];
|
|
1110
1112
|
|
|
1111
1113
|
// ../../packages/capabilities/dist/capabilities/commerce-market.js
|
|
1112
|
-
import { z as
|
|
1114
|
+
import { z as z8 } from "zod";
|
|
1113
1115
|
function help(outcome, human, automation, related, order, acceptedReferences = []) {
|
|
1114
1116
|
return {
|
|
1115
1117
|
arguments: "semantic",
|
|
@@ -1123,15 +1125,15 @@ function help(outcome, human, automation, related, order, acceptedReferences = [
|
|
|
1123
1125
|
order
|
|
1124
1126
|
};
|
|
1125
1127
|
}
|
|
1126
|
-
var pageLimit =
|
|
1127
|
-
var listingsListInput =
|
|
1128
|
+
var pageLimit = z8.coerce.number().int().min(1).max(200).optional();
|
|
1129
|
+
var listingsListInput = z8.object({
|
|
1128
1130
|
$positionals: positionals,
|
|
1129
|
-
kind:
|
|
1130
|
-
state:
|
|
1131
|
-
sourceReservationId:
|
|
1132
|
-
sourceListingId:
|
|
1133
|
-
limit:
|
|
1134
|
-
cursor:
|
|
1131
|
+
kind: z8.enum(["primary", "secondary", "on_demand"]).optional(),
|
|
1132
|
+
state: z8.enum(["draft", "available", "held", "sold", "delisted"]).optional(),
|
|
1133
|
+
sourceReservationId: z8.string().uuid().optional(),
|
|
1134
|
+
sourceListingId: z8.string().uuid().optional(),
|
|
1135
|
+
limit: z8.coerce.number().int().min(1).max(100).optional(),
|
|
1136
|
+
cursor: z8.string().min(1).optional()
|
|
1135
1137
|
});
|
|
1136
1138
|
var listingsListCapability = defineCapability({
|
|
1137
1139
|
id: "listings.list",
|
|
@@ -1144,7 +1146,6 @@ var listingsListCapability = defineCapability({
|
|
|
1144
1146
|
command: ["capacity-offers", "list"],
|
|
1145
1147
|
vnext: help("List capacity parents with bounded pagination; read their financial terms separately.", "ornn capacity-offers list [--kind primary|secondary|on_demand] [--source-reservation-id <id>] [--limit <1-100>] [--cursor <opaque>]", "ornn capacity-offers list --limit 50 --format json", ["capacity-offers show", "capacity-offers terms", "capacity-offers availability"], 20, ["opaque page cursor"])
|
|
1146
1148
|
},
|
|
1147
|
-
slack: false,
|
|
1148
1149
|
execute: async (ctx, input) => {
|
|
1149
1150
|
const parsed = listingsListInput.parse(input ?? {});
|
|
1150
1151
|
return listCapacityListings(ctx.fetch, {
|
|
@@ -1157,9 +1158,9 @@ var listingsListCapability = defineCapability({
|
|
|
1157
1158
|
});
|
|
1158
1159
|
}
|
|
1159
1160
|
});
|
|
1160
|
-
var listingShowInput =
|
|
1161
|
+
var listingShowInput = z8.object({
|
|
1161
1162
|
$positionals: positionals,
|
|
1162
|
-
listingId:
|
|
1163
|
+
listingId: z8.string().uuid()
|
|
1163
1164
|
});
|
|
1164
1165
|
var listingShowCapability = defineCapability({
|
|
1165
1166
|
id: "listings.show",
|
|
@@ -1172,7 +1173,6 @@ var listingShowCapability = defineCapability({
|
|
|
1172
1173
|
command: ["capacity-offers", "show"],
|
|
1173
1174
|
vnext: help("Inspect one listing's hardware, capacity and availability.", "ornn capacity-offers show --listing-id <id>", "ornn capacity-offers show --listing-id <id> --format json", ["capacity-offers list", "capacity-offers terms", "capacity-offers availability"], 21, ["listing ID"])
|
|
1174
1175
|
},
|
|
1175
|
-
slack: false,
|
|
1176
1176
|
execute: async (ctx, input) => {
|
|
1177
1177
|
const parsed = listingShowInput.parse(input);
|
|
1178
1178
|
return getCapacityListing(ctx.fetch, parsed.listingId);
|
|
@@ -1189,17 +1189,16 @@ var listingTermsCapability = defineCapability({
|
|
|
1189
1189
|
command: ["capacity-offers", "terms"],
|
|
1190
1190
|
vnext: help("Read the advertised financial terms for a capacity listing.", "ornn capacity-offers terms --listing-id <id>", "ornn capacity-offers terms --listing-id <id> --format json", ["capacity-offers show", "offers post", "reservations buy"], 22, ["capacityListingId from capacity-offers list or show"])
|
|
1191
1191
|
},
|
|
1192
|
-
slack: false,
|
|
1193
1192
|
execute: async (ctx, input) => {
|
|
1194
1193
|
const parsed = listingShowInput.parse(input);
|
|
1195
1194
|
return listCapacityTerms(ctx.fetch, parsed.listingId);
|
|
1196
1195
|
}
|
|
1197
1196
|
});
|
|
1198
|
-
var listingAvailabilityInput =
|
|
1197
|
+
var listingAvailabilityInput = z8.object({
|
|
1199
1198
|
$positionals: positionals,
|
|
1200
|
-
listingId:
|
|
1201
|
-
from:
|
|
1202
|
-
to:
|
|
1199
|
+
listingId: z8.string().uuid(),
|
|
1200
|
+
from: z8.iso.datetime({ offset: true }).optional().describe("RFC 3339 start of the range to read. Defaults to now or the listing's start."),
|
|
1201
|
+
to: z8.iso.datetime({ offset: true }).optional().describe("RFC 3339 end of the range to read. Defaults to the listing's end.")
|
|
1203
1202
|
});
|
|
1204
1203
|
var listingAvailabilityCapability = defineCapability({
|
|
1205
1204
|
id: "listings.availability",
|
|
@@ -1212,7 +1211,6 @@ var listingAvailabilityCapability = defineCapability({
|
|
|
1212
1211
|
command: ["capacity-offers", "availability"],
|
|
1213
1212
|
vnext: help("Show how many of a listing's nodes are free over time.", "ornn capacity-offers availability --listing-id <id> [--from <time>] [--to <time>]", "ornn capacity-offers availability --listing-id <id> --format json", ["capacity-offers terms", "reservations buy", "offers post"], 23, ["capacityListingId from capacity-offers list or show"])
|
|
1214
1213
|
},
|
|
1215
|
-
slack: false,
|
|
1216
1214
|
execute: async (ctx, input) => {
|
|
1217
1215
|
const parsed = listingAvailabilityInput.parse(input);
|
|
1218
1216
|
return getListingAvailability(ctx.fetch, parsed.listingId, {
|
|
@@ -1221,16 +1219,16 @@ var listingAvailabilityCapability = defineCapability({
|
|
|
1221
1219
|
});
|
|
1222
1220
|
}
|
|
1223
1221
|
});
|
|
1224
|
-
var listingRelistInput =
|
|
1222
|
+
var listingRelistInput = z8.strictObject({
|
|
1225
1223
|
$positionals: positionals,
|
|
1226
|
-
reservationId:
|
|
1227
|
-
startsAt:
|
|
1228
|
-
endsAt:
|
|
1229
|
-
nodeCount:
|
|
1224
|
+
reservationId: z8.string().uuid(),
|
|
1225
|
+
startsAt: z8.iso.datetime({ offset: true }),
|
|
1226
|
+
endsAt: z8.iso.datetime({ offset: true }),
|
|
1227
|
+
nodeCount: z8.coerce.number().int().positive(),
|
|
1230
1228
|
terms: nativeTermsInput,
|
|
1231
|
-
idempotencyKey:
|
|
1232
|
-
confirm:
|
|
1233
|
-
yes:
|
|
1229
|
+
idempotencyKey: z8.string().min(1).max(200).optional(),
|
|
1230
|
+
confirm: z8.boolean().optional(),
|
|
1231
|
+
yes: z8.boolean().optional()
|
|
1234
1232
|
});
|
|
1235
1233
|
var listingRelistCapability = defineCapability({
|
|
1236
1234
|
id: "listings.relist",
|
|
@@ -1243,7 +1241,6 @@ var listingRelistCapability = defineCapability({
|
|
|
1243
1241
|
command: ["capacity-offers", "relist"],
|
|
1244
1242
|
vnext: help("Relist reserved capacity with explicit financial terms.", "ornn capacity-offers relist --reservation-id UUID --node-count COUNT --starts-at TIME --ends-at TIME --terms JSON", "ornn capacity-offers relist --reservation-id UUID --node-count 1 --starts-at TIME --ends-at TIME --terms JSON --idempotency-key KEY --format json", ["capacity-offers terms", "capacity-offers delist"], 24, ["reservation ID"])
|
|
1245
1243
|
},
|
|
1246
|
-
slack: false,
|
|
1247
1244
|
execute: async (ctx, input) => {
|
|
1248
1245
|
const { $positionals: _, reservationId, confirm: _confirm, yes: _yes, idempotencyKey, ...body2 } = listingRelistInput.parse(input);
|
|
1249
1246
|
const gate = await consent(ctx, "listings.relist", "Relist capacity", [
|
|
@@ -1255,10 +1252,10 @@ var listingRelistCapability = defineCapability({
|
|
|
1255
1252
|
return relistReservation(ctx.fetch, reservationId, body2, resolveIdempotencyKey(ctx, idempotencyKey));
|
|
1256
1253
|
}
|
|
1257
1254
|
});
|
|
1258
|
-
var listingUpdateInput =
|
|
1255
|
+
var listingUpdateInput = z8.object({
|
|
1259
1256
|
$positionals: positionals,
|
|
1260
|
-
listingId:
|
|
1261
|
-
listingTermsId:
|
|
1257
|
+
listingId: z8.string().uuid(),
|
|
1258
|
+
listingTermsId: z8.string().uuid(),
|
|
1262
1259
|
...nativeTermFields,
|
|
1263
1260
|
...listingWriteControls
|
|
1264
1261
|
}).strict();
|
|
@@ -1285,10 +1282,10 @@ var listingUpdateCapability = defineCapability({
|
|
|
1285
1282
|
return editCapacityTerms(ctx.fetch, listingId, listingTermsId, body2, resolveIdempotencyKey(ctx, idempotencyKey));
|
|
1286
1283
|
}
|
|
1287
1284
|
});
|
|
1288
|
-
var listingDelistInput =
|
|
1285
|
+
var listingDelistInput = z8.object({
|
|
1289
1286
|
$positionals: positionals,
|
|
1290
|
-
listingId:
|
|
1291
|
-
confirm:
|
|
1287
|
+
listingId: z8.string().uuid(),
|
|
1288
|
+
confirm: z8.boolean().optional()
|
|
1292
1289
|
});
|
|
1293
1290
|
var listingDelistCapability = defineCapability({
|
|
1294
1291
|
id: "listings.delist",
|
|
@@ -1301,7 +1298,6 @@ var listingDelistCapability = defineCapability({
|
|
|
1301
1298
|
command: ["capacity-offers", "delist"],
|
|
1302
1299
|
vnext: help("Delist a listing you relisted.", "ornn capacity-offers delist --listing-id <id>", "ornn capacity-offers delist --listing-id <id> --format json", ["capacity-offers relist"], 26, ["listing ID"])
|
|
1303
1300
|
},
|
|
1304
|
-
slack: false,
|
|
1305
1301
|
execute: async (ctx, input) => {
|
|
1306
1302
|
const parsed = listingDelistInput.parse(input);
|
|
1307
1303
|
const gate = await consent(ctx, "listings.delist", "Delist listing", [
|
|
@@ -1316,10 +1312,10 @@ var listingDelistCapability = defineCapability({
|
|
|
1316
1312
|
return delistCapacityListing(ctx.fetch, parsed.listingId);
|
|
1317
1313
|
}
|
|
1318
1314
|
});
|
|
1319
|
-
var reservationsListInput =
|
|
1315
|
+
var reservationsListInput = z8.object({
|
|
1320
1316
|
$positionals: positionals,
|
|
1321
|
-
kind:
|
|
1322
|
-
status:
|
|
1317
|
+
kind: z8.enum(["schedule", "spot"]).optional(),
|
|
1318
|
+
status: z8.enum([
|
|
1323
1319
|
"awaiting_down_payment",
|
|
1324
1320
|
"awaiting_payment",
|
|
1325
1321
|
"confirmed",
|
|
@@ -1327,9 +1323,9 @@ var reservationsListInput = z7.object({
|
|
|
1327
1323
|
"completed",
|
|
1328
1324
|
"cancelled"
|
|
1329
1325
|
]).optional(),
|
|
1330
|
-
listingId:
|
|
1326
|
+
listingId: z8.string().uuid().optional().describe("Trades on a listing you own."),
|
|
1331
1327
|
limit: pageLimit,
|
|
1332
|
-
cursor:
|
|
1328
|
+
cursor: z8.string().min(1).optional()
|
|
1333
1329
|
});
|
|
1334
1330
|
var reservationsListCapability = defineCapability({
|
|
1335
1331
|
id: "reservations.list",
|
|
@@ -1342,16 +1338,15 @@ var reservationsListCapability = defineCapability({
|
|
|
1342
1338
|
command: ["reservations", "list"],
|
|
1343
1339
|
vnext: help("List your organization's schedule and spot reservations.", "ornn reservations list [--kind schedule|spot] [--status <status>] [--listing-id <id>] [--limit <1-200>] [--cursor <opaque>]", "ornn reservations list --format json", ["reservations show", "capacity-offers relist"], 27, ["opaque page cursor"])
|
|
1344
1340
|
},
|
|
1345
|
-
slack: false,
|
|
1346
1341
|
execute: async (ctx, input) => {
|
|
1347
1342
|
const parsed = reservationsListInput.parse(input ?? {});
|
|
1348
1343
|
const { $positionals: _, ...filter } = parsed;
|
|
1349
1344
|
return listReservations(ctx.fetch, filter);
|
|
1350
1345
|
}
|
|
1351
1346
|
});
|
|
1352
|
-
var reservationLookupInput =
|
|
1347
|
+
var reservationLookupInput = z8.object({
|
|
1353
1348
|
$positionals: positionals,
|
|
1354
|
-
reservationId:
|
|
1349
|
+
reservationId: z8.string().uuid()
|
|
1355
1350
|
});
|
|
1356
1351
|
var reservationsShowCapability = defineCapability({
|
|
1357
1352
|
id: "reservations.show",
|
|
@@ -1364,7 +1359,6 @@ var reservationsShowCapability = defineCapability({
|
|
|
1364
1359
|
command: ["reservations", "show"],
|
|
1365
1360
|
vnext: help("Inspect one reservation.", "ornn reservations show --reservation-id <id>", "ornn reservations show --reservation-id <id> --format json", ["reservations list", "reservations invoices"], 28, ["reservation ID"])
|
|
1366
1361
|
},
|
|
1367
|
-
slack: false,
|
|
1368
1362
|
execute: async (ctx, input) => {
|
|
1369
1363
|
const parsed = reservationLookupInput.parse(input);
|
|
1370
1364
|
return getReservation(ctx.fetch, parsed.reservationId);
|
|
@@ -1381,22 +1375,21 @@ var reservationInvoicesCapability = defineCapability({
|
|
|
1381
1375
|
command: ["reservations", "invoices"],
|
|
1382
1376
|
vnext: help("List one reservation's invoices.", "ornn reservations invoices --reservation-id <id>", "ornn reservations invoices --reservation-id <id> --format json", ["reservations show"], 29, ["reservation ID"])
|
|
1383
1377
|
},
|
|
1384
|
-
slack: false,
|
|
1385
1378
|
execute: async (ctx, input) => {
|
|
1386
1379
|
const parsed = reservationLookupInput.parse(input);
|
|
1387
1380
|
return listReservationInvoices(ctx.fetch, parsed.reservationId);
|
|
1388
1381
|
}
|
|
1389
1382
|
});
|
|
1390
|
-
var reservationPurchaseInput =
|
|
1383
|
+
var reservationPurchaseInput = z8.object({
|
|
1391
1384
|
$positionals: positionals,
|
|
1392
|
-
listingId:
|
|
1393
|
-
listingTermId:
|
|
1394
|
-
nodeCount:
|
|
1395
|
-
startsAt:
|
|
1396
|
-
endsAt:
|
|
1385
|
+
listingId: z8.string().uuid().describe("The relisted (secondary) listing's capacityListingId, from listings.list."),
|
|
1386
|
+
listingTermId: z8.string().uuid().describe("The listingTermsId of the listing's term, from listings.terms."),
|
|
1387
|
+
nodeCount: z8.coerce.number().int().positive().optional().describe("Whole nodes to book for the window. Defaults to every node the listing sells."),
|
|
1388
|
+
startsAt: z8.iso.datetime({ offset: true }).describe("RFC 3339 start of the window, in whole seconds, inside the listing and not in the past."),
|
|
1389
|
+
endsAt: z8.iso.datetime({ offset: true }).describe("RFC 3339 end of the window, at least an hour after the start and within the term's duration range, or at the listing's end."),
|
|
1397
1390
|
pricePerGpuHourMicroUsd: microUsd.describe("The term's price from listings.terms, in micro-USD per GPU-hour (per vCPU-hour on CPU capacity). A changed price refuses the purchase."),
|
|
1398
|
-
idempotencyKey:
|
|
1399
|
-
confirm:
|
|
1391
|
+
idempotencyKey: z8.string().min(1).max(200).optional(),
|
|
1392
|
+
confirm: z8.boolean().optional()
|
|
1400
1393
|
});
|
|
1401
1394
|
var reservationPurchaseCapability = defineCapability({
|
|
1402
1395
|
id: "reservations.purchase",
|
|
@@ -1409,7 +1402,6 @@ var reservationPurchaseCapability = defineCapability({
|
|
|
1409
1402
|
command: ["reservations", "buy"],
|
|
1410
1403
|
vnext: help("Book a window of relisted capacity at its term's price.", "ornn reservations buy --listing-id <id> --listing-term-id <id> --starts-at <time> --ends-at <time> --price-per-gpu-hour-micro-usd <n> [--node-count <n>]", "ornn reservations buy --listing-id <id> --listing-term-id <id> --starts-at <time> --ends-at <time> --price-per-gpu-hour-micro-usd 4000000 --idempotency-key <key> --format json", ["capacity-offers availability", "capacity-offers terms", "reservations show"], 30, ["listingTermsId from capacity-offers terms"])
|
|
1411
1404
|
},
|
|
1412
|
-
slack: false,
|
|
1413
1405
|
execute: async (ctx, input) => {
|
|
1414
1406
|
const parsed = reservationPurchaseInput.parse(input);
|
|
1415
1407
|
const body2 = {
|
|
@@ -1454,7 +1446,7 @@ var commerceMarketCapabilities = [
|
|
|
1454
1446
|
];
|
|
1455
1447
|
|
|
1456
1448
|
// ../../packages/capabilities/dist/capabilities/markets.js
|
|
1457
|
-
import { z as
|
|
1449
|
+
import { z as z9 } from "zod";
|
|
1458
1450
|
|
|
1459
1451
|
// ../../packages/capabilities/dist/spec-catalog.js
|
|
1460
1452
|
var UNRESOLVED_CATALOG_HINT = "Leave this field empty. Only dictionary.csv product names are allowed. Do not ask to add spec-sheet text to the dictionary.";
|
|
@@ -1575,10 +1567,10 @@ function projectCatalogTerms(terms, kind) {
|
|
|
1575
1567
|
}
|
|
1576
1568
|
|
|
1577
1569
|
// ../../packages/capabilities/dist/capabilities/markets.js
|
|
1578
|
-
var saleType =
|
|
1579
|
-
var region =
|
|
1580
|
-
var nodes =
|
|
1581
|
-
var bookSlug =
|
|
1570
|
+
var saleType = z9.enum(["spot", "on-demand"]).optional().describe("spot (the default) yields to scheduled bookings; on-demand runs until stopped or the listing ends.");
|
|
1571
|
+
var region = z9.string().min(1).optional().describe("A region slug, for example us-east-11. Omit for every region.");
|
|
1572
|
+
var nodes = z9.coerce.number().int().min(1).describe("Nodes to buy, each the GPUs (or vCPUs on the cpu book) of one whole machine.");
|
|
1573
|
+
var bookSlug = z9.string().min(1).describe('Catalog GPU slug, for example nvidia_h100_sxm, or "cpu" for CPU capacity sold per vCPU-hour.');
|
|
1582
1574
|
function help2(outcome, human, automation, related, order, acceptedReferences = []) {
|
|
1583
1575
|
return {
|
|
1584
1576
|
arguments: "semantic",
|
|
@@ -1592,11 +1584,11 @@ function help2(outcome, human, automation, related, order, acceptedReferences =
|
|
|
1592
1584
|
order
|
|
1593
1585
|
};
|
|
1594
1586
|
}
|
|
1595
|
-
var marketBooksInput =
|
|
1587
|
+
var marketBooksInput = z9.object({
|
|
1596
1588
|
$positionals: positionals,
|
|
1597
|
-
gpuSlug:
|
|
1589
|
+
gpuSlug: z9.string().min(1).optional().describe('Only this catalog GPU slug, or "cpu".'),
|
|
1598
1590
|
saleType,
|
|
1599
|
-
region:
|
|
1591
|
+
region: z9.string().min(1).optional().describe("Only this region slug, or any for the books of bids in any region.")
|
|
1600
1592
|
});
|
|
1601
1593
|
var marketBooksCapability = defineCapability({
|
|
1602
1594
|
id: "market.books",
|
|
@@ -1609,13 +1601,12 @@ var marketBooksCapability = defineCapability({
|
|
|
1609
1601
|
command: ["market", "books"],
|
|
1610
1602
|
vnext: help2("List order books by GPU type, sale type and region with their best bid and ask.", "ornn market books [--gpu-slug <slug>] [--sale-type spot|on-demand] [--region <slug>]", "ornn market books --sale-type on-demand --format json", ["market book", "market quote", "market bid"], 31)
|
|
1611
1603
|
},
|
|
1612
|
-
slack: false,
|
|
1613
1604
|
execute: async (ctx, input) => {
|
|
1614
1605
|
const parsed = marketBooksInput.parse(input);
|
|
1615
1606
|
return listOrderBooks(ctx.fetch, parsed);
|
|
1616
1607
|
}
|
|
1617
1608
|
});
|
|
1618
|
-
var marketBookInput =
|
|
1609
|
+
var marketBookInput = z9.object({
|
|
1619
1610
|
$positionals: positionals,
|
|
1620
1611
|
gpuSlug: bookSlug,
|
|
1621
1612
|
saleType,
|
|
@@ -1632,7 +1623,6 @@ var marketBookCapability = defineCapability({
|
|
|
1632
1623
|
command: ["market", "book"],
|
|
1633
1624
|
vnext: help2("Show bid and ask depth for one GPU type, sale type and region.", "ornn market book --gpu-slug <slug> [--sale-type spot|on-demand] [--region <slug>]", "ornn market book --gpu-slug <slug> --region us-east-11 --format json", ["market books", "market trades", "market quote"], 32, ["catalog GPU slug", "region slug"])
|
|
1634
1625
|
},
|
|
1635
|
-
slack: false,
|
|
1636
1626
|
execute: async (ctx, input) => {
|
|
1637
1627
|
const parsed = marketBookInput.parse(input);
|
|
1638
1628
|
return getOrderBook(ctx.fetch, parsed.gpuSlug, parsed);
|
|
@@ -1649,17 +1639,16 @@ var marketTradesCapability = defineCapability({
|
|
|
1649
1639
|
command: ["market", "trades"],
|
|
1650
1640
|
vnext: help2("List recent fills for one GPU type, sale type and region.", "ornn market trades --gpu-slug <slug> [--sale-type spot|on-demand] [--region <slug>]", "ornn market trades --gpu-slug <slug> --format json", ["market book"], 33, ["catalog GPU slug", "region slug"])
|
|
1651
1641
|
},
|
|
1652
|
-
slack: false,
|
|
1653
1642
|
execute: async (ctx, input) => {
|
|
1654
1643
|
const parsed = marketBookInput.parse(input);
|
|
1655
1644
|
return listTrades(ctx.fetch, parsed.gpuSlug, parsed);
|
|
1656
1645
|
}
|
|
1657
1646
|
});
|
|
1658
|
-
var marketQuoteInput =
|
|
1647
|
+
var marketQuoteInput = z9.object({
|
|
1659
1648
|
$positionals: positionals,
|
|
1660
1649
|
gpuSlug: bookSlug,
|
|
1661
1650
|
saleType,
|
|
1662
|
-
region:
|
|
1651
|
+
region: z9.string().min(1).optional().describe("A region with an order book (see market books). Omit for any region."),
|
|
1663
1652
|
nodes
|
|
1664
1653
|
});
|
|
1665
1654
|
var marketQuoteCapability = defineCapability({
|
|
@@ -1673,21 +1662,20 @@ var marketQuoteCapability = defineCapability({
|
|
|
1673
1662
|
command: ["market", "quote"],
|
|
1674
1663
|
vnext: help2("Preview which nodes a bid would take now and what each costs.", "ornn market quote --gpu-slug <slug> --nodes <n> [--sale-type spot|on-demand] [--region <slug>]", "ornn market quote --gpu-slug <slug> --nodes 2 --format json", ["market book", "market bid"], 34, ["catalog GPU slug", "region slug"])
|
|
1675
1664
|
},
|
|
1676
|
-
slack: false,
|
|
1677
1665
|
execute: async (ctx, input) => {
|
|
1678
1666
|
const parsed = marketQuoteInput.parse(input);
|
|
1679
1667
|
return quoteBid(ctx.fetch, { ...parsed, orderType: "market" });
|
|
1680
1668
|
}
|
|
1681
1669
|
});
|
|
1682
|
-
var marketBidInput =
|
|
1670
|
+
var marketBidInput = z9.object({
|
|
1683
1671
|
$positionals: positionals,
|
|
1684
1672
|
gpuSlug: bookSlug,
|
|
1685
1673
|
saleType,
|
|
1686
|
-
region:
|
|
1674
|
+
region: z9.string().min(1).optional().describe("A region with an order book (see market books), for example us-east-11. Omit to fill in any region."),
|
|
1687
1675
|
nodes,
|
|
1688
|
-
diskId:
|
|
1689
|
-
idempotencyKey:
|
|
1690
|
-
confirm:
|
|
1676
|
+
diskId: z9.string().uuid().optional().describe("The disk every VM boots. Omit to boot your newest disk, else Ornn's newest."),
|
|
1677
|
+
idempotencyKey: z9.string().min(1).max(200).optional(),
|
|
1678
|
+
confirm: z9.boolean().optional()
|
|
1691
1679
|
});
|
|
1692
1680
|
var marketBidCapability = defineCapability({
|
|
1693
1681
|
id: "market.bid",
|
|
@@ -1700,7 +1688,6 @@ var marketBidCapability = defineCapability({
|
|
|
1700
1688
|
command: ["market", "bid"],
|
|
1701
1689
|
vnext: help2("Buy nodes at market.", "ornn market bid --gpu-slug <slug> --nodes <n> [--sale-type spot|on-demand] [--region <slug>] [--disk-id <id>]", "ornn market bid --gpu-slug <slug> --nodes 2 --format json", ["market quote", "market orders", "market fills", "market cancel"], 35, ["catalog GPU slug"])
|
|
1702
1690
|
},
|
|
1703
|
-
slack: false,
|
|
1704
1691
|
execute: async (ctx, input) => {
|
|
1705
1692
|
const parsed = marketBidInput.parse(input);
|
|
1706
1693
|
const body2 = {
|
|
@@ -1724,7 +1711,7 @@ var marketBidCapability = defineCapability({
|
|
|
1724
1711
|
return placeBid(ctx.fetch, body2, resolveIdempotencyKey(ctx, parsed.idempotencyKey));
|
|
1725
1712
|
}
|
|
1726
1713
|
});
|
|
1727
|
-
var marketOrdersInput =
|
|
1714
|
+
var marketOrdersInput = z9.object({ $positionals: positionals });
|
|
1728
1715
|
var marketOrdersCapability = defineCapability({
|
|
1729
1716
|
id: "market.orders",
|
|
1730
1717
|
domain: "markets",
|
|
@@ -1736,13 +1723,12 @@ var marketOrdersCapability = defineCapability({
|
|
|
1736
1723
|
command: ["market", "orders"],
|
|
1737
1724
|
vnext: help2("List your organization's bids and listing asks.", "ornn market orders", "ornn market orders --format json", ["market bid", "market fills", "market cancel"], 36)
|
|
1738
1725
|
},
|
|
1739
|
-
slack: false,
|
|
1740
1726
|
execute: async (ctx) => listOrders(ctx.fetch)
|
|
1741
1727
|
});
|
|
1742
|
-
var marketCancelInput =
|
|
1728
|
+
var marketCancelInput = z9.object({
|
|
1743
1729
|
$positionals: positionals,
|
|
1744
|
-
orderId:
|
|
1745
|
-
confirm:
|
|
1730
|
+
orderId: z9.string().uuid().describe("A resting bid ID."),
|
|
1731
|
+
confirm: z9.boolean().optional()
|
|
1746
1732
|
});
|
|
1747
1733
|
var marketCancelCapability = defineCapability({
|
|
1748
1734
|
id: "market.cancel",
|
|
@@ -1755,7 +1741,6 @@ var marketCancelCapability = defineCapability({
|
|
|
1755
1741
|
command: ["market", "cancel"],
|
|
1756
1742
|
vnext: help2("Cancel the rest of a resting bid.", "ornn market cancel --order-id <id>", "ornn market cancel --order-id <id> --format json", ["market orders", "market end"], 37, ["order ID"])
|
|
1757
1743
|
},
|
|
1758
|
-
slack: false,
|
|
1759
1744
|
execute: async (ctx, input) => {
|
|
1760
1745
|
const parsed = marketCancelInput.parse(input);
|
|
1761
1746
|
const gate = await consent(ctx, "market.cancel", "Cancel bid", [
|
|
@@ -1770,9 +1755,9 @@ var marketCancelCapability = defineCapability({
|
|
|
1770
1755
|
return cancelOrder(ctx.fetch, parsed.orderId);
|
|
1771
1756
|
}
|
|
1772
1757
|
});
|
|
1773
|
-
var marketFillsInput =
|
|
1758
|
+
var marketFillsInput = z9.object({
|
|
1774
1759
|
$positionals: positionals,
|
|
1775
|
-
orderId:
|
|
1760
|
+
orderId: z9.string().uuid().optional().describe("Only this bid's fills.")
|
|
1776
1761
|
});
|
|
1777
1762
|
var marketFillsCapability = defineCapability({
|
|
1778
1763
|
id: "market.fills",
|
|
@@ -1785,16 +1770,15 @@ var marketFillsCapability = defineCapability({
|
|
|
1785
1770
|
command: ["market", "fills"],
|
|
1786
1771
|
vnext: help2("List the nodes your bids bought, one reservation per fill.", "ornn market fills [--order-id <id>]", "ornn market fills --format json", ["market orders", "market end"], 38, ["order ID"])
|
|
1787
1772
|
},
|
|
1788
|
-
slack: false,
|
|
1789
1773
|
execute: async (ctx, input) => {
|
|
1790
1774
|
const parsed = marketFillsInput.parse(input ?? {});
|
|
1791
1775
|
return listFills(ctx.fetch, { orderId: parsed.orderId });
|
|
1792
1776
|
}
|
|
1793
1777
|
});
|
|
1794
|
-
var marketEndInput =
|
|
1778
|
+
var marketEndInput = z9.object({
|
|
1795
1779
|
$positionals: positionals,
|
|
1796
|
-
fillId:
|
|
1797
|
-
confirm:
|
|
1780
|
+
fillId: z9.string().uuid().describe("A fill ID; it is also its reservation ID."),
|
|
1781
|
+
confirm: z9.boolean().optional()
|
|
1798
1782
|
});
|
|
1799
1783
|
var marketEndCapability = defineCapability({
|
|
1800
1784
|
id: "market.end",
|
|
@@ -1807,7 +1791,6 @@ var marketEndCapability = defineCapability({
|
|
|
1807
1791
|
command: ["market", "end"],
|
|
1808
1792
|
vnext: help2("End a running fill and stop its VMs.", "ornn market end --fill-id <id>", "ornn market end --fill-id <id> --format json", ["market fills"], 39, ["fill ID", "reservation ID"])
|
|
1809
1793
|
},
|
|
1810
|
-
slack: false,
|
|
1811
1794
|
execute: async (ctx, input) => {
|
|
1812
1795
|
const parsed = marketEndInput.parse(input);
|
|
1813
1796
|
const gate = await consent(ctx, "market.end", "End fill", [
|
|
@@ -1819,9 +1802,9 @@ var marketEndCapability = defineCapability({
|
|
|
1819
1802
|
return stopReservation(ctx.fetch, parsed.fillId);
|
|
1820
1803
|
}
|
|
1821
1804
|
});
|
|
1822
|
-
var offersListInput =
|
|
1805
|
+
var offersListInput = z9.object({
|
|
1823
1806
|
$positionals: positionals,
|
|
1824
|
-
listingId:
|
|
1807
|
+
listingId: z9.string().uuid().optional().describe("A primary listing whose offer book to read. Omit for your organization's offers.")
|
|
1825
1808
|
});
|
|
1826
1809
|
var offersListCapability = defineCapability({
|
|
1827
1810
|
id: "offers.list",
|
|
@@ -1834,21 +1817,20 @@ var offersListCapability = defineCapability({
|
|
|
1834
1817
|
command: ["offers", "list"],
|
|
1835
1818
|
vnext: help2("List offers your organization made or received, or one listing's offer book.", "ornn offers list [--listing-id <id>]", "ornn offers list --format json", ["offers post", "offers accept", "offers cancel"], 42, ["listing ID"])
|
|
1836
1819
|
},
|
|
1837
|
-
slack: false,
|
|
1838
1820
|
execute: async (ctx, input) => {
|
|
1839
1821
|
const parsed = offersListInput.parse(input ?? {});
|
|
1840
1822
|
return listOffers(ctx.fetch, { listingId: parsed.listingId });
|
|
1841
1823
|
}
|
|
1842
1824
|
});
|
|
1843
|
-
var offerPostInput =
|
|
1825
|
+
var offerPostInput = z9.object({
|
|
1844
1826
|
$positionals: positionals,
|
|
1845
|
-
listingId:
|
|
1846
|
-
listingTermId:
|
|
1847
|
-
durationSeconds:
|
|
1827
|
+
listingId: z9.string().uuid().describe("A primary listing."),
|
|
1828
|
+
listingTermId: z9.string().uuid().describe("The listingTermsId of a non-spot term of that listing, from listings.terms."),
|
|
1829
|
+
durationSeconds: z9.coerce.number().int().positive().optional().describe("How long the reservation runs, within the term's minimum and maximum duration. Omit only when they are equal, or when the term has none (the rest of the listing)."),
|
|
1848
1830
|
pricePerGpuHourMicroUsd: microUsd.describe("Offer price in micro-USD per GPU-hour, or per vCPU-hour on CPU capacity (1000000 = $1.00). Covers every node on the listing."),
|
|
1849
|
-
downPaymentCents:
|
|
1850
|
-
idempotencyKey:
|
|
1851
|
-
confirm:
|
|
1831
|
+
downPaymentCents: z9.coerce.number().int().min(0).optional().describe("The down payment you offer, in cents."),
|
|
1832
|
+
idempotencyKey: z9.string().min(1).max(200).optional(),
|
|
1833
|
+
confirm: z9.boolean().optional()
|
|
1852
1834
|
});
|
|
1853
1835
|
var offerPostCapability = defineCapability({
|
|
1854
1836
|
id: "offers.post",
|
|
@@ -1861,7 +1843,6 @@ var offerPostCapability = defineCapability({
|
|
|
1861
1843
|
command: ["offers", "post"],
|
|
1862
1844
|
vnext: help2("Offer a price for a whole primary listing on one of its terms.", "ornn offers post --listing-id <id> --listing-term-id <id> [--duration-seconds <n>] --price-per-gpu-hour-micro-usd <n> [--down-payment-cents <n>]", "ornn offers post --listing-id <id> --listing-term-id <id> --duration-seconds 2592000 --price-per-gpu-hour-micro-usd 2500000 --format json", ["capacity-offers terms", "offers list", "offers cancel"], 43, ["listing ID", "listingTermsId from capacity-offers terms"])
|
|
1863
1845
|
},
|
|
1864
|
-
slack: false,
|
|
1865
1846
|
execute: async (ctx, input) => {
|
|
1866
1847
|
const parsed = offerPostInput.parse(input);
|
|
1867
1848
|
const body2 = {
|
|
@@ -1886,10 +1867,10 @@ var offerPostCapability = defineCapability({
|
|
|
1886
1867
|
return postOffer(ctx.fetch, body2, resolveIdempotencyKey(ctx, parsed.idempotencyKey));
|
|
1887
1868
|
}
|
|
1888
1869
|
});
|
|
1889
|
-
var offerDecisionInput =
|
|
1870
|
+
var offerDecisionInput = z9.object({
|
|
1890
1871
|
$positionals: positionals,
|
|
1891
|
-
offerId:
|
|
1892
|
-
confirm:
|
|
1872
|
+
offerId: z9.string().uuid(),
|
|
1873
|
+
confirm: z9.boolean().optional()
|
|
1893
1874
|
});
|
|
1894
1875
|
var offerAcceptCapability = defineCapability({
|
|
1895
1876
|
id: "offers.accept",
|
|
@@ -1902,7 +1883,6 @@ var offerAcceptCapability = defineCapability({
|
|
|
1902
1883
|
command: ["offers", "accept"],
|
|
1903
1884
|
vnext: help2("Accept one offer on a listing you own.", "ornn offers accept --offer-id <id>", "ornn offers accept --offer-id <id> --format json", ["offers list"], 44, ["offer ID"])
|
|
1904
1885
|
},
|
|
1905
|
-
slack: false,
|
|
1906
1886
|
execute: async (ctx, input) => {
|
|
1907
1887
|
const parsed = offerDecisionInput.parse(input);
|
|
1908
1888
|
const gate = await consent(ctx, "offers.accept", "Accept offer", [
|
|
@@ -1928,7 +1908,6 @@ var offerCancelCapability = defineCapability({
|
|
|
1928
1908
|
command: ["offers", "cancel"],
|
|
1929
1909
|
vnext: help2("Cancel one open offer.", "ornn offers cancel --offer-id <id>", "ornn offers cancel --offer-id <id> --format json", ["offers list"], 45, ["offer ID"])
|
|
1930
1910
|
},
|
|
1931
|
-
slack: false,
|
|
1932
1911
|
execute: async (ctx, input) => {
|
|
1933
1912
|
const parsed = offerDecisionInput.parse(input);
|
|
1934
1913
|
const gate = await consent(ctx, "offers.cancel", "Cancel offer", [{ label: "Offer", value: parsed.offerId }], { offerId: parsed.offerId });
|
|
@@ -1954,20 +1933,20 @@ var marketCapabilities = [
|
|
|
1954
1933
|
];
|
|
1955
1934
|
|
|
1956
1935
|
// ../../packages/capabilities/dist/capabilities/admin-enrollment.js
|
|
1957
|
-
import { z as
|
|
1936
|
+
import { z as z11 } from "zod";
|
|
1958
1937
|
|
|
1959
1938
|
// ../../packages/capabilities/dist/capabilities/tokens.js
|
|
1960
|
-
import { z as
|
|
1961
|
-
var emptyInput =
|
|
1962
|
-
var tokenCreateInput =
|
|
1963
|
-
organization_id:
|
|
1964
|
-
profile_id:
|
|
1965
|
-
expires_in_seconds:
|
|
1966
|
-
host:
|
|
1967
|
-
hosts:
|
|
1968
|
-
username:
|
|
1969
|
-
port:
|
|
1970
|
-
private_key:
|
|
1939
|
+
import { z as z10 } from "zod";
|
|
1940
|
+
var emptyInput = z10.object({});
|
|
1941
|
+
var tokenCreateInput = z10.object({
|
|
1942
|
+
organization_id: z10.string().uuid(),
|
|
1943
|
+
profile_id: z10.string().uuid().optional(),
|
|
1944
|
+
expires_in_seconds: z10.number().int().min(300).max(86400).nullish(),
|
|
1945
|
+
host: z10.string().min(1).nullish(),
|
|
1946
|
+
hosts: z10.array(z10.string().min(1)).max(64).nullish(),
|
|
1947
|
+
username: z10.string().min(1).nullish(),
|
|
1948
|
+
port: z10.number().int().min(1).max(65535).nullish(),
|
|
1949
|
+
private_key: z10.string().min(1).nullish()
|
|
1971
1950
|
});
|
|
1972
1951
|
function tokenMetadata(value) {
|
|
1973
1952
|
if (!value || typeof value !== "object")
|
|
@@ -2082,9 +2061,9 @@ var tokensCreateCapability = defineCapability({
|
|
|
2082
2061
|
var tokenCapabilities = [tokensListCapability, tokensCreateCapability];
|
|
2083
2062
|
|
|
2084
2063
|
// ../../packages/capabilities/dist/capabilities/admin-enrollment.js
|
|
2085
|
-
var UUID =
|
|
2086
|
-
var nonEmpty =
|
|
2087
|
-
var tokenTtl =
|
|
2064
|
+
var UUID = z11.string().uuid();
|
|
2065
|
+
var nonEmpty = z11.string().trim().min(1);
|
|
2066
|
+
var tokenTtl = z11.number().int().min(60).max(24 * 60 * 60);
|
|
2088
2067
|
function adminHelp2(outcome, human, automation, acceptedReferences = [], review) {
|
|
2089
2068
|
return {
|
|
2090
2069
|
audience: "admin",
|
|
@@ -2096,12 +2075,12 @@ function adminHelp2(outcome, human, automation, acceptedReferences = [], review)
|
|
|
2096
2075
|
...review ? { review } : {}
|
|
2097
2076
|
};
|
|
2098
2077
|
}
|
|
2099
|
-
var tokenRevokeInput =
|
|
2100
|
-
tokenId:
|
|
2078
|
+
var tokenRevokeInput = z11.object({
|
|
2079
|
+
tokenId: z11.string().min(1),
|
|
2101
2080
|
token_id: UUID.optional(),
|
|
2102
2081
|
expected_created_at: nonEmpty.optional(),
|
|
2103
2082
|
idempotency_key: nonEmpty.optional(),
|
|
2104
|
-
confirm:
|
|
2083
|
+
confirm: z11.boolean().optional()
|
|
2105
2084
|
});
|
|
2106
2085
|
function codedError(code, message) {
|
|
2107
2086
|
const error = new Error(message);
|
|
@@ -2135,7 +2114,6 @@ var adminEnrollmentTokenRevokeCapability = defineCapability({
|
|
|
2135
2114
|
command: ["admin", "enrollment-tokens", "revoke"],
|
|
2136
2115
|
vnext: adminHelp2("Revoke one exact enrollment-token generation.", "ornn admin enrollment-tokens revoke <token-id> [--expected-created-at TIME] []", "ornn admin enrollment-tokens revoke <token-id> --expected-created-at TIME --idempotency-key KEY --format json", ["canonical token UUID", "token created_at generation"], "Review the exact token generation and the loss of future enrollment access.")
|
|
2137
2116
|
},
|
|
2138
|
-
slack: false,
|
|
2139
2117
|
mcp: { name: "enrollment_token_revoke" },
|
|
2140
2118
|
input: tokenRevokeInput,
|
|
2141
2119
|
execute: async (ctx, input) => {
|
|
@@ -2170,17 +2148,17 @@ var adminEnrollmentTokenRevokeCapability = defineCapability({
|
|
|
2170
2148
|
};
|
|
2171
2149
|
}
|
|
2172
2150
|
});
|
|
2173
|
-
var nodeEnrollInput =
|
|
2151
|
+
var nodeEnrollInput = z11.object({
|
|
2174
2152
|
node_id: UUID,
|
|
2175
2153
|
host: nonEmpty,
|
|
2176
2154
|
organization_id: UUID,
|
|
2177
2155
|
facility_id: UUID,
|
|
2178
2156
|
identity_file: nonEmpty,
|
|
2179
|
-
private_key:
|
|
2157
|
+
private_key: z11.string().min(1).optional(),
|
|
2180
2158
|
username: nonEmpty.default("root"),
|
|
2181
|
-
port:
|
|
2159
|
+
port: z11.number().int().min(1).max(65535).default(22),
|
|
2182
2160
|
expires_in_seconds: tokenTtl,
|
|
2183
|
-
replace_existing_management:
|
|
2161
|
+
replace_existing_management: z11.literal(true)
|
|
2184
2162
|
});
|
|
2185
2163
|
var adminNodeEnrollCapability = defineCapability({
|
|
2186
2164
|
id: "nodes.enroll",
|
|
@@ -2231,7 +2209,7 @@ var adminNodeEnrollCapability = defineCapability({
|
|
|
2231
2209
|
return run;
|
|
2232
2210
|
}
|
|
2233
2211
|
});
|
|
2234
|
-
var nodeKeyInput =
|
|
2212
|
+
var nodeKeyInput = z11.object({ node_id: UUID });
|
|
2235
2213
|
var adminNodeExportKeyCapability = defineCapability({
|
|
2236
2214
|
id: "nodes.export-key",
|
|
2237
2215
|
domain: "fleet",
|
|
@@ -2285,11 +2263,11 @@ function createJob(request, body2) {
|
|
|
2285
2263
|
}
|
|
2286
2264
|
|
|
2287
2265
|
// ../../packages/capabilities/dist/capabilities/admin-node-diagnostics.js
|
|
2288
|
-
import { z as
|
|
2289
|
-
var nodeId =
|
|
2266
|
+
import { z as z12 } from "zod";
|
|
2267
|
+
var nodeId = z12.string().min(1).refine((value) => value === value.trim(), {
|
|
2290
2268
|
message: "node_id must be an exact canonical node ID without surrounding whitespace"
|
|
2291
2269
|
});
|
|
2292
|
-
var adminNodeDiagnoseInput =
|
|
2270
|
+
var adminNodeDiagnoseInput = z12.object({
|
|
2293
2271
|
node_id: nodeId
|
|
2294
2272
|
});
|
|
2295
2273
|
var adminNodeDiagnoseCapability = defineCapability({
|
|
@@ -2310,9 +2288,8 @@ var adminNodeDiagnoseCapability = defineCapability({
|
|
|
2310
2288
|
review: "Exact node, lifecycle, reachability, and diagnosis workflow."
|
|
2311
2289
|
}
|
|
2312
2290
|
},
|
|
2313
|
-
mcp: false,
|
|
2314
|
-
slack: false,
|
|
2315
2291
|
input: adminNodeDiagnoseInput,
|
|
2292
|
+
mcp: false,
|
|
2316
2293
|
execute: async (ctx, input) => {
|
|
2317
2294
|
const parsed = adminNodeDiagnoseInput.parse(input);
|
|
2318
2295
|
const body2 = { node_id: parsed.node_id, burn_time_minutes: 0 };
|
|
@@ -2328,8 +2305,8 @@ var adminNodeDiagnoseCapability = defineCapability({
|
|
|
2328
2305
|
var adminNodeDiagnosticCapabilities = [adminNodeDiagnoseCapability];
|
|
2329
2306
|
|
|
2330
2307
|
// ../../packages/capabilities/dist/capabilities/admin-node-sanitize.js
|
|
2331
|
-
import { z as
|
|
2332
|
-
var uuid2 =
|
|
2308
|
+
import { z as z13 } from "zod";
|
|
2309
|
+
var uuid2 = z13.string().uuid();
|
|
2333
2310
|
var sanitizeOperations = ["data_wipe", "ram_roundtrip", "node_turnover", "host_restore"];
|
|
2334
2311
|
var sanitizeConfirmations = [
|
|
2335
2312
|
"SANITIZE",
|
|
@@ -2348,13 +2325,13 @@ var startConfirmation = {
|
|
|
2348
2325
|
node_turnover: "WIPE AND RESTORE",
|
|
2349
2326
|
host_restore: "RESTORE HOST"
|
|
2350
2327
|
};
|
|
2351
|
-
var nodeSanitizeStartInput =
|
|
2328
|
+
var nodeSanitizeStartInput = z13.object({
|
|
2352
2329
|
node_id: uuid2.describe("Node UUID whose drives will be sanitized."),
|
|
2353
2330
|
job_id: uuid2.describe("Caller-supplied stable sanitize job UUID; reuse it when retrying."),
|
|
2354
|
-
operation:
|
|
2331
|
+
operation: z13.enum(sanitizeOperations).optional().describe("Sanitize operation; omission defaults to data_wipe."),
|
|
2355
2332
|
maintenance_batch_id: uuid2.optional().describe("Optional maintenance batch UUID recorded by the audit middleware."),
|
|
2356
2333
|
recovery_uuid: uuid2.optional().describe("Recovery boot identity: required for ram_roundtrip, optional for node_turnover and host_restore, rejected for data_wipe."),
|
|
2357
|
-
confirmation:
|
|
2334
|
+
confirmation: z13.enum(sanitizeConfirmations).describe("Exact confirmation phrase required for the selected operation.")
|
|
2358
2335
|
}).strict().refine((input) => input.confirmation === startConfirmation[input.operation ?? "data_wipe"], {
|
|
2359
2336
|
message: "confirmation must exactly match the selected sanitize operation.",
|
|
2360
2337
|
path: ["confirmation"]
|
|
@@ -2367,30 +2344,30 @@ var nodeSanitizeStartInput = z12.object({
|
|
|
2367
2344
|
message: "recovery_uuid is required for ram_roundtrip and not accepted for data_wipe.",
|
|
2368
2345
|
path: ["recovery_uuid"]
|
|
2369
2346
|
});
|
|
2370
|
-
var nodeSanitizeShowInput =
|
|
2347
|
+
var nodeSanitizeShowInput = z13.object({
|
|
2371
2348
|
node_id: uuid2.describe("Node UUID associated with the sanitize job."),
|
|
2372
2349
|
job_id: uuid2.describe("Sanitize job UUID to read.")
|
|
2373
2350
|
}).strict();
|
|
2374
|
-
var manualCleanupInput =
|
|
2351
|
+
var manualCleanupInput = z13.object({
|
|
2375
2352
|
reservation_id: uuid2.describe("Reservation whose Bare Metal release this turnover job holds."),
|
|
2376
2353
|
lifecycle_operation_id: uuid2.describe("The current orchestrator release operation UUID that owns the hold, not a Commerce operation."),
|
|
2377
|
-
reason:
|
|
2378
|
-
evidence_sha256:
|
|
2379
|
-
acknowledge_retained_os:
|
|
2380
|
-
tenant_access_revoked:
|
|
2381
|
-
data_drives_sanitized:
|
|
2354
|
+
reason: z13.string().trim().min(20).max(2e3).describe("Cleanup performed and why the existing OS must be retained."),
|
|
2355
|
+
evidence_sha256: z13.string().regex(/^[0-9a-f]{64}$/, "evidence_sha256 must be 64 lowercase hex characters.").describe("Lowercase SHA-256 of the immutable cleanup evidence file kept outside the host."),
|
|
2356
|
+
acknowledge_retained_os: z13.literal(true).describe("The existing OS is retained; OS integrity and full-media erasure are not established."),
|
|
2357
|
+
tenant_access_revoked: z13.literal(true).describe("Former tenant workloads, keys, and active access were removed and verified."),
|
|
2358
|
+
data_drives_sanitized: z13.literal(true).describe("Every local data drive was sanitized with retained per-drive receipts.")
|
|
2382
2359
|
}).strict();
|
|
2383
|
-
var nodeSanitizeUpdateInput =
|
|
2360
|
+
var nodeSanitizeUpdateInput = z13.object({
|
|
2384
2361
|
node_id: uuid2.describe("Node UUID associated with the sanitize job."),
|
|
2385
2362
|
job_id: uuid2.describe("Sanitize job UUID to decide."),
|
|
2386
|
-
confirmation:
|
|
2363
|
+
confirmation: z13.enum(sanitizeDecisions).describe("APPROVE SANITIZATION runs the held job, SKIP SANITIZATION skips an eligible first-use wipe, ACCEPT MANUAL CLEANUP attests manual cleanup with the OS retained."),
|
|
2387
2364
|
manual_cleanup: manualCleanupInput.optional().describe("Required with ACCEPT MANUAL CLEANUP and rejected with any other decision.")
|
|
2388
2365
|
}).strict().refine((input) => input.confirmation === "ACCEPT MANUAL CLEANUP" === (input.manual_cleanup !== void 0), {
|
|
2389
2366
|
message: "manual_cleanup is required with ACCEPT MANUAL CLEANUP and allowed only with it.",
|
|
2390
2367
|
path: ["manual_cleanup"]
|
|
2391
2368
|
});
|
|
2392
2369
|
function slackParameters(schema) {
|
|
2393
|
-
const json =
|
|
2370
|
+
const json = z13.toJSONSchema(schema);
|
|
2394
2371
|
return {
|
|
2395
2372
|
type: "object",
|
|
2396
2373
|
properties: json.properties,
|
|
@@ -2478,32 +2455,32 @@ var adminNodeSanitizeCapabilities = [
|
|
|
2478
2455
|
];
|
|
2479
2456
|
|
|
2480
2457
|
// ../../packages/capabilities/dist/capabilities/admin-nodes-lifecycle.js
|
|
2481
|
-
import { z as
|
|
2482
|
-
var nodeReference =
|
|
2483
|
-
var optionalText =
|
|
2458
|
+
import { z as z14 } from "zod";
|
|
2459
|
+
var nodeReference = z14.string().trim().min(1);
|
|
2460
|
+
var optionalText = z14.string().trim().min(1).optional();
|
|
2484
2461
|
var commonInput = {
|
|
2485
2462
|
node_ref: nodeReference,
|
|
2486
2463
|
node_id: optionalText,
|
|
2487
2464
|
idempotency_key: optionalText,
|
|
2488
2465
|
reason: optionalText,
|
|
2489
|
-
yes:
|
|
2490
|
-
wait:
|
|
2491
|
-
timeout_seconds:
|
|
2466
|
+
yes: z14.boolean().optional(),
|
|
2467
|
+
wait: z14.boolean().optional(),
|
|
2468
|
+
timeout_seconds: z14.number().positive().optional()
|
|
2492
2469
|
};
|
|
2493
|
-
var rebootInput =
|
|
2470
|
+
var rebootInput = z14.object({
|
|
2494
2471
|
...commonInput,
|
|
2495
2472
|
machine_id: optionalText
|
|
2496
2473
|
});
|
|
2497
2474
|
var hardResetInput = rebootInput.extend({
|
|
2498
|
-
erase_local_data:
|
|
2475
|
+
erase_local_data: z14.literal(true)
|
|
2499
2476
|
});
|
|
2500
|
-
var assignmentInput =
|
|
2477
|
+
var assignmentInput = z14.object({
|
|
2501
2478
|
...commonInput,
|
|
2502
|
-
reservation_id:
|
|
2503
|
-
expected_reservation_id:
|
|
2479
|
+
reservation_id: z14.string().trim().min(1),
|
|
2480
|
+
expected_reservation_id: z14.string().nullable().optional()
|
|
2504
2481
|
});
|
|
2505
|
-
var machineRebootInput =
|
|
2506
|
-
var rebootOperationInput = machineRebootInput.extend({ idempotencyKey:
|
|
2482
|
+
var machineRebootInput = z14.object({ instanceId: z14.string(), confirm: z14.boolean().optional() });
|
|
2483
|
+
var rebootOperationInput = machineRebootInput.extend({ idempotencyKey: z14.string().optional() });
|
|
2507
2484
|
function adminLifecycleHelp(outcome, human, automation, review) {
|
|
2508
2485
|
return {
|
|
2509
2486
|
audience: "admin",
|
|
@@ -2563,7 +2540,6 @@ var adminNodeRebootCapability = defineCapability({
|
|
|
2563
2540
|
vnext: adminLifecycleHelp("Reboot one exact live machine while preserving local data and access configuration.", "ornn admin nodes reboot <node-ref> [] [--no-wait] [--timeout SECONDS]", "Unsupported: reboot requires an eligible human terminal.", "Node and live-machine identities, supplier, facility, capacity assignment, and preserved access.")
|
|
2564
2541
|
},
|
|
2565
2542
|
mcp: { name: "node_reboot", input: machineRebootInput },
|
|
2566
|
-
slack: false,
|
|
2567
2543
|
input: rebootOperationInput,
|
|
2568
2544
|
execute: (ctx, input) => reboot(ctx, input, "reboot")
|
|
2569
2545
|
});
|
|
@@ -2580,15 +2556,14 @@ var adminNodeHardResetCapability = defineCapability({
|
|
|
2580
2556
|
vnext: adminLifecycleHelp("Erase local tenant data and hard reset one exact live machine.", "ornn admin nodes hard-reset <node-ref> --erase-local-data [] [--no-wait] [--timeout SECONDS]", "Unsupported: hard reset requires an eligible human terminal.", "Node and live-machine identities, supplier, facility, capacity assignment, erased local data, and restored keys.")
|
|
2581
2557
|
},
|
|
2582
2558
|
mcp: { name: "node_hard_reset", input: machineRebootInput },
|
|
2583
|
-
slack: false,
|
|
2584
2559
|
input: rebootOperationInput,
|
|
2585
2560
|
execute: (ctx, input) => reboot(ctx, input, "hard_reset")
|
|
2586
2561
|
});
|
|
2587
|
-
var nodeAssignInput =
|
|
2588
|
-
nodeId:
|
|
2589
|
-
reservationId:
|
|
2590
|
-
expectedReservationId:
|
|
2591
|
-
confirm:
|
|
2562
|
+
var nodeAssignInput = z14.object({
|
|
2563
|
+
nodeId: z14.string(),
|
|
2564
|
+
reservationId: z14.string(),
|
|
2565
|
+
expectedReservationId: z14.string().nullable().optional().describe("The reservation the node is expected to currently hold, or null/omitted for a free node. The owner re-checks this under a row lock and rejects the assignment if the node's actual reservation differs, so a mistyped occupied node is never silently evicted. Pass the current reservation id to intentionally move an already-assigned node."),
|
|
2566
|
+
confirm: z14.boolean().optional()
|
|
2592
2567
|
});
|
|
2593
2568
|
var adminNodeAssignCapability = defineCapability({
|
|
2594
2569
|
id: "nodes.assign",
|
|
@@ -2611,8 +2586,7 @@ var adminNodeAssignCapability = defineCapability({
|
|
|
2611
2586
|
vnext: adminLifecycleHelp("Assign one exact node to one exact capacity reservation.", "ornn admin nodes assign <node-ref> --reservation <reservation-id> [] [--no-wait]", "ornn admin nodes assign <node-id> --reservation <reservation-id> --idempotency-key KEY --format json", "Node, supplier, facility, previous and requested capacity assignments, and tenant access change.")
|
|
2612
2587
|
},
|
|
2613
2588
|
mcp: { name: "node_assign", input: nodeAssignInput },
|
|
2614
|
-
|
|
2615
|
-
input: nodeAssignInput.extend({ idempotencyKey: z13.string().optional() }),
|
|
2589
|
+
input: nodeAssignInput.extend({ idempotencyKey: z14.string().optional() }),
|
|
2616
2590
|
execute: async (ctx, input) => {
|
|
2617
2591
|
const body2 = {
|
|
2618
2592
|
reservation_id: input.reservationId,
|
|
@@ -2632,7 +2606,7 @@ var adminNodeLifecycleCapabilities = [
|
|
|
2632
2606
|
];
|
|
2633
2607
|
|
|
2634
2608
|
// ../../packages/capabilities/dist/capabilities/billing.js
|
|
2635
|
-
import { z as
|
|
2609
|
+
import { z as z15 } from "zod";
|
|
2636
2610
|
var DATE_ONLY = /^\d{4}-\d{2}-\d{2}$/;
|
|
2637
2611
|
var billingCapabilities = [
|
|
2638
2612
|
defineCapability({
|
|
@@ -2641,8 +2615,7 @@ var billingCapabilities = [
|
|
|
2641
2615
|
roles: ["user"],
|
|
2642
2616
|
description: "Read account billing totals: open balance, earliest due date, and paid monthly totals grouped by currency. Usage estimates are available separately through billing_showback.",
|
|
2643
2617
|
mutation: "read",
|
|
2644
|
-
input:
|
|
2645
|
-
slack: false,
|
|
2618
|
+
input: z15.object({}),
|
|
2646
2619
|
execute: (ctx) => getBillingSummary(ctx.fetch)
|
|
2647
2620
|
}),
|
|
2648
2621
|
defineCapability({
|
|
@@ -2651,11 +2624,10 @@ var billingCapabilities = [
|
|
|
2651
2624
|
roles: ["user"],
|
|
2652
2625
|
description: "List a page of this tenant's invoices.",
|
|
2653
2626
|
mutation: "read",
|
|
2654
|
-
input:
|
|
2655
|
-
limit:
|
|
2656
|
-
cursor:
|
|
2627
|
+
input: z15.object({
|
|
2628
|
+
limit: z15.number().int().min(1).max(500).optional(),
|
|
2629
|
+
cursor: z15.string().trim().min(1).max(2048).optional()
|
|
2657
2630
|
}),
|
|
2658
|
-
slack: false,
|
|
2659
2631
|
execute: (ctx, input) => listInvoices(ctx.fetch, input)
|
|
2660
2632
|
}),
|
|
2661
2633
|
defineCapability({
|
|
@@ -2664,11 +2636,10 @@ var billingCapabilities = [
|
|
|
2664
2636
|
roles: ["user"],
|
|
2665
2637
|
description: "Get a showback report of this tenant's usage for a date range: per-reservation unit-hours, estimated cost, and share of total. Each row's unit is a GPU, or a vCPU when its `unit` is `vcpu` (CPU capacity); gpuCount and gpuHours count that unit. Unit-hours are the billable reservation interval that falls inside the inclusive dates, not a whole calendar day. This is an estimate from reservation windows, not a bill. Use billing_summary or billing_invoices for amounts actually charged.",
|
|
2666
2638
|
mutation: "read",
|
|
2667
|
-
input:
|
|
2668
|
-
start:
|
|
2669
|
-
end:
|
|
2639
|
+
input: z15.object({
|
|
2640
|
+
start: z15.string().regex(DATE_ONLY, "start must be a date in yyyy-mm-dd format."),
|
|
2641
|
+
end: z15.string().regex(DATE_ONLY, "end must be a date in yyyy-mm-dd format.")
|
|
2670
2642
|
}).refine((input) => input.start <= input.end, { message: "start must be on or before end." }),
|
|
2671
|
-
slack: false,
|
|
2672
2643
|
execute: (ctx, input) => getShowback(ctx.fetch, input)
|
|
2673
2644
|
})
|
|
2674
2645
|
];
|
|
@@ -2756,10 +2727,10 @@ function getCliStatus(request) {
|
|
|
2756
2727
|
}
|
|
2757
2728
|
|
|
2758
2729
|
// ../../packages/capabilities/dist/capabilities/compute.js
|
|
2759
|
-
import { z as
|
|
2730
|
+
import { z as z17 } from "zod";
|
|
2760
2731
|
|
|
2761
2732
|
// ../../packages/capabilities/dist/capabilities/ssh-keys.js
|
|
2762
|
-
import { z as
|
|
2733
|
+
import { z as z16 } from "zod";
|
|
2763
2734
|
async function activeReservationNodes(context, reservationId) {
|
|
2764
2735
|
const { nodes: nodes2 } = await listNodes(context.fetch, { reservation_id: reservationId });
|
|
2765
2736
|
return nodes2.filter((node) => node.status !== "terminated");
|
|
@@ -2792,13 +2763,12 @@ var reservationKeysPushCapability = defineCapability({
|
|
|
2792
2763
|
roles: ["user"],
|
|
2793
2764
|
description: "Push SSH key(s) onto all active machines for a reservation.",
|
|
2794
2765
|
mutation: "immediate",
|
|
2795
|
-
input:
|
|
2796
|
-
reservationId:
|
|
2797
|
-
sshKeyIds:
|
|
2798
|
-
requestId:
|
|
2766
|
+
input: z16.object({
|
|
2767
|
+
reservationId: z16.string(),
|
|
2768
|
+
sshKeyIds: z16.array(z16.string()).min(1),
|
|
2769
|
+
requestId: z16.string().optional()
|
|
2799
2770
|
}),
|
|
2800
2771
|
mcp: { aliases: ["access_keys_push"] },
|
|
2801
|
-
slack: false,
|
|
2802
2772
|
execute: async (context, input) => {
|
|
2803
2773
|
const nodes2 = await activeReservationNodes(context, input.reservationId);
|
|
2804
2774
|
if (!nodes2.length)
|
|
@@ -2815,94 +2785,94 @@ var reservationKeysPushCapability = defineCapability({
|
|
|
2815
2785
|
});
|
|
2816
2786
|
|
|
2817
2787
|
// ../../packages/capabilities/dist/capabilities/compute.js
|
|
2818
|
-
var positionals2 =
|
|
2819
|
-
var launchInput =
|
|
2788
|
+
var positionals2 = z17.array(z17.string()).default([]);
|
|
2789
|
+
var launchInput = z17.object({
|
|
2820
2790
|
$positionals: positionals2,
|
|
2821
|
-
guided:
|
|
2822
|
-
idempotencyKey:
|
|
2823
|
-
key:
|
|
2824
|
-
keyId:
|
|
2825
|
-
label:
|
|
2826
|
-
machine:
|
|
2827
|
-
machines:
|
|
2828
|
-
mode:
|
|
2829
|
-
mountAccess:
|
|
2830
|
-
network:
|
|
2831
|
-
noWait:
|
|
2832
|
-
nodes:
|
|
2833
|
-
publicKey:
|
|
2834
|
-
publicKeyFile:
|
|
2835
|
-
reservation:
|
|
2836
|
-
resume:
|
|
2837
|
-
timeout:
|
|
2838
|
-
username:
|
|
2839
|
-
vms:
|
|
2840
|
-
wait:
|
|
2841
|
-
yes:
|
|
2842
|
-
volume:
|
|
2791
|
+
guided: z17.boolean().optional(),
|
|
2792
|
+
idempotencyKey: z17.string().optional(),
|
|
2793
|
+
key: z17.string().optional(),
|
|
2794
|
+
keyId: z17.string().optional(),
|
|
2795
|
+
label: z17.string().optional(),
|
|
2796
|
+
machine: z17.string().optional(),
|
|
2797
|
+
machines: z17.string().optional(),
|
|
2798
|
+
mode: z17.string().optional(),
|
|
2799
|
+
mountAccess: z17.string().optional(),
|
|
2800
|
+
network: z17.string().optional(),
|
|
2801
|
+
noWait: z17.boolean().optional(),
|
|
2802
|
+
nodes: z17.union([z17.string(), z17.number()]).optional(),
|
|
2803
|
+
publicKey: z17.string().optional(),
|
|
2804
|
+
publicKeyFile: z17.string().optional(),
|
|
2805
|
+
reservation: z17.string().optional(),
|
|
2806
|
+
resume: z17.union([z17.string().min(1), z17.literal(true)]).optional(),
|
|
2807
|
+
timeout: z17.string().optional(),
|
|
2808
|
+
username: z17.string().optional(),
|
|
2809
|
+
vms: z17.string().optional(),
|
|
2810
|
+
wait: z17.boolean().optional(),
|
|
2811
|
+
yes: z17.boolean().optional(),
|
|
2812
|
+
volume: z17.string().optional()
|
|
2843
2813
|
}).strict();
|
|
2844
|
-
var pageInput =
|
|
2845
|
-
limit:
|
|
2846
|
-
cursor:
|
|
2814
|
+
var pageInput = z17.object({
|
|
2815
|
+
limit: z17.number().int().min(1).max(500).optional(),
|
|
2816
|
+
cursor: z17.string().optional()
|
|
2847
2817
|
});
|
|
2848
|
-
var publicKeyInput =
|
|
2849
|
-
publicKey:
|
|
2850
|
-
label:
|
|
2851
|
-
confirm:
|
|
2818
|
+
var publicKeyInput = z17.object({
|
|
2819
|
+
publicKey: z17.string(),
|
|
2820
|
+
label: z17.string().optional(),
|
|
2821
|
+
confirm: z17.boolean().optional()
|
|
2852
2822
|
});
|
|
2853
|
-
var keyIdInput =
|
|
2854
|
-
var reservationKeyInput = publicKeyInput.extend({ reservationId:
|
|
2823
|
+
var keyIdInput = z17.object({ keyId: z17.string(), confirm: z17.boolean().optional() });
|
|
2824
|
+
var reservationKeyInput = publicKeyInput.extend({ reservationId: z17.string() });
|
|
2855
2825
|
var ADDED_KEY_OUTCOME = "The response's outcome field says whether the key was created, was already_registered (returned unchanged, so the submitted label is not applied), or was reactivated from a revoked key.";
|
|
2856
|
-
var keyListInput =
|
|
2826
|
+
var keyListInput = z17.object({
|
|
2857
2827
|
$positionals: positionals2,
|
|
2858
|
-
cursor:
|
|
2859
|
-
limit:
|
|
2828
|
+
cursor: z17.string().optional(),
|
|
2829
|
+
limit: z17.coerce.number().int().min(1).max(500).optional()
|
|
2860
2830
|
}).strict();
|
|
2861
|
-
var keyMutationInput =
|
|
2831
|
+
var keyMutationInput = z17.object({
|
|
2862
2832
|
$positionals: positionals2,
|
|
2863
|
-
idempotencyKey:
|
|
2864
|
-
key:
|
|
2865
|
-
keyId:
|
|
2866
|
-
label:
|
|
2867
|
-
publicKey:
|
|
2868
|
-
publicKeyFile:
|
|
2869
|
-
yes:
|
|
2833
|
+
idempotencyKey: z17.string().optional(),
|
|
2834
|
+
key: z17.string().optional(),
|
|
2835
|
+
keyId: z17.string().optional(),
|
|
2836
|
+
label: z17.string().optional(),
|
|
2837
|
+
publicKey: z17.string().optional(),
|
|
2838
|
+
publicKeyFile: z17.string().optional(),
|
|
2839
|
+
yes: z17.boolean().optional()
|
|
2870
2840
|
}).strict();
|
|
2871
|
-
var machineListInput =
|
|
2841
|
+
var machineListInput = z17.object({
|
|
2872
2842
|
$positionals: positionals2,
|
|
2873
|
-
cursor:
|
|
2874
|
-
limit:
|
|
2843
|
+
cursor: z17.string().optional(),
|
|
2844
|
+
limit: z17.coerce.number().int().min(1).max(500).optional()
|
|
2875
2845
|
}).strict();
|
|
2876
|
-
var machineShowInput =
|
|
2846
|
+
var machineShowInput = z17.object({
|
|
2877
2847
|
$positionals: positionals2,
|
|
2878
|
-
guided:
|
|
2848
|
+
guided: z17.boolean().optional()
|
|
2879
2849
|
}).strict();
|
|
2880
|
-
var machineWaitInput =
|
|
2850
|
+
var machineWaitInput = z17.object({
|
|
2881
2851
|
$positionals: positionals2,
|
|
2882
|
-
guided:
|
|
2883
|
-
timeout:
|
|
2852
|
+
guided: z17.boolean().optional(),
|
|
2853
|
+
timeout: z17.string().optional()
|
|
2884
2854
|
}).strict();
|
|
2885
|
-
var machineSwitchInput =
|
|
2855
|
+
var machineSwitchInput = z17.object({
|
|
2886
2856
|
$positionals: positionals2,
|
|
2887
|
-
guided:
|
|
2888
|
-
eraseLocalData:
|
|
2889
|
-
idempotencyKey:
|
|
2890
|
-
mode:
|
|
2891
|
-
network:
|
|
2892
|
-
noWait:
|
|
2893
|
-
timeout:
|
|
2894
|
-
wait:
|
|
2895
|
-
yes:
|
|
2857
|
+
guided: z17.boolean().optional(),
|
|
2858
|
+
eraseLocalData: z17.boolean().optional(),
|
|
2859
|
+
idempotencyKey: z17.string().optional(),
|
|
2860
|
+
mode: z17.string().optional(),
|
|
2861
|
+
network: z17.string().optional(),
|
|
2862
|
+
noWait: z17.boolean().optional(),
|
|
2863
|
+
timeout: z17.string().optional(),
|
|
2864
|
+
wait: z17.boolean().optional(),
|
|
2865
|
+
yes: z17.boolean().optional()
|
|
2896
2866
|
}).strict();
|
|
2897
|
-
var machineMaintenanceInput =
|
|
2867
|
+
var machineMaintenanceInput = z17.object({
|
|
2898
2868
|
$positionals: positionals2,
|
|
2899
|
-
eraseLocalData:
|
|
2900
|
-
guided:
|
|
2901
|
-
idempotencyKey:
|
|
2902
|
-
noWait:
|
|
2903
|
-
timeout:
|
|
2904
|
-
wait:
|
|
2905
|
-
yes:
|
|
2869
|
+
eraseLocalData: z17.boolean().optional(),
|
|
2870
|
+
guided: z17.boolean().optional(),
|
|
2871
|
+
idempotencyKey: z17.string().optional(),
|
|
2872
|
+
noWait: z17.boolean().optional(),
|
|
2873
|
+
timeout: z17.string().optional(),
|
|
2874
|
+
wait: z17.boolean().optional(),
|
|
2875
|
+
yes: z17.boolean().optional()
|
|
2906
2876
|
}).strict();
|
|
2907
2877
|
function runtime(context) {
|
|
2908
2878
|
const interaction = context.cli?.interaction;
|
|
@@ -3056,19 +3026,19 @@ var machineWaitCapability = cliOnly({
|
|
|
3056
3026
|
},
|
|
3057
3027
|
execute: executeMachines("wait")
|
|
3058
3028
|
});
|
|
3059
|
-
var accessSwitchInput =
|
|
3060
|
-
reservationId:
|
|
3061
|
-
networkMode:
|
|
3062
|
-
sshKeyIds:
|
|
3063
|
-
accessMode:
|
|
3064
|
-
username:
|
|
3065
|
-
requestId:
|
|
3066
|
-
confirm:
|
|
3029
|
+
var accessSwitchInput = z17.object({
|
|
3030
|
+
reservationId: z17.string(),
|
|
3031
|
+
networkMode: z17.enum(["public", "private"]),
|
|
3032
|
+
sshKeyIds: z17.array(z17.string()).min(1),
|
|
3033
|
+
accessMode: z17.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
3034
|
+
username: z17.string().optional(),
|
|
3035
|
+
requestId: z17.string().regex(/\S/),
|
|
3036
|
+
confirm: z17.boolean().optional()
|
|
3067
3037
|
});
|
|
3068
|
-
var nodeIdInput =
|
|
3038
|
+
var nodeIdInput = z17.object({ nodeId: z17.string(), confirm: z17.boolean().optional() });
|
|
3069
3039
|
var nodeMaintenanceInput = nodeIdInput.extend({
|
|
3070
|
-
requestId:
|
|
3071
|
-
eraseLocalData:
|
|
3040
|
+
requestId: z17.string().optional(),
|
|
3041
|
+
eraseLocalData: z17.boolean().optional()
|
|
3072
3042
|
});
|
|
3073
3043
|
function rebootMachine(mode) {
|
|
3074
3044
|
return (ctx, input) => input.virtualMachineId ? rebootVirtualMachine(ctx.fetch, input.nodeId, input.virtualMachineId, { mode }) : rebootNode(ctx.fetch, input.nodeId, {
|
|
@@ -3084,12 +3054,11 @@ var machineSwitchCapability = defineCapability({
|
|
|
3084
3054
|
description: "Switch a live reservation between public/private network mode (and optionally VM/Bare Metal) via switch-access. Use this instead of re-launching when machines are already running. Supply a unique requestId and keep it to check progress, including after a timeout. Acceptance does not confirm completion.",
|
|
3085
3055
|
mutation: "preview-confirm",
|
|
3086
3056
|
input: accessSwitchInput.extend({
|
|
3087
|
-
accessMode:
|
|
3088
|
-
eraseLocalData:
|
|
3089
|
-
machineCount:
|
|
3057
|
+
accessMode: z17.enum(["bare-metal", "virtual-machine"]).nullable().optional(),
|
|
3058
|
+
eraseLocalData: z17.boolean().optional(),
|
|
3059
|
+
machineCount: z17.number().int().positive().optional()
|
|
3090
3060
|
}),
|
|
3091
3061
|
mcp: { name: "access_switch", input: accessSwitchInput },
|
|
3092
|
-
slack: false,
|
|
3093
3062
|
cli: {
|
|
3094
3063
|
input: machineSwitchInput,
|
|
3095
3064
|
execute: executeMachines("switch"),
|
|
@@ -3123,9 +3092,8 @@ var machineRebootCapability = defineCapability({
|
|
|
3123
3092
|
roles: ["user"],
|
|
3124
3093
|
description: "Reboot a running reservation machine. Keeps storage and SSH keys. Pass the machine/node instance id from access_show.",
|
|
3125
3094
|
mutation: "preview-confirm",
|
|
3126
|
-
input: nodeMaintenanceInput.extend({ virtualMachineId:
|
|
3095
|
+
input: nodeMaintenanceInput.extend({ virtualMachineId: z17.string().optional() }),
|
|
3127
3096
|
mcp: { name: "nodes_reboot", input: nodeIdInput },
|
|
3128
|
-
slack: false,
|
|
3129
3097
|
cli: {
|
|
3130
3098
|
input: machineMaintenanceInput,
|
|
3131
3099
|
execute: executeMachines("reboot"),
|
|
@@ -3158,7 +3126,6 @@ var machineResetCapability = defineCapability({
|
|
|
3158
3126
|
mutation: "preview-confirm",
|
|
3159
3127
|
input: nodeMaintenanceInput,
|
|
3160
3128
|
mcp: { name: "nodes_hard_reset", input: nodeIdInput },
|
|
3161
|
-
slack: false,
|
|
3162
3129
|
cli: {
|
|
3163
3130
|
input: machineMaintenanceInput,
|
|
3164
3131
|
execute: executeMachines("reset"),
|
|
@@ -3188,10 +3155,9 @@ var sshKeyListCapability = defineCapability({
|
|
|
3188
3155
|
domain: "access",
|
|
3189
3156
|
roles: ["user"],
|
|
3190
3157
|
mutation: "read",
|
|
3191
|
-
input: pageInput.extend({ status:
|
|
3158
|
+
input: pageInput.extend({ status: z17.enum(["active", "all"]).optional() }),
|
|
3192
3159
|
description: "List a page of account SSH keys. Pass next_cursor as cursor to continue.",
|
|
3193
3160
|
mcp: { name: "ssh_keys_list", aliases: ["cluster_users_list"], input: pageInput },
|
|
3194
|
-
slack: false,
|
|
3195
3161
|
cli: {
|
|
3196
3162
|
command: ["ssh-keys", "list"],
|
|
3197
3163
|
input: keyListInput,
|
|
@@ -3220,12 +3186,11 @@ var sshKeyAddCapability = defineCapability({
|
|
|
3220
3186
|
roles: ["user"],
|
|
3221
3187
|
mutation: "preview-confirm",
|
|
3222
3188
|
input: publicKeyInput.extend({
|
|
3223
|
-
label:
|
|
3224
|
-
idempotencyKey:
|
|
3189
|
+
label: z17.string().nullable().optional(),
|
|
3190
|
+
idempotencyKey: z17.string().optional()
|
|
3225
3191
|
}),
|
|
3226
3192
|
description: `Add an SSH public key to the account. ${ADDED_KEY_OUTCOME}`,
|
|
3227
3193
|
mcp: { name: "ssh_keys_add", aliases: ["cluster_users_add"], input: publicKeyInput },
|
|
3228
|
-
slack: false,
|
|
3229
3194
|
cli: {
|
|
3230
3195
|
command: ["ssh-keys", "add"],
|
|
3231
3196
|
input: keyMutationInput,
|
|
@@ -3250,10 +3215,9 @@ var sshKeyDeleteCapability = defineCapability({
|
|
|
3250
3215
|
domain: "access",
|
|
3251
3216
|
roles: ["user"],
|
|
3252
3217
|
mutation: "preview-confirm",
|
|
3253
|
-
input: keyIdInput.extend({ idempotencyKey:
|
|
3218
|
+
input: keyIdInput.extend({ idempotencyKey: z17.string().optional() }),
|
|
3254
3219
|
description: "Delete an SSH key from the account.",
|
|
3255
3220
|
mcp: { name: "ssh_keys_delete", aliases: ["cluster_users_revoke"], input: keyIdInput },
|
|
3256
|
-
slack: false,
|
|
3257
3221
|
cli: {
|
|
3258
3222
|
command: ["ssh-keys", "delete"],
|
|
3259
3223
|
input: keyMutationInput,
|
|
@@ -3282,10 +3246,9 @@ var sshKeyAssignmentListCapability = defineCapability({
|
|
|
3282
3246
|
domain: "access",
|
|
3283
3247
|
roles: ["user"],
|
|
3284
3248
|
mutation: "read",
|
|
3285
|
-
input:
|
|
3249
|
+
input: z17.object({ reservationId: z17.string() }),
|
|
3286
3250
|
description: "List SSH keys registered for a reservation.",
|
|
3287
3251
|
mcp: { name: "access_keys_list" },
|
|
3288
|
-
slack: false,
|
|
3289
3252
|
cli: {
|
|
3290
3253
|
command: ["ssh-keys", "assignments", "list"],
|
|
3291
3254
|
input: keyListInput,
|
|
@@ -3309,13 +3272,12 @@ var sshKeyAssignmentAssignCapability = defineCapability({
|
|
|
3309
3272
|
domain: "access",
|
|
3310
3273
|
roles: ["user"],
|
|
3311
3274
|
mutation: "preview-confirm",
|
|
3312
|
-
input:
|
|
3313
|
-
reservationKeyInput.extend({ idempotencyKey:
|
|
3314
|
-
keyIdInput.extend({ reservationId:
|
|
3275
|
+
input: z17.union([
|
|
3276
|
+
reservationKeyInput.extend({ idempotencyKey: z17.string().optional() }),
|
|
3277
|
+
keyIdInput.extend({ reservationId: z17.string(), idempotencyKey: z17.string().optional() })
|
|
3315
3278
|
]),
|
|
3316
3279
|
description: `Add an SSH key to a reservation. ${ADDED_KEY_OUTCOME}`,
|
|
3317
3280
|
mcp: { name: "access_keys_add", input: reservationKeyInput },
|
|
3318
|
-
slack: false,
|
|
3319
3281
|
cli: {
|
|
3320
3282
|
command: ["ssh-keys", "assignments", "assign"],
|
|
3321
3283
|
input: keyMutationInput,
|
|
@@ -3370,10 +3332,9 @@ var sshKeyAssignmentStatusCapability = defineCapability({
|
|
|
3370
3332
|
domain: "access",
|
|
3371
3333
|
roles: ["user"],
|
|
3372
3334
|
mutation: "read",
|
|
3373
|
-
input:
|
|
3335
|
+
input: z17.object({ reservationId: z17.string() }),
|
|
3374
3336
|
description: "Show SSH key push status per machine for a reservation.",
|
|
3375
3337
|
mcp: { name: "access_keys_status" },
|
|
3376
|
-
slack: false,
|
|
3377
3338
|
cli: {
|
|
3378
3339
|
command: ["ssh-keys", "assignments", "status"],
|
|
3379
3340
|
input: keyListInput,
|
|
@@ -3415,22 +3376,21 @@ var accessShowCapability = defineCapability({
|
|
|
3415
3376
|
roles: ["user"],
|
|
3416
3377
|
description: "Show VM and Bare Metal SSH access machines for a reservation.",
|
|
3417
3378
|
mutation: "read",
|
|
3418
|
-
input:
|
|
3419
|
-
slack: false,
|
|
3379
|
+
input: z17.object({ reservationId: z17.string() }),
|
|
3420
3380
|
execute: (ctx, input) => listNodes(ctx.fetch, { reservation_id: input.reservationId })
|
|
3421
3381
|
});
|
|
3422
|
-
var accessActivateInput =
|
|
3423
|
-
reservationId:
|
|
3424
|
-
sshKeyIds:
|
|
3425
|
-
username:
|
|
3426
|
-
machineCount:
|
|
3427
|
-
requestId:
|
|
3428
|
-
accessMode:
|
|
3429
|
-
networkMode:
|
|
3430
|
-
diskId:
|
|
3431
|
-
storageLoadDriveId:
|
|
3432
|
-
storageSaveDriveId:
|
|
3433
|
-
confirm:
|
|
3382
|
+
var accessActivateInput = z17.object({
|
|
3383
|
+
reservationId: z17.string(),
|
|
3384
|
+
sshKeyIds: z17.array(z17.string()).min(1),
|
|
3385
|
+
username: z17.string().optional(),
|
|
3386
|
+
machineCount: z17.number().int().positive().optional(),
|
|
3387
|
+
requestId: z17.string().optional(),
|
|
3388
|
+
accessMode: z17.enum(["bare-metal", "vm"]).optional(),
|
|
3389
|
+
networkMode: z17.enum(["public", "private"]).optional(),
|
|
3390
|
+
diskId: z17.string().optional(),
|
|
3391
|
+
storageLoadDriveId: z17.string().optional(),
|
|
3392
|
+
storageSaveDriveId: z17.string().optional(),
|
|
3393
|
+
confirm: z17.boolean().optional()
|
|
3434
3394
|
});
|
|
3435
3395
|
var accessActivateCapability = defineCapability({
|
|
3436
3396
|
id: "access.activate",
|
|
@@ -3439,11 +3399,10 @@ var accessActivateCapability = defineCapability({
|
|
|
3439
3399
|
description: "Activate access (bare-metal by default, or VM via accessMode) for a reservation and launch machine(s) with the given SSH key(s), optionally on the private network via networkMode. A VM launches on the reservation's saved disk; pass diskId to choose one, which a reservation without a saved disk needs.",
|
|
3440
3400
|
mutation: "preview-confirm",
|
|
3441
3401
|
input: accessActivateInput.extend({
|
|
3442
|
-
diskId:
|
|
3443
|
-
zone:
|
|
3402
|
+
diskId: z17.string().nullable().optional(),
|
|
3403
|
+
zone: z17.string().nullable().optional()
|
|
3444
3404
|
}),
|
|
3445
3405
|
mcp: { input: accessActivateInput },
|
|
3446
|
-
slack: false,
|
|
3447
3406
|
// Without disk_id the orchestrator boots "virtual-machine" from the
|
|
3448
3407
|
// reservation's saved disk and refuses when there is none.
|
|
3449
3408
|
execute: (ctx, input) => launchReservation(ctx.fetch, input.reservationId, {
|
|
@@ -3481,7 +3440,7 @@ function listAccounts(request, input = {}, signal) {
|
|
|
3481
3440
|
}
|
|
3482
3441
|
|
|
3483
3442
|
// ../../packages/capabilities/dist/capabilities/credits.js
|
|
3484
|
-
import { z as
|
|
3443
|
+
import { z as z18 } from "zod";
|
|
3485
3444
|
|
|
3486
3445
|
// ../../packages/capabilities/dist/ledger-amount.js
|
|
3487
3446
|
function parsePostingCents(value) {
|
|
@@ -3528,11 +3487,11 @@ var creditBalanceCapability = defineCapability({
|
|
|
3528
3487
|
required: ["organizationId"]
|
|
3529
3488
|
}
|
|
3530
3489
|
},
|
|
3531
|
-
input:
|
|
3490
|
+
input: z18.object({ organizationId: z18.uuid() }),
|
|
3532
3491
|
execute: async (ctx, input) => {
|
|
3533
3492
|
if (ctx.role !== "admin")
|
|
3534
3493
|
throw new Error("Admin role required.");
|
|
3535
|
-
const { organizationId } =
|
|
3494
|
+
const { organizationId } = z18.object({ organizationId: z18.uuid() }).parse(input);
|
|
3536
3495
|
const { accounts } = await listAccounts(ctx.fetch, { organization_id: organizationId });
|
|
3537
3496
|
const balance = availableCreditCents(accounts);
|
|
3538
3497
|
if (balance === null)
|
|
@@ -3544,30 +3503,30 @@ var creditBalanceCapability = defineCapability({
|
|
|
3544
3503
|
};
|
|
3545
3504
|
}
|
|
3546
3505
|
});
|
|
3547
|
-
var creditGrantInput =
|
|
3548
|
-
organizationId:
|
|
3549
|
-
adjustmentId:
|
|
3550
|
-
amountCents:
|
|
3551
|
-
direction:
|
|
3552
|
-
note:
|
|
3553
|
-
confirm:
|
|
3506
|
+
var creditGrantInput = z18.object({
|
|
3507
|
+
organizationId: z18.uuid().describe("Customer organization UUID. Resolve names or emails with organization_list; ask which organization if matches are ambiguous."),
|
|
3508
|
+
adjustmentId: z18.uuid().describe("The credit-adjustment API's required grant UUID. Keep the same UUID when confirming this grant."),
|
|
3509
|
+
amountCents: z18.number().int().min(1).max(1e8).describe("USD cents: 10000 grants $100.00."),
|
|
3510
|
+
direction: z18.enum(["credit", "debit"]).default("credit").describe("credit adds funds (default); debit removes funds. Choose explicitly for a debit."),
|
|
3511
|
+
note: z18.string().trim().min(1).refine((value) => new TextEncoder().encode(value).length <= 500, "Keep the note under 500 UTF-8 bytes.").describe("Reason for the credit grant."),
|
|
3512
|
+
confirm: z18.boolean().optional()
|
|
3554
3513
|
});
|
|
3555
3514
|
var creditGrantCapability = defineCapability({
|
|
3556
3515
|
id: "credits.grant",
|
|
3557
3516
|
domain: "billing",
|
|
3558
3517
|
roles: ["admin"],
|
|
3559
|
-
description: "Adjust Ornn credits for a customer organization using Internal Billing. Defaults to credit; direction=debit removes credits. Credits belong to the organization, not an individual person. Resolve the intended organization first. MCP posts immediately; retain adjustmentId on retries. The verified staff actor supplies audit identity.",
|
|
3518
|
+
description: "Adjust Ornn credits for a customer organization using Internal Billing. Defaults to credit; direction=debit removes credits. Interpret remove, debit, and take off as debit. Credits belong to the organization, not an individual person. Resolve the intended organization first. MCP posts immediately; retain adjustmentId on retries. The verified staff actor supplies audit identity.",
|
|
3560
3519
|
mutation: "preview-confirm",
|
|
3561
3520
|
cli: {
|
|
3562
3521
|
command: ["admin", "organizations", "grant-credit"],
|
|
3563
3522
|
vnext: {
|
|
3564
3523
|
audience: "admin",
|
|
3565
3524
|
category: "resource",
|
|
3566
|
-
outcome: "
|
|
3567
|
-
human: "ornn admin organizations grant-credit --organization UUID --amount-cents N --note TEXT --idempotency-key UUID []",
|
|
3525
|
+
outcome: "Add or remove Ornn credits for a customer organization.",
|
|
3526
|
+
human: "ornn admin organizations grant-credit --organization UUID --amount-cents N [--direction credit|debit] --note TEXT --idempotency-key UUID []",
|
|
3568
3527
|
automation: "Requires an eligible human terminal.",
|
|
3569
3528
|
acceptedReferences: ["organization UUID from admin organizations list"],
|
|
3570
|
-
review: "Review the organization, USD amount, note, and
|
|
3529
|
+
review: "Review the organization, direction, USD amount, note, and adjustment UUID before default-no consent.",
|
|
3571
3530
|
related: ["admin organizations list", "admin users list"]
|
|
3572
3531
|
}
|
|
3573
3532
|
},
|
|
@@ -3591,6 +3550,11 @@ var creditGrantCapability = defineCapability({
|
|
|
3591
3550
|
maximum: 1e8,
|
|
3592
3551
|
description: "USD cents: 10000 grants $100.00."
|
|
3593
3552
|
},
|
|
3553
|
+
direction: {
|
|
3554
|
+
type: "string",
|
|
3555
|
+
enum: ["credit", "debit"],
|
|
3556
|
+
description: "credit adds credits (default); remove, debit, and take off mean debit."
|
|
3557
|
+
},
|
|
3594
3558
|
note: {
|
|
3595
3559
|
type: "string",
|
|
3596
3560
|
description: "Reason for the credit grant, at most 500 UTF-8 bytes."
|
|
@@ -3608,15 +3572,41 @@ var creditGrantCapability = defineCapability({
|
|
|
3608
3572
|
return createCreditAdjustment(ctx.fetch, organizationId, body2);
|
|
3609
3573
|
}
|
|
3610
3574
|
});
|
|
3575
|
+
var creditAdjustmentsListCapability = defineCapability({
|
|
3576
|
+
id: "credits.adjustments.list",
|
|
3577
|
+
domain: "billing",
|
|
3578
|
+
roles: ["admin"],
|
|
3579
|
+
mutation: "read",
|
|
3580
|
+
description: "Read the organization's credit/debit adjustment history, including audit notes.",
|
|
3581
|
+
input: z18.object({ organizationId: z18.uuid() }),
|
|
3582
|
+
cli: {
|
|
3583
|
+
command: ["admin", "organizations", "credit-adjustments"],
|
|
3584
|
+
vnext: {
|
|
3585
|
+
audience: "admin",
|
|
3586
|
+
category: "resource",
|
|
3587
|
+
outcome: "Read an organization's credit and debit history.",
|
|
3588
|
+
human: "ornn admin organizations credit-adjustments --organization UUID",
|
|
3589
|
+
automation: "ornn admin organizations credit-adjustments --organization UUID --format json",
|
|
3590
|
+
acceptedReferences: ["organization UUID from admin organizations list"],
|
|
3591
|
+
related: ["admin organizations grant-credit"]
|
|
3592
|
+
}
|
|
3593
|
+
},
|
|
3594
|
+
execute: async (ctx, input) => {
|
|
3595
|
+
if (ctx.role !== "admin")
|
|
3596
|
+
throw new Error("Admin role required.");
|
|
3597
|
+
const { organizationId } = z18.object({ organizationId: z18.uuid() }).parse(input);
|
|
3598
|
+
return listCreditAdjustments(ctx.fetch, organizationId);
|
|
3599
|
+
}
|
|
3600
|
+
});
|
|
3611
3601
|
|
|
3612
3602
|
// ../../packages/capabilities/dist/capabilities/gifts.js
|
|
3613
|
-
import { z as
|
|
3603
|
+
import { z as z19 } from "zod";
|
|
3614
3604
|
var DEFAULT_EXPIRY_DAYS = 30;
|
|
3615
|
-
var giftCreateInput =
|
|
3616
|
-
amountUsd:
|
|
3617
|
-
expiresInDays:
|
|
3618
|
-
note:
|
|
3619
|
-
confirm:
|
|
3605
|
+
var giftCreateInput = z19.object({
|
|
3606
|
+
amountUsd: z19.number().min(1).max(1e4).multipleOf(0.01).describe("Gift value in USD: 50 is $50.00 of Ornn credits. From $1 to $10,000."),
|
|
3607
|
+
expiresInDays: z19.number().int().min(1).max(365).default(DEFAULT_EXPIRY_DAYS).describe(`Days until the link expires. Defaults to ${DEFAULT_EXPIRY_DAYS}; at most 365.`),
|
|
3608
|
+
note: z19.string().trim().max(500).optional().describe("Internal reason for the gift, for example the promotion or customer. Never shown to the recipient."),
|
|
3609
|
+
confirm: z19.boolean().optional()
|
|
3620
3610
|
});
|
|
3621
3611
|
var giftCreateCapability = defineCapability({
|
|
3622
3612
|
id: "gifts.create",
|
|
@@ -3678,20 +3668,20 @@ var giftCreateCapability = defineCapability({
|
|
|
3678
3668
|
});
|
|
3679
3669
|
|
|
3680
3670
|
// ../../packages/capabilities/dist/capabilities/cli.js
|
|
3681
|
-
import { z as
|
|
3682
|
-
var emptyInput2 =
|
|
3671
|
+
import { z as z20 } from "zod";
|
|
3672
|
+
var emptyInput2 = z20.object({});
|
|
3683
3673
|
function requireCliRuntime(context) {
|
|
3684
3674
|
if (!context.cli) {
|
|
3685
3675
|
throw new Error("This capability must execute through the Ornn CLI runtime.");
|
|
3686
3676
|
}
|
|
3687
3677
|
return context.cli;
|
|
3688
3678
|
}
|
|
3689
|
-
var updateInput =
|
|
3690
|
-
$positionals:
|
|
3691
|
-
major:
|
|
3679
|
+
var updateInput = z20.object({
|
|
3680
|
+
$positionals: z20.array(z20.string()).max(0).default([]),
|
|
3681
|
+
major: z20.boolean().optional()
|
|
3692
3682
|
});
|
|
3693
|
-
var completionInput =
|
|
3694
|
-
$positionals:
|
|
3683
|
+
var completionInput = z20.object({
|
|
3684
|
+
$positionals: z20.tuple([z20.enum(["bash", "fish", "zsh"])])
|
|
3695
3685
|
}).transform(({ $positionals }) => ({ shell: $positionals[0] }));
|
|
3696
3686
|
var versionCapability = defineCapability({
|
|
3697
3687
|
id: "cli.version",
|
|
@@ -3832,23 +3822,23 @@ var cliShellCapabilities = [
|
|
|
3832
3822
|
];
|
|
3833
3823
|
|
|
3834
3824
|
// ../../packages/capabilities/dist/capabilities/clusters.js
|
|
3835
|
-
import { z as
|
|
3836
|
-
var clusterCliInput =
|
|
3837
|
-
$positionals:
|
|
3838
|
-
cursor:
|
|
3839
|
-
guided:
|
|
3840
|
-
idempotencyKey:
|
|
3841
|
-
limit:
|
|
3842
|
-
machine:
|
|
3843
|
-
machines:
|
|
3844
|
-
network:
|
|
3845
|
-
noWait:
|
|
3846
|
-
nodes:
|
|
3847
|
-
output:
|
|
3848
|
-
overwrite:
|
|
3849
|
-
timeout:
|
|
3850
|
-
wait:
|
|
3851
|
-
yes:
|
|
3825
|
+
import { z as z21 } from "zod";
|
|
3826
|
+
var clusterCliInput = z21.object({
|
|
3827
|
+
$positionals: z21.array(z21.string()).optional(),
|
|
3828
|
+
cursor: z21.string().optional(),
|
|
3829
|
+
guided: z21.boolean().optional(),
|
|
3830
|
+
idempotencyKey: z21.string().optional(),
|
|
3831
|
+
limit: z21.union([z21.string(), z21.number()]).optional(),
|
|
3832
|
+
machine: z21.string().optional(),
|
|
3833
|
+
machines: z21.string().optional(),
|
|
3834
|
+
network: z21.enum(["public", "private"]).optional(),
|
|
3835
|
+
noWait: z21.boolean().optional(),
|
|
3836
|
+
nodes: z21.union([z21.string(), z21.number()]).optional(),
|
|
3837
|
+
output: z21.string().optional(),
|
|
3838
|
+
overwrite: z21.boolean().optional(),
|
|
3839
|
+
timeout: z21.string().optional(),
|
|
3840
|
+
wait: z21.boolean().optional(),
|
|
3841
|
+
yes: z21.boolean().optional()
|
|
3852
3842
|
}).strict();
|
|
3853
3843
|
function executeCluster(command) {
|
|
3854
3844
|
return (context, input) => {
|
|
@@ -3887,13 +3877,13 @@ function clusterCliCapability({ acceptedReferences = [], automation, command, de
|
|
|
3887
3877
|
execute: executeCluster(id)
|
|
3888
3878
|
});
|
|
3889
3879
|
}
|
|
3890
|
-
var clusterType =
|
|
3891
|
-
var reservationCluster =
|
|
3892
|
-
var reservationWrite = reservationCluster.extend({ confirm:
|
|
3893
|
-
var controllerNode =
|
|
3894
|
-
controllerId:
|
|
3895
|
-
nodeId:
|
|
3896
|
-
confirm:
|
|
3880
|
+
var clusterType = z21.enum(["kubernetes", "slurm"]);
|
|
3881
|
+
var reservationCluster = z21.object({ reservationId: z21.string(), type: clusterType });
|
|
3882
|
+
var reservationWrite = reservationCluster.extend({ confirm: z21.boolean().optional() });
|
|
3883
|
+
var controllerNode = z21.object({
|
|
3884
|
+
controllerId: z21.string(),
|
|
3885
|
+
nodeId: z21.string(),
|
|
3886
|
+
confirm: z21.boolean().optional()
|
|
3897
3887
|
});
|
|
3898
3888
|
var clusterListCapability = defineCapability({
|
|
3899
3889
|
id: "clusters.list",
|
|
@@ -3901,9 +3891,8 @@ var clusterListCapability = defineCapability({
|
|
|
3901
3891
|
roles: ["user"],
|
|
3902
3892
|
description: "List this tenant's kubernetes/slurm clusters.",
|
|
3903
3893
|
mutation: "read",
|
|
3904
|
-
input:
|
|
3894
|
+
input: z21.object({}),
|
|
3905
3895
|
mcp: { name: "clusters_list" },
|
|
3906
|
-
slack: false,
|
|
3907
3896
|
execute: (ctx) => listClusters(ctx.fetch),
|
|
3908
3897
|
cli: {
|
|
3909
3898
|
command: ["clusters", "list"],
|
|
@@ -3930,7 +3919,6 @@ var clusterShowCapability = defineCapability({
|
|
|
3930
3919
|
mutation: "read",
|
|
3931
3920
|
input: reservationCluster,
|
|
3932
3921
|
mcp: { name: "clusters_show" },
|
|
3933
|
-
slack: false,
|
|
3934
3922
|
execute: (ctx, input) => getReservationCluster(ctx.fetch, input.type, input.reservationId),
|
|
3935
3923
|
cli: {
|
|
3936
3924
|
command: ["clusters", "show"],
|
|
@@ -3955,9 +3943,8 @@ var clusterTeardownCapability = defineCapability({
|
|
|
3955
3943
|
roles: ["user"],
|
|
3956
3944
|
description: "Tear down a kubernetes or slurm cluster on a reservation.",
|
|
3957
3945
|
mutation: "preview-confirm",
|
|
3958
|
-
input: reservationWrite.extend({ idempotencyKey:
|
|
3946
|
+
input: reservationWrite.extend({ idempotencyKey: z21.string().optional() }),
|
|
3959
3947
|
mcp: { name: "clusters_teardown", input: reservationWrite },
|
|
3960
|
-
slack: false,
|
|
3961
3948
|
execute: (ctx, input) => teardownReservationCluster(ctx.fetch, input.type, input.reservationId, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0),
|
|
3962
3949
|
cli: {
|
|
3963
3950
|
command: ["clusters", "teardown"],
|
|
@@ -3985,7 +3972,6 @@ var clusterCredentialsCapability = defineCapability({
|
|
|
3985
3972
|
mutation: "read",
|
|
3986
3973
|
input: reservationCluster,
|
|
3987
3974
|
mcp: { name: "clusters_credentials" },
|
|
3988
|
-
slack: false,
|
|
3989
3975
|
execute: (ctx, input) => getReservationClusterCredentials(ctx.fetch, input.type, input.reservationId)
|
|
3990
3976
|
});
|
|
3991
3977
|
var clusterAddNodeCapability = defineCapability({
|
|
@@ -3994,9 +3980,8 @@ var clusterAddNodeCapability = defineCapability({
|
|
|
3994
3980
|
roles: ["user"],
|
|
3995
3981
|
description: "Join a node to a controller.",
|
|
3996
3982
|
mutation: "preview-confirm",
|
|
3997
|
-
input: controllerNode.extend({ idempotencyKey:
|
|
3983
|
+
input: controllerNode.extend({ idempotencyKey: z21.string().optional() }),
|
|
3998
3984
|
mcp: { name: "clusters_add_node", input: controllerNode },
|
|
3999
|
-
slack: false,
|
|
4000
3985
|
cli: {
|
|
4001
3986
|
command: ["clusters", "add-node"],
|
|
4002
3987
|
input: clusterCliInput,
|
|
@@ -4027,9 +4012,8 @@ var clusterRemoveNodeCapability = defineCapability({
|
|
|
4027
4012
|
roles: ["user"],
|
|
4028
4013
|
description: "Remove a node from a controller.",
|
|
4029
4014
|
mutation: "preview-confirm",
|
|
4030
|
-
input: controllerNode.extend({ idempotencyKey:
|
|
4015
|
+
input: controllerNode.extend({ idempotencyKey: z21.string().optional() }),
|
|
4031
4016
|
mcp: { name: "clusters_remove_node", input: controllerNode },
|
|
4032
|
-
slack: false,
|
|
4033
4017
|
cli: {
|
|
4034
4018
|
command: ["clusters", "remove-node"],
|
|
4035
4019
|
input: clusterCliInput,
|
|
@@ -4054,13 +4038,13 @@ var clusterRemoveNodeCapability = defineCapability({
|
|
|
4054
4038
|
},
|
|
4055
4039
|
execute: (ctx, input) => removeControllerNode(ctx.fetch, input.controllerId, input.nodeId, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0)
|
|
4056
4040
|
});
|
|
4057
|
-
var clusterCreateInput =
|
|
4058
|
-
reservationId:
|
|
4041
|
+
var clusterCreateInput = z21.object({
|
|
4042
|
+
reservationId: z21.string(),
|
|
4059
4043
|
type: clusterType,
|
|
4060
|
-
networkMode:
|
|
4061
|
-
nodeIds:
|
|
4062
|
-
nodeCount:
|
|
4063
|
-
confirm:
|
|
4044
|
+
networkMode: z21.enum(["public", "private"]).optional(),
|
|
4045
|
+
nodeIds: z21.array(z21.string()).optional(),
|
|
4046
|
+
nodeCount: z21.number().int().positive().optional(),
|
|
4047
|
+
confirm: z21.boolean().optional()
|
|
4064
4048
|
}).strict();
|
|
4065
4049
|
var clusterCreateCapability = defineCapability({
|
|
4066
4050
|
id: "cluster.create",
|
|
@@ -4069,12 +4053,11 @@ var clusterCreateCapability = defineCapability({
|
|
|
4069
4053
|
description: "Launch a kubernetes or slurm cluster on a reservation.",
|
|
4070
4054
|
mutation: "preview-confirm",
|
|
4071
4055
|
input: clusterCreateInput.extend({
|
|
4072
|
-
virtualMachineIds:
|
|
4073
|
-
sshKeyIds:
|
|
4074
|
-
idempotencyKey:
|
|
4056
|
+
virtualMachineIds: z21.array(z21.string()).optional(),
|
|
4057
|
+
sshKeyIds: z21.array(z21.string()).optional(),
|
|
4058
|
+
idempotencyKey: z21.string().optional()
|
|
4075
4059
|
}),
|
|
4076
4060
|
mcp: { name: "clusters_create", input: clusterCreateInput },
|
|
4077
|
-
slack: false,
|
|
4078
4061
|
execute: (ctx, input) => createController(ctx.fetch, {
|
|
4079
4062
|
kind: input.type,
|
|
4080
4063
|
reservation_id: input.reservationId,
|
|
@@ -4116,11 +4099,10 @@ var clusterCapabilities = [
|
|
|
4116
4099
|
roles: ["user"],
|
|
4117
4100
|
description: "List active reservations eligible for cluster creation (kubernetes/slurm), 100 per page. Pass the response's nextCursor as cursor for the next page.",
|
|
4118
4101
|
mutation: "read",
|
|
4119
|
-
input:
|
|
4120
|
-
cursor:
|
|
4102
|
+
input: z21.object({
|
|
4103
|
+
cursor: z21.string().min(1).optional().describe("nextCursor from the previous page.")
|
|
4121
4104
|
}),
|
|
4122
4105
|
mcp: { name: "clusters_reservations_list" },
|
|
4123
|
-
slack: false,
|
|
4124
4106
|
// A cluster launches on an active reservation. Commerce pages at most 100.
|
|
4125
4107
|
execute: (ctx, input) => {
|
|
4126
4108
|
return listReservations(ctx.fetch, { status: "active", limit: 100, cursor: input.cursor });
|
|
@@ -4134,9 +4116,8 @@ var clusterCapabilities = [
|
|
|
4134
4116
|
roles: ["user"],
|
|
4135
4117
|
description: "Fetch the raw kubeconfig text for a kubernetes cluster reservation. Unlike `ornn clusters kubeconfig`, this does not write a file locally -- the caller is responsible for saving the returned text if needed.",
|
|
4136
4118
|
mutation: "read",
|
|
4137
|
-
input:
|
|
4119
|
+
input: z21.object({ reservationId: z21.string() }),
|
|
4138
4120
|
mcp: { name: "clusters_kubeconfig" },
|
|
4139
|
-
slack: false,
|
|
4140
4121
|
execute: async (ctx, input) => {
|
|
4141
4122
|
const credentials = await clusterCredentialsCapability.execute(ctx, {
|
|
4142
4123
|
reservationId: input.reservationId,
|
|
@@ -4154,55 +4135,55 @@ var clusterCapabilities = [
|
|
|
4154
4135
|
];
|
|
4155
4136
|
|
|
4156
4137
|
// ../../packages/capabilities/dist/capabilities/external-buckets.js
|
|
4157
|
-
import { z as
|
|
4158
|
-
var pageInput2 =
|
|
4159
|
-
$positionals:
|
|
4160
|
-
cursor:
|
|
4161
|
-
limit:
|
|
4138
|
+
import { z as z22 } from "zod";
|
|
4139
|
+
var pageInput2 = z22.object({
|
|
4140
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4141
|
+
cursor: z22.string().optional(),
|
|
4142
|
+
limit: z22.union([z22.string(), z22.number()]).optional()
|
|
4162
4143
|
}).strict();
|
|
4163
|
-
var showInput =
|
|
4164
|
-
$positionals:
|
|
4144
|
+
var showInput = z22.object({
|
|
4145
|
+
$positionals: z22.array(z22.string()).optional()
|
|
4165
4146
|
}).strict();
|
|
4166
|
-
var verificationInput =
|
|
4167
|
-
$positionals:
|
|
4168
|
-
idempotencyKey:
|
|
4147
|
+
var verificationInput = z22.object({
|
|
4148
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4149
|
+
idempotencyKey: z22.string().optional()
|
|
4169
4150
|
}).strict();
|
|
4170
|
-
var disconnectInput =
|
|
4171
|
-
$positionals:
|
|
4172
|
-
idempotencyKey:
|
|
4173
|
-
yes:
|
|
4151
|
+
var disconnectInput = z22.object({
|
|
4152
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4153
|
+
idempotencyKey: z22.string().optional(),
|
|
4154
|
+
yes: z22.boolean().optional()
|
|
4174
4155
|
}).strict();
|
|
4175
|
-
var connectInput =
|
|
4176
|
-
$positionals:
|
|
4177
|
-
accessKeyId:
|
|
4178
|
-
accountId:
|
|
4179
|
-
bucket:
|
|
4180
|
-
endpointUrl:
|
|
4181
|
-
idempotencyKey:
|
|
4182
|
-
name:
|
|
4183
|
-
prefix:
|
|
4184
|
-
readOnly:
|
|
4185
|
-
readWrite:
|
|
4186
|
-
region:
|
|
4187
|
-
secretAccessKeyFile:
|
|
4188
|
-
url:
|
|
4189
|
-
yes:
|
|
4156
|
+
var connectInput = z22.object({
|
|
4157
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4158
|
+
accessKeyId: z22.string().optional(),
|
|
4159
|
+
accountId: z22.string().optional(),
|
|
4160
|
+
bucket: z22.string().optional(),
|
|
4161
|
+
endpointUrl: z22.string().optional(),
|
|
4162
|
+
idempotencyKey: z22.string().optional(),
|
|
4163
|
+
name: z22.string().optional(),
|
|
4164
|
+
prefix: z22.string().optional(),
|
|
4165
|
+
readOnly: z22.boolean().optional(),
|
|
4166
|
+
readWrite: z22.boolean().optional(),
|
|
4167
|
+
region: z22.string().optional(),
|
|
4168
|
+
secretAccessKeyFile: z22.string().optional(),
|
|
4169
|
+
url: z22.string().optional(),
|
|
4170
|
+
yes: z22.boolean().optional()
|
|
4190
4171
|
}).strict();
|
|
4191
|
-
var credentialInput =
|
|
4192
|
-
$positionals:
|
|
4193
|
-
accessKeyId:
|
|
4194
|
-
idempotencyKey:
|
|
4195
|
-
secretAccessKeyFile:
|
|
4196
|
-
yes:
|
|
4172
|
+
var credentialInput = z22.object({
|
|
4173
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4174
|
+
accessKeyId: z22.string().optional(),
|
|
4175
|
+
idempotencyKey: z22.string().optional(),
|
|
4176
|
+
secretAccessKeyFile: z22.string().optional(),
|
|
4177
|
+
yes: z22.boolean().optional()
|
|
4197
4178
|
}).strict();
|
|
4198
|
-
var importInput =
|
|
4199
|
-
$positionals:
|
|
4200
|
-
idempotencyKey:
|
|
4201
|
-
noWait:
|
|
4202
|
-
reservation:
|
|
4203
|
-
timeout:
|
|
4204
|
-
wait:
|
|
4205
|
-
yes:
|
|
4179
|
+
var importInput = z22.object({
|
|
4180
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4181
|
+
idempotencyKey: z22.string().optional(),
|
|
4182
|
+
noWait: z22.boolean().optional(),
|
|
4183
|
+
reservation: z22.string().optional(),
|
|
4184
|
+
timeout: z22.string().optional(),
|
|
4185
|
+
wait: z22.boolean().optional(),
|
|
4186
|
+
yes: z22.boolean().optional()
|
|
4206
4187
|
}).strict();
|
|
4207
4188
|
function externalBucketExecutor(context) {
|
|
4208
4189
|
const interaction = context.cli?.interaction;
|
|
@@ -4218,19 +4199,18 @@ function isExternalBucket(drive) {
|
|
|
4218
4199
|
return false;
|
|
4219
4200
|
return ["external_gcs", "s3", "r2", "cloudflare_r2"].includes(source.provider ?? "") || Boolean(source.bucket);
|
|
4220
4201
|
}
|
|
4221
|
-
var bucketInput =
|
|
4202
|
+
var bucketInput = z22.object({ driveId: z22.string() });
|
|
4222
4203
|
var bucketListCapability = defineCapability({
|
|
4223
4204
|
id: "storage.external-buckets.list",
|
|
4224
4205
|
domain: "storage",
|
|
4225
4206
|
roles: ["user"],
|
|
4226
4207
|
description: "List a page of connected external buckets. Pass next_cursor as cursor to continue.",
|
|
4227
4208
|
mutation: "read",
|
|
4228
|
-
input:
|
|
4229
|
-
limit:
|
|
4230
|
-
cursor:
|
|
4209
|
+
input: z22.object({
|
|
4210
|
+
limit: z22.number().int().min(1).max(100).optional(),
|
|
4211
|
+
cursor: z22.string().optional()
|
|
4231
4212
|
}),
|
|
4232
4213
|
mcp: { name: "storage_buckets_list" },
|
|
4233
|
-
slack: false,
|
|
4234
4214
|
execute: async (context, input) => {
|
|
4235
4215
|
const page = await listDrives(context.fetch, {
|
|
4236
4216
|
limit: input.limit ?? 25,
|
|
@@ -4264,7 +4244,6 @@ var bucketShowCapability = defineCapability({
|
|
|
4264
4244
|
mutation: "read",
|
|
4265
4245
|
input: bucketInput,
|
|
4266
4246
|
mcp: { name: "storage_buckets_show" },
|
|
4267
|
-
slack: false,
|
|
4268
4247
|
execute: async (context, input) => {
|
|
4269
4248
|
const bucket = await getDrive(context.fetch, input.driveId);
|
|
4270
4249
|
if (!isExternalBucket(bucket))
|
|
@@ -4296,7 +4275,6 @@ var bucketDisconnectCapability = defineCapability({
|
|
|
4296
4275
|
mutation: "preview-confirm",
|
|
4297
4276
|
input: bucketInput,
|
|
4298
4277
|
mcp: { name: "storage_buckets_disconnect" },
|
|
4299
|
-
slack: false,
|
|
4300
4278
|
execute: async (context, input) => {
|
|
4301
4279
|
if (!context.confirmed)
|
|
4302
4280
|
return preview("storage.external-buckets.disconnect", input);
|
|
@@ -4322,18 +4300,18 @@ var bucketDisconnectCapability = defineCapability({
|
|
|
4322
4300
|
}
|
|
4323
4301
|
}
|
|
4324
4302
|
});
|
|
4325
|
-
var bucketConnectInput =
|
|
4326
|
-
provider:
|
|
4327
|
-
bucket:
|
|
4328
|
-
name:
|
|
4329
|
-
prefix:
|
|
4330
|
-
region:
|
|
4331
|
-
endpointUrl:
|
|
4332
|
-
accountId:
|
|
4333
|
-
accessKeyId:
|
|
4334
|
-
secretAccessKey:
|
|
4335
|
-
readOnly:
|
|
4336
|
-
confirm:
|
|
4303
|
+
var bucketConnectInput = z22.object({
|
|
4304
|
+
provider: z22.enum(["gcs", "s3", "r2"]),
|
|
4305
|
+
bucket: z22.string(),
|
|
4306
|
+
name: z22.string().optional(),
|
|
4307
|
+
prefix: z22.string().optional(),
|
|
4308
|
+
region: z22.string().optional(),
|
|
4309
|
+
endpointUrl: z22.string().optional(),
|
|
4310
|
+
accountId: z22.string().optional(),
|
|
4311
|
+
accessKeyId: z22.string().optional(),
|
|
4312
|
+
secretAccessKey: z22.string().optional(),
|
|
4313
|
+
readOnly: z22.boolean().optional(),
|
|
4314
|
+
confirm: z22.boolean().optional()
|
|
4337
4315
|
}).refine((input) => !(input.provider === "gcs" && (input.accessKeyId || input.secretAccessKey)), {
|
|
4338
4316
|
message: "Access key credentials are only supported for S3-compatible buckets."
|
|
4339
4317
|
}).refine((input) => Boolean(input.accessKeyId) === Boolean(input.secretAccessKey), {
|
|
@@ -4341,10 +4319,10 @@ var bucketConnectInput = z21.object({
|
|
|
4341
4319
|
}).refine((input) => input.provider !== "r2" || Boolean(input.endpointUrl || input.accountId), {
|
|
4342
4320
|
message: "R2 buckets require either --endpointUrl or --accountId."
|
|
4343
4321
|
});
|
|
4344
|
-
var bucketWriteInput = bucketInput.extend({ confirm:
|
|
4322
|
+
var bucketWriteInput = bucketInput.extend({ confirm: z22.boolean().optional() });
|
|
4345
4323
|
var bucketCredentialInput = bucketWriteInput.extend({
|
|
4346
|
-
accessKeyId:
|
|
4347
|
-
secretAccessKey:
|
|
4324
|
+
accessKeyId: z22.string(),
|
|
4325
|
+
secretAccessKey: z22.string()
|
|
4348
4326
|
});
|
|
4349
4327
|
var bucketConnectCapability = defineCapability({
|
|
4350
4328
|
id: "storage.external-buckets.connect",
|
|
@@ -4352,9 +4330,8 @@ var bucketConnectCapability = defineCapability({
|
|
|
4352
4330
|
roles: ["user"],
|
|
4353
4331
|
description: "Connect an external bucket (GCS, S3, or Cloudflare R2) as a storage volume. Cloudflare R2 deployment support is coming soon (connect succeeds, but deployment is not yet available).",
|
|
4354
4332
|
mutation: "preview-confirm",
|
|
4355
|
-
input: bucketConnectInput.safeExtend({ idempotencyKey:
|
|
4333
|
+
input: bucketConnectInput.safeExtend({ idempotencyKey: z22.string().optional() }),
|
|
4356
4334
|
mcp: { name: "storage_buckets_connect", input: bucketConnectInput },
|
|
4357
|
-
slack: false,
|
|
4358
4335
|
execute: (context, input) => {
|
|
4359
4336
|
const endpoint = input.endpointUrl ?? (input.provider === "r2" && input.accountId ? `https://${input.accountId}.r2.cloudflarestorage.com` : void 0);
|
|
4360
4337
|
return createDrive(context.fetch, {
|
|
@@ -4396,9 +4373,8 @@ var bucketUpdateCredentialsCapability = defineCapability({
|
|
|
4396
4373
|
roles: ["user"],
|
|
4397
4374
|
description: "Update a connected S3-compatible bucket's access key credentials.",
|
|
4398
4375
|
mutation: "preview-confirm",
|
|
4399
|
-
input: bucketCredentialInput.extend({ idempotencyKey:
|
|
4376
|
+
input: bucketCredentialInput.extend({ idempotencyKey: z22.string().optional() }),
|
|
4400
4377
|
mcp: { name: "storage_buckets_update_credentials", input: bucketCredentialInput },
|
|
4401
|
-
slack: false,
|
|
4402
4378
|
execute: (context, input) => updateDrive(context.fetch, input.driveId, {
|
|
4403
4379
|
source_credentials: {
|
|
4404
4380
|
external_access_key_id: input.accessKeyId,
|
|
@@ -4429,9 +4405,8 @@ var bucketVerifyCapability = defineCapability({
|
|
|
4429
4405
|
roles: ["user"],
|
|
4430
4406
|
description: "Verify a connected S3-compatible bucket's source credentials/connectivity.",
|
|
4431
4407
|
mutation: "preview-confirm",
|
|
4432
|
-
input: bucketWriteInput.extend({ idempotencyKey:
|
|
4408
|
+
input: bucketWriteInput.extend({ idempotencyKey: z22.string().optional() }),
|
|
4433
4409
|
mcp: { name: "storage_buckets_verify", input: bucketWriteInput },
|
|
4434
|
-
slack: false,
|
|
4435
4410
|
execute: (context, input) => updateDrive(context.fetch, input.driveId, { verify_source: true }, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0),
|
|
4436
4411
|
cli: {
|
|
4437
4412
|
command: ["external-buckets", "verify"],
|
|
@@ -4487,22 +4462,22 @@ var externalBucketCapabilities = [
|
|
|
4487
4462
|
];
|
|
4488
4463
|
|
|
4489
4464
|
// ../../packages/capabilities/dist/capabilities/evidence.js
|
|
4490
|
-
import { z as
|
|
4491
|
-
var positionals3 =
|
|
4492
|
-
var evidenceInput =
|
|
4465
|
+
import { z as z23 } from "zod";
|
|
4466
|
+
var positionals3 = z23.array(z23.string()).default([]);
|
|
4467
|
+
var evidenceInput = z23.object({
|
|
4493
4468
|
$positionals: positionals3,
|
|
4494
|
-
before:
|
|
4495
|
-
count:
|
|
4496
|
-
cursor:
|
|
4497
|
-
end:
|
|
4498
|
-
follow:
|
|
4499
|
-
guided:
|
|
4500
|
-
interval:
|
|
4501
|
-
limit:
|
|
4502
|
-
maxPoints:
|
|
4503
|
-
start:
|
|
4504
|
-
stream:
|
|
4505
|
-
timeout:
|
|
4469
|
+
before: z23.string().optional(),
|
|
4470
|
+
count: z23.string().optional(),
|
|
4471
|
+
cursor: z23.string().optional(),
|
|
4472
|
+
end: z23.string().optional(),
|
|
4473
|
+
follow: z23.boolean().optional(),
|
|
4474
|
+
guided: z23.boolean().optional(),
|
|
4475
|
+
interval: z23.string().optional(),
|
|
4476
|
+
limit: z23.string().optional(),
|
|
4477
|
+
maxPoints: z23.string().optional(),
|
|
4478
|
+
start: z23.string().optional(),
|
|
4479
|
+
stream: z23.enum(["kernel", "serial"]).optional(),
|
|
4480
|
+
timeout: z23.string().optional()
|
|
4506
4481
|
}).strict();
|
|
4507
4482
|
function runtime2(context) {
|
|
4508
4483
|
const interaction = context.cli?.interaction;
|
|
@@ -4668,46 +4643,46 @@ function getCliSession(request) {
|
|
|
4668
4643
|
}
|
|
4669
4644
|
|
|
4670
4645
|
// ../../packages/capabilities/dist/capabilities/fleet.js
|
|
4671
|
-
import { z as
|
|
4672
|
-
var suppliersInput =
|
|
4673
|
-
q:
|
|
4674
|
-
offset:
|
|
4675
|
-
limit:
|
|
4676
|
-
});
|
|
4677
|
-
var facilitiesInput =
|
|
4678
|
-
organization_id:
|
|
4679
|
-
cursor:
|
|
4680
|
-
limit:
|
|
4681
|
-
});
|
|
4682
|
-
var nodesInput =
|
|
4683
|
-
organization_id:
|
|
4684
|
-
facility_id:
|
|
4685
|
-
status:
|
|
4686
|
-
reservation_id:
|
|
4687
|
-
cursor:
|
|
4688
|
-
max:
|
|
4689
|
-
limit:
|
|
4690
|
-
});
|
|
4691
|
-
var nodeLifecycleInput =
|
|
4692
|
-
node_id:
|
|
4693
|
-
maintenance_batch_id:
|
|
4694
|
-
node_ref:
|
|
4695
|
-
reason:
|
|
4696
|
-
delete_node_record:
|
|
4697
|
-
idempotency_key:
|
|
4698
|
-
yes:
|
|
4699
|
-
wait:
|
|
4700
|
-
timeout_seconds:
|
|
4701
|
-
});
|
|
4702
|
-
var nodeExecRemoteInput =
|
|
4703
|
-
node_id:
|
|
4704
|
-
host:
|
|
4705
|
-
username:
|
|
4706
|
-
port:
|
|
4707
|
-
private_key:
|
|
4708
|
-
command:
|
|
4709
|
-
timeout_seconds:
|
|
4710
|
-
yes:
|
|
4646
|
+
import { z as z24 } from "zod";
|
|
4647
|
+
var suppliersInput = z24.object({
|
|
4648
|
+
q: z24.string().optional(),
|
|
4649
|
+
offset: z24.number().int().min(0).optional(),
|
|
4650
|
+
limit: z24.number().int().min(1).max(1e3).optional()
|
|
4651
|
+
});
|
|
4652
|
+
var facilitiesInput = z24.object({
|
|
4653
|
+
organization_id: z24.string().optional(),
|
|
4654
|
+
cursor: z24.string().optional(),
|
|
4655
|
+
limit: z24.number().int().min(1).max(100).optional()
|
|
4656
|
+
});
|
|
4657
|
+
var nodesInput = z24.object({
|
|
4658
|
+
organization_id: z24.string().optional(),
|
|
4659
|
+
facility_id: z24.string().optional(),
|
|
4660
|
+
status: z24.string().optional(),
|
|
4661
|
+
reservation_id: z24.string().optional(),
|
|
4662
|
+
cursor: z24.string().optional(),
|
|
4663
|
+
max: z24.number().int().positive().max(5e3).optional(),
|
|
4664
|
+
limit: z24.number().int().positive().max(5e3).optional()
|
|
4665
|
+
});
|
|
4666
|
+
var nodeLifecycleInput = z24.object({
|
|
4667
|
+
node_id: z24.string().min(1),
|
|
4668
|
+
maintenance_batch_id: z24.string().uuid().optional(),
|
|
4669
|
+
node_ref: z24.string().optional(),
|
|
4670
|
+
reason: z24.string().optional(),
|
|
4671
|
+
delete_node_record: z24.literal(true).optional(),
|
|
4672
|
+
idempotency_key: z24.string().optional(),
|
|
4673
|
+
yes: z24.boolean().optional(),
|
|
4674
|
+
wait: z24.boolean().optional(),
|
|
4675
|
+
timeout_seconds: z24.number().positive().optional()
|
|
4676
|
+
});
|
|
4677
|
+
var nodeExecRemoteInput = z24.object({
|
|
4678
|
+
node_id: z24.string().min(1).optional(),
|
|
4679
|
+
host: z24.string().min(1).optional(),
|
|
4680
|
+
username: z24.string().min(1).optional(),
|
|
4681
|
+
port: z24.number().int().min(1).max(65535).optional(),
|
|
4682
|
+
private_key: z24.string().min(1).optional(),
|
|
4683
|
+
command: z24.string().min(1),
|
|
4684
|
+
timeout_seconds: z24.number().int().positive(),
|
|
4685
|
+
yes: z24.boolean().optional()
|
|
4711
4686
|
});
|
|
4712
4687
|
var listSuppliersCapability = defineCapability({
|
|
4713
4688
|
id: "supplier.list",
|
|
@@ -4804,7 +4779,7 @@ var listFacilitiesCapability = defineCapability({
|
|
|
4804
4779
|
});
|
|
4805
4780
|
}
|
|
4806
4781
|
});
|
|
4807
|
-
var facilityShowInput =
|
|
4782
|
+
var facilityShowInput = z24.object({ facilityId: z24.uuid() });
|
|
4808
4783
|
var facilityShowCapability = defineCapability({
|
|
4809
4784
|
id: "facilities.show",
|
|
4810
4785
|
domain: "fleet",
|
|
@@ -4899,19 +4874,19 @@ var listNodesCapability = defineCapability({
|
|
|
4899
4874
|
});
|
|
4900
4875
|
}
|
|
4901
4876
|
});
|
|
4902
|
-
var nodeExecInput =
|
|
4903
|
-
node_id:
|
|
4877
|
+
var nodeExecInput = z24.object({
|
|
4878
|
+
node_id: z24.string().min(1).refine((value) => value === value.trim(), {
|
|
4904
4879
|
message: "node_id must be an exact canonical node ID without surrounding whitespace"
|
|
4905
4880
|
}),
|
|
4906
|
-
command:
|
|
4907
|
-
timeout_seconds:
|
|
4881
|
+
command: z24.string().min(1),
|
|
4882
|
+
timeout_seconds: z24.number().int().min(1).max(900)
|
|
4908
4883
|
});
|
|
4909
4884
|
var nodeExecCapability = defineCapability({
|
|
4910
4885
|
id: "node.exec",
|
|
4911
4886
|
domain: "fleet",
|
|
4912
4887
|
roles: ["admin"],
|
|
4913
4888
|
description: "Admin-only. Run one unrestricted command over orchestrator SSH. Pass node_id for an enrolled node (uses its stored admin key), or host + private_key (+ optional username, default root, and port, default 22) for any host, including one not enrolled yet. Always pass timeout_seconds. Not an interactive shell. On NVIDIA hosts use nvidia-smi; on AMD Instinct use amd-smi. Runs on the tool call \u2014 no confirm, no y/N.",
|
|
4914
|
-
mutation: "
|
|
4889
|
+
mutation: "immediate",
|
|
4915
4890
|
cli: {
|
|
4916
4891
|
command: ["admin", "nodes", "exec"],
|
|
4917
4892
|
vnext: {
|
|
@@ -5007,8 +4982,8 @@ var fleetCapabilities = [
|
|
|
5007
4982
|
];
|
|
5008
4983
|
|
|
5009
4984
|
// ../../packages/capabilities/dist/capabilities/metrics.js
|
|
5010
|
-
import { z as
|
|
5011
|
-
var metricInput =
|
|
4985
|
+
import { z as z25 } from "zod";
|
|
4986
|
+
var metricInput = z25.object({ reservationId: z25.string(), machineId: z25.string().optional() });
|
|
5012
4987
|
async function nodeIds(context, input) {
|
|
5013
4988
|
if (input.machineId)
|
|
5014
4989
|
return [input.machineId];
|
|
@@ -5026,7 +5001,6 @@ var metricsSnapshotCapability = defineCapability({
|
|
|
5026
5001
|
mutation: "read",
|
|
5027
5002
|
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.",
|
|
5028
5003
|
input: metricInput,
|
|
5029
|
-
slack: false,
|
|
5030
5004
|
execute: async (context, input) => {
|
|
5031
5005
|
const snapshots = [];
|
|
5032
5006
|
for (const nodeId3 of await nodeIds(context, input)) {
|
|
@@ -5044,11 +5018,10 @@ var metricsHistoryCapability = defineCapability({
|
|
|
5044
5018
|
mutation: "read",
|
|
5045
5019
|
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.",
|
|
5046
5020
|
input: metricInput.extend({
|
|
5047
|
-
start:
|
|
5048
|
-
end:
|
|
5049
|
-
maxPoints:
|
|
5021
|
+
start: z25.string().optional(),
|
|
5022
|
+
end: z25.string().optional(),
|
|
5023
|
+
maxPoints: z25.number().int().positive().optional()
|
|
5050
5024
|
}),
|
|
5051
|
-
slack: false,
|
|
5052
5025
|
execute: async (context, input) => {
|
|
5053
5026
|
const [nodeId3] = await nodeIds(context, input);
|
|
5054
5027
|
return getReservationTelemetryHistory(context.fetch, input.reservationId, {
|
|
@@ -5062,18 +5035,18 @@ var metricsHistoryCapability = defineCapability({
|
|
|
5062
5035
|
var metricsCapabilities = [metricsSnapshotCapability, metricsHistoryCapability];
|
|
5063
5036
|
|
|
5064
5037
|
// ../../packages/capabilities/dist/capabilities/mounts.js
|
|
5065
|
-
import { z as
|
|
5066
|
-
var mountCliInput =
|
|
5067
|
-
$positionals:
|
|
5068
|
-
access:
|
|
5069
|
-
cursor:
|
|
5070
|
-
idempotencyKey:
|
|
5071
|
-
limit:
|
|
5072
|
-
noWait:
|
|
5073
|
-
timeout:
|
|
5074
|
-
volume:
|
|
5075
|
-
wait:
|
|
5076
|
-
yes:
|
|
5038
|
+
import { z as z26 } from "zod";
|
|
5039
|
+
var mountCliInput = z26.object({
|
|
5040
|
+
$positionals: z26.array(z26.string()).default([]),
|
|
5041
|
+
access: z26.string().optional(),
|
|
5042
|
+
cursor: z26.string().optional(),
|
|
5043
|
+
idempotencyKey: z26.string().optional(),
|
|
5044
|
+
limit: z26.union([z26.string(), z26.number()]).optional(),
|
|
5045
|
+
noWait: z26.boolean().optional(),
|
|
5046
|
+
timeout: z26.string().optional(),
|
|
5047
|
+
volume: z26.string().optional(),
|
|
5048
|
+
wait: z26.boolean().optional(),
|
|
5049
|
+
yes: z26.boolean().optional()
|
|
5077
5050
|
}).strict();
|
|
5078
5051
|
function executeMount(command) {
|
|
5079
5052
|
return (context, input) => {
|
|
@@ -5087,11 +5060,11 @@ function executeMount(command) {
|
|
|
5087
5060
|
function mutationOptions(idempotencyKey) {
|
|
5088
5061
|
return idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : void 0;
|
|
5089
5062
|
}
|
|
5090
|
-
var reservationInput =
|
|
5091
|
-
var reservationWrite2 = reservationInput.extend({ confirm:
|
|
5063
|
+
var reservationInput = z26.object({ reservationId: z26.string() });
|
|
5064
|
+
var reservationWrite2 = reservationInput.extend({ confirm: z26.boolean().optional() });
|
|
5092
5065
|
var attachInput = reservationWrite2.extend({
|
|
5093
|
-
driveId:
|
|
5094
|
-
readOnly:
|
|
5066
|
+
driveId: z26.string(),
|
|
5067
|
+
readOnly: z26.boolean().optional()
|
|
5095
5068
|
});
|
|
5096
5069
|
var volumeMountCandidatesCapability = defineCapability({
|
|
5097
5070
|
id: "storage.volume-mounts.candidates",
|
|
@@ -5099,9 +5072,8 @@ var volumeMountCandidatesCapability = defineCapability({
|
|
|
5099
5072
|
roles: ["user"],
|
|
5100
5073
|
description: "List reservations that can receive a storage deploy, grouped the same way as the console picker.",
|
|
5101
5074
|
mutation: "read",
|
|
5102
|
-
input:
|
|
5075
|
+
input: z26.object({}),
|
|
5103
5076
|
mcp: { name: "storage_targets" },
|
|
5104
|
-
slack: false,
|
|
5105
5077
|
cli: {
|
|
5106
5078
|
command: ["volume-mounts", "candidates"],
|
|
5107
5079
|
input: mountCliInput,
|
|
@@ -5129,7 +5101,6 @@ var volumeMountShowCapability = defineCapability({
|
|
|
5129
5101
|
mutation: "read",
|
|
5130
5102
|
input: reservationInput,
|
|
5131
5103
|
mcp: { name: "storage_deployment_status" },
|
|
5132
|
-
slack: false,
|
|
5133
5104
|
cli: {
|
|
5134
5105
|
command: ["volume-mounts", "show"],
|
|
5135
5106
|
input: mountCliInput,
|
|
@@ -5156,12 +5127,11 @@ var volumeMountAttachCapability = defineCapability({
|
|
|
5156
5127
|
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.",
|
|
5157
5128
|
mutation: "preview-confirm",
|
|
5158
5129
|
input: attachInput.extend({
|
|
5159
|
-
mountPath:
|
|
5160
|
-
mountMode:
|
|
5161
|
-
idempotencyKey:
|
|
5130
|
+
mountPath: z26.string().optional(),
|
|
5131
|
+
mountMode: z26.literal("fuse").optional(),
|
|
5132
|
+
idempotencyKey: z26.string().optional()
|
|
5162
5133
|
}),
|
|
5163
5134
|
mcp: { name: "storage_deploy", input: attachInput },
|
|
5164
|
-
slack: false,
|
|
5165
5135
|
cli: {
|
|
5166
5136
|
command: ["volume-mounts", "attach"],
|
|
5167
5137
|
input: mountCliInput,
|
|
@@ -5196,9 +5166,8 @@ var volumeMountDetachCapability = defineCapability({
|
|
|
5196
5166
|
roles: ["user"],
|
|
5197
5167
|
description: "Detach the reservation storage attachment (after unmount) so the volume can be deleted.",
|
|
5198
5168
|
mutation: "preview-confirm",
|
|
5199
|
-
input: reservationWrite2.extend({ idempotencyKey:
|
|
5169
|
+
input: reservationWrite2.extend({ idempotencyKey: z26.string().optional() }),
|
|
5200
5170
|
mcp: { name: "storage_undeploy", input: reservationWrite2 },
|
|
5201
|
-
slack: false,
|
|
5202
5171
|
cli: {
|
|
5203
5172
|
command: ["volume-mounts", "detach"],
|
|
5204
5173
|
input: mountCliInput,
|
|
@@ -5253,13 +5222,13 @@ var mountCapabilities = [
|
|
|
5253
5222
|
];
|
|
5254
5223
|
|
|
5255
5224
|
// ../../packages/capabilities/dist/capabilities/identity.js
|
|
5256
|
-
import { z as
|
|
5257
|
-
var emptyInput3 =
|
|
5258
|
-
var loginInput =
|
|
5259
|
-
authBase:
|
|
5260
|
-
noBrowser:
|
|
5261
|
-
pollInterval:
|
|
5262
|
-
timeout:
|
|
5225
|
+
import { z as z27 } from "zod";
|
|
5226
|
+
var emptyInput3 = z27.object({});
|
|
5227
|
+
var loginInput = z27.object({
|
|
5228
|
+
authBase: z27.string().min(1).optional(),
|
|
5229
|
+
noBrowser: z27.boolean().optional(),
|
|
5230
|
+
pollInterval: z27.number().positive().optional(),
|
|
5231
|
+
timeout: z27.number().positive().optional()
|
|
5263
5232
|
});
|
|
5264
5233
|
function executeSession(context, command, input) {
|
|
5265
5234
|
if (!context.cli?.session) {
|
|
@@ -5378,76 +5347,50 @@ var identityCapabilities = [
|
|
|
5378
5347
|
];
|
|
5379
5348
|
|
|
5380
5349
|
// ../../packages/capabilities/dist/capabilities/listings.js
|
|
5381
|
-
import { z as
|
|
5382
|
-
var listingCreateInput =
|
|
5383
|
-
organizationId:
|
|
5384
|
-
organization_id:
|
|
5385
|
-
facilityId:
|
|
5386
|
-
facility_id:
|
|
5387
|
-
kind:
|
|
5388
|
-
gpu:
|
|
5389
|
-
cpu:
|
|
5390
|
-
site:
|
|
5391
|
-
fabric:
|
|
5392
|
-
min_nodes:
|
|
5393
|
-
starts_after:
|
|
5394
|
-
starts_before:
|
|
5395
|
-
ends_after:
|
|
5396
|
-
ends_before:
|
|
5397
|
-
gpu_type:
|
|
5398
|
-
node_model:
|
|
5399
|
-
fabric_type:
|
|
5400
|
-
node_count:
|
|
5401
|
-
gpus_per_node:
|
|
5402
|
-
cores_per_node:
|
|
5403
|
-
site_nickname:
|
|
5404
|
-
site_supplier:
|
|
5405
|
-
ram:
|
|
5406
|
-
storage:
|
|
5407
|
-
internet:
|
|
5408
|
-
network_hardware:
|
|
5409
|
-
available_start_at:
|
|
5410
|
-
available_end_at:
|
|
5411
|
-
available_from:
|
|
5412
|
-
available_to:
|
|
5413
|
-
buy_now_price_per_gpu_hour:
|
|
5414
|
-
deposit_percent:
|
|
5415
|
-
down_payment_cents:
|
|
5416
|
-
access_mode:
|
|
5417
|
-
state:
|
|
5418
|
-
price_omitted:
|
|
5419
|
-
announce:
|
|
5420
|
-
text:
|
|
5421
|
-
confirm:
|
|
5422
|
-
idempotencyKey:
|
|
5423
|
-
});
|
|
5424
|
-
var catalogTermsInput =
|
|
5425
|
-
var slackListingCreateParams = {
|
|
5426
|
-
type: "object",
|
|
5427
|
-
properties: {
|
|
5428
|
-
gpu_type: { type: "string" },
|
|
5429
|
-
cpu: { type: "string" },
|
|
5430
|
-
node_model: { type: "string" },
|
|
5431
|
-
fabric_type: { type: "string" },
|
|
5432
|
-
node_count: { type: "integer" },
|
|
5433
|
-
gpus_per_node: { type: "integer" },
|
|
5434
|
-
cores_per_node: { type: "integer" },
|
|
5435
|
-
site_nickname: {
|
|
5436
|
-
type: "string",
|
|
5437
|
-
description: "Where the capacity is, exactly as the user said it: a state, city, address, or catalog region such as us-west-3. Ornn places it in a catalog region."
|
|
5438
|
-
},
|
|
5439
|
-
site_supplier: { type: "string" },
|
|
5440
|
-
ram: { type: "string" },
|
|
5441
|
-
storage: { type: "string" },
|
|
5442
|
-
available_start_at: { type: "string" },
|
|
5443
|
-
available_end_at: { type: "string" },
|
|
5444
|
-
buy_now_price_per_gpu_hour: { type: "number" },
|
|
5445
|
-
deposit_percent: { type: "number" },
|
|
5446
|
-
price_omitted: { type: "boolean" },
|
|
5447
|
-
announce: { type: "boolean" },
|
|
5448
|
-
text: { type: "string" }
|
|
5449
|
-
}
|
|
5450
|
-
};
|
|
5350
|
+
import { z as z28 } from "zod";
|
|
5351
|
+
var listingCreateInput = z28.object({
|
|
5352
|
+
organizationId: z28.string().optional(),
|
|
5353
|
+
organization_id: z28.string().optional(),
|
|
5354
|
+
facilityId: z28.string().optional(),
|
|
5355
|
+
facility_id: z28.string().optional(),
|
|
5356
|
+
kind: z28.enum(["gpu", "cpu", "node", "link"]).optional(),
|
|
5357
|
+
gpu: z28.string().optional(),
|
|
5358
|
+
cpu: z28.string().optional(),
|
|
5359
|
+
site: z28.string().optional(),
|
|
5360
|
+
fabric: z28.string().optional(),
|
|
5361
|
+
min_nodes: z28.number().int().optional(),
|
|
5362
|
+
starts_after: z28.string().optional(),
|
|
5363
|
+
starts_before: z28.string().optional(),
|
|
5364
|
+
ends_after: z28.string().optional(),
|
|
5365
|
+
ends_before: z28.string().optional(),
|
|
5366
|
+
gpu_type: z28.string().optional(),
|
|
5367
|
+
node_model: z28.string().optional(),
|
|
5368
|
+
fabric_type: z28.string().optional(),
|
|
5369
|
+
node_count: z28.number().int().optional(),
|
|
5370
|
+
gpus_per_node: z28.number().int().optional(),
|
|
5371
|
+
cores_per_node: z28.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".'),
|
|
5372
|
+
site_nickname: z28.string().optional().describe("Where the capacity is, exactly as the user said it: a state, city, address, or catalog region such as us-west-3. Ornn places it in a catalog region."),
|
|
5373
|
+
site_supplier: z28.string().optional(),
|
|
5374
|
+
ram: z28.string().optional(),
|
|
5375
|
+
storage: z28.string().optional(),
|
|
5376
|
+
internet: z28.string().optional(),
|
|
5377
|
+
network_hardware: z28.string().optional(),
|
|
5378
|
+
available_start_at: z28.string().optional().describe("Start of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5379
|
+
available_end_at: z28.string().optional().describe("End of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5380
|
+
available_from: z28.string().optional().describe("Alias for available_start_at."),
|
|
5381
|
+
available_to: z28.string().optional().describe("Alias for available_end_at."),
|
|
5382
|
+
buy_now_price_per_gpu_hour: z28.number().optional().describe("Price buyers pay, USD per GPU-hour (per vCPU-hour on CPU listings)."),
|
|
5383
|
+
deposit_percent: z28.number().optional(),
|
|
5384
|
+
down_payment_cents: z28.number().int().nonnegative().optional(),
|
|
5385
|
+
access_mode: z28.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
5386
|
+
state: z28.enum(["available", "draft"]).optional(),
|
|
5387
|
+
price_omitted: z28.boolean().optional(),
|
|
5388
|
+
announce: z28.boolean().optional(),
|
|
5389
|
+
text: z28.string().optional(),
|
|
5390
|
+
confirm: z28.boolean().optional(),
|
|
5391
|
+
idempotencyKey: z28.string().min(1).max(200).optional()
|
|
5392
|
+
});
|
|
5393
|
+
var catalogTermsInput = z28.object({ kind: z28.enum(["gpu", "cpu", "node", "link"]).optional() });
|
|
5451
5394
|
var listCatalogTermsCapability = defineCapability({
|
|
5452
5395
|
id: "listings.catalog_terms",
|
|
5453
5396
|
mcp: false,
|
|
@@ -5579,7 +5522,7 @@ var createListingCapability = defineCapability({
|
|
|
5579
5522
|
roles: ["admin"],
|
|
5580
5523
|
description: "Create a primary marketplace listing (admin). gpu_type, cpu, node_model, and fabric_type must exact-match an orchestrator catalog display name, canonical, or alias; gpu_type becomes the listing's GPU slug. buy_now_price_per_gpu_hour is the customer price; deposit_percent is the upfront payment as a percentage of the full availability window. Nodes are attached afterwards. Slack never POSTs until a human replies confirm. MCP and CLI use native listing.create instead.",
|
|
5581
5524
|
mutation: "preview-confirm",
|
|
5582
|
-
slack: {
|
|
5525
|
+
slack: {},
|
|
5583
5526
|
input: listingCreateInput,
|
|
5584
5527
|
execute: async (ctx, input) => {
|
|
5585
5528
|
const parsed = listingCreateInput.parse(input);
|
|
@@ -5711,7 +5654,10 @@ var createListingCapability = defineCapability({
|
|
|
5711
5654
|
}
|
|
5712
5655
|
if (!parsed.idempotencyKey)
|
|
5713
5656
|
return { ok: false, error: "idempotency_key_required" };
|
|
5714
|
-
return
|
|
5657
|
+
return adminCapacityOffersCreateCapability.execute(ctx, {
|
|
5658
|
+
...listing,
|
|
5659
|
+
idempotencyKey: parsed.idempotencyKey
|
|
5660
|
+
});
|
|
5715
5661
|
}
|
|
5716
5662
|
});
|
|
5717
5663
|
var listingCapabilities = [
|
|
@@ -5764,7 +5710,7 @@ function nodeLogsSubscribePath(id, stream) {
|
|
|
5764
5710
|
}
|
|
5765
5711
|
|
|
5766
5712
|
// ../../packages/capabilities/dist/capabilities/observability.js
|
|
5767
|
-
import { z as
|
|
5713
|
+
import { z as z29 } from "zod";
|
|
5768
5714
|
function tailPath(path3, input) {
|
|
5769
5715
|
const query3 = new URLSearchParams({
|
|
5770
5716
|
duration: String(input.duration ?? 20),
|
|
@@ -5772,30 +5718,30 @@ function tailPath(path3, input) {
|
|
|
5772
5718
|
});
|
|
5773
5719
|
return `${path3}${path3.includes("?") ? "&" : "?"}${query3}`;
|
|
5774
5720
|
}
|
|
5775
|
-
var latestInput =
|
|
5776
|
-
node_id:
|
|
5777
|
-
start:
|
|
5778
|
-
end:
|
|
5779
|
-
span:
|
|
5780
|
-
max_points:
|
|
5781
|
-
metrics:
|
|
5782
|
-
});
|
|
5783
|
-
var logsLatestInput =
|
|
5784
|
-
node_id:
|
|
5785
|
-
stream:
|
|
5786
|
-
count:
|
|
5787
|
-
before:
|
|
5788
|
-
start:
|
|
5789
|
-
cursor:
|
|
5790
|
-
});
|
|
5791
|
-
var tailInput =
|
|
5792
|
-
node_id:
|
|
5793
|
-
duration:
|
|
5794
|
-
max_events:
|
|
5795
|
-
fields:
|
|
5721
|
+
var latestInput = z29.object({
|
|
5722
|
+
node_id: z29.string().min(1),
|
|
5723
|
+
start: z29.string().optional(),
|
|
5724
|
+
end: z29.string().optional(),
|
|
5725
|
+
span: z29.string().optional(),
|
|
5726
|
+
max_points: z29.number().int().min(1).max(500).optional(),
|
|
5727
|
+
metrics: z29.string().optional()
|
|
5728
|
+
});
|
|
5729
|
+
var logsLatestInput = z29.object({
|
|
5730
|
+
node_id: z29.string().min(1),
|
|
5731
|
+
stream: z29.enum(["serial", "kernel"]).default("kernel"),
|
|
5732
|
+
count: z29.number().int().min(1).max(1e3).optional(),
|
|
5733
|
+
before: z29.string().optional(),
|
|
5734
|
+
start: z29.string().optional(),
|
|
5735
|
+
cursor: z29.string().optional()
|
|
5736
|
+
});
|
|
5737
|
+
var tailInput = z29.object({
|
|
5738
|
+
node_id: z29.string().min(1),
|
|
5739
|
+
duration: z29.number().int().min(1).max(120).optional(),
|
|
5740
|
+
max_events: z29.number().int().min(1).max(200).optional(),
|
|
5741
|
+
fields: z29.string().optional()
|
|
5796
5742
|
});
|
|
5797
5743
|
var logsTailInput = tailInput.extend({
|
|
5798
|
-
stream:
|
|
5744
|
+
stream: z29.enum(["serial", "kernel"]).default("kernel")
|
|
5799
5745
|
});
|
|
5800
5746
|
function expandSpan(span, start, end) {
|
|
5801
5747
|
if (start?.trim() && end?.trim()) {
|
|
@@ -5876,7 +5822,7 @@ var telemetryLatestBatchCapability = defineCapability({
|
|
|
5876
5822
|
required: ["node_ids"]
|
|
5877
5823
|
}
|
|
5878
5824
|
},
|
|
5879
|
-
input:
|
|
5825
|
+
input: z29.object({ node_ids: z29.array(z29.uuid()).min(1).max(100) }),
|
|
5880
5826
|
execute: async (ctx, input) => getLatestTelemetry(ctx.fetch, { node_ids: input.node_ids })
|
|
5881
5827
|
});
|
|
5882
5828
|
var logsLatestCapability = defineCapability({
|
|
@@ -5948,9 +5894,9 @@ var telemetrySnapshotCapability = defineCapability({
|
|
|
5948
5894
|
required: ["node_id"]
|
|
5949
5895
|
}
|
|
5950
5896
|
},
|
|
5951
|
-
input:
|
|
5952
|
-
node_id:
|
|
5953
|
-
limit:
|
|
5897
|
+
input: z29.object({
|
|
5898
|
+
node_id: z29.string().min(1),
|
|
5899
|
+
limit: z29.number().int().min(1).max(1e3).optional()
|
|
5954
5900
|
}),
|
|
5955
5901
|
execute: async (ctx, input) => getNodeLatestTelemetry(ctx.fetch, input.node_id, { limit: input.limit ?? 1 })
|
|
5956
5902
|
});
|
|
@@ -6017,12 +5963,12 @@ var observabilityCapabilities = [
|
|
|
6017
5963
|
];
|
|
6018
5964
|
|
|
6019
5965
|
// ../../packages/capabilities/dist/capabilities/organization-invites.js
|
|
6020
|
-
import { z as
|
|
6021
|
-
var organizationInviteInput =
|
|
6022
|
-
organization_id:
|
|
6023
|
-
email:
|
|
6024
|
-
supplier:
|
|
6025
|
-
send_email:
|
|
5966
|
+
import { z as z30 } from "zod";
|
|
5967
|
+
var organizationInviteInput = z30.object({
|
|
5968
|
+
organization_id: z30.uuid().optional(),
|
|
5969
|
+
email: z30.string().trim().toLowerCase().pipe(z30.email()),
|
|
5970
|
+
supplier: z30.boolean().optional(),
|
|
5971
|
+
send_email: z30.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
|
|
6026
5972
|
}).superRefine((input, ctx) => {
|
|
6027
5973
|
if (!input.organization_id && input.send_email === true) {
|
|
6028
5974
|
ctx.addIssue({
|
|
@@ -6084,33 +6030,33 @@ var organizationInviteCapability = defineCapability({
|
|
|
6084
6030
|
});
|
|
6085
6031
|
|
|
6086
6032
|
// ../../packages/capabilities/dist/capabilities/networks.js
|
|
6087
|
-
import { z as
|
|
6033
|
+
import { z as z31 } from "zod";
|
|
6088
6034
|
var globalInput = {
|
|
6089
|
-
$positionals:
|
|
6090
|
-
guided:
|
|
6091
|
-
idempotencyKey:
|
|
6092
|
-
noBrowser:
|
|
6093
|
-
noWait:
|
|
6094
|
-
overwrite:
|
|
6095
|
-
print:
|
|
6096
|
-
wait:
|
|
6097
|
-
yes:
|
|
6035
|
+
$positionals: z31.array(z31.string()).optional(),
|
|
6036
|
+
guided: z31.boolean().optional(),
|
|
6037
|
+
idempotencyKey: z31.string().optional(),
|
|
6038
|
+
noBrowser: z31.boolean().optional(),
|
|
6039
|
+
noWait: z31.boolean().optional(),
|
|
6040
|
+
overwrite: z31.boolean().optional(),
|
|
6041
|
+
print: z31.boolean().optional(),
|
|
6042
|
+
wait: z31.boolean().optional(),
|
|
6043
|
+
yes: z31.boolean().optional()
|
|
6098
6044
|
};
|
|
6099
|
-
var noOptionsInput =
|
|
6100
|
-
var connectInput2 =
|
|
6045
|
+
var noOptionsInput = z31.object(globalInput).strict();
|
|
6046
|
+
var connectInput2 = z31.object({
|
|
6101
6047
|
...globalInput,
|
|
6102
|
-
identityFile:
|
|
6103
|
-
output:
|
|
6104
|
-
user:
|
|
6048
|
+
identityFile: z31.string().optional(),
|
|
6049
|
+
output: z31.string().optional(),
|
|
6050
|
+
user: z31.string().optional()
|
|
6105
6051
|
}).strict();
|
|
6106
|
-
var listInput =
|
|
6107
|
-
var networkCreateInput =
|
|
6108
|
-
var networkUpdateInput =
|
|
6109
|
-
var vpnConfigureInput =
|
|
6052
|
+
var listInput = z31.object({ ...globalInput, cursor: z31.string().optional(), limit: z31.string().optional() }).strict();
|
|
6053
|
+
var networkCreateInput = z31.object({ ...globalInput, cidr: z31.string().optional(), name: z31.string().optional() }).strict();
|
|
6054
|
+
var networkUpdateInput = z31.object({ ...globalInput, name: z31.string().optional() }).strict();
|
|
6055
|
+
var vpnConfigureInput = z31.object({
|
|
6110
6056
|
...globalInput,
|
|
6111
|
-
name:
|
|
6112
|
-
output:
|
|
6113
|
-
privateKey:
|
|
6057
|
+
name: z31.string().optional(),
|
|
6058
|
+
output: z31.string().optional(),
|
|
6059
|
+
privateKey: z31.string().optional()
|
|
6114
6060
|
}).strict();
|
|
6115
6061
|
function executeNetwork(command) {
|
|
6116
6062
|
return (context, input) => {
|
|
@@ -6123,39 +6069,38 @@ function executeNetwork(command) {
|
|
|
6123
6069
|
function mutationOptions2(idempotencyKey) {
|
|
6124
6070
|
return idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : void 0;
|
|
6125
6071
|
}
|
|
6126
|
-
var networkIdInput =
|
|
6127
|
-
var networkCreateFields =
|
|
6128
|
-
name:
|
|
6129
|
-
cidr:
|
|
6130
|
-
description:
|
|
6131
|
-
confirm:
|
|
6132
|
-
});
|
|
6133
|
-
var networkUpdateFields =
|
|
6134
|
-
networkId:
|
|
6135
|
-
name:
|
|
6136
|
-
description:
|
|
6137
|
-
clearDescription:
|
|
6138
|
-
confirm:
|
|
6072
|
+
var networkIdInput = z31.object({ networkId: z31.string() });
|
|
6073
|
+
var networkCreateFields = z31.object({
|
|
6074
|
+
name: z31.string(),
|
|
6075
|
+
cidr: z31.string().optional(),
|
|
6076
|
+
description: z31.string().optional(),
|
|
6077
|
+
confirm: z31.boolean().optional()
|
|
6078
|
+
});
|
|
6079
|
+
var networkUpdateFields = z31.object({
|
|
6080
|
+
networkId: z31.string(),
|
|
6081
|
+
name: z31.string().optional(),
|
|
6082
|
+
description: z31.string().optional(),
|
|
6083
|
+
clearDescription: z31.boolean().optional(),
|
|
6084
|
+
confirm: z31.boolean().optional()
|
|
6139
6085
|
}).refine((input) => !(input.clearDescription && input.description !== void 0), {
|
|
6140
6086
|
message: "Use either description or clearDescription, not both."
|
|
6141
6087
|
}).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
|
|
6142
|
-
var networkDeleteInput = networkIdInput.extend({ confirm:
|
|
6143
|
-
var vpnPeerCreateInput =
|
|
6144
|
-
publicKey:
|
|
6145
|
-
label:
|
|
6146
|
-
confirm:
|
|
6147
|
-
});
|
|
6148
|
-
var vpnPeerDeleteInput =
|
|
6149
|
-
var reservationInput2 = { reservationId:
|
|
6088
|
+
var networkDeleteInput = networkIdInput.extend({ confirm: z31.boolean().optional() });
|
|
6089
|
+
var vpnPeerCreateInput = z31.object({
|
|
6090
|
+
publicKey: z31.string(),
|
|
6091
|
+
label: z31.string().optional(),
|
|
6092
|
+
confirm: z31.boolean().optional()
|
|
6093
|
+
});
|
|
6094
|
+
var vpnPeerDeleteInput = z31.object({ peerId: z31.string(), confirm: z31.boolean().optional() });
|
|
6095
|
+
var reservationInput2 = { reservationId: z31.string() };
|
|
6150
6096
|
var privateNetworkListCapability = defineCapability({
|
|
6151
6097
|
id: "networks.list",
|
|
6152
6098
|
domain: "networks",
|
|
6153
6099
|
roles: ["user"],
|
|
6154
6100
|
mutation: "read",
|
|
6155
|
-
input:
|
|
6101
|
+
input: z31.object({}),
|
|
6156
6102
|
description: "List this tenant's private networks.",
|
|
6157
6103
|
mcp: { name: "networks_list" },
|
|
6158
|
-
slack: false,
|
|
6159
6104
|
cli: {
|
|
6160
6105
|
command: ["private-networks", "list"],
|
|
6161
6106
|
input: listInput,
|
|
@@ -6181,7 +6126,6 @@ var privateNetworkShowCapability = defineCapability({
|
|
|
6181
6126
|
input: networkIdInput,
|
|
6182
6127
|
description: "Show a single private network by id.",
|
|
6183
6128
|
mcp: { name: "networks_show" },
|
|
6184
|
-
slack: false,
|
|
6185
6129
|
cli: {
|
|
6186
6130
|
command: ["private-networks", "show"],
|
|
6187
6131
|
input: noOptionsInput,
|
|
@@ -6205,10 +6149,9 @@ var privateNetworkCreateCapability = defineCapability({
|
|
|
6205
6149
|
domain: "networks",
|
|
6206
6150
|
roles: ["user"],
|
|
6207
6151
|
mutation: "preview-confirm",
|
|
6208
|
-
input: networkCreateFields.extend({ idempotencyKey:
|
|
6152
|
+
input: networkCreateFields.extend({ idempotencyKey: z31.string().optional() }),
|
|
6209
6153
|
description: "Create a private network.",
|
|
6210
6154
|
mcp: { name: "networks_create", input: networkCreateFields },
|
|
6211
|
-
slack: false,
|
|
6212
6155
|
cli: {
|
|
6213
6156
|
command: ["private-networks", "create"],
|
|
6214
6157
|
input: networkCreateInput,
|
|
@@ -6233,10 +6176,9 @@ var privateNetworkUpdateCapability = defineCapability({
|
|
|
6233
6176
|
domain: "networks",
|
|
6234
6177
|
roles: ["user"],
|
|
6235
6178
|
mutation: "preview-confirm",
|
|
6236
|
-
input: networkUpdateFields.safeExtend({ idempotencyKey:
|
|
6179
|
+
input: networkUpdateFields.safeExtend({ idempotencyKey: z31.string().optional() }),
|
|
6237
6180
|
description: "Update a private network's name or description. Pass clearDescription: true to null out the description instead of setting it.",
|
|
6238
6181
|
mcp: { name: "networks_update", input: networkUpdateFields },
|
|
6239
|
-
slack: false,
|
|
6240
6182
|
cli: {
|
|
6241
6183
|
command: ["private-networks", "update"],
|
|
6242
6184
|
input: networkUpdateInput,
|
|
@@ -6264,10 +6206,9 @@ var privateNetworkDeleteCapability = defineCapability({
|
|
|
6264
6206
|
domain: "networks",
|
|
6265
6207
|
roles: ["user"],
|
|
6266
6208
|
mutation: "preview-confirm",
|
|
6267
|
-
input: networkDeleteInput.extend({ idempotencyKey:
|
|
6209
|
+
input: networkDeleteInput.extend({ idempotencyKey: z31.string().optional() }),
|
|
6268
6210
|
description: "Delete a private network.",
|
|
6269
6211
|
mcp: { name: "networks_delete", input: networkDeleteInput },
|
|
6270
|
-
slack: false,
|
|
6271
6212
|
cli: {
|
|
6272
6213
|
command: ["private-networks", "delete"],
|
|
6273
6214
|
input: noOptionsInput,
|
|
@@ -6295,10 +6236,9 @@ var vpnConnectionListCapability = defineCapability({
|
|
|
6295
6236
|
domain: "vpn",
|
|
6296
6237
|
roles: ["user"],
|
|
6297
6238
|
mutation: "read",
|
|
6298
|
-
input:
|
|
6239
|
+
input: z31.object({}),
|
|
6299
6240
|
description: "List WireGuard VPN peers registered on a reservation.",
|
|
6300
|
-
mcp: { name: "vpn_peers_list", input:
|
|
6301
|
-
slack: false,
|
|
6241
|
+
mcp: { name: "vpn_peers_list", input: z31.object(reservationInput2) },
|
|
6302
6242
|
cli: {
|
|
6303
6243
|
command: ["vpn-connections", "list"],
|
|
6304
6244
|
input: listInput,
|
|
@@ -6322,13 +6262,12 @@ var vpnConnectionConfigureCapability = defineCapability({
|
|
|
6322
6262
|
domain: "vpn",
|
|
6323
6263
|
roles: ["user"],
|
|
6324
6264
|
mutation: "preview-confirm",
|
|
6325
|
-
input: vpnPeerCreateInput.extend({ idempotencyKey:
|
|
6265
|
+
input: vpnPeerCreateInput.extend({ idempotencyKey: z31.string().optional() }),
|
|
6326
6266
|
description: "Register a WireGuard VPN peer public key on a reservation.",
|
|
6327
6267
|
mcp: {
|
|
6328
6268
|
name: "vpn_peers_create",
|
|
6329
|
-
input:
|
|
6269
|
+
input: z31.object({ ...reservationInput2, ...vpnPeerCreateInput.shape })
|
|
6330
6270
|
},
|
|
6331
|
-
slack: false,
|
|
6332
6271
|
cli: {
|
|
6333
6272
|
command: ["vpn-connections", "configure"],
|
|
6334
6273
|
input: vpnConfigureInput,
|
|
@@ -6354,13 +6293,12 @@ var vpnConnectionDisconnectCapability = defineCapability({
|
|
|
6354
6293
|
domain: "vpn",
|
|
6355
6294
|
roles: ["user"],
|
|
6356
6295
|
mutation: "preview-confirm",
|
|
6357
|
-
input: vpnPeerDeleteInput.extend({ idempotencyKey:
|
|
6296
|
+
input: vpnPeerDeleteInput.extend({ idempotencyKey: z31.string().optional() }),
|
|
6358
6297
|
description: "Revoke a WireGuard VPN peer from a reservation.",
|
|
6359
6298
|
mcp: {
|
|
6360
6299
|
name: "vpn_peers_delete",
|
|
6361
|
-
input:
|
|
6300
|
+
input: z31.object({ ...reservationInput2, ...vpnPeerDeleteInput.shape })
|
|
6362
6301
|
},
|
|
6363
|
-
slack: false,
|
|
6364
6302
|
cli: {
|
|
6365
6303
|
command: ["vpn-connections", "disconnect"],
|
|
6366
6304
|
input: noOptionsInput,
|
|
@@ -6430,20 +6368,20 @@ var networkCapabilities = [
|
|
|
6430
6368
|
];
|
|
6431
6369
|
|
|
6432
6370
|
// ../../packages/capabilities/dist/capabilities/registry.js
|
|
6433
|
-
import { z as
|
|
6371
|
+
import { z as z32 } from "zod";
|
|
6434
6372
|
var globalInput2 = {
|
|
6435
|
-
$positionals:
|
|
6436
|
-
yes:
|
|
6373
|
+
$positionals: z32.array(z32.string()).default([]),
|
|
6374
|
+
yes: z32.boolean().optional()
|
|
6437
6375
|
};
|
|
6438
|
-
var emptyInput4 =
|
|
6439
|
-
var repositoryInput =
|
|
6376
|
+
var emptyInput4 = z32.object(globalInput2).strict();
|
|
6377
|
+
var repositoryInput = z32.object({
|
|
6440
6378
|
...globalInput2,
|
|
6441
|
-
repository:
|
|
6379
|
+
repository: z32.string().optional().describe("Repository name, with or without your organization's namespace.")
|
|
6442
6380
|
}).strict();
|
|
6443
|
-
var tagInput =
|
|
6381
|
+
var tagInput = z32.object({
|
|
6444
6382
|
...globalInput2,
|
|
6445
|
-
repository:
|
|
6446
|
-
tag:
|
|
6383
|
+
repository: z32.string().optional().describe("Repository name, with or without your organization's namespace."),
|
|
6384
|
+
tag: z32.string().optional().describe("Tag to delete, such as v1.")
|
|
6447
6385
|
}).strict();
|
|
6448
6386
|
function cliInteraction(context) {
|
|
6449
6387
|
return context.cli?.interaction;
|
|
@@ -6502,7 +6440,6 @@ var registryShowCapability = defineCapability({
|
|
|
6502
6440
|
related: ["registry login", "registry repositories list"]
|
|
6503
6441
|
}
|
|
6504
6442
|
},
|
|
6505
|
-
slack: false,
|
|
6506
6443
|
execute: async (context) => {
|
|
6507
6444
|
const registry = await getContainerRegistry(context.fetch);
|
|
6508
6445
|
const interaction = cliInteraction(context);
|
|
@@ -6536,7 +6473,6 @@ var registryRepositoriesListCapability = defineCapability({
|
|
|
6536
6473
|
related: ["registry tags list", "registry show"]
|
|
6537
6474
|
}
|
|
6538
6475
|
},
|
|
6539
|
-
slack: false,
|
|
6540
6476
|
execute: async (context) => {
|
|
6541
6477
|
const listed = await listRegistryRepositories(context.fetch);
|
|
6542
6478
|
const interaction = cliInteraction(context);
|
|
@@ -6572,7 +6508,6 @@ var registryTagsListCapability = defineCapability({
|
|
|
6572
6508
|
related: ["registry tags delete", "registry copies list"]
|
|
6573
6509
|
}
|
|
6574
6510
|
},
|
|
6575
|
-
slack: false,
|
|
6576
6511
|
execute: async (context, input) => {
|
|
6577
6512
|
const interaction = cliInteraction(context);
|
|
6578
6513
|
const registry = await getContainerRegistry(context.fetch);
|
|
@@ -6610,7 +6545,6 @@ var registryTagsDeleteCapability = defineCapability({
|
|
|
6610
6545
|
related: ["registry tags list"]
|
|
6611
6546
|
}
|
|
6612
6547
|
},
|
|
6613
|
-
slack: false,
|
|
6614
6548
|
execute: async (context, input) => {
|
|
6615
6549
|
const interaction = cliInteraction(context);
|
|
6616
6550
|
const registry = await getContainerRegistry(context.fetch);
|
|
@@ -6676,7 +6610,6 @@ var registryUsageCapability = defineCapability({
|
|
|
6676
6610
|
related: ["registry repositories list"]
|
|
6677
6611
|
}
|
|
6678
6612
|
},
|
|
6679
|
-
slack: false,
|
|
6680
6613
|
execute: async (context) => {
|
|
6681
6614
|
const usage = await getRegistryUsage(context.fetch);
|
|
6682
6615
|
const interaction = cliInteraction(context);
|
|
@@ -6707,7 +6640,6 @@ var registryCopiesListCapability = defineCapability({
|
|
|
6707
6640
|
related: ["registry tags list"]
|
|
6708
6641
|
}
|
|
6709
6642
|
},
|
|
6710
|
-
slack: false,
|
|
6711
6643
|
execute: (context) => listRegistryCaches(context.fetch)
|
|
6712
6644
|
});
|
|
6713
6645
|
var registryLoginCapability = defineCapability({
|
|
@@ -6750,14 +6682,14 @@ var registryCapabilities = [
|
|
|
6750
6682
|
];
|
|
6751
6683
|
|
|
6752
6684
|
// ../../packages/capabilities/dist/capabilities/reservation-list.js
|
|
6753
|
-
import { z as
|
|
6754
|
-
var reservationListInput =
|
|
6755
|
-
customerId:
|
|
6756
|
-
listingId:
|
|
6757
|
-
listingTermId:
|
|
6758
|
-
status:
|
|
6759
|
-
cursor:
|
|
6760
|
-
limit:
|
|
6685
|
+
import { z as z33 } from "zod";
|
|
6686
|
+
var reservationListInput = z33.object({
|
|
6687
|
+
customerId: z33.string().uuid().optional(),
|
|
6688
|
+
listingId: z33.string().uuid().optional(),
|
|
6689
|
+
listingTermId: z33.string().uuid().optional(),
|
|
6690
|
+
status: z33.enum(["confirmed", "active", "completed", "cancelled"]).optional(),
|
|
6691
|
+
cursor: z33.string().optional(),
|
|
6692
|
+
limit: z33.number().int().min(1).max(100).optional()
|
|
6761
6693
|
});
|
|
6762
6694
|
var reservationListCapability = defineCapability({
|
|
6763
6695
|
id: "reservation.list",
|
|
@@ -6807,20 +6739,20 @@ var reservationListCapability = defineCapability({
|
|
|
6807
6739
|
});
|
|
6808
6740
|
|
|
6809
6741
|
// ../../packages/capabilities/dist/capabilities/volumes.js
|
|
6810
|
-
import { z as
|
|
6811
|
-
var storageCliInput =
|
|
6812
|
-
$positionals:
|
|
6813
|
-
contentType:
|
|
6814
|
-
cursor:
|
|
6815
|
-
idempotencyKey:
|
|
6816
|
-
limit:
|
|
6817
|
-
name:
|
|
6818
|
-
output:
|
|
6819
|
-
overwrite:
|
|
6820
|
-
path:
|
|
6821
|
-
prefix:
|
|
6822
|
-
source:
|
|
6823
|
-
yes:
|
|
6742
|
+
import { z as z34 } from "zod";
|
|
6743
|
+
var storageCliInput = z34.object({
|
|
6744
|
+
$positionals: z34.array(z34.string()).optional(),
|
|
6745
|
+
contentType: z34.string().optional(),
|
|
6746
|
+
cursor: z34.string().optional(),
|
|
6747
|
+
idempotencyKey: z34.string().optional(),
|
|
6748
|
+
limit: z34.union([z34.string(), z34.number()]).optional(),
|
|
6749
|
+
name: z34.string().optional(),
|
|
6750
|
+
output: z34.string().optional(),
|
|
6751
|
+
overwrite: z34.boolean().optional(),
|
|
6752
|
+
path: z34.string().optional(),
|
|
6753
|
+
prefix: z34.string().optional(),
|
|
6754
|
+
source: z34.string().optional(),
|
|
6755
|
+
yes: z34.boolean().optional()
|
|
6824
6756
|
}).strict();
|
|
6825
6757
|
function storageExecutor(context) {
|
|
6826
6758
|
const interaction = context.cli?.interaction;
|
|
@@ -6856,7 +6788,7 @@ function storageCapability({ id, command, description, mutation, outcome, human,
|
|
|
6856
6788
|
execute: async (context, input) => storageExecutor(context)(id, input)
|
|
6857
6789
|
});
|
|
6858
6790
|
}
|
|
6859
|
-
var filesListInput =
|
|
6791
|
+
var filesListInput = z34.object({ driveId: z34.string(), prefix: z34.string().optional() });
|
|
6860
6792
|
async function* listFiles(context, input) {
|
|
6861
6793
|
const prefix = input.prefix ?? "";
|
|
6862
6794
|
const folder = prefix.includes("/") ? prefix.slice(0, prefix.lastIndexOf("/")) : "";
|
|
@@ -6882,7 +6814,6 @@ var volumeFilesListCapability = defineCapability({
|
|
|
6882
6814
|
mutation: "read",
|
|
6883
6815
|
input: filesListInput,
|
|
6884
6816
|
mcp: { name: "storage_files_ls" },
|
|
6885
|
-
slack: false,
|
|
6886
6817
|
execute: async (context, input) => listFiles(context, input),
|
|
6887
6818
|
cli: {
|
|
6888
6819
|
command: ["volumes", "files", "list"],
|
|
@@ -6900,16 +6831,16 @@ var volumeFilesListCapability = defineCapability({
|
|
|
6900
6831
|
}
|
|
6901
6832
|
}
|
|
6902
6833
|
});
|
|
6903
|
-
var volumePageInput =
|
|
6904
|
-
limit:
|
|
6905
|
-
cursor:
|
|
6834
|
+
var volumePageInput = z34.object({
|
|
6835
|
+
limit: z34.number().int().min(1).max(100).optional(),
|
|
6836
|
+
cursor: z34.string().optional()
|
|
6906
6837
|
});
|
|
6907
|
-
var driveInput =
|
|
6908
|
-
var driveWrite = driveInput.extend({ confirm:
|
|
6909
|
-
var volumeCreateInput =
|
|
6910
|
-
name:
|
|
6911
|
-
sourceDriveId:
|
|
6912
|
-
confirm:
|
|
6838
|
+
var driveInput = z34.object({ driveId: z34.string() });
|
|
6839
|
+
var driveWrite = driveInput.extend({ confirm: z34.boolean().optional() });
|
|
6840
|
+
var volumeCreateInput = z34.object({
|
|
6841
|
+
name: z34.string(),
|
|
6842
|
+
sourceDriveId: z34.string().optional(),
|
|
6843
|
+
confirm: z34.boolean().optional()
|
|
6913
6844
|
});
|
|
6914
6845
|
var volumeListCapability = defineCapability({
|
|
6915
6846
|
id: "storage.volumes.list",
|
|
@@ -6917,9 +6848,8 @@ var volumeListCapability = defineCapability({
|
|
|
6917
6848
|
roles: ["user"],
|
|
6918
6849
|
description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
|
|
6919
6850
|
mutation: "read",
|
|
6920
|
-
input: volumePageInput.extend({ scope:
|
|
6851
|
+
input: volumePageInput.extend({ scope: z34.enum(["all", "managed"]).optional() }),
|
|
6921
6852
|
mcp: { name: "storage_volumes_list", input: volumePageInput },
|
|
6922
|
-
slack: false,
|
|
6923
6853
|
execute: (context, input) => listDrives(context.fetch, {
|
|
6924
6854
|
limit: input.limit ?? 25,
|
|
6925
6855
|
...input.cursor ? { cursor: input.cursor } : {},
|
|
@@ -6948,7 +6878,6 @@ var volumeShowCapability = defineCapability({
|
|
|
6948
6878
|
mutation: "read",
|
|
6949
6879
|
input: driveInput,
|
|
6950
6880
|
mcp: { name: "storage_volumes_show" },
|
|
6951
|
-
slack: false,
|
|
6952
6881
|
execute: (context, input) => getDrive(context.fetch, input.driveId),
|
|
6953
6882
|
cli: {
|
|
6954
6883
|
command: ["volumes", "show"],
|
|
@@ -6972,9 +6901,8 @@ var volumeCreateCapability = defineCapability({
|
|
|
6972
6901
|
roles: ["user"],
|
|
6973
6902
|
description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
|
|
6974
6903
|
mutation: "preview-confirm",
|
|
6975
|
-
input: volumeCreateInput.extend({ idempotencyKey:
|
|
6904
|
+
input: volumeCreateInput.extend({ idempotencyKey: z34.string().optional() }),
|
|
6976
6905
|
mcp: { name: "storage_volumes_create", input: volumeCreateInput },
|
|
6977
|
-
slack: false,
|
|
6978
6906
|
execute: (context, input) => createDrive(context.fetch, { name: input.name, source_drive_id: input.sourceDriveId ?? null }, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0),
|
|
6979
6907
|
cli: {
|
|
6980
6908
|
command: ["volumes", "create"],
|
|
@@ -7000,7 +6928,6 @@ var volumeRefreshCapability = defineCapability({
|
|
|
7000
6928
|
mutation: "preview-confirm",
|
|
7001
6929
|
input: driveWrite,
|
|
7002
6930
|
mcp: { name: "storage_volumes_refresh" },
|
|
7003
|
-
slack: false,
|
|
7004
6931
|
execute: (context, input) => getDrive(context.fetch, input.driveId, { refresh: true }),
|
|
7005
6932
|
cli: {
|
|
7006
6933
|
command: ["volumes", "refresh"],
|
|
@@ -7026,7 +6953,6 @@ var volumeClearCapability = defineCapability({
|
|
|
7026
6953
|
mutation: "preview-confirm",
|
|
7027
6954
|
input: driveWrite,
|
|
7028
6955
|
mcp: { name: "storage_volumes_clear" },
|
|
7029
|
-
slack: false,
|
|
7030
6956
|
execute: (context, input) => clearDriveContents(context.fetch, input.driveId),
|
|
7031
6957
|
cli: {
|
|
7032
6958
|
command: ["volumes", "clear"],
|
|
@@ -7051,9 +6977,8 @@ var volumeDeleteCapability = defineCapability({
|
|
|
7051
6977
|
roles: ["user"],
|
|
7052
6978
|
description: "Delete a storage volume (drive).",
|
|
7053
6979
|
mutation: "preview-confirm",
|
|
7054
|
-
input: driveWrite.extend({ idempotencyKey:
|
|
6980
|
+
input: driveWrite.extend({ idempotencyKey: z34.string().optional() }),
|
|
7055
6981
|
mcp: { name: "storage_volumes_delete", input: driveWrite },
|
|
7056
|
-
slack: false,
|
|
7057
6982
|
execute: async (context, input) => {
|
|
7058
6983
|
await deleteDrive(context.fetch, input.driveId, {}, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0);
|
|
7059
6984
|
return { deleted: true, drive_id: input.driveId };
|
|
@@ -7132,21 +7057,21 @@ var volumeCapabilities = [
|
|
|
7132
7057
|
];
|
|
7133
7058
|
|
|
7134
7059
|
// ../../packages/capabilities/dist/capabilities/users.js
|
|
7135
|
-
import { z as
|
|
7136
|
-
var directoryLimit =
|
|
7137
|
-
var directoryOffset =
|
|
7138
|
-
var organizationListInput =
|
|
7139
|
-
q:
|
|
7140
|
-
supplier:
|
|
7141
|
-
inference_provider:
|
|
7142
|
-
approved:
|
|
7143
|
-
ids:
|
|
7060
|
+
import { z as z35 } from "zod";
|
|
7061
|
+
var directoryLimit = z35.number().int().min(1).max(100).default(25);
|
|
7062
|
+
var directoryOffset = z35.number().int().nonnegative().optional();
|
|
7063
|
+
var organizationListInput = z35.object({
|
|
7064
|
+
q: z35.string().trim().optional().describe("Company name, contact/member name, or email."),
|
|
7065
|
+
supplier: z35.boolean().optional(),
|
|
7066
|
+
inference_provider: z35.boolean().optional(),
|
|
7067
|
+
approved: z35.boolean().optional(),
|
|
7068
|
+
ids: z35.array(z35.uuid()).min(1).max(100).optional(),
|
|
7144
7069
|
limit: directoryLimit,
|
|
7145
7070
|
offset: directoryOffset
|
|
7146
7071
|
});
|
|
7147
|
-
var usersListInput =
|
|
7148
|
-
q:
|
|
7149
|
-
organization_id:
|
|
7072
|
+
var usersListInput = z35.object({
|
|
7073
|
+
q: z35.string().trim().optional().describe("Person name, email, or company name."),
|
|
7074
|
+
organization_id: z35.uuid().optional(),
|
|
7150
7075
|
limit: directoryLimit,
|
|
7151
7076
|
offset: directoryOffset
|
|
7152
7077
|
});
|
|
@@ -7333,6 +7258,7 @@ var catalog = [
|
|
|
7333
7258
|
adminSshCapability,
|
|
7334
7259
|
organizationInviteCapability,
|
|
7335
7260
|
creditGrantCapability,
|
|
7261
|
+
creditAdjustmentsListCapability,
|
|
7336
7262
|
giftCreateCapability
|
|
7337
7263
|
];
|
|
7338
7264
|
|