@hyper3d/cli 0.0.1 → 0.1.0-beta.2.1
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 +167 -4
- package/dist/account.d.ts +26 -0
- package/dist/account.js +136 -0
- package/dist/account.js.map +1 -0
- package/dist/auth.d.ts +63 -0
- package/dist/auth.js +316 -0
- package/dist/auth.js.map +1 -0
- package/dist/base_schema.json +599 -0
- package/dist/endpoints.d.ts +15 -0
- package/dist/endpoints.js +29 -0
- package/dist/endpoints.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +106 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp.d.ts +99 -0
- package/dist/mcp.js +116 -0
- package/dist/mcp.js.map +1 -0
- package/dist/operations.d.ts +12 -0
- package/dist/operations.js +139 -0
- package/dist/operations.js.map +1 -0
- package/dist/output.d.ts +5 -0
- package/dist/output.js +123 -0
- package/dist/output.js.map +1 -0
- package/dist/schema.d.ts +10 -0
- package/dist/schema.js +33 -0
- package/dist/schema.js.map +1 -0
- package/dist/types.d.ts +22 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/update.d.ts +26 -0
- package/dist/update.js +151 -0
- package/dist/update.js.map +1 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +9 -0
- package/dist/utils.js.map +1 -0
- package/package.json +25 -5
|
@@ -0,0 +1,599 @@
|
|
|
1
|
+
{
|
|
2
|
+
"source": "https://api.hyper3d.com/api/mcp",
|
|
3
|
+
"capturedAt": "2026-09-14T05:44:38.281Z",
|
|
4
|
+
"tools": [
|
|
5
|
+
{
|
|
6
|
+
"name": "rodin_create_uploads",
|
|
7
|
+
"title": "Create Rodin reference image uploads",
|
|
8
|
+
"description": "Create one-hour presigned PUT URLs for 1-5 reference images. After uploading each image successfully, call rodin_generate with the returned upload IDs. ChatGPT Chat mode supports conversation attachments through rodin_import_images. If HTTP PUT is blocked and you know your environment supports granting network access, use its supported permission flow to request access to the hostname of the returned presigned upload URL, then retry PUT after access is granted. If PUT remains unavailable or your environment cannot grant access, tell the user in their language: \"My model environment cannot upload images. You can upload your images and generate a model at https://hyper3d.ai.\"",
|
|
9
|
+
"inputSchema": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"files": {
|
|
13
|
+
"type": "array",
|
|
14
|
+
"items": {
|
|
15
|
+
"type": "object",
|
|
16
|
+
"properties": {
|
|
17
|
+
"filename": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1,
|
|
20
|
+
"maxLength": 128
|
|
21
|
+
},
|
|
22
|
+
"mime_type": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"enum": [
|
|
25
|
+
"image/jpeg",
|
|
26
|
+
"image/png",
|
|
27
|
+
"image/webp",
|
|
28
|
+
"image/tiff",
|
|
29
|
+
"image/gif",
|
|
30
|
+
"image/avif",
|
|
31
|
+
"image/heic",
|
|
32
|
+
"image/heif",
|
|
33
|
+
"image/bmp",
|
|
34
|
+
"image/jp2",
|
|
35
|
+
"image/jpx",
|
|
36
|
+
"image/jpm",
|
|
37
|
+
"image/mj2"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"size_bytes": {
|
|
41
|
+
"type": "integer",
|
|
42
|
+
"exclusiveMinimum": 0
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"required": ["filename", "mime_type", "size_bytes"],
|
|
46
|
+
"additionalProperties": false
|
|
47
|
+
},
|
|
48
|
+
"minItems": 1,
|
|
49
|
+
"maxItems": 5
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": ["files"],
|
|
53
|
+
"additionalProperties": false,
|
|
54
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
55
|
+
},
|
|
56
|
+
"outputSchema": {
|
|
57
|
+
"type": "object",
|
|
58
|
+
"properties": {
|
|
59
|
+
"uploads": {
|
|
60
|
+
"type": "array",
|
|
61
|
+
"items": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"upload_id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"format": "uuid"
|
|
67
|
+
},
|
|
68
|
+
"upload_url": {
|
|
69
|
+
"type": "string",
|
|
70
|
+
"format": "uri"
|
|
71
|
+
},
|
|
72
|
+
"method": {
|
|
73
|
+
"type": "string",
|
|
74
|
+
"const": "PUT"
|
|
75
|
+
},
|
|
76
|
+
"headers": {
|
|
77
|
+
"type": "object",
|
|
78
|
+
"properties": {
|
|
79
|
+
"Content-Type": {
|
|
80
|
+
"type": "string"
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
"required": ["Content-Type"],
|
|
84
|
+
"additionalProperties": false
|
|
85
|
+
},
|
|
86
|
+
"expires_at": {
|
|
87
|
+
"type": "string",
|
|
88
|
+
"format": "date-time"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"required": [
|
|
92
|
+
"upload_id",
|
|
93
|
+
"upload_url",
|
|
94
|
+
"method",
|
|
95
|
+
"headers",
|
|
96
|
+
"expires_at"
|
|
97
|
+
],
|
|
98
|
+
"additionalProperties": false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
"required": ["uploads"],
|
|
103
|
+
"additionalProperties": false,
|
|
104
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
105
|
+
},
|
|
106
|
+
"annotations": {
|
|
107
|
+
"readOnlyHint": false,
|
|
108
|
+
"destructiveHint": false,
|
|
109
|
+
"idempotentHint": false,
|
|
110
|
+
"openWorldHint": true
|
|
111
|
+
},
|
|
112
|
+
"execution": {
|
|
113
|
+
"taskSupport": "forbidden"
|
|
114
|
+
},
|
|
115
|
+
"_meta": {
|
|
116
|
+
"securitySchemes": [
|
|
117
|
+
{
|
|
118
|
+
"type": "oauth2",
|
|
119
|
+
"scopes": ["rodin:generate"]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"name": "rodin_import_images",
|
|
126
|
+
"title": "Import Rodin reference images",
|
|
127
|
+
"description": "For ChatGPT Chat only: import 1-5 user-provided conversation image attachments through OpenAI file parameters. Use the file_id and download_url supplied by ChatGPT. file_name may include a local path such as /mnt/data/reference.jpg; Hyper3D keeps only the final filename (up to 128 characters). Hyper3D downloads and stores the images. On success, call rodin_generate with uploads[].upload_id in the same order as reference_upload_ids. If attachments cannot be passed, tell the user that the model environment cannot upload images and they can upload and generate at https://hyper3d.ai.",
|
|
128
|
+
"inputSchema": {
|
|
129
|
+
"type": "object",
|
|
130
|
+
"properties": {
|
|
131
|
+
"images": {
|
|
132
|
+
"type": "array",
|
|
133
|
+
"items": {
|
|
134
|
+
"type": "object",
|
|
135
|
+
"properties": {
|
|
136
|
+
"download_url": {
|
|
137
|
+
"type": "string"
|
|
138
|
+
},
|
|
139
|
+
"file_id": {
|
|
140
|
+
"type": "string"
|
|
141
|
+
},
|
|
142
|
+
"mime_type": {
|
|
143
|
+
"type": "string"
|
|
144
|
+
},
|
|
145
|
+
"file_name": {
|
|
146
|
+
"type": "string",
|
|
147
|
+
"description": "Original filename or local path, such as reference.jpg or /mnt/data/reference.jpg. Only the final filename is stored, up to 128 characters."
|
|
148
|
+
}
|
|
149
|
+
},
|
|
150
|
+
"required": ["download_url", "file_id"],
|
|
151
|
+
"additionalProperties": false
|
|
152
|
+
},
|
|
153
|
+
"minItems": 1,
|
|
154
|
+
"maxItems": 5
|
|
155
|
+
}
|
|
156
|
+
},
|
|
157
|
+
"required": ["images"],
|
|
158
|
+
"additionalProperties": false,
|
|
159
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
160
|
+
},
|
|
161
|
+
"outputSchema": {
|
|
162
|
+
"type": "object",
|
|
163
|
+
"properties": {
|
|
164
|
+
"uploads": {
|
|
165
|
+
"type": "array",
|
|
166
|
+
"items": {
|
|
167
|
+
"type": "object",
|
|
168
|
+
"properties": {
|
|
169
|
+
"upload_id": {
|
|
170
|
+
"type": "string",
|
|
171
|
+
"format": "uuid"
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
"required": ["upload_id"],
|
|
175
|
+
"additionalProperties": false
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
"required": ["uploads"],
|
|
180
|
+
"additionalProperties": false,
|
|
181
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
182
|
+
},
|
|
183
|
+
"annotations": {
|
|
184
|
+
"readOnlyHint": false,
|
|
185
|
+
"destructiveHint": false,
|
|
186
|
+
"idempotentHint": false,
|
|
187
|
+
"openWorldHint": true
|
|
188
|
+
},
|
|
189
|
+
"execution": {
|
|
190
|
+
"taskSupport": "forbidden"
|
|
191
|
+
},
|
|
192
|
+
"_meta": {
|
|
193
|
+
"securitySchemes": [
|
|
194
|
+
{
|
|
195
|
+
"type": "oauth2",
|
|
196
|
+
"scopes": ["rodin:generate"]
|
|
197
|
+
}
|
|
198
|
+
],
|
|
199
|
+
"openai/fileParams": ["images"]
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "rodin_generate",
|
|
204
|
+
"title": "Generate a Rodin 3D model",
|
|
205
|
+
"description": "Start a Rodin Gen-2.5 generation from a non-empty prompt, one or more reference images, or both. At least one of prompt or reference_upload_ids is required. For image references in ChatGPT Chat, first call rodin_import_images and pass the returned uploads[].upload_id values as reference_upload_ids in order. The presigned upload workflow uses rodin_create_uploads followed by successful HTTP PUT uploads. This consumes credits. The response includes display_url; present that URL only after the generation completes. If this call times out, do not retry it automatically; ask the user to check Hyper3D Mine.",
|
|
206
|
+
"inputSchema": {
|
|
207
|
+
"type": "object",
|
|
208
|
+
"properties": {
|
|
209
|
+
"prompt": {
|
|
210
|
+
"type": "string",
|
|
211
|
+
"minLength": 1,
|
|
212
|
+
"maxLength": 1024,
|
|
213
|
+
"description": "A non-empty text description. Required when reference_upload_ids is omitted."
|
|
214
|
+
},
|
|
215
|
+
"reference_upload_ids": {
|
|
216
|
+
"type": "array",
|
|
217
|
+
"items": {
|
|
218
|
+
"type": "string",
|
|
219
|
+
"format": "uuid"
|
|
220
|
+
},
|
|
221
|
+
"minItems": 1,
|
|
222
|
+
"maxItems": 5,
|
|
223
|
+
"description": "One to five uploaded reference image IDs. Obtain these from rodin_import_images in ChatGPT Chat, or rodin_create_uploads followed by successful PUT uploads. Preserve the intended image order. Required when prompt is omitted."
|
|
224
|
+
},
|
|
225
|
+
"mesh_mode": {
|
|
226
|
+
"type": "string",
|
|
227
|
+
"enum": ["Raw", "Quad"],
|
|
228
|
+
"default": "Raw"
|
|
229
|
+
},
|
|
230
|
+
"tier": {
|
|
231
|
+
"type": "string",
|
|
232
|
+
"enum": ["Gen-2.5-Medium", "Gen-2.5-High", "Gen-2.5-Extreme-Low"],
|
|
233
|
+
"default": "Gen-2.5-Medium"
|
|
234
|
+
},
|
|
235
|
+
"quality_override": {
|
|
236
|
+
"type": "integer",
|
|
237
|
+
"minimum": 500,
|
|
238
|
+
"maximum": 1000000,
|
|
239
|
+
"description": "Target polygon count. Raw accepts 500 to 1,000,000; Quad accepts 1,000 to 50,000."
|
|
240
|
+
},
|
|
241
|
+
"geometry_file_format": {
|
|
242
|
+
"type": "string",
|
|
243
|
+
"enum": ["glb", "usdz", "fbx", "obj", "stl"],
|
|
244
|
+
"default": "glb"
|
|
245
|
+
}
|
|
246
|
+
},
|
|
247
|
+
"additionalProperties": false,
|
|
248
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
249
|
+
},
|
|
250
|
+
"outputSchema": {
|
|
251
|
+
"type": "object",
|
|
252
|
+
"properties": {
|
|
253
|
+
"generation_id": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"format": "uuid"
|
|
256
|
+
},
|
|
257
|
+
"status": {
|
|
258
|
+
"type": "string",
|
|
259
|
+
"const": "queued"
|
|
260
|
+
},
|
|
261
|
+
"display_url": {
|
|
262
|
+
"type": "string",
|
|
263
|
+
"format": "uri"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": ["generation_id", "status", "display_url"],
|
|
267
|
+
"additionalProperties": false,
|
|
268
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
269
|
+
},
|
|
270
|
+
"annotations": {
|
|
271
|
+
"readOnlyHint": false,
|
|
272
|
+
"destructiveHint": false,
|
|
273
|
+
"idempotentHint": false,
|
|
274
|
+
"openWorldHint": true
|
|
275
|
+
},
|
|
276
|
+
"execution": {
|
|
277
|
+
"taskSupport": "forbidden"
|
|
278
|
+
},
|
|
279
|
+
"_meta": {
|
|
280
|
+
"securitySchemes": [
|
|
281
|
+
{
|
|
282
|
+
"type": "oauth2",
|
|
283
|
+
"scopes": ["rodin:generate"]
|
|
284
|
+
}
|
|
285
|
+
]
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
"name": "rodin_generate_bang",
|
|
290
|
+
"title": "Generate BANG from a Rodin generation",
|
|
291
|
+
"description": "Split a completed Rodin generation into parts with BANG. Pass the generation_id returned by rodin_generate as asset_id. This consumes credits. The response includes display_url; present that URL only after the BANG generation completes. If this call times out, do not retry it automatically; ask the user to check Hyper3D Mine.",
|
|
292
|
+
"inputSchema": {
|
|
293
|
+
"type": "object",
|
|
294
|
+
"properties": {
|
|
295
|
+
"asset_id": {
|
|
296
|
+
"type": "string",
|
|
297
|
+
"format": "uuid",
|
|
298
|
+
"description": "The generation_id returned by rodin_generate for the completed model to split."
|
|
299
|
+
},
|
|
300
|
+
"instruction": {
|
|
301
|
+
"type": "string",
|
|
302
|
+
"description": "Optional part-split instruction naming the parts to separate, applied to the source generation image. Omit unless the user describes which parts they want; omitting it uses the automatic split planner."
|
|
303
|
+
},
|
|
304
|
+
"strength": {
|
|
305
|
+
"type": "integer",
|
|
306
|
+
"minimum": 1,
|
|
307
|
+
"maximum": 12,
|
|
308
|
+
"default": 5,
|
|
309
|
+
"description": "Soft target for how many parts BANG should produce."
|
|
310
|
+
},
|
|
311
|
+
"explode_strength": {
|
|
312
|
+
"type": "number",
|
|
313
|
+
"minimum": 0,
|
|
314
|
+
"default": 1,
|
|
315
|
+
"description": "Guidance strength for the BANG split plan."
|
|
316
|
+
},
|
|
317
|
+
"escore": {
|
|
318
|
+
"type": "number",
|
|
319
|
+
"description": "Optional texture complexity control."
|
|
320
|
+
},
|
|
321
|
+
"reference_scale": {
|
|
322
|
+
"type": "number",
|
|
323
|
+
"description": "Optional reference-image adherence control."
|
|
324
|
+
},
|
|
325
|
+
"seed": {
|
|
326
|
+
"type": "integer",
|
|
327
|
+
"minimum": 0,
|
|
328
|
+
"maximum": 65535
|
|
329
|
+
},
|
|
330
|
+
"geometry_file_format": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"enum": ["glb", "usdz", "fbx", "obj", "stl"],
|
|
333
|
+
"default": "glb"
|
|
334
|
+
},
|
|
335
|
+
"resolution": {
|
|
336
|
+
"type": "string",
|
|
337
|
+
"enum": ["Basic", "High"],
|
|
338
|
+
"default": "Basic"
|
|
339
|
+
}
|
|
340
|
+
},
|
|
341
|
+
"required": ["asset_id"],
|
|
342
|
+
"additionalProperties": false,
|
|
343
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
344
|
+
},
|
|
345
|
+
"outputSchema": {
|
|
346
|
+
"type": "object",
|
|
347
|
+
"properties": {
|
|
348
|
+
"generation_id": {
|
|
349
|
+
"type": "string",
|
|
350
|
+
"format": "uuid"
|
|
351
|
+
},
|
|
352
|
+
"status": {
|
|
353
|
+
"type": "string",
|
|
354
|
+
"const": "queued"
|
|
355
|
+
},
|
|
356
|
+
"display_url": {
|
|
357
|
+
"type": "string",
|
|
358
|
+
"format": "uri"
|
|
359
|
+
}
|
|
360
|
+
},
|
|
361
|
+
"required": ["generation_id", "status", "display_url"],
|
|
362
|
+
"additionalProperties": false,
|
|
363
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
364
|
+
},
|
|
365
|
+
"annotations": {
|
|
366
|
+
"readOnlyHint": false,
|
|
367
|
+
"destructiveHint": false,
|
|
368
|
+
"idempotentHint": false,
|
|
369
|
+
"openWorldHint": true
|
|
370
|
+
},
|
|
371
|
+
"execution": {
|
|
372
|
+
"taskSupport": "forbidden"
|
|
373
|
+
},
|
|
374
|
+
"_meta": {
|
|
375
|
+
"securitySchemes": [
|
|
376
|
+
{
|
|
377
|
+
"type": "oauth2",
|
|
378
|
+
"scopes": ["rodin:generate"]
|
|
379
|
+
}
|
|
380
|
+
]
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
{
|
|
384
|
+
"name": "rodin_get_status",
|
|
385
|
+
"title": "Get Rodin generation status",
|
|
386
|
+
"description": "Read the current state and stage of a Rodin generation. stage contains a user-facing name plus a 1-based current position and stable total; current is 0 before the first stage starts.",
|
|
387
|
+
"inputSchema": {
|
|
388
|
+
"type": "object",
|
|
389
|
+
"properties": {
|
|
390
|
+
"generation_id": {
|
|
391
|
+
"type": "string",
|
|
392
|
+
"format": "uuid"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"required": ["generation_id"],
|
|
396
|
+
"additionalProperties": false,
|
|
397
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
398
|
+
},
|
|
399
|
+
"outputSchema": {
|
|
400
|
+
"type": "object",
|
|
401
|
+
"properties": {
|
|
402
|
+
"generation_id": {
|
|
403
|
+
"type": "string",
|
|
404
|
+
"format": "uuid"
|
|
405
|
+
},
|
|
406
|
+
"status": {
|
|
407
|
+
"type": "string",
|
|
408
|
+
"enum": ["queued", "processing", "completed", "failed"]
|
|
409
|
+
},
|
|
410
|
+
"stage": {
|
|
411
|
+
"type": "object",
|
|
412
|
+
"properties": {
|
|
413
|
+
"name": {
|
|
414
|
+
"type": "string"
|
|
415
|
+
},
|
|
416
|
+
"current": {
|
|
417
|
+
"type": "integer",
|
|
418
|
+
"minimum": 0
|
|
419
|
+
},
|
|
420
|
+
"total": {
|
|
421
|
+
"type": "integer",
|
|
422
|
+
"minimum": 0
|
|
423
|
+
}
|
|
424
|
+
},
|
|
425
|
+
"required": ["name", "current", "total"],
|
|
426
|
+
"additionalProperties": false
|
|
427
|
+
},
|
|
428
|
+
"error": {
|
|
429
|
+
"type": "string"
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
"required": ["generation_id", "status", "stage"],
|
|
433
|
+
"additionalProperties": false,
|
|
434
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
435
|
+
},
|
|
436
|
+
"annotations": {
|
|
437
|
+
"readOnlyHint": true,
|
|
438
|
+
"openWorldHint": false
|
|
439
|
+
},
|
|
440
|
+
"execution": {
|
|
441
|
+
"taskSupport": "forbidden"
|
|
442
|
+
},
|
|
443
|
+
"_meta": {
|
|
444
|
+
"securitySchemes": [
|
|
445
|
+
{
|
|
446
|
+
"type": "oauth2",
|
|
447
|
+
"scopes": ["rodin:read"]
|
|
448
|
+
}
|
|
449
|
+
]
|
|
450
|
+
}
|
|
451
|
+
},
|
|
452
|
+
{
|
|
453
|
+
"name": "rodin_wait",
|
|
454
|
+
"title": "Wait briefly for a Rodin generation",
|
|
455
|
+
"description": "Wait up to 45 seconds for a terminal state. A timeout returns the latest state and does not mean generation failed. Progress is reported as stage name/current/total, not a percentage.",
|
|
456
|
+
"inputSchema": {
|
|
457
|
+
"type": "object",
|
|
458
|
+
"properties": {
|
|
459
|
+
"generation_id": {
|
|
460
|
+
"type": "string",
|
|
461
|
+
"format": "uuid"
|
|
462
|
+
},
|
|
463
|
+
"timeout_seconds": {
|
|
464
|
+
"type": "integer",
|
|
465
|
+
"minimum": 1,
|
|
466
|
+
"maximum": 45,
|
|
467
|
+
"default": 30
|
|
468
|
+
}
|
|
469
|
+
},
|
|
470
|
+
"required": ["generation_id"],
|
|
471
|
+
"additionalProperties": false,
|
|
472
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
473
|
+
},
|
|
474
|
+
"outputSchema": {
|
|
475
|
+
"type": "object",
|
|
476
|
+
"properties": {
|
|
477
|
+
"generation_id": {
|
|
478
|
+
"type": "string",
|
|
479
|
+
"format": "uuid"
|
|
480
|
+
},
|
|
481
|
+
"status": {
|
|
482
|
+
"type": "string",
|
|
483
|
+
"enum": ["queued", "processing", "completed", "failed"]
|
|
484
|
+
},
|
|
485
|
+
"stage": {
|
|
486
|
+
"type": "object",
|
|
487
|
+
"properties": {
|
|
488
|
+
"name": {
|
|
489
|
+
"type": "string"
|
|
490
|
+
},
|
|
491
|
+
"current": {
|
|
492
|
+
"type": "integer",
|
|
493
|
+
"minimum": 0
|
|
494
|
+
},
|
|
495
|
+
"total": {
|
|
496
|
+
"type": "integer",
|
|
497
|
+
"minimum": 0
|
|
498
|
+
}
|
|
499
|
+
},
|
|
500
|
+
"required": ["name", "current", "total"],
|
|
501
|
+
"additionalProperties": false
|
|
502
|
+
},
|
|
503
|
+
"error": {
|
|
504
|
+
"type": "string"
|
|
505
|
+
},
|
|
506
|
+
"timed_out": {
|
|
507
|
+
"type": "boolean"
|
|
508
|
+
}
|
|
509
|
+
},
|
|
510
|
+
"required": ["generation_id", "status", "stage", "timed_out"],
|
|
511
|
+
"additionalProperties": false,
|
|
512
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
513
|
+
},
|
|
514
|
+
"annotations": {
|
|
515
|
+
"readOnlyHint": true,
|
|
516
|
+
"openWorldHint": false
|
|
517
|
+
},
|
|
518
|
+
"execution": {
|
|
519
|
+
"taskSupport": "forbidden"
|
|
520
|
+
},
|
|
521
|
+
"_meta": {
|
|
522
|
+
"securitySchemes": [
|
|
523
|
+
{
|
|
524
|
+
"type": "oauth2",
|
|
525
|
+
"scopes": ["rodin:read"]
|
|
526
|
+
}
|
|
527
|
+
]
|
|
528
|
+
}
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"name": "rodin_get_result",
|
|
532
|
+
"title": "Get Rodin model result",
|
|
533
|
+
"description": "Return a permanent Hyper3D result page plus temporary signed URLs for permitted Rodin output files. When presenting a link to the user, always use display_url and never expose files[].url. Only use files[].url to download a file when the user explicitly asks.",
|
|
534
|
+
"inputSchema": {
|
|
535
|
+
"type": "object",
|
|
536
|
+
"properties": {
|
|
537
|
+
"generation_id": {
|
|
538
|
+
"type": "string",
|
|
539
|
+
"format": "uuid"
|
|
540
|
+
}
|
|
541
|
+
},
|
|
542
|
+
"required": ["generation_id"],
|
|
543
|
+
"additionalProperties": false,
|
|
544
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
545
|
+
},
|
|
546
|
+
"outputSchema": {
|
|
547
|
+
"type": "object",
|
|
548
|
+
"properties": {
|
|
549
|
+
"display_url": {
|
|
550
|
+
"type": "string",
|
|
551
|
+
"format": "uri"
|
|
552
|
+
},
|
|
553
|
+
"files": {
|
|
554
|
+
"type": "array",
|
|
555
|
+
"items": {
|
|
556
|
+
"type": "object",
|
|
557
|
+
"properties": {
|
|
558
|
+
"name": {
|
|
559
|
+
"type": "string"
|
|
560
|
+
},
|
|
561
|
+
"role": {
|
|
562
|
+
"type": "string",
|
|
563
|
+
"enum": ["model", "preview", "texture", "sidecar"]
|
|
564
|
+
},
|
|
565
|
+
"mime_type": {
|
|
566
|
+
"type": "string"
|
|
567
|
+
},
|
|
568
|
+
"url": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"format": "uri"
|
|
571
|
+
}
|
|
572
|
+
},
|
|
573
|
+
"required": ["name", "role", "mime_type", "url"],
|
|
574
|
+
"additionalProperties": false
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
},
|
|
578
|
+
"required": ["display_url", "files"],
|
|
579
|
+
"additionalProperties": false,
|
|
580
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
581
|
+
},
|
|
582
|
+
"annotations": {
|
|
583
|
+
"readOnlyHint": true,
|
|
584
|
+
"openWorldHint": true
|
|
585
|
+
},
|
|
586
|
+
"execution": {
|
|
587
|
+
"taskSupport": "forbidden"
|
|
588
|
+
},
|
|
589
|
+
"_meta": {
|
|
590
|
+
"securitySchemes": [
|
|
591
|
+
{
|
|
592
|
+
"type": "oauth2",
|
|
593
|
+
"scopes": ["rodin:read"]
|
|
594
|
+
}
|
|
595
|
+
]
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
]
|
|
599
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const DEFAULT_BASE_URL = "https://api.hyper3d.com/api";
|
|
2
|
+
export declare function secureUrl(value: string | URL | Request): URL;
|
|
3
|
+
export declare function resolveEndpoints(value?: string): {
|
|
4
|
+
baseUrl: string;
|
|
5
|
+
mcp: string;
|
|
6
|
+
userInfo: string;
|
|
7
|
+
groupInfo: string;
|
|
8
|
+
};
|
|
9
|
+
export declare let endpoints: {
|
|
10
|
+
baseUrl: string;
|
|
11
|
+
mcp: string;
|
|
12
|
+
userInfo: string;
|
|
13
|
+
groupInfo: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function configureEndpoints(baseUrl: string): void;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export const DEFAULT_BASE_URL = 'https://api.hyper3d.com/api';
|
|
2
|
+
export function secureUrl(value) {
|
|
3
|
+
const url = new URL(value instanceof Request ? value.url : value);
|
|
4
|
+
if (url.username ||
|
|
5
|
+
url.password ||
|
|
6
|
+
url.hash ||
|
|
7
|
+
(url.protocol !== 'https:' &&
|
|
8
|
+
!(url.protocol === 'http:' &&
|
|
9
|
+
['localhost', '127.0.0.1', '[::1]'].includes(url.hostname))))
|
|
10
|
+
throw new Error('URLs must use HTTPS (HTTP is allowed for localhost tests).');
|
|
11
|
+
return url;
|
|
12
|
+
}
|
|
13
|
+
export function resolveEndpoints(value = DEFAULT_BASE_URL) {
|
|
14
|
+
const base = secureUrl(value);
|
|
15
|
+
if (base.search)
|
|
16
|
+
throw new Error('BASE_URL must not contain a query string.');
|
|
17
|
+
base.pathname = `${base.pathname.replace(/\/+$/, '')}/`;
|
|
18
|
+
return {
|
|
19
|
+
baseUrl: base.href,
|
|
20
|
+
mcp: new URL('mcp', base).href,
|
|
21
|
+
userInfo: new URL('user/get_info', base).href,
|
|
22
|
+
groupInfo: new URL('group/group_info', base).href,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
export let endpoints = resolveEndpoints();
|
|
26
|
+
export function configureEndpoints(baseUrl) {
|
|
27
|
+
endpoints = resolveEndpoints(baseUrl);
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=endpoints.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"endpoints.js","sourceRoot":"","sources":["../src/endpoints.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAE9D,MAAM,UAAU,SAAS,CAAC,KAA6B;IACrD,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,KAAK,YAAY,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;IAClE,IACE,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,QAAQ;QACZ,GAAG,CAAC,IAAI;QACR,CAAC,GAAG,CAAC,QAAQ,KAAK,QAAQ;YACxB,CAAC,CACC,GAAG,CAAC,QAAQ,KAAK,OAAO;gBACxB,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,CAC3D,CAAC;QAEJ,MAAM,IAAI,KAAK,CACb,4DAA4D,CAC7D,CAAC;IACJ,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,UAAU,gBAAgB,CAAC,KAAK,GAAG,gBAAgB;IACvD,MAAM,IAAI,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9B,IAAI,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC9E,IAAI,CAAC,QAAQ,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,GAAG,CAAC;IACxD,OAAO;QACL,OAAO,EAAE,IAAI,CAAC,IAAI;QAClB,GAAG,EAAE,IAAI,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,IAAI;QAC9B,QAAQ,EAAE,IAAI,GAAG,CAAC,eAAe,EAAE,IAAI,CAAC,CAAC,IAAI;QAC7C,SAAS,EAAE,IAAI,GAAG,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC,IAAI;KAClD,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,IAAI,SAAS,GAAG,gBAAgB,EAAE,CAAC;AAE1C,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC"}
|
package/dist/index.d.ts
ADDED