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,459 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Batch Operations Tool (v2.12)
|
|
3
|
+
* Executes multiple tool operations in batch with dependency management
|
|
4
|
+
*/
|
|
5
|
+
import { createToolLogger } from '../core/logger.js';
|
|
6
|
+
// Import all available tools for batch execution
|
|
7
|
+
import { collectCodeContext } from './collectCodeContext.js';
|
|
8
|
+
import { summarizeDesignDecisions } from './summarizeDesignDecisions.js';
|
|
9
|
+
import { generateDevDocument } from './generateDevDocument.js';
|
|
10
|
+
import { normalizeForPlatform } from './normalizeForPlatform.js';
|
|
11
|
+
import { publishDocument } from './publishDocument.js';
|
|
12
|
+
import { createSessionLog } from './createSessionLog.js';
|
|
13
|
+
import { analyzeCodeTool } from './analyzeCode.js';
|
|
14
|
+
import { sessionHistoryTool } from './sessionHistory.js';
|
|
15
|
+
import { exportSessionTool } from './exportSession.js';
|
|
16
|
+
import { projectProfileTool } from './projectProfile.js';
|
|
17
|
+
import { gitTool } from './git.js';
|
|
18
|
+
import { sessionStatsTool } from './sessionStats.js';
|
|
19
|
+
import { autoTagTool } from './autoTag.js';
|
|
20
|
+
import { templateTool } from './template.js';
|
|
21
|
+
const logger = createToolLogger('batch');
|
|
22
|
+
// In-memory job storage
|
|
23
|
+
const jobHistory = new Map();
|
|
24
|
+
const activeJobs = new Map();
|
|
25
|
+
// Tool registry mapping tool names to functions
|
|
26
|
+
// Wrap sync functions to return promises for consistent handling
|
|
27
|
+
const toolRegistry = {
|
|
28
|
+
muse_collect_code_context: async (p) => collectCodeContext(p),
|
|
29
|
+
muse_summarize_design_decisions: summarizeDesignDecisions,
|
|
30
|
+
muse_generate_dev_document: async (p) => generateDevDocument(p),
|
|
31
|
+
muse_normalize_for_platform: async (p) => normalizeForPlatform(p),
|
|
32
|
+
muse_publish_document: publishDocument,
|
|
33
|
+
muse_create_session_log: createSessionLog,
|
|
34
|
+
muse_analyze_code: analyzeCodeTool,
|
|
35
|
+
muse_session_history: sessionHistoryTool,
|
|
36
|
+
muse_export_session: exportSessionTool,
|
|
37
|
+
muse_project_profile: projectProfileTool,
|
|
38
|
+
muse_git: gitTool,
|
|
39
|
+
muse_session_stats: sessionStatsTool,
|
|
40
|
+
muse_auto_tag: autoTagTool,
|
|
41
|
+
muse_template: templateTool,
|
|
42
|
+
};
|
|
43
|
+
// Helper functions
|
|
44
|
+
function generateJobId() {
|
|
45
|
+
const timestamp = Date.now().toString(36);
|
|
46
|
+
const random = Math.random().toString(36).substring(2, 8);
|
|
47
|
+
return `batch_${timestamp}_${random}`;
|
|
48
|
+
}
|
|
49
|
+
function generateOpId(index, tool) {
|
|
50
|
+
return `op_${index}_${tool.replace(/^muse_/, '')}`;
|
|
51
|
+
}
|
|
52
|
+
// Sort operations by dependencies using topological sort
|
|
53
|
+
function sortByDependencies(operations) {
|
|
54
|
+
const opMap = new Map();
|
|
55
|
+
const inDegree = new Map();
|
|
56
|
+
const graph = new Map();
|
|
57
|
+
// Initialize
|
|
58
|
+
operations.forEach((op, index) => {
|
|
59
|
+
const id = op.id || generateOpId(index, op.tool);
|
|
60
|
+
opMap.set(id, { ...op, id });
|
|
61
|
+
inDegree.set(id, 0);
|
|
62
|
+
graph.set(id, []);
|
|
63
|
+
});
|
|
64
|
+
// Build graph
|
|
65
|
+
operations.forEach((op, index) => {
|
|
66
|
+
const id = op.id || generateOpId(index, op.tool);
|
|
67
|
+
if (op.dependsOn) {
|
|
68
|
+
op.dependsOn.forEach((depId) => {
|
|
69
|
+
if (opMap.has(depId)) {
|
|
70
|
+
graph.get(depId).push(id);
|
|
71
|
+
inDegree.set(id, (inDegree.get(id) || 0) + 1);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// Topological sort
|
|
77
|
+
const queue = [];
|
|
78
|
+
const sorted = [];
|
|
79
|
+
inDegree.forEach((degree, id) => {
|
|
80
|
+
if (degree === 0)
|
|
81
|
+
queue.push(id);
|
|
82
|
+
});
|
|
83
|
+
while (queue.length > 0) {
|
|
84
|
+
const current = queue.shift();
|
|
85
|
+
sorted.push(opMap.get(current));
|
|
86
|
+
graph.get(current)?.forEach((neighbor) => {
|
|
87
|
+
const newDegree = (inDegree.get(neighbor) || 0) - 1;
|
|
88
|
+
inDegree.set(neighbor, newDegree);
|
|
89
|
+
if (newDegree === 0)
|
|
90
|
+
queue.push(neighbor);
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
// Check for cycles
|
|
94
|
+
if (sorted.length !== operations.length) {
|
|
95
|
+
throw new Error('Circular dependency detected in batch operations');
|
|
96
|
+
}
|
|
97
|
+
return sorted;
|
|
98
|
+
}
|
|
99
|
+
// Execute a single operation
|
|
100
|
+
async function executeOperation(operation, previousResults, timeout) {
|
|
101
|
+
const startedAt = new Date().toISOString();
|
|
102
|
+
const opId = operation.id || generateOpId(0, operation.tool);
|
|
103
|
+
// Resolve any parameter references to previous results
|
|
104
|
+
const resolvedParams = { ...operation.params };
|
|
105
|
+
Object.entries(resolvedParams).forEach(([key, value]) => {
|
|
106
|
+
if (typeof value === 'string' && value.startsWith('$')) {
|
|
107
|
+
const refId = value.substring(1);
|
|
108
|
+
if (previousResults.has(refId)) {
|
|
109
|
+
resolvedParams[key] = previousResults.get(refId);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
try {
|
|
114
|
+
const toolFn = toolRegistry[operation.tool];
|
|
115
|
+
if (!toolFn) {
|
|
116
|
+
throw new Error(`Unknown tool: ${operation.tool}`);
|
|
117
|
+
}
|
|
118
|
+
// Execute with timeout
|
|
119
|
+
const result = await Promise.race([
|
|
120
|
+
toolFn(resolvedParams),
|
|
121
|
+
new Promise((_, reject) => setTimeout(() => reject(new Error('Operation timeout')), timeout)),
|
|
122
|
+
]);
|
|
123
|
+
const completedAt = new Date().toISOString();
|
|
124
|
+
const duration = new Date(completedAt).getTime() - new Date(startedAt).getTime();
|
|
125
|
+
return {
|
|
126
|
+
id: opId,
|
|
127
|
+
tool: operation.tool,
|
|
128
|
+
status: 'completed',
|
|
129
|
+
result,
|
|
130
|
+
startedAt,
|
|
131
|
+
completedAt,
|
|
132
|
+
duration,
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
const completedAt = new Date().toISOString();
|
|
137
|
+
const duration = new Date(completedAt).getTime() - new Date(startedAt).getTime();
|
|
138
|
+
return {
|
|
139
|
+
id: opId,
|
|
140
|
+
tool: operation.tool,
|
|
141
|
+
status: 'failed',
|
|
142
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
143
|
+
startedAt,
|
|
144
|
+
completedAt,
|
|
145
|
+
duration,
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
// Main tool function
|
|
150
|
+
export async function batchTool(input) {
|
|
151
|
+
const { action, operations, mode = 'sequential', stopOnError = true, timeout = 60000, jobId, limit = 20, status: filterStatus, includeResults = true, includeErrors = true, } = input;
|
|
152
|
+
logger.info('Batch action requested', { action, mode, operationCount: operations?.length });
|
|
153
|
+
try {
|
|
154
|
+
switch (action) {
|
|
155
|
+
case 'execute':
|
|
156
|
+
case 'preview': {
|
|
157
|
+
if (!operations || operations.length === 0) {
|
|
158
|
+
return {
|
|
159
|
+
success: false,
|
|
160
|
+
action,
|
|
161
|
+
error: 'operations are required',
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
// Validate operations
|
|
165
|
+
for (const op of operations) {
|
|
166
|
+
if (!toolRegistry[op.tool]) {
|
|
167
|
+
return {
|
|
168
|
+
success: false,
|
|
169
|
+
action,
|
|
170
|
+
error: `Unknown tool: ${op.tool}`,
|
|
171
|
+
};
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
// For preview, just return the plan
|
|
175
|
+
if (action === 'preview') {
|
|
176
|
+
const sortedOps = sortByDependencies(operations);
|
|
177
|
+
const previewResults = sortedOps.map((op, index) => ({
|
|
178
|
+
id: op.id || generateOpId(index, op.tool),
|
|
179
|
+
tool: op.tool,
|
|
180
|
+
status: 'pending',
|
|
181
|
+
}));
|
|
182
|
+
return {
|
|
183
|
+
success: true,
|
|
184
|
+
action,
|
|
185
|
+
results: previewResults,
|
|
186
|
+
message: `Preview: ${operations.length} operations will be executed in ${mode} mode`,
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
// Execute
|
|
190
|
+
const batchJobId = generateJobId();
|
|
191
|
+
const startedAt = new Date().toISOString();
|
|
192
|
+
activeJobs.set(batchJobId, { cancelled: false });
|
|
193
|
+
const job = {
|
|
194
|
+
id: batchJobId,
|
|
195
|
+
status: 'running',
|
|
196
|
+
operations: [],
|
|
197
|
+
mode,
|
|
198
|
+
startedAt,
|
|
199
|
+
successCount: 0,
|
|
200
|
+
failCount: 0,
|
|
201
|
+
};
|
|
202
|
+
jobHistory.set(batchJobId, job);
|
|
203
|
+
const sortedOps = sortByDependencies(operations);
|
|
204
|
+
const previousResults = new Map();
|
|
205
|
+
if (mode === 'sequential') {
|
|
206
|
+
// Sequential execution
|
|
207
|
+
for (let i = 0; i < sortedOps.length; i++) {
|
|
208
|
+
const op = sortedOps[i];
|
|
209
|
+
// Check for cancellation
|
|
210
|
+
if (activeJobs.get(batchJobId)?.cancelled) {
|
|
211
|
+
job.status = 'cancelled';
|
|
212
|
+
break;
|
|
213
|
+
}
|
|
214
|
+
const result = await executeOperation(op, previousResults, timeout);
|
|
215
|
+
job.operations.push(result);
|
|
216
|
+
if (result.status === 'completed') {
|
|
217
|
+
job.successCount++;
|
|
218
|
+
previousResults.set(result.id, result.result);
|
|
219
|
+
}
|
|
220
|
+
else {
|
|
221
|
+
job.failCount++;
|
|
222
|
+
if (stopOnError) {
|
|
223
|
+
job.status = 'failed';
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
else {
|
|
230
|
+
// Parallel execution (respecting dependencies)
|
|
231
|
+
const completed = new Set();
|
|
232
|
+
const pending = new Map();
|
|
233
|
+
sortedOps.forEach((op, index) => {
|
|
234
|
+
const id = op.id || generateOpId(index, op.tool);
|
|
235
|
+
pending.set(id, { ...op, id });
|
|
236
|
+
});
|
|
237
|
+
while (pending.size > 0 && !activeJobs.get(batchJobId)?.cancelled) {
|
|
238
|
+
// Find operations that can be executed (dependencies satisfied)
|
|
239
|
+
const ready = [];
|
|
240
|
+
pending.forEach((op, id) => {
|
|
241
|
+
const deps = op.dependsOn || [];
|
|
242
|
+
if (deps.every((d) => completed.has(d))) {
|
|
243
|
+
ready.push(op);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
if (ready.length === 0 && pending.size > 0) {
|
|
247
|
+
// Deadlock or cycle
|
|
248
|
+
job.status = 'failed';
|
|
249
|
+
job.operations.push({
|
|
250
|
+
id: 'deadlock',
|
|
251
|
+
tool: 'batch',
|
|
252
|
+
status: 'failed',
|
|
253
|
+
error: 'Deadlock detected: unable to proceed with remaining operations',
|
|
254
|
+
});
|
|
255
|
+
break;
|
|
256
|
+
}
|
|
257
|
+
// Execute ready operations in parallel
|
|
258
|
+
const results = await Promise.all(ready.map((op) => executeOperation(op, previousResults, timeout)));
|
|
259
|
+
for (const result of results) {
|
|
260
|
+
job.operations.push(result);
|
|
261
|
+
completed.add(result.id);
|
|
262
|
+
pending.delete(result.id);
|
|
263
|
+
if (result.status === 'completed') {
|
|
264
|
+
job.successCount++;
|
|
265
|
+
previousResults.set(result.id, result.result);
|
|
266
|
+
}
|
|
267
|
+
else {
|
|
268
|
+
job.failCount++;
|
|
269
|
+
if (stopOnError) {
|
|
270
|
+
job.status = 'failed';
|
|
271
|
+
pending.clear();
|
|
272
|
+
break;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
// Finalize job
|
|
279
|
+
if (job.status === 'running') {
|
|
280
|
+
job.status = job.failCount > 0 ? 'failed' : 'completed';
|
|
281
|
+
}
|
|
282
|
+
job.completedAt = new Date().toISOString();
|
|
283
|
+
job.totalDuration = new Date(job.completedAt).getTime() - new Date(startedAt).getTime();
|
|
284
|
+
activeJobs.delete(batchJobId);
|
|
285
|
+
jobHistory.set(batchJobId, job);
|
|
286
|
+
// Prepare response
|
|
287
|
+
const responseResults = job.operations.map((op) => ({
|
|
288
|
+
...op,
|
|
289
|
+
result: includeResults ? op.result : undefined,
|
|
290
|
+
error: includeErrors ? op.error : undefined,
|
|
291
|
+
}));
|
|
292
|
+
return {
|
|
293
|
+
success: job.status === 'completed',
|
|
294
|
+
action,
|
|
295
|
+
job: { ...job, operations: responseResults },
|
|
296
|
+
results: responseResults,
|
|
297
|
+
message: `Batch ${job.status}: ${job.successCount} succeeded, ${job.failCount} failed`,
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
case 'status': {
|
|
301
|
+
if (!jobId) {
|
|
302
|
+
return {
|
|
303
|
+
success: false,
|
|
304
|
+
action,
|
|
305
|
+
error: 'jobId is required',
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
const job = jobHistory.get(jobId);
|
|
309
|
+
if (!job) {
|
|
310
|
+
return {
|
|
311
|
+
success: false,
|
|
312
|
+
action,
|
|
313
|
+
error: `Job not found: ${jobId}`,
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
return {
|
|
317
|
+
success: true,
|
|
318
|
+
action,
|
|
319
|
+
job,
|
|
320
|
+
message: `Job ${job.status}`,
|
|
321
|
+
};
|
|
322
|
+
}
|
|
323
|
+
case 'cancel': {
|
|
324
|
+
if (!jobId) {
|
|
325
|
+
return {
|
|
326
|
+
success: false,
|
|
327
|
+
action,
|
|
328
|
+
error: 'jobId is required',
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
const activeJob = activeJobs.get(jobId);
|
|
332
|
+
if (!activeJob) {
|
|
333
|
+
return {
|
|
334
|
+
success: false,
|
|
335
|
+
action,
|
|
336
|
+
error: `Job not found or already completed: ${jobId}`,
|
|
337
|
+
};
|
|
338
|
+
}
|
|
339
|
+
activeJob.cancelled = true;
|
|
340
|
+
return {
|
|
341
|
+
success: true,
|
|
342
|
+
action,
|
|
343
|
+
message: `Job ${jobId} cancellation requested`,
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
case 'history': {
|
|
347
|
+
let jobs = Array.from(jobHistory.values());
|
|
348
|
+
// Filter by status if specified
|
|
349
|
+
if (filterStatus) {
|
|
350
|
+
jobs = jobs.filter((j) => j.status === filterStatus);
|
|
351
|
+
}
|
|
352
|
+
// Sort by start time (newest first)
|
|
353
|
+
jobs.sort((a, b) => new Date(b.startedAt).getTime() - new Date(a.startedAt).getTime());
|
|
354
|
+
// Paginate
|
|
355
|
+
const total = jobs.length;
|
|
356
|
+
const paginated = jobs.slice(0, limit);
|
|
357
|
+
return {
|
|
358
|
+
success: true,
|
|
359
|
+
action,
|
|
360
|
+
jobs: paginated,
|
|
361
|
+
total,
|
|
362
|
+
message: `Found ${total} batch jobs`,
|
|
363
|
+
};
|
|
364
|
+
}
|
|
365
|
+
default:
|
|
366
|
+
return {
|
|
367
|
+
success: false,
|
|
368
|
+
action,
|
|
369
|
+
error: `Unknown action: ${action}`,
|
|
370
|
+
};
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
catch (error) {
|
|
374
|
+
logger.error('Batch operation failed', error);
|
|
375
|
+
return {
|
|
376
|
+
success: false,
|
|
377
|
+
action,
|
|
378
|
+
error: error instanceof Error ? error.message : 'Unknown error',
|
|
379
|
+
};
|
|
380
|
+
}
|
|
381
|
+
}
|
|
382
|
+
// Schema for MCP registration
|
|
383
|
+
export const batchSchema = {
|
|
384
|
+
name: 'muse_batch',
|
|
385
|
+
description: 'Executes multiple tool operations in batch. Actions: execute (run batch), preview (plan without executing), status (check job status), cancel (stop running job), history (list past jobs). Supports sequential and parallel execution with dependency management.',
|
|
386
|
+
inputSchema: {
|
|
387
|
+
type: 'object',
|
|
388
|
+
properties: {
|
|
389
|
+
action: {
|
|
390
|
+
type: 'string',
|
|
391
|
+
enum: ['execute', 'preview', 'status', 'cancel', 'history'],
|
|
392
|
+
description: 'Action to perform',
|
|
393
|
+
},
|
|
394
|
+
operations: {
|
|
395
|
+
type: 'array',
|
|
396
|
+
items: {
|
|
397
|
+
type: 'object',
|
|
398
|
+
properties: {
|
|
399
|
+
tool: {
|
|
400
|
+
type: 'string',
|
|
401
|
+
description: 'Tool name to execute (e.g., muse_analyze_code)',
|
|
402
|
+
},
|
|
403
|
+
params: {
|
|
404
|
+
type: 'object',
|
|
405
|
+
description: 'Parameters to pass to the tool',
|
|
406
|
+
},
|
|
407
|
+
id: {
|
|
408
|
+
type: 'string',
|
|
409
|
+
description: 'Optional operation ID for dependency reference',
|
|
410
|
+
},
|
|
411
|
+
dependsOn: {
|
|
412
|
+
type: 'array',
|
|
413
|
+
items: { type: 'string' },
|
|
414
|
+
description: 'IDs of operations this depends on',
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
required: ['tool', 'params'],
|
|
418
|
+
},
|
|
419
|
+
description: 'Array of operations to execute',
|
|
420
|
+
},
|
|
421
|
+
mode: {
|
|
422
|
+
type: 'string',
|
|
423
|
+
enum: ['sequential', 'parallel'],
|
|
424
|
+
description: 'Execution mode (default: sequential)',
|
|
425
|
+
},
|
|
426
|
+
stopOnError: {
|
|
427
|
+
type: 'boolean',
|
|
428
|
+
description: 'Stop batch on first error (default: true)',
|
|
429
|
+
},
|
|
430
|
+
timeout: {
|
|
431
|
+
type: 'number',
|
|
432
|
+
description: 'Timeout per operation in ms (default: 60000)',
|
|
433
|
+
},
|
|
434
|
+
jobId: {
|
|
435
|
+
type: 'string',
|
|
436
|
+
description: 'Job ID for status/cancel actions',
|
|
437
|
+
},
|
|
438
|
+
limit: {
|
|
439
|
+
type: 'number',
|
|
440
|
+
description: 'Limit for history action (default: 20)',
|
|
441
|
+
},
|
|
442
|
+
status: {
|
|
443
|
+
type: 'string',
|
|
444
|
+
enum: ['pending', 'running', 'completed', 'failed', 'cancelled'],
|
|
445
|
+
description: 'Filter history by status',
|
|
446
|
+
},
|
|
447
|
+
includeResults: {
|
|
448
|
+
type: 'boolean',
|
|
449
|
+
description: 'Include operation results in response (default: true)',
|
|
450
|
+
},
|
|
451
|
+
includeErrors: {
|
|
452
|
+
type: 'boolean',
|
|
453
|
+
description: 'Include error details in response (default: true)',
|
|
454
|
+
},
|
|
455
|
+
},
|
|
456
|
+
required: ['action'],
|
|
457
|
+
},
|
|
458
|
+
};
|
|
459
|
+
//# sourceMappingURL=batch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"batch.js","sourceRoot":"","sources":["../../src/tools/batch.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAGrD,iDAAiD;AACjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAC7D,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;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AAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wCAAwC;aACtD;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,CAAC;gBAChE,WAAW,EAAE,0BAA0B;aACxC;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,uDAAuD;aACrE;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,mDAAmD;aACjE;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;KACrB;CACF,CAAC"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 세션 Export 도구
|
|
3
|
+
* 세션 데이터를 다양한 형식으로 내보내기
|
|
4
|
+
* v2.7: Session Export
|
|
5
|
+
*/
|
|
6
|
+
export type ExportFormat = 'markdown' | 'json' | 'html';
|
|
7
|
+
export interface ExportSessionInput {
|
|
8
|
+
sessionIds?: string[];
|
|
9
|
+
format: ExportFormat;
|
|
10
|
+
outputPath?: string;
|
|
11
|
+
includeMetadata?: boolean;
|
|
12
|
+
includeCodeBlocks?: boolean;
|
|
13
|
+
includeDesignDecisions?: boolean;
|
|
14
|
+
template?: 'default' | 'minimal' | 'detailed' | 'report';
|
|
15
|
+
title?: string;
|
|
16
|
+
bundleMultiple?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ExportSessionOutput {
|
|
19
|
+
success: boolean;
|
|
20
|
+
format: ExportFormat;
|
|
21
|
+
content?: string;
|
|
22
|
+
filePath?: string;
|
|
23
|
+
sessionCount: number;
|
|
24
|
+
message?: string;
|
|
25
|
+
error?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function exportSessionTool(input: ExportSessionInput): Promise<ExportSessionOutput>;
|
|
28
|
+
export declare const exportSessionSchema: {
|
|
29
|
+
name: string;
|
|
30
|
+
description: string;
|
|
31
|
+
inputSchema: {
|
|
32
|
+
type: string;
|
|
33
|
+
properties: {
|
|
34
|
+
sessionIds: {
|
|
35
|
+
type: string;
|
|
36
|
+
items: {
|
|
37
|
+
type: string;
|
|
38
|
+
};
|
|
39
|
+
description: string;
|
|
40
|
+
};
|
|
41
|
+
format: {
|
|
42
|
+
type: string;
|
|
43
|
+
enum: string[];
|
|
44
|
+
description: string;
|
|
45
|
+
};
|
|
46
|
+
outputPath: {
|
|
47
|
+
type: string;
|
|
48
|
+
description: string;
|
|
49
|
+
};
|
|
50
|
+
includeMetadata: {
|
|
51
|
+
type: string;
|
|
52
|
+
description: string;
|
|
53
|
+
};
|
|
54
|
+
includeCodeBlocks: {
|
|
55
|
+
type: string;
|
|
56
|
+
description: string;
|
|
57
|
+
};
|
|
58
|
+
includeDesignDecisions: {
|
|
59
|
+
type: string;
|
|
60
|
+
description: string;
|
|
61
|
+
};
|
|
62
|
+
template: {
|
|
63
|
+
type: string;
|
|
64
|
+
enum: string[];
|
|
65
|
+
description: string;
|
|
66
|
+
};
|
|
67
|
+
title: {
|
|
68
|
+
type: string;
|
|
69
|
+
description: string;
|
|
70
|
+
};
|
|
71
|
+
bundleMultiple: {
|
|
72
|
+
type: string;
|
|
73
|
+
description: string;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
required: string[];
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
//# sourceMappingURL=exportSession.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exportSession.d.ts","sourceRoot":"","sources":["../../src/tools/exportSession.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,MAAM,EAAE,YAAY,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,QAAQ,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,QAAQ,CAAC;IACzD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,YAAY,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8UD,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CA2G/F;AAED,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgD/B,CAAC"}
|