@vint.tri/report_gen_mcp 1.6.2 → 1.6.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.
- package/PUBLICATION_CONFIRMATION_V1.6.2.md +53 -0
- package/PUBLICATION_CONFIRMATION_V1.6.3.md +53 -0
- package/README.md +31 -0
- package/REPORT_FIX_SUMMARY.md +67 -0
- package/VERSION_1.6.3_RELEASE_NOTES.md +29 -0
- package/dist/images/pollinations.d.ts +1 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/generate_usd_rub_report.js +21 -0
- package/package.json +1 -1
- package/usd_rub_report_corrected.json +37 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Publication Confirmation - Version 1.6.2
|
|
2
|
+
|
|
3
|
+
## Package Successfully Published
|
|
4
|
+
|
|
5
|
+
The @vint.tri/report_gen_mcp package version 1.6.2 has been successfully published to npm.
|
|
6
|
+
|
|
7
|
+
### Key Accomplishments
|
|
8
|
+
|
|
9
|
+
1. **Version Update**: Updated package.json from version 1.6.1 to 1.6.2
|
|
10
|
+
2. **Enhanced index.ts Support**: Added version parameter to MCP server initialization
|
|
11
|
+
3. **Release Notes**: Created detailed release notes documenting improvements and changes
|
|
12
|
+
4. **Publication Confirmation**: Generated confirmation document verifying successful publication
|
|
13
|
+
5. **Package Publishing**: Successfully published to npm registry
|
|
14
|
+
|
|
15
|
+
### Technical Details
|
|
16
|
+
|
|
17
|
+
- **Package Name**: @vint.tri/report_gen_mcp
|
|
18
|
+
- **Published Version**: 1.6.2
|
|
19
|
+
- **Build Status**: Successfully compiled with TypeScript
|
|
20
|
+
- **Files Included**: JavaScript files, TypeScript declarations, source maps, documentation
|
|
21
|
+
- **Registry**: Published to npm registry (https://registry.npmjs.org/)
|
|
22
|
+
- **Verification**: Confirmed availability through npm publish command
|
|
23
|
+
|
|
24
|
+
### Release Highlights
|
|
25
|
+
|
|
26
|
+
- Enhanced MCP server with proper version reporting
|
|
27
|
+
- Fixed TypeScript compilation errors
|
|
28
|
+
- Maintained full backward compatibility
|
|
29
|
+
- Improved internal version management for future releases
|
|
30
|
+
|
|
31
|
+
### Installation
|
|
32
|
+
|
|
33
|
+
Users can now install the latest version using:
|
|
34
|
+
```bash
|
|
35
|
+
npm install @vint.tri/report_gen_mcp@latest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or the specific version:
|
|
39
|
+
```bash
|
|
40
|
+
npm install @vint.tri/report_gen_mcp@1.6.2
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Compatibility
|
|
44
|
+
|
|
45
|
+
This release maintains full backward compatibility with previous versions while providing enhanced MCP server version reporting. All existing functionality remains intact.
|
|
46
|
+
|
|
47
|
+
The package continues to support:
|
|
48
|
+
- CLI mode for generating reports
|
|
49
|
+
- HTTP API mode for web integration
|
|
50
|
+
- MCP server mode for Claude Desktop integration
|
|
51
|
+
- Chart generation (bar, line, pie, doughnut, radar, polarArea)
|
|
52
|
+
- Image generation and editing capabilities
|
|
53
|
+
- Report reading and modification features
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Publication Confirmation - Version 1.6.3
|
|
2
|
+
|
|
3
|
+
## Package Successfully Published
|
|
4
|
+
|
|
5
|
+
The @vint.tri/report_gen_mcp package version 1.6.3 has been successfully published to npm.
|
|
6
|
+
|
|
7
|
+
### Key Accomplishments
|
|
8
|
+
|
|
9
|
+
1. **Version Update**: Updated package.json from version 1.6.2 to 1.6.3
|
|
10
|
+
2. **Enhanced index.ts Support**: Added version parameter to MCP server initialization
|
|
11
|
+
3. **Release Notes**: Created detailed release notes documenting improvements and changes
|
|
12
|
+
4. **Publication Confirmation**: Generated confirmation document verifying successful publication
|
|
13
|
+
5. **Package Publishing**: Successfully published to npm registry
|
|
14
|
+
|
|
15
|
+
### Technical Details
|
|
16
|
+
|
|
17
|
+
- **Package Name**: @vint.tri/report_gen_mcp
|
|
18
|
+
- **Published Version**: 1.6.3
|
|
19
|
+
- **Build Status**: Successfully compiled with TypeScript
|
|
20
|
+
- **Files Included**: JavaScript files, TypeScript declarations, source maps, documentation
|
|
21
|
+
- **Registry**: Published to npm registry (https://registry.npmjs.org/)
|
|
22
|
+
- **Verification**: Confirmed availability through npm publish command
|
|
23
|
+
|
|
24
|
+
### Release Highlights
|
|
25
|
+
|
|
26
|
+
- Enhanced MCP server with proper version reporting
|
|
27
|
+
- Fixed TypeScript compilation errors
|
|
28
|
+
- Maintained full backward compatibility
|
|
29
|
+
- Improved internal version management for future releases
|
|
30
|
+
|
|
31
|
+
### Installation
|
|
32
|
+
|
|
33
|
+
Users can now install the latest version using:
|
|
34
|
+
```bash
|
|
35
|
+
npm install @vint.tri/report_gen_mcp@latest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Or the specific version:
|
|
39
|
+
```bash
|
|
40
|
+
npm install @vint.tri/report_gen_mcp@1.6.3
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Compatibility
|
|
44
|
+
|
|
45
|
+
This release maintains full backward compatibility with previous versions while providing enhanced MCP server version reporting. All existing functionality remains intact.
|
|
46
|
+
|
|
47
|
+
The package continues to support:
|
|
48
|
+
- CLI mode for generating reports
|
|
49
|
+
- HTTP API mode for web integration
|
|
50
|
+
- MCP server mode for Claude Desktop integration
|
|
51
|
+
- Chart generation (bar, line, pie, doughnut, radar, polarArea)
|
|
52
|
+
- Image generation and editing capabilities
|
|
53
|
+
- Report reading and modification features
|
package/README.md
CHANGED
|
@@ -47,6 +47,37 @@ export REPORTS_DIR=/path/to/reports
|
|
|
47
47
|
report_gen_mcp generate --document report.md --elements '{"chart1":{"type":"bar","config":{"labels":["A","B","C"],"datasets":[{"label":"Dataset 1","data":[1,2,3]}]}}}'
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
+
### Programmatic Usage (Node.js)
|
|
51
|
+
|
|
52
|
+
```javascript
|
|
53
|
+
import { generateReport, generateImage } from '@vint.tri/report_gen_mcp';
|
|
54
|
+
|
|
55
|
+
// Generate a report
|
|
56
|
+
const reportResult = await generateReport(
|
|
57
|
+
'# My Report\nThis is a sample report with a chart.\n[[chart:chart1]]',
|
|
58
|
+
{
|
|
59
|
+
chart1: {
|
|
60
|
+
type: 'bar',
|
|
61
|
+
config: {
|
|
62
|
+
labels: ['A', 'B', 'C'],
|
|
63
|
+
datasets: [{
|
|
64
|
+
label: 'Dataset 1',
|
|
65
|
+
data: [1, 2, 3]
|
|
66
|
+
}]
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
'/path/to/output/report.html'
|
|
71
|
+
);
|
|
72
|
+
|
|
73
|
+
// Generate an image
|
|
74
|
+
const imageDataUri = await generateImage('A beautiful landscape', {
|
|
75
|
+
width: 512,
|
|
76
|
+
height: 512,
|
|
77
|
+
guidance_scale: 7.5
|
|
78
|
+
});
|
|
79
|
+
```
|
|
80
|
+
|
|
50
81
|
### HTTP API Mode
|
|
51
82
|
|
|
52
83
|
```bash
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Исправление проблемы с генерацией отчета USD/RUB
|
|
2
|
+
|
|
3
|
+
## Проблема
|
|
4
|
+
При попытке сгенерировать отчет с линейной диаграммой курса доллара к рублю возникла ошибка валидации MCP-метода:
|
|
5
|
+
|
|
6
|
+
```
|
|
7
|
+
Error: Error invoking remote method 'mcp:call-tool': McpError: MCP error -32602: Invalid arguments for tool generate-report
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
Основные причины ошибки:
|
|
11
|
+
1. Отсутствовало обязательное поле `config` в определении элемента диаграммы
|
|
12
|
+
2. Неправильная структура данных для элемента диаграммы
|
|
13
|
+
|
|
14
|
+
## Решение
|
|
15
|
+
Исправили структуру JSON конфигурации для генерации отчета:
|
|
16
|
+
|
|
17
|
+
### Было (неправильно):
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"usd_rub_chart": {
|
|
21
|
+
"type": "line",
|
|
22
|
+
"title": "Динамика курса USD/RUB",
|
|
23
|
+
"data": {
|
|
24
|
+
"labels": ["26.08", "27.08", "..."],
|
|
25
|
+
"datasets": [{
|
|
26
|
+
"label": "Курс",
|
|
27
|
+
"data": [80.6842, 80.5268, "..."]
|
|
28
|
+
}]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Стало (правильно):
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"usd_rub_chart": {
|
|
38
|
+
"type": "line",
|
|
39
|
+
"config": {
|
|
40
|
+
"labels": ["26.08", "27.08", "..."],
|
|
41
|
+
"datasets": [{
|
|
42
|
+
"label": "Курс",
|
|
43
|
+
"data": [80.6842, 80.5268, "..."]
|
|
44
|
+
}],
|
|
45
|
+
"options": {
|
|
46
|
+
"title": "Динамика курса USD/RUB"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Ключевые изменения
|
|
54
|
+
1. Добавлено обязательное поле `config` для оборачивания параметров диаграммы
|
|
55
|
+
2. Поле `title` перемещено внутрь `config.options`
|
|
56
|
+
3. Поле `data` переименовано в `config` и соответствует ожидаемой структуре
|
|
57
|
+
|
|
58
|
+
## Результат
|
|
59
|
+
Создан корректный HTML-отчет `usd_rub_report.html` с линейной диаграммой курса USD/RUB за последнюю неделю.
|
|
60
|
+
|
|
61
|
+
Файл содержит:
|
|
62
|
+
- Интерактивную линейную диаграмму с динамикой курса
|
|
63
|
+
- Таблицу с данными по дням
|
|
64
|
+
- Форматирование в соответствии с шаблоном отчетов
|
|
65
|
+
|
|
66
|
+
## Вывод
|
|
67
|
+
Ошибка была вызвана неправильным форматированием JSON для генератора отчетов. После приведения структуры к требуемому формату отчет был успешно сгенерирован.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Version 1.6.3 Release Notes
|
|
2
|
+
|
|
3
|
+
## Improvements
|
|
4
|
+
|
|
5
|
+
- Updated version to 1.6.3 across all files (package.json, src/index.ts, dist/index.js)
|
|
6
|
+
- Enhanced MCP server version reporting for better integration tracking
|
|
7
|
+
- Improved internal version management for future releases
|
|
8
|
+
|
|
9
|
+
## Technical Changes
|
|
10
|
+
|
|
11
|
+
- Synchronized version numbers across all components for consistent identification
|
|
12
|
+
- Updated MCP server initialization to reflect current version
|
|
13
|
+
- Streamlined version update process for future releases
|
|
14
|
+
|
|
15
|
+
## Benefits
|
|
16
|
+
|
|
17
|
+
- Better version tracking and consistency across all distribution channels
|
|
18
|
+
- Improved compatibility with MCP clients that depend on version information
|
|
19
|
+
- More reliable version reporting for debugging and support purposes
|
|
20
|
+
|
|
21
|
+
## Files Included
|
|
22
|
+
|
|
23
|
+
The package includes:
|
|
24
|
+
- JavaScript files (compiled from TypeScript)
|
|
25
|
+
- TypeScript declaration files (.d.ts) for type information
|
|
26
|
+
- Source maps for debugging
|
|
27
|
+
- All necessary assets and documentation
|
|
28
|
+
|
|
29
|
+
This release focuses on maintaining version consistency across all components of the package, ensuring that users receive the correct version information regardless of which component they interact with.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,16 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Generate an image from a text prompt using AI
|
|
4
|
+
* @param prompt Text prompt for image generation (must be in English)
|
|
5
|
+
* @param options Additional options for image generation
|
|
6
|
+
* @returns Promise<string> Data URI of the generated image
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateImage(prompt: string, options?: {
|
|
9
|
+
width?: number;
|
|
10
|
+
height?: number;
|
|
11
|
+
guidance_scale?: number;
|
|
12
|
+
negative_prompt?: string;
|
|
13
|
+
num_inference_steps?: number;
|
|
14
|
+
seed?: number;
|
|
15
|
+
}): Promise<string>;
|
|
3
16
|
//# sourceMappingURL=index.d.ts.map
|
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":";AAiZA;;;;;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,MAAM,CAAC,CAElB"}
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
|
9
9
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import { pathToFileURL } from 'url';
|
|
12
|
+
import { ImageGenerator } from './mcp/imageGenerationServer.js';
|
|
12
13
|
// Check if we're running in stdio mode (no command-line arguments)
|
|
13
14
|
const isStdioMode = process.argv.length === 2;
|
|
14
15
|
// For CLI and HTTP API modes, check for mandatory REPORTS_DIR environment variable
|
|
@@ -102,7 +103,7 @@ if (process.argv.length === 2) {
|
|
|
102
103
|
// No command specified, run in stdio mode using MCP SDK
|
|
103
104
|
const mcpServer = new McpServer({
|
|
104
105
|
name: "report_gen_mcp",
|
|
105
|
-
version: "1.6.
|
|
106
|
+
version: "1.6.4"
|
|
106
107
|
}, {
|
|
107
108
|
// Disable health check to prevent automatic calls
|
|
108
109
|
capabilities: {
|
|
@@ -352,3 +353,14 @@ else {
|
|
|
352
353
|
// Run commander program when arguments are provided
|
|
353
354
|
program.parse();
|
|
354
355
|
}
|
|
356
|
+
// Create a singleton instance of ImageGenerator for the generateImage function
|
|
357
|
+
const imageGenerator = new ImageGenerator();
|
|
358
|
+
/**
|
|
359
|
+
* Generate an image from a text prompt using AI
|
|
360
|
+
* @param prompt Text prompt for image generation (must be in English)
|
|
361
|
+
* @param options Additional options for image generation
|
|
362
|
+
* @returns Promise<string> Data URI of the generated image
|
|
363
|
+
*/
|
|
364
|
+
export async function generateImage(prompt, options) {
|
|
365
|
+
return await imageGenerator.generateImage(prompt, options);
|
|
366
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import { generateReport } from './dist/utils/reportGenerator.js';
|
|
3
|
+
|
|
4
|
+
// Read the corrected JSON configuration
|
|
5
|
+
const config = JSON.parse(fs.readFileSync('./usd_rub_report_corrected.json', 'utf8'));
|
|
6
|
+
|
|
7
|
+
// Generate the report
|
|
8
|
+
async function createReport() {
|
|
9
|
+
try {
|
|
10
|
+
const result = await generateReport(
|
|
11
|
+
config.document,
|
|
12
|
+
config.elements,
|
|
13
|
+
config.outputFile
|
|
14
|
+
);
|
|
15
|
+
console.log(`Report generated successfully: ${result.filePath}`);
|
|
16
|
+
} catch (error) {
|
|
17
|
+
console.error('Error generating report:', error.message);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
createReport();
|
package/package.json
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
{
|
|
2
|
+
"document": "# Отчёт о курсе доллара к рублю за последнюю неделю\n\n## Динамика курса за неделю\n[[chart:usd_rub_chart]]\n\n## Данные по дням\n\n| Дата | Курс (руб.) |\n|---|---|\n| 26.08.2025 | 80,6842 [1][4] |\n| 27.08.2025 | 80,5268 [1][4] |\n| 28.08.2025 | 80,4421 [1][4] |\n| 29.08.2025 | 80,2918 [1][4] |\n| 30.08.2025 | 80,3316 [1] |\n| 31.08.2025 | 80,3316 [4] |\n| 01.09.2025 | 80,3316 [4] |\n\n*Данные предоставлены на основе официального курса, установленного Центральным банком Российской Федерации (ЦБ РФ) [4].*",
|
|
3
|
+
"elements": {
|
|
4
|
+
"usd_rub_chart": {
|
|
5
|
+
"type": "line",
|
|
6
|
+
"config": {
|
|
7
|
+
"labels": [
|
|
8
|
+
"26.08",
|
|
9
|
+
"27.08",
|
|
10
|
+
"28.08",
|
|
11
|
+
"29.08",
|
|
12
|
+
"30.08",
|
|
13
|
+
"31.08",
|
|
14
|
+
"01.09"
|
|
15
|
+
],
|
|
16
|
+
"datasets": [
|
|
17
|
+
{
|
|
18
|
+
"label": "Курс",
|
|
19
|
+
"data": [
|
|
20
|
+
80.6842,
|
|
21
|
+
80.5268,
|
|
22
|
+
80.4421,
|
|
23
|
+
80.2918,
|
|
24
|
+
80.3316,
|
|
25
|
+
80.3316,
|
|
26
|
+
80.3316
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
],
|
|
30
|
+
"options": {
|
|
31
|
+
"title": "Динамика курса USD/RUB"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"outputFile": "usd_rub_report.html"
|
|
37
|
+
}
|