@levnikolaevich/hex-line-mcp 1.4.0 → 1.6.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 +51 -37
- package/dist/hook.mjs +63 -22
- package/dist/server.mjs +895 -442
- package/output-style.md +23 -21
- package/package.json +4 -4
package/output-style.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: hex-line
|
|
3
|
-
description: hex-line MCP tool preferences
|
|
3
|
+
description: hex-line MCP tool preferences with compact coding style
|
|
4
4
|
keep-coding-instructions: true
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# MCP Tool Preferences
|
|
8
8
|
|
|
9
|
-
**PREFER** hex-line MCP for code files
|
|
9
|
+
**PREFER** hex-line MCP for code files. Hash-annotated reads and verified edits keep context cheap and safe.
|
|
10
10
|
|
|
11
11
|
| Instead of | Use | Why |
|
|
12
12
|
|-----------|-----|-----|
|
|
13
13
|
| Read | `mcp__hex-line__read_file` | Hash-annotated, revision-aware |
|
|
14
14
|
| Edit | `mcp__hex-line__edit_file` | Hash-verified anchors + conservative auto-rebase |
|
|
15
15
|
| Write | `mcp__hex-line__write_file` | No prior Read needed |
|
|
16
|
-
| Grep | `mcp__hex-line__grep_search` |
|
|
16
|
+
| Grep | `mcp__hex-line__grep_search` | Edit-ready matches |
|
|
17
17
|
| Edit (text rename) | `mcp__hex-line__bulk_replace` | Multi-file text rename/refactor |
|
|
18
18
|
| Bash `find`/`tree` | `mcp__hex-line__directory_tree` | Pattern search, gitignore-aware |
|
|
19
19
|
|
|
20
20
|
## Efficient File Reading
|
|
21
21
|
|
|
22
|
-
For
|
|
23
|
-
1. `outline` first
|
|
24
|
-
2. `read_file` with offset
|
|
25
|
-
3.
|
|
22
|
+
For unfamiliar code files >100 lines, prefer:
|
|
23
|
+
1. `outline` first
|
|
24
|
+
2. `read_file` with `offset`/`limit` or `ranges`
|
|
25
|
+
3. `paths` or `ranges` when batching several targets
|
|
26
26
|
|
|
27
|
-
Avoid reading a large file in full
|
|
27
|
+
Avoid reading a large file in full. Prefer compact, targeted reads.
|
|
28
28
|
|
|
29
29
|
Bash OK for: npm/node/git/docker/curl, pipes, compound commands.
|
|
30
|
-
**Built-in OK for:** images, PDFs, notebooks, Glob (always), `.claude/settings.json
|
|
30
|
+
**Built-in OK for:** images, PDFs, notebooks, Glob (always), `.claude/settings.json`, `.claude/settings.local.json`.
|
|
31
31
|
|
|
32
32
|
## Edit Workflow
|
|
33
33
|
|
|
@@ -35,24 +35,26 @@ Prefer:
|
|
|
35
35
|
1. collect all known hunks for one file
|
|
36
36
|
2. send one `edit_file` call with batched edits
|
|
37
37
|
3. carry `revision` from `read_file` into `base_revision` on follow-up edits
|
|
38
|
-
4.
|
|
39
|
-
5. use `verify` before rereading
|
|
38
|
+
4. use `set_line`, `replace_lines`, `insert_after`, `replace_between` based on scope
|
|
39
|
+
5. use `verify` before rereading after staleness
|
|
40
|
+
|
|
41
|
+
Post-edit output uses `block: post_edit` with checksum — use it directly for follow-up edits or verify.
|
|
40
42
|
|
|
41
43
|
Avoid:
|
|
42
44
|
- chained same-file `edit_file` calls when all edits are already known
|
|
43
45
|
- full-file rewrites for local changes
|
|
44
46
|
- using `bulk_replace` for structural block rewrites
|
|
45
47
|
|
|
46
|
-
#
|
|
47
|
-
|
|
48
|
-
Provide educational insights about the codebase alongside task completion. When providing insights, you may exceed typical length constraints, but remain focused and relevant.
|
|
49
|
-
|
|
50
|
-
## Insights
|
|
48
|
+
# Response Style
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
Keep responses compact and operational. Explain only what is needed to complete the task or justify a non-obvious decision.
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
Prefer:
|
|
53
|
+
- short progress updates
|
|
54
|
+
- direct tool calls without discovery chatter
|
|
55
|
+
- concise summaries of edits and verification
|
|
57
56
|
|
|
58
|
-
|
|
57
|
+
Avoid:
|
|
58
|
+
- mandatory educational blocks
|
|
59
|
+
- long prose around tool usage
|
|
60
|
+
- repeating obvious implementation details
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levnikolaevich/hex-line-mcp",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"mcpName": "io.github.levnikolaevich/hex-line-mcp",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Hash-verified file editing MCP + token efficiency hook for AI coding agents. 11 tools: read, edit, write, grep, outline, verify, directory_tree, file_info, setup_hooks, changes, bulk_replace.",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"lint": "eslint .",
|
|
21
21
|
"lint:fix": "eslint . --fix",
|
|
22
22
|
"test": "node --test test/*.mjs",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
23
|
+
"scenarios": "node scenarios/index.mjs",
|
|
24
|
+
"scenarios:diagnostic": "node scenarios/index.mjs --diagnostics",
|
|
25
|
+
"scenarios:diagnostic:graph": "node scenarios/index.mjs --diagnostics --with-graph",
|
|
26
26
|
"check": "node --check server.mjs && node --check hook.mjs"
|
|
27
27
|
},
|
|
28
28
|
"_dep_notes": {
|