@ornncompute/cli 1.0.143 → 1.0.145
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 +6 -3
- package/package.json +1 -1
- package/src/network-commands.mjs +36 -44
- package/src/storage-commands.mjs +40 -14
- package/vendor/capabilities/cli.js +307 -323
package/README.md
CHANGED
|
@@ -259,6 +259,8 @@ never contains admin children. There is no second parser or command registry.
|
|
|
259
259
|
An eligible human context requires TTY stdin and TTY stdout and no JSON/NDJSON
|
|
260
260
|
format. Human commands may guide selection and render a normalized summary;
|
|
261
261
|
mutations execute immediately without a confirmation prompt.
|
|
262
|
+
This also applies to `volumes clear` when a noninteractive caller supplies an
|
|
263
|
+
explicit output format.
|
|
262
264
|
|
|
263
265
|
Automation supplies complete semantic inputs and an explicit format:
|
|
264
266
|
|
|
@@ -449,9 +451,10 @@ command UX changes. The smoke runner refuses production and shared staging.
|
|
|
449
451
|
See [`docs/packaged-vnext-release-gate.md`](docs/packaged-vnext-release-gate.md).
|
|
450
452
|
|
|
451
453
|
Private networks and VPN peers belong to the selected organization. There is no
|
|
452
|
-
per-reservation network attachment step.
|
|
453
|
-
|
|
454
|
-
|
|
454
|
+
per-reservation network attachment step. CLI and MCP share network and VPN peer
|
|
455
|
+
capabilities over the native Orchestrator network client. The CLI retains name
|
|
456
|
+
resolution, review, replay, local pagination, connection recovery, and local
|
|
457
|
+
WireGuard key/config files.
|
|
455
458
|
Durable Bare Metal workspaces use
|
|
456
459
|
`--network shared --volume <volume-id> --mount-access read-only|read-write`;
|
|
457
460
|
private Kubernetes and Slurm launches continue to use `--network private`.
|
package/package.json
CHANGED
package/src/network-commands.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { getReservation } from "../vendor/api-client/commerce.js";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
} from "../vendor/
|
|
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
|
|
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
|
|
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
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
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
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
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
|
|
500
|
-
|
|
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
|
|
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
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
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
|
|
858
|
-
|
|
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(
|
|
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",
|
package/src/storage-commands.mjs
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import * as storageApi from "../vendor/api-client/orchestrator.js";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
bucketListCapability,
|
|
4
|
+
volumeListCapability,
|
|
5
|
+
volumeShowCapability,
|
|
6
|
+
volumeCreateCapability,
|
|
7
|
+
volumeRefreshCapability,
|
|
8
|
+
volumeClearCapability,
|
|
9
|
+
volumeDeleteCapability,
|
|
10
|
+
volumeFilesListCapability,
|
|
11
|
+
} from "../vendor/capabilities/cli.js";
|
|
3
12
|
import { createHash } from "node:crypto";
|
|
4
13
|
import { createReadStream } from "node:fs";
|
|
5
14
|
import { stat } from "node:fs/promises";
|
|
@@ -300,7 +309,10 @@ export async function fetchDrivePage(runtime, { limit = 25, cursor, scope = "all
|
|
|
300
309
|
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
301
310
|
input
|
|
302
311
|
)
|
|
303
|
-
: await
|
|
312
|
+
: await volumeListCapability.execute(
|
|
313
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
314
|
+
{ ...input, scope }
|
|
315
|
+
);
|
|
304
316
|
return { drives: volumeRows(payload), next_cursor: payload?.next_cursor ?? null };
|
|
305
317
|
} catch (error) {
|
|
306
318
|
throw safeStorageError(error, "Volumes could not be loaded safely.");
|
|
@@ -349,7 +361,10 @@ function resolveFromRows(rows, reference, { source = false } = {}) {
|
|
|
349
361
|
|
|
350
362
|
export async function resolveVolume(runtime, reference) {
|
|
351
363
|
if (/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(reference)) {
|
|
352
|
-
const drive = await
|
|
364
|
+
const drive = await volumeShowCapability.execute(
|
|
365
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
366
|
+
{ driveId: reference }
|
|
367
|
+
);
|
|
353
368
|
return resolveFromRows([drive], reference);
|
|
354
369
|
}
|
|
355
370
|
return resolveFromRows(await fetchDrives(runtime), reference);
|
|
@@ -395,11 +410,15 @@ async function createVolume(input, runtime) {
|
|
|
395
410
|
});
|
|
396
411
|
}
|
|
397
412
|
|
|
398
|
-
const body = { name, source_drive_id: source ? String(source.id) : null };
|
|
399
413
|
try {
|
|
400
|
-
const created = await
|
|
401
|
-
|
|
402
|
-
|
|
414
|
+
const created = await volumeCreateCapability.execute(
|
|
415
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
416
|
+
{
|
|
417
|
+
name,
|
|
418
|
+
sourceDriveId: source ? String(source.id) : undefined,
|
|
419
|
+
idempotencyKey: String(input.idempotencyKey ?? "").trim() || undefined,
|
|
420
|
+
}
|
|
421
|
+
);
|
|
403
422
|
return runtime.interaction.result({
|
|
404
423
|
data: { effective_input: effective, replayed: false, volume: safeVolume(created) },
|
|
405
424
|
outcome: { class: "ready", phase: "created" },
|
|
@@ -454,7 +473,10 @@ async function showVolume(input, runtime, { refresh = false } = {}) {
|
|
|
454
473
|
return runtime.interaction.result({ data: { volume: safeVolume(drive) } });
|
|
455
474
|
}
|
|
456
475
|
try {
|
|
457
|
-
const refreshed = await
|
|
476
|
+
const refreshed = await volumeRefreshCapability.execute(
|
|
477
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
478
|
+
{ driveId: String(drive.id) }
|
|
479
|
+
);
|
|
458
480
|
return runtime.interaction.result({
|
|
459
481
|
data: { volume: safeVolume(refreshed) },
|
|
460
482
|
outcome: { class: "ready", phase: "refreshed" },
|
|
@@ -469,7 +491,10 @@ async function clearVolume(input, runtime) {
|
|
|
469
491
|
const [reference] = positionals(input, 1, "Usage: ornn volumes clear <volume>");
|
|
470
492
|
const drive = await resolveVolume(runtime, reference);
|
|
471
493
|
try {
|
|
472
|
-
const payload = await
|
|
494
|
+
const payload = await volumeClearCapability.execute(
|
|
495
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
496
|
+
{ driveId: String(drive.id) }
|
|
497
|
+
);
|
|
473
498
|
return runtime.interaction.result({
|
|
474
499
|
data: {
|
|
475
500
|
cleared: true,
|
|
@@ -504,11 +529,12 @@ async function deleteVolume(input, runtime) {
|
|
|
504
529
|
requireMachineMutationKey(input, runtime);
|
|
505
530
|
const drive = await resolveVolume(runtime, reference);
|
|
506
531
|
try {
|
|
507
|
-
await
|
|
508
|
-
runtime.fetch,
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
532
|
+
await volumeDeleteCapability.execute(
|
|
533
|
+
{ actor: "", role: "user", fetch: runtime.fetch },
|
|
534
|
+
{
|
|
535
|
+
driveId: String(drive.id),
|
|
536
|
+
idempotencyKey: String(input.idempotencyKey ?? "").trim() || undefined,
|
|
537
|
+
}
|
|
512
538
|
);
|
|
513
539
|
return runtime.interaction.result({
|
|
514
540
|
data: { deleted: true, volume: safeVolume(drive) },
|
|
@@ -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
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
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
|
|
5714
|
-
return
|
|
5715
|
+
function mutationOptions(idempotencyKey) {
|
|
5716
|
+
return idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : void 0;
|
|
5715
5717
|
}
|
|
5716
|
-
var
|
|
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:
|
|
5722
|
-
description: "List
|
|
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
|
|
5766
|
+
execute: (ctx) => listNetworks(ctx.fetch)
|
|
5737
5767
|
});
|
|
5738
|
-
var privateNetworkShowCapability =
|
|
5768
|
+
var privateNetworkShowCapability = defineCapability({
|
|
5739
5769
|
id: "networks.show",
|
|
5740
5770
|
domain: "networks",
|
|
5741
5771
|
roles: ["user"],
|
|
5742
5772
|
mutation: "read",
|
|
5743
|
-
input:
|
|
5744
|
-
description: "Show
|
|
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) =>
|
|
5793
|
+
execute: (ctx, input) => getNetwork(ctx.fetch, input.networkId)
|
|
5760
5794
|
});
|
|
5761
|
-
var privateNetworkCreateCapability =
|
|
5795
|
+
var privateNetworkCreateCapability = defineCapability({
|
|
5762
5796
|
id: "networks.create",
|
|
5763
5797
|
domain: "networks",
|
|
5764
5798
|
roles: ["user"],
|
|
5765
5799
|
mutation: "preview-confirm",
|
|
5766
|
-
input:
|
|
5767
|
-
description: "Create
|
|
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) =>
|
|
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 =
|
|
5823
|
+
var privateNetworkUpdateCapability = defineCapability({
|
|
5786
5824
|
id: "networks.update",
|
|
5787
5825
|
domain: "networks",
|
|
5788
5826
|
roles: ["user"],
|
|
5789
5827
|
mutation: "preview-confirm",
|
|
5790
|
-
input:
|
|
5791
|
-
description: "
|
|
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) =>
|
|
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 =
|
|
5854
|
+
var privateNetworkDeleteCapability = defineCapability({
|
|
5810
5855
|
id: "networks.delete",
|
|
5811
5856
|
domain: "networks",
|
|
5812
5857
|
roles: ["user"],
|
|
5813
5858
|
mutation: "preview-confirm",
|
|
5814
|
-
input:
|
|
5815
|
-
description: "Delete
|
|
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) =>
|
|
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 =
|
|
5885
|
+
var vpnConnectionListCapability = defineCapability({
|
|
5834
5886
|
id: "vpn.connections.list",
|
|
5835
5887
|
domain: "vpn",
|
|
5836
5888
|
roles: ["user"],
|
|
5837
5889
|
mutation: "read",
|
|
5838
|
-
input:
|
|
5839
|
-
description: "List
|
|
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
|
|
5910
|
+
execute: (ctx) => listNetworkPeerConfigs(ctx.fetch, "shared")
|
|
5855
5911
|
});
|
|
5856
|
-
var vpnConnectionConfigureCapability =
|
|
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:
|
|
5862
|
-
description: "
|
|
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) =>
|
|
5942
|
+
execute: (ctx, input) => createNetworkPeer(ctx.fetch, "shared", { public_key: input.publicKey, label: input.label ?? null }, mutationOptions(input.idempotencyKey))
|
|
5880
5943
|
});
|
|
5881
|
-
var vpnConnectionDisconnectCapability =
|
|
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:
|
|
5887
|
-
description: "
|
|
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) =>
|
|
5977
|
+
execute: async (ctx, input) => await deleteNetworkPeer(ctx.fetch, "shared", input.peerId, mutationOptions(input.idempotencyKey)) ?? { deleted: true }
|
|
5908
5978
|
});
|
|
5909
|
-
var connectCapability =
|
|
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: (
|
|
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";
|
|
@@ -6547,74 +6492,188 @@ var volumeFilesListCapability = defineCapability({
|
|
|
6547
6492
|
}
|
|
6548
6493
|
}
|
|
6549
6494
|
});
|
|
6550
|
-
var
|
|
6551
|
-
|
|
6552
|
-
|
|
6553
|
-
|
|
6554
|
-
|
|
6555
|
-
|
|
6556
|
-
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6495
|
+
var volumePageInput = z32.object({
|
|
6496
|
+
limit: z32.number().int().min(1).max(100).optional(),
|
|
6497
|
+
cursor: z32.string().optional()
|
|
6498
|
+
});
|
|
6499
|
+
var driveInput = z32.object({ driveId: z32.string() });
|
|
6500
|
+
var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
|
|
6501
|
+
var volumeCreateInput = z32.object({
|
|
6502
|
+
name: z32.string(),
|
|
6503
|
+
sourceDriveId: z32.string().optional(),
|
|
6504
|
+
confirm: z32.boolean().optional()
|
|
6505
|
+
});
|
|
6506
|
+
var volumeListCapability = defineCapability({
|
|
6507
|
+
id: "storage.volumes.list",
|
|
6508
|
+
domain: "storage",
|
|
6509
|
+
roles: ["user"],
|
|
6510
|
+
description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
|
|
6511
|
+
mutation: "read",
|
|
6512
|
+
input: volumePageInput.extend({ scope: z32.enum(["all", "managed"]).optional() }),
|
|
6513
|
+
mcp: { name: "storage_volumes_list", input: volumePageInput },
|
|
6514
|
+
slack: false,
|
|
6515
|
+
execute: (context, input) => listDrives(context.fetch, {
|
|
6516
|
+
limit: input.limit ?? 25,
|
|
6517
|
+
...input.cursor ? { cursor: input.cursor } : {},
|
|
6518
|
+
...input.scope ? { scope: input.scope } : {}
|
|
6560
6519
|
}),
|
|
6561
|
-
|
|
6562
|
-
|
|
6520
|
+
cli: {
|
|
6521
|
+
command: ["volumes", "list"],
|
|
6522
|
+
input: storageCliInput,
|
|
6523
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.list", input),
|
|
6524
|
+
vnext: {
|
|
6525
|
+
arguments: "semantic",
|
|
6526
|
+
audience: "customer",
|
|
6527
|
+
category: "resource",
|
|
6528
|
+
outcome: "List durable managed volumes independently from their mounts.",
|
|
6529
|
+
human: "ornn volumes list [--limit <1-100>] [--cursor <cursor>]",
|
|
6530
|
+
automation: "ornn volumes list --limit 50 --format json",
|
|
6531
|
+
related: ["volumes show", "volumes create"]
|
|
6532
|
+
}
|
|
6533
|
+
}
|
|
6534
|
+
});
|
|
6535
|
+
var volumeShowCapability = defineCapability({
|
|
6536
|
+
id: "storage.volumes.show",
|
|
6537
|
+
domain: "storage",
|
|
6538
|
+
roles: ["user"],
|
|
6539
|
+
description: "Show a single storage volume (drive) by id.",
|
|
6540
|
+
mutation: "read",
|
|
6541
|
+
input: driveInput,
|
|
6542
|
+
mcp: { name: "storage_volumes_show" },
|
|
6543
|
+
slack: false,
|
|
6544
|
+
execute: (context, input) => getDrive(context.fetch, input.driveId),
|
|
6545
|
+
cli: {
|
|
6563
6546
|
command: ["volumes", "show"],
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6569
|
-
|
|
6570
|
-
|
|
6571
|
-
|
|
6572
|
-
|
|
6573
|
-
|
|
6547
|
+
input: storageCliInput,
|
|
6548
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.show", input),
|
|
6549
|
+
vnext: {
|
|
6550
|
+
arguments: "semantic",
|
|
6551
|
+
audience: "customer",
|
|
6552
|
+
category: "resource",
|
|
6553
|
+
outcome: "Inspect one durable volume without changing its lifecycle.",
|
|
6554
|
+
human: "ornn volumes show <volume>",
|
|
6555
|
+
automation: "ornn volumes show <volume-id> --format json",
|
|
6556
|
+
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6557
|
+
related: ["volumes files list", "volume-mounts show"]
|
|
6558
|
+
}
|
|
6559
|
+
}
|
|
6560
|
+
});
|
|
6561
|
+
var volumeCreateCapability = defineCapability({
|
|
6562
|
+
id: "storage.volumes.create",
|
|
6563
|
+
domain: "storage",
|
|
6564
|
+
roles: ["user"],
|
|
6565
|
+
description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
|
|
6566
|
+
mutation: "preview-confirm",
|
|
6567
|
+
input: volumeCreateInput.extend({ idempotencyKey: z32.string().optional() }),
|
|
6568
|
+
mcp: { name: "storage_volumes_create", input: volumeCreateInput },
|
|
6569
|
+
slack: false,
|
|
6570
|
+
execute: (context, input) => createDrive(context.fetch, { name: input.name, source_drive_id: input.sourceDriveId ?? null }, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0),
|
|
6571
|
+
cli: {
|
|
6574
6572
|
command: ["volumes", "create"],
|
|
6575
|
-
|
|
6576
|
-
|
|
6577
|
-
|
|
6578
|
-
|
|
6579
|
-
|
|
6580
|
-
|
|
6581
|
-
|
|
6582
|
-
|
|
6583
|
-
|
|
6584
|
-
|
|
6573
|
+
input: storageCliInput,
|
|
6574
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.create", input),
|
|
6575
|
+
vnext: {
|
|
6576
|
+
arguments: "semantic",
|
|
6577
|
+
audience: "customer",
|
|
6578
|
+
category: "resource",
|
|
6579
|
+
outcome: "Create one durable volume or safely replay its normalized intent.",
|
|
6580
|
+
human: "ornn volumes create --name <name> [--source <volume>] []",
|
|
6581
|
+
automation: "ornn volumes create --name <name> [--source <volume-id>] --idempotency-key <key> --format json",
|
|
6582
|
+
acceptedReferences: ["canonical source volume ID", "exact unique source volume name"],
|
|
6583
|
+
related: ["volumes show", "volumes files upload"]
|
|
6584
|
+
}
|
|
6585
|
+
}
|
|
6586
|
+
});
|
|
6587
|
+
var volumeRefreshCapability = defineCapability({
|
|
6588
|
+
id: "storage.volumes.refresh",
|
|
6589
|
+
domain: "storage",
|
|
6590
|
+
roles: ["user"],
|
|
6591
|
+
description: "Refresh a storage volume's (drive's) reported usage/state.",
|
|
6592
|
+
mutation: "preview-confirm",
|
|
6593
|
+
input: driveWrite,
|
|
6594
|
+
mcp: { name: "storage_volumes_refresh" },
|
|
6595
|
+
slack: false,
|
|
6596
|
+
execute: (context, input) => getDrive(context.fetch, input.driveId, { refresh: true }),
|
|
6597
|
+
cli: {
|
|
6585
6598
|
command: ["volumes", "refresh"],
|
|
6586
|
-
|
|
6587
|
-
|
|
6588
|
-
|
|
6589
|
-
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6594
|
-
|
|
6595
|
-
|
|
6599
|
+
input: storageCliInput,
|
|
6600
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.refresh", input),
|
|
6601
|
+
vnext: {
|
|
6602
|
+
arguments: "semantic",
|
|
6603
|
+
audience: "customer",
|
|
6604
|
+
category: "resource",
|
|
6605
|
+
outcome: "Refresh and inspect the current durable volume state.",
|
|
6606
|
+
human: "ornn volumes refresh <volume>",
|
|
6607
|
+
automation: "ornn volumes refresh <volume-id> --format json",
|
|
6608
|
+
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6609
|
+
related: ["volumes show"]
|
|
6610
|
+
}
|
|
6611
|
+
}
|
|
6612
|
+
});
|
|
6613
|
+
var volumeClearCapability = defineCapability({
|
|
6614
|
+
id: "storage.volumes.clear",
|
|
6615
|
+
domain: "storage",
|
|
6616
|
+
roles: ["user"],
|
|
6617
|
+
description: "Clear (empty) a storage volume's (drive's) contents without deleting the drive.",
|
|
6618
|
+
mutation: "preview-confirm",
|
|
6619
|
+
input: driveWrite,
|
|
6620
|
+
mcp: { name: "storage_volumes_clear" },
|
|
6621
|
+
slack: false,
|
|
6622
|
+
execute: (context, input) => clearDriveContents(context.fetch, input.driveId),
|
|
6623
|
+
cli: {
|
|
6596
6624
|
command: ["volumes", "clear"],
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
|
|
6600
|
-
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
|
|
6625
|
+
input: storageCliInput,
|
|
6626
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.clear", input),
|
|
6627
|
+
vnext: {
|
|
6628
|
+
arguments: "semantic",
|
|
6629
|
+
audience: "customer",
|
|
6630
|
+
category: "resource",
|
|
6631
|
+
outcome: "Permanently clear every file and folder from one volume.",
|
|
6632
|
+
human: "ornn volumes clear <volume>",
|
|
6633
|
+
automation: "ornn volumes clear <volume-id> --format json",
|
|
6634
|
+
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6635
|
+
review: "Every file and folder in the volume is permanently deleted.",
|
|
6636
|
+
related: ["volumes files list", "volume-mounts detach"]
|
|
6637
|
+
}
|
|
6638
|
+
}
|
|
6639
|
+
});
|
|
6640
|
+
var volumeDeleteCapability = defineCapability({
|
|
6641
|
+
id: "storage.volumes.delete",
|
|
6642
|
+
domain: "storage",
|
|
6643
|
+
roles: ["user"],
|
|
6644
|
+
description: "Delete a storage volume (drive).",
|
|
6645
|
+
mutation: "preview-confirm",
|
|
6646
|
+
input: driveWrite.extend({ idempotencyKey: z32.string().optional() }),
|
|
6647
|
+
mcp: { name: "storage_volumes_delete", input: driveWrite },
|
|
6648
|
+
slack: false,
|
|
6649
|
+
execute: async (context, input) => {
|
|
6650
|
+
await deleteDrive(context.fetch, input.driveId, {}, input.idempotencyKey ? { headers: { "Idempotency-Key": input.idempotencyKey } } : void 0);
|
|
6651
|
+
return { deleted: true, drive_id: input.driveId };
|
|
6652
|
+
},
|
|
6653
|
+
cli: {
|
|
6608
6654
|
command: ["volumes", "delete"],
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6655
|
+
input: storageCliInput,
|
|
6656
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.delete", input),
|
|
6657
|
+
vnext: {
|
|
6658
|
+
arguments: "semantic",
|
|
6659
|
+
audience: "customer",
|
|
6660
|
+
category: "resource",
|
|
6661
|
+
outcome: "Delete one detached volume after explicit consent.",
|
|
6662
|
+
human: "ornn volumes delete <volume>",
|
|
6663
|
+
automation: "ornn volumes delete <volume-id> --idempotency-key <key> --format json",
|
|
6664
|
+
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6665
|
+
review: "The volume and all of its data are permanently deleted.",
|
|
6666
|
+
related: ["volume-mounts detach", "volumes show"]
|
|
6667
|
+
}
|
|
6668
|
+
}
|
|
6669
|
+
});
|
|
6670
|
+
var volumeCapabilities = [
|
|
6671
|
+
volumeListCapability,
|
|
6672
|
+
volumeShowCapability,
|
|
6673
|
+
volumeCreateCapability,
|
|
6674
|
+
volumeRefreshCapability,
|
|
6675
|
+
volumeClearCapability,
|
|
6676
|
+
volumeDeleteCapability,
|
|
6618
6677
|
volumeFilesListCapability,
|
|
6619
6678
|
storageCapability({
|
|
6620
6679
|
id: "storage.volumes.files.upload",
|
|
@@ -6663,10 +6722,8 @@ var volumeCapabilities = [
|
|
|
6663
6722
|
related: ["volumes files list"]
|
|
6664
6723
|
})
|
|
6665
6724
|
];
|
|
6666
|
-
var
|
|
6667
|
-
var reservationWrite =
|
|
6668
|
-
var driveInput = z32.object({ driveId: z32.string() });
|
|
6669
|
-
var driveWrite = driveInput.extend({ confirm: z32.boolean().optional() });
|
|
6725
|
+
var reservationInput2 = z32.object({ reservationId: z32.string() });
|
|
6726
|
+
var reservationWrite = reservationInput2.extend({ confirm: z32.boolean().optional() });
|
|
6670
6727
|
var bucketConnectInput = z32.object({
|
|
6671
6728
|
provider: z32.enum(["gcs", "s3", "r2"]),
|
|
6672
6729
|
bucket: z32.string(),
|
|
@@ -6716,7 +6773,7 @@ var storageVerbCapabilities = [
|
|
|
6716
6773
|
roles: ["user"],
|
|
6717
6774
|
description: "Show a reservation's storage deployment (attachment) status.",
|
|
6718
6775
|
mutation: "read",
|
|
6719
|
-
input:
|
|
6776
|
+
input: reservationInput2,
|
|
6720
6777
|
slack: false,
|
|
6721
6778
|
execute: (ctx, input) => getReservationStorageAttachment(ctx.fetch, input.reservationId)
|
|
6722
6779
|
}),
|
|
@@ -6730,92 +6787,6 @@ var storageVerbCapabilities = [
|
|
|
6730
6787
|
slack: false,
|
|
6731
6788
|
execute: (ctx) => listStorageTargets(ctx.fetch)
|
|
6732
6789
|
}),
|
|
6733
|
-
defineCapability({
|
|
6734
|
-
id: "volume.list",
|
|
6735
|
-
domain: "storage",
|
|
6736
|
-
roles: ["user"],
|
|
6737
|
-
description: "List a page of storage volumes, newest updated first. Pass next_cursor as cursor to continue.",
|
|
6738
|
-
mutation: "read",
|
|
6739
|
-
input: z32.object({
|
|
6740
|
-
limit: z32.number().int().min(1).max(100).optional(),
|
|
6741
|
-
cursor: z32.string().optional()
|
|
6742
|
-
}),
|
|
6743
|
-
mcp: { name: "storage_volumes_list" },
|
|
6744
|
-
slack: false,
|
|
6745
|
-
execute: (ctx, input) => listDrives(ctx.fetch, {
|
|
6746
|
-
limit: input.limit ?? 25,
|
|
6747
|
-
...input.cursor ? { cursor: input.cursor } : {}
|
|
6748
|
-
})
|
|
6749
|
-
}),
|
|
6750
|
-
defineCapability({
|
|
6751
|
-
id: "volume.show",
|
|
6752
|
-
domain: "storage",
|
|
6753
|
-
roles: ["user"],
|
|
6754
|
-
description: "Show a single storage volume (drive) by id.",
|
|
6755
|
-
mutation: "read",
|
|
6756
|
-
input: driveInput,
|
|
6757
|
-
mcp: { name: "storage_volumes_show" },
|
|
6758
|
-
slack: false,
|
|
6759
|
-
execute: (ctx, input) => getDrive(ctx.fetch, input.driveId)
|
|
6760
|
-
}),
|
|
6761
|
-
defineCapability({
|
|
6762
|
-
id: "volume.create",
|
|
6763
|
-
domain: "storage",
|
|
6764
|
-
roles: ["user"],
|
|
6765
|
-
description: "Create a storage volume (drive), optionally cloned from an existing source drive.",
|
|
6766
|
-
mutation: "preview-confirm",
|
|
6767
|
-
input: z32.object({
|
|
6768
|
-
name: z32.string(),
|
|
6769
|
-
sourceDriveId: z32.string().optional(),
|
|
6770
|
-
confirm: z32.boolean().optional()
|
|
6771
|
-
}),
|
|
6772
|
-
mcp: { name: "storage_volumes_create" },
|
|
6773
|
-
slack: false,
|
|
6774
|
-
execute: (ctx, input) => createDrive(ctx.fetch, {
|
|
6775
|
-
name: input.name,
|
|
6776
|
-
source_drive_id: input.sourceDriveId ?? null
|
|
6777
|
-
})
|
|
6778
|
-
}),
|
|
6779
|
-
defineCapability({
|
|
6780
|
-
id: "volume.refresh",
|
|
6781
|
-
domain: "storage",
|
|
6782
|
-
roles: ["user"],
|
|
6783
|
-
description: "Refresh a storage volume's (drive's) reported usage/state.",
|
|
6784
|
-
mutation: "preview-confirm",
|
|
6785
|
-
input: driveWrite,
|
|
6786
|
-
mcp: { name: "storage_volumes_refresh" },
|
|
6787
|
-
slack: false,
|
|
6788
|
-
execute: (ctx, input) => getDrive(ctx.fetch, input.driveId, { refresh: true })
|
|
6789
|
-
}),
|
|
6790
|
-
defineCapability({
|
|
6791
|
-
id: "volume.clear",
|
|
6792
|
-
domain: "storage",
|
|
6793
|
-
roles: ["user"],
|
|
6794
|
-
description: "Clear (empty) a storage volume's (drive's) contents without deleting the drive.",
|
|
6795
|
-
mutation: "preview-confirm",
|
|
6796
|
-
input: driveWrite,
|
|
6797
|
-
mcp: { name: "storage_volumes_clear" },
|
|
6798
|
-
slack: false,
|
|
6799
|
-
// The route answers 204, so report which volume was cleared.
|
|
6800
|
-
execute: async (ctx, input) => {
|
|
6801
|
-
await clearDriveContents(ctx.fetch, input.driveId);
|
|
6802
|
-
return { cleared: true, drive_id: input.driveId };
|
|
6803
|
-
}
|
|
6804
|
-
}),
|
|
6805
|
-
defineCapability({
|
|
6806
|
-
id: "volume.delete",
|
|
6807
|
-
domain: "storage",
|
|
6808
|
-
roles: ["user"],
|
|
6809
|
-
description: "Delete a storage volume (drive).",
|
|
6810
|
-
mutation: "preview-confirm",
|
|
6811
|
-
input: driveWrite,
|
|
6812
|
-
mcp: { name: "storage_volumes_delete" },
|
|
6813
|
-
slack: false,
|
|
6814
|
-
execute: async (ctx, input) => {
|
|
6815
|
-
await deleteDrive(ctx.fetch, input.driveId);
|
|
6816
|
-
return { deleted: true, drive_id: input.driveId };
|
|
6817
|
-
}
|
|
6818
|
-
}),
|
|
6819
6790
|
defineCapability({
|
|
6820
6791
|
id: "bucket.connect",
|
|
6821
6792
|
domain: "storage",
|
|
@@ -6910,7 +6881,6 @@ var catalog = [
|
|
|
6910
6881
|
...evidenceCapabilities,
|
|
6911
6882
|
...observabilityCapabilities,
|
|
6912
6883
|
...clusterCapabilities,
|
|
6913
|
-
...networkVerbCapabilities,
|
|
6914
6884
|
...accessVerbCapabilities,
|
|
6915
6885
|
...storageVerbCapabilities,
|
|
6916
6886
|
reservationKeysPushCapability,
|
|
@@ -7202,6 +7172,11 @@ export {
|
|
|
7202
7172
|
metricsHistoryCapability,
|
|
7203
7173
|
metricsSnapshotCapability,
|
|
7204
7174
|
parseHardwareCatalog,
|
|
7175
|
+
privateNetworkCreateCapability,
|
|
7176
|
+
privateNetworkDeleteCapability,
|
|
7177
|
+
privateNetworkListCapability,
|
|
7178
|
+
privateNetworkShowCapability,
|
|
7179
|
+
privateNetworkUpdateCapability,
|
|
7205
7180
|
sshKeyAddCapability,
|
|
7206
7181
|
sshKeyAssignmentAssignCapability,
|
|
7207
7182
|
sshKeyAssignmentListCapability,
|
|
@@ -7209,5 +7184,14 @@ export {
|
|
|
7209
7184
|
sshKeyDeleteCapability,
|
|
7210
7185
|
sshKeyDeliveryStatus,
|
|
7211
7186
|
sshKeyListCapability,
|
|
7212
|
-
|
|
7187
|
+
volumeClearCapability,
|
|
7188
|
+
volumeCreateCapability,
|
|
7189
|
+
volumeDeleteCapability,
|
|
7190
|
+
volumeFilesListCapability,
|
|
7191
|
+
volumeListCapability,
|
|
7192
|
+
volumeRefreshCapability,
|
|
7193
|
+
volumeShowCapability,
|
|
7194
|
+
vpnConnectionConfigureCapability,
|
|
7195
|
+
vpnConnectionDisconnectCapability,
|
|
7196
|
+
vpnConnectionListCapability
|
|
7213
7197
|
};
|