@wavespeed/mcp 1.2.0 → 1.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.
@@ -19,7 +19,9 @@
19
19
  .grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
20
20
  .grid.one { grid-template-columns: 1fr; }
21
21
  .tile { background: var(--card); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
22
- .tile img, .tile video { display: block; width: 100%; max-height: 520px; object-fit: contain; background: #000; }
22
+ .tile img, .tile video { display: block; width: 100%; max-height: 520px; object-fit: contain; background: var(--card); }
23
+ .tile video { background: #000; }
24
+ .broken { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }
23
25
  .tile img { cursor: zoom-in; }
24
26
  .tile audio { display: block; width: 100%; padding: 10px; }
25
27
  .tile .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; font-size: 12px; color: var(--muted); }
@@ -143,6 +145,11 @@
143
145
  media = el("img"); media.src = url; media.alt = "Generated image"; media.loading = "lazy";
144
146
  media.addEventListener("click", function () { openLink(url); });
145
147
  media.addEventListener("load", resize);
148
+ // The host may not let the card load this address; say so and keep the Open button working.
149
+ media.addEventListener("error", function () {
150
+ var m = el("div", "broken", "This chat can't show the image here. Use Open / save.");
151
+ t.replaceChild(m, media); resize();
152
+ });
146
153
  t.appendChild(media);
147
154
  } else if (kind === "video") {
148
155
  media = el("video"); media.src = url; media.controls = true; media.playsInline = true; media.preload = "metadata";
package/dist/lib/app.js CHANGED
@@ -15,8 +15,9 @@ export const UI_TOOLS = new Set([
15
15
  'edit_video',
16
16
  'extend_video',
17
17
  ]);
18
- // Outputs normally sit on our CDNs, but not always: any https source may load.
19
- export const VIEW_RESOURCE_DOMAINS = ['https:'];
18
+ // "https:" alone should allow every https source, but a host may only honour named hosts when it builds the
19
+ // card's CSP, so the usual media hosts are named too, as wildcards.
20
+ export const VIEW_RESOURCE_DOMAINS = ['https:', 'https://*.cloudfront.net', 'https://*.wavespeed.ai', 'https://*.amazonaws.com'];
20
21
  export function loadView() {
21
22
  return readFileSync(new URL('../../assets/result.html', import.meta.url), 'utf8');
22
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wavespeed/mcp",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "WaveSpeed MCP server — run any model on the live WaveSpeed catalog (image, video, audio, 3D) with schema introspection, local-file upload, and price quotes.",
5
5
  "type": "module",
6
6
  "bin": {