mulmocast-vision 0.0.8 → 0.1.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.
- package/lib/mcp/core.js +2 -2
- package/lib/presentationHandlers/html_class.d.ts +246 -82
- package/lib/presentationHandlers/html_class.js +90 -81
- package/lib/utils.js +10 -0
- package/package.json +6 -6
package/lib/mcp/core.js
CHANGED
|
@@ -31,12 +31,12 @@ const getServer = (rootDir, outputDir) => {
|
|
|
31
31
|
const method = handler[key];
|
|
32
32
|
if (typeof method === "function") {
|
|
33
33
|
const fileName = (0, commons_1.generateUniqueId)();
|
|
34
|
-
await method(args, { functionName: name, outputFileName: fileName });
|
|
34
|
+
const result = await method(args, { functionName: name, outputFileName: fileName });
|
|
35
35
|
return {
|
|
36
36
|
content: [
|
|
37
37
|
{
|
|
38
38
|
type: "text",
|
|
39
|
-
text:
|
|
39
|
+
text: result?.text ?? "success",
|
|
40
40
|
},
|
|
41
41
|
],
|
|
42
42
|
};
|
|
@@ -10,86 +10,250 @@ export declare class htmlPlugin {
|
|
|
10
10
|
templateOptions?: any;
|
|
11
11
|
});
|
|
12
12
|
private generateHtml;
|
|
13
|
-
createSectionDividerPage: (args: ToolArgs, options: PluginOptionParams) => Promise<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
13
|
+
createSectionDividerPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
14
|
+
text: string;
|
|
15
|
+
}>;
|
|
16
|
+
createAgendaPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
17
|
+
text: string;
|
|
18
|
+
}>;
|
|
19
|
+
createExecutiveSummaryPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
20
|
+
text: string;
|
|
21
|
+
}>;
|
|
22
|
+
createKeyMessageWithSupportsPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
23
|
+
text: string;
|
|
24
|
+
}>;
|
|
25
|
+
createHypothesisPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
26
|
+
text: string;
|
|
27
|
+
}>;
|
|
28
|
+
createIssueTreePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
29
|
+
text: string;
|
|
30
|
+
}>;
|
|
31
|
+
createDriverTreePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
32
|
+
text: string;
|
|
33
|
+
}>;
|
|
34
|
+
createMeceListPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
35
|
+
text: string;
|
|
36
|
+
}>;
|
|
37
|
+
createPyramidPrinciplePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
38
|
+
text: string;
|
|
39
|
+
}>;
|
|
40
|
+
createScqaPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
41
|
+
text: string;
|
|
42
|
+
}>;
|
|
43
|
+
createSwotPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
44
|
+
text: string;
|
|
45
|
+
}>;
|
|
46
|
+
createThreeCPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
47
|
+
text: string;
|
|
48
|
+
}>;
|
|
49
|
+
createFourPPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
50
|
+
text: string;
|
|
51
|
+
}>;
|
|
52
|
+
createSevenSPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
53
|
+
text: string;
|
|
54
|
+
}>;
|
|
55
|
+
createValueChainPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
56
|
+
text: string;
|
|
57
|
+
}>;
|
|
58
|
+
createPorterFiveForcesPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
59
|
+
text: string;
|
|
60
|
+
}>;
|
|
61
|
+
createBusinessModelCanvasPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
62
|
+
text: string;
|
|
63
|
+
}>;
|
|
64
|
+
createCustomerJourneyPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
65
|
+
text: string;
|
|
66
|
+
}>;
|
|
67
|
+
createStakeholderMapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
68
|
+
text: string;
|
|
69
|
+
}>;
|
|
70
|
+
createRaciPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
71
|
+
text: string;
|
|
72
|
+
}>;
|
|
73
|
+
createOkrKpiDashboardPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
74
|
+
text: string;
|
|
75
|
+
}>;
|
|
76
|
+
createBalancedScorecardPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
77
|
+
text: string;
|
|
78
|
+
}>;
|
|
79
|
+
createQuarterlyRoadmapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
80
|
+
text: string;
|
|
81
|
+
}>;
|
|
82
|
+
createMilestoneTimelinePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
83
|
+
text: string;
|
|
84
|
+
}>;
|
|
85
|
+
createGanttSimplePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
86
|
+
text: string;
|
|
87
|
+
}>;
|
|
88
|
+
createWaterfallPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
89
|
+
text: string;
|
|
90
|
+
}>;
|
|
91
|
+
createFunnelPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
92
|
+
text: string;
|
|
93
|
+
}>;
|
|
94
|
+
createTwoByTwoMatrixPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
95
|
+
text: string;
|
|
96
|
+
}>;
|
|
97
|
+
createBcgMatrixPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
98
|
+
text: string;
|
|
99
|
+
}>;
|
|
100
|
+
createGeMcKinseyMatrixPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
101
|
+
text: string;
|
|
102
|
+
}>;
|
|
103
|
+
createMarimekkoPlaceholderPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
104
|
+
text: string;
|
|
105
|
+
}>;
|
|
106
|
+
createBubbleChartPlaceholderPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
107
|
+
text: string;
|
|
108
|
+
}>;
|
|
109
|
+
createHeatmapPlaceholderPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
110
|
+
text: string;
|
|
111
|
+
}>;
|
|
112
|
+
createKpiHighlightPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
113
|
+
text: string;
|
|
114
|
+
}>;
|
|
115
|
+
createBeforeAfterPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
116
|
+
text: string;
|
|
117
|
+
}>;
|
|
118
|
+
createOptionEvaluationPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
119
|
+
text: string;
|
|
120
|
+
}>;
|
|
121
|
+
createRiskMitigationPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
122
|
+
text: string;
|
|
123
|
+
}>;
|
|
124
|
+
createPositioningMapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
125
|
+
text: string;
|
|
126
|
+
}>;
|
|
127
|
+
createTamSamSomPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
128
|
+
text: string;
|
|
129
|
+
}>;
|
|
130
|
+
createMarketDriversPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
131
|
+
text: string;
|
|
132
|
+
}>;
|
|
133
|
+
createRevenueModelPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
134
|
+
text: string;
|
|
135
|
+
}>;
|
|
136
|
+
createCostStructurePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
137
|
+
text: string;
|
|
138
|
+
}>;
|
|
139
|
+
createOrgChartPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
140
|
+
text: string;
|
|
141
|
+
}>;
|
|
142
|
+
createCapabilityMaturityPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
143
|
+
text: string;
|
|
144
|
+
}>;
|
|
145
|
+
createTechRoadmapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
146
|
+
text: string;
|
|
147
|
+
}>;
|
|
148
|
+
createDigitalMaturityPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
149
|
+
text: string;
|
|
150
|
+
}>;
|
|
151
|
+
createEcosystemMapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
152
|
+
text: string;
|
|
153
|
+
}>;
|
|
154
|
+
createChangeCurvePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
155
|
+
text: string;
|
|
156
|
+
}>;
|
|
157
|
+
createCommunicationPlanPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
158
|
+
text: string;
|
|
159
|
+
}>;
|
|
160
|
+
createIntegrationPlanPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
161
|
+
text: string;
|
|
162
|
+
}>;
|
|
163
|
+
createBenchmarkingTablePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
164
|
+
text: string;
|
|
165
|
+
}>;
|
|
166
|
+
createSurveyResultsPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
167
|
+
text: string;
|
|
168
|
+
}>;
|
|
169
|
+
createPersonasPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
170
|
+
text: string;
|
|
171
|
+
}>;
|
|
172
|
+
createSegmentationPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
173
|
+
text: string;
|
|
174
|
+
}>;
|
|
175
|
+
createPricingWaterfallPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
176
|
+
text: string;
|
|
177
|
+
}>;
|
|
178
|
+
createSensitivityAnalysisPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
179
|
+
text: string;
|
|
180
|
+
}>;
|
|
181
|
+
createPLBreakdownPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
182
|
+
text: string;
|
|
183
|
+
}>;
|
|
184
|
+
createCashFlowPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
185
|
+
text: string;
|
|
186
|
+
}>;
|
|
187
|
+
createBalanceSheetPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
188
|
+
text: string;
|
|
189
|
+
}>;
|
|
190
|
+
createShareholderValueTreePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
191
|
+
text: string;
|
|
192
|
+
}>;
|
|
193
|
+
createNpvSummaryPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
194
|
+
text: string;
|
|
195
|
+
}>;
|
|
196
|
+
createScenarioPlanningPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
197
|
+
text: string;
|
|
198
|
+
}>;
|
|
199
|
+
createComplianceHeatmapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
200
|
+
text: string;
|
|
201
|
+
}>;
|
|
202
|
+
createEsgFrameworkPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
203
|
+
text: string;
|
|
204
|
+
}>;
|
|
205
|
+
createCsrInitiativesPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
206
|
+
text: string;
|
|
207
|
+
}>;
|
|
208
|
+
createSustainabilityRoadmapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
209
|
+
text: string;
|
|
210
|
+
}>;
|
|
211
|
+
createCircularEconomyMapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
212
|
+
text: string;
|
|
213
|
+
}>;
|
|
214
|
+
createInnovationFunnelPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
215
|
+
text: string;
|
|
216
|
+
}>;
|
|
217
|
+
createProductRoadmapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
218
|
+
text: string;
|
|
219
|
+
}>;
|
|
220
|
+
createLaunchPlanPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
221
|
+
text: string;
|
|
222
|
+
}>;
|
|
223
|
+
createPipelineFunnelPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
224
|
+
text: string;
|
|
225
|
+
}>;
|
|
226
|
+
createSalesDashboardPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
227
|
+
text: string;
|
|
228
|
+
}>;
|
|
229
|
+
createMarketingMixPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
230
|
+
text: string;
|
|
231
|
+
}>;
|
|
232
|
+
createCustomerSuccessJourneyPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
233
|
+
text: string;
|
|
234
|
+
}>;
|
|
235
|
+
createSupportOrgModelPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
236
|
+
text: string;
|
|
237
|
+
}>;
|
|
238
|
+
createPartnershipMapPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
239
|
+
text: string;
|
|
240
|
+
}>;
|
|
241
|
+
createMAPipelinePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
242
|
+
text: string;
|
|
243
|
+
}>;
|
|
244
|
+
createSynergyCapturePage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
245
|
+
text: string;
|
|
246
|
+
}>;
|
|
247
|
+
createCultureValuesPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
248
|
+
text: string;
|
|
249
|
+
}>;
|
|
250
|
+
createThankYouContactPage: (args: ToolArgs, options: PluginOptionParams) => Promise<{
|
|
251
|
+
text: string;
|
|
252
|
+
}>;
|
|
253
|
+
setDirectory: (args: ToolArgs, __options: PluginOptionParams) => Promise<{
|
|
254
|
+
text: string;
|
|
255
|
+
}>;
|
|
256
|
+
createPDF: (__args: ToolArgs, __options: PluginOptionParams) => Promise<{
|
|
257
|
+
text: string;
|
|
258
|
+
} | undefined>;
|
|
95
259
|
}
|
|
@@ -18,247 +18,250 @@ class htmlPlugin {
|
|
|
18
18
|
const templateFilePath = path_1.default.resolve(this.rootDir, "./html/html2", `${templateFileName}.html`);
|
|
19
19
|
const outfile = imageFilePath ?? path_1.default.resolve(this.outputDir, this.sessionDir, `${outputFileName}.png`);
|
|
20
20
|
const htmlFile = htmlFilePath ?? path_1.default.resolve(this.outputDir, this.sessionDir, `${outputFileName}.html`);
|
|
21
|
-
|
|
21
|
+
await (0, utils_1.createPage)(this.rootDir, outfile, nunjucks_1.default.render(templateFilePath, args), { htmlFile, ...this.templateOptions });
|
|
22
|
+
return {
|
|
23
|
+
text: `html generated successfully to: ${outfile}`,
|
|
24
|
+
};
|
|
22
25
|
};
|
|
23
26
|
this.createSectionDividerPage = async (args, options) => {
|
|
24
|
-
await this.generateHtml(args, options);
|
|
27
|
+
return await this.generateHtml(args, options);
|
|
25
28
|
};
|
|
26
29
|
this.createAgendaPage = async (args, options) => {
|
|
27
|
-
await this.generateHtml(args, options);
|
|
30
|
+
return await this.generateHtml(args, options);
|
|
28
31
|
};
|
|
29
32
|
this.createExecutiveSummaryPage = async (args, options) => {
|
|
30
|
-
await this.generateHtml(args, options);
|
|
33
|
+
return await this.generateHtml(args, options);
|
|
31
34
|
};
|
|
32
35
|
this.createKeyMessageWithSupportsPage = async (args, options) => {
|
|
33
|
-
await this.generateHtml(args, options);
|
|
36
|
+
return await this.generateHtml(args, options);
|
|
34
37
|
};
|
|
35
38
|
this.createHypothesisPage = async (args, options) => {
|
|
36
|
-
await this.generateHtml(args, options);
|
|
39
|
+
return await this.generateHtml(args, options);
|
|
37
40
|
};
|
|
38
41
|
this.createIssueTreePage = async (args, options) => {
|
|
39
|
-
await this.generateHtml(args, options);
|
|
42
|
+
return await this.generateHtml(args, options);
|
|
40
43
|
};
|
|
41
44
|
this.createDriverTreePage = async (args, options) => {
|
|
42
|
-
await this.generateHtml(args, options);
|
|
45
|
+
return await this.generateHtml(args, options);
|
|
43
46
|
};
|
|
44
47
|
this.createMeceListPage = async (args, options) => {
|
|
45
|
-
await this.generateHtml(args, options);
|
|
48
|
+
return await this.generateHtml(args, options);
|
|
46
49
|
};
|
|
47
50
|
this.createPyramidPrinciplePage = async (args, options) => {
|
|
48
|
-
await this.generateHtml(args, options);
|
|
51
|
+
return await this.generateHtml(args, options);
|
|
49
52
|
};
|
|
50
53
|
this.createScqaPage = async (args, options) => {
|
|
51
|
-
await this.generateHtml(args, options);
|
|
54
|
+
return await this.generateHtml(args, options);
|
|
52
55
|
};
|
|
53
56
|
this.createSwotPage = async (args, options) => {
|
|
54
|
-
await this.generateHtml(args, options);
|
|
57
|
+
return await this.generateHtml(args, options);
|
|
55
58
|
};
|
|
56
59
|
this.createThreeCPage = async (args, options) => {
|
|
57
|
-
await this.generateHtml(args, options);
|
|
60
|
+
return await this.generateHtml(args, options);
|
|
58
61
|
};
|
|
59
62
|
this.createFourPPage = async (args, options) => {
|
|
60
|
-
await this.generateHtml(args, options);
|
|
63
|
+
return await this.generateHtml(args, options);
|
|
61
64
|
};
|
|
62
65
|
this.createSevenSPage = async (args, options) => {
|
|
63
|
-
await this.generateHtml(args, options);
|
|
66
|
+
return await this.generateHtml(args, options);
|
|
64
67
|
};
|
|
65
68
|
this.createValueChainPage = async (args, options) => {
|
|
66
|
-
await this.generateHtml(args, options);
|
|
69
|
+
return await this.generateHtml(args, options);
|
|
67
70
|
};
|
|
68
71
|
this.createPorterFiveForcesPage = async (args, options) => {
|
|
69
|
-
await this.generateHtml(args, options);
|
|
72
|
+
return await this.generateHtml(args, options);
|
|
70
73
|
};
|
|
71
74
|
this.createBusinessModelCanvasPage = async (args, options) => {
|
|
72
|
-
await this.generateHtml(args, options);
|
|
75
|
+
return await this.generateHtml(args, options);
|
|
73
76
|
};
|
|
74
77
|
this.createCustomerJourneyPage = async (args, options) => {
|
|
75
|
-
await this.generateHtml(args, options);
|
|
78
|
+
return await this.generateHtml(args, options);
|
|
76
79
|
};
|
|
77
80
|
this.createStakeholderMapPage = async (args, options) => {
|
|
78
|
-
await this.generateHtml(args, options);
|
|
81
|
+
return await this.generateHtml(args, options);
|
|
79
82
|
};
|
|
80
83
|
this.createRaciPage = async (args, options) => {
|
|
81
|
-
await this.generateHtml(args, options);
|
|
84
|
+
return await this.generateHtml(args, options);
|
|
82
85
|
};
|
|
83
86
|
this.createOkrKpiDashboardPage = async (args, options) => {
|
|
84
|
-
await this.generateHtml(args, options);
|
|
87
|
+
return await this.generateHtml(args, options);
|
|
85
88
|
};
|
|
86
89
|
this.createBalancedScorecardPage = async (args, options) => {
|
|
87
|
-
await this.generateHtml(args, options);
|
|
90
|
+
return await this.generateHtml(args, options);
|
|
88
91
|
};
|
|
89
92
|
this.createQuarterlyRoadmapPage = async (args, options) => {
|
|
90
|
-
await this.generateHtml(args, options);
|
|
93
|
+
return await this.generateHtml(args, options);
|
|
91
94
|
};
|
|
92
95
|
this.createMilestoneTimelinePage = async (args, options) => {
|
|
93
|
-
await this.generateHtml(args, options);
|
|
96
|
+
return await this.generateHtml(args, options);
|
|
94
97
|
};
|
|
95
98
|
this.createGanttSimplePage = async (args, options) => {
|
|
96
|
-
await this.generateHtml(args, options);
|
|
99
|
+
return await this.generateHtml(args, options);
|
|
97
100
|
};
|
|
98
101
|
this.createWaterfallPage = async (args, options) => {
|
|
99
|
-
await this.generateHtml(args, options);
|
|
102
|
+
return await this.generateHtml(args, options);
|
|
100
103
|
};
|
|
101
104
|
this.createFunnelPage = async (args, options) => {
|
|
102
|
-
await this.generateHtml(args, options);
|
|
105
|
+
return await this.generateHtml(args, options);
|
|
103
106
|
};
|
|
104
107
|
this.createTwoByTwoMatrixPage = async (args, options) => {
|
|
105
|
-
await this.generateHtml(args, options);
|
|
108
|
+
return await this.generateHtml(args, options);
|
|
106
109
|
};
|
|
107
110
|
this.createBcgMatrixPage = async (args, options) => {
|
|
108
|
-
await this.generateHtml(args, options);
|
|
111
|
+
return await this.generateHtml(args, options);
|
|
109
112
|
};
|
|
110
113
|
this.createGeMcKinseyMatrixPage = async (args, options) => {
|
|
111
|
-
await this.generateHtml(args, options);
|
|
114
|
+
return await this.generateHtml(args, options);
|
|
112
115
|
};
|
|
113
116
|
this.createMarimekkoPlaceholderPage = async (args, options) => {
|
|
114
|
-
await this.generateHtml(args, options);
|
|
117
|
+
return await this.generateHtml(args, options);
|
|
115
118
|
};
|
|
116
119
|
this.createBubbleChartPlaceholderPage = async (args, options) => {
|
|
117
|
-
await this.generateHtml(args, options);
|
|
120
|
+
return await this.generateHtml(args, options);
|
|
118
121
|
};
|
|
119
122
|
this.createHeatmapPlaceholderPage = async (args, options) => {
|
|
120
|
-
await this.generateHtml(args, options);
|
|
123
|
+
return await this.generateHtml(args, options);
|
|
121
124
|
};
|
|
122
125
|
this.createKpiHighlightPage = async (args, options) => {
|
|
123
|
-
await this.generateHtml(args, options);
|
|
126
|
+
return await this.generateHtml(args, options);
|
|
124
127
|
};
|
|
125
128
|
this.createBeforeAfterPage = async (args, options) => {
|
|
126
|
-
await this.generateHtml(args, options);
|
|
129
|
+
return await this.generateHtml(args, options);
|
|
127
130
|
};
|
|
128
131
|
this.createOptionEvaluationPage = async (args, options) => {
|
|
129
|
-
await this.generateHtml(args, options);
|
|
132
|
+
return await this.generateHtml(args, options);
|
|
130
133
|
};
|
|
131
134
|
this.createRiskMitigationPage = async (args, options) => {
|
|
132
|
-
await this.generateHtml(args, options);
|
|
135
|
+
return await this.generateHtml(args, options);
|
|
133
136
|
};
|
|
134
137
|
this.createPositioningMapPage = async (args, options) => {
|
|
135
|
-
await this.generateHtml(args, options);
|
|
138
|
+
return await this.generateHtml(args, options);
|
|
136
139
|
};
|
|
137
140
|
this.createTamSamSomPage = async (args, options) => {
|
|
138
|
-
await this.generateHtml(args, options);
|
|
141
|
+
return await this.generateHtml(args, options);
|
|
139
142
|
};
|
|
140
143
|
this.createMarketDriversPage = async (args, options) => {
|
|
141
|
-
await this.generateHtml(args, options);
|
|
144
|
+
return await this.generateHtml(args, options);
|
|
142
145
|
};
|
|
143
146
|
this.createRevenueModelPage = async (args, options) => {
|
|
144
|
-
await this.generateHtml(args, options);
|
|
147
|
+
return await this.generateHtml(args, options);
|
|
145
148
|
};
|
|
146
149
|
this.createCostStructurePage = async (args, options) => {
|
|
147
|
-
await this.generateHtml(args, options);
|
|
150
|
+
return await this.generateHtml(args, options);
|
|
148
151
|
};
|
|
149
152
|
this.createOrgChartPage = async (args, options) => {
|
|
150
|
-
await this.generateHtml(args, options);
|
|
153
|
+
return await this.generateHtml(args, options);
|
|
151
154
|
};
|
|
152
155
|
this.createCapabilityMaturityPage = async (args, options) => {
|
|
153
|
-
await this.generateHtml(args, options);
|
|
156
|
+
return await this.generateHtml(args, options);
|
|
154
157
|
};
|
|
155
158
|
this.createTechRoadmapPage = async (args, options) => {
|
|
156
|
-
await this.generateHtml(args, options);
|
|
159
|
+
return await this.generateHtml(args, options);
|
|
157
160
|
};
|
|
158
161
|
this.createDigitalMaturityPage = async (args, options) => {
|
|
159
|
-
await this.generateHtml(args, options);
|
|
162
|
+
return await this.generateHtml(args, options);
|
|
160
163
|
};
|
|
161
164
|
this.createEcosystemMapPage = async (args, options) => {
|
|
162
|
-
await this.generateHtml(args, options);
|
|
165
|
+
return await this.generateHtml(args, options);
|
|
163
166
|
};
|
|
164
167
|
this.createChangeCurvePage = async (args, options) => {
|
|
165
|
-
await this.generateHtml(args, options);
|
|
168
|
+
return await this.generateHtml(args, options);
|
|
166
169
|
};
|
|
167
170
|
this.createCommunicationPlanPage = async (args, options) => {
|
|
168
|
-
await this.generateHtml(args, options);
|
|
171
|
+
return await this.generateHtml(args, options);
|
|
169
172
|
};
|
|
170
173
|
this.createIntegrationPlanPage = async (args, options) => {
|
|
171
|
-
await this.generateHtml(args, options);
|
|
174
|
+
return await this.generateHtml(args, options);
|
|
172
175
|
};
|
|
173
176
|
this.createBenchmarkingTablePage = async (args, options) => {
|
|
174
|
-
await this.generateHtml(args, options);
|
|
177
|
+
return await this.generateHtml(args, options);
|
|
175
178
|
};
|
|
176
179
|
this.createSurveyResultsPage = async (args, options) => {
|
|
177
|
-
await this.generateHtml(args, options);
|
|
180
|
+
return await this.generateHtml(args, options);
|
|
178
181
|
};
|
|
179
182
|
this.createPersonasPage = async (args, options) => {
|
|
180
|
-
await this.generateHtml(args, options);
|
|
183
|
+
return await this.generateHtml(args, options);
|
|
181
184
|
};
|
|
182
185
|
this.createSegmentationPage = async (args, options) => {
|
|
183
|
-
await this.generateHtml(args, options);
|
|
186
|
+
return await this.generateHtml(args, options);
|
|
184
187
|
};
|
|
185
188
|
this.createPricingWaterfallPage = async (args, options) => {
|
|
186
|
-
await this.generateHtml(args, options);
|
|
189
|
+
return await this.generateHtml(args, options);
|
|
187
190
|
};
|
|
188
191
|
this.createSensitivityAnalysisPage = async (args, options) => {
|
|
189
|
-
await this.generateHtml(args, options);
|
|
192
|
+
return await this.generateHtml(args, options);
|
|
190
193
|
};
|
|
191
194
|
this.createPLBreakdownPage = async (args, options) => {
|
|
192
|
-
await this.generateHtml(args, options);
|
|
195
|
+
return await this.generateHtml(args, options);
|
|
193
196
|
};
|
|
194
197
|
this.createCashFlowPage = async (args, options) => {
|
|
195
|
-
await this.generateHtml(args, options);
|
|
198
|
+
return await this.generateHtml(args, options);
|
|
196
199
|
};
|
|
197
200
|
this.createBalanceSheetPage = async (args, options) => {
|
|
198
|
-
await this.generateHtml(args, options);
|
|
201
|
+
return await this.generateHtml(args, options);
|
|
199
202
|
};
|
|
200
203
|
this.createShareholderValueTreePage = async (args, options) => {
|
|
201
|
-
await this.generateHtml(args, options);
|
|
204
|
+
return await this.generateHtml(args, options);
|
|
202
205
|
};
|
|
203
206
|
this.createNpvSummaryPage = async (args, options) => {
|
|
204
|
-
await this.generateHtml(args, options);
|
|
207
|
+
return await this.generateHtml(args, options);
|
|
205
208
|
};
|
|
206
209
|
this.createScenarioPlanningPage = async (args, options) => {
|
|
207
|
-
await this.generateHtml(args, options);
|
|
210
|
+
return await this.generateHtml(args, options);
|
|
208
211
|
};
|
|
209
212
|
this.createComplianceHeatmapPage = async (args, options) => {
|
|
210
|
-
await this.generateHtml(args, options);
|
|
213
|
+
return await this.generateHtml(args, options);
|
|
211
214
|
};
|
|
212
215
|
this.createEsgFrameworkPage = async (args, options) => {
|
|
213
|
-
await this.generateHtml(args, options);
|
|
216
|
+
return await this.generateHtml(args, options);
|
|
214
217
|
};
|
|
215
218
|
this.createCsrInitiativesPage = async (args, options) => {
|
|
216
|
-
await this.generateHtml(args, options);
|
|
219
|
+
return await this.generateHtml(args, options);
|
|
217
220
|
};
|
|
218
221
|
this.createSustainabilityRoadmapPage = async (args, options) => {
|
|
219
|
-
await this.generateHtml(args, options);
|
|
222
|
+
return await this.generateHtml(args, options);
|
|
220
223
|
};
|
|
221
224
|
this.createCircularEconomyMapPage = async (args, options) => {
|
|
222
|
-
await this.generateHtml(args, options);
|
|
225
|
+
return await this.generateHtml(args, options);
|
|
223
226
|
};
|
|
224
227
|
this.createInnovationFunnelPage = async (args, options) => {
|
|
225
|
-
await this.generateHtml(args, options);
|
|
228
|
+
return await this.generateHtml(args, options);
|
|
226
229
|
};
|
|
227
230
|
this.createProductRoadmapPage = async (args, options) => {
|
|
228
|
-
await this.generateHtml(args, options);
|
|
231
|
+
return await this.generateHtml(args, options);
|
|
229
232
|
};
|
|
230
233
|
this.createLaunchPlanPage = async (args, options) => {
|
|
231
|
-
await this.generateHtml(args, options);
|
|
234
|
+
return await this.generateHtml(args, options);
|
|
232
235
|
};
|
|
233
236
|
this.createPipelineFunnelPage = async (args, options) => {
|
|
234
|
-
await this.generateHtml(args, options);
|
|
237
|
+
return await this.generateHtml(args, options);
|
|
235
238
|
};
|
|
236
239
|
this.createSalesDashboardPage = async (args, options) => {
|
|
237
|
-
await this.generateHtml(args, options);
|
|
240
|
+
return await this.generateHtml(args, options);
|
|
238
241
|
};
|
|
239
242
|
this.createMarketingMixPage = async (args, options) => {
|
|
240
|
-
await this.generateHtml(args, options);
|
|
243
|
+
return await this.generateHtml(args, options);
|
|
241
244
|
};
|
|
242
245
|
this.createCustomerSuccessJourneyPage = async (args, options) => {
|
|
243
|
-
await this.generateHtml(args, options);
|
|
246
|
+
return await this.generateHtml(args, options);
|
|
244
247
|
};
|
|
245
248
|
this.createSupportOrgModelPage = async (args, options) => {
|
|
246
|
-
await this.generateHtml(args, options);
|
|
249
|
+
return await this.generateHtml(args, options);
|
|
247
250
|
};
|
|
248
251
|
this.createPartnershipMapPage = async (args, options) => {
|
|
249
|
-
await this.generateHtml(args, options);
|
|
252
|
+
return await this.generateHtml(args, options);
|
|
250
253
|
};
|
|
251
254
|
this.createMAPipelinePage = async (args, options) => {
|
|
252
|
-
await this.generateHtml(args, options);
|
|
255
|
+
return await this.generateHtml(args, options);
|
|
253
256
|
};
|
|
254
257
|
this.createSynergyCapturePage = async (args, options) => {
|
|
255
|
-
await this.generateHtml(args, options);
|
|
258
|
+
return await this.generateHtml(args, options);
|
|
256
259
|
};
|
|
257
260
|
this.createCultureValuesPage = async (args, options) => {
|
|
258
|
-
await this.generateHtml(args, options);
|
|
261
|
+
return await this.generateHtml(args, options);
|
|
259
262
|
};
|
|
260
263
|
this.createThankYouContactPage = async (args, options) => {
|
|
261
|
-
await this.generateHtml(args, options);
|
|
264
|
+
return await this.generateHtml(args, options);
|
|
262
265
|
};
|
|
263
266
|
// for mcp
|
|
264
267
|
this.setDirectory = async (args, __options) => {
|
|
@@ -266,6 +269,9 @@ class htmlPlugin {
|
|
|
266
269
|
const outputDir = path_1.default.resolve(this.outputDir, this.sessionDir);
|
|
267
270
|
console.error(outputDir);
|
|
268
271
|
(0, utils_1.mkdir)(outputDir);
|
|
272
|
+
return {
|
|
273
|
+
text: `set directory: ${this.sessionDir}`,
|
|
274
|
+
};
|
|
269
275
|
};
|
|
270
276
|
this.createPDF = async (__args, __options) => {
|
|
271
277
|
const imageWidth = 1536;
|
|
@@ -304,6 +310,9 @@ class htmlPlugin {
|
|
|
304
310
|
});
|
|
305
311
|
});
|
|
306
312
|
doc.end();
|
|
313
|
+
return {
|
|
314
|
+
text: `pdf created: ${outputDir}`,
|
|
315
|
+
};
|
|
307
316
|
};
|
|
308
317
|
this.outputDir = outputDir ?? (0, utils_1.getOutDir)();
|
|
309
318
|
this.rootDir = rootDir ?? (0, utils_1.getRootDir)();
|
package/lib/utils.js
CHANGED
|
@@ -18,9 +18,19 @@ const renderHTMLToImage = async (html, outputPath, width, height) => {
|
|
|
18
18
|
await page.setContent(html);
|
|
19
19
|
// Adjust page settings if needed (like width, height, etc.)
|
|
20
20
|
await page.setViewport({ width, height });
|
|
21
|
+
await page.addStyleTag({ content: "html,body{margin:0;padding:0;overflow:hidden}" });
|
|
22
|
+
await page.evaluate(({ vw, vh }) => {
|
|
23
|
+
const de = document.documentElement;
|
|
24
|
+
const sw = Math.max(de.scrollWidth, document.body.scrollWidth || 0);
|
|
25
|
+
const sh = Math.max(de.scrollHeight, document.body.scrollHeight || 0);
|
|
26
|
+
const scale = Math.min(vw / (sw || vw), vh / (sh || vh), 1); // <=1 で縮小のみ
|
|
27
|
+
de.style.overflow = "hidden";
|
|
28
|
+
document.body.style.zoom = String(scale);
|
|
29
|
+
}, { vw: width, vh: height });
|
|
21
30
|
// Step 3: Capture screenshot of the page (which contains the Markdown-rendered HTML)
|
|
22
31
|
await page.screenshot({
|
|
23
32
|
path: outputPath,
|
|
33
|
+
fullPage: false,
|
|
24
34
|
});
|
|
25
35
|
await browser.close();
|
|
26
36
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mulmocast-vision",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "PlayGround",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"bin": {
|
|
@@ -34,23 +34,23 @@
|
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@graphai/openai_agent": "^2.0.7",
|
|
36
36
|
"@graphai/vanilla": "^2.0.12",
|
|
37
|
-
"@modelcontextprotocol/sdk": "^1.17.
|
|
38
|
-
"dotenv": "^17.2.
|
|
37
|
+
"@modelcontextprotocol/sdk": "^1.17.5",
|
|
38
|
+
"dotenv": "^17.2.2",
|
|
39
39
|
"graphai": "^2.0.14",
|
|
40
40
|
"nunjucks": "^3.2.4",
|
|
41
41
|
"pdfkit": "^0.17.2",
|
|
42
|
-
"puppeteer": "^24.
|
|
42
|
+
"puppeteer": "^24.19.0"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/nunjucks": "^3.2.6",
|
|
46
46
|
"@types/pdfkit": "^0.17.3",
|
|
47
|
-
"eslint": "^9.
|
|
47
|
+
"eslint": "^9.35.0",
|
|
48
48
|
"eslint-config-prettier": "^10.1.8",
|
|
49
49
|
"eslint-plugin-prettier": "^5.5.4",
|
|
50
50
|
"prettier": "^3.6.2",
|
|
51
51
|
"ts-node": "^10.9.2",
|
|
52
52
|
"typescript": "^5.9.2",
|
|
53
|
-
"typescript-eslint": "^8.
|
|
53
|
+
"typescript-eslint": "^8.42.0"
|
|
54
54
|
},
|
|
55
55
|
"types": "./lib/index.d.ts",
|
|
56
56
|
"directories": {
|