@j0hanz/filesystem-context-mcp 1.2.0 → 1.2.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 +19 -17
- package/dist/__tests__/lib/file-operations.test.js +25 -0
- package/dist/__tests__/lib/file-operations.test.js.map +1 -1
- package/dist/lib/constants.d.ts +1 -0
- package/dist/lib/constants.d.ts.map +1 -1
- package/dist/lib/constants.js +32 -1
- package/dist/lib/constants.js.map +1 -1
- package/dist/lib/file-operations/analyze-directory.js +1 -1
- package/dist/lib/file-operations/analyze-directory.js.map +1 -1
- package/dist/lib/file-operations/directory-helpers.d.ts +35 -0
- package/dist/lib/file-operations/directory-helpers.d.ts.map +1 -0
- package/dist/lib/file-operations/directory-helpers.js +136 -0
- package/dist/lib/file-operations/directory-helpers.js.map +1 -0
- package/dist/lib/file-operations/directory-tree.js +1 -1
- package/dist/lib/file-operations/directory-tree.js.map +1 -1
- package/dist/lib/file-operations/pattern-complexity.d.ts +16 -0
- package/dist/lib/file-operations/pattern-complexity.d.ts.map +1 -0
- package/dist/lib/file-operations/pattern-complexity.js +86 -0
- package/dist/lib/file-operations/pattern-complexity.js.map +1 -0
- package/dist/lib/file-operations/pattern-validator.d.ts +15 -0
- package/dist/lib/file-operations/pattern-validator.d.ts.map +1 -0
- package/dist/lib/file-operations/pattern-validator.js +69 -0
- package/dist/lib/file-operations/pattern-validator.js.map +1 -0
- package/dist/lib/file-operations/read-multiple-files.d.ts.map +1 -1
- package/dist/lib/file-operations/read-multiple-files.js +39 -21
- package/dist/lib/file-operations/read-multiple-files.js.map +1 -1
- package/dist/lib/file-operations/search-content.d.ts +2 -0
- package/dist/lib/file-operations/search-content.d.ts.map +1 -1
- package/dist/lib/file-operations/search-content.js +10 -7
- package/dist/lib/file-operations/search-content.js.map +1 -1
- package/dist/lib/file-operations/search-files.d.ts +2 -0
- package/dist/lib/file-operations/search-files.d.ts.map +1 -1
- package/dist/lib/file-operations/search-files.js +10 -8
- package/dist/lib/file-operations/search-files.js.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.d.ts.map +1 -1
- package/dist/lib/fs-helpers/binary-detect.js +3 -1
- package/dist/lib/fs-helpers/binary-detect.js.map +1 -1
- package/dist/lib/fs-helpers/fs-utils.d.ts +1 -0
- package/dist/lib/fs-helpers/fs-utils.d.ts.map +1 -1
- package/dist/lib/fs-helpers/fs-utils.js +13 -0
- package/dist/lib/fs-helpers/fs-utils.js.map +1 -1
- package/dist/lib/fs-helpers/readers/stream-lines.d.ts +7 -0
- package/dist/lib/fs-helpers/readers/stream-lines.d.ts.map +1 -0
- package/dist/lib/fs-helpers/readers/stream-lines.js +61 -0
- package/dist/lib/fs-helpers/readers/stream-lines.js.map +1 -0
- 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/performance/monitor.d.ts +25 -0
- package/dist/lib/performance/monitor.d.ts.map +1 -0
- package/dist/lib/performance/monitor.js +84 -0
- package/dist/lib/performance/monitor.js.map +1 -0
- package/dist/schemas/input-helpers.d.ts +19 -0
- package/dist/schemas/input-helpers.d.ts.map +1 -1
- package/dist/schemas/input-helpers.js +135 -3
- package/dist/schemas/input-helpers.js.map +1 -1
- package/dist/schemas/inputs.d.ts +6 -2
- package/dist/schemas/inputs.d.ts.map +1 -1
- package/dist/schemas/inputs.js +41 -190
- package/dist/schemas/inputs.js.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -5
- package/dist/server.js.map +1 -1
- package/dist/tools/search-content.d.ts.map +1 -1
- package/dist/tools/search-content.js +3 -1
- 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 +3 -1
- package/dist/tools/search-files.js.map +1 -1
- package/package.json +3 -2
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function readLinesIterator(filePath: string, options?: {
|
|
2
|
+
encoding?: BufferEncoding;
|
|
3
|
+
}): AsyncGenerator<string, void, undefined>;
|
|
4
|
+
export declare function headFileStreaming(filePath: string, count: number, encoding?: BufferEncoding): Promise<string[]>;
|
|
5
|
+
export declare function tailFileStreaming(filePath: string, count: number, encoding?: BufferEncoding): Promise<string[]>;
|
|
6
|
+
export declare function countLines(filePath: string): Promise<number>;
|
|
7
|
+
//# sourceMappingURL=stream-lines.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stream-lines.d.ts","sourceRoot":"","sources":["../../../../src/lib/fs-helpers/readers/stream-lines.ts"],"names":[],"mappings":"AAKA,wBAAuB,iBAAiB,CACtC,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE;IAAE,QAAQ,CAAC,EAAE,cAAc,CAAA;CAAE,GACtC,cAAc,CAAC,MAAM,EAAE,IAAI,EAAE,SAAS,CAAC,CAgBzC;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC,CASnB;AAED,wBAAsB,iBAAiB,CACrC,QAAQ,EAAE,MAAM,EAChB,KAAK,EAAE,MAAM,EACb,QAAQ,GAAE,cAAuB,GAChC,OAAO,CAAC,MAAM,EAAE,CAAC,CAsBnB;AAED,wBAAsB,UAAU,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAOlE"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createReadStream } from 'node:fs';
|
|
2
|
+
import { createInterface } from 'node:readline';
|
|
3
|
+
import { validateExistingPath } from '../../path-validation.js';
|
|
4
|
+
export async function* readLinesIterator(filePath, options) {
|
|
5
|
+
const validPath = await validateExistingPath(filePath);
|
|
6
|
+
const fileStream = createReadStream(validPath, options);
|
|
7
|
+
const rl = createInterface({
|
|
8
|
+
input: fileStream,
|
|
9
|
+
crlfDelay: Infinity,
|
|
10
|
+
});
|
|
11
|
+
try {
|
|
12
|
+
for await (const line of rl) {
|
|
13
|
+
yield line;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
finally {
|
|
17
|
+
rl.close();
|
|
18
|
+
fileStream.destroy();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
export async function headFileStreaming(filePath, count, encoding = 'utf8') {
|
|
22
|
+
if (count <= 0)
|
|
23
|
+
return [];
|
|
24
|
+
const lines = [];
|
|
25
|
+
for await (const line of readLinesIterator(filePath, { encoding })) {
|
|
26
|
+
lines.push(line);
|
|
27
|
+
if (lines.length >= count)
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
return lines;
|
|
31
|
+
}
|
|
32
|
+
export async function tailFileStreaming(filePath, count, encoding = 'utf8') {
|
|
33
|
+
if (count <= 0)
|
|
34
|
+
return [];
|
|
35
|
+
const buffer = [];
|
|
36
|
+
let index = 0;
|
|
37
|
+
for await (const line of readLinesIterator(filePath, { encoding })) {
|
|
38
|
+
if (buffer.length < count) {
|
|
39
|
+
buffer.push(line);
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
buffer[index % count] = line;
|
|
43
|
+
index++;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
// Rotate buffer if we filled it and kept going
|
|
47
|
+
if (buffer.length === count && index > 0) {
|
|
48
|
+
const startIdx = index % count;
|
|
49
|
+
return [...buffer.slice(startIdx), ...buffer.slice(0, startIdx)];
|
|
50
|
+
}
|
|
51
|
+
return buffer;
|
|
52
|
+
}
|
|
53
|
+
export async function countLines(filePath) {
|
|
54
|
+
let count = 0;
|
|
55
|
+
for await (const line of readLinesIterator(filePath)) {
|
|
56
|
+
void line;
|
|
57
|
+
count++;
|
|
58
|
+
}
|
|
59
|
+
return count;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=stream-lines.js.map
|
|
@@ -0,0 +1 @@
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js';
|
|
2
2
|
export { processInParallel, runWorkQueue } from './fs-helpers/concurrency.js';
|
|
3
|
-
export { getFileType, isHidden } from './fs-helpers/fs-utils.js';
|
|
3
|
+
export { getFileType, isHidden, safeDestroy } from './fs-helpers/fs-utils.js';
|
|
4
4
|
export { headFile, readFile, tailFile } from './fs-helpers/readers.js';
|
|
5
5
|
//# sourceMappingURL=fs-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-helpers.d.ts","sourceRoot":"","sources":["../../src/lib/fs-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fs-helpers.d.ts","sourceRoot":"","sources":["../../src/lib/fs-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/lib/fs-helpers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { isProbablyBinary } from './fs-helpers/binary-detect.js';
|
|
2
2
|
export { processInParallel, runWorkQueue } from './fs-helpers/concurrency.js';
|
|
3
|
-
export { getFileType, isHidden } from './fs-helpers/fs-utils.js';
|
|
3
|
+
export { getFileType, isHidden, safeDestroy } from './fs-helpers/fs-utils.js';
|
|
4
4
|
export { headFile, readFile, tailFile } from './fs-helpers/readers.js';
|
|
5
5
|
//# sourceMappingURL=fs-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fs-helpers.js","sourceRoot":"","sources":["../../src/lib/fs-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"fs-helpers.js","sourceRoot":"","sources":["../../src/lib/fs-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
interface OperationMetrics {
|
|
2
|
+
operation: string;
|
|
3
|
+
duration: number;
|
|
4
|
+
timestamp: number;
|
|
5
|
+
}
|
|
6
|
+
declare class PerformanceMonitor {
|
|
7
|
+
private observer?;
|
|
8
|
+
private metrics;
|
|
9
|
+
private readonly enabled;
|
|
10
|
+
constructor(enabled?: boolean);
|
|
11
|
+
private initObserver;
|
|
12
|
+
startOperation(name: string): void;
|
|
13
|
+
endOperation(name: string): void;
|
|
14
|
+
getMetrics(): OperationMetrics[];
|
|
15
|
+
getSummary(): Record<string, {
|
|
16
|
+
count: number;
|
|
17
|
+
avgDuration: number;
|
|
18
|
+
totalDuration: number;
|
|
19
|
+
}>;
|
|
20
|
+
clear(): void;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
}
|
|
23
|
+
export declare const perfMonitor: PerformanceMonitor;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=monitor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.d.ts","sourceRoot":"","sources":["../../../src/lib/performance/monitor.ts"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,cAAM,kBAAkB;IACtB,OAAO,CAAC,QAAQ,CAAC,CAAsB;IACvC,OAAO,CAAC,OAAO,CAA0B;IACzC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAU;gBAEtB,OAAO,UAAQ;IAO3B,OAAO,CAAC,YAAY;IAoBpB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAKlC,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAOhC,UAAU,IAAI,gBAAgB,EAAE;IAIhC,UAAU,IAAI,MAAM,CAClB,MAAM,EACN;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,aAAa,EAAE,MAAM,CAAA;KAAE,CAC9D;IA6BD,KAAK,IAAI,IAAI;IAMb,OAAO,IAAI,IAAI;CAGhB;AAID,eAAO,MAAM,WAAW,oBAAoC,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { performance, PerformanceObserver } from 'node:perf_hooks';
|
|
2
|
+
class PerformanceMonitor {
|
|
3
|
+
observer;
|
|
4
|
+
metrics = [];
|
|
5
|
+
enabled;
|
|
6
|
+
constructor(enabled = false) {
|
|
7
|
+
this.enabled = enabled;
|
|
8
|
+
if (this.enabled) {
|
|
9
|
+
this.initObserver();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
initObserver() {
|
|
13
|
+
this.observer = new PerformanceObserver((list) => {
|
|
14
|
+
for (const entry of list.getEntries()) {
|
|
15
|
+
this.metrics.push({
|
|
16
|
+
operation: entry.name,
|
|
17
|
+
duration: entry.duration,
|
|
18
|
+
timestamp: entry.startTime,
|
|
19
|
+
});
|
|
20
|
+
// Log slow operations (>1s) to console
|
|
21
|
+
if (entry.duration > 1000) {
|
|
22
|
+
console.warn(`[PERF] Slow operation: ${entry.name} took ${entry.duration.toFixed(2)}ms`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
this.observer.observe({ entryTypes: ['measure'] });
|
|
27
|
+
}
|
|
28
|
+
startOperation(name) {
|
|
29
|
+
if (!this.enabled)
|
|
30
|
+
return;
|
|
31
|
+
performance.mark(`${name}-start`);
|
|
32
|
+
}
|
|
33
|
+
endOperation(name) {
|
|
34
|
+
if (!this.enabled)
|
|
35
|
+
return;
|
|
36
|
+
const endMark = `${name}-end`;
|
|
37
|
+
performance.mark(endMark);
|
|
38
|
+
performance.measure(name, `${name}-start`, endMark);
|
|
39
|
+
}
|
|
40
|
+
getMetrics() {
|
|
41
|
+
return [...this.metrics];
|
|
42
|
+
}
|
|
43
|
+
getSummary() {
|
|
44
|
+
const summary = {};
|
|
45
|
+
for (const metric of this.metrics) {
|
|
46
|
+
summary[metric.operation] ??= {
|
|
47
|
+
count: 0,
|
|
48
|
+
avgDuration: 0,
|
|
49
|
+
totalDuration: 0,
|
|
50
|
+
};
|
|
51
|
+
const entry = summary[metric.operation];
|
|
52
|
+
if (entry) {
|
|
53
|
+
entry.count++;
|
|
54
|
+
entry.totalDuration += metric.duration;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
for (const op of Object.keys(summary)) {
|
|
58
|
+
const stats = summary[op];
|
|
59
|
+
if (stats) {
|
|
60
|
+
stats.avgDuration = stats.totalDuration / stats.count;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return summary;
|
|
64
|
+
}
|
|
65
|
+
clear() {
|
|
66
|
+
this.metrics = [];
|
|
67
|
+
performance.clearMarks();
|
|
68
|
+
performance.clearMeasures();
|
|
69
|
+
}
|
|
70
|
+
dispose() {
|
|
71
|
+
this.observer?.disconnect();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
// Enable via environment variable
|
|
75
|
+
const isEnabled = process.env.ENABLE_PERF_MONITORING === 'true';
|
|
76
|
+
export const perfMonitor = new PerformanceMonitor(isEnabled);
|
|
77
|
+
// Cleanup on process exit
|
|
78
|
+
process.on('beforeExit', () => {
|
|
79
|
+
if (isEnabled) {
|
|
80
|
+
console.error('[PERF] Summary:', perfMonitor.getSummary());
|
|
81
|
+
}
|
|
82
|
+
perfMonitor.dispose();
|
|
83
|
+
});
|
|
84
|
+
//# sourceMappingURL=monitor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monitor.js","sourceRoot":"","sources":["../../../src/lib/performance/monitor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAQnE,MAAM,kBAAkB;IACd,QAAQ,CAAuB;IAC/B,OAAO,GAAuB,EAAE,CAAC;IACxB,OAAO,CAAU;IAElC,YAAY,OAAO,GAAG,KAAK;QACzB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QACvB,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC;YACjB,IAAI,CAAC,YAAY,EAAE,CAAC;QACtB,CAAC;IACH,CAAC;IAEO,YAAY;QAClB,IAAI,CAAC,QAAQ,GAAG,IAAI,mBAAmB,CAAC,CAAC,IAAI,EAAE,EAAE;YAC/C,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,UAAU,EAAE,EAAE,CAAC;gBACtC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC;oBAChB,SAAS,EAAE,KAAK,CAAC,IAAI;oBACrB,QAAQ,EAAE,KAAK,CAAC,QAAQ;oBACxB,SAAS,EAAE,KAAK,CAAC,SAAS;iBAC3B,CAAC,CAAC;gBAEH,uCAAuC;gBACvC,IAAI,KAAK,CAAC,QAAQ,G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zC,CAAC;QACH,CAAC;QAED,KAAK,MAAM,EAAE,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,CAAC;YACtC,MAAM,KAAK,GAAG,OAAO,CAAC,EAAE,CAAC,CAAC;YAC1B,IAAI,KAAK,EAAE,CAAC;gBACV,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,aAAa,GAAG,KAAK,CAAC,KAAK,CAAC;YACxD,CAAC;QACH,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,KAAK;QACH,IAAI,CAAC,OAAO,GAAG,EAAE,CAAC;QAClB,WAAW,CAAC,UAAU,EAAE,CAAC;QACzB,WAAW,CAAC,aAAa,EAAE,CAAC;IAC9B,CAAC;IAED,OAAO;QACL,IAAI,CAAC,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC9B,CAAC;CACF;AAED,kCAAkC;AAClC,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,KAAK,MAAM,CAAC;AAChE,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;AAE7D,0BAA0B;AAC1B,OAAO,CAAC,EAAE,CAAC,YAAY,EAAE,GAAG,EAAE;IAC5B,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,iBAAiB,EAAE,WAAW,CAAC,UAAU,EAAE,CAAC,CAAC;IAC7D,CAAC;IACD,WAAW,CAAC,OAAO,EAAE,CAAC;AACxB,CAAC,CAAC,CAAC"}
|
|
@@ -5,4 +5,23 @@ export declare const ReadFileMaxSizeSchema: z.ZodDefault<z.ZodOptional<z.ZodNumb
|
|
|
5
5
|
export declare const ReadMultipleFilesMaxSizeSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
6
6
|
export declare const ExcludePatternsSchema: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
7
7
|
export declare const BasicExcludePatternsSchema: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
8
|
+
export declare const MaxDepthSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
9
|
+
export declare const MaxResultsSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
10
|
+
export declare const MaxFilesScannedSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
11
|
+
export declare const TimeoutMsSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
12
|
+
export declare const TopNSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
13
|
+
export declare const TreeMaxDepthSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
14
|
+
export declare const IncludeHiddenSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
15
|
+
export declare const SortByFileSchema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["name", "size", "modified", "path"]>>>;
|
|
16
|
+
export declare const SortByDirectorySchema: z.ZodDefault<z.ZodOptional<z.ZodEnum<["name", "size", "modified", "type"]>>>;
|
|
17
|
+
export declare const MaxEntriesSchema: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
export declare const CaseSensitiveSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
19
|
+
export declare const SkipBinarySchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
|
+
export declare const BaseNameMatchSchema: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
+
export declare const MaxFileSizeSearchSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
22
|
+
export declare const ContextLinesSchema: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
23
|
+
export declare const HeadLinesSchema: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
export declare const TailLinesSchema: z.ZodOptional<z.ZodNumber>;
|
|
25
|
+
export declare const LineStartSchema: z.ZodOptional<z.ZodNumber>;
|
|
26
|
+
export declare const LineEndSchema: z.ZodOptional<z.ZodNumber>;
|
|
8
27
|
//# sourceMappingURL=input-helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-helpers.d.ts","sourceRoot":"","sources":["../../src/schemas/input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"input-helpers.d.ts","sourceRoot":"","sources":["../../src/schemas/input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAcxB,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAaxD;AAED,eAAO,MAAM,cAAc,+FAIC,CAAC;AAU7B,eAAO,MAAM,qBAAqB,0CAEjC,CAAC;AAEF,eAAO,MAAM,8BAA8B,0CAE1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,4FAWE,CAAC;AAErC,eAAO,MAAM,0BAA0B,8DAIH,CAAC;AAQrC,eAAO,MAAM,cAAc,0CAOuB,CAAC;AAEnD,eAAO,MAAM,gBAAgB,0CAOqB,CAAC;AAEnD,eAAO,MAAM,qBAAqB,0CAO4B,CAAC;AAE/D,eAAO,MAAM,eAAe,0CAO4B,CAAC;AAEzD,eAAO,MAAM,UAAU,0CAOqB,CAAC;AAE7C,eAAO,MAAM,kBAAkB,0CAOqB,CAAC;AAErD,eAAO,MAAM,mBAAmB,2CAImB,CAAC;AAEpD,eAAO,MAAM,gBAAgB,8EAIgC,CAAC;AAE9D,eAAO,MAAM,qBAAqB,8EAI2B,CAAC;AAE9D,eAAO,MAAM,gBAAgB,4BAM+C,CAAC;AAE7E,eAAO,MAAM,mBAAmB,2CAII,CAAC;AAErC,eAAO,MAAM,gBAAgB,2CAIwB,CAAC;AAEtD,eAAO,MAAM,mBAAmB,2CAM7B,CAAC;AAEJ,eAAO,MAAM,uBAAuB,0CAO+B,CAAC;AAEpE,eAAO,MAAM,kBAAkB,0CAO6C,CAAC;AAE7E,eAAO,MAAM,eAAe,4BAMc,CAAC;AAE3C,eAAO,MAAM,eAAe,4BAMa,CAAC;AAE1C,eAAO,MAAM,eAAe,4BAK6B,CAAC;AAE1D,eAAO,MAAM,aAAa,4BAK6B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { MAX_TEXT_FILE_SIZE } from '../lib/constants.js';
|
|
2
|
+
import { DEFAULT_EXCLUDE_PATTERNS, DEFAULT_MAX_DEPTH, DEFAULT_MAX_RESULTS, DEFAULT_SEARCH_MAX_FILES, DEFAULT_SEARCH_TIMEOUT_MS, DEFAULT_TOP_N, DEFAULT_TREE_DEPTH, MAX_SEARCHABLE_FILE_SIZE, MAX_TEXT_FILE_SIZE, } from '../lib/constants.js';
|
|
3
3
|
export function isSafeGlobPattern(value) {
|
|
4
4
|
if (value.length === 0)
|
|
5
5
|
return false;
|
|
@@ -35,10 +35,142 @@ export const ExcludePatternsSchema = z
|
|
|
35
35
|
}))
|
|
36
36
|
.max(100, 'Too many exclude patterns (max 100)')
|
|
37
37
|
.optional()
|
|
38
|
-
.default(
|
|
38
|
+
.default(DEFAULT_EXCLUDE_PATTERNS);
|
|
39
39
|
export const BasicExcludePatternsSchema = z
|
|
40
40
|
.array(z.string().max(500, 'Individual exclude pattern is too long'))
|
|
41
41
|
.max(100, 'Too many exclude patterns (max 100)')
|
|
42
42
|
.optional()
|
|
43
|
-
.default(
|
|
43
|
+
.default(DEFAULT_EXCLUDE_PATTERNS);
|
|
44
|
+
// ============================================================================
|
|
45
|
+
// REUSABLE SCHEMA FRAGMENTS
|
|
46
|
+
// ============================================================================
|
|
47
|
+
// These schemas eliminate duplication across input definitions.
|
|
48
|
+
// If you change a constraint (e.g., maxDepth limit), update once here.
|
|
49
|
+
export const MaxDepthSchema = z
|
|
50
|
+
.number()
|
|
51
|
+
.int('maxDepth must be an integer')
|
|
52
|
+
.min(0, 'maxDepth must be non-negative')
|
|
53
|
+
.max(100, 'maxDepth cannot exceed 100')
|
|
54
|
+
.optional()
|
|
55
|
+
.default(DEFAULT_MAX_DEPTH)
|
|
56
|
+
.describe('Maximum directory depth to traverse');
|
|
57
|
+
export const MaxResultsSchema = z
|
|
58
|
+
.number()
|
|
59
|
+
.int('maxResults must be an integer')
|
|
60
|
+
.min(1, 'maxResults must be at least 1')
|
|
61
|
+
.max(10000, 'maxResults cannot exceed 10,000')
|
|
62
|
+
.optional()
|
|
63
|
+
.default(DEFAULT_MAX_RESULTS)
|
|
64
|
+
.describe('Maximum number of results to return');
|
|
65
|
+
export const MaxFilesScannedSchema = z
|
|
66
|
+
.number()
|
|
67
|
+
.int('maxFilesScanned must be an integer')
|
|
68
|
+
.min(1, 'maxFilesScanned must be at least 1')
|
|
69
|
+
.max(100000, 'maxFilesScanned cannot exceed 100,000')
|
|
70
|
+
.optional()
|
|
71
|
+
.default(DEFAULT_SEARCH_MAX_FILES)
|
|
72
|
+
.describe('Maximum number of files to scan before stopping');
|
|
73
|
+
export const TimeoutMsSchema = z
|
|
74
|
+
.number()
|
|
75
|
+
.int('timeoutMs must be an integer')
|
|
76
|
+
.min(100, 'timeoutMs must be at least 100ms')
|
|
77
|
+
.max(3600000, 'timeoutMs cannot exceed 1 hour')
|
|
78
|
+
.optional()
|
|
79
|
+
.default(DEFAULT_SEARCH_TIMEOUT_MS)
|
|
80
|
+
.describe('Timeout in milliseconds for the operation');
|
|
81
|
+
export const TopNSchema = z
|
|
82
|
+
.number()
|
|
83
|
+
.int('topN must be an integer')
|
|
84
|
+
.min(1, 'topN must be at least 1')
|
|
85
|
+
.max(1000, 'topN cannot exceed 1000')
|
|
86
|
+
.optional()
|
|
87
|
+
.default(DEFAULT_TOP_N)
|
|
88
|
+
.describe('Number of top items to return');
|
|
89
|
+
export const TreeMaxDepthSchema = z
|
|
90
|
+
.number()
|
|
91
|
+
.int('maxDepth must be an integer')
|
|
92
|
+
.min(0, 'maxDepth must be non-negative')
|
|
93
|
+
.max(50, 'maxDepth cannot exceed 50')
|
|
94
|
+
.optional()
|
|
95
|
+
.default(DEFAULT_TREE_DEPTH)
|
|
96
|
+
.describe('Maximum depth to traverse (default 5)');
|
|
97
|
+
export const IncludeHiddenSchema = z
|
|
98
|
+
.boolean()
|
|
99
|
+
.optional()
|
|
100
|
+
.default(false)
|
|
101
|
+
.describe('Include hidden files and directories');
|
|
102
|
+
export const SortByFileSchema = z
|
|
103
|
+
.enum(['name', 'size', 'modified', 'path'])
|
|
104
|
+
.optional()
|
|
105
|
+
.default('path')
|
|
106
|
+
.describe('Sort results by: name, size, modified, or path');
|
|
107
|
+
export const SortByDirectorySchema = z
|
|
108
|
+
.enum(['name', 'size', 'modified', 'type'])
|
|
109
|
+
.optional()
|
|
110
|
+
.default('name')
|
|
111
|
+
.describe('Sort entries by: name, size, modified, or type');
|
|
112
|
+
export const MaxEntriesSchema = z
|
|
113
|
+
.number()
|
|
114
|
+
.int('maxEntries must be an integer')
|
|
115
|
+
.min(1, 'maxEntries must be at least 1')
|
|
116
|
+
.max(100000, 'maxEntries cannot exceed 100,000')
|
|
117
|
+
.optional()
|
|
118
|
+
.describe('Maximum number of entries to return (prevents huge responses)');
|
|
119
|
+
export const CaseSensitiveSchema = z
|
|
120
|
+
.boolean()
|
|
121
|
+
.optional()
|
|
122
|
+
.default(false)
|
|
123
|
+
.describe('Case sensitive search');
|
|
124
|
+
export const SkipBinarySchema = z
|
|
125
|
+
.boolean()
|
|
126
|
+
.optional()
|
|
127
|
+
.default(true)
|
|
128
|
+
.describe('Skip likely-binary files (recommended)');
|
|
129
|
+
export const BaseNameMatchSchema = z
|
|
130
|
+
.boolean()
|
|
131
|
+
.optional()
|
|
132
|
+
.default(false)
|
|
133
|
+
.describe('If true, patterns without slashes match against basename only. Useful for finding files by name regardless of directory depth');
|
|
134
|
+
export const MaxFileSizeSearchSchema = z
|
|
135
|
+
.number()
|
|
136
|
+
.int('maxFileSize must be an integer')
|
|
137
|
+
.min(1, 'maxFileSize must be at least 1 byte')
|
|
138
|
+
.max(100 * 1024 * 1024, 'maxFileSize cannot exceed 100MB')
|
|
139
|
+
.optional()
|
|
140
|
+
.default(MAX_SEARCHABLE_FILE_SIZE)
|
|
141
|
+
.describe('Maximum file size in bytes to scan (defaults to 1MB)');
|
|
142
|
+
export const ContextLinesSchema = z
|
|
143
|
+
.number()
|
|
144
|
+
.int('contextLines must be an integer')
|
|
145
|
+
.min(0, 'contextLines must be non-negative')
|
|
146
|
+
.max(10, 'contextLines cannot exceed 10')
|
|
147
|
+
.optional()
|
|
148
|
+
.default(0)
|
|
149
|
+
.describe('Number of lines to include before and after each match (0-10)');
|
|
150
|
+
export const HeadLinesSchema = z
|
|
151
|
+
.number()
|
|
152
|
+
.int('head must be an integer')
|
|
153
|
+
.min(1, 'head must be at least 1')
|
|
154
|
+
.max(100000, 'head cannot exceed 100,000 lines')
|
|
155
|
+
.optional()
|
|
156
|
+
.describe('Read only the first N lines');
|
|
157
|
+
export const TailLinesSchema = z
|
|
158
|
+
.number()
|
|
159
|
+
.int('tail must be an integer')
|
|
160
|
+
.min(1, 'tail must be at least 1')
|
|
161
|
+
.max(100000, 'tail cannot exceed 100,000 lines')
|
|
162
|
+
.optional()
|
|
163
|
+
.describe('Read only the last N lines');
|
|
164
|
+
export const LineStartSchema = z
|
|
165
|
+
.number()
|
|
166
|
+
.int('lineStart must be an integer')
|
|
167
|
+
.min(1, 'lineStart must be at least 1 (1-indexed)')
|
|
168
|
+
.optional()
|
|
169
|
+
.describe('Start line (1-indexed) for reading a range');
|
|
170
|
+
export const LineEndSchema = z
|
|
171
|
+
.number()
|
|
172
|
+
.int('lineEnd must be an integer')
|
|
173
|
+
.min(1, 'lineEnd must be at least 1')
|
|
174
|
+
.optional()
|
|
175
|
+
.describe('End line (inclusive) for reading a range');
|
|
44
176
|
//# sourceMappingURL=input-helpers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-helpers.js","sourceRoot":"","sources":["../../src/schemas/input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,
|
|
1
|
+
{"version":3,"file":"input-helpers.js","sourceRoot":"","sources":["../../src/schemas/input-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,wBAAwB,EACxB,iBAAiB,EACjB,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,aAAa,EACb,kBAAkB,EAClB,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,UAAU,iBAAiB,CAAC,KAAa;IAC7C,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAErC,MAAM,eAAe,GAAG,+BAA+B,CAAC;IACxD,IAAI,eAAe,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC;KAC5B,IAAI,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;KAC3D,QAAQ,EAAE;KACV,OAAO,CAAC,OAAO,CAAC;KAChB,QAAQ,CAAC,eAAe,CAAC,CAAC;AAE7B,MAAM,qBAAqB,GAAG,CAAC;KAC5B,MAAM,EAAE;KACR,GAAG,CAAC,4BAA4B,CAAC;KACjC,GAAG,CAAC,CAAC,EAAE,iCAAiC,CAAC;KACzC,GAAG,CAAC,GAAG,GAAG,IAAI,GA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,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC;KAC7B,MAAM,EAAE;KACR,GAAG,CAAC,8BAA8B,CAAC;KACnC,GAAG,CAAC,CAAC,EAAE,0CAA0C,CAAC;KAClD,QAAQ,EAAE;KACV,QAAQ,CAAC,4CAA4C,CAAC,CAAC;AAE1D,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC;KAC3B,MAAM,EAAE;KACR,GAAG,CAAC,4BAA4B,CAAC;KACjC,GAAG,CAAC,CAAC,EAAE,4BAA4B,CAAC;KACpC,QAAQ,EAAE;KACV,QAAQ,CAAC,0CAA0C,CAAC,CAAC"}
|
package/dist/schemas/inputs.d.ts
CHANGED
|
@@ -14,9 +14,11 @@ export declare const SearchFilesInputSchema: {
|
|
|
14
14
|
excludePatterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
15
15
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
16
16
|
sortBy: z.ZodDefault<z.ZodOptional<z.ZodEnum<["name", "size", "modified", "path"]>>>;
|
|
17
|
-
maxDepth: z.ZodOptional<z.ZodNumber
|
|
17
|
+
maxDepth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
18
18
|
maxFilesScanned: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
19
19
|
timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
20
|
+
baseNameMatch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
21
|
+
skipSymlinks: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
20
22
|
};
|
|
21
23
|
export declare const ReadFileInputSchema: {
|
|
22
24
|
path: z.ZodString;
|
|
@@ -45,7 +47,7 @@ export declare const SearchContentInputSchema: {
|
|
|
45
47
|
excludePatterns: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">>>;
|
|
46
48
|
caseSensitive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
47
49
|
maxResults: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
48
|
-
maxFileSize: z.ZodOptional<z.ZodNumber
|
|
50
|
+
maxFileSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
49
51
|
maxFilesScanned: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
50
52
|
timeoutMs: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
51
53
|
skipBinary: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -53,6 +55,8 @@ export declare const SearchContentInputSchema: {
|
|
|
53
55
|
contextLines: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
54
56
|
wholeWord: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
55
57
|
isLiteral: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
58
|
+
baseNameMatch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
59
|
+
caseSensitiveFileMatch: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
56
60
|
};
|
|
57
61
|
export declare const AnalyzeDirectoryInputSchema: {
|
|
58
62
|
path: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/schemas/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/schemas/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA+BxB,eAAO,MAAM,wBAAwB;;;;;;;;CAuBpC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;CAkDlC,CAAC;AAqBF,eAAO,MAAM,mBAAmB;;;;;;;;CAA2B,CAAC;AAyB5D,eAAO,MAAM,4BAA4B;;;;;;;CAAoC,CAAC;AAE9E,eAAO,MAAM,sBAAsB;;CAKlC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;CA8DpC,CAAC;AAEF,eAAO,MAAM,2BAA2B;;;;;;CAWvC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;;;;;CAsBpC,CAAC;AAEF,eAAO,MAAM,wBAAwB;;;CAapC,CAAC"}
|