@ornncompute/cli 0.2.24 → 1.0.34
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 +351 -426
- package/package.json +12 -6
- package/src/admin-capacity-reservations.mjs +305 -0
- package/src/admin-command-handlers.mjs +57 -0
- package/src/admin-enrollment.mjs +681 -0
- package/src/admin-mutations.mjs +187 -0
- package/src/admin-node-diagnostics.mjs +412 -0
- package/src/admin-node-lifecycle.mjs +905 -0
- package/src/admin-shell.mjs +456 -0
- package/src/api-client.mjs +81 -28
- package/src/atomic-output.mjs +112 -0
- package/src/auth-store.mjs +182 -11
- package/src/capability-catalog.mjs +7 -0
- package/src/catalog-shell.mjs +1363 -0
- package/src/cli.mjs +123 -10266
- package/src/connect-mode-handlers.mjs +170 -0
- package/src/device-auth.mjs +179 -62
- package/src/evidence-commands.mjs +1354 -0
- package/src/external-bucket-commands.mjs +1374 -0
- package/src/gpu-catalog.mjs +21 -0
- package/src/identity-file.mjs +28 -0
- package/src/interaction-runtime.mjs +310 -0
- package/src/kubernetes-commands.mjs +2235 -0
- package/src/launch-mode-handlers.mjs +119 -0
- package/src/machine-reference.mjs +285 -0
- package/src/mount-commands.mjs +1148 -0
- package/src/session-commands.mjs +565 -0
- package/src/slurm-commands.mjs +274 -0
- package/src/startup.mjs +34 -11
- package/src/storage-commands.mjs +1164 -0
- package/src/update.mjs +172 -24
- package/src/vm-commands.mjs +4308 -0
- package/src/vpn-secret-output.mjs +150 -0
- package/src/wait-runtime.mjs +231 -0
- package/vendor/capabilities/capabilities/admin-capacity-reservations.js +96 -0
- package/vendor/capabilities/capabilities/admin-enrollment.js +321 -0
- package/vendor/capabilities/capabilities/admin-node-diagnostics.js +88 -0
- package/vendor/capabilities/capabilities/admin-nodes-lifecycle.js +235 -0
- package/vendor/capabilities/capabilities/admin.js +89 -0
- package/vendor/capabilities/capabilities/cli.js +156 -0
- package/vendor/capabilities/capabilities/clusters.js +150 -1
- package/vendor/capabilities/capabilities/commerce-market.js +330 -0
- package/vendor/capabilities/capabilities/compute.js +522 -0
- package/vendor/capabilities/capabilities/evidence.js +145 -0
- package/vendor/capabilities/capabilities/external-buckets.js +191 -0
- package/vendor/capabilities/capabilities/fleet.js +77 -25
- package/vendor/capabilities/capabilities/identity.js +114 -3
- package/vendor/capabilities/capabilities/listings.js +141 -144
- package/vendor/capabilities/capabilities/market-shared.js +44 -0
- package/vendor/capabilities/capabilities/markets.js +449 -0
- package/vendor/capabilities/capabilities/mounts.js +176 -0
- package/vendor/capabilities/capabilities/networks.js +1264 -0
- package/vendor/capabilities/capabilities/observability.js +38 -8
- package/vendor/capabilities/capabilities/tokens.js +32 -17
- package/vendor/capabilities/capabilities/volumes.js +178 -0
- package/vendor/capabilities/capability.js +21 -14
- package/vendor/capabilities/cli-catalog.js +67 -0
- package/vendor/capabilities/cli-migrations.js +261 -0
- package/vendor/capabilities/cli.js +7 -0
- package/vendor/capabilities/software-catalog.js +36 -0
- package/vendor/capabilities/spec-catalog.js +28 -5
- package/vendor/capabilities/supplier-directory.js +20 -0
- package/src/catalog-dispatch.mjs +0 -605
- package/src/color.mjs +0 -71
- package/vendor/capabilities/capabilities/clusters.d.ts +0 -2
- package/vendor/capabilities/capabilities/fleet.d.ts +0 -8
- package/vendor/capabilities/capabilities/identity.d.ts +0 -3
- package/vendor/capabilities/capabilities/listings.d.ts +0 -51
- package/vendor/capabilities/capabilities/observability.d.ts +0 -5
- package/vendor/capabilities/capabilities/staff-access.d.ts +0 -29
- package/vendor/capabilities/capabilities/staff-access.js +0 -278
- package/vendor/capabilities/capabilities/staff-commerce.d.ts +0 -160
- package/vendor/capabilities/capabilities/staff-commerce.js +0 -689
- package/vendor/capabilities/capabilities/staff-fleet.d.ts +0 -140
- package/vendor/capabilities/capabilities/staff-fleet.js +0 -538
- package/vendor/capabilities/capabilities/staff-gtm.d.ts +0 -142
- package/vendor/capabilities/capabilities/staff-gtm.js +0 -521
- package/vendor/capabilities/capabilities/staff-shared.d.ts +0 -47
- package/vendor/capabilities/capabilities/staff-shared.js +0 -98
- package/vendor/capabilities/capabilities/tokens.d.ts +0 -10
- package/vendor/capabilities/capabilities/users.d.ts +0 -2
- package/vendor/capabilities/capability.d.ts +0 -93
- package/vendor/capabilities/catalog.d.ts +0 -3
- package/vendor/capabilities/catalog.js +0 -26
- package/vendor/capabilities/index.d.ts +0 -16
- package/vendor/capabilities/index.js +0 -16
- package/vendor/capabilities/names.d.ts +0 -6
- package/vendor/capabilities/role.d.ts +0 -6
- package/vendor/capabilities/role.js +0 -17
- package/vendor/capabilities/spec-catalog.d.ts +0 -78
|
@@ -0,0 +1,261 @@
|
|
|
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 schedules list" },
|
|
13
|
+
{ legacy: ["availability", "show"], replacement: "ornn capacity-offers show" },
|
|
14
|
+
{ legacy: ["listing", "list"], replacement: "ornn capacity-offers list" },
|
|
15
|
+
{ legacy: ["listing", "forecast"], replacement: "ornn schedules list" },
|
|
16
|
+
{ legacy: ["listing", "show"], replacement: "ornn capacity-offers show" },
|
|
17
|
+
{ legacy: ["listings", "list"], replacement: "ornn capacity-offers list" },
|
|
18
|
+
{ legacy: ["listings", "forecast"], replacement: "ornn schedules list" },
|
|
19
|
+
{ legacy: ["listings", "show"], replacement: "ornn capacity-offers show" },
|
|
20
|
+
{ legacy: ["listings", "create"], replacement: "ornn admin capacity-offers create" },
|
|
21
|
+
{ legacy: ["buy"], replacement: "ornn offers post" },
|
|
22
|
+
{ legacy: ["bid", "create"], replacement: "ornn spot bid" },
|
|
23
|
+
{ legacy: ["bid", "list"], replacement: "ornn spot orders" },
|
|
24
|
+
{ legacy: ["bid", "show"], replacement: "ornn spot orders" },
|
|
25
|
+
{ legacy: ["bid", "update"], replacement: "ornn spot bid" },
|
|
26
|
+
{ legacy: ["bid", "withdraw"], replacement: "ornn spot cancel" },
|
|
27
|
+
{
|
|
28
|
+
legacy: ["exchange", "create"],
|
|
29
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
legacy: ["exchange", "list"],
|
|
33
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
legacy: ["exchange", "show"],
|
|
37
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
legacy: ["exchange", "update"],
|
|
41
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
legacy: ["exchange", "withdraw"],
|
|
45
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
legacy: ["gpu", "list"],
|
|
49
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
legacy: ["gpu", "show"],
|
|
53
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
legacy: ["gpu", "checkout"],
|
|
57
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
legacy: ["gpus", "list"],
|
|
61
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
legacy: ["gpus", "show"],
|
|
65
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
legacy: ["gpus", "checkout"],
|
|
69
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
70
|
+
},
|
|
71
|
+
{ legacy: ["tenant", "reservations"], replacement: "ornn reservations list" },
|
|
72
|
+
{ legacy: ["reservations", "checkout"], replacement: "ornn reservations show" },
|
|
73
|
+
{
|
|
74
|
+
legacy: ["reservations", "operator"],
|
|
75
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
76
|
+
},
|
|
77
|
+
{ legacy: ["reservations", "commerce", "create"], replacement: "ornn admin reservations create" },
|
|
78
|
+
{
|
|
79
|
+
legacy: ["reservations", "commerce"],
|
|
80
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
81
|
+
},
|
|
82
|
+
{ legacy: ["reservations", "deploy"], replacement: "ornn admin nodes assign" },
|
|
83
|
+
{
|
|
84
|
+
legacy: ["reservations", "transfer"],
|
|
85
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
86
|
+
},
|
|
87
|
+
{ legacy: ["nodes", "launch"], replacement: "ornn launch" },
|
|
88
|
+
{ legacy: ["nodes", "list"], replacement: "ornn machines list" },
|
|
89
|
+
{ legacy: ["nodes", "show"], replacement: "ornn machines show" },
|
|
90
|
+
{ legacy: ["nodes", "wait"], replacement: "ornn machines wait" },
|
|
91
|
+
{ legacy: ["nodes", "switch"], replacement: "ornn machines switch" },
|
|
92
|
+
{ legacy: ["nodes", "reboot"], replacement: "ornn machines reboot" },
|
|
93
|
+
{ legacy: ["nodes", "hard-reset"], replacement: "ornn machines reset --erase-local-data" },
|
|
94
|
+
{ legacy: ["nodes", "ssh-command"], replacement: "ornn connect" },
|
|
95
|
+
{ legacy: ["nodes", "keys"], replacement: "ornn ssh-keys assignments status" },
|
|
96
|
+
{ legacy: ["nodes", "keys", "attach"], replacement: "ornn ssh-keys assignments assign" },
|
|
97
|
+
{ legacy: ["nodes", "keys", "list"], replacement: "ornn ssh-keys assignments list" },
|
|
98
|
+
{ legacy: ["ssh"], replacement: "ornn connect" },
|
|
99
|
+
{ legacy: ["metrics", "nodes"], replacement: "ornn check" },
|
|
100
|
+
{ legacy: ["metrics", "node"], replacement: "ornn check" },
|
|
101
|
+
{ legacy: ["metrics", "history"], replacement: "ornn machines metrics" },
|
|
102
|
+
{ legacy: ["metrics", "watch"], replacement: "ornn machines metrics --follow" },
|
|
103
|
+
{ legacy: ["metrics"], replacement: "ornn check" },
|
|
104
|
+
{ legacy: ["telemetry", "latest"], replacement: "ornn machines metrics" },
|
|
105
|
+
{ legacy: ["telemetry", "tail"], replacement: "ornn machines metrics --follow" },
|
|
106
|
+
{ legacy: ["telemetry"], replacement: "ornn machines metrics" },
|
|
107
|
+
{ legacy: ["logs", "latest"], replacement: "ornn machines logs" },
|
|
108
|
+
{ legacy: ["logs", "tail"], replacement: "ornn machines logs --follow" },
|
|
109
|
+
{ legacy: ["logs"], replacement: "ornn machines logs" },
|
|
110
|
+
{ legacy: ["cluster", "list"], replacement: "ornn clusters list" },
|
|
111
|
+
{
|
|
112
|
+
legacy: ["cluster", "reservations"],
|
|
113
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
114
|
+
},
|
|
115
|
+
{ legacy: ["cluster", "eligible-nodes"], replacement: "ornn clusters eligible-machines" },
|
|
116
|
+
{ legacy: ["cluster", "create"], replacement: "ornn launch --mode <kubernetes|slurm>" },
|
|
117
|
+
{ legacy: ["cluster", "show"], replacement: "ornn clusters show" },
|
|
118
|
+
{ legacy: ["cluster", "wait"], replacement: "ornn clusters wait" },
|
|
119
|
+
{ legacy: ["cluster", "credentials"], replacement: "ornn connect" },
|
|
120
|
+
{ legacy: ["cluster", "kubeconfig"], replacement: "ornn connect --output <path>" },
|
|
121
|
+
{ legacy: ["cluster", "ssh-command"], replacement: "ornn connect --print" },
|
|
122
|
+
{ legacy: ["cluster", "ssh"], replacement: "ornn connect" },
|
|
123
|
+
{ legacy: ["cluster", "add-node"], replacement: "ornn clusters add-node" },
|
|
124
|
+
{ legacy: ["cluster", "remove-node"], replacement: "ornn clusters remove-node" },
|
|
125
|
+
{ legacy: ["cluster", "teardown"], replacement: "ornn clusters teardown" },
|
|
126
|
+
{ legacy: ["cluster"], replacement: "ornn clusters list" },
|
|
127
|
+
{
|
|
128
|
+
legacy: ["clusters", "reservations"],
|
|
129
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
130
|
+
},
|
|
131
|
+
{ legacy: ["clusters", "eligible-nodes"], replacement: "ornn clusters eligible-machines" },
|
|
132
|
+
{ legacy: ["clusters", "create"], replacement: "ornn launch --mode kubernetes" },
|
|
133
|
+
{ legacy: ["clusters", "credentials"], replacement: "ornn connect" },
|
|
134
|
+
{ legacy: ["clusters", "kubeconfig"], replacement: "ornn connect --output <path>" },
|
|
135
|
+
{ legacy: ["clusters", "ssh-command"], replacement: "ornn connect --print" },
|
|
136
|
+
{ legacy: ["clusters", "ssh"], replacement: "ornn connect" },
|
|
137
|
+
{ legacy: ["kubernetes", "launch"], replacement: "ornn launch --mode kubernetes" },
|
|
138
|
+
{ legacy: ["kubernetes", "status"], replacement: "ornn clusters show" },
|
|
139
|
+
{ legacy: ["kubernetes", "credentials"], replacement: "ornn connect --output <path>" },
|
|
140
|
+
{ legacy: ["kubernetes", "kubeconfig"], replacement: "ornn connect --output <path>" },
|
|
141
|
+
{ legacy: ["kubernetes", "teardown"], replacement: "ornn clusters teardown" },
|
|
142
|
+
{ legacy: ["slurm", "launch"], replacement: "ornn launch --mode slurm" },
|
|
143
|
+
{ legacy: ["slurm", "status"], replacement: "ornn clusters show" },
|
|
144
|
+
{ legacy: ["slurm", "credentials"], replacement: "ornn connect" },
|
|
145
|
+
{ legacy: ["slurm", "ssh"], replacement: "ornn connect" },
|
|
146
|
+
{ legacy: ["slurm", "teardown"], replacement: "ornn clusters teardown" },
|
|
147
|
+
{ legacy: ["network", "list"], replacement: "ornn private-networks list" },
|
|
148
|
+
{ legacy: ["networks", "list"], replacement: "ornn private-networks list" },
|
|
149
|
+
{ legacy: ["networks", "show"], replacement: "ornn private-networks show" },
|
|
150
|
+
{ legacy: ["networks", "create"], replacement: "ornn private-networks create" },
|
|
151
|
+
{ legacy: ["networks", "update"], replacement: "ornn private-networks update" },
|
|
152
|
+
{ legacy: ["networks", "delete"], replacement: "ornn private-networks delete" },
|
|
153
|
+
{ legacy: ["networks", "reservation"], replacement: "ornn private-networks list" },
|
|
154
|
+
{ legacy: ["networks", "attach"], replacement: "ornn private-networks list" },
|
|
155
|
+
{ legacy: ["networks", "detach"], replacement: "ornn private-networks list" },
|
|
156
|
+
{ legacy: ["access", "show"], replacement: "ornn machines show" },
|
|
157
|
+
{ legacy: ["access", "activate"], replacement: "ornn launch" },
|
|
158
|
+
{ legacy: ["access", "switch"], replacement: "ornn machines switch" },
|
|
159
|
+
{ legacy: ["access", "push-keys"], replacement: "ornn ssh-keys assignments sync" },
|
|
160
|
+
{ legacy: ["access", "keys", "list"], replacement: "ornn ssh-keys assignments list" },
|
|
161
|
+
{ legacy: ["access", "keys", "add"], replacement: "ornn ssh-keys assignments assign" },
|
|
162
|
+
{ legacy: ["access", "keys", "push"], replacement: "ornn ssh-keys assignments sync" },
|
|
163
|
+
{ legacy: ["access", "keys", "status"], replacement: "ornn ssh-keys assignments status" },
|
|
164
|
+
{ legacy: ["access", "keys"], replacement: "ornn ssh-keys assignments list" },
|
|
165
|
+
{ legacy: ["keys", "list"], replacement: "ornn ssh-keys list" },
|
|
166
|
+
{ legacy: ["keys", "add"], replacement: "ornn ssh-keys add" },
|
|
167
|
+
{ legacy: ["keys", "delete"], replacement: "ornn ssh-keys delete" },
|
|
168
|
+
{ legacy: ["keys"], replacement: "ornn ssh-keys list" },
|
|
169
|
+
{ legacy: ["storage", "volumes", "list"], replacement: "ornn volumes list" },
|
|
170
|
+
{ legacy: ["storage", "volumes", "show"], replacement: "ornn volumes show" },
|
|
171
|
+
{ legacy: ["storage", "volumes", "refresh"], replacement: "ornn volumes refresh" },
|
|
172
|
+
{ legacy: ["storage", "volumes", "clear"], replacement: "ornn volumes clear" },
|
|
173
|
+
{ legacy: ["storage", "volumes", "create"], replacement: "ornn volumes create" },
|
|
174
|
+
{ legacy: ["storage", "volumes", "delete"], replacement: "ornn volumes delete" },
|
|
175
|
+
{ legacy: ["storage", "files", "ls"], replacement: "ornn volumes files list" },
|
|
176
|
+
{ legacy: ["storage", "files", "list"], replacement: "ornn volumes files list" },
|
|
177
|
+
{ legacy: ["storage", "files", "upload"], replacement: "ornn volumes files upload" },
|
|
178
|
+
{ legacy: ["storage", "files", "download"], replacement: "ornn volumes files download" },
|
|
179
|
+
{ legacy: ["storage", "files", "delete"], replacement: "ornn volumes files delete" },
|
|
180
|
+
{ legacy: ["storage", "buckets", "list"], replacement: "ornn external-buckets list" },
|
|
181
|
+
{ legacy: ["storage", "buckets", "show"], replacement: "ornn external-buckets show" },
|
|
182
|
+
{ legacy: ["storage", "buckets", "connect"], replacement: "ornn external-buckets connect" },
|
|
183
|
+
{
|
|
184
|
+
legacy: ["storage", "buckets", "update-credentials"],
|
|
185
|
+
replacement: "ornn external-buckets update-credentials",
|
|
186
|
+
},
|
|
187
|
+
{ legacy: ["storage", "buckets", "verify"], replacement: "ornn external-buckets verify" },
|
|
188
|
+
{ legacy: ["storage", "buckets", "import"], replacement: "ornn external-buckets import" },
|
|
189
|
+
{
|
|
190
|
+
legacy: ["storage", "buckets", "disconnect"],
|
|
191
|
+
replacement: "ornn external-buckets disconnect",
|
|
192
|
+
},
|
|
193
|
+
{ legacy: ["storage", "buckets", "create"], replacement: "ornn external-buckets connect" },
|
|
194
|
+
{ legacy: ["storage", "buckets", "delete"], replacement: "ornn external-buckets disconnect" },
|
|
195
|
+
{ legacy: ["storage", "volumes"], replacement: "ornn volumes list" },
|
|
196
|
+
{ legacy: ["storage", "files"], replacement: "ornn volumes files list" },
|
|
197
|
+
{ legacy: ["storage", "buckets"], replacement: "ornn external-buckets list" },
|
|
198
|
+
{ legacy: ["storage", "targets"], replacement: "ornn volume-mounts candidates" },
|
|
199
|
+
{ legacy: ["storage", "deploy"], replacement: "ornn volume-mounts attach" },
|
|
200
|
+
{ legacy: ["storage", "status"], replacement: "ornn volume-mounts show" },
|
|
201
|
+
{ legacy: ["storage", "detach"], replacement: "ornn volume-mounts detach" },
|
|
202
|
+
{ legacy: ["storage", "filesystem"], replacement: "ornn filesystems show" },
|
|
203
|
+
{ legacy: ["storage", "filesystem", "deploy"], replacement: "ornn filesystems deploy" },
|
|
204
|
+
{ legacy: ["storage", "filesystem", "status"], replacement: "ornn filesystems show" },
|
|
205
|
+
{ legacy: ["storage", "filesystem", "delete"], replacement: "ornn filesystems delete" },
|
|
206
|
+
{
|
|
207
|
+
legacy: ["billing", "summary"],
|
|
208
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
legacy: ["billing", "invoices"],
|
|
212
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
legacy: ["billing", "showback"],
|
|
216
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
legacy: ["billing", "open"],
|
|
220
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
legacy: ["billing"],
|
|
224
|
+
replacement: "ornn capacity-offers list (use the Ornn web app for commercial workflows)",
|
|
225
|
+
},
|
|
226
|
+
{ legacy: ["reservations", "commerce", "list"], replacement: "ornn reservations list" },
|
|
227
|
+
{ legacy: ["reservations", "commerce", "create"], replacement: "ornn admin reservations create" },
|
|
228
|
+
{ legacy: ["operator", "list"], replacement: "ornn admin suppliers list" },
|
|
229
|
+
{ legacy: ["operators", "list"], replacement: "ornn admin suppliers list" },
|
|
230
|
+
{ legacy: ["facilities", "list"], replacement: "ornn admin facilities list" },
|
|
231
|
+
{ legacy: ["tokens", "list"], replacement: "ornn admin enrollment-tokens list" },
|
|
232
|
+
{ legacy: ["tokens", "create"], replacement: "ornn admin enrollment-tokens create" },
|
|
233
|
+
{ legacy: ["tokens", "revoke"], replacement: "ornn admin enrollment-tokens revoke" },
|
|
234
|
+
{ legacy: ["users", "query"], replacement: "ornn admin users search" },
|
|
235
|
+
{ legacy: ["node", "enroll"], replacement: "ornn admin nodes enroll" },
|
|
236
|
+
{ legacy: ["node", "list"], replacement: "ornn admin nodes list" },
|
|
237
|
+
{ legacy: ["node", "health"], replacement: "ornn admin nodes health" },
|
|
238
|
+
{ legacy: ["node", "reboot"], replacement: "ornn admin nodes reboot" },
|
|
239
|
+
{ legacy: ["node", "admin-key"], replacement: "ornn admin nodes export-key" },
|
|
240
|
+
{ legacy: ["node", "diagnose"], replacement: "ornn admin nodes diagnose" },
|
|
241
|
+
{ legacy: ["node", "exec"], replacement: "ornn admin nodes exec" },
|
|
242
|
+
{ legacy: ["node", "hard-reset"], replacement: "ornn admin nodes hard-reset --erase-local-data" },
|
|
243
|
+
{ legacy: ["node", "terminate"], replacement: "ornn admin nodes terminate" },
|
|
244
|
+
{ legacy: ["node", "off-grid"], replacement: "ornn admin nodes suspend-management" },
|
|
245
|
+
{ legacy: ["node", "on-grid"], replacement: "ornn admin nodes resume-management" },
|
|
246
|
+
{ legacy: ["operator"], replacement: "ornn admin suppliers list" },
|
|
247
|
+
{ legacy: ["operators"], replacement: "ornn admin suppliers list" },
|
|
248
|
+
{ legacy: ["facilities"], replacement: "ornn admin facilities list" },
|
|
249
|
+
{ legacy: ["tokens"], replacement: "ornn admin enrollment-tokens list" },
|
|
250
|
+
{ legacy: ["users"], replacement: "ornn admin users search" },
|
|
251
|
+
{ legacy: ["node"], replacement: "ornn admin nodes list" },
|
|
252
|
+
{ legacy: ["cache", "purge"], replacement: "ornn resources" },
|
|
253
|
+
{ legacy: ["api"], replacement: "ornn resources" },
|
|
254
|
+
{ legacy: ["commerce"], replacement: "ornn resources" },
|
|
255
|
+
{ legacy: ["orchestrator"], replacement: "ornn resources" },
|
|
256
|
+
];
|
|
257
|
+
export function findLegacyCliMigration(argv) {
|
|
258
|
+
return ([...LEGACY_CLI_MIGRATIONS]
|
|
259
|
+
.sort((left, right) => right.legacy.length - left.legacy.length)
|
|
260
|
+
.find((entry) => entry.legacy.every((part, index) => argv[index] === part)) ?? null);
|
|
261
|
+
}
|
|
@@ -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 { gpuDisplay, HARDWARE_CATALOG_PATH, parseHardwareCatalog } 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 = [
|
|
@@ -66,6 +66,26 @@ export function parseHardwareCatalog(payload) {
|
|
|
66
66
|
export async function loadHardwareCatalog(fetchImpl) {
|
|
67
67
|
return parseHardwareCatalog(await fetchImpl(HARDWARE_CATALOG_PATH, { method: "GET" }));
|
|
68
68
|
}
|
|
69
|
+
/** What a GPU slug the catalog does not list renders as. */
|
|
70
|
+
export const UNKNOWN_GPU = "Unknown GPU";
|
|
71
|
+
/**
|
|
72
|
+
* The display name of a stored GPU slug. Every UI and server renderer maps
|
|
73
|
+
* slugs through the catalog's terms; nothing renders a slug. Empty while the
|
|
74
|
+
* catalog is still loading.
|
|
75
|
+
*/
|
|
76
|
+
export function gpuDisplay(terms, slug) {
|
|
77
|
+
if (!terms)
|
|
78
|
+
return "";
|
|
79
|
+
if (!slug)
|
|
80
|
+
return UNKNOWN_GPU;
|
|
81
|
+
return terms.find((term) => term.kind === "gpu" && term.canonical === slug)?.display ?? UNKNOWN_GPU;
|
|
82
|
+
}
|
|
83
|
+
/** GPU picker and filter options: slug values with display labels, in catalog order. */
|
|
84
|
+
export function gpuOptions(terms) {
|
|
85
|
+
return (terms ?? [])
|
|
86
|
+
.filter((term) => term.kind === "gpu")
|
|
87
|
+
.map((term) => ({ value: term.canonical, label: term.display }));
|
|
88
|
+
}
|
|
69
89
|
export function resolveCatalogTerm(terms, kind, query) {
|
|
70
90
|
if (looksLikeSpecDump(query) || !normalizeCatalogQuery(query) || !kind.trim()) {
|
|
71
91
|
return { canonical: null, display: null, hint: UNRESOLVED_CATALOG_HINT };
|
|
@@ -93,8 +113,10 @@ export function bindHardwareFields(terms, input, fields) {
|
|
|
93
113
|
continue;
|
|
94
114
|
}
|
|
95
115
|
const resolved = resolveCatalogTerm(terms, kind, value);
|
|
96
|
-
|
|
97
|
-
|
|
116
|
+
// GPUs are stored as slugs; other hardware keeps its display name.
|
|
117
|
+
const bound = kind === "gpu" ? resolved.canonical : resolved.display;
|
|
118
|
+
if (bound) {
|
|
119
|
+
payload[field] = bound;
|
|
98
120
|
continue;
|
|
99
121
|
}
|
|
100
122
|
rejected.push({ field, value });
|
|
@@ -104,7 +126,7 @@ export function bindHardwareFields(terms, input, fields) {
|
|
|
104
126
|
ok: false,
|
|
105
127
|
error: "unknown_catalog_term",
|
|
106
128
|
rejected,
|
|
107
|
-
hint: "Call listings_catalog_terms and retry with a display name from the dump. Do not ask to add spec-sheet text to the dictionary.",
|
|
129
|
+
hint: "Call listings_catalog_terms and retry with a slug, display name or alias from the dump. Do not ask to add spec-sheet text to the dictionary.",
|
|
108
130
|
};
|
|
109
131
|
}
|
|
110
132
|
return { ok: true, payload };
|
|
@@ -121,6 +143,7 @@ export function projectCatalogTerms(terms, kind) {
|
|
|
121
143
|
.filter((term) => (kind?.trim() ? term.kind.toLowerCase() === kind.toLowerCase() : true))
|
|
122
144
|
.map((term) => ({
|
|
123
145
|
kind: term.kind,
|
|
146
|
+
canonical: term.canonical,
|
|
124
147
|
display: term.display,
|
|
125
148
|
aliases: term.aliases ?? [],
|
|
126
149
|
})),
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** One supplier-filtered page, including server-side name search. */
|
|
2
|
+
export async function listSupplierOrganizationPage(fetch, input) {
|
|
3
|
+
const params = `role=supplier&limit=${input.limit}&offset=${input.offset}&sort=created_at&direction=asc` +
|
|
4
|
+
(input.q?.trim() ? `&q=${encodeURIComponent(input.q.trim())}` : "");
|
|
5
|
+
const page = await fetch(`/v1/organizations?${params}`, { method: "GET" });
|
|
6
|
+
if (!Array.isArray(page))
|
|
7
|
+
throw new Error("Invalid supplier directory response.");
|
|
8
|
+
return page;
|
|
9
|
+
}
|
|
10
|
+
/** Authorization uses offset pagination; never return a partial supplier catalog. */
|
|
11
|
+
export async function listSupplierOrganizations(fetch) {
|
|
12
|
+
const rows = [];
|
|
13
|
+
for (let offset = 0; offset < 50_000; offset += 1000) {
|
|
14
|
+
const page = await listSupplierOrganizationPage(fetch, { limit: 1000, offset });
|
|
15
|
+
rows.push(...page);
|
|
16
|
+
if (page.length < 1000)
|
|
17
|
+
return rows;
|
|
18
|
+
}
|
|
19
|
+
throw new Error("Supplier directory exceeded 50 pages; refusing a partial catalog.");
|
|
20
|
+
}
|