@ornncompute/cli 1.0.437 → 1.0.439

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.439",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -20,6 +20,7 @@ const BOOLEAN_OPTIONS = new Set([
20
20
  "read-only",
21
21
  "read-write",
22
22
  "recursive",
23
+ "require-zero-data-retention",
23
24
  "retry",
24
25
  "tenant-access-revoked",
25
26
  "wait",
@@ -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",
@@ -67,14 +67,15 @@ var inferenceRoutingHeaders = {
67
67
  listing_id: "X-Ornn-Listing-Id",
68
68
  max_input_usd_per_million_tokens: "X-Ornn-Max-Input-USD-Per-Million-Tokens",
69
69
  max_cached_input_usd_per_million_tokens: "X-Ornn-Max-Cached-Input-USD-Per-Million-Tokens",
70
- max_output_usd_per_million_tokens: "X-Ornn-Max-Output-USD-Per-Million-Tokens"
70
+ max_output_usd_per_million_tokens: "X-Ornn-Max-Output-USD-Per-Million-Tokens",
71
+ require_zero_data_retention: "X-Ornn-Require-Zero-Data-Retention"
71
72
  };
72
73
  function postInference(fetcher, path6, body2, routing = {}, signal) {
73
74
  const headers = { "Content-Type": "application/json" };
74
75
  for (const key of Object.keys(inferenceRoutingHeaders)) {
75
76
  const value = routing[key];
76
77
  if (value !== void 0)
77
- headers[inferenceRoutingHeaders[key]] = value;
78
+ headers[inferenceRoutingHeaders[key]] = String(value);
78
79
  }
79
80
  return fetcher(path6, {
80
81
  method: "POST",
@@ -269,9 +270,10 @@ var generationRouting = {
269
270
  listing_id: z2.uuid().optional().describe("Pin an exact offer. Omit to choose by lowest input price, then lowest output price."),
270
271
  max_input_usd_per_million_tokens: priceCeiling,
271
272
  max_cached_input_usd_per_million_tokens: priceCeiling.describe("Inclusive cached-input ceiling. An offer without a cached rate uses its ordinary input rate."),
272
- max_output_usd_per_million_tokens: priceCeiling
273
+ max_output_usd_per_million_tokens: priceCeiling,
274
+ require_zero_data_retention: z2.boolean().optional().describe("Only use offers whose provider declares zero data retention.")
273
275
  };
274
- var generationUsage = "--body JSON [--listing-id UUID] [--max-input-usd-per-million-tokens RATE] [--max-cached-input-usd-per-million-tokens RATE] [--max-output-usd-per-million-tokens RATE]";
276
+ var generationUsage = "--body JSON [--listing-id UUID] [--max-input-usd-per-million-tokens RATE] [--max-cached-input-usd-per-million-tokens RATE] [--max-output-usd-per-million-tokens RATE] [--require-zero-data-retention]";
275
277
  var page = z2.strictObject({ after: text.optional(), limit });
276
278
  var rates = {
277
279
  provider_input_usd_per_million_tokens: z2.string().nullable().optional(),
@@ -1643,6 +1645,35 @@ function revokeControlplaneLicense(request, id) {
1643
1645
  // ../../packages/capabilities/dist/capabilities/staff-fleet.js
1644
1646
  import { z as z4 } from "zod";
1645
1647
 
1648
+ // ../../packages/capabilities/dist/compute-units.js
1649
+ var CPU_SLUG = "cpu";
1650
+ var CPU_DISPLAY = "CPU";
1651
+ var VCPUS_PER_CORE = 2;
1652
+ function isCpuNode(node) {
1653
+ return !node.gpu_type?.trim() && !((node.gpu_count ?? 0) > 0);
1654
+ }
1655
+ function isCpuSlug(slug) {
1656
+ return !slug?.trim() || slug === CPU_SLUG;
1657
+ }
1658
+ function capacityUnit(listing) {
1659
+ return isCpuSlug(listing.gpuSlug) ? "vcpu" : "gpu";
1660
+ }
1661
+ function unitsPerNode(listing) {
1662
+ if (isCpuSlug(listing.gpuSlug))
1663
+ return Math.max(0, listing.coresPerNode ?? 0) * VCPUS_PER_CORE;
1664
+ return Math.max(0, listing.gpusPerNode ?? 0);
1665
+ }
1666
+ function reservationUnits(reservation) {
1667
+ return reservation.reservedGpuCount > 0 ? reservation.reservedGpuCount : Math.max(0, reservation.cores ?? 0) * VCPUS_PER_CORE;
1668
+ }
1669
+ function unitName(unit, count = 2) {
1670
+ const name2 = unit === "vcpu" ? "vCPU" : "GPU";
1671
+ return count === 1 ? name2 : `${name2}s`;
1672
+ }
1673
+ function formatUnitQuantity(count, unit) {
1674
+ return `${count.toLocaleString("en-US")} ${unitName(unit, count)}`;
1675
+ }
1676
+
1646
1677
  // ../../packages/capabilities/dist/capabilities/staff-shared.js
1647
1678
  function adminCli(path6, outcome, usage, options) {
1648
1679
  const command = ["admin", ...path6];
@@ -1773,7 +1804,7 @@ var nodeTestTriggerCapability = defineStaffMcpCapability({
1773
1804
  id: "node.test-trigger",
1774
1805
  domain: "fleet",
1775
1806
  roles: ["admin"],
1776
- description: "Internal staff only: start a node job (host checks + GPU suites; optional burn-in minutes).",
1807
+ 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
1808
  mutation: "preview-confirm",
1778
1809
  cli: {
1779
1810
  command: ["admin", "nodes", "test"],
@@ -1801,13 +1832,24 @@ var nodeTestTriggerCapability = defineStaffMcpCapability({
1801
1832
  const body2 = {
1802
1833
  node_id: parsed.nodeId,
1803
1834
  constraints,
1804
- burn_time_minutes: parsed.burnTimeMinutes ?? 0
1835
+ burn_time_minutes: parsed.burnTimeMinutes ?? 0,
1836
+ ...await cpuNodeValidation(ctx.fetch, parsed.nodeId)
1805
1837
  };
1806
1838
  if (!ctx.confirmed)
1807
1839
  return preview("node.test-trigger", body2);
1808
1840
  return createJob(ctx.fetch, body2);
1809
1841
  }
1810
1842
  });
1843
+ async function cpuNodeValidation(fetch, nodeId3) {
1844
+ return isCpuNode(await getNode(fetch, nodeId3)) ? {
1845
+ validation: {
1846
+ profile: "standard",
1847
+ individual_tests: true,
1848
+ gemm_minutes: 0,
1849
+ cpu_node: true
1850
+ }
1851
+ } : {};
1852
+ }
1811
1853
  var nodeTestResultInput = z4.object({
1812
1854
  jobId: z4.string()
1813
1855
  });
@@ -2659,21 +2701,6 @@ import { z as z11 } from "zod";
2659
2701
 
2660
2702
  // ../../packages/capabilities/dist/capabilities/native-listing.js
2661
2703
  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
2704
  var nativeTermFields = {
2678
2705
  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
2706
  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 +3379,10 @@ function bindHardwareFields(terms, input, fields) {
3352
3379
  delete payload[field];
3353
3380
  continue;
3354
3381
  }
3382
+ if (kind === "gpu" && value.trim().toLowerCase() === CPU_SLUG) {
3383
+ payload[field] = CPU_SLUG;
3384
+ continue;
3385
+ }
3355
3386
  const resolved = resolveCatalogTerm(terms, kind, value);
3356
3387
  const bound = kind === "gpu" ? resolved.canonical : resolved.display;
3357
3388
  if (bound) {
@@ -3412,7 +3443,7 @@ var marketBooksCapability = defineCapability({
3412
3443
  input: marketBooksInput,
3413
3444
  cli: {
3414
3445
  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)
3446
+ 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
3447
  },
3417
3448
  execute: async (ctx, input) => {
3418
3449
  const parsed = marketBooksInput.parse(input);
@@ -3433,7 +3464,7 @@ var marketBookCapability = defineCapability({
3433
3464
  input: marketBookInput,
3434
3465
  cli: {
3435
3466
  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"])
3467
+ 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
3468
  },
3438
3469
  execute: async (ctx, input) => {
3439
3470
  const parsed = marketBookInput.parse(input);
@@ -3449,7 +3480,7 @@ var marketTradesCapability = defineCapability({
3449
3480
  input: marketBookInput,
3450
3481
  cli: {
3451
3482
  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"])
3483
+ 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
3484
  },
3454
3485
  execute: async (ctx, input) => {
3455
3486
  const parsed = marketBookInput.parse(input);
@@ -3471,7 +3502,7 @@ var marketQuoteCapability = defineCapability({
3471
3502
  input: marketQuoteInput,
3472
3503
  cli: {
3473
3504
  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"])
3505
+ 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
3506
  },
3476
3507
  execute: async (ctx, input) => {
3477
3508
  const parsed = marketQuoteInput.parse(input);
@@ -3545,7 +3576,7 @@ var marketBidCapability = defineCapability({
3545
3576
  command: ["market", "bid"],
3546
3577
  input: marketBidCliInput,
3547
3578
  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"])
3579
+ 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
3580
  },
3550
3581
  execute: async (ctx, input) => executeMarketBid(ctx, marketBidInput.parse(input))
3551
3582
  });
@@ -4122,7 +4153,11 @@ var adminNodeDiagnoseCapability = defineCapability({
4122
4153
  input: adminNodeDiagnoseInput,
4123
4154
  execute: async (ctx, input) => {
4124
4155
  const parsed = adminNodeDiagnoseInput.parse(input);
4125
- const body2 = { node_id: parsed.node_id, burn_time_minutes: 0 };
4156
+ const body2 = {
4157
+ node_id: parsed.node_id,
4158
+ burn_time_minutes: 0,
4159
+ ...await cpuNodeValidation(ctx.fetch, parsed.node_id)
4160
+ };
4126
4161
  if (!ctx.confirmed) {
4127
4162
  return {
4128
4163
  action: "node.diagnose",
@@ -7722,7 +7757,10 @@ var listListingsCapability = defineCapability({
7722
7757
  parameters: {
7723
7758
  type: "object",
7724
7759
  properties: {
7725
- gpu: { type: "string", description: "Catalog GPU term such as H100 or NVIDIA H100." },
7760
+ gpu: {
7761
+ type: "string",
7762
+ description: "Catalog GPU term such as H100 or NVIDIA H100, or cpu for CPU capacity."
7763
+ },
7726
7764
  cpu: { type: "string", description: "Catalog CPU term such as Xeon or EPYC." },
7727
7765
  site: { type: "string", description: "Location / facility filter such as Dallas." },
7728
7766
  fabric: { type: "string", description: "Catalog link term such as XDR or NDR." },
@@ -9664,6 +9702,7 @@ export {
9664
9702
  bucketShowCapability,
9665
9703
  bucketUpdateCredentialsCapability,
9666
9704
  bucketVerifyCapability,
9705
+ capacityUnit,
9667
9706
  catalog,
9668
9707
  clusterAddNodeCapability,
9669
9708
  clusterCreateCapability,
@@ -9673,6 +9712,7 @@ export {
9673
9712
  clusterShowCapability,
9674
9713
  clusterTeardownCapability,
9675
9714
  diskBuildersSetCapability,
9715
+ formatUnitQuantity,
9676
9716
  gpuDisplay,
9677
9717
  isCustomerSensitiveField,
9678
9718
  machineRebootCapability,
@@ -9686,6 +9726,7 @@ export {
9686
9726
  privateNetworkListCapability,
9687
9727
  privateNetworkShowCapability,
9688
9728
  privateNetworkUpdateCapability,
9729
+ reservationUnits,
9689
9730
  sshArguments,
9690
9731
  sshCommand,
9691
9732
  sshKeyAddCapability,
@@ -9695,6 +9736,7 @@ export {
9695
9736
  sshKeyDeleteCapability,
9696
9737
  sshKeyDeliveryStatus,
9697
9738
  sshKeyListCapability,
9739
+ unitsPerNode,
9698
9740
  volumeClearCapability,
9699
9741
  volumeCreateCapability,
9700
9742
  volumeDeleteCapability,