@ornncompute/cli 1.0.137 → 1.0.139
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 +8 -3
- package/package.json +1 -1
- package/src/admin-enrollment.mjs +14 -161
- package/src/catalog-shell.mjs +2 -2
- package/src/external-bucket-commands.mjs +20 -6
- package/src/storage-commands.mjs +22 -30
- package/vendor/api-client/orchestrator.js +517 -548
- package/vendor/capabilities/cli.js +375 -401
|
@@ -7,43 +7,60 @@ function getHardwareCatalog(request, signal) {
|
|
|
7
7
|
});
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
-
// ../../packages/api-client/dist/orchestrator/
|
|
11
|
-
var
|
|
12
|
-
function
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
// ../../packages/api-client/dist/orchestrator/configurable-enrollment.js
|
|
11
|
+
var root = "/v1/orchestrator/enrollment/configurable";
|
|
12
|
+
function createEnrollmentRun(request, body2) {
|
|
13
|
+
return request(`${root}/runs`, { method: "POST", body: body2 });
|
|
14
|
+
}
|
|
15
|
+
function launchEnrollmentRun(request, id, body2) {
|
|
16
|
+
return request(`${root}/runs/${encodeURIComponent(id)}/launch`, {
|
|
17
|
+
method: "POST",
|
|
18
|
+
body: body2
|
|
17
19
|
});
|
|
18
20
|
}
|
|
19
21
|
|
|
20
|
-
// ../../packages/api-client/dist/orchestrator/
|
|
21
|
-
|
|
22
|
-
|
|
22
|
+
// ../../packages/api-client/dist/orchestrator/controllers.js
|
|
23
|
+
var controllersSocketPath = "/v1/orchestrator/controllers";
|
|
24
|
+
function controllerPath(id) {
|
|
25
|
+
return `${controllersSocketPath}/${encodeURIComponent(id)}`;
|
|
23
26
|
}
|
|
24
|
-
function
|
|
25
|
-
return request(
|
|
27
|
+
function createController(request, body2, options) {
|
|
28
|
+
return request(controllersSocketPath, {
|
|
29
|
+
...options,
|
|
30
|
+
method: "POST",
|
|
31
|
+
body: body2
|
|
32
|
+
});
|
|
26
33
|
}
|
|
27
|
-
function
|
|
28
|
-
return request(
|
|
29
|
-
|
|
34
|
+
function addControllerNode(request, id, nodeId3, options) {
|
|
35
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
|
|
36
|
+
...options,
|
|
37
|
+
method: "POST"
|
|
30
38
|
});
|
|
31
39
|
}
|
|
32
|
-
function
|
|
33
|
-
return request(
|
|
40
|
+
function removeControllerNode(request, id, nodeId3, options) {
|
|
41
|
+
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
|
|
42
|
+
...options,
|
|
43
|
+
method: "DELETE"
|
|
44
|
+
});
|
|
34
45
|
}
|
|
35
|
-
|
|
46
|
+
|
|
47
|
+
// ../../packages/api-client/dist/orchestrator/drive-files.js
|
|
48
|
+
function drivePath(id) {
|
|
49
|
+
return `/v1/orchestrator/drives/${encodeURIComponent(id)}`;
|
|
50
|
+
}
|
|
51
|
+
function listDriveContents(request, id, query3 = {}, signal) {
|
|
36
52
|
const params = new URLSearchParams();
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
53
|
+
for (const [key, value] of Object.entries(query3)) {
|
|
54
|
+
if (value !== void 0)
|
|
55
|
+
params.set(key, String(value));
|
|
56
|
+
}
|
|
57
|
+
return request(`${drivePath(id)}/contents${params.size ? `?${params}` : ""}`, {
|
|
58
|
+
method: "GET",
|
|
59
|
+
...signal ? { signal } : {}
|
|
41
60
|
});
|
|
42
61
|
}
|
|
43
|
-
function
|
|
44
|
-
return request(
|
|
45
|
-
method: "DELETE"
|
|
46
|
-
});
|
|
62
|
+
function clearDriveContents(request, id) {
|
|
63
|
+
return request(`${drivePath(id)}/contents`, { method: "DELETE" });
|
|
47
64
|
}
|
|
48
65
|
|
|
49
66
|
// ../../packages/api-client/dist/orchestrator/drives.js
|
|
@@ -94,82 +111,81 @@ function listStorageTargets(request, signal) {
|
|
|
94
111
|
});
|
|
95
112
|
}
|
|
96
113
|
|
|
97
|
-
// ../../packages/api-client/dist/orchestrator/
|
|
98
|
-
|
|
99
|
-
|
|
114
|
+
// ../../packages/api-client/dist/orchestrator/enrollment.js
|
|
115
|
+
var enrollmentTokensPath = "/v1/orchestrator/enrollment-tokens";
|
|
116
|
+
function listEnrollmentTokens(request, query3 = {}) {
|
|
117
|
+
return request(enrollmentTokensPath + (query3.id ? `?id=${encodeURIComponent(query3.id)}` : ""), {
|
|
118
|
+
method: "GET"
|
|
119
|
+
});
|
|
100
120
|
}
|
|
101
|
-
function
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
params.set(key, String(value));
|
|
106
|
-
}
|
|
107
|
-
return request(`${drivePath(id)}/contents${params.size ? `?${params}` : ""}`, {
|
|
108
|
-
method: "GET",
|
|
109
|
-
...signal ? { signal } : {}
|
|
121
|
+
function revokeEnrollmentToken(request, id, idempotencyKey) {
|
|
122
|
+
return request(`${enrollmentTokensPath}/${encodeURIComponent(id)}`, {
|
|
123
|
+
method: "DELETE",
|
|
124
|
+
...idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : {}
|
|
110
125
|
});
|
|
111
126
|
}
|
|
112
|
-
function
|
|
113
|
-
return request(
|
|
127
|
+
function getEnrollmentAdminSshKey(request, nodeId3) {
|
|
128
|
+
return request(`/v1/orchestrator/enrollment/admin-ssh-key?node_id=${encodeURIComponent(nodeId3)}`, { method: "GET" });
|
|
114
129
|
}
|
|
115
|
-
|
|
116
|
-
|
|
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}` : "";
|
|
130
|
+
function rotateEnrollmentAdminSshKey(request, nodeId3) {
|
|
131
|
+
return request(`/v1/orchestrator/enrollment/admin-ssh-key?node_id=${encodeURIComponent(nodeId3)}`, { method: "POST" });
|
|
124
132
|
}
|
|
125
|
-
|
|
126
|
-
|
|
133
|
+
|
|
134
|
+
// ../../packages/api-client/dist/orchestrator/locality.js
|
|
135
|
+
var localityGeolocatePath = "/v1/orchestrator/locality/geolocate";
|
|
136
|
+
function geolocate(request, query3, signal) {
|
|
137
|
+
const target = query3.ip !== void 0 ? `ip=${encodeURIComponent(query3.ip)}` : `address=${encodeURIComponent(query3.address)}`;
|
|
138
|
+
return request(`${localityGeolocatePath}?${target}`, {
|
|
127
139
|
method: "GET",
|
|
128
140
|
...signal ? { signal } : {}
|
|
129
141
|
});
|
|
130
142
|
}
|
|
131
|
-
|
|
132
|
-
|
|
143
|
+
|
|
144
|
+
// ../../packages/api-client/dist/orchestrator/networks.js
|
|
145
|
+
var networks = "/v1/orchestrator/networks";
|
|
146
|
+
function networkPath(id) {
|
|
147
|
+
return `${networks}/${encodeURIComponent(id)}`;
|
|
148
|
+
}
|
|
149
|
+
function listNetworks(request, signal) {
|
|
150
|
+
return request(networks, { method: "GET", ...signal ? { signal } : {} });
|
|
151
|
+
}
|
|
152
|
+
function getNetwork(request, id, query3 = {}, signal) {
|
|
153
|
+
const params = new URLSearchParams();
|
|
154
|
+
if (query3.overlay !== void 0)
|
|
155
|
+
params.set("overlay", String(query3.overlay));
|
|
156
|
+
return request(`${networkPath(id)}${params.size ? `?${params}` : ""}`, {
|
|
133
157
|
method: "GET",
|
|
134
158
|
...signal ? { signal } : {}
|
|
135
159
|
});
|
|
136
160
|
}
|
|
137
|
-
function
|
|
138
|
-
return
|
|
161
|
+
function createNetwork(request, body2, options = {}) {
|
|
162
|
+
return request(networks, { method: "POST", body: body2, ...options });
|
|
139
163
|
}
|
|
140
|
-
function
|
|
141
|
-
return request(
|
|
164
|
+
function updateNetwork(request, id, body2, options = {}) {
|
|
165
|
+
return request(networkPath(id), { method: "PATCH", body: body2, ...options });
|
|
166
|
+
}
|
|
167
|
+
function deleteNetwork(request, id, options = {}) {
|
|
168
|
+
return request(networkPath(id), { method: "DELETE", ...options });
|
|
169
|
+
}
|
|
170
|
+
function listNetworkPeerConfigs(request, networkId, signal) {
|
|
171
|
+
return request(`${networkPath(networkId)}/peers`, {
|
|
142
172
|
method: "GET",
|
|
143
173
|
...signal ? { signal } : {}
|
|
144
174
|
});
|
|
145
175
|
}
|
|
146
|
-
function
|
|
147
|
-
return request(`${
|
|
148
|
-
method: "POST",
|
|
149
|
-
body: body2,
|
|
150
|
-
...headers ? { headers } : {}
|
|
151
|
-
});
|
|
152
|
-
}
|
|
153
|
-
function assignNode(request, id, body2, headers) {
|
|
154
|
-
return request(`${nodeResourcePath(id)}/assign`, {
|
|
176
|
+
function createNetworkPeer(request, networkId, body2, options = {}) {
|
|
177
|
+
return request(`${networkPath(networkId)}/peers`, {
|
|
155
178
|
method: "POST",
|
|
156
179
|
body: body2,
|
|
157
|
-
...
|
|
180
|
+
...options
|
|
158
181
|
});
|
|
159
182
|
}
|
|
160
|
-
function
|
|
161
|
-
return request(`${
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
return request(`${nodeResourcePath(id)}/reboot`, {
|
|
165
|
-
method: "POST",
|
|
166
|
-
body: body2,
|
|
167
|
-
...headers ? { headers } : {}
|
|
183
|
+
function deleteNetworkPeer(request, networkId, peerId, options = {}) {
|
|
184
|
+
return request(`${networkPath(networkId)}/peers/${encodeURIComponent(peerId)}`, {
|
|
185
|
+
method: "DELETE",
|
|
186
|
+
...options
|
|
168
187
|
});
|
|
169
188
|
}
|
|
170
|
-
function pushNodeKeys(request, id, body2 = {}) {
|
|
171
|
-
return request(`${nodeResourcePath(id)}/push-keys`, { method: "POST", body: body2 });
|
|
172
|
-
}
|
|
173
189
|
|
|
174
190
|
// ../../packages/api-client/dist/orchestrator/node-access.js
|
|
175
191
|
function launchReservation(request, reservationId, body2) {
|
|
@@ -203,106 +219,91 @@ function updateNodeSanitize(request, nodeId3, jobId, body2) {
|
|
|
203
219
|
return request(sanitizePath(nodeId3, jobId), { method: "PATCH", body: body2 });
|
|
204
220
|
}
|
|
205
221
|
|
|
206
|
-
// ../../packages/api-client/dist/orchestrator/
|
|
207
|
-
|
|
208
|
-
function networkPath(id) {
|
|
209
|
-
return `${networks}/${encodeURIComponent(id)}`;
|
|
210
|
-
}
|
|
211
|
-
function listNetworks(request, signal) {
|
|
212
|
-
return request(networks, { method: "GET", ...signal ? { signal } : {} });
|
|
213
|
-
}
|
|
214
|
-
function getNetwork(request, id, query3 = {}, signal) {
|
|
222
|
+
// ../../packages/api-client/dist/orchestrator/nodes.js
|
|
223
|
+
function nodeQuery(query3) {
|
|
215
224
|
const params = new URLSearchParams();
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
225
|
+
for (const [key, value] of Object.entries(query3)) {
|
|
226
|
+
if (value !== void 0)
|
|
227
|
+
params.set(key, String(value));
|
|
228
|
+
}
|
|
229
|
+
return params.size ? `?${params}` : "";
|
|
230
|
+
}
|
|
231
|
+
function listNodes(request, query3 = {}, signal) {
|
|
232
|
+
return request(`/v1/orchestrator/nodes${nodeQuery(query3)}`, {
|
|
219
233
|
method: "GET",
|
|
220
234
|
...signal ? { signal } : {}
|
|
221
235
|
});
|
|
222
236
|
}
|
|
223
|
-
function
|
|
224
|
-
return request(
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
237
|
+
function listStaffNodes(request, query3 = {}, signal) {
|
|
238
|
+
return request(`/v1/staff/nodes${nodeQuery(query3)}`, {
|
|
239
|
+
method: "GET",
|
|
240
|
+
...signal ? { signal } : {}
|
|
241
|
+
});
|
|
228
242
|
}
|
|
229
|
-
function
|
|
230
|
-
return
|
|
243
|
+
function nodeResourcePath(id) {
|
|
244
|
+
return `/v1/orchestrator/nodes/${encodeURIComponent(id)}`;
|
|
231
245
|
}
|
|
232
|
-
function
|
|
233
|
-
return request(
|
|
246
|
+
function getNode(request, id, signal) {
|
|
247
|
+
return request(nodeResourcePath(id), {
|
|
234
248
|
method: "GET",
|
|
235
249
|
...signal ? { signal } : {}
|
|
236
250
|
});
|
|
237
251
|
}
|
|
238
|
-
function
|
|
239
|
-
return request(`${
|
|
252
|
+
function terminateNode(request, id, body2, headers) {
|
|
253
|
+
return request(`${nodeResourcePath(id)}/terminate`, {
|
|
240
254
|
method: "POST",
|
|
241
255
|
body: body2,
|
|
242
|
-
...
|
|
256
|
+
...headers ? { headers } : {}
|
|
243
257
|
});
|
|
244
258
|
}
|
|
245
|
-
function
|
|
246
|
-
return request(`${
|
|
247
|
-
method: "
|
|
248
|
-
|
|
259
|
+
function assignNode(request, id, body2, headers) {
|
|
260
|
+
return request(`${nodeResourcePath(id)}/assign`, {
|
|
261
|
+
method: "POST",
|
|
262
|
+
body: body2,
|
|
263
|
+
...headers ? { headers } : {}
|
|
249
264
|
});
|
|
250
265
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
var controllersSocketPath = "/v1/orchestrator/controllers";
|
|
254
|
-
function controllerPath(id) {
|
|
255
|
-
return `${controllersSocketPath}/${encodeURIComponent(id)}`;
|
|
266
|
+
function issueNodeSshCertificate(request, id, body2) {
|
|
267
|
+
return request(`${nodeResourcePath(id)}/ssh-certificates`, { method: "POST", body: body2 });
|
|
256
268
|
}
|
|
257
|
-
function
|
|
258
|
-
return request(
|
|
259
|
-
...options,
|
|
269
|
+
function rebootNode(request, id, body2, headers) {
|
|
270
|
+
return request(`${nodeResourcePath(id)}/reboot`, {
|
|
260
271
|
method: "POST",
|
|
261
|
-
body: body2
|
|
262
|
-
|
|
263
|
-
}
|
|
264
|
-
function addControllerNode(request, id, nodeId3, options) {
|
|
265
|
-
return request(`${controllerPath(id)}/nodes/${encodeURIComponent(nodeId3)}`, {
|
|
266
|
-
...options,
|
|
267
|
-
method: "POST"
|
|
272
|
+
body: body2,
|
|
273
|
+
...headers ? { headers } : {}
|
|
268
274
|
});
|
|
269
275
|
}
|
|
270
|
-
function
|
|
271
|
-
return request(`${
|
|
272
|
-
...options,
|
|
273
|
-
method: "DELETE"
|
|
274
|
-
});
|
|
276
|
+
function pushNodeKeys(request, id, body2 = {}) {
|
|
277
|
+
return request(`${nodeResourcePath(id)}/push-keys`, { method: "POST", body: body2 });
|
|
275
278
|
}
|
|
276
279
|
|
|
277
|
-
// ../../packages/api-client/dist/orchestrator/
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return request(enrollmentTokensPath + (query3.id ? `?id=${encodeURIComponent(query3.id)}` : ""), {
|
|
281
|
-
method: "GET"
|
|
282
|
-
});
|
|
280
|
+
// ../../packages/api-client/dist/orchestrator/registry.js
|
|
281
|
+
function getContainerRegistry(request) {
|
|
282
|
+
return request("/v1/orchestrator/registry", { method: "GET" });
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return request(
|
|
284
|
+
function listRegistryRepositories(request) {
|
|
285
|
+
return request("/v1/orchestrator/registry/repositories", { method: "GET" });
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
return request(
|
|
289
|
-
method: "
|
|
290
|
-
...idempotencyKey ? { headers: { "Idempotency-Key": idempotencyKey } } : {}
|
|
287
|
+
function listRegistryTags(request, repository) {
|
|
288
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository })}`, {
|
|
289
|
+
method: "GET"
|
|
291
290
|
});
|
|
292
291
|
}
|
|
293
|
-
function
|
|
294
|
-
return request(
|
|
295
|
-
}
|
|
296
|
-
function rotateEnrollmentAdminSshKey(request, nodeId3) {
|
|
297
|
-
return request(`/v1/orchestrator/enrollment/admin-ssh-key?node_id=${encodeURIComponent(nodeId3)}`, { method: "POST" });
|
|
292
|
+
function getRegistryUsage(request) {
|
|
293
|
+
return request("/v1/orchestrator/registry/usage", { method: "GET" });
|
|
298
294
|
}
|
|
299
|
-
function
|
|
295
|
+
function listRegistryCaches(request, query3 = {}) {
|
|
300
296
|
const params = new URLSearchParams();
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
297
|
+
if (query3.controller_id !== void 0)
|
|
298
|
+
params.set("controller_id", query3.controller_id);
|
|
299
|
+
return request(`/v1/orchestrator/registry/caches${params.size ? `?${params}` : ""}`, {
|
|
300
|
+
method: "GET"
|
|
301
|
+
});
|
|
302
|
+
}
|
|
303
|
+
function deleteRegistryTag(request, repository, tag) {
|
|
304
|
+
return request(`/v1/orchestrator/registry/tags?${new URLSearchParams({ repository, tag })}`, {
|
|
305
|
+
method: "DELETE"
|
|
306
|
+
});
|
|
306
307
|
}
|
|
307
308
|
|
|
308
309
|
// ../../packages/api-client/dist/orchestrator/remote.js
|
|
@@ -332,8 +333,8 @@ function defineCapability(spec) {
|
|
|
332
333
|
...rest,
|
|
333
334
|
...cli !== false && cli !== void 0 ? {
|
|
334
335
|
cli: {
|
|
335
|
-
|
|
336
|
-
|
|
336
|
+
...cli,
|
|
337
|
+
command: cli.command ?? names.cli
|
|
337
338
|
}
|
|
338
339
|
} : {},
|
|
339
340
|
...mcp === false ? {} : { mcp: { name: mcp?.name ?? names.mcp } },
|
|
@@ -1138,43 +1139,17 @@ var observabilityCapabilities = [
|
|
|
1138
1139
|
|
|
1139
1140
|
// ../../packages/capabilities/dist/capabilities/tokens.js
|
|
1140
1141
|
import { z as z4 } from "zod";
|
|
1141
|
-
var
|
|
1142
|
+
var emptyInput = z4.object({});
|
|
1142
1143
|
var tokenCreateInput = z4.object({
|
|
1143
|
-
organization_id: z4.string().
|
|
1144
|
-
|
|
1145
|
-
expires_in_seconds: z4.number().int().
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
host: optionalText,
|
|
1150
|
-
hosts: z4.array(z4.string()).nullish(),
|
|
1151
|
-
username: optionalText,
|
|
1144
|
+
organization_id: z4.string().uuid(),
|
|
1145
|
+
profile_id: z4.string().uuid().optional(),
|
|
1146
|
+
expires_in_seconds: z4.number().int().min(300).max(86400).nullish(),
|
|
1147
|
+
host: z4.string().min(1).nullish(),
|
|
1148
|
+
hosts: z4.array(z4.string().min(1)).max(64).nullish(),
|
|
1149
|
+
username: z4.string().min(1).nullish(),
|
|
1152
1150
|
port: z4.number().int().min(1).max(65535).nullish(),
|
|
1153
|
-
private_key:
|
|
1154
|
-
yes: z4.boolean().optional()
|
|
1151
|
+
private_key: z4.string().min(1).nullish()
|
|
1155
1152
|
});
|
|
1156
|
-
var emptyInput = z4.object({});
|
|
1157
|
-
function buildEnrollmentInstallCommand(options) {
|
|
1158
|
-
const base3 = (options.base ?? "https://api.ornn.com/v1/orchestrator").replace(/\/+$/, "");
|
|
1159
|
-
const path = enrollmentInstallPath({
|
|
1160
|
-
token: options.token,
|
|
1161
|
-
facility_id: options.facilityId,
|
|
1162
|
-
filter: options.filter,
|
|
1163
|
-
ip: options.ip,
|
|
1164
|
-
restore_node_id: options.restoreNodeId,
|
|
1165
|
-
force: options.force
|
|
1166
|
-
});
|
|
1167
|
-
const href = `${base3}${path.replace(/^\/v1\/orchestrator/, "")}`;
|
|
1168
|
-
return `set -o pipefail; curl -fsSL '${href.replace(/'/g, "'\\''")}' | sudo bash`;
|
|
1169
|
-
}
|
|
1170
|
-
function tokenString(row, keys) {
|
|
1171
|
-
for (const key of keys) {
|
|
1172
|
-
const value = row[key];
|
|
1173
|
-
if (typeof value === "string" && value.trim())
|
|
1174
|
-
return value.trim();
|
|
1175
|
-
}
|
|
1176
|
-
return void 0;
|
|
1177
|
-
}
|
|
1178
1153
|
var tokensListCapability = defineCapability({
|
|
1179
1154
|
id: "tokens.list",
|
|
1180
1155
|
domain: "fleet",
|
|
@@ -1189,34 +1164,25 @@ var tokensCreateCapability = defineCapability({
|
|
|
1189
1164
|
id: "tokens.create",
|
|
1190
1165
|
domain: "fleet",
|
|
1191
1166
|
roles: ["admin"],
|
|
1192
|
-
description: "
|
|
1167
|
+
description: "Create a configurable enrollment command. With SSH hosts and a private key, create and launch a configurable run. The command carries its credential; never construct an installer command yourself.",
|
|
1193
1168
|
mutation: "preview-confirm",
|
|
1194
1169
|
slack: {
|
|
1195
1170
|
parameters: {
|
|
1196
1171
|
type: "object",
|
|
1197
1172
|
properties: {
|
|
1198
|
-
organization_id: {
|
|
1199
|
-
|
|
1200
|
-
description: "Supplier organization UUID from supplier.list."
|
|
1201
|
-
},
|
|
1202
|
-
facility_id: { type: "string", description: "Optional facility UUID." },
|
|
1203
|
-
expires_in_seconds: { type: "integer", description: "Token TTL in seconds." },
|
|
1204
|
-
filter: {
|
|
1173
|
+
organization_id: { type: "string", description: "Supplier organization UUID." },
|
|
1174
|
+
profile_id: {
|
|
1205
1175
|
type: "string",
|
|
1206
|
-
description: "Optional
|
|
1176
|
+
description: "Optional saved enrollment profile; omission uses standard configurable settings."
|
|
1207
1177
|
},
|
|
1208
|
-
|
|
1209
|
-
host: { type: "string", description: "SSH host
|
|
1210
|
-
hosts: {
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
description: "Optional extra SSH hosts to enroll with the same key."
|
|
1214
|
-
},
|
|
1215
|
-
username: { type: "string", description: "SSH user. Default admin." },
|
|
1216
|
-
port: { type: "integer", description: "SSH port. Default 22." },
|
|
1178
|
+
expires_in_seconds: { type: "integer", description: "Command lifetime in seconds." },
|
|
1179
|
+
host: { type: "string", description: "SSH host to enroll." },
|
|
1180
|
+
hosts: { type: "array", items: { type: "string" }, description: "SSH hosts to enroll." },
|
|
1181
|
+
username: { type: "string", description: "SSH login; default admin." },
|
|
1182
|
+
port: { type: "integer", description: "SSH port; default 22." },
|
|
1217
1183
|
private_key: {
|
|
1218
1184
|
type: "string",
|
|
1219
|
-
description: "
|
|
1185
|
+
description: "SSH private key, required when hosts are supplied."
|
|
1220
1186
|
}
|
|
1221
1187
|
},
|
|
1222
1188
|
required: ["organization_id"]
|
|
@@ -1225,59 +1191,29 @@ var tokensCreateCapability = defineCapability({
|
|
|
1225
1191
|
input: tokenCreateInput,
|
|
1226
1192
|
execute: async (ctx, input) => {
|
|
1227
1193
|
const parsed = tokenCreateInput.parse(input);
|
|
1228
|
-
const
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
...(parsed.hosts ?? []).map((host) => host.trim()).filter(Boolean)
|
|
1232
|
-
];
|
|
1233
|
-
const privateKey = parsed.private_key?.trim() || "";
|
|
1234
|
-
const payload = {
|
|
1235
|
-
organization_id: organizationId,
|
|
1236
|
-
facility_id: parsed.facility_id,
|
|
1237
|
-
expires_in_seconds: parsed.expires_in_seconds,
|
|
1238
|
-
filter: parsed.filter,
|
|
1239
|
-
ip: parsed.ip,
|
|
1240
|
-
hosts,
|
|
1241
|
-
username: parsed.username?.trim() || "admin",
|
|
1242
|
-
port: parsed.port ?? 22,
|
|
1243
|
-
remote: hosts.length > 0 && privateKey.length > 0
|
|
1244
|
-
};
|
|
1245
|
-
if (!ctx.confirmed) {
|
|
1246
|
-
return preview("tokens.create", { ...payload, private_key: privateKey ? "[redacted]" : "" });
|
|
1247
|
-
}
|
|
1248
|
-
const minted = await createEnrollmentToken(ctx.fetch, {
|
|
1249
|
-
organization_id: organizationId,
|
|
1250
|
-
...payload.facility_id ? { facility_id: payload.facility_id } : {},
|
|
1251
|
-
...payload.expires_in_seconds ? { expires_in_seconds: payload.expires_in_seconds } : {}
|
|
1252
|
-
});
|
|
1253
|
-
const token = tokenString(minted, ["token", "plaintext"]) ?? "";
|
|
1254
|
-
const installCommand = token ? buildEnrollmentInstallCommand({
|
|
1255
|
-
token,
|
|
1256
|
-
base: parsed.installer_base ?? void 0,
|
|
1257
|
-
ip: parsed.ip ?? void 0,
|
|
1258
|
-
filter: parsed.filter ?? void 0,
|
|
1259
|
-
force: payload.remote
|
|
1260
|
-
}) : null;
|
|
1261
|
-
if (!payload.remote || !installCommand) {
|
|
1262
|
-
return { ...minted, install_command: installCommand };
|
|
1194
|
+
const hosts = [...parsed.host ? [parsed.host] : [], ...parsed.hosts ?? []];
|
|
1195
|
+
if (hosts.length > 64 || hosts.length > 0 && !parsed.private_key) {
|
|
1196
|
+
throw new Error("Provide at most 64 SSH hosts and a private key, or omit hosts to create a manual command.");
|
|
1263
1197
|
}
|
|
1264
|
-
const
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
}));
|
|
1274
|
-
}
|
|
1275
|
-
return {
|
|
1276
|
-
id: minted.id,
|
|
1277
|
-
organization_id: minted.organization_id ?? organizationId,
|
|
1278
|
-
expires_at: minted.expires_at,
|
|
1279
|
-
hosts: results
|
|
1198
|
+
const body2 = {
|
|
1199
|
+
organization_id: parsed.organization_id,
|
|
1200
|
+
label: "Host enrollment",
|
|
1201
|
+
...parsed.profile_id ? { profile_id: parsed.profile_id } : {},
|
|
1202
|
+
...parsed.expires_in_seconds ? { expires_in_seconds: parsed.expires_in_seconds } : {},
|
|
1203
|
+
...hosts.length ? {
|
|
1204
|
+
hosts: hosts.map((address) => ({ address, port: parsed.port ?? 22 })),
|
|
1205
|
+
discover_access: true
|
|
1206
|
+
} : { discover_host: true }
|
|
1280
1207
|
};
|
|
1208
|
+
if (!ctx.confirmed)
|
|
1209
|
+
return preview("tokens.create", body2);
|
|
1210
|
+
const run = await createEnrollmentRun(ctx.fetch, body2);
|
|
1211
|
+
if (hosts.length)
|
|
1212
|
+
await launchEnrollmentRun(ctx.fetch, run.id, {
|
|
1213
|
+
username: parsed.username ?? "admin",
|
|
1214
|
+
private_key: parsed.private_key
|
|
1215
|
+
});
|
|
1216
|
+
return run;
|
|
1281
1217
|
}
|
|
1282
1218
|
});
|
|
1283
1219
|
var tokenCapabilities = [tokensListCapability, tokensCreateCapability];
|
|
@@ -1553,7 +1489,8 @@ function quoteBid(request, bid) {
|
|
|
1553
1489
|
orderType: bid.orderType,
|
|
1554
1490
|
pricePerGpuHourMicroUsd: bid.pricePerGpuHourMicroUsd === void 0 ? null : String(bid.pricePerGpuHourMicroUsd),
|
|
1555
1491
|
nodeSelections: bid.nodeSelections ? JSON.stringify(bid.nodeSelections) : null,
|
|
1556
|
-
...scope(bid)
|
|
1492
|
+
...scope(bid),
|
|
1493
|
+
organizationId: bid.organizationId
|
|
1557
1494
|
})}`, { method: "GET" });
|
|
1558
1495
|
}
|
|
1559
1496
|
function placeBid(request, bid, idempotencyKey) {
|
|
@@ -2737,7 +2674,7 @@ var adminEnrollmentTokensListCapability2 = {
|
|
|
2737
2674
|
};
|
|
2738
2675
|
}
|
|
2739
2676
|
};
|
|
2740
|
-
var adminEnrollmentTokenCreateCapability = withVnextBinding(tokensCreateCapability, adminHelp3(["admin", "enrollment-tokens", "create"], "Create
|
|
2677
|
+
var adminEnrollmentTokenCreateCapability = withVnextBinding(tokensCreateCapability, adminHelp3(["admin", "enrollment-tokens", "create"], "Create an expiring configurable enrollment command through an explicit secret export.", "ornn admin enrollment-tokens create --supplier UUID --expires-in SECONDS (--print | --output PATH) [--overwrite]", "Unsupported: token creation requires an eligible human terminal.", ["canonical supplier organization UUID"], "Review the supplier, expiry, and secret destination before creating the command."));
|
|
2741
2678
|
var tokenRevokeInput = z12.object({
|
|
2742
2679
|
tokenId: z12.string().min(1),
|
|
2743
2680
|
token_id: UUID.optional(),
|
|
@@ -2831,29 +2768,13 @@ var nodeEnrollInput = z12.object({
|
|
|
2831
2768
|
host: nonEmpty,
|
|
2832
2769
|
organization_id: UUID,
|
|
2833
2770
|
facility_id: UUID,
|
|
2834
|
-
filter: z12.string().optional(),
|
|
2835
2771
|
identity_file: nonEmpty,
|
|
2836
2772
|
private_key: z12.string().min(1).optional(),
|
|
2837
2773
|
username: nonEmpty.default("root"),
|
|
2838
2774
|
port: z12.number().int().min(1).max(65535).default(22),
|
|
2839
2775
|
expires_in_seconds: tokenTtl,
|
|
2840
|
-
|
|
2841
|
-
replace_existing_management: z12.literal(true),
|
|
2842
|
-
verbose: z12.boolean().default(false)
|
|
2776
|
+
replace_existing_management: z12.literal(true)
|
|
2843
2777
|
});
|
|
2844
|
-
function safeRemoteResult(value) {
|
|
2845
|
-
if (!value || typeof value !== "object")
|
|
2846
|
-
return {};
|
|
2847
|
-
const row = value;
|
|
2848
|
-
const safe = {};
|
|
2849
|
-
for (const key of ["id", "status", "state", "exit_code", "started_at", "completed_at"]) {
|
|
2850
|
-
const field = row[key];
|
|
2851
|
-
if (typeof field === "string" || typeof field === "number" || typeof field === "boolean") {
|
|
2852
|
-
safe[key] = field;
|
|
2853
|
-
}
|
|
2854
|
-
}
|
|
2855
|
-
return safe;
|
|
2856
|
-
}
|
|
2857
2778
|
var adminNodeEnrollCapability = defineCapability({
|
|
2858
2779
|
id: "nodes.enroll",
|
|
2859
2780
|
domain: "fleet",
|
|
@@ -2862,7 +2783,7 @@ var adminNodeEnrollCapability = defineCapability({
|
|
|
2862
2783
|
mutation: "preview-confirm",
|
|
2863
2784
|
cli: {
|
|
2864
2785
|
command: ["admin", "nodes", "enroll"],
|
|
2865
|
-
vnext: adminHelp3(["admin", "nodes", "enroll"], "Install Ornn management on one explicitly assigned node.", "ornn admin nodes enroll <node-id> --host HOST --supplier UUID --facility UUID
|
|
2786
|
+
vnext: adminHelp3(["admin", "nodes", "enroll"], "Install Ornn management on one explicitly assigned node.", "ornn admin nodes enroll <node-id> --host HOST --supplier UUID --facility UUID --identity-file PATH --token-ttl SECONDS --replace-existing-management []", "Unsupported: remote enrollment requires an eligible human terminal.", ["canonical node UUID", "canonical supplier organization UUID", "canonical facility UUID"], "Review node identity, SSH target, assignment, and replacement of existing management.")
|
|
2866
2787
|
},
|
|
2867
2788
|
mcp: false,
|
|
2868
2789
|
slack: false,
|
|
@@ -2875,7 +2796,6 @@ var adminNodeEnrollCapability = defineCapability({
|
|
|
2875
2796
|
host: parsed.host,
|
|
2876
2797
|
organization_id: parsed.organization_id,
|
|
2877
2798
|
facility_id: parsed.facility_id,
|
|
2878
|
-
filter: parsed.filter,
|
|
2879
2799
|
expires_in_seconds: parsed.expires_in_seconds,
|
|
2880
2800
|
replace_existing_management: true
|
|
2881
2801
|
};
|
|
@@ -2883,43 +2803,22 @@ var adminNodeEnrollCapability = defineCapability({
|
|
|
2883
2803
|
if (!parsed.private_key) {
|
|
2884
2804
|
throw codedError("identity_file_unreadable", "The SSH identity file could not be read.");
|
|
2885
2805
|
}
|
|
2886
|
-
const
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
});
|
|
2890
|
-
const token = typeof minted.token === "string" ? minted.token : typeof minted.plaintext === "string" ? minted.plaintext : "";
|
|
2891
|
-
if (!token) {
|
|
2892
|
-
throw codedError("token_material_unavailable", "The enrollment token was created without usable token material.");
|
|
2806
|
+
const node = await getNode(ctx.fetch, parsed.node_id);
|
|
2807
|
+
if (node.organization_id !== parsed.organization_id || node.facility_id !== parsed.facility_id) {
|
|
2808
|
+
throw codedError("node_assignment_changed", "The existing node supplier or facility does not match the requested assignment.");
|
|
2893
2809
|
}
|
|
2894
|
-
const
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
force: true
|
|
2810
|
+
const run = await createEnrollmentRun(ctx.fetch, {
|
|
2811
|
+
organization_id: parsed.organization_id,
|
|
2812
|
+
label: "Recover node agent",
|
|
2813
|
+
restore_node_id: parsed.node_id,
|
|
2814
|
+
expires_in_seconds: parsed.expires_in_seconds,
|
|
2815
|
+
hosts: [{ address: parsed.host, port: parsed.port }]
|
|
2901
2816
|
});
|
|
2902
|
-
|
|
2903
|
-
host: parsed.host,
|
|
2817
|
+
await launchEnrollmentRun(ctx.fetch, run.id, {
|
|
2904
2818
|
username: parsed.username,
|
|
2905
|
-
|
|
2906
|
-
private_key: parsed.private_key,
|
|
2907
|
-
command,
|
|
2908
|
-
timeout_seconds: 600
|
|
2819
|
+
private_key: parsed.private_key
|
|
2909
2820
|
});
|
|
2910
|
-
return
|
|
2911
|
-
node_id: parsed.node_id,
|
|
2912
|
-
host: parsed.host,
|
|
2913
|
-
organization_id: parsed.organization_id,
|
|
2914
|
-
facility_id: parsed.facility_id,
|
|
2915
|
-
filter: parsed.filter,
|
|
2916
|
-
management: "replaced",
|
|
2917
|
-
token_metadata: {
|
|
2918
|
-
id: typeof minted.id === "string" ? minted.id : null,
|
|
2919
|
-
expires_at: typeof minted.expires_at === "string" ? minted.expires_at : null
|
|
2920
|
-
},
|
|
2921
|
-
remote: safeRemoteResult(remote)
|
|
2922
|
-
};
|
|
2821
|
+
return run;
|
|
2923
2822
|
}
|
|
2924
2823
|
});
|
|
2925
2824
|
var nodeKeyInput = z12.object({ node_id: UUID });
|
|
@@ -2949,7 +2848,7 @@ var adminNodeRotateKeyCapability = defineCapability({
|
|
|
2949
2848
|
mutation: "preview-confirm",
|
|
2950
2849
|
cli: {
|
|
2951
2850
|
command: ["admin", "nodes", "rotate-key"],
|
|
2952
|
-
vnext: adminHelp3(["admin", "nodes", "rotate-key"], "Rotate one node admin key and export the replacement deliberately.", "ornn admin nodes rotate-key <node-id> (--print | --output PATH) [--overwrite]
|
|
2851
|
+
vnext: adminHelp3(["admin", "nodes", "rotate-key"], "Rotate one node admin key and export the replacement deliberately.", "ornn admin nodes rotate-key <node-id> (--print | --output PATH) [--overwrite]", "Unsupported: key rotation requires an eligible human terminal.", ["canonical node UUID"], "Review the node and loss of access through the previous private key.")
|
|
2953
2852
|
},
|
|
2954
2853
|
mcp: false,
|
|
2955
2854
|
slack: false,
|
|
@@ -3218,19 +3117,19 @@ var adminNodeSanitizeCapabilities = [
|
|
|
3218
3117
|
// ../../packages/capabilities/dist/capabilities/admin-nodes-lifecycle.js
|
|
3219
3118
|
import { z as z15 } from "zod";
|
|
3220
3119
|
var nodeReference = z15.string().trim().min(1);
|
|
3221
|
-
var
|
|
3120
|
+
var optionalText = z15.string().trim().min(1).optional();
|
|
3222
3121
|
var commonInput = {
|
|
3223
3122
|
node_ref: nodeReference,
|
|
3224
|
-
node_id:
|
|
3225
|
-
idempotency_key:
|
|
3226
|
-
reason:
|
|
3123
|
+
node_id: optionalText,
|
|
3124
|
+
idempotency_key: optionalText,
|
|
3125
|
+
reason: optionalText,
|
|
3227
3126
|
yes: z15.boolean().optional(),
|
|
3228
3127
|
wait: z15.boolean().optional(),
|
|
3229
3128
|
timeout_seconds: z15.number().positive().optional()
|
|
3230
3129
|
};
|
|
3231
3130
|
var rebootInput = z15.object({
|
|
3232
3131
|
...commonInput,
|
|
3233
|
-
machine_id:
|
|
3132
|
+
machine_id: optionalText
|
|
3234
3133
|
});
|
|
3235
3134
|
var hardResetInput = rebootInput.extend({
|
|
3236
3135
|
erase_local_data: z15.literal(true)
|
|
@@ -4831,30 +4730,119 @@ function externalBucketCapability({ acceptedReferences = [], automation, command
|
|
|
4831
4730
|
});
|
|
4832
4731
|
}
|
|
4833
4732
|
var gcsImportGuidance = "GCS requires bucket-level read access for your organization's Ornn transfer account. Connecting prints the account and the two gcloud grants (roles/storage.objectViewer and roles/storage.legacyBucketReader). After granting, deploy the volume from the Ornn console; CLI 1.x import still requires verification, which GCS does not support. Steps: https://docs.ornn.com/cli#gcs-imports-and-storage-transfer-service";
|
|
4834
|
-
|
|
4835
|
-
|
|
4836
|
-
|
|
4733
|
+
function isExternalBucket(drive) {
|
|
4734
|
+
const source = drive.source;
|
|
4735
|
+
if (!source || source.managed === true || source.provider === "ornn_object")
|
|
4736
|
+
return false;
|
|
4737
|
+
return ["external_gcs", "s3", "r2", "cloudflare_r2"].includes(source.provider ?? "") || Boolean(source.bucket);
|
|
4738
|
+
}
|
|
4739
|
+
var bucketInput = z21.object({ driveId: z21.string() });
|
|
4740
|
+
var bucketListCapability = defineCapability({
|
|
4741
|
+
id: "storage.external-buckets.list",
|
|
4742
|
+
domain: "storage",
|
|
4743
|
+
roles: ["user"],
|
|
4744
|
+
description: "List a page of connected external buckets. Pass next_cursor as cursor to continue.",
|
|
4745
|
+
mutation: "read",
|
|
4746
|
+
input: z21.object({
|
|
4747
|
+
limit: z21.number().int().min(1).max(100).optional(),
|
|
4748
|
+
cursor: z21.string().optional()
|
|
4749
|
+
}),
|
|
4750
|
+
mcp: { name: "storage_buckets_list" },
|
|
4751
|
+
slack: false,
|
|
4752
|
+
execute: async (context, input) => {
|
|
4753
|
+
const page = await listDrives(context.fetch, {
|
|
4754
|
+
limit: input.limit ?? 25,
|
|
4755
|
+
scope: "external",
|
|
4756
|
+
...input.cursor ? { cursor: input.cursor } : {}
|
|
4757
|
+
});
|
|
4758
|
+
return { ...page, drives: page.drives.filter(isExternalBucket) };
|
|
4759
|
+
},
|
|
4760
|
+
cli: {
|
|
4837
4761
|
command: ["external-buckets", "list"],
|
|
4838
|
-
description: "List connected GCS, S3, and R2 buckets in one bounded page.",
|
|
4839
|
-
mutation: "read",
|
|
4840
4762
|
input: pageInput2,
|
|
4841
|
-
|
|
4842
|
-
|
|
4843
|
-
|
|
4844
|
-
|
|
4845
|
-
|
|
4846
|
-
|
|
4847
|
-
|
|
4763
|
+
execute: (context, input) => externalBucketExecutor(context)("storage.external-buckets.list", input),
|
|
4764
|
+
vnext: {
|
|
4765
|
+
arguments: "semantic",
|
|
4766
|
+
audience: "customer",
|
|
4767
|
+
category: "resource",
|
|
4768
|
+
outcome: "List external bucket connections without exposing stored credentials.",
|
|
4769
|
+
human: "ornn external-buckets list [--limit <1-100>] [--cursor <cursor>]",
|
|
4770
|
+
automation: "ornn external-buckets list --limit 50 --format json",
|
|
4771
|
+
acceptedReferences: [],
|
|
4772
|
+
related: ["external-buckets show", "external-buckets connect"],
|
|
4773
|
+
resumableStates: []
|
|
4774
|
+
}
|
|
4775
|
+
}
|
|
4776
|
+
});
|
|
4777
|
+
var bucketShowCapability = defineCapability({
|
|
4778
|
+
id: "storage.external-buckets.show",
|
|
4779
|
+
domain: "storage",
|
|
4780
|
+
roles: ["user"],
|
|
4781
|
+
description: "Show a single connected external bucket by drive id.",
|
|
4782
|
+
mutation: "read",
|
|
4783
|
+
input: bucketInput,
|
|
4784
|
+
mcp: { name: "storage_buckets_show" },
|
|
4785
|
+
slack: false,
|
|
4786
|
+
execute: async (context, input) => {
|
|
4787
|
+
const bucket = await getDrive(context.fetch, input.driveId);
|
|
4788
|
+
if (!isExternalBucket(bucket))
|
|
4789
|
+
throw new Error(`Storage bucket not found: ${input.driveId}`);
|
|
4790
|
+
return bucket;
|
|
4791
|
+
},
|
|
4792
|
+
cli: {
|
|
4848
4793
|
command: ["external-buckets", "show"],
|
|
4849
|
-
description: "Inspect one connected external bucket by canonical ID or exact unique name.",
|
|
4850
|
-
mutation: "read",
|
|
4851
4794
|
input: showInput,
|
|
4852
|
-
|
|
4853
|
-
|
|
4854
|
-
|
|
4855
|
-
|
|
4856
|
-
|
|
4857
|
-
|
|
4795
|
+
execute: (context, input) => externalBucketExecutor(context)("storage.external-buckets.show", input),
|
|
4796
|
+
vnext: {
|
|
4797
|
+
arguments: "semantic",
|
|
4798
|
+
audience: "customer",
|
|
4799
|
+
category: "resource",
|
|
4800
|
+
outcome: "Inspect one credential-safe external bucket connection.",
|
|
4801
|
+
human: "ornn external-buckets show <external-bucket>",
|
|
4802
|
+
automation: "ornn external-buckets show <external-bucket-id> --format json",
|
|
4803
|
+
acceptedReferences: ["canonical external bucket ID", "exact unique external bucket name"],
|
|
4804
|
+
related: ["external-buckets verify", "external-buckets import"],
|
|
4805
|
+
resumableStates: []
|
|
4806
|
+
}
|
|
4807
|
+
}
|
|
4808
|
+
});
|
|
4809
|
+
var bucketDisconnectCapability = defineCapability({
|
|
4810
|
+
id: "storage.external-buckets.disconnect",
|
|
4811
|
+
domain: "storage",
|
|
4812
|
+
roles: ["user"],
|
|
4813
|
+
description: "Disconnect a connected external bucket (deletes the backing drive record).",
|
|
4814
|
+
mutation: "preview-confirm",
|
|
4815
|
+
input: bucketInput,
|
|
4816
|
+
mcp: { name: "storage_buckets_disconnect" },
|
|
4817
|
+
slack: false,
|
|
4818
|
+
execute: async (context, input) => {
|
|
4819
|
+
if (!context.confirmed)
|
|
4820
|
+
return preview("storage.external-buckets.disconnect", input);
|
|
4821
|
+
await bucketShowCapability.execute(context, input);
|
|
4822
|
+
await deleteDrive(context.fetch, input.driveId);
|
|
4823
|
+
return { disconnected: true, drive_id: input.driveId };
|
|
4824
|
+
},
|
|
4825
|
+
cli: {
|
|
4826
|
+
command: ["external-buckets", "disconnect"],
|
|
4827
|
+
input: disconnectInput,
|
|
4828
|
+
execute: (context, input) => externalBucketExecutor(context)("storage.external-buckets.disconnect", input),
|
|
4829
|
+
vnext: {
|
|
4830
|
+
arguments: "semantic",
|
|
4831
|
+
audience: "customer",
|
|
4832
|
+
category: "resource",
|
|
4833
|
+
outcome: "Remove one external source connection without writing to its source bucket.",
|
|
4834
|
+
human: "ornn external-buckets disconnect <external-bucket>",
|
|
4835
|
+
automation: "ornn external-buckets disconnect <external-bucket-id> --idempotency-key <key> --format json",
|
|
4836
|
+
acceptedReferences: ["canonical external bucket ID", "exact unique external bucket name"],
|
|
4837
|
+
review: "Disconnecting reduces access to the source and is blocked while mounts remain.",
|
|
4838
|
+
related: ["storage detach", "external-buckets show"],
|
|
4839
|
+
resumableStates: []
|
|
4840
|
+
}
|
|
4841
|
+
}
|
|
4842
|
+
});
|
|
4843
|
+
var externalBucketCapabilities = [
|
|
4844
|
+
bucketListCapability,
|
|
4845
|
+
bucketShowCapability,
|
|
4858
4846
|
externalBucketCapability({
|
|
4859
4847
|
id: "storage.external-buckets.connect",
|
|
4860
4848
|
command: ["external-buckets", "connect"],
|
|
@@ -4907,19 +4895,7 @@ var externalBucketCapabilities = [
|
|
|
4907
4895
|
resumableStates: ["pending", "working", "partial", "failed", "interrupted"],
|
|
4908
4896
|
related: ["external-buckets show", "storage status", "volumes files list"]
|
|
4909
4897
|
}),
|
|
4910
|
-
|
|
4911
|
-
id: "storage.external-buckets.disconnect",
|
|
4912
|
-
command: ["external-buckets", "disconnect"],
|
|
4913
|
-
description: "Disconnect an external bucket record after its working volume is detached.",
|
|
4914
|
-
mutation: "preview-confirm",
|
|
4915
|
-
input: disconnectInput,
|
|
4916
|
-
outcome: "Remove one external source connection without writing to its source bucket.",
|
|
4917
|
-
human: "ornn external-buckets disconnect <external-bucket>",
|
|
4918
|
-
automation: "ornn external-buckets disconnect <external-bucket-id> --idempotency-key <key> --format json",
|
|
4919
|
-
acceptedReferences: ["canonical external bucket ID", "exact unique external bucket name"],
|
|
4920
|
-
review: "Disconnecting reduces access to the source and is blocked while mounts remain.",
|
|
4921
|
-
related: ["storage detach", "external-buckets show"]
|
|
4922
|
-
})
|
|
4898
|
+
bucketDisconnectCapability
|
|
4923
4899
|
];
|
|
4924
4900
|
|
|
4925
4901
|
// ../../packages/capabilities/dist/capabilities/evidence.js
|
|
@@ -6545,6 +6521,50 @@ function storageCapability({ id, command, description, mutation, outcome, human,
|
|
|
6545
6521
|
execute: async (context, input) => storageExecutor(context)(id, input)
|
|
6546
6522
|
});
|
|
6547
6523
|
}
|
|
6524
|
+
var filesListInput = z30.object({ driveId: z30.string(), prefix: z30.string().optional() });
|
|
6525
|
+
async function* listFiles(context, input) {
|
|
6526
|
+
const prefix = input.prefix ?? "";
|
|
6527
|
+
const folder = prefix.includes("/") ? prefix.slice(0, prefix.lastIndexOf("/")) : "";
|
|
6528
|
+
let cursor = 0;
|
|
6529
|
+
while (cursor !== null) {
|
|
6530
|
+
const page = await listDriveContents(context.fetch, input.driveId, {
|
|
6531
|
+
recursive: true,
|
|
6532
|
+
...folder ? { path: folder } : {},
|
|
6533
|
+
...cursor ? { cursor } : {}
|
|
6534
|
+
});
|
|
6535
|
+
for (const entry of page.entries) {
|
|
6536
|
+
if (entry.kind === "file" && entry.path.startsWith(prefix))
|
|
6537
|
+
yield entry;
|
|
6538
|
+
}
|
|
6539
|
+
cursor = page.next_cursor ?? null;
|
|
6540
|
+
}
|
|
6541
|
+
}
|
|
6542
|
+
var volumeFilesListCapability = defineCapability({
|
|
6543
|
+
id: "storage.volumes.files.list",
|
|
6544
|
+
domain: "storage",
|
|
6545
|
+
roles: ["user"],
|
|
6546
|
+
description: "List files on a storage volume (drive). Optional prefix filters paths. This is a listing only -- it does not download bytes.",
|
|
6547
|
+
mutation: "read",
|
|
6548
|
+
input: filesListInput,
|
|
6549
|
+
mcp: { name: "storage_files_ls" },
|
|
6550
|
+
slack: false,
|
|
6551
|
+
execute: async (context, input) => listFiles(context, input),
|
|
6552
|
+
cli: {
|
|
6553
|
+
command: ["volumes", "files", "list"],
|
|
6554
|
+
input: storageCliInput,
|
|
6555
|
+
execute: (context, input) => storageExecutor(context)("storage.volumes.files.list", input),
|
|
6556
|
+
vnext: {
|
|
6557
|
+
arguments: "semantic",
|
|
6558
|
+
audience: "customer",
|
|
6559
|
+
category: "resource",
|
|
6560
|
+
outcome: "List nested volume files by semantic remote path.",
|
|
6561
|
+
human: "ornn volumes files list <volume> [--prefix <remote-path>] [--limit <1-500>] [--cursor <cursor>]",
|
|
6562
|
+
automation: "ornn volumes files list <volume-id> --limit 50 --format json",
|
|
6563
|
+
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6564
|
+
related: ["volumes files upload", "volumes files download"]
|
|
6565
|
+
}
|
|
6566
|
+
}
|
|
6567
|
+
});
|
|
6548
6568
|
var volumeCapabilities = [
|
|
6549
6569
|
storageCapability({
|
|
6550
6570
|
id: "storage.volumes.list",
|
|
@@ -6613,17 +6633,7 @@ var volumeCapabilities = [
|
|
|
6613
6633
|
review: "The volume and all of its data are permanently deleted.",
|
|
6614
6634
|
related: ["volume-mounts detach", "volumes show"]
|
|
6615
6635
|
}),
|
|
6616
|
-
|
|
6617
|
-
id: "storage.volumes.files.list",
|
|
6618
|
-
command: ["volumes", "files", "list"],
|
|
6619
|
-
description: "List nested files in one volume in a bounded page.",
|
|
6620
|
-
mutation: "read",
|
|
6621
|
-
outcome: "List nested volume files by semantic remote path.",
|
|
6622
|
-
human: "ornn volumes files list <volume> [--prefix <remote-path>] [--limit <1-500>] [--cursor <cursor>]",
|
|
6623
|
-
automation: "ornn volumes files list <volume-id> --limit 50 --format json",
|
|
6624
|
-
acceptedReferences: ["canonical volume ID", "exact unique volume name"],
|
|
6625
|
-
related: ["volumes files upload", "volumes files download"]
|
|
6626
|
-
}),
|
|
6636
|
+
volumeFilesListCapability,
|
|
6627
6637
|
storageCapability({
|
|
6628
6638
|
id: "storage.volumes.files.upload",
|
|
6629
6639
|
command: ["volumes", "files", "upload"],
|
|
@@ -6879,46 +6889,6 @@ var storageVerbCapabilities = [
|
|
|
6879
6889
|
})
|
|
6880
6890
|
})
|
|
6881
6891
|
];
|
|
6882
|
-
var bucketListCapability = defineCapability({
|
|
6883
|
-
id: "bucket.list",
|
|
6884
|
-
domain: "storage",
|
|
6885
|
-
roles: ["user"],
|
|
6886
|
-
description: "List a page of connected external buckets. Pass next_cursor as cursor to continue.",
|
|
6887
|
-
mutation: "read",
|
|
6888
|
-
input: z30.object({
|
|
6889
|
-
limit: z30.number().int().min(1).max(100).optional(),
|
|
6890
|
-
cursor: z30.string().optional()
|
|
6891
|
-
}),
|
|
6892
|
-
mcp: { name: "storage_buckets_list" },
|
|
6893
|
-
slack: false,
|
|
6894
|
-
execute: (ctx, input) => listDrives(ctx.fetch, {
|
|
6895
|
-
limit: input.limit ?? 25,
|
|
6896
|
-
scope: "external",
|
|
6897
|
-
...input.cursor ? { cursor: input.cursor } : {}
|
|
6898
|
-
})
|
|
6899
|
-
});
|
|
6900
|
-
var storageCompositionCapabilities = [
|
|
6901
|
-
bucketListCapability,
|
|
6902
|
-
defineCapability({
|
|
6903
|
-
id: "volume.contents",
|
|
6904
|
-
domain: "storage",
|
|
6905
|
-
roles: ["user"],
|
|
6906
|
-
description: "List one page of a storage volume's contents.",
|
|
6907
|
-
mutation: "read",
|
|
6908
|
-
input: z30.object({
|
|
6909
|
-
driveId: z30.string(),
|
|
6910
|
-
path: z30.string().optional(),
|
|
6911
|
-
cursor: z30.union([z30.string(), z30.number()]).optional()
|
|
6912
|
-
}),
|
|
6913
|
-
mcp: false,
|
|
6914
|
-
slack: false,
|
|
6915
|
-
execute: (ctx, input) => listDriveContents(ctx.fetch, input.driveId, {
|
|
6916
|
-
recursive: true,
|
|
6917
|
-
...input.path ? { path: input.path } : {},
|
|
6918
|
-
...input.cursor ? { cursor: input.cursor } : {}
|
|
6919
|
-
})
|
|
6920
|
-
})
|
|
6921
|
-
];
|
|
6922
6892
|
|
|
6923
6893
|
// ../../packages/capabilities/dist/cli-catalog.js
|
|
6924
6894
|
function canonicalCliCatalog(capabilities) {
|
|
@@ -6931,6 +6901,7 @@ function canonicalCliCatalog(capabilities) {
|
|
|
6931
6901
|
return {
|
|
6932
6902
|
...capability,
|
|
6933
6903
|
cli: {
|
|
6904
|
+
...capability.cli,
|
|
6934
6905
|
command: [...help3.command ?? capability.cli?.command ?? []],
|
|
6935
6906
|
vnext: help3
|
|
6936
6907
|
}
|
|
@@ -6960,7 +6931,6 @@ var catalog = [
|
|
|
6960
6931
|
...networkVerbCapabilities,
|
|
6961
6932
|
...accessVerbCapabilities,
|
|
6962
6933
|
...storageVerbCapabilities,
|
|
6963
|
-
...storageCompositionCapabilities,
|
|
6964
6934
|
machinePushKeysCapability,
|
|
6965
6935
|
...machineMetricsCapabilities,
|
|
6966
6936
|
...billingCapabilities,
|
|
@@ -7238,11 +7208,15 @@ export {
|
|
|
7238
7208
|
ADMIN_CLI_ROOTS,
|
|
7239
7209
|
CLI_MIGRATION_GUIDE_URL,
|
|
7240
7210
|
LEGACY_CLI_MIGRATIONS,
|
|
7211
|
+
bucketDisconnectCapability,
|
|
7212
|
+
bucketListCapability,
|
|
7213
|
+
bucketShowCapability,
|
|
7241
7214
|
byCliCommand,
|
|
7242
7215
|
byMcpName,
|
|
7243
7216
|
catalog,
|
|
7244
7217
|
findLegacyCliMigration,
|
|
7245
7218
|
forRole,
|
|
7246
7219
|
gpuDisplay,
|
|
7247
|
-
parseHardwareCatalog
|
|
7220
|
+
parseHardwareCatalog,
|
|
7221
|
+
volumeFilesListCapability
|
|
7248
7222
|
};
|