@j0hanz/filesystem-context-mcp 1.0.3 → 1.0.6
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 +27 -26
- package/dist/__tests__/lib/formatters.test.js +0 -3
- package/dist/__tests__/lib/formatters.test.js.map +1 -1
- package/dist/__tests__/lib/image-parsing.test.js +0 -3
- package/dist/__tests__/lib/image-parsing.test.js.map +1 -1
- package/dist/config/types.d.ts +0 -68
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js +0 -7
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +2 -17
- package/dist/index.js.map +1 -1
- package/dist/instructions.md +245 -0
- package/dist/lib/constants.d.ts +0 -8
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +14 -19
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +0 -12
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +50 -32
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-operations.d.ts.map +1 -1
- package/dist/lib/file-operations.js +50 -12
- package/dist/lib/file-operations.js.map +1 -1
- package/dist/lib/formatters.d.ts +0 -21
- package/dist/lib/formatters.d.ts.map +1 -1
- package/dist/lib/formatters.js +6 -32
- package/dist/lib/formatters.js.map +1 -1
- package/dist/lib/fs-helpers.d.ts +0 -4
- package/dist/lib/fs-helpers.d.ts.map +1 -1
- package/dist/lib/fs-helpers.js +24 -23
- package/dist/lib/fs-helpers.js.map +1 -1
- package/dist/lib/image-parsing.d.ts +0 -4
- package/dist/lib/image-parsing.d.ts.map +1 -1
- package/dist/lib/image-parsing.js +1 -4
- package/dist/lib/image-parsing.js.map +1 -1
- package/dist/lib/path-utils.d.ts +0 -10
- package/dist/lib/path-utils.d.ts.map +1 -1
- package/dist/lib/path-utils.js +1 -16
- package/dist/lib/path-utils.js.map +1 -1
- package/dist/lib/path-validation.d.ts +0 -18
- package/dist/lib/path-validation.d.ts.map +1 -1
- package/dist/lib/path-validation.js +3 -60
- package/dist/lib/path-validation.js.map +1 -1
- package/dist/prompts/analyze-codebase.d.ts +3 -0
- package/dist/prompts/analyze-codebase.d.ts.map +1 -0
- package/dist/prompts/analyze-codebase.js +58 -0
- package/dist/prompts/analyze-codebase.js.map +1 -0
- package/dist/prompts/filesystem-query.d.ts +3 -0
- package/dist/prompts/filesystem-query.d.ts.map +1 -0
- package/dist/prompts/filesystem-query.js +113 -0
- package/dist/prompts/filesystem-query.js.map +1 -0
- package/dist/prompts/find-duplicates.d.ts +3 -0
- package/dist/prompts/find-duplicates.d.ts.map +1 -0
- package/dist/prompts/find-duplicates.js +68 -0
- package/dist/prompts/find-duplicates.js.map +1 -0
- package/dist/prompts/index.d.ts +3 -0
- package/dist/prompts/index.d.ts.map +1 -0
- package/dist/prompts/index.js +13 -0
- package/dist/prompts/index.js.map +1 -0
- package/dist/prompts/project-overview.d.ts +3 -0
- package/dist/prompts/project-overview.d.ts.map +1 -0
- package/dist/prompts/project-overview.js +51 -0
- package/dist/prompts/project-overview.js.map +1 -0
- package/dist/prompts/search-and-replace.d.ts +3 -0
- package/dist/prompts/search-and-replace.d.ts.map +1 -0
- package/dist/prompts/search-and-replace.js +83 -0
- package/dist/prompts/search-and-replace.js.map +1 -0
- package/dist/schemas/common.d.ts +0 -4
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +10 -12
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/index.d.ts +0 -1
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +0 -3
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/inputs.d.ts +2 -2
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +15 -1
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/schemas/outputs.d.ts +4 -4
- package/dist/schemas/validators.js +2 -2
- package/dist/schemas/validators.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +15 -0
- package/dist/server.js.map +1 -1
- package/dist/tools/analyze-directory.d.ts.map +1 -1
- package/dist/tools/analyze-directory.js +1 -0
- package/dist/tools/analyze-directory.js.map +1 -1
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +1 -0
- package/dist/tools/directory-tree.js.map +1 -1
- package/dist/tools/get-file-info.d.ts.map +1 -1
- package/dist/tools/get-file-info.js +1 -0
- package/dist/tools/get-file-info.js.map +1 -1
- package/dist/tools/list-allowed-dirs.d.ts.map +1 -1
- package/dist/tools/list-allowed-dirs.js +1 -0
- package/dist/tools/list-allowed-dirs.js.map +1 -1
- package/dist/tools/list-directory.d.ts.map +1 -1
- package/dist/tools/list-directory.js +1 -0
- package/dist/tools/list-directory.js.map +1 -1
- package/dist/tools/read-file.d.ts.map +1 -1
- package/dist/tools/read-file.js +1 -0
- package/dist/tools/read-file.js.map +1 -1
- package/dist/tools/read-media-file.d.ts.map +1 -1
- package/dist/tools/read-media-file.js +1 -0
- package/dist/tools/read-media-file.js.map +1 -1
- package/dist/tools/read-multiple-files.d.ts.map +1 -1
- package/dist/tools/read-multiple-files.js +1 -0
- package/dist/tools/read-multiple-files.js.map +1 -1
- package/dist/tools/search-content.d.ts.map +1 -1
- package/dist/tools/search-content.js +1 -0
- package/dist/tools/search-content.js.map +1 -1
- package/dist/tools/search-files.d.ts.map +1 -1
- package/dist/tools/search-files.js +1 -0
- package/dist/tools/search-files.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
# Filesystem Context MCP Server
|
|
2
|
+
|
|
3
|
+
> **Read-only** filesystem tools for exploring directories, searching files, and analyzing codebases. All operations are safe and idempotent.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Tool Selection Guide
|
|
8
|
+
|
|
9
|
+
### Which Tool Should I Use?
|
|
10
|
+
|
|
11
|
+
| Goal | Tool | Key Parameters |
|
|
12
|
+
| --------------------------------- | -------------------------- | ------------------------------------------------- |
|
|
13
|
+
| See what directories I can access | `list_allowed_directories` | _(none)_ |
|
|
14
|
+
| Visualize project structure | `directory_tree` | `maxDepth`, `excludePatterns`, `includeSize` |
|
|
15
|
+
| List directory contents | `list_directory` | `recursive`, `sortBy`, `maxEntries` |
|
|
16
|
+
| Get directory statistics | `analyze_directory` | `topN`, `excludePatterns` |
|
|
17
|
+
| Find files by name/pattern | `search_files` | `pattern` (glob), `excludePatterns`, `maxResults` |
|
|
18
|
+
| Search inside file contents | `search_content` | `pattern` (regex), `filePattern`, `contextLines` |
|
|
19
|
+
| Read a single file | `read_file` | `head`, `tail`, `lineStart`/`lineEnd` |
|
|
20
|
+
| Read multiple files | `read_multiple_files` | `paths[]`, `head`, `tail` |
|
|
21
|
+
| Get file metadata | `get_file_info` | _(path only)_ |
|
|
22
|
+
| Read images/binary files | `read_media_file` | `maxSize` |
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Quick Start Workflow
|
|
27
|
+
|
|
28
|
+
**Always start here:**
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
1. list_allowed_directories → Know your boundaries
|
|
32
|
+
2. directory_tree(path, maxDepth=3) → See project structure
|
|
33
|
+
3. analyze_directory(path) → Get statistics
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Tool Reference
|
|
39
|
+
|
|
40
|
+
### `list_allowed_directories`
|
|
41
|
+
|
|
42
|
+
Returns all directories this server can access. **Call first** to understand scope.
|
|
43
|
+
|
|
44
|
+
### `directory_tree`
|
|
45
|
+
|
|
46
|
+
Returns a JSON tree structure—ideal for AI parsing.
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Default | Description |
|
|
49
|
+
| ----------------- | -------- | ------- | --------------------------- |
|
|
50
|
+
| `path` | string | — | Directory to visualize |
|
|
51
|
+
| `maxDepth` | number | 5 | How deep to traverse (0-50) |
|
|
52
|
+
| `excludePatterns` | string[] | [] | Glob patterns to skip |
|
|
53
|
+
| `includeHidden` | boolean | false | Include dotfiles |
|
|
54
|
+
| `includeSize` | boolean | false | Show file sizes |
|
|
55
|
+
| `maxFiles` | number | — | Limit total files returned |
|
|
56
|
+
|
|
57
|
+
**Example:** `directory_tree(path, maxDepth=3, excludePatterns=["node_modules", "dist"])`
|
|
58
|
+
|
|
59
|
+
### `list_directory`
|
|
60
|
+
|
|
61
|
+
Flat listing with metadata. Use for detailed file information.
|
|
62
|
+
|
|
63
|
+
| Parameter | Type | Default | Description |
|
|
64
|
+
| --------------- | ------- | ------- | ---------------------------------- |
|
|
65
|
+
| `path` | string | — | Directory to list |
|
|
66
|
+
| `recursive` | boolean | false | Include subdirectories |
|
|
67
|
+
| `sortBy` | enum | "name" | `name`, `size`, `modified`, `type` |
|
|
68
|
+
| `maxDepth` | number | 10 | Depth limit when recursive |
|
|
69
|
+
| `maxEntries` | number | — | Limit results (up to 100,000) |
|
|
70
|
+
| `includeHidden` | boolean | false | Include dotfiles |
|
|
71
|
+
|
|
72
|
+
### `analyze_directory`
|
|
73
|
+
|
|
74
|
+
Statistics: file counts, sizes, types, largest files, recent changes.
|
|
75
|
+
|
|
76
|
+
| Parameter | Type | Default | Description |
|
|
77
|
+
| ----------------- | -------- | ------- | ------------------------------ |
|
|
78
|
+
| `path` | string | — | Directory to analyze |
|
|
79
|
+
| `maxDepth` | number | 10 | How deep to analyze |
|
|
80
|
+
| `topN` | number | 10 | Number of largest/recent files |
|
|
81
|
+
| `excludePatterns` | string[] | [] | Patterns to skip |
|
|
82
|
+
| `includeHidden` | boolean | false | Include dotfiles |
|
|
83
|
+
|
|
84
|
+
### `search_files`
|
|
85
|
+
|
|
86
|
+
Find files by glob pattern. Returns paths, sizes, and modification dates.
|
|
87
|
+
|
|
88
|
+
| Parameter | Type | Default | Description |
|
|
89
|
+
| ----------------- | -------- | ------- | -------------------------------------- |
|
|
90
|
+
| `path` | string | — | Base directory |
|
|
91
|
+
| `pattern` | string | — | **Glob**: `**/*.ts`, `src/**/test*.js` |
|
|
92
|
+
| `excludePatterns` | string[] | [] | Patterns to skip |
|
|
93
|
+
| `maxResults` | number | — | Limit results (up to 10,000) |
|
|
94
|
+
| `maxDepth` | number | — | Depth limit |
|
|
95
|
+
| `sortBy` | enum | "path" | `name`, `size`, `modified`, `path` |
|
|
96
|
+
|
|
97
|
+
**Common patterns:**
|
|
98
|
+
|
|
99
|
+
- `**/*.ts` — All TypeScript files
|
|
100
|
+
- `src/**/*.{js,jsx}` — JS/JSX in src
|
|
101
|
+
- `**/test/**` — All test directories
|
|
102
|
+
- `**/*.test.ts` — Test files by convention
|
|
103
|
+
|
|
104
|
+
### `search_content`
|
|
105
|
+
|
|
106
|
+
Grep-like search inside files. Returns matching lines with context.
|
|
107
|
+
|
|
108
|
+
| Parameter | Type | Default | Description |
|
|
109
|
+
| ----------------- | -------- | ------- | --------------------------------------- |
|
|
110
|
+
| `path` | string | — | Base directory |
|
|
111
|
+
| `pattern` | string | — | **Regex**: `TODO\|FIXME`, `function\s+` |
|
|
112
|
+
| `filePattern` | string | `**/*` | Glob to filter files |
|
|
113
|
+
| `excludePatterns` | string[] | [] | Patterns to skip |
|
|
114
|
+
| `caseSensitive` | boolean | false | Case-sensitive matching |
|
|
115
|
+
| `wholeWord` | boolean | false | Match whole words only |
|
|
116
|
+
| `isLiteral` | boolean | false | Treat pattern as literal (not regex) |
|
|
117
|
+
| `contextLines` | number | 0 | Lines before/after match (0-10) |
|
|
118
|
+
| `maxResults` | number | 100 | Limit matches |
|
|
119
|
+
| `maxFilesScanned` | number | — | Limit files to scan |
|
|
120
|
+
| `maxFileSize` | number | 1MB | Skip files larger than this |
|
|
121
|
+
| `timeoutMs` | number | — | Operation timeout |
|
|
122
|
+
| `skipBinary` | boolean | true | Skip binary files |
|
|
123
|
+
|
|
124
|
+
**Example:** `search_content(path, pattern="export (function|class)", filePattern="**/*.ts", contextLines=2)`
|
|
125
|
+
|
|
126
|
+
### `read_file`
|
|
127
|
+
|
|
128
|
+
Read a single file with optional line selection.
|
|
129
|
+
|
|
130
|
+
| Parameter | Type | Default | Description |
|
|
131
|
+
| ----------- | ------ | ------- | ------------------------------------------- |
|
|
132
|
+
| `path` | string | — | File to read |
|
|
133
|
+
| `encoding` | enum | "utf-8" | `utf-8`, `ascii`, `base64`, `hex`, `latin1` |
|
|
134
|
+
| `maxSize` | number | 10MB | Maximum file size |
|
|
135
|
+
| `head` | number | — | Read first N lines only |
|
|
136
|
+
| `tail` | number | — | Read last N lines only |
|
|
137
|
+
| `lineStart` | number | — | Start line (1-indexed) |
|
|
138
|
+
| `lineEnd` | number | — | End line (inclusive) |
|
|
139
|
+
|
|
140
|
+
**⚠️ Cannot combine:** `head`/`tail` with `lineStart`/`lineEnd`
|
|
141
|
+
|
|
142
|
+
### `read_multiple_files`
|
|
143
|
+
|
|
144
|
+
**Preferred for 2+ files** — runs in parallel, individual failures don't block others.
|
|
145
|
+
|
|
146
|
+
| Parameter | Type | Default | Description |
|
|
147
|
+
| ---------- | -------- | ------- | ----------------------- |
|
|
148
|
+
| `paths` | string[] | — | Files to read (max 100) |
|
|
149
|
+
| `encoding` | enum | "utf-8" | Encoding for all files |
|
|
150
|
+
| `maxSize` | number | 10MB | Max size per file |
|
|
151
|
+
| `head` | number | — | First N lines from each |
|
|
152
|
+
| `tail` | number | — | Last N lines from each |
|
|
153
|
+
|
|
154
|
+
### `get_file_info`
|
|
155
|
+
|
|
156
|
+
Metadata only: size, timestamps, permissions, MIME type.
|
|
157
|
+
|
|
158
|
+
| Parameter | Type | Description |
|
|
159
|
+
| --------- | ------ | ----------------- |
|
|
160
|
+
| `path` | string | File or directory |
|
|
161
|
+
|
|
162
|
+
### `read_media_file`
|
|
163
|
+
|
|
164
|
+
Returns binary files as base64 with MIME type. Includes image dimensions.
|
|
165
|
+
|
|
166
|
+
| Parameter | Type | Default | Description |
|
|
167
|
+
| --------- | ------ | ------- | ------------------ |
|
|
168
|
+
| `path` | string | — | Path to media file |
|
|
169
|
+
| `maxSize` | number | 50MB | Maximum file size |
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
## Efficiency Best Practices
|
|
174
|
+
|
|
175
|
+
### ✅ Do
|
|
176
|
+
|
|
177
|
+
- **Batch reads**: Use `read_multiple_files` for 2+ files
|
|
178
|
+
- **Limit scope**: Always set `maxResults`, `maxDepth`, `maxEntries`
|
|
179
|
+
- **Exclude noise**: Use `excludePatterns=["node_modules", ".git", "dist"]`
|
|
180
|
+
- **Preview large files**: Use `head=50` or `tail=50` before full read
|
|
181
|
+
- **Search then read**: `search_files` → `read_multiple_files`
|
|
182
|
+
|
|
183
|
+
### ❌ Don't
|
|
184
|
+
|
|
185
|
+
- Call `read_file` in a loop — use `read_multiple_files`
|
|
186
|
+
- Use `recursive=true` without `maxDepth` on large directories
|
|
187
|
+
- Search with `maxResults` unset on large codebases
|
|
188
|
+
- Read entire large files when you only need a section
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Common Workflows
|
|
193
|
+
|
|
194
|
+
### Project Discovery
|
|
195
|
+
|
|
196
|
+
```text
|
|
197
|
+
list_allowed_directories
|
|
198
|
+
directory_tree(path, maxDepth=3, excludePatterns=["node_modules",".git"])
|
|
199
|
+
analyze_directory(path, excludePatterns=["node_modules"])
|
|
200
|
+
read_multiple_files([package.json, README.md, tsconfig.json])
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Find and Read Code
|
|
204
|
+
|
|
205
|
+
```text
|
|
206
|
+
search_files(path, pattern="**/*.service.ts")
|
|
207
|
+
read_multiple_files([...results])
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### Search Code Patterns
|
|
211
|
+
|
|
212
|
+
```text
|
|
213
|
+
search_content(path, pattern="async function", filePattern="**/*.ts", contextLines=2)
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
### Investigate Large Files
|
|
217
|
+
|
|
218
|
+
```text
|
|
219
|
+
analyze_directory(path) → See largestFiles
|
|
220
|
+
get_file_info(largefile) → Check exact size
|
|
221
|
+
read_file(largefile, head=100) → Preview beginning
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Error Recovery
|
|
227
|
+
|
|
228
|
+
| Error Code | Meaning | Solution |
|
|
229
|
+
| ------------------- | ----------------------------- | ------------------------------------------- |
|
|
230
|
+
| `E_ACCESS_DENIED` | Path outside allowed dirs | Run `list_allowed_directories` |
|
|
231
|
+
| `E_NOT_FOUND` | Path doesn't exist | Use `list_directory` to explore |
|
|
232
|
+
| `E_NOT_FILE` | Expected file, got directory | Use `list_directory` or `directory_tree` |
|
|
233
|
+
| `E_NOT_DIRECTORY` | Expected directory, got file | Use `read_file` or `get_file_info` |
|
|
234
|
+
| `E_TOO_LARGE` | File exceeds size limit | Use `head`/`tail` or increase `maxSize` |
|
|
235
|
+
| `E_BINARY_FILE` | Binary file in text operation | Use `read_media_file` instead |
|
|
236
|
+
| `E_TIMEOUT` | Operation too slow | Reduce `maxResults`, `maxDepth`, `maxFiles` |
|
|
237
|
+
| `E_INVALID_PATTERN` | Bad glob/regex syntax | Check pattern syntax |
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## Security Notes
|
|
242
|
+
|
|
243
|
+
- **Read-only**: No writes, deletes, or modifications possible
|
|
244
|
+
- **Path validation**: Symlinks cannot escape allowed directories
|
|
245
|
+
- **Binary detection**: Prevents accidental large base64 in text output
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -12,13 +12,5 @@ export declare const DEFAULT_TOP_N = 10;
|
|
|
12
12
|
export declare const DEFAULT_TREE_DEPTH = 5;
|
|
13
13
|
export declare const KNOWN_TEXT_EXTENSIONS: Set<string>;
|
|
14
14
|
export declare const KNOWN_BINARY_EXTENSIONS: Set<string>;
|
|
15
|
-
/**
|
|
16
|
-
* Get the MIME type for a file extension.
|
|
17
|
-
* Returns 'application/octet-stream' for unknown extensions.
|
|
18
|
-
*
|
|
19
|
-
* @param ext - File extension including the dot (e.g., '.png')
|
|
20
|
-
* @returns The MIME type string
|
|
21
|
-
*/
|
|
22
15
|
export declare function getMimeType(ext: string): string;
|
|
23
|
-
export declare const MIME_TYPES: Record<string, string>;
|
|
24
16
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAG3C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAG1C,eAAO,MAAM,wBAAwB,QAAc,CAAC;AACpD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AACpD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAG5C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAGpC,eAAO,MAAM,qBAAqB,aA+IhC,CAAC;AAGH,eAAO,MAAM,uBAAuB,aAwGlC,CAAC;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,yBAAyB,IAAI,CAAC;AAG3C,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAG1C,eAAO,MAAM,wBAAwB,QAAc,CAAC;AACpD,eAAO,MAAM,kBAAkB,QAAmB,CAAC;AACnD,eAAO,MAAM,mBAAmB,QAAmB,CAAC;AACpD,eAAO,MAAM,uBAAuB,MAAM,CAAC;AAC3C,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAG5C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAGpC,eAAO,MAAM,qBAAqB,aA+IhC,CAAC;AAGH,eAAO,MAAM,uBAAuB,aAwGlC,CAAC;AAGH,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM/C"}
|
package/dist/lib/constants.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
// Concurrency
|
|
1
|
+
// Concurrency Limits
|
|
2
2
|
export const PARALLEL_CONCURRENCY = 20;
|
|
3
3
|
export const DIR_TRAVERSAL_CONCURRENCY = 8;
|
|
4
|
-
// Timeout
|
|
5
|
-
export const REGEX_MATCH_TIMEOUT_MS = 100;
|
|
6
|
-
// Size
|
|
7
|
-
export const MAX_SEARCHABLE_FILE_SIZE = 1024 * 1024;
|
|
8
|
-
export const MAX_TEXT_FILE_SIZE = 10 * 1024 * 1024;
|
|
9
|
-
export const MAX_MEDIA_FILE_SIZE = 50 * 1024 * 1024;
|
|
4
|
+
// Timeout Limits (ms)
|
|
5
|
+
export const REGEX_MATCH_TIMEOUT_MS = 100;
|
|
6
|
+
// Size Limits (bytes)
|
|
7
|
+
export const MAX_SEARCHABLE_FILE_SIZE = 1024 * 1024;
|
|
8
|
+
export const MAX_TEXT_FILE_SIZE = 10 * 1024 * 1024;
|
|
9
|
+
export const MAX_MEDIA_FILE_SIZE = 50 * 1024 * 1024;
|
|
10
10
|
export const MAX_LINE_CONTENT_LENGTH = 200;
|
|
11
|
-
export const BINARY_CHECK_BUFFER_SIZE = 512;
|
|
12
|
-
// Default
|
|
11
|
+
export const BINARY_CHECK_BUFFER_SIZE = 512;
|
|
12
|
+
// Default Operation Limits
|
|
13
13
|
export const DEFAULT_MAX_DEPTH = 10;
|
|
14
14
|
export const DEFAULT_MAX_RESULTS = 100;
|
|
15
15
|
export const DEFAULT_TOP_N = 10;
|
|
@@ -265,18 +265,13 @@ export const KNOWN_BINARY_EXTENSIONS = new Set([
|
|
|
265
265
|
// Source maps (can be large and not useful for text search)
|
|
266
266
|
'.map',
|
|
267
267
|
]);
|
|
268
|
-
|
|
269
|
-
* Get the MIME type for a file extension.
|
|
270
|
-
* Returns 'application/octet-stream' for unknown extensions.
|
|
271
|
-
*
|
|
272
|
-
* @param ext - File extension including the dot (e.g., '.png')
|
|
273
|
-
* @returns The MIME type string
|
|
274
|
-
*/
|
|
268
|
+
// MIME type lookup
|
|
275
269
|
export function getMimeType(ext) {
|
|
276
|
-
|
|
270
|
+
const lowerExt = ext.toLowerCase();
|
|
271
|
+
return (MIME_TYPES[lowerExt] ??
|
|
272
|
+
'application/octet-stream');
|
|
277
273
|
}
|
|
278
|
-
|
|
279
|
-
export const MIME_TYPES = {
|
|
274
|
+
const MIME_TYPES = {
|
|
280
275
|
// Images
|
|
281
276
|
'.png': 'image/png',
|
|
282
277
|
'.jpg': 'image/jpeg',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../src/lib/constants.ts"],"names":[],"mappings":"AAAA,qBAAqB;AACrB,MAAM,CAAC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AACvC,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC;AAE3C,sBAAsB;AACtB,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAG,CAAC;AAE1C,sBAAsB;AACtB,MAAM,CAAC,MAAM,wBAAwB,GAAG,IAAI,GAAG,IAAI,CAAC;AACpD,MAAM,CAAC,MAAM,kBAA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7B,QAAQ;IACR,MAAM,EAAE,UAAU;IAClB,MAAM,EAAE,UAAU;IAClB,OAAO,EAAE,WAAW;IACpB,QAAQ,EAAE,YAAY;IACtB,QAAQ;IACR,OAAO,EAAE,kBAAkB;CACwB,CAAC"}
|
package/dist/lib/errors.d.ts
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structured error handling utilities for consistent error responses
|
|
3
|
-
*/
|
|
4
1
|
import { type DetailedError, ErrorCode, type ErrorResponse } from '../config/types.js';
|
|
5
2
|
export { ErrorCode };
|
|
6
3
|
export declare function isNodeError(error: unknown): error is NodeJS.ErrnoException;
|
|
@@ -13,17 +10,8 @@ export declare class McpError extends Error {
|
|
|
13
10
|
static fromError(code: ErrorCode, message: string, originalError: unknown, path?: string, details?: Record<string, unknown>): McpError;
|
|
14
11
|
}
|
|
15
12
|
export declare function classifyError(error: unknown): ErrorCode;
|
|
16
|
-
/**
|
|
17
|
-
* Create a detailed error object with suggestions
|
|
18
|
-
*/
|
|
19
13
|
export declare function createDetailedError(error: unknown, path?: string, additionalDetails?: Record<string, unknown>): DetailedError;
|
|
20
|
-
/**
|
|
21
|
-
* Format a detailed error for display
|
|
22
|
-
*/
|
|
23
14
|
export declare function formatDetailedError(error: DetailedError): string;
|
|
24
|
-
/**
|
|
25
|
-
* Get suggestion for an error code
|
|
26
|
-
*/
|
|
27
15
|
export declare function getSuggestion(code: ErrorCode): string;
|
|
28
16
|
export declare function createErrorResponse(error: unknown, defaultCode: ErrorCode, path?: string): ErrorResponse;
|
|
29
17
|
//# sourceMappingURL=errors.d.ts.map
|
package/dist/lib/errors.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EACL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SAAS,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ,aAAa,CAoBf"}
|
package/dist/lib/errors.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Structured error handling utilities for consistent error responses
|
|
3
|
-
*/
|
|
4
1
|
import { ErrorCode, } from '../config/types.js';
|
|
5
2
|
// Re-export ErrorCode from centralized location
|
|
6
3
|
export { ErrorCode };
|
|
@@ -27,6 +24,7 @@ export const NODE_ERROR_CODE_MAP = {
|
|
|
27
24
|
EEXIST: ErrorCode.E_INVALID_INPUT,
|
|
28
25
|
EINVAL: ErrorCode.E_INVALID_INPUT,
|
|
29
26
|
};
|
|
27
|
+
// Custom error class for MCP operations
|
|
30
28
|
export class McpError extends Error {
|
|
31
29
|
code;
|
|
32
30
|
path;
|
|
@@ -50,9 +48,7 @@ export class McpError extends Error {
|
|
|
50
48
|
return mcpError;
|
|
51
49
|
}
|
|
52
50
|
}
|
|
53
|
-
|
|
54
|
-
* Mapping of error codes to actionable suggestions for users
|
|
55
|
-
*/
|
|
51
|
+
// Error code to suggestion mapping
|
|
56
52
|
const ERROR_SUGGESTIONS = {
|
|
57
53
|
[ErrorCode.E_ACCESS_DENIED]: 'Check that the path is within an allowed directory. Use list_allowed_directories to see available paths.',
|
|
58
54
|
[ErrorCode.E_NOT_FOUND]: 'Verify the path exists. Use list_directory to explore available files and directories.',
|
|
@@ -83,6 +79,31 @@ export function classifyError(error) {
|
|
|
83
79
|
// 3. Message pattern matching (fallback for non-Node errors)
|
|
84
80
|
return classifyByMessage(error);
|
|
85
81
|
}
|
|
82
|
+
// Assertion function for exhaustive checks
|
|
83
|
+
function assertNever(value) {
|
|
84
|
+
throw new Error(`Unhandled discriminated union member: ${JSON.stringify(value)}`);
|
|
85
|
+
}
|
|
86
|
+
// Validate ErrorCode exhaustiveness at compile time
|
|
87
|
+
function validateErrorCode(code) {
|
|
88
|
+
switch (code) {
|
|
89
|
+
case ErrorCode.E_ACCESS_DENIED:
|
|
90
|
+
case ErrorCode.E_NOT_FOUND:
|
|
91
|
+
case ErrorCode.E_NOT_FILE:
|
|
92
|
+
case ErrorCode.E_NOT_DIRECTORY:
|
|
93
|
+
case ErrorCode.E_TOO_LARGE:
|
|
94
|
+
case ErrorCode.E_BINARY_FILE:
|
|
95
|
+
case ErrorCode.E_TIMEOUT:
|
|
96
|
+
case ErrorCode.E_INVALID_PATTERN:
|
|
97
|
+
case ErrorCode.E_INVALID_INPUT:
|
|
98
|
+
case ErrorCode.E_PERMISSION_DENIED:
|
|
99
|
+
case ErrorCode.E_SYMLINK_NOT_ALLOWED:
|
|
100
|
+
case ErrorCode.E_PATH_TRAVERSAL:
|
|
101
|
+
case ErrorCode.E_UNKNOWN:
|
|
102
|
+
return code;
|
|
103
|
+
default:
|
|
104
|
+
return assertNever(code);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
86
107
|
function classifyByMessage(error) {
|
|
87
108
|
const message = error instanceof Error ? error.message : String(error);
|
|
88
109
|
const lowerMessage = message.toLowerCase();
|
|
@@ -90,84 +111,83 @@ function classifyByMessage(error) {
|
|
|
90
111
|
if (lowerMessage.includes('not within allowed') ||
|
|
91
112
|
lowerMessage.includes('access denied') ||
|
|
92
113
|
lowerMessage.includes('outside allowed')) {
|
|
93
|
-
return ErrorCode.E_ACCESS_DENIED;
|
|
114
|
+
return validateErrorCode(ErrorCode.E_ACCESS_DENIED);
|
|
94
115
|
}
|
|
95
116
|
// Not found (including ENOENT message patterns)
|
|
96
117
|
if (lowerMessage.includes('not found') ||
|
|
97
118
|
lowerMessage.includes('does not exist') ||
|
|
98
119
|
lowerMessage.includes('enoent')) {
|
|
99
|
-
return ErrorCode.E_NOT_FOUND;
|
|
120
|
+
return validateErrorCode(ErrorCode.E_NOT_FOUND);
|
|
100
121
|
}
|
|
101
122
|
// Type mismatches
|
|
102
123
|
if (lowerMessage.includes('not a file') ||
|
|
103
124
|
lowerMessage.includes('is a directory')) {
|
|
104
|
-
return ErrorCode.E_NOT_FILE;
|
|
125
|
+
return validateErrorCode(ErrorCode.E_NOT_FILE);
|
|
105
126
|
}
|
|
106
127
|
if (lowerMessage.includes('not a directory')) {
|
|
107
|
-
return ErrorCode.E_NOT_DIRECTORY;
|
|
128
|
+
return validateErrorCode(ErrorCode.E_NOT_DIRECTORY);
|
|
108
129
|
}
|
|
109
130
|
// Size limits
|
|
110
131
|
if (lowerMessage.includes('too large') || lowerMessage.includes('exceeds')) {
|
|
111
|
-
return ErrorCode.E_TOO_LARGE;
|
|
132
|
+
return validateErrorCode(ErrorCode.E_TOO_LARGE);
|
|
112
133
|
}
|
|
113
134
|
// Binary file
|
|
114
135
|
if (lowerMessage.includes('binary')) {
|
|
115
|
-
return ErrorCode.E_BINARY_FILE;
|
|
136
|
+
return validateErrorCode(ErrorCode.E_BINARY_FILE);
|
|
116
137
|
}
|
|
117
138
|
// Timeout
|
|
118
139
|
if (lowerMessage.includes('timeout') || lowerMessage.includes('timed out')) {
|
|
119
|
-
return ErrorCode.E_TIMEOUT;
|
|
140
|
+
return validateErrorCode(ErrorCode.E_TIMEOUT);
|
|
120
141
|
}
|
|
121
142
|
// Invalid pattern
|
|
122
143
|
if (lowerMessage.includes('invalid') && lowerMessage.includes('pattern')) {
|
|
123
|
-
return ErrorCode.E_INVALID_PATTERN;
|
|
144
|
+
return validateErrorCode(ErrorCode.E_INVALID_PATTERN);
|
|
124
145
|
}
|
|
125
146
|
if (lowerMessage.includes('regex') || lowerMessage.includes('regexp')) {
|
|
126
|
-
return ErrorCode.E_INVALID_PATTERN;
|
|
147
|
+
return validateErrorCode(ErrorCode.E_INVALID_PATTERN);
|
|
127
148
|
}
|
|
128
149
|
// Invalid input
|
|
129
150
|
if (lowerMessage.includes('invalid') ||
|
|
130
151
|
lowerMessage.includes('cannot specify')) {
|
|
131
|
-
return ErrorCode.E_INVALID_INPUT;
|
|
152
|
+
return validateErrorCode(ErrorCode.E_INVALID_INPUT);
|
|
132
153
|
}
|
|
133
154
|
// Permission (when no error code available)
|
|
134
155
|
if (lowerMessage.includes('permission denied') ||
|
|
135
156
|
lowerMessage.includes('permission')) {
|
|
136
|
-
return ErrorCode.E_PERMISSION_DENIED;
|
|
157
|
+
return validateErrorCode(ErrorCode.E_PERMISSION_DENIED);
|
|
137
158
|
}
|
|
138
159
|
// Symlink
|
|
139
160
|
if (lowerMessage.includes('symlink')) {
|
|
140
|
-
return ErrorCode.E_SYMLINK_NOT_ALLOWED;
|
|
161
|
+
return validateErrorCode(ErrorCode.E_SYMLINK_NOT_ALLOWED);
|
|
141
162
|
}
|
|
142
163
|
// Path traversal
|
|
143
164
|
if (lowerMessage.includes('traversal')) {
|
|
144
|
-
return ErrorCode.E_PATH_TRAVERSAL;
|
|
165
|
+
return validateErrorCode(ErrorCode.E_PATH_TRAVERSAL);
|
|
145
166
|
}
|
|
146
|
-
return ErrorCode.E_UNKNOWN;
|
|
167
|
+
return validateErrorCode(ErrorCode.E_UNKNOWN);
|
|
147
168
|
}
|
|
148
|
-
|
|
149
|
-
* Create a detailed error object with suggestions
|
|
150
|
-
*/
|
|
169
|
+
// Create detailed error with suggestions
|
|
151
170
|
export function createDetailedError(error, path, additionalDetails) {
|
|
152
171
|
const message = error instanceof Error ? error.message : String(error);
|
|
153
172
|
const code = classifyError(error);
|
|
154
173
|
const suggestion = ERROR_SUGGESTIONS[code];
|
|
155
174
|
const effectivePath = path ?? (error instanceof McpError ? error.path : undefined);
|
|
175
|
+
// Merge details from McpError and additionalDetails
|
|
176
|
+
const mcpDetails = error instanceof McpError ? error.details : undefined;
|
|
156
177
|
const mergedDetails = {
|
|
157
|
-
...
|
|
158
|
-
...
|
|
178
|
+
...mcpDetails,
|
|
179
|
+
...additionalDetails,
|
|
159
180
|
};
|
|
181
|
+
const hasDetails = Object.keys(mergedDetails).length > 0;
|
|
160
182
|
return {
|
|
161
183
|
code,
|
|
162
184
|
message,
|
|
163
185
|
path: effectivePath,
|
|
164
186
|
suggestion,
|
|
165
|
-
details:
|
|
187
|
+
details: hasDetails ? mergedDetails : undefined,
|
|
166
188
|
};
|
|
167
189
|
}
|
|
168
|
-
|
|
169
|
-
* Format a detailed error for display
|
|
170
|
-
*/
|
|
190
|
+
// Format error for display
|
|
171
191
|
export function formatDetailedError(error) {
|
|
172
192
|
const lines = [`Error [${error.code}]: ${error.message}`];
|
|
173
193
|
if (error.path) {
|
|
@@ -178,12 +198,10 @@ export function formatDetailedError(error) {
|
|
|
178
198
|
}
|
|
179
199
|
return lines.join('\n');
|
|
180
200
|
}
|
|
181
|
-
/**
|
|
182
|
-
* Get suggestion for an error code
|
|
183
|
-
*/
|
|
184
201
|
export function getSuggestion(code) {
|
|
185
202
|
return ERROR_SUGGESTIONS[code];
|
|
186
203
|
}
|
|
204
|
+
// Create MCP-compatible error response
|
|
187
205
|
export function createErrorResponse(error, defaultCode, path) {
|
|
188
206
|
const detailed = createDetailedError(error, path);
|
|
189
207
|
// Use more specific code if classified, otherwise use default
|
package/dist/lib/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/lib/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,SAAS,GAEV,MAAM,oBAAoB,CAAC;AAE5B,gDAAgD;AAChD,OAAO,EAAE,SAAS,EAAE,CAAC;AAErB,wCAAwC;AACxC,MAAM,UAAU,WAAW,CAAC,KAAc;IACxC,OAAO,CACL,KAAK,YAAY,KAAK;QACtB,MAAM,IAAI,KAAK;QACf,OAAQ,KAA+B,CAAC,IAAI,KAAK,QAAQ,CAC1D,CAAC;AACJ,CAAC;AAED,mDAAmD;AACnD,MAAM,CAAC,MAAM,mBAAmB,GAAwC;IACtE,MAAM,EAAE,SAAS,CAAC,WAAW;IAC7B,MAAM,EAAE,SAAS,CAAC,mBAAmB;IACrC,KAAK,EAAE,SAAS,CAAC,mBAAm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mB,CACjC,KAAc,EACd,WAAsB,EACtB,IAAa;IAEb,MAAM,QAAQ,GAAG,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAClD,8DAA8D;IAC9D,MAAM,SAAS,GACb,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC;IACtE,QAAQ,CAAC,IAAI,GAAG,SAAS,CAAC;IAE1B,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,CAAC,QAAQ,CAAC,EAAE,CAAC;QAChE,iBAAiB,EAAE;YACjB,EAAE,EAAE,KAAK;YACT,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,OAAO,EAAE,QAAQ,CAAC,OAAO;gBACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,UAAU,EAAE,QAAQ,CAAC,UAAU;aAChC;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-operations.d.ts","sourceRoot":"","sources":["../../src/lib/file-operations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,sBAAsB,EAItB,mBAAmB,EACnB,QAAQ,EAER,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,oBAAoB,CAAC;AAe5B,OAAO,EAIL,QAAQ,EAET,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"file-operations.d.ts","sourceRoot":"","sources":["../../src/lib/file-operations.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EACV,sBAAsB,EAItB,mBAAmB,EACnB,QAAQ,EAER,mBAAmB,EACnB,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EAGlB,MAAM,oBAAoB,CAAC;AAe5B,OAAO,EAIL,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