@ornncompute/cli 1.0.328 → 1.0.330

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ornncompute/cli",
3
- "version": "1.0.328",
3
+ "version": "1.0.330",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -567,6 +567,22 @@ function listServicingRequirements(request, query = {}, signal) {
567
567
  signal
568
568
  });
569
569
  }
570
+ function attachmentPath(org, note) {
571
+ return `/v1/orchestrator/customer-profiles/${encodeURIComponent(org)}/requirements/${encodeURIComponent(note)}/attachment`;
572
+ }
573
+ function uploadSupplierNoteFile(fetcher, org, note, file) {
574
+ return fetcher(attachmentPath(org, note) + "?" + new URLSearchParams({ filename: file.name }), {
575
+ method: "PUT",
576
+ body: file,
577
+ headers: { "Content-Type": "application/octet-stream" }
578
+ });
579
+ }
580
+ function downloadSupplierNoteFile(fetcher, org, note, filename) {
581
+ return fetcher(attachmentPath(org, note) + "?" + new URLSearchParams({ filename }), {
582
+ method: "GET",
583
+ cache: "no-store"
584
+ });
585
+ }
570
586
 
571
587
  // ../../packages/api-client/dist/orchestrator/maintenance-history.js
572
588
  function listMaintenanceHistory(request, filter = {}, signal) {
@@ -1194,6 +1210,7 @@ export {
1194
1210
  deleteVirtualMachine,
1195
1211
  disksSocketPath,
1196
1212
  downloadDriveFile,
1213
+ downloadSupplierNoteFile,
1197
1214
  driveArchivePath,
1198
1215
  driveFilePath,
1199
1216
  driveFolderArchivePath,
@@ -1339,5 +1356,6 @@ export {
1339
1356
  updateSshBastion,
1340
1357
  updateVirtualMachineKeys,
1341
1358
  updateVirtualMachineRun,
1359
+ uploadSupplierNoteFile,
1342
1360
  verifyEnrollmentConnection
1343
1361
  };
@@ -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",
@@ -241,6 +284,8 @@ function cliInput(schema) {
241
284
  ctx.addIssue({ code: "custom", message: "Use named flags for this command." });
242
285
  return z2.NEVER;
243
286
  }
287
+ if (typeof fields.ids === "string")
288
+ fields.ids = fields.ids.split(",").map((id) => id.trim());
244
289
  if (typeof fields.body === "string") {
245
290
  try {
246
291
  fields.body = JSON.parse(fields.body);
@@ -326,6 +371,13 @@ var inferenceCapabilities = [
326
371
  usage: "--listing-id UUID",
327
372
  execute: (ctx, { listing_id }) => getInferenceListing(ctx.fetch, listing_id)
328
373
  }),
374
+ operation({
375
+ command: ["providers", "list"],
376
+ description: "Look up inference provider names by the organization IDs on their listings.",
377
+ input: z2.strictObject({ ids: z2.array(z2.uuid()).min(1) }),
378
+ usage: "--ids UUID[,UUID...]",
379
+ execute: (ctx, { ids }) => listInferenceProviders(ctx.fetch, ids)
380
+ }),
329
381
  operation({
330
382
  command: ["completions", "create"],
331
383
  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.",
@@ -6719,43 +6771,6 @@ var evidenceCapabilities = [
6719
6771
  clusterLogsCapability
6720
6772
  ];
6721
6773
 
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
6774
  // ../../packages/capabilities/dist/capabilities/fleet.js
6760
6775
  import { z as z29 } from "zod";
6761
6776
  var suppliersInput = z29.object({