@ornncompute/cli 1.0.400 → 1.0.402

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
@@ -148,7 +148,7 @@ Market commands call one gateway route each and print that route's JSON.
148
148
  `capacity-offers list|show|terms` reads native Commerce capacity
149
149
  (`/commerce/v2/listings*`). List/show return parent fields with `capacityListingId`;
150
150
  pass it as `--listing-id`. `terms` separately returns advertised financial choices
151
- with `listingTermsId`, type, price, down payment and renewable flag.
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
154
  as windows of free GPUs and the whole machines those GPUs make
@@ -190,7 +190,7 @@ customer and takes `--organization-id UUID`, `--listing-id UUID`,
190
190
  `--listing-term-id UUID`, `--nodes COUNT`, `--starts-at TIME`, `--ends-at TIME`,
191
191
  `--price-per-gpu-hour-micro-usd N`, and `--idempotency-key KEY`. The window is
192
192
  whole seconds, at least an hour, and ends no later than the listing. The term is
193
- non-renewable Reserved, and the price is the term's.
193
+ Reserved, and the price is the term's.
194
194
  Reuse the key and payload on retries. This booking command requires an eligible
195
195
  human terminal.
196
196
 
@@ -209,11 +209,10 @@ of `--gpus-per-node`; its term prices are per vCPU-hour. Give
209
209
  `--capacity-node-count`, or `--node-ids` (a JSON array) to attach nodes at creation; the count then defaults to the number of nodes.
210
210
  Primary capacity takes both `--available-at` and `--available-until`, or
211
211
  neither. Reuse the key and the same body on retries. Prices are integer
212
- micro-USD inside terms, with a nullable deposit, renewable flag (Spot and
213
- renewable Reserved terms sell by the hour; other Reserved terms sell a window),
214
- optional Spot `preemptNoticeSeconds`, and an optional
215
- `horizon` in hours on renewable Reserved terms: how far ahead the term can be
216
- held and the notice its reservations get when the supplier stops.
212
+ micro-USD inside terms, with a nullable deposit and optional Spot
213
+ `preemptNoticeSeconds`. Spot terms sell by the hour; Reserved terms sell a
214
+ window and, on VM listings, also by the hour until the buyer stops or the
215
+ listing ends.
217
216
  `ornn admin capacity-offers update` edits a selected term using `--listing-id`,
218
217
  `--listing-terms-id`, the complete term fields and `--idempotency-key`. Financial
219
218
  editing remains staff-only. The old customer `capacity-offers update` is removed.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.400",
