@j0hanz/filesystem-mcp 1.19.0 → 2.0.0
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 +333 -838
- package/dist/cli-help.d.ts +3 -0
- package/dist/cli-help.d.ts.map +1 -0
- package/dist/cli-help.js +169 -0
- package/dist/cli-help.js.map +1 -0
- package/dist/cli.d.ts +28 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +168 -123
- package/dist/cli.js.map +1 -0
- package/dist/core/concurrency.d.ts +70 -0
- package/dist/core/concurrency.d.ts.map +1 -0
- package/dist/core/concurrency.js +173 -0
- package/dist/core/concurrency.js.map +1 -0
- package/dist/core/config.d.ts +19 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +11 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/cursor.d.ts +23 -0
- package/dist/core/cursor.d.ts.map +1 -0
- package/dist/core/cursor.js +62 -0
- package/dist/core/cursor.js.map +1 -0
- package/dist/core/errors.d.ts +96 -0
- package/dist/core/errors.d.ts.map +1 -0
- package/dist/core/errors.js +356 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/file-uri.d.ts +24 -0
- package/dist/core/file-uri.d.ts.map +1 -0
- package/dist/core/file-uri.js +52 -0
- package/dist/core/file-uri.js.map +1 -0
- package/dist/core/fmt.d.ts +38 -0
- package/dist/core/fmt.d.ts.map +1 -0
- package/dist/core/fmt.js +109 -0
- package/dist/core/fmt.js.map +1 -0
- package/dist/core/fs.d.ts +108 -0
- package/dist/core/fs.d.ts.map +1 -0
- package/dist/core/fs.js +243 -0
- package/dist/core/fs.js.map +1 -0
- package/dist/core/glob.d.ts +41 -0
- package/dist/core/glob.d.ts.map +1 -0
- package/dist/core/glob.js +399 -0
- package/dist/core/glob.js.map +1 -0
- package/dist/core/input-required.d.ts +147 -0
- package/dist/core/input-required.d.ts.map +1 -0
- package/dist/core/input-required.js +261 -0
- package/dist/core/input-required.js.map +1 -0
- package/dist/core/mime.d.ts +15 -0
- package/dist/core/mime.d.ts.map +1 -0
- package/dist/core/mime.js +188 -0
- package/dist/core/mime.js.map +1 -0
- package/dist/core/observability.d.ts +10 -0
- package/dist/core/observability.d.ts.map +1 -0
- package/dist/core/observability.js +76 -0
- package/dist/core/observability.js.map +1 -0
- package/dist/core/page-store.d.ts +41 -0
- package/dist/core/page-store.d.ts.map +1 -0
- package/dist/core/page-store.js +74 -0
- package/dist/core/page-store.js.map +1 -0
- package/dist/core/path-completer.d.ts +10 -0
- package/dist/core/path-completer.d.ts.map +1 -0
- package/dist/core/path-completer.js +227 -0
- package/dist/core/path-completer.js.map +1 -0
- package/dist/core/path-discovery.d.ts +8 -0
- package/dist/core/path-discovery.d.ts.map +1 -0
- package/dist/core/path-discovery.js +105 -0
- package/dist/core/path-discovery.js.map +1 -0
- package/dist/core/path-utils.d.ts +9 -0
- package/dist/core/path-utils.d.ts.map +1 -0
- package/dist/core/path-utils.js +121 -0
- package/dist/core/path-utils.js.map +1 -0
- package/dist/core/path.d.ts +148 -0
- package/dist/core/path.d.ts.map +1 -0
- package/dist/core/path.js +674 -0
- package/dist/core/path.js.map +1 -0
- package/dist/core/primitives.d.ts +23 -0
- package/dist/core/primitives.d.ts.map +1 -0
- package/dist/core/primitives.js +54 -0
- package/dist/core/primitives.js.map +1 -0
- package/dist/core/read.d.ts +74 -0
- package/dist/core/read.d.ts.map +1 -0
- package/dist/core/read.js +562 -0
- package/dist/core/read.js.map +1 -0
- package/dist/core/schema.d.ts +139 -0
- package/dist/core/schema.d.ts.map +1 -0
- package/dist/core/schema.js +345 -0
- package/dist/core/schema.js.map +1 -0
- package/dist/core/search.d.ts +100 -0
- package/dist/core/search.d.ts.map +1 -0
- package/dist/core/search.js +248 -0
- package/dist/core/search.js.map +1 -0
- package/dist/core/sensitive.d.ts +6 -0
- package/dist/core/sensitive.d.ts.map +1 -0
- package/dist/core/sensitive.js +142 -0
- package/dist/core/sensitive.js.map +1 -0
- package/dist/core/store.d.ts +57 -0
- package/dist/core/store.d.ts.map +1 -0
- package/dist/core/store.js +162 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/util.d.ts +26 -0
- package/dist/core/util.d.ts.map +1 -0
- package/dist/core/util.js +66 -0
- package/dist/core/util.js.map +1 -0
- package/dist/core/watcher-registry.d.ts +68 -0
- package/dist/core/watcher-registry.d.ts.map +1 -0
- package/dist/core/watcher-registry.js +312 -0
- package/dist/core/watcher-registry.js.map +1 -0
- package/dist/http-policy.d.ts +121 -0
- package/dist/http-policy.d.ts.map +1 -0
- package/dist/http-policy.js +340 -0
- package/dist/http-policy.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +77 -41
- package/dist/index.js.map +1 -0
- package/dist/instructions.d.ts +12 -0
- package/dist/instructions.d.ts.map +1 -0
- package/dist/instructions.js +71 -0
- package/dist/instructions.js.map +1 -0
- package/dist/prompts.d.ts +8 -6
- package/dist/prompts.d.ts.map +1 -0
- package/dist/prompts.js +74 -168
- package/dist/prompts.js.map +1 -0
- package/dist/resources.d.ts +73 -9
- package/dist/resources.d.ts.map +1 -0
- package/dist/resources.js +392 -163
- package/dist/resources.js.map +1 -0
- package/dist/server.d.ts +62 -1
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +139 -1
- package/dist/server.js.map +1 -0
- package/dist/tools/batch.d.ts +89 -0
- package/dist/tools/batch.d.ts.map +1 -0
- package/dist/tools/batch.js +157 -0
- package/dist/tools/batch.js.map +1 -0
- package/dist/tools/create.d.ts +2 -0
- package/dist/tools/create.d.ts.map +1 -0
- package/dist/tools/create.js +142 -0
- package/dist/tools/create.js.map +1 -0
- package/dist/tools/define.d.ts +110 -0
- package/dist/tools/define.d.ts.map +1 -0
- package/dist/tools/define.js +394 -0
- package/dist/tools/define.js.map +1 -0
- package/dist/tools/delete-file.d.ts +2 -4
- package/dist/tools/delete-file.d.ts.map +1 -0
- package/dist/tools/delete-file.js +330 -87
- package/dist/tools/delete-file.js.map +1 -0
- package/dist/tools/diff.d.ts +2 -0
- package/dist/tools/diff.d.ts.map +1 -0
- package/dist/tools/diff.js +94 -0
- package/dist/tools/diff.js.map +1 -0
- package/dist/tools/edit.d.ts +2 -0
- package/dist/tools/edit.d.ts.map +1 -0
- package/dist/tools/edit.js +442 -0
- package/dist/tools/edit.js.map +1 -0
- package/dist/tools/index.d.ts +26 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +52 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/list.d.ts +2 -0
- package/dist/tools/list.d.ts.map +1 -0
- package/dist/tools/list.js +291 -0
- package/dist/tools/list.js.map +1 -0
- package/dist/tools/move.d.ts +2 -0
- package/dist/tools/move.d.ts.map +1 -0
- package/dist/tools/move.js +321 -0
- package/dist/tools/move.js.map +1 -0
- package/dist/tools/patch.d.ts +2 -0
- package/dist/tools/patch.d.ts.map +1 -0
- package/dist/tools/patch.js +155 -0
- package/dist/tools/patch.js.map +1 -0
- package/dist/tools/progress.d.ts +52 -0
- package/dist/tools/progress.d.ts.map +1 -0
- package/dist/tools/progress.js +172 -0
- package/dist/tools/progress.js.map +1 -0
- package/dist/tools/read.d.ts +2 -4
- package/dist/tools/read.d.ts.map +1 -0
- package/dist/tools/read.js +398 -152
- package/dist/tools/read.js.map +1 -0
- package/dist/tools/replace-in-files.d.ts +2 -4
- package/dist/tools/replace-in-files.d.ts.map +1 -0
- package/dist/tools/replace-in-files.js +435 -264
- package/dist/tools/replace-in-files.js.map +1 -0
- package/dist/tools/roots.d.ts +2 -4
- package/dist/tools/roots.d.ts.map +1 -0
- package/dist/tools/roots.js +29 -52
- package/dist/tools/roots.js.map +1 -0
- package/dist/tools/search-content.d.ts +2 -4
- package/dist/tools/search-content.d.ts.map +1 -0
- package/dist/tools/search-content.js +262 -228
- package/dist/tools/search-content.js.map +1 -0
- package/dist/tools/search-files.d.ts +2 -4
- package/dist/tools/search-files.d.ts.map +1 -0
- package/dist/tools/search-files.js +162 -161
- package/dist/tools/search-files.js.map +1 -0
- package/dist/tools/stat.d.ts +2 -4
- package/dist/tools/stat.d.ts.map +1 -0
- package/dist/tools/stat.js +202 -62
- package/dist/tools/stat.js.map +1 -0
- package/dist/transport/http.d.ts +5 -0
- package/dist/transport/http.d.ts.map +1 -0
- package/dist/transport/http.js +276 -0
- package/dist/transport/http.js.map +1 -0
- package/dist/transport/shared.d.ts +45 -0
- package/dist/transport/shared.d.ts.map +1 -0
- package/dist/transport/shared.js +65 -0
- package/dist/transport/shared.js.map +1 -0
- package/dist/transport/stdio.d.ts +32 -0
- package/dist/transport/stdio.d.ts.map +1 -0
- package/dist/transport/stdio.js +279 -0
- package/dist/transport/stdio.js.map +1 -0
- package/dist/transport.d.ts +5 -0
- package/dist/transport.d.ts.map +1 -0
- package/dist/transport.js +4 -0
- package/dist/transport.js.map +1 -0
- package/package.json +37 -46
- package/dist/assets/logo.svg +0 -35
- package/dist/completions.d.ts +0 -2
- package/dist/completions.js +0 -572
- package/dist/config.d.ts +0 -119
- package/dist/config.js +0 -31
- package/dist/lib/abort.d.ts +0 -7
- package/dist/lib/abort.js +0 -81
- package/dist/lib/constants.d.ts +0 -42
- package/dist/lib/constants.js +0 -313
- package/dist/lib/errors.d.ts +0 -28
- package/dist/lib/errors.js +0 -301
- package/dist/lib/file-operations/core.d.ts +0 -53
- package/dist/lib/file-operations/core.js +0 -144
- package/dist/lib/file-operations/metadata.d.ts +0 -77
- package/dist/lib/file-operations/metadata.js +0 -878
- package/dist/lib/file-operations/search.d.ts +0 -46
- package/dist/lib/file-operations/search.js +0 -1194
- package/dist/lib/file-operations/traversal.d.ts +0 -40
- package/dist/lib/file-operations/traversal.js +0 -310
- package/dist/lib/fs-helpers.d.ts +0 -46
- package/dist/lib/fs-helpers.js +0 -606
- package/dist/lib/globs.d.ts +0 -2
- package/dist/lib/globs.js +0 -19
- package/dist/lib/logger.d.ts +0 -27
- package/dist/lib/logger.js +0 -91
- package/dist/lib/observability.d.ts +0 -33
- package/dist/lib/observability.js +0 -373
- package/dist/lib/paths.d.ts +0 -35
- package/dist/lib/paths.js +0 -634
- package/dist/lib/resource-store.d.ts +0 -28
- package/dist/lib/resource-store.js +0 -195
- package/dist/lib/utils.d.ts +0 -7
- package/dist/lib/utils.js +0 -37
- package/dist/lib/zod-codecs.d.ts +0 -2
- package/dist/lib/zod-codecs.js +0 -18
- package/dist/pkg-info.d.ts +0 -7
- package/dist/pkg-info.js +0 -9
- package/dist/resources/generated-instructions.d.ts +0 -1
- package/dist/resources/generated-instructions.js +0 -105
- package/dist/resources/tool-catalog.d.ts +0 -2
- package/dist/resources/tool-catalog.js +0 -78
- package/dist/resources/tool-info.d.ts +0 -9
- package/dist/resources/tool-info.js +0 -206
- package/dist/resources/workflows.d.ts +0 -1
- package/dist/resources/workflows.js +0 -72
- package/dist/schemas.d.ts +0 -505
- package/dist/schemas.js +0 -676
- package/dist/server/bootstrap.d.ts +0 -6
- package/dist/server/bootstrap.js +0 -563
- package/dist/server/event-store.d.ts +0 -18
- package/dist/server/event-store.js +0 -71
- package/dist/server/roots-manager.d.ts +0 -28
- package/dist/server/roots-manager.js +0 -227
- package/dist/server/task-store.d.ts +0 -10
- package/dist/server/task-store.js +0 -91
- package/dist/tools/apply-patch.d.ts +0 -4
- package/dist/tools/apply-patch.js +0 -235
- package/dist/tools/calculate-hash.d.ts +0 -4
- package/dist/tools/calculate-hash.js +0 -187
- package/dist/tools/contract.d.ts +0 -50
- package/dist/tools/contract.js +0 -1
- package/dist/tools/create-directory.d.ts +0 -4
- package/dist/tools/create-directory.js +0 -68
- package/dist/tools/diff-files.d.ts +0 -4
- package/dist/tools/diff-files.js +0 -136
- package/dist/tools/edit-file.d.ts +0 -4
- package/dist/tools/edit-file.js +0 -256
- package/dist/tools/icons.d.ts +0 -15
- package/dist/tools/icons.js +0 -24
- package/dist/tools/list-directory.d.ts +0 -4
- package/dist/tools/list-directory.js +0 -218
- package/dist/tools/move-file.d.ts +0 -4
- package/dist/tools/move-file.js +0 -178
- package/dist/tools/read-multiple.d.ts +0 -4
- package/dist/tools/read-multiple.js +0 -207
- package/dist/tools/shared.d.ts +0 -172
- package/dist/tools/shared.js +0 -599
- package/dist/tools/stat-many.d.ts +0 -4
- package/dist/tools/stat-many.js +0 -104
- package/dist/tools/task-support.d.ts +0 -29
- package/dist/tools/task-support.js +0 -472
- package/dist/tools/tree.d.ts +0 -4
- package/dist/tools/tree.js +0 -102
- package/dist/tools/write-file.d.ts +0 -4
- package/dist/tools/write-file.js +0 -60
- package/dist/tools.d.ts +0 -5
- package/dist/tools.js +0 -54
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
export declare const IsoDateTime: z.ZodISODateTime;
|
|
3
|
+
export declare const Sha256Hex: z.ZodString;
|
|
4
|
+
export declare const NonNegInt: z.ZodInt;
|
|
5
|
+
export declare const PositiveInt: z.ZodInt;
|
|
6
|
+
declare const FILE_TYPES: readonly ["file", "directory", "symlink", "other"];
|
|
7
|
+
export type FileType = (typeof FILE_TYPES)[number];
|
|
8
|
+
export declare const FileType: z.ZodEnum<{
|
|
9
|
+
file: "file";
|
|
10
|
+
directory: "directory";
|
|
11
|
+
symlink: "symlink";
|
|
12
|
+
other: "other";
|
|
13
|
+
}>;
|
|
14
|
+
declare const FILE_KINDS: readonly ["text", "binary", "image", "audio", "pdf"];
|
|
15
|
+
export type FileKind = (typeof FILE_KINDS)[number];
|
|
16
|
+
export declare const FileKind: z.ZodEnum<{
|
|
17
|
+
binary: "binary";
|
|
18
|
+
text: "text";
|
|
19
|
+
image: "image";
|
|
20
|
+
audio: "audio";
|
|
21
|
+
pdf: "pdf";
|
|
22
|
+
}>;
|
|
23
|
+
export declare const SHELL_METACHAR_RE: RegExp;
|
|
24
|
+
export declare const isBlank: (val: string) => boolean;
|
|
25
|
+
export declare const OptionalPath: z.ZodOptional<z.ZodString>;
|
|
26
|
+
export declare const RequiredPath: z.ZodString;
|
|
27
|
+
export declare const SafeGlobPattern: z.ZodString;
|
|
28
|
+
export declare const FileInfoSchema: z.ZodObject<{
|
|
29
|
+
name: z.ZodString;
|
|
30
|
+
path: z.ZodString;
|
|
31
|
+
type: z.ZodEnum<{
|
|
32
|
+
file: "file";
|
|
33
|
+
directory: "directory";
|
|
34
|
+
symlink: "symlink";
|
|
35
|
+
other: "other";
|
|
36
|
+
}>;
|
|
37
|
+
size: z.ZodInt;
|
|
38
|
+
tokenEstimate: z.ZodOptional<z.ZodInt>;
|
|
39
|
+
created: z.ZodISODateTime;
|
|
40
|
+
modified: z.ZodISODateTime;
|
|
41
|
+
accessed: z.ZodISODateTime;
|
|
42
|
+
permissions: z.ZodString;
|
|
43
|
+
isHidden: z.ZodBoolean;
|
|
44
|
+
mimeType: z.ZodOptional<z.ZodString>;
|
|
45
|
+
symlinkTarget: z.ZodOptional<z.ZodString>;
|
|
46
|
+
}, z.core.$strict>;
|
|
47
|
+
export declare const OperationSummarySchema: z.ZodObject<{
|
|
48
|
+
total: z.ZodInt;
|
|
49
|
+
succeeded: z.ZodInt;
|
|
50
|
+
failed: z.ZodInt;
|
|
51
|
+
}, z.core.$strict>;
|
|
52
|
+
export declare const PerFileErrorSchema: z.ZodObject<{
|
|
53
|
+
code: z.ZodString;
|
|
54
|
+
message: z.ZodString;
|
|
55
|
+
path: z.ZodOptional<z.ZodString>;
|
|
56
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
57
|
+
}, z.core.$strict>;
|
|
58
|
+
/** One entry of a tool's `failures[]`: the path that failed and why. */
|
|
59
|
+
export declare const PathFailureSchema: z.ZodObject<{
|
|
60
|
+
path: z.ZodString;
|
|
61
|
+
error: z.ZodObject<{
|
|
62
|
+
code: z.ZodString;
|
|
63
|
+
message: z.ZodString;
|
|
64
|
+
path: z.ZodOptional<z.ZodString>;
|
|
65
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
66
|
+
}, z.core.$strict>;
|
|
67
|
+
}, z.core.$strict>;
|
|
68
|
+
/**
|
|
69
|
+
* One entry of a source→destination tool's `failures[]`. The verb and noun stay
|
|
70
|
+
* per-op so the `.describe()` text reads correctly for each caller.
|
|
71
|
+
*/
|
|
72
|
+
export declare function pairFailureSchema(verb: 'copied' | 'moved', noun: 'copy' | 'move'): z.ZodObject<{
|
|
73
|
+
source: z.ZodString;
|
|
74
|
+
destination: z.ZodString;
|
|
75
|
+
error: z.ZodObject<{
|
|
76
|
+
code: z.ZodString;
|
|
77
|
+
message: z.ZodString;
|
|
78
|
+
path: z.ZodOptional<z.ZodString>;
|
|
79
|
+
suggestion: z.ZodOptional<z.ZodString>;
|
|
80
|
+
}, z.core.$strict>;
|
|
81
|
+
}, z.core.$strict>;
|
|
82
|
+
/** Wire shape of a `pairFailureSchema` entry — the runtime twin of the schema. */
|
|
83
|
+
export type PairFailureItem = z.infer<ReturnType<typeof pairFailureSchema>>;
|
|
84
|
+
interface ReadRangeDescriptions {
|
|
85
|
+
head: string;
|
|
86
|
+
tail: string;
|
|
87
|
+
startLine: string;
|
|
88
|
+
endLine: string;
|
|
89
|
+
}
|
|
90
|
+
export declare function createReadRangeFields(descs: ReadRangeDescriptions): {
|
|
91
|
+
head: z.ZodOptional<z.ZodInt32>;
|
|
92
|
+
tail: z.ZodOptional<z.ZodInt32>;
|
|
93
|
+
startLine: z.ZodOptional<z.ZodInt32>;
|
|
94
|
+
endLine: z.ZodOptional<z.ZodInt32>;
|
|
95
|
+
};
|
|
96
|
+
export declare function validateReadRange(value: {
|
|
97
|
+
head?: number | undefined;
|
|
98
|
+
tail?: number | undefined;
|
|
99
|
+
startLine?: number | undefined;
|
|
100
|
+
endLine?: number | undefined;
|
|
101
|
+
}, ctx: z.RefinementCtx): void;
|
|
102
|
+
export declare function defaultFalseBoolean(description: string): z.ZodDefault<z.ZodBoolean>;
|
|
103
|
+
export declare const includeHiddenField: () => z.ZodDefault<z.ZodBoolean>;
|
|
104
|
+
export declare const includeIgnoredField: () => z.ZodDefault<z.ZodBoolean>;
|
|
105
|
+
export declare const maxDepthField: () => z.ZodOptional<z.ZodNumber>;
|
|
106
|
+
export type SingleOrBatchShape<TExtra extends z.ZodRawShape> = TExtra & {
|
|
107
|
+
path: z.ZodOptional<typeof RequiredPath>;
|
|
108
|
+
paths: z.ZodOptional<z.ZodArray<typeof RequiredPath>>;
|
|
109
|
+
};
|
|
110
|
+
export declare function singleOrBatchPathsInput<TExtra extends z.ZodRawShape>(opts: {
|
|
111
|
+
extra: TExtra;
|
|
112
|
+
maxBatch?: number;
|
|
113
|
+
}): z.ZodObject<SingleOrBatchShape<TExtra>>;
|
|
114
|
+
/**
|
|
115
|
+
* Extract the filesystem paths from a {@link singleOrBatchPathsInput} shape
|
|
116
|
+
* (`{ path?, paths?, files?[{path}] }`) for the executor's access-grant
|
|
117
|
+
* pre-check. Exactly one of the three is set (enforced by the schema's
|
|
118
|
+
* superRefine), so they are checked in priority order.
|
|
119
|
+
*/
|
|
120
|
+
export declare function singleOrBatchAccessPaths(args: {
|
|
121
|
+
path?: string | undefined;
|
|
122
|
+
paths?: string[] | undefined;
|
|
123
|
+
files?: readonly {
|
|
124
|
+
path: string;
|
|
125
|
+
}[] | undefined;
|
|
126
|
+
}): string[];
|
|
127
|
+
export declare const ContinuationSchema: z.ZodObject<{
|
|
128
|
+
tool: z.ZodString;
|
|
129
|
+
args: z.ZodObject<{
|
|
130
|
+
path: z.ZodString;
|
|
131
|
+
startLine: z.ZodInt;
|
|
132
|
+
endLine: z.ZodInt;
|
|
133
|
+
}, z.core.$strict>;
|
|
134
|
+
hint: z.ZodString;
|
|
135
|
+
}, z.core.$strict>;
|
|
136
|
+
export declare const CursorSchema: z.ZodOptional<z.ZodString>;
|
|
137
|
+
export declare const NextCursorSchema: z.ZodOptional<z.ZodString>;
|
|
138
|
+
export {};
|
|
139
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../src/core/schema.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E,MAAM,CAAC;CACnB,GAAG,CAAC,CAAC,SAAS,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAC,CA4C1C;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE;IAC7C,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,SAAS;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,SAAS,CAAC;CACjD,GAAG,MAAM,EAAE,CAKX;AAQD,eAAO,MAAM,kBAAkB;;;;;;;;kBAM7B,CAAC;AAQH,eAAO,MAAM,YAAY,4BAKtB,CAAC;AAEJ,eAAO,MAAM,gBAAgB,4BAEgD,CAAC"}
|
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import * as z from 'zod/v4';
|
|
2
|
+
import { isSafeGlobSyntax } from './glob.js';
|
|
3
|
+
import { MIME_KINDS } from './mime.js';
|
|
4
|
+
import { ENTRY_TYPES } from './primitives.js';
|
|
5
|
+
import { MAX_SEARCH_DEPTH } from './util.js';
|
|
6
|
+
// Runtime: full ISO-8601 UTC; emits the standard `date-time` format on the wire
|
|
7
|
+
// (no AJV warning — it is a known format, unlike sha256_hex / base64url).
|
|
8
|
+
// No `id` on this or any other shared schema below: an `id` hoists the schema
|
|
9
|
+
// into `$defs` and leaves a `$ref` at every use site, which is exactly the wire
|
|
10
|
+
// weight `toDraft202012` (tools/define.ts) publishes without.
|
|
11
|
+
export const IsoDateTime = z.iso.datetime().meta({
|
|
12
|
+
description: 'ISO 8601 UTC date-time string (e.g. 2024-01-15T12:00:00.000Z)',
|
|
13
|
+
// `format: "date-time"` already pins the value; zod's ~330-char calendar
|
|
14
|
+
// regex is pure wire weight. Runtime validation still runs it — this
|
|
15
|
+
// suppresses the emitted keyword only.
|
|
16
|
+
pattern: undefined,
|
|
17
|
+
});
|
|
18
|
+
// pattern (not z.hash('sha256')) so no `format: "sha256_hex"` keyword is emitted;
|
|
19
|
+
// the SDK's AJV validator warns on that unknown format at every server start.
|
|
20
|
+
export const Sha256Hex = z
|
|
21
|
+
.string()
|
|
22
|
+
.regex(/^[0-9a-f]{64}$/)
|
|
23
|
+
.meta({ description: 'SHA-256 digest as a 64-character lowercase hex string' });
|
|
24
|
+
export const NonNegInt = z
|
|
25
|
+
.int({ message: 'Must be integer' })
|
|
26
|
+
.nonnegative({ message: 'Must be ≥ 0' });
|
|
27
|
+
export const PositiveInt = z
|
|
28
|
+
.int({ message: 'Must be integer' })
|
|
29
|
+
.positive({ message: 'Must be > 0' });
|
|
30
|
+
const FILE_TYPES = ENTRY_TYPES;
|
|
31
|
+
export const FileType = z.enum(FILE_TYPES);
|
|
32
|
+
const FILE_KINDS = MIME_KINDS;
|
|
33
|
+
export const FileKind = z.enum(FILE_KINDS);
|
|
34
|
+
const MAX_PATH_LENGTH = 4096;
|
|
35
|
+
export const SHELL_METACHAR_RE = /[\n\r;|`]/;
|
|
36
|
+
export const isBlank = (val) => val.trim().length === 0;
|
|
37
|
+
const PathBase = z
|
|
38
|
+
.string()
|
|
39
|
+
.min(1, { message: 'Path required' })
|
|
40
|
+
.max(MAX_PATH_LENGTH, { message: `Path too long (max ${MAX_PATH_LENGTH} chars)` })
|
|
41
|
+
.superRefine((val, ctx) => {
|
|
42
|
+
if (val.length === 0) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
if (val.trim().length === 0) {
|
|
46
|
+
ctx.addIssue({
|
|
47
|
+
code: 'custom',
|
|
48
|
+
message: 'Path cannot be empty or whitespace-only',
|
|
49
|
+
fatal: true,
|
|
50
|
+
});
|
|
51
|
+
return z.NEVER;
|
|
52
|
+
}
|
|
53
|
+
if (val.includes('\0')) {
|
|
54
|
+
ctx.addIssue({
|
|
55
|
+
code: 'custom',
|
|
56
|
+
message: 'Path cannot contain null bytes',
|
|
57
|
+
fatal: true,
|
|
58
|
+
});
|
|
59
|
+
return z.NEVER;
|
|
60
|
+
}
|
|
61
|
+
if (val.includes('..')) {
|
|
62
|
+
ctx.addIssue({
|
|
63
|
+
code: 'custom',
|
|
64
|
+
message: 'Directory traversal sequences ("..") are forbidden',
|
|
65
|
+
fatal: true,
|
|
66
|
+
});
|
|
67
|
+
return z.NEVER;
|
|
68
|
+
}
|
|
69
|
+
if (SHELL_METACHAR_RE.test(val)) {
|
|
70
|
+
ctx.addIssue({
|
|
71
|
+
code: 'custom',
|
|
72
|
+
message: 'Path contains prohibited characters (newlines or shell metacharacters)',
|
|
73
|
+
fatal: true,
|
|
74
|
+
});
|
|
75
|
+
return z.NEVER;
|
|
76
|
+
}
|
|
77
|
+
})
|
|
78
|
+
.describe('File or directory path inside an allowed workspace root.');
|
|
79
|
+
export const OptionalPath = PathBase.optional();
|
|
80
|
+
export const RequiredPath = PathBase;
|
|
81
|
+
export const SafeGlobPattern = z
|
|
82
|
+
.string()
|
|
83
|
+
.min(1, { message: 'Pattern required' })
|
|
84
|
+
.max(1000, { message: 'Max 1000 chars' })
|
|
85
|
+
.superRefine((val, ctx) => {
|
|
86
|
+
if (val.length === 0) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
if (val.trim().length === 0) {
|
|
90
|
+
ctx.addIssue({
|
|
91
|
+
code: 'custom',
|
|
92
|
+
message: 'Pattern cannot be empty or whitespace-only',
|
|
93
|
+
fatal: true,
|
|
94
|
+
});
|
|
95
|
+
return z.NEVER;
|
|
96
|
+
}
|
|
97
|
+
if (val.includes('\0')) {
|
|
98
|
+
ctx.addIssue({
|
|
99
|
+
code: 'custom',
|
|
100
|
+
message: 'Pattern cannot contain null bytes',
|
|
101
|
+
fatal: true,
|
|
102
|
+
});
|
|
103
|
+
return z.NEVER;
|
|
104
|
+
}
|
|
105
|
+
if (!isSafeGlobSyntax(val)) {
|
|
106
|
+
ctx.addIssue({
|
|
107
|
+
code: 'custom',
|
|
108
|
+
message: 'Invalid glob or unsafe path (absolute/.. forbidden)',
|
|
109
|
+
fatal: true,
|
|
110
|
+
});
|
|
111
|
+
return z.NEVER;
|
|
112
|
+
}
|
|
113
|
+
if (SHELL_METACHAR_RE.test(val)) {
|
|
114
|
+
ctx.addIssue({
|
|
115
|
+
code: 'custom',
|
|
116
|
+
message: 'Pattern contains prohibited characters (newlines or shell metacharacters)',
|
|
117
|
+
fatal: true,
|
|
118
|
+
});
|
|
119
|
+
return z.NEVER;
|
|
120
|
+
}
|
|
121
|
+
})
|
|
122
|
+
.describe('Relative glob pattern under the search root (e.g. "**/*.ts", "src/**/*.js").')
|
|
123
|
+
.meta({ examples: ['**/*.ts', 'src/**/*.js', '*.{ts,tsx}'] });
|
|
124
|
+
// Only the fields whose key does not already say what they hold carry a
|
|
125
|
+
// description. A `.describe('Name')` on `name` costs every client tokens to
|
|
126
|
+
// learn nothing.
|
|
127
|
+
export const FileInfoSchema = z.strictObject({
|
|
128
|
+
name: z.string(),
|
|
129
|
+
path: z.string(),
|
|
130
|
+
type: FileType,
|
|
131
|
+
size: NonNegInt,
|
|
132
|
+
tokenEstimate: NonNegInt.optional().describe('Rough token estimate; use to pre-screen read cost'),
|
|
133
|
+
created: IsoDateTime,
|
|
134
|
+
modified: IsoDateTime,
|
|
135
|
+
accessed: IsoDateTime,
|
|
136
|
+
permissions: z.string(),
|
|
137
|
+
isHidden: z.boolean(),
|
|
138
|
+
mimeType: z.string().optional(),
|
|
139
|
+
symlinkTarget: z.string().optional().describe('Target (symlink)'),
|
|
140
|
+
});
|
|
141
|
+
export const OperationSummarySchema = z.strictObject({
|
|
142
|
+
total: NonNegInt,
|
|
143
|
+
succeeded: NonNegInt,
|
|
144
|
+
failed: NonNegInt,
|
|
145
|
+
});
|
|
146
|
+
export const PerFileErrorSchema = z.strictObject({
|
|
147
|
+
code: z.string(),
|
|
148
|
+
message: z.string(),
|
|
149
|
+
path: z.string().optional(),
|
|
150
|
+
suggestion: z.string().optional(),
|
|
151
|
+
});
|
|
152
|
+
/** One entry of a tool's `failures[]`: the path that failed and why. */
|
|
153
|
+
export const PathFailureSchema = z.strictObject({
|
|
154
|
+
path: z.string(),
|
|
155
|
+
error: PerFileErrorSchema,
|
|
156
|
+
});
|
|
157
|
+
/**
|
|
158
|
+
* One entry of a source→destination tool's `failures[]`. The verb and noun stay
|
|
159
|
+
* per-op so the `.describe()` text reads correctly for each caller.
|
|
160
|
+
*/
|
|
161
|
+
export function pairFailureSchema(verb, noun) {
|
|
162
|
+
return z.strictObject({
|
|
163
|
+
source: z.string().describe(`Source path that could not be ${verb}`),
|
|
164
|
+
destination: z.string().describe(`Intended destination path for the failed ${noun}`),
|
|
165
|
+
error: PerFileErrorSchema,
|
|
166
|
+
});
|
|
167
|
+
}
|
|
168
|
+
export function createReadRangeFields(descs) {
|
|
169
|
+
return {
|
|
170
|
+
head: z
|
|
171
|
+
.int32()
|
|
172
|
+
.min(1, { message: 'Min: 1' })
|
|
173
|
+
.max(100000, { message: 'Max: 100,000' })
|
|
174
|
+
.optional()
|
|
175
|
+
.describe(descs.head),
|
|
176
|
+
tail: z
|
|
177
|
+
.int32()
|
|
178
|
+
.min(1, { message: 'Min: 1' })
|
|
179
|
+
.max(100000, { message: 'Max: 100,000' })
|
|
180
|
+
.optional()
|
|
181
|
+
.describe(descs.tail),
|
|
182
|
+
startLine: z
|
|
183
|
+
.int32()
|
|
184
|
+
.min(1, { message: 'Min: 1' })
|
|
185
|
+
.max(100000, { message: 'Max: 100,000' })
|
|
186
|
+
.optional()
|
|
187
|
+
.describe(descs.startLine),
|
|
188
|
+
endLine: z
|
|
189
|
+
.int32()
|
|
190
|
+
.min(1, { message: 'Min: 1' })
|
|
191
|
+
.max(100000, { message: 'Max: 100,000' })
|
|
192
|
+
.optional()
|
|
193
|
+
.describe(descs.endLine),
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
export function validateReadRange(value, ctx) {
|
|
197
|
+
const hasHead = value.head !== undefined;
|
|
198
|
+
const hasTail = value.tail !== undefined;
|
|
199
|
+
const hasStart = value.startLine !== undefined;
|
|
200
|
+
const hasEnd = value.endLine !== undefined;
|
|
201
|
+
if (hasHead && (hasStart || hasEnd)) {
|
|
202
|
+
ctx.addIssue({
|
|
203
|
+
code: 'custom',
|
|
204
|
+
path: ['head'],
|
|
205
|
+
message: "Cannot use 'head' with 'startLine'/'endLine'",
|
|
206
|
+
params: {
|
|
207
|
+
rule: 'head_no_line_range',
|
|
208
|
+
conflictsWith: ['startLine', 'endLine'],
|
|
209
|
+
suggestion: "Use either 'head' alone or 'startLine'/'endLine' together.",
|
|
210
|
+
},
|
|
211
|
+
input: value,
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
if (hasTail && (hasHead || hasStart || hasEnd)) {
|
|
215
|
+
ctx.addIssue({
|
|
216
|
+
code: 'custom',
|
|
217
|
+
path: ['tail'],
|
|
218
|
+
message: "Cannot use 'tail' with 'head'/'startLine'/'endLine'",
|
|
219
|
+
params: {
|
|
220
|
+
rule: 'tail_exclusive',
|
|
221
|
+
conflictsWith: ['head', 'startLine', 'endLine'],
|
|
222
|
+
suggestion: "Use 'tail' alone or use 'startLine'/'endLine' without 'tail'.",
|
|
223
|
+
},
|
|
224
|
+
input: value,
|
|
225
|
+
});
|
|
226
|
+
}
|
|
227
|
+
if (hasEnd && !hasStart) {
|
|
228
|
+
ctx.addIssue({
|
|
229
|
+
code: 'custom',
|
|
230
|
+
path: ['endLine'],
|
|
231
|
+
message: "'endLine' requires 'startLine' to be set",
|
|
232
|
+
params: {
|
|
233
|
+
rule: 'endLine_requires_startLine',
|
|
234
|
+
suggestion: "Provide both 'startLine' and 'endLine' together.",
|
|
235
|
+
},
|
|
236
|
+
input: value,
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
const effectiveStart = value.startLine ?? 1;
|
|
240
|
+
if (value.endLine !== undefined && value.endLine < effectiveStart) {
|
|
241
|
+
ctx.addIssue({
|
|
242
|
+
code: 'custom',
|
|
243
|
+
path: ['endLine'],
|
|
244
|
+
message: "'endLine' must be >= 'startLine'",
|
|
245
|
+
params: {
|
|
246
|
+
rule: 'endLine_gte_startLine',
|
|
247
|
+
conflictsWith: ['startLine'],
|
|
248
|
+
suggestion: 'Set endLine to a value greater than or equal to startLine.',
|
|
249
|
+
},
|
|
250
|
+
input: value,
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
export function defaultFalseBoolean(description) {
|
|
255
|
+
return z.boolean().default(false).describe(description);
|
|
256
|
+
}
|
|
257
|
+
export const includeHiddenField = () => defaultFalseBoolean('Include hidden items (starting with .)');
|
|
258
|
+
export const includeIgnoredField = () => defaultFalseBoolean('Include ignored items (node_modules, .git, etc).');
|
|
259
|
+
export const maxDepthField = () => z
|
|
260
|
+
.uint32()
|
|
261
|
+
.min(0)
|
|
262
|
+
.max(MAX_SEARCH_DEPTH)
|
|
263
|
+
.optional()
|
|
264
|
+
.describe('Max directory depth to scan; 0 = base directory only, omit for unlimited');
|
|
265
|
+
const DEFAULT_MAX_BATCH = 1000;
|
|
266
|
+
export function singleOrBatchPathsInput(opts) {
|
|
267
|
+
const maxBatch = opts.maxBatch ?? DEFAULT_MAX_BATCH;
|
|
268
|
+
const shape = {
|
|
269
|
+
...opts.extra,
|
|
270
|
+
path: RequiredPath.optional().describe('Single file path; mutually exclusive with paths'),
|
|
271
|
+
paths: z
|
|
272
|
+
.array(RequiredPath)
|
|
273
|
+
.min(1)
|
|
274
|
+
.max(maxBatch)
|
|
275
|
+
.optional()
|
|
276
|
+
.describe(`Array of file paths for batch mode (max ${String(maxBatch)}); mutually exclusive with path`),
|
|
277
|
+
};
|
|
278
|
+
const base = z.strictObject(shape).superRefine((value, ctx) => {
|
|
279
|
+
const hasPath = value['path'] !== undefined;
|
|
280
|
+
const hasPaths = value['paths'] !== undefined;
|
|
281
|
+
if (!hasPath && !hasPaths) {
|
|
282
|
+
ctx.addIssue({
|
|
283
|
+
code: 'custom',
|
|
284
|
+
path: ['path'],
|
|
285
|
+
message: "Either 'path' or 'paths' must be provided",
|
|
286
|
+
input: value,
|
|
287
|
+
});
|
|
288
|
+
return;
|
|
289
|
+
}
|
|
290
|
+
if (hasPath && hasPaths) {
|
|
291
|
+
ctx.addIssue({
|
|
292
|
+
code: 'custom',
|
|
293
|
+
path: ['paths'],
|
|
294
|
+
message: "Cannot use both 'path' and 'paths'",
|
|
295
|
+
input: value,
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
});
|
|
299
|
+
// Mirror the superRefine above on the wire: exactly one input mode. `{}` and
|
|
300
|
+
// `path`+`paths` both fail this oneOf, matching the runtime rule.
|
|
301
|
+
return base.meta({
|
|
302
|
+
oneOf: [{ required: ['path'] }, { required: ['paths'] }],
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Extract the filesystem paths from a {@link singleOrBatchPathsInput} shape
|
|
307
|
+
* (`{ path?, paths?, files?[{path}] }`) for the executor's access-grant
|
|
308
|
+
* pre-check. Exactly one of the three is set (enforced by the schema's
|
|
309
|
+
* superRefine), so they are checked in priority order.
|
|
310
|
+
*/
|
|
311
|
+
export function singleOrBatchAccessPaths(args) {
|
|
312
|
+
if (args.path)
|
|
313
|
+
return [args.path];
|
|
314
|
+
if (args.paths)
|
|
315
|
+
return [...args.paths];
|
|
316
|
+
if (args.files)
|
|
317
|
+
return args.files.map((f) => f.path);
|
|
318
|
+
return [];
|
|
319
|
+
}
|
|
320
|
+
// `args` is the exact argument object the one producer (read's
|
|
321
|
+
// buildReadContinuation) emits, not a free-form record: a bare
|
|
322
|
+
// `z.record(z.string(), z.unknown())` renders as `additionalProperties: {}`,
|
|
323
|
+
// which carries no validation keyword and constrains nothing — the Inspector's
|
|
324
|
+
// portability check flags it, and a client cannot tell what to pass. Widen this
|
|
325
|
+
// (to a union) only when a second tool starts emitting continuations.
|
|
326
|
+
export const ContinuationSchema = z.strictObject({
|
|
327
|
+
tool: z.string().describe('Tool name to call for the next chunk'),
|
|
328
|
+
args: z
|
|
329
|
+
.strictObject({ path: z.string(), startLine: PositiveInt, endLine: PositiveInt })
|
|
330
|
+
.describe('Ready-to-use arguments for the next call; pass verbatim'),
|
|
331
|
+
hint: z.string().describe('One-sentence description of the data still remaining to be read'),
|
|
332
|
+
});
|
|
333
|
+
// ponytail: charset regex, not z.base64url() — the SDK's AJV warns on the
|
|
334
|
+
// unknown `base64url` format; the server's own decode (cursor.ts) is the real
|
|
335
|
+
// validation, so loosening the client-facing schema to the alphabet is safe.
|
|
336
|
+
const base64urlCursor = z.string().regex(/^[A-Za-z0-9_-]+$/);
|
|
337
|
+
// Ships once per paginated tool — wording is budgeted (TOOL-SURFACE-002).
|
|
338
|
+
export const CursorSchema = base64urlCursor
|
|
339
|
+
.optional()
|
|
340
|
+
.describe('Opaque pagination cursor; pass unchanged for the next page. Pages slice one snapshot ' +
|
|
341
|
+
'taken on the first call; it expires after ~60s — re-request without a cursor if rejected.');
|
|
342
|
+
export const NextCursorSchema = base64urlCursor
|
|
343
|
+
.optional()
|
|
344
|
+
.describe('Cursor for the next page; omitted when this is the final page.');
|
|
345
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../src/core/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAE7C,gFAAgF;AAChF,0EAA0E;AAC1E,8EAA8E;AAC9E,gFAAgF;AAChF,8DAA8D;AAC9D,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC;IAC/C,WAAW,EAAE,+DAA+D;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AM,EAAE,CAAC,QAAQ,CAAC,iEAAiE,CAAC;CAC7F,CAAC,CAAC;AAEH,0EAA0E;AAC1E,8EAA8E;AAC9E,6EAA6E;AAC7E,MAAM,eAAe,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,CAAC;AAE7D,0EAA0E;AAC1E,MAAM,CAAC,MAAM,YAAY,GAAG,eAAe;KACxC,QAAQ,EAAE;KACV,QAAQ,CACP,uFAAuF;IACrF,2FAA2F,CAC9F,CAAC;AAEJ,MAAM,CAAC,MAAM,gBAAgB,GAAG,eAAe;KAC5C,QAAQ,EAAE;KACV,QAAQ,CAAC,gEAAgE,CAAC,CAAC","sourcesContent":["import * as z from 'zod/v4';\n\nimport { isSafeGlobSyntax } from './glob.js';\nimport { MIME_KINDS } from './mime.js';\nimport { ENTRY_TYPES } from './primitives.js';\nimport { MAX_SEARCH_DEPTH } from './util.js';\n\n// Runtime: full ISO-8601 UTC; emits the standard `date-time` format on the wire\n// (no AJV warning — it is a known format, unlike sha256_hex / base64url).\n// No `id` on this or any other shared schema below: an `id` hoists the schema\n// into `$defs` and leaves a `$ref` at every use site, which is exactly the wire\n// weight `toDraft202012` (tools/define.ts) publishes without.\nexport const IsoDateTime = z.iso.datetime().meta({\n description: 'ISO 8601 UTC date-time string (e.g. 2024-01-15T12:00:00.000Z)',\n // `format: \"date-time\"` already pins the value; zod's ~330-char calendar\n // regex is pure wire weight. Runtime validation still runs it — this\n // suppresses the emitted keyword only.\n pattern: undefined,\n});\n\n// pattern (not z.hash('sha256')) so no `format: \"sha256_hex\"` keyword is emitted;\n// the SDK's AJV validator warns on that unknown format at every server start.\nexport const Sha256Hex = z\n .string()\n .regex(/^[0-9a-f]{64}$/)\n .meta({ description: 'SHA-256 digest as a 64-character lowercase hex string' });\n\nexport const NonNegInt = z\n .int({ message: 'Must be integer' })\n .nonnegative({ message: 'Must be ≥ 0' });\n\nexport const PositiveInt = z\n .int({ message: 'Must be integer' })\n .positive({ message: 'Must be > 0' });\n\nconst FILE_TYPES = ENTRY_TYPES;\nexport type FileType = (typeof FILE_TYPES)[number];\nexport const FileType = z.enum(FILE_TYPES);\n\nconst FILE_KINDS = MIME_KINDS;\nexport type FileKind = (typeof FILE_KINDS)[number];\nexport const FileKind = z.enum(FILE_KINDS);\n\nconst MAX_PATH_LENGTH = 4096;\n\nexport const SHELL_METACHAR_RE = /[\\n\\r;|`]/;\n\nexport const isBlank = (val: string): boolean => val.trim().length === 0;\n\nconst PathBase = z\n .string()\n .min(1, { message: 'Path required' })\n .max(MAX_PATH_LENGTH, { message: `Path too long (max ${MAX_PATH_LENGTH} chars)` })\n .superRefine((val, ctx) => {\n if (val.length === 0) {\n return;\n }\n if (val.trim().length === 0) {\n ctx.addIssue({\n code: 'custom',\n message: 'Path cannot be empty or whitespace-only',\n fatal: true,\n });\n return z.NEVER;\n }\n if (val.includes('\\0')) {\n ctx.addIssue({\n code: 'custom',\n message: 'Path cannot contain null bytes',\n fatal: true,\n });\n return z.NEVER;\n }\n if (val.includes('..')) {\n ctx.addIssue({\n code: 'custom',\n message: 'Directory traversal sequences (\"..\") are forbidden',\n fatal: true,\n });\n return z.NEVER;\n }\n if (SHELL_METACHAR_RE.test(val)) {\n ctx.addIssue({\n code: 'custom',\n message: 'Path contains prohibited characters (newlines or shell metacharacters)',\n fatal: true,\n });\n return z.NEVER;\n }\n })\n .describe('File or directory path inside an allowed workspace root.');\n\nexport const OptionalPath = PathBase.optional();\nexport const RequiredPath = PathBase;\n\nexport const SafeGlobPattern = z\n .string()\n .min(1, { message: 'Pattern required' })\n .max(1000, { message: 'Max 1000 chars' })\n .superRefine((val, ctx) => {\n if (val.length === 0) {\n return;\n }\n if (val.trim().length === 0) {\n ctx.addIssue({\n code: 'custom',\n message: 'Pattern cannot be empty or whitespace-only',\n fatal: true,\n });\n return z.NEVER;\n }\n if (val.includes('\\0')) {\n ctx.addIssue({\n code: 'custom',\n message: 'Pattern cannot contain null bytes',\n fatal: true,\n });\n return z.NEVER;\n }\n if (!isSafeGlobSyntax(val)) {\n ctx.addIssue({\n code: 'custom',\n message: 'Invalid glob or unsafe path (absolute/.. forbidden)',\n fatal: true,\n });\n return z.NEVER;\n }\n if (SHELL_METACHAR_RE.test(val)) {\n ctx.addIssue({\n code: 'custom',\n message: 'Pattern contains prohibited characters (newlines or shell metacharacters)',\n fatal: true,\n });\n return z.NEVER;\n }\n })\n .describe('Relative glob pattern under the search root (e.g. \"**/*.ts\", \"src/**/*.js\").')\n .meta({ examples: ['**/*.ts', 'src/**/*.js', '*.{ts,tsx}'] });\n\n// Only the fields whose key does not already say what they hold carry a\n// description. A `.describe('Name')` on `name` costs every client tokens to\n// learn nothing.\nexport const FileInfoSchema = z.strictObject({\n name: z.string(),\n path: z.string(),\n type: FileType,\n size: NonNegInt,\n tokenEstimate: NonNegInt.optional().describe('Rough token estimate; use to pre-screen read cost'),\n created: IsoDateTime,\n modified: IsoDateTime,\n accessed: IsoDateTime,\n permissions: z.string(),\n isHidden: z.boolean(),\n mimeType: z.string().optional(),\n symlinkTarget: z.string().optional().describe('Target (symlink)'),\n});\n\nexport const OperationSummarySchema = z.strictObject({\n total: NonNegInt,\n succeeded: NonNegInt,\n failed: NonNegInt,\n});\n\nexport const PerFileErrorSchema = z.strictObject({\n code: z.string(),\n message: z.string(),\n path: z.string().optional(),\n suggestion: z.string().optional(),\n});\n\n/** One entry of a tool's `failures[]`: the path that failed and why. */\nexport const PathFailureSchema = z.strictObject({\n path: z.string(),\n error: PerFileErrorSchema,\n});\n\n/**\n * One entry of a source→destination tool's `failures[]`. The verb and noun stay\n * per-op so the `.describe()` text reads correctly for each caller.\n */\nexport function pairFailureSchema(verb: 'copied' | 'moved', noun: 'copy' | 'move') {\n return z.strictObject({\n source: z.string().describe(`Source path that could not be ${verb}`),\n destination: z.string().describe(`Intended destination path for the failed ${noun}`),\n error: PerFileErrorSchema,\n });\n}\n\n/** Wire shape of a `pairFailureSchema` entry — the runtime twin of the schema. */\nexport type PairFailureItem = z.infer<ReturnType<typeof pairFailureSchema>>;\n\n// TODO(future): Wrap createReadRangeFields output in a typed Zod object with built-in\n// cross-validation. Safe for now — the only caller (read.ts) calls validateReadRange in its own superRefine.\ninterface ReadRangeDescriptions {\n head: string;\n tail: string;\n startLine: string;\n endLine: string;\n}\n\nexport function createReadRangeFields(descs: ReadRangeDescriptions) {\n return {\n head: z\n .int32()\n .min(1, { message: 'Min: 1' })\n .max(100000, { message: 'Max: 100,000' })\n .optional()\n .describe(descs.head),\n tail: z\n .int32()\n .min(1, { message: 'Min: 1' })\n .max(100000, { message: 'Max: 100,000' })\n .optional()\n .describe(descs.tail),\n startLine: z\n .int32()\n .min(1, { message: 'Min: 1' })\n .max(100000, { message: 'Max: 100,000' })\n .optional()\n .describe(descs.startLine),\n endLine: z\n .int32()\n .min(1, { message: 'Min: 1' })\n .max(100000, { message: 'Max: 100,000' })\n .optional()\n .describe(descs.endLine),\n };\n}\n\nexport function validateReadRange(\n value: {\n head?: number | undefined;\n tail?: number | undefined;\n startLine?: number | undefined;\n endLine?: number | undefined;\n },\n ctx: z.RefinementCtx,\n): void {\n const hasHead = value.head !== undefined;\n const hasTail = value.tail !== undefined;\n const hasStart = value.startLine !== undefined;\n const hasEnd = value.endLine !== undefined;\n\n if (hasHead && (hasStart || hasEnd)) {\n ctx.addIssue({\n code: 'custom',\n path: ['head'],\n message: \"Cannot use 'head' with 'startLine'/'endLine'\",\n params: {\n rule: 'head_no_line_range',\n conflictsWith: ['startLine', 'endLine'],\n suggestion: \"Use either 'head' alone or 'startLine'/'endLine' together.\",\n },\n input: value,\n });\n }\n if (hasTail && (hasHead || hasStart || hasEnd)) {\n ctx.addIssue({\n code: 'custom',\n path: ['tail'],\n message: \"Cannot use 'tail' with 'head'/'startLine'/'endLine'\",\n params: {\n rule: 'tail_exclusive',\n conflictsWith: ['head', 'startLine', 'endLine'],\n suggestion: \"Use 'tail' alone or use 'startLine'/'endLine' without 'tail'.\",\n },\n input: value,\n });\n }\n if (hasEnd && !hasStart) {\n ctx.addIssue({\n code: 'custom',\n path: ['endLine'],\n message: \"'endLine' requires 'startLine' to be set\",\n params: {\n rule: 'endLine_requires_startLine',\n suggestion: \"Provide both 'startLine' and 'endLine' together.\",\n },\n input: value,\n });\n }\n const effectiveStart = value.startLine ?? 1;\n if (value.endLine !== undefined && value.endLine < effectiveStart) {\n ctx.addIssue({\n code: 'custom',\n path: ['endLine'],\n message: \"'endLine' must be >= 'startLine'\",\n params: {\n rule: 'endLine_gte_startLine',\n conflictsWith: ['startLine'],\n suggestion: 'Set endLine to a value greater than or equal to startLine.',\n },\n input: value,\n });\n }\n}\n\nexport function defaultFalseBoolean(description: string): z.ZodDefault<z.ZodBoolean> {\n return z.boolean().default(false).describe(description);\n}\n\nexport const includeHiddenField = (): z.ZodDefault<z.ZodBoolean> =>\n defaultFalseBoolean('Include hidden items (starting with .)');\nexport const includeIgnoredField = (): z.ZodDefault<z.ZodBoolean> =>\n defaultFalseBoolean('Include ignored items (node_modules, .git, etc).');\nexport const maxDepthField = (): z.ZodOptional<z.ZodNumber> =>\n z\n .uint32()\n .min(0)\n .max(MAX_SEARCH_DEPTH)\n .optional()\n .describe('Max directory depth to scan; 0 = base directory only, omit for unlimited');\n\nconst DEFAULT_MAX_BATCH = 1000;\n\nexport type SingleOrBatchShape<TExtra extends z.ZodRawShape> = TExtra & {\n path: z.ZodOptional<typeof RequiredPath>;\n paths: z.ZodOptional<z.ZodArray<typeof RequiredPath>>;\n};\n\nexport function singleOrBatchPathsInput<TExtra extends z.ZodRawShape>(opts: {\n extra: TExtra;\n maxBatch?: number;\n}): z.ZodObject<SingleOrBatchShape<TExtra>> {\n const maxBatch = opts.maxBatch ?? DEFAULT_MAX_BATCH;\n\n const shape: z.ZodRawShape = {\n ...opts.extra,\n path: RequiredPath.optional().describe('Single file path; mutually exclusive with paths'),\n paths: z\n .array(RequiredPath)\n .min(1)\n .max(maxBatch)\n .optional()\n .describe(\n `Array of file paths for batch mode (max ${String(maxBatch)}); mutually exclusive with path`,\n ),\n };\n\n const base = z.strictObject(shape).superRefine((value, ctx) => {\n const hasPath = value['path'] !== undefined;\n const hasPaths = value['paths'] !== undefined;\n\n if (!hasPath && !hasPaths) {\n ctx.addIssue({\n code: 'custom',\n path: ['path'],\n message: \"Either 'path' or 'paths' must be provided\",\n input: value,\n });\n return;\n }\n if (hasPath && hasPaths) {\n ctx.addIssue({\n code: 'custom',\n path: ['paths'],\n message: \"Cannot use both 'path' and 'paths'\",\n input: value,\n });\n }\n });\n\n // Mirror the superRefine above on the wire: exactly one input mode. `{}` and\n // `path`+`paths` both fail this oneOf, matching the runtime rule.\n return base.meta({\n oneOf: [{ required: ['path'] }, { required: ['paths'] }],\n }) as z.ZodObject<SingleOrBatchShape<TExtra>>;\n}\n\n/**\n * Extract the filesystem paths from a {@link singleOrBatchPathsInput} shape\n * (`{ path?, paths?, files?[{path}] }`) for the executor's access-grant\n * pre-check. Exactly one of the three is set (enforced by the schema's\n * superRefine), so they are checked in priority order.\n */\nexport function singleOrBatchAccessPaths(args: {\n path?: string | undefined;\n paths?: string[] | undefined;\n files?: readonly { path: string }[] | undefined;\n}): string[] {\n if (args.path) return [args.path];\n if (args.paths) return [...args.paths];\n if (args.files) return args.files.map((f) => f.path);\n return [];\n}\n\n// `args` is the exact argument object the one producer (read's\n// buildReadContinuation) emits, not a free-form record: a bare\n// `z.record(z.string(), z.unknown())` renders as `additionalProperties: {}`,\n// which carries no validation keyword and constrains nothing — the Inspector's\n// portability check flags it, and a client cannot tell what to pass. Widen this\n// (to a union) only when a second tool starts emitting continuations.\nexport const ContinuationSchema = z.strictObject({\n tool: z.string().describe('Tool name to call for the next chunk'),\n args: z\n .strictObject({ path: z.string(), startLine: PositiveInt, endLine: PositiveInt })\n .describe('Ready-to-use arguments for the next call; pass verbatim'),\n hint: z.string().describe('One-sentence description of the data still remaining to be read'),\n});\n\n// ponytail: charset regex, not z.base64url() — the SDK's AJV warns on the\n// unknown `base64url` format; the server's own decode (cursor.ts) is the real\n// validation, so loosening the client-facing schema to the alphabet is safe.\nconst base64urlCursor = z.string().regex(/^[A-Za-z0-9_-]+$/);\n\n// Ships once per paginated tool — wording is budgeted (TOOL-SURFACE-002).\nexport const CursorSchema = base64urlCursor\n .optional()\n .describe(\n 'Opaque pagination cursor; pass unchanged for the next page. Pages slice one snapshot ' +\n 'taken on the first call; it expires after ~60s — re-request without a cursor if rejected.',\n );\n\nexport const NextCursorSchema = base64urlCursor\n .optional()\n .describe('Cursor for the next page; omitted when this is the final page.');\n"]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { RE2 } from '@adguard/re2-wasm';
|
|
2
|
+
import type { StoppedReason } from './concurrency.js';
|
|
3
|
+
import type { PathGuard } from './path.js';
|
|
4
|
+
interface SearchResult {
|
|
5
|
+
file: string;
|
|
6
|
+
line: number;
|
|
7
|
+
content: string;
|
|
8
|
+
matchCount?: number;
|
|
9
|
+
}
|
|
10
|
+
export type Regex = RE2;
|
|
11
|
+
export interface RegexCompileOptions {
|
|
12
|
+
caseSensitive?: boolean;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Compile a pattern on RE2 rather than on V8's irregexp.
|
|
16
|
+
*
|
|
17
|
+
* Patterns arrive from the MCP client, so a backtracking engine would let one
|
|
18
|
+
* request pin the event loop with no way out: an abort signal cannot preempt a
|
|
19
|
+
* synchronous `exec`, and on stdio that wedges the whole server. RE2 matches in
|
|
20
|
+
* time linear in the input and cannot backtrack at all, so the hazard is gone
|
|
21
|
+
* rather than bounded.
|
|
22
|
+
*
|
|
23
|
+
* RE2 rejects the constructs the tool schema documents as unsupported —
|
|
24
|
+
* lookahead, lookbehind, backreferences — with its own {@link SyntaxError},
|
|
25
|
+
* which the tool layer turns into a normal tool error. It always matches in
|
|
26
|
+
* Unicode mode and requires the `u` flag to say so.
|
|
27
|
+
*
|
|
28
|
+
* Every compiled pattern owns memory in re2-wasm's fixed 16 MB heap, which
|
|
29
|
+
* `ALLOW_MEMORY_GROWTH` is off for. re2-wasm never frees it and a
|
|
30
|
+
* FinalizationRegistry does not keep up (V8 sees no pressure from the wasm
|
|
31
|
+
* heap), so exhaustion is an emscripten `abort()` that kills regex search for
|
|
32
|
+
* the rest of the process. Every caller MUST pass the result to
|
|
33
|
+
* {@link freeRegex} when it is done with it.
|
|
34
|
+
*/
|
|
35
|
+
export declare function compileRegex(pattern: string, options?: RegexCompileOptions): Regex;
|
|
36
|
+
/**
|
|
37
|
+
* Release a compiled pattern's wasm memory. re2-wasm exposes no disposal of its
|
|
38
|
+
* own, so this reaches the embind handle it holds privately; a version that
|
|
39
|
+
* renames the field degrades to the pre-existing leak rather than throwing.
|
|
40
|
+
* Idempotent — a second call on an already-freed handle is swallowed. Using a
|
|
41
|
+
* {@link Regex} after freeing it is undefined behaviour in the wasm heap, so
|
|
42
|
+
* free only in a `finally` that owns the compile.
|
|
43
|
+
*/
|
|
44
|
+
export declare function freeRegex(regex: Regex | undefined): void;
|
|
45
|
+
export interface SearchContentOptions {
|
|
46
|
+
caseSensitive?: boolean;
|
|
47
|
+
isRegex?: boolean;
|
|
48
|
+
maxResults?: number;
|
|
49
|
+
filePattern?: string;
|
|
50
|
+
excludePatterns?: string[];
|
|
51
|
+
respectGitignore?: boolean;
|
|
52
|
+
includeHidden?: boolean;
|
|
53
|
+
maxDepth?: number;
|
|
54
|
+
maxFileSize?: number;
|
|
55
|
+
signal?: AbortSignal;
|
|
56
|
+
}
|
|
57
|
+
export interface SearchContentOutcome {
|
|
58
|
+
basePath: string;
|
|
59
|
+
matches: SearchResult[];
|
|
60
|
+
summary: {
|
|
61
|
+
/**
|
|
62
|
+
* Matching *lines*, one per entry in `matches` — not pattern occurrences.
|
|
63
|
+
* A line with three occurrences counts once here and reports 3 in its own
|
|
64
|
+
* `SearchResult.matchCount`.
|
|
65
|
+
*/
|
|
66
|
+
matchingLines: number;
|
|
67
|
+
filesScanned: number;
|
|
68
|
+
filesMatched: number;
|
|
69
|
+
truncated: boolean;
|
|
70
|
+
/** Files the guard rejected or that could not be stat'd. */
|
|
71
|
+
skippedInaccessible: number;
|
|
72
|
+
/** Files skipped unread because they exceed maxFileSize. */
|
|
73
|
+
skippedTooLarge: number;
|
|
74
|
+
stoppedReason?: StoppedReason;
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
/** Owns the compiled pattern's lifetime; the scan itself is `scanContent`. */
|
|
78
|
+
export declare function searchContent(directory: string, pattern: string, options: SearchContentOptions, pathGuard: PathGuard): Promise<SearchContentOutcome>;
|
|
79
|
+
export declare function searchFiles(directory: string, pattern: string, excludePatterns: string[], options: {
|
|
80
|
+
maxResults?: number;
|
|
81
|
+
includeHidden?: boolean;
|
|
82
|
+
sortBy?: 'name' | 'path';
|
|
83
|
+
respectGitignore?: boolean;
|
|
84
|
+
maxDepth?: number;
|
|
85
|
+
signal?: AbortSignal;
|
|
86
|
+
}, pathGuard: PathGuard): Promise<{
|
|
87
|
+
basePath: string;
|
|
88
|
+
results: {
|
|
89
|
+
path: string;
|
|
90
|
+
}[];
|
|
91
|
+
summary: {
|
|
92
|
+
matched: number;
|
|
93
|
+
filesScanned: number;
|
|
94
|
+
truncated: boolean;
|
|
95
|
+
skippedInaccessible: number;
|
|
96
|
+
stoppedReason?: StoppedReason;
|
|
97
|
+
};
|
|
98
|
+
}>;
|
|
99
|
+
export {};
|
|
100
|
+
//# sourceMappingURL=search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search.d.ts","sourceRoot":"","sources":["../../src/core/search.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAI3C,UAAU,YAAY;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EA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