@ornncompute/cli 1.0.139 → 1.0.141

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.
@@ -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,141 @@ 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
- var positionals2 = z17.array(z17.string()).default([]);
3384
- var launchInput = z17.object({
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: z17.boolean().optional(),
3387
- idempotencyKey: z17.string().optional(),
3388
- key: z17.string().optional(),
3389
- keyId: z17.string().optional(),
3390
- label: z17.string().optional(),
3391
- machine: z17.string().optional(),
3392
- machines: z17.string().optional(),
3393
- mode: z17.string().optional(),
3394
- mountAccess: z17.string().optional(),
3395
- network: z17.string().optional(),
3396
- noWait: z17.boolean().optional(),
3397
- nodes: z17.union([z17.string(), z17.number()]).optional(),
3398
- publicKey: z17.string().optional(),
3399
- publicKeyFile: z17.string().optional(),
3400
- reservation: z17.string().optional(),
3401
- resume: z17.union([z17.string().min(1), z17.literal(true)]).optional(),
3402
- timeout: z17.string().optional(),
3403
- username: z17.string().optional(),
3404
- vms: z17.string().optional(),
3405
- wait: z17.boolean().optional(),
3406
- yes: z17.boolean().optional(),
3407
- volume: z17.string().optional()
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 keyListInput = z17.object({
3467
+ var keyListInput = z18.object({
3410
3468
  $positionals: positionals2,
3411
- cursor: z17.string().optional(),
3412
- limit: z17.coerce.number().int().min(1).max(500).optional()
3469
+ cursor: z18.string().optional(),
3470
+ limit: z18.coerce.number().int().min(1).max(500).optional()
3413
3471
  }).strict();
3414
- var keyMutationInput = z17.object({
3472
+ var keyMutationInput = z18.object({
3415
3473
  $positionals: positionals2,
3416
- idempotencyKey: z17.string().optional(),
3417
- key: z17.string().optional(),
3418
- keyId: z17.string().optional(),
3419
- label: z17.string().optional(),
3420
- publicKey: z17.string().optional(),
3421
- publicKeyFile: z17.string().optional(),
3422
- yes: z17.boolean().optional()
3474
+ idempotencyKey: z18.string().optional(),
3475
+ key: z18.string().optional(),
3476
+ keyId: z18.string().optional(),
3477
+ label: z18.string().optional(),
3478
+ publicKey: z18.string().optional(),
3479
+ publicKeyFile: z18.string().optional(),
3480
+ yes: z18.boolean().optional()
3423
3481
  }).strict();
3424
- var machineListInput = z17.object({
3482
+ var machineListInput = z18.object({
3425
3483
  $positionals: positionals2,
3426
- cursor: z17.string().optional(),
3427
- limit: z17.coerce.number().int().min(1).max(500).optional()
3484
+ cursor: z18.string().optional(),
3485
+ limit: z18.coerce.number().int().min(1).max(500).optional()
3428
3486
  }).strict();
3429
- var machineShowInput = z17.object({
3487
+ var machineShowInput = z18.object({
3430
3488
  $positionals: positionals2,
3431
- guided: z17.boolean().optional()
3489
+ guided: z18.boolean().optional()
3432
3490
  }).strict();
3433
- var machineWaitInput = z17.object({
3491
+ var machineWaitInput = z18.object({
3434
3492
  $positionals: positionals2,
3435
- guided: z17.boolean().optional(),
3436
- timeout: z17.string().optional()
3493
+ guided: z18.boolean().optional(),
3494
+ timeout: z18.string().optional()
3437
3495
  }).strict();
3438
- var machineSwitchInput = z17.object({
3496
+ var machineSwitchInput = z18.object({
3439
3497
  $positionals: positionals2,
3440
- guided: z17.boolean().optional(),
3441
- eraseLocalData: z17.boolean().optional(),
3442
- idempotencyKey: z17.string().optional(),
3443
- mode: z17.string().optional(),
3444
- network: z17.string().optional(),
3445
- noWait: z17.boolean().optional(),
3446
- timeout: z17.string().optional(),
3447
- wait: z17.boolean().optional(),
3448
- yes: z17.boolean().optional()
3498
+ guided: z18.boolean().optional(),
3499
+ eraseLocalData: z18.boolean().optional(),
3500
+ idempotencyKey: z18.string().optional(),
3501
+ mode: z18.string().optional(),
3502
+ network: z18.string().optional(),
3503
+ noWait: z18.boolean().optional(),
3504
+ timeout: z18.string().optional(),
3505
+ wait: z18.boolean().optional(),
3506
+ yes: z18.boolean().optional()
3449
3507
  }).strict();
3450
- var machineMaintenanceInput = z17.object({
3508
+ var machineMaintenanceInput = z18.object({
3451
3509
  $positionals: positionals2,
3452
- eraseLocalData: z17.boolean().optional(),
3453
- guided: z17.boolean().optional(),
3454
- idempotencyKey: z17.string().optional(),
3455
- noWait: z17.boolean().optional(),
3456
- timeout: z17.string().optional(),
3457
- wait: z17.boolean().optional(),
3458
- yes: z17.boolean().optional()
3510
+ eraseLocalData: z18.boolean().optional(),
3511
+ guided: z18.boolean().optional(),
3512
+ idempotencyKey: z18.string().optional(),
3513
+ noWait: z18.boolean().optional(),
3514
+ timeout: z18.string().optional(),
3515
+ wait: z18.boolean().optional(),
3516
+ yes: z18.boolean().optional()
3459
3517
  }).strict();
3460
3518
  function runtime(context) {
3461
3519
  const interaction = context.cli?.interaction;
@@ -3844,15 +3902,19 @@ var sshKeyAssignmentSyncCapability = cliOnly({
3844
3902
  },
3845
3903
  execute: executeSshKeys("assignments.sync")
3846
3904
  });
3847
- var sshKeyAssignmentStatusCapability = cliOnly({
3905
+ var sshKeyAssignmentStatusCapability = defineCapability({
3848
3906
  id: "access.ssh_key_assignments.status",
3849
3907
  domain: "access",
3850
3908
  roles: ["user"],
3851
3909
  mutation: "read",
3852
- input: keyListInput,
3853
- description: "Show assigned, queued, installed, and failed SSH-key delivery per machine.",
3910
+ input: z18.object({ reservationId: z18.string() }),
3911
+ description: "Show SSH key push status per machine for a reservation.",
3912
+ mcp: { name: "access_keys_status" },
3913
+ slack: false,
3854
3914
  cli: {
3855
3915
  command: ["ssh-keys", "assignments", "status"],
3916
+ input: keyListInput,
3917
+ execute: executeSshKeys("assignments.status"),
3856
3918
  vnext: {
3857
3919
  arguments: "semantic",
3858
3920
  audience: "customer",
@@ -3866,7 +3928,7 @@ var sshKeyAssignmentStatusCapability = cliOnly({
3866
3928
  related: ["ssh-keys assignments sync", "connect"]
3867
3929
  }
3868
3930
  },
3869
- execute: executeSshKeys("assignments.status")
3931
+ execute: (context, input) => reservationKeyStatus(context, input.reservationId)
3870
3932
  });
3871
3933
  var computeCapabilities = [
3872
3934
  launchCapability,
@@ -3884,17 +3946,17 @@ var computeCapabilities = [
3884
3946
  sshKeyAssignmentSyncCapability,
3885
3947
  sshKeyAssignmentStatusCapability
3886
3948
  ];
3887
- var pageInput = z17.object({
3888
- limit: z17.number().int().min(1).max(500).optional(),
3889
- cursor: z17.string().optional()
3949
+ var pageInput = z18.object({
3950
+ limit: z18.number().int().min(1).max(500).optional(),
3951
+ cursor: z18.string().optional()
3890
3952
  });
3891
- var publicKeyInput = z17.object({
3892
- publicKey: z17.string(),
3893
- label: z17.string().optional(),
3894
- confirm: z17.boolean().optional()
3953
+ var publicKeyInput = z18.object({
3954
+ publicKey: z18.string(),
3955
+ label: z18.string().optional(),
3956
+ confirm: z18.boolean().optional()
3895
3957
  });
3896
- var keyIdInput = z17.object({ keyId: z17.string(), confirm: z17.boolean().optional() });
3897
- var nodeIdInput = z17.object({ nodeId: z17.string(), confirm: z17.boolean().optional() });
3958
+ var keyIdInput = z18.object({ keyId: z18.string(), confirm: z18.boolean().optional() });
3959
+ var nodeIdInput = z18.object({ nodeId: z18.string(), confirm: z18.boolean().optional() });
3898
3960
  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.";
3899
3961
  function rebootMachine(mode) {
3900
3962
  return (ctx, input) => rebootNode(ctx.fetch, input.nodeId, { mode });
@@ -3906,7 +3968,7 @@ var accessVerbCapabilities = [
3906
3968
  roles: ["user"],
3907
3969
  description: "Show VM and Bare Metal SSH access machines for a reservation.",
3908
3970
  mutation: "read",
3909
- input: z17.object({ reservationId: z17.string() }),
3971
+ input: z18.object({ reservationId: z18.string() }),
3910
3972
  slack: false,
3911
3973
  execute: (ctx, input) => listNodes(ctx.fetch, { reservation_id: input.reservationId })
3912
3974
  }),
@@ -3916,18 +3978,18 @@ var accessVerbCapabilities = [
3916
3978
  roles: ["user"],
3917
3979
  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
3980
  mutation: "preview-confirm",
3919
- input: z17.object({
3920
- reservationId: z17.string(),
3921
- sshKeyIds: z17.array(z17.string()).min(1),
3922
- username: z17.string().optional(),
3923
- machineCount: z17.number().int().positive().optional(),
3924
- requestId: z17.string().optional(),
3925
- accessMode: z17.enum(["bare-metal", "vm"]).optional(),
3926
- networkMode: z17.enum(["public", "private"]).optional(),
3927
- diskId: z17.string().optional(),
3928
- storageLoadDriveId: z17.string().optional(),
3929
- storageSaveDriveId: z17.string().optional(),
3930
- confirm: z17.boolean().optional()
3981
+ input: z18.object({
3982
+ reservationId: z18.string(),
3983
+ sshKeyIds: z18.array(z18.string()).min(1),
3984
+ username: z18.string().optional(),
3985
+ machineCount: z18.number().int().positive().optional(),
3986
+ requestId: z18.string().optional(),
3987
+ accessMode: z18.enum(["bare-metal", "vm"]).optional(),
3988
+ networkMode: z18.enum(["public", "private"]).optional(),
3989
+ diskId: z18.string().optional(),
3990
+ storageLoadDriveId: z18.string().optional(),
3991
+ storageSaveDriveId: z18.string().optional(),
3992
+ confirm: z18.boolean().optional()
3931
3993
  }),
3932
3994
  slack: false,
3933
3995
  // Without disk_id the orchestrator boots "virtual-machine" from the
@@ -3949,14 +4011,14 @@ var accessVerbCapabilities = [
3949
4011
  roles: ["user"],
3950
4012
  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
4013
  mutation: "preview-confirm",
3952
- input: z17.object({
3953
- reservationId: z17.string(),
3954
- networkMode: z17.enum(["public", "private"]),
3955
- sshKeyIds: z17.array(z17.string()).min(1),
3956
- accessMode: z17.enum(["bare-metal", "virtual-machine"]).optional(),
3957
- username: z17.string().optional(),
3958
- requestId: z17.string().regex(/\S/),
3959
- confirm: z17.boolean().optional()
4014
+ input: z18.object({
4015
+ reservationId: z18.string(),
4016
+ networkMode: z18.enum(["public", "private"]),
4017
+ sshKeyIds: z18.array(z18.string()).min(1),
4018
+ accessMode: z18.enum(["bare-metal", "virtual-machine"]).optional(),
4019
+ username: z18.string().optional(),
4020
+ requestId: z18.string().regex(/\S/),
4021
+ confirm: z18.boolean().optional()
3960
4022
  }),
3961
4023
  slack: false,
3962
4024
  execute: (ctx, input) => switchReservationAccess(ctx.fetch, input.reservationId, {
@@ -3972,7 +4034,7 @@ var accessVerbCapabilities = [
3972
4034
  roles: ["user"],
3973
4035
  description: "List SSH keys registered for a reservation.",
3974
4036
  mutation: "read",
3975
- input: z17.object({ reservationId: z17.string() }),
4037
+ input: z18.object({ reservationId: z18.string() }),
3976
4038
  slack: false,
3977
4039
  execute: (ctx, input) => listReservationSshKeys(ctx.fetch, input.reservationId)
3978
4040
  }),
@@ -3982,7 +4044,7 @@ var accessVerbCapabilities = [
3982
4044
  roles: ["user"],
3983
4045
  description: `Add an SSH key to a reservation. ${ADDED_KEY_OUTCOME}`,
3984
4046
  mutation: "preview-confirm",
3985
- input: publicKeyInput.extend({ reservationId: z17.string() }),
4047
+ input: publicKeyInput.extend({ reservationId: z18.string() }),
3986
4048
  slack: false,
3987
4049
  execute: (ctx, input) => addReservationSshKey(ctx.fetch, input.reservationId, {
3988
4050
  label: input.label ?? null,
@@ -4086,72 +4148,16 @@ var accessVerbCapabilities = [
4086
4148
  execute: async (ctx, input) => await deleteClusterUserKey(ctx.fetch, input.keyId) ?? { deleted: true }
4087
4149
  })
4088
4150
  ];
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
- var machineMetricsCapabilities = [
4109
- defineCapability({
4110
- id: "machine.live_metrics",
4111
- domain: "access",
4112
- roles: ["user"],
4113
- description: "Fetch a live metrics snapshot for one reservation machine.",
4114
- mutation: "read",
4115
- input: z17.object({ reservationId: z17.string(), machineId: z17.string() }),
4116
- mcp: false,
4117
- slack: false,
4118
- execute: (ctx, input) => getReservationLiveMetrics(ctx.fetch, input.reservationId, {
4119
- machine_id: input.machineId
4120
- })
4121
- }),
4122
- defineCapability({
4123
- id: "machine.telemetry_history",
4124
- domain: "access",
4125
- roles: ["user"],
4126
- description: "Fetch historical telemetry for one reservation machine over a time range.",
4127
- mutation: "read",
4128
- input: z17.object({
4129
- reservationId: z17.string(),
4130
- machineId: z17.string(),
4131
- start: z17.string().optional(),
4132
- end: z17.string().optional(),
4133
- maxPoints: z17.number().int().positive().optional()
4134
- }),
4135
- mcp: false,
4136
- slack: false,
4137
- execute: (ctx, input) => getReservationTelemetryHistory(ctx.fetch, input.reservationId, {
4138
- machine_id: input.machineId,
4139
- start: input.start || void 0,
4140
- end: input.end || void 0,
4141
- max_points: input.maxPoints
4142
- })
4143
- })
4144
- ];
4145
4151
 
4146
4152
  // ../../packages/capabilities/dist/capabilities/credits.js
4147
- import { z as z18 } from "zod";
4148
- var creditGrantInput = z18.object({
4149
- organizationId: z18.uuid().describe("Customer organization UUID. Resolve names or emails with organization_list; ask which organization if matches are ambiguous."),
4150
- adjustmentId: z18.uuid().describe("The credit-adjustment API's required grant UUID. Keep the same UUID when confirming this grant."),
4151
- amountCents: z18.number().int().min(1).max(1e8).describe("USD cents: 10000 grants $100.00."),
4152
- direction: z18.enum(["credit", "debit"]).optional().describe("credit adds funds (default); debit removes funds. Choose explicitly for a debit."),
4153
- 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."),
4154
- confirm: z18.boolean().optional()
4153
+ import { z as z19 } from "zod";
4154
+ var creditGrantInput = z19.object({
4155
+ organizationId: z19.uuid().describe("Customer organization UUID. Resolve names or emails with organization_list; ask which organization if matches are ambiguous."),
4156
+ adjustmentId: z19.uuid().describe("The credit-adjustment API's required grant UUID. Keep the same UUID when confirming this grant."),
4157
+ amountCents: z19.number().int().min(1).max(1e8).describe("USD cents: 10000 grants $100.00."),
4158
+ direction: z19.enum(["credit", "debit"]).optional().describe("credit adds funds (default); debit removes funds. Choose explicitly for a debit."),
4159
+ 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."),
4160
+ confirm: z19.boolean().optional()
4155
4161
  });
4156
4162
  var creditGrantCapability = defineCapability({
4157
4163
  id: "credits.grant",
@@ -4212,20 +4218,20 @@ var creditGrantCapability = defineCapability({
4212
4218
  });
4213
4219
 
4214
4220
  // ../../packages/capabilities/dist/capabilities/cli.js
4215
- import { z as z19 } from "zod";
4216
- var emptyInput2 = z19.object({});
4221
+ import { z as z20 } from "zod";
4222
+ var emptyInput2 = z20.object({});
4217
4223
  function requireCliRuntime(context) {
4218
4224
  if (!context.cli) {
4219
4225
  throw new Error("This capability must execute through the Ornn CLI runtime.");
4220
4226
  }
4221
4227
  return context.cli;
4222
4228
  }
4223
- var updateInput = z19.object({
4224
- $positionals: z19.array(z19.string()).max(0).default([]),
4225
- major: z19.boolean().optional()
4229
+ var updateInput = z20.object({
4230
+ $positionals: z20.array(z20.string()).max(0).default([]),
4231
+ major: z20.boolean().optional()
4226
4232
  });
4227
- var completionInput = z19.object({
4228
- $positionals: z19.tuple([z19.enum(["bash", "fish", "zsh"])])
4233
+ var completionInput = z20.object({
4234
+ $positionals: z20.tuple([z20.enum(["bash", "fish", "zsh"])])
4229
4235
  }).transform(({ $positionals }) => ({ shell: $positionals[0] }));
4230
4236
  var versionCapability = defineCapability({
4231
4237
  id: "cli.version",
@@ -4366,23 +4372,23 @@ var cliShellCapabilities = [
4366
4372
  ];
4367
4373
 
4368
4374
  // ../../packages/capabilities/dist/capabilities/clusters.js
4369
- import { z as z20 } from "zod";
4370
- var clusterCliInput = z20.object({
4371
- $positionals: z20.array(z20.string()).optional(),
4372
- cursor: z20.string().optional(),
4373
- guided: z20.boolean().optional(),
4374
- idempotencyKey: z20.string().optional(),
4375
- limit: z20.union([z20.string(), z20.number()]).optional(),
4376
- machine: z20.string().optional(),
4377
- machines: z20.string().optional(),
4378
- network: z20.enum(["public", "private"]).optional(),
4379
- noWait: z20.boolean().optional(),
4380
- nodes: z20.union([z20.string(), z20.number()]).optional(),
4381
- output: z20.string().optional(),
4382
- overwrite: z20.boolean().optional(),
4383
- timeout: z20.string().optional(),
4384
- wait: z20.boolean().optional(),
4385
- yes: z20.boolean().optional()
4375
+ import { z as z21 } from "zod";
4376
+ var clusterCliInput = z21.object({
4377
+ $positionals: z21.array(z21.string()).optional(),
4378
+ cursor: z21.string().optional(),
4379
+ guided: z21.boolean().optional(),
4380
+ idempotencyKey: z21.string().optional(),
4381
+ limit: z21.union([z21.string(), z21.number()]).optional(),
4382
+ machine: z21.string().optional(),
4383
+ machines: z21.string().optional(),
4384
+ network: z21.enum(["public", "private"]).optional(),
4385
+ noWait: z21.boolean().optional(),
4386
+ nodes: z21.union([z21.string(), z21.number()]).optional(),
4387
+ output: z21.string().optional(),
4388
+ overwrite: z21.boolean().optional(),
4389
+ timeout: z21.string().optional(),
4390
+ wait: z21.boolean().optional(),
4391
+ yes: z21.boolean().optional()
4386
4392
  }).strict();
4387
4393
  function clusterExecutor(context) {
4388
4394
  const runtime3 = context.cli?.interaction;
@@ -4510,12 +4516,12 @@ var clusterCliCapabilities = [
4510
4516
  related: ["clusters show", "reservations show"]
4511
4517
  })
4512
4518
  ];
4513
- var clusterType = z20.enum(["kubernetes", "slurm"]);
4514
- var reservationCluster = z20.object({ reservationId: z20.string(), type: clusterType });
4515
- var controllerNode = z20.object({
4516
- controllerId: z20.string(),
4517
- nodeId: z20.string(),
4518
- confirm: z20.boolean().optional()
4519
+ var clusterType = z21.enum(["kubernetes", "slurm"]);
4520
+ var reservationCluster = z21.object({ reservationId: z21.string(), type: clusterType });
4521
+ var controllerNode = z21.object({
4522
+ controllerId: z21.string(),
4523
+ nodeId: z21.string(),
4524
+ confirm: z21.boolean().optional()
4519
4525
  });
4520
4526
  var clusterCapabilities = [
4521
4527
  defineCapability({
@@ -4524,7 +4530,7 @@ var clusterCapabilities = [
4524
4530
  roles: ["user"],
4525
4531
  description: "List this tenant's kubernetes/slurm clusters.",
4526
4532
  mutation: "read",
4527
- input: z20.object({}),
4533
+ input: z21.object({}),
4528
4534
  mcp: { name: "clusters_list" },
4529
4535
  slack: false,
4530
4536
  execute: (ctx) => listClusters(ctx.fetch)
@@ -4535,8 +4541,8 @@ var clusterCapabilities = [
4535
4541
  roles: ["user"],
4536
4542
  description: "List active reservations eligible for cluster creation (kubernetes/slurm), 100 per page. Pass the response's nextCursor as cursor for the next page.",
4537
4543
  mutation: "read",
4538
- input: z20.object({
4539
- cursor: z20.string().min(1).optional().describe("nextCursor from the previous page.")
4544
+ input: z21.object({
4545
+ cursor: z21.string().min(1).optional().describe("nextCursor from the previous page.")
4540
4546
  }),
4541
4547
  mcp: { name: "clusters_reservations_list" },
4542
4548
  slack: false,
@@ -4551,13 +4557,13 @@ var clusterCapabilities = [
4551
4557
  roles: ["user"],
4552
4558
  description: "Launch a kubernetes or slurm cluster on a reservation.",
4553
4559
  mutation: "preview-confirm",
4554
- input: z20.object({
4555
- reservationId: z20.string(),
4560
+ input: z21.object({
4561
+ reservationId: z21.string(),
4556
4562
  type: clusterType,
4557
- networkMode: z20.enum(["public", "private"]).optional(),
4558
- nodeIds: z20.array(z20.string()).optional(),
4559
- nodeCount: z20.number().int().positive().optional(),
4560
- confirm: z20.boolean().optional()
4563
+ networkMode: z21.enum(["public", "private"]).optional(),
4564
+ nodeIds: z21.array(z21.string()).optional(),
4565
+ nodeCount: z21.number().int().positive().optional(),
4566
+ confirm: z21.boolean().optional()
4561
4567
  }).strict(),
4562
4568
  mcp: { name: "clusters_create" },
4563
4569
  slack: false,
@@ -4597,7 +4603,7 @@ var clusterCapabilities = [
4597
4603
  roles: ["user"],
4598
4604
  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.",
4599
4605
  mutation: "read",
4600
- input: z20.object({ reservationId: z20.string() }),
4606
+ input: z21.object({ reservationId: z21.string() }),
4601
4607
  mcp: { name: "clusters_kubeconfig" },
4602
4608
  slack: false,
4603
4609
  execute: async (ctx, input) => {
@@ -4636,7 +4642,7 @@ var clusterCapabilities = [
4636
4642
  roles: ["user"],
4637
4643
  description: "Tear down a kubernetes or slurm cluster on a reservation.",
4638
4644
  mutation: "preview-confirm",
4639
- input: reservationCluster.extend({ confirm: z20.boolean().optional() }),
4645
+ input: reservationCluster.extend({ confirm: z21.boolean().optional() }),
4640
4646
  mcp: { name: "clusters_teardown" },
4641
4647
  slack: false,
4642
4648
  execute: (ctx, input) => teardownReservationCluster(ctx.fetch, input.type, input.reservationId)
@@ -4644,55 +4650,55 @@ var clusterCapabilities = [
4644
4650
  ];
4645
4651
 
4646
4652
  // ../../packages/capabilities/dist/capabilities/external-buckets.js
4647
- import { z as z21 } from "zod";
4648
- var pageInput2 = z21.object({
4649
- $positionals: z21.array(z21.string()).optional(),
4650
- cursor: z21.string().optional(),
4651
- limit: z21.union([z21.string(), z21.number()]).optional()
4653
+ import { z as z22 } from "zod";
4654
+ var pageInput2 = z22.object({
4655
+ $positionals: z22.array(z22.string()).optional(),
4656
+ cursor: z22.string().optional(),
4657
+ limit: z22.union([z22.string(), z22.number()]).optional()
4652
4658
  }).strict();
4653
- var showInput = z21.object({
4654
- $positionals: z21.array(z21.string()).optional()
4659
+ var showInput = z22.object({
4660
+ $positionals: z22.array(z22.string()).optional()
4655
4661
  }).strict();
4656
- var verificationInput = z21.object({
4657
- $positionals: z21.array(z21.string()).optional(),
4658
- idempotencyKey: z21.string().optional()
4662
+ var verificationInput = z22.object({
4663
+ $positionals: z22.array(z22.string()).optional(),
4664
+ idempotencyKey: z22.string().optional()
4659
4665
  }).strict();
4660
- var disconnectInput = z21.object({
4661
- $positionals: z21.array(z21.string()).optional(),
4662
- idempotencyKey: z21.string().optional(),
4663
- yes: z21.boolean().optional()
4666
+ var disconnectInput = z22.object({
4667
+ $positionals: z22.array(z22.string()).optional(),
4668
+ idempotencyKey: z22.string().optional(),
4669
+ yes: z22.boolean().optional()
4664
4670
  }).strict();
4665
- var connectInput = z21.object({
4666
- $positionals: z21.array(z21.string()).optional(),
4667
- accessKeyId: z21.string().optional(),
4668
- accountId: z21.string().optional(),
4669
- bucket: z21.string().optional(),
4670
- endpointUrl: z21.string().optional(),
4671
- idempotencyKey: z21.string().optional(),
4672
- name: z21.string().optional(),
4673
- prefix: z21.string().optional(),
4674
- readOnly: z21.boolean().optional(),
4675
- readWrite: z21.boolean().optional(),
4676
- region: z21.string().optional(),
4677
- secretAccessKeyFile: z21.string().optional(),
4678
- url: z21.string().optional(),
4679
- yes: z21.boolean().optional()
4671
+ var connectInput = z22.object({
4672
+ $positionals: z22.array(z22.string()).optional(),
4673
+ accessKeyId: z22.string().optional(),
4674
+ accountId: z22.string().optional(),
4675
+ bucket: z22.string().optional(),
4676
+ endpointUrl: z22.string().optional(),
4677
+ idempotencyKey: z22.string().optional(),
4678
+ name: z22.string().optional(),
4679
+ prefix: z22.string().optional(),
4680
+ readOnly: z22.boolean().optional(),
4681
+ readWrite: z22.boolean().optional(),
4682
+ region: z22.string().optional(),
4683
+ secretAccessKeyFile: z22.string().optional(),
4684
+ url: z22.string().optional(),
4685
+ yes: z22.boolean().optional()
4680
4686
  }).strict();
4681
- var credentialInput = z21.object({
4682
- $positionals: z21.array(z21.string()).optional(),
4683
- accessKeyId: z21.string().optional(),
4684
- idempotencyKey: z21.string().optional(),
4685
- secretAccessKeyFile: z21.string().optional(),
4686
- yes: z21.boolean().optional()
4687
+ var credentialInput = z22.object({
4688
+ $positionals: z22.array(z22.string()).optional(),
4689
+ accessKeyId: z22.string().optional(),
4690
+ idempotencyKey: z22.string().optional(),
4691
+ secretAccessKeyFile: z22.string().optional(),
4692
+ yes: z22.boolean().optional()
4687
4693
  }).strict();
4688
- var importInput = z21.object({
4689
- $positionals: z21.array(z21.string()).optional(),
4690
- idempotencyKey: z21.string().optional(),
4691
- noWait: z21.boolean().optional(),
4692
- reservation: z21.string().optional(),
4693
- timeout: z21.string().optional(),
4694
- wait: z21.boolean().optional(),
4695
- yes: z21.boolean().optional()
4694
+ var importInput = z22.object({
4695
+ $positionals: z22.array(z22.string()).optional(),
4696
+ idempotencyKey: z22.string().optional(),
4697
+ noWait: z22.boolean().optional(),
4698
+ reservation: z22.string().optional(),
4699
+ timeout: z22.string().optional(),
4700
+ wait: z22.boolean().optional(),
4701
+ yes: z22.boolean().optional()
4696
4702
  }).strict();
4697
4703
  function externalBucketExecutor(context) {
4698
4704
  const interaction = context.cli?.interaction;
@@ -4736,16 +4742,16 @@ function isExternalBucket(drive) {
4736
4742
  return false;
4737
4743
  return ["external_gcs", "s3", "r2", "cloudflare_r2"].includes(source.provider ?? "") || Boolean(source.bucket);
4738
4744
  }
4739
- var bucketInput = z21.object({ driveId: z21.string() });
4745
+ var bucketInput = z22.object({ driveId: z22.string() });
4740
4746
  var bucketListCapability = defineCapability({
4741
4747
  id: "storage.external-buckets.list",
4742
4748
  domain: "storage",
4743
4749
  roles: ["user"],
4744
4750
  description: "List a page of connected external buckets. Pass next_cursor as cursor to continue.",
4745
4751
  mutation: "read",
4746
- input: z21.object({
4747
- limit: z21.number().int().min(1).max(100).optional(),
4748
- cursor: z21.string().optional()
4752
+ input: z22.object({
4753
+ limit: z22.number().int().min(1).max(100).optional(),
4754
+ cursor: z22.string().optional()
4749
4755
  }),
4750
4756
  mcp: { name: "storage_buckets_list" },
4751
4757
  slack: false,
@@ -4899,22 +4905,22 @@ var externalBucketCapabilities = [
4899
4905
  ];
4900
4906
 
4901
4907
  // ../../packages/capabilities/dist/capabilities/evidence.js
4902
- import { z as z22 } from "zod";
4903
- var positionals3 = z22.array(z22.string()).default([]);
4904
- var evidenceInput = z22.object({
4908
+ import { z as z23 } from "zod";
4909
+ var positionals3 = z23.array(z23.string()).default([]);
4910
+ var evidenceInput = z23.object({
4905
4911
  $positionals: positionals3,
4906
- before: z22.string().optional(),
4907
- count: z22.string().optional(),
4908
- cursor: z22.string().optional(),
4909
- end: z22.string().optional(),
4910
- follow: z22.boolean().optional(),
4911
- guided: z22.boolean().optional(),
4912
- interval: z22.string().optional(),
4913
- limit: z22.string().optional(),
4914
- maxPoints: z22.string().optional(),
4915
- start: z22.string().optional(),
4916
- stream: z22.enum(["kernel", "serial"]).optional(),
4917
- timeout: z22.string().optional()
4912
+ before: z23.string().optional(),
4913
+ count: z23.string().optional(),
4914
+ cursor: z23.string().optional(),
4915
+ end: z23.string().optional(),
4916
+ follow: z23.boolean().optional(),
4917
+ guided: z23.boolean().optional(),
4918
+ interval: z23.string().optional(),
4919
+ limit: z23.string().optional(),
4920
+ maxPoints: z23.string().optional(),
4921
+ start: z23.string().optional(),
4922
+ stream: z23.enum(["kernel", "serial"]).optional(),
4923
+ timeout: z23.string().optional()
4918
4924
  }).strict();
4919
4925
  function runtime2(context) {
4920
4926
  const interaction = context.cli?.interaction;
@@ -5042,19 +5048,74 @@ var evidenceCapabilities = [
5042
5048
  clusterLogsCapability
5043
5049
  ];
5044
5050
 
5051
+ // ../../packages/capabilities/dist/capabilities/metrics.js
5052
+ import { z as z24 } from "zod";
5053
+ var metricInput = z24.object({ reservationId: z24.string(), machineId: z24.string().optional() });
5054
+ async function nodeIds(context, input) {
5055
+ if (input.machineId)
5056
+ return [input.machineId];
5057
+ const { nodes: nodes2 } = await listNodes(context.fetch, {
5058
+ reservation_id: input.reservationId
5059
+ });
5060
+ if (!nodes2.length)
5061
+ throw new Error("No machines were found for this reservation.");
5062
+ return nodes2.map((node) => node.node_id);
5063
+ }
5064
+ var metricsSnapshotCapability = defineCapability({
5065
+ id: "metrics.snapshot",
5066
+ domain: "access",
5067
+ roles: ["user"],
5068
+ mutation: "read",
5069
+ 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.",
5070
+ input: metricInput,
5071
+ slack: false,
5072
+ execute: async (context, input) => {
5073
+ const snapshots = [];
5074
+ for (const nodeId3 of await nodeIds(context, input)) {
5075
+ snapshots.push(await getReservationLiveMetrics(context.fetch, input.reservationId, {
5076
+ machine_id: nodeId3
5077
+ }));
5078
+ }
5079
+ return snapshots;
5080
+ }
5081
+ });
5082
+ var metricsHistoryCapability = defineCapability({
5083
+ id: "metrics.history",
5084
+ domain: "access",
5085
+ roles: ["user"],
5086
+ mutation: "read",
5087
+ 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.",
5088
+ input: metricInput.extend({
5089
+ start: z24.string().optional(),
5090
+ end: z24.string().optional(),
5091
+ maxPoints: z24.number().int().positive().optional()
5092
+ }),
5093
+ slack: false,
5094
+ execute: async (context, input) => {
5095
+ const [nodeId3] = await nodeIds(context, input);
5096
+ return getReservationTelemetryHistory(context.fetch, input.reservationId, {
5097
+ machine_id: nodeId3,
5098
+ start: input.start || void 0,
5099
+ end: input.end || void 0,
5100
+ max_points: input.maxPoints
5101
+ });
5102
+ }
5103
+ });
5104
+ var metricsCapabilities = [metricsSnapshotCapability, metricsHistoryCapability];
5105
+
5045
5106
  // ../../packages/capabilities/dist/capabilities/mounts.js
5046
- import { z as z23 } from "zod";
5047
- var mountInput = z23.object({
5048
- $positionals: z23.array(z23.string()).default([]),
5049
- access: z23.string().optional(),
5050
- cursor: z23.string().optional(),
5051
- idempotencyKey: z23.string().optional(),
5052
- limit: z23.union([z23.string(), z23.number()]).optional(),
5053
- noWait: z23.boolean().optional(),
5054
- timeout: z23.string().optional(),
5055
- volume: z23.string().optional(),
5056
- wait: z23.boolean().optional(),
5057
- yes: z23.boolean().optional()
5107
+ import { z as z25 } from "zod";
5108
+ var mountInput = z25.object({
5109
+ $positionals: z25.array(z25.string()).default([]),
5110
+ access: z25.string().optional(),
5111
+ cursor: z25.string().optional(),
5112
+ idempotencyKey: z25.string().optional(),
5113
+ limit: z25.union([z25.string(), z25.number()]).optional(),
5114
+ noWait: z25.boolean().optional(),
5115
+ timeout: z25.string().optional(),
5116
+ volume: z25.string().optional(),
5117
+ wait: z25.boolean().optional(),
5118
+ yes: z25.boolean().optional()
5058
5119
  }).strict();
5059
5120
  function mountExecutor(context) {
5060
5121
  const interaction = context.cli?.interaction;
@@ -5163,13 +5224,13 @@ var mountCapabilities = [
5163
5224
  ];
5164
5225
 
5165
5226
  // ../../packages/capabilities/dist/capabilities/identity.js
5166
- import { z as z24 } from "zod";
5167
- var emptyInput3 = z24.object({});
5168
- var loginInput = z24.object({
5169
- authBase: z24.string().min(1).optional(),
5170
- noBrowser: z24.boolean().optional(),
5171
- pollInterval: z24.number().positive().optional(),
5172
- timeout: z24.number().positive().optional()
5227
+ import { z as z26 } from "zod";
5228
+ var emptyInput3 = z26.object({});
5229
+ var loginInput = z26.object({
5230
+ authBase: z26.string().min(1).optional(),
5231
+ noBrowser: z26.boolean().optional(),
5232
+ pollInterval: z26.number().positive().optional(),
5233
+ timeout: z26.number().positive().optional()
5173
5234
  });
5174
5235
  function executeSession(context, command, input) {
5175
5236
  if (!context.cli?.session) {
@@ -5288,50 +5349,50 @@ var identityCapabilities = [
5288
5349
  ];
5289
5350
 
5290
5351
  // ../../packages/capabilities/dist/capabilities/listings.js
5291
- import { z as z25 } from "zod";
5292
- var listingCreateInput = z25.object({
5293
- organizationId: z25.string().optional(),
5294
- organization_id: z25.string().optional(),
5295
- facilityId: z25.string().optional(),
5296
- facility_id: z25.string().optional(),
5297
- kind: z25.enum(["gpu", "cpu", "node", "link"]).optional(),
5298
- gpu: z25.string().optional(),
5299
- cpu: z25.string().optional(),
5300
- site: z25.string().optional(),
5301
- fabric: z25.string().optional(),
5302
- min_nodes: z25.number().int().optional(),
5303
- starts_after: z25.string().optional(),
5304
- starts_before: z25.string().optional(),
5305
- ends_after: z25.string().optional(),
5306
- ends_before: z25.string().optional(),
5307
- gpu_type: z25.string().optional(),
5308
- node_model: z25.string().optional(),
5309
- fabric_type: z25.string().optional(),
5310
- node_count: z25.number().int().optional(),
5311
- gpus_per_node: z25.number().int().optional(),
5312
- cores_per_node: z25.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".'),
5313
- site_nickname: z25.string().optional().describe("A state, city, address, or catalog region such as us-west-3."),
5314
- site_supplier: z25.string().optional(),
5315
- ram: z25.string().optional(),
5316
- storage: z25.string().optional(),
5317
- internet: z25.string().optional(),
5318
- network_hardware: z25.string().optional(),
5319
- available_start_at: z25.string().optional().describe("Start of the availability window. YYYY-MM-DD or RFC3339."),
5320
- available_end_at: z25.string().optional().describe("End of the availability window. YYYY-MM-DD or RFC3339."),
5321
- available_from: z25.string().optional().describe("Alias for available_start_at."),
5322
- available_to: z25.string().optional().describe("Alias for available_end_at."),
5323
- buy_now_price_per_gpu_hour: z25.number().optional().describe("Price buyers pay, USD per GPU-hour (per vCPU-hour on CPU listings)."),
5324
- deposit_percent: z25.number().optional(),
5325
- down_payment_cents: z25.number().int().nonnegative().optional(),
5326
- access_mode: z25.enum(["bare-metal", "virtual-machine"]).optional(),
5327
- state: z25.enum(["available", "draft"]).optional(),
5328
- price_omitted: z25.boolean().optional(),
5329
- announce: z25.boolean().optional(),
5330
- text: z25.string().optional(),
5331
- confirm: z25.boolean().optional(),
5332
- idempotencyKey: z25.string().min(1).max(200).optional()
5333
- });
5334
- var catalogTermsInput = z25.object({ kind: z25.enum(["gpu", "cpu", "node", "link"]).optional() });
5352
+ import { z as z27 } from "zod";
5353
+ var listingCreateInput = z27.object({
5354
+ organizationId: z27.string().optional(),
5355
+ organization_id: z27.string().optional(),
5356
+ facilityId: z27.string().optional(),
5357
+ facility_id: z27.string().optional(),
5358
+ kind: z27.enum(["gpu", "cpu", "node", "link"]).optional(),
5359
+ gpu: z27.string().optional(),
5360
+ cpu: z27.string().optional(),
5361
+ site: z27.string().optional(),
5362
+ fabric: z27.string().optional(),
5363
+ min_nodes: z27.number().int().optional(),
5364
+ starts_after: z27.string().optional(),
5365
+ starts_before: z27.string().optional(),
5366
+ ends_after: z27.string().optional(),
5367
+ ends_before: z27.string().optional(),
5368
+ gpu_type: z27.string().optional(),
5369
+ node_model: z27.string().optional(),
5370
+ fabric_type: z27.string().optional(),
5371
+ node_count: z27.number().int().optional(),
5372
+ gpus_per_node: z27.number().int().optional(),
5373
+ 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".'),
5374
+ site_nickname: z27.string().optional().describe("A state, city, address, or catalog region such as us-west-3."),
5375
+ site_supplier: z27.string().optional(),
5376
+ ram: z27.string().optional(),
5377
+ storage: z27.string().optional(),
5378
+ internet: z27.string().optional(),
5379
+ network_hardware: z27.string().optional(),
5380
+ available_start_at: z27.string().optional().describe("Start of the availability window. YYYY-MM-DD or RFC3339."),
5381
+ available_end_at: z27.string().optional().describe("End of the availability window. YYYY-MM-DD or RFC3339."),
5382
+ available_from: z27.string().optional().describe("Alias for available_start_at."),
5383
+ available_to: z27.string().optional().describe("Alias for available_end_at."),
5384
+ buy_now_price_per_gpu_hour: z27.number().optional().describe("Price buyers pay, USD per GPU-hour (per vCPU-hour on CPU listings)."),
5385
+ deposit_percent: z27.number().optional(),
5386
+ down_payment_cents: z27.number().int().nonnegative().optional(),
5387
+ access_mode: z27.enum(["bare-metal", "virtual-machine"]).optional(),
5388
+ state: z27.enum(["available", "draft"]).optional(),
5389
+ price_omitted: z27.boolean().optional(),
5390
+ announce: z27.boolean().optional(),
5391
+ text: z27.string().optional(),
5392
+ confirm: z27.boolean().optional(),
5393
+ idempotencyKey: z27.string().min(1).max(200).optional()
5394
+ });
5395
+ var catalogTermsInput = z27.object({ kind: z27.enum(["gpu", "cpu", "node", "link"]).optional() });
5335
5396
  var slackListingCreateParams = {
5336
5397
  type: "object",
5337
5398
  properties: {
@@ -5629,12 +5690,12 @@ var listingCapabilities = [
5629
5690
  ];
5630
5691
 
5631
5692
  // ../../packages/capabilities/dist/capabilities/organization-invites.js
5632
- import { z as z26 } from "zod";
5633
- var organizationInviteInput = z26.object({
5634
- organization_id: z26.uuid().optional(),
5635
- email: z26.string().trim().toLowerCase().pipe(z26.email()),
5636
- organization_role: z26.enum(["consumer", "supplier"]).optional(),
5637
- send_email: z26.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
5693
+ import { z as z28 } from "zod";
5694
+ var organizationInviteInput = z28.object({
5695
+ organization_id: z28.uuid().optional(),
5696
+ email: z28.string().trim().toLowerCase().pipe(z28.email()),
5697
+ organization_role: z28.enum(["consumer", "supplier"]).optional(),
5698
+ send_email: z28.boolean().optional().describe("Defaults to true for an existing organization; false returns a link. Signup invites cannot be emailed.")
5638
5699
  }).superRefine((input, ctx) => {
5639
5700
  if (!input.organization_id && input.send_email === true) {
5640
5701
  ctx.addIssue({
@@ -5694,33 +5755,33 @@ var organizationInviteCapability = defineCapability({
5694
5755
  });
5695
5756
 
5696
5757
  // ../../packages/capabilities/dist/capabilities/networks.js
5697
- import { z as z27 } from "zod";
5758
+ import { z as z29 } from "zod";
5698
5759
  var globalInput = {
5699
- $positionals: z27.array(z27.string()).optional(),
5700
- guided: z27.boolean().optional(),
5701
- idempotencyKey: z27.string().optional(),
5702
- noBrowser: z27.boolean().optional(),
5703
- noWait: z27.boolean().optional(),
5704
- overwrite: z27.boolean().optional(),
5705
- print: z27.boolean().optional(),
5706
- wait: z27.boolean().optional(),
5707
- yes: z27.boolean().optional()
5760
+ $positionals: z29.array(z29.string()).optional(),
5761
+ guided: z29.boolean().optional(),
5762
+ idempotencyKey: z29.string().optional(),
5763
+ noBrowser: z29.boolean().optional(),
5764
+ noWait: z29.boolean().optional(),
5765
+ overwrite: z29.boolean().optional(),
5766
+ print: z29.boolean().optional(),
5767
+ wait: z29.boolean().optional(),
5768
+ yes: z29.boolean().optional()
5708
5769
  };
5709
- var noOptionsInput = z27.object(globalInput).strict();
5710
- var connectInput2 = z27.object({
5770
+ var noOptionsInput = z29.object(globalInput).strict();
5771
+ var connectInput2 = z29.object({
5711
5772
  ...globalInput,
5712
- identityFile: z27.string().optional(),
5713
- output: z27.string().optional(),
5714
- user: z27.string().optional()
5773
+ identityFile: z29.string().optional(),
5774
+ output: z29.string().optional(),
5775
+ user: z29.string().optional()
5715
5776
  }).strict();
5716
- var listInput = z27.object({ ...globalInput, cursor: z27.string().optional(), limit: z27.string().optional() }).strict();
5717
- var networkCreateInput = z27.object({ ...globalInput, cidr: z27.string().optional(), name: z27.string().optional() }).strict();
5718
- var networkUpdateInput = z27.object({ ...globalInput, name: z27.string().optional() }).strict();
5719
- var vpnConfigureInput = z27.object({
5777
+ var listInput = z29.object({ ...globalInput, cursor: z29.string().optional(), limit: z29.string().optional() }).strict();
5778
+ var networkCreateInput = z29.object({ ...globalInput, cidr: z29.string().optional(), name: z29.string().optional() }).strict();
5779
+ var networkUpdateInput = z29.object({ ...globalInput, name: z29.string().optional() }).strict();
5780
+ var vpnConfigureInput = z29.object({
5720
5781
  ...globalInput,
5721
- name: z27.string().optional(),
5722
- output: z27.string().optional(),
5723
- privateKey: z27.string().optional()
5782
+ name: z29.string().optional(),
5783
+ output: z29.string().optional(),
5784
+ privateKey: z29.string().optional()
5724
5785
  }).strict();
5725
5786
  function networkExecutor(context) {
5726
5787
  const runtime3 = context.cli?.interaction;
@@ -5965,12 +6026,12 @@ var networkCapabilities = [
5965
6026
  vpnConnectionDisconnectCapability,
5966
6027
  connectCapability
5967
6028
  ];
5968
- var networkUpdateFields = z27.object({
5969
- networkId: z27.string(),
5970
- name: z27.string().optional(),
5971
- description: z27.string().optional(),
5972
- clearDescription: z27.boolean().optional(),
5973
- confirm: z27.boolean().optional()
6029
+ var networkUpdateFields = z29.object({
6030
+ networkId: z29.string(),
6031
+ name: z29.string().optional(),
6032
+ description: z29.string().optional(),
6033
+ clearDescription: z29.boolean().optional(),
6034
+ confirm: z29.boolean().optional()
5974
6035
  }).refine((input) => !(input.clearDescription && input.description !== void 0), {
5975
6036
  message: "Use either description or clearDescription, not both."
5976
6037
  }).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
@@ -5981,7 +6042,7 @@ var networkVerbCapabilities = [
5981
6042
  roles: ["user"],
5982
6043
  description: "List this tenant's private networks.",
5983
6044
  mutation: "read",
5984
- input: z27.object({}),
6045
+ input: z29.object({}),
5985
6046
  mcp: { name: "networks_list" },
5986
6047
  slack: false,
5987
6048
  execute: (ctx) => listNetworks(ctx.fetch)
@@ -5992,7 +6053,7 @@ var networkVerbCapabilities = [
5992
6053
  roles: ["user"],
5993
6054
  description: "Show a single private network by id.",
5994
6055
  mutation: "read",
5995
- input: z27.object({ networkId: z27.string() }),
6056
+ input: z29.object({ networkId: z29.string() }),
5996
6057
  mcp: { name: "networks_show" },
5997
6058
  slack: false,
5998
6059
  execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
@@ -6003,11 +6064,11 @@ var networkVerbCapabilities = [
6003
6064
  roles: ["user"],
6004
6065
  description: "Create a private network.",
6005
6066
  mutation: "preview-confirm",
6006
- input: z27.object({
6007
- name: z27.string(),
6008
- cidr: z27.string().optional(),
6009
- description: z27.string().optional(),
6010
- confirm: z27.boolean().optional()
6067
+ input: z29.object({
6068
+ name: z29.string(),
6069
+ cidr: z29.string().optional(),
6070
+ description: z29.string().optional(),
6071
+ confirm: z29.boolean().optional()
6011
6072
  }),
6012
6073
  mcp: { name: "networks_create" },
6013
6074
  slack: false,
@@ -6037,7 +6098,7 @@ var networkVerbCapabilities = [
6037
6098
  roles: ["user"],
6038
6099
  description: "Delete a private network.",
6039
6100
  mutation: "preview-confirm",
6040
- input: z27.object({ networkId: z27.string(), confirm: z27.boolean().optional() }),
6101
+ input: z29.object({ networkId: z29.string(), confirm: z29.boolean().optional() }),
6041
6102
  mcp: { name: "networks_delete" },
6042
6103
  slack: false,
6043
6104
  // The route answers 204, so report which network went.
@@ -6052,7 +6113,7 @@ var networkVerbCapabilities = [
6052
6113
  roles: ["user"],
6053
6114
  description: "List WireGuard VPN peers registered on a reservation.",
6054
6115
  mutation: "read",
6055
- input: z27.object({ reservationId: z27.string() }),
6116
+ input: z29.object({ reservationId: z29.string() }),
6056
6117
  mcp: { name: "vpn_peers_list" },
6057
6118
  slack: false,
6058
6119
  execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
@@ -6063,11 +6124,11 @@ var networkVerbCapabilities = [
6063
6124
  roles: ["user"],
6064
6125
  description: "Register a WireGuard VPN peer public key on a reservation.",
6065
6126
  mutation: "preview-confirm",
6066
- input: z27.object({
6067
- reservationId: z27.string(),
6068
- publicKey: z27.string(),
6069
- label: z27.string().optional(),
6070
- confirm: z27.boolean().optional()
6127
+ input: z29.object({
6128
+ reservationId: z29.string(),
6129
+ publicKey: z29.string(),
6130
+ label: z29.string().optional(),
6131
+ confirm: z29.boolean().optional()
6071
6132
  }),
6072
6133
  mcp: { name: "vpn_peers_create" },
6073
6134
  slack: false,
@@ -6082,10 +6143,10 @@ var networkVerbCapabilities = [
6082
6143
  roles: ["user"],
6083
6144
  description: "Revoke a WireGuard VPN peer from a reservation.",
6084
6145
  mutation: "preview-confirm",
6085
- input: z27.object({
6086
- reservationId: z27.string(),
6087
- peerId: z27.string(),
6088
- confirm: z27.boolean().optional()
6146
+ input: z29.object({
6147
+ reservationId: z29.string(),
6148
+ peerId: z29.string(),
6149
+ confirm: z29.boolean().optional()
6089
6150
  }),
6090
6151
  mcp: { name: "vpn_peers_delete" },
6091
6152
  slack: false,
@@ -6094,20 +6155,20 @@ var networkVerbCapabilities = [
6094
6155
  ];
6095
6156
 
6096
6157
  // ../../packages/capabilities/dist/capabilities/registry.js
6097
- import { z as z28 } from "zod";
6158
+ import { z as z30 } from "zod";
6098
6159
  var globalInput2 = {
6099
- $positionals: z28.array(z28.string()).default([]),
6100
- yes: z28.boolean().optional()
6160
+ $positionals: z30.array(z30.string()).default([]),
6161
+ yes: z30.boolean().optional()
6101
6162
  };
6102
- var emptyInput4 = z28.object(globalInput2).strict();
6103
- var repositoryInput = z28.object({
6163
+ var emptyInput4 = z30.object(globalInput2).strict();
6164
+ var repositoryInput = z30.object({
6104
6165
  ...globalInput2,
6105
- repository: z28.string().optional().describe("Repository name, with or without your organization's namespace.")
6166
+ repository: z30.string().optional().describe("Repository name, with or without your organization's namespace.")
6106
6167
  }).strict();
6107
- var tagInput = z28.object({
6168
+ var tagInput = z30.object({
6108
6169
  ...globalInput2,
6109
- repository: z28.string().optional().describe("Repository name, with or without your organization's namespace."),
6110
- tag: z28.string().optional().describe("Tag to delete, such as v1.")
6170
+ repository: z30.string().optional().describe("Repository name, with or without your organization's namespace."),
6171
+ tag: z30.string().optional().describe("Tag to delete, such as v1.")
6111
6172
  }).strict();
6112
6173
  function cliInteraction(context) {
6113
6174
  return context.cli?.interaction;
@@ -6414,14 +6475,14 @@ var registryCapabilities = [
6414
6475
  ];
6415
6476
 
6416
6477
  // ../../packages/capabilities/dist/capabilities/reservation-list.js
6417
- import { z as z29 } from "zod";
6418
- var reservationListInput = z29.object({
6419
- customerId: z29.string().uuid().optional(),
6420
- listingId: z29.string().uuid().optional(),
6421
- listingTermId: z29.string().uuid().optional(),
6422
- status: z29.enum(["confirmed", "active", "completed", "cancelled"]).optional(),
6423
- cursor: z29.string().optional(),
6424
- limit: z29.number().int().min(1).max(100).optional()
6478
+ import { z as z31 } from "zod";
6479
+ var reservationListInput = z31.object({
6480
+ customerId: z31.string().uuid().optional(),
6481
+ listingId: z31.string().uuid().optional(),
6482
+ listingTermId: z31.string().uuid().optional(),
6483
+ status: z31.enum(["confirmed", "active", "completed", "cancelled"]).optional(),
6484
+ cursor: z31.string().optional(),
6485
+ limit: z31.number().int().min(1).max(100).optional()
6425
6486
  });
6426
6487
  var reservationListCapability = defineCapability({
6427
6488
  id: "reservation.list",
@@ -6472,20 +6533,20 @@ var reservationListCapability = defineCapability({
6472
6533
  });
6473
6534
 
6474
6535
  // ../../packages/capabilities/dist/capabilities/volumes.js
6475
- import { z as z30 } from "zod";
6476
- var storageCliInput = z30.object({
6477
- $positionals: z30.array(z30.string()).optional(),
6478
- contentType: z30.string().optional(),
6479
- cursor: z30.string().optional(),
6480
- idempotencyKey: z30.string().optional(),
6481
- limit: z30.union([z30.string(), z30.number()]).optional(),
6482
- name: z30.string().optional(),
6483
- output: z30.string().optional(),
6484
- overwrite: z30.boolean().optional(),
6485
- path: z30.string().optional(),
6486
- prefix: z30.string().optional(),
6487
- source: z30.string().optional(),
6488
- yes: z30.boolean().optional()
6536
+ import { z as z32 } from "zod";
6537
+ var storageCliInput = z32.object({
6538
+ $positionals: z32.array(z32.string()).optional(),
6539
+ contentType: z32.string().optional(),
6540
+ cursor: z32.string().optional(),
6541
+ idempotencyKey: z32.string().optional(),
6542
+ limit: z32.union([z32.string(), z32.number()]).optional(),
6543
+ name: z32.string().optional(),
6544
+ output: z32.string().optional(),
6545
+ overwrite: z32.boolean().optional(),
6546
+ path: z32.string().optional(),
6547
+ prefix: z32.string().optional(),
6548
+ source: z32.string().optional(),
6549
+ yes: z32.boolean().optional()
6489
6550
  }).strict();
6490
6551
  function storageExecutor(context) {
6491
6552
  const interaction = context.cli?.interaction;
@@ -6521,7 +6582,7 @@ function storageCapability({ id, command, description, mutation, outcome, human,
6521
6582
  execute: async (context, input) => storageExecutor(context)(id, input)
6522
6583
  });
6523
6584
  }
6524
- var filesListInput = z30.object({ driveId: z30.string(), prefix: z30.string().optional() });
6585
+ var filesListInput = z32.object({ driveId: z32.string(), prefix: z32.string().optional() });
6525
6586
  async function* listFiles(context, input) {
6526
6587
  const prefix = input.prefix ?? "";
6527
6588
  const folder = prefix.includes("/") ? prefix.slice(0, prefix.lastIndexOf("/")) : "";
@@ -6681,22 +6742,22 @@ var volumeCapabilities = [
6681
6742
  related: ["volumes files list"]
6682
6743
  })
6683
6744
  ];
6684
- var reservationInput = z30.object({ reservationId: z30.string() });
6685
- var reservationWrite = reservationInput.extend({ confirm: z30.boolean().optional() });
6686
- var driveInput = z30.object({ driveId: z30.string() });
6687
- var driveWrite = driveInput.extend({ confirm: z30.boolean().optional() });
6688
- var bucketConnectInput = z30.object({
6689
- provider: z30.enum(["gcs", "s3", "r2"]),
6690
- bucket: z30.string(),
6691
- name: z30.string().optional(),
6692
- prefix: z30.string().optional(),
6693
- region: z30.string().optional(),
6694
- endpointUrl: z30.string().optional(),
6695
- accountId: z30.string().optional(),
6696
- accessKeyId: z30.string().optional(),
6697
- secretAccessKey: z30.string().optional(),
6698
- readOnly: z30.boolean().optional(),
6699
- confirm: z30.boolean().optional()
6745
+ var reservationInput = z32.object({ reservationId: z32.string() });
6746
+ var reservationWrite = reservationInput.extend({ confirm: z32.boolean().optional() });
6747
+ var driveInput = z32.object({ driveId: z32.string() });
6748
+ var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
6749
+ var bucketConnectInput = z32.object({
6750
+ provider: z32.enum(["gcs", "s3", "r2"]),
6751
+ bucket: z32.string(),
6752
+ name: z32.string().optional(),
6753
+ prefix: z32.string().optional(),
6754
+ region: z32.string().optional(),
6755
+ endpointUrl: z32.string().optional(),
6756
+ accountId: z32.string().optional(),
6757
+ accessKeyId: z32.string().optional(),
6758
+ secretAccessKey: z32.string().optional(),
6759
+ readOnly: z32.boolean().optional(),
6760
+ confirm: z32.boolean().optional()
6700
6761
  }).refine((input) => !(input.provider === "gcs" && (input.accessKeyId || input.secretAccessKey)), {
6701
6762
  message: "Access key credentials are only supported for S3-compatible buckets."
6702
6763
  }).refine((input) => Boolean(input.accessKeyId) === Boolean(input.secretAccessKey), {
@@ -6711,7 +6772,7 @@ var storageVerbCapabilities = [
6711
6772
  roles: ["user"],
6712
6773
  description: "Attach an existing storage volume (drive) to a reservation -- the inverse of storage_undeploy. Always mounts at the platform path /home/tenant/volume (fuse). There is no customer mount-path override.",
6713
6774
  mutation: "preview-confirm",
6714
- input: reservationWrite.extend({ driveId: z30.string(), readOnly: z30.boolean().optional() }),
6775
+ input: reservationWrite.extend({ driveId: z32.string(), readOnly: z32.boolean().optional() }),
6715
6776
  slack: false,
6716
6777
  execute: (ctx, input) => deployReservationStorage(ctx.fetch, input.reservationId, {
6717
6778
  drive_id: input.driveId,
@@ -6744,7 +6805,7 @@ var storageVerbCapabilities = [
6744
6805
  roles: ["user"],
6745
6806
  description: "List reservations that can receive a storage deploy, grouped the same way as the console picker.",
6746
6807
  mutation: "read",
6747
- input: z30.object({}),
6808
+ input: z32.object({}),
6748
6809
  slack: false,
6749
6810
  execute: (ctx) => listStorageTargets(ctx.fetch)
6750
6811
  }),
@@ -6754,9 +6815,9 @@ var storageVerbCapabilities = [
6754
6815
  roles: ["user"],
6755
6816
  description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
6756
6817
  mutation: "read",
6757
- input: z30.object({
6758
- limit: z30.number().int().min(1).max(100).optional(),
6759
- cursor: z30.string().optional()
6818
+ input: z32.object({
6819
+ limit: z32.number().int().min(1).max(100).optional(),
6820
+ cursor: z32.string().optional()
6760
6821
  }),
6761
6822
  mcp: { name: "storage_volumes_list" },
6762
6823
  slack: false,
@@ -6782,10 +6843,10 @@ var storageVerbCapabilities = [
6782
6843
  roles: ["user"],
6783
6844
  description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
6784
6845
  mutation: "preview-confirm",
6785
- input: z30.object({
6786
- name: z30.string(),
6787
- sourceDriveId: z30.string().optional(),
6788
- confirm: z30.boolean().optional()
6846
+ input: z32.object({
6847
+ name: z32.string(),
6848
+ sourceDriveId: z32.string().optional(),
6849
+ confirm: z32.boolean().optional()
6789
6850
  }),
6790
6851
  mcp: { name: "storage_volumes_create" },
6791
6852
  slack: false,
@@ -6878,7 +6939,7 @@ var storageVerbCapabilities = [
6878
6939
  roles: ["user"],
6879
6940
  description: "Update a connected S3-compatible bucket's access key credentials.",
6880
6941
  mutation: "preview-confirm",
6881
- input: driveWrite.extend({ accessKeyId: z30.string(), secretAccessKey: z30.string() }),
6942
+ input: driveWrite.extend({ accessKeyId: z32.string(), secretAccessKey: z32.string() }),
6882
6943
  mcp: { name: "storage_buckets_update_credentials" },
6883
6944
  slack: false,
6884
6945
  execute: (ctx, input) => updateDrive(ctx.fetch, input.driveId, {
@@ -6931,8 +6992,8 @@ var catalog = [
6931
6992
  ...networkVerbCapabilities,
6932
6993
  ...accessVerbCapabilities,
6933
6994
  ...storageVerbCapabilities,
6934
- machinePushKeysCapability,
6935
- ...machineMetricsCapabilities,
6995
+ reservationKeysPushCapability,
6996
+ ...metricsCapabilities,
6936
6997
  ...billingCapabilities,
6937
6998
  ...registryCapabilities,
6938
6999
  ...adminNodeLifecycleCapabilities
@@ -7217,6 +7278,10 @@ export {
7217
7278
  findLegacyCliMigration,
7218
7279
  forRole,
7219
7280
  gpuDisplay,
7281
+ metricsHistoryCapability,
7282
+ metricsSnapshotCapability,
7220
7283
  parseHardwareCatalog,
7284
+ sshKeyAssignmentStatusCapability,
7285
+ sshKeyDeliveryStatus,
7221
7286
  volumeFilesListCapability
7222
7287
  };