@ornncompute/cli 1.0.321 → 1.0.323

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
@@ -57,7 +57,7 @@ still requires a user session. See the [customer guide](../../docs-site/api-keys
57
57
 
58
58
  ## Inference
59
59
 
60
- `ornn inference` covers model and listing discovery, completions, decisions, request history/usage, recorded
60
+ `ornn inference` covers model discovery, listing search and lookup by UUID, completions, decisions, request history/usage, recorded
61
61
  charges, and provider listing management through the shared capability catalog.
62
62
  `ornn admin inference` exposes staff listing, request, and charge operations after
63
63
  the standard staff preflight. Both use native gateway routes and existing auth.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.321",
3
+ "version": "1.0.323",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -14,6 +14,12 @@ function listInferenceListings(request, query3 = {}, signal) {
14
14
  signal
15
15
  });
16
16
  }
17
+ function getInferenceListing(request, listingId2, signal) {
18
+ return request(`/v1/inference/listings/${encodeURIComponent(listingId2)}`, {
19
+ method: "GET",
20
+ signal
21
+ });
22
+ }
17
23
  function postInference(fetcher, path6, body2, listingId2, signal) {
18
24
  return fetcher(path6, {
19
25
  method: "POST",
@@ -169,6 +175,7 @@ function defineStaffMcpCapability(spec) {
169
175
 
170
176
  // ../../packages/capabilities/dist/capabilities/inference.js
171
177
  var text = z2.string().min(1);
178
+ var apiType = z2.enum(inferenceApiTypes).optional();
172
179
  var timestamp = z2.iso.datetime({ offset: true });
173
180
  var limit = z2.coerce.number().int().min(1).max(100).optional();
174
181
  var listingId = z2.strictObject({ listing_id: z2.uuid() });
@@ -180,7 +187,7 @@ var rates = {
180
187
  };
181
188
  var createListing = z2.strictObject({
182
189
  public_model_id: text,
183
- api_type: z2.enum(inferenceApiTypes).optional(),
190
+ api_type: apiType,
184
191
  upstream_url: text,
185
192
  upstream_model: text,
186
193
  upstream_credential: z2.string().nullable().optional(),
@@ -208,6 +215,7 @@ var requests = z2.strictObject({
208
215
  });
209
216
  var chargeFields = {
210
217
  public_model_id: text.optional(),
218
+ model_listing_id: z2.uuid().optional(),
211
219
  request_id: z2.uuid().optional(),
212
220
  from: timestamp.optional(),
213
221
  to: timestamp.optional(),
@@ -293,7 +301,7 @@ async function readCharges(ctx, input) {
293
301
  return listInferenceCharges(ctx.fetch, query3);
294
302
  }
295
303
  var requestUsage = "[--request-id UUID] [--public-model-id ID] [--model-listing-id UUID] [--from TIME --to TIME] [--after CURSOR] [--limit 1-100] [--summary usage]";
296
- var chargeUsage = "[--public-model-id ID] [--request-id UUID] [--from TIME --to TIME] [--cursor CURSOR] [--limit 1-500] [--summary daily]";
304
+ var chargeUsage = "[--public-model-id ID] [--model-listing-id UUID] [--request-id UUID] [--from TIME --to TIME] [--cursor CURSOR] [--limit 1-500] [--summary daily]";
297
305
  var inferenceCapabilities = [
298
306
  operation({
299
307
  command: ["models", "list"],
@@ -304,10 +312,20 @@ var inferenceCapabilities = [
304
312
  operation({
305
313
  command: ["listings", "list"],
306
314
  description: "List active inference offers with their API format and token prices.",
307
- input: z2.strictObject({ public_model_id: text.optional() }),
308
- usage: "[--public-model-id ID]",
315
+ input: z2.strictObject({
316
+ public_model_id: text.optional(),
317
+ api_type: apiType
318
+ }),
319
+ usage: `[--public-model-id ID] [--api-type ${inferenceApiTypes.join("|")}]`,
309
320
  execute: (ctx, input) => listInferenceListings(ctx.fetch, input)
310
321
  }),
322
+ operation({
323
+ command: ["listings", "show"],
324
+ description: "Read an available inference offer and its current token prices by listing UUID.",
325
+ input: listingId,
326
+ usage: "--listing-id UUID",
327
+ execute: (ctx, { listing_id }) => getInferenceListing(ctx.fetch, listing_id)
328
+ }),
311
329
  operation({
312
330
  command: ["completions", "create"],
313
331
  description: "Call an inference model using a Chat Completions body. Generation parameters pass through unchanged. Spends the organization's credits; returns the upstream JSON response. MCP uses non-streaming responses.",