@ornncompute/cli 0.2.24 → 1.0.25

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.
Files changed (85) hide show
  1. package/README.md +298 -426
  2. package/package.json +12 -6
  3. package/src/admin-capacity-reservations.mjs +280 -0
  4. package/src/admin-command-handlers.mjs +57 -0
  5. package/src/admin-enrollment.mjs +680 -0
  6. package/src/admin-mutations.mjs +187 -0
  7. package/src/admin-node-diagnostics.mjs +412 -0
  8. package/src/admin-node-lifecycle.mjs +908 -0
  9. package/src/admin-shell.mjs +322 -0
  10. package/src/api-client.mjs +81 -28
  11. package/src/atomic-output.mjs +112 -0
  12. package/src/auth-store.mjs +182 -11
  13. package/src/capability-catalog.mjs +7 -0
  14. package/src/catalog-shell.mjs +1350 -0
  15. package/src/cli.mjs +123 -10266
  16. package/src/connect-mode-handlers.mjs +170 -0
  17. package/src/device-auth.mjs +178 -61
  18. package/src/evidence-commands.mjs +1340 -0
  19. package/src/external-bucket-commands.mjs +1374 -0
  20. package/src/interaction-runtime.mjs +310 -0
  21. package/src/kubernetes-commands.mjs +2229 -0
  22. package/src/launch-mode-handlers.mjs +119 -0
  23. package/src/machine-reference.mjs +277 -0
  24. package/src/mount-commands.mjs +1146 -0
  25. package/src/session-commands.mjs +565 -0
  26. package/src/slurm-commands.mjs +263 -0
  27. package/src/startup.mjs +34 -11
  28. package/src/storage-commands.mjs +1144 -0
  29. package/src/update.mjs +172 -24
  30. package/src/vm-commands.mjs +4273 -0
  31. package/src/vpn-secret-output.mjs +150 -0
  32. package/src/wait-runtime.mjs +231 -0
  33. package/vendor/capabilities/capabilities/admin-capacity-reservations.js +126 -0
  34. package/vendor/capabilities/capabilities/admin-enrollment.js +321 -0
  35. package/vendor/capabilities/capabilities/admin-node-diagnostics.js +88 -0
  36. package/vendor/capabilities/capabilities/admin-nodes-lifecycle.js +235 -0
  37. package/vendor/capabilities/capabilities/admin.js +89 -0
  38. package/vendor/capabilities/capabilities/capacity-offers.js +368 -0
  39. package/vendor/capabilities/capabilities/cli.js +156 -0
  40. package/vendor/capabilities/capabilities/clusters.js +150 -1
  41. package/vendor/capabilities/capabilities/compute.js +522 -0
  42. package/vendor/capabilities/capabilities/evidence.js +145 -0
  43. package/vendor/capabilities/capabilities/external-buckets.js +191 -0
  44. package/vendor/capabilities/capabilities/fleet.js +21 -5
  45. package/vendor/capabilities/capabilities/identity.js +114 -3
  46. package/vendor/capabilities/capabilities/listings.js +14 -8
  47. package/vendor/capabilities/capabilities/mounts.js +176 -0
  48. package/vendor/capabilities/capabilities/networks.js +1257 -0
  49. package/vendor/capabilities/capabilities/observability.js +38 -8
  50. package/vendor/capabilities/capabilities/tokens.js +20 -8
  51. package/vendor/capabilities/capabilities/volumes.js +178 -0
  52. package/vendor/capabilities/capability.js +19 -13
  53. package/vendor/capabilities/cli-catalog.js +65 -0
  54. package/vendor/capabilities/cli-migrations.js +288 -0
  55. package/vendor/capabilities/cli.js +7 -0
  56. package/vendor/capabilities/software-catalog.js +36 -0
  57. package/vendor/capabilities/spec-catalog.js +2 -2
  58. package/src/catalog-dispatch.mjs +0 -605
  59. package/src/color.mjs +0 -71
  60. package/vendor/capabilities/capabilities/clusters.d.ts +0 -2
  61. package/vendor/capabilities/capabilities/fleet.d.ts +0 -8
  62. package/vendor/capabilities/capabilities/identity.d.ts +0 -3
  63. package/vendor/capabilities/capabilities/listings.d.ts +0 -51
  64. package/vendor/capabilities/capabilities/observability.d.ts +0 -5
  65. package/vendor/capabilities/capabilities/staff-access.d.ts +0 -29
  66. package/vendor/capabilities/capabilities/staff-access.js +0 -278
  67. package/vendor/capabilities/capabilities/staff-commerce.d.ts +0 -160
  68. package/vendor/capabilities/capabilities/staff-commerce.js +0 -689
  69. package/vendor/capabilities/capabilities/staff-fleet.d.ts +0 -140
  70. package/vendor/capabilities/capabilities/staff-fleet.js +0 -538
  71. package/vendor/capabilities/capabilities/staff-gtm.d.ts +0 -142
  72. package/vendor/capabilities/capabilities/staff-gtm.js +0 -521
  73. package/vendor/capabilities/capabilities/staff-shared.d.ts +0 -47
  74. package/vendor/capabilities/capabilities/staff-shared.js +0 -98
  75. package/vendor/capabilities/capabilities/tokens.d.ts +0 -10
  76. package/vendor/capabilities/capabilities/users.d.ts +0 -2
  77. package/vendor/capabilities/capability.d.ts +0 -93
  78. package/vendor/capabilities/catalog.d.ts +0 -3
  79. package/vendor/capabilities/catalog.js +0 -26
  80. package/vendor/capabilities/index.d.ts +0 -16
  81. package/vendor/capabilities/index.js +0 -16
  82. package/vendor/capabilities/names.d.ts +0 -6
  83. package/vendor/capabilities/role.d.ts +0 -6
  84. package/vendor/capabilities/role.js +0 -17
  85. package/vendor/capabilities/spec-catalog.d.ts +0 -78
