@mandujs/mcp 0.18.5 → 0.18.7
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/package.json +2 -2
- package/src/tools/guard.ts +18 -7
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mandujs/mcp",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "Mandu MCP Server - Agent-native interface for Mandu framework operations",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./src/index.ts",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@mandujs/core": "^0.18.
|
|
35
|
+
"@mandujs/core": "^0.18.14",
|
|
36
36
|
"@mandujs/ate": "^0.17.0",
|
|
37
37
|
"@modelcontextprotocol/sdk": "^1.25.3"
|
|
38
38
|
},
|
package/src/tools/guard.ts
CHANGED
|
@@ -280,23 +280,31 @@ export const guardToolDefinitions: Tool[] = [
|
|
|
280
280
|
"Negotiate with the framework before implementing a feature. " +
|
|
281
281
|
"Describes your intent and gets back the recommended project structure, " +
|
|
282
282
|
"file templates, and related architecture decisions. " +
|
|
283
|
-
"Use this BEFORE writing code to ensure architectural consistency."
|
|
283
|
+
"Use this BEFORE writing code to ensure architectural consistency. " +
|
|
284
|
+
"IMPORTANT: Always provide 'featureName' as a short English slug (e.g., 'chat', 'user-auth', 'payment'). " +
|
|
285
|
+
"Even if the user speaks Korean, YOU must translate the feature name to English.",
|
|
284
286
|
inputSchema: {
|
|
285
287
|
type: "object",
|
|
286
288
|
properties: {
|
|
287
289
|
intent: {
|
|
288
290
|
type: "string",
|
|
289
|
-
description: "What you want to implement (e.g., '사용자 인증 기능 추가', 'Add payment integration')",
|
|
291
|
+
description: "What you want to implement, in any language (e.g., '사용자 인증 기능 추가', 'Add payment integration')",
|
|
292
|
+
},
|
|
293
|
+
featureName: {
|
|
294
|
+
type: "string",
|
|
295
|
+
description: "REQUIRED: Short English slug for the feature name (e.g., 'chat', 'user-auth', 'payment', 'file-upload'). " +
|
|
296
|
+
"You MUST translate the user's intent to a concise English identifier. " +
|
|
297
|
+
"Use lowercase kebab-case. This becomes the directory/module name.",
|
|
290
298
|
},
|
|
291
299
|
requirements: {
|
|
292
300
|
type: "array",
|
|
293
301
|
items: { type: "string" },
|
|
294
|
-
description: "Specific requirements (e.g., ['JWT
|
|
302
|
+
description: "Specific requirements (e.g., ['JWT-based', 'OAuth support'])",
|
|
295
303
|
},
|
|
296
304
|
constraints: {
|
|
297
305
|
type: "array",
|
|
298
306
|
items: { type: "string" },
|
|
299
|
-
description: "Constraints to respect (e.g., ['
|
|
307
|
+
description: "Constraints to respect (e.g., ['use existing User model', 'Redis sessions'])",
|
|
300
308
|
},
|
|
301
309
|
category: {
|
|
302
310
|
type: "string",
|
|
@@ -976,8 +984,9 @@ Mandu.filling()
|
|
|
976
984
|
// ═══════════════════════════════════════════════════════════════════════════
|
|
977
985
|
|
|
978
986
|
mandu_negotiate: async (args: Record<string, unknown>) => {
|
|
979
|
-
const { intent, requirements, constraints, category, preset } = args as {
|
|
987
|
+
const { intent, featureName, requirements, constraints, category, preset } = args as {
|
|
980
988
|
intent: string;
|
|
989
|
+
featureName?: string;
|
|
981
990
|
requirements?: string[];
|
|
982
991
|
constraints?: string[];
|
|
983
992
|
category?: FeatureCategory;
|
|
@@ -993,6 +1002,7 @@ Mandu.filling()
|
|
|
993
1002
|
|
|
994
1003
|
const request: NegotiationRequest = {
|
|
995
1004
|
intent,
|
|
1005
|
+
featureName,
|
|
996
1006
|
requirements,
|
|
997
1007
|
constraints,
|
|
998
1008
|
category,
|
|
@@ -1041,8 +1051,9 @@ Mandu.filling()
|
|
|
1041
1051
|
},
|
|
1042
1052
|
|
|
1043
1053
|
mandu_generate_scaffold: async (args: Record<string, unknown>) => {
|
|
1044
|
-
const { intent, category, dryRun = false, overwrite = false, preset } = args as {
|
|
1054
|
+
const { intent, featureName, category, dryRun = false, overwrite = false, preset } = args as {
|
|
1045
1055
|
intent: string;
|
|
1056
|
+
featureName?: string;
|
|
1046
1057
|
category?: FeatureCategory;
|
|
1047
1058
|
dryRun?: boolean;
|
|
1048
1059
|
overwrite?: boolean;
|
|
@@ -1057,7 +1068,7 @@ Mandu.filling()
|
|
|
1057
1068
|
}
|
|
1058
1069
|
|
|
1059
1070
|
// 먼저 협상하여 구조 계획 얻기
|
|
1060
|
-
const plan = await negotiate({ intent, category, preset }, projectRoot);
|
|
1071
|
+
const plan = await negotiate({ intent, featureName, category, preset }, projectRoot);
|
|
1061
1072
|
|
|
1062
1073
|
if (!plan.approved) {
|
|
1063
1074
|
return {
|