@j0hanz/filesystem-mcp 1.2.2 → 1.2.3
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 +11 -0
- package/dist/cli.js +2 -4
- package/dist/completions.js +15 -6
- package/dist/lib/file-operations/glob-engine.js +3 -9
- package/dist/lib/file-operations/read-multiple-files.js +4 -23
- package/dist/lib/file-operations/search-content.js +11 -18
- package/dist/lib/observability.js +4 -4
- package/dist/lib/path-validation.js +22 -9
- package/dist/pkg-info.d.ts +6 -0
- package/dist/pkg-info.js +9 -0
- package/dist/schemas.d.ts +28 -28
- package/dist/schemas.js +26 -26
- package/dist/server/bootstrap.d.ts +4 -0
- package/dist/server/bootstrap.js +117 -0
- package/dist/server/capabilities.d.ts +10 -0
- package/dist/server/capabilities.js +40 -0
- package/dist/server/logging.d.ts +7 -0
- package/dist/server/logging.js +41 -0
- package/dist/server/roots-manager.d.ts +19 -0
- package/dist/server/roots-manager.js +173 -0
- package/dist/server/types.d.ts +4 -0
- package/dist/server/types.js +1 -0
- package/dist/server.d.ts +2 -8
- package/dist/server.js +1 -317
- package/dist/tools/apply-patch.js +3 -2
- package/dist/tools/calculate-hash.js +3 -2
- package/dist/tools/create-directory.js +3 -2
- package/dist/tools/delete-file.js +9 -2
- package/dist/tools/diff-files.js +3 -2
- package/dist/tools/edit-file.js +5 -4
- package/dist/tools/list-directory.js +13 -2
- package/dist/tools/move-file.js +11 -3
- package/dist/tools/read-multiple.js +6 -5
- package/dist/tools/read.js +3 -2
- package/dist/tools/replace-in-files.js +3 -2
- package/dist/tools/roots.js +12 -2
- package/dist/tools/search-content.js +10 -15
- package/dist/tools/search-files.js +13 -9
- package/dist/tools/shared.d.ts +3 -1
- package/dist/tools/shared.js +19 -1
- package/dist/tools/stat-many.js +6 -5
- package/dist/tools/stat.js +4 -3
- package/dist/tools/task-support.js +57 -10
- package/dist/tools/tree.js +15 -2
- package/dist/tools/write-file.js +3 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -493,6 +493,13 @@ The server declares full task capabilities (`tasks/list`, `tasks/cancel`). The f
|
|
|
493
493
|
|
|
494
494
|
Include `_meta.progressToken` in a `tools/call` request to receive `notifications/progress` updates. Use `tools/call` with a `task` field to invoke as a background task, then poll `tasks/get` and retrieve output via `tasks/result`.
|
|
495
495
|
|
|
496
|
+
Task status notifications (`notifications/tasks/status`) are best-effort and emitted only when the transport/runtime provides a notification sender.
|
|
497
|
+
|
|
498
|
+
Cancellation semantics:
|
|
499
|
+
|
|
500
|
+
- `tasks/cancel` is the canonical cancellation API.
|
|
501
|
+
- Clients should treat `E_CANCELLED` as cancellation even if a transport/client surfaces a terminal failure shape.
|
|
502
|
+
|
|
496
503
|
## Configuration
|
|
497
504
|
|
|
498
505
|
### CLI
|
|
@@ -535,6 +542,10 @@ Directories are resolved from three sources, merged at runtime:
|
|
|
535
542
|
> [!TIP]
|
|
536
543
|
> If no directories are configured at startup and the connected client does not supply MCP Roots, all tool calls will fail. Pass at least one directory argument or use `--allow-cwd`.
|
|
537
544
|
|
|
545
|
+
### Compatibility
|
|
546
|
+
|
|
547
|
+
Set `FS_CONTEXT_STRIP_STRUCTURED=1` to strip `structuredContent` from tool results and `outputSchema` from tool definitions for compatibility with clients that only consume text content.
|
|
548
|
+
|
|
538
549
|
## Security
|
|
539
550
|
|
|
540
551
|
- **Path validation**: All operations use `isPathWithinDirectories` to prevent path traversal attacks.
|
package/dist/cli.js
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import * as fs from 'node:fs/promises';
|
|
2
2
|
import { getSystemErrorMessage, getSystemErrorName } from 'node:util';
|
|
3
|
-
import { z } from 'zod';
|
|
4
3
|
import { Command, CommanderError, InvalidArgumentError } from 'commander';
|
|
5
|
-
import packageJsonRaw from '../package.json' with { type: 'json' };
|
|
6
4
|
import { processInParallel } from './lib/fs-helpers.js';
|
|
7
5
|
import { getReservedDeviceNameForPath, isWindowsDriveRelativePath, normalizePath, } from './lib/path-validation.js';
|
|
8
6
|
import { isRecord } from './lib/type-guards.js';
|
|
9
|
-
|
|
10
|
-
const { version: SERVER_VERSION } =
|
|
7
|
+
import { pkgInfo } from './pkg-info.js';
|
|
8
|
+
const { version: SERVER_VERSION } = pkgInfo;
|
|
11
9
|
const IS_WINDOWS = process.platform === 'win32';
|
|
12
10
|
const CLI_VALIDATE_CONCURRENCY = 8;
|
|
13
11
|
export class CliExitError extends Error {
|
package/dist/completions.js
CHANGED
|
@@ -195,7 +195,17 @@ async function toAllowedContextDirectory(resolved, allowed) {
|
|
|
195
195
|
return isPathWithinDirectories(parent, allowed) ? parent : undefined;
|
|
196
196
|
}
|
|
197
197
|
async function resolveContextBaseDirectory(argumentName, contextArguments, allowed) {
|
|
198
|
-
if (!contextArguments
|
|
198
|
+
if (!contextArguments) {
|
|
199
|
+
return undefined;
|
|
200
|
+
}
|
|
201
|
+
let hasContextArgument = false;
|
|
202
|
+
for (const key in contextArguments) {
|
|
203
|
+
if (!Object.prototype.hasOwnProperty.call(contextArguments, key))
|
|
204
|
+
continue;
|
|
205
|
+
hasContextArgument = true;
|
|
206
|
+
break;
|
|
207
|
+
}
|
|
208
|
+
if (!hasContextArgument) {
|
|
199
209
|
return undefined;
|
|
200
210
|
}
|
|
201
211
|
const keys = chooseContextKeys(argumentName);
|
|
@@ -277,10 +287,11 @@ function findRootPrefixMatches(currentValue, allowed) {
|
|
|
277
287
|
function findMatchingRoots(searchDir, prefix, allowed) {
|
|
278
288
|
const matches = [];
|
|
279
289
|
const lowerPrefix = prefix.toLowerCase();
|
|
290
|
+
const normalizedSearchDir = normalizePath(searchDir);
|
|
280
291
|
for (const root of allowed) {
|
|
281
292
|
const rootDir = path.dirname(root);
|
|
282
293
|
// Check if root is a direct child of searchDir
|
|
283
|
-
if (normalizePath(rootDir) ===
|
|
294
|
+
if (normalizePath(rootDir) === normalizedSearchDir) {
|
|
284
295
|
const rootName = path.basename(root);
|
|
285
296
|
if (rootName.toLowerCase().startsWith(lowerPrefix)) {
|
|
286
297
|
matches.push(`${root}${path.sep}`);
|
|
@@ -312,10 +323,8 @@ export async function getPathCompletions(currentValue, options = {}) {
|
|
|
312
323
|
};
|
|
313
324
|
}
|
|
314
325
|
const { searchDir, prefix } = context;
|
|
315
|
-
const
|
|
316
|
-
|
|
317
|
-
Promise.resolve(findMatchingRoots(searchDir, prefix, allowed)),
|
|
318
|
-
]);
|
|
326
|
+
const dirMatches = await findMatchesInDirectory(searchDir, prefix, allowed);
|
|
327
|
+
const rootMatches = findMatchingRoots(searchDir, prefix, allowed);
|
|
319
328
|
// Deduplicate and sort
|
|
320
329
|
const unique = new Set();
|
|
321
330
|
for (const match of dirMatches)
|
|
@@ -237,15 +237,9 @@ async function* processIterable(iterable, context) {
|
|
|
237
237
|
const flush = async function* () {
|
|
238
238
|
if (buffer.length === 0)
|
|
239
239
|
return;
|
|
240
|
-
const
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
const match = buffer[index];
|
|
244
|
-
if (match === undefined) {
|
|
245
|
-
requests[index] = Promise.resolve(null);
|
|
246
|
-
continue;
|
|
247
|
-
}
|
|
248
|
-
requests[index] = resolveStringMatch(match, cwd, maxDepth, seen, onlyFiles, followSymlinks, returnStats, suppressErrors);
|
|
240
|
+
const requests = [];
|
|
241
|
+
for (const match of buffer) {
|
|
242
|
+
requests.push(resolveStringMatch(match, cwd, maxDepth, seen, onlyFiles, followSymlinks, returnStats, suppressErrors));
|
|
249
243
|
}
|
|
250
244
|
buffer.length = 0;
|
|
251
245
|
const results = await Promise.all(requests);
|
|
@@ -109,16 +109,11 @@ async function validateBatch(tasks, signal) {
|
|
|
109
109
|
}
|
|
110
110
|
return infos;
|
|
111
111
|
}
|
|
112
|
-
|
|
113
|
-
const { batchStart, batchEnd,
|
|
112
|
+
function applyBudgetForRange(options) {
|
|
113
|
+
const { batchStart, batchEnd, totalFiles, maxTotalSize, maxSize, validated, skippedBudget, totalSize: startingTotalSize, } = options;
|
|
114
114
|
let totalSize = startingTotalSize;
|
|
115
115
|
for (let index = batchStart; index < batchEnd; index += 1) {
|
|
116
|
-
const
|
|
117
|
-
if (!filePath)
|
|
118
|
-
continue;
|
|
119
|
-
const cached = validated.get(index);
|
|
120
|
-
const info = cached ??
|
|
121
|
-
(await resolveValidatedInfo(filePath, index, validated, signal));
|
|
116
|
+
const info = validated.get(index);
|
|
122
117
|
if (!info)
|
|
123
118
|
continue;
|
|
124
119
|
const { exceeded, totalSize: nextTotalSize } = applyBudget(totalSize, estimateReadSize(info.stats, maxSize), maxTotalSize, index, totalFiles, skippedBudget);
|
|
@@ -149,17 +144,15 @@ async function collectFileBudget(filePaths, maxTotalSize, maxSize, signal) {
|
|
|
149
144
|
for (const [index, info] of batchInfos) {
|
|
150
145
|
validated.set(index, info);
|
|
151
146
|
}
|
|
152
|
-
const budgetResult =
|
|
147
|
+
const budgetResult = applyBudgetForRange({
|
|
153
148
|
batchStart,
|
|
154
149
|
batchEnd,
|
|
155
|
-
filePaths,
|
|
156
150
|
totalFiles,
|
|
157
151
|
maxTotalSize,
|
|
158
152
|
maxSize,
|
|
159
153
|
validated,
|
|
160
154
|
skippedBudget,
|
|
161
155
|
totalSize,
|
|
162
|
-
...(signal ? { signal } : {}),
|
|
163
156
|
});
|
|
164
157
|
const { exceeded, totalSize: nextTotalSize } = budgetResult;
|
|
165
158
|
if (exceeded) {
|
|
@@ -169,18 +162,6 @@ async function collectFileBudget(filePaths, maxTotalSize, maxSize, signal) {
|
|
|
169
162
|
}
|
|
170
163
|
return { skippedBudget, validated };
|
|
171
164
|
}
|
|
172
|
-
async function resolveValidatedInfo(filePath, index, validated, signal) {
|
|
173
|
-
const existing = validated.get(index);
|
|
174
|
-
if (existing) {
|
|
175
|
-
return existing;
|
|
176
|
-
}
|
|
177
|
-
const info = await tryValidateFile(filePath, index, signal);
|
|
178
|
-
if (info) {
|
|
179
|
-
validated.set(index, info);
|
|
180
|
-
return info;
|
|
181
|
-
}
|
|
182
|
-
return undefined;
|
|
183
|
-
}
|
|
184
165
|
function buildOutput(filePaths) {
|
|
185
166
|
const output = new Array(filePaths.length);
|
|
186
167
|
for (let index = 0; index < filePaths.length; index += 1) {
|
|
@@ -170,24 +170,21 @@ class ContextBuffer {
|
|
|
170
170
|
snapshotBefore() {
|
|
171
171
|
if (this.size === 0)
|
|
172
172
|
return [];
|
|
173
|
-
const result =
|
|
173
|
+
const result = new Array(this.size);
|
|
174
174
|
if (this.size < this.capacity) {
|
|
175
175
|
for (let i = 0; i < this.size; i++) {
|
|
176
|
-
|
|
177
|
-
if (item !== undefined)
|
|
178
|
-
result.push(item);
|
|
176
|
+
result[i] = this.buffer[i] ?? '';
|
|
179
177
|
}
|
|
180
178
|
return result;
|
|
181
179
|
}
|
|
180
|
+
let outIndex = 0;
|
|
182
181
|
for (let i = this.head; i < this.capacity; i++) {
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
result.push(item);
|
|
182
|
+
result[outIndex] = this.buffer[i] ?? '';
|
|
183
|
+
outIndex++;
|
|
186
184
|
}
|
|
187
185
|
for (let i = 0; i < this.head; i++) {
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
result.push(item);
|
|
186
|
+
result[outIndex] = this.buffer[i] ?? '';
|
|
187
|
+
outIndex++;
|
|
191
188
|
}
|
|
192
189
|
return result;
|
|
193
190
|
}
|
|
@@ -218,17 +215,13 @@ async function readMatches(handle, requestedPath, matcher, options, maxMatches,
|
|
|
218
215
|
if (isCancelled())
|
|
219
216
|
break;
|
|
220
217
|
const matchCount = matcher(rawLine);
|
|
221
|
-
|
|
222
|
-
const getContent = () => {
|
|
223
|
-
content ??= trimContent(rawLine);
|
|
224
|
-
return content;
|
|
225
|
-
};
|
|
218
|
+
const trimmedLine = hasContext || matchCount > 0 ? trimContent(rawLine) : '';
|
|
226
219
|
if (matchCount > 0) {
|
|
227
220
|
if (ctx) {
|
|
228
221
|
matches.push({
|
|
229
222
|
file: requestedPath,
|
|
230
223
|
line: lineNumber,
|
|
231
|
-
content:
|
|
224
|
+
content: trimmedLine,
|
|
232
225
|
matchCount,
|
|
233
226
|
contextBefore: ctx.snapshotBefore(),
|
|
234
227
|
contextAfter: ctx.scheduleAfter(),
|
|
@@ -238,13 +231,13 @@ async function readMatches(handle, requestedPath, matcher, options, maxMatches,
|
|
|
238
231
|
matches.push({
|
|
239
232
|
file: requestedPath,
|
|
240
233
|
line: lineNumber,
|
|
241
|
-
content:
|
|
234
|
+
content: trimmedLine,
|
|
242
235
|
matchCount,
|
|
243
236
|
});
|
|
244
237
|
}
|
|
245
238
|
}
|
|
246
239
|
if (ctx) {
|
|
247
|
-
ctx.add(
|
|
240
|
+
ctx.add(trimmedLine);
|
|
248
241
|
}
|
|
249
242
|
lineNumber++;
|
|
250
243
|
}
|
|
@@ -103,7 +103,7 @@ function extractResultError(structured) {
|
|
|
103
103
|
? err['message']
|
|
104
104
|
: undefined;
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function sanitizePathForDiagnostics(path) {
|
|
107
107
|
const { detail } = readConfig();
|
|
108
108
|
if (!path || detail === 0)
|
|
109
109
|
return undefined;
|
|
@@ -119,7 +119,7 @@ function enrichWithToolContext(detail) {
|
|
|
119
119
|
if (!Object.hasOwn(merged, 'tool')) {
|
|
120
120
|
merged.tool = current.tool;
|
|
121
121
|
}
|
|
122
|
-
const normalizedPath =
|
|
122
|
+
const normalizedPath = sanitizePathForDiagnostics(current.path);
|
|
123
123
|
if (normalizedPath && !Object.hasOwn(merged, 'path')) {
|
|
124
124
|
merged.path = normalizedPath;
|
|
125
125
|
}
|
|
@@ -207,7 +207,7 @@ export function getToolContextSnapshot() {
|
|
|
207
207
|
function normalizeContext(ctx) {
|
|
208
208
|
if (!ctx.path)
|
|
209
209
|
return ctx;
|
|
210
|
-
const normalized =
|
|
210
|
+
const normalized = sanitizePathForDiagnostics(ctx.path);
|
|
211
211
|
if (!normalized) {
|
|
212
212
|
const copy = { ...ctx };
|
|
213
213
|
delete copy.path;
|
|
@@ -318,7 +318,7 @@ async function runAndObserve(tool, run, pubTool, pubPerf, logErrors, pathVal) {
|
|
|
318
318
|
}
|
|
319
319
|
export async function withToolDiagnostics(tool, run, options) {
|
|
320
320
|
const config = readConfig();
|
|
321
|
-
const normalizedPath =
|
|
321
|
+
const normalizedPath = sanitizePathForDiagnostics(options?.path);
|
|
322
322
|
const context = {
|
|
323
323
|
tool,
|
|
324
324
|
...(options?.path ? { path: options.path } : {}),
|
|
@@ -433,15 +433,28 @@ async function resolveRootDirectory(root, signal) {
|
|
|
433
433
|
}
|
|
434
434
|
}
|
|
435
435
|
export async function getValidRootDirectories(roots, signal) {
|
|
436
|
+
const fileRoots = roots.filter(isFileRoot);
|
|
437
|
+
if (fileRoots.length === 0)
|
|
438
|
+
return [];
|
|
439
|
+
// Phase 1: Resolve all roots in parallel (order-preserving via index).
|
|
440
|
+
const resolvedResults = await Promise.all(fileRoots.map((root) => resolveRootDirectory(root, signal)));
|
|
441
|
+
const validPaths = resolvedResults.filter((p) => p !== null);
|
|
442
|
+
if (validPaths.length === 0)
|
|
443
|
+
return [];
|
|
444
|
+
// Phase 2: Expand real paths for each valid directory in parallel.
|
|
445
|
+
const realExpansions = await Promise.all(validPaths.map(async (normalizedPath) => {
|
|
446
|
+
const extra = [];
|
|
447
|
+
await maybeAddRealPath(normalizedPath, extra, signal);
|
|
448
|
+
return extra[0] ?? null;
|
|
449
|
+
}));
|
|
450
|
+
// Build output preserving insertion order: [normalizedPath, realPath?] per root.
|
|
436
451
|
const validDirs = [];
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
await maybeAddRealPath(normalizedPath, validDirs, signal);
|
|
445
|
-
}
|
|
452
|
+
validPaths.forEach((p, i) => {
|
|
453
|
+
validDirs.push(p);
|
|
454
|
+
const expanded = realExpansions[i];
|
|
455
|
+
if (expanded !== null && expanded !== undefined) {
|
|
456
|
+
validDirs.push(expanded);
|
|
457
|
+
}
|
|
458
|
+
});
|
|
446
459
|
return validDirs;
|
|
447
460
|
}
|
package/dist/pkg-info.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import packageJsonRaw from '../package.json' with { type: 'json' };
|
|
3
|
+
const PkgInfoSchema = z.object({
|
|
4
|
+
name: z.string(),
|
|
5
|
+
version: z.string(),
|
|
6
|
+
description: z.string().optional(),
|
|
7
|
+
homepage: z.string().optional(),
|
|
8
|
+
});
|
|
9
|
+
export const pkgInfo = PkgInfoSchema.parse(packageJsonRaw);
|
package/dist/schemas.d.ts
CHANGED
|
@@ -124,7 +124,7 @@ export declare const ListAllowedDirectoriesOutputSchema: z.ZodObject<{
|
|
|
124
124
|
path: z.ZodOptional<z.ZodString>;
|
|
125
125
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
126
126
|
}, z.core.$strict>>;
|
|
127
|
-
}, z.core.$
|
|
127
|
+
}, z.core.$strict>;
|
|
128
128
|
export declare const ListDirectoryOutputSchema: z.ZodObject<{
|
|
129
129
|
ok: z.ZodBoolean;
|
|
130
130
|
path: z.ZodOptional<z.ZodString>;
|
|
@@ -139,7 +139,7 @@ export declare const ListDirectoryOutputSchema: z.ZodObject<{
|
|
|
139
139
|
}>;
|
|
140
140
|
size: z.ZodOptional<z.ZodNumber>;
|
|
141
141
|
modified: z.ZodOptional<z.ZodString>;
|
|
142
|
-
}, z.core.$
|
|
142
|
+
}, z.core.$strict>>>;
|
|
143
143
|
totalEntries: z.ZodOptional<z.ZodNumber>;
|
|
144
144
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
145
145
|
entriesScanned: z.ZodOptional<z.ZodNumber>;
|
|
@@ -172,7 +172,7 @@ export declare const ListDirectoryOutputSchema: z.ZodObject<{
|
|
|
172
172
|
path: z.ZodOptional<z.ZodString>;
|
|
173
173
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
174
174
|
}, z.core.$strict>>;
|
|
175
|
-
}, z.core.$
|
|
175
|
+
}, z.core.$strict>;
|
|
176
176
|
export declare const SearchFilesOutputSchema: z.ZodObject<{
|
|
177
177
|
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
178
178
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -203,7 +203,7 @@ export declare const SearchFilesOutputSchema: z.ZodObject<{
|
|
|
203
203
|
path: z.ZodString;
|
|
204
204
|
size: z.ZodOptional<z.ZodNumber>;
|
|
205
205
|
modified: z.ZodOptional<z.ZodString>;
|
|
206
|
-
}, z.core.$
|
|
206
|
+
}, z.core.$strict>>>;
|
|
207
207
|
filesScanned: z.ZodOptional<z.ZodNumber>;
|
|
208
208
|
skippedInaccessible: z.ZodOptional<z.ZodNumber>;
|
|
209
209
|
stoppedReason: z.ZodOptional<z.ZodEnum<{
|
|
@@ -211,7 +211,7 @@ export declare const SearchFilesOutputSchema: z.ZodObject<{
|
|
|
211
211
|
maxFiles: "maxFiles";
|
|
212
212
|
timeout: "timeout";
|
|
213
213
|
}>>;
|
|
214
|
-
}, z.core.$
|
|
214
|
+
}, z.core.$strict>;
|
|
215
215
|
export declare const SearchContentOutputSchema: z.ZodObject<{
|
|
216
216
|
totalMatches: z.ZodOptional<z.ZodNumber>;
|
|
217
217
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -248,7 +248,7 @@ export declare const SearchContentOutputSchema: z.ZodObject<{
|
|
|
248
248
|
matchCount: z.ZodNumber;
|
|
249
249
|
contextBefore: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
250
250
|
contextAfter: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
251
|
-
}, z.core.$
|
|
251
|
+
}, z.core.$strict>>>;
|
|
252
252
|
filesScanned: z.ZodOptional<z.ZodNumber>;
|
|
253
253
|
filesMatched: z.ZodOptional<z.ZodNumber>;
|
|
254
254
|
skippedTooLarge: z.ZodOptional<z.ZodNumber>;
|
|
@@ -260,7 +260,7 @@ export declare const SearchContentOutputSchema: z.ZodObject<{
|
|
|
260
260
|
maxFiles: "maxFiles";
|
|
261
261
|
timeout: "timeout";
|
|
262
262
|
}>>;
|
|
263
|
-
}, z.core.$
|
|
263
|
+
}, z.core.$strict>;
|
|
264
264
|
export declare const TreeOutputSchema: z.ZodObject<{
|
|
265
265
|
ok: z.ZodBoolean;
|
|
266
266
|
root: z.ZodOptional<z.ZodString>;
|
|
@@ -287,7 +287,7 @@ export declare const TreeOutputSchema: z.ZodObject<{
|
|
|
287
287
|
path: z.ZodOptional<z.ZodString>;
|
|
288
288
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
289
289
|
}, z.core.$strict>>;
|
|
290
|
-
}, z.core.$
|
|
290
|
+
}, z.core.$strict>;
|
|
291
291
|
export declare const ReadFileOutputSchema: z.ZodObject<{
|
|
292
292
|
content: z.ZodOptional<z.ZodString>;
|
|
293
293
|
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -324,7 +324,7 @@ export declare const ReadFileOutputSchema: z.ZodObject<{
|
|
|
324
324
|
path: z.ZodOptional<z.ZodString>;
|
|
325
325
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
326
326
|
}, z.core.$strict>>;
|
|
327
|
-
}, z.core.$
|
|
327
|
+
}, z.core.$strict>;
|
|
328
328
|
export declare const ReadMultipleFilesOutputSchema: z.ZodObject<{
|
|
329
329
|
ok: z.ZodBoolean;
|
|
330
330
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -350,12 +350,12 @@ export declare const ReadMultipleFilesOutputSchema: z.ZodObject<{
|
|
|
350
350
|
}>>;
|
|
351
351
|
maxTotalSize: z.ZodOptional<z.ZodNumber>;
|
|
352
352
|
error: z.ZodOptional<z.ZodString>;
|
|
353
|
-
}, z.core.$
|
|
353
|
+
}, z.core.$strict>>>;
|
|
354
354
|
summary: z.ZodOptional<z.ZodObject<{
|
|
355
355
|
total: z.ZodNumber;
|
|
356
356
|
succeeded: z.ZodNumber;
|
|
357
357
|
failed: z.ZodNumber;
|
|
358
|
-
}, z.core.$
|
|
358
|
+
}, z.core.$strict>>;
|
|
359
359
|
error: z.ZodOptional<z.ZodObject<{
|
|
360
360
|
code: z.ZodEnum<{
|
|
361
361
|
readonly E_ACCESS_DENIED: "E_ACCESS_DENIED";
|
|
@@ -375,7 +375,7 @@ export declare const ReadMultipleFilesOutputSchema: z.ZodObject<{
|
|
|
375
375
|
path: z.ZodOptional<z.ZodString>;
|
|
376
376
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
377
377
|
}, z.core.$strict>>;
|
|
378
|
-
}, z.core.$
|
|
378
|
+
}, z.core.$strict>;
|
|
379
379
|
export declare const GetFileInfoOutputSchema: z.ZodObject<{
|
|
380
380
|
ok: z.ZodBoolean;
|
|
381
381
|
info: z.ZodOptional<z.ZodObject<{
|
|
@@ -416,7 +416,7 @@ export declare const GetFileInfoOutputSchema: z.ZodObject<{
|
|
|
416
416
|
path: z.ZodOptional<z.ZodString>;
|
|
417
417
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
418
418
|
}, z.core.$strict>>;
|
|
419
|
-
}, z.core.$
|
|
419
|
+
}, z.core.$strict>;
|
|
420
420
|
export declare const GetMultipleFileInfoOutputSchema: z.ZodObject<{
|
|
421
421
|
ok: z.ZodBoolean;
|
|
422
422
|
results: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
@@ -441,12 +441,12 @@ export declare const GetMultipleFileInfoOutputSchema: z.ZodObject<{
|
|
|
441
441
|
symlinkTarget: z.ZodOptional<z.ZodString>;
|
|
442
442
|
}, z.core.$strict>>;
|
|
443
443
|
error: z.ZodOptional<z.ZodString>;
|
|
444
|
-
}, z.core.$
|
|
444
|
+
}, z.core.$strict>>>;
|
|
445
445
|
summary: z.ZodOptional<z.ZodObject<{
|
|
446
446
|
total: z.ZodNumber;
|
|
447
447
|
succeeded: z.ZodNumber;
|
|
448
448
|
failed: z.ZodNumber;
|
|
449
|
-
}, z.core.$
|
|
449
|
+
}, z.core.$strict>>;
|
|
450
450
|
error: z.ZodOptional<z.ZodObject<{
|
|
451
451
|
code: z.ZodEnum<{
|
|
452
452
|
readonly E_ACCESS_DENIED: "E_ACCESS_DENIED";
|
|
@@ -466,7 +466,7 @@ export declare const GetMultipleFileInfoOutputSchema: z.ZodObject<{
|
|
|
466
466
|
path: z.ZodOptional<z.ZodString>;
|
|
467
467
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
468
468
|
}, z.core.$strict>>;
|
|
469
|
-
}, z.core.$
|
|
469
|
+
}, z.core.$strict>;
|
|
470
470
|
export declare const CreateDirectoryInputSchema: z.ZodObject<{
|
|
471
471
|
path: z.ZodString;
|
|
472
472
|
}, z.core.$strict>;
|
|
@@ -492,7 +492,7 @@ export declare const CreateDirectoryOutputSchema: z.ZodObject<{
|
|
|
492
492
|
path: z.ZodOptional<z.ZodString>;
|
|
493
493
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
494
494
|
}, z.core.$strict>>;
|
|
495
|
-
}, z.core.$
|
|
495
|
+
}, z.core.$strict>;
|
|
496
496
|
export declare const WriteFileInputSchema: z.ZodObject<{
|
|
497
497
|
path: z.ZodString;
|
|
498
498
|
content: z.ZodString;
|
|
@@ -520,13 +520,13 @@ export declare const WriteFileOutputSchema: z.ZodObject<{
|
|
|
520
520
|
path: z.ZodOptional<z.ZodString>;
|
|
521
521
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
522
522
|
}, z.core.$strict>>;
|
|
523
|
-
}, z.core.$
|
|
523
|
+
}, z.core.$strict>;
|
|
524
524
|
export declare const EditFileInputSchema: z.ZodObject<{
|
|
525
525
|
path: z.ZodString;
|
|
526
526
|
edits: z.ZodArray<z.ZodObject<{
|
|
527
527
|
oldText: z.ZodString;
|
|
528
528
|
newText: z.ZodString;
|
|
529
|
-
}, z.core.$
|
|
529
|
+
}, z.core.$strict>>;
|
|
530
530
|
dryRun: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
531
531
|
}, z.core.$strict>;
|
|
532
532
|
export declare const EditFileOutputSchema: z.ZodObject<{
|
|
@@ -554,7 +554,7 @@ export declare const EditFileOutputSchema: z.ZodObject<{
|
|
|
554
554
|
path: z.ZodOptional<z.ZodString>;
|
|
555
555
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
556
556
|
}, z.core.$strict>>;
|
|
557
|
-
}, z.core.$
|
|
557
|
+
}, z.core.$strict>;
|
|
558
558
|
export declare const MoveFileInputSchema: z.ZodObject<{
|
|
559
559
|
source: z.ZodString;
|
|
560
560
|
destination: z.ZodString;
|
|
@@ -582,7 +582,7 @@ export declare const MoveFileOutputSchema: z.ZodObject<{
|
|
|
582
582
|
path: z.ZodOptional<z.ZodString>;
|
|
583
583
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
584
584
|
}, z.core.$strict>>;
|
|
585
|
-
}, z.core.$
|
|
585
|
+
}, z.core.$strict>;
|
|
586
586
|
export declare const DeleteFileInputSchema: z.ZodObject<{
|
|
587
587
|
path: z.ZodString;
|
|
588
588
|
recursive: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
@@ -610,7 +610,7 @@ export declare const DeleteFileOutputSchema: z.ZodObject<{
|
|
|
610
610
|
path: z.ZodOptional<z.ZodString>;
|
|
611
611
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
612
612
|
}, z.core.$strict>>;
|
|
613
|
-
}, z.core.$
|
|
613
|
+
}, z.core.$strict>;
|
|
614
614
|
export declare const CalculateHashInputSchema: z.ZodObject<{
|
|
615
615
|
path: z.ZodString;
|
|
616
616
|
}, z.core.$strict>;
|
|
@@ -639,7 +639,7 @@ export declare const CalculateHashOutputSchema: z.ZodObject<{
|
|
|
639
639
|
path: z.ZodOptional<z.ZodString>;
|
|
640
640
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
641
641
|
}, z.core.$strict>>;
|
|
642
|
-
}, z.core.$
|
|
642
|
+
}, z.core.$strict>;
|
|
643
643
|
export declare const DiffFilesInputSchema: z.ZodObject<{
|
|
644
644
|
original: z.ZodString;
|
|
645
645
|
modified: z.ZodString;
|
|
@@ -672,7 +672,7 @@ export declare const DiffFilesOutputSchema: z.ZodObject<{
|
|
|
672
672
|
path: z.ZodOptional<z.ZodString>;
|
|
673
673
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
674
674
|
}, z.core.$strict>>;
|
|
675
|
-
}, z.core.$
|
|
675
|
+
}, z.core.$strict>;
|
|
676
676
|
export declare const ApplyPatchInputSchema: z.ZodObject<{
|
|
677
677
|
path: z.ZodString;
|
|
678
678
|
patch: z.ZodString;
|
|
@@ -703,7 +703,7 @@ export declare const ApplyPatchOutputSchema: z.ZodObject<{
|
|
|
703
703
|
path: z.ZodOptional<z.ZodString>;
|
|
704
704
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
705
705
|
}, z.core.$strict>>;
|
|
706
|
-
}, z.core.$
|
|
706
|
+
}, z.core.$strict>;
|
|
707
707
|
export declare const SearchAndReplaceInputSchema: z.ZodObject<{
|
|
708
708
|
path: z.ZodOptional<z.ZodString>;
|
|
709
709
|
filePattern: z.ZodString;
|
|
@@ -721,11 +721,11 @@ export declare const SearchAndReplaceOutputSchema: z.ZodObject<{
|
|
|
721
721
|
failures: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
722
722
|
path: z.ZodString;
|
|
723
723
|
error: z.ZodString;
|
|
724
|
-
}, z.core.$
|
|
724
|
+
}, z.core.$strict>>>;
|
|
725
725
|
changedFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
726
726
|
path: z.ZodString;
|
|
727
727
|
matches: z.ZodNumber;
|
|
728
|
-
}, z.core.$
|
|
728
|
+
}, z.core.$strict>>>;
|
|
729
729
|
changedFilesTruncated: z.ZodOptional<z.ZodBoolean>;
|
|
730
730
|
dryRun: z.ZodOptional<z.ZodBoolean>;
|
|
731
731
|
error: z.ZodOptional<z.ZodObject<{
|
|
@@ -747,5 +747,5 @@ export declare const SearchAndReplaceOutputSchema: z.ZodObject<{
|
|
|
747
747
|
path: z.ZodOptional<z.ZodString>;
|
|
748
748
|
suggestion: z.ZodOptional<z.ZodString>;
|
|
749
749
|
}, z.core.$strict>>;
|
|
750
|
-
}, z.core.$
|
|
750
|
+
}, z.core.$strict>;
|
|
751
751
|
export {};
|