upres-cli 0.1.1 → 0.3.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 +79 -37
- package/dist/cli.cjs +381 -251
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +383 -251
- package/dist/cli.js.map +1 -1
- package/dist/client.cjs +27 -13
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +5 -1
- package/dist/client.d.ts +5 -1
- package/dist/client.js +25 -12
- package/dist/client.js.map +1 -1
- package/dist/mcp.cjs +310 -0
- package/dist/mcp.cjs.map +1 -0
- package/dist/mcp.d.cts +6 -0
- package/dist/mcp.d.ts +6 -0
- package/dist/mcp.js +283 -0
- package/dist/mcp.js.map +1 -0
- package/dist/models.cjs +51 -214
- package/dist/models.cjs.map +1 -1
- package/dist/models.d.cts +5 -3
- package/dist/models.d.ts +5 -3
- package/dist/models.js +49 -214
- package/dist/models.js.map +1 -1
- package/dist/types.cjs +0 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.js +0 -0
- package/package.json +54 -12
- package/scripts/check-mcp-registry.sh +51 -0
- package/scripts/ensure-dist.mjs +15 -0
package/dist/models.js
CHANGED
|
@@ -1,221 +1,56 @@
|
|
|
1
1
|
// src/models.ts
|
|
2
|
+
function scaleParam(maxScale) {
|
|
3
|
+
if (maxScale <= 1) return [];
|
|
4
|
+
const options = [];
|
|
5
|
+
for (let step = 2; step <= maxScale; step *= 2) options.push(step);
|
|
6
|
+
return [
|
|
7
|
+
{
|
|
8
|
+
name: "scale",
|
|
9
|
+
type: "integer",
|
|
10
|
+
required: false,
|
|
11
|
+
default: 4,
|
|
12
|
+
options,
|
|
13
|
+
description: "Scale multiplier. Ignored when the alias does not enlarge."
|
|
14
|
+
}
|
|
15
|
+
];
|
|
16
|
+
}
|
|
17
|
+
function model(id, name, description, category, inputTypes, maxScale) {
|
|
18
|
+
const fileParam = category.startsWith("video") ? { name: "video", type: "string", required: true, description: "Video URL or file" } : category.startsWith("audio") ? { name: "audio", type: "string", required: true, description: "Audio URL or file" } : { name: "image", type: "string", required: true, description: "Image URL or file" };
|
|
19
|
+
return {
|
|
20
|
+
id,
|
|
21
|
+
name,
|
|
22
|
+
description,
|
|
23
|
+
category,
|
|
24
|
+
price: "One credit per stage that runs",
|
|
25
|
+
inputTypes,
|
|
26
|
+
params: [fileParam, ...scaleParam(maxScale)]
|
|
27
|
+
};
|
|
28
|
+
}
|
|
2
29
|
var MODELS = [
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
description: "AI upscaler to 2K/4K/8K with detail preservation.",
|
|
18
|
-
category: "image-upscale",
|
|
19
|
-
price: "$0.01/image",
|
|
20
|
-
inputTypes: ["image/*"],
|
|
21
|
-
params: [
|
|
22
|
-
{ name: "image", type: "string", required: true, description: "Image URL" },
|
|
23
|
-
{ name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
|
|
24
|
-
{ name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
id: "wavespeed-ai/ultimate-image-upscaler",
|
|
29
|
-
name: "Ultimate Image Upscaler",
|
|
30
|
-
description: "Most advanced AI enhancer. Reimagines fine detail at 2K/4K/8K.",
|
|
31
|
-
category: "image-upscale",
|
|
32
|
-
price: "$0.01/image",
|
|
33
|
-
inputTypes: ["image/*"],
|
|
34
|
-
params: [
|
|
35
|
-
{ name: "image", type: "string", required: true, description: "Image URL" },
|
|
36
|
-
{ name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
|
|
37
|
-
{ name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
|
|
38
|
-
]
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
id: "wavespeed-ai/seedvr2/image",
|
|
42
|
-
name: "SeedVR2 Image",
|
|
43
|
-
description: "ByteDance SeedVR2 architecture for sharp, detailed upscaling.",
|
|
44
|
-
category: "image-upscale",
|
|
45
|
-
price: "$0.01/image",
|
|
46
|
-
inputTypes: ["image/*"],
|
|
47
|
-
params: [
|
|
48
|
-
{ name: "image", type: "string", required: true, description: "Image URL" },
|
|
49
|
-
{ name: "target_resolution", type: "string", required: false, default: "4k", options: ["2k", "4k", "8k"], description: "Target output resolution" },
|
|
50
|
-
{ name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
|
|
51
|
-
]
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
id: "bria/increase-resolution",
|
|
55
|
-
name: "Bria Increase Resolution",
|
|
56
|
-
description: "Preservation-first 2x/4x upscale. No content drift.",
|
|
57
|
-
category: "image-upscale",
|
|
58
|
-
price: "$0.04/image",
|
|
59
|
-
inputTypes: ["image/*"],
|
|
60
|
-
params: [
|
|
61
|
-
{ name: "image", type: "string", required: true, description: "Image URL. Max output 8192x8192" },
|
|
62
|
-
{ name: "desired_increase", type: "integer", required: false, default: 2, options: [2, 4], description: "Resolution multiplier" }
|
|
63
|
-
]
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
id: "clarity-ai/crystal-upscaler",
|
|
67
|
-
name: "Crystal Upscaler",
|
|
68
|
-
description: "Upscale to target megapixels with creativity control.",
|
|
69
|
-
category: "image-upscale",
|
|
70
|
-
price: "Pay per use",
|
|
71
|
-
inputTypes: ["image/*"],
|
|
72
|
-
params: [
|
|
73
|
-
{ name: "image", type: "string", required: true, description: "Image URL" },
|
|
74
|
-
{ name: "target_megapixels", type: "number", required: false, default: 2, range: "1-200", description: "Target size in megapixels" },
|
|
75
|
-
{ name: "creativity", type: "number", required: false, default: 0, range: "0-10", description: "Quality improvement strength" }
|
|
76
|
-
]
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
id: "recraft-ai/recraft-crisp-upscale",
|
|
80
|
-
name: "Recraft Crisp Upscale",
|
|
81
|
-
description: "Enhances textures and facial features. Ideal for portraits.",
|
|
82
|
-
category: "image-enhance",
|
|
83
|
-
price: "Pay per use",
|
|
84
|
-
inputTypes: ["image/*"],
|
|
85
|
-
params: [
|
|
86
|
-
{ name: "image", type: "string", required: true, description: "Image URL or base64" }
|
|
87
|
-
]
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
id: "recraft-ai/recraft-creative-upscale",
|
|
91
|
-
name: "Recraft Creative Upscale",
|
|
92
|
-
description: "Generative enhancement adding depth and polish to complex elements.",
|
|
93
|
-
category: "image-enhance",
|
|
94
|
-
price: "$0.25/image",
|
|
95
|
-
inputTypes: ["image/*"],
|
|
96
|
-
params: [
|
|
97
|
-
{ name: "image", type: "string", required: true, description: "Image URL or base64" }
|
|
98
|
-
]
|
|
99
|
-
},
|
|
100
|
-
{
|
|
101
|
-
id: "wavespeed-ai/phota/enhance",
|
|
102
|
-
name: "Phota Enhance",
|
|
103
|
-
description: "Batch enhancement up to 4 images per run with optional 4K output.",
|
|
104
|
-
category: "image-enhance",
|
|
105
|
-
price: "$0.09/image",
|
|
106
|
-
inputTypes: ["image/*"],
|
|
107
|
-
params: [
|
|
108
|
-
{ name: "image", type: "string", required: true, description: "Image URL or base64 data URI" },
|
|
109
|
-
{ name: "num_images", type: "integer", required: false, default: 1, range: "1-4", description: "Enhanced variations to generate" },
|
|
110
|
-
{ name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
|
|
111
|
-
]
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
id: "wavespeed-ai/z-image-turbo/image-to-image",
|
|
115
|
-
name: "Z-Image Turbo",
|
|
116
|
-
description: "Fast enhance with strength control. Low strength = subtle upscale.",
|
|
117
|
-
category: "image-enhance",
|
|
118
|
-
price: "$0.01/image",
|
|
119
|
-
inputTypes: ["image/*"],
|
|
120
|
-
params: [
|
|
121
|
-
{ name: "image", type: "string", required: true, description: "Reference image URL" },
|
|
122
|
-
{ name: "prompt", type: "string", required: true, description: "Enhancement prompt", default: "enhance image quality, sharp details" },
|
|
123
|
-
{ name: "strength", type: "number", required: false, default: 0.2, range: "0.00-1.00", description: "0-0.3 subtle enhance, 0.3-0.6 moderate, 0.6+ creative" },
|
|
124
|
-
{ name: "size", type: "string", required: false, default: "1024*1024", description: "Output size (width*height)" },
|
|
125
|
-
{ name: "seed", type: "integer", required: false, default: -1, range: "-1-2147483647", description: "Random seed. -1 = random" },
|
|
126
|
-
{ name: "output_format", type: "string", required: false, default: "jpeg", options: ["jpeg", "png", "webp"], description: "Output format" }
|
|
127
|
-
]
|
|
128
|
-
},
|
|
129
|
-
{
|
|
130
|
-
id: "wavespeed-ai/video-upscaler",
|
|
131
|
-
name: "Video Upscaler",
|
|
132
|
-
description: "Fast AI video upscaling to 720p-4K. Best value for video.",
|
|
133
|
-
category: "video-upscale",
|
|
134
|
-
price: "$0.005-0.02/sec",
|
|
135
|
-
inputTypes: ["video/*"],
|
|
136
|
-
params: [
|
|
137
|
-
{ name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
|
|
138
|
-
{ name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
|
|
139
|
-
]
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
id: "wavespeed-ai/video-upscaler-pro",
|
|
143
|
-
name: "Video Upscaler Pro",
|
|
144
|
-
description: "Motion-aware processing with artifact cleanup for pro results.",
|
|
145
|
-
category: "video-upscale",
|
|
146
|
-
price: "$0.03-0.05/sec",
|
|
147
|
-
inputTypes: ["video/*"],
|
|
148
|
-
params: [
|
|
149
|
-
{ name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
|
|
150
|
-
{ name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
|
|
151
|
-
]
|
|
152
|
-
},
|
|
153
|
-
{
|
|
154
|
-
id: "wavespeed-ai/ultimate-video-upscaler",
|
|
155
|
-
name: "Ultimate Video Upscaler",
|
|
156
|
-
description: "Deep learning detail reconstruction for highest quality 4K video.",
|
|
157
|
-
category: "video-upscale",
|
|
158
|
-
price: "$0.02-0.08/sec",
|
|
159
|
-
inputTypes: ["video/*"],
|
|
160
|
-
params: [
|
|
161
|
-
{ name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
|
|
162
|
-
{ name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
|
|
163
|
-
]
|
|
164
|
-
},
|
|
165
|
-
{
|
|
166
|
-
id: "wavespeed-ai/seedvr2/video",
|
|
167
|
-
name: "SeedVR2 Video",
|
|
168
|
-
description: "16B param ByteDance model. Highest fidelity with frame consistency.",
|
|
169
|
-
category: "video-upscale",
|
|
170
|
-
price: "$0.02-0.05/sec",
|
|
171
|
-
inputTypes: ["video/*"],
|
|
172
|
-
params: [
|
|
173
|
-
{ name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" },
|
|
174
|
-
{ name: "target_resolution", type: "string", required: false, default: "1080p", options: ["720p", "1080p", "2k", "4k"], description: "Target resolution" }
|
|
175
|
-
]
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
id: "bytedance/video-upscaler",
|
|
179
|
-
name: "ByteDance Video Upscaler",
|
|
180
|
-
description: "ByteDance super-resolution recovering fine detail to 4K.",
|
|
181
|
-
category: "video-upscale",
|
|
182
|
-
price: "$0.007-0.029/sec",
|
|
183
|
-
inputTypes: ["video/*"],
|
|
184
|
-
params: [
|
|
185
|
-
{ name: "video", type: "string", required: true, description: "Video URL" },
|
|
186
|
-
{ name: "target_resolution", type: "string", required: false, default: "1080p", options: ["1080p", "2k", "4k"], description: "Target resolution" }
|
|
187
|
-
]
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "bria/fibo/video-upscaler",
|
|
191
|
-
name: "Bria Video Upscaler",
|
|
192
|
-
description: "Temporal consistency with multiple output codec options.",
|
|
193
|
-
category: "video-upscale",
|
|
194
|
-
price: "$0.14/sec",
|
|
195
|
-
inputTypes: ["video/*"],
|
|
196
|
-
params: [
|
|
197
|
-
{ name: "video", type: "string", required: true, description: "Video URL" },
|
|
198
|
-
{ name: "target_resolution", type: "string", required: false, default: "2k", options: ["2k", "4k"], description: "Target resolution" },
|
|
199
|
-
{ name: "output_container_and_codec", type: "string", required: false, default: "mp4_h264", options: ["webm_vp9", "mp4_h264", "mp4_h265", "mov_h265", "mov_prores4s", "mkv_h264", "mkv_h265", "mkv_vp9", "gif"], description: "Output container and codec" }
|
|
200
|
-
]
|
|
201
|
-
},
|
|
202
|
-
{
|
|
203
|
-
id: "runwayml/upscale-v1",
|
|
204
|
-
name: "RunwayML Upscale",
|
|
205
|
-
description: "Simple one-click video upscale to 4K by RunwayML.",
|
|
206
|
-
category: "video-upscale",
|
|
207
|
-
price: "$0.02/sec",
|
|
208
|
-
inputTypes: ["video/*"],
|
|
209
|
-
params: [
|
|
210
|
-
{ name: "video", type: "string", required: true, description: "Video URL. Max 10 minutes" }
|
|
211
|
-
]
|
|
212
|
-
}
|
|
30
|
+
model("flare", "Flare", "Everyday photos, 2x-4x. Fastest and cheapest. Does not invent detail.", "image-upscale", ["image/*"], 4),
|
|
31
|
+
model("prism", "Prism", "Text, logos, screenshots and product shots. Keeps edges true, does not invent detail.", "image-upscale", ["image/*"], 4),
|
|
32
|
+
model("lumen", "Lumen", "Maximum detail recovery for print, up to 8x. Slower and dearer than Flare.", "image-upscale", ["image/*"], 8),
|
|
33
|
+
model("mirage", "Mirage", "Invents plausible new detail rather than recovering what was there. Good for art, wrong for documents.", "image-upscale", ["image/*"], 8),
|
|
34
|
+
model("hush", "Hush", "Faithful denoise. Same size as the source, nothing invented.", "image-clean", ["image/*"], 1),
|
|
35
|
+
model("keen", "Keen", "Deblur and sharpen. Same size as the source, does not invent texture.", "image-restore", ["image/*"], 1),
|
|
36
|
+
model("visage", "Visage", "Restores faces and leaves the rest of the frame alone. Does not enlarge.", "image-restore", ["image/*"], 1),
|
|
37
|
+
model("atelier", "Atelier", "Hush, then Visage if the photo looks like a portrait, then Lumen. A skipped face stage is free.", "image-studio", ["image/*"], 8),
|
|
38
|
+
model("motion", "Motion", "Fast 4K finish for AI-generated video. Frame-consistent, does not invent faces.", "video-upscale", ["video/*"], 4),
|
|
39
|
+
model("motion-x", "Motion X", "Cinema-grade video upscale. Noticeably slower and dearer per second than Motion.", "video-upscale", ["video/*"], 4),
|
|
40
|
+
model("still", "Still", "Temporal video denoise. Resolution stays put.", "video-clean", ["video/*"], 1),
|
|
41
|
+
model("cadence", "Cadence", "Frame interpolation. Does not enlarge the picture.", "video-restore", ["video/*"], 1),
|
|
42
|
+
model("atelier-x", "Atelier X", "Still, then Motion X. Two credits.", "video-studio", ["video/*"], 4),
|
|
43
|
+
model("voice", "Voice", "Speech denoise and bandwidth extension to 48 kHz. Not for music.", "audio-clean", ["audio/*"], 1)
|
|
213
44
|
];
|
|
214
|
-
var IMAGE_MODELS = MODELS.filter((m) => m.category
|
|
215
|
-
var VIDEO_MODELS = MODELS.filter((m) => m.category
|
|
216
|
-
var
|
|
217
|
-
var
|
|
45
|
+
var IMAGE_MODELS = MODELS.filter((m) => m.category.startsWith("image"));
|
|
46
|
+
var VIDEO_MODELS = MODELS.filter((m) => m.category.startsWith("video"));
|
|
47
|
+
var AUDIO_MODELS = MODELS.filter((m) => m.category.startsWith("audio"));
|
|
48
|
+
var DEFAULT_IMAGE_MODEL = "flare";
|
|
49
|
+
var DEFAULT_VIDEO_MODEL = "motion";
|
|
50
|
+
var DEFAULT_AUDIO_MODEL = "voice";
|
|
218
51
|
export {
|
|
52
|
+
AUDIO_MODELS,
|
|
53
|
+
DEFAULT_AUDIO_MODEL,
|
|
219
54
|
DEFAULT_IMAGE_MODEL,
|
|
220
55
|
DEFAULT_VIDEO_MODEL,
|
|
221
56
|
IMAGE_MODELS,
|
package/dist/models.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import type { ModelDefinition } from \"./types.js\";\n\nexport const MODELS: ModelDefinition[] = [\n {\n id: \"wavespeed-ai/real-esrgan\",\n name: \"Real-ESRGAN\",\n description: \"Fast image super-resolution with artifact removal. Best value.\",\n category: \"image-upscale\",\n price: \"$0.0024/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n ],\n },\n {\n id: \"wavespeed-ai/image-upscaler\",\n name: \"Image Upscaler\",\n description: \"AI upscaler to 2K/4K/8K with detail preservation.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/ultimate-image-upscaler\",\n name: \"Ultimate Image Upscaler\",\n description: \"Most advanced AI enhancer. Reimagines fine detail at 2K/4K/8K.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/seedvr2/image\",\n name: \"SeedVR2 Image\",\n description: \"ByteDance SeedVR2 architecture for sharp, detailed upscaling.\",\n category: \"image-upscale\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"4k\", options: [\"2k\", \"4k\", \"8k\"], description: \"Target output resolution\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"bria/increase-resolution\",\n name: \"Bria Increase Resolution\",\n description: \"Preservation-first 2x/4x upscale. No content drift.\",\n category: \"image-upscale\",\n price: \"$0.04/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL. Max output 8192x8192\" },\n { name: \"desired_increase\", type: \"integer\", required: false, default: 2, options: [2, 4], description: \"Resolution multiplier\" },\n ],\n },\n {\n id: \"clarity-ai/crystal-upscaler\",\n name: \"Crystal Upscaler\",\n description: \"Upscale to target megapixels with creativity control.\",\n category: \"image-upscale\",\n price: \"Pay per use\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL\" },\n { name: \"target_megapixels\", type: \"number\", required: false, default: 2, range: \"1-200\", description: \"Target size in megapixels\" },\n { name: \"creativity\", type: \"number\", required: false, default: 0, range: \"0-10\", description: \"Quality improvement strength\" },\n ],\n },\n {\n id: \"recraft-ai/recraft-crisp-upscale\",\n name: \"Recraft Crisp Upscale\",\n description: \"Enhances textures and facial features. Ideal for portraits.\",\n category: \"image-enhance\",\n price: \"Pay per use\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64\" },\n ],\n },\n {\n id: \"recraft-ai/recraft-creative-upscale\",\n name: \"Recraft Creative Upscale\",\n description: \"Generative enhancement adding depth and polish to complex elements.\",\n category: \"image-enhance\",\n price: \"$0.25/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64\" },\n ],\n },\n {\n id: \"wavespeed-ai/phota/enhance\",\n name: \"Phota Enhance\",\n description: \"Batch enhancement up to 4 images per run with optional 4K output.\",\n category: \"image-enhance\",\n price: \"$0.09/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Image URL or base64 data URI\" },\n { name: \"num_images\", type: \"integer\", required: false, default: 1, range: \"1-4\", description: \"Enhanced variations to generate\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/z-image-turbo/image-to-image\",\n name: \"Z-Image Turbo\",\n description: \"Fast enhance with strength control. Low strength = subtle upscale.\",\n category: \"image-enhance\",\n price: \"$0.01/image\",\n inputTypes: [\"image/*\"],\n params: [\n { name: \"image\", type: \"string\", required: true, description: \"Reference image URL\" },\n { name: \"prompt\", type: \"string\", required: true, description: \"Enhancement prompt\", default: \"enhance image quality, sharp details\" },\n { name: \"strength\", type: \"number\", required: false, default: 0.2, range: \"0.00-1.00\", description: \"0-0.3 subtle enhance, 0.3-0.6 moderate, 0.6+ creative\" },\n { name: \"size\", type: \"string\", required: false, default: \"1024*1024\", description: \"Output size (width*height)\" },\n { name: \"seed\", type: \"integer\", required: false, default: -1, range: \"-1-2147483647\", description: \"Random seed. -1 = random\" },\n { name: \"output_format\", type: \"string\", required: false, default: \"jpeg\", options: [\"jpeg\", \"png\", \"webp\"], description: \"Output format\" },\n ],\n },\n {\n id: \"wavespeed-ai/video-upscaler\",\n name: \"Video Upscaler\",\n description: \"Fast AI video upscaling to 720p-4K. Best value for video.\",\n category: \"video-upscale\",\n price: \"$0.005-0.02/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/video-upscaler-pro\",\n name: \"Video Upscaler Pro\",\n description: \"Motion-aware processing with artifact cleanup for pro results.\",\n category: \"video-upscale\",\n price: \"$0.03-0.05/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/ultimate-video-upscaler\",\n name: \"Ultimate Video Upscaler\",\n description: \"Deep learning detail reconstruction for highest quality 4K video.\",\n category: \"video-upscale\",\n price: \"$0.02-0.08/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"wavespeed-ai/seedvr2/video\",\n name: \"SeedVR2 Video\",\n description: \"16B param ByteDance model. Highest fidelity with frame consistency.\",\n category: \"video-upscale\",\n price: \"$0.02-0.05/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"720p\", \"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"bytedance/video-upscaler\",\n name: \"ByteDance Video Upscaler\",\n description: \"ByteDance super-resolution recovering fine detail to 4K.\",\n category: \"video-upscale\",\n price: \"$0.007-0.029/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"1080p\", options: [\"1080p\", \"2k\", \"4k\"], description: \"Target resolution\" },\n ],\n },\n {\n id: \"bria/fibo/video-upscaler\",\n name: \"Bria Video Upscaler\",\n description: \"Temporal consistency with multiple output codec options.\",\n category: \"video-upscale\",\n price: \"$0.14/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL\" },\n { name: \"target_resolution\", type: \"string\", required: false, default: \"2k\", options: [\"2k\", \"4k\"], description: \"Target resolution\" },\n { name: \"output_container_and_codec\", type: \"string\", required: false, default: \"mp4_h264\", options: [\"webm_vp9\", \"mp4_h264\", \"mp4_h265\", \"mov_h265\", \"mov_prores4s\", \"mkv_h264\", \"mkv_h265\", \"mkv_vp9\", \"gif\"], description: \"Output container and codec\" },\n ],\n },\n {\n id: \"runwayml/upscale-v1\",\n name: \"RunwayML Upscale\",\n description: \"Simple one-click video upscale to 4K by RunwayML.\",\n category: \"video-upscale\",\n price: \"$0.02/sec\",\n inputTypes: [\"video/*\"],\n params: [\n { name: \"video\", type: \"string\", required: true, description: \"Video URL. Max 10 minutes\" },\n ],\n },\n];\n\nexport const IMAGE_MODELS = MODELS.filter((m) => m.category !== \"video-upscale\");\nexport const VIDEO_MODELS = MODELS.filter((m) => m.category === \"video-upscale\");\nexport const DEFAULT_IMAGE_MODEL = \"wavespeed-ai/image-upscaler\";\nexport const DEFAULT_VIDEO_MODEL = \"wavespeed-ai/video-upscaler\";\n"],"mappings":";AAEO,IAAM,SAA4B;AAAA,EACvC;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,UAAU;AAAA,IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,YAAY;AAAA,IAC5E;AAAA,EACF;AAAA,EACA;AAAA,IACE,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IAC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IACV,OAAO;AAAA,IACP,YAAY,CAAC,SAAS;AAAA,IACtB,QAAQ;AAAA,MACN,EAAE,MAAM,SAAS,MAAM,UAAU,UAAU,MAAM,aAAa,4BAA4B;AAAA,IAC5F;AAAA,EACF;AACF;AAEO,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,aAAa,eAAe;AACxE,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/models.ts"],"sourcesContent":["import type { ModelDefinition } from \"./types.js\";\n\n// Synced with the public aliases in upres.ai server/contract/models.ts.\n// A job names one alias. Which backend serves it is ours to choose and can\n// change without notice — that is how a failing vendor stops being your outage.\n// Aliases with max scale 1 do not enlarge; the API stores scale 1 for them.\n\nfunction scaleParam(maxScale: number): ModelDefinition[\"params\"] {\n if (maxScale <= 1) return [];\n const options: number[] = [];\n for (let step = 2; step <= maxScale; step *= 2) options.push(step);\n return [\n {\n name: \"scale\",\n type: \"integer\",\n required: false,\n default: 4,\n options,\n description: \"Scale multiplier. Ignored when the alias does not enlarge.\",\n },\n ];\n}\n\nfunction model(\n id: string,\n name: string,\n description: string,\n category: ModelDefinition[\"category\"],\n inputTypes: string[],\n maxScale: number,\n): ModelDefinition {\n const fileParam =\n category.startsWith(\"video\")\n ? { name: \"video\", type: \"string\" as const, required: true, description: \"Video URL or file\" }\n : category.startsWith(\"audio\")\n ? { name: \"audio\", type: \"string\" as const, required: true, description: \"Audio URL or file\" }\n : { name: \"image\", type: \"string\" as const, required: true, description: \"Image URL or file\" };\n return {\n id,\n name,\n description,\n category,\n price: \"One credit per stage that runs\",\n inputTypes,\n params: [fileParam, ...scaleParam(maxScale)],\n };\n}\n\nexport const MODELS: ModelDefinition[] = [\n model(\"flare\", \"Flare\", \"Everyday photos, 2x-4x. Fastest and cheapest. Does not invent detail.\", \"image-upscale\", [\"image/*\"], 4),\n model(\"prism\", \"Prism\", \"Text, logos, screenshots and product shots. Keeps edges true, does not invent detail.\", \"image-upscale\", [\"image/*\"], 4),\n model(\"lumen\", \"Lumen\", \"Maximum detail recovery for print, up to 8x. Slower and dearer than Flare.\", \"image-upscale\", [\"image/*\"], 8),\n model(\"mirage\", \"Mirage\", \"Invents plausible new detail rather than recovering what was there. Good for art, wrong for documents.\", \"image-upscale\", [\"image/*\"], 8),\n model(\"hush\", \"Hush\", \"Faithful denoise. Same size as the source, nothing invented.\", \"image-clean\", [\"image/*\"], 1),\n model(\"keen\", \"Keen\", \"Deblur and sharpen. Same size as the source, does not invent texture.\", \"image-restore\", [\"image/*\"], 1),\n model(\"visage\", \"Visage\", \"Restores faces and leaves the rest of the frame alone. Does not enlarge.\", \"image-restore\", [\"image/*\"], 1),\n model(\"atelier\", \"Atelier\", \"Hush, then Visage if the photo looks like a portrait, then Lumen. A skipped face stage is free.\", \"image-studio\", [\"image/*\"], 8),\n model(\"motion\", \"Motion\", \"Fast 4K finish for AI-generated video. Frame-consistent, does not invent faces.\", \"video-upscale\", [\"video/*\"], 4),\n model(\"motion-x\", \"Motion X\", \"Cinema-grade video upscale. Noticeably slower and dearer per second than Motion.\", \"video-upscale\", [\"video/*\"], 4),\n model(\"still\", \"Still\", \"Temporal video denoise. Resolution stays put.\", \"video-clean\", [\"video/*\"], 1),\n model(\"cadence\", \"Cadence\", \"Frame interpolation. Does not enlarge the picture.\", \"video-restore\", [\"video/*\"], 1),\n model(\"atelier-x\", \"Atelier X\", \"Still, then Motion X. Two credits.\", \"video-studio\", [\"video/*\"], 4),\n model(\"voice\", \"Voice\", \"Speech denoise and bandwidth extension to 48 kHz. Not for music.\", \"audio-clean\", [\"audio/*\"], 1),\n];\n\nexport const IMAGE_MODELS = MODELS.filter((m) => m.category.startsWith(\"image\"));\nexport const VIDEO_MODELS = MODELS.filter((m) => m.category.startsWith(\"video\"));\nexport const AUDIO_MODELS = MODELS.filter((m) => m.category.startsWith(\"audio\"));\n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,SAAS,GAAG,CAAC;AAAA,EACnH,MAAM,QAAQ,QAAQ,yEAAyE,iBAAiB,CAAC,SAAS,GAAG,CAAC;AAAA,EAC9H,MAAM,UAAU,UAAU,4EAA4E,iBAAiB,CAAC,SAAS,GAAG,CAAC;AAAA,EACrI,MAAM,WAAW,WAAW,mGAAmG,gBAAgB,CAAC,SAAS,GAAG,CAAC;AAAA,EAC7J,MAAM,UAAU,UAAU,mFAAmF,iBAAiB,CAAC,SAAS,GAAG,CAAC;AAAA,EAC5I,MAAM,YAAY,YAAY,oFAAoF,iBAAiB,CAAC,SAAS,GAAG,CAAC;AAAA,EACjJ,MAAM,SAAS,SAAS,iDAAiD,eAAe,CAAC,SAAS,GAAG,CAAC;AAAA,EACtG,MAAM,WAAW,WAAW,sDAAsD,iBAAiB,CAAC,SAAS,GAAG,CAAC;AAAA,EACjH,MAAM,aAAa,aAAa,sCAAsC,gBAAgB,CAAC,SAAS,GAAG,CAAC;AAAA,EACpG,MAAM,SAAS,SAAS,oEAAoE,eAAe,CAAC,SAAS,GAAG,CAAC;AAC3H;AAEO,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW,OAAO,CAAC;AACxE,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW,OAAO,CAAC;AACxE,IAAM,eAAe,OAAO,OAAO,CAAC,MAAM,EAAE,SAAS,WAAW,OAAO,CAAC;AACxE,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;AAC5B,IAAM,sBAAsB;","names":[]}
|
package/dist/types.cjs
CHANGED
|
File without changes
|
package/dist/types.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["// Auto-generated from https://api.upres.ai/v1/openapi.json\n\nexport type JobStatus = \"pending\" | \"processing\" | \"completed\" | \"failed\";\n\nexport type ModelCategory
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["// Auto-generated from https://api.upres.ai/v1/openapi.json\n\nexport type JobStatus = \"pending\" | \"processing\" | \"completed\" | \"failed\";\n\nexport type ModelCategory =\n | \"image-upscale\"\n | \"image-clean\"\n | \"image-restore\"\n | \"image-studio\"\n | \"video-upscale\"\n | \"video-clean\"\n | \"video-restore\"\n | \"video-studio\"\n | \"audio-clean\";\n\nexport interface Job {\n id: string;\n status: JobStatus;\n model: string;\n scale: number;\n result_url: string | null;\n error: string | null;\n original_filename: string;\n created_at: string;\n updated_at: string;\n}\n\nexport interface JobCreateRequest {\n image_url?: string;\n model?: string;\n scale?: number;\n}\n\nexport interface JobListResponse {\n data: Job[];\n has_more: boolean;\n next_cursor: string | null;\n}\n\nexport interface ApiError {\n error: string;\n quota?: number;\n used?: number;\n}\n\nexport interface ModelParam {\n name: string;\n type: \"string\" | \"number\" | \"integer\" | \"boolean\";\n required: boolean;\n description: string;\n default?: string | number | boolean;\n options?: (string | number)[];\n range?: string;\n}\n\nexport interface ModelDefinition {\n id: string;\n name: string;\n description: string;\n category: ModelCategory;\n price: string;\n inputTypes: string[];\n params: ModelParam[];\n}\n\nexport interface UpresConfig {\n apiKey?: string;\n baseUrl?: string;\n}\n\nexport interface UpscaleOptions {\n model?: string;\n scale?: number;\n resolution?: string;\n output?: string;\n wait?: boolean;\n}\n\nexport interface BatchOptions extends UpscaleOptions {\n concurrency?: number;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type JobStatus = "pending" | "processing" | "completed" | "failed";
|
|
2
|
-
type ModelCategory = "image-upscale" | "image-
|
|
2
|
+
type ModelCategory = "image-upscale" | "image-clean" | "image-restore" | "image-studio" | "video-upscale" | "video-clean" | "video-restore" | "video-studio" | "audio-clean";
|
|
3
3
|
interface Job {
|
|
4
4
|
id: string;
|
|
5
5
|
status: JobStatus;
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
type JobStatus = "pending" | "processing" | "completed" | "failed";
|
|
2
|
-
type ModelCategory = "image-upscale" | "image-
|
|
2
|
+
type ModelCategory = "image-upscale" | "image-clean" | "image-restore" | "image-studio" | "video-upscale" | "video-clean" | "video-restore" | "video-studio" | "audio-clean";
|
|
3
3
|
interface Job {
|
|
4
4
|
id: string;
|
|
5
5
|
status: JobStatus;
|
package/dist/types.js
CHANGED
|
File without changes
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "upres-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Official CLI + SDK for upres.ai —
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "Official CLI + SDK for upres.ai — image, video, and speech restoration",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/client.js",
|
|
7
7
|
"exports": {
|
|
@@ -24,26 +24,56 @@
|
|
|
24
24
|
"dev": "tsx src/cli.ts",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
26
|
"test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
|
|
27
|
+
"prepare": "node scripts/ensure-dist.mjs",
|
|
27
28
|
"prepublishOnly": "npm run build"
|
|
28
29
|
},
|
|
29
30
|
"files": [
|
|
30
31
|
"dist",
|
|
32
|
+
"scripts",
|
|
31
33
|
"README.md",
|
|
32
34
|
"LICENSE"
|
|
33
35
|
],
|
|
34
36
|
"keywords": [
|
|
37
|
+
"4k-upscaler",
|
|
38
|
+
"8k",
|
|
39
|
+
"8k-upscaler",
|
|
35
40
|
"ai",
|
|
36
|
-
"
|
|
41
|
+
"ai-art-upscaler",
|
|
42
|
+
"ai-image-upscaler",
|
|
43
|
+
"ai-tools",
|
|
44
|
+
"ai-upscaler",
|
|
45
|
+
"api-client",
|
|
46
|
+
"batch-upscale",
|
|
37
47
|
"cli",
|
|
38
|
-
"
|
|
39
|
-
"
|
|
48
|
+
"command-line-tool",
|
|
49
|
+
"dalle-upscaler",
|
|
50
|
+
"developer-tools",
|
|
51
|
+
"flare",
|
|
52
|
+
"free-upscaler",
|
|
53
|
+
"image-enhancement",
|
|
40
54
|
"image-processing",
|
|
41
|
-
"
|
|
42
|
-
"8k",
|
|
43
|
-
"upscaler",
|
|
44
|
-
"ai-tools",
|
|
55
|
+
"image-processing-api",
|
|
45
56
|
"image-upscaler",
|
|
46
|
-
"
|
|
57
|
+
"mcp",
|
|
58
|
+
"mcp-server",
|
|
59
|
+
"midjourney-upscaler",
|
|
60
|
+
"model-context-protocol",
|
|
61
|
+
"motion",
|
|
62
|
+
"nodejs",
|
|
63
|
+
"photo-enhancer",
|
|
64
|
+
"denoise",
|
|
65
|
+
"hush",
|
|
66
|
+
"real-esrgan",
|
|
67
|
+
"visage",
|
|
68
|
+
"voice",
|
|
69
|
+
"stable-diffusion-upscaler",
|
|
70
|
+
"super-resolution",
|
|
71
|
+
"topaz-alternative",
|
|
72
|
+
"typescript",
|
|
73
|
+
"upscaler",
|
|
74
|
+
"upscaling",
|
|
75
|
+
"video-enhancer",
|
|
76
|
+
"video-upscaling"
|
|
47
77
|
],
|
|
48
78
|
"author": "upres.ai <support@upres.ai>",
|
|
49
79
|
"license": "MIT",
|
|
@@ -61,10 +91,22 @@
|
|
|
61
91
|
"devDependencies": {
|
|
62
92
|
"@types/jest": "^29.5.12",
|
|
63
93
|
"@types/node": "^20.11.0",
|
|
64
|
-
"jest": "^
|
|
94
|
+
"jest": "^30.4.2",
|
|
65
95
|
"ts-jest": "^29.1.2",
|
|
66
96
|
"tsup": "^8.0.2",
|
|
67
|
-
"tsx": "^4.
|
|
97
|
+
"tsx": "^4.23.15",
|
|
68
98
|
"typescript": "^5.3.3"
|
|
99
|
+
},
|
|
100
|
+
"overrides": {
|
|
101
|
+
"esbuild": "^0.28.2",
|
|
102
|
+
"@jest/reporters": {
|
|
103
|
+
"glob": "^14.0.2"
|
|
104
|
+
},
|
|
105
|
+
"jest-config": {
|
|
106
|
+
"glob": "^14.0.2"
|
|
107
|
+
},
|
|
108
|
+
"jest-runtime": {
|
|
109
|
+
"glob": "^14.0.2"
|
|
110
|
+
}
|
|
69
111
|
}
|
|
70
112
|
}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Live health gate for the official MCP registry entry. Fails when the
|
|
3
|
+
# listing goes stale (404, missing version, or status != active) so CI
|
|
4
|
+
# catches drift instead of users discovering it.
|
|
5
|
+
#
|
|
6
|
+
# Usage: bash scripts/check-mcp-registry.sh <name>
|
|
7
|
+
# name e.g. io.github.auroracapital/upres-cli
|
|
8
|
+
set -euo pipefail
|
|
9
|
+
|
|
10
|
+
NAME="${1:-io.github.auroracapital/upres-cli}"
|
|
11
|
+
REG="https://registry.modelcontextprotocol.io/v0"
|
|
12
|
+
|
|
13
|
+
# Latest version must equal latest npm-tagged version. The registry does not
|
|
14
|
+
# expose a stable per-name GET, so use the search endpoint and pin on `name`.
|
|
15
|
+
LATEST_JSON=$(curl -sS "${REG}/servers?search=upres-cli")
|
|
16
|
+
LATEST=$(printf '%s' "$LATEST_JSON" | python3 -c "
|
|
17
|
+
import sys, json
|
|
18
|
+
sites = json.load(sys.stdin).get('servers', [])
|
|
19
|
+
for s in sites:
|
|
20
|
+
if s.get('server', {}).get('name') == sys.argv[1]:
|
|
21
|
+
print(s['server']['version'])
|
|
22
|
+
break
|
|
23
|
+
else:
|
|
24
|
+
print('missing')
|
|
25
|
+
" "$NAME")
|
|
26
|
+
[[ "$LATEST" != "missing" ]] || { echo "drift: not listed"; exit 1; }
|
|
27
|
+
|
|
28
|
+
GH_TAG_LATEST=$(gh release view --repo auroracapital/upres-cli --json tagName -q .tagName 2>/dev/null | sed 's/^v//')
|
|
29
|
+
[[ "$LATEST" == "$GH_TAG_LATEST" ]] || { echo "drift: registry=$LATEST tag=$GH_TAG_LATEST"; exit 1; }
|
|
30
|
+
|
|
31
|
+
# mcpb sha must still match the asset on GitHub
|
|
32
|
+
LISTED_SHA=$(printf '%s' "$LATEST_JSON" | python3 -c "
|
|
33
|
+
import sys, json
|
|
34
|
+
sites = json.load(sys.stdin).get('servers', [])
|
|
35
|
+
for s in sites:
|
|
36
|
+
if s.get('server', {}).get('name') == sys.argv[1]:
|
|
37
|
+
print(s['server']['packages'][0]['fileSha256'])
|
|
38
|
+
break
|
|
39
|
+
" "$NAME")
|
|
40
|
+
ASSET_URL="https://github.com/auroracapital/upres-cli/releases/download/v${LATEST}/upres-cli-${LATEST}.mcpb"
|
|
41
|
+
TMP_DIR=$(mktemp -d)
|
|
42
|
+
trap 'rm -rf "$TMP_DIR"' EXIT
|
|
43
|
+
REAL_SHA=$(
|
|
44
|
+
cd "$TMP_DIR"
|
|
45
|
+
gh release download "v${LATEST}" --repo auroracapital/upres-cli \
|
|
46
|
+
--pattern "upres-cli-${LATEST}.mcpb" >/dev/null
|
|
47
|
+
sha256sum "upres-cli-${LATEST}.mcpb" | awk '{print $1}'
|
|
48
|
+
)
|
|
49
|
+
[[ "$REAL_SHA" == "$LISTED_SHA" ]] || { echo "drift: sha $LISTED_SHA != $REAL_SHA"; exit 1; }
|
|
50
|
+
|
|
51
|
+
echo "mcp-registry healthy: $NAME v$LATEST"
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync } from "node:fs";
|
|
3
|
+
import { spawnSync } from "node:child_process";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
|
|
7
|
+
const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|
8
|
+
if (existsSync(path.join(root, "dist", "cli.js"))) process.exit(0);
|
|
9
|
+
|
|
10
|
+
const r = spawnSync("npx", ["--yes", "tsup"], {
|
|
11
|
+
cwd: root,
|
|
12
|
+
stdio: "inherit",
|
|
13
|
+
env: process.env,
|
|
14
|
+
});
|
|
15
|
+
process.exit(r.status ?? 1);
|