@goonnguyen/human-mcp 2.2.0 → 2.3.0

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.
Files changed (2) hide show
  1. package/dist/index.js +39 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -164746,22 +164746,49 @@ async function handleImageGeneration(geminiClient, args, config) {
164746
164746
  fetchTimeout: config.server.fetchTimeout
164747
164747
  };
164748
164748
  const result = await generateImage(geminiClient, generationOptions);
164749
+ if (result.imageData.startsWith("data:")) {
164750
+ const matches = result.imageData.match(/data:([^;]+);base64,(.+)/);
164751
+ if (matches && matches[1] && matches[2]) {
164752
+ const mimeType = matches[1];
164753
+ const base64Data = matches[2];
164754
+ return {
164755
+ content: [
164756
+ {
164757
+ type: "image",
164758
+ data: base64Data,
164759
+ mimeType
164760
+ },
164761
+ {
164762
+ type: "text",
164763
+ text: `✅ Image generated successfully using ${result.model}
164764
+
164765
+ **Generation Details:**
164766
+ - Prompt: "${prompt}"
164767
+ - Model: ${result.model}
164768
+ - Format: ${result.format}
164769
+ - Size: ${result.size}
164770
+ - Generation Time: ${result.generationTime}ms
164771
+ - Timestamp: ${new Date().toISOString()}`
164772
+ }
164773
+ ],
164774
+ isError: false
164775
+ };
164776
+ }
164777
+ }
164749
164778
  return {
164750
164779
  content: [
164751
164780
  {
164752
164781
  type: "text",
164753
- text: JSON.stringify({
164754
- success: true,
164755
- image: result.imageData,
164756
- format: result.format,
164757
- model: result.model,
164758
- prompt,
164759
- metadata: {
164760
- timestamp: new Date().toISOString(),
164761
- generation_time: result.generationTime,
164762
- size: result.size
164763
- }
164764
- }, null, 2)
164782
+ text: `✅ Image generated successfully!
164783
+
164784
+ **Generation Details:**
164785
+ - Prompt: "${prompt}"
164786
+ - Model: ${result.model}
164787
+ - Format: ${result.format}
164788
+ - Size: ${result.size}
164789
+ - Generation Time: ${result.generationTime}ms
164790
+
164791
+ **Image Data:** ${result.imageData.substring(0, 100)}...`
164765
164792
  }
164766
164793
  ],
164767
164794
  isError: false
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goonnguyen/human-mcp",
3
- "version": "2.2.0",
3
+ "version": "2.3.0",
4
4
  "description": "Human MCP: Bringing Human Capabilities to Coding Agents",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",