@ornncompute/cli 1.0.142 → 1.0.144

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -5,7 +5,7 @@ client for customer compute journeys and the explicit staff namespace. It
5
5
  sends browser and CLI traffic only through the API gateway.
6
6
 
7
7
  For the customer install and usage guide, see [`docs/cli.md`](../../docs/cli.md).
8
- The shared capability catalog in `packages/capabilities` is the authority for
8
+ The [shared capability catalog](../../packages/capabilities/README.md) is the authority for
9
9
  command identity, role visibility, input schemas, help, and resource discovery.
10
10
  The CLI imports `@ornn/capabilities/cli`; packaging includes its dependencies,
11
11
  including `@ornn/api-client`, and excludes MCP-only catalog handlers. These
@@ -449,9 +449,10 @@ command UX changes. The smoke runner refuses production and shared staging.
449
449
  See [`docs/packaged-vnext-release-gate.md`](docs/packaged-vnext-release-gate.md).
450
450
 
451
451
  Private networks and VPN peers belong to the selected organization. There is no
452
- per-reservation network attachment step. Requests use the native Orchestrator
453
- network client; the catalog retains command metadata and the CLI owns network
454
- presentation, connection recovery, and local WireGuard config export.
452
+ per-reservation network attachment step. CLI and MCP share network and VPN peer
453
+ capabilities over the native Orchestrator network client. The CLI retains name
454
+ resolution, review, replay, local pagination, connection recovery, and local
455
+ WireGuard key/config files.
455
456
  Durable Bare Metal workspaces use
456
457
  `--network shared --volume <volume-id> --mount-access read-only|read-write`;
457
458
  private Kubernetes and Slurm launches continue to use `--network private`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.142",
3
+ "version": "1.0.144",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,14 +1,14 @@
1
1
  import { getReservation } from "../vendor/api-client/commerce.js";
2
2
  import {
3
- createNetwork,
4
- createNetworkPeer,
5
- deleteNetwork,
6
- deleteNetworkPeer,
7
- getNetwork,
8
- listNetworkPeerConfigs,
9
- listNetworks,
10
- updateNetwork,
11
- } from "../vendor/api-client/orchestrator.js";
3
+ privateNetworkCreateCapability,
4
+ privateNetworkDeleteCapability,
5
+ privateNetworkListCapability,
6
+ privateNetworkShowCapability,
7
+ privateNetworkUpdateCapability,
8
+ vpnConnectionConfigureCapability,
9
+ vpnConnectionDisconnectCapability,
10
+ vpnConnectionListCapability,
11
+ } from "../vendor/capabilities/cli.js";
12
12
  import { z } from "zod";
13
13
 
14
14
  const CANONICAL_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
@@ -108,10 +108,6 @@ function requireMutationKey(runtime, input) {
108
108
  return key;
109
109
  }
110
110
 
111
- function mutationHeaders(key) {
112
- return key ? { "Idempotency-Key": key } : undefined;
113
- }
114
-
115
111
  function lifecycle(statusValue) {
116
112
  const status = text(statusValue)?.toLowerCase() ?? "unknown";
117
113
  if (["active", "ready", "applied", "connected"].includes(status)) {
@@ -189,12 +185,12 @@ function networkFromMutation(payload) {
189
185
  }
190
186
 
191
187
  async function fetchNetworks(context) {
192
- return networkRows(await listNetworks(context.fetch));
188
+ return networkRows(await privateNetworkListCapability.execute(context, {}));
193
189
  }
194
190
 
195
191
  async function resolveNetwork(context, runtime, reference) {
196
192
  if (CANONICAL_ID.test(reference)) {
197
- return record(await getNetwork(context.fetch, reference));
193
+ return record(await privateNetworkShowCapability.execute(context, { networkId: reference }));
198
194
  }
199
195
  const wanted = normalizedName(reference);
200
196
  const matches = (await fetchNetworks(context)).filter(
@@ -404,13 +400,11 @@ async function createPrivateNetwork(context, input) {
404
400
  }))
405
401
  )
406
402
  return declined(runtime);
407
- const created = await createNetwork(
408
- context.fetch,
409
- { name, ...(cidr ? { cidr } : {}) },
410
- {
411
- headers: mutationHeaders(idempotencyKey),
412
- }
413
- );
403
+ const created = await privateNetworkCreateCapability.execute(context, {
404
+ name,
405
+ ...(cidr ? { cidr } : {}),
406
+ idempotencyKey,
407
+ });
414
408
  return networkMutationExecution(runtime, networkFromMutation(created), false);
415
409
  }
416
410
 
@@ -456,14 +450,11 @@ async function updatePrivateNetwork(context, input) {
456
450
  }))
457
451
  )
458
452
  return declined(runtime);
459
- const updated = await updateNetwork(
460
- context.fetch,
461
- String(current.id),
462
- { name },
463
- {
464
- headers: mutationHeaders(idempotencyKey),
465
- }
466
- );
453
+ const updated = await privateNetworkUpdateCapability.execute(context, {
454
+ networkId: String(current.id),
455
+ name,
456
+ idempotencyKey,
457
+ });
467
458
  const network = networkFromMutation(updated);
468
459
  return runtime.result({
469
460
  data: { private_network: network, replayed: false },
@@ -496,8 +487,9 @@ async function deletePrivateNetwork(context, input) {
496
487
  }))
497
488
  )
498
489
  return declined(runtime);
