@ornncompute/cli 1.0.62 → 1.0.64

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.62",
3
+ "version": "1.0.64",
4
4
  "description": "Command-line interface for Ornn compute access workflows.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -498,7 +498,7 @@ function enrollmentProgressTransport(fetch, runtime, privateKey) {
498
498
  }
499
499
  return minted;
500
500
  }
501
- if (path !== "/internal/remote" || !tokenId) return request(path, init);
501
+ if (path !== "/remote" || !tokenId) return request(path, init);
502
502
 
503
503
  const remote = request(path, init).then(
504
504
  (value) => ({ ok: true, value }),
@@ -155,7 +155,7 @@ function reviewFields(target) {
155
155
  }
156
156
 
157
157
  async function prepareTarget(input, runtime, fetch) {
158
- const payload = await fetch(`/internal/nodes/${encodeURIComponent(input.node_id)}`, {
158
+ const payload = await fetch(`/nodes/${encodeURIComponent(input.node_id)}`, {
159
159
  method: "GET",
160
160
  ...(runtime.signal ? { signal: runtime.signal } : {}),
161
161
  });
@@ -262,7 +262,7 @@ function isNotFound(error) {
262
262
 
263
263
  async function readNodeById(fetch, id, { allowMissing = false, signal } = {}) {
264
264
  try {
265
- return await fetch(`/internal/nodes/${encodeURIComponent(id)}`, {
265
+ return await fetch(`/nodes/${encodeURIComponent(id)}`, {
266
266
  method: "GET",
267
267
  ...(signal ? { signal } : {}),
268
268
  });
@@ -187,7 +187,7 @@ export const adminNodeEnrollCapability = defineCapability({
187
187
  roles: ["admin"],
188
188
  description: "Enroll one explicit node over SSH with an explicit supplier and facility assignment.",
189
189
  mutation: "preview-confirm",
190
- http: { method: "POST", path: "/internal/remote" },
190
+ http: { method: "POST", path: "/remote" },
191
191
  cli: {
192
192
  command: ["admin", "nodes", "enroll"],
193
193
  vnext: adminHelp(["admin", "nodes", "enroll"], "Install Ornn management on one explicitly assigned node.", "ornn admin nodes enroll <node-id> --host HOST --supplier UUID --facility UUID [--filter COMPARTMENT_IDS] --identity-file PATH --token-ttl SECONDS --replace-existing-management [--verbose] [--yes]", "Unsupported: remote enrollment requires an eligible human terminal.", ["canonical node UUID", "canonical supplier organization UUID", "canonical facility UUID"], "Review node identity, SSH target, assignment, compartment filter, and replacement of existing management."),
@@ -234,7 +234,7 @@ export const adminNodeEnrollCapability = defineCapability({
234
234
  restoreNodeId: parsed.node_id,
235
235
  force: true,
236
236
  });
237
- const remote = await ctx.fetch("/internal/remote", {
237
+ const remote = await ctx.fetch("/remote", {
238
238
  method: "POST",
239
239
  body: {
240
240
  host: parsed.host,
@@ -112,7 +112,7 @@ export const adminNodeSuspendManagementCapability = defineCapability({
112
112
  roles: ["admin"],
113
113
  description: "Suspend Ornn management while leaving the exact host powered on.",
114
114
  mutation: "preview-confirm",
115
- http: { method: "POST", path: "/internal/nodes/{id}/off-grid" },
115
+ http: { method: "POST", path: "/nodes/{id}/off-grid" },
116
116
  cli: {
117
117
  command: ["admin", "nodes", "suspend-management"],
118
118
  vnext: adminLifecycleHelp(["admin", "nodes", "suspend-management"], "Remove Ornn management and managed access from one powered-on node.", "ornn admin nodes suspend-management <node-ref> [--reason TEXT] [--yes] [--no-wait]", "ornn admin nodes suspend-management <node-id> --yes --idempotency-key KEY --format json", "Node, supplier, facility, capacity assignment, management removal, and managed-access loss."),
@@ -129,7 +129,7 @@ export const adminNodeSuspendManagementCapability = defineCapability({
129
129
  };
130
130
  if (!ctx.confirmed)
131
131
  return preview("nodes.suspend_management", { node_id: id, ...body });
132
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/off-grid`, {
132
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/off-grid`, {
133
133
  method: "POST",
134
134
  body,
135
135
  headers: requestHeaders(parsed.idempotency_key),
@@ -142,7 +142,7 @@ export const adminNodeResumeManagementCapability = defineCapability({
142
142
  roles: ["admin"],
143
143
  description: "Resume Ornn management for one exact off-grid node.",
144
144
  mutation: "preview-confirm",
145
- http: { method: "POST", path: "/internal/nodes/{id}/on-grid" },
145
+ http: { method: "POST", path: "/nodes/{id}/on-grid" },
146
146
  cli: {
147
147
  command: ["admin", "nodes", "resume-management"],
148
148
  vnext: adminLifecycleHelp(["admin", "nodes", "resume-management"], "Restore Ornn management and managed access on one off-grid node.", "ornn admin nodes resume-management <node-ref> [--yes] [--no-wait]", "ornn admin nodes resume-management <node-id> --yes --idempotency-key KEY --format json", "Node, supplier, facility, capacity assignment, remote re-enrollment, and restored managed access."),
@@ -155,7 +155,7 @@ export const adminNodeResumeManagementCapability = defineCapability({
155
155
  const id = nodeId(parsed);
156
156
  if (!ctx.confirmed)
157
157
  return preview("nodes.resume_management", { node_id: id });
158
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/on-grid`, {
158
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/on-grid`, {
159
159
  method: "POST",
160
160
  body: {
161
161
  ...(parsed.idempotency_key ? { request_id: parsed.idempotency_key } : {}),
@@ -170,7 +170,7 @@ export const adminNodeTerminateCapability = defineCapability({
170
170
  roles: ["admin"],
171
171
  description: "Delete one exact node record with explicit cleanup scope and consequence review.",
172
172
  mutation: "preview-confirm",
173
- http: { method: "POST", path: "/internal/nodes/{id}/terminate" },
173
+ http: { method: "POST", path: "/nodes/{id}/terminate" },
174
174
  cli: {
175
175
  command: ["admin", "nodes", "terminate"],
176
176
  vnext: adminLifecycleHelp(["admin", "nodes", "terminate"], "End managed access and permanently delete one exact node record.", "ornn admin nodes terminate <node-ref> --delete-node-record [--skip-cleanup] [--reason TEXT] [--yes]", "ornn admin nodes terminate <node-id> --delete-node-record --yes --idempotency-key KEY --format json", "Node, supplier, facility, reservation/capacity, host cleanup, node-record deletion, and access loss."),
@@ -188,7 +188,7 @@ export const adminNodeTerminateCapability = defineCapability({
188
188
  };
189
189
  if (!ctx.confirmed)
190
190
  return preview("nodes.terminate", { node_id: id, ...body });
191
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/terminate`, {
191
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/terminate`, {
192
192
  method: "POST",
193
193
  body,
194
194
  headers: requestHeaders(parsed.idempotency_key),
@@ -201,7 +201,7 @@ export const adminNodeAssignCapability = defineCapability({
201
201
  roles: ["admin"],
202
202
  description: "Assign one exact node to one exact capacity reservation after consequence review.",
203
203
  mutation: "preview-confirm",
204
- http: { method: "POST", path: "/internal/nodes/{id}/assign" },
204
+ http: { method: "POST", path: "/nodes/{id}/assign" },
205
205
  cli: {
206
206
  command: ["admin", "nodes", "assign"],
207
207
  vnext: adminLifecycleHelp(["admin", "nodes", "assign"], "Assign one exact node to one exact capacity reservation.", "ornn admin nodes assign <node-ref> --reservation <reservation-id> [--yes] [--no-wait]", "ornn admin nodes assign <node-id> --reservation <reservation-id> --yes --idempotency-key KEY --format json", "Node, supplier, facility, previous and requested capacity assignments, and tenant access change."),
@@ -218,7 +218,7 @@ export const adminNodeAssignCapability = defineCapability({
218
218
  };
219
219
  if (!ctx.confirmed)
220
220
  return preview("nodes.assign", { node_id: id, ...body });
221
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/assign`, {
221
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/assign`, {
222
222
  method: "POST",
223
223
  body,
224
224
  headers: requestHeaders(parsed.idempotency_key),
@@ -48,7 +48,7 @@ export const adminNodeHealthCapability = defineCapability({
48
48
  roles: ["admin"],
49
49
  description: "Read lifecycle and readiness facts for one enrolled node.",
50
50
  mutation: "read",
51
- http: { method: "GET", path: "/internal/nodes/{id}" },
51
+ http: { method: "GET", path: "/nodes/{id}" },
52
52
  cli: {
53
53
  command: ["admin", "nodes", "health"],
54
54
  vnext: adminHelp(["admin", "nodes", "health"], "Inspect lifecycle and readiness facts for one node.", "ornn admin nodes health <node-id>", "ornn admin nodes health <node-id> --format json", ["canonical node ID"]),
@@ -58,7 +58,7 @@ export const adminNodeHealthCapability = defineCapability({
58
58
  input: nodeInput,
59
59
  execute: async (ctx, input) => {
60
60
  const parsed = nodeInput.parse(input);
61
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(parsed.node_id)}`, { method: "GET" });
61
+ return ctx.fetch(`/nodes/${encodeURIComponent(parsed.node_id)}`, { method: "GET" });
62
62
  },
63
63
  });
64
64
  export const adminNodeMetricsCapability = withAdminBinding(telemetryLatestCapability, adminHelp(["admin", "nodes", "metrics"], "Read a bounded telemetry window for one node.", "ornn admin nodes metrics <node-id> [--span 15m] [--start TIME --end TIME] [--max-points 240]", "ornn admin nodes metrics <node-id> --span 15m [--start TIME --end TIME] --max-points 240 --format json", ["canonical node ID"]));
@@ -174,7 +174,7 @@ export const nodeOffGridCapability = defineCapability({
174
174
  roles: ["admin"],
175
175
  description: "Admin-only. Take a node off-grid (remove Ornn agent management, leave the host powered on). CLI asks y/N. Slack waits for a human confirm. MCP requires confirm: true.",
176
176
  mutation: "preview-confirm",
177
- http: { method: "POST", path: "/internal/nodes/{id}/off-grid" },
177
+ http: { method: "POST", path: "/nodes/{id}/off-grid" },
178
178
  slack: {
179
179
  parameters: {
180
180
  type: "object",
@@ -193,7 +193,7 @@ export const nodeOffGridCapability = defineCapability({
193
193
  if (!ctx.confirmed) {
194
194
  return preview("node.off-grid", { node_id: id, ...body });
195
195
  }
196
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/off-grid`, {
196
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/off-grid`, {
197
197
  method: "POST",
198
198
  body,
199
199
  });
@@ -205,7 +205,7 @@ export const nodeOnGridCapability = defineCapability({
205
205
  roles: ["admin"],
206
206
  description: "Admin-only. Re-enroll an off-grid node: orchestrator SSHs with the stored admin key and runs the installer with restore_node_id. No caller key. CLI asks y/N. Slack waits for a human confirm. MCP requires confirm: true.",
207
207
  mutation: "preview-confirm",
208
- http: { method: "POST", path: "/internal/nodes/{id}/on-grid" },
208
+ http: { method: "POST", path: "/nodes/{id}/on-grid" },
209
209
  slack: {
210
210
  parameters: {
211
211
  type: "object",
@@ -222,7 +222,7 @@ export const nodeOnGridCapability = defineCapability({
222
222
  if (!ctx.confirmed) {
223
223
  return preview("node.on-grid", { node_id: id });
224
224
  }
225
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/on-grid`, {
225
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/on-grid`, {
226
226
  method: "POST",
227
227
  body: {},
228
228
  });
@@ -234,7 +234,7 @@ export const nodeExecCapability = defineCapability({
234
234
  roles: ["admin"],
235
235
  description: "Admin-only. Run one unrestricted command on an enrolled node over orchestrator SSH with the stored admin key. Always pass timeout_seconds. Not an interactive shell. On NVIDIA hosts use nvidia-smi; on AMD Instinct use amd-smi. Runs on the tool call — no confirm, no y/N.",
236
236
  mutation: "read",
237
- http: { method: "POST", path: "/internal/remote" },
237
+ http: { method: "POST", path: "/remote" },
238
238
  slack: {
239
239
  parameters: {
240
240
  type: "object",
@@ -254,7 +254,7 @@ export const nodeExecCapability = defineCapability({
254
254
  const parsed = nodeExecInput.parse(input);
255
255
  const id = nodeIdOf(parsed);
256
256
  const timeoutSeconds = parsed.timeout_seconds ?? parsed.timeoutSeconds;
257
- return ctx.fetch("/internal/remote", {
257
+ return ctx.fetch("/remote", {
258
258
  method: "POST",
259
259
  body: { node_id: id, command: parsed.command, timeout_seconds: timeoutSeconds },
260
260
  });
@@ -266,7 +266,7 @@ export const nodeTerminateCapability = defineCapability({
266
266
  roles: ["admin"],
267
267
  description: "Admin-only. Terminate a node record (best-effort clean + delete). Off-grid nodes need force: true. There is no deenroll verb. CLI asks y/N. Slack waits for a human confirm. MCP requires confirm: true.",
268
268
  mutation: "preview-confirm",
269
- http: { method: "POST", path: "/internal/nodes/{id}/terminate" },
269
+ http: { method: "POST", path: "/nodes/{id}/terminate" },
270
270
  slack: {
271
271
  parameters: {
272
272
  type: "object",
@@ -289,7 +289,7 @@ export const nodeTerminateCapability = defineCapability({
289
289
  if (!ctx.confirmed) {
290
290
  return preview("node.terminate", { node_id: id, ...body });
291
291
  }
292
- return ctx.fetch(`/internal/nodes/${encodeURIComponent(id)}/terminate`, {
292
+ return ctx.fetch(`/nodes/${encodeURIComponent(id)}/terminate`, {
293
293
  method: "POST",
294
294
  body,
295
295
  });
@@ -142,7 +142,7 @@ export const tokensCreateCapability = defineCapability({
142
142
  }
143
143
  const results = [];
144
144
  for (const host of hosts) {
145
- results.push(await ctx.fetch("/internal/remote", {
145
+ results.push(await ctx.fetch("/remote", {
146
146
  method: "POST",
147
147
  body: {
148
148
  host,