vibe-coding-mcp 2.6.0 → 2.12.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/README.md +122 -4
- package/dist/__tests__/exportSession.test.d.ts +2 -0
- package/dist/__tests__/exportSession.test.d.ts.map +1 -0
- package/dist/__tests__/exportSession.test.js +180 -0
- package/dist/__tests__/exportSession.test.js.map +1 -0
- package/dist/__tests__/git.test.d.ts +2 -0
- package/dist/__tests__/git.test.d.ts.map +1 -0
- package/dist/__tests__/git.test.js +282 -0
- package/dist/__tests__/git.test.js.map +1 -0
- package/dist/__tests__/projectProfile.test.d.ts +2 -0
- package/dist/__tests__/projectProfile.test.d.ts.map +1 -0
- package/dist/__tests__/projectProfile.test.js +216 -0
- package/dist/__tests__/projectProfile.test.js.map +1 -0
- package/dist/core/profileStorage.d.ts +117 -0
- package/dist/core/profileStorage.d.ts.map +1 -0
- package/dist/core/profileStorage.js +251 -0
- package/dist/core/profileStorage.js.map +1 -0
- package/dist/core/schemas.d.ts +576 -4
- package/dist/core/schemas.d.ts.map +1 -1
- package/dist/core/schemas.js +185 -0
- package/dist/core/schemas.js.map +1 -1
- package/dist/stdio.js +44 -2
- package/dist/stdio.js.map +1 -1
- package/dist/tools/autoTag.d.ts +145 -0
- package/dist/tools/autoTag.d.ts.map +1 -0
- package/dist/tools/autoTag.js +475 -0
- package/dist/tools/autoTag.js.map +1 -0
- package/dist/tools/batch.d.ts +119 -0
- package/dist/tools/batch.d.ts.map +1 -0
- package/dist/tools/batch.js +459 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/exportSession.d.ts +79 -0
- package/dist/tools/exportSession.d.ts.map +1 -0
- package/dist/tools/exportSession.js +434 -0
- package/dist/tools/exportSession.js.map +1 -0
- package/dist/tools/git.d.ts +226 -0
- package/dist/tools/git.d.ts.map +1 -0
- package/dist/tools/git.js +493 -0
- package/dist/tools/git.js.map +1 -0
- package/dist/tools/projectProfile.d.ts +230 -0
- package/dist/tools/projectProfile.d.ts.map +1 -0
- package/dist/tools/projectProfile.js +367 -0
- package/dist/tools/projectProfile.js.map +1 -0
- package/dist/tools/sessionStats.d.ts +129 -0
- package/dist/tools/sessionStats.d.ts.map +1 -0
- package/dist/tools/sessionStats.js +554 -0
- package/dist/tools/sessionStats.js.map +1 -0
- package/dist/tools/template.d.ts +127 -0
- package/dist/tools/template.d.ts.map +1 -0
- package/dist/tools/template.js +617 -0
- package/dist/tools/template.js.map +1 -0
- package/dist/utils/gitExecutor.d.ts +34 -0
- package/dist/utils/gitExecutor.d.ts.map +1 -0
- package/dist/utils/gitExecutor.js +95 -0
- package/dist/utils/gitExecutor.js.map +1 -0
- package/dist/utils/gitParsers.d.ts +90 -0
- package/dist/utils/gitParsers.d.ts.map +1 -0
- package/dist/utils/gitParsers.js +286 -0
- package/dist/utils/gitParsers.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom Templates Tool (v2.11)
|
|
3
|
+
* Manages user-defined document templates with variables
|
|
4
|
+
*/
|
|
5
|
+
import { promises as fs } from 'fs';
|
|
6
|
+
import * as path from 'path';
|
|
7
|
+
import * as os from 'os';
|
|
8
|
+
import { createToolLogger } from '../core/logger.js';
|
|
9
|
+
const logger = createToolLogger('template');
|
|
10
|
+
// Storage
|
|
11
|
+
const STORAGE_DIR = process.env.VIBE_CODING_STORAGE_DIR ||
|
|
12
|
+
path.join(os.homedir(), '.vibe-coding-mcp', 'templates');
|
|
13
|
+
let initialized = false;
|
|
14
|
+
async function initializeStorage() {
|
|
15
|
+
if (initialized)
|
|
16
|
+
return;
|
|
17
|
+
await fs.mkdir(STORAGE_DIR, { recursive: true });
|
|
18
|
+
initialized = true;
|
|
19
|
+
logger.info('Template storage initialized', { path: STORAGE_DIR });
|
|
20
|
+
}
|
|
21
|
+
function getTemplatePath(templateId) {
|
|
22
|
+
return path.join(STORAGE_DIR, `${templateId}.json`);
|
|
23
|
+
}
|
|
24
|
+
function generateId() {
|
|
25
|
+
const timestamp = Date.now().toString(36);
|
|
26
|
+
const random = Math.random().toString(36).substring(2, 8);
|
|
27
|
+
return `template_${timestamp}_${random}`;
|
|
28
|
+
}
|
|
29
|
+
// Template variable substitution
|
|
30
|
+
function renderTemplate(content, data, variables) {
|
|
31
|
+
let rendered = content;
|
|
32
|
+
const missing = [];
|
|
33
|
+
// Build a map of variable values with defaults
|
|
34
|
+
const values = {};
|
|
35
|
+
variables.forEach((v) => {
|
|
36
|
+
if (data[v.name] !== undefined) {
|
|
37
|
+
values[v.name] = data[v.name];
|
|
38
|
+
}
|
|
39
|
+
else if (v.default !== undefined) {
|
|
40
|
+
values[v.name] = v.default;
|
|
41
|
+
}
|
|
42
|
+
else if (v.required) {
|
|
43
|
+
missing.push(v.name);
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
// Replace variables in content
|
|
47
|
+
// Support formats: {{variable}}, ${variable}, {variable}
|
|
48
|
+
const patterns = [
|
|
49
|
+
/\{\{(\w+)\}\}/g, // {{variable}}
|
|
50
|
+
/\$\{(\w+)\}/g, // ${variable}
|
|
51
|
+
/\{(\w+)\}/g, // {variable}
|
|
52
|
+
];
|
|
53
|
+
patterns.forEach((pattern) => {
|
|
54
|
+
rendered = rendered.replace(pattern, (match, varName) => {
|
|
55
|
+
if (values[varName] !== undefined) {
|
|
56
|
+
const value = values[varName];
|
|
57
|
+
// Format based on type
|
|
58
|
+
if (Array.isArray(value)) {
|
|
59
|
+
return value.join(', ');
|
|
60
|
+
}
|
|
61
|
+
else if (value instanceof Date) {
|
|
62
|
+
return value.toISOString();
|
|
63
|
+
}
|
|
64
|
+
else if (typeof value === 'object') {
|
|
65
|
+
return JSON.stringify(value);
|
|
66
|
+
}
|
|
67
|
+
return String(value);
|
|
68
|
+
}
|
|
69
|
+
// Check if it's a built-in variable
|
|
70
|
+
switch (varName) {
|
|
71
|
+
case 'date':
|
|
72
|
+
return new Date().toISOString().split('T')[0];
|
|
73
|
+
case 'datetime':
|
|
74
|
+
return new Date().toISOString();
|
|
75
|
+
case 'timestamp':
|
|
76
|
+
return Date.now().toString();
|
|
77
|
+
case 'year':
|
|
78
|
+
return new Date().getFullYear().toString();
|
|
79
|
+
case 'month':
|
|
80
|
+
return String(new Date().getMonth() + 1).padStart(2, '0');
|
|
81
|
+
case 'day':
|
|
82
|
+
return String(new Date().getDate()).padStart(2, '0');
|
|
83
|
+
default:
|
|
84
|
+
// Variable not found, keep original
|
|
85
|
+
return match;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
return { rendered, missing };
|
|
90
|
+
}
|
|
91
|
+
// Built-in templates
|
|
92
|
+
const BUILTIN_TEMPLATES = [
|
|
93
|
+
{
|
|
94
|
+
name: 'Basic README',
|
|
95
|
+
type: 'document',
|
|
96
|
+
description: 'A simple README template',
|
|
97
|
+
content: `# {{projectName}}
|
|
98
|
+
|
|
99
|
+
{{description}}
|
|
100
|
+
|
|
101
|
+
## Installation
|
|
102
|
+
|
|
103
|
+
\`\`\`bash
|
|
104
|
+
npm install {{packageName}}
|
|
105
|
+
\`\`\`
|
|
106
|
+
|
|
107
|
+
## Usage
|
|
108
|
+
|
|
109
|
+
{{usage}}
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
{{license}}
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
Generated on {{date}}
|
|
117
|
+
`,
|
|
118
|
+
variables: [
|
|
119
|
+
{ name: 'projectName', type: 'string', required: true, description: 'Project name' },
|
|
120
|
+
{ name: 'description', type: 'string', required: true, description: 'Project description' },
|
|
121
|
+
{ name: 'packageName', type: 'string', required: false, default: '', description: 'npm package name' },
|
|
122
|
+
{ name: 'usage', type: 'string', required: false, default: 'See documentation.', description: 'Usage instructions' },
|
|
123
|
+
{ name: 'license', type: 'string', required: false, default: 'MIT', description: 'License type' },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
name: 'Session Summary',
|
|
128
|
+
type: 'session-log',
|
|
129
|
+
description: 'Template for session documentation',
|
|
130
|
+
content: `# Session: {{title}}
|
|
131
|
+
|
|
132
|
+
**Date**: {{date}}
|
|
133
|
+
**Duration**: {{duration}} minutes
|
|
134
|
+
**Tags**: {{tags}}
|
|
135
|
+
|
|
136
|
+
## Summary
|
|
137
|
+
|
|
138
|
+
{{summary}}
|
|
139
|
+
|
|
140
|
+
## Code Changes
|
|
141
|
+
|
|
142
|
+
{{codeChanges}}
|
|
143
|
+
|
|
144
|
+
## Design Decisions
|
|
145
|
+
|
|
146
|
+
{{decisions}}
|
|
147
|
+
|
|
148
|
+
## Next Steps
|
|
149
|
+
|
|
150
|
+
{{nextSteps}}
|
|
151
|
+
`,
|
|
152
|
+
variables: [
|
|
153
|
+
{ name: 'title', type: 'string', required: true, description: 'Session title' },
|
|
154
|
+
{ name: 'duration', type: 'number', required: false, default: 0, description: 'Duration in minutes' },
|
|
155
|
+
{ name: 'tags', type: 'array', required: false, default: [], description: 'Session tags' },
|
|
156
|
+
{ name: 'summary', type: 'string', required: true, description: 'Session summary' },
|
|
157
|
+
{ name: 'codeChanges', type: 'string', required: false, default: 'No code changes recorded.', description: 'Code changes' },
|
|
158
|
+
{ name: 'decisions', type: 'string', required: false, default: 'No design decisions recorded.', description: 'Design decisions' },
|
|
159
|
+
{ name: 'nextSteps', type: 'string', required: false, default: 'TBD', description: 'Next steps' },
|
|
160
|
+
],
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: 'Weekly Report',
|
|
164
|
+
type: 'report',
|
|
165
|
+
description: 'Weekly progress report template',
|
|
166
|
+
content: `# Weekly Report: {{weekOf}}
|
|
167
|
+
|
|
168
|
+
## Overview
|
|
169
|
+
|
|
170
|
+
- **Sessions Completed**: {{sessionCount}}
|
|
171
|
+
- **Code Blocks Written**: {{codeBlockCount}}
|
|
172
|
+
- **Design Decisions Made**: {{decisionCount}}
|
|
173
|
+
|
|
174
|
+
## Highlights
|
|
175
|
+
|
|
176
|
+
{{highlights}}
|
|
177
|
+
|
|
178
|
+
## Challenges
|
|
179
|
+
|
|
180
|
+
{{challenges}}
|
|
181
|
+
|
|
182
|
+
## Goals for Next Week
|
|
183
|
+
|
|
184
|
+
{{goals}}
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
Report generated on {{datetime}}
|
|
188
|
+
`,
|
|
189
|
+
variables: [
|
|
190
|
+
{ name: 'weekOf', type: 'string', required: true, description: 'Week starting date' },
|
|
191
|
+
{ name: 'sessionCount', type: 'number', required: false, default: 0 },
|
|
192
|
+
{ name: 'codeBlockCount', type: 'number', required: false, default: 0 },
|
|
193
|
+
{ name: 'decisionCount', type: 'number', required: false, default: 0 },
|
|
194
|
+
{ name: 'highlights', type: 'string', required: false, default: 'None noted.' },
|
|
195
|
+
{ name: 'challenges', type: 'string', required: false, default: 'None noted.' },
|
|
196
|
+
{ name: 'goals', type: 'string', required: false, default: 'TBD' },
|
|
197
|
+
],
|
|
198
|
+
},
|
|
199
|
+
];
|
|
200
|
+
// Main tool function
|
|
201
|
+
export async function templateTool(input) {
|
|
202
|
+
const { action, templateId, name, type, content, description, variables, data, format = 'json', filePath, filterType, limit, offset = 0, } = input;
|
|
203
|
+
logger.info('Template action requested', { action, templateId, name });
|
|
204
|
+
try {
|
|
205
|
+
await initializeStorage();
|
|
206
|
+
switch (action) {
|
|
207
|
+
case 'create': {
|
|
208
|
+
if (!name) {
|
|
209
|
+
return { success: false, action, error: 'name is required' };
|
|
210
|
+
}
|
|
211
|
+
if (!type) {
|
|
212
|
+
return { success: false, action, error: 'type is required' };
|
|
213
|
+
}
|
|
214
|
+
if (!content) {
|
|
215
|
+
return { success: false, action, error: 'content is required' };
|
|
216
|
+
}
|
|
217
|
+
const id = generateId();
|
|
218
|
+
const now = new Date().toISOString();
|
|
219
|
+
const template = {
|
|
220
|
+
id,
|
|
221
|
+
name,
|
|
222
|
+
type,
|
|
223
|
+
content,
|
|
224
|
+
description,
|
|
225
|
+
variables: variables || [],
|
|
226
|
+
createdAt: now,
|
|
227
|
+
updatedAt: now,
|
|
228
|
+
};
|
|
229
|
+
await fs.writeFile(getTemplatePath(id), JSON.stringify(template, null, 2), 'utf-8');
|
|
230
|
+
logger.info('Template created', { templateId: id, name });
|
|
231
|
+
return {
|
|
232
|
+
success: true,
|
|
233
|
+
action,
|
|
234
|
+
template,
|
|
235
|
+
message: `Template "${name}" created successfully`,
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
case 'get': {
|
|
239
|
+
if (!templateId && !name) {
|
|
240
|
+
return { success: false, action, error: 'templateId or name is required' };
|
|
241
|
+
}
|
|
242
|
+
// Try to find by ID first
|
|
243
|
+
if (templateId) {
|
|
244
|
+
try {
|
|
245
|
+
const data = await fs.readFile(getTemplatePath(templateId), 'utf-8');
|
|
246
|
+
const template = JSON.parse(data);
|
|
247
|
+
return { success: true, action, template };
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
return { success: false, action, error: `Template not found: ${templateId}` };
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
// Search by name
|
|
254
|
+
const files = await fs.readdir(STORAGE_DIR);
|
|
255
|
+
for (const file of files) {
|
|
256
|
+
if (!file.endsWith('.json'))
|
|
257
|
+
continue;
|
|
258
|
+
const data = await fs.readFile(path.join(STORAGE_DIR, file), 'utf-8');
|
|
259
|
+
const template = JSON.parse(data);
|
|
260
|
+
if (template.name === name) {
|
|
261
|
+
return { success: true, action, template };
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
// Check built-in templates
|
|
265
|
+
const builtin = BUILTIN_TEMPLATES.find((t) => t.name === name);
|
|
266
|
+
if (builtin) {
|
|
267
|
+
const template = {
|
|
268
|
+
...builtin,
|
|
269
|
+
id: `builtin_${builtin.name.toLowerCase().replace(/\s+/g, '_')}`,
|
|
270
|
+
createdAt: new Date(0).toISOString(),
|
|
271
|
+
updatedAt: new Date(0).toISOString(),
|
|
272
|
+
};
|
|
273
|
+
return { success: true, action, template };
|
|
274
|
+
}
|
|
275
|
+
return { success: false, action, error: `Template not found: ${name}` };
|
|
276
|
+
}
|
|
277
|
+
case 'update': {
|
|
278
|
+
if (!templateId) {
|
|
279
|
+
return { success: false, action, error: 'templateId is required' };
|
|
280
|
+
}
|
|
281
|
+
const templatePath = getTemplatePath(templateId);
|
|
282
|
+
let template;
|
|
283
|
+
try {
|
|
284
|
+
const existingData = await fs.readFile(templatePath, 'utf-8');
|
|
285
|
+
template = JSON.parse(existingData);
|
|
286
|
+
}
|
|
287
|
+
catch {
|
|
288
|
+
return { success: false, action, error: `Template not found: ${templateId}` };
|
|
289
|
+
}
|
|
290
|
+
// Update fields
|
|
291
|
+
if (name)
|
|
292
|
+
template.name = name;
|
|
293
|
+
if (type)
|
|
294
|
+
template.type = type;
|
|
295
|
+
if (content)
|
|
296
|
+
template.content = content;
|
|
297
|
+
if (description !== undefined)
|
|
298
|
+
template.description = description;
|
|
299
|
+
if (variables)
|
|
300
|
+
template.variables = variables;
|
|
301
|
+
template.updatedAt = new Date().toISOString();
|
|
302
|
+
await fs.writeFile(templatePath, JSON.stringify(template, null, 2), 'utf-8');
|
|
303
|
+
logger.info('Template updated', { templateId });
|
|
304
|
+
return {
|
|
305
|
+
success: true,
|
|
306
|
+
action,
|
|
307
|
+
template,
|
|
308
|
+
message: 'Template updated successfully',
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
case 'delete': {
|
|
312
|
+
if (!templateId) {
|
|
313
|
+
return { success: false, action, error: 'templateId is required' };
|
|
314
|
+
}
|
|
315
|
+
const templatePath = getTemplatePath(templateId);
|
|
316
|
+
try {
|
|
317
|
+
await fs.unlink(templatePath);
|
|
318
|
+
logger.info('Template deleted', { templateId });
|
|
319
|
+
return { success: true, action, message: 'Template deleted successfully' };
|
|
320
|
+
}
|
|
321
|
+
catch {
|
|
322
|
+
return { success: false, action, error: `Template not found: ${templateId}` };
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
case 'list': {
|
|
326
|
+
const templates = [];
|
|
327
|
+
// Load stored templates
|
|
328
|
+
try {
|
|
329
|
+
const files = await fs.readdir(STORAGE_DIR);
|
|
330
|
+
for (const file of files) {
|
|
331
|
+
if (!file.endsWith('.json'))
|
|
332
|
+
continue;
|
|
333
|
+
const data = await fs.readFile(path.join(STORAGE_DIR, file), 'utf-8');
|
|
334
|
+
const template = JSON.parse(data);
|
|
335
|
+
// Filter by type if specified
|
|
336
|
+
if (filterType && template.type !== filterType)
|
|
337
|
+
continue;
|
|
338
|
+
templates.push(template);
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
catch {
|
|
342
|
+
// Directory might not exist yet
|
|
343
|
+
}
|
|
344
|
+
// Add built-in templates
|
|
345
|
+
BUILTIN_TEMPLATES.forEach((builtin) => {
|
|
346
|
+
if (filterType && builtin.type !== filterType)
|
|
347
|
+
return;
|
|
348
|
+
templates.push({
|
|
349
|
+
...builtin,
|
|
350
|
+
id: `builtin_${builtin.name.toLowerCase().replace(/\s+/g, '_')}`,
|
|
351
|
+
createdAt: new Date(0).toISOString(),
|
|
352
|
+
updatedAt: new Date(0).toISOString(),
|
|
353
|
+
});
|
|
354
|
+
});
|
|
355
|
+
// Sort by name
|
|
356
|
+
templates.sort((a, b) => a.name.localeCompare(b.name));
|
|
357
|
+
// Paginate
|
|
358
|
+
const total = templates.length;
|
|
359
|
+
const paginated = limit
|
|
360
|
+
? templates.slice(offset, offset + limit)
|
|
361
|
+
: templates.slice(offset);
|
|
362
|
+
return {
|
|
363
|
+
success: true,
|
|
364
|
+
action,
|
|
365
|
+
templates: paginated,
|
|
366
|
+
total,
|
|
367
|
+
message: `Found ${total} templates`,
|
|
368
|
+
};
|
|
369
|
+
}
|
|
370
|
+
case 'apply':
|
|
371
|
+
case 'preview': {
|
|
372
|
+
// Get the template
|
|
373
|
+
let template;
|
|
374
|
+
if (templateId) {
|
|
375
|
+
try {
|
|
376
|
+
const templateData = await fs.readFile(getTemplatePath(templateId), 'utf-8');
|
|
377
|
+
template = JSON.parse(templateData);
|
|
378
|
+
}
|
|
379
|
+
catch {
|
|
380
|
+
// Check built-in templates
|
|
381
|
+
const builtin = BUILTIN_TEMPLATES.find((t) => `builtin_${t.name.toLowerCase().replace(/\s+/g, '_')}` === templateId);
|
|
382
|
+
if (builtin) {
|
|
383
|
+
template = {
|
|
384
|
+
...builtin,
|
|
385
|
+
id: templateId,
|
|
386
|
+
createdAt: new Date(0).toISOString(),
|
|
387
|
+
updatedAt: new Date(0).toISOString(),
|
|
388
|
+
};
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
else if (name) {
|
|
393
|
+
// Try to find by name
|
|
394
|
+
const files = await fs.readdir(STORAGE_DIR).catch(() => []);
|
|
395
|
+
for (const file of files) {
|
|
396
|
+
if (!file.endsWith('.json'))
|
|
397
|
+
continue;
|
|
398
|
+
const d = await fs.readFile(path.join(STORAGE_DIR, file), 'utf-8');
|
|
399
|
+
const t = JSON.parse(d);
|
|
400
|
+
if (t.name === name) {
|
|
401
|
+
template = t;
|
|
402
|
+
break;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
// Check built-in
|
|
406
|
+
if (!template) {
|
|
407
|
+
const builtin = BUILTIN_TEMPLATES.find((t) => t.name === name);
|
|
408
|
+
if (builtin) {
|
|
409
|
+
template = {
|
|
410
|
+
...builtin,
|
|
411
|
+
id: `builtin_${builtin.name.toLowerCase().replace(/\s+/g, '_')}`,
|
|
412
|
+
createdAt: new Date(0).toISOString(),
|
|
413
|
+
updatedAt: new Date(0).toISOString(),
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
if (!template) {
|
|
419
|
+
return { success: false, action, error: 'Template not found' };
|
|
420
|
+
}
|
|
421
|
+
const { rendered, missing } = renderTemplate(template.content, data || {}, template.variables);
|
|
422
|
+
if (action === 'preview') {
|
|
423
|
+
return {
|
|
424
|
+
success: true,
|
|
425
|
+
action,
|
|
426
|
+
rendered,
|
|
427
|
+
missingVariables: missing,
|
|
428
|
+
template,
|
|
429
|
+
message: missing.length > 0
|
|
430
|
+
? `Preview ready with ${missing.length} missing variables`
|
|
431
|
+
: 'Preview ready',
|
|
432
|
+
};
|
|
433
|
+
}
|
|
434
|
+
// For apply, check required variables
|
|
435
|
+
if (missing.length > 0) {
|
|
436
|
+
return {
|
|
437
|
+
success: false,
|
|
438
|
+
action,
|
|
439
|
+
missingVariables: missing,
|
|
440
|
+
error: `Missing required variables: ${missing.join(', ')}`,
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
return {
|
|
444
|
+
success: true,
|
|
445
|
+
action,
|
|
446
|
+
rendered,
|
|
447
|
+
template,
|
|
448
|
+
message: 'Template applied successfully',
|
|
449
|
+
};
|
|
450
|
+
}
|
|
451
|
+
case 'export': {
|
|
452
|
+
const templates = [];
|
|
453
|
+
// Load all templates
|
|
454
|
+
const files = await fs.readdir(STORAGE_DIR).catch(() => []);
|
|
455
|
+
for (const file of files) {
|
|
456
|
+
if (!file.endsWith('.json'))
|
|
457
|
+
continue;
|
|
458
|
+
const d = await fs.readFile(path.join(STORAGE_DIR, file), 'utf-8');
|
|
459
|
+
templates.push(JSON.parse(d));
|
|
460
|
+
}
|
|
461
|
+
if (templates.length === 0) {
|
|
462
|
+
return { success: false, action, error: 'No templates to export' };
|
|
463
|
+
}
|
|
464
|
+
const exportData = format === 'json'
|
|
465
|
+
? JSON.stringify(templates, null, 2)
|
|
466
|
+
: templates.map((t) => `---\n${JSON.stringify(t, null, 2)}\n`).join('\n');
|
|
467
|
+
if (filePath) {
|
|
468
|
+
await fs.writeFile(filePath, exportData, 'utf-8');
|
|
469
|
+
return {
|
|
470
|
+
success: true,
|
|
471
|
+
action,
|
|
472
|
+
filePath,
|
|
473
|
+
exportedCount: templates.length,
|
|
474
|
+
message: `Exported ${templates.length} templates to ${filePath}`,
|
|
475
|
+
};
|
|
476
|
+
}
|
|
477
|
+
return {
|
|
478
|
+
success: true,
|
|
479
|
+
action,
|
|
480
|
+
rendered: exportData,
|
|
481
|
+
exportedCount: templates.length,
|
|
482
|
+
message: `Exported ${templates.length} templates`,
|
|
483
|
+
};
|
|
484
|
+
}
|
|
485
|
+
case 'import': {
|
|
486
|
+
if (!filePath && !content) {
|
|
487
|
+
return { success: false, action, error: 'filePath or content is required' };
|
|
488
|
+
}
|
|
489
|
+
let importData;
|
|
490
|
+
if (filePath) {
|
|
491
|
+
importData = await fs.readFile(filePath, 'utf-8');
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
importData = content;
|
|
495
|
+
}
|
|
496
|
+
let templates;
|
|
497
|
+
try {
|
|
498
|
+
templates = JSON.parse(importData);
|
|
499
|
+
if (!Array.isArray(templates)) {
|
|
500
|
+
templates = [templates];
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
catch {
|
|
504
|
+
return { success: false, action, error: 'Invalid template data format' };
|
|
505
|
+
}
|
|
506
|
+
let importedCount = 0;
|
|
507
|
+
for (const t of templates) {
|
|
508
|
+
const id = generateId();
|
|
509
|
+
const now = new Date().toISOString();
|
|
510
|
+
const template = {
|
|
511
|
+
...t,
|
|
512
|
+
id,
|
|
513
|
+
createdAt: now,
|
|
514
|
+
updatedAt: now,
|
|
515
|
+
};
|
|
516
|
+
await fs.writeFile(getTemplatePath(id), JSON.stringify(template, null, 2), 'utf-8');
|
|
517
|
+
importedCount++;
|
|
518
|
+
}
|
|
519
|
+
return {
|
|
520
|
+
success: true,
|
|
521
|
+
action,
|
|
522
|
+
importedCount,
|
|
523
|
+
message: `Imported ${importedCount} templates`,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
default:
|
|
527
|
+
return { success: false, action, error: `Unknown action: ${action}` };
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
catch (error) {
|
|
531
|
+
logger.error('Template operation failed', error);
|
|
532
|
+
return {
|
|
533
|
+
success: false,
|
|
534
|
+
action,
|
|
535
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
// Schema for MCP registration
|
|
540
|
+
export const templateSchema = {
|
|
541
|
+
name: 'muse_template',
|
|
542
|
+
description: 'Manages custom document templates with variable substitution. Actions: create, get, update, delete, list, apply (render with data), preview (render preview), import, export.',
|
|
543
|
+
inputSchema: {
|
|
544
|
+
type: 'object',
|
|
545
|
+
properties: {
|
|
546
|
+
action: {
|
|
547
|
+
type: 'string',
|
|
548
|
+
enum: ['create', 'get', 'update', 'delete', 'list', 'apply', 'preview', 'import', 'export'],
|
|
549
|
+
description: 'Action to perform',
|
|
550
|
+
},
|
|
551
|
+
templateId: {
|
|
552
|
+
type: 'string',
|
|
553
|
+
description: 'Template ID',
|
|
554
|
+
},
|
|
555
|
+
name: {
|
|
556
|
+
type: 'string',
|
|
557
|
+
description: 'Template name',
|
|
558
|
+
},
|
|
559
|
+
type: {
|
|
560
|
+
type: 'string',
|
|
561
|
+
enum: ['document', 'session-log', 'export', 'report'],
|
|
562
|
+
description: 'Template type',
|
|
563
|
+
},
|
|
564
|
+
content: {
|
|
565
|
+
type: 'string',
|
|
566
|
+
description: 'Template content with {{variables}}',
|
|
567
|
+
},
|
|
568
|
+
description: {
|
|
569
|
+
type: 'string',
|
|
570
|
+
description: 'Template description',
|
|
571
|
+
},
|
|
572
|
+
variables: {
|
|
573
|
+
type: 'array',
|
|
574
|
+
items: {
|
|
575
|
+
type: 'object',
|
|
576
|
+
properties: {
|
|
577
|
+
name: { type: 'string' },
|
|
578
|
+
type: { type: 'string', enum: ['string', 'number', 'boolean', 'array', 'date'] },
|
|
579
|
+
required: { type: 'boolean' },
|
|
580
|
+
default: {},
|
|
581
|
+
description: { type: 'string' },
|
|
582
|
+
},
|
|
583
|
+
required: ['name', 'type'],
|
|
584
|
+
},
|
|
585
|
+
description: 'Template variables definition',
|
|
586
|
+
},
|
|
587
|
+
data: {
|
|
588
|
+
type: 'object',
|
|
589
|
+
description: 'Variable values for apply/preview',
|
|
590
|
+
},
|
|
591
|
+
format: {
|
|
592
|
+
type: 'string',
|
|
593
|
+
enum: ['json', 'yaml'],
|
|
594
|
+
description: 'Import/export format (default: json)',
|
|
595
|
+
},
|
|
596
|
+
filePath: {
|
|
597
|
+
type: 'string',
|
|
598
|
+
description: 'File path for import/export',
|
|
599
|
+
},
|
|
600
|
+
filterType: {
|
|
601
|
+
type: 'string',
|
|
602
|
+
enum: ['document', 'session-log', 'export', 'report'],
|
|
603
|
+
description: 'Filter list by type',
|
|
604
|
+
},
|
|
605
|
+
limit: {
|
|
606
|
+
type: 'number',
|
|
607
|
+
description: 'Limit results for list',
|
|
608
|
+
},
|
|
609
|
+
offset: {
|
|
610
|
+
type: 'number',
|
|
611
|
+
description: 'Offset for list pagination',
|
|
612
|
+
},
|
|
613
|
+
},
|
|
614
|
+
required: ['action'],
|
|
615
|
+
},
|
|
616
|
+
};
|
|
617
|
+
//# sourceMappingURL=template.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"template.js","sourceRoot":"","sources":["../../src/tools/template.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,MAAM,MAAM,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAgD5C,UAAU;AACV,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,CAAC,uBAAuB;IACrD,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,kBAAkB,EAAE,WAAW,CAAC,CAAC;AAE3D,IAAI,WAAW,GAAG,KAAK,CAAC;AAExB,KAAK,UAAU,iBAAiB;IAC9B,I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