499
- await deleteNetwork(context.fetch, String(projected.id), {
500
- headers: mutationHeaders(idempotencyKey),
490
+ await privateNetworkDeleteCapability.execute(context, {
491
+ networkId: String(projected.id),
492
+ idempotencyKey,
501
493
  });
502
494
  return runtime.result({
503
495
  data: { deleted: true, private_network: projected },
@@ -546,7 +538,7 @@ function vpnLines(connection) {
546
538
  }
547
539
 
548
540
  async function listVpnPayloads(context) {
549
- return vpnPayloadRows(await listNetworkPeerConfigs(context.fetch, "shared"));
541
+ return vpnPayloadRows(await vpnConnectionListCapability.execute(context, {}));
550
542
  }
551
543
 
552
544
  async function listVpnConnections(context, input) {
@@ -798,14 +790,11 @@ async function configureVpnConnection(context, input) {
798
790
  )
799
791
  return declined(runtime);
800
792
  const applied = record(
801
- await createNetworkPeer(
802
- context.fetch,
803
- "shared",
804
- { label: effectiveName, public_key: publicKey },
805
- {
806
- headers: mutationHeaders(idempotencyKey),
807
- }
808
- )
793
+ await vpnConnectionConfigureCapability.execute(context, {
794
+ label: effectiveName,
795
+ publicKey,
796
+ idempotencyKey,
797
+ })
809
798
  );
810
799
  const exported = await exportVpnConfig(runtime, input, applied.config, privateKeyPath, publicKey);
811
800
  const connection = projectVpnConnection(applied, target);
@@ -854,8 +843,9 @@ async function disconnectVpnConnection(context, input) {
854
843
  }))
855
844
  )
856
845
  return declined(runtime);
857
- await deleteNetworkPeer(context.fetch, "shared", String(connection.id), {
858
- headers: mutationHeaders(idempotencyKey),
846
+ await vpnConnectionDisconnectCapability.execute(context, {
847
+ peerId: String(connection.id),
848
+ idempotencyKey,
859
849
  });
860
850
  return runtime.result({
861
851
  data: { disconnected: true, vpn_connection: connection },
@@ -1026,7 +1016,9 @@ async function connectPrivateTarget(context, input) {
1026
1016
  });
1027
1017
  }
1028
1018
 
1029
- const shared = record(await getNetwork(context.fetch, "shared"));
1019
+ const shared = record(
1020
+ await privateNetworkShowCapability.execute(context, { networkId: "shared" })
1021
+ );
1030
1022
  const privateNetwork = projectNetwork({
1031
1023
  ...record(shared.network),
1032
1024
  id: "shared",
@@ -2,6 +2,8 @@ import {
2
2
  sshKeyListCapability,
3
3
  sshKeyAddCapability,
4
4
  sshKeyDeleteCapability,
5
+ sshKeyAssignmentListCapability,
6
+ sshKeyAssignmentAssignCapability,
5
7
  sshKeyAssignmentStatusCapability,
6
8
  sshKeyDeliveryStatus,
7
9
  } from "../vendor/capabilities/cli.js";
@@ -687,7 +689,7 @@ export async function materializeKey(context, plan, interaction, idempotencyKey)
687
689
 
688
690
  async function fetchAssignedKeys(context, reservationId) {
689
691
  return activeKeys(
690
- keysFromPayload(await orchestrator.listReservationSshKeys(context.fetch, reservationId))
692
+ keysFromPayload(await sshKeyAssignmentListCapability.execute(context, { reservationId }))
691
693
  );
692
694
  }
693
695
 
@@ -697,12 +699,11 @@ async function ensureAssignment(context, reservationId, key, idempotencyKey, int
697
699
  const existing = assigned.find((candidate) => resourceId(candidate) === keyId);
698
700
  if (existing) return { created: false, key: existing };
699
701
  const created = record(
700
- await orchestrator.addReservationSshKey(
701
- context.fetch,
702
+ await sshKeyAssignmentAssignCapability.execute(context, {
702
703
  reservationId,
703
- { ssh_key_id: keyId },
704
- { headers: { "Idempotency-Key": idempotencyKey } }
705
- )
704
+ keyId,
705
+ idempotencyKey,
706
+ })
706
707
  );
707
708
  if (resourceId(created) !== keyId) {
708
709
  interaction.error("The SSH-key assignment did not match the reviewed key.", {
@@ -1668,7 +1669,7 @@ async function executeWorkspaceCapability(
1668
1669
  code: "workspace_capability_unavailable",
1669
1670
  });
1670
1671
  }
1671
- const execution = await capability.execute(
1672
+ const execution = await (capability.cli?.execute ?? capability.execute)(
1672
1673
  workspaceStepContext(context, interaction, signal),
1673
1674
  input
1674
1675
  );
@@ -231,19 +231,6 @@ function deleteAccountSshKey(request, id, options) {
231
231
  method: "DELETE"
232
232
  });
233
233
  }
234
- function listClusterUserKeys(request, input) {
235
- return request(`${compute}/nodes/organizations/me/cluster-users${query2(input)}`, {
236
- method: "GET"
237
- });
238
- }
239
- function createClusterUserKey(request, body) {
240
- return request(`${compute}/nodes/organizations/me/cluster-users`, { method: "POST", body });
241
- }
242
- function deleteClusterUserKey(request, id) {
243
- return request(`${compute}/nodes/organizations/me/cluster-users/${encodeURIComponent(id)}`, {
244
- method: "DELETE"
245
- });
246
- }
247
234
 
248
235
  // ../../packages/api-client/dist/gateway/staff.js
249
236
  function addStaffReservationKey(request, id, body) {
@@ -307,12 +294,10 @@ export {
307
294
  claimSupplierIntakeEditor,
308
295
  consoleMcpPath,
309
296
  createAccountSshKey,
310
- createClusterUserKey,
311
297
  createPylonIssue,
312
298
  createStaffTestMember,
313
299
  createSupportThread,
314
300
  deleteAccountSshKey,
315
- deleteClusterUserKey,
316
301
  deleteSupplierIntakeDocument,
317
302
  deployReservationStorage,
318
303
  deployStaffNode,
@@ -338,7 +323,6 @@ export {
338
323
  linkPylonAccount,
339
324
  linkPylonIssue,
340
325
  listAccountSshKeys,
341
- listClusterUserKeys,
342
326
  listClusters,
343
327
  listGithubCommitPulls,
344
328
  listGithubCommits,
@@ -3359,19 +3359,6 @@ function deleteAccountSshKey(request, id, options) {
3359
3359
  method: "DELETE"
3360
3360
  });
3361
3361
  }
3362
- function listClusterUserKeys(request, input) {
3363
- return request(`${compute}/nodes/organizations/me/cluster-users${query2(input)}`, {
3364
- method: "GET"
3365
- });
3366
- }
3367
- function createClusterUserKey(request, body2) {
3368
- return request(`${compute}/nodes/organizations/me/cluster-users`, { method: "POST", body: body2 });
3369
- }
3370
- function deleteClusterUserKey(request, id) {
3371
- return request(`${compute}/nodes/organizations/me/cluster-users/${encodeURIComponent(id)}`, {
3372
- method: "DELETE"
3373
- });
3374
- }
3375
3362
 
3376
3363
  // ../../packages/api-client/dist/gateway/index.js
3377
3364
  function getCliStatus(request) {
@@ -3474,6 +3461,7 @@ var publicKeyInput = z18.object({
3474
3461
  confirm: z18.boolean().optional()
3475
3462
  });
3476
3463
  var keyIdInput = z18.object({ keyId: z18.string(), confirm: z18.boolean().optional() });
3464
+ var reservationKeyInput = publicKeyInput.extend({ reservationId: z18.string() });
3477
3465
  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
3466
  var keyListInput = z18.object({
3479
3467
  $positionals: positionals2,
@@ -3768,7 +3756,7 @@ var sshKeyListCapability = defineCapability({
3768
3756
  mutation: "read",
3769
3757
  input: pageInput.extend({ status: z18.enum(["active", "all"]).optional() }),
3770
3758
  description: "List a page of account SSH keys. Pass next_cursor as cursor to continue.",
3771
- mcp: { name: "ssh_keys_list", input: pageInput },
3759
+ mcp: { name: "ssh_keys_list", aliases: ["cluster_users_list"], input: pageInput },
3772
3760
  slack: false,
3773
3761
  cli: {
3774
3762
  command: ["ssh-keys", "list"],
@@ -3802,7 +3790,7 @@ var sshKeyAddCapability = defineCapability({
3802
3790
  idempotencyKey: z18.string().optional()
3803
3791
  }),
3804
3792
  description: `Add an SSH public key to the account. ${ADDED_KEY_OUTCOME}`,
3805
- mcp: { name: "ssh_keys_add", input: publicKeyInput },
3793
+ mcp: { name: "ssh_keys_add", aliases: ["cluster_users_add"], input: publicKeyInput },
3806
3794
  slack: false,
3807
3795
  cli: {
3808
3796
  command: ["ssh-keys", "add"],
@@ -3830,7 +3818,7 @@ var sshKeyDeleteCapability = defineCapability({
3830
3818
  mutation: "preview-confirm",
3831
3819
  input: keyIdInput.extend({ idempotencyKey: z18.string().optional() }),
3832
3820
  description: "Delete an SSH key from the account.",
3833
- mcp: { name: "ssh_keys_delete", input: keyIdInput },
3821
+ mcp: { name: "ssh_keys_delete", aliases: ["cluster_users_revoke"], input: keyIdInput },
3834
3822
  slack: false,
3835
3823
  cli: {
3836
3824
  command: ["ssh-keys", "delete"],
@@ -3855,15 +3843,19 @@ var sshKeyDeleteCapability = defineCapability({
3855
3843
  },
3856
3844
  execute: async (context, input) => await deleteAccountSshKey(context.fetch, input.keyId, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0) ?? { deleted: true }
3857
3845
  });
3858
- var sshKeyAssignmentListCapability = cliOnly({
3846
+ var sshKeyAssignmentListCapability = defineCapability({
3859
3847
  id: "access.ssh_key_assignments.list",
3860
3848
  domain: "access",
3861
3849
  roles: ["user"],
3862
3850
  mutation: "read",
3863
- input: keyListInput,
3864
- description: "List SSH keys assigned to one capacity reservation.",
3851
+ input: z18.object({ reservationId: z18.string() }),
3852
+ description: "List SSH keys registered for a reservation.",
3853
+ mcp: { name: "access_keys_list" },
3854
+ slack: false,
3865
3855
  cli: {
3866
3856
  command: ["ssh-keys", "assignments", "list"],
3857
+ input: keyListInput,
3858
+ execute: executeSshKeys("assignments.list"),
3867
3859
  vnext: {
3868
3860
  arguments: "semantic",
3869
3861
  audience: "customer",
@@ -3876,17 +3868,24 @@ var sshKeyAssignmentListCapability = cliOnly({
3876
3868
  related: ["ssh-keys assignments status"]
3877
3869
  }
3878
3870
  },
3879
- execute: executeSshKeys("assignments.list")
3871
+ execute: (context, input) => listReservationSshKeys(context.fetch, input.reservationId)
3880
3872
  });
3881
- var sshKeyAssignmentAssignCapability = cliOnly({
3873
+ var sshKeyAssignmentAssignCapability = defineCapability({
3882
3874
  id: "access.ssh_key_assignments.assign",
3883
3875
  domain: "access",
3884
3876
  roles: ["user"],
3885
3877
  mutation: "preview-confirm",
3886
- input: keyMutationInput,
3887
- description: "Assign one existing organization SSH key to one capacity reservation.",
3878
+ input: z18.union([
3879
+ reservationKeyInput.extend({ idempotencyKey: z18.string().optional() }),
3880
+ keyIdInput.extend({ reservationId: z18.string(), idempotencyKey: z18.string().optional() })
3881
+ ]),
3882
+ description: `Add an SSH key to a reservation. ${ADDED_KEY_OUTCOME}`,
3883
+ mcp: { name: "access_keys_add", input: reservationKeyInput },
3884
+ slack: false,
3888
3885
  cli: {
3889
3886
  command: ["ssh-keys", "assignments", "assign"],
3887
+ input: keyMutationInput,
3888
+ execute: executeSshKeys("assignments.assign"),
3890
3889
  vnext: {
3891
3890
  arguments: "semantic",
3892
3891
  audience: "customer",
@@ -3905,7 +3904,7 @@ var sshKeyAssignmentAssignCapability = cliOnly({
3905
3904
  related: ["ssh-keys assignments status"]
3906
3905
  }
3907
3906
  },
3908
- execute: executeSshKeys("assignments.assign")
3907
+ execute: (context, input) => addReservationSshKey(context.fetch, input.reservationId, "keyId" in input ? { ssh_key_id: input.keyId } : { public_key: input.publicKey, label: input.label ?? null }, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0)
3909
3908
  });
3910
3909
  var sshKeyAssignmentSyncCapability = cliOnly({
3911
3910
  id: "access.ssh_key_assignments.sync",
@@ -4047,29 +4046,6 @@ var accessVerbCapabilities = [
4047
4046
  ssh_key_ids: input.sshKeyIds
4048
4047
  })
4049
4048
  }),
4050
- defineCapability({
4051
- id: "access.keys.list",
4052
- domain: "access",
4053
- roles: ["user"],
4054
- description: "List SSH keys registered for a reservation.",
4055
- mutation: "read",
4056
- input: z18.object({ reservationId: z18.string() }),
4057
- slack: false,
4058
- execute: (ctx, input) => listReservationSshKeys(ctx.fetch, input.reservationId)
4059
- }),
4060
- defineCapability({
4061
- id: "access.keys.add",
4062
- domain: "access",
4063
- roles: ["user"],
4064
- description: `Add an SSH key to a reservation. ${ADDED_KEY_OUTCOME}`,
4065
- mutation: "preview-confirm",
4066
- input: publicKeyInput.extend({ reservationId: z18.string() }),
4067
- slack: false,
4068
- execute: (ctx, input) => addReservationSshKey(ctx.fetch, input.reservationId, {
4069
- label: input.label ?? null,
4070
- public_key: input.publicKey
4071
- })
4072
- }),
4073
4049
  defineCapability({
4074
4050
  id: "machine.reboot",
4075
4051
  domain: "access",
@@ -4091,43 +4067,6 @@ var accessVerbCapabilities = [
4091
4067
  mcp: { name: "nodes_hard_reset" },
4092
4068
  slack: false,
4093
4069
  execute: rebootMachine("hard_reset")
4094
- }),
4095
- defineCapability({
4096
- id: "cluster_users.list",
4097
- domain: "access",
4098
- roles: ["user"],
4099
- description: "List a page of organization cluster-user SSH keys. Pass next_cursor as cursor to continue.",
4100
- mutation: "read",
4101
- input: pageInput,
4102
- slack: false,
4103
- execute: (ctx, input) => listClusterUserKeys(ctx.fetch, {
4104
- status: "all",
4105
- limit: input.limit ?? 25,
4106
- ...input.cursor ? { cursor: input.cursor } : {}
4107
- })
4108
- }),
4109
- defineCapability({
4110
- id: "cluster_users.add",
4111
- domain: "access",
4112
- roles: ["user"],
4113
- description: "Add a cluster-user SSH public key to the organization. Registers the same organization key as ssh_keys_add; a key already registered is returned as-is with its existing label.",
4114
- mutation: "preview-confirm",
4115
- input: publicKeyInput,
4116
- slack: false,
4117
- execute: (ctx, input) => createClusterUserKey(ctx.fetch, {
4118
- public_key: input.publicKey,
4119
- label: input.label
4120
- })
4121
- }),
4122
- defineCapability({
4123
- id: "cluster_users.revoke",
4124
- domain: "access",
4125
- roles: ["user"],
4126
- description: "Revoke a cluster-user SSH key from the organization.",
4127
- mutation: "preview-confirm",
4128
- input: keyIdInput,
4129
- slack: false,
4130
- execute: async (ctx, input) => await deleteClusterUserKey(ctx.fetch, input.keyId) ?? { deleted: true }
4131
4070
  })
4132
4071
  ];
4133
4072
 
@@ -5765,24 +5704,54 @@ var vpnConfigureInput = z29.object({
5765
5704
  output: z29.string().optional(),
5766
5705
  privateKey: z29.string().optional()
5767
5706
  }).strict();
5768
- function networkExecutor(context) {
5769
- const runtime3 = context.cli?.interaction;
5770
- if (!runtime3?.networks)
5771
- throw new Error("This capability must execute through the Ornn CLI network runtime.");
5772
- return runtime3.networks.bind(runtime3);
5707
+ function executeNetwork(command) {
5708
+ return (context, input) => {
5709
+ const runtime3 = context.cli?.interaction;
5710
+ if (!runtime3?.networks)
5711
+ throw new Error("This capability must execute through the Ornn CLI network runtime.");
5712
+ return runtime3.networks(command, input, context);
5713
+ };
5773
5714
  }
5774
- function customerResource(specification) {
5775
- return defineCapability({ ...specification, mcp: false, slack: false });
5715
+ function mutationOptions(idempotencyKey) {
5716
+ return idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : void 0;
5776
5717
  }
5777
- var privateNetworkListCapability = customerResource({
5718
+ var networkIdInput = z29.object({ networkId: z29.string() });
5719
+ var networkCreateFields = z29.object({
5720
+ name: z29.string(),
5721
+ cidr: z29.string().optional(),
5722
+ description: z29.string().optional(),
5723
+ confirm: z29.boolean().optional()
5724
+ });
5725
+ var networkUpdateFields = z29.object({
5726
+ networkId: z29.string(),
5727
+ name: z29.string().optional(),
5728
+ description: z29.string().optional(),
5729
+ clearDescription: z29.boolean().optional(),
5730
+ confirm: z29.boolean().optional()
5731
+ }).refine((input) => !(input.clearDescription && input.description !== void 0), {
5732
+ message: "Use either description or clearDescription, not both."
5733
+ }).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
5734
+ var networkDeleteInput = networkIdInput.extend({ confirm: z29.boolean().optional() });
5735
+ var vpnPeerCreateInput = z29.object({
5736
+ publicKey: z29.string(),
5737
+ label: z29.string().optional(),
5738
+ confirm: z29.boolean().optional()
5739
+ });
5740
+ var vpnPeerDeleteInput = z29.object({ peerId: z29.string(), confirm: z29.boolean().optional() });
5741
+ var reservationInput = { reservationId: z29.string() };
5742
+ var privateNetworkListCapability = defineCapability({
5778
5743
  id: "networks.list",
5779
5744
  domain: "networks",
5780
5745
  roles: ["user"],
5781
5746
  mutation: "read",
5782
- input: listInput,
5783
- description: "List customer private networks with bounded pagination.",
5747
+ input: z29.object({}),
5748
+ description: "List this tenant's private networks.",
5749
+ mcp: { name: "networks_list" },
5750
+ slack: false,
5784
5751
  cli: {
5785
5752
  command: ["private-networks", "list"],
5753
+ input: listInput,
5754
+ execute: executeNetwork("private-networks list"),
5786
5755
  vnext: {
5787
5756
  arguments: "semantic",
5788
5757
  audience: "customer",
@@ -5794,17 +5763,21 @@ var privateNetworkListCapability = customerResource({
5794
5763
  related: ["private-networks show"]
5795
5764
  }
5796
5765
  },
5797
- execute: (ctx, input) => networkExecutor(ctx)("private-networks list", input, ctx)
5766
+ execute: (ctx) => listNetworks(ctx.fetch)
5798
5767
  });
5799
- var privateNetworkShowCapability = customerResource({
5768
+ var privateNetworkShowCapability = defineCapability({
5800
5769
  id: "networks.show",
5801
5770
  domain: "networks",
5802
5771
  roles: ["user"],
5803
5772
  mutation: "read",
5804
- input: noOptionsInput,
5805
- description: "Show one exact customer private network.",
5773
+ input: networkIdInput,
5774
+ description: "Show a single private network by id.",
5775
+ mcp: { name: "networks_show" },
5776
+ slack: false,
5806
5777
  cli: {
5807
5778
  command: ["private-networks", "show"],
5779
+ input: noOptionsInput,
5780
+ execute: executeNetwork("private-networks show"),
5808
5781
  vnext: {
5809
5782
  arguments: "semantic",
5810
5783
  audience: "customer",
@@ -5817,17 +5790,21 @@ var privateNetworkShowCapability = customerResource({
5817
5790
  related: ["private-networks list"]
5818
5791
  }
5819
5792
  },
5820
- execute: (ctx, input) => networkExecutor(ctx)("private-networks show", input, ctx)
5793
+ execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
5821
5794
  });
5822
- var privateNetworkCreateCapability = customerResource({
5795
+ var privateNetworkCreateCapability = defineCapability({
5823
5796
  id: "networks.create",
5824
5797
  domain: "networks",
5825
5798
  roles: ["user"],
5826
5799
  mutation: "preview-confirm",
5827
- input: networkCreateInput,
5828
- description: "Create or safely replay a named customer private network.",
5800
+ input: networkCreateFields.extend({ idempotencyKey: z29.string().optional() }),
5801
+ description: "Create a private network.",
5802
+ mcp: { name: "networks_create", input: networkCreateFields },
5803
+ slack: false,
5829
5804
  cli: {
5830
5805
  command: ["private-networks", "create"],
5806
+ input: networkCreateInput,
5807
+ execute: executeNetwork("private-networks create"),
5831
5808
  vnext: {
5832
5809
  arguments: "semantic",
5833
5810
  audience: "customer",
@@ -5841,17 +5818,21 @@ var privateNetworkCreateCapability = customerResource({
5841
5818
  related: ["private-networks list"]
5842
5819
  }
5843
5820
  },
5844
- execute: (ctx, input) => networkExecutor(ctx)("private-networks create", input, ctx)
5821
+ execute: (ctx, input) => createNetwork(ctx.fetch, { name: input.name, cidr: input.cidr ?? null, description: input.description ?? null }, mutationOptions(input.idempotencyKey))
5845
5822
  });
5846
- var privateNetworkUpdateCapability = customerResource({
5823
+ var privateNetworkUpdateCapability = defineCapability({
5847
5824
  id: "networks.update",
5848
5825
  domain: "networks",
5849
5826
  roles: ["user"],
5850
5827
  mutation: "preview-confirm",
5851
- input: networkUpdateInput,
5852
- description: "Rename one exact customer private network.",
5828
+ input: networkUpdateFields.safeExtend({ idempotencyKey: z29.string().optional() }),
5829
+ description: "Update a private network's name or description. Pass clearDescription: true to null out the description instead of setting it.",
5830
+ mcp: { name: "networks_update", input: networkUpdateFields },
5831
+ slack: false,
5853
5832
  cli: {
5854
5833
  command: ["private-networks", "update"],
5834
+ input: networkUpdateInput,
5835
+ execute: executeNetwork("private-networks update"),
5855
5836
  vnext: {
5856
5837
  arguments: "semantic",
5857
5838
  audience: "customer",
@@ -5865,17 +5846,24 @@ var privateNetworkUpdateCapability = customerResource({
5865
5846
  related: ["private-networks show"]
5866
5847
  }
5867
5848
  },
5868
- execute: (ctx, input) => networkExecutor(ctx)("private-networks update", input, ctx)
5849
+ execute: (ctx, input) => updateNetwork(ctx.fetch, input.networkId, {
5850
+ ...input.name !== void 0 ? { name: input.name } : {},
5851
+ ...input.clearDescription ? { description: null } : input.description !== void 0 ? { description: input.description } : {}
5852
+ }, mutationOptions(input.idempotencyKey))
5869
5853
  });
5870
- var privateNetworkDeleteCapability = customerResource({
5854
+ var privateNetworkDeleteCapability = defineCapability({
5871
5855
  id: "networks.delete",
5872
5856
  domain: "networks",
5873
5857
  roles: ["user"],
5874
5858
  mutation: "preview-confirm",
5875
- input: noOptionsInput,
5876
- description: "Delete an unattached customer private network.",
5859
+ input: networkDeleteInput.extend({ idempotencyKey: z29.string().optional() }),
5860
+ description: "Delete a private network.",
5861
+ mcp: { name: "networks_delete", input: networkDeleteInput },
5862
+ slack: false,
5877
5863
  cli: {
5878
5864
  command: ["private-networks", "delete"],
5865
+ input: noOptionsInput,
5866
+ execute: executeNetwork("private-networks delete"),
5879
5867
  vnext: {
5880
5868
  arguments: "semantic",
5881
5869
  audience: "customer",
@@ -5889,17 +5877,24 @@ var privateNetworkDeleteCapability = customerResource({
5889
5877
  related: ["private-networks list"]
5890
5878
  }
5891
5879
  },
5892
- execute: (ctx, input) => networkExecutor(ctx)("private-networks delete", input, ctx)
5880
+ execute: async (ctx, input) => {
5881
+ await deleteNetwork(ctx.fetch, input.networkId, mutationOptions(input.idempotencyKey));
5882
+ return { deleted: true, network_id: input.networkId };
5883
+ }
5893
5884
  });
5894
- var vpnConnectionListCapability = customerResource({
5885
+ var vpnConnectionListCapability = defineCapability({
5895
5886
  id: "vpn.connections.list",
5896
5887
  domain: "vpn",
5897
5888
  roles: ["user"],
5898
5889
  mutation: "read",
5899
- input: listInput,
5900
- description: "List named VPN connections for one exact private target.",
5890
+ input: z29.object({}),
5891
+ description: "List WireGuard VPN peers registered on a reservation.",
5892
+ mcp: { name: "vpn_peers_list", input: z29.object(reservationInput) },
5893
+ slack: false,
5901
5894
  cli: {
5902
5895
  command: ["vpn-connections", "list"],
5896
+ input: listInput,
5897
+ execute: executeNetwork("vpn-connections list"),
5903
5898
  vnext: {
5904
5899
  arguments: "semantic",
5905
5900
  audience: "customer",
@@ -5912,17 +5907,24 @@ var vpnConnectionListCapability = customerResource({
5912
5907
  related: ["vpn-connections configure", "connect"]
5913
5908
  }
5914
5909
  },
5915
- execute: (ctx, input) => networkExecutor(ctx)("vpn-connections list", input, ctx)
5910
+ execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
5916
5911
  });
5917
- var vpnConnectionConfigureCapability = customerResource({
5912
+ var vpnConnectionConfigureCapability = defineCapability({
5918
5913
  id: "vpn.connections.configure",
5919
5914
  domain: "vpn",
5920
5915
  roles: ["user"],
5921
5916
  mutation: "preview-confirm",
5922
- input: vpnConfigureInput,
5923
- description: "Configure and explicitly export one named VPN connection.",
5917
+ input: vpnPeerCreateInput.extend({ idempotencyKey: z29.string().optional() }),
5918
+ description: "Register a WireGuard VPN peer public key on a reservation.",
5919
+ mcp: {
5920
+ name: "vpn_peers_create",
5921
+ input: z29.object({ ...reservationInput, ...vpnPeerCreateInput.shape })
5922
+ },
5923
+ slack: false,
5924
5924
  cli: {
5925
5925
  command: ["vpn-connections", "configure"],
5926
+ input: vpnConfigureInput,
5927
+ execute: executeNetwork("vpn-connections configure"),
5926
5928
  vnext: {
5927
5929
  arguments: "semantic",
5928
5930
  audience: "customer",
@@ -5937,17 +5939,24 @@ var vpnConnectionConfigureCapability = customerResource({
5937
5939
  related: ["connect", "vpn-connections disconnect"]
5938
5940
  }
5939
5941
  },
5940
- execute: (ctx, input) => networkExecutor(ctx)("vpn-connections configure", input, ctx)
5942
+ execute: (ctx, input) => createNetworkPeer(ctx.fetch, "shared", { public_key: input.publicKey, label: input.label ?? null }, mutationOptions(input.idempotencyKey))
5941
5943
  });
5942
- var vpnConnectionDisconnectCapability = customerResource({
5944
+ var vpnConnectionDisconnectCapability = defineCapability({
5943
5945
  id: "vpn.connections.disconnect",
5944
5946
  domain: "vpn",
5945
5947
  roles: ["user"],
5946
5948
  mutation: "preview-confirm",
5947
- input: noOptionsInput,
5948
- description: "Disconnect one exact named VPN connection.",
5949
+ input: vpnPeerDeleteInput.extend({ idempotencyKey: z29.string().optional() }),
5950
+ description: "Revoke a WireGuard VPN peer from a reservation.",
5951
+ mcp: {
5952
+ name: "vpn_peers_delete",
5953
+ input: z29.object({ ...reservationInput, ...vpnPeerDeleteInput.shape })
5954
+ },
5955
+ slack: false,
5949
5956
  cli: {
5950
5957
  command: ["vpn-connections", "disconnect"],
5958
+ input: noOptionsInput,
5959
+ execute: executeNetwork("vpn-connections disconnect"),
5951
5960
  vnext: {
5952
5961
  arguments: "semantic",
5953
5962
  audience: "customer",
@@ -5965,15 +5974,17 @@ var vpnConnectionDisconnectCapability = customerResource({
5965
5974
  related: ["vpn-connections configure"]
5966
5975
  }
5967
5976
  },
5968
- execute: (ctx, input) => networkExecutor(ctx)("vpn-connections disconnect", input, ctx)
5977
+ execute: async (ctx, input) => await deleteNetworkPeer(ctx.fetch, "shared", input.peerId, mutationOptions(input.idempotencyKey)) ?? { deleted: true }
5969
5978
  });
5970
- var connectCapability = customerResource({
5979
+ var connectCapability = defineCapability({
5971
5980
  id: "vpn.connect",
5972
5981
  domain: "vpn",
5973
5982
  roles: ["user"],
5974
5983
  mutation: "read",
5975
5984
  input: connectInput2,
5976
5985
  description: "Connect to one exact native machine or cluster target through recoverable private transport when required.",
5986
+ mcp: false,
5987
+ slack: false,
5977
5988
  cli: {
5978
5989
  command: ["connect"],
5979
5990
  vnext: {
@@ -5995,7 +6006,7 @@ var connectCapability = customerResource({
5995
6006
  related: ["launch", "vpn-connections configure", "clusters show"]
5996
6007
  }
5997
6008
  },
5998
- execute: (ctx, input) => networkExecutor(ctx)("connect", input, ctx)
6009
+ execute: executeNetwork("connect")
5999
6010
  });
6000
6011
  var networkCapabilities = [
6001
6012
  privateNetworkListCapability,
@@ -6008,133 +6019,6 @@ var networkCapabilities = [
6008
6019
  vpnConnectionDisconnectCapability,
6009
6020
  connectCapability
6010
6021
  ];
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()
6017
- }).refine((input) => !(input.clearDescription && input.description !== void 0), {
6018
- message: "Use either description or clearDescription, not both."
6019
- }).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
6020
- var networkVerbCapabilities = [
6021
- defineCapability({
6022
- id: "network.list",
6023
- domain: "networks",
6024
- roles: ["user"],
6025
- description: "List this tenant's private networks.",
6026
- mutation: "read",
6027
- input: z29.object({}),
6028
- mcp: { name: "networks_list" },
6029
- slack: false,
6030
- execute: (ctx) => listNetworks(ctx.fetch)
6031
- }),
6032
- defineCapability({
6033
- id: "network.show",
6034
- domain: "networks",
6035
- roles: ["user"],
6036
- description: "Show a single private network by id.",
6037
- mutation: "read",
6038
- input: z29.object({ networkId: z29.string() }),
6039
- mcp: { name: "networks_show" },
6040
- slack: false,
6041
- execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
6042
- }),
6043
- defineCapability({
6044
- id: "network.create",
6045
- domain: "networks",
6046
- roles: ["user"],
6047
- description: "Create a private network.",
6048
- mutation: "preview-confirm",
6049
- input: z29.object({
6050
- name: z29.string(),
6051
- cidr: z29.string().optional(),
6052
- description: z29.string().optional(),
6053
- confirm: z29.boolean().optional()
6054
- }),
6055
- mcp: { name: "networks_create" },
6056
- slack: false,
6057
- execute: (ctx, input) => createNetwork(ctx.fetch, {
6058
- name: input.name,
6059
- cidr: input.cidr ?? null,
6060
- description: input.description ?? null
6061
- })
6062
- }),
6063
- defineCapability({
6064
- id: "network.update",
6065
- domain: "networks",
6066
- roles: ["user"],
6067
- description: "Update a private network's name or description. Pass clearDescription: true to null out the description instead of setting it.",
6068
- mutation: "preview-confirm",
6069
- input: networkUpdateFields,
6070
- mcp: { name: "networks_update" },
6071
- slack: false,
6072
- execute: (ctx, input) => updateNetwork(ctx.fetch, input.networkId, {
6073
- ...input.name !== void 0 ? { name: input.name } : {},
6074
- ...input.clearDescription ? { description: null } : input.description !== void 0 ? { description: input.description } : {}
6075
- })
6076
- }),
6077
- defineCapability({
6078
- id: "network.delete",
6079
- domain: "networks",
6080
- roles: ["user"],
6081
- description: "Delete a private network.",
6082
- mutation: "preview-confirm",
6083
- input: z29.object({ networkId: z29.string(), confirm: z29.boolean().optional() }),
6084
- mcp: { name: "networks_delete" },
6085
- slack: false,
6086
- // The route answers 204, so report which network went.
6087
- execute: async (ctx, input) => {
6088
- await deleteNetwork(ctx.fetch, input.networkId);
6089
- return { deleted: true, network_id: input.networkId };
6090
- }
6091
- }),
6092
- defineCapability({
6093
- id: "vpn.peers.list",
6094
- domain: "networks",
6095
- roles: ["user"],
6096
- description: "List WireGuard VPN peers registered on a reservation.",
6097
- mutation: "read",
6098
- input: z29.object({ reservationId: z29.string() }),
6099
- mcp: { name: "vpn_peers_list" },
6100
- slack: false,
6101
- execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
6102
- }),
6103
- defineCapability({
6104
- id: "vpn.peers.create",
6105
- domain: "networks",
6106
- roles: ["user"],
6107
- description: "Register a WireGuard VPN peer public key on a reservation.",
6108
- mutation: "preview-confirm",
6109
- input: z29.object({
6110
- reservationId: z29.string(),
6111
- publicKey: z29.string(),
6112
- label: z29.string().optional(),
6113
- confirm: z29.boolean().optional()
6114
- }),
6115
- mcp: { name: "vpn_peers_create" },
6116
- slack: false,
6117
- execute: (ctx, input) => createNetworkPeer(ctx.fetch, "shared", {
6118
- public_key: input.publicKey,
6119
- label: input.label ?? null
6120
- })
6121
- }),
6122
- defineCapability({
6123
- id: "vpn.peers.delete",
6124
- domain: "networks",
6125
- roles: ["user"],
6126
- description: "Revoke a WireGuard VPN peer from a reservation.",
6127
- mutation: "preview-confirm",
6128
- input: z29.object({
6129
- reservationId: z29.string(),
6130
- peerId: z29.string(),
6131
- confirm: z29.boolean().optional()
6132
- }),
6133
- mcp: { name: "vpn_peers_delete" },
6134
- slack: false,
6135
- execute: async (ctx, input) => await deleteNetworkPeer(ctx.fetch, "shared", input.peerId) ?? { deleted: true }
6136
- })
6137
- ];
6138
6022
 
6139
6023
  // ../../packages/capabilities/dist/capabilities/registry.js
6140
6024
  import { z as z30 } from "zod";
@@ -6724,8 +6608,8 @@ var volumeCapabilities = [
6724
6608
  related: ["volumes files list"]
6725
6609
  })
6726
6610
  ];
6727
- var reservationInput = z32.object({ reservationId: z32.string() });
6728
- var reservationWrite = reservationInput.extend({ confirm: z32.boolean().optional() });
6611
+ var reservationInput2 = z32.object({ reservationId: z32.string() });
6612
+ var reservationWrite = reservationInput2.extend({ confirm: z32.boolean().optional() });
6729
6613
  var driveInput = z32.object({ driveId: z32.string() });
6730
6614
  var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
6731
6615
  var bucketConnectInput = z32.object({
@@ -6777,7 +6661,7 @@ var storageVerbCapabilities = [
6777
6661
  roles: ["user"],
6778
6662
  description: "Show a reservation's storage deployment (attachment) status.",
6779
6663
  mutation: "read",
6780
- input: reservationInput,
6664
+ input: reservationInput2,
6781
6665
  slack: false,
6782
6666
  execute: (ctx, input) => getReservationStorageAttachment(ctx.fetch, input.reservationId)
6783
6667
  }),
@@ -6971,7 +6855,6 @@ var catalog = [
6971
6855
  ...evidenceCapabilities,
6972
6856
  ...observabilityCapabilities,
6973
6857
  ...clusterCapabilities,
6974
- ...networkVerbCapabilities,
6975
6858
  ...accessVerbCapabilities,
6976
6859
  ...storageVerbCapabilities,
6977
6860
  reservationKeysPushCapability,
@@ -7263,10 +7146,20 @@ export {
7263
7146
  metricsHistoryCapability,
7264
7147
  metricsSnapshotCapability,
7265
7148
  parseHardwareCatalog,
7149
+ privateNetworkCreateCapability,
7150
+ privateNetworkDeleteCapability,
7151
+ privateNetworkListCapability,
7152
+ privateNetworkShowCapability,
7153
+ privateNetworkUpdateCapability,
7266
7154
  sshKeyAddCapability,
7155
+ sshKeyAssignmentAssignCapability,
7156
+ sshKeyAssignmentListCapability,
7267
7157
  sshKeyAssignmentStatusCapability,
7268
7158
  sshKeyDeleteCapability,
7269
7159
  sshKeyDeliveryStatus,
7270
7160
  sshKeyListCapability,
7271
- volumeFilesListCapability
7161
+ volumeFilesListCapability,
7162
+ vpnConnectionConfigureCapability,
7163
+ vpnConnectionDisconnectCapability,
7164
+ vpnConnectionListCapability
7272
7165
  };