@crowley/rag-mcp 1.5.0 → 1.6.1
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/dist/__tests__/tool-middleware.test.js +51 -51
- package/dist/__tests__/tools/memory.test.js +78 -63
- package/dist/api-client.d.ts +49 -2
- package/dist/api-client.js +139 -7
- package/dist/connection-pool.d.ts +15 -0
- package/dist/connection-pool.js +24 -0
- package/dist/context-enrichment.js +5 -3
- package/dist/formatters.js +12 -8
- package/dist/http-transport.d.ts +15 -0
- package/dist/http-transport.js +109 -0
- package/dist/index.js +27 -4
- package/dist/schemas.js +3 -12
- package/dist/tool-middleware.js +13 -8
- package/dist/tool-registry.js +11 -4
- package/dist/tools/advanced.js +64 -19
- package/dist/tools/agents.js +42 -13
- package/dist/tools/analytics.js +17 -5
- package/dist/tools/architecture.js +115 -31
- package/dist/tools/ask.js +23 -8
- package/dist/tools/cache.js +12 -3
- package/dist/tools/clustering.js +53 -17
- package/dist/tools/confluence.js +26 -8
- package/dist/tools/database.js +87 -24
- package/dist/tools/feedback.js +22 -6
- package/dist/tools/guidelines.js +15 -2
- package/dist/tools/indexing.js +34 -8
- package/dist/tools/memory.js +199 -39
- package/dist/tools/pm.js +38 -11
- package/dist/tools/quality.js +7 -2
- package/dist/tools/review.js +25 -7
- package/dist/tools/search.js +92 -31
- package/dist/tools/session.js +58 -26
- package/dist/tools/suggestions.js +75 -22
- package/dist/types.d.ts +2 -2
- package/dist/validation-hooks.js +27 -11
- package/package.json +2 -2
package/dist/validation-hooks.js
CHANGED
|
@@ -12,16 +12,18 @@
|
|
|
12
12
|
* Blocks: index_codebase with force=true, forget (memory deletion).
|
|
13
13
|
*/
|
|
14
14
|
export const destructiveGuard = (toolName, args) => {
|
|
15
|
-
if (toolName ===
|
|
15
|
+
if (toolName === "index_codebase" && args.force === true) {
|
|
16
16
|
return {
|
|
17
17
|
allowed: true,
|
|
18
|
-
warnings: [
|
|
18
|
+
warnings: [
|
|
19
|
+
"Force reindex will delete and rebuild the entire index. This may take several minutes.",
|
|
20
|
+
],
|
|
19
21
|
};
|
|
20
22
|
}
|
|
21
|
-
if (toolName ===
|
|
23
|
+
if (toolName === "forget") {
|
|
22
24
|
return {
|
|
23
25
|
allowed: true,
|
|
24
|
-
warnings: [
|
|
26
|
+
warnings: ["This will permanently delete a memory entry."],
|
|
25
27
|
};
|
|
26
28
|
}
|
|
27
29
|
return { allowed: true };
|
|
@@ -31,16 +33,30 @@ export const destructiveGuard = (toolName, args) => {
|
|
|
31
33
|
*/
|
|
32
34
|
export const requiredFieldsValidator = (toolName, args) => {
|
|
33
35
|
// Search tools must have a query
|
|
34
|
-
const searchTools = [
|
|
36
|
+
const searchTools = [
|
|
37
|
+
"search_codebase",
|
|
38
|
+
"hybrid_search",
|
|
39
|
+
"search_docs",
|
|
40
|
+
"find_feature",
|
|
41
|
+
"ask_codebase",
|
|
42
|
+
];
|
|
35
43
|
if (searchTools.includes(toolName)) {
|
|
36
44
|
const query = args.query || args.question;
|
|
37
|
-
if (!query || (typeof query ===
|
|
38
|
-
return {
|
|
45
|
+
if (!query || (typeof query === "string" && query.trim().length < 3)) {
|
|
46
|
+
return {
|
|
47
|
+
allowed: false,
|
|
48
|
+
reason: `${toolName} requires a query of at least 3 characters`,
|
|
49
|
+
};
|
|
39
50
|
}
|
|
40
51
|
}
|
|
41
52
|
// Memory tools must have content
|
|
42
|
-
if (toolName ===
|
|
43
|
-
|
|
53
|
+
if (toolName === "remember" &&
|
|
54
|
+
(!args.content ||
|
|
55
|
+
(typeof args.content === "string" && args.content.trim().length < 10))) {
|
|
56
|
+
return {
|
|
57
|
+
allowed: false,
|
|
58
|
+
reason: "remember requires content of at least 10 characters",
|
|
59
|
+
};
|
|
44
60
|
}
|
|
45
61
|
return { allowed: true };
|
|
46
62
|
};
|
|
@@ -52,13 +68,13 @@ export const inputSanitizer = (toolName, args) => {
|
|
|
52
68
|
let changed = false;
|
|
53
69
|
// Trim string values
|
|
54
70
|
for (const [key, value] of Object.entries(modified)) {
|
|
55
|
-
if (typeof value ===
|
|
71
|
+
if (typeof value === "string" && value !== value.trim()) {
|
|
56
72
|
modified[key] = value.trim();
|
|
57
73
|
changed = true;
|
|
58
74
|
}
|
|
59
75
|
}
|
|
60
76
|
// Cap limit params to prevent excessive results
|
|
61
|
-
if (typeof modified.limit ===
|
|
77
|
+
if (typeof modified.limit === "number" && modified.limit > 50) {
|
|
62
78
|
modified.limit = 50;
|
|
63
79
|
changed = true;
|
|
64
80
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@crowley/rag-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.1",
|
|
4
4
|
"description": "Universal RAG MCP Server for any project",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@modelcontextprotocol/sdk": "^1.0.0",
|
|
36
|
-
"axios": "^1.6.0",
|
|
37
36
|
"glob": "^11.0.0",
|
|
37
|
+
"undici": "^7.24.6",
|
|
38
38
|
"zod": "^4.0.0"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|