@ornncompute/cli 1.0.121 → 1.0.123

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.
@@ -1,3 +1,208 @@
1
+ // ../../packages/api-client/dist/orchestrator/catalog.js
2
+ var hardwareCatalogPath = "/v1/orchestrator/catalog/hardware";
3
+ function getHardwareCatalog(request, signal) {
4
+ return request(hardwareCatalogPath, {
5
+ method: "GET",
6
+ ...signal ? { signal } : {}
7
+ });
8
+ }
9
+
10
+ // ../../packages/api-client/dist/orchestrator/locality.js
11
+ var localityGeolocatePath = "/v1/orchestrator/locality/geolocate";
12
+ function geolocate(request, query3, signal) {
13
+ const target = query3.ip !== void 0 ? `ip=${encodeURIComponent(query3.ip)}` : `address=${encodeURIComponent(query3.address)}`;
14
+ return request(`${localityGeolocatePath}?${target}`, {
15
+ method: "GET",
16
+ ...signal ? { signal } : {}
17
+ });
18
+ }
19
+
20
+ // ../../packages/api-client/dist/orchestrator/registry.js
21
+ function getContainerRegistry(request) {
22
+ return request("/v1/orchestrator/registry", { method: "GET" });
23
+ }
24
+ function listRegistryRepositories(request) {
25
+ return request("/v1/orchestrator/registry/repositories", { method: "GET" });
26
+ }
27
+ function listRegistryTags(request, repository) {
28
+ return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
29
+ method: "GET"
30
+ });
31
+ }
32
+ function getRegistryUsage(request) {
33
+ return request("/v1/orchestrator/registry/usage", { method: "GET" });
34
+ }
35
+ function listRegistryCaches(request, query3 = {}) {
36
+ const params = new URLSearchParams();
37
+ if (query3.controller_id !== void 0)
38
+ params.set("controller_id", query3.controller_id);
39
+ return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
40
+ method: "GET"
41
+ });
42
+ }
43
+ function deleteRegistryTag(request, repository, tag) {
44
+ return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
45
+ method: "DELETE"
46
+ });
47
+ }
48
+
49
+ // ../../packages/api-client/dist/orchestrator/drives.js
50
+ function queryPath(path, query3) {
51
+ const params = new URLSearchParams();
52
+ for (const [key, value] of Object.entries(query3)) {
53
+ if (value !== void 0 && value !== null)
54
+ params.set(key, String(value));
55
+ }
56
+ return `${path}${params.size ? `?${params}` : ""}`;
57
+ }
58
+ function listDrives(request, query3 = {}, signal) {
59
+ return request(queryPath("/v1/orchestrator/drives", query3), {
60
+ method: "GET",
61
+ ...signal ? { signal } : {}
62
+ });
63
+ }
64
+ function getDrive(request, id, query3 = {}, options = {}) {
65
+ return request(queryPath(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, query3), {
66
+ method: "GET",
67
+ ...options
68
+ });
69
+ }
70
+ function createDrive(request, body2, options = {}) {
71
+ return request("/v1/orchestrator/drives", {
72
+ method: "POST",
73
+ body: body2,
74
+ ...options
75
+ });
76
+ }
77
+ function updateDrive(request, id, body2, options = {}) {
78
+ return request(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, {
79
+ method: "PATCH",
80
+ body: body2,
81
+ ...options
82
+ });
83
+ }
84
+ function deleteDrive(request, id, query3 = {}, options = {}) {
85
+ return request(queryPath(`/v1/orchestrator/drives/${encodeURIComponent(id)}`, query3), {
86
+ method: "DELETE",
87
+ ...options
88
+ });
89
+ }
90
+ function listStorageTargets(request, signal) {
91
+ return request("/v1/orchestrator/storage-targets", {
92
+ method: "GET",
93
+ ...signal ? { signal } : {}
94
+ });
95
+ }
96
+
97
+ // ../../packages/api-client/dist/orchestrator/drive-files.js
98
+ function drivePath(id) {
99
+ return `/v1/orchestrator/drives/${encodeURIComponent(id)}`;
100
+ }
101
+ function listDriveContents(request, id, query3 = {}, signal) {
102
+ const params = new URLSearchParams();
103
+ for (const [key, value] of Object.entries(query3)) {
104
+ if (value !== void 0)
105
+ params.set(key, String(value));
106
+ }
107
+ return request(`${drivePath(id)}/contents${params.size ? `?${params}` : ""}`, {
108
+ method: "GET",
109
+ ...signal ? { signal } : {}
110
+ });
111
+ }
112
+ function clearDriveContents(request, id) {
113
+ return request(`${drivePath(id)}/contents`, { method: "DELETE" });
114
+ }
115
+
116
+ // ../../packages/api-client/dist/orchestrator/nodes.js
117
+ function nodeQuery(query3) {
118
+ const params = new URLSearchParams();
119
+ for (const [key, value] of Object.entries(query3)) {
120
+ if (value !== void 0)
121
+ params.set(key, String(value));
122
+ }
123
+ return params.size ? `?${params}` : "";
124
+ }
125
+ function listNodes(request, query3 = {}, signal) {
126
+ return request(`/v1/orchestrator/nodes${nodeQuery(query3)}`, {
127
+ method: "GET",
128
+ ...signal ? { signal } : {}
129
+ });
130
+ }
131
+ function listStaffNodes(request, query3 = {}, signal) {
132
+ return request(`/v1/staff/nodes${nodeQuery(query3)}`, {
133
+ method: "GET",
134
+ ...signal ? { signal } : {}
135
+ });
136
+ }
137
+ function nodeResourcePath(id) {
138
+ return `/v1/orchestrator/nodes/${encodeURIComponent(id)}`;
139
+ }
140
+ function getNode(request, id, signal) {
141
+ return request(nodeResourcePath(id), {
142
+ method: "GET",
143
+ ...signal ? { signal } : {}
144
+ });
145
+ }
146
+ function terminateNode(request, id, body2, headers) {
147
+ return request(`${nodeResourcePath(id)}/terminate`, {
148
+ method: "POST",
149
+ body: body2,
150
+ ...headers ? { headers } : {}
151
+ });
152
+ }
153
+ function assignNode(request, id, body2, headers) {
154
+ return request(`${nodeResourcePath(id)}/assign`, {
155
+ method: "POST",
156
+ body: body2,
157
+ ...headers ? { headers } : {}
158
+ });
159
+ }
160
+ function issueNodeSshCertificate(request, id, body2) {
161
+ return request(`${nodeResourcePath(id)}/ssh-certificates`, { method: "POST", body: body2 });
162
+ }
163
+ function rebootNode(request, id, body2, headers) {
164
+ return request(`${nodeResourcePath(id)}/reboot`, {
165
+ method: "POST",
166
+ body: body2,
167
+ ...headers ? { headers } : {}
168
+ });
169
+ }
170
+ function pushNodeKeys(request, id, body2 = {}) {
171
+ return request(`${nodeResourcePath(id)}/push-keys`, { method: "POST", body: body2 });
172
+ }
173
+
174
+ // ../../packages/api-client/dist/orchestrator/node-access.js
175
+ function launchReservation(request, reservationId, body2) {
176
+ return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/launch`, { method: "POST", body: body2 });
177
+ }
178
+ function switchReservationAccess(request, reservationId, body2) {
179
+ return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/switch-access`, { method: "POST", body: body2 });
180
+ }
181
+ function listReservationSshKeys(request, reservationId, query3 = {}, signal) {
182
+ const params = new URLSearchParams();
183
+ if (query3.virtual_machine_id !== void 0)
184
+ params.set("virtual_machine_id", query3.virtual_machine_id);
185
+ return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/ssh-keys${params.size ? `?${params}` : ""}`, { method: "GET", ...signal ? { signal } : {} });
186
+ }
187
+ function addReservationSshKey(request, reservationId, body2, options = {}) {
188
+ return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/ssh-keys`, { method: "POST", body: body2, ...options });
189
+ }
190
+
191
+ // ../../packages/api-client/dist/orchestrator/node-sanitize.js
192
+ function sanitizePath(nodeId3, jobId) {
193
+ const base3 = `/v1/orchestrator/nodes/${encodeURIComponent(nodeId3)}/sanitize-drives`;
194
+ return jobId === void 0 ? base3 : `${base3}/${encodeURIComponent(jobId)}`;
195
+ }
196
+ function startNodeSanitize(request, nodeId3, body2) {
197
+ return request(sanitizePath(nodeId3), { method: "POST", body: body2 });
198
+ }
199
+ function getNodeSanitize(request, nodeId3, jobId) {
200
+ return request(sanitizePath(nodeId3, jobId), { method: "GET" });
201
+ }
202
+ function updateNodeSanitize(request, nodeId3, jobId, body2) {
203
+ return request(sanitizePath(nodeId3, jobId), { method: "PATCH", body: body2 });
204
+ }
205
+
1
206
  // ../../packages/capabilities/dist/capabilities/admin-ssh.js
