@ornncompute/cli 1.0.329 → 1.0.331

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
@@ -59,7 +59,7 @@ still requires a user session. See the [customer guide](../../docs-site/api-keys
59
59
 
60
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
- `ornn admin inference` exposes staff listing, request, and charge operations after
62
+ `ornn admin inference` exposes staff model, listing, request, and charge operations after
63
63
  the standard staff preflight. Both use native gateway routes and existing auth.
64
64
 
65
65
  See the [Inference guide](https://docs.ornn.com/inference#cli-and-mcp) for customer
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.329",
3
+ "version": "1.0.331",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1,3 +1,46 @@
1
+ // ../../packages/api-client/dist/authorization/paths.js
2
+ function withQuery(path6, values) {
3
+ const query3 = new URLSearchParams();
4
+ for (const [key, value] of Object.entries(values)) {
5
+ if (value !== void 0 && value !== null && value !== "")
6
+ query3.set(key, Array.isArray(value) ? value.join(",") : String(value));
7
+ }
8
+ return query3.size ? `${path6}?${query3}` : path6;
9
+ }
10
+
11
+ // ../../packages/api-client/dist/authorization/organizations.js
12
+ function listOrganizations(request, query3 = {}, signal) {
13
+ return request(withQuery("/v1/organizations", query3), { method: "GET", signal });
14
+ }
15
+ async function listSupplierOrganizations(request, signal) {
16
+ const rows = [];
17
+ for (let offset = 0; offset < 5e4; offset += 1e3) {
18
+ const page2 = await listOrganizations(request, { supplier: true, limit: 1e3, offset, sort: "created_at", direction: "asc" }, signal);
19
+ if (!Array.isArray(page2))
20
+ throw new Error("Invalid supplier directory response.");
21
+ rows.push(...page2);
22
+ if (page2.length < 1e3)
23
+ return rows;
24
+ }
25
+ throw new Error("The supplier directory is too large to load completely.");
26
+ }
27
+ function listInferenceProviders(request, ids, signal) {
28
+ return request(withQuery("/v1/organizations/inference-providers", { ids }), {
29
+ method: "GET",
30
+ signal
31
+ });
32
+ }
33
+
34
+ // ../../packages/api-client/dist/authorization/staff.js
35
+ function createStaffInvite(request, body2) {
36
+ return request("/v1/staff/invites", { method: "POST", body: body2 });
37
+ }
38
+
39
+ // ../../packages/api-client/dist/authorization/sessions.js
40
+ function getCliSession(request) {
41
+ return request("/v1/cli/session", { method: "GET" });
42
+ }
43
+
1
44
  // ../../packages/api-client/dist/inference/index.js
2
45
  var inferenceApiTypes = [
3
46
  "chat_completions",
@@ -63,6 +106,12 @@ function listProviderInferenceRequests(request, query3 = {}, signal) {
63
106
  signal
64
107
  });
65
108
  }
109
+ function renameStaffInferenceModel(request, modelId, body2) {
110
+ return request(`/v1/staff/inference/models/${encodeURIComponent(modelId)}`, {
111
+ method: "PATCH",
112
+ body: body2
113
+ });
114
+ }
66
115
  function listStaffInferenceListings(request, query3 = {}, signal) {
67
116
  return request(`/v1/staff/inference/listings${queryString(query3)}`, {
68
117
  method: "GET",
@@ -241,6 +290,8 @@ function cliInput(schema) {
241
290
  ctx.addIssue({ code: "custom", message: "Use named flags for this command." });
242
291
  return z2.NEVER;
243
292
  }
293
+ if (typeof fields.ids === "string")
294
+ fields.ids = fields.ids.split(",").map((id) => id.trim());
244
295
  if (typeof fields.body === "string") {
245
296
  try {
246
297
  fields.body = JSON.parse(fields.body);
@@ -326,6 +377,13 @@ var inferenceCapabilities = [
326
377
  usage: "--listing-id UUID",
327
378
  execute: (ctx, { listing_id }) => getInferenceListing(ctx.fetch, listing_id)
328
379
  }),
380
+ operation({
381
+ command: ["providers", "list"],
382
+ description: "Look up inference provider names by the organization IDs on their listings.",
383
+ input: z2.strictObject({ ids: z2.array(z2.uuid()).min(1) }),
384
+ usage: "--ids UUID[,UUID...]",
385
+ execute: (ctx, { ids }) => listInferenceProviders(ctx.fetch, ids)
386
+ }),
329
387
  operation({
330
388
  command: ["completions", "create"],
331
389
  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.",
@@ -429,6 +487,15 @@ var inferenceCapabilities = [
429
487
  execute: (ctx, { listing_id, body: body2 }) => staff ? updateStaffInferenceListing(ctx.fetch, listing_id, body2) : updateProviderInferenceListing(ctx.fetch, listing_id, body2)
430
488
  })
431
489
  ]),
490
+ operation({
491
+ command: ["models", "rename"],
492
+ staff: true,
493
+ write: true,
494
+ description: "Rename a catalog model across all its listings. Use the model_id from a managed listing.",
495
+ input: z2.strictObject({ model_id: z2.uuid(), public_model_id: text }),
496
+ usage: "--model-id UUID --public-model-id PUBLISHER/NAME",
497
+ execute: (ctx, { model_id, public_model_id }) => renameStaffInferenceModel(ctx.fetch, model_id, { public_model_id })
498
+ }),
432
499
  operation({
433
500
  command: ["requests", "list"],
434
501
  staff: true,
@@ -6719,43 +6786,6 @@ var evidenceCapabilities = [
6719
6786
  clusterLogsCapability
6720
6787
  ];
6721
6788
 
6722
- // ../../packages/api-client/dist/authorization/paths.js
6723
- function withQuery(path6, values) {
6724
- const query3 = new URLSearchParams();
6725
- for (const [key, value] of Object.entries(values)) {
6726
- if (value !== void 0 && value !== null && value !== "")
6727
- query3.set(key, Array.isArray(value) ? value.join(",") : String(value));
6728
- }
6729
- return query3.size ? `${path6}?${query3}` : path6;
6730
- }
6731
-
6732
- // ../../packages/api-client/dist/authorization/organizations.js
6733
- function listOrganizations(request, query3 = {}, signal) {
6734
- return request(withQuery("/v1/organizations", query3), { method: "GET", signal });
6735
- }
6736
- async function listSupplierOrganizations(request, signal) {
6737
- const rows = [];
6738
- for (let offset = 0; offset < 5e4; offset += 1e3) {
6739
- const page2 = await listOrganizations(request, { supplier: true, limit: 1e3, offset, sort: "created_at", direction: "asc" }, signal);
6740
- if (!Array.isArray(page2))
6741
- throw new Error("Invalid supplier directory response.");
6742
- rows.push(...page2);
6743
- if (page2.length < 1e3)
6744
- return rows;
6745
- }
6746
- throw new Error("The supplier directory is too large to load completely.");
6747
- }
6748
-
6749
- // ../../packages/api-client/dist/authorization/staff.js
6750
- function createStaffInvite(request, body2) {
6751
- return request("/v1/staff/invites", { method: "POST", body: body2 });
6752
- }
6753
-
6754
- // ../../packages/api-client/dist/authorization/sessions.js
6755
- function getCliSession(request) {
6756
- return request("/v1/cli/session", { method: "GET" });
6757
- }
6758
-
6759
6789
  // ../../packages/capabilities/dist/capabilities/fleet.js
6760
6790
  import { z as z29 } from "zod";
6761
6791
  var suppliersInput = z29.object({