@j0hanz/filesystem-context-mcp 1.3.0 → 1.3.2
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 +251 -504
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js +1 -1
- package/dist/__tests__/lib/file-operations/search-content-edge-cases.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts +2 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js +43 -0
- package/dist/__tests__/lib/file-operations/search-definitions-helpers.test.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts +7 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.d.ts.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js +113 -0
- package/dist/__tests__/lib/file-operations/search-definitions.fixtures.js.map +1 -0
- package/dist/__tests__/lib/file-operations/search-definitions.test.js +1 -112
- package/dist/__tests__/lib/file-operations/search-definitions.test.js.map +1 -1
- package/dist/__tests__/lib/file-operations/sorting.test.js +15 -40
- package/dist/__tests__/lib/file-operations/sorting.test.js.map +1 -1
- package/dist/__tests__/lib/path-validation-errors.test.js +1 -1
- package/dist/__tests__/lib/path-validation-errors.test.js.map +1 -1
- package/dist/__tests__/lib/path-validation.test.js +17 -0
- package/dist/__tests__/lib/path-validation.test.js.map +1 -1
- package/dist/config/formatting.d.ts +14 -0
- package/dist/config/formatting.d.ts.map +1 -0
- package/dist/config/formatting.js +34 -0
- package/dist/config/formatting.js.map +1 -0
- package/dist/config/types.d.ts +3 -97
- package/dist/config/types.d.ts.map +1 -1
- package/dist/config/types.js.map +1 -1
- package/dist/index.js +32 -2
- package/dist/index.js.map +1 -1
- package/dist/instructions.md +151 -170
- package/dist/lib/constants.d.ts +1 -5
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +19 -15
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/errors.d.ts +0 -2
- package/dist/lib/errors.d.ts.map +1 -1
- package/dist/lib/errors.js +2 -30
- package/dist/lib/errors.js.map +1 -1
- package/dist/lib/file-operations/analyze-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/analyze-directory.js +8 -1
- package/dist/lib/file-operations/analyze-directory.js.map +1 -1
- package/dist/lib/file-operations/batch-results.d.ts +2 -1
- package/dist/lib/file-operations/batch-results.d.ts.map +1 -1
- package/dist/lib/file-operations/compute-checksums.d.ts +1 -0
- package/dist/lib/file-operations/compute-checksums.d.ts.map +1 -1
- package/dist/lib/file-operations/compute-checksums.js +58 -45
- package/dist/lib/file-operations/compute-checksums.js.map +1 -1
- package/dist/lib/file-operations/directory-tree-builders.d.ts +7 -0
- package/dist/lib/file-operations/directory-tree-builders.d.ts.map +1 -0
- package/dist/lib/file-operations/directory-tree-builders.js +58 -0
- package/dist/lib/file-operations/directory-tree-builders.js.map +1 -0
- package/dist/lib/file-operations/directory-tree-helpers.d.ts +0 -5
- package/dist/lib/file-operations/directory-tree-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree-helpers.js +21 -71
- package/dist/lib/file-operations/directory-tree-helpers.js.map +1 -1
- package/dist/lib/file-operations/directory-tree.d.ts.map +1 -1
- package/dist/lib/file-operations/directory-tree.js +2 -1
- package/dist/lib/file-operations/directory-tree.js.map +1 -1
- package/dist/lib/file-operations/file-info.d.ts +3 -1
- package/dist/lib/file-operations/file-info.d.ts.map +1 -1
- package/dist/lib/file-operations/file-info.js +16 -5
- package/dist/lib/file-operations/file-info.js.map +1 -1
- package/dist/lib/file-operations/get-multiple-file-info.d.ts +1 -1
- package/dist/lib/file-operations/get-multiple-file-info.d.ts.map +1 -1
- package/dist/lib/file-operations/get-multiple-file-info.js +6 -8
- package/dist/lib/file-operations/get-multiple-file-info.js.map +1 -1
- package/dist/lib/file-operations/list-directory-entry.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory-entry.js +5 -2
- package/dist/lib/file-operations/list-directory-entry.js.map +1 -1
- package/dist/lib/file-operations/list-directory-helpers.d.ts +10 -1
- package/dist/lib/file-operations/list-directory-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory-helpers.js +51 -31
- package/dist/lib/file-operations/list-directory-helpers.js.map +1 -1
- package/dist/lib/file-operations/list-directory.d.ts +1 -0
- package/dist/lib/file-operations/list-directory.d.ts.map +1 -1
- package/dist/lib/file-operations/list-directory.js +13 -4
- package/dist/lib/file-operations/list-directory.js.map +1 -1
- package/dist/lib/file-operations/read-media-file.d.ts.map +1 -1
- package/dist/lib/file-operations/read-media-file.js +5 -1
- package/dist/lib/file-operations/read-media-file.js.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.d.ts +8 -0
- package/dist/lib/file-operations/read-multiple-files.d.ts.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.js +47 -18
- package/dist/lib/file-operations/read-multiple-files.js.map +1 -1
- package/dist/lib/file-operations/search/context-manager.d.ts +2 -0
- package/dist/lib/file-operations/search/context-manager.d.ts.map +1 -1
- package/dist/lib/file-operations/search/context-manager.js +22 -8
- package/dist/lib/file-operations/search/context-manager.js.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts +1 -1
- package/dist/lib/file-operations/search/engine-stream.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine-stream.js +102 -9
- package/dist/lib/file-operations/search/engine-stream.js.map +1 -1
- package/dist/lib/file-operations/search/engine.d.ts.map +1 -1
- package/dist/lib/file-operations/search/engine.js +42 -5
- package/dist/lib/file-operations/search/engine.js.map +1 -1
- package/dist/lib/file-operations/search/file-processor.d.ts.map +1 -1
- package/dist/lib/file-operations/search/file-processor.js +102 -55
- package/dist/lib/file-operations/search/file-processor.js.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.d.ts.map +1 -1
- package/dist/lib/file-operations/search/match-strategy.js +2 -1
- package/dist/lib/file-operations/search/match-strategy.js.map +1 -1
- package/dist/lib/file-operations/search/types.d.ts +3 -0
- package/dist/lib/file-operations/search/types.d.ts.map +1 -1
- package/dist/lib/file-operations/search-definitions/matchers.d.ts +12 -0
- package/dist/lib/file-operations/search-definitions/matchers.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/matchers.js +122 -0
- package/dist/lib/file-operations/search-definitions/matchers.js.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts +14 -0
- package/dist/lib/file-operations/search-definitions/patterns.d.ts.map +1 -0
- package/dist/lib/file-operations/search-definitions/patterns.js +83 -0
- package/dist/lib/file-operations/search-definitions/patterns.js.map +1 -0
- package/dist/lib/file-operations/search-definitions.d.ts.map +1 -1
- package/dist/lib/file-operations/search-definitions.js +3 -208
- package/dist/lib/file-operations/search-definitions.js.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.d.ts +2 -2
- package/dist/lib/file-operations/search-files-helpers.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files-helpers.js +102 -14
- package/dist/lib/file-operations/search-files-helpers.js.map +1 -1
- package/dist/lib/file-operations/search-files-options.d.ts +4 -2
- package/dist/lib/file-operations/search-files-options.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files-options.js.map +1 -1
- package/dist/lib/file-operations/search-files.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files.js +7 -2
- package/dist/lib/file-operations/search-files.js.map +1 -1
- package/dist/lib/file-operations/sorting.d.ts.map +1 -1
- package/dist/lib/file-operations/sorting.js +39 -14
- package/dist/lib/file-operations/sorting.js.map +1 -1
- package/dist/lib/file-operations.d.ts +0 -5
- package/dist/lib/file-operations.d.ts.map +1 -1
- package/dist/lib/file-operations.js +0 -5
- package/dist/lib/file-operations.js.map +1 -1
- package/dist/lib/fs-helpers/abort.d.ts +3 -0
- package/dist/lib/fs-helpers/abort.d.ts.map +1 -0
- package/dist/lib/fs-helpers/abort.js +15 -0
- package/dist/lib/fs-helpers/abort.js.map +1 -0
- package/dist/lib/fs-helpers/concurrency.d.ts +1 -1
- package/dist/lib/fs-helpers/concurrency.d.ts.map +1 -1
- package/dist/lib/fs-helpers/concurrency.js +54 -6
- package/dist/lib/fs-helpers/concurrency.js.map +1 -1
- package/dist/lib/fs-helpers/readers/head-file.d.ts +1 -1
- package/dist/lib/fs-helpers/readers/head-file.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/head-file.js +7 -4
- package/dist/lib/fs-helpers/readers/head-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/line-range.d.ts +1 -1
- package/dist/lib/fs-helpers/readers/line-range.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/line-range.js +17 -3
- package/dist/lib/fs-helpers/readers/line-range.js.map +1 -1
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts +2 -0
- package/dist/lib/fs-helpers/readers/read-buffer.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js +64 -0
- package/dist/lib/fs-helpers/readers/read-buffer.js.map +1 -0
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts +11 -1
- package/dist/lib/fs-helpers/readers/read-file-content.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/read-file-content.js +33 -9
- package/dist/lib/fs-helpers/readers/read-file-content.js.map +1 -1
- package/dist/lib/fs-helpers/readers/read-file.d.ts +11 -0
- package/dist/lib/fs-helpers/readers/read-file.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/read-file.js +52 -15
- package/dist/lib/fs-helpers/readers/read-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.d.ts +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers/tail-file.js +7 -4
- package/dist/lib/fs-helpers/readers/tail-file.js.map +1 -1
- package/dist/lib/fs-helpers/readers.d.ts +1 -1
- package/dist/lib/fs-helpers/readers.d.ts.map +1 -1
- package/dist/lib/fs-helpers/readers.js +1 -1
- package/dist/lib/fs-helpers/readers.js.map +1 -1
- package/dist/lib/fs-helpers.d.ts +1 -1
- package/dist/lib/fs-helpers.d.ts.map +1 -1
- package/dist/lib/fs-helpers.js +1 -1
- package/dist/lib/fs-helpers.js.map +1 -1
- package/dist/lib/path-utils.d.ts +1 -0
- package/dist/lib/path-utils.d.ts.map +1 -1
- package/dist/lib/path-utils.js +12 -0
- package/dist/lib/path-utils.js.map +1 -1
- package/dist/lib/path-validation/allowed-directories.d.ts.map +1 -1
- package/dist/lib/path-validation/allowed-directories.js +2 -9
- package/dist/lib/path-validation/allowed-directories.js.map +1 -1
- package/dist/lib/path-validation/errors.js +2 -2
- package/dist/lib/path-validation/errors.js.map +1 -1
- package/dist/lib/path-validation/validators.d.ts.map +1 -1
- package/dist/lib/path-validation/validators.js +3 -1
- package/dist/lib/path-validation/validators.js.map +1 -1
- package/dist/schemas/common.d.ts +0 -18
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/common.js +0 -10
- package/dist/schemas/common.js.map +1 -1
- package/dist/schemas/index.d.ts +2 -2
- package/dist/schemas/index.d.ts.map +1 -1
- package/dist/schemas/index.js +2 -2
- package/dist/schemas/index.js.map +1 -1
- package/dist/schemas/input-helpers.d.ts +1 -4
- package/dist/schemas/input-helpers.d.ts.map +1 -1
- package/dist/schemas/input-helpers.js +9 -33
- package/dist/schemas/input-helpers.js.map +1 -1
- package/dist/schemas/inputs/checksums.d.ts +0 -2
- package/dist/schemas/inputs/checksums.d.ts.map +1 -1
- package/dist/schemas/inputs/checksums.js +2 -7
- package/dist/schemas/inputs/checksums.js.map +1 -1
- package/dist/schemas/inputs/directory.d.ts +0 -16
- package/dist/schemas/inputs/directory.d.ts.map +1 -1
- package/dist/schemas/inputs/directory.js +2 -44
- package/dist/schemas/inputs/directory.js.map +1 -1
- package/dist/schemas/inputs/read.d.ts +0 -4
- package/dist/schemas/inputs/read.d.ts.map +1 -1
- package/dist/schemas/inputs/read.js +0 -15
- package/dist/schemas/inputs/read.js.map +1 -1
- package/dist/schemas/inputs/search.d.ts +1 -12
- package/dist/schemas/inputs/search.d.ts.map +1 -1
- package/dist/schemas/inputs/search.js +4 -30
- package/dist/schemas/inputs/search.js.map +1 -1
- package/dist/schemas/inputs.d.ts +3 -4
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +3 -4
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/schemas/output-helpers.d.ts +59 -0
- package/dist/schemas/output-helpers.d.ts.map +1 -1
- package/dist/schemas/output-helpers.js +31 -0
- package/dist/schemas/output-helpers.js.map +1 -1
- package/dist/schemas/outputs/checksums.d.ts +4 -4
- package/dist/schemas/outputs/checksums.d.ts.map +1 -1
- package/dist/schemas/outputs/checksums.js +2 -7
- package/dist/schemas/outputs/checksums.js.map +1 -1
- package/dist/schemas/outputs/directory.d.ts +68 -230
- package/dist/schemas/outputs/directory.d.ts.map +1 -1
- package/dist/schemas/outputs/directory.js +14 -32
- package/dist/schemas/outputs/directory.js.map +1 -1
- package/dist/schemas/outputs/file-info.d.ts +14 -14
- package/dist/schemas/outputs/file-info.d.ts.map +1 -1
- package/dist/schemas/outputs/file-info.js +4 -31
- package/dist/schemas/outputs/file-info.js.map +1 -1
- package/dist/schemas/outputs/read.d.ts +141 -46
- package/dist/schemas/outputs/read.d.ts.map +1 -1
- package/dist/schemas/outputs/read.js +35 -12
- package/dist/schemas/outputs/read.js.map +1 -1
- package/dist/schemas/outputs/search.d.ts +134 -124
- package/dist/schemas/outputs/search.d.ts.map +1 -1
- package/dist/schemas/outputs/search.js +33 -35
- package/dist/schemas/outputs/search.js.map +1 -1
- package/dist/schemas/outputs.d.ts +3 -4
- package/dist/schemas/outputs.d.ts.map +1 -1
- package/dist/schemas/outputs.js +3 -4
- package/dist/schemas/outputs.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +4 -1
- package/dist/server.js.map +1 -1
- package/dist/tools/analyze-directory.d.ts.map +1 -1
- package/dist/tools/analyze-directory.js +26 -28
- package/dist/tools/analyze-directory.js.map +1 -1
- package/dist/tools/compute-checksums.d.ts.map +1 -1
- package/dist/tools/compute-checksums.js +13 -21
- package/dist/tools/compute-checksums.js.map +1 -1
- package/dist/tools/directory-tree.d.ts.map +1 -1
- package/dist/tools/directory-tree.js +11 -9
- 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 +8 -44
- package/dist/tools/get-file-info.js.map +1 -1
- package/dist/tools/get-multiple-file-info.d.ts.map +1 -1
- package/dist/tools/get-multiple-file-info.js +13 -55
- package/dist/tools/get-multiple-file-info.js.map +1 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +0 -10
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/list-allowed-dirs.d.ts.map +1 -1
- package/dist/tools/list-allowed-dirs.js +37 -31
- 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 +83 -83
- 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 +66 -43
- 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 +8 -6
- 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 +64 -25
- 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 +14 -16
- package/dist/tools/search-content.js.map +1 -1
- package/dist/tools/search-definitions.d.ts.map +1 -1
- package/dist/tools/search-definitions.js +11 -8
- package/dist/tools/search-definitions.js.map +1 -1
- package/dist/tools/search-files.d.ts.map +1 -1
- package/dist/tools/search-files.js +61 -45
- package/dist/tools/search-files.js.map +1 -1
- package/dist/tools/shared/abort.d.ts +5 -0
- package/dist/tools/shared/abort.d.ts.map +1 -0
- package/dist/tools/shared/abort.js +41 -0
- package/dist/tools/shared/abort.js.map +1 -0
- package/dist/tools/shared/file-info.d.ts +17 -0
- package/dist/tools/shared/file-info.d.ts.map +1 -0
- package/dist/tools/shared/file-info.js +40 -0
- package/dist/tools/shared/file-info.js.map +1 -0
- package/dist/tools/shared/formatting.d.ts +5 -0
- package/dist/tools/shared/formatting.d.ts.map +1 -1
- package/dist/tools/shared/formatting.js +21 -1
- package/dist/tools/shared/formatting.js.map +1 -1
- package/dist/tools/shared/read-range.d.ts +7 -0
- package/dist/tools/shared/read-range.d.ts.map +1 -0
- package/dist/tools/shared/read-range.js +22 -0
- package/dist/tools/shared/read-range.js.map +1 -0
- package/dist/tools/shared/search-formatting.d.ts.map +1 -1
- package/dist/tools/shared/search-formatting.js +53 -28
- package/dist/tools/shared/search-formatting.js.map +1 -1
- package/dist/tools/tool-response.d.ts +22 -0
- package/dist/tools/tool-response.d.ts.map +1 -1
- package/dist/tools/tool-response.js +30 -0
- package/dist/tools/tool-response.js.map +1 -1
- package/package.json +2 -1
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import * as pathModule from 'node:path';
|
|
2
|
-
import { formatOperationSummary } from '
|
|
2
|
+
import { formatOperationSummary, joinLines } from '../../config/formatting.js';
|
|
3
3
|
const LINE_NUMBER_PAD_WIDTH = 4;
|
|
4
|
+
function normalizeMatches(result) {
|
|
5
|
+
const normalized = result.matches.map((match, index) => ({
|
|
6
|
+
...match,
|
|
7
|
+
relativeFile: pathModule.relative(result.basePath, match.file),
|
|
8
|
+
index,
|
|
9
|
+
}));
|
|
10
|
+
normalized.sort((a, b) => {
|
|
11
|
+
const fileCompare = a.relativeFile.localeCompare(b.relativeFile);
|
|
12
|
+
if (fileCompare !== 0)
|
|
13
|
+
return fileCompare;
|
|
14
|
+
if (a.line !== b.line)
|
|
15
|
+
return a.line - b.line;
|
|
16
|
+
return a.index - b.index;
|
|
17
|
+
});
|
|
18
|
+
return normalized;
|
|
19
|
+
}
|
|
4
20
|
function groupMatchesByFile(matches) {
|
|
5
21
|
const byFile = new Map();
|
|
6
22
|
for (const match of matches) {
|
|
7
|
-
const list = byFile.get(match.
|
|
23
|
+
const list = byFile.get(match.relativeFile) ?? [];
|
|
8
24
|
list.push(match);
|
|
9
|
-
byFile.set(match.
|
|
25
|
+
byFile.set(match.relativeFile, list);
|
|
10
26
|
}
|
|
11
27
|
return byFile;
|
|
12
28
|
}
|
|
@@ -38,22 +54,24 @@ function formatFileMatches(file, matches) {
|
|
|
38
54
|
}
|
|
39
55
|
function formatContentMatches(matches) {
|
|
40
56
|
if (matches.length === 0)
|
|
41
|
-
return 'No matches
|
|
57
|
+
return 'No matches';
|
|
42
58
|
const byFile = groupMatchesByFile(matches);
|
|
43
|
-
const lines = [`Found ${matches.length}
|
|
59
|
+
const lines = [`Found ${matches.length}:`];
|
|
44
60
|
for (const [file, fileMatches] of byFile) {
|
|
45
61
|
lines.push(...formatFileMatches(file, fileMatches));
|
|
46
62
|
}
|
|
47
|
-
return lines
|
|
63
|
+
return joinLines(lines);
|
|
48
64
|
}
|
|
49
65
|
export function buildStructuredResult(result) {
|
|
66
|
+
const { basePath, pattern, filePattern, summary } = result;
|
|
67
|
+
const normalizedMatches = normalizeMatches(result);
|
|
50
68
|
return {
|
|
51
69
|
ok: true,
|
|
52
|
-
basePath
|
|
53
|
-
pattern
|
|
54
|
-
filePattern
|
|
55
|
-
matches:
|
|
56
|
-
file:
|
|
70
|
+
basePath,
|
|
71
|
+
pattern,
|
|
72
|
+
filePattern,
|
|
73
|
+
matches: normalizedMatches.map((m) => ({
|
|
74
|
+
file: m.relativeFile,
|
|
57
75
|
line: m.line,
|
|
58
76
|
content: m.content,
|
|
59
77
|
contextBefore: m.contextBefore,
|
|
@@ -61,15 +79,15 @@ export function buildStructuredResult(result) {
|
|
|
61
79
|
matchCount: m.matchCount,
|
|
62
80
|
})),
|
|
63
81
|
summary: {
|
|
64
|
-
filesScanned:
|
|
65
|
-
filesMatched:
|
|
66
|
-
totalMatches:
|
|
67
|
-
truncated:
|
|
68
|
-
skippedTooLarge:
|
|
69
|
-
skippedBinary:
|
|
70
|
-
skippedInaccessible:
|
|
71
|
-
linesSkippedDueToRegexTimeout:
|
|
72
|
-
stoppedReason:
|
|
82
|
+
filesScanned: summary.filesScanned,
|
|
83
|
+
filesMatched: summary.filesMatched,
|
|
84
|
+
totalMatches: summary.matches,
|
|
85
|
+
truncated: summary.truncated,
|
|
86
|
+
skippedTooLarge: summary.skippedTooLarge || undefined,
|
|
87
|
+
skippedBinary: summary.skippedBinary || undefined,
|
|
88
|
+
skippedInaccessible: summary.skippedInaccessible || undefined,
|
|
89
|
+
linesSkippedDueToRegexTimeout: summary.linesSkippedDueToRegexTimeout || undefined,
|
|
90
|
+
stoppedReason: summary.stoppedReason,
|
|
73
91
|
},
|
|
74
92
|
};
|
|
75
93
|
}
|
|
@@ -95,19 +113,26 @@ function buildTruncationInfo(result) {
|
|
|
95
113
|
return {};
|
|
96
114
|
}
|
|
97
115
|
export function buildTextResult(result) {
|
|
116
|
+
const { summary } = result;
|
|
98
117
|
const { truncatedReason, tip } = buildTruncationInfo(result);
|
|
99
|
-
|
|
118
|
+
const header = joinLines([
|
|
119
|
+
`Base path: ${result.basePath}`,
|
|
120
|
+
`Pattern: ${result.pattern}`,
|
|
121
|
+
`File pattern: ${result.filePattern}`,
|
|
122
|
+
]);
|
|
123
|
+
const normalizedMatches = normalizeMatches(result);
|
|
124
|
+
let textOutput = joinLines([header, formatContentMatches(normalizedMatches)]);
|
|
100
125
|
textOutput += formatOperationSummary({
|
|
101
|
-
truncated:
|
|
126
|
+
truncated: summary.truncated,
|
|
102
127
|
truncatedReason,
|
|
103
128
|
tip,
|
|
104
|
-
skippedTooLarge:
|
|
105
|
-
skippedBinary:
|
|
106
|
-
skippedInaccessible:
|
|
107
|
-
linesSkippedDueToRegexTimeout:
|
|
129
|
+
skippedTooLarge: summary.skippedTooLarge,
|
|
130
|
+
skippedBinary: summary.skippedBinary,
|
|
131
|
+
skippedInaccessible: summary.skippedInaccessible,
|
|
132
|
+
linesSkippedDueToRegexTimeout: summary.linesSkippedDueToRegexTimeout,
|
|
108
133
|
});
|
|
109
|
-
if (
|
|
110
|
-
textOutput += `\nScanned ${
|
|
134
|
+
if (summary.truncated && !tip) {
|
|
135
|
+
textOutput += `\nScanned ${summary.filesScanned} files, found ${summary.matches} matches in ${summary.filesMatched} files.`;
|
|
111
136
|
}
|
|
112
137
|
return textOutput;
|
|
113
138
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search-formatting.js","sourceRoot":"","sources":["../../../src/tools/shared/search-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"search-formatting.js","sourceRoot":"","sources":["../../../src/tools/shared/search-formatting.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,UAAU,MAAM,WAAW,CAAC;AAIxC,OAAO,EAAE,sBAAsB,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAM/E,MAAM,qBAAqB,GAAG,CAAC,CAAC;AAOhC,SAAS,gBAAgB,CAAC,MAA2B;IACnD,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC;QACvD,GAAG,KAAK;QACR,YAAY,EAAE,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC;QAC9D,KAAK;KACN,CAAC,CAAC,CAAC;IAEJ,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;QACvB,MAAM,WAAW,GAAG,CAAC,CAAC,YAAY,CAAC,aAAa,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;QACjE,IAAI,WAAW,KAAK,CAAC;YAAE,OAAO,WAAW,CAAC;QAC1C,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;YAAE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,YAAY,iBAAiB,OAAO,CAAC,OAAO,eAAe,OAAO,CAAC,YAAY,SAAS,CAAC;IAC9H,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ErrorCode } from '../lib/errors.js';
|
|
1
2
|
export declare function buildToolResponse<T>(text: string, structuredContent: T): {
|
|
2
3
|
content: {
|
|
3
4
|
type: 'text';
|
|
@@ -6,4 +7,25 @@ export declare function buildToolResponse<T>(text: string, structuredContent: T)
|
|
|
6
7
|
structuredContent: T;
|
|
7
8
|
};
|
|
8
9
|
export type ToolResponse<T> = ReturnType<typeof buildToolResponse<T>>;
|
|
10
|
+
type ToolErrorResponse = ReturnType<typeof buildToolErrorResponse>;
|
|
11
|
+
export type ToolResult<T> = ToolResponse<T> | ToolErrorResponse;
|
|
12
|
+
export declare function withToolErrorHandling<T>(run: () => Promise<ToolResponse<T>>, onError: (error: unknown) => ToolResult<T>): Promise<ToolResult<T>>;
|
|
13
|
+
interface ToolErrorStructuredContent extends Record<string, unknown> {
|
|
14
|
+
ok: false;
|
|
15
|
+
error: {
|
|
16
|
+
code: string;
|
|
17
|
+
message: string;
|
|
18
|
+
path?: string;
|
|
19
|
+
suggestion?: string;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export declare function buildToolErrorResponse(error: unknown, defaultCode: ErrorCode, path?: string): {
|
|
23
|
+
content: {
|
|
24
|
+
type: 'text';
|
|
25
|
+
text: string;
|
|
26
|
+
}[];
|
|
27
|
+
structuredContent: ToolErrorStructuredContent;
|
|
28
|
+
isError: true;
|
|
29
|
+
};
|
|
30
|
+
export {};
|
|
9
31
|
//# sourceMappingURL=tool-response.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-response.d.ts","sourceRoot":"","sources":["../../src/tools/tool-response.ts"],"names":[],"mappings":"AAAA,wBAAgB,iBAAiB,CAAC,CAAC,EACjC,IAAI,EAAE,MAAM,E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L,IAAI,EAAE,MAAM,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;CACH;AAED,wBAAgB,sBAAsB,CACpC,KAAK,EAAE,OAAO,EACd,WAAW,EAAE,SAAS,EACtB,IAAI,CAAC,EAAE,MAAM,GACZ;IACD,OAAO,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAC1C,iBAAiB,EAAE,0BAA0B,CAAC;IAC9C,OAAO,EAAE,IAAI,CAAC;CACf,CAsBA"}
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
+
import { createDetailedError, ErrorCode, formatDetailedError, getSuggestion, } from '../lib/errors.js';
|
|
1
2
|
export function buildToolResponse(text, structuredContent) {
|
|
2
3
|
return {
|
|
3
4
|
content: [{ type: 'text', text }],
|
|
4
5
|
structuredContent,
|
|
5
6
|
};
|
|
6
7
|
}
|
|
8
|
+
export async function withToolErrorHandling(run, onError) {
|
|
9
|
+
try {
|
|
10
|
+
return await run();
|
|
11
|
+
}
|
|
12
|
+
catch (error) {
|
|
13
|
+
return onError(error);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export function buildToolErrorResponse(error, defaultCode, path) {
|
|
17
|
+
const detailed = createDetailedError(error, path);
|
|
18
|
+
if (detailed.code === ErrorCode.E_UNKNOWN) {
|
|
19
|
+
detailed.code = defaultCode;
|
|
20
|
+
detailed.suggestion = getSuggestion(defaultCode);
|
|
21
|
+
}
|
|
22
|
+
const text = formatDetailedError(detailed);
|
|
23
|
+
return {
|
|
24
|
+
content: [{ type: 'text', text }],
|
|
25
|
+
structuredContent: {
|
|
26
|
+
ok: false,
|
|
27
|
+
error: {
|
|
28
|
+
code: detailed.code,
|
|
29
|
+
message: detailed.message,
|
|
30
|
+
path: detailed.path,
|
|
31
|
+
suggestion: detailed.suggestion,
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
isError: true,
|
|
35
|
+
};
|
|
36
|
+
}
|
|
7
37
|
//# sourceMappingURL=tool-response.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-response.js","sourceRoot":"","sources":["../../src/tools/tool-response.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,iBAAoB;IAKpB,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,iBAAiB;KAClB,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"tool-response.js","sourceRoot":"","sources":["../../src/tools/tool-response.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,mBAAmB,EACnB,SAAS,EACT,mBAAmB,EACnB,aAAa,GACd,MAAM,kBAAkB,CAAC;AAE1B,MAAM,UAAU,iBAAiB,CAC/B,IAAY,EACZ,iBAAoB;IAKpB,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,iBAAiB;KAClB,CAAC;AACJ,CAAC;AAMD,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAmC,EACnC,OAA0C;IAE1C,IAAI,CAAC;QACH,OAAO,MAAM,GAAG,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;AACH,CAAC;AAYD,MAAM,UAAU,sBAAsB,CACpC,KAAc,EACd,WAAsB,EACtB,IAAa;IAMb,MAAM,QAAQ,GAAG,mBAAmB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAClD,IAAI,QAAQ,CAAC,IAAI,KAAK,SAAS,CAAC,SAAS,EAAE,CAAC;QAC1C,QAAQ,CAAC,IAAI,GAAG,WAAW,CAAC;QAC5B,QAAQ,CAAC,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,IAAI,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAE3C,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;QACjC,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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@j0hanz/filesystem-context-mcp",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"mcpName": "io.github.j0hanz/filesystem-context",
|
|
5
5
|
"description": "🔍 Read-only MCP server for secure filesystem exploration, searching, and analysis",
|
|
6
6
|
"type": "module",
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
"@modelcontextprotocol/sdk": "^1.25.1",
|
|
54
54
|
"fast-glob": "^3.3.3",
|
|
55
55
|
"minimatch": "^10.1.1",
|
|
56
|
+
"re2": "^1.23.0",
|
|
56
57
|
"safe-regex2": "^5.0.0",
|
|
57
58
|
"zod": "^3.24.0"
|
|
58
59
|
},
|