@genart-dev/mcp-server 0.4.9 → 0.4.11

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/dist/lib.js CHANGED
@@ -2511,9 +2511,15 @@ async function captureHtmlMulti(options) {
2511
2511
  // src/tools/capture.ts
2512
2512
  var registry2 = createDefaultRegistry2();
2513
2513
  function openPreview(filePath) {
2514
- const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
2515
- exec(`${cmd} "${filePath}"`, (err) => {
2516
- if (err) console.error(`[openPreview] failed: ${err.message}`);
2514
+ const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
2515
+ console.error(`[openPreview] opening: ${filePath}`);
2516
+ exec(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
2517
+ if (err) {
2518
+ console.error(`[openPreview] exec error: ${err.message}`);
2519
+ }
2520
+ if (stderr) {
2521
+ console.error(`[openPreview] stderr: ${stderr}`);
2522
+ }
2517
2523
  });
2518
2524
  }
2519
2525
  function applyOverrides(sketch, overrides) {
@@ -5210,16 +5216,15 @@ function registerSketchTools(server, state) {
5210
5216
  });
5211
5217
  return {
5212
5218
  content: [
5213
- {
5214
- type: "image",
5215
- data: captureResult.previewJpegBase64,
5216
- mimeType: "image/jpeg",
5217
- annotations: { audience: ["user", "assistant"] }
5218
- },
5219
5219
  { type: "text", text: JSON.stringify({
5220
5220
  ...result,
5221
5221
  capture: captureResult.metadata
5222
- }, null, 2) }
5222
+ }, null, 2) },
5223
+ {
5224
+ type: "image",
5225
+ data: captureResult.previewJpegBase64,
5226
+ mimeType: "image/jpeg"
5227
+ }
5223
5228
  ]
5224
5229
  };
5225
5230
  } catch (captureErr) {
@@ -5801,13 +5806,12 @@ function registerCaptureTools(server, state) {
5801
5806
  console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
5802
5807
  return {
5803
5808
  content: [
5809
+ { type: "text", text: JSON.stringify(result.metadata, null, 2) },
5804
5810
  {
5805
5811
  type: "image",
5806
5812
  data: result.previewJpegBase64,
5807
- mimeType: "image/jpeg",
5808
- annotations: { audience: ["user", "assistant"] }
5809
- },
5810
- { type: "text", text: JSON.stringify(result.metadata, null, 2) }
5813
+ mimeType: "image/jpeg"
5814
+ }
5811
5815
  ]
5812
5816
  };
5813
5817
  } catch (e) {
@@ -5836,8 +5840,7 @@ function registerCaptureTools(server, state) {
5836
5840
  content.push({
5837
5841
  type: "image",
5838
5842
  data: item.inlineJpegBase64,
5839
- mimeType: "image/jpeg",
5840
- annotations: { audience: ["user", "assistant"] }
5843
+ mimeType: "image/jpeg"
5841
5844
  });
5842
5845
  content.push({
5843
5846
  type: "text",