sirius-framework-mcp 0.1.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/LICENSE +191 -0
- package/README.md +160 -0
- package/dist/grammars/tree-sitter-java.wasm +0 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +247 -0
- package/dist/index.js.map +1 -0
- package/dist/java-parser.d.ts +25 -0
- package/dist/java-parser.js +281 -0
- package/dist/java-parser.js.map +1 -0
- package/dist/prompts/index.d.ts +9 -0
- package/dist/prompts/index.js +15 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/workflows.d.ts +27 -0
- package/dist/prompts/workflows.js +317 -0
- package/dist/prompts/workflows.js.map +1 -0
- package/dist/resources/biz/analytics.md +157 -0
- package/dist/resources/biz/biz-controller.md +151 -0
- package/dist/resources/biz/codelists.md +154 -0
- package/dist/resources/biz/entity-triple.md +142 -0
- package/dist/resources/biz/importer.md +153 -0
- package/dist/resources/biz/isenguard.md +156 -0
- package/dist/resources/biz/jobs.md +145 -0
- package/dist/resources/biz/processes.md +155 -0
- package/dist/resources/biz/storage.md +149 -0
- package/dist/resources/biz/tenants.md +159 -0
- package/dist/resources/biz/testing.md +127 -0
- package/dist/resources/db/composites.md +145 -0
- package/dist/resources/db/entities.md +156 -0
- package/dist/resources/db/mixing.md +176 -0
- package/dist/resources/db/queries.md +178 -0
- package/dist/resources/db/refs.md +135 -0
- package/dist/resources/index.d.ts +27 -0
- package/dist/resources/index.js +68 -0
- package/dist/resources/index.js.map +1 -0
- package/dist/resources/kernel/async.md +189 -0
- package/dist/resources/kernel/commons.md +203 -0
- package/dist/resources/kernel/config.md +155 -0
- package/dist/resources/kernel/di.md +138 -0
- package/dist/resources/kernel/lifecycle.md +146 -0
- package/dist/resources/loader.d.ts +9 -0
- package/dist/resources/loader.js +17 -0
- package/dist/resources/loader.js.map +1 -0
- package/dist/resources/web/controllers.md +151 -0
- package/dist/resources/web/services.md +136 -0
- package/dist/resources/web/templates.md +162 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.js +3 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/introspection.d.ts +55 -0
- package/dist/tools/introspection.js +233 -0
- package/dist/tools/introspection.js.map +1 -0
- package/dist/tools/scaffold.d.ts +64 -0
- package/dist/tools/scaffold.js +505 -0
- package/dist/tools/scaffold.js.map +1 -0
- package/dist/workspace.d.ts +37 -0
- package/dist/workspace.js +185 -0
- package/dist/workspace.js.map +1 -0
- package/package.json +41 -0
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
import { Parser, Language } from "web-tree-sitter";
|
|
2
|
+
import { join, dirname } from "path";
|
|
3
|
+
import { fileURLToPath } from "url";
|
|
4
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
5
|
+
let parser = null;
|
|
6
|
+
async function getParser() {
|
|
7
|
+
if (parser)
|
|
8
|
+
return parser;
|
|
9
|
+
await Parser.init();
|
|
10
|
+
parser = new Parser();
|
|
11
|
+
const wasmPath = join(__dirname, "grammars", "tree-sitter-java.wasm");
|
|
12
|
+
const Java = await Language.load(wasmPath);
|
|
13
|
+
parser.setLanguage(Java);
|
|
14
|
+
return parser;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Extract the text content of a string_literal node, stripping surrounding quotes.
|
|
18
|
+
*/
|
|
19
|
+
function extractStringLiteral(node) {
|
|
20
|
+
const fragment = node.children.find((c) => c.type === "string_fragment");
|
|
21
|
+
if (fragment)
|
|
22
|
+
return fragment.text;
|
|
23
|
+
// Fallback: strip quotes from the raw text
|
|
24
|
+
const text = node.text;
|
|
25
|
+
if (text.startsWith('"') && text.endsWith('"')) {
|
|
26
|
+
return text.slice(1, -1);
|
|
27
|
+
}
|
|
28
|
+
return text;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Parse an annotation node and return an AnnotationInfo.
|
|
32
|
+
* Handles both `annotation` (with args) and `marker_annotation` (no args).
|
|
33
|
+
*/
|
|
34
|
+
function parseAnnotation(node) {
|
|
35
|
+
const args = {};
|
|
36
|
+
if (node.type === "marker_annotation") {
|
|
37
|
+
const nameNode = node.children.find((c) => c.type === "identifier");
|
|
38
|
+
return { name: nameNode?.text ?? "", args };
|
|
39
|
+
}
|
|
40
|
+
// annotation type
|
|
41
|
+
const nameNode = node.children.find((c) => c.type === "identifier");
|
|
42
|
+
const name = nameNode?.text ?? "";
|
|
43
|
+
const argList = node.children.find((c) => c.type === "annotation_argument_list");
|
|
44
|
+
if (argList) {
|
|
45
|
+
for (const child of argList.children) {
|
|
46
|
+
if (child.type === "element_value_pair") {
|
|
47
|
+
const key = child.children.find((c) => c.type === "identifier");
|
|
48
|
+
const value = child.children.find((c) => c.type === "string_literal");
|
|
49
|
+
if (key && value) {
|
|
50
|
+
args[key.text] = extractStringLiteral(value);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
else if (child.type === "string_literal") {
|
|
54
|
+
// Single unnamed string argument, store as "value"
|
|
55
|
+
args["value"] = extractStringLiteral(child);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
return { name, args };
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Extract the base type name from a type node, stripping generic type arguments.
|
|
63
|
+
* e.g., `SQLTenantAware<X, Y>` -> `SQLTenantAware`
|
|
64
|
+
*/
|
|
65
|
+
function extractBaseTypeName(node) {
|
|
66
|
+
if (node.type === "generic_type") {
|
|
67
|
+
const typeId = node.children.find((c) => c.type === "type_identifier");
|
|
68
|
+
return typeId?.text ?? node.text;
|
|
69
|
+
}
|
|
70
|
+
if (node.type === "type_identifier") {
|
|
71
|
+
return node.text;
|
|
72
|
+
}
|
|
73
|
+
return node.text;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Extract annotations from a modifiers node.
|
|
77
|
+
*/
|
|
78
|
+
function extractAnnotations(modifiersNode) {
|
|
79
|
+
const annotations = [];
|
|
80
|
+
for (const child of modifiersNode.children) {
|
|
81
|
+
if (child.type === "annotation" || child.type === "marker_annotation") {
|
|
82
|
+
annotations.push(parseAnnotation(child));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return annotations;
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Extract just the annotation names from a modifiers node.
|
|
89
|
+
*/
|
|
90
|
+
function extractAnnotationNames(modifiersNode) {
|
|
91
|
+
const names = [];
|
|
92
|
+
for (const child of modifiersNode.children) {
|
|
93
|
+
if (child.type === "annotation") {
|
|
94
|
+
const nameNode = child.children.find((c) => c.type === "identifier");
|
|
95
|
+
if (nameNode)
|
|
96
|
+
names.push(nameNode.text);
|
|
97
|
+
}
|
|
98
|
+
else if (child.type === "marker_annotation") {
|
|
99
|
+
const nameNode = child.children.find((c) => c.type === "identifier");
|
|
100
|
+
if (nameNode)
|
|
101
|
+
names.push(nameNode.text);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return names;
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Check if a field declaration is a Mapping.named() constant.
|
|
108
|
+
* Returns the constant name if it is, null otherwise.
|
|
109
|
+
*/
|
|
110
|
+
function extractMappingConstant(fieldNode) {
|
|
111
|
+
const declarator = fieldNode.children.find((c) => c.type === "variable_declarator");
|
|
112
|
+
if (!declarator)
|
|
113
|
+
return null;
|
|
114
|
+
const initializer = declarator.children.find((c) => c.type === "method_invocation");
|
|
115
|
+
if (!initializer)
|
|
116
|
+
return null;
|
|
117
|
+
// Check if the method invocation is Mapping.named(...)
|
|
118
|
+
if (initializer.text.startsWith("Mapping.named(")) {
|
|
119
|
+
const nameNode = declarator.children.find((c) => c.type === "identifier");
|
|
120
|
+
return nameNode?.text ?? null;
|
|
121
|
+
}
|
|
122
|
+
return null;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Extract route info from a method declaration node.
|
|
126
|
+
*/
|
|
127
|
+
function extractRouteInfo(methodNode) {
|
|
128
|
+
const modifiers = methodNode.children.find((c) => c.type === "modifiers");
|
|
129
|
+
if (!modifiers)
|
|
130
|
+
return null;
|
|
131
|
+
const annotations = extractAnnotations(modifiers);
|
|
132
|
+
const routedAnnotation = annotations.find((a) => a.name === "Routed");
|
|
133
|
+
if (!routedAnnotation)
|
|
134
|
+
return null;
|
|
135
|
+
const path = routedAnnotation.args["value"] ?? "";
|
|
136
|
+
const loginRequired = annotations.some((a) => a.name === "LoginRequired");
|
|
137
|
+
const permissions = annotations
|
|
138
|
+
.filter((a) => a.name === "Permission")
|
|
139
|
+
.map((a) => a.args["value"] ?? "")
|
|
140
|
+
.filter((p) => p !== "");
|
|
141
|
+
const methodNameNode = methodNode.children.find((c) => c.type === "identifier");
|
|
142
|
+
const methodName = methodNameNode?.text ?? "";
|
|
143
|
+
return { path, permissions, loginRequired, methodName };
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
* Extract field info from a field_declaration node.
|
|
147
|
+
* Skips Mapping constants (those are extracted separately).
|
|
148
|
+
*/
|
|
149
|
+
function extractFieldInfo(fieldNode) {
|
|
150
|
+
// Skip Mapping constants
|
|
151
|
+
if (extractMappingConstant(fieldNode) !== null)
|
|
152
|
+
return null;
|
|
153
|
+
const modifiers = fieldNode.children.find((c) => c.type === "modifiers");
|
|
154
|
+
const annotationNames = modifiers ? extractAnnotationNames(modifiers) : [];
|
|
155
|
+
// Get field type
|
|
156
|
+
const typeNode = fieldNode.children.find((c) => c.type === "type_identifier" ||
|
|
157
|
+
c.type === "generic_type" ||
|
|
158
|
+
c.type === "integral_type" ||
|
|
159
|
+
c.type === "floating_point_type" ||
|
|
160
|
+
c.type === "boolean_type" ||
|
|
161
|
+
c.type === "void_type" ||
|
|
162
|
+
c.type === "array_type");
|
|
163
|
+
const type = typeNode?.text ?? "unknown";
|
|
164
|
+
// Get field name
|
|
165
|
+
const declarator = fieldNode.children.find((c) => c.type === "variable_declarator");
|
|
166
|
+
const nameNode = declarator?.children.find((c) => c.type === "identifier");
|
|
167
|
+
const name = nameNode?.text ?? "";
|
|
168
|
+
if (!name)
|
|
169
|
+
return null;
|
|
170
|
+
return { name, type, annotations: annotationNames };
|
|
171
|
+
}
|
|
172
|
+
export async function parseJavaFile(source) {
|
|
173
|
+
const p = await getParser();
|
|
174
|
+
const tree = p.parse(source);
|
|
175
|
+
if (!tree) {
|
|
176
|
+
return { packageName: "", className: "", superClass: null, interfaces: [], annotations: [], mappings: [], routes: [], fields: [] };
|
|
177
|
+
}
|
|
178
|
+
const root = tree.rootNode;
|
|
179
|
+
// Extract package name
|
|
180
|
+
let packageName = "";
|
|
181
|
+
const pkgDecl = root.children.find((c) => c.type === "package_declaration");
|
|
182
|
+
if (pkgDecl) {
|
|
183
|
+
const scopedId = pkgDecl.children.find((c) => c.type === "scoped_identifier" || c.type === "identifier");
|
|
184
|
+
if (scopedId)
|
|
185
|
+
packageName = scopedId.text;
|
|
186
|
+
}
|
|
187
|
+
// Find the first class declaration
|
|
188
|
+
const classDecl = root.children.find((c) => c.type === "class_declaration");
|
|
189
|
+
if (!classDecl) {
|
|
190
|
+
return {
|
|
191
|
+
packageName,
|
|
192
|
+
className: "",
|
|
193
|
+
superClass: null,
|
|
194
|
+
interfaces: [],
|
|
195
|
+
annotations: [],
|
|
196
|
+
mappings: [],
|
|
197
|
+
routes: [],
|
|
198
|
+
fields: [],
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
// Extract class name
|
|
202
|
+
const classNameNode = classDecl.children.find((c) => c.type === "identifier");
|
|
203
|
+
const className = classNameNode?.text ?? "";
|
|
204
|
+
// Extract superclass
|
|
205
|
+
let superClass = null;
|
|
206
|
+
const superclassNode = classDecl.childForFieldName("superclass");
|
|
207
|
+
if (superclassNode) {
|
|
208
|
+
// The superclass node contains "extends TypeName"
|
|
209
|
+
// Find the type inside it
|
|
210
|
+
const typeNode = superclassNode.children.find((c) => c.type === "type_identifier" ||
|
|
211
|
+
c.type === "generic_type");
|
|
212
|
+
if (typeNode) {
|
|
213
|
+
superClass = extractBaseTypeName(typeNode);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
// Extract interfaces
|
|
217
|
+
const interfaces = [];
|
|
218
|
+
const interfacesNode = classDecl.childForFieldName("interfaces");
|
|
219
|
+
if (interfacesNode) {
|
|
220
|
+
for (const child of interfacesNode.children) {
|
|
221
|
+
if (child.type === "type_identifier" ||
|
|
222
|
+
child.type === "generic_type") {
|
|
223
|
+
interfaces.push(extractBaseTypeName(child));
|
|
224
|
+
}
|
|
225
|
+
else if (child.type === "type_list") {
|
|
226
|
+
for (const typeChild of child.children) {
|
|
227
|
+
if (typeChild.type === "type_identifier" ||
|
|
228
|
+
typeChild.type === "generic_type") {
|
|
229
|
+
interfaces.push(extractBaseTypeName(typeChild));
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
// Extract class-level annotations
|
|
236
|
+
const modifiersNode = classDecl.children.find((c) => c.type === "modifiers");
|
|
237
|
+
const annotations = modifiersNode
|
|
238
|
+
? extractAnnotations(modifiersNode)
|
|
239
|
+
: [];
|
|
240
|
+
// Extract class body contents
|
|
241
|
+
const classBody = classDecl.children.find((c) => c.type === "class_body");
|
|
242
|
+
const mappings = [];
|
|
243
|
+
const routes = [];
|
|
244
|
+
const fields = [];
|
|
245
|
+
if (classBody) {
|
|
246
|
+
for (const member of classBody.children) {
|
|
247
|
+
if (member.type === "field_declaration") {
|
|
248
|
+
// Check for Mapping constant
|
|
249
|
+
const mappingName = extractMappingConstant(member);
|
|
250
|
+
if (mappingName) {
|
|
251
|
+
mappings.push(mappingName);
|
|
252
|
+
}
|
|
253
|
+
else {
|
|
254
|
+
// Regular field
|
|
255
|
+
const fieldInfo = extractFieldInfo(member);
|
|
256
|
+
if (fieldInfo) {
|
|
257
|
+
fields.push(fieldInfo);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
else if (member.type === "method_declaration") {
|
|
262
|
+
// Check for route
|
|
263
|
+
const routeInfo = extractRouteInfo(member);
|
|
264
|
+
if (routeInfo) {
|
|
265
|
+
routes.push(routeInfo);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
return {
|
|
271
|
+
packageName,
|
|
272
|
+
className,
|
|
273
|
+
superClass,
|
|
274
|
+
interfaces,
|
|
275
|
+
annotations,
|
|
276
|
+
mappings,
|
|
277
|
+
routes,
|
|
278
|
+
fields,
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
//# sourceMappingURL=java-parser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"java-parser.js","sourceRoot":"","sources":["../src/java-parser.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAsB,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,MAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAyB1D,IAAI,MAAM,GAAkB,IAAI,CAAC;AAEjC,KAAK,UAAU,SAAS;IACtB,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC;IACpB,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC;IACtB,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,EAAE,UAAU,EAAE,uBAAuB,CAAC,CAAC;IACtE,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC3C,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IACzB,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;GAEG;AACH,SAAS,oBAAoB,CAAC,IAAgB;I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
3
|
+
* development workflows.
|
|
4
|
+
*/
|
|
5
|
+
export type { McpPrompt } from "./workflows.js";
|
|
6
|
+
import { addEntityPrompt, addJobPrompt, addFeaturePrompt, addImportHandlerPrompt, debugFrameworkFlagsPrompt } from "./workflows.js";
|
|
7
|
+
export { addEntityPrompt, addJobPrompt, addFeaturePrompt, addImportHandlerPrompt, debugFrameworkFlagsPrompt, };
|
|
8
|
+
/** All available MCP prompts. */
|
|
9
|
+
export declare const allPrompts: import("./workflows.js").McpPrompt[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP prompts module -- pre-built conversation starters for common Sirius
|
|
3
|
+
* development workflows.
|
|
4
|
+
*/
|
|
5
|
+
import { addEntityPrompt, addJobPrompt, addFeaturePrompt, addImportHandlerPrompt, debugFrameworkFlagsPrompt, } from "./workflows.js";
|
|
6
|
+
export { addEntityPrompt, addJobPrompt, addFeaturePrompt, addImportHandlerPrompt, debugFrameworkFlagsPrompt, };
|
|
7
|
+
/** All available MCP prompts. */
|
|
8
|
+
export const allPrompts = [
|
|
9
|
+
addEntityPrompt,
|
|
10
|
+
addJobPrompt,
|
|
11
|
+
addFeaturePrompt,
|
|
12
|
+
addImportHandlerPrompt,
|
|
13
|
+
debugFrameworkFlagsPrompt,
|
|
14
|
+
];
|
|
15
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,GAC1B,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,GAC1B,CAAC;AAEF,iCAAiC;AACjC,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,eAAe;IACf,YAAY;IACZ,gBAAgB;IAChB,sBAAsB;IACtB,yBAAyB;CAC1B,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* MCP prompt definitions for common Sirius development workflows.
|
|
3
|
+
*
|
|
4
|
+
* Each prompt generates an initial conversation that guides an AI assistant
|
|
5
|
+
* through a specific Sirius framework task.
|
|
6
|
+
*/
|
|
7
|
+
export interface McpPrompt {
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
arguments: Array<{
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
required: boolean;
|
|
14
|
+
}>;
|
|
15
|
+
generateMessages: (args: Record<string, string>) => Array<{
|
|
16
|
+
role: "user" | "assistant";
|
|
17
|
+
content: {
|
|
18
|
+
type: "text";
|
|
19
|
+
text: string;
|
|
20
|
+
};
|
|
21
|
+
}>;
|
|
22
|
+
}
|
|
23
|
+
export declare const addEntityPrompt: McpPrompt;
|
|
24
|
+
export declare const addJobPrompt: McpPrompt;
|
|
25
|
+
export declare const addFeaturePrompt: McpPrompt;
|
|
26
|
+
export declare const addImportHandlerPrompt: McpPrompt;
|
|
27
|
+
export declare const debugFrameworkFlagsPrompt: McpPrompt;
|