@opensaas/stack-cli 0.1.7 → 0.3.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +207 -0
- package/CLAUDE.md +60 -12
- package/dist/commands/generate.d.ts.map +1 -1
- package/dist/commands/generate.js +10 -1
- package/dist/commands/generate.js.map +1 -1
- package/dist/commands/mcp.d.ts +6 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +116 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/generator/context.d.ts.map +1 -1
- package/dist/generator/context.js +21 -3
- package/dist/generator/context.js.map +1 -1
- package/dist/generator/index.d.ts +3 -0
- package/dist/generator/index.d.ts.map +1 -1
- package/dist/generator/index.js +3 -0
- package/dist/generator/index.js.map +1 -1
- package/dist/generator/lists.d.ts +31 -0
- package/dist/generator/lists.d.ts.map +1 -0
- package/dist/generator/lists.js +91 -0
- package/dist/generator/lists.js.map +1 -0
- package/dist/generator/plugin-types.d.ts +10 -0
- package/dist/generator/plugin-types.d.ts.map +1 -0
- package/dist/generator/plugin-types.js +122 -0
- package/dist/generator/plugin-types.js.map +1 -0
- package/dist/generator/prisma-config.d.ts +17 -0
- package/dist/generator/prisma-config.d.ts.map +1 -0
- package/dist/generator/prisma-config.js +40 -0
- package/dist/generator/prisma-config.js.map +1 -0
- package/dist/generator/prisma.d.ts.map +1 -1
- package/dist/generator/prisma.js +1 -2
- package/dist/generator/prisma.js.map +1 -1
- package/dist/generator/types.d.ts.map +1 -1
- package/dist/generator/types.js +51 -1
- package/dist/generator/types.js.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/mcp/lib/documentation-provider.d.ts +43 -0
- package/dist/mcp/lib/documentation-provider.d.ts.map +1 -0
- package/dist/mcp/lib/documentation-provider.js +163 -0
- package/dist/mcp/lib/documentation-provider.js.map +1 -0
- package/dist/mcp/lib/features/catalog.d.ts +26 -0
- package/dist/mcp/lib/features/catalog.d.ts.map +1 -0
- package/dist/mcp/lib/features/catalog.js +291 -0
- package/dist/mcp/lib/features/catalog.js.map +1 -0
- package/dist/mcp/lib/generators/feature-generator.d.ts +35 -0
- package/dist/mcp/lib/generators/feature-generator.d.ts.map +1 -0
- package/dist/mcp/lib/generators/feature-generator.js +546 -0
- package/dist/mcp/lib/generators/feature-generator.js.map +1 -0
- package/dist/mcp/lib/types.d.ts +80 -0
- package/dist/mcp/lib/types.d.ts.map +1 -0
- package/dist/mcp/lib/types.js +5 -0
- package/dist/mcp/lib/types.js.map +1 -0
- package/dist/mcp/lib/wizards/wizard-engine.d.ts +71 -0
- package/dist/mcp/lib/wizards/wizard-engine.d.ts.map +1 -0
- package/dist/mcp/lib/wizards/wizard-engine.js +356 -0
- package/dist/mcp/lib/wizards/wizard-engine.js.map +1 -0
- package/dist/mcp/server/index.d.ts +8 -0
- package/dist/mcp/server/index.d.ts.map +1 -0
- package/dist/mcp/server/index.js +202 -0
- package/dist/mcp/server/index.js.map +1 -0
- package/dist/mcp/server/stack-mcp-server.d.ts +92 -0
- package/dist/mcp/server/stack-mcp-server.d.ts.map +1 -0
- package/dist/mcp/server/stack-mcp-server.js +265 -0
- package/dist/mcp/server/stack-mcp-server.js.map +1 -0
- package/package.json +9 -7
- package/src/commands/__snapshots__/generate.test.ts.snap +57 -21
- package/src/commands/dev.test.ts +0 -1
- package/src/commands/generate.test.ts +18 -8
- package/src/commands/generate.ts +12 -0
- package/src/commands/mcp.ts +135 -0
- package/src/generator/__snapshots__/context.test.ts.snap +8 -8
- package/src/generator/__snapshots__/prisma.test.ts.snap +8 -16
- package/src/generator/__snapshots__/types.test.ts.snap +587 -9
- package/src/generator/context.test.ts +13 -8
- package/src/generator/context.ts +21 -3
- package/src/generator/index.ts +3 -0
- package/src/generator/lists.test.ts +335 -0
- package/src/generator/lists.ts +102 -0
- package/src/generator/plugin-types.ts +147 -0
- package/src/generator/prisma-config.ts +46 -0
- package/src/generator/prisma.test.ts +0 -10
- package/src/generator/prisma.ts +1 -2
- package/src/generator/types.test.ts +0 -12
- package/src/generator/types.ts +54 -1
- package/src/index.ts +4 -0
- package/src/mcp/lib/documentation-provider.ts +203 -0
- package/src/mcp/lib/features/catalog.ts +301 -0
- package/src/mcp/lib/generators/feature-generator.ts +598 -0
- package/src/mcp/lib/types.ts +89 -0
- package/src/mcp/lib/wizards/wizard-engine.ts +427 -0
- package/src/mcp/server/index.ts +240 -0
- package/src/mcp/server/stack-mcp-server.ts +301 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Documentation provider - Fetches documentation from the hosted docs site
|
|
3
|
+
*/
|
|
4
|
+
export class OpenSaasDocumentationProvider {
|
|
5
|
+
DOCS_API = 'https://stack.opensaas.au/api/search';
|
|
6
|
+
cache = new Map();
|
|
7
|
+
CACHE_TTL = 1000 * 60 * 30; // 30 minutes
|
|
8
|
+
// Topic mappings for user-friendly queries
|
|
9
|
+
topicMappings = {
|
|
10
|
+
fields: 'field-types',
|
|
11
|
+
'field types': 'field-types',
|
|
12
|
+
'field type': 'field-types',
|
|
13
|
+
access: 'access-control',
|
|
14
|
+
'access control': 'access-control',
|
|
15
|
+
permissions: 'access-control',
|
|
16
|
+
auth: 'authentication',
|
|
17
|
+
authentication: 'authentication',
|
|
18
|
+
login: 'authentication',
|
|
19
|
+
'sign in': 'authentication',
|
|
20
|
+
hooks: 'hooks',
|
|
21
|
+
hook: 'hooks',
|
|
22
|
+
lifecycle: 'hooks',
|
|
23
|
+
plugins: 'plugin-system',
|
|
24
|
+
plugin: 'plugin-system',
|
|
25
|
+
rag: 'rag',
|
|
26
|
+
search: 'semantic-search',
|
|
27
|
+
'semantic search': 'semantic-search',
|
|
28
|
+
storage: 'file-storage',
|
|
29
|
+
files: 'file-storage',
|
|
30
|
+
upload: 'file-storage',
|
|
31
|
+
config: 'configuration',
|
|
32
|
+
configuration: 'configuration',
|
|
33
|
+
prisma: 'prisma-integration',
|
|
34
|
+
database: 'database-setup',
|
|
35
|
+
deployment: 'deployment',
|
|
36
|
+
deploy: 'deployment',
|
|
37
|
+
};
|
|
38
|
+
/**
|
|
39
|
+
* Search documentation by query
|
|
40
|
+
*/
|
|
41
|
+
async searchDocs(query, limit = 5, minScore = 0.7) {
|
|
42
|
+
const cacheKey = `search:${query}:${limit}:${minScore}`;
|
|
43
|
+
// Check cache
|
|
44
|
+
const cached = this.cache.get(cacheKey);
|
|
45
|
+
if (cached && Date.now() - cached.timestamp < this.CACHE_TTL) {
|
|
46
|
+
return cached.data;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const response = await fetch(this.DOCS_API, {
|
|
50
|
+
method: 'POST',
|
|
51
|
+
headers: {
|
|
52
|
+
'Content-Type': 'application/json',
|
|
53
|
+
},
|
|
54
|
+
body: JSON.stringify({ query, limit, minScore }),
|
|
55
|
+
});
|
|
56
|
+
if (!response.ok) {
|
|
57
|
+
throw new Error(`Docs API error: ${response.statusText}`);
|
|
58
|
+
}
|
|
59
|
+
const data = (await response.json());
|
|
60
|
+
const docLookup = {
|
|
61
|
+
topic: query,
|
|
62
|
+
content: this.formatSearchResults(data.results),
|
|
63
|
+
url: 'https://stack.opensaas.au/',
|
|
64
|
+
codeExamples: this.extractCodeExamples(data.results),
|
|
65
|
+
relatedTopics: this.extractRelatedTopics(data.results),
|
|
66
|
+
};
|
|
67
|
+
// Cache the result
|
|
68
|
+
this.cache.set(cacheKey, { data: docLookup, timestamp: Date.now() });
|
|
69
|
+
return docLookup;
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
console.error('Error fetching documentation:', error);
|
|
73
|
+
return this.getFallbackDocs(query);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get documentation for a specific topic
|
|
78
|
+
*/
|
|
79
|
+
async getTopicDocs(topic) {
|
|
80
|
+
// Normalize topic using mappings
|
|
81
|
+
const normalizedTopic = this.topicMappings[topic.toLowerCase()] || topic;
|
|
82
|
+
return this.searchDocs(normalizedTopic, 3, 0.8);
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Format search results into readable content
|
|
86
|
+
*/
|
|
87
|
+
formatSearchResults(results) {
|
|
88
|
+
if (results.length === 0) {
|
|
89
|
+
return 'No documentation found for this query.';
|
|
90
|
+
}
|
|
91
|
+
return results
|
|
92
|
+
.map((result, index) => {
|
|
93
|
+
const title = result.metadata.title || `Section ${index + 1}`;
|
|
94
|
+
const section = result.metadata.section || '';
|
|
95
|
+
const score = (result.score * 100).toFixed(0);
|
|
96
|
+
return `### ${title}${section ? ` (${section})` : ''} [Relevance: ${score}%]\n\n${result.content}\n`;
|
|
97
|
+
})
|
|
98
|
+
.join('\n---\n\n');
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Extract code examples from search results
|
|
102
|
+
*/
|
|
103
|
+
extractCodeExamples(results) {
|
|
104
|
+
const codeExamples = [];
|
|
105
|
+
const codeBlockRegex = /```[\s\S]*?```/g;
|
|
106
|
+
for (const result of results) {
|
|
107
|
+
const matches = result.content.match(codeBlockRegex);
|
|
108
|
+
if (matches) {
|
|
109
|
+
codeExamples.push(...matches);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return codeExamples;
|
|
113
|
+
}
|
|
114
|
+
/**
|
|
115
|
+
* Extract related topics from search results
|
|
116
|
+
*/
|
|
117
|
+
extractRelatedTopics(results) {
|
|
118
|
+
const topics = new Set();
|
|
119
|
+
for (const result of results) {
|
|
120
|
+
if (result.metadata.section) {
|
|
121
|
+
topics.add(result.metadata.section);
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return Array.from(topics);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Fallback documentation when API is unavailable
|
|
128
|
+
*/
|
|
129
|
+
getFallbackDocs(query) {
|
|
130
|
+
return {
|
|
131
|
+
topic: query,
|
|
132
|
+
content: `Unable to fetch documentation from the docs site at this time.
|
|
133
|
+
|
|
134
|
+
Please visit the OpenSaaS Stack documentation directly:
|
|
135
|
+
https://stack.opensaas.au/
|
|
136
|
+
|
|
137
|
+
For ${query}, you can also check:
|
|
138
|
+
- GitHub repository: https://github.com/OpenSaasAU/stack
|
|
139
|
+
- Example projects in the examples/ directory`,
|
|
140
|
+
url: 'https://stack.opensaas.au/',
|
|
141
|
+
codeExamples: [],
|
|
142
|
+
relatedTopics: [],
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Clear expired cache entries
|
|
147
|
+
*/
|
|
148
|
+
clearExpiredCache() {
|
|
149
|
+
const now = Date.now();
|
|
150
|
+
for (const [key, value] of this.cache.entries()) {
|
|
151
|
+
if (now - value.timestamp >= this.CACHE_TTL) {
|
|
152
|
+
this.cache.delete(key);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Clear all cache
|
|
158
|
+
*/
|
|
159
|
+
clearCache() {
|
|
160
|
+
this.cache.clear();
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=documentation-provider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"documentation-provider.js","sourceRoot":"","sources":["../../../src/mcp/lib/documentation-provider.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoBH,MAAM,OAAO,6BAA6B;IACvB,QAAQ,GAAG,sCAAsC,CAAA;IAC1D,KAAK,GAAG,IAAI,GAAG,EAA4D,CAAA;IAClE,SAAS,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,CAAA,CAAC,aAAa;IAEzD,2CAA2C;IACnC,aAAa,GAA2B;QAC9C,MAAM,EAAE,aAAa;QACrB,aAAa,EAAE,aAAa;QAC5B,YAAY,EAAE,aAAa;QAC3B,MAAM,EAAE,gBAAgB;QACxB,gBAAgB,EAAE,gBAAgB;QAClC,WAA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C,OAAO,CAAC,CAAA;YACrC,CAAC;QACH,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC3B,CAAC;IAED;;OAEG;IACK,eAAe,CAAC,KAAa;QACnC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,OAAO,EAAE;;;;;MAKT,KAAK;;8CAEmC;YACxC,GAAG,EAAE,4BAA4B;YACjC,YAAY,EAAE,EAAE;YAChB,aAAa,EAAE,EAAE;SAClB,CAAA;IACH,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAA;QACtB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YAChD,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBAC5C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;YACxB,CAAC;QACH,CAAC;IACH,CAAC;IAED;;OAEG;IACH,UAAU;QACR,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,CAAA;IACpB,CAAC;CACF"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature catalog - Defines all available features with their configuration wizards
|
|
3
|
+
*/
|
|
4
|
+
import type { Feature } from '../types.js';
|
|
5
|
+
export declare const AUTHENTICATION_FEATURE: Feature;
|
|
6
|
+
export declare const BLOG_FEATURE: Feature;
|
|
7
|
+
export declare const COMMENTS_FEATURE: Feature;
|
|
8
|
+
export declare const FILE_UPLOAD_FEATURE: Feature;
|
|
9
|
+
export declare const SEMANTIC_SEARCH_FEATURE: Feature;
|
|
10
|
+
/**
|
|
11
|
+
* Feature catalog - maps feature IDs to feature definitions
|
|
12
|
+
*/
|
|
13
|
+
export declare const FeatureCatalog: Map<string, Feature>;
|
|
14
|
+
/**
|
|
15
|
+
* Get feature by ID
|
|
16
|
+
*/
|
|
17
|
+
export declare function getFeature(featureId: string): Feature | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Get all available features
|
|
20
|
+
*/
|
|
21
|
+
export declare function getAllFeatures(): Feature[];
|
|
22
|
+
/**
|
|
23
|
+
* Get features by category
|
|
24
|
+
*/
|
|
25
|
+
export declare function getFeaturesByCategory(category: Feature['category']): Feature[];
|
|
26
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../../src/mcp/lib/features/catalog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAA;AAE1C,eAAO,MAAM,sBAAsB,EAAE,OAkDpC,CAAA;AAED,eAAO,MAAM,YAAY,EAAE,OA4D1B,CAAA;AAED,eAAO,MAAM,gBAAgB,EAAE,OAkD9B,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,OAiDjC,CAAA;AAED,eAAO,MAAM,uBAAuB,EAAE,OA6CrC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,sBAMzB,CAAA;AAEF;;GAEG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,CAEjE;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,OAAO,EAAE,CAE1C;AAED;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,EAAE,CAE9E"}
|
|
@@ -0,0 +1,291 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature catalog - Defines all available features with their configuration wizards
|
|
3
|
+
*/
|
|
4
|
+
export const AUTHENTICATION_FEATURE = {
|
|
5
|
+
id: 'authentication',
|
|
6
|
+
name: 'User Authentication',
|
|
7
|
+
description: 'Complete authentication system with sessions, sign-up/sign-in, and access control',
|
|
8
|
+
category: 'authentication',
|
|
9
|
+
includes: [
|
|
10
|
+
'User list with email, password, name, and optional fields',
|
|
11
|
+
'Better-auth integration with session management',
|
|
12
|
+
'Sign-up and sign-in pages with form validation',
|
|
13
|
+
'Access control helpers (isAuthenticated, isAdmin, isOwner)',
|
|
14
|
+
'OAuth providers (optional)',
|
|
15
|
+
'Email verification (optional)',
|
|
16
|
+
],
|
|
17
|
+
questions: [
|
|
18
|
+
{
|
|
19
|
+
id: 'auth-methods',
|
|
20
|
+
text: 'Which authentication methods do you want to support?',
|
|
21
|
+
type: 'multiselect',
|
|
22
|
+
required: true,
|
|
23
|
+
options: ['Email & Password', 'Google OAuth', 'GitHub OAuth', 'Magic Links'],
|
|
24
|
+
defaultValue: ['Email & Password'],
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'user-roles',
|
|
28
|
+
text: 'Do you need user roles for access control?',
|
|
29
|
+
type: 'boolean',
|
|
30
|
+
required: true,
|
|
31
|
+
defaultValue: true,
|
|
32
|
+
followUp: {
|
|
33
|
+
if: true,
|
|
34
|
+
ask: 'What roles do you need? (Enter comma-separated, e.g., admin,editor,user)',
|
|
35
|
+
type: 'text',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
id: 'user-fields',
|
|
40
|
+
text: 'Select additional user profile fields',
|
|
41
|
+
type: 'multiselect',
|
|
42
|
+
required: false,
|
|
43
|
+
options: ['Avatar', 'Bio', 'Phone', 'Location', 'Website'],
|
|
44
|
+
defaultValue: [],
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
id: 'email-verification',
|
|
48
|
+
text: 'Require email verification for new accounts?',
|
|
49
|
+
type: 'boolean',
|
|
50
|
+
required: true,
|
|
51
|
+
defaultValue: false,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
};
|
|
55
|
+
export const BLOG_FEATURE = {
|
|
56
|
+
id: 'blog',
|
|
57
|
+
name: 'Blog System',
|
|
58
|
+
description: 'Complete blog with posts, authors, and rich content editing',
|
|
59
|
+
category: 'content',
|
|
60
|
+
includes: [
|
|
61
|
+
'Post list with title, content, and metadata',
|
|
62
|
+
'Author relationship to User',
|
|
63
|
+
'Draft/publish workflow with status field',
|
|
64
|
+
'Access control (authors can edit own posts)',
|
|
65
|
+
'Rich text editor or markdown support',
|
|
66
|
+
'SEO-friendly slugs',
|
|
67
|
+
],
|
|
68
|
+
dependsOn: ['authentication'],
|
|
69
|
+
questions: [
|
|
70
|
+
{
|
|
71
|
+
id: 'content-editor',
|
|
72
|
+
text: 'How should users write posts?',
|
|
73
|
+
type: 'select',
|
|
74
|
+
required: true,
|
|
75
|
+
options: ['Rich text editor (Tiptap)', 'Markdown', 'Plain text'],
|
|
76
|
+
defaultValue: 'Rich text editor (Tiptap)',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: 'post-status',
|
|
80
|
+
text: 'Enable draft/publish workflow?',
|
|
81
|
+
type: 'boolean',
|
|
82
|
+
required: true,
|
|
83
|
+
defaultValue: true,
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
id: 'taxonomy',
|
|
87
|
+
text: 'Add categories or tags for organizing posts?',
|
|
88
|
+
type: 'multiselect',
|
|
89
|
+
required: false,
|
|
90
|
+
options: ['Categories', 'Tags'],
|
|
91
|
+
defaultValue: [],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
id: 'post-fields',
|
|
95
|
+
text: 'Select additional post fields',
|
|
96
|
+
type: 'multiselect',
|
|
97
|
+
required: false,
|
|
98
|
+
options: [
|
|
99
|
+
'Featured image',
|
|
100
|
+
'Excerpt/summary',
|
|
101
|
+
'SEO metadata (title, description)',
|
|
102
|
+
'Published date',
|
|
103
|
+
'Reading time estimate',
|
|
104
|
+
],
|
|
105
|
+
defaultValue: ['Featured image', 'Excerpt/summary'],
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'comments-enabled',
|
|
109
|
+
text: 'Enable comments on blog posts?',
|
|
110
|
+
type: 'boolean',
|
|
111
|
+
required: false,
|
|
112
|
+
defaultValue: false,
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
};
|
|
116
|
+
export const COMMENTS_FEATURE = {
|
|
117
|
+
id: 'comments',
|
|
118
|
+
name: 'Comments System',
|
|
119
|
+
description: 'Add threaded comments to your content with moderation',
|
|
120
|
+
category: 'content',
|
|
121
|
+
includes: [
|
|
122
|
+
'Comment list with content and author',
|
|
123
|
+
'Relationship to commentable content',
|
|
124
|
+
'Nested replies support (optional)',
|
|
125
|
+
'Moderation workflow',
|
|
126
|
+
'Access control for comment management',
|
|
127
|
+
],
|
|
128
|
+
dependsOn: ['authentication'],
|
|
129
|
+
questions: [
|
|
130
|
+
{
|
|
131
|
+
id: 'comment-targets',
|
|
132
|
+
text: 'What content types can users comment on?',
|
|
133
|
+
type: 'multiselect',
|
|
134
|
+
required: true,
|
|
135
|
+
options: ['Posts', 'Products', 'Other'],
|
|
136
|
+
defaultValue: ['Posts'],
|
|
137
|
+
},
|
|
138
|
+
{
|
|
139
|
+
id: 'nested-replies',
|
|
140
|
+
text: 'Allow nested/threaded replies?',
|
|
141
|
+
type: 'boolean',
|
|
142
|
+
required: true,
|
|
143
|
+
defaultValue: true,
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 'moderation',
|
|
147
|
+
text: 'Comment moderation approach?',
|
|
148
|
+
type: 'select',
|
|
149
|
+
required: true,
|
|
150
|
+
options: [
|
|
151
|
+
'Auto-approve all comments',
|
|
152
|
+
'Require admin approval',
|
|
153
|
+
'Auto-approve for verified users only',
|
|
154
|
+
],
|
|
155
|
+
defaultValue: 'Auto-approve all comments',
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 'comment-features',
|
|
159
|
+
text: 'Additional comment features?',
|
|
160
|
+
type: 'multiselect',
|
|
161
|
+
required: false,
|
|
162
|
+
options: ['Upvotes/downvotes', 'Report/flag comments', 'Markdown support'],
|
|
163
|
+
defaultValue: [],
|
|
164
|
+
},
|
|
165
|
+
],
|
|
166
|
+
};
|
|
167
|
+
export const FILE_UPLOAD_FEATURE = {
|
|
168
|
+
id: 'file-upload',
|
|
169
|
+
name: 'File Uploads',
|
|
170
|
+
description: 'Upload and manage files with cloud storage integration',
|
|
171
|
+
category: 'storage',
|
|
172
|
+
includes: [
|
|
173
|
+
'File list with name, URL, size, and type',
|
|
174
|
+
'Storage plugin integration',
|
|
175
|
+
'Upload UI components',
|
|
176
|
+
'Access control for files',
|
|
177
|
+
'Image optimization (optional)',
|
|
178
|
+
],
|
|
179
|
+
questions: [
|
|
180
|
+
{
|
|
181
|
+
id: 'storage-provider',
|
|
182
|
+
text: 'Which storage provider do you want to use?',
|
|
183
|
+
type: 'select',
|
|
184
|
+
required: true,
|
|
185
|
+
options: ['AWS S3', 'Cloudflare R2', 'Vercel Blob', 'Local filesystem (development only)'],
|
|
186
|
+
defaultValue: 'Vercel Blob',
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
id: 'file-associations',
|
|
190
|
+
text: 'Where will files be used?',
|
|
191
|
+
type: 'multiselect',
|
|
192
|
+
required: true,
|
|
193
|
+
options: ['User avatars', 'Post featured images', 'General attachments', 'Product images'],
|
|
194
|
+
defaultValue: ['User avatars'],
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
id: 'file-types',
|
|
198
|
+
text: 'What file types should be allowed?',
|
|
199
|
+
type: 'multiselect',
|
|
200
|
+
required: true,
|
|
201
|
+
options: ['Images (jpg, png, webp)', 'PDFs', 'Videos', 'Any file type'],
|
|
202
|
+
defaultValue: ['Images (jpg, png, webp)'],
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
id: 'image-processing',
|
|
206
|
+
text: 'Enable automatic image optimization and resizing?',
|
|
207
|
+
type: 'boolean',
|
|
208
|
+
required: false,
|
|
209
|
+
defaultValue: true,
|
|
210
|
+
dependsOn: {
|
|
211
|
+
questionId: 'file-types',
|
|
212
|
+
value: 'Images (jpg, png, webp)',
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
],
|
|
216
|
+
};
|
|
217
|
+
export const SEMANTIC_SEARCH_FEATURE = {
|
|
218
|
+
id: 'semantic-search',
|
|
219
|
+
name: 'Semantic Search',
|
|
220
|
+
description: 'AI-powered search using RAG (Retrieval Augmented Generation)',
|
|
221
|
+
category: 'search',
|
|
222
|
+
includes: [
|
|
223
|
+
'RAG plugin integration',
|
|
224
|
+
'Automatic embeddings generation',
|
|
225
|
+
'Search API endpoint',
|
|
226
|
+
'Search UI component',
|
|
227
|
+
'Relevance scoring',
|
|
228
|
+
],
|
|
229
|
+
questions: [
|
|
230
|
+
{
|
|
231
|
+
id: 'searchable-content',
|
|
232
|
+
text: 'What content should be searchable?',
|
|
233
|
+
type: 'multiselect',
|
|
234
|
+
required: true,
|
|
235
|
+
options: ['Posts', 'Products', 'Documentation', 'User profiles'],
|
|
236
|
+
defaultValue: ['Posts'],
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
id: 'embedding-provider',
|
|
240
|
+
text: 'Which embedding provider?',
|
|
241
|
+
type: 'select',
|
|
242
|
+
required: true,
|
|
243
|
+
options: ['OpenAI (text-embedding-3-small)', 'Cohere', 'Anthropic'],
|
|
244
|
+
defaultValue: 'OpenAI (text-embedding-3-small)',
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
id: 'search-fields',
|
|
248
|
+
text: 'Which fields should be indexed for search?',
|
|
249
|
+
type: 'multiselect',
|
|
250
|
+
required: true,
|
|
251
|
+
options: ['Title', 'Content/body', 'Excerpt', 'Tags/categories'],
|
|
252
|
+
defaultValue: ['Title', 'Content/body'],
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: 'real-time-indexing',
|
|
256
|
+
text: 'Update search index in real-time when content changes?',
|
|
257
|
+
type: 'boolean',
|
|
258
|
+
required: true,
|
|
259
|
+
defaultValue: true,
|
|
260
|
+
},
|
|
261
|
+
],
|
|
262
|
+
};
|
|
263
|
+
/**
|
|
264
|
+
* Feature catalog - maps feature IDs to feature definitions
|
|
265
|
+
*/
|
|
266
|
+
export const FeatureCatalog = new Map([
|
|
267
|
+
['authentication', AUTHENTICATION_FEATURE],
|
|
268
|
+
['blog', BLOG_FEATURE],
|
|
269
|
+
['comments', COMMENTS_FEATURE],
|
|
270
|
+
['file-upload', FILE_UPLOAD_FEATURE],
|
|
271
|
+
['semantic-search', SEMANTIC_SEARCH_FEATURE],
|
|
272
|
+
]);
|
|
273
|
+
/**
|
|
274
|
+
* Get feature by ID
|
|
275
|
+
*/
|
|
276
|
+
export function getFeature(featureId) {
|
|
277
|
+
return FeatureCatalog.get(featureId);
|
|
278
|
+
}
|
|
279
|
+
/**
|
|
280
|
+
* Get all available features
|
|
281
|
+
*/
|
|
282
|
+
export function getAllFeatures() {
|
|
283
|
+
return Array.from(FeatureCatalog.values());
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Get features by category
|
|
287
|
+
*/
|
|
288
|
+
export function getFeaturesByCategory(category) {
|
|
289
|
+
return getAllFeatures().filter((f) => f.category === category);
|
|
290
|
+
}
|
|
291
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../../src/mcp/lib/features/catalog.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,CAAC,MAAM,sBAAsB,GAAY;IAC7C,EAAE,EAAE,gBAAgB;IACpB,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,mFAAmF;IAChG,QAAQ,EAAE,gBAAgB;IAC1B,QAAQ,EAAE;QACR,2DAA2D;QAC3D,iDAAiD;QACjD,gDAAgD;QAChD,4DAA4D;QAC5D,4BAA4B;QAC5B,+BAA+B;KAChC;IACD,SAAS,EAAE;QACT;YACE,EAAE,EAAE,cAAc;YAClB,IAAI,EAAE,sDAAsD;YAC5D,IAAI,EAAE,aAAa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,aAAa;YACnB,QAAQ,EAAE,IAAI;YACd,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,iBAAiB,CAAC;YAChE,YAAY,EAAE,CAAC,OAAO,EAAE,cAAc,CAAC;SACxC;QACD;YACE,EAAE,EAAE,oBAAoB;YACxB,IAAI,EAAE,wDAAwD;YAC9D,IAAI,EAAE,SAAS;YACf,QAAQ,EAAE,IAAI;YACd,YAAY,EAAE,IAAI;SACnB;KACF;CACF,CAAA;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,GAAG,CAAkB;IACrD,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IAC1C,CAAC,MAAM,EAAE,YAAY,CAAC;IACtB,CAAC,UAAU,EAAE,gBAAgB,CAAC;IAC9B,CAAC,aAAa,EAAE,mBAAmB,CAAC;IACpC,CAAC,iBAAiB,EAAE,uBAAuB,CAAC;CAC7C,CAAC,CAAA;AAEF;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,OAAO,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;AACtC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,OAAO,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,MAAM,EAAE,CAAC,CAAA;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CAAC,QAA6B;IACjE,OAAO,cAAc,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,KAAK,QAAQ,CAAC,CAAA;AAChE,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Feature generator - Generates code, config, and documentation for features
|
|
3
|
+
*/
|
|
4
|
+
import type { Feature, FeatureImplementation } from '../types.js';
|
|
5
|
+
export declare class FeatureGenerator {
|
|
6
|
+
private feature;
|
|
7
|
+
private answers;
|
|
8
|
+
private followUpAnswers;
|
|
9
|
+
constructor(feature: Feature, answers: Record<string, string | boolean | string[]>, followUpAnswers: Record<string, string | boolean | string[]>);
|
|
10
|
+
/**
|
|
11
|
+
* Generate complete feature implementation
|
|
12
|
+
*/
|
|
13
|
+
generate(): FeatureImplementation;
|
|
14
|
+
/**
|
|
15
|
+
* Generate authentication feature
|
|
16
|
+
*/
|
|
17
|
+
private generateAuthentication;
|
|
18
|
+
/**
|
|
19
|
+
* Generate blog feature
|
|
20
|
+
*/
|
|
21
|
+
private generateBlog;
|
|
22
|
+
/**
|
|
23
|
+
* Generate comments feature (stub - to be implemented)
|
|
24
|
+
*/
|
|
25
|
+
private generateComments;
|
|
26
|
+
/**
|
|
27
|
+
* Generate file upload feature (stub - to be implemented)
|
|
28
|
+
*/
|
|
29
|
+
private generateFileUpload;
|
|
30
|
+
/**
|
|
31
|
+
* Generate semantic search feature (stub - to be implemented)
|
|
32
|
+
*/
|
|
33
|
+
private generateSemanticSearch;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=feature-generator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feature-generator.d.ts","sourceRoot":"","sources":["../../../../src/mcp/lib/generators/feature-generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAiB,MAAM,aAAa,CAAA;AAEhF,qBAAa,gBAAgB;IAEzB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,eAAe;gBAFf,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC,EACpD,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,GAAG,MAAM,EAAE,CAAC;IAGtE;;OAEG;IACH,QAAQ,IAAI,qBAAqB;IAmBjC;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAkR9B;;OAEG;IACH,OAAO,CAAC,YAAY;IAoPpB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAUxB;;OAEG;IACH,OAAO,CAAC,kBAAkB;IAU1B;;OAEG;IACH,OAAO,CAAC,sBAAsB;CAS/B"}
|