@ornncompute/cli 1.0.143 → 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
@@ -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.143",
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",
@@ -5704,24 +5704,54 @@ var vpnConfigureInput = z29.object({
5704
5704
  output: z29.string().optional(),
5705
5705
  privateKey: z29.string().optional()
5706
5706
  }).strict();
5707
- function networkExecutor(context) {
5708
- const runtime3 = context.cli?.interaction;
5709
- if (!runtime3?.networks)
5710
- throw new Error("This capability must execute through the Ornn CLI network runtime.");
5711
- 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
+ };
5712
5714
  }
5713
- function customerResource(specification) {
5714
- return defineCapability({ ...specification, mcp: false, slack: false });
5715
+ function mutationOptions(idempotencyKey) {
5716
+ return idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : void 0;
5715
5717
  }
5716
- 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({
5717
5743
  id: "networks.list",
5718
5744
  domain: "networks",
5719
5745
  roles: ["user"],
5720
5746
  mutation: "read",
5721
- input: listInput,
5722
- 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,
5723
5751
  cli: {
5724
5752
  command: ["private-networks", "list"],
5753
+ input: listInput,
5754
+ execute: executeNetwork("private-networks list"),
5725
5755
  vnext: {
5726
5756
  arguments: "semantic",
5727
5757
  audience: "customer",
@@ -5733,17 +5763,21 @@ var privateNetworkListCapability = customerResource({
5733
5763
  related: ["private-networks show"]
5734
5764
  }
5735
5765
  },
5736
- execute: (ctx, input) => networkExecutor(ctx)("private-networks list", input, ctx)
5766
+ execute: (ctx) => listNetworks(ctx.fetch)
5737
5767
  });
5738
- var privateNetworkShowCapability = customerResource({
5768
+ var privateNetworkShowCapability = defineCapability({
5739
5769
  id: "networks.show",
5740
5770
  domain: "networks",
5741
5771
  roles: ["user"],
5742
5772
  mutation: "read",
5743
- input: noOptionsInput,
5744
- 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,
5745
5777
  cli: {
5746
5778
  command: ["private-networks", "show"],
5779
+ input: noOptionsInput,
5780
+ execute: executeNetwork("private-networks show"),
5747
5781
  vnext: {
5748
5782
  arguments: "semantic",
5749
5783
  audience: "customer",
@@ -5756,17 +5790,21 @@ var privateNetworkShowCapability = customerResource({
5756
5790
  related: ["private-networks list"]
5757
5791
  }
5758
5792
  },
5759
- execute: (ctx, input) => networkExecutor(ctx)("private-networks show", input, ctx)
5793
+ execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
5760
5794
  });
5761
- var privateNetworkCreateCapability = customerResource({
5795
+ var privateNetworkCreateCapability = defineCapability({
5762
5796
  id: "networks.create",
5763
5797
  domain: "networks",
5764
5798
  roles: ["user"],
5765
5799
  mutation: "preview-confirm",
5766
- input: networkCreateInput,
5767
- 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,
5768
5804
  cli: {
5769
5805
  command: ["private-networks", "create"],
5806
+ input: networkCreateInput,
5807
+ execute: executeNetwork("private-networks create"),
5770
5808
  vnext: {
5771
5809
  arguments: "semantic",
5772
5810
  audience: "customer",
@@ -5780,17 +5818,21 @@ var privateNetworkCreateCapability = customerResource({
5780
5818
  related: ["private-networks list"]
5781
5819
  }
5782
5820
  },
5783
- 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))
5784
5822
  });
5785
- var privateNetworkUpdateCapability = customerResource({
5823
+ var privateNetworkUpdateCapability = defineCapability({
5786
5824
  id: "networks.update",
5787
5825
  domain: "networks",
5788
5826
  roles: ["user"],
5789
5827
  mutation: "preview-confirm",
5790
- input: networkUpdateInput,
5791
- 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,
5792
5832
  cli: {
5793
5833
  command: ["private-networks", "update"],
5834
+ input: networkUpdateInput,
5835
+ execute: executeNetwork("private-networks update"),
5794
5836
  vnext: {
5795
5837
  arguments: "semantic",
5796
5838
  audience: "customer",
@@ -5804,17 +5846,24 @@ var privateNetworkUpdateCapability = customerResource({
5804
5846
  related: ["private-networks show"]
5805
5847
  }
5806
5848
  },
5807
- 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))
5808
5853
  });
5809
- var privateNetworkDeleteCapability = customerResource({
5854
+ var privateNetworkDeleteCapability = defineCapability({
5810
5855
  id: "networks.delete",
5811
5856
  domain: "networks",
5812
5857
  roles: ["user"],
5813
5858
  mutation: "preview-confirm",
5814
- input: noOptionsInput,
5815
- 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,
5816
5863
  cli: {
5817
5864
  command: ["private-networks", "delete"],
5865
+ input: noOptionsInput,
5866
+ execute: executeNetwork("private-networks delete"),
5818
5867
  vnext: {
5819
5868
  arguments: "semantic",
5820
5869
  audience: "customer",
@@ -5828,17 +5877,24 @@ var privateNetworkDeleteCapability = customerResource({
5828
5877
  related: ["private-networks list"]
5829
5878
  }
5830
5879
  },
5831
- 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
+ }
5832
5884
  });
5833
- var vpnConnectionListCapability = customerResource({
5885
+ var vpnConnectionListCapability = defineCapability({
5834
5886
  id: "vpn.connections.list",
5835
5887
  domain: "vpn",
5836
5888
  roles: ["user"],
5837
5889
  mutation: "read",
5838
- input: listInput,
5839
- 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,
5840
5894
  cli: {
5841
5895
  command: ["vpn-connections", "list"],
5896
+ input: listInput,
5897
+ execute: executeNetwork("vpn-connections list"),
5842
5898
  vnext: {
5843
5899
  arguments: "semantic",
5844
5900
  audience: "customer",
@@ -5851,17 +5907,24 @@ var vpnConnectionListCapability = customerResource({
5851
5907
  related: ["vpn-connections configure", "connect"]
5852
5908
  }
5853
5909
  },
5854
- execute: (ctx, input) => networkExecutor(ctx)("vpn-connections list", input, ctx)
5910
+ execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
5855
5911
  });
5856
- var vpnConnectionConfigureCapability = customerResource({
5912
+ var vpnConnectionConfigureCapability = defineCapability({
5857
5913
  id: "vpn.connections.configure",
5858
5914
  domain: "vpn",
5859
5915
  roles: ["user"],
5860
5916
  mutation: "preview-confirm",
5861
- input: vpnConfigureInput,
5862
- 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,
5863
5924
  cli: {
5864
5925
  command: ["vpn-connections", "configure"],
5926
+ input: vpnConfigureInput,
5927
+ execute: executeNetwork("vpn-connections configure"),
5865
5928
  vnext: {
5866
5929
  arguments: "semantic",
5867
5930
  audience: "customer",
@@ -5876,17 +5939,24 @@ var vpnConnectionConfigureCapability = customerResource({
5876
5939
  related: ["connect", "vpn-connections disconnect"]
5877
5940
  }
5878
5941
  },
5879
- 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))
5880
5943
  });
5881
- var vpnConnectionDisconnectCapability = customerResource({
5944
+ var vpnConnectionDisconnectCapability = defineCapability({
5882
5945
  id: "vpn.connections.disconnect",
5883
5946
  domain: "vpn",
5884
5947
  roles: ["user"],
5885
5948
  mutation: "preview-confirm",
5886
- input: noOptionsInput,
5887
- 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,
5888
5956
  cli: {
5889
5957
  command: ["vpn-connections", "disconnect"],
5958
+ input: noOptionsInput,
5959
+ execute: executeNetwork("vpn-connections disconnect"),
5890
5960
  vnext: {
5891
5961
  arguments: "semantic",
5892
5962
  audience: "customer",
@@ -5904,15 +5974,17 @@ var vpnConnectionDisconnectCapability = customerResource({
5904
5974
  related: ["vpn-connections configure"]
5905
5975
  }
5906
5976
  },
5907
- 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 }
5908
5978
  });
5909
- var connectCapability = customerResource({
5979
+ var connectCapability = defineCapability({
5910
5980
  id: "vpn.connect",
5911
5981
  domain: "vpn",
5912
5982
  roles: ["user"],
5913
5983
  mutation: "read",
5914
5984
  input: connectInput2,
5915
5985
  description: "Connect to one exact native machine or cluster target through recoverable private transport when required.",
5986
+ mcp: false,
5987
+ slack: false,
5916
5988
  cli: {
5917
5989
  command: ["connect"],
5918
5990
  vnext: {
@@ -5934,7 +6006,7 @@ var connectCapability = customerResource({
5934
6006
  related: ["launch", "vpn-connections configure", "clusters show"]
5935
6007
  }
5936
6008
  },
5937
- execute: (ctx, input) => networkExecutor(ctx)("connect", input, ctx)
6009
+ execute: executeNetwork("connect")
5938
6010
  });
5939
6011
  var networkCapabilities = [
5940
6012
  privateNetworkListCapability,
@@ -5947,133 +6019,6 @@ var networkCapabilities = [
5947
6019
  vpnConnectionDisconnectCapability,
5948
6020
  connectCapability
5949
6021
  ];
5950
- var networkUpdateFields = z29.object({
5951
- networkId: z29.string(),
5952
- name: z29.string().optional(),
5953
- description: z29.string().optional(),
5954
- clearDescription: z29.boolean().optional(),
5955
- confirm: z29.boolean().optional()
5956
- }).refine((input) => !(input.clearDescription && input.description !== void 0), {
5957
- message: "Use either description or clearDescription, not both."
5958
- }).refine((input) => input.name !== void 0 || input.description !== void 0 || input.clearDescription, { message: "Provide name, description, or clearDescription." });
5959
- var networkVerbCapabilities = [
5960
- defineCapability({
5961
- id: "network.list",
5962
- domain: "networks",
5963
- roles: ["user"],
5964
- description: "List this tenant's private networks.",
5965
- mutation: "read",
5966
- input: z29.object({}),
5967
- mcp: { name: "networks_list" },
5968
- slack: false,
5969
- execute: (ctx) => listNetworks(ctx.fetch)
5970
- }),
5971
- defineCapability({
5972
- id: "network.show",
5973
- domain: "networks",
5974
- roles: ["user"],
5975
- description: "Show a single private network by id.",
5976
- mutation: "read",
5977
- input: z29.object({ networkId: z29.string() }),
5978
- mcp: { name: "networks_show" },
5979
- slack: false,
5980
- execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
5981
- }),
5982
- defineCapability({
5983
- id: "network.create",
5984
- domain: "networks",
5985
- roles: ["user"],
5986
- description: "Create a private network.",
5987
- mutation: "preview-confirm",
5988
- input: z29.object({
5989
- name: z29.string(),
5990
- cidr: z29.string().optional(),
5991
- description: z29.string().optional(),
5992
- confirm: z29.boolean().optional()
5993
- }),
5994
- mcp: { name: "networks_create" },
5995
- slack: false,
5996
- execute: (ctx, input) => createNetwork(ctx.fetch, {
5997
- name: input.name,
5998
- cidr: input.cidr ?? null,
5999
- description: input.description ?? null
6000
- })
6001
- }),
6002
- defineCapability({
6003
- id: "network.update",
6004
- domain: "networks",
6005
- roles: ["user"],
6006
- description: "Update a private network's name or description. Pass clearDescription: true to null out the description instead of setting it.",
6007
- mutation: "preview-confirm",
6008
- input: networkUpdateFields,
6009
- mcp: { name: "networks_update" },
6010
- slack: false,
6011
- execute: (ctx, input) => updateNetwork(ctx.fetch, input.networkId, {
6012
- ...input.name !== void 0 ? { name: input.name } : {},
6013
- ...input.clearDescription ? { description: null } : input.description !== void 0 ? { description: input.description } : {}
6014
- })
6015
- }),
6016
- defineCapability({
6017
- id: "network.delete",
6018
- domain: "networks",
6019
- roles: ["user"],
6020
- description: "Delete a private network.",
6021
- mutation: "preview-confirm",
6022
- input: z29.object({ networkId: z29.string(), confirm: z29.boolean().optional() }),
6023
- mcp: { name: "networks_delete" },
6024
- slack: false,
6025
- // The route answers 204, so report which network went.
6026
- execute: async (ctx, input) => {
6027
- await deleteNetwork(ctx.fetch, input.networkId);
6028
- return { deleted: true, network_id: input.networkId };
6029
- }
6030
- }),
6031
- defineCapability({
6032
- id: "vpn.peers.list",
6033
- domain: "networks",
6034
- roles: ["user"],
6035
- description: "List WireGuard VPN peers registered on a reservation.",
6036
- mutation: "read",
6037
- input: z29.object({ reservationId: z29.string() }),
6038
- mcp: { name: "vpn_peers_list" },
6039
- slack: false,
6040
- execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
6041
- }),
6042
- defineCapability({
6043
- id: "vpn.peers.create",
6044
- domain: "networks",
6045
- roles: ["user"],
6046
- description: "Register a WireGuard VPN peer public key on a reservation.",
6047
- mutation: "preview-confirm",
6048
- input: z29.object({
6049
- reservationId: z29.string(),
6050
- publicKey: z29.string(),
6051
- label: z29.string().optional(),
6052
- confirm: z29.boolean().optional()
6053
- }),
6054
- mcp: { name: "vpn_peers_create" },
6055
- slack: false,
6056
- execute: (ctx, input) => createNetworkPeer(ctx.fetch, "shared", {
6057
- public_key: input.publicKey,
6058
- label: input.label ?? null
6059
- })
6060
- }),
6061
- defineCapability({
6062
- id: "vpn.peers.delete",
6063
- domain: "networks",
6064
- roles: ["user"],
6065
- description: "Revoke a WireGuard VPN peer from a reservation.",
6066
- mutation: "preview-confirm",
6067
- input: z29.object({
6068
- reservationId: z29.string(),
6069
- peerId: z29.string(),
6070
- confirm: z29.boolean().optional()
6071
- }),
6072
- mcp: { name: "vpn_peers_delete" },
6073
- slack: false,
6074
- execute: async (ctx, input) => await deleteNetworkPeer(ctx.fetch, "shared", input.peerId) ?? { deleted: true }
6075
- })
6076
- ];
6077
6022
 
6078
6023
  // ../../packages/capabilities/dist/capabilities/registry.js
6079
6024
  import { z as z30 } from "zod";
@@ -6663,8 +6608,8 @@ var volumeCapabilities = [
6663
6608
  related: ["volumes files list"]
6664
6609
  })
6665
6610
  ];
6666
- var reservationInput = z32.object({ reservationId: z32.string() });
6667
- 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() });
6668
6613
  var driveInput = z32.object({ driveId: z32.string() });
6669
6614
  var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
6670
6615
  var bucketConnectInput = z32.object({
@@ -6716,7 +6661,7 @@ var storageVerbCapabilities = [
6716
6661
  roles: ["user"],
6717
6662
  description: "Show a reservation's storage deployment (attachment) status.",
6718
6663
  mutation: "read",
6719
- input: reservationInput,
6664
+ input: reservationInput2,
6720
6665
  slack: false,
6721
6666
  execute: (ctx, input) => getReservationStorageAttachment(ctx.fetch, input.reservationId)
6722
6667
  }),
@@ -6910,7 +6855,6 @@ var catalog = [
6910
6855
  ...evidenceCapabilities,
6911
6856
  ...observabilityCapabilities,
6912
6857
  ...clusterCapabilities,
6913
- ...networkVerbCapabilities,
6914
6858
  ...accessVerbCapabilities,
6915
6859
  ...storageVerbCapabilities,
6916
6860
  reservationKeysPushCapability,
@@ -7202,6 +7146,11 @@ export {
7202
7146
  metricsHistoryCapability,
7203
7147
  metricsSnapshotCapability,
7204
7148
  parseHardwareCatalog,
7149
+ privateNetworkCreateCapability,
7150
+ privateNetworkDeleteCapability,
7151
+ privateNetworkListCapability,
7152
+ privateNetworkShowCapability,
7153
+ privateNetworkUpdateCapability,
7205
7154
  sshKeyAddCapability,
7206
7155
  sshKeyAssignmentAssignCapability,
7207
7156
  sshKeyAssignmentListCapability,
@@ -7209,5 +7158,8 @@ export {
7209
7158
  sshKeyDeleteCapability,
7210
7159
  sshKeyDeliveryStatus,
7211
7160
  sshKeyListCapability,
7212
- volumeFilesListCapability
7161
+ volumeFilesListCapability,
7162
+ vpnConnectionConfigureCapability,
7163
+ vpnConnectionDisconnectCapability,
7164
+ vpnConnectionListCapability
7213
7165
  };