@ornncompute/cli 1.0.437 → 1.0.438

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 CHANGED
@@ -151,7 +151,7 @@ pass it as `--listing-id`. `terms` separately returns advertised financial choic
151
151
  with `listingTermsId`, type, price and down payment.
152
152
  List accepts limits of 1–100 and the owner cursor unchanged. `availability`
153
153
  reads Markets `/v1/markets/listings/{id}/availability` (optional `--from`/`--to`)
154
- as windows of free GPUs and the whole machines those GPUs make
154
+ as windows of free GPUs (vCPUs on CPU capacity) and the whole machines they make
155
155
  ([Markets routes](../../services/markets/README.md#routes)). Relisting uses
156
156
  `POST /commerce/reservations/{id}/relist` with `nodeCount`, dates, and a
157
157
  `terms` array. The body does not take node IDs. Delisting uses the native parent’s `/delist` POST. `reservations` reads Commerce
@@ -320,7 +320,8 @@ and `--verbose` compartment options are removed; inspect the saved run for step
320
320
  progress. The gateway authoritatively enforces the admin role.
321
321
  `ornn admin nodes benchmark <node-id>` reads benchmark job history from
322
322
  `/v1/benchmark/jobs`. `ornn admin nodes test <node-id> [--burn-time MINUTES]`
323
- queues a burn job, and `test-result <job-id>` reads it. Auto-diagnosis is
323
+ queues a burn job, and `test-result <job-id>` reads it. On a CPU node it queues
324
+ the CPU checks and refuses `--burn-time`. Auto-diagnosis is
324
325
  `ornn admin nodes diagnosis`: `eligibility`, `list`, and `show` are reads;
325
326
  `start`, `cancel`, `policy update`, and `profile update` print a review and
326
327
  then submit in an eligible human terminal. Omitted policy scopes are sent as
@@ -566,6 +567,11 @@ WireGuard key/config files.
566
567
  Durable Bare Metal workspaces use
567
568
  `--network shared --volume <volume-id> --mount-access read-only|read-write`;
568
569
  private Kubernetes and Slurm launches continue to use `--network private`.
570
+ On CPU capacity, Bare Metal launch JSON adds `vcpus`, the reservation's vCPUs,
571
+ to `capacity_reservation.allocation_context`. Durable workspace JSON adds
572
+ `vcpus` and `vcpus_per_machine` to `allocation_context.quantity`. `gpu_count`
573
+ stays 0. Cluster list and show JSON add `vcpus`, the total vCPUs of the CPU
574
+ workers, when the cluster has CPU workers. GPU output has no `vcpus` fields.
569
575
 
570
576
  ### Storage list pages
571
577
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.437",
3
+ "version": "1.0.438",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -125,6 +125,7 @@ function projectCluster(value, reservationId) {
125
125
  membership_count: integer(source.node_count) ?? members.length,
126
126
  gpu_count: integer(source.gpu_count),
127
127
  gpu_type: text(source.gpu_type),
128
+ ...(integer(source.vcpus) === null ? {} : { vcpus: source.vcpus }),
128
129
  credential_state: cleanState(source.credential_state),
129
130
  created_at: text(source.created_at),
130
131
  updated_at: text(source.updated_at),
@@ -14,6 +14,10 @@ import {
14
14
  sshKeyAssignmentStatusCapability,
15
15
  sshKeyDeliveryStatus,
16
16
  volumeMountShowCapability,
17
+ capacityUnit,
18
+ formatUnitQuantity,
19
+ reservationUnits,
20
+ unitsPerNode,
17
21
  } from "../vendor/capabilities/cli.js";
18
22
  import * as orchestrator from "../vendor/api-client/orchestrator.js";
19
23
  import { getReservation } from "../vendor/api-client/commerce.js";
@@ -1510,6 +1514,7 @@ function reservationAllocationContext(value) {
1510
1514
  gpu_count: Number.isSafeInteger(reservation.reservedGpuCount)
1511
1515
  ? reservation.reservedGpuCount
1512
1516
  : null,
1517
+ ...(capacityUnit(reservation) === "vcpu" ? { vcpus: reservationUnits(reservation) } : {}),
1513
1518
  };
1514
1519
  }
1515
1520
 
@@ -1694,6 +1699,9 @@ function durableWorkspaceAllocation(reservation, interaction) {
1694
1699
  machine_count: machineCount,
1695
1700
  gpu_count: gpuCount,
1696
1701
  gpus_per_machine: gpusPerMachine,
1702
+ ...(capacityUnit(reservation) === "vcpu"
1703
+ ? { vcpus: allocation.vcpus, vcpus_per_machine: unitsPerNode(reservation) }
1704
+ : {}),
1697
1705
  },
1698
1706
  };
1699
1707
  }