2
207
  import { z } from "zod";
3
208
 
@@ -62,7 +267,7 @@ var adminSshCapability = defineCapability({
62
267
  roles: ["admin"],
63
268
  description: "Open staff SSH using a temporary local key and a short-lived node certificate.",
64
269
  mutation: "local",
65
- http: { method: "POST", path: "/nodes/{node_id}/ssh-certificates" },
270
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{node_id}/ssh-certificates" },
66
271
  mcp: false,
67
272
  slack: false,
68
273
  cli: {
@@ -78,9 +283,8 @@ var adminSshCapability = defineCapability({
78
283
  }
79
284
  },
80
285
  input: z.object({ node_id: z.string().uuid(), public_key: z.string().min(1) }),
81
- execute: (ctx, input) => ctx.fetch(`/nodes/${encodeURIComponent(input.node_id)}/ssh-certificates`, {
82
- method: "POST",
83
- body: { public_key: input.public_key }
286
+ execute: (ctx, input) => issueNodeSshCertificate(ctx.fetch, input.node_id, {
287
+ public_key: input.public_key
84
288
  })
85
289
  });
86
290
 
@@ -287,14 +491,6 @@ var listSupplierOrganizations2 = listSupplierOrganizations;
287
491
 
288
492
  // ../../packages/capabilities/dist/capabilities/fleet.js
289
493
  import { z as z2 } from "zod";
290
- function queryPath(path, params) {
291
- const parts = [];
292
- for (const [key, value] of Object.entries(params)) {
293
- if (value?.trim())
294
- parts.push(`${encodeURIComponent(key)}=${encodeURIComponent(value.trim())}`);
295
- }
296
- return parts.length ? `${path}?${parts.join("&")}` : path;
297
- }
298
494
  var suppliersInput = z2.object({
299
495
  q: z2.string().optional(),
300
496
  offset: z2.number().int().min(0).optional(),
@@ -473,15 +669,15 @@ var listNodesCapability = defineCapability({
473
669
  limit: parsed.max != null || parsed.limit != null ? String(parsed.max ?? parsed.limit) : void 0
474
670
  };
475
671
  if (ctx.role === "user") {
476
- return ctx.fetch(queryPath("/nodes", pagination), { method: "GET" });
672
+ return listNodes(ctx.fetch, pagination);
477
673
  }
478
- return ctx.fetch(queryPath("/nodes", {
674
+ return listStaffNodes(ctx.fetch, {
479
675
  organization_id: parsed.organization_id,
480
676
  facility_id: parsed.facility_id,
481
677
  status: parsed.status,
482
678
  reservation_id: parsed.reservation_id,
483
679
  ...pagination
484
- }), { method: "GET" });
680
+ });
485
681
  }
486
682
  });
487
683
  var nodeExecCapability = defineCapability({
@@ -520,7 +716,7 @@ var nodeTerminateCapability = defineCapability({
520
716
  roles: ["admin"],
521
717
  description: "Admin-only. Mark a node terminated and clear its assignment once no undeleted VM remains on it. Does no host cleanup. There is no deenroll verb. Slack waits for a human confirm. ",
522
718
  mutation: "preview-confirm",
523
- http: { method: "POST", path: "/nodes/{id}/terminate" },
719
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{id}/terminate" },
524
720
  cli: {
525
721
  command: ["admin", "nodes", "terminate"],
526
722
  vnext: {
@@ -555,11 +751,7 @@ var nodeTerminateCapability = defineCapability({
555
751
  if (!ctx.confirmed) {
556
752
  return preview("node.terminate", { node_id: id, ...body2 });
557
753
  }
558
- return ctx.fetch(`/nodes/${encodeURIComponent(id)}/terminate`, {
559
- method: "POST",
560
- body: body2,
561
- ...parsed.idempotency_key ? { headers: { "Idempotency-Key": parsed.idempotency_key } } : {}
562
- });
754
+ return terminateNode(ctx.fetch, id, body2, parsed.idempotency_key ? { "Idempotency-Key": parsed.idempotency_key } : void 0);
563
755
  }
564
756
  });
565
757
  var fleetCapabilities = [
@@ -1196,7 +1388,7 @@ var adminNodeHealthCapability = defineCapability({
1196
1388
  roles: ["admin"],
1197
1389
  description: "Read lifecycle and readiness facts for one enrolled node.",
1198
1390
  mutation: "read",
1199
- http: { method: "GET", path: "/nodes/{id}" },
1391
+ http: { method: "GET", path: "/v1/orchestrator/nodes/{id}" },
1200
1392
  cli: {
1201
1393
  command: ["admin", "nodes", "health"],
1202
1394
  vnext: adminHelp(["admin", "nodes", "health"], "Inspect lifecycle and readiness facts for one node.", "ornn admin nodes health <node-id>", "ornn admin nodes health <node-id> --format json", ["canonical node ID"])
@@ -1206,7 +1398,7 @@ var adminNodeHealthCapability = defineCapability({
1206
1398
  input: nodeInput,
1207
1399
  execute: async (ctx, input) => {
1208
1400
  const parsed = nodeInput.parse(input);
1209
- return ctx.fetch(`/nodes/${encodeURIComponent(parsed.node_id)}`, { method: "GET" });
1401
+ return getNode(ctx.fetch, parsed.node_id);
1210
1402
  }
1211
1403
  });
1212
1404
  var adminNodeMetricsCapability = withAdminBinding(telemetryLatestCapability, adminHelp(["admin", "nodes", "metrics"], "Read a bounded telemetry window for one node.", "ornn admin nodes metrics <node-id> [--span 15m] [--start TIME --end TIME] [--max-points 240]", "ornn admin nodes metrics <node-id> --span 15m [--start TIME --end TIME] --max-points 240 --format json", ["canonical node ID"]));
@@ -1320,54 +1512,6 @@ function listOffers(request, filter = {}) {
1320
1512
  // ../../packages/capabilities/dist/capabilities/admin-capacity-reservations.js
1321
1513
  import { z as z9 } from "zod";
1322
1514
 
1323
- // ../../packages/api-client/dist/orchestrator/catalog.js
1324
- var hardwareCatalogPath = "/v1/orchestrator/catalog/hardware";
1325
- function getHardwareCatalog(request, signal) {
1326
- return request(hardwareCatalogPath, {
1327
- method: "GET",
1328
- ...signal ? { signal } : {}
1329
- });
1330
- }
1331
-
1332
- // ../../packages/api-client/dist/orchestrator/locality.js
1333
- var localityGeolocatePath = "/v1/orchestrator/locality/geolocate";
1334
- function geolocate(request, query3, signal) {
1335
- const target = query3.ip !== void 0 ? `ip=${encodeURIComponent(query3.ip)}` : `address=${encodeURIComponent(query3.address)}`;
1336
- return request(`${localityGeolocatePath}?${target}`, {
1337
- method: "GET",
1338
- ...signal ? { signal } : {}
1339
- });
1340
- }
1341
-
1342
- // ../../packages/api-client/dist/orchestrator/registry.js
1343
- function getContainerRegistry(request) {
1344
- return request("/v1/orchestrator/registry", { method: "GET" });
1345
- }
1346
- function listRegistryRepositories(request) {
1347
- return request("/v1/orchestrator/registry/repositories", { method: "GET" });
1348
- }
1349
- function listRegistryTags(request, repository) {
1350
- return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
1351
- method: "GET"
1352
- });
1353
- }
1354
- function getRegistryUsage(request) {
1355
- return request("/v1/orchestrator/registry/usage", { method: "GET" });
1356
- }
1357
- function listRegistryCaches(request, query3 = {}) {
1358
- const params = new URLSearchParams();
1359
- if (query3.controller_id !== void 0)
1360
- params.set("controller_id", query3.controller_id);
1361
- return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
1362
- method: "GET"
1363
- });
1364
- }
1365
- function deleteRegistryTag(request, repository, tag) {
1366
- return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
1367
- method: "DELETE"
1368
- });
1369
- }
1370
-
1371
1515
  // ../../packages/capabilities/dist/capabilities/staff-shared.js
1372
1516
  function statusOf(error) {
1373
1517
  if (error && typeof error === "object" && "status" in error) {
@@ -2969,17 +3113,13 @@ function requireAdmin(ctx) {
2969
3113
  if (ctx.role !== "admin")
2970
3114
  throw new Error("Admin role required.");
2971
3115
  }
2972
- function sanitizePath(nodeId3, jobId) {
2973
- const base3 = `/nodes/${encodeURIComponent(nodeId3)}/sanitize-drives`;
2974
- return jobId ? `${base3}/${encodeURIComponent(jobId)}` : base3;
2975
- }
2976
3116
  var nodeSanitizeStartCapability = defineCapability({
2977
3117
  id: "node.sanitize.start",
2978
3118
  domain: "fleet",
2979
3119
  roles: ["admin"],
2980
3120
  description: "Destructive staff maintenance write: start node drive sanitization with a stable job UUID. data_wipe erases local data drives and keeps the OS; ram_roundtrip does not erase drives; node_turnover wipes and restores the whole node; host_restore restores the host. Supply the exact operation-specific confirmation phrase yourself; it is never filled automatically. The job then waits for staff approval. Slack waits for a human confirm.",
2981
3121
  mutation: "preview-confirm",
2982
- http: { method: "POST", path: "/nodes/{node_id}/sanitize-drives" },
3122
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{node_id}/sanitize-drives" },
2983
3123
  cli: {
2984
3124
  command: ["admin", "nodes", "sanitize"],
2985
3125
  vnext: sanitizeHelp(["admin", "nodes", "sanitize"], "Start one held sanitize job on one exact node.", "ornn admin nodes sanitize <node-id> --operation data_wipe|ram_roundtrip|node_turnover|host_restore --confirmation PHRASE [--recovery-uuid UUID] [--job-id UUID] [--batch UUID]", "Exact node, operation, job UUID, and confirmation phrase.")
@@ -2991,7 +3131,7 @@ var nodeSanitizeStartCapability = defineCapability({
2991
3131
  const { node_id, ...body2 } = nodeSanitizeStartInput.parse(input);
2992
3132
  if (!ctx.confirmed)
2993
3133
  return preview("node.sanitize.start", { node_id, ...body2 });
2994
- return ctx.fetch(sanitizePath(node_id), { method: "POST", body: body2 });
3134
+ return startNodeSanitize(ctx.fetch, node_id, body2);
2995
3135
  }
2996
3136
  });
2997
3137
  var nodeSanitizeShowCapability = defineCapability({
@@ -3000,7 +3140,7 @@ var nodeSanitizeShowCapability = defineCapability({
3000
3140
  roles: ["admin"],
3001
3141
  description: "Staff maintenance read: show the bounded JSON status for one node sanitize job, including its operation, approval, manual cleanup attestation, and per-drive results. This does not request an NDJSON download.",
3002
3142
  mutation: "read",
3003
- http: { method: "GET", path: "/nodes/{node_id}/sanitize-drives/{job_id}" },
3143
+ http: { method: "GET", path: "/v1/orchestrator/nodes/{node_id}/sanitize-drives/{job_id}" },
3004
3144
  cli: {
3005
3145
  command: ["admin", "nodes", "sanitize-status"],
3006
3146
  vnext: sanitizeHelp(["admin", "nodes", "sanitize-status"], "Read one sanitize job on one exact node.", "ornn admin nodes sanitize-status <node-id> --job UUID")
@@ -3010,7 +3150,7 @@ var nodeSanitizeShowCapability = defineCapability({
3010
3150
  execute: async (ctx, input) => {
3011
3151
  requireAdmin(ctx);
3012
3152
  const parsed = nodeSanitizeShowInput.parse(input);
3013
- return ctx.fetch(sanitizePath(parsed.node_id, parsed.job_id), { method: "GET" });
3153
+ return getNodeSanitize(ctx.fetch, parsed.node_id, parsed.job_id);
3014
3154
  }
3015
3155
  });
3016
3156
  var nodeSanitizeUpdateCapability = defineCapability({
@@ -3019,7 +3159,7 @@ var nodeSanitizeUpdateCapability = defineCapability({
3019
3159
  roles: ["admin"],
3020
3160
  description: "Staff maintenance write on a held sanitize job. APPROVE SANITIZATION starts destructive maintenance. SKIP SANITIZATION skips an eligible first-use wipe and certifies nothing. ACCEPT MANUAL CLEANUP lets a held Bare Metal release finish when its node_turnover job is awaiting_approval with no recovery image, after staff manually revoked tenant access and sanitized the data drives with the OS retained; it requires manual_cleanup with the reservation, the current orchestrator release operation, a reason, the evidence file SHA-256, and all three attestations. The owner enforces eligibility. Slack waits for a human confirm.",
3021
3161
  mutation: "preview-confirm",
3022
- http: { method: "PATCH", path: "/nodes/{node_id}/sanitize-drives/{job_id}" },
3162
+ http: { method: "PATCH", path: "/v1/orchestrator/nodes/{node_id}/sanitize-drives/{job_id}" },
3023
3163
  cli: {
3024
3164
  command: ["admin", "nodes", "sanitize-decide"],
3025
3165
  vnext: sanitizeHelp(["admin", "nodes", "sanitize-decide"], "Approve, skip, or accept manual cleanup for one held sanitize job.", 'ornn admin nodes sanitize-decide <node-id> --job UUID --confirmation "APPROVE SANITIZATION"|"SKIP SANITIZATION"|"ACCEPT MANUAL CLEANUP" [--reservation UUID --release-operation UUID --reason TEXT --evidence-file PATH --tenant-access-revoked --data-drives-sanitized --acknowledge-retained-os]', "Exact node, job, decision, and for manual cleanup the reservation, release operation, reason, evidence SHA-256, and retained-OS attestations.")
@@ -3031,7 +3171,7 @@ var nodeSanitizeUpdateCapability = defineCapability({
3031
3171
  const { node_id, job_id, ...body2 } = nodeSanitizeUpdateInput.parse(input);
3032
3172
  if (!ctx.confirmed)
3033
3173
  return preview("node.sanitize.update", { node_id, job_id, ...body2 });
3034
- return ctx.fetch(sanitizePath(node_id, job_id), { method: "PATCH", body: body2 });
3174
+ return updateNodeSanitize(ctx.fetch, node_id, job_id, body2);
3035
3175
  }
3036
3176
  });
3037
3177
  var adminNodeSanitizeCapabilities = [
@@ -3101,14 +3241,10 @@ async function reboot(ctx, input, mode) {
3101
3241
  return preview2(`nodes.${mode}`, payload);
3102
3242
  if (!parsed.machine_id)
3103
3243
  throw new Error("The live machine target must be resolved before reboot.");
3104
- return ctx.fetch(`/nodes/${encodeURIComponent(parsed.machine_id)}/reboot`, {
3105
- method: "POST",
3106
- body: {
3107
- mode,
3108
- ...parsed.idempotency_key ? { request_id: parsed.idempotency_key } : {}
3109
- },
3110
- headers: requestHeaders(parsed.idempotency_key)
3111
- });
3244
+ return rebootNode(ctx.fetch, parsed.machine_id, {
3245
+ mode,
3246
+ ...parsed.idempotency_key ? { request_id: parsed.idempotency_key } : {}
3247
+ }, requestHeaders(parsed.idempotency_key));
3112
3248
  }
3113
3249
  var adminNodeRebootCapability = defineCapability({
3114
3250
  id: "nodes.reboot",
@@ -3116,7 +3252,7 @@ var adminNodeRebootCapability = defineCapability({
3116
3252
  roles: ["admin"],
3117
3253
  description: "Reboot the exact live machine backing one managed node after a normalized review.",
3118
3254
  mutation: "preview-confirm",
3119
- http: { method: "POST", path: "/nodes/{id}/reboot" },
3255
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{id}/reboot" },
3120
3256
  cli: {
3121
3257
  command: ["admin", "nodes", "reboot"],
3122
3258
  vnext: adminLifecycleHelp(["admin", "nodes", "reboot"], "Reboot one exact live machine while preserving local data and access configuration.", "ornn admin nodes reboot <node-ref> [] [--no-wait] [--timeout SECONDS]", "Unsupported: reboot requires an eligible human terminal.", "Node and live-machine identities, supplier, facility, capacity assignment, and preserved access.")
@@ -3132,7 +3268,7 @@ var adminNodeHardResetCapability = defineCapability({
3132
3268
  roles: ["admin"],
3133
3269
  description: "Hard reset the exact live machine backing one node with explicit local-data erasure scope.",
3134
3270
  mutation: "preview-confirm",
3135
- http: { method: "POST", path: "/nodes/{id}/reboot" },
3271
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{id}/reboot" },
3136
3272
  cli: {
3137
3273
  command: ["admin", "nodes", "hard-reset"],
3138
3274
  vnext: adminLifecycleHelp(["admin", "nodes", "hard-reset"], "Erase local tenant data and hard reset one exact live machine.", "ornn admin nodes hard-reset <node-ref> --erase-local-data [] [--no-wait] [--timeout SECONDS]", "Unsupported: hard reset requires an eligible human terminal.", "Node and live-machine identities, supplier, facility, capacity assignment, erased local data, and restored keys.")
@@ -3148,7 +3284,7 @@ var adminNodeAssignCapability = defineCapability({
3148
3284
  roles: ["admin"],
3149
3285
  description: "Assign one exact node to one exact capacity reservation after consequence review.",
3150
3286
  mutation: "preview-confirm",
3151
- http: { method: "POST", path: "/nodes/{id}/assign" },
3287
+ http: { method: "POST", path: "/v1/orchestrator/nodes/{id}/assign" },
3152
3288
  cli: {
3153
3289
  command: ["admin", "nodes", "assign"],
3154
3290
  vnext: adminLifecycleHelp(["admin", "nodes", "assign"], "Assign one exact node to one exact capacity reservation.", "ornn admin nodes assign <node-ref> --reservation <reservation-id> [] [--no-wait]", "ornn admin nodes assign <node-id> --reservation <reservation-id> --idempotency-key KEY --format json", "Node, supplier, facility, previous and requested capacity assignments, and tenant access change.")
@@ -3165,11 +3301,7 @@ var adminNodeAssignCapability = defineCapability({
3165
3301
  };
3166
3302
  if (!ctx.confirmed)
3167
3303
  return preview2("nodes.assign", { node_id: id, ...body2 });
3168
- return ctx.fetch(`/nodes/${encodeURIComponent(id)}/assign`, {
3169
- method: "POST",
3170
- body: body2,
3171
- headers: requestHeaders(parsed.idempotency_key)
3172
- });
3304
+ return assignNode(ctx.fetch, id, body2, requestHeaders(parsed.idempotency_key));
3173
3305
  }
3174
3306
  });
3175
3307
  var adminNodeLifecycleCapabilities = [
@@ -3565,7 +3697,7 @@ var machineSwitchCapability = cliOnly({
3565
3697
  audience: "customer",
3566
3698
  category: "resource",
3567
3699
  order: 463,
3568
- outcome: "Change only the explicitly requested VM, Bare Metal, or network goal while retaining SSH-key intent.",
3700
+ outcome: "Change VM, Bare Metal, or network access while retaining SSH keys. When changing access mode, specify --network if the current network mode is unreported.",
3569
3701
  human: "ornn machines switch <canonical-reservation-id> [--mode vm|bare-metal] [--network public|private] [--erase-local-data]",
3570
3702
  automation: "ornn machines switch <canonical-reservation-id> [--mode vm|bare-metal] [--network public|private] [--erase-local-data] --idempotency-key <key> --format json",
3571
3703
  acceptedReferences: ["canonical capacity-reservation ID"],
@@ -3609,7 +3741,7 @@ var machineResetCapability = cliOnly({
3609
3741
  id: "access.machines.reset",
3610
3742
  domain: "access",
3611
3743
  roles: ["user"],
3612
- description: "Erase local machine data and hard reset one exact direct machine.",
3744
+ description: "Erase local data and hard reset one exact Bare Metal host.",
3613
3745
  mutation: "preview-confirm",
3614
3746
  input: machineMaintenanceInput,
3615
3747
  cli: {
@@ -3619,7 +3751,7 @@ var machineResetCapability = cliOnly({
3619
3751
  audience: "customer",
3620
3752
  category: "resource",
3621
3753
  order: 465,
3622
- outcome: "Hard reset one exact machine only with explicit local-data erasure scope and final consent.",
3754
+ outcome: "Hard reset one exact Bare Metal host with explicit local-data erasure scope and final consent.",
3623
3755
  human: "ornn machines reset <canonical-machine-id|exact-hostname> --erase-local-data [--no-wait]",
3624
3756
  automation: "ornn machines reset <canonical-machine-id> --erase-local-data --idempotency-key <key> --format json",
3625
3757
  acceptedReferences: [
@@ -3826,12 +3958,9 @@ var computeCapabilities = [
3826
3958
  sshKeyAssignmentSyncCapability,
3827
3959
  sshKeyAssignmentStatusCapability
3828
3960
  ];
3829
- var NODES_ROUTE = "/v1/workflows/compute/nodes";
3830
- var ORG_SSH_KEYS_ROUTE = `${NODES_ROUTE}/organizations/me/ssh-keys`;
3831
- var CLUSTER_USERS_ROUTE = `${NODES_ROUTE}/organizations/me/cluster-users`;
3832
- function reservationNodesRoute(reservationId, suffix) {
3833
- return `${NODES_ROUTE}/reservations/${encodeURIComponent(reservationId)}/${suffix}`;
3834
- }
3961
+ var NODES_ROUTE = "/v1/orchestrator/nodes";
3962
+ var ORG_SSH_KEYS_ROUTE = "/v1/workflows/compute/nodes/organizations/me/ssh-keys";
3963
+ var CLUSTER_USERS_ROUTE = "/v1/workflows/compute/nodes/organizations/me/cluster-users";
3835
3964
  var pageInput = z17.object({
3836
3965
  limit: z17.number().int().min(1).max(500).optional(),
3837
3966
  cursor: z17.string().optional()
@@ -3845,10 +3974,7 @@ var keyIdInput = z17.object({ keyId: z17.string(), confirm: z17.boolean().option
3845
3974
  var nodeIdInput = z17.object({ nodeId: z17.string(), confirm: z17.boolean().optional() });
3846
3975
  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.";
3847
3976
  function rebootMachine(mode) {
3848
- return (ctx, input) => ctx.fetch(`${NODES_ROUTE}/${encodeURIComponent(input.nodeId)}/reboot`, {
3849
- method: "POST",
3850
- body: { mode }
3851
- });
3977
+ return (ctx, input) => rebootNode(ctx.fetch, input.nodeId, { mode });
3852
3978
  }
3853
3979
  var accessVerbCapabilities = [
3854
3980
  defineCapability({
@@ -3860,9 +3986,7 @@ var accessVerbCapabilities = [
3860
3986
  http: { method: "GET", path: NODES_ROUTE },
3861
3987
  input: z17.object({ reservationId: z17.string() }),
3862
3988
  slack: false,
3863
- execute: (ctx, input) => ctx.fetch(`${NODES_ROUTE}?reservation_id=${encodeURIComponent(input.reservationId)}`, {
3864
- method: "GET"
3865
- })
3989
+ execute: (ctx, input) => listNodes(ctx.fetch, { reservation_id: input.reservationId })
3866
3990
  }),
3867
3991
  defineCapability({
3868
3992
  id: "access.activate",
@@ -3887,18 +4011,15 @@ var accessVerbCapabilities = [
3887
4011
  slack: false,
3888
4012
  // Without disk_id the orchestrator boots "virtual-machine" from the
3889
4013
  // reservation's saved disk and refuses when there is none.
3890
- execute: (ctx, input) => ctx.fetch(reservationNodesRoute(input.reservationId, "launch"), {
3891
- method: "POST",
3892
- body: {
3893
- access_mode: input.accessMode === "vm" ? "virtual-machine" : "bare-metal",
3894
- machine_count: input.machineCount ?? 1,
3895
- request_id: input.requestId ?? null,
3896
- ssh_key_ids: input.sshKeyIds,
3897
- ...input.networkMode ? { network_mode: input.networkMode } : {},
3898
- ...input.diskId ? { disk_id: input.diskId } : {},
3899
- ...input.storageLoadDriveId ? { storage_load_drive_id: input.storageLoadDriveId } : {},
3900
- ...input.storageSaveDriveId ? { storage_save_drive_id: input.storageSaveDriveId } : {}
3901
- }
4014
+ execute: (ctx, input) => launchReservation(ctx.fetch, input.reservationId, {
4015
+ access_mode: input.accessMode === "vm" ? "virtual-machine" : "bare-metal",
4016
+ machine_count: input.machineCount ?? 1,
4017
+ request_id: input.requestId ?? null,
4018
+ ssh_key_ids: input.sshKeyIds,
4019
+ ...input.networkMode ? { network_mode: input.networkMode } : {},
4020
+ ...input.diskId ? { disk_id: input.diskId } : {},
4021
+ ...input.storageLoadDriveId ? { storage_load_drive_id: input.storageLoadDriveId } : {},
4022
+ ...input.storageSaveDriveId ? { storage_save_drive_id: input.storageSaveDriveId } : {}
3902
4023
  })
3903
4024
  }),
3904
4025
  defineCapability({
@@ -3918,14 +4039,11 @@ var accessVerbCapabilities = [
3918
4039
  confirm: z17.boolean().optional()
3919
4040
  }),
3920
4041
  slack: false,
3921
- execute: (ctx, input) => ctx.fetch(reservationNodesRoute(input.reservationId, "switch-access"), {
3922
- method: "POST",
3923
- body: {
3924
- access_mode: input.accessMode ?? "bare-metal",
3925
- network_mode: input.networkMode,
3926
- request_id: input.requestId,
3927
- ssh_key_ids: input.sshKeyIds
3928
- }
4042
+ execute: (ctx, input) => switchReservationAccess(ctx.fetch, input.reservationId, {
4043
+ access_mode: input.accessMode ?? "bare-metal",
4044
+ network_mode: input.networkMode,
4045
+ request_id: input.requestId,
4046
+ ssh_key_ids: input.sshKeyIds
3929
4047
  })
3930
4048
  }),
3931
4049
  defineCapability({
@@ -3937,7 +4055,7 @@ var accessVerbCapabilities = [
3937
4055
  http: { method: "GET", path: `${NODES_ROUTE}/reservations/{reservationId}/ssh-keys` },
3938
4056
  input: z17.object({ reservationId: z17.string() }),
3939
4057
  slack: false,
3940
- execute: (ctx, input) => ctx.fetch(reservationNodesRoute(input.reservationId, "ssh-keys"), { method: "GET" })
4058
+ execute: (ctx, input) => listReservationSshKeys(ctx.fetch, input.reservationId)
3941
4059
  }),
3942
4060
  defineCapability({
3943
4061
  id: "access.keys.add",
@@ -3948,9 +4066,9 @@ var accessVerbCapabilities = [
3948
4066
  http: { method: "POST", path: `${NODES_ROUTE}/reservations/{reservationId}/ssh-keys` },
3949
4067
  input: publicKeyInput.extend({ reservationId: z17.string() }),
3950
4068
  slack: false,
3951
- execute: (ctx, input) => ctx.fetch(reservationNodesRoute(input.reservationId, "ssh-keys"), {
3952
- method: "POST",
3953
- body: { label: input.label ?? null, public_key: input.publicKey }
4069
+ execute: (ctx, input) => addReservationSshKey(ctx.fetch, input.reservationId, {
4070
+ label: input.label ?? null,
4071
+ public_key: input.publicKey
3954
4072
  })
3955
4073
  }),
3956
4074
  defineCapability({
@@ -4073,9 +4191,9 @@ var machinePushKeysCapability = defineCapability({
4073
4191
  }),
4074
4192
  mcp: false,
4075
4193
  slack: false,
4076
- execute: (ctx, input) => ctx.fetch(`${NODES_ROUTE}/${encodeURIComponent(input.nodeId)}/push-keys`, {
4077
- method: "POST",
4078
- body: { request_id: input.requestId, ssh_key_ids: input.sshKeyIds }
4194
+ execute: (ctx, input) => pushNodeKeys(ctx.fetch, input.nodeId, {
4195
+ request_id: input.requestId,
4196
+ ssh_key_ids: input.sshKeyIds
4079
4197
  })
4080
4198
  });
4081
4199
  var machineMetricsCapabilities = [
@@ -4085,7 +4203,10 @@ var machineMetricsCapabilities = [
4085
4203
  roles: ["user"],
4086
4204
  description: "Fetch a live metrics snapshot for one reservation machine.",
4087
4205
  mutation: "read",
4088
- http: { method: "GET", path: `${NODES_ROUTE}/reservations/{reservationId}/live-metrics` },
4206
+ http: {
4207
+ method: "GET",
4208
+ path: "/v1/workflows/compute/nodes/reservations/{reservationId}/live-metrics"
4209
+ },
4089
4210
  input: z17.object({ reservationId: z17.string(), machineId: z17.string() }),
4090
4211
  mcp: false,
4091
4212
  slack: false,
@@ -4099,7 +4220,10 @@ var machineMetricsCapabilities = [
4099
4220
  roles: ["user"],
4100
4221
  description: "Fetch historical telemetry for one reservation machine over a time range.",
4101
4222
  mutation: "read",
4102
- http: { method: "GET", path: `${NODES_ROUTE}/reservations/{reservationId}/telemetry-history` },
4223
+ http: {
4224
+ method: "GET",
4225
+ path: "/v1/workflows/compute/nodes/reservations/{reservationId}/telemetry-history"
4226
+ },
4103
4227
  input: z17.object({
4104
4228
  reservationId: z17.string(),
4105
4229
  machineId: z17.string(),
@@ -7508,13 +7632,6 @@ var volumeCapabilities = [
7508
7632
  })
7509
7633
  ];
7510
7634
  var DRIVES_ROUTE = "/v1/orchestrator/drives";
7511
- function drivePath(driveId) {
7512
- return `${DRIVES_ROUTE}/${encodeURIComponent(driveId)}`;
7513
- }
7514
- var STORAGE_DRIVES_ROUTE = "/v1/workflows/compute/nodes/storage-drives";
7515
- function storageDrivePath(driveId, action) {
7516
- return `${STORAGE_DRIVES_ROUTE}/${encodeURIComponent(driveId)}/${action}`;
7517
- }
7518
7635
  var reservationInput = z30.object({ reservationId: z30.string() });
7519
7636
  var reservationWrite = reservationInput.extend({ confirm: z30.boolean().optional() });
7520
7637
  var driveInput = z30.object({ driveId: z30.string() });
@@ -7593,7 +7710,7 @@ var storageVerbCapabilities = [
7593
7710
  http: { method: "GET", path: "/v1/orchestrator/storage-targets" },
7594
7711
  input: z30.object({}),
7595
7712
  slack: false,
7596
- execute: (ctx) => ctx.fetch("/v1/orchestrator/storage-targets", { method: "GET" })
7713
+ execute: (ctx) => listStorageTargets(ctx.fetch)
7597
7714
  }),
7598
7715
  defineCapability({
7599
7716
  id: "volume.list",
@@ -7608,12 +7725,10 @@ var storageVerbCapabilities = [
7608
7725
  }),
7609
7726
  mcp: { name: "storage_volumes_list" },
7610
7727
  slack: false,
7611
- execute: (ctx, input) => {
7612
- const query3 = new URLSearchParams({ limit: String(input.limit ?? 25) });
7613
- if (input.cursor)
7614
- query3.set("cursor", input.cursor);
7615
- return ctx.fetch(`${DRIVES_ROUTE}?${query3}`, { method: "GET" });
7616
- }
7728
+ execute: (ctx, input) => listDrives(ctx.fetch, {
7729
+ limit: input.limit ?? 25,
7730
+ ...input.cursor ? { cursor: input.cursor } : {}
7731
+ })
7617
7732
  }),
7618
7733
  defineCapability({
7619
7734
  id: "volume.show",
@@ -7625,7 +7740,7 @@ var storageVerbCapabilities = [
7625
7740
  input: driveInput,
7626
7741
  mcp: { name: "storage_volumes_show" },
7627
7742
  slack: false,
7628
- execute: (ctx, input) => ctx.fetch(drivePath(input.driveId), { method: "GET" })
7743
+ execute: (ctx, input) => getDrive(ctx.fetch, input.driveId)
7629
7744
  }),
7630
7745
  defineCapability({
7631
7746
  id: "volume.create",
@@ -7641,9 +7756,9 @@ var storageVerbCapabilities = [
7641
7756
  }),
7642
7757
  mcp: { name: "storage_volumes_create" },
7643
7758
  slack: false,
7644
- execute: (ctx, input) => ctx.fetch(DRIVES_ROUTE, {
7645
- method: "POST",
7646
- body: { name: input.name, source_drive_id: input.sourceDriveId ?? null }
7759
+ execute: (ctx, input) => createDrive(ctx.fetch, {
7760
+ name: input.name,
7761
+ source_drive_id: input.sourceDriveId ?? null
7647
7762
  })
7648
7763
  }),
7649
7764
  defineCapability({
@@ -7652,11 +7767,11 @@ var storageVerbCapabilities = [
7652
7767
  roles: ["user"],
7653
7768
  description: "Refresh a storage volume's (drive's) reported usage/state.",
7654
7769
  mutation: "preview-confirm",
7655
- http: { method: "POST", path: `${STORAGE_DRIVES_ROUTE}/{driveId}/refresh` },
7770
+ http: { method: "GET", path: `${DRIVES_ROUTE}/{driveId}` },
7656
7771
  input: driveWrite,
7657
7772
  mcp: { name: "storage_volumes_refresh" },
7658
7773
  slack: false,
7659
- execute: (ctx, input) => ctx.fetch(storageDrivePath(input.driveId, "refresh"), { method: "POST" })
7774
+ execute: (ctx, input) => getDrive(ctx.fetch, input.driveId, { refresh: true })
7660
7775
  }),
7661
7776
  defineCapability({
7662
7777
  id: "volume.clear",
@@ -7670,7 +7785,7 @@ var storageVerbCapabilities = [
7670
7785
  slack: false,
7671
7786
  // The route answers 204, so report which volume was cleared.
7672
7787
  execute: async (ctx, input) => {
7673
- await ctx.fetch(`${drivePath(input.driveId)}/contents`, { method: "DELETE" });
7788
+ await clearDriveContents(ctx.fetch, input.driveId);
7674
7789
  return { cleared: true, drive_id: input.driveId };
7675
7790
  }
7676
7791
  }),
@@ -7685,7 +7800,7 @@ var storageVerbCapabilities = [
7685
7800
  mcp: { name: "storage_volumes_delete" },
7686
7801
  slack: false,
7687
7802
  execute: async (ctx, input) => {
7688
- await ctx.fetch(drivePath(input.driveId), { method: "DELETE" });
7803
+ await deleteDrive(ctx.fetch, input.driveId);
7689
7804
  return { deleted: true, drive_id: input.driveId };
7690
7805
  }
7691
7806
  }),
@@ -7701,22 +7816,19 @@ var storageVerbCapabilities = [
7701
7816
  slack: false,
7702
7817
  execute: (ctx, input) => {
7703
7818
  const endpoint = input.endpointUrl ?? (input.provider === "r2" && input.accountId ? `https://${input.accountId}.r2.cloudflarestorage.com` : void 0);
7704
- return ctx.fetch(DRIVES_ROUTE, {
7705
- method: "POST",
7706
- body: {
7707
- name: input.name ?? input.bucket,
7708
- provider: "ornn_volume",
7709
- source_provider: input.provider === "gcs" ? "external_gcs" : "s3",
7710
- external_bucket: input.bucket,
7711
- external_prefix: input.prefix ?? null,
7712
- external_region: input.region ?? (input.provider === "r2" ? "auto" : null),
7713
- external_read_only: input.readOnly !== false,
7714
- ...input.provider === "r2" ? { external_s3_provider: "cloudflare_r2" } : {},
7715
- ...input.provider === "s3" ? { external_s3_provider: "aws_s3" } : {},
7716
- ...endpoint ? { external_endpoint_url: endpoint } : {},
7717
- ...input.accessKeyId ? { external_access_key_id: input.accessKeyId } : {},
7718
- ...input.secretAccessKey ? { external_secret_access_key: input.secretAccessKey } : {}
7719
- }
7819
+ return createDrive(ctx.fetch, {
7820
+ name: input.name ?? input.bucket,
7821
+ provider: "ornn_volume",
7822
+ source_provider: input.provider === "gcs" ? "external_gcs" : "s3",
7823
+ external_bucket: input.bucket,
7824
+ external_prefix: input.prefix ?? null,
7825
+ external_region: input.region ?? (input.provider === "r2" ? "auto" : null),
7826
+ external_read_only: input.readOnly !== false,
7827
+ ...input.provider === "r2" ? { external_s3_provider: "cloudflare_r2" } : {},
7828
+ ...input.provider === "s3" ? { external_s3_provider: "aws_s3" } : {},
7829
+ ...endpoint ? { external_endpoint_url: endpoint } : {},
7830
+ ...input.accessKeyId ? { external_access_key_id: input.accessKeyId } : {},
7831
+ ...input.secretAccessKey ? { external_secret_access_key: input.secretAccessKey } : {}
7720
7832
  });
7721
7833
  }
7722
7834
  }),
@@ -7726,11 +7838,11 @@ var storageVerbCapabilities = [
7726
7838
  roles: ["user"],
7727
7839
  description: "Verify a connected S3-compatible bucket's source credentials/connectivity.",
7728
7840
  mutation: "preview-confirm",
7729
- http: { method: "POST", path: `${STORAGE_DRIVES_ROUTE}/{driveId}/verify-source` },
7841
+ http: { method: "PATCH", path: `${DRIVES_ROUTE}/{driveId}` },
7730
7842
  input: driveWrite,
7731
7843
  mcp: { name: "storage_buckets_verify" },
7732
7844
  slack: false,
7733
- execute: (ctx, input) => ctx.fetch(storageDrivePath(input.driveId, "verify-source"), { method: "POST" })
7845
+ execute: (ctx, input) => updateDrive(ctx.fetch, input.driveId, { verify_source: true })
7734
7846
  }),
7735
7847
  defineCapability({
7736
7848
  id: "bucket.update_credentials",
@@ -7738,13 +7850,12 @@ var storageVerbCapabilities = [
7738
7850
  roles: ["user"],
7739
7851
  description: "Update a connected S3-compatible bucket's access key credentials.",
7740
7852
  mutation: "preview-confirm",
7741
- http: { method: "PATCH", path: `${STORAGE_DRIVES_ROUTE}/{driveId}/source-credentials` },
7853
+ http: { method: "PATCH", path: `${DRIVES_ROUTE}/{driveId}` },
7742
7854
  input: driveWrite.extend({ accessKeyId: z30.string(), secretAccessKey: z30.string() }),
7743
7855
  mcp: { name: "storage_buckets_update_credentials" },
7744
7856
  slack: false,
7745
- execute: (ctx, input) => ctx.fetch(storageDrivePath(input.driveId, "source-credentials"), {
7746
- method: "PATCH",
7747
- body: {
7857
+ execute: (ctx, input) => updateDrive(ctx.fetch, input.driveId, {
7858
+ source_credentials: {
7748
7859
  external_access_key_id: input.accessKeyId,
7749
7860
  external_secret_access_key: input.secretAccessKey
7750
7861
  }
@@ -7765,12 +7876,11 @@ var storageCompositionCapabilities = [
7765
7876
  }),
7766
7877
  mcp: false,
7767
7878
  slack: false,
7768
- execute: (ctx, input) => {
7769
- const query3 = new URLSearchParams({ limit: String(input.limit ?? 25), scope: "external" });
7770
- if (input.cursor)
7771
- query3.set("cursor", input.cursor);
7772
- return ctx.fetch(`${DRIVES_ROUTE}?${query3}`, { method: "GET" });
7773
- }
7879
+ execute: (ctx, input) => listDrives(ctx.fetch, {
7880
+ limit: input.limit ?? 25,
7881
+ scope: "external",
7882
+ ...input.cursor ? { cursor: input.cursor } : {}
7883
+ })
7774
7884
  }),
7775
7885
  defineCapability({
7776
7886
  id: "volume.contents",
@@ -7786,14 +7896,11 @@ var storageCompositionCapabilities = [
7786
7896
  }),
7787
7897
  mcp: false,
7788
7898
  slack: false,
7789
- execute: (ctx, input) => {
7790
- const query3 = new URLSearchParams({ recursive: "true" });
7791
- if (input.path)
7792
- query3.set("path", input.path);
7793
- if (input.cursor)
7794
- query3.set("cursor", String(input.cursor));
7795
- return ctx.fetch(`${drivePath(input.driveId)}/contents?${query3}`, { method: "GET" });
7796
- }
7899
+ execute: (ctx, input) => listDriveContents(ctx.fetch, input.driveId, {
7900
+ recursive: true,
7901
+ ...input.path ? { path: input.path } : {},
7902
+ ...input.cursor ? { cursor: input.cursor } : {}
7903
+ })
7797
7904
  })
7798
7905
  ];
7799
7906