@stacksfinder/mcp-server 1.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.
Files changed (65) hide show
  1. package/README.md +262 -0
  2. package/dist/data/compatibility_matrix.json +230 -0
  3. package/dist/data/index.d.ts +109 -0
  4. package/dist/data/index.d.ts.map +1 -0
  5. package/dist/data/index.js +203 -0
  6. package/dist/data/index.js.map +1 -0
  7. package/dist/data/technology_scores.json +1031 -0
  8. package/dist/data/357/200/242/357/200/212cp H:bac_/303/240_guigui_v2stack_finderpackagesmcp-serversrcdatacompatibility_matrix.json H:bac_/303/240_guigui_v2stack_finderpackagesmcp-serverdistdata/357/200/242" +226 -0
  9. package/dist/index.d.ts +3 -0
  10. package/dist/index.d.ts.map +1 -0
  11. package/dist/index.js +50 -0
  12. package/dist/index.js.map +1 -0
  13. package/dist/server.d.ts +6 -0
  14. package/dist/server.d.ts.map +1 -0
  15. package/dist/server.js +254 -0
  16. package/dist/server.js.map +1 -0
  17. package/dist/tools/analyze.d.ts +45 -0
  18. package/dist/tools/analyze.d.ts.map +1 -0
  19. package/dist/tools/analyze.js +110 -0
  20. package/dist/tools/analyze.js.map +1 -0
  21. package/dist/tools/api-keys.d.ts +78 -0
  22. package/dist/tools/api-keys.d.ts.map +1 -0
  23. package/dist/tools/api-keys.js +238 -0
  24. package/dist/tools/api-keys.js.map +1 -0
  25. package/dist/tools/blueprint.d.ts +129 -0
  26. package/dist/tools/blueprint.d.ts.map +1 -0
  27. package/dist/tools/blueprint.js +320 -0
  28. package/dist/tools/blueprint.js.map +1 -0
  29. package/dist/tools/compare.d.ts +50 -0
  30. package/dist/tools/compare.d.ts.map +1 -0
  31. package/dist/tools/compare.js +168 -0
  32. package/dist/tools/compare.js.map +1 -0
  33. package/dist/tools/list-techs.d.ts +34 -0
  34. package/dist/tools/list-techs.d.ts.map +1 -0
  35. package/dist/tools/list-techs.js +70 -0
  36. package/dist/tools/list-techs.js.map +1 -0
  37. package/dist/tools/recommend-demo.d.ts +46 -0
  38. package/dist/tools/recommend-demo.d.ts.map +1 -0
  39. package/dist/tools/recommend-demo.js +202 -0
  40. package/dist/tools/recommend-demo.js.map +1 -0
  41. package/dist/tools/recommend.d.ts +68 -0
  42. package/dist/tools/recommend.d.ts.map +1 -0
  43. package/dist/tools/recommend.js +135 -0
  44. package/dist/tools/recommend.js.map +1 -0
  45. package/dist/utils/api-client.d.ts +80 -0
  46. package/dist/utils/api-client.d.ts.map +1 -0
  47. package/dist/utils/api-client.js +197 -0
  48. package/dist/utils/api-client.js.map +1 -0
  49. package/dist/utils/config.d.ts +35 -0
  50. package/dist/utils/config.d.ts.map +1 -0
  51. package/dist/utils/config.js +45 -0
  52. package/dist/utils/config.js.map +1 -0
  53. package/dist/utils/device-id.d.ts +21 -0
  54. package/dist/utils/device-id.d.ts.map +1 -0
  55. package/dist/utils/device-id.js +101 -0
  56. package/dist/utils/device-id.js.map +1 -0
  57. package/dist/utils/errors.d.ts +46 -0
  58. package/dist/utils/errors.d.ts.map +1 -0
  59. package/dist/utils/errors.js +125 -0
  60. package/dist/utils/errors.js.map +1 -0
  61. package/dist/utils/logger.d.ts +37 -0
  62. package/dist/utils/logger.d.ts.map +1 -0
  63. package/dist/utils/logger.js +73 -0
  64. package/dist/utils/logger.js.map +1 -0
  65. package/package.json +63 -0
@@ -0,0 +1,110 @@
1
+ import { z } from 'zod';
2
+ import { CONTEXTS, DATA_VERSION, DIMENSION_LABELS, SCORE_DIMENSIONS, calculateOverallScore, findCompatibleTechs, getAllTechIds, getScores, getTechnology, scoreToGrade, techExists } from '../data/index.js';
3
+ import { techNotFoundError } from '../utils/errors.js';
4
+ /**
5
+ * Input schema for analyze_tech tool.
6
+ */
7
+ export const AnalyzeTechInputSchema = z.object({
8
+ technology: z.string().min(1).describe('Technology ID to analyze (e.g., "nextjs", "postgres")'),
9
+ context: z.enum(CONTEXTS).optional().default('default').describe('Context for score lookup')
10
+ });
11
+ /**
12
+ * Tool definition for MCP registration.
13
+ */
14
+ export const analyzeTechToolDefinition = {
15
+ name: 'analyze_tech',
16
+ description: 'Detailed analysis of a technology with 6-dimension scores, strengths, weaknesses, and compatible technologies.',
17
+ inputSchema: {
18
+ type: 'object',
19
+ properties: {
20
+ technology: {
21
+ type: 'string',
22
+ description: 'Technology ID (e.g., "nextjs", "postgres", "drizzle")'
23
+ },
24
+ context: {
25
+ type: 'string',
26
+ enum: CONTEXTS,
27
+ description: 'Context for scoring (default, mvp, enterprise)'
28
+ }
29
+ },
30
+ required: ['technology']
31
+ }
32
+ };
33
+ /**
34
+ * Identify strengths (top scores) and weaknesses (low scores).
35
+ */
36
+ function analyzeStrengthsWeaknesses(scores) {
37
+ const sorted = SCORE_DIMENSIONS.map((dim) => ({
38
+ dim: DIMENSION_LABELS[dim],
39
+ dimKey: dim,
40
+ score: scores[dim]
41
+ })).sort((a, b) => b.score - a.score);
42
+ // Top 2 as strengths (if score >= 85)
43
+ const strengths = sorted.filter((s) => s.score >= 85).slice(0, 2);
44
+ // Bottom 2 as weaknesses (if score < 80)
45
+ const weaknesses = sorted
46
+ .reverse()
47
+ .filter((s) => s.score < 80)
48
+ .slice(0, 2);
49
+ return {
50
+ strengths: strengths.map((s) => ({ dim: s.dim, score: s.score })),
51
+ weaknesses: weaknesses.map((s) => ({ dim: s.dim, score: s.score }))
52
+ };
53
+ }
54
+ /**
55
+ * Execute analyze_tech tool.
56
+ */
57
+ export function executeAnalyzeTech(input) {
58
+ const { technology, context = 'default' } = input;
59
+ // Check if technology exists
60
+ if (!techExists(technology)) {
61
+ const error = techNotFoundError(technology, getAllTechIds());
62
+ return { text: error.toResponseText(), isError: true };
63
+ }
64
+ const tech = getTechnology(technology);
65
+ const scores = getScores(technology, context);
66
+ const overallScore = calculateOverallScore(scores);
67
+ const grade = scoreToGrade(overallScore);
68
+ // Get strengths and weaknesses
69
+ const { strengths, weaknesses } = analyzeStrengthsWeaknesses(scores);
70
+ // Get compatible technologies
71
+ const compatible = findCompatibleTechs(technology);
72
+ // Build response
73
+ let text = `## ${tech.name} Analysis (context: ${context})
74
+
75
+ **Category**: ${tech.category}
76
+ **Overall Score**: ${overallScore}/100 (${grade})
77
+ **URL**: ${tech.url}
78
+
79
+ ### Scores by Dimension
80
+ | Dimension | Score | Grade |
81
+ |-----------|-------|-------|
82
+ `;
83
+ for (const dim of SCORE_DIMENSIONS) {
84
+ const score = scores[dim];
85
+ text += `| ${DIMENSION_LABELS[dim]} | ${score} | ${scoreToGrade(score)} |\n`;
86
+ }
87
+ // Strengths
88
+ if (strengths.length > 0) {
89
+ text += '\n### Strengths\n';
90
+ for (const s of strengths) {
91
+ text += `- **${s.dim}** (${s.score}/100)\n`;
92
+ }
93
+ }
94
+ // Weaknesses
95
+ if (weaknesses.length > 0) {
96
+ text += '\n### Weaknesses\n';
97
+ for (const w of weaknesses) {
98
+ text += `- ${w.dim} (${w.score}/100)\n`;
99
+ }
100
+ }
101
+ // Compatible technologies
102
+ if (compatible.length > 0) {
103
+ text += '\n### Compatible Technologies (top 8)\n';
104
+ const compatList = compatible.map((c) => `${c.id} (${c.score})`).join(', ');
105
+ text += `${compatList}\n`;
106
+ }
107
+ text += `\nData version: ${DATA_VERSION}`;
108
+ return { text };
109
+ }
110
+ //# sourceMappingURL=analyze.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"analyze.js","sourceRoot":"","sources":["../../src/tools/analyze.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EACN,QAAQ,EACR,YAAY,EACZ,gBAAgB,EAChB,gBAAgB,EAEhB,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,SAAS,EACT,aAAa,EACb,YAAY,EACZ,UAAU,EACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,C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AC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC5E,IAAI,IAAI,GAAG,UAAU,IAAI,CAAC;IAC3B,CAAC;IAED,IAAI,IAAI,mBAAmB,YAAY,EAAE,CAAC;IAE1C,OAAO,EAAE,IAAI,EAAE,CAAC;AACjB,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Input schema for setup_api_key tool.
4
+ */
5
+ export declare const SetupApiKeyInputSchema: z.ZodObject<{
6
+ email: z.ZodString;
7
+ password: z.ZodString;
8
+ keyName: z.ZodOptional<z.ZodString>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ email: string;
11
+ password: string;
12
+ keyName?: string | undefined;
13
+ }, {
14
+ email: string;
15
+ password: string;
16
+ keyName?: string | undefined;
17
+ }>;
18
+ export type SetupApiKeyInput = z.infer<typeof SetupApiKeyInputSchema>;
19
+ /**
20
+ * Tool definition for setup_api_key.
21
+ */
22
+ export declare const setupApiKeyToolDefinition: {
23
+ name: string;
24
+ description: string;
25
+ };
26
+ /**
27
+ * Execute setup_api_key tool.
28
+ */
29
+ export declare function executeSetupApiKey(input: SetupApiKeyInput): Promise<{
30
+ text: string;
31
+ isError?: boolean;
32
+ apiKey?: string;
33
+ }>;
34
+ /**
35
+ * Input schema for list_api_keys tool.
36
+ */
37
+ export declare const ListApiKeysInputSchema: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
38
+ export type ListApiKeysInput = z.infer<typeof ListApiKeysInputSchema>;
39
+ /**
40
+ * Tool definition for list_api_keys.
41
+ */
42
+ export declare const listApiKeysToolDefinition: {
43
+ name: string;
44
+ description: string;
45
+ };
46
+ /**
47
+ * Execute list_api_keys tool.
48
+ */
49
+ export declare function executeListApiKeys(): Promise<{
50
+ text: string;
51
+ isError?: boolean;
52
+ }>;
53
+ /**
54
+ * Input schema for revoke_api_key tool.
55
+ */
56
+ export declare const RevokeApiKeyInputSchema: z.ZodObject<{
57
+ keyId: z.ZodString;
58
+ }, "strip", z.ZodTypeAny, {
59
+ keyId: string;
60
+ }, {
61
+ keyId: string;
62
+ }>;
63
+ export type RevokeApiKeyInput = z.infer<typeof RevokeApiKeyInputSchema>;
64
+ /**
65
+ * Tool definition for revoke_api_key.
66
+ */
67
+ export declare const revokeApiKeyToolDefinition: {
68
+ name: string;
69
+ description: string;
70
+ };
71
+ /**
72
+ * Execute revoke_api_key tool.
73
+ */
74
+ export declare function executeRevokeApiKey(input: RevokeApiKeyInput): Promise<{
75
+ text: string;
76
+ isError?: boolean;
77
+ }>;
78
+ //# sourceMappingURL=api-keys.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/tools/api-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;EAIjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;CAIrC,CAAC;AAcF;;GAEG;AACH,wBAAsB,kBAAkB,CACvC,KAAK,EAAE,gBAAgB,GACrB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAgF/D;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,gDAAe,CAAC;AAEnD,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,yBAAyB;;;CAGrC,CAAC;AAuBF;;GAEG;AACH,wBAAsB,kBAAkB,IAAI,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAkEvF;AAED;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;CAGtC,CAAC;AAEF;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,KAAK,EAAE,iBAAiB,GACtB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CAwD9C"}
@@ -0,0 +1,238 @@
1
+ import { z } from 'zod';
2
+ import { getConfig } from '../utils/config.js';
3
+ import { McpError } from '../utils/errors.js';
4
+ import { debug, info } from '../utils/logger.js';
5
+ /**
6
+ * Input schema for setup_api_key tool.
7
+ */
8
+ export const SetupApiKeyInputSchema = z.object({
9
+ email: z.string().email().describe('Your StacksFinder account email'),
10
+ password: z.string().min(1).describe('Your StacksFinder account password'),
11
+ keyName: z.string().max(100).optional().describe('Optional name for the API key')
12
+ });
13
+ /**
14
+ * Tool definition for setup_api_key.
15
+ */
16
+ export const setupApiKeyToolDefinition = {
17
+ name: 'setup_api_key',
18
+ description: 'Authenticates with your StacksFinder account and creates an API key. Requires Pro or Team tier. The key is returned once and should be saved securely.'
19
+ };
20
+ /**
21
+ * Execute setup_api_key tool.
22
+ */
23
+ export async function executeSetupApiKey(input) {
24
+ const config = getConfig();
25
+ const { email, password, keyName } = input;
26
+ debug('Setting up API key for', email);
27
+ try {
28
+ const response = await fetch(`${config.apiUrl}/api/v1/mcp/setup`, {
29
+ method: 'POST',
30
+ headers: {
31
+ 'Content-Type': 'application/json'
32
+ },
33
+ body: JSON.stringify({
34
+ email,
35
+ password,
36
+ keyName: keyName || 'MCP Auto-generated'
37
+ })
38
+ });
39
+ const data = (await response.json());
40
+ if (!response.ok || !data.success) {
41
+ let errorMessage = data.message || data.error || 'Failed to create API key';
42
+ // Add helpful context for common errors
43
+ if (data.error === 'TIER_REQUIRED') {
44
+ errorMessage = `Pro or Team tier required. Upgrade at ${config.apiUrl}/pricing`;
45
+ }
46
+ else if (data.error === 'LIMIT_EXCEEDED') {
47
+ errorMessage = `API key limit reached. Manage keys at ${config.apiUrl}/account/developer/api-keys`;
48
+ }
49
+ else if (data.error === 'INVALID_CREDENTIALS') {
50
+ errorMessage = 'Invalid email or password. Please check your credentials.';
51
+ }
52
+ return {
53
+ text: `**Error**: ${errorMessage}`,
54
+ isError: true
55
+ };
56
+ }
57
+ info('API key created successfully');
58
+ // Return the key with instructions
59
+ const text = `## API Key Created Successfully
60
+
61
+ **Key**: \`${data.apiKey}\`
62
+ **Key ID**: ${data.keyId}
63
+ **Prefix**: ${data.prefix}
64
+
65
+ **IMPORTANT**: Save this key now - it cannot be retrieved again!
66
+
67
+ ### Configure in Claude Code
68
+
69
+ Run this command to add the key:
70
+
71
+ \`\`\`bash
72
+ claude mcp add-json stacksfinder '{"command": "npx", "args": ["-y", "@stacksfinder/mcp-server"], "env": {"STACKSFINDER_API_KEY": "${data.apiKey}"}}'
73
+ \`\`\`
74
+
75
+ Or set the environment variable:
76
+
77
+ \`\`\`bash
78
+ export STACKSFINDER_API_KEY="${data.apiKey}"
79
+ \`\`\`
80
+
81
+ ### Manage Your Keys
82
+
83
+ View and manage keys at: ${config.apiUrl}/account/developer/api-keys`;
84
+ return { text, apiKey: data.apiKey };
85
+ }
86
+ catch (err) {
87
+ if (err instanceof McpError) {
88
+ return { text: err.toResponseText(), isError: true };
89
+ }
90
+ const errorMessage = err instanceof Error ? err.message : 'Failed to setup API key';
91
+ return {
92
+ text: `**Error**: ${errorMessage}\n\nMake sure you can reach ${config.apiUrl}`,
93
+ isError: true
94
+ };
95
+ }
96
+ }
97
+ /**
98
+ * Input schema for list_api_keys tool.
99
+ */
100
+ export const ListApiKeysInputSchema = z.object({});
101
+ /**
102
+ * Tool definition for list_api_keys.
103
+ */
104
+ export const listApiKeysToolDefinition = {
105
+ name: 'list_api_keys',
106
+ description: 'Lists your StacksFinder API keys. Requires a configured API key.'
107
+ };
108
+ /**
109
+ * Execute list_api_keys tool.
110
+ */
111
+ export async function executeListApiKeys() {
112
+ const config = getConfig();
113
+ if (!config.apiKey) {
114
+ return {
115
+ text: `**Error**: No API key configured. Use \`setup_api_key\` tool first or set STACKSFINDER_API_KEY environment variable.`,
116
+ isError: true
117
+ };
118
+ }
119
+ debug('Listing API keys');
120
+ try {
121
+ const response = await fetch(`${config.apiUrl}/api/v1/keys`, {
122
+ method: 'GET',
123
+ headers: {
124
+ Authorization: `Bearer ${config.apiKey}`,
125
+ 'Content-Type': 'application/json'
126
+ }
127
+ });
128
+ if (!response.ok) {
129
+ if (response.status === 401) {
130
+ return {
131
+ text: '**Error**: Invalid API key. Please reconfigure with a valid key.',
132
+ isError: true
133
+ };
134
+ }
135
+ const errorText = await response.text();
136
+ return {
137
+ text: `**Error**: Failed to list keys (${response.status}): ${errorText}`,
138
+ isError: true
139
+ };
140
+ }
141
+ const data = (await response.json());
142
+ let text = `## Your API Keys
143
+
144
+ **Usage**: ${data.limits.used}/${data.limits.max} keys (${data.limits.remaining} remaining)
145
+
146
+ | Name | Prefix | Scopes | Created | Last Used |
147
+ |------|--------|--------|---------|-----------|
148
+ `;
149
+ for (const key of data.keys) {
150
+ const lastUsed = key.lastUsedAt ? new Date(key.lastUsedAt).toLocaleDateString() : 'Never';
151
+ const created = new Date(key.createdAt).toLocaleDateString();
152
+ const scopes = key.scopes.join(', ');
153
+ text += `| ${key.name} | ${key.prefix}...${key.suffix} | ${scopes} | ${created} | ${lastUsed} |\n`;
154
+ }
155
+ if (data.keys.length === 0) {
156
+ text += `| (no keys) | - | - | - | - |\n`;
157
+ }
158
+ text += `\nManage keys at: ${config.apiUrl}/account/developer/api-keys`;
159
+ return { text };
160
+ }
161
+ catch (err) {
162
+ const errorMessage = err instanceof Error ? err.message : 'Failed to list API keys';
163
+ return {
164
+ text: `**Error**: ${errorMessage}`,
165
+ isError: true
166
+ };
167
+ }
168
+ }
169
+ /**
170
+ * Input schema for revoke_api_key tool.
171
+ */
172
+ export const RevokeApiKeyInputSchema = z.object({
173
+ keyId: z.string().uuid().describe('The UUID of the API key to revoke')
174
+ });
175
+ /**
176
+ * Tool definition for revoke_api_key.
177
+ */
178
+ export const revokeApiKeyToolDefinition = {
179
+ name: 'revoke_api_key',
180
+ description: 'Revokes an API key. This action cannot be undone.'
181
+ };
182
+ /**
183
+ * Execute revoke_api_key tool.
184
+ */
185
+ export async function executeRevokeApiKey(input) {
186
+ const config = getConfig();
187
+ const { keyId } = input;
188
+ if (!config.apiKey) {
189
+ return {
190
+ text: `**Error**: No API key configured. Set STACKSFINDER_API_KEY environment variable.`,
191
+ isError: true
192
+ };
193
+ }
194
+ debug('Revoking API key', keyId);
195
+ try {
196
+ const response = await fetch(`${config.apiUrl}/api/v1/keys/${keyId}`, {
197
+ method: 'DELETE',
198
+ headers: {
199
+ Authorization: `Bearer ${config.apiKey}`,
200
+ 'Content-Type': 'application/json'
201
+ }
202
+ });
203
+ if (!response.ok) {
204
+ if (response.status === 401) {
205
+ return {
206
+ text: '**Error**: Invalid API key. Please reconfigure with a valid key.',
207
+ isError: true
208
+ };
209
+ }
210
+ if (response.status === 404) {
211
+ return {
212
+ text: `**Error**: API key not found or already revoked.`,
213
+ isError: true
214
+ };
215
+ }
216
+ const errorText = await response.text();
217
+ return {
218
+ text: `**Error**: Failed to revoke key (${response.status}): ${errorText}`,
219
+ isError: true
220
+ };
221
+ }
222
+ return {
223
+ text: `## API Key Revoked
224
+
225
+ The API key \`${keyId}\` has been revoked and can no longer be used.
226
+
227
+ **Note**: If you revoked the key you're currently using, you'll need to configure a new one.`
228
+ };
229
+ }
230
+ catch (err) {
231
+ const errorMessage = err instanceof Error ? err.message : 'Failed to revoke API key';
232
+ return {
233
+ text: `**Error**: ${errorMessage}`,
234
+ isError: true
235
+ };
236
+ }
237
+ }
238
+ //# sourceMappingURL=api-keys.js.map
@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CAAC;gBAC7B,OAAO;oBACN,IAAI,EAAE,kEAAkE;oBACxE,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YACD,IAAI,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE,CAAC;gBAC7B,OAAO;oBACN,IAAI,EAAE,kDAAkD;oBACxD,OAAO,EAAE,IAAI;iBACb,CAAC;YACH,CAAC;YACD,MAAM,SAAS,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;YACxC,OAAO;gBACN,IAAI,EAAE,oCAAoC,QAAQ,CAAC,MAAM,MAAM,SAAS,EAAE;gBAC1E,OAAO,EAAE,IAAI;aACb,CAAC;QACH,CAAC;QAED,OAAO;YACN,IAAI,EAAE;;gBAEO,KAAK;;6FAEwE;SAC1F,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACd,MAAM,YAAY,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,0BAA0B,CAAC;QACrF,OAAO;YACN,IAAI,EAAE,cAAc,YAAY,EAAE;YAClC,OAAO,EAAE,IAAI;SACb,CAAC;IACH,CAAC;AACF,CAAC"}
@@ -0,0 +1,129 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Input schema for get_blueprint tool.
4
+ */
5
+ export declare const GetBlueprintInputSchema: z.ZodObject<{
6
+ blueprintId: z.ZodString;
7
+ }, "strip", z.ZodTypeAny, {
8
+ blueprintId: string;
9
+ }, {
10
+ blueprintId: string;
11
+ }>;
12
+ export type GetBlueprintInput = z.infer<typeof GetBlueprintInputSchema>;
13
+ /**
14
+ * Tool definition for MCP registration.
15
+ */
16
+ export declare const getBlueprintToolDefinition: {
17
+ name: string;
18
+ description: string;
19
+ inputSchema: {
20
+ type: "object";
21
+ properties: {
22
+ blueprintId: {
23
+ type: string;
24
+ format: string;
25
+ description: string;
26
+ };
27
+ };
28
+ required: string[];
29
+ };
30
+ };
31
+ /**
32
+ * Execute get_blueprint tool.
33
+ */
34
+ export declare function executeGetBlueprint(input: GetBlueprintInput): Promise<{
35
+ text: string;
36
+ isError?: boolean;
37
+ }>;
38
+ /**
39
+ * Input schema for create_blueprint tool.
40
+ */
41
+ export declare const CreateBlueprintInputSchema: z.ZodObject<{
42
+ projectName: z.ZodOptional<z.ZodString>;
43
+ projectType: z.ZodEnum<["web-app", "mobile-app", "api", "desktop", "cli", "library", "e-commerce", "saas", "marketplace"]>;
44
+ scale: z.ZodEnum<["mvp", "startup", "growth", "enterprise"]>;
45
+ projectDescription: z.ZodOptional<z.ZodString>;
46
+ priorities: z.ZodOptional<z.ZodArray<z.ZodEnum<["time-to-market", "scalability", "developer-experience", "cost-efficiency", "performance", "security", "maintainability"]>, "many">>;
47
+ constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
48
+ waitForCompletion: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
49
+ }, "strip", z.ZodTypeAny, {
50
+ projectType: "web-app" | "mobile-app" | "api" | "desktop" | "cli" | "library" | "e-commerce" | "saas" | "marketplace";
51
+ scale: "mvp" | "enterprise" | "startup" | "growth";
52
+ waitForCompletion: boolean;
53
+ priorities?: ("time-to-market" | "scalability" | "developer-experience" | "cost-efficiency" | "performance" | "security" | "maintainability")[] | undefined;
54
+ constraints?: string[] | undefined;
55
+ projectName?: string | undefined;
56
+ projectDescription?: string | undefined;
57
+ }, {
58
+ projectType: "web-app" | "mobile-app" | "api" | "desktop" | "cli" | "library" | "e-commerce" | "saas" | "marketplace";
59
+ scale: "mvp" | "enterprise" | "startup" | "growth";
60
+ priorities?: ("time-to-market" | "scalability" | "developer-experience" | "cost-efficiency" | "performance" | "security" | "maintainability")[] | undefined;
61
+ constraints?: string[] | undefined;
62
+ projectName?: string | undefined;
63
+ projectDescription?: string | undefined;
64
+ waitForCompletion?: boolean | undefined;
65
+ }>;
66
+ export type CreateBlueprintInput = z.infer<typeof CreateBlueprintInputSchema>;
67
+ /**
68
+ * Tool definition for MCP registration.
69
+ */
70
+ export declare const createBlueprintToolDefinition: {
71
+ name: string;
72
+ description: string;
73
+ inputSchema: {
74
+ type: "object";
75
+ properties: {
76
+ projectName: {
77
+ type: string;
78
+ description: string;
79
+ maxLength: number;
80
+ };
81
+ projectType: {
82
+ type: string;
83
+ enum: readonly ["web-app", "mobile-app", "api", "desktop", "cli", "library", "e-commerce", "saas", "marketplace"];
84
+ description: string;
85
+ };
86
+ scale: {
87
+ type: string;
88
+ enum: readonly ["mvp", "startup", "growth", "enterprise"];
89
+ description: string;
90
+ };
91
+ projectDescription: {
92
+ type: string;
93
+ description: string;
94
+ maxLength: number;
95
+ };
96
+ priorities: {
97
+ type: string;
98
+ items: {
99
+ type: string;
100
+ enum: readonly ["time-to-market", "scalability", "developer-experience", "cost-efficiency", "performance", "security", "maintainability"];
101
+ };
102
+ maxItems: number;
103
+ description: string;
104
+ };
105
+ constraints: {
106
+ type: string;
107
+ items: {
108
+ type: string;
109
+ };
110
+ maxItems: number;
111
+ description: string;
112
+ };
113
+ waitForCompletion: {
114
+ type: string;
115
+ description: string;
116
+ default: boolean;
117
+ };
118
+ };
119
+ required: string[];
120
+ };
121
+ };
122
+ /**
123
+ * Execute create_blueprint tool.
124
+ */
125
+ export declare function executeCreateBlueprint(input: CreateBlueprintInput): Promise<{
126
+ text: string;
127
+ isError?: boolean;
128
+ }>;
129
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../src/tools/blueprint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;EAElC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;CAetC,CAAC;AA4DF;;GAEG;AACH,wBAAsB,mBAAmB,CACxC,KAAK,EAAE,iBAAiB,GACtB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA2B9C;AAuCD;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;EA0BrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqDzC,CAAC;AAmCF;;GAEG;AACH,wBAAsB,sBAAsB,CAC3C,KAAK,EAAE,oBAAoB,GACzB,OAAO,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,CA6G9C"}