@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.
@@ -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 === 'index_codebase' && args.force === true) {
15
+ if (toolName === "index_codebase" && args.force === true) {
16
16
  return {
17
17
  allowed: true,
18
- warnings: ['Force reindex will delete and rebuild the entire index. This may take several minutes.'],
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 === 'forget') {
23
+ if (toolName === "forget") {
22
24
  return {
23
25
  allowed: true,
24
- warnings: ['This will permanently delete a memory entry.'],
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 = ['search_codebase', 'hybrid_search', 'search_docs', 'find_feature', 'ask_codebase'];
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 === 'string' && query.trim().length < 3)) {
38
- return { allowed: false, reason: `${toolName} requires a query of at least 3 characters` };
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 === 'remember' && (!args.content || (typeof args.content === 'string' && args.content.trim().length < 10))) {
43
- return { allowed: false, reason: 'remember requires content of at least 10 characters' };
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 === 'string' && value !== value.trim()) {
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 === 'number' && modified.limit > 50) {
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.5.0",
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": {