flowspec-mcp 2.1.1 → 3.0.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/dist/analysis/analysisUtils.d.ts +36 -0
- package/dist/analysis/analysisUtils.js +284 -0
- package/dist/analysis/analysisUtils.js.map +1 -0
- package/dist/db.d.ts +68 -0
- package/dist/db.js +259 -0
- package/dist/db.js.map +1 -1
- package/dist/image/dimensions.d.ts +10 -0
- package/dist/image/dimensions.js +53 -0
- package/dist/image/dimensions.js.map +1 -0
- package/dist/import/yamlImporter.d.ts +22 -0
- package/dist/import/yamlImporter.js +227 -0
- package/dist/import/yamlImporter.js.map +1 -0
- package/dist/index.js +0 -0
- package/dist/layout/autoLayout.d.ts +19 -0
- package/dist/layout/autoLayout.js +85 -0
- package/dist/layout/autoLayout.js.map +1 -0
- package/dist/layout/semanticLayout.d.ts +24 -0
- package/dist/layout/semanticLayout.js +233 -0
- package/dist/layout/semanticLayout.js.map +1 -0
- package/dist/server.js +26 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/addRegion.d.ts +69 -0
- package/dist/tools/addRegion.js +39 -0
- package/dist/tools/addRegion.js.map +1 -0
- package/dist/tools/autoLayout.d.ts +27 -0
- package/dist/tools/autoLayout.js +52 -0
- package/dist/tools/autoLayout.js.map +1 -0
- package/dist/tools/captureScreen.d.ts +48 -0
- package/dist/tools/captureScreen.js +135 -0
- package/dist/tools/captureScreen.js.map +1 -0
- package/dist/tools/cloneProject.d.ts +21 -0
- package/dist/tools/cloneProject.js +21 -0
- package/dist/tools/cloneProject.js.map +1 -0
- package/dist/tools/createScreen.d.ts +36 -0
- package/dist/tools/createScreen.js +26 -0
- package/dist/tools/createScreen.js.map +1 -0
- package/dist/tools/deleteScreen.d.ts +24 -0
- package/dist/tools/deleteScreen.js +22 -0
- package/dist/tools/deleteScreen.js.map +1 -0
- package/dist/tools/generateSpec.d.ts +26 -0
- package/dist/tools/generateSpec.js +336 -0
- package/dist/tools/generateSpec.js.map +1 -0
- package/dist/tools/healthCheck.d.ts +8 -0
- package/dist/tools/healthCheck.js +16 -0
- package/dist/tools/healthCheck.js.map +1 -0
- package/dist/tools/importYaml.d.ts +33 -0
- package/dist/tools/importYaml.js +97 -0
- package/dist/tools/importYaml.js.map +1 -0
- package/dist/tools/ingestCodebase.d.ts +27 -0
- package/dist/tools/ingestCodebase.js +516 -0
- package/dist/tools/ingestCodebase.js.map +1 -0
- package/dist/tools/removeRegion.d.ts +27 -0
- package/dist/tools/removeRegion.js +23 -0
- package/dist/tools/removeRegion.js.map +1 -0
- package/dist/tools/smartLayout.d.ts +30 -0
- package/dist/tools/smartLayout.js +74 -0
- package/dist/tools/smartLayout.js.map +1 -0
- package/dist/tools/updateEdge.d.ts +39 -0
- package/dist/tools/updateEdge.js +50 -0
- package/dist/tools/updateEdge.js.map +1 -0
- package/dist/tools/updateRegion.d.ts +72 -0
- package/dist/tools/updateRegion.js +35 -0
- package/dist/tools/updateRegion.js.map +1 -0
- package/dist/tools/updateScreen.d.ts +39 -0
- package/dist/tools/updateScreen.js +28 -0
- package/dist/tools/updateScreen.js.map +1 -0
- package/dist/tools/uploadImage.d.ts +27 -0
- package/dist/tools/uploadImage.js +55 -0
- package/dist/tools/uploadImage.js.map +1 -0
- package/dist/types.d.ts +6 -6
- package/package.json +2 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { getProject } from '../db.js';
|
|
3
|
+
import { handleGetYaml } from './getYaml.js';
|
|
4
|
+
import YAML from 'yaml';
|
|
5
|
+
export const generateSpecSchema = z.object({
|
|
6
|
+
projectId: z.string().describe('UUID of the project to generate spec for'),
|
|
7
|
+
format: z.enum(['markdown', 'json']).default('markdown').describe('Output format'),
|
|
8
|
+
sections: z
|
|
9
|
+
.array(z.enum(['db_schema', 'api_contracts', 'component_tree', 'validation_rules', 'all']))
|
|
10
|
+
.optional()
|
|
11
|
+
.describe('Sections to include (default: all)')
|
|
12
|
+
});
|
|
13
|
+
export async function handleGenerateSpec(args) {
|
|
14
|
+
const project = await getProject(args.projectId);
|
|
15
|
+
if (!project) {
|
|
16
|
+
return {
|
|
17
|
+
content: [{ type: 'text', text: `Project not found: ${args.projectId}` }],
|
|
18
|
+
isError: true
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
// Get YAML via existing tool
|
|
22
|
+
const yamlResult = await handleGetYaml({ projectId: args.projectId });
|
|
23
|
+
if (yamlResult.isError) {
|
|
24
|
+
return yamlResult;
|
|
25
|
+
}
|
|
26
|
+
const yamlContent = yamlResult.content[0].text;
|
|
27
|
+
const parsed = YAML.parse(yamlContent);
|
|
28
|
+
// Determine which sections to include
|
|
29
|
+
const sections = args.sections ?? ['all'];
|
|
30
|
+
const includeAll = sections.includes('all');
|
|
31
|
+
// Generate spec
|
|
32
|
+
const spec = args.format === 'markdown'
|
|
33
|
+
? generateMarkdownSpec(project.name, parsed, {
|
|
34
|
+
db_schema: includeAll || sections.includes('db_schema'),
|
|
35
|
+
api_contracts: includeAll || sections.includes('api_contracts'),
|
|
36
|
+
component_tree: includeAll || sections.includes('component_tree'),
|
|
37
|
+
validation_rules: includeAll || sections.includes('validation_rules')
|
|
38
|
+
})
|
|
39
|
+
: generateJsonSpec(project.name, parsed);
|
|
40
|
+
return {
|
|
41
|
+
content: [{ type: 'text', text: spec }]
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
// ─── Markdown Spec Generation ───────────────────────────────────
|
|
45
|
+
function generateMarkdownSpec(projectName, yaml, sections) {
|
|
46
|
+
const lines = [];
|
|
47
|
+
// Header
|
|
48
|
+
lines.push(`# ${projectName} - Technical Specification`);
|
|
49
|
+
lines.push(``);
|
|
50
|
+
lines.push(`**Generated:** ${new Date().toISOString().split('T')[0]}`);
|
|
51
|
+
lines.push(`**FlowSpec Version:** ${yaml.version || '1.2.0'}`);
|
|
52
|
+
lines.push(``);
|
|
53
|
+
lines.push(`---`);
|
|
54
|
+
lines.push(``);
|
|
55
|
+
// Overview
|
|
56
|
+
const dataPoints = yaml.dataPoints || [];
|
|
57
|
+
const components = yaml.components || [];
|
|
58
|
+
const transforms = yaml.transforms || [];
|
|
59
|
+
const tables = yaml.tables || [];
|
|
60
|
+
const screens = yaml.screens || [];
|
|
61
|
+
lines.push(`## Overview`);
|
|
62
|
+
lines.push(``);
|
|
63
|
+
lines.push(`This specification describes the data architecture for **${projectName}**.`);
|
|
64
|
+
lines.push(``);
|
|
65
|
+
lines.push(`- **DataPoints:** ${dataPoints.length} data elements`);
|
|
66
|
+
lines.push(`- **Components:** ${components.length} UI components`);
|
|
67
|
+
lines.push(`- **Transforms:** ${transforms.length} business logic functions`);
|
|
68
|
+
lines.push(`- **Tables:** ${tables.length} database tables/APIs`);
|
|
69
|
+
lines.push(`- **Screens:** ${screens.length} wireframe screens`);
|
|
70
|
+
lines.push(``);
|
|
71
|
+
lines.push(`---`);
|
|
72
|
+
lines.push(``);
|
|
73
|
+
// DataPoints
|
|
74
|
+
lines.push(`## DataPoints`);
|
|
75
|
+
lines.push(``);
|
|
76
|
+
if (dataPoints.length === 0) {
|
|
77
|
+
lines.push(`*No data points defined.*`);
|
|
78
|
+
lines.push(``);
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
lines.push(`| Label | Type | Source | Constraints | Source Definition |`);
|
|
82
|
+
lines.push(`|-------|------|--------|-------------|-------------------|`);
|
|
83
|
+
for (const dp of dataPoints) {
|
|
84
|
+
const label = dp.label || dp.id;
|
|
85
|
+
const type = dp.type || 'string';
|
|
86
|
+
const source = dp.source || 'inferred';
|
|
87
|
+
const constraints = dp.constraints && dp.constraints.length > 0 ? dp.constraints.join(', ') : '-';
|
|
88
|
+
const sourceDef = (dp.sourceDefinition || '').replace(/\|/g, '\\|');
|
|
89
|
+
lines.push(`| ${label} | ${type} | ${source} | ${constraints} | ${sourceDef} |`);
|
|
90
|
+
}
|
|
91
|
+
lines.push(``);
|
|
92
|
+
// Group by source
|
|
93
|
+
const captured = dataPoints.filter((dp) => dp.source === 'captured');
|
|
94
|
+
const inferred = dataPoints.filter((dp) => dp.source === 'inferred');
|
|
95
|
+
lines.push(`**Captured DataPoints (${captured.length}):** User inputs, form fields`);
|
|
96
|
+
lines.push(`**Inferred DataPoints (${inferred.length}):** Computed values, API responses, database queries`);
|
|
97
|
+
lines.push(``);
|
|
98
|
+
}
|
|
99
|
+
lines.push(`---`);
|
|
100
|
+
lines.push(``);
|
|
101
|
+
// Components
|
|
102
|
+
lines.push(`## Components`);
|
|
103
|
+
lines.push(``);
|
|
104
|
+
if (components.length === 0) {
|
|
105
|
+
lines.push(`*No components defined.*`);
|
|
106
|
+
lines.push(``);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
lines.push(`| Label | Displays | Captures | Wireframe |`);
|
|
110
|
+
lines.push(`|-------|----------|----------|-----------|`);
|
|
111
|
+
for (const comp of components) {
|
|
112
|
+
const label = comp.label || comp.id;
|
|
113
|
+
const displays = comp.displays?.join(', ') || '-';
|
|
114
|
+
const captures = comp.captures?.join(', ') || '-';
|
|
115
|
+
const wireframe = comp.wireframeRef || '-';
|
|
116
|
+
lines.push(`| ${label} | ${displays} | ${captures} | ${wireframe} |`);
|
|
117
|
+
}
|
|
118
|
+
lines.push(``);
|
|
119
|
+
}
|
|
120
|
+
lines.push(`---`);
|
|
121
|
+
lines.push(``);
|
|
122
|
+
// Transforms
|
|
123
|
+
lines.push(`## Transforms`);
|
|
124
|
+
lines.push(``);
|
|
125
|
+
if (transforms.length === 0) {
|
|
126
|
+
lines.push(`*No transforms defined.*`);
|
|
127
|
+
lines.push(``);
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
lines.push(`| Label | Type | Inputs | Outputs | Description |`);
|
|
131
|
+
lines.push(`|-------|------|--------|---------|-------------|`);
|
|
132
|
+
for (const tf of transforms) {
|
|
133
|
+
const label = tf.label || tf.id;
|
|
134
|
+
const type = tf.type || 'formula';
|
|
135
|
+
const inputs = tf.inputs?.join(', ') || '-';
|
|
136
|
+
const outputs = tf.outputs?.join(', ') || '-';
|
|
137
|
+
const description = (tf.description || '').replace(/\|/g, '\\|');
|
|
138
|
+
lines.push(`| ${label} | ${type} | ${inputs} | ${outputs} | ${description} |`);
|
|
139
|
+
}
|
|
140
|
+
lines.push(``);
|
|
141
|
+
// Group by type
|
|
142
|
+
const formulas = transforms.filter((tf) => tf.type === 'formula');
|
|
143
|
+
const validations = transforms.filter((tf) => tf.type === 'validation');
|
|
144
|
+
const workflows = transforms.filter((tf) => tf.type === 'workflow');
|
|
145
|
+
lines.push(`**Formula (${formulas.length}):** Calculations, aggregations`);
|
|
146
|
+
lines.push(`**Validation (${validations.length}):** Data checking, constraint enforcement`);
|
|
147
|
+
lines.push(`**Workflow (${workflows.length}):** Multi-step processes, integrations`);
|
|
148
|
+
lines.push(``);
|
|
149
|
+
}
|
|
150
|
+
lines.push(`---`);
|
|
151
|
+
lines.push(``);
|
|
152
|
+
// Database Schema (if requested)
|
|
153
|
+
if (sections.db_schema && tables.length > 0) {
|
|
154
|
+
lines.push(`## Database Schema`);
|
|
155
|
+
lines.push(``);
|
|
156
|
+
for (const table of tables) {
|
|
157
|
+
const label = table.label || table.id;
|
|
158
|
+
const sourceType = table.sourceType || 'database';
|
|
159
|
+
const endpoint = table.endpoint || '-';
|
|
160
|
+
lines.push(`### Table: \`${label}\``);
|
|
161
|
+
lines.push(``);
|
|
162
|
+
lines.push(`**Source:** ${sourceType} (${endpoint})`);
|
|
163
|
+
lines.push(``);
|
|
164
|
+
if (table.columns && table.columns.length > 0) {
|
|
165
|
+
lines.push(`| Column | Type |`);
|
|
166
|
+
lines.push(`|--------|------|`);
|
|
167
|
+
for (const col of table.columns) {
|
|
168
|
+
lines.push(`| ${col.name} | ${col.type} |`);
|
|
169
|
+
}
|
|
170
|
+
lines.push(``);
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
lines.push(`---`);
|
|
174
|
+
lines.push(``);
|
|
175
|
+
}
|
|
176
|
+
// API Contracts (if requested)
|
|
177
|
+
if (sections.api_contracts) {
|
|
178
|
+
lines.push(`## API Contracts`);
|
|
179
|
+
lines.push(``);
|
|
180
|
+
// Infer API endpoints from inferred DataPoints
|
|
181
|
+
const apiDataPoints = dataPoints.filter((dp) => dp.source === 'inferred' && dp.sourceDefinition && dp.sourceDefinition.includes('API'));
|
|
182
|
+
if (apiDataPoints.length === 0) {
|
|
183
|
+
lines.push(`*No API endpoints identified.*`);
|
|
184
|
+
lines.push(``);
|
|
185
|
+
}
|
|
186
|
+
else {
|
|
187
|
+
lines.push(`Suggested API endpoints based on inferred DataPoints:`);
|
|
188
|
+
lines.push(``);
|
|
189
|
+
for (const dp of apiDataPoints) {
|
|
190
|
+
const label = dp.label || dp.id;
|
|
191
|
+
const method = dp.sourceDefinition.includes('POST') ? 'POST' : 'GET';
|
|
192
|
+
const endpoint = `/api/${label.toLowerCase().replace(/\s+/g, '-')}`;
|
|
193
|
+
lines.push(`### ${method} ${endpoint}`);
|
|
194
|
+
lines.push(``);
|
|
195
|
+
lines.push(`**Returns:** ${label} (${dp.type})`);
|
|
196
|
+
lines.push(`**Source:** ${dp.sourceDefinition}`);
|
|
197
|
+
lines.push(``);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
lines.push(`---`);
|
|
201
|
+
lines.push(``);
|
|
202
|
+
}
|
|
203
|
+
// Component Tree (if requested)
|
|
204
|
+
if (sections.component_tree && components.length > 0) {
|
|
205
|
+
lines.push(`## Component Hierarchy`);
|
|
206
|
+
lines.push(``);
|
|
207
|
+
// Simple tree based on wireframe references
|
|
208
|
+
const screenGroups = new Map();
|
|
209
|
+
for (const comp of components) {
|
|
210
|
+
const screen = comp.wireframeRef || 'No Screen';
|
|
211
|
+
const group = screenGroups.get(screen) || [];
|
|
212
|
+
group.push(comp);
|
|
213
|
+
screenGroups.set(screen, group);
|
|
214
|
+
}
|
|
215
|
+
for (const [screen, comps] of screenGroups) {
|
|
216
|
+
lines.push(`### ${screen}`);
|
|
217
|
+
lines.push(``);
|
|
218
|
+
for (const comp of comps) {
|
|
219
|
+
const label = comp.label || comp.id;
|
|
220
|
+
lines.push(`- **${label}**`);
|
|
221
|
+
if (comp.displays && comp.displays.length > 0) {
|
|
222
|
+
lines.push(` - Displays: ${comp.displays.join(', ')}`);
|
|
223
|
+
}
|
|
224
|
+
if (comp.captures && comp.captures.length > 0) {
|
|
225
|
+
lines.push(` - Captures: ${comp.captures.join(', ')}`);
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
lines.push(``);
|
|
229
|
+
}
|
|
230
|
+
lines.push(`---`);
|
|
231
|
+
lines.push(``);
|
|
232
|
+
}
|
|
233
|
+
// Validation Rules (if requested)
|
|
234
|
+
if (sections.validation_rules) {
|
|
235
|
+
lines.push(`## Validation Rules`);
|
|
236
|
+
lines.push(``);
|
|
237
|
+
// Extract constraints from DataPoints
|
|
238
|
+
const constrainedDataPoints = dataPoints.filter((dp) => dp.constraints && dp.constraints.length > 0);
|
|
239
|
+
if (constrainedDataPoints.length === 0) {
|
|
240
|
+
lines.push(`*No validation rules defined.*`);
|
|
241
|
+
lines.push(``);
|
|
242
|
+
}
|
|
243
|
+
else {
|
|
244
|
+
lines.push(`| DataPoint | Constraints |`);
|
|
245
|
+
lines.push(`|-----------|-------------|`);
|
|
246
|
+
for (const dp of constrainedDataPoints) {
|
|
247
|
+
const label = dp.label || dp.id;
|
|
248
|
+
const constraints = dp.constraints.join(', ');
|
|
249
|
+
lines.push(`| ${label} | ${constraints} |`);
|
|
250
|
+
}
|
|
251
|
+
lines.push(``);
|
|
252
|
+
}
|
|
253
|
+
// Extract validation transforms
|
|
254
|
+
const validationTransforms = transforms.filter((tf) => tf.type === 'validation');
|
|
255
|
+
if (validationTransforms.length > 0) {
|
|
256
|
+
lines.push(`### Validation Transforms`);
|
|
257
|
+
lines.push(``);
|
|
258
|
+
for (const tf of validationTransforms) {
|
|
259
|
+
const label = tf.label || tf.id;
|
|
260
|
+
const inputs = tf.inputs?.join(', ') || '-';
|
|
261
|
+
const description = tf.description || 'No description';
|
|
262
|
+
lines.push(`- **${label}**`);
|
|
263
|
+
lines.push(` - Validates: ${inputs}`);
|
|
264
|
+
lines.push(` - Logic: ${description}`);
|
|
265
|
+
lines.push(``);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
lines.push(`---`);
|
|
269
|
+
lines.push(``);
|
|
270
|
+
}
|
|
271
|
+
// Implementation Recommendations
|
|
272
|
+
lines.push(`## Implementation Recommendations`);
|
|
273
|
+
lines.push(``);
|
|
274
|
+
lines.push(`1. **Database Schema**`);
|
|
275
|
+
lines.push(` - Create tables: ${tables.map((t) => t.label).join(', ')}`);
|
|
276
|
+
lines.push(` - Set up migrations and seed data`);
|
|
277
|
+
lines.push(``);
|
|
278
|
+
lines.push(`2. **API Contracts**`);
|
|
279
|
+
lines.push(` - Implement endpoints for inferred DataPoints (${dataPoints.filter((dp) => dp.source === 'inferred').length} endpoints)`);
|
|
280
|
+
lines.push(` - Add authentication and authorization`);
|
|
281
|
+
lines.push(``);
|
|
282
|
+
lines.push(`3. **Component Structure**`);
|
|
283
|
+
lines.push(` - Build ${components.length} UI components`);
|
|
284
|
+
lines.push(` - Connect data flows (displays/captures)`);
|
|
285
|
+
lines.push(``);
|
|
286
|
+
lines.push(`4. **Validation Rules**`);
|
|
287
|
+
lines.push(` - Apply constraints at both client and server`);
|
|
288
|
+
lines.push(` - Implement ${transforms.filter((tf) => tf.type === 'validation').length} validation transforms`);
|
|
289
|
+
lines.push(``);
|
|
290
|
+
lines.push(`5. **Business Logic**`);
|
|
291
|
+
lines.push(` - Implement ${transforms.length} transforms`);
|
|
292
|
+
lines.push(` - Test all data flows and edge cases`);
|
|
293
|
+
lines.push(``);
|
|
294
|
+
lines.push(`---`);
|
|
295
|
+
lines.push(``);
|
|
296
|
+
// Quality Metrics (from project analysis)
|
|
297
|
+
const nodes = project.canvas_state?.nodes || [];
|
|
298
|
+
const edges = project.canvas_state?.edges || [];
|
|
299
|
+
lines.push(`## Quality Metrics`);
|
|
300
|
+
lines.push(``);
|
|
301
|
+
lines.push(`- **Total nodes:** ${nodes.length}`);
|
|
302
|
+
lines.push(`- **Total edges:** ${edges.length}`);
|
|
303
|
+
lines.push(`- **Screens:** ${screens.length}`);
|
|
304
|
+
lines.push(`- **Captured DataPoints:** ${dataPoints.filter((dp) => dp.source === 'captured').length}`);
|
|
305
|
+
lines.push(`- **Inferred DataPoints:** ${dataPoints.filter((dp) => dp.source === 'inferred').length}`);
|
|
306
|
+
lines.push(``);
|
|
307
|
+
lines.push(`✅ **Ready for implementation in Claude Code via \`/spec\` skill**`);
|
|
308
|
+
lines.push(``);
|
|
309
|
+
// Footer
|
|
310
|
+
lines.push(`---`);
|
|
311
|
+
lines.push(``);
|
|
312
|
+
lines.push(`*Generated by FlowSpec MCP Server v3.0.0*`);
|
|
313
|
+
return lines.join('\n');
|
|
314
|
+
}
|
|
315
|
+
// ─── JSON Spec Generation ───────────────────────────────────────
|
|
316
|
+
function generateJsonSpec(projectName, yaml) {
|
|
317
|
+
const spec = {
|
|
318
|
+
projectName: projectName,
|
|
319
|
+
generated: new Date().toISOString(),
|
|
320
|
+
version: yaml.version || '1.2.0',
|
|
321
|
+
summary: {
|
|
322
|
+
dataPoints: yaml.dataPoints?.length || 0,
|
|
323
|
+
components: yaml.components?.length || 0,
|
|
324
|
+
transforms: yaml.transforms?.length || 0,
|
|
325
|
+
tables: yaml.tables?.length || 0,
|
|
326
|
+
screens: yaml.screens?.length || 0
|
|
327
|
+
},
|
|
328
|
+
dataPoints: yaml.dataPoints || [],
|
|
329
|
+
components: yaml.components || [],
|
|
330
|
+
transforms: yaml.transforms || [],
|
|
331
|
+
tables: yaml.tables || [],
|
|
332
|
+
screens: yaml.screens || []
|
|
333
|
+
};
|
|
334
|
+
return JSON.stringify(spec, null, 2);
|
|
335
|
+
}
|
|
336
|
+
//# sourceMappingURL=generateSpec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1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CAAC;AAED,mEAAmE;AAEnE,SAAS,gBAAgB,CAAC,WAAmB,EAAE,IAAS;IACvD,MAAM,IAAI,GAAG;QACZ,WAAW,EAAE,WAAW;QACxB,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;QACnC,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,OAAO;QAChC,OAAO,EAAE;YACR,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;YACxC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;YACxC,UAAU,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;YACxC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC;YAChC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;SAClC;QACD,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU,IAAI,EAAE;QACjC,MAAM,EAAE,IAAI,CAAC,MAAM,IAAI,EAAE;QACzB,OAAO,EAAE,IAAI,CAAC,OAAO,IAAI,EAAE;KAC3B,CAAC;IAEF,OAAO,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { checkHealth } from '../health.js';
|
|
3
|
+
import { MODE } from '../config.js';
|
|
4
|
+
export const healthCheckSchema = z.object({});
|
|
5
|
+
export async function handleHealthCheck() {
|
|
6
|
+
const result = await checkHealth(MODE);
|
|
7
|
+
return {
|
|
8
|
+
content: [
|
|
9
|
+
{
|
|
10
|
+
type: 'text',
|
|
11
|
+
text: JSON.stringify(result, null, 2),
|
|
12
|
+
},
|
|
13
|
+
],
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=healthCheck.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"healthCheck.js","sourceRoot":"","sources":["../../src/tools/healthCheck.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,CAAC;IACvC,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAe;gBACrB,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const importYamlSchema: z.ZodObject<{
|
|
3
|
+
projectId: z.ZodString;
|
|
4
|
+
yaml: z.ZodString;
|
|
5
|
+
autoLayout: z.ZodOptional<z.ZodBoolean>;
|
|
6
|
+
layoutDirection: z.ZodOptional<z.ZodEnum<["TB", "BT", "LR", "RL"]>>;
|
|
7
|
+
merge: z.ZodOptional<z.ZodBoolean>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
projectId: string;
|
|
10
|
+
yaml: string;
|
|
11
|
+
autoLayout?: boolean | undefined;
|
|
12
|
+
layoutDirection?: "TB" | "BT" | "LR" | "RL" | undefined;
|
|
13
|
+
merge?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
projectId: string;
|
|
16
|
+
yaml: string;
|
|
17
|
+
autoLayout?: boolean | undefined;
|
|
18
|
+
layoutDirection?: "TB" | "BT" | "LR" | "RL" | undefined;
|
|
19
|
+
merge?: boolean | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
export declare function handleImportYaml(args: z.infer<typeof importYamlSchema>): Promise<{
|
|
22
|
+
content: {
|
|
23
|
+
type: "text";
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
isError: boolean;
|
|
27
|
+
} | {
|
|
28
|
+
content: {
|
|
29
|
+
type: "text";
|
|
30
|
+
text: string;
|
|
31
|
+
}[];
|
|
32
|
+
isError?: undefined;
|
|
33
|
+
}>;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { parse as parseYaml } from 'yaml';
|
|
3
|
+
import { getProject, updateProjectViaApi } from '../db.js';
|
|
4
|
+
import { importFromYaml } from '../import/yamlImporter.js';
|
|
5
|
+
import { computeAutoLayout } from '../layout/autoLayout.js';
|
|
6
|
+
export const importYamlSchema = z.object({
|
|
7
|
+
projectId: z.string().describe('UUID of the target project'),
|
|
8
|
+
yaml: z.string().describe('YAML spec string (FlowSpec v1.2.0 format)'),
|
|
9
|
+
autoLayout: z.boolean().optional().describe('Run dagre auto-layout after import (default: true)'),
|
|
10
|
+
layoutDirection: z.enum(['TB', 'BT', 'LR', 'RL']).optional().describe('Layout direction (default: TB)'),
|
|
11
|
+
merge: z.boolean().optional().describe('true = add to existing canvas, false = replace (default: false)'),
|
|
12
|
+
});
|
|
13
|
+
export async function handleImportYaml(args) {
|
|
14
|
+
// Parse YAML string
|
|
15
|
+
let spec;
|
|
16
|
+
try {
|
|
17
|
+
spec = parseYaml(args.yaml);
|
|
18
|
+
}
|
|
19
|
+
catch (e) {
|
|
20
|
+
return {
|
|
21
|
+
content: [{ type: 'text', text: `YAML parse error: ${e.message}` }],
|
|
22
|
+
isError: true,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
if (!spec || typeof spec !== 'object') {
|
|
26
|
+
return {
|
|
27
|
+
content: [{ type: 'text', text: 'Invalid YAML: expected an object at the top level' }],
|
|
28
|
+
isError: true,
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
// Import YAML → nodes/edges/screens
|
|
32
|
+
const result = importFromYaml(spec);
|
|
33
|
+
// Apply auto-layout if requested (default: true)
|
|
34
|
+
const shouldLayout = args.autoLayout !== false;
|
|
35
|
+
if (shouldLayout && result.nodes.length > 0) {
|
|
36
|
+
const direction = args.layoutDirection ?? 'TB';
|
|
37
|
+
const positions = computeAutoLayout(result.nodes, result.edges, { rankdir: direction, pinnedNodeIds: new Set() });
|
|
38
|
+
for (const node of result.nodes) {
|
|
39
|
+
const pos = positions.get(node.id);
|
|
40
|
+
if (pos)
|
|
41
|
+
node.position = pos;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
// Build canvas state
|
|
45
|
+
let nodes;
|
|
46
|
+
let edges;
|
|
47
|
+
let screens = result.screens;
|
|
48
|
+
if (args.merge) {
|
|
49
|
+
// Merge mode: add imported nodes/edges/screens to existing
|
|
50
|
+
const project = await getProject(args.projectId);
|
|
51
|
+
if (!project) {
|
|
52
|
+
return {
|
|
53
|
+
content: [{ type: 'text', text: `Project not found: ${args.projectId}` }],
|
|
54
|
+
isError: true,
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
const existing = project.canvas_state;
|
|
58
|
+
nodes = [...(existing.nodes ?? []), ...result.nodes];
|
|
59
|
+
edges = [...(existing.edges ?? []), ...result.edges];
|
|
60
|
+
screens = [...(existing.screens ?? []), ...result.screens];
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
// Replace mode: imported data replaces existing canvas
|
|
64
|
+
nodes = result.nodes;
|
|
65
|
+
edges = result.edges;
|
|
66
|
+
}
|
|
67
|
+
const canvasState = { nodes, edges, screens };
|
|
68
|
+
const updated = await updateProjectViaApi(args.projectId, { canvas_state: canvasState });
|
|
69
|
+
if (!updated) {
|
|
70
|
+
return {
|
|
71
|
+
content: [{ type: 'text', text: `Failed to update project — not found: ${args.projectId}` }],
|
|
72
|
+
isError: true,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
const { stats } = result;
|
|
76
|
+
const lines = [
|
|
77
|
+
`Imported YAML into project **${updated.name}**`,
|
|
78
|
+
'',
|
|
79
|
+
`| Metric | Count |`,
|
|
80
|
+
`|--------|-------|`,
|
|
81
|
+
`| Data points | ${stats.dataPoints} |`,
|
|
82
|
+
`| Components | ${stats.components} |`,
|
|
83
|
+
`| Transforms | ${stats.transforms} |`,
|
|
84
|
+
`| Tables | ${stats.tables} |`,
|
|
85
|
+
`| Edges | ${stats.edges} |`,
|
|
86
|
+
`| Screens | ${result.screens.length} |`,
|
|
87
|
+
`| Skipped nodes | ${stats.skippedNodes} |`,
|
|
88
|
+
`| Skipped edges | ${stats.skippedEdges} |`,
|
|
89
|
+
'',
|
|
90
|
+
`Mode: ${args.merge ? 'merge (added to existing)' : 'replace'}`,
|
|
91
|
+
shouldLayout ? `Layout: ${args.layoutDirection ?? 'TB'}` : 'Layout: skipped',
|
|
92
|
+
];
|
|
93
|
+
return {
|
|
94
|
+
content: [{ type: 'text', text: lines.join('\n') }],
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
//# sourceMappingURL=importYaml.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"importYaml.js","sourceRoot":"","sources":["../../src/tools/importYaml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,KAAK,IAAI,SAAS,EAAE,MAAM,MAAM,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAG5D,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,M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C,CAAC,CAAC,SAAS,EAAE;QAC/D,YAAY,CAAC,CAAC,CAAC,WAAW,IAAI,CAAC,eAAe,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,iBAAiB;KAC7E,CAAC;IAEF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
export declare const ingestCodebaseSchema: z.ZodObject<{
|
|
3
|
+
projectPath: z.ZodString;
|
|
4
|
+
framework: z.ZodDefault<z.ZodEnum<["svelte", "react", "auto"]>>;
|
|
5
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
projectPath: string;
|
|
8
|
+
framework: "auto" | "svelte" | "react";
|
|
9
|
+
scope?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
projectPath: string;
|
|
12
|
+
framework?: "auto" | "svelte" | "react" | undefined;
|
|
13
|
+
scope?: string | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
export declare function handleIngestCodebase(args: z.infer<typeof ingestCodebaseSchema>): Promise<{
|
|
16
|
+
content: {
|
|
17
|
+
type: "text";
|
|
18
|
+
text: string;
|
|
19
|
+
}[];
|
|
20
|
+
isError: boolean;
|
|
21
|
+
} | {
|
|
22
|
+
content: {
|
|
23
|
+
type: "text";
|
|
24
|
+
text: string;
|
|
25
|
+
}[];
|
|
26
|
+
isError?: undefined;
|
|
27
|
+
}>;
|