@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/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";