@@ -0,0 +1,288 @@
1
+ export const CLI_MIGRATION_GUIDE_URL = "https://docs.ornn.com/cli#migrating-to-vnext";
2
+ /**
3
+ * Retired top-level parser homes. These entries are guidance metadata only:
4
+ * they are never registered as executable CLI bindings.
5
+ */
6
+ export const LEGACY_CLI_MIGRATIONS = [
7
+ { legacy: ["account"], replacement: "ornn context" },
8
+ { legacy: ["whoami"], replacement: "ornn context" },
9
+ { legacy: ["catalog", "search"], replacement: "ornn capacity-offers list" },
10
+ { legacy: ["gpu-types"], replacement: "ornn capacity-offers list" },
11
+ { legacy: ["availability", "list"], replacement: "ornn capacity-offers list" },
12
+ { legacy: ["availability", "forecast"], replacement: "ornn capacity-offers forecast" },
13
+ { legacy: ["availability", "show"], replacement: "ornn capacity-offers show" },
14
+ { legacy: ["listing", "list"], replacement: "ornn capacity-offers list" },
15
+ { legacy: ["listing", "forecast"], replacement: "ornn capacity-offers forecast" },
16
+ { legacy: ["listing", "show"], replacement: "ornn capacity-offers show" },
17
+ { legacy: ["listings", "list"], replacement: "ornn capacity-offers list" },
18
+ { legacy: ["listings", "forecast"], replacement: "ornn capacity-offers forecast" },
19
+ { legacy: ["listings", "show"], replacement: "ornn capacity-offers show" },
20
+ { legacy: ["listings", "create"], replacement: "ornn admin capacity-offers create" },
21
+ {
22
+ legacy: ["buy"],
23
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
24
+ },
25
+ {
26
+ legacy: ["bid", "create"],
27
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
28
+ },
29
+ {
30
+ legacy: ["bid", "list"],
31
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
32
+ },
33
+ {
34
+ legacy: ["bid", "show"],
35
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
36
+ },
37
+ {
38
+ legacy: ["bid", "update"],
39
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
40
+ },
41
+ {
42
+ legacy: ["bid", "withdraw"],
43
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
44
+ },
45
+ {
46
+ legacy: ["exchange", "create"],
47
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
48
+ },
49
+ {
50
+ legacy: ["exchange", "list"],
51
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
52
+ },
53
+ {
54
+ legacy: ["exchange", "show"],
55
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
56
+ },
57
+ {
58
+ legacy: ["exchange", "update"],
59
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
60
+ },
61
+ {
62
+ legacy: ["exchange", "withdraw"],
63
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
64
+ },
65
+ {
66
+ legacy: ["gpu", "list"],
67
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
68
+ },
69
+ {
70
+ legacy: ["gpu", "show"],
71
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
72
+ },
73
+ {
74
+ legacy: ["gpu", "checkout"],
75
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
76
+ },
77
+ {
78
+ legacy: ["gpus", "list"],
79
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
80
+ },
81
+ {
82
+ legacy: ["gpus", "show"],
83
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
84
+ },
85
+ {
86
+ legacy: ["gpus", "checkout"],
87
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
88
+ },
89
+ {
90
+ legacy: ["tenant", "reservations"],
91
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
92
+ },
93
+ {
94
+ legacy: ["reservations", "checkout"],
95
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
96
+ },
97
+ {
98
+ legacy: ["reservations", "operator"],
99
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
100
+ },
101
+ { legacy: ["reservations", "commerce", "create"], replacement: "ornn admin reservations create" },
102
+ {
103
+ legacy: ["reservations", "commerce"],
104
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
105
+ },
106
+ { legacy: ["reservations", "deploy"], replacement: "ornn admin nodes assign" },
107
+ {
108
+ legacy: ["reservations", "transfer"],
109
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
110
+ },
111
+ { legacy: ["nodes", "launch"], replacement: "ornn launch" },
112
+ { legacy: ["nodes", "list"], replacement: "ornn machines list" },
113
+ { legacy: ["nodes", "show"], replacement: "ornn machines show" },
114
+ { legacy: ["nodes", "wait"], replacement: "ornn machines wait" },
115
+ { legacy: ["nodes", "switch"], replacement: "ornn machines switch" },
116
+ { legacy: ["nodes", "reboot"], replacement: "ornn machines reboot" },
117
+ { legacy: ["nodes", "hard-reset"], replacement: "ornn machines reset --erase-local-data" },
118
+ { legacy: ["nodes", "ssh-command"], replacement: "ornn connect" },
119
+ { legacy: ["nodes", "keys"], replacement: "ornn ssh-keys assignments status" },
120
+ { legacy: ["nodes", "keys", "attach"], replacement: "ornn ssh-keys assignments assign" },
121
+ { legacy: ["nodes", "keys", "list"], replacement: "ornn ssh-keys assignments list" },
122
+ { legacy: ["ssh"], replacement: "ornn connect" },
123
+ { legacy: ["metrics", "nodes"], replacement: "ornn check" },
124
+ { legacy: ["metrics", "node"], replacement: "ornn check" },
125
+ { legacy: ["metrics", "history"], replacement: "ornn machines metrics" },
126
+ { legacy: ["metrics", "watch"], replacement: "ornn machines metrics --follow" },
127
+ { legacy: ["metrics"], replacement: "ornn check" },
128
+ { legacy: ["telemetry", "latest"], replacement: "ornn machines metrics" },
129
+ { legacy: ["telemetry", "tail"], replacement: "ornn machines metrics --follow" },
130
+ { legacy: ["telemetry"], replacement: "ornn machines metrics" },
131
+ { legacy: ["logs", "latest"], replacement: "ornn machines logs" },
132
+ { legacy: ["logs", "tail"], replacement: "ornn machines logs --follow" },
133
+ { legacy: ["logs"], replacement: "ornn machines logs" },
134
+ { legacy: ["cluster", "list"], replacement: "ornn clusters list" },
135
+ {
136
+ legacy: ["cluster", "reservations"],
137
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
138
+ },
139
+ { legacy: ["cluster", "eligible-nodes"], replacement: "ornn clusters eligible-machines" },
140
+ { legacy: ["cluster", "create"], replacement: "ornn launch --mode <kubernetes|slurm>" },
141
+ { legacy: ["cluster", "show"], replacement: "ornn clusters show" },
142
+ { legacy: ["cluster", "wait"], replacement: "ornn clusters wait" },
143
+ { legacy: ["cluster", "credentials"], replacement: "ornn connect" },
144
+ { legacy: ["cluster", "kubeconfig"], replacement: "ornn connect --output <path>" },
145
+ { legacy: ["cluster", "ssh-command"], replacement: "ornn connect --print" },
146
+ { legacy: ["cluster", "ssh"], replacement: "ornn connect" },
147
+ { legacy: ["cluster", "add-node"], replacement: "ornn clusters add-node" },
148
+ { legacy: ["cluster", "remove-node"], replacement: "ornn clusters remove-node" },
149
+ { legacy: ["cluster", "teardown"], replacement: "ornn clusters teardown" },
150
+ { legacy: ["cluster"], replacement: "ornn clusters list" },
151
+ {
152
+ legacy: ["clusters", "reservations"],
153
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
154
+ },
155
+ { legacy: ["clusters", "eligible-nodes"], replacement: "ornn clusters eligible-machines" },
156
+ { legacy: ["clusters", "create"], replacement: "ornn launch --mode kubernetes" },
157
+ { legacy: ["clusters", "credentials"], replacement: "ornn connect" },
158
+ { legacy: ["clusters", "kubeconfig"], replacement: "ornn connect --output <path>" },
159
+ { legacy: ["clusters", "ssh-command"], replacement: "ornn connect --print" },
160
+ { legacy: ["clusters", "ssh"], replacement: "ornn connect" },
161
+ { legacy: ["kubernetes", "launch"], replacement: "ornn launch --mode kubernetes" },
162
+ { legacy: ["kubernetes", "status"], replacement: "ornn clusters show" },
163
+ { legacy: ["kubernetes", "credentials"], replacement: "ornn connect --output <path>" },
164
+ { legacy: ["kubernetes", "kubeconfig"], replacement: "ornn connect --output <path>" },
165
+ { legacy: ["kubernetes", "teardown"], replacement: "ornn clusters teardown" },
166
+ { legacy: ["slurm", "launch"], replacement: "ornn launch --mode slurm" },
167
+ { legacy: ["slurm", "status"], replacement: "ornn clusters show" },
168
+ { legacy: ["slurm", "credentials"], replacement: "ornn connect" },
169
+ { legacy: ["slurm", "ssh"], replacement: "ornn connect" },
170
+ { legacy: ["slurm", "teardown"], replacement: "ornn clusters teardown" },
171
+ { legacy: ["network", "list"], replacement: "ornn private-networks list" },
172
+ { legacy: ["networks", "list"], replacement: "ornn private-networks list" },
173
+ { legacy: ["networks", "show"], replacement: "ornn private-networks show" },
174
+ { legacy: ["networks", "create"], replacement: "ornn private-networks create" },
175
+ { legacy: ["networks", "update"], replacement: "ornn private-networks update" },
176
+ { legacy: ["networks", "delete"], replacement: "ornn private-networks delete" },
177
+ { legacy: ["networks", "reservation"], replacement: "ornn private-networks list" },
178
+ { legacy: ["networks", "attach"], replacement: "ornn private-networks list" },
179
+ { legacy: ["networks", "detach"], replacement: "ornn private-networks list" },
180
+ { legacy: ["access", "show"], replacement: "ornn machines show" },
181
+ { legacy: ["access", "activate"], replacement: "ornn launch" },
182
+ { legacy: ["access", "switch"], replacement: "ornn machines switch" },
183
+ { legacy: ["access", "push-keys"], replacement: "ornn ssh-keys assignments sync" },
184
+ { legacy: ["access", "keys", "list"], replacement: "ornn ssh-keys assignments list" },
185
+ { legacy: ["access", "keys", "add"], replacement: "ornn ssh-keys assignments assign" },
186
+ { legacy: ["access", "keys", "push"], replacement: "ornn ssh-keys assignments sync" },
187
+ { legacy: ["access", "keys", "status"], replacement: "ornn ssh-keys assignments status" },
188
+ { legacy: ["access", "keys"], replacement: "ornn ssh-keys assignments list" },
189
+ { legacy: ["keys", "list"], replacement: "ornn ssh-keys list" },
190
+ { legacy: ["keys", "add"], replacement: "ornn ssh-keys add" },
191
+ { legacy: ["keys", "delete"], replacement: "ornn ssh-keys delete" },
192
+ { legacy: ["keys"], replacement: "ornn ssh-keys list" },
193
+ { legacy: ["storage", "volumes", "list"], replacement: "ornn volumes list" },
194
+ { legacy: ["storage", "volumes", "show"], replacement: "ornn volumes show" },
195
+ { legacy: ["storage", "volumes", "refresh"], replacement: "ornn volumes refresh" },
196
+ { legacy: ["storage", "volumes", "clear"], replacement: "ornn volumes clear" },
197
+ { legacy: ["storage", "volumes", "create"], replacement: "ornn volumes create" },
198
+ { legacy: ["storage", "volumes", "delete"], replacement: "ornn volumes delete" },
199
+ { legacy: ["storage", "files", "ls"], replacement: "ornn volumes files list" },
200
+ { legacy: ["storage", "files", "list"], replacement: "ornn volumes files list" },
201
+ { legacy: ["storage", "files", "upload"], replacement: "ornn volumes files upload" },
202
+ { legacy: ["storage", "files", "download"], replacement: "ornn volumes files download" },
203
+ { legacy: ["storage", "files", "delete"], replacement: "ornn volumes files delete" },
204
+ { legacy: ["storage", "buckets", "list"], replacement: "ornn external-buckets list" },
205
+ { legacy: ["storage", "buckets", "show"], replacement: "ornn external-buckets show" },
206
+ { legacy: ["storage", "buckets", "connect"], replacement: "ornn external-buckets connect" },
207
+ {
208
+ legacy: ["storage", "buckets", "update-credentials"],
209
+ replacement: "ornn external-buckets update-credentials",
210
+ },
211
+ { legacy: ["storage", "buckets", "verify"], replacement: "ornn external-buckets verify" },
212
+ { legacy: ["storage", "buckets", "import"], replacement: "ornn external-buckets import" },
213
+ {
214
+ legacy: ["storage", "buckets", "disconnect"],
215
+ replacement: "ornn external-buckets disconnect",
216
+ },
217
+ { legacy: ["storage", "buckets", "create"], replacement: "ornn external-buckets connect" },
218
+ { legacy: ["storage", "buckets", "delete"], replacement: "ornn external-buckets disconnect" },
219
+ { legacy: ["storage", "volumes"], replacement: "ornn volumes list" },
220
+ { legacy: ["storage", "files"], replacement: "ornn volumes files list" },
221
+ { legacy: ["storage", "buckets"], replacement: "ornn external-buckets list" },
222
+ { legacy: ["storage", "targets"], replacement: "ornn volume-mounts candidates" },
223
+ { legacy: ["storage", "deploy"], replacement: "ornn volume-mounts attach" },
224
+ { legacy: ["storage", "status"], replacement: "ornn volume-mounts show" },
225
+ { legacy: ["storage", "detach"], replacement: "ornn volume-mounts detach" },
226
+ { legacy: ["storage", "filesystem"], replacement: "ornn filesystems show" },
227
+ { legacy: ["storage", "filesystem", "deploy"], replacement: "ornn filesystems deploy" },
228
+ { legacy: ["storage", "filesystem", "status"], replacement: "ornn filesystems show" },
229
+ { legacy: ["storage", "filesystem", "delete"], replacement: "ornn filesystems delete" },
230
+ {
231
+ legacy: ["billing", "summary"],
232
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
233
+ },
234
+ {
235
+ legacy: ["billing", "invoices"],
236
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
237
+ },
238
+ {
239
+ legacy: ["billing", "showback"],
240
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
241
+ },
242
+ {
243
+ legacy: ["billing", "open"],
244
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
245
+ },
246
+ {
247
+ legacy: ["billing"],
248
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
249
+ },
250
+ {
251
+ legacy: ["reservations", "commerce", "list"],
252
+ replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
253
+ },
254
+ { legacy: ["reservations", "commerce", "create"], replacement: "ornn admin reservations create" },
255
+ { legacy: ["operator", "list"], replacement: "ornn admin operators list" },
256
+ { legacy: ["operators", "list"], replacement: "ornn admin operators list" },
257
+ { legacy: ["facilities", "list"], replacement: "ornn admin facilities list" },
258
+ { legacy: ["tokens", "list"], replacement: "ornn admin enrollment-tokens list" },
259
+ { legacy: ["tokens", "create"], replacement: "ornn admin enrollment-tokens create" },
260
+ { legacy: ["tokens", "revoke"], replacement: "ornn admin enrollment-tokens revoke" },
261
+ { legacy: ["users", "query"], replacement: "ornn admin users search" },
262
+ { legacy: ["node", "enroll"], replacement: "ornn admin nodes enroll" },
263
+ { legacy: ["node", "list"], replacement: "ornn admin nodes list" },
264
+ { legacy: ["node", "health"], replacement: "ornn admin nodes health" },
265
+ { legacy: ["node", "reboot"], replacement: "ornn admin nodes reboot" },
266
+ { legacy: ["node", "admin-key"], replacement: "ornn admin nodes export-key" },
267
+ { legacy: ["node", "diagnose"], replacement: "ornn admin nodes diagnose" },
268
+ { legacy: ["node", "exec"], replacement: "ornn admin nodes exec" },
269
+ { legacy: ["node", "hard-reset"], replacement: "ornn admin nodes hard-reset --erase-local-data" },
270
+ { legacy: ["node", "terminate"], replacement: "ornn admin nodes terminate" },
271
+ { legacy: ["node", "off-grid"], replacement: "ornn admin nodes suspend-management" },
272
+ { legacy: ["node", "on-grid"], replacement: "ornn admin nodes resume-management" },
273
+ { legacy: ["operator"], replacement: "ornn admin operators list" },
274
+ { legacy: ["operators"], replacement: "ornn admin operators list" },
275
+ { legacy: ["facilities"], replacement: "ornn admin facilities list" },
276
+ { legacy: ["tokens"], replacement: "ornn admin enrollment-tokens list" },
277
+ { legacy: ["users"], replacement: "ornn admin users search" },
278
+ { legacy: ["node"], replacement: "ornn admin nodes list" },
279
+ { legacy: ["cache", "purge"], replacement: "ornn resources" },
280
+ { legacy: ["api"], replacement: "ornn resources" },
281
+ { legacy: ["commerce"], replacement: "ornn resources" },
282
+ { legacy: ["orchestrator"], replacement: "ornn resources" },
283
+ ];
284
+ export function findLegacyCliMigration(argv) {
285
+ return ([...LEGACY_CLI_MIGRATIONS]
286
+ .sort((left, right) => right.legacy.length - left.legacy.length)
287
+ .find((entry) => entry.legacy.every((part, index) => argv[index] === part)) ?? null);
288
+ }
@@ -0,0 +1,7 @@
1
+ // The CLI entrypoint must not import staff commerce or CRM capabilities.
2
+ export { catalog } from "./cli-catalog.js";
3
+ export { ADMIN_CLI_ROOTS } from "./capabilities/admin.js";
4
+ export { byCliCommand, byMcpName, forRole } from "./capability.js";
5
+ export { CLI_MIGRATION_GUIDE_URL, findLegacyCliMigration, LEGACY_CLI_MIGRATIONS, } from "./cli-migrations.js";
6
+ export { HARDWARE_CATALOG_PATH } from "./spec-catalog.js";
7
+ export { SOFTWARE_CATALOG_PATH } from "./software-catalog.js";
@@ -0,0 +1,36 @@
1
+ /** Live orchestrator software dictionary: `GET /v1/orchestrator/catalog/software`. */
2
+ export const SOFTWARE_CATALOG_PATH = "/v1/orchestrator/catalog/software";
3
+ export const SOFTWARE_KINDS = ["python", "package", "cuda", "nvidia_smi", "dcgmi"];
4
+ function stringMap(value) {
5
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
6
+ return {};
7
+ }
8
+ const out = {};
9
+ for (const [key, entry] of Object.entries(value)) {
10
+ if (typeof entry === "string" && entry.trim()) {
11
+ out[key] = entry;
12
+ }
13
+ }
14
+ return out;
15
+ }
16
+ export function parseSoftwareCatalog(payload) {
17
+ const row = payload && typeof payload === "object" ? payload : {};
18
+ const python = Array.isArray(row.python)
19
+ ? row.python.filter((value) => typeof value === "string")
20
+ : [];
21
+ return {
22
+ python,
23
+ packages: stringMap(row.packages),
24
+ cuda: stringMap(row.cuda),
25
+ nvidia_smi: stringMap(row.nvidia_smi),
26
+ dcgmi: stringMap(row.dcgmi),
27
+ };
28
+ }
29
+ export async function loadSoftwareCatalog(fetchImpl) {
30
+ return parseSoftwareCatalog(await fetchImpl(SOFTWARE_CATALOG_PATH, { method: "GET" }));
31
+ }
32
+ export function displayForSoftwareSlug(catalog, kind, slug) {
33
+ const map = catalog[kind];
34
+ const hit = Object.entries(map).find(([, value]) => value === slug);
35
+ return hit?.[0] ?? slug;
36
+ }
@@ -1,5 +1,5 @@
1
- /** Live orchestrator dictionary: `GET /v1/orchestrator/catalog` from `spec/dictionary.csv`. */
2
- export const HARDWARE_CATALOG_PATH = "/v1/orchestrator/catalog";
1
+ /** Live orchestrator dictionary: `GET /v1/orchestrator/catalog/hardware` from `spec/dictionary.csv`. */
2
+ export const HARDWARE_CATALOG_PATH = "/v1/orchestrator/catalog/hardware";
3
3
  export const HARDWARE_KINDS = ["gpu", "cpu", "node", "link"];
4
4
  export const UNRESOLVED_CATALOG_HINT = "Leave this field empty. Only dictionary.csv product names are allowed. Do not ask to add spec-sheet text to the dictionary.";
5
5
  export const HARDWARE_LISTING_FIELDS = [