@ornncompute/cli 1.0.130 → 1.0.132

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.130",
3
+ "version": "1.0.132",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -687,6 +687,7 @@ function deleteContractFile(request, id2) {
687
687
  }
688
688
 
689
689
  // ../../packages/api-client/dist/commerce/facilities.js
690
+ var facilityEnsurePath = "/internal/v1/facilities/ensure";
690
691
  function listFacilities(request, input = {}, signal) {
691
692
  return request("/commerce/facilities" + queryString(input), { method: "GET", signal });
692
693
  }
@@ -709,7 +710,7 @@ function getStaffFacility(request, id2, signal) {
709
710
  });
710
711
  }
711
712
  function ensureFacility(request, body) {
712
- return request("/internal/v1/facilities/ensure", {
713
+ return request(facilityEnsurePath, {
713
714
  method: "POST",
714
715
  body
715
716
  });
@@ -874,6 +875,7 @@ export {
874
875
  detachReservationSshKey,
875
876
  editCapacityTerms,
876
877
  ensureFacility,
878
+ facilityEnsurePath,
877
879
  getBillingContact,
878
880
  getBillingPaymentMethod,
879
881
  getBillingSummary,
@@ -152,13 +152,13 @@ function shellSessionAttachPath(id) {
152
152
  }
153
153
 
154
154
  // ../../packages/api-client/dist/orchestrator/drives.js
155
- function queryPath(path, query) {
155
+ function queryPath(path4, query) {
156
156
  const params = new URLSearchParams();
157
157
  for (const [key, value] of Object.entries(query)) {
158
158
  if (value !== void 0 && value !== null)
159
159
  params.set(key, String(value));
160
160
  }
161
- return `${path}${params.size ? `?${params}` : ""}`;
161
+ return `${path4}${params.size ? `?${params}` : ""}`;
162
162
  }
163
163
  function listDrives(request, query = {}, signal) {
164
164
  return request(queryPath("/v1/orchestrator/drives", query), {
@@ -203,20 +203,20 @@ function listStorageTargets(request, signal) {
203
203
  function drivePath(id) {
204
204
  return `/v1/orchestrator/drives/${encodeURIComponent(id)}`;
205
205
  }
206
- function filePath(path) {
207
- return path.replace(/\\/g, "/").split("/").filter(Boolean).map(encodeURIComponent).join("/");
206
+ function filePath(path4) {
207
+ return path4.replace(/\\/g, "/").split("/").filter(Boolean).map(encodeURIComponent).join("/");
208
208
  }
209
- function driveFilePath(id, path) {
210
- return `${drivePath(id)}/files/${filePath(path)}`;
209
+ function driveFilePath(id, path4) {
210
+ return `${drivePath(id)}/files/${filePath(path4)}`;
211
211
  }
212
212
  function driveArchivePath(id) {
213
213
  return `${drivePath(id)}/archive`;
214
214
  }
215
- function driveFolderArchivePath(id, path) {
216
- return `${drivePath(id)}/folders/${filePath(path)}/archive`;
215
+ function driveFolderArchivePath(id, path4) {
216
+ return `${drivePath(id)}/folders/${filePath(path4)}/archive`;
217
217
  }
218
- function downloadDriveFile(fetch, id, path, signal) {
219
- return fetch(driveFilePath(id, path), { method: "GET", ...signal ? { signal } : {} });
218
+ function downloadDriveFile(fetch, id, path4, signal) {
219
+ return fetch(driveFilePath(id, path4), { method: "GET", ...signal ? { signal } : {} });
220
220
  }
221
221
  function listDriveContents(request, id, query = {}, signal) {
222
222
  const params = new URLSearchParams();
@@ -229,11 +229,11 @@ function listDriveContents(request, id, query = {}, signal) {
229
229
  ...signal ? { signal } : {}
230
230
  });
231
231
  }
232
- function deleteDriveFile(request, id, path) {
233
- return request(driveFilePath(id, path), { method: "DELETE" });
232
+ function deleteDriveFile(request, id, path4) {
233
+ return request(driveFilePath(id, path4), { method: "DELETE" });
234
234
  }
235
- function deleteDriveFolder(request, id, path) {
236
- return request(`${drivePath(id)}/folders/${filePath(path)}`, { method: "DELETE" });
235
+ function deleteDriveFolder(request, id, path4) {
236
+ return request(`${drivePath(id)}/folders/${filePath(path4)}`, { method: "DELETE" });
237
237
  }
238
238
  function clearDriveContents(request, id) {
239
239
  return request(`${drivePath(id)}/contents`, { method: "DELETE" });
@@ -262,13 +262,13 @@ function keepDriveUploadsAlive(request, id) {
262
262
  var storageEventsPath = "/v1/orchestrator/storage/ws";
263
263
 
264
264
  // ../../packages/api-client/dist/orchestrator/storage-usage.js
265
- function queryPath2(path, query) {
265
+ function queryPath2(path4, query) {
266
266
  const params = new URLSearchParams();
267
267
  for (const [key, value] of Object.entries(query)) {
268
268
  if (value !== void 0)
269
269
  params.set(key, String(value));
270
270
  }
271
- return `${path}${params.size ? `?${params}` : ""}`;
271
+ return `${path4}${params.size ? `?${params}` : ""}`;
272
272
  }
273
273
  function listStorageInventory(request, query = {}, signal) {
274
274
  return request(queryPath2("/v1/staff/storage/volumes", query), {
@@ -809,12 +809,124 @@ var remoteRunPath = "/v1/staff/remote";
809
809
  function runRemote(request, body) {
810
810
  return request(remoteRunPath, { method: "POST", body });
811
811
  }
812
+
813
+ // ../../packages/api-client/dist/orchestrator/agent-rollouts.js
814
+ var path = "/v1/orchestrator/agent-rollouts";
815
+ function startAgentRollout(request, body) {
816
+ return request(path, { method: "POST", body });
817
+ }
818
+ function listAgentRollouts(request, signal) {
819
+ return request(path, { method: "GET", ...signal ? { signal } : {} });
820
+ }
821
+ function getAgentRollout(request, id, signal) {
822
+ return request(`${path}/${encodeURIComponent(id)}`, {
823
+ method: "GET",
824
+ ...signal ? { signal } : {}
825
+ });
826
+ }
827
+ async function cancelAgentRollout(request, id) {
828
+ await request(`${path}/${encodeURIComponent(id)}/cancel`, { method: "POST" });
829
+ }
830
+
831
+ // ../../packages/api-client/dist/orchestrator/maintenance-history.js
832
+ function listMaintenanceHistory(request, filter = {}, signal) {
833
+ const query = new URLSearchParams();
834
+ for (const [key, value] of Object.entries(filter))
835
+ if (value !== void 0)
836
+ query.set(key, value);
837
+ return request(`/v1/orchestrator/maintenance-history${query.size ? `?${query}` : ""}`, {
838
+ method: "GET",
839
+ ...signal ? { signal } : {}
840
+ });
841
+ }
842
+ function getMaintenanceEvent(request, id, signal) {
843
+ return request(`/v1/orchestrator/maintenance-history/${encodeURIComponent(id)}`, {
844
+ method: "GET",
845
+ ...signal ? { signal } : {}
846
+ });
847
+ }
848
+
849
+ // ../../packages/api-client/dist/orchestrator/reservation-node-rollout.js
850
+ function listReservationNodeRollout(request, reservationId, query = {}, signal) {
851
+ const params = new URLSearchParams();
852
+ if (query.limit !== void 0)
853
+ params.set("limit", String(query.limit));
854
+ if (query.after_id !== void 0)
855
+ params.set("after_id", query.after_id);
856
+ return request(`/v1/orchestrator/reservations/${encodeURIComponent(reservationId)}/node-rollout${params.size ? `?${params}` : ""}`, { method: "GET", ...signal ? { signal } : {} });
857
+ }
858
+
859
+ // ../../packages/api-client/dist/orchestrator/controlplanes.js
860
+ var path2 = "/v1/orchestrator/controlplanes";
861
+ function listControlplanes(request, signal) {
862
+ return request(path2, {
863
+ method: "GET",
864
+ ...signal ? { signal } : {}
865
+ });
866
+ }
867
+ function setControlplaneSize(request, controllerId, body) {
868
+ return request(`${path2}/${encodeURIComponent(controllerId)}/size`, {
869
+ method: "POST",
870
+ body
871
+ });
872
+ }
873
+ function controlplaneSplashPath(replicaIp) {
874
+ return `${path2}/${encodeURIComponent(replicaIp)}/`;
875
+ }
876
+ function controlplaneDownloadPath(query) {
877
+ return `${path2}/download?${new URLSearchParams(query)}`;
878
+ }
879
+
880
+ // ../../packages/api-client/dist/orchestrator/ssh-bastions.js
881
+ var path3 = "/v1/orchestrator/ssh-bastions";
882
+ function listSshBastions(request, query, signal) {
883
+ const params = new URLSearchParams({ organization_id: query.organization_id });
884
+ if (query.after !== void 0)
885
+ params.set("after", query.after);
886
+ if (query.limit !== void 0)
887
+ params.set("limit", String(query.limit));
888
+ return request(`${path3}?${params}`, { method: "GET", ...signal ? { signal } : {} });
889
+ }
890
+ function createSshBastion(request, body) {
891
+ return request(path3, { method: "POST", body });
892
+ }
893
+ function updateSshBastion(request, id, body) {
894
+ return request(`${path3}/${encodeURIComponent(id)}`, {
895
+ method: "PUT",
896
+ body
897
+ });
898
+ }
899
+ async function deleteSshBastion(request, id, query) {
900
+ await request(`${path3}/${encodeURIComponent(id)}?${new URLSearchParams(query)}`, {
901
+ method: "DELETE"
902
+ });
903
+ }
904
+
905
+ // ../../packages/api-client/dist/orchestrator/supplier-node-configs.js
906
+ function listSupplierNodeConfigs(request, query = {}, signal) {
907
+ const params = new URLSearchParams();
908
+ if (query.limit !== void 0)
909
+ params.set("limit", String(query.limit));
910
+ if (query.after !== void 0)
911
+ params.set("after", query.after);
912
+ return request(`/v1/orchestrator/supplier-node-configs${params.size ? `?${params}` : ""}`, {
913
+ method: "GET",
914
+ ...signal ? { signal } : {}
915
+ });
916
+ }
917
+ function putSupplierNodeConfig(request, organizationId, body) {
918
+ return request(`/v1/orchestrator/supplier-node-configs/${encodeURIComponent(organizationId)}`, {
919
+ method: "PUT",
920
+ body
921
+ });
922
+ }
812
923
  export {
813
924
  actOnEnrollmentHost,
814
925
  addControllerNode,
815
926
  addControllerVirtualMachine,
816
927
  addReservationSshKey,
817
928
  assignNode,
929
+ cancelAgentRollout,
818
930
  cancelDriveUpload,
819
931
  cancelEnrollmentRun,
820
932
  clearDriveContents,
@@ -825,6 +937,8 @@ export {
825
937
  completeGitHubConnection,
826
938
  completeImageUpload,
827
939
  controllersSocketPath,
940
+ controlplaneDownloadPath,
941
+ controlplaneSplashPath,
828
942
  createController,
829
943
  createDisk,
830
944
  createDrive,
@@ -835,6 +949,7 @@ export {
835
949
  createNetwork,
836
950
  createNetworkPeer,
837
951
  createShellSession,
952
+ createSshBastion,
838
953
  createVirtualMachine,
839
954
  deleteDisk,
840
955
  deleteDrive,
@@ -846,6 +961,7 @@ export {
846
961
  deleteNetworkPeer,
847
962
  deleteRegistryTag,
848
963
  deleteReservationSshKey,
964
+ deleteSshBastion,
849
965
  deleteVirtualMachine,
850
966
  disksSocketPath,
851
967
  downloadDriveFile,
@@ -858,6 +974,7 @@ export {
858
974
  enrollmentTokensPath,
859
975
  fakeEnroll,
860
976
  geolocate,
977
+ getAgentRollout,
861
978
  getContainerRegistry,
862
979
  getControllerAccess,
863
980
  getCurrentShellSession,
@@ -872,6 +989,7 @@ export {
872
989
  getEnrollmentStepCatalog,
873
990
  getEnrollmentSteps,
874
991
  getHardwareCatalog,
992
+ getMaintenanceEvent,
875
993
  getNetwork,
876
994
  getNode,
877
995
  getNodeSanitize,
@@ -891,9 +1009,11 @@ export {
891
1009
  keepDriveUploadsAlive,
892
1010
  launchEnrollmentRun,
893
1011
  launchReservation,
1012
+ listAgentRollouts,
894
1013
  listAllEnrollmentProfiles,
895
1014
  listCatalogImages,
896
1015
  listControllers,
1016
+ listControlplanes,
897
1017
  listDisks,
898
1018
  listDriveContents,
899
1019
  listDrives,
@@ -907,6 +1027,7 @@ export {
907
1027
  listGitHubConnections,
908
1028
  listGitHubRepositories,
909
1029
  listLocalityRegions,
1030
+ listMaintenanceHistory,
910
1031
  listNetworkCompartments,
911
1032
  listNetworkMemberPeers,
912
1033
  listNetworkPeerConfigs,
@@ -916,12 +1037,15 @@ export {
916
1037
  listRegistryCaches,
917
1038
  listRegistryRepositories,
918
1039
  listRegistryTags,
1040
+ listReservationNodeRollout,
919
1041
  listReservationSshKeys,
920
1042
  listReservationVirtualMachines,
1043
+ listSshBastions,
921
1044
  listStaffNodeVirtualMachines,
922
1045
  listStaffNodes,
923
1046
  listStorageInventory,
924
1047
  listStorageTargets,
1048
+ listSupplierNodeConfigs,
925
1049
  listVirtualMachinePorts,
926
1050
  localityGeolocatePath,
927
1051
  networksSubscriptionPath,
@@ -930,6 +1054,7 @@ export {
930
1054
  postImageObject,
931
1055
  pullGitHubRepository,
932
1056
  pushNodeKeys,
1057
+ putSupplierNodeConfig,
933
1058
  rebootNode,
934
1059
  rebootVirtualMachine,
935
1060
  remoteRunPath,
@@ -939,7 +1064,9 @@ export {
939
1064
  revokeEnrollmentToken,
940
1065
  rotateEnrollmentAdminSshKey,
941
1066
  runRemote,
1067
+ setControlplaneSize,
942
1068
  shellSessionAttachPath,
1069
+ startAgentRollout,
943
1070
  startDiskUpload,
944
1071
  startDriveUpload,
945
1072
  startGitHubConnection,
@@ -958,6 +1085,7 @@ export {
958
1085
  updateNode,
959
1086
  updateNodeKeys,
960
1087
  updateNodeSanitize,
1088
+ updateSshBastion,
961
1089
  updateVirtualMachineKeys,
962
1090
  updateVirtualMachineRun
963
1091
  };
@@ -529,6 +529,7 @@ function createCreditAdjustment(request, organizationId, body2) {
529
529
  }
530
530
 
531
531
  // ../../packages/api-client/dist/commerce/facilities.js
532
+ var facilityEnsurePath = "/internal/v1/facilities/ensure";
532
533
  function listStaffFacilities(request, input = {}, signal) {
533
534
  return request("/internal/v1/facilities" + queryString(input), {
534
535
  method: "GET",
@@ -542,7 +543,7 @@ function getStaffFacility(request, id, signal) {
542
543
  });
543
544
  }
544
545
  function ensureFacility(request, body2) {
545
- return request("/internal/v1/facilities/ensure", {
546
+ return request(facilityEnsurePath, {
546
547
  method: "POST",
547
548
  body: body2
548
549
  });
@@ -585,18 +586,6 @@ function getCliSession(request) {
585
586
  return request("/v1/cli/session", { method: "GET" });
586
587
  }
587
588
 
588
- // ../../packages/capabilities/dist/supplier-directory.js
589
- function listSupplierOrganizationPage(fetch, input) {
590
- return listOrganizations(fetch, {
591
- role: "supplier",
592
- ...input,
593
- q: input.q?.trim() || void 0,
594
- sort: "created_at",
595
- direction: "asc"
596
- });
597
- }
598
- var listSupplierOrganizations2 = listSupplierOrganizations;
599
-
600
589
  // ../../packages/capabilities/dist/capabilities/fleet.js
601
590
  import { z as z2 } from "zod";
602
591
  var suppliersInput = z2.object({
@@ -661,7 +650,14 @@ var listSuppliersCapability = defineCapability({
661
650
  const paged = parsed.limit !== void 0 || parsed.offset !== void 0 || parsed.q !== void 0;
662
651
  const limit = parsed.limit ?? 25;
663
652
  const offset = parsed.offset ?? 0;
664
- const rows = paged ? await listSupplierOrganizationPage(ctx.fetch, { ...parsed, limit, offset }) : await listSupplierOrganizations2(ctx.fetch);
653
+ const rows = paged ? await listOrganizations(ctx.fetch, {
654
+ role: "supplier",
655
+ limit,
656
+ offset,
657
+ q: parsed.q?.trim() || void 0,
658
+ sort: "created_at",
659
+ direction: "asc"
660
+ }) : await listSupplierOrganizations(ctx.fetch);
665
661
  return {
666
662
  suppliers: rows.map((org) => ({ id: org.id, name: org.name })),
667
663
  ...paged && rows.length === limit ? { next_offset: offset + rows.length } : {}
@@ -1645,9 +1641,6 @@ function unplacedLocation(place) {
1645
1641
  return `Ornn could not place "${place}". Give a state, city, address, or catalog region such as us-west-3.`;
1646
1642
  }
1647
1643
  var LOCATION_LOOKUP_UNAVAILABLE = "Ornn's location lookup is unavailable right now. Keep this location and try again in a moment.";
1648
- function ensureFacility2(fetch, organizationId, region2) {
1649
- return ensureFacility(fetch, { organizationId, region: region2 });
1650
- }
1651
1644
 
1652
1645
  // ../../packages/capabilities/dist/capabilities/native-listing.js
1653
1646
  import { z as z8 } from "zod";
@@ -1831,7 +1824,10 @@ var adminCapacityOffersCreateCapability = defineCapability({
1831
1824
  throw new Error(unplacedLocation(location));
1832
1825
  if (!ctx.confirmed)
1833
1826
  return preview("listing.create", located ? { ...body2, located } : body2);
1834
- const facilityId = located ? (await ensureFacility2(ctx.fetch, body2.organizationId, located.region)).facilityId : body2.facilityId;
1827
+ const facilityId = located ? (await ensureFacility(ctx.fetch, {
1828
+ organizationId: body2.organizationId,
1829
+ region: located.region
1830
+ })).facilityId : body2.facilityId;
1835
1831
  return createCapacityListing(ctx.fetch, { ...body2, facilityId }, resolveIdempotencyKey(ctx, idempotencyKey));
1836
1832
  }
1837
1833
  });
@@ -5632,7 +5628,7 @@ var createListingCapability = defineCapability({
5632
5628
  const supplierQuery = (parsed.site_supplier ?? "").trim().toLowerCase();
5633
5629
  const place = (parsed.site_nickname ?? parsed.site ?? "").trim();
5634
5630
  if (!organizationId && supplierQuery) {
5635
- const matches = (await listSupplierOrganizations2(ctx.fetch)).filter((org) => org.id.toLowerCase() === supplierQuery || org.name.toLowerCase() === supplierQuery);
5631
+ const matches = (await listSupplierOrganizations(ctx.fetch)).filter((org) => org.id.toLowerCase() === supplierQuery || org.name.toLowerCase() === supplierQuery);
5636
5632
  if (matches.length !== 1) {
5637
5633
  return { ok: false, error: matches.length ? "ambiguous_supplier" : "supplier_not_found" };
5638
5634
  }
@@ -5732,7 +5728,7 @@ var createListingCapability = defineCapability({
5732
5728
  });
5733
5729
  }
5734
5730
  if (located && !facilityId && priced) {
5735
- facilityId = (await ensureFacility2(ctx.fetch, organizationId, located.region)).facilityId;
5731
+ facilityId = (await ensureFacility(ctx.fetch, { organizationId, region: located.region })).facilityId;
5736
5732
  }
5737
5733
  const listing = listingAt(facilityId);
5738
5734
  if (!listing) {