@ornncompute/cli 1.0.422 → 1.0.424

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.422",
3
+ "version": "1.0.424",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -116,10 +116,11 @@ function getEnrollmentHosts(request, id, signal) {
116
116
  ...signal ? { signal } : {}
117
117
  });
118
118
  }
119
- function launchEnrollmentRun(request, id, body) {
119
+ function launchEnrollmentRun(request, id, body, signal) {
120
120
  return request(`${root}/runs/${encodeURIComponent(id)}/launch`, {
121
121
  method: "POST",
122
- body
122
+ body,
123
+ ...signal ? { signal } : {}
123
124
  });
124
125
  }
125
126
  function getEnrollmentHost(request, id) {
@@ -127,10 +128,11 @@ function getEnrollmentHost(request, id) {
127
128
  method: "GET"
128
129
  });
129
130
  }
130
- function actOnEnrollmentHost(request, id, body) {
131
+ function actOnEnrollmentHost(request, id, body, signal) {
131
132
  return request(`${root}/hosts/${encodeURIComponent(id)}`, {
132
133
  method: "PATCH",
133
- body
134
+ body,
135
+ ...signal ? { signal } : {}
134
136
  });
135
137
  }
136
138
  function issueEnrollmentCredential(request, id) {
@@ -616,10 +616,11 @@ var root = "/v1/orchestrator/enrollment/configurable";
616
616
  function createEnrollmentRun(request, body2) {
617
617
  return request(`${root}/runs`, { method: "POST", body: body2 });
618
618
  }
619
- function launchEnrollmentRun(request, id, body2) {
619
+ function launchEnrollmentRun(request, id, body2, signal) {
620
620
  return request(`${root}/runs/${encodeURIComponent(id)}/launch`, {
621
621
  method: "POST",
622
- body: body2
622
+ body: body2,
623
+ ...signal ? { signal } : {}
623
624
  });
624
625
  }
625
626
 
@@ -4441,7 +4442,10 @@ import { z as z21 } from "zod";
4441
4442
  // ../../packages/capabilities/dist/capabilities/ssh-keys.js
4442
4443
  import { z as z20 } from "zod";
4443
4444
  async function activeReservationNodes(context, reservationId) {
4444
- const { nodes: nodes2 } = await listNodes(context.fetch, { reservation_id: reservationId });
4445
+ const { nodes: nodes2 } = await listNodes(context.fetch, {
4446
+ scope: "reservations",
4447
+ reservation_id: reservationId
4448
+ });
4445
4449
  return nodes2.filter((node) => node.status !== "terminated");
4446
4450
  }
4447
4451
  async function reservationKeyStatus(context, reservationId) {
@@ -5086,7 +5090,10 @@ var accessShowCapability = defineCapability({
5086
5090
  description: "Show VM and Bare Metal SSH access machines for a reservation.",
5087
5091
  mutation: "read",
5088
5092
  input: z21.object({ reservationId: z21.string() }),
5089
- execute: (ctx, input) => listNodes(ctx.fetch, { reservation_id: input.reservationId })
5093
+ execute: (ctx, input) => listNodes(ctx.fetch, {
5094
+ scope: "reservations",
5095
+ reservation_id: input.reservationId
5096
+ })
5090
5097
  });
5091
5098
  var accessActivateInput = z21.object({
5092
5099
  reservationId: z21.string(),
@@ -7234,6 +7241,7 @@ async function nodeIds(context, input) {
7234
7241
  if (input.machineId)
7235
7242
  return [input.machineId];
7236
7243
  const { nodes: nodes2 } = await listNodes(context.fetch, {
7244
+ scope: "reservations",
7237
7245
  reservation_id: input.reservationId
7238
7246
  });
7239
7247
  if (!nodes2.length)