3
+ "version": "1.0.402",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -2621,7 +2621,7 @@ function listOffers(request, filter = {}, signal) {
2621
2621
  import { z as z11 } from "zod";
2622
2622
 
2623
2623
  // ../../packages/capabilities/dist/capabilities/native-listing.js
2624
- import { z as z10 } from "zod";
2624
+ import { z as z9 } from "zod";
2625
2625
 
2626
2626
  // ../../packages/capabilities/dist/compute-units.js
2627
2627
  var CPU_SLUG = "cpu";
@@ -2636,48 +2636,19 @@ function unitsPerNode(listing) {
2636
2636
  return Math.max(0, listing.gpusPerNode ?? 0);
2637
2637
  }
2638
2638
 
2639
- // ../../packages/capabilities/dist/capabilities/market-shared.js
2640
- import { z as z9 } from "zod";
2641
- var positionals = z9.array(z9.string()).max(0).default([]);
2642
- var microUsd = z9.coerce.number().int().positive();
2643
- var flag = z9.preprocess((value) => value === "true" ? true : value === "false" ? false : value, z9.boolean());
2644
- function resolveIdempotencyKey(ctx, supplied) {
2645
- return ctx.cli?.interaction?.idempotencyKey(supplied) ?? supplied?.trim();
2646
- }
2647
- async function consent(ctx, action, title, terms, payload) {
2648
- const interaction = ctx.cli?.interaction;
2649
- if (interaction) {
2650
- if (await interaction.review({ title, terms }))
2651
- return null;
2652
- return interaction.result({
2653
- data: null,
2654
- errors: [{ code: "action_declined", message: "No changes were made.", retryable: false }],
2655
- exitCode: 1,
2656
- outcome: { class: "ended", phase: "declined" },
2657
- presentation: { lines: ["No changes were made."] }
2658
- });
2659
- }
2660
- return ctx.confirmed ? null : preview(action, payload);
2661
- }
2662
- function microUsdLabel(value) {
2663
- return typeof value === "number" && Number.isFinite(value) ? `$${(value / 1e6).toFixed(2)} per GPU-hour (vCPU-hour on CPU capacity)` : "market";
2664
- }
2665
-
2666
2639
  // ../../packages/capabilities/dist/capabilities/native-listing.js
2667
2640
  var nativeTermFields = {
2668
- frontendNetwork: z10.string().trim().min(1).refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional(),
2669
- backendNetwork: z10.string().trim().min(1).refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional(),
2670
- network: z10.string().refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional().describe("Reserved network and interconnect for this choice. Immutable per term ID; create a new term for a different network."),
2671
- type: z10.enum(["reserved", "spot"]).nullable().optional(),
2672
- pricePerGpuHourMicroUsd: z10.coerce.number().int().positive().describe("Micro-USD per unit-hour: per GPU, or per vCPU on CPU capacity."),
2673
- downPaymentCents: z10.coerce.number().int().nonnegative().nullable().optional(),
2674
- renewable: flag.describe("Spot and renewable Reserved terms sell by the hour; a non-renewable Reserved term sells a window."),
2675
- preemptNoticeSeconds: z10.coerce.number().int().nonnegative().optional(),
2676
- horizon: z10.coerce.number().int().min(1).max(87600).nullable().optional().describe("Renewable Reserved terms only: hours ahead of now the term can be held, and the notice its reservations get when the supplier stops. Omit for no rolling limit.")
2641
+ 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(),
2642
+ 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(),
2643
+ network: z9.string().refine((value) => new TextEncoder().encode(value).length <= 1024, "Network must be at most 1024 UTF-8 bytes.").nullable().optional().describe("Reserved network and interconnect for this choice. Immutable per term ID; create a new term for a different network."),
2644
+ type: z9.enum(["reserved", "spot"]).nullable().optional().describe("Spot sells by the hour. Reserved sells a window and, on VM listings, also by the hour until the buyer stops or the listing ends."),
2645
+ pricePerGpuHourMicroUsd: z9.coerce.number().int().positive().describe("Micro-USD per unit-hour: per GPU, or per vCPU on CPU capacity."),
2646
+ downPaymentCents: z9.coerce.number().int().nonnegative().nullable().optional(),
2647
+ preemptNoticeSeconds: z9.coerce.number().int().nonnegative().optional()
2677
2648
  };
2678
- var nativeTermInput = z10.object(nativeTermFields).strict();
2649
+ var nativeTermInput = z9.object(nativeTermFields).strict();
2679
2650
  function jsonArray(item) {
2680
- return z10.preprocess((value) => {
2651
+ return z9.preprocess((value) => {
2681
2652
  if (typeof value !== "string")
2682
2653
  return value;
2683
2654
  try {
@@ -2685,39 +2656,39 @@ function jsonArray(item) {
2685
2656
  } catch {
2686
2657
  return value;
2687
2658
  }
2688
- }, z10.array(item));
2659
+ }, z9.array(item));
2689
2660
  }
2690
2661
  var nativeTermsInput = jsonArray(nativeTermInput);
2691
2662
  var listingWriteControls = {
2692
- confirm: z10.boolean().optional(),
2693
- idempotencyKey: z10.string().min(1).max(200)
2663
+ confirm: z9.boolean().optional(),
2664
+ idempotencyKey: z9.string().min(1).max(200)
2694
2665
  };
2695
- var listingLocation = z10.string().trim().min(1).max(256).optional().describe("Instead of facilityId: a state, city, address, or catalog region such as us-west-3. Ornn places it in a catalog region and uses the supplier's facility there.");
2666
+ var listingLocation = z9.string().trim().min(1).max(256).optional().describe("Instead of facilityId: a state, city, address, or catalog region such as us-west-3. Ornn places it in a catalog region and uses the supplier's facility there.");
2696
2667
  var CPU_CORES_MESSAGE = "CPU capacity is sold in whole cores (2 vCPUs each).";
2697
- var coresPerNode = z10.coerce.number().int(CPU_CORES_MESSAGE).min(1, CPU_CORES_MESSAGE).nullable().optional().describe("CPU capacity only: cores per node (2 vCPUs each), priced per vCPU-hour.");
2698
- var nativeListingCreateInput = z10.object({
2699
- organizationId: z10.string().uuid().nullable().optional(),
2700
- kind: z10.enum(["primary", "secondary"]).default("primary"),
2701
- gpuSlug: z10.string().min(1).nullable().describe('Catalog GPU slug; null or "cpu" lists CPU capacity sold per vCPU-hour.'),
2702
- gpusPerNode: z10.coerce.number().int().nonnegative().optional().describe("GPUs per node; 0 or omitted on CPU capacity."),
2668
+ var coresPerNode = z9.coerce.number().int(CPU_CORES_MESSAGE).min(1, CPU_CORES_MESSAGE).nullable().optional().describe("CPU capacity only: cores per node (2 vCPUs each), priced per vCPU-hour.");
2669
+ var nativeListingCreateInput = z9.object({
2670
+ organizationId: z9.string().uuid().nullable().optional(),
2671
+ kind: z9.enum(["primary", "secondary"]).default("primary"),
2672
+ gpuSlug: z9.string().min(1).nullable().describe('Catalog GPU slug; null or "cpu" lists CPU capacity sold per vCPU-hour.'),
2673
+ gpusPerNode: z9.coerce.number().int().nonnegative().optional().describe("GPUs per node; 0 or omitted on CPU capacity."),
2703
2674
  coresPerNode,
2704
- capacityNodeCount: z10.coerce.number().int().positive().optional().describe("Defaults to the number of nodeIds."),
2705
- nodeIds: jsonArray(z10.string().uuid()).optional(),
2706
- facilityId: z10.string().uuid().optional(),
2675
+ capacityNodeCount: z9.coerce.number().int().positive().optional().describe("Defaults to the number of nodeIds."),
2676
+ nodeIds: jsonArray(z9.string().uuid()).optional(),
2677
+ facilityId: z9.string().uuid().optional(),
2707
2678
  location: listingLocation,
2708
- provisioningType: z10.enum(["bare-metal", "virtual-machine"]),
2709
- state: z10.enum(["draft", "available"]),
2710
- availableAt: z10.iso.datetime({ offset: true }).nullable().optional().describe("Primary capacity takes both availableAt and availableUntil, or neither."),
2711
- availableUntil: z10.iso.datetime({ offset: true }).nullable().optional(),
2712
- cpu: z10.string().optional(),
2713
- ram: z10.string().optional(),
2714
- dataStorage: z10.string().optional().describe("Data storage per node."),
2715
- bootStorage: z10.string().optional().describe("Boot storage per node."),
2716
- frontendNetwork: z10.string().optional().describe("Front-end network per node."),
2717
- backendNetwork: z10.string().optional().describe("Back-end network per node."),
2718
- storage: z10.string().optional(),
2719
- fabricType: z10.string().optional(),
2720
- internet: z10.string().optional(),
2679
+ provisioningType: z9.enum(["bare-metal", "virtual-machine"]),
2680
+ state: z9.enum(["draft", "available"]),
2681
+ availableAt: z9.iso.datetime({ offset: true }).nullable().optional().describe("Primary capacity takes both availableAt and availableUntil, or neither."),
2682
+ availableUntil: z9.iso.datetime({ offset: true }).nullable().optional(),
2683
+ cpu: z9.string().optional(),
2684
+ ram: z9.string().optional(),
2685
+ dataStorage: z9.string().optional().describe("Data storage per node."),
2686
+ bootStorage: z9.string().optional().describe("Boot storage per node."),
2687
+ frontendNetwork: z9.string().optional().describe("Front-end network per node."),
2688
+ backendNetwork: z9.string().optional().describe("Back-end network per node."),
2689
+ storage: z9.string().optional(),
2690
+ fabricType: z9.string().optional(),
2691
+ internet: z9.string().optional(),
2721
2692
  terms: nativeTermsInput,
2722
2693
  ...listingWriteControls
2723
2694
  }).strict().refine((value) => Boolean(value.facilityId) !== Boolean(value.location), {
@@ -2756,27 +2727,54 @@ var nativeListingCreateInput = z10.object({
2756
2727
  });
2757
2728
  });
2758
2729
  var nativeListingUpdateFields = {
2759
- state: z10.enum(["draft", "available", "delisted"]).optional(),
2760
- nodeCount: z10.coerce.number().int().positive().optional(),
2761
- gpuSlug: z10.string().min(1).nullable().optional().describe('Catalog GPU slug; null or "cpu" for CPU capacity.'),
2762
- gpusPerNode: z10.coerce.number().int().nonnegative().optional(),
2730
+ state: z9.enum(["draft", "available", "delisted"]).optional(),
2731
+ nodeCount: z9.coerce.number().int().positive().optional(),
2732
+ gpuSlug: z9.string().min(1).nullable().optional().describe('Catalog GPU slug; null or "cpu" for CPU capacity.'),
2733
+ gpusPerNode: z9.coerce.number().int().nonnegative().optional(),
2763
2734
  coresPerNode,
2764
- facilityId: z10.string().uuid().optional(),
2735
+ facilityId: z9.string().uuid().optional(),
2765
2736
  location: listingLocation,
2766
- provisioningType: z10.enum(["bare-metal", "virtual-machine"]).optional(),
2767
- availableAt: z10.iso.datetime({ offset: true }).optional(),
2768
- availableUntil: z10.iso.datetime({ offset: true }).nullable().optional(),
2769
- cpu: z10.string().optional(),
2770
- ram: z10.string().optional(),
2771
- dataStorage: z10.string().optional(),
2772
- bootStorage: z10.string().optional(),
2773
- frontendNetwork: z10.string().optional(),
2774
- backendNetwork: z10.string().optional(),
2775
- storage: z10.string().optional(),
2776
- fabricType: z10.string().optional(),
2777
- internet: z10.string().optional()
2737
+ provisioningType: z9.enum(["bare-metal", "virtual-machine"]).optional(),
2738
+ availableAt: z9.iso.datetime({ offset: true }).optional(),
2739
+ availableUntil: z9.iso.datetime({ offset: true }).nullable().optional(),
2740
+ cpu: z9.string().optional(),
2741
+ ram: z9.string().optional(),
2742
+ dataStorage: z9.string().optional(),
2743
+ bootStorage: z9.string().optional(),
2744
+ frontendNetwork: z9.string().optional(),
2745
+ backendNetwork: z9.string().optional(),
2746
+ storage: z9.string().optional(),
2747
+ fabricType: z9.string().optional(),
2748
+ internet: z9.string().optional()
2778
2749
  };
2779
2750
 
2751
+ // ../../packages/capabilities/dist/capabilities/market-shared.js
2752
+ import { z as z10 } from "zod";
2753
+ var positionals = z10.array(z10.string()).max(0).default([]);
2754
+ var microUsd = z10.coerce.number().int().positive();
2755
+ var flag = z10.preprocess((value) => value === "true" ? true : value === "false" ? false : value, z10.boolean());
2756
+ function resolveIdempotencyKey(ctx, supplied) {
2757
+ return ctx.cli?.interaction?.idempotencyKey(supplied) ?? supplied?.trim();
2758
+ }
2759
+ async function consent(ctx, action, title, terms, payload) {
2760
+ const interaction = ctx.cli?.interaction;
2761
+ if (interaction) {
2762
+ if (await interaction.review({ title, terms }))
2763
+ return null;
2764
+ return interaction.result({
2765
+ data: null,
2766
+ errors: [{ code: "action_declined", message: "No changes were made.", retryable: false }],
2767
+ exitCode: 1,
2768
+ outcome: { class: "ended", phase: "declined" },
2769
+ presentation: { lines: ["No changes were made."] }
2770
+ });
2771
+ }
2772
+ return ctx.confirmed ? null : preview(action, payload);
2773
+ }
2774
+ function microUsdLabel(value) {
2775
+ return typeof value === "number" && Number.isFinite(value) ? `$${(value / 1e6).toFixed(2)} per GPU-hour (vCPU-hour on CPU capacity)` : "market";
2776
+ }
2777
+
2780
2778
  // ../../packages/capabilities/dist/capabilities/admin-capacity-reservations.js
2781
2779
  function adminHelp(outcome, human, automation, review) {
2782
2780
  return {
@@ -2793,7 +2791,7 @@ var adminCapacityOffersCreateCapability = defineCapability({
2793
2791
  id: "listing.create",
2794
2792
  domain: "listings",
2795
2793
  roles: ["admin"],
2796
- description: "Create native capacity with an organization, a facilityId or a location, hardware, availability and advertised terms. A location is any state, city, address, or catalog region (us-west-3); Ornn places it in a catalog region and uses the organization's facility there. Primary capacity takes both availableAt and availableUntil, or neither. A renewable Reserved term's horizon is the hours it can be held ahead of now and its stop notice. nodeIds attach nodes at creation. Returns {listing, terms}. Requires an idempotencyKey reused on retries and confirm: true.",
2794
+ description: "Create native capacity with an organization, a facilityId or a location, hardware, availability and advertised terms. A location is any state, city, address, or catalog region (us-west-3); Ornn places it in a catalog region and uses the organization's facility there. Primary capacity takes both availableAt and availableUntil, or neither. nodeIds attach nodes at creation. Returns {listing, terms}. Requires an idempotencyKey reused on retries and confirm: true.",
2797
2795
  mutation: "preview-confirm",
2798
2796
  input: nativeListingCreateInput,
2799
2797
  cli: {
@@ -2818,7 +2816,7 @@ var wholeSecondInstant = z11.iso.datetime({ offset: true }).refine((value) => !/
2818
2816
  var reservationCreateInput = z11.object({
2819
2817
  organizationId: z11.string().uuid().describe("The customer organization the window is booked for."),
2820
2818
  listingId: z11.string().uuid().describe("The listing's capacityListingId. Staff may book any available listing."),
2821
- listingTermId: z11.string().uuid().describe("The listingTermsId of a non-renewable Reserved term on that listing."),
2819
+ listingTermId: z11.string().uuid().describe("The listingTermsId of a Reserved term on that listing."),
2822
2820
  nodes: z11.number().int().positive().max(2147483647).describe("Whole nodes to book."),
2823
2821
  startsAt: wholeSecondInstant.describe("RFC 3339 start of the window in whole seconds, no more than five minutes ago."),
2824
2822
  endsAt: wholeSecondInstant.describe("RFC 3339 end of the window in whole seconds, at least an hour after the start and no later than the listing's end."),
@@ -2846,7 +2844,7 @@ var adminReservationsCreateCapability = defineCapability({
2846
2844
  });
2847
2845
  var directDeliveryInput = z11.strictObject({
2848
2846
  organizationId: z11.uuid().describe("The customer organization receiving the reservation."),
2849
- listingTermId: z11.uuid().describe("A non-renewable Reserved term on the draft primary listing."),
2847
+ listingTermId: z11.uuid().describe("A Reserved term on the draft primary listing."),
2850
2848
  nodeIds: z11.array(z11.uuid()).min(1).max(5e3).describe("One or more selected node IDs attached to the draft listing."),
2851
2849
  startsAt: wholeSecondInstant.describe("RFC 3339 start in whole seconds, with a timezone."),
2852
2850
  endsAt: wholeSecondInstant.describe("RFC 3339 end in whole seconds, at least an hour after the start and no later than the listing's end."),
@@ -2864,7 +2862,7 @@ var adminReservationDirectDeliveryCapability = defineCapability({
2864
2862
  id: directDeliveryCapabilityId,
2865
2863
  domain: "reservations",
2866
2864
  roles: ["admin"],
2867
- description: "Reserve one or more selected nodes for a customer off the market. Use attached nodes from a draft primary VM or Bare Metal listing and a non-renewable Reserved term. Other nodes on the same draft can serve separate reservations. Creates the reservation immediately, even with a future start. Reuse the transactionId and inputs after an uncertain response. Returns the saved reservation.",
2865
+ description: "Reserve one or more selected nodes for a customer off the market. Use attached nodes from a draft primary VM or Bare Metal listing and a Reserved term. Other nodes on the same draft can serve separate reservations. Creates the reservation immediately, even with a future start. Reuse the transactionId and inputs after an uncertain response. Returns the saved reservation.",
2868
2866
  mutation: "preview-confirm",
2869
2867
  cli: {
2870
2868
  command: ["admin", "reservations", "direct-delivery"],
@@ -2963,7 +2961,7 @@ var listingTermsCapability = defineCapability({
2963
2961
  id: "listings.terms",
2964
2962
  domain: "listings",
2965
2963
  roles: ["user"],
2966
- description: "Read a capacity listing's advertised financial terms. Each term returns listingTermsId, capacityListingId, type, pricePerGpuHourMicroUsd, downPaymentCents and renewable: Spot and renewable Reserved terms sell by the hour, other Reserved terms sell a window. Use the parent's capacityListingId as listingId. Prices are gross integer micro-USD per GPU-hour (per vCPU-hour on CPU capacity), the price reservations.purchase expects.",
2964
+ description: "Read a capacity listing's advertised financial terms. Each term returns listingTermsId, capacityListingId, type, pricePerGpuHourMicroUsd and downPaymentCents. Spot terms sell by the hour. Reserved terms sell a window and, on VM listings, also by the hour until the buyer stops or the listing ends. Use the parent's capacityListingId as listingId. Prices are gross integer micro-USD per GPU-hour (per vCPU-hour on CPU capacity), the price reservations.purchase expects.",
2967
2965
  mutation: "read",
2968
2966
  input: listingShowInput,
2969
2967
  cli: {
@@ -3050,7 +3048,7 @@ var listingUpdateCapability = defineCapability({
3050
3048
  cli: {
3051
3049
  command: ["admin", "capacity-offers", "update"],
3052
3050
  vnext: {
3053
- ...help("Edit one advertised financial term as staff.", "ornn admin capacity-offers update --listing-id UUID --listing-terms-id UUID --price-per-gpu-hour-micro-usd RATE --renewable true|false --idempotency-key KEY [--type reserved|spot] [--down-payment-cents CENTS]", "Requires an eligible human terminal; reuse --idempotency-key on retries.", ["capacity-offers terms"], 25),
3051
+ ...help("Edit one advertised financial term as staff.", "ornn admin capacity-offers update --listing-id UUID --listing-terms-id UUID --price-per-gpu-hour-micro-usd RATE --idempotency-key KEY [--type reserved|spot] [--down-payment-cents CENTS]", "Requires an eligible human terminal; reuse --idempotency-key on retries.", ["capacity-offers terms"], 25),
3054
3052
  audience: "admin"
3055
3053
  }
3056
3054
  },
@@ -7698,7 +7696,6 @@ function primaryListingBody(input, pricePerGpuHourMicroUsd, downPaymentCents) {
7698
7696
  terms: [
7699
7697
  {
7700
7698
  type: "reserved",
7701
- renewable: false,
7702
7699
  pricePerGpuHourMicroUsd,
7703
7700
  downPaymentCents
7704
7701
  }