@vint.tri/report_gen_mcp 1.5.2 → 1.5.4

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,44 @@
1
+ # Версия 1.5.3 - Исправление валидации URL изображений и отображения локальных изображений
2
+
3
+ ## Дата выпуска
4
+ 26 августа 2025 г.
5
+
6
+ ## Основные изменения
7
+
8
+ ### Исправление проблемы с валидацией URL изображений
9
+ - **Проблема**: Нейросеть получала ошибку "Invalid url" при попытке добавить изображения в отчеты из-за неправильного формата элементов
10
+ - **Решение**: Обновлены инструкции для нейросети с четким разделением между диаграммами и изображениями
11
+ - **Подробности**:
12
+ * Добавлены четкие указания, что изображения должны использовать `type: "url"`, а не `type: "bar"` или другие типы диаграмм
13
+ * Уточнено, что изображения в отчетах должны быть простыми HTML-тегами `<img src="...">`, а не диаграммами
14
+ * Предоставлены правильные примеры формата для всех типов изображений
15
+
16
+ ### Исправление проблемы с локальными изображениями
17
+ - **Проблема**: Локальные изображения в отчетах не отображались в браузере из-за ограничений безопасности
18
+ - **Решение**: Обновлены инструкции для нейросети с пояснениями о правильном способе открытия отчетов
19
+ - **Подробности**:
20
+ * Добавлены пояснения о том, что для корректного отображения локальных изображений следует использовать Web link 2 (http://localhost:3000/...)
21
+ * В ответ нейросети добавлено примечание о возможных проблемах с отображением локальных изображений
22
+ * Сохранена совместимость с существующим функционалом
23
+
24
+ ## Технические улучшения
25
+ - Создан файл `UPDATED_NEURAL_NETWORK_INSTRUCTIONS_v1.5.3.md` с обновленными инструкциями для нейросети
26
+ - Добавлен тест `test_local_image_fix.js` для проверки корректной работы с локальными изображениями
27
+ - Добавлен тест `test-image-validation-fix.js` для проверки исправления валидации URL изображений
28
+ - Создана документация `LOCAL_IMAGE_FIX_SUMMARY.md` с описанием проблемы и решения
29
+ - Создана документация `NEURAL_NETWORK_IMAGE_VALIDATION_FIX_SUMMARY.md` с описанием исправления валидации URL
30
+
31
+ ## Совместимость
32
+ Это минорное обновление полностью обратно совместимо с предыдущими версиями. Все существующие функции продолжают работать без изменений.
33
+
34
+ ## Установка
35
+ Для обновления до версии 1.5.3 выполните команду:
36
+ ```
37
+ npm update report_gen_mcp
38
+ ```
39
+
40
+ ## Документация
41
+ Подробная документация доступна в файле `UPDATED_NEURAL_NETWORK_INSTRUCTIONS_v1.5.3.md` и на GitHub.
42
+
43
+ ## Сообщество
44
+ Если у вас есть вопросы или предложения, пожалуйста, создайте issue в репозитории проекта на GitHub.
@@ -0,0 +1,23 @@
1
+ # Version 1.5.4 Release Notes
2
+
3
+ ## Overview
4
+ This release updates the report generation tool to version 1.5.4, ensuring consistency across all components and preparing for publication.
5
+
6
+ ## Changes
7
+ - Updated version number from 1.5.3 to 1.5.4 in package.json
8
+ - Updated version number in source code (src/index.ts)
9
+ - Recompiled distribution files with updated version information
10
+ - Verified index.ts support and compilation
11
+
12
+ ## Files Updated
13
+ - package.json
14
+ - src/index.ts
15
+ - dist/index.js (via recompilation)
16
+
17
+ ## Verification
18
+ - Version numbers are consistent across all files
19
+ - TypeScript compilation successful
20
+ - All existing functionality preserved
21
+ - index.ts properly supported and compiled to dist/index.js
22
+
23
+ This release maintains full backward compatibility while ensuring version consistency across all components of the package.
Binary file
package/dist/index.js CHANGED
@@ -126,7 +126,7 @@ if (process.argv.length === 2) {
126
126
  }
127
127
  const mcpServer = new McpServer({
128
128
  name: "report_gen_mcp",
129
- version: "1.5.2",
129
+ version: "1.5.4",
130
130
  }, {
131
131
  // Disable health check to prevent automatic calls
132
132
  capabilities: {
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vint.tri/report_gen_mcp",
3
- "version": "1.5.2",
3
+ "version": "1.5.4",
4
4
  "description": "CLI tool for generating HTML reports with embedded charts and images",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -0,0 +1,70 @@
1
+ // Test script to verify the fix for local image handling in reports
2
+ import { generateReport } from './dist/utils/reportGenerator.js';
3
+ import fs from 'fs';
4
+
5
+ async function testLocalImageFix() {
6
+ console.log('Testing local image fix...');
7
+
8
+ try {
9
+ // Test with local image file (using the dollar_bills.png that exists)
10
+ const result = await generateReport(
11
+ '# Тестовый отчет с локальным изображением\n\n[[image:dollar_image]]\n\n## Тестовое содержание\n\nЭто тестовый отчет для проверки отображения локальных изображений.',
12
+ {
13
+ dollar_image: {
14
+ type: 'url',
15
+ config: {
16
+ url: 'file:///Applications/Python/report_gen_mcp/dollar_bills.png',
17
+ alt: 'Доллар США',
18
+ width: 500,
19
+ height: 300
20
+ }
21
+ }
22
+ },
23
+ 'test_local_image_report.html'
24
+ );
25
+
26
+ console.log('✅ Local image report generated successfully');
27
+
28
+ // Read the generated report to check the content
29
+ const reportContent = fs.readFileSync('test_local_image_report.html', 'utf8');
30
+
31
+ // Check if the image tag is properly generated
32
+ if (reportContent.includes('file:///Applications/Python/report_gen_mcp/dollar_bills.png')) {
33
+ console.log('✅ Image tag with local file URL found in report');
34
+
35
+ // Check if the report contains proper styling for images
36
+ if (reportContent.includes('image-container') && reportContent.includes('max-width: 100%')) {
37
+ console.log('✅ Proper image container and styling found');
38
+ } else {
39
+ console.log('⚠️ Image container or styling might be missing');
40
+ }
41
+ } else {
42
+ console.log('❌ Image tag with local file URL not found in report');
43
+ }
44
+
45
+ // Show the neural network response format
46
+ console.log('\n📝 Neural network should respond with:');
47
+ console.log(`
48
+ Отчет успешно создан!
49
+
50
+ 📁 Путь к файлу: ${process.cwd()}/test_local_image_report.html
51
+ 🌐 Ссылка для открытия в браузере: file://${process.cwd()}/test_local_image_report.html
52
+ 🔗 [Web link 2](http://localhost:3000/test_local_image_report.html)
53
+
54
+ 💡 Примечание: Если изображения не отображаются, попробуйте открыть отчет по Web link 2, который обеспечивает корректное отображение всех элементов, включая локальные изображения.
55
+
56
+ 📄 Содержимое отчета:
57
+ ${reportContent.substring(0, 1000)}... (первые 1000 символов)
58
+
59
+ Вы можете открыть отчет, кликнув на ссылку выше или скопировав путь к файлу.
60
+ `);
61
+
62
+ } catch (error) {
63
+ console.error('❌ Test failed:', error.message);
64
+ console.error(error.stack);
65
+ }
66
+
67
+ console.log('\n🏁 Testing complete.');
68
+ }
69
+
70
+ testLocalImageFix();