@ornncompute/cli 1.0.122 → 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.
- package/README.md +8 -0
- package/package.json +1 -1
- package/src/admin-node-diagnostics.mjs +2 -4
- package/src/admin-node-lifecycle.mjs +4 -8
- package/src/admin-ssh.mjs +2 -1
- package/src/api-client.mjs +5 -2
- package/src/evidence-commands.mjs +10 -6
- package/src/interaction-runtime.mjs +2 -0
- package/src/machine-reference.mjs +7 -17
- package/src/vm-commands.mjs +796 -427
- package/vendor/api-client/orchestrator.js +231 -1
- package/vendor/capabilities/cli.js +266 -209
|
@@ -326,17 +326,215 @@ function pullGitHubRepository(request, driveId, body) {
|
|
|
326
326
|
function syncGitHubRepository(request, driveId, folder) {
|
|
327
327
|
return request(`/v1/orchestrator/drives/${encodeURIComponent(driveId)}/github/${encodeURIComponent(folder)}/sync`, { method: "POST" });
|
|
328
328
|
}
|
|
329
|
+
|
|
330
|
+
// ../../packages/api-client/dist/orchestrator/nodes.js
|
|
331
|
+
function nodeQuery(query) {
|
|
332
|
+
const params = new URLSearchParams();
|
|
333
|
+
for (const [key, value] of Object.entries(query)) {
|
|
334
|
+
if (value !== void 0)
|
|
335
|
+
params.set(key, String(value));
|
|
336
|
+
}
|
|
337
|
+
return params.size ? `?${params}` : "";
|
|
338
|
+
}
|
|
339
|
+
function listNodes(request, query = {}, signal) {
|
|
340
|
+
return request(`/v1/orchestrator/nodes${nodeQuery(query)}`, {
|
|
341
|
+
method: "GET",
|
|
342
|
+
...signal ? { signal } : {}
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
function listStaffNodes(request, query = {}, signal) {
|
|
346
|
+
return request(`/v1/staff/nodes${nodeQuery(query)}`, {
|
|
347
|
+
method: "GET",
|
|
348
|
+
...signal ? { signal } : {}
|
|
349
|
+
});
|
|
350
|
+
}
|
|
351
|
+
function nodeResourcePath(id) {
|
|
352
|
+
return `/v1/orchestrator/nodes/${encodeURIComponent(id)}`;
|
|
353
|
+
}
|
|
354
|
+
function getNode(request, id, signal) {
|
|
355
|
+
return request(nodeResourcePath(id), {
|
|
356
|
+
method: "GET",
|
|
357
|
+
...signal ? { signal } : {}
|
|
358
|
+
});
|
|
359
|
+
}
|
|
360
|
+
function updateNode(request, id, body) {
|
|
361
|
+
return request(nodeResourcePath(id), { method: "PATCH", body });
|
|
362
|
+
}
|
|
363
|
+
function createGhostNodes(request, body) {
|
|
364
|
+
return request("/v1/orchestrator/nodes/ghost", { method: "POST", body });
|
|
365
|
+
}
|
|
366
|
+
function terminateNode(request, id, body, headers) {
|
|
367
|
+
return request(`${nodeResourcePath(id)}/terminate`, {
|
|
368
|
+
method: "POST",
|
|
369
|
+
body,
|
|
370
|
+
...headers ? { headers } : {}
|
|
371
|
+
});
|
|
372
|
+
}
|
|
373
|
+
function transferNode(request, id, body) {
|
|
374
|
+
return request(`${nodeResourcePath(id)}/transfer`, {
|
|
375
|
+
method: "POST",
|
|
376
|
+
body
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
function assignNode(request, id, body, headers) {
|
|
380
|
+
return request(`${nodeResourcePath(id)}/assign`, {
|
|
381
|
+
method: "POST",
|
|
382
|
+
body,
|
|
383
|
+
...headers ? { headers } : {}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
function updateNodeKeys(request, id, body, headers) {
|
|
387
|
+
return request(`${nodeResourcePath(id)}/keys`, {
|
|
388
|
+
method: "PATCH",
|
|
389
|
+
body,
|
|
390
|
+
...headers ? { headers } : {}
|
|
391
|
+
});
|
|
392
|
+
}
|
|
393
|
+
function issueNodeSshCertificate(request, id, body) {
|
|
394
|
+
return request(`${nodeResourcePath(id)}/ssh-certificates`, { method: "POST", body });
|
|
395
|
+
}
|
|
396
|
+
function rebootNode(request, id, body, headers) {
|
|
397
|
+
return request(`${nodeResourcePath(id)}/reboot`, {
|
|
398
|
+
method: "POST",
|
|
399
|
+
body,
|
|
400
|
+
...headers ? { headers } : {}
|
|
401
|
+
});
|
|
402
|
+
}
|
|
403
|
+
function pushNodeKeys(request, id, body = {}) {
|
|
404
|
+
return request(`${nodeResourcePath(id)}/push-keys`, { method: "POST", body });
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
// ../../packages/api-client/dist/orchestrator/virtual-machines.js
|
|
408
|
+
function listNodeVirtualMachines(request, nodeId, signal) {
|
|
409
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines`, {
|
|
410
|
+
method: "GET",
|
|
411
|
+
...signal ? { signal } : {}
|
|
412
|
+
});
|
|
413
|
+
}
|
|
414
|
+
function listStaffNodeVirtualMachines(request, nodeId, signal) {
|
|
415
|
+
return request(`/v1/staff/nodes/${encodeURIComponent(nodeId)}/virtual-machines`, {
|
|
416
|
+
method: "GET",
|
|
417
|
+
...signal ? { signal } : {}
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function listReservationVirtualMachines(request, reservationId, signal) {
|
|
421
|
+
return request(`/v1/orchestrator/reservations/${encodeURIComponent(reservationId)}/virtual-machines`, { method: "GET", ...signal ? { signal } : {} });
|
|
422
|
+
}
|
|
423
|
+
function getVirtualMachine(request, id, signal) {
|
|
424
|
+
return request(`/v1/orchestrator/virtual-machines/${encodeURIComponent(id)}`, {
|
|
425
|
+
method: "GET",
|
|
426
|
+
...signal ? { signal } : {}
|
|
427
|
+
});
|
|
428
|
+
}
|
|
429
|
+
function getVirtualMachineLogs(request, id, signal) {
|
|
430
|
+
return request(`/v1/orchestrator/virtual-machines/${encodeURIComponent(id)}/logs`, {
|
|
431
|
+
method: "GET",
|
|
432
|
+
...signal ? { signal } : {}
|
|
433
|
+
});
|
|
434
|
+
}
|
|
435
|
+
function updateVirtualMachineRun(request, id, body) {
|
|
436
|
+
return request(`/v1/orchestrator/virtual-machines/${encodeURIComponent(id)}`, {
|
|
437
|
+
method: "POST",
|
|
438
|
+
body
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
function getNodeVirtualMachineCapacity(request, nodeId) {
|
|
442
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machine-capacity`, {
|
|
443
|
+
method: "GET"
|
|
444
|
+
});
|
|
445
|
+
}
|
|
446
|
+
function createVirtualMachine(request, nodeId, body) {
|
|
447
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines`, {
|
|
448
|
+
method: "POST",
|
|
449
|
+
body
|
|
450
|
+
});
|
|
451
|
+
}
|
|
452
|
+
function deleteVirtualMachine(request, nodeId, id, query = {}, signal) {
|
|
453
|
+
const params = new URLSearchParams();
|
|
454
|
+
if (query.abandon_host_cleanup !== void 0)
|
|
455
|
+
params.set("abandon_host_cleanup", String(query.abandon_host_cleanup));
|
|
456
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines/${encodeURIComponent(id)}${params.size ? `?${params}` : ""}`, { method: "DELETE", ...signal ? { signal } : {} });
|
|
457
|
+
}
|
|
458
|
+
function updateVirtualMachineKeys(request, id, body, headers) {
|
|
459
|
+
return request(`/v1/orchestrator/virtual-machines/${encodeURIComponent(id)}/keys`, {
|
|
460
|
+
method: "PATCH",
|
|
461
|
+
body,
|
|
462
|
+
...headers ? { headers } : {}
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
function rebootVirtualMachine(request, nodeId, id, body = {}) {
|
|
466
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines/${encodeURIComponent(id)}/reboot`, { method: "POST", body });
|
|
467
|
+
}
|
|
468
|
+
function listVirtualMachinePorts(request, nodeId, id, signal) {
|
|
469
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines/${encodeURIComponent(id)}/ports`, { method: "GET", ...signal ? { signal } : {} });
|
|
470
|
+
}
|
|
471
|
+
function openVirtualMachinePort(request, nodeId, id, body) {
|
|
472
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines/${encodeURIComponent(id)}/ports`, { method: "POST", body });
|
|
473
|
+
}
|
|
474
|
+
function closeVirtualMachinePort(request, nodeId, id, portId) {
|
|
475
|
+
return request(`/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/virtual-machines/${encodeURIComponent(id)}/ports/${encodeURIComponent(portId)}`, { method: "DELETE" });
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// ../../packages/api-client/dist/orchestrator/node-access.js
|
|
479
|
+
function launchReservation(request, reservationId, body) {
|
|
480
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/launch`, { method: "POST", body });
|
|
481
|
+
}
|
|
482
|
+
function switchReservationAccess(request, reservationId, body) {
|
|
483
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/switch-access`, { method: "POST", body });
|
|
484
|
+
}
|
|
485
|
+
function getReservationAccessSwitch(request, reservationId, requestId, signal) {
|
|
486
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/switch-access?${new URLSearchParams({ request_id: requestId })}`, { method: "GET", ...signal ? { signal } : {} });
|
|
487
|
+
}
|
|
488
|
+
function listReservationSshKeys(request, reservationId, query = {}, signal) {
|
|
489
|
+
const params = new URLSearchParams();
|
|
490
|
+
if (query.virtual_machine_id !== void 0)
|
|
491
|
+
params.set("virtual_machine_id", query.virtual_machine_id);
|
|
492
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/ssh-keys${params.size ? `?${params}` : ""}`, { method: "GET", ...signal ? { signal } : {} });
|
|
493
|
+
}
|
|
494
|
+
function addReservationSshKey(request, reservationId, body, options = {}) {
|
|
495
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/ssh-keys`, { method: "POST", body, ...options });
|
|
496
|
+
}
|
|
497
|
+
function deleteReservationSshKey(request, reservationId, keyId) {
|
|
498
|
+
return request(`/v1/orchestrator/nodes/reservations/${encodeURIComponent(reservationId)}/ssh-keys/${encodeURIComponent(keyId)}`, { method: "DELETE" });
|
|
499
|
+
}
|
|
500
|
+
var reservationEventsPath = "/v1/orchestrator/reservations/ws";
|
|
501
|
+
|
|
502
|
+
// ../../packages/api-client/dist/orchestrator/node-sanitize.js
|
|
503
|
+
function sanitizePath(nodeId, jobId) {
|
|
504
|
+
const base = `/v1/orchestrator/nodes/${encodeURIComponent(nodeId)}/sanitize-drives`;
|
|
505
|
+
return jobId === void 0 ? base : `${base}/${encodeURIComponent(jobId)}`;
|
|
506
|
+
}
|
|
507
|
+
function startNodeSanitize(request, nodeId, body) {
|
|
508
|
+
return request(sanitizePath(nodeId), { method: "POST", body });
|
|
509
|
+
}
|
|
510
|
+
function getNodeSanitize(request, nodeId, jobId) {
|
|
511
|
+
return request(sanitizePath(nodeId, jobId), { method: "GET" });
|
|
512
|
+
}
|
|
513
|
+
function updateNodeSanitize(request, nodeId, jobId, body) {
|
|
514
|
+
return request(sanitizePath(nodeId, jobId), { method: "PATCH", body });
|
|
515
|
+
}
|
|
516
|
+
function getNodeSanitizeLog(fetcher, nodeId, jobId) {
|
|
517
|
+
return fetcher(sanitizePath(nodeId, jobId), {
|
|
518
|
+
method: "GET",
|
|
519
|
+
headers: { Accept: "application/x-ndjson" }
|
|
520
|
+
});
|
|
521
|
+
}
|
|
329
522
|
export {
|
|
523
|
+
addReservationSshKey,
|
|
524
|
+
assignNode,
|
|
330
525
|
cancelDriveUpload,
|
|
331
526
|
clearDriveContents,
|
|
332
527
|
closeShellSession,
|
|
528
|
+
closeVirtualMachinePort,
|
|
333
529
|
completeDiskUpload,
|
|
334
530
|
completeDriveUpload,
|
|
335
531
|
completeGitHubConnection,
|
|
336
532
|
completeImageUpload,
|
|
337
533
|
createDisk,
|
|
338
534
|
createDrive,
|
|
535
|
+
createGhostNodes,
|
|
339
536
|
createShellSession,
|
|
537
|
+
createVirtualMachine,
|
|
340
538
|
deleteDisk,
|
|
341
539
|
deleteDrive,
|
|
342
540
|
deleteDriveFile,
|
|
@@ -344,6 +542,8 @@ export {
|
|
|
344
542
|
deleteGitHubConnection,
|
|
345
543
|
deleteImage,
|
|
346
544
|
deleteRegistryTag,
|
|
545
|
+
deleteReservationSshKey,
|
|
546
|
+
deleteVirtualMachine,
|
|
347
547
|
disksSocketPath,
|
|
348
548
|
downloadDriveFile,
|
|
349
549
|
driveArchivePath,
|
|
@@ -354,13 +554,22 @@ export {
|
|
|
354
554
|
getCurrentShellSession,
|
|
355
555
|
getDrive,
|
|
356
556
|
getHardwareCatalog,
|
|
557
|
+
getNode,
|
|
558
|
+
getNodeSanitize,
|
|
559
|
+
getNodeSanitizeLog,
|
|
560
|
+
getNodeVirtualMachineCapacity,
|
|
357
561
|
getOrganizationStorageUsage,
|
|
358
562
|
getRegistryUsage,
|
|
563
|
+
getReservationAccessSwitch,
|
|
359
564
|
getSoftwareCatalog,
|
|
360
565
|
getStorageUsage,
|
|
566
|
+
getVirtualMachine,
|
|
567
|
+
getVirtualMachineLogs,
|
|
361
568
|
hardwareCatalogPath,
|
|
362
569
|
importDisk,
|
|
570
|
+
issueNodeSshCertificate,
|
|
363
571
|
keepDriveUploadsAlive,
|
|
572
|
+
launchReservation,
|
|
364
573
|
listCatalogImages,
|
|
365
574
|
listDisks,
|
|
366
575
|
listDriveContents,
|
|
@@ -369,22 +578,43 @@ export {
|
|
|
369
578
|
listGitHubConnections,
|
|
370
579
|
listGitHubRepositories,
|
|
371
580
|
listLocalityRegions,
|
|
581
|
+
listNodeVirtualMachines,
|
|
582
|
+
listNodes,
|
|
372
583
|
listRegistryCaches,
|
|
373
584
|
listRegistryRepositories,
|
|
374
585
|
listRegistryTags,
|
|
586
|
+
listReservationSshKeys,
|
|
587
|
+
listReservationVirtualMachines,
|
|
588
|
+
listStaffNodeVirtualMachines,
|
|
589
|
+
listStaffNodes,
|
|
375
590
|
listStorageInventory,
|
|
376
591
|
listStorageTargets,
|
|
592
|
+
listVirtualMachinePorts,
|
|
377
593
|
localityGeolocatePath,
|
|
594
|
+
openVirtualMachinePort,
|
|
378
595
|
postDiskObject,
|
|
379
596
|
postImageObject,
|
|
380
597
|
pullGitHubRepository,
|
|
598
|
+
pushNodeKeys,
|
|
599
|
+
rebootNode,
|
|
600
|
+
rebootVirtualMachine,
|
|
601
|
+
reservationEventsPath,
|
|
381
602
|
shellSessionAttachPath,
|
|
382
603
|
startDiskUpload,
|
|
383
604
|
startDriveUpload,
|
|
384
605
|
startGitHubConnection,
|
|
385
606
|
startImageUpload,
|
|
607
|
+
startNodeSanitize,
|
|
386
608
|
storageEventsPath,
|
|
609
|
+
switchReservationAccess,
|
|
387
610
|
syncGitHubRepository,
|
|
611
|
+
terminateNode,
|
|
612
|
+
transferNode,
|
|
388
613
|
updateDisk,
|
|
389
|
-
updateDrive
|
|
614
|
+
updateDrive,
|
|
615
|
+
updateNode,
|
|
616
|
+
updateNodeKeys,
|
|
617
|
+
updateNodeSanitize,
|
|
618
|
+
updateVirtualMachineKeys,
|
|
619
|
+
updateVirtualMachineRun
|
|
390
620
|
};
|