@vint.tri/report_gen_mcp 1.5.11 → 1.5.12
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/index.d.ts.map +1 -1
- package/dist/index.js +19 -8
- package/package.json +1 -1
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAufA;;;;;GAKG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC,CAgCjD"}
|
package/dist/index.js
CHANGED
|
@@ -103,7 +103,7 @@ if (process.argv.length === 2) {
|
|
|
103
103
|
// No command specified, run in stdio mode using MCP SDK
|
|
104
104
|
const mcpServer = new McpServer({
|
|
105
105
|
name: "report_gen_mcp",
|
|
106
|
-
version: "1.5.
|
|
106
|
+
version: "1.5.12"
|
|
107
107
|
}, {
|
|
108
108
|
// Disable health check to prevent automatic calls
|
|
109
109
|
capabilities: {
|
|
@@ -399,17 +399,19 @@ FOR THE NEURAL NETWORK: Please present the following information to the user:
|
|
|
399
399
|
// Extract base64 data from the saved file
|
|
400
400
|
const imageData = await fs.readFile(imageResult.filePath);
|
|
401
401
|
const base64Data = imageData.toString('base64');
|
|
402
|
-
// Return
|
|
402
|
+
// Return file paths and URLs
|
|
403
|
+
const reportServerPort = 2000;
|
|
404
|
+
const httpUrl = `http://localhost:${reportServerPort}/${path.basename(imageResult.filePath)}`;
|
|
403
405
|
return {
|
|
404
406
|
content: [
|
|
405
407
|
{
|
|
406
408
|
type: "text",
|
|
407
|
-
text:
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
409
|
+
text: `Image generated successfully.
|
|
410
|
+
|
|
411
|
+
FOR THE NEURAL NETWORK: Please present the following information to the user:
|
|
412
|
+
1. Path to file: ${imageResult.filePath}
|
|
413
|
+
2. Web browser link: ${imageResult.fileUrl}
|
|
414
|
+
3. Web link: ${httpUrl}`
|
|
413
415
|
}
|
|
414
416
|
]
|
|
415
417
|
};
|
|
@@ -442,6 +444,15 @@ else {
|
|
|
442
444
|
}
|
|
443
445
|
// Create a singleton instance of ImageGenerator for the generateImage function
|
|
444
446
|
const imageGenerator = new ImageGenerator();
|
|
447
|
+
// Start the report server in non-stdio mode as well
|
|
448
|
+
if (!isStdioMode && reportsDir) {
|
|
449
|
+
const reportServer = express();
|
|
450
|
+
const reportServerPort = 2000;
|
|
451
|
+
reportServer.use(express.static(reportsDir));
|
|
452
|
+
reportServer.listen(reportServerPort, () => {
|
|
453
|
+
console.log(`Report server running at http://localhost:${reportServerPort}`);
|
|
454
|
+
});
|
|
455
|
+
}
|
|
445
456
|
/**
|
|
446
457
|
* Generate an image from a text prompt using AI
|
|
447
458
|
* @param prompt Text prompt for image generation (must be in English)
|