@@ -1985,7 +1993,7 @@ async function launchDurableBareMetalWorkspace({
1985
1993
  },
1986
1994
  {
1987
1995
  label: "Quantity",
1988
- value: `${allocation.quantity.gpu_count > 0 ? `${allocation.quantity.gpu_count} GPUs` : "CPU"} across ${allocation.quantity.machine_count} machine${allocation.quantity.machine_count === 1 ? "" : "s"}`,
1996
+ value: `${allocation.quantity.gpu_count > 0 ? `${allocation.quantity.gpu_count} GPUs` : allocation.quantity.vcpus === undefined ? "CPU" : formatUnitQuantity(allocation.quantity.vcpus, "vcpu")} across ${allocation.quantity.machine_count} machine${allocation.quantity.machine_count === 1 ? "" : "s"}`,
1989
1997
  },
1990
1998
  {
1991
1999
  label: "Creation",
@@ -1643,6 +1643,35 @@ function revokeControlplaneLicense(request, id) {
1643
1643
  // ../../packages/capabilities/dist/capabilities/staff-fleet.js
1644
1644
  import { z as z4 } from "zod";
1645
1645
 
1646
+ // ../../packages/capabilities/dist/compute-units.js
1647
+ var CPU_SLUG = "cpu";
1648
+ var CPU_DISPLAY = "CPU";
1649
+ var VCPUS_PER_CORE = 2;
1650
+ function isCpuNode(node) {
1651
+ return !node.gpu_type?.trim() && !((node.gpu_count ?? 0) > 0);
1652
+ }
1653
+ function isCpuSlug(slug) {
1654
+ return !slug?.trim() || slug === CPU_SLUG;
1655
+ }
1656
+ function capacityUnit(listing) {
1657
+ return isCpuSlug(listing.gpuSlug) ? "vcpu" : "gpu";
1658
+ }
1659
+ function unitsPerNode(listing) {
1660
+ if (isCpuSlug(listing.gpuSlug))
1661
+ return Math.max(0, listing.coresPerNode ?? 0) * VCPUS_PER_CORE;
1662
+ return Math.max(0, listing.gpusPerNode ?? 0);
1663
+ }
1664
+ function reservationUnits(reservation) {
1665
+ return reservation.reservedGpuCount > 0 ? reservation.reservedGpuCount : Math.max(0, reservation.cores ?? 0) * VCPUS_PER_CORE;
1666
+ }
1667
+ function unitName(unit, count = 2) {
1668
+ const name2 = unit === "vcpu" ? "vCPU" : "GPU";
1669
+ return count === 1 ? name2 : `${name2}s`;
1670
+ }
1671
+ function formatUnitQuantity(count, unit) {
1672
+ return `${count.toLocaleString("en-US")} ${unitName(unit, count)}`;
1673
+ }
1674
+
1646
1675
  // ../../packages/capabilities/dist/capabilities/staff-shared.js
1647
1676
  function adminCli(path6, outcome, usage, options) {
1648
1677
  const command = ["admin", ...path6];
@@ -1773,7 +1802,7 @@ var nodeTestTriggerCapability = defineStaffMcpCapability({
1773
1802
  id: "node.test-trigger",
1774
1803
  domain: "fleet",
1775
1804
  roles: ["admin"],
1776
- description: "Internal staff only: start a node job (host checks + GPU suites; optional burn-in minutes).",
1805
+ description: "Internal staff only: start a node job (host checks + GPU suites; optional burn-in minutes). On a CPU node it runs the CPU checks and refuses burn-in minutes.",
1777
1806
  mutation: "preview-confirm",
1778
1807
  cli: {
1779
1808
  command: ["admin", "nodes", "test"],
@@ -1801,13 +1830,24 @@ var nodeTestTriggerCapability = defineStaffMcpCapability({
1801
1830
  const body2 = {
1802
1831
  node_id: parsed.nodeId,
1803
1832
  constraints,
1804
- burn_time_minutes: parsed.burnTimeMinutes ?? 0
1833
+ burn_time_minutes: parsed.burnTimeMinutes ?? 0,
1834
+ ...await cpuNodeValidation(ctx.fetch, parsed.nodeId)
1805
1835
  };
1806
1836
  if (!ctx.confirmed)
1807
1837
  return preview("node.test-trigger", body2);
1808
1838
  return createJob(ctx.fetch, body2);
1809
1839
  }
1810
1840
  });
1841
+ async function cpuNodeValidation(fetch, nodeId3) {
1842
+ return isCpuNode(await getNode(fetch, nodeId3)) ? {
1843
+ validation: {
1844
+ profile: "standard",
1845
+ individual_tests: true,
1846
+ gemm_minutes: 0,
1847
+ cpu_node: true
1848
+ }
1849
+ } : {};
1850
+ }
1811
1851
  var nodeTestResultInput = z4.object({
1812
1852
  jobId: z4.string()
1813
1853
  });
@@ -2659,21 +2699,6 @@ import { z as z11 } from "zod";
2659
2699
 
2660
2700
  // ../../packages/capabilities/dist/capabilities/native-listing.js
2661
2701
  import { z as z9 } from "zod";
2662
-
2663
- // ../../packages/capabilities/dist/compute-units.js
2664
- var CPU_SLUG = "cpu";
2665
- var CPU_DISPLAY = "CPU";
2666
- var VCPUS_PER_CORE = 2;
2667
- function isCpuSlug(slug) {
2668
- return !slug?.trim() || slug === CPU_SLUG;
2669
- }
2670
- function unitsPerNode(listing) {
2671
- if (isCpuSlug(listing.gpuSlug))
2672
- return Math.max(0, listing.coresPerNode ?? 0) * VCPUS_PER_CORE;
2673
- return Math.max(0, listing.gpusPerNode ?? 0);
2674
- }
2675
-
2676
- // ../../packages/capabilities/dist/capabilities/native-listing.js
2677
2702
  var nativeTermFields = {
2678
2703
  frontendNetwork: z9.string().trim().min(1).refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional(),
2679
2704
  backendNetwork: z9.string().trim().min(1).refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional(),
@@ -3352,6 +3377,10 @@ function bindHardwareFields(terms, input, fields) {
3352
3377
  delete payload[field];
3353
3378
  continue;
3354
3379
  }
3380
+ if (kind === "gpu" && value.trim().toLowerCase() === CPU_SLUG) {
3381
+ payload[field] = CPU_SLUG;
3382
+ continue;
3383
+ }
3355
3384
  const resolved = resolveCatalogTerm(terms, kind, value);
3356
3385
  const bound = kind === "gpu" ? resolved.canonical : resolved.display;
3357
3386
  if (bound) {
@@ -3412,7 +3441,7 @@ var marketBooksCapability = defineCapability({
3412
3441
  input: marketBooksInput,
3413
3442
  cli: {
3414
3443
  command: ["market", "books"],
3415
- vnext: help2("List order books by GPU type and region with their best bid and ask.", "ornn market books [--gpu-slug <slug>] [--region <slug>]", "ornn market books --format json", ["market book", "market quote", "market bid"], 31)
3444
+ vnext: help2("List order books by GPU type or cpu and region with their best bid and ask.", "ornn market books [--gpu-slug <slug>] [--region <slug>]", "ornn market books --format json", ["market book", "market quote", "market bid"], 31)
3416
3445
  },
3417
3446
  execute: async (ctx, input) => {
3418
3447
  const parsed = marketBooksInput.parse(input);
@@ -3433,7 +3462,7 @@ var marketBookCapability = defineCapability({
3433
3462
  input: marketBookInput,
3434
3463
  cli: {
3435
3464
  command: ["market", "book"],
3436
- vnext: help2("Show bid and ask depth for one GPU type and region.", "ornn market book --gpu-slug <slug> [--region <slug>]", "ornn market book --gpu-slug <slug> --region us-east-11 --format json", ["market books", "market trades", "market quote"], 32, ["catalog GPU slug", "region slug"])
3465
+ vnext: help2("Show bid and ask depth for one GPU type or cpu and region.", "ornn market book --gpu-slug <slug> [--region <slug>]", "ornn market book --gpu-slug <slug> --region us-east-11 --format json", ["market books", "market trades", "market quote"], 32, ["catalog GPU slug or cpu", "region slug"])
3437
3466
  },
3438
3467
  execute: async (ctx, input) => {
3439
3468
  const parsed = marketBookInput.parse(input);
@@ -3449,7 +3478,7 @@ var marketTradesCapability = defineCapability({
3449
3478
  input: marketBookInput,
3450
3479
  cli: {
3451
3480
  command: ["market", "trades"],
3452
- vnext: help2("List recent fills for one GPU type and region.", "ornn market trades --gpu-slug <slug> [--region <slug>]", "ornn market trades --gpu-slug <slug> --format json", ["market book"], 33, ["catalog GPU slug", "region slug"])
3481
+ vnext: help2("List recent fills for one GPU type or cpu and region.", "ornn market trades --gpu-slug <slug> [--region <slug>]", "ornn market trades --gpu-slug <slug> --format json", ["market book"], 33, ["catalog GPU slug or cpu", "region slug"])
3453
3482
  },
3454
3483
  execute: async (ctx, input) => {
3455
3484
  const parsed = marketBookInput.parse(input);
@@ -3471,7 +3500,7 @@ var marketQuoteCapability = defineCapability({
3471
3500
  input: marketQuoteInput,
3472
3501
  cli: {
3473
3502
  command: ["market", "quote"],
3474
- vnext: help2("Preview which nodes a bid would take now and what each costs.", "ornn market quote --gpu-slug <slug> --nodes <n> [--region <slug>]", "ornn market quote --gpu-slug <slug> --nodes 2 --format json", ["market book", "market bid"], 34, ["catalog GPU slug", "region slug"])
3503
+ vnext: help2("Preview which nodes a bid would take now and what each costs.", "ornn market quote --gpu-slug <slug> --nodes <n> [--region <slug>]", "ornn market quote --gpu-slug <slug> --nodes 2 --format json", ["market book", "market bid"], 34, ["catalog GPU slug or cpu", "region slug"])
3475
3504
  },
3476
3505
  execute: async (ctx, input) => {
3477
3506
  const parsed = marketQuoteInput.parse(input);
@@ -3545,7 +3574,7 @@ var marketBidCapability = defineCapability({
3545
3574
  command: ["market", "bid"],
3546
3575
  input: marketBidCliInput,
3547
3576
  execute: async (ctx, input) => executeMarketBid(ctx, marketBidCliInput.parse(input)),
3548
- vnext: help2("Buy whole nodes at market or with a price-capped limit bid.", "ornn market bid --gpu-slug <slug> --nodes <n> [--region <slug>] [--price-per-gpu-hour-micro-usd <micro-USD>] [--fill-behavior partial|all] [--disk-id <id>]", "ornn market bid --gpu-slug nvidia_h100_sxm --nodes 2 --price-per-gpu-hour-micro-usd 2500000 --format json", ["market quote", "market orders", "market fills", "market cancel"], 35, ["catalog GPU slug"])
3577
+ vnext: help2("Buy whole nodes at market or with a price-capped limit bid.", "ornn market bid --gpu-slug <slug> --nodes <n> [--region <slug>] [--price-per-gpu-hour-micro-usd <micro-USD>] [--fill-behavior partial|all] [--disk-id <id>]", "ornn market bid --gpu-slug nvidia_h100_sxm --nodes 2 --price-per-gpu-hour-micro-usd 2500000 --format json", ["market quote", "market orders", "market fills", "market cancel"], 35, ["catalog GPU slug or cpu"])
3549
3578
  },
3550
3579
  execute: async (ctx, input) => executeMarketBid(ctx, marketBidInput.parse(input))
3551
3580
  });
@@ -4122,7 +4151,11 @@ var adminNodeDiagnoseCapability = defineCapability({
4122
4151
  input: adminNodeDiagnoseInput,
4123
4152
  execute: async (ctx, input) => {
4124
4153
  const parsed = adminNodeDiagnoseInput.parse(input);
4125
- const body2 = { node_id: parsed.node_id, burn_time_minutes: 0 };
4154
+ const body2 = {
4155
+ node_id: parsed.node_id,
4156
+ burn_time_minutes: 0,
4157
+ ...await cpuNodeValidation(ctx.fetch, parsed.node_id)
4158
+ };
4126
4159
  if (!ctx.confirmed) {
4127
4160
  return {
4128
4161
  action: "node.diagnose",
@@ -7722,7 +7755,10 @@ var listListingsCapability = defineCapability({
7722
7755
  parameters: {
7723
7756
  type: "object",
7724
7757
  properties: {
7725
- gpu: { type: "string", description: "Catalog GPU term such as H100 or NVIDIA H100." },
7758
+ gpu: {
7759
+ type: "string",
7760
+ description: "Catalog GPU term such as H100 or NVIDIA H100, or cpu for CPU capacity."
7761
+ },
7726
7762
  cpu: { type: "string", description: "Catalog CPU term such as Xeon or EPYC." },
7727
7763
  site: { type: "string", description: "Location / facility filter such as Dallas." },
7728
7764
  fabric: { type: "string", description: "Catalog link term such as XDR or NDR." },
@@ -9664,6 +9700,7 @@ export {
9664
9700
  bucketShowCapability,
9665
9701
  bucketUpdateCredentialsCapability,
9666
9702
  bucketVerifyCapability,
9703
+ capacityUnit,
9667
9704
  catalog,
9668
9705
  clusterAddNodeCapability,
9669
9706
  clusterCreateCapability,
@@ -9673,6 +9710,7 @@ export {
9673
9710
  clusterShowCapability,
9674
9711
  clusterTeardownCapability,
9675
9712
  diskBuildersSetCapability,
9713
+ formatUnitQuantity,
9676
9714
  gpuDisplay,
9677
9715
  isCustomerSensitiveField,
9678
9716
  machineRebootCapability,
@@ -9686,6 +9724,7 @@ export {
9686
9724
  privateNetworkListCapability,
9687
9725
  privateNetworkShowCapability,
9688
9726
  privateNetworkUpdateCapability,
9727
+ reservationUnits,
9689
9728
  sshArguments,
9690
9729
  sshCommand,
9691
9730
  sshKeyAddCapability,
@@ -9695,6 +9734,7 @@ export {
9695
9734
  sshKeyDeleteCapability,
9696
9735
  sshKeyDeliveryStatus,
9697
9736
  sshKeyListCapability,
9737
+ unitsPerNode,
9698
9738
  volumeClearCapability,
9699
9739
  volumeCreateCapability,
9700
9740
  volumeDeleteCapability,