@ornncompute/cli 1.0.140 → 1.0.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/vm-commands.mjs +35 -46
- package/vendor/capabilities/cli.js +490 -460
|
@@ -337,7 +337,7 @@ function defineCapability(spec) {
|
|
|
337
337
|
command: cli.command ?? names.cli
|
|
338
338
|
}
|
|
339
339
|
} : {},
|
|
340
|
-
...mcp === false ? {} : { mcp: { name: mcp?.name ?? names.mcp } },
|
|
340
|
+
...mcp === false ? {} : { mcp: { ...mcp, name: mcp?.name ?? names.mcp } },
|
|
341
341
|
...slack === false ? {} : {
|
|
342
342
|
slack: {
|
|
343
343
|
name: slack?.name ?? names.slack,
|
|
@@ -363,7 +363,7 @@ function forRole(catalog2, role, client) {
|
|
|
363
363
|
return catalog2.filter((capability) => visibleToClient(capability, client, role));
|
|
364
364
|
}
|
|
365
365
|
function byMcpName(catalog2, name) {
|
|
366
|
-
return catalog2.find((capability) => capability.mcp?.name === name);
|
|
366
|
+
return catalog2.find((capability) => capability.mcp?.name === name || capability.mcp?.aliases?.includes(name));
|
|
367
367
|
}
|
|
368
368
|
function byCliCommand(catalog2, command) {
|
|
369
369
|
return catalog2.find((capability) => capability.cli != null && capability.cli.command.length === command.length && capability.cli.command.every((part, index) => part === command[index]));
|
|
@@ -3379,83 +3379,152 @@ function getCliStatus(request) {
|
|
|
3379
3379
|
}
|
|
3380
3380
|
|
|
3381
3381
|
// ../../packages/capabilities/dist/capabilities/compute.js
|
|
3382
|
+
import { z as z18 } from "zod";
|
|
3383
|
+
|
|
3384
|
+
// ../../packages/capabilities/dist/capabilities/ssh-keys.js
|
|
3382
3385
|
import { z as z17 } from "zod";
|
|
3383
|
-
|
|
3384
|
-
|
|
3386
|
+
async function activeReservationNodes(context, reservationId) {
|
|
3387
|
+
const { nodes: nodes2 } = await listNodes(context.fetch, { reservation_id: reservationId });
|
|
3388
|
+
return nodes2.filter((node) => node.status !== "terminated");
|
|
3389
|
+
}
|
|
3390
|
+
async function reservationKeyStatus(context, reservationId) {
|
|
3391
|
+
const [{ ssh_keys }, nodes2] = await Promise.all([
|
|
3392
|
+
listReservationSshKeys(context.fetch, reservationId),
|
|
3393
|
+
activeReservationNodes(context, reservationId)
|
|
3394
|
+
]);
|
|
3395
|
+
return {
|
|
3396
|
+
keys: ssh_keys.filter((key) => key.status === "active" && !key.revoked_at),
|
|
3397
|
+
nodes: nodes2
|
|
3398
|
+
};
|
|
3399
|
+
}
|
|
3400
|
+
function sshKeyDeliveryStatus(key, node) {
|
|
3401
|
+
const metadata = node.authorized_key_metadata?.find((item) => item.fingerprint === key.fingerprint);
|
|
3402
|
+
const installed = !metadata && node.authorized_key_fingerprints.includes(key.fingerprint) && node.keys_pushed_at;
|
|
3403
|
+
return {
|
|
3404
|
+
status: metadata?.status ?? (installed ? "installed" : "associated"),
|
|
3405
|
+
linux_username: metadata?.linux_username ?? null,
|
|
3406
|
+
pushed_at: metadata?.pushed_at ?? (installed ? node.keys_pushed_at : null),
|
|
3407
|
+
failed_at: metadata?.failed_at ?? null,
|
|
3408
|
+
failure_reason: metadata?.failure_reason ?? null,
|
|
3409
|
+
request_id: metadata?.request_id ?? null
|
|
3410
|
+
};
|
|
3411
|
+
}
|
|
3412
|
+
var reservationKeysPushCapability = defineCapability({
|
|
3413
|
+
id: "access.push_keys",
|
|
3414
|
+
domain: "access",
|
|
3415
|
+
roles: ["user"],
|
|
3416
|
+
description: "Push SSH key(s) onto all active machines for a reservation.",
|
|
3417
|
+
mutation: "immediate",
|
|
3418
|
+
input: z17.object({
|
|
3419
|
+
reservationId: z17.string(),
|
|
3420
|
+
sshKeyIds: z17.array(z17.string()).min(1),
|
|
3421
|
+
requestId: z17.string().optional()
|
|
3422
|
+
}),
|
|
3423
|
+
mcp: { aliases: ["access_keys_push"] },
|
|
3424
|
+
slack: false,
|
|
3425
|
+
execute: async (context, input) => {
|
|
3426
|
+
const nodes2 = await activeReservationNodes(context, input.reservationId);
|
|
3427
|
+
if (!nodes2.length)
|
|
3428
|
+
throw new Error("No active bare-metal machines were found for this reservation.");
|
|
3429
|
+
const pushed = [];
|
|
3430
|
+
for (const node of nodes2) {
|
|
3431
|
+
pushed.push(await pushNodeKeys(context.fetch, node.node_id, {
|
|
3432
|
+
request_id: input.requestId || `mcp-push-keys:${node.node_id}:${Date.now()}`,
|
|
3433
|
+
ssh_key_ids: input.sshKeyIds
|
|
3434
|
+
}));
|
|
3435
|
+
}
|
|
3436
|
+
return pushed;
|
|
3437
|
+
}
|
|
3438
|
+
});
|
|
3439
|
+
|
|
3440
|
+
// ../../packages/capabilities/dist/capabilities/compute.js
|
|
3441
|
+
var positionals2 = z18.array(z18.string()).default([]);
|
|
3442
|
+
var launchInput = z18.object({
|
|
3385
3443
|
$positionals: positionals2,
|
|
3386
|
-
guided:
|
|
3387
|
-
idempotencyKey:
|
|
3388
|
-
key:
|
|
3389
|
-
keyId:
|
|
3390
|
-
label:
|
|
3391
|
-
machine:
|
|
3392
|
-
machines:
|
|
3393
|
-
mode:
|
|
3394
|
-
mountAccess:
|
|
3395
|
-
network:
|
|
3396
|
-
noWait:
|
|
3397
|
-
nodes:
|
|
3398
|
-
publicKey:
|
|
3399
|
-
publicKeyFile:
|
|
3400
|
-
reservation:
|
|
3401
|
-
resume:
|
|
3402
|
-
timeout:
|
|
3403
|
-
username:
|
|
3404
|
-
vms:
|
|
3405
|
-
wait:
|
|
3406
|
-
yes:
|
|
3407
|
-
volume:
|
|
3444
|
+
guided: z18.boolean().optional(),
|
|
3445
|
+
idempotencyKey: z18.string().optional(),
|
|
3446
|
+
key: z18.string().optional(),
|
|
3447
|
+
keyId: z18.string().optional(),
|
|
3448
|
+
label: z18.string().optional(),
|
|
3449
|
+
machine: z18.string().optional(),
|
|
3450
|
+
machines: z18.string().optional(),
|
|
3451
|
+
mode: z18.string().optional(),
|
|
3452
|
+
mountAccess: z18.string().optional(),
|
|
3453
|
+
network: z18.string().optional(),
|
|
3454
|
+
noWait: z18.boolean().optional(),
|
|
3455
|
+
nodes: z18.union([z18.string(), z18.number()]).optional(),
|
|
3456
|
+
publicKey: z18.string().optional(),
|
|
3457
|
+
publicKeyFile: z18.string().optional(),
|
|
3458
|
+
reservation: z18.string().optional(),
|
|
3459
|
+
resume: z18.union([z18.string().min(1), z18.literal(true)]).optional(),
|
|
3460
|
+
timeout: z18.string().optional(),
|
|
3461
|
+
username: z18.string().optional(),
|
|
3462
|
+
vms: z18.string().optional(),
|
|
3463
|
+
wait: z18.boolean().optional(),
|
|
3464
|
+
yes: z18.boolean().optional(),
|
|
3465
|
+
volume: z18.string().optional()
|
|
3408
3466
|
}).strict();
|
|
3409
|
-
var
|
|
3467
|
+
var pageInput = z18.object({
|
|
3468
|
+
limit: z18.number().int().min(1).max(500).optional(),
|
|
3469
|
+
cursor: z18.string().optional()
|
|
3470
|
+
});
|
|
3471
|
+
var publicKeyInput = z18.object({
|
|
3472
|
+
publicKey: z18.string(),
|
|
3473
|
+
label: z18.string().optional(),
|
|
3474
|
+
confirm: z18.boolean().optional()
|
|
3475
|
+
});
|
|
3476
|
+
var keyIdInput = z18.object({ keyId: z18.string(), confirm: z18.boolean().optional() });
|
|
3477
|
+
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.";
|
|
3478
|
+
var keyListInput = z18.object({
|
|
3410
3479
|
$positionals: positionals2,
|
|
3411
|
-
cursor:
|
|
3412
|
-
limit:
|
|
3480
|
+
cursor: z18.string().optional(),
|
|
3481
|
+
limit: z18.coerce.number().int().min(1).max(500).optional()
|
|
3413
3482
|
}).strict();
|
|
3414
|
-
var keyMutationInput =
|
|
3483
|
+
var keyMutationInput = z18.object({
|
|
3415
3484
|
$positionals: positionals2,
|
|
3416
|
-
idempotencyKey:
|
|
3417
|
-
key:
|
|
3418
|
-
keyId:
|
|
3419
|
-
label:
|
|
3420
|
-
publicKey:
|
|
3421
|
-
publicKeyFile:
|
|
3422
|
-
yes:
|
|
3485
|
+
idempotencyKey: z18.string().optional(),
|
|
3486
|
+
key: z18.string().optional(),
|
|
3487
|
+
keyId: z18.string().optional(),
|
|
3488
|
+
label: z18.string().optional(),
|
|
3489
|
+
publicKey: z18.string().optional(),
|
|
3490
|
+
publicKeyFile: z18.string().optional(),
|
|
3491
|
+
yes: z18.boolean().optional()
|
|
3423
3492
|
}).strict();
|
|
3424
|
-
var machineListInput =
|
|
3493
|
+
var machineListInput = z18.object({
|
|
3425
3494
|
$positionals: positionals2,
|
|
3426
|
-
cursor:
|
|
3427
|
-
limit:
|
|
3495
|
+
cursor: z18.string().optional(),
|
|
3496
|
+
limit: z18.coerce.number().int().min(1).max(500).optional()
|
|
3428
3497
|
}).strict();
|
|
3429
|
-
var machineShowInput =
|
|
3498
|
+
var machineShowInput = z18.object({
|
|
3430
3499
|
$positionals: positionals2,
|
|
3431
|
-
guided:
|
|
3500
|
+
guided: z18.boolean().optional()
|
|
3432
3501
|
}).strict();
|
|
3433
|
-
var machineWaitInput =
|
|
3502
|
+
var machineWaitInput = z18.object({
|
|
3434
3503
|
$positionals: positionals2,
|
|
3435
|
-
guided:
|
|
3436
|
-
timeout:
|
|
3504
|
+
guided: z18.boolean().optional(),
|
|
3505
|
+
timeout: z18.string().optional()
|
|
3437
3506
|
}).strict();
|
|
3438
|
-
var machineSwitchInput =
|
|
3507
|
+
var machineSwitchInput = z18.object({
|
|
3439
3508
|
$positionals: positionals2,
|
|
3440
|
-
guided:
|
|
3441
|
-
eraseLocalData:
|
|
3442
|
-
idempotencyKey:
|
|
3443
|
-
mode:
|
|
3444
|
-
network:
|
|
3445
|
-
noWait:
|
|
3446
|
-
timeout:
|
|
3447
|
-
wait:
|
|
3448
|
-
yes:
|
|
3509
|
+
guided: z18.boolean().optional(),
|
|
3510
|
+
eraseLocalData: z18.boolean().optional(),
|
|
3511
|
+
idempotencyKey: z18.string().optional(),
|
|
3512
|
+
mode: z18.string().optional(),
|
|
3513
|
+
network: z18.string().optional(),
|
|
3514
|
+
noWait: z18.boolean().optional(),
|
|
3515
|
+
timeout: z18.string().optional(),
|
|
3516
|
+
wait: z18.boolean().optional(),
|
|
3517
|
+
yes: z18.boolean().optional()
|
|
3449
3518
|
}).strict();
|
|
3450
|
-
var machineMaintenanceInput =
|
|
3519
|
+
var machineMaintenanceInput = z18.object({
|
|
3451
3520
|
$positionals: positionals2,
|
|
3452
|
-
eraseLocalData:
|
|
3453
|
-
guided:
|
|
3454
|
-
idempotencyKey:
|
|
3455
|
-
noWait:
|
|
3456
|
-
timeout:
|
|
3457
|
-
wait:
|
|
3458
|
-
yes:
|
|
3521
|
+
eraseLocalData: z18.boolean().optional(),
|
|
3522
|
+
guided: z18.boolean().optional(),
|
|
3523
|
+
idempotencyKey: z18.string().optional(),
|
|
3524
|
+
noWait: z18.boolean().optional(),
|
|
3525
|
+
timeout: z18.string().optional(),
|
|
3526
|
+
wait: z18.boolean().optional(),
|
|
3527
|
+
yes: z18.boolean().optional()
|
|
3459
3528
|
}).strict();
|
|
3460
3529
|
function runtime(context) {
|
|
3461
3530
|
const interaction = context.cli?.interaction;
|
|
@@ -3692,15 +3761,19 @@ var machineResetCapability = cliOnly({
|
|
|
3692
3761
|
},
|
|
3693
3762
|
execute: executeMachines("reset")
|
|
3694
3763
|
});
|
|
3695
|
-
var sshKeyListCapability =
|
|
3764
|
+
var sshKeyListCapability = defineCapability({
|
|
3696
3765
|
id: "access.ssh_keys.list",
|
|
3697
3766
|
domain: "access",
|
|
3698
3767
|
roles: ["user"],
|
|
3699
3768
|
mutation: "read",
|
|
3700
|
-
input:
|
|
3701
|
-
description: "List
|
|
3769
|
+
input: pageInput.extend({ status: z18.enum(["active", "all"]).optional() }),
|
|
3770
|
+
description: "List a page of account SSH keys. Pass next_cursor as cursor to continue.",
|
|
3771
|
+
mcp: { name: "ssh_keys_list", input: pageInput },
|
|
3772
|
+
slack: false,
|
|
3702
3773
|
cli: {
|
|
3703
3774
|
command: ["ssh-keys", "list"],
|
|
3775
|
+
input: keyListInput,
|
|
3776
|
+
execute: executeSshKeys("list"),
|
|
3704
3777
|
vnext: {
|
|
3705
3778
|
arguments: "semantic",
|
|
3706
3779
|
audience: "customer",
|
|
@@ -3713,17 +3786,28 @@ var sshKeyListCapability = cliOnly({
|
|
|
3713
3786
|
related: ["ssh-keys add", "ssh-keys assignments list"]
|
|
3714
3787
|
}
|
|
3715
3788
|
},
|
|
3716
|
-
execute:
|
|
3789
|
+
execute: (context, input) => listAccountSshKeys(context.fetch, {
|
|
3790
|
+
status: input.status ?? "all",
|
|
3791
|
+
limit: input.limit ?? 25,
|
|
3792
|
+
...input.cursor ? { cursor: input.cursor } : {}
|
|
3793
|
+
})
|
|
3717
3794
|
});
|
|
3718
|
-
var sshKeyAddCapability =
|
|
3795
|
+
var sshKeyAddCapability = defineCapability({
|
|
3719
3796
|
id: "access.ssh_keys.add",
|
|
3720
3797
|
domain: "access",
|
|
3721
3798
|
roles: ["user"],
|
|
3722
3799
|
mutation: "preview-confirm",
|
|
3723
|
-
input:
|
|
3724
|
-
|
|
3800
|
+
input: publicKeyInput.extend({
|
|
3801
|
+
label: z18.string().nullable().optional(),
|
|
3802
|
+
idempotencyKey: z18.string().optional()
|
|
3803
|
+
}),
|
|
3804
|
+
description: `Add an SSH public key to the account. ${ADDED_KEY_OUTCOME}`,
|
|
3805
|
+
mcp: { name: "ssh_keys_add", input: publicKeyInput },
|
|
3806
|
+
slack: false,
|
|
3725
3807
|
cli: {
|
|
3726
3808
|
command: ["ssh-keys", "add"],
|
|
3809
|
+
input: keyMutationInput,
|
|
3810
|
+
execute: executeSshKeys("add"),
|
|
3727
3811
|
vnext: {
|
|
3728
3812
|
arguments: "semantic",
|
|
3729
3813
|
audience: "customer",
|
|
@@ -3737,17 +3821,21 @@ var sshKeyAddCapability = cliOnly({
|
|
|
3737
3821
|
related: ["ssh-keys list", "ssh-keys assignments assign"]
|
|
3738
3822
|
}
|
|
3739
3823
|
},
|
|
3740
|
-
execute:
|
|
3824
|
+
execute: (context, input) => createAccountSshKey(context.fetch, { public_key: input.publicKey, label: input.label }, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0)
|
|
3741
3825
|
});
|
|
3742
|
-
var sshKeyDeleteCapability =
|
|
3826
|
+
var sshKeyDeleteCapability = defineCapability({
|
|
3743
3827
|
id: "access.ssh_keys.delete",
|
|
3744
3828
|
domain: "access",
|
|
3745
3829
|
roles: ["user"],
|
|
3746
3830
|
mutation: "preview-confirm",
|
|
3747
|
-
input:
|
|
3748
|
-
description: "Delete
|
|
3831
|
+
input: keyIdInput.extend({ idempotencyKey: z18.string().optional() }),
|
|
3832
|
+
description: "Delete an SSH key from the account.",
|
|
3833
|
+
mcp: { name: "ssh_keys_delete", input: keyIdInput },
|
|
3834
|
+
slack: false,
|
|
3749
3835
|
cli: {
|
|
3750
3836
|
command: ["ssh-keys", "delete"],
|
|
3837
|
+
input: keyMutationInput,
|
|
3838
|
+
execute: executeSshKeys("delete"),
|
|
3751
3839
|
vnext: {
|
|
3752
3840
|
arguments: "semantic",
|
|
3753
3841
|
audience: "customer",
|
|
@@ -3765,7 +3853,7 @@ var sshKeyDeleteCapability = cliOnly({
|
|
|
3765
3853
|
related: ["ssh-keys list"]
|
|
3766
3854
|
}
|
|
3767
3855
|
},
|
|
3768
|
-
execute:
|
|
3856
|
+
execute: async (context, input) => await deleteAccountSshKey(context.fetch, input.keyId, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0) ?? { deleted: true }
|
|
3769
3857
|
});
|
|
3770
3858
|
var sshKeyAssignmentListCapability = cliOnly({
|
|
3771
3859
|
id: "access.ssh_key_assignments.list",
|
|
@@ -3844,15 +3932,19 @@ var sshKeyAssignmentSyncCapability = cliOnly({
|
|
|
3844
3932
|
},
|
|
3845
3933
|
execute: executeSshKeys("assignments.sync")
|
|
3846
3934
|
});
|
|
3847
|
-
var sshKeyAssignmentStatusCapability =
|
|
3935
|
+
var sshKeyAssignmentStatusCapability = defineCapability({
|
|
3848
3936
|
id: "access.ssh_key_assignments.status",
|
|
3849
3937
|
domain: "access",
|
|
3850
3938
|
roles: ["user"],
|
|
3851
3939
|
mutation: "read",
|
|
3852
|
-
input:
|
|
3853
|
-
description: "Show
|
|
3940
|
+
input: z18.object({ reservationId: z18.string() }),
|
|
3941
|
+
description: "Show SSH key push status per machine for a reservation.",
|
|
3942
|
+
mcp: { name: "access_keys_status" },
|
|
3943
|
+
slack: false,
|
|
3854
3944
|
cli: {
|
|
3855
3945
|
command: ["ssh-keys", "assignments", "status"],
|
|
3946
|
+
input: keyListInput,
|
|
3947
|
+
execute: executeSshKeys("assignments.status"),
|
|
3856
3948
|
vnext: {
|
|
3857
3949
|
arguments: "semantic",
|
|
3858
3950
|
audience: "customer",
|
|
@@ -3866,7 +3958,7 @@ var sshKeyAssignmentStatusCapability = cliOnly({
|
|
|
3866
3958
|
related: ["ssh-keys assignments sync", "connect"]
|
|
3867
3959
|
}
|
|
3868
3960
|
},
|
|
3869
|
-
execute:
|
|
3961
|
+
execute: (context, input) => reservationKeyStatus(context, input.reservationId)
|
|
3870
3962
|
});
|
|
3871
3963
|
var computeCapabilities = [
|
|
3872
3964
|
launchCapability,
|
|
@@ -3884,18 +3976,7 @@ var computeCapabilities = [
|
|
|
3884
3976
|
sshKeyAssignmentSyncCapability,
|
|
3885
3977
|
sshKeyAssignmentStatusCapability
|
|
3886
3978
|
];
|
|
3887
|
-
var
|
|
3888
|
-
limit: z17.number().int().min(1).max(500).optional(),
|
|
3889
|
-
cursor: z17.string().optional()
|
|
3890
|
-
});
|
|
3891
|
-
var publicKeyInput = z17.object({
|
|
3892
|
-
publicKey: z17.string(),
|
|
3893
|
-
label: z17.string().optional(),
|
|
3894
|
-
confirm: z17.boolean().optional()
|
|
3895
|
-
});
|
|
3896
|
-
var keyIdInput = z17.object({ keyId: z17.string(), confirm: z17.boolean().optional() });
|
|
3897
|
-
var nodeIdInput = z17.object({ nodeId: z17.string(), confirm: z17.boolean().optional() });
|
|
3898
|
-
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.";
|
|
3979
|
+
var nodeIdInput = z18.object({ nodeId: z18.string(), confirm: z18.boolean().optional() });
|
|
3899
3980
|
function rebootMachine(mode) {
|
|
3900
3981
|
return (ctx, input) => rebootNode(ctx.fetch, input.nodeId, { mode });
|
|
3901
3982
|
}
|
|
@@ -3906,7 +3987,7 @@ var accessVerbCapabilities = [
|
|
|
3906
3987
|
roles: ["user"],
|
|
3907
3988
|
description: "Show VM and Bare Metal SSH access machines for a reservation.",
|
|
3908
3989
|
mutation: "read",
|
|
3909
|
-
input:
|
|
3990
|
+
input: z18.object({ reservationId: z18.string() }),
|
|
3910
3991
|
slack: false,
|
|
3911
3992
|
execute: (ctx, input) => listNodes(ctx.fetch, { reservation_id: input.reservationId })
|
|
3912
3993
|
}),
|
|
@@ -3916,18 +3997,18 @@ var accessVerbCapabilities = [
|
|
|
3916
3997
|
roles: ["user"],
|
|
3917
3998
|
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.",
|
|
3918
3999
|
mutation: "preview-confirm",
|
|
3919
|
-
input:
|
|
3920
|
-
reservationId:
|
|
3921
|
-
sshKeyIds:
|
|
3922
|
-
username:
|
|
3923
|
-
machineCount:
|
|
3924
|
-
requestId:
|
|
3925
|
-
accessMode:
|
|
3926
|
-
networkMode:
|
|
3927
|
-
diskId:
|
|
3928
|
-
storageLoadDriveId:
|
|
3929
|
-
storageSaveDriveId:
|
|
3930
|
-
confirm:
|
|
4000
|
+
input: z18.object({
|
|
4001
|
+
reservationId: z18.string(),
|
|
4002
|
+
sshKeyIds: z18.array(z18.string()).min(1),
|
|
4003
|
+
username: z18.string().optional(),
|
|
4004
|
+
machineCount: z18.number().int().positive().optional(),
|
|
4005
|
+
requestId: z18.string().optional(),
|
|
4006
|
+
accessMode: z18.enum(["bare-metal", "vm"]).optional(),
|
|
4007
|
+
networkMode: z18.enum(["public", "private"]).optional(),
|
|
4008
|
+
diskId: z18.string().optional(),
|
|
4009
|
+
storageLoadDriveId: z18.string().optional(),
|
|
4010
|
+
storageSaveDriveId: z18.string().optional(),
|
|
4011
|
+
confirm: z18.boolean().optional()
|
|
3931
4012
|
}),
|
|
3932
4013
|
slack: false,
|
|
3933
4014
|
// Without disk_id the orchestrator boots "virtual-machine" from the
|
|
@@ -3949,14 +4030,14 @@ var accessVerbCapabilities = [
|
|
|
3949
4030
|
roles: ["user"],
|
|
3950
4031
|
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.",
|
|
3951
4032
|
mutation: "preview-confirm",
|
|
3952
|
-
input:
|
|
3953
|
-
reservationId:
|
|
3954
|
-
networkMode:
|
|
3955
|
-
sshKeyIds:
|
|
3956
|
-
accessMode:
|
|
3957
|
-
username:
|
|
3958
|
-
requestId:
|
|
3959
|
-
confirm:
|
|
4033
|
+
input: z18.object({
|
|
4034
|
+
reservationId: z18.string(),
|
|
4035
|
+
networkMode: z18.enum(["public", "private"]),
|
|
4036
|
+
sshKeyIds: z18.array(z18.string()).min(1),
|
|
4037
|
+
accessMode: z18.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
4038
|
+
username: z18.string().optional(),
|
|
4039
|
+
requestId: z18.string().regex(/\S/),
|
|
4040
|
+
confirm: z18.boolean().optional()
|
|
3960
4041
|
}),
|
|
3961
4042
|
slack: false,
|
|
3962
4043
|
execute: (ctx, input) => switchReservationAccess(ctx.fetch, input.reservationId, {
|
|
@@ -3972,7 +4053,7 @@ var accessVerbCapabilities = [
|
|
|
3972
4053
|
roles: ["user"],
|
|
3973
4054
|
description: "List SSH keys registered for a reservation.",
|
|
3974
4055
|
mutation: "read",
|
|
3975
|
-
input:
|
|
4056
|
+
input: z18.object({ reservationId: z18.string() }),
|
|
3976
4057
|
slack: false,
|
|
3977
4058
|
execute: (ctx, input) => listReservationSshKeys(ctx.fetch, input.reservationId)
|
|
3978
4059
|
}),
|
|
@@ -3982,7 +4063,7 @@ var accessVerbCapabilities = [
|
|
|
3982
4063
|
roles: ["user"],
|
|
3983
4064
|
description: `Add an SSH key to a reservation. ${ADDED_KEY_OUTCOME}`,
|
|
3984
4065
|
mutation: "preview-confirm",
|
|
3985
|
-
input: publicKeyInput.extend({ reservationId:
|
|
4066
|
+
input: publicKeyInput.extend({ reservationId: z18.string() }),
|
|
3986
4067
|
slack: false,
|
|
3987
4068
|
execute: (ctx, input) => addReservationSshKey(ctx.fetch, input.reservationId, {
|
|
3988
4069
|
label: input.label ?? null,
|
|
@@ -4011,43 +4092,6 @@ var accessVerbCapabilities = [
|
|
|
4011
4092
|
slack: false,
|
|
4012
4093
|
execute: rebootMachine("hard_reset")
|
|
4013
4094
|
}),
|
|
4014
|
-
defineCapability({
|
|
4015
|
-
id: "ssh_keys.list",
|
|
4016
|
-
domain: "access",
|
|
4017
|
-
roles: ["user"],
|
|
4018
|
-
description: "List a page of account SSH keys. Pass next_cursor as cursor to continue.",
|
|
4019
|
-
mutation: "read",
|
|
4020
|
-
input: pageInput,
|
|
4021
|
-
slack: false,
|
|
4022
|
-
execute: (ctx, input) => listAccountSshKeys(ctx.fetch, {
|
|
4023
|
-
status: "all",
|
|
4024
|
-
limit: input.limit ?? 25,
|
|
4025
|
-
...input.cursor ? { cursor: input.cursor } : {}
|
|
4026
|
-
})
|
|
4027
|
-
}),
|
|
4028
|
-
defineCapability({
|
|
4029
|
-
id: "ssh_keys.add",
|
|
4030
|
-
domain: "access",
|
|
4031
|
-
roles: ["user"],
|
|
4032
|
-
description: `Add an SSH public key to the account. ${ADDED_KEY_OUTCOME}`,
|
|
4033
|
-
mutation: "preview-confirm",
|
|
4034
|
-
input: publicKeyInput,
|
|
4035
|
-
slack: false,
|
|
4036
|
-
execute: (ctx, input) => createAccountSshKey(ctx.fetch, {
|
|
4037
|
-
public_key: input.publicKey,
|
|
4038
|
-
label: input.label
|
|
4039
|
-
})
|
|
4040
|
-
}),
|
|
4041
|
-
defineCapability({
|
|
4042
|
-
id: "ssh_keys.delete",
|
|
4043
|
-
domain: "access",
|
|
4044
|
-
roles: ["user"],
|
|
4045
|
-
description: "Delete an SSH key from the account.",
|
|
4046
|
-
mutation: "preview-confirm",
|
|
4047
|
-
input: keyIdInput,
|
|
4048
|
-
slack: false,
|
|
4049
|
-
execute: async (ctx, input) => await deleteAccountSshKey(ctx.fetch, input.keyId) ?? { deleted: true }
|
|
4050
|
-
}),
|
|
4051
4095
|
defineCapability({
|
|
4052
4096
|
id: "cluster_users.list",
|
|
4053
4097
|
domain: "access",
|
|
@@ -4086,35 +4130,16 @@ var accessVerbCapabilities = [
|
|
|
4086
4130
|
execute: async (ctx, input) => await deleteClusterUserKey(ctx.fetch, input.keyId) ?? { deleted: true }
|
|
4087
4131
|
})
|
|
4088
4132
|
];
|
|
4089
|
-
var machinePushKeysCapability = defineCapability({
|
|
4090
|
-
id: "machine.push_keys",
|
|
4091
|
-
domain: "access",
|
|
4092
|
-
roles: ["user"],
|
|
4093
|
-
description: "Push SSH keys onto one reservation machine.",
|
|
4094
|
-
mutation: "preview-confirm",
|
|
4095
|
-
input: z17.object({
|
|
4096
|
-
nodeId: z17.string(),
|
|
4097
|
-
sshKeyIds: z17.array(z17.string()).min(1),
|
|
4098
|
-
requestId: z17.string(),
|
|
4099
|
-
confirm: z17.boolean().optional()
|
|
4100
|
-
}),
|
|
4101
|
-
mcp: false,
|
|
4102
|
-
slack: false,
|
|
4103
|
-
execute: (ctx, input) => pushNodeKeys(ctx.fetch, input.nodeId, {
|
|
4104
|
-
request_id: input.requestId,
|
|
4105
|
-
ssh_key_ids: input.sshKeyIds
|
|
4106
|
-
})
|
|
4107
|
-
});
|
|
4108
4133
|
|
|
4109
4134
|
// ../../packages/capabilities/dist/capabilities/credits.js
|
|
4110
|
-
import { z as
|
|
4111
|
-
var creditGrantInput =
|
|
4112
|
-
organizationId:
|
|
4113
|
-
adjustmentId:
|
|
4114
|
-
amountCents:
|
|
4115
|
-
direction:
|
|
4116
|
-
note:
|
|
4117
|
-
confirm:
|
|
4135
|
+
import { z as z19 } from "zod";
|
|
4136
|
+
var creditGrantInput = z19.object({
|
|
4137
|
+
organizationId: z19.uuid().describe("Customer organization UUID. Resolve names or emails with organization_list; ask which organization if matches are ambiguous."),
|
|
4138
|
+
adjustmentId: z19.uuid().describe("The credit-adjustment API's required grant UUID. Keep the same UUID when confirming this grant."),
|
|
4139
|
+
amountCents: z19.number().int().min(1).max(1e8).describe("USD cents: 10000 grants $100.00."),
|
|
4140
|
+
direction: z19.enum(["credit", "debit"]).optional().describe("credit adds funds (default); debit removes funds. Choose explicitly for a debit."),
|
|
4141
|
+
note: z19.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."),
|
|
4142
|
+
confirm: z19.boolean().optional()
|
|
4118
4143
|
});
|
|
4119
4144
|
var creditGrantCapability = defineCapability({
|
|
4120
4145
|
id: "credits.grant",
|
|
@@ -4175,20 +4200,20 @@ var creditGrantCapability = defineCapability({
|
|
|
4175
4200
|
});
|
|
4176
4201
|
|
|
4177
4202
|
// ../../packages/capabilities/dist/capabilities/cli.js
|
|
4178
|
-
import { z as
|
|
4179
|
-
var emptyInput2 =
|
|
4203
|
+
import { z as z20 } from "zod";
|
|
4204
|
+
var emptyInput2 = z20.object({});
|
|
4180
4205
|
function requireCliRuntime(context) {
|
|
4181
4206
|
if (!context.cli) {
|
|
4182
4207
|
throw new Error("This capability must execute through the Ornn CLI runtime.");
|
|
4183
4208
|
}
|
|
4184
4209
|
return context.cli;
|
|
4185
4210
|
}
|
|
4186
|
-
var updateInput =
|
|
4187
|
-
$positionals:
|
|
4188
|
-
major:
|
|
4211
|
+
var updateInput = z20.object({
|
|
4212
|
+
$positionals: z20.array(z20.string()).max(0).default([]),
|
|
4213
|
+
major: z20.boolean().optional()
|
|
4189
4214
|
});
|
|
4190
|
-
var completionInput =
|
|
4191
|
-
$positionals:
|
|
4215
|
+
var completionInput = z20.object({
|
|
4216
|
+
$positionals: z20.tuple([z20.enum(["bash", "fish", "zsh"])])
|
|
4192
4217
|
}).transform(({ $positionals }) => ({ shell: $positionals[0] }));
|
|
4193
4218
|
var versionCapability = defineCapability({
|
|
4194
4219
|
id: "cli.version",
|
|
@@ -4329,23 +4354,23 @@ var cliShellCapabilities = [
|
|
|
4329
4354
|
];
|
|
4330
4355
|
|
|
4331
4356
|
// ../../packages/capabilities/dist/capabilities/clusters.js
|
|
4332
|
-
import { z as
|
|
4333
|
-
var clusterCliInput =
|
|
4334
|
-
$positionals:
|
|
4335
|
-
cursor:
|
|
4336
|
-
guided:
|
|
4337
|
-
idempotencyKey:
|
|
4338
|
-
limit:
|
|
4339
|
-
machine:
|
|
4340
|
-
machines:
|
|
4341
|
-
network:
|
|
4342
|
-
noWait:
|
|
4343
|
-
nodes:
|
|
4344
|
-
output:
|
|
4345
|
-
overwrite:
|
|
4346
|
-
timeout:
|
|
4347
|
-
wait:
|
|
4348
|
-
yes:
|
|
4357
|
+
import { z as z21 } from "zod";
|
|
4358
|
+
var clusterCliInput = z21.object({
|
|
4359
|
+
$positionals: z21.array(z21.string()).optional(),
|
|
4360
|
+
cursor: z21.string().optional(),
|
|
4361
|
+
guided: z21.boolean().optional(),
|
|
4362
|
+
idempotencyKey: z21.string().optional(),
|
|
4363
|
+
limit: z21.union([z21.string(), z21.number()]).optional(),
|
|
4364
|
+
machine: z21.string().optional(),
|
|
4365
|
+
machines: z21.string().optional(),
|
|
4366
|
+
network: z21.enum(["public", "private"]).optional(),
|
|
4367
|
+
noWait: z21.boolean().optional(),
|
|
4368
|
+
nodes: z21.union([z21.string(), z21.number()]).optional(),
|
|
4369
|
+
output: z21.string().optional(),
|
|
4370
|
+
overwrite: z21.boolean().optional(),
|
|
4371
|
+
timeout: z21.string().optional(),
|
|
4372
|
+
wait: z21.boolean().optional(),
|
|
4373
|
+
yes: z21.boolean().optional()
|
|
4349
4374
|
}).strict();
|
|
4350
4375
|
function clusterExecutor(context) {
|
|
4351
4376
|
const runtime3 = context.cli?.interaction;
|
|
@@ -4473,12 +4498,12 @@ var clusterCliCapabilities = [
|
|
|
4473
4498
|
related: ["clusters show", "reservations show"]
|
|
4474
4499
|
})
|
|
4475
4500
|
];
|
|
4476
|
-
var clusterType =
|
|
4477
|
-
var reservationCluster =
|
|
4478
|
-
var controllerNode =
|
|
4479
|
-
controllerId:
|
|
4480
|
-
nodeId:
|
|
4481
|
-
confirm:
|
|
4501
|
+
var clusterType = z21.enum(["kubernetes", "slurm"]);
|
|
4502
|
+
var reservationCluster = z21.object({ reservationId: z21.string(), type: clusterType });
|
|
4503
|
+
var controllerNode = z21.object({
|
|
4504
|
+
controllerId: z21.string(),
|
|
4505
|
+
nodeId: z21.string(),
|
|
4506
|
+
confirm: z21.boolean().optional()
|
|
4482
4507
|
});
|
|
4483
4508
|
var clusterCapabilities = [
|
|
4484
4509
|
defineCapability({
|
|
@@ -4487,7 +4512,7 @@ var clusterCapabilities = [
|
|
|
4487
4512
|
roles: ["user"],
|
|
4488
4513
|
description: "List this tenant's kubernetes/slurm clusters.",
|
|
4489
4514
|
mutation: "read",
|
|
4490
|
-
input:
|
|
4515
|
+
input: z21.object({}),
|
|
4491
4516
|
mcp: { name: "clusters_list" },
|
|
4492
4517
|
slack: false,
|
|
4493
4518
|
execute: (ctx) => listClusters(ctx.fetch)
|
|
@@ -4498,8 +4523,8 @@ var clusterCapabilities = [
|
|
|
4498
4523
|
roles: ["user"],
|
|
4499
4524
|
description: "List active reservations eligible for cluster creation (kubernetes/slurm), 100 per page. Pass the response's nextCursor as cursor for the next page.",
|
|
4500
4525
|
mutation: "read",
|
|
4501
|
-
input:
|
|
4502
|
-
cursor:
|
|
4526
|
+
input: z21.object({
|
|
4527
|
+
cursor: z21.string().min(1).optional().describe("nextCursor from the previous page.")
|
|
4503
4528
|
}),
|
|
4504
4529
|
mcp: { name: "clusters_reservations_list" },
|
|
4505
4530
|
slack: false,
|
|
@@ -4514,13 +4539,13 @@ var clusterCapabilities = [
|
|
|
4514
4539
|
roles: ["user"],
|
|
4515
4540
|
description: "Launch a kubernetes or slurm cluster on a reservation.",
|
|
4516
4541
|
mutation: "preview-confirm",
|
|
4517
|
-
input:
|
|
4518
|
-
reservationId:
|
|
4542
|
+
input: z21.object({
|
|
4543
|
+
reservationId: z21.string(),
|
|
4519
4544
|
type: clusterType,
|
|
4520
|
-
networkMode:
|
|
4521
|
-
nodeIds:
|
|
4522
|
-
nodeCount:
|
|
4523
|
-
confirm:
|
|
4545
|
+
networkMode: z21.enum(["public", "private"]).optional(),
|
|
4546
|
+
nodeIds: z21.array(z21.string()).optional(),
|
|
4547
|
+
nodeCount: z21.number().int().positive().optional(),
|
|
4548
|
+
confirm: z21.boolean().optional()
|
|
4524
4549
|
}).strict(),
|
|
4525
4550
|
mcp: { name: "clusters_create" },
|
|
4526
4551
|
slack: false,
|
|
@@ -4560,7 +4585,7 @@ var clusterCapabilities = [
|
|
|
4560
4585
|
roles: ["user"],
|
|
4561
4586
|
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.",
|
|
4562
4587
|
mutation: "read",
|
|
4563
|
-
input:
|
|
4588
|
+
input: z21.object({ reservationId: z21.string() }),
|
|
4564
4589
|
mcp: { name: "clusters_kubeconfig" },
|
|
4565
4590
|
slack: false,
|
|
4566
4591
|
execute: async (ctx, input) => {
|
|
@@ -4599,7 +4624,7 @@ var clusterCapabilities = [
|
|
|
4599
4624
|
roles: ["user"],
|
|
4600
4625
|
description: "Tear down a kubernetes or slurm cluster on a reservation.",
|
|
4601
4626
|
mutation: "preview-confirm",
|
|
4602
|
-
input: reservationCluster.extend({ confirm:
|
|
4627
|
+
input: reservationCluster.extend({ confirm: z21.boolean().optional() }),
|
|
4603
4628
|
mcp: { name: "clusters_teardown" },
|
|
4604
4629
|
slack: false,
|
|
4605
4630
|
execute: (ctx, input) => teardownReservationCluster(ctx.fetch, input.type, input.reservationId)
|
|
@@ -4607,55 +4632,55 @@ var clusterCapabilities = [
|
|
|
4607
4632
|
];
|
|
4608
4633
|
|
|
4609
4634
|
// ../../packages/capabilities/dist/capabilities/external-buckets.js
|
|
4610
|
-
import { z as
|
|
4611
|
-
var pageInput2 =
|
|
4612
|
-
$positionals:
|
|
4613
|
-
cursor:
|
|
4614
|
-
limit:
|
|
4635
|
+
import { z as z22 } from "zod";
|
|
4636
|
+
var pageInput2 = z22.object({
|
|
4637
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4638
|
+
cursor: z22.string().optional(),
|
|
4639
|
+
limit: z22.union([z22.string(), z22.number()]).optional()
|
|
4615
4640
|
}).strict();
|
|
4616
|
-
var showInput =
|
|
4617
|
-
$positionals:
|
|
4641
|
+
var showInput = z22.object({
|
|
4642
|
+
$positionals: z22.array(z22.string()).optional()
|
|
4618
4643
|
}).strict();
|
|
4619
|
-
var verificationInput =
|
|
4620
|
-
$positionals:
|
|
4621
|
-
idempotencyKey:
|
|
4644
|
+
var verificationInput = z22.object({
|
|
4645
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4646
|
+
idempotencyKey: z22.string().optional()
|
|
4622
4647
|
}).strict();
|
|
4623
|
-
var disconnectInput =
|
|
4624
|
-
$positionals:
|
|
4625
|
-
idempotencyKey:
|
|
4626
|
-
yes:
|
|
4648
|
+
var disconnectInput = z22.object({
|
|
4649
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4650
|
+
idempotencyKey: z22.string().optional(),
|
|
4651
|
+
yes: z22.boolean().optional()
|
|
4627
4652
|
}).strict();
|
|
4628
|
-
var connectInput =
|
|
4629
|
-
$positionals:
|
|
4630
|
-
accessKeyId:
|
|
4631
|
-
accountId:
|
|
4632
|
-
bucket:
|
|
4633
|
-
endpointUrl:
|
|
4634
|
-
idempotencyKey:
|
|
4635
|
-
name:
|
|
4636
|
-
prefix:
|
|
4637
|
-
readOnly:
|
|
4638
|
-
readWrite:
|
|
4639
|
-
region:
|
|
4640
|
-
secretAccessKeyFile:
|
|
4641
|
-
url:
|
|
4642
|
-
yes:
|
|
4653
|
+
var connectInput = z22.object({
|
|
4654
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4655
|
+
accessKeyId: z22.string().optional(),
|
|
4656
|
+
accountId: z22.string().optional(),
|
|
4657
|
+
bucket: z22.string().optional(),
|
|
4658
|
+
endpointUrl: z22.string().optional(),
|
|
4659
|
+
idempotencyKey: z22.string().optional(),
|
|
4660
|
+
name: z22.string().optional(),
|
|
4661
|
+
prefix: z22.string().optional(),
|
|
4662
|
+
readOnly: z22.boolean().optional(),
|
|
4663
|
+
readWrite: z22.boolean().optional(),
|
|
4664
|
+
region: z22.string().optional(),
|
|
4665
|
+
secretAccessKeyFile: z22.string().optional(),
|
|
4666
|
+
url: z22.string().optional(),
|
|
4667
|
+
yes: z22.boolean().optional()
|
|
4643
4668
|
}).strict();
|
|
4644
|
-
var credentialInput =
|
|
4645
|
-
$positionals:
|
|
4646
|
-
accessKeyId:
|
|
4647
|
-
idempotencyKey:
|
|
4648
|
-
secretAccessKeyFile:
|
|
4649
|
-
yes:
|
|
4669
|
+
var credentialInput = z22.object({
|
|
4670
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4671
|
+
accessKeyId: z22.string().optional(),
|
|
4672
|
+
idempotencyKey: z22.string().optional(),
|
|
4673
|
+
secretAccessKeyFile: z22.string().optional(),
|
|
4674
|
+
yes: z22.boolean().optional()
|
|
4650
4675
|
}).strict();
|
|
4651
|
-
var importInput =
|
|
4652
|
-
$positionals:
|
|
4653
|
-
idempotencyKey:
|
|
4654
|
-
noWait:
|
|
4655
|
-
reservation:
|
|
4656
|
-
timeout:
|
|
4657
|
-
wait:
|
|
4658
|
-
yes:
|
|
4676
|
+
var importInput = z22.object({
|
|
4677
|
+
$positionals: z22.array(z22.string()).optional(),
|
|
4678
|
+
idempotencyKey: z22.string().optional(),
|
|
4679
|
+
noWait: z22.boolean().optional(),
|
|
4680
|
+
reservation: z22.string().optional(),
|
|
4681
|
+
timeout: z22.string().optional(),
|
|
4682
|
+
wait: z22.boolean().optional(),
|
|
4683
|
+
yes: z22.boolean().optional()
|
|
4659
4684
|
}).strict();
|
|
4660
4685
|
function externalBucketExecutor(context) {
|
|
4661
4686
|
const interaction = context.cli?.interaction;
|
|
@@ -4699,16 +4724,16 @@ function isExternalBucket(drive) {
|
|
|
4699
4724
|
return false;
|
|
4700
4725
|
return ["external_gcs", "s3", "r2", "cloudflare_r2"].includes(source.provider ?? "") || Boolean(source.bucket);
|
|
4701
4726
|
}
|
|
4702
|
-
var bucketInput =
|
|
4727
|
+
var bucketInput = z22.object({ driveId: z22.string() });
|
|
4703
4728
|
var bucketListCapability = defineCapability({
|
|
4704
4729
|
id: "storage.external-buckets.list",
|
|
4705
4730
|
domain: "storage",
|
|
4706
4731
|
roles: ["user"],
|
|
4707
4732
|
description: "List a page of connected external buckets. Pass next_cursor as cursor to continue.",
|
|
4708
4733
|
mutation: "read",
|
|
4709
|
-
input:
|
|
4710
|
-
limit:
|
|
4711
|
-
cursor:
|
|
4734
|
+
input: z22.object({
|
|
4735
|
+
limit: z22.number().int().min(1).max(100).optional(),
|
|
4736
|
+
cursor: z22.string().optional()
|
|
4712
4737
|
}),
|
|
4713
4738
|
mcp: { name: "storage_buckets_list" },
|
|
4714
4739
|
slack: false,
|
|
@@ -4862,22 +4887,22 @@ var externalBucketCapabilities = [
|
|
|
4862
4887
|
];
|
|
4863
4888
|
|
|
4864
4889
|
// ../../packages/capabilities/dist/capabilities/evidence.js
|
|
4865
|
-
import { z as
|
|
4866
|
-
var positionals3 =
|
|
4867
|
-
var evidenceInput =
|
|
4890
|
+
import { z as z23 } from "zod";
|
|
4891
|
+
var positionals3 = z23.array(z23.string()).default([]);
|
|
4892
|
+
var evidenceInput = z23.object({
|
|
4868
4893
|
$positionals: positionals3,
|
|
4869
|
-
before:
|
|
4870
|
-
count:
|
|
4871
|
-
cursor:
|
|
4872
|
-
end:
|
|
4873
|
-
follow:
|
|
4874
|
-
guided:
|
|
4875
|
-
interval:
|
|
4876
|
-
limit:
|
|
4877
|
-
maxPoints:
|
|
4878
|
-
start:
|
|
4879
|
-
stream:
|
|
4880
|
-
timeout:
|
|
4894
|
+
before: z23.string().optional(),
|
|
4895
|
+
count: z23.string().optional(),
|
|
4896
|
+
cursor: z23.string().optional(),
|
|
4897
|
+
end: z23.string().optional(),
|
|
4898
|
+
follow: z23.boolean().optional(),
|
|
4899
|
+
guided: z23.boolean().optional(),
|
|
4900
|
+
interval: z23.string().optional(),
|
|
4901
|
+
limit: z23.string().optional(),
|
|
4902
|
+
maxPoints: z23.string().optional(),
|
|
4903
|
+
start: z23.string().optional(),
|
|
4904
|
+
stream: z23.enum(["kernel", "serial"]).optional(),
|
|
4905
|
+
timeout: z23.string().optional()
|
|
4881
4906
|
}).strict();
|
|
4882
4907
|
function runtime2(context) {
|
|
4883
4908
|
const interaction = context.cli?.interaction;
|
|
@@ -5006,8 +5031,8 @@ var evidenceCapabilities = [
|
|
|
5006
5031
|
];
|
|
5007
5032
|
|
|
5008
5033
|
// ../../packages/capabilities/dist/capabilities/metrics.js
|
|
5009
|
-
import { z as
|
|
5010
|
-
var metricInput =
|
|
5034
|
+
import { z as z24 } from "zod";
|
|
5035
|
+
var metricInput = z24.object({ reservationId: z24.string(), machineId: z24.string().optional() });
|
|
5011
5036
|
async function nodeIds(context, input) {
|
|
5012
5037
|
if (input.machineId)
|
|
5013
5038
|
return [input.machineId];
|
|
@@ -5043,9 +5068,9 @@ var metricsHistoryCapability = defineCapability({
|
|
|
5043
5068
|
mutation: "read",
|
|
5044
5069
|
description: "Fetch historical telemetry for a reservation's machine over a time range. machineId is optional: omit it to use the first active machine on the reservation.",
|
|
5045
5070
|
input: metricInput.extend({
|
|
5046
|
-
start:
|
|
5047
|
-
end:
|
|
5048
|
-
maxPoints:
|
|
5071
|
+
start: z24.string().optional(),
|
|
5072
|
+
end: z24.string().optional(),
|
|
5073
|
+
maxPoints: z24.number().int().positive().optional()
|
|
5049
5074
|
}),
|
|
5050
5075
|
slack: false,
|
|
5051
5076
|
execute: async (context, input) => {
|
|
@@ -5061,18 +5086,18 @@ var metricsHistoryCapability = defineCapability({
|
|
|
5061
5086
|
var metricsCapabilities = [metricsSnapshotCapability, metricsHistoryCapability];
|
|
5062
5087
|
|
|
5063
5088
|
// ../../packages/capabilities/dist/capabilities/mounts.js
|
|
5064
|
-
import { z as
|
|
5065
|
-
var mountInput =
|
|
5066
|
-
$positionals:
|
|
5067
|
-
access:
|
|
5068
|
-
cursor:
|
|
5069
|
-
idempotencyKey:
|
|
5070
|
-
limit:
|
|
5071
|
-
noWait:
|
|
5072
|
-
timeout:
|
|
5073
|
-
volume:
|
|
5074
|
-
wait:
|
|
5075
|
-
yes:
|
|
5089
|
+
import { z as z25 } from "zod";
|
|
5090
|
+
var mountInput = z25.object({
|
|
5091
|
+
$positionals: z25.array(z25.string()).default([]),
|
|
5092
|
+
access: z25.string().optional(),
|
|
5093
|
+
cursor: z25.string().optional(),
|
|
5094
|
+
idempotencyKey: z25.string().optional(),
|
|
5095
|
+
limit: z25.union([z25.string(), z25.number()]).optional(),
|
|
5096
|
+
noWait: z25.boolean().optional(),
|
|
5097
|
+
timeout: z25.string().optional(),
|
|
5098
|
+
volume: z25.string().optional(),
|
|
5099
|
+
wait: z25.boolean().optional(),
|
|
5100
|
+
yes: z25.boolean().optional()
|
|
5076
5101
|
}).strict();
|
|
5077
5102
|
function mountExecutor(context) {
|
|
5078
5103
|
const interaction = context.cli?.interaction;
|
|
@@ -5181,13 +5206,13 @@ var mountCapabilities = [
|
|
|
5181
5206
|
];
|
|
5182
5207
|
|
|
5183
5208
|
// ../../packages/capabilities/dist/capabilities/identity.js
|
|
5184
|
-
import { z as
|
|
5185
|
-
var emptyInput3 =
|
|
5186
|
-
var loginInput =
|
|
5187
|
-
authBase:
|
|
5188
|
-
noBrowser:
|
|
5189
|
-
pollInterval:
|
|
5190
|
-
timeout:
|
|
5209
|
+
import { z as z26 } from "zod";
|
|
5210
|
+
var emptyInput3 = z26.object({});
|
|
5211
|
+
var loginInput = z26.object({
|
|
5212
|
+
authBase: z26.string().min(1).optional(),
|
|
5213
|
+
noBrowser: z26.boolean().optional(),
|
|
5214
|
+
pollInterval: z26.number().positive().optional(),
|
|
5215
|
+
timeout: z26.number().positive().optional()
|
|
5191
5216
|
});
|
|
5192
5217
|
function executeSession(context, command, input) {
|
|
5193
5218
|
if (!context.cli?.session) {
|
|
@@ -5306,50 +5331,50 @@ var identityCapabilities = [
|
|
|
5306
5331
|
];
|
|
5307
5332
|
|
|
5308
5333
|
// ../../packages/capabilities/dist/capabilities/listings.js
|
|
5309
|
-
import { z as
|
|
5310
|
-
var listingCreateInput =
|
|
5311
|
-
organizationId:
|
|
5312
|
-
organization_id:
|
|
5313
|
-
facilityId:
|
|
5314
|
-
facility_id:
|
|
5315
|
-
kind:
|
|
5316
|
-
gpu:
|
|
5317
|
-
cpu:
|
|
5318
|
-
site:
|
|
5319
|
-
fabric:
|
|
5320
|
-
min_nodes:
|
|
5321
|
-
starts_after:
|
|
5322
|
-
starts_before:
|
|
5323
|
-
ends_after:
|
|
5324
|
-
ends_before:
|
|
5325
|
-
gpu_type:
|
|
5326
|
-
node_model:
|
|
5327
|
-
fabric_type:
|
|
5328
|
-
node_count:
|
|
5329
|
-
gpus_per_node:
|
|
5330
|
-
cores_per_node:
|
|
5331
|
-
site_nickname:
|
|
5332
|
-
site_supplier:
|
|
5333
|
-
ram:
|
|
5334
|
-
storage:
|
|
5335
|
-
internet:
|
|
5336
|
-
network_hardware:
|
|
5337
|
-
available_start_at:
|
|
5338
|
-
available_end_at:
|
|
5339
|
-
available_from:
|
|
5340
|
-
available_to:
|
|
5341
|
-
buy_now_price_per_gpu_hour:
|
|
5342
|
-
deposit_percent:
|
|
5343
|
-
down_payment_cents:
|
|
5344
|
-
access_mode:
|
|
5345
|
-
state:
|
|
5346
|
-
price_omitted:
|
|
5347
|
-
announce:
|
|
5348
|
-
text:
|
|
5349
|
-
confirm:
|
|
5350
|
-
idempotencyKey:
|
|
5351
|
-
});
|
|
5352
|
-
var catalogTermsInput =
|
|
5334
|
+
import { z as z27 } from "zod";
|
|
5335
|
+
var listingCreateInput = z27.object({
|
|
5336
|
+
organizationId: z27.string().optional(),
|
|
5337
|
+
organization_id: z27.string().optional(),
|
|
5338
|
+
facilityId: z27.string().optional(),
|
|
5339
|
+
facility_id: z27.string().optional(),
|
|
5340
|
+
kind: z27.enum(["gpu", "cpu", "node", "link"]).optional(),
|
|
5341
|
+
gpu: z27.string().optional(),
|
|
5342
|
+
cpu: z27.string().optional(),
|
|
5343
|
+
site: z27.string().optional(),
|
|
5344
|
+
fabric: z27.string().optional(),
|
|
5345
|
+
min_nodes: z27.number().int().optional(),
|
|
5346
|
+
starts_after: z27.string().optional(),
|
|
5347
|
+
starts_before: z27.string().optional(),
|
|
5348
|
+
ends_after: z27.string().optional(),
|
|
5349
|
+
ends_before: z27.string().optional(),
|
|
5350
|
+
gpu_type: z27.string().optional(),
|
|
5351
|
+
node_model: z27.string().optional(),
|
|
5352
|
+
fabric_type: z27.string().optional(),
|
|
5353
|
+
node_count: z27.number().int().optional(),
|
|
5354
|
+
gpus_per_node: z27.number().int().optional(),
|
|
5355
|
+
cores_per_node: z27.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".'),
|
|
5356
|
+
site_nickname: z27.string().optional().describe("A state, city, address, or catalog region such as us-west-3."),
|
|
5357
|
+
site_supplier: z27.string().optional(),
|
|
5358
|
+
ram: z27.string().optional(),
|
|
5359
|
+
storage: z27.string().optional(),
|
|
5360
|
+
internet: z27.string().optional(),
|
|
5361
|
+
network_hardware: z27.string().optional(),
|
|
5362
|
+
available_start_at: z27.string().optional().describe("Start of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5363
|
+
available_end_at: z27.string().optional().describe("End of the availability window. YYYY-MM-DD or RFC3339."),
|
|
5364
|
+
available_from: z27.string().optional().describe("Alias for available_start_at."),
|
|
5365
|
+
available_to: z27.string().optional().describe("Alias for available_end_at."),
|
|
5366
|
+
buy_now_price_per_gpu_hour: z27.number().optional().describe("Price buyers pay, USD per GPU-hour (per vCPU-hour on CPU listings)."),
|
|
5367
|
+
deposit_percent: z27.number().optional(),
|
|
5368
|
+
down_payment_cents: z27.number().int().nonnegative().optional(),
|
|
5369
|
+
access_mode: z27.enum(["bare-metal", "virtual-machine"]).optional(),
|
|
5370
|
+
state: z27.enum(["available", "draft"]).optional(),
|
|
5371
|
+
price_omitted: z27.boolean().optional(),
|
|
5372
|
+
announce: z27.boolean().optional(),
|
|
5373
|
+
text: z27.string().optional(),
|
|
5374
|
+
confirm: z27.boolean().optional(),
|
|
5375
|
+
idempotencyKey: z27.string().min(1).max(200).optional()
|
|
5376
|
+
});
|
|
5377
|
+
var catalogTermsInput = z27.object({ kind: z27.enum(["gpu", "cpu", "node", "link"]).optional() });
|
|
5353
5378
|
var slackListingCreateParams = {
|
|
5354
5379
|
type: "object",
|
|
5355
5380
|
properties: {
|
|
@@ -5647,12 +5672,12 @@ var listingCapabilities = [
|
|
|
5647
5672
|
];
|
|
5648
5673
|
|
|
5649
5674
|
// ../../packages/capabilities/dist/capabilities/organization-invites.js
|
|
5650
|
-
import { z as
|
|
5651
|
-
var organizationInviteInput =
|
|
5652
|
-
organization_id:
|
|
5653
|
-
email:
|
|
5654
|
-
organization_role:
|
|
5655
|
-
send_email:
|
|
5675
|
+
import { z as z28 } from "zod";
|
|
5676
|
+
var organizationInviteInput = z28.object({
|
|
5677
|
+
organization_id: z28.uuid().optional(),
|
|
5678
|
+
email: z28.string().trim().toLowerCase().pipe(z28.email()),
|
|
5679
|
+
organization_role: z28.enum(["consumer", "supplier"]).optional(),
|
|
5680
|
+
send_email: z28.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
|
|
5656
5681
|
}).superRefine((input, ctx) => {
|
|
5657
5682
|
if (!input.organization_id && input.send_email === true) {
|
|
5658
5683
|
ctx.addIssue({
|
|
@@ -5712,33 +5737,33 @@ var organizationInviteCapability = defineCapability({
|
|
|
5712
5737
|
});
|
|
5713
5738
|
|
|
5714
5739
|
// ../../packages/capabilities/dist/capabilities/networks.js
|
|
5715
|
-
import { z as
|
|
5740
|
+
import { z as z29 } from "zod";
|
|
5716
5741
|
var globalInput = {
|
|
5717
|
-
$positionals:
|
|
5718
|
-
guided:
|
|
5719
|
-
idempotencyKey:
|
|
5720
|
-
noBrowser:
|
|
5721
|
-
noWait:
|
|
5722
|
-
overwrite:
|
|
5723
|
-
print:
|
|
5724
|
-
wait:
|
|
5725
|
-
yes:
|
|
5742
|
+
$positionals: z29.array(z29.string()).optional(),
|
|
5743
|
+
guided: z29.boolean().optional(),
|
|
5744
|
+
idempotencyKey: z29.string().optional(),
|
|
5745
|
+
noBrowser: z29.boolean().optional(),
|
|
5746
|
+
noWait: z29.boolean().optional(),
|
|
5747
|
+
overwrite: z29.boolean().optional(),
|
|
5748
|
+
print: z29.boolean().optional(),
|
|
5749
|
+
wait: z29.boolean().optional(),
|
|
5750
|
+
yes: z29.boolean().optional()
|
|
5726
5751
|
};
|
|
5727
|
-
var noOptionsInput =
|
|
5728
|
-
var connectInput2 =
|
|
5752
|
+
var noOptionsInput = z29.object(globalInput).strict();
|
|
5753
|
+
var connectInput2 = z29.object({
|
|
5729
5754
|
...globalInput,
|
|
5730
|
-
identityFile:
|
|
5731
|
-
output:
|
|
5732
|
-
user:
|
|
5755
|
+
identityFile: z29.string().optional(),
|
|
5756
|
+
output: z29.string().optional(),
|
|
5757
|
+
user: z29.string().optional()
|
|
5733
5758
|
}).strict();
|
|
5734
|
-
var listInput =
|
|
5735
|
-
var networkCreateInput =
|
|
5736
|
-
var networkUpdateInput =
|
|
5737
|
-
var vpnConfigureInput =
|
|
5759
|
+
var listInput = z29.object({ ...globalInput, cursor: z29.string().optional(), limit: z29.string().optional() }).strict();
|
|
5760
|
+
var networkCreateInput = z29.object({ ...globalInput, cidr: z29.string().optional(), name: z29.string().optional() }).strict();
|
|
5761
|
+
var networkUpdateInput = z29.object({ ...globalInput, name: z29.string().optional() }).strict();
|
|
5762
|
+
var vpnConfigureInput = z29.object({
|
|
5738
5763
|
...globalInput,
|
|
5739
|
-
name:
|
|
5740
|
-
output:
|
|
5741
|
-
privateKey:
|
|
5764
|
+
name: z29.string().optional(),
|
|
5765
|
+
output: z29.string().optional(),
|
|
5766
|
+
privateKey: z29.string().optional()
|
|
5742
5767
|
}).strict();
|
|
5743
5768
|
function networkExecutor(context) {
|
|
5744
5769
|
const runtime3 = context.cli?.interaction;
|
|
@@ -5983,12 +6008,12 @@ var networkCapabilities = [
|
|
|
5983
6008
|
vpnConnectionDisconnectCapability,
|
|
5984
6009
|
connectCapability
|
|
5985
6010
|
];
|
|
5986
|
-
var networkUpdateFields =
|
|
5987
|
-
networkId:
|
|
5988
|
-
name:
|
|
5989
|
-
description:
|
|
5990
|
-
clearDescription:
|
|
5991
|
-
confirm:
|
|
6011
|
+
var networkUpdateFields = z29.object({
|
|
6012
|
+
networkId: z29.string(),
|
|
6013
|
+
name: z29.string().optional(),
|
|
6014
|
+
description: z29.string().optional(),
|
|
6015
|
+
clearDescription: z29.boolean().optional(),
|
|
6016
|
+
confirm: z29.boolean().optional()
|
|
5992
6017
|
}).refine((input) => !(input.clearDescription && input.description !== void 0), {
|
|
5993
6018
|
message: "Use either description or clearDescription, not both."
|
|
5994
6019
|
}).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
|
|
@@ -5999,7 +6024,7 @@ var networkVerbCapabilities = [
|
|
|
5999
6024
|
roles: ["user"],
|
|
6000
6025
|
description: "List this tenant's private networks.",
|
|
6001
6026
|
mutation: "read",
|
|
6002
|
-
input:
|
|
6027
|
+
input: z29.object({}),
|
|
6003
6028
|
mcp: { name: "networks_list" },
|
|
6004
6029
|
slack: false,
|
|
6005
6030
|
execute: (ctx) => listNetworks(ctx.fetch)
|
|
@@ -6010,7 +6035,7 @@ var networkVerbCapabilities = [
|
|
|
6010
6035
|
roles: ["user"],
|
|
6011
6036
|
description: "Show a single private network by id.",
|
|
6012
6037
|
mutation: "read",
|
|
6013
|
-
input:
|
|
6038
|
+
input: z29.object({ networkId: z29.string() }),
|
|
6014
6039
|
mcp: { name: "networks_show" },
|
|
6015
6040
|
slack: false,
|
|
6016
6041
|
execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
|
|
@@ -6021,11 +6046,11 @@ var networkVerbCapabilities = [
|
|
|
6021
6046
|
roles: ["user"],
|
|
6022
6047
|
description: "Create a private network.",
|
|
6023
6048
|
mutation: "preview-confirm",
|
|
6024
|
-
input:
|
|
6025
|
-
name:
|
|
6026
|
-
cidr:
|
|
6027
|
-
description:
|
|
6028
|
-
confirm:
|
|
6049
|
+
input: z29.object({
|
|
6050
|
+
name: z29.string(),
|
|
6051
|
+
cidr: z29.string().optional(),
|
|
6052
|
+
description: z29.string().optional(),
|
|
6053
|
+
confirm: z29.boolean().optional()
|
|
6029
6054
|
}),
|
|
6030
6055
|
mcp: { name: "networks_create" },
|
|
6031
6056
|
slack: false,
|
|
@@ -6055,7 +6080,7 @@ var networkVerbCapabilities = [
|
|
|
6055
6080
|
roles: ["user"],
|
|
6056
6081
|
description: "Delete a private network.",
|
|
6057
6082
|
mutation: "preview-confirm",
|
|
6058
|
-
input:
|
|
6083
|
+
input: z29.object({ networkId: z29.string(), confirm: z29.boolean().optional() }),
|
|
6059
6084
|
mcp: { name: "networks_delete" },
|
|
6060
6085
|
slack: false,
|
|
6061
6086
|
// The route answers 204, so report which network went.
|
|
@@ -6070,7 +6095,7 @@ var networkVerbCapabilities = [
|
|
|
6070
6095
|
roles: ["user"],
|
|
6071
6096
|
description: "List WireGuard VPN peers registered on a reservation.",
|
|
6072
6097
|
mutation: "read",
|
|
6073
|
-
input:
|
|
6098
|
+
input: z29.object({ reservationId: z29.string() }),
|
|
6074
6099
|
mcp: { name: "vpn_peers_list" },
|
|
6075
6100
|
slack: false,
|
|
6076
6101
|
execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
|
|
@@ -6081,11 +6106,11 @@ var networkVerbCapabilities = [
|
|
|
6081
6106
|
roles: ["user"],
|
|
6082
6107
|
description: "Register a WireGuard VPN peer public key on a reservation.",
|
|
6083
6108
|
mutation: "preview-confirm",
|
|
6084
|
-
input:
|
|
6085
|
-
reservationId:
|
|
6086
|
-
publicKey:
|
|
6087
|
-
label:
|
|
6088
|
-
confirm:
|
|
6109
|
+
input: z29.object({
|
|
6110
|
+
reservationId: z29.string(),
|
|
6111
|
+
publicKey: z29.string(),
|
|
6112
|
+
label: z29.string().optional(),
|
|
6113
|
+
confirm: z29.boolean().optional()
|
|
6089
6114
|
}),
|
|
6090
6115
|
mcp: { name: "vpn_peers_create" },
|
|
6091
6116
|
slack: false,
|
|
@@ -6100,10 +6125,10 @@ var networkVerbCapabilities = [
|
|
|
6100
6125
|
roles: ["user"],
|
|
6101
6126
|
description: "Revoke a WireGuard VPN peer from a reservation.",
|
|
6102
6127
|
mutation: "preview-confirm",
|
|
6103
|
-
input:
|
|
6104
|
-
reservationId:
|
|
6105
|
-
peerId:
|
|
6106
|
-
confirm:
|
|
6128
|
+
input: z29.object({
|
|
6129
|
+
reservationId: z29.string(),
|
|
6130
|
+
peerId: z29.string(),
|
|
6131
|
+
confirm: z29.boolean().optional()
|
|
6107
6132
|
}),
|
|
6108
6133
|
mcp: { name: "vpn_peers_delete" },
|
|
6109
6134
|
slack: false,
|
|
@@ -6112,20 +6137,20 @@ var networkVerbCapabilities = [
|
|
|
6112
6137
|
];
|
|
6113
6138
|
|
|
6114
6139
|
// ../../packages/capabilities/dist/capabilities/registry.js
|
|
6115
|
-
import { z as
|
|
6140
|
+
import { z as z30 } from "zod";
|
|
6116
6141
|
var globalInput2 = {
|
|
6117
|
-
$positionals:
|
|
6118
|
-
yes:
|
|
6142
|
+
$positionals: z30.array(z30.string()).default([]),
|
|
6143
|
+
yes: z30.boolean().optional()
|
|
6119
6144
|
};
|
|
6120
|
-
var emptyInput4 =
|
|
6121
|
-
var repositoryInput =
|
|
6145
|
+
var emptyInput4 = z30.object(globalInput2).strict();
|
|
6146
|
+
var repositoryInput = z30.object({
|
|
6122
6147
|
...globalInput2,
|
|
6123
|
-
repository:
|
|
6148
|
+
repository: z30.string().optional().describe("Repository name, with or without your organization's namespace.")
|
|
6124
6149
|
}).strict();
|
|
6125
|
-
var tagInput =
|
|
6150
|
+
var tagInput = z30.object({
|
|
6126
6151
|
...globalInput2,
|
|
6127
|
-
repository:
|
|
6128
|
-
tag:
|
|
6152
|
+
repository: z30.string().optional().describe("Repository name, with or without your organization's namespace."),
|
|
6153
|
+
tag: z30.string().optional().describe("Tag to delete, such as v1.")
|
|
6129
6154
|
}).strict();
|
|
6130
6155
|
function cliInteraction(context) {
|
|
6131
6156
|
return context.cli?.interaction;
|
|
@@ -6432,14 +6457,14 @@ var registryCapabilities = [
|
|
|
6432
6457
|
];
|
|
6433
6458
|
|
|
6434
6459
|
// ../../packages/capabilities/dist/capabilities/reservation-list.js
|
|
6435
|
-
import { z as
|
|
6436
|
-
var reservationListInput =
|
|
6437
|
-
customerId:
|
|
6438
|
-
listingId:
|
|
6439
|
-
listingTermId:
|
|
6440
|
-
status:
|
|
6441
|
-
cursor:
|
|
6442
|
-
limit:
|
|
6460
|
+
import { z as z31 } from "zod";
|
|
6461
|
+
var reservationListInput = z31.object({
|
|
6462
|
+
customerId: z31.string().uuid().optional(),
|
|
6463
|
+
listingId: z31.string().uuid().optional(),
|
|
6464
|
+
listingTermId: z31.string().uuid().optional(),
|
|
6465
|
+
status: z31.enum(["confirmed", "active", "completed", "cancelled"]).optional(),
|
|
6466
|
+
cursor: z31.string().optional(),
|
|
6467
|
+
limit: z31.number().int().min(1).max(100).optional()
|
|
6443
6468
|
});
|
|
6444
6469
|
var reservationListCapability = defineCapability({
|
|
6445
6470
|
id: "reservation.list",
|
|
@@ -6490,20 +6515,20 @@ var reservationListCapability = defineCapability({
|
|
|
6490
6515
|
});
|
|
6491
6516
|
|
|
6492
6517
|
// ../../packages/capabilities/dist/capabilities/volumes.js
|
|
6493
|
-
import { z as
|
|
6494
|
-
var storageCliInput =
|
|
6495
|
-
$positionals:
|
|
6496
|
-
contentType:
|
|
6497
|
-
cursor:
|
|
6498
|
-
idempotencyKey:
|
|
6499
|
-
limit:
|
|
6500
|
-
name:
|
|
6501
|
-
output:
|
|
6502
|
-
overwrite:
|
|
6503
|
-
path:
|
|
6504
|
-
prefix:
|
|
6505
|
-
source:
|
|
6506
|
-
yes:
|
|
6518
|
+
import { z as z32 } from "zod";
|
|
6519
|
+
var storageCliInput = z32.object({
|
|
6520
|
+
$positionals: z32.array(z32.string()).optional(),
|
|
6521
|
+
contentType: z32.string().optional(),
|
|
6522
|
+
cursor: z32.string().optional(),
|
|
6523
|
+
idempotencyKey: z32.string().optional(),
|
|
6524
|
+
limit: z32.union([z32.string(), z32.number()]).optional(),
|
|
6525
|
+
name: z32.string().optional(),
|
|
6526
|
+
output: z32.string().optional(),
|
|
6527
|
+
overwrite: z32.boolean().optional(),
|
|
6528
|
+
path: z32.string().optional(),
|
|
6529
|
+
prefix: z32.string().optional(),
|
|
6530
|
+
source: z32.string().optional(),
|
|
6531
|
+
yes: z32.boolean().optional()
|
|
6507
6532
|
}).strict();
|
|
6508
6533
|
function storageExecutor(context) {
|
|
6509
6534
|
const interaction = context.cli?.interaction;
|
|
@@ -6539,7 +6564,7 @@ function storageCapability({ id, command, description, mutation, outcome, human,
|
|
|
6539
6564
|
execute: async (context, input) => storageExecutor(context)(id, input)
|
|
6540
6565
|
});
|
|
6541
6566
|
}
|
|
6542
|
-
var filesListInput =
|
|
6567
|
+
var filesListInput = z32.object({ driveId: z32.string(), prefix: z32.string().optional() });
|
|
6543
6568
|
async function* listFiles(context, input) {
|
|
6544
6569
|
const prefix = input.prefix ?? "";
|
|
6545
6570
|
const folder = prefix.includes("/") ? prefix.slice(0, prefix.lastIndexOf("/")) : "";
|
|
@@ -6699,22 +6724,22 @@ var volumeCapabilities = [
|
|
|
6699
6724
|
related: ["volumes files list"]
|
|
6700
6725
|
})
|
|
6701
6726
|
];
|
|
6702
|
-
var reservationInput =
|
|
6703
|
-
var reservationWrite = reservationInput.extend({ confirm:
|
|
6704
|
-
var driveInput =
|
|
6705
|
-
var driveWrite = driveInput.extend({ confirm:
|
|
6706
|
-
var bucketConnectInput =
|
|
6707
|
-
provider:
|
|
6708
|
-
bucket:
|
|
6709
|
-
name:
|
|
6710
|
-
prefix:
|
|
6711
|
-
region:
|
|
6712
|
-
endpointUrl:
|
|
6713
|
-
accountId:
|
|
6714
|
-
accessKeyId:
|
|
6715
|
-
secretAccessKey:
|
|
6716
|
-
readOnly:
|
|
6717
|
-
confirm:
|
|
6727
|
+
var reservationInput = z32.object({ reservationId: z32.string() });
|
|
6728
|
+
var reservationWrite = reservationInput.extend({ confirm: z32.boolean().optional() });
|
|
6729
|
+
var driveInput = z32.object({ driveId: z32.string() });
|
|
6730
|
+
var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
|
|
6731
|
+
var bucketConnectInput = z32.object({
|
|
6732
|
+
provider: z32.enum(["gcs", "s3", "r2"]),
|
|
6733
|
+
bucket: z32.string(),
|
|
6734
|
+
name: z32.string().optional(),
|
|
6735
|
+
prefix: z32.string().optional(),
|
|
6736
|
+
region: z32.string().optional(),
|
|
6737
|
+
endpointUrl: z32.string().optional(),
|
|
6738
|
+
accountId: z32.string().optional(),
|
|
6739
|
+
accessKeyId: z32.string().optional(),
|
|
6740
|
+
secretAccessKey: z32.string().optional(),
|
|
6741
|
+
readOnly: z32.boolean().optional(),
|
|
6742
|
+
confirm: z32.boolean().optional()
|
|
6718
6743
|
}).refine((input) => !(input.provider === "gcs" && (input.accessKeyId || input.secretAccessKey)), {
|
|
6719
6744
|
message: "Access key credentials are only supported for S3-compatible buckets."
|
|
6720
6745
|
}).refine((input) => Boolean(input.accessKeyId) === Boolean(input.secretAccessKey), {
|
|
@@ -6729,7 +6754,7 @@ var storageVerbCapabilities = [
|
|
|
6729
6754
|
roles: ["user"],
|
|
6730
6755
|
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.",
|
|
6731
6756
|
mutation: "preview-confirm",
|
|
6732
|
-
input: reservationWrite.extend({ driveId:
|
|
6757
|
+
input: reservationWrite.extend({ driveId: z32.string(), readOnly: z32.boolean().optional() }),
|
|
6733
6758
|
slack: false,
|
|
6734
6759
|
execute: (ctx, input) => deployReservationStorage(ctx.fetch, input.reservationId, {
|
|
6735
6760
|
drive_id: input.driveId,
|
|
@@ -6762,7 +6787,7 @@ var storageVerbCapabilities = [
|
|
|
6762
6787
|
roles: ["user"],
|
|
6763
6788
|
description: "List reservations that can receive a storage deploy, grouped the same way as the console picker.",
|
|
6764
6789
|
mutation: "read",
|
|
6765
|
-
input:
|
|
6790
|
+
input: z32.object({}),
|
|
6766
6791
|
slack: false,
|
|
6767
6792
|
execute: (ctx) => listStorageTargets(ctx.fetch)
|
|
6768
6793
|
}),
|
|
@@ -6772,9 +6797,9 @@ var storageVerbCapabilities = [
|
|
|
6772
6797
|
roles: ["user"],
|
|
6773
6798
|
description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
|
|
6774
6799
|
mutation: "read",
|
|
6775
|
-
input:
|
|
6776
|
-
limit:
|
|
6777
|
-
cursor:
|
|
6800
|
+
input: z32.object({
|
|
6801
|
+
limit: z32.number().int().min(1).max(100).optional(),
|
|
6802
|
+
cursor: z32.string().optional()
|
|
6778
6803
|
}),
|
|
6779
6804
|
mcp: { name: "storage_volumes_list" },
|
|
6780
6805
|
slack: false,
|
|
@@ -6800,10 +6825,10 @@ var storageVerbCapabilities = [
|
|
|
6800
6825
|
roles: ["user"],
|
|
6801
6826
|
description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
|
|
6802
6827
|
mutation: "preview-confirm",
|
|
6803
|
-
input:
|
|
6804
|
-
name:
|
|
6805
|
-
sourceDriveId:
|
|
6806
|
-
confirm:
|
|
6828
|
+
input: z32.object({
|
|
6829
|
+
name: z32.string(),
|
|
6830
|
+
sourceDriveId: z32.string().optional(),
|
|
6831
|
+
confirm: z32.boolean().optional()
|
|
6807
6832
|
}),
|
|
6808
6833
|
mcp: { name: "storage_volumes_create" },
|
|
6809
6834
|
slack: false,
|
|
@@ -6896,7 +6921,7 @@ var storageVerbCapabilities = [
|
|
|
6896
6921
|
roles: ["user"],
|
|
6897
6922
|
description: "Update a connected S3-compatible bucket's access key credentials.",
|
|
6898
6923
|
mutation: "preview-confirm",
|
|
6899
|
-
input: driveWrite.extend({ accessKeyId:
|
|
6924
|
+
input: driveWrite.extend({ accessKeyId: z32.string(), secretAccessKey: z32.string() }),
|
|
6900
6925
|
mcp: { name: "storage_buckets_update_credentials" },
|
|
6901
6926
|
slack: false,
|
|
6902
6927
|
execute: (ctx, input) => updateDrive(ctx.fetch, input.driveId, {
|
|
@@ -6949,7 +6974,7 @@ var catalog = [
|
|
|
6949
6974
|
...networkVerbCapabilities,
|
|
6950
6975
|
...accessVerbCapabilities,
|
|
6951
6976
|
...storageVerbCapabilities,
|
|
6952
|
-
|
|
6977
|
+
reservationKeysPushCapability,
|
|
6953
6978
|
...metricsCapabilities,
|
|
6954
6979
|
...billingCapabilities,
|
|
6955
6980
|
...registryCapabilities,
|
|
@@ -7238,5 +7263,10 @@ export {
|
|
|
7238
7263
|
metricsHistoryCapability,
|
|
7239
7264
|
metricsSnapshotCapability,
|
|
7240
7265
|
parseHardwareCatalog,
|
|
7266
|
+
sshKeyAddCapability,
|
|
7267
|
+
sshKeyAssignmentStatusCapability,
|
|
7268
|
+
sshKeyDeleteCapability,
|
|
7269
|
+
sshKeyDeliveryStatus,
|
|
7270
|
+
sshKeyListCapability,
|
|
7241
7271
|
volumeFilesListCapability
|
|
7242
7272
|
};
|