@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.cjs CHANGED
@@ -2529,9 +2529,15 @@ async function captureHtmlMulti(options) {
2529
2529
  // src/tools/capture.ts
2530
2530
  var registry2 = (0, import_core8.createDefaultRegistry)();
2531
2531
  function openPreview(filePath) {
2532
- const cmd = process.platform === "darwin" ? "open" : process.platform === "win32" ? "start" : "xdg-open";
2533
- (0, import_child_process.exec)(`${cmd} "${filePath}"`, (err) => {
2534
- if (err) console.error(`[openPreview] failed: ${err.message}`);
2532
+ const cmd = process.platform === "darwin" ? "/usr/bin/open" : process.platform === "win32" ? "start" : "xdg-open";
2533
+ console.error(`[openPreview] opening: ${filePath}`);
2534
+ (0, import_child_process.exec)(`${cmd} "${filePath}"`, (err, _stdout, stderr) => {
2535
+ if (err) {
2536
+ console.error(`[openPreview] exec error: ${err.message}`);
2537
+ }
2538
+ if (stderr) {
2539
+ console.error(`[openPreview] stderr: ${stderr}`);
2540
+ }
2535
2541
  });
2536
2542
  }
2537
2543
  function applyOverrides(sketch, overrides) {
@@ -5215,16 +5221,15 @@ function registerSketchTools(server, state) {
5215
5221
  });
5216
5222
  return {
5217
5223
  content: [
5218
- {
5219
- type: "image",
5220
- data: captureResult.previewJpegBase64,
5221
- mimeType: "image/jpeg",
5222
- annotations: { audience: ["user", "assistant"] }
5223
- },
5224
5224
  { type: "text", text: JSON.stringify({
5225
5225
  ...result,
5226
5226
  capture: captureResult.metadata
5227
- }, null, 2) }
5227
+ }, null, 2) },
5228
+ {
5229
+ type: "image",
5230
+ data: captureResult.previewJpegBase64,
5231
+ mimeType: "image/jpeg"
5232
+ }
5228
5233
  ]
5229
5234
  };
5230
5235
  } catch (captureErr) {
@@ -5806,13 +5811,12 @@ function registerCaptureTools(server, state) {
5806
5811
  console.error(`[capture_screenshot] jpeg base64 length: ${result.previewJpegBase64.length}`);
5807
5812
  return {
5808
5813
  content: [
5814
+ { type: "text", text: JSON.stringify(result.metadata, null, 2) },
5809
5815
  {
5810
5816
  type: "image",
5811
5817
  data: result.previewJpegBase64,
5812
- mimeType: "image/jpeg",
5813
- annotations: { audience: ["user", "assistant"] }
5814
- },
5815
- { type: "text", text: JSON.stringify(result.metadata, null, 2) }
5818
+ mimeType: "image/jpeg"
5819
+ }
5816
5820
  ]
5817
5821
  };
5818
5822
  } catch (e) {
@@ -5841,8 +5845,7 @@ function registerCaptureTools(server, state) {
5841
5845
  content.push({
5842
5846
  type: "image",
5843
5847
  data: item.inlineJpegBase64,
5844
- mimeType: "image/jpeg",
5845
- annotations: { audience: ["user", "assistant"] }
5848
+ mimeType: "image/jpeg"
5846
5849
  });
5847
5850
  content.push({
5848
5851
  type: "text",