@vint.tri/report_gen_mcp 1.3.8 → 1.3.9

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.
@@ -0,0 +1,35 @@
1
+ # Publication Confirmation - Version 1.3.8
2
+
3
+ Version 1.3.8 of @vint.tri/report_gen_mcp has been successfully published to npm.
4
+
5
+ ## Published Features
6
+
7
+ This is a maintenance release that updates the version number throughout the application to ensure consistency.
8
+
9
+ ### Version Synchronization
10
+ - Updated package.json version from 1.3.7 to 1.3.8
11
+ - Updated MCP server version in src/index.ts from 1.3.7 to 1.3.8
12
+
13
+ ## No Functional Changes
14
+
15
+ This release does not introduce any new features, enhancements, or bug fixes. It solely focuses on maintaining version consistency across the application files.
16
+
17
+ ## Verification
18
+
19
+ - Package version: 1.3.8 ✓
20
+ - NPM registry confirmation: ✓
21
+ - Build verification: ✓
22
+ - Package contents verification: ✓
23
+
24
+ ## Next Steps
25
+
26
+ Users can continue using the application as before. All existing functionality remains unchanged.
27
+
28
+ To install the latest version:
29
+ ```bash
30
+ npm install @vint.tri/report_gen_mcp@latest
31
+ ```
32
+
33
+ Or globally:
34
+ ```bash
35
+ npm install -g @vint.tri/report_gen_mcp@latest
@@ -0,0 +1,54 @@
1
+ # Version 1.3.9 Release Notes
2
+
3
+ ## Bug Fixes
4
+
5
+ ### Fixed "__dirname is not defined" Error in Image Tools
6
+ - **Issue**: The `generate-image` and `edit-image` tools were throwing "__dirname is not defined" errors when used in ES modules environment
7
+ - **Root Cause**: Direct usage of `__dirname` variable which is not available in ES modules
8
+ - **Solution**: Replaced `__dirname` references with proper path resolution using `process.env.REPORTS_DIR` environment variable
9
+ - **Files Modified**:
10
+ - `src/index.ts` - Updated path resolution for Python scripts in image generation and editing tools
11
+ - `dist/index.js` - Regenerated compiled output
12
+
13
+ ### Technical Details
14
+ - Changed path resolution from `path.resolve(__dirname, 'python', 'mcp_img_gen.py')` to `path.resolve(reportsDir, 'src', 'python', 'mcp_img_gen.py')`
15
+ - Changed path resolution from `path.resolve(__dirname, 'python', 'mcp_image_edit.py')` to `path.resolve(reportsDir, 'src', 'python', 'mcp_image_edit.py')`
16
+ - Added fallback to `process.cwd()` when `REPORTS_DIR` environment variable is not set
17
+ - Maintained backward compatibility with existing API
18
+
19
+ ## Files Updated
20
+ - `package.json` - Version bump from 1.3.8 to 1.3.9
21
+ - `src/index.ts` - Fixed __dirname usage in image tools
22
+ - `dist/index.js` - Regenerated with fixes
23
+ - `VERSION_1.3.9_RELEASE_NOTES.md` - This file
24
+
25
+ ## Verification
26
+ The fix has been tested and verified to:
27
+ - ✅ Eliminate "__dirname is not defined" errors in image generation tools
28
+ - ✅ Properly locate Python scripts using REPORTS_DIR environment variable
29
+ - ✅ Maintain compatibility with existing API
30
+ - ✅ Support both image generation and editing functionalities
31
+
32
+ ## Installation
33
+ To upgrade to version 1.3.9, run:
34
+ ```bash
35
+ npm install @vint.tri/report_gen_mcp@1.3.9
36
+ ```
37
+
38
+ Or update your package.json dependency:
39
+ ```json
40
+ {
41
+ "dependencies": {
42
+ "@vint.tri/report_gen_mcp": "^1.3.9"
43
+ }
44
+ }
45
+ ```
46
+
47
+ ## Required Environment Variables
48
+ - `REPORTS_DIR` - Directory for storing generated reports and locating Python scripts
49
+ - `CHUTES_API_TOKEN` - Required for actual image generation/editing (optional for testing)
50
+
51
+ ## Python Dependencies
52
+ If using image generation features, ensure Python dependencies are installed:
53
+ ```bash
54
+ npm run install-python-deps
package/dist/index.js CHANGED
@@ -474,7 +474,9 @@ FOR THE NEURAL NETWORK: Please present the following information to the user:
474
474
  const fileName = outputFile || `generated-image-${Date.now()}.png`;
475
475
  const fullPath = path.resolve(outputDir, fileName);
476
476
  // Prepare arguments for the Python script
477
- const pythonScriptPath = path.resolve(__dirname, 'python', 'mcp_img_gen.py');
477
+ // Use REPORTS_DIR environment variable to locate Python scripts
478
+ const reportsDir = process.env.REPORTS_DIR || process.cwd();
479
+ const pythonScriptPath = path.resolve(reportsDir, 'src', 'python', 'mcp_img_gen.py');
478
480
  const pythonArgs = [
479
481
  '-c',
480
482
  `import sys; sys.path.insert(0, '${path.dirname(pythonScriptPath)}'); ` +
@@ -660,7 +662,9 @@ FOR THE NEURAL NETWORK: Please present the following information to the user:
660
662
  const { promises: fsPromises } = await import('fs');
661
663
  const path = await import('path');
662
664
  // Prepare arguments for the Python script
663
- const pythonScriptPath = path.resolve(__dirname, 'python', 'mcp_image_edit.py');
665
+ // Use REPORTS_DIR environment variable to locate Python scripts
666
+ const reportsDir = process.env.REPORTS_DIR || process.cwd();
667
+ const pythonScriptPath = path.resolve(reportsDir, 'src', 'python', 'mcp_image_edit.py');
664
668
  const pythonArgs = [
665
669
  '-c',
666
670
  `import sys; sys.path.insert(0, '${path.dirname(pythonScriptPath)}'); ` +
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vint.tri/report_gen_mcp",
3
- "version": "1.3.8",
3
+ "version": "1.3.9",
4
4
  "description": "CLI tool for generating HTML reports with embedded charts and images",
5
5
  "main": "dist/index.js",
6
6
  "bin": {