@schemyx/mcp 0.1.0 → 0.1.2
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 +79 -2
- package/dist/backend-client.d.ts +1 -17
- package/dist/backend-client.js +15 -91
- package/dist/backend-client.js.map +1 -1
- package/dist/client/backend-client.d.ts +17 -0
- package/dist/client/backend-client.js +97 -0
- package/dist/client/backend-client.js.map +1 -0
- package/dist/client/local-theme-source.d.ts +19 -0
- package/dist/client/local-theme-source.js +737 -0
- package/dist/client/local-theme-source.js.map +1 -0
- package/dist/client/mcp-client.d.ts +15 -0
- package/dist/client/mcp-client.js +46 -0
- package/dist/client/mcp-client.js.map +1 -0
- package/dist/codebase-scanner/backend.d.ts +12 -0
- package/dist/codebase-scanner/backend.js +814 -0
- package/dist/codebase-scanner/backend.js.map +1 -0
- package/dist/codebase-scanner/bundle.d.ts +315 -0
- package/dist/codebase-scanner/bundle.js +5195 -0
- package/dist/codebase-scanner/bundle.js.map +1 -0
- package/dist/codebase-scanner/constants.d.ts +26 -0
- package/dist/codebase-scanner/constants.js +231 -0
- package/dist/codebase-scanner/constants.js.map +1 -0
- package/dist/codebase-scanner/database.d.ts +8 -0
- package/dist/codebase-scanner/database.js +1252 -0
- package/dist/codebase-scanner/database.js.map +1 -0
- package/dist/codebase-scanner/extractors.d.ts +241 -0
- package/dist/codebase-scanner/extractors.js +3513 -0
- package/dist/codebase-scanner/extractors.js.map +1 -0
- package/dist/codebase-scanner/files.d.ts +16 -0
- package/dist/codebase-scanner/files.js +250 -0
- package/dist/codebase-scanner/files.js.map +1 -0
- package/dist/codebase-scanner/index.d.ts +217 -0
- package/dist/codebase-scanner/index.js +387 -0
- package/dist/codebase-scanner/index.js.map +1 -0
- package/dist/codebase-scanner/recipes.d.ts +74 -0
- package/dist/codebase-scanner/recipes.js +743 -0
- package/dist/codebase-scanner/recipes.js.map +1 -0
- package/dist/codebase-scanner/storage.d.ts +19 -0
- package/dist/codebase-scanner/storage.js +103 -0
- package/dist/codebase-scanner/storage.js.map +1 -0
- package/dist/codebase-scanner/types.d.ts +743 -0
- package/dist/codebase-scanner/types.js +3 -0
- package/dist/codebase-scanner/types.js.map +1 -0
- package/dist/codebase-scanner/utils.d.ts +37 -0
- package/dist/codebase-scanner/utils.js +259 -0
- package/dist/codebase-scanner/utils.js.map +1 -0
- package/dist/codebase-scanner.d.ts +1 -0
- package/dist/codebase-scanner.js +18 -0
- package/dist/codebase-scanner.js.map +1 -0
- package/dist/config.d.ts +1 -2
- package/dist/config.js +15 -37
- package/dist/config.js.map +1 -1
- package/dist/local-theme-source.d.ts +1 -0
- package/dist/local-theme-source.js +18 -0
- package/dist/local-theme-source.js.map +1 -0
- package/dist/main.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/mcp-client.d.ts +1 -0
- package/dist/mcp-client.js +18 -0
- package/dist/mcp-client.js.map +1 -0
- package/dist/prompts.d.ts +1 -7
- package/dist/prompts.js +15 -52
- package/dist/prompts.js.map +1 -1
- package/dist/server/index.d.ts +4 -0
- package/dist/server/index.js +163 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/prompts.d.ts +7 -0
- package/dist/server/prompts.js +55 -0
- package/dist/server/prompts.js.map +1 -0
- package/dist/server/tool-definitions.d.ts +22 -0
- package/dist/server/tool-definitions.js +531 -0
- package/dist/server/tool-definitions.js.map +1 -0
- package/dist/server.d.ts +3 -3
- package/dist/server.js +33 -0
- package/dist/server.js.map +1 -1
- package/dist/shared/config.d.ts +2 -0
- package/dist/shared/config.js +54 -0
- package/dist/shared/config.js.map +1 -0
- package/dist/shared/text.d.ts +14 -0
- package/dist/shared/text.js +33 -0
- package/dist/shared/text.js.map +1 -0
- package/dist/shared/types.d.ts +118 -0
- package/dist/shared/types.js +3 -0
- package/dist/shared/types.js.map +1 -0
- package/dist/shared/uri.d.ts +6 -0
- package/dist/shared/uri.js +24 -0
- package/dist/shared/uri.js.map +1 -0
- package/dist/style-recipes.d.ts +1 -0
- package/dist/style-recipes.js +18 -0
- package/dist/style-recipes.js.map +1 -0
- package/dist/text.d.ts +1 -14
- package/dist/text.js +15 -30
- package/dist/text.js.map +1 -1
- package/dist/theme/style-recipes.d.ts +26 -0
- package/dist/theme/style-recipes.js +129 -0
- package/dist/theme/style-recipes.js.map +1 -0
- package/dist/tool-definitions.d.ts +1 -11
- package/dist/tool-definitions.js +15 -127
- package/dist/tool-definitions.js.map +1 -1
- package/dist/types.d.ts +1 -106
- package/dist/types.js +15 -0
- package/dist/types.js.map +1 -1
- package/dist/uri.d.ts +1 -6
- package/dist/uri.js +15 -21
- package/dist/uri.js.map +1 -1
- package/package.json +5 -2
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rootConfigFiles = exports.backendRoots = exports.frontendRoots = exports.scannableFileNames = exports.scannableExtensions = exports.ignoredFileNames = exports.ignoredDirNames = exports.recipeGroups = exports.classTokenStopWords = exports.maxGraphRadius = exports.maxGraphEdgeLimit = exports.defaultGraphEdgeLimit = exports.maxGraphNodeLimit = exports.defaultGraphNodeLimit = exports.maxListLimit = exports.defaultListLimit = exports.readFileMaxBytes = exports.readFileDefaultBytes = exports.maxFileBytes = exports.maxAllowedFiles = exports.defaultMaxFiles = exports.defaultOutputDir = exports.recipeSchemaVersion = exports.indexSchemaVersion = exports.graphSchemaVersion = exports.bundleSchemaVersion = void 0;
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
exports.bundleSchemaVersion = 'scx.code.bundle.3';
|
|
6
|
+
exports.graphSchemaVersion = 'scx.code.graph.1';
|
|
7
|
+
exports.indexSchemaVersion = 'scx.code.index.1';
|
|
8
|
+
exports.recipeSchemaVersion = 'scx.code.recipe.4';
|
|
9
|
+
exports.defaultOutputDir = path.join('.schemyx', 'codebase');
|
|
10
|
+
exports.defaultMaxFiles = 250;
|
|
11
|
+
exports.maxAllowedFiles = 750;
|
|
12
|
+
exports.maxFileBytes = 350_000;
|
|
13
|
+
exports.readFileDefaultBytes = 40_000;
|
|
14
|
+
exports.readFileMaxBytes = 200_000;
|
|
15
|
+
exports.defaultListLimit = 10;
|
|
16
|
+
exports.maxListLimit = 50;
|
|
17
|
+
exports.defaultGraphNodeLimit = 100;
|
|
18
|
+
exports.maxGraphNodeLimit = 500;
|
|
19
|
+
exports.defaultGraphEdgeLimit = 200;
|
|
20
|
+
exports.maxGraphEdgeLimit = 1000;
|
|
21
|
+
exports.maxGraphRadius = 3;
|
|
22
|
+
exports.classTokenStopWords = new Set([
|
|
23
|
+
'a',
|
|
24
|
+
'an',
|
|
25
|
+
'and',
|
|
26
|
+
'are',
|
|
27
|
+
'as',
|
|
28
|
+
'at',
|
|
29
|
+
'for',
|
|
30
|
+
'from',
|
|
31
|
+
'in',
|
|
32
|
+
'is',
|
|
33
|
+
'it',
|
|
34
|
+
'of',
|
|
35
|
+
'on',
|
|
36
|
+
'or',
|
|
37
|
+
'our',
|
|
38
|
+
'that',
|
|
39
|
+
'the',
|
|
40
|
+
'their',
|
|
41
|
+
'this',
|
|
42
|
+
'to',
|
|
43
|
+
'we',
|
|
44
|
+
'with',
|
|
45
|
+
'you',
|
|
46
|
+
'your',
|
|
47
|
+
]);
|
|
48
|
+
exports.recipeGroups = [
|
|
49
|
+
'file',
|
|
50
|
+
'component',
|
|
51
|
+
'hook',
|
|
52
|
+
'route',
|
|
53
|
+
'api',
|
|
54
|
+
'controller',
|
|
55
|
+
'service',
|
|
56
|
+
'module',
|
|
57
|
+
'database',
|
|
58
|
+
'model',
|
|
59
|
+
'style',
|
|
60
|
+
'dependency',
|
|
61
|
+
'cluster',
|
|
62
|
+
'rule',
|
|
63
|
+
];
|
|
64
|
+
exports.ignoredDirNames = new Set([
|
|
65
|
+
'.cache',
|
|
66
|
+
'.git',
|
|
67
|
+
'.next',
|
|
68
|
+
'.nuxt',
|
|
69
|
+
'.output',
|
|
70
|
+
'.schemyx',
|
|
71
|
+
'.svelte-kit',
|
|
72
|
+
'.turbo',
|
|
73
|
+
'.vercel',
|
|
74
|
+
'build',
|
|
75
|
+
'coverage',
|
|
76
|
+
'dist',
|
|
77
|
+
'node_modules',
|
|
78
|
+
'out',
|
|
79
|
+
]);
|
|
80
|
+
exports.ignoredFileNames = new Set([
|
|
81
|
+
'.DS_Store',
|
|
82
|
+
'bun.lock',
|
|
83
|
+
'bun.lockb',
|
|
84
|
+
'package-lock.json',
|
|
85
|
+
'pnpm-lock.yaml',
|
|
86
|
+
'yarn.lock',
|
|
87
|
+
]);
|
|
88
|
+
exports.scannableExtensions = new Set([
|
|
89
|
+
'.astro',
|
|
90
|
+
'.cs',
|
|
91
|
+
'.css',
|
|
92
|
+
'.ejs',
|
|
93
|
+
'.erb',
|
|
94
|
+
'.go',
|
|
95
|
+
'.graphql',
|
|
96
|
+
'.hbs',
|
|
97
|
+
'.handlebars',
|
|
98
|
+
'.htm',
|
|
99
|
+
'.html',
|
|
100
|
+
'.java',
|
|
101
|
+
'.js',
|
|
102
|
+
'.jsx',
|
|
103
|
+
'.json',
|
|
104
|
+
'.kt',
|
|
105
|
+
'.kts',
|
|
106
|
+
'.liquid',
|
|
107
|
+
'.mjs',
|
|
108
|
+
'.cjs',
|
|
109
|
+
'.md',
|
|
110
|
+
'.mdx',
|
|
111
|
+
'.njk',
|
|
112
|
+
'.php',
|
|
113
|
+
'.phtml',
|
|
114
|
+
'.prisma',
|
|
115
|
+
'.pug',
|
|
116
|
+
'.py',
|
|
117
|
+
'.rb',
|
|
118
|
+
'.rs',
|
|
119
|
+
'.scss',
|
|
120
|
+
'.sql',
|
|
121
|
+
'.svelte',
|
|
122
|
+
'.toml',
|
|
123
|
+
'.ts',
|
|
124
|
+
'.tsx',
|
|
125
|
+
'.twig',
|
|
126
|
+
'.vue',
|
|
127
|
+
'.xml',
|
|
128
|
+
'.yaml',
|
|
129
|
+
'.yml',
|
|
130
|
+
]);
|
|
131
|
+
exports.scannableFileNames = new Set([
|
|
132
|
+
'Cargo.toml',
|
|
133
|
+
'Dockerfile',
|
|
134
|
+
'Gemfile',
|
|
135
|
+
'Makefile',
|
|
136
|
+
'Procfile',
|
|
137
|
+
'Rakefile',
|
|
138
|
+
'build.gradle',
|
|
139
|
+
'composer.json',
|
|
140
|
+
'components.json',
|
|
141
|
+
'docker-compose.yml',
|
|
142
|
+
'eslint.config.js',
|
|
143
|
+
'eslint.config.mjs',
|
|
144
|
+
'go.mod',
|
|
145
|
+
'mix.exs',
|
|
146
|
+
'next.config.js',
|
|
147
|
+
'next.config.mjs',
|
|
148
|
+
'next.config.ts',
|
|
149
|
+
'package.json',
|
|
150
|
+
'pom.xml',
|
|
151
|
+
'postcss.config.js',
|
|
152
|
+
'postcss.config.mjs',
|
|
153
|
+
'pyproject.toml',
|
|
154
|
+
'requirements.txt',
|
|
155
|
+
'settings.gradle',
|
|
156
|
+
'tailwind.config.js',
|
|
157
|
+
'tailwind.config.mjs',
|
|
158
|
+
'tailwind.config.ts',
|
|
159
|
+
'tsconfig.json',
|
|
160
|
+
'vite.config.js',
|
|
161
|
+
'vite.config.mjs',
|
|
162
|
+
'vite.config.ts',
|
|
163
|
+
]);
|
|
164
|
+
exports.frontendRoots = [
|
|
165
|
+
'app',
|
|
166
|
+
'assets',
|
|
167
|
+
'pages',
|
|
168
|
+
'components',
|
|
169
|
+
'frontend',
|
|
170
|
+
'public',
|
|
171
|
+
'resources/views',
|
|
172
|
+
'styles',
|
|
173
|
+
'templates',
|
|
174
|
+
'src/app',
|
|
175
|
+
'src/pages',
|
|
176
|
+
'src/components',
|
|
177
|
+
'src/styles',
|
|
178
|
+
'src/views',
|
|
179
|
+
'src/lib',
|
|
180
|
+
'static',
|
|
181
|
+
'views',
|
|
182
|
+
'web',
|
|
183
|
+
'lib',
|
|
184
|
+
];
|
|
185
|
+
exports.backendRoots = [
|
|
186
|
+
'api',
|
|
187
|
+
'app',
|
|
188
|
+
'app/Http/Controllers',
|
|
189
|
+
'controllers',
|
|
190
|
+
'cmd',
|
|
191
|
+
'config',
|
|
192
|
+
'database',
|
|
193
|
+
'db',
|
|
194
|
+
'internal',
|
|
195
|
+
'migrations',
|
|
196
|
+
'pkg',
|
|
197
|
+
'prisma',
|
|
198
|
+
'routes',
|
|
199
|
+
'server',
|
|
200
|
+
'services',
|
|
201
|
+
'src',
|
|
202
|
+
'src/api',
|
|
203
|
+
'src/controllers',
|
|
204
|
+
'src/routes',
|
|
205
|
+
'src/server',
|
|
206
|
+
'src/services',
|
|
207
|
+
];
|
|
208
|
+
exports.rootConfigFiles = [
|
|
209
|
+
'Cargo.toml',
|
|
210
|
+
'Gemfile',
|
|
211
|
+
'Makefile',
|
|
212
|
+
'Procfile',
|
|
213
|
+
'composer.json',
|
|
214
|
+
'components.json',
|
|
215
|
+
'docker-compose.yml',
|
|
216
|
+
'go.mod',
|
|
217
|
+
'next.config.js',
|
|
218
|
+
'next.config.mjs',
|
|
219
|
+
'next.config.ts',
|
|
220
|
+
'package.json',
|
|
221
|
+
'pyproject.toml',
|
|
222
|
+
'requirements.txt',
|
|
223
|
+
'tailwind.config.js',
|
|
224
|
+
'tailwind.config.mjs',
|
|
225
|
+
'tailwind.config.ts',
|
|
226
|
+
'tsconfig.json',
|
|
227
|
+
'vite.config.js',
|
|
228
|
+
'vite.config.mjs',
|
|
229
|
+
'vite.config.ts',
|
|
230
|
+
];
|
|
231
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/codebase-scanner/constants.ts"],"names":[],"mappings":";;;AAAA,kCAAkC;AAErB,QAAA,mBAAmB,GAAG,mBAAmB,CAAC;AAC1C,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AACxC,QAAA,kBAAkB,GAAG,kBAAkB,CAAC;AACxC,QAAA,mBAAmB,GAAG,mBAAmB,CAAC;AAC1C,QAAA,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,C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AW;IACX,gBAAgB;IAChB,YAAY;IACZ,WAAW;IACX,SAAS;IACT,QAAQ;IACR,OAAO;IACP,KAAK;IACL,KAAK;CACN,CAAC;AAEW,QAAA,YAAY,GAAG;IAC1B,KAAK;IACL,KAAK;IACL,sBAAsB;IACtB,aAAa;IACb,KAAK;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,UAAU;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,UAAU;IACV,KAAK;IACL,SAAS;IACT,iBAAiB;IACjB,YAAY;IACZ,YAAY;IACZ,cAAc;CACf,CAAC;AAEW,QAAA,eAAe,GAAG;IAC7B,YAAY;IACZ,SAAS;IACT,UAAU;IACV,UAAU;IACV,eAAe;IACf,iBAAiB;IACjB,oBAAoB;IACpB,QAAQ;IACR,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;IAChB,cAAc;IACd,gBAAgB;IAChB,kBAAkB;IAClB,oBAAoB;IACpB,qBAAqB;IACrB,oBAAoB;IACpB,eAAe;IACf,gBAAgB;IAChB,iBAAiB;IACjB,gBAAgB;CACjB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { DatabaseAccessContract, DatabaseAccessOperation, DatabaseEnumContract, DatabaseMigrationContract, DatabaseModelContract, DatabaseProvider } from './types';
|
|
2
|
+
export declare function extractDatabaseModels(relPath: string, content: string): DatabaseModelContract[];
|
|
3
|
+
export declare function extractDatabaseEnums(relPath: string, content: string): DatabaseEnumContract[];
|
|
4
|
+
export declare function extractDatabaseMigrations(relPath: string, content: string): DatabaseMigrationContract[];
|
|
5
|
+
export declare function extractDatabaseAccesses(relPath: string, content: string): DatabaseAccessContract[];
|
|
6
|
+
export declare function detectDatabaseProvider(relPath: string, content: string): DatabaseProvider;
|
|
7
|
+
export declare function databaseExtractorForFile(relPath: string, content: string): string;
|
|
8
|
+
export declare function databaseOperationToAccessOperation(method: string): DatabaseAccessOperation;
|