@levnikolaevich/hex-line-mcp 1.3.1 → 1.3.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 +120 -47
- package/benchmark/atomic.mjs +502 -0
- package/benchmark/graph.mjs +80 -0
- package/benchmark/index.mjs +144 -0
- package/benchmark/workflows.mjs +350 -0
- package/hook.mjs +48 -15
- package/lib/benchmark-helpers.mjs +1 -1
- package/lib/changes.mjs +2 -1
- package/lib/coerce.mjs +1 -42
- package/lib/edit.mjs +258 -248
- package/lib/graph-enrich.mjs +76 -58
- package/lib/hash.mjs +1 -109
- package/lib/info.mjs +1 -1
- package/lib/normalize.mjs +1 -106
- package/lib/outline.mjs +32 -87
- package/lib/read.mjs +8 -5
- package/lib/revisions.mjs +238 -0
- package/lib/search.mjs +6 -7
- package/lib/security.mjs +4 -4
- package/lib/setup.mjs +7 -20
- package/lib/update-check.mjs +1 -56
- package/lib/verify.mjs +32 -16
- package/output-style.md +21 -6
- package/package.json +18 -6
- package/server.mjs +35 -43
- package/benchmark.mjs +0 -1106
package/lib/coerce.mjs
CHANGED
|
@@ -1,42 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Parameter aliases: common alternative names -> canonical schema names.
|
|
3
|
-
* Applied BEFORE Zod validation so agents sending wrong param names still work.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
const ALIASES = {
|
|
7
|
-
// read_file
|
|
8
|
-
file_path: "path",
|
|
9
|
-
filePath: "path",
|
|
10
|
-
file: "path",
|
|
11
|
-
|
|
12
|
-
// grep_search
|
|
13
|
-
query: "pattern",
|
|
14
|
-
search: "pattern",
|
|
15
|
-
ignoreCase: "case_insensitive",
|
|
16
|
-
ignore_case: "case_insensitive",
|
|
17
|
-
|
|
18
|
-
// edit_file
|
|
19
|
-
dryRun: "dry_run",
|
|
20
|
-
"dry-run": "dry_run",
|
|
21
|
-
restoreIndent: "restore_indent",
|
|
22
|
-
"restore-indent": "restore_indent",
|
|
23
|
-
|
|
24
|
-
// directory_tree
|
|
25
|
-
maxDepth: "max_depth",
|
|
26
|
-
depth: "max_depth",
|
|
27
|
-
name: "pattern",
|
|
28
|
-
filter: "pattern",
|
|
29
|
-
entry_type: "type",
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
export function coerceParams(params) {
|
|
33
|
-
if (!params || typeof params !== "object") return params;
|
|
34
|
-
const result = { ...params };
|
|
35
|
-
for (const [alias, canonical] of Object.entries(ALIASES)) {
|
|
36
|
-
if (alias in result && !(canonical in result)) {
|
|
37
|
-
result[canonical] = result[alias];
|
|
38
|
-
delete result[alias];
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return result;
|
|
42
|
-
}
|
|
1
|
+
export * from "@levnikolaevich/hex-common/runtime/coerce";
|