@levnikolaevich/hex-line-mcp 1.23.0 → 1.23.1
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/dist/server.mjs +16 -2
- package/package.json +1 -1
package/dist/server.mjs
CHANGED
|
@@ -548,6 +548,20 @@ function ensureGraphFreshForFile(db, absoluteFilePath) {
|
|
|
548
548
|
return true;
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
+
function isGraphFreshAtMtime(db, absoluteFilePath, mtimeMs) {
|
|
552
|
+
if (!db) return false;
|
|
553
|
+
try {
|
|
554
|
+
const projectRoot = findProjectRoot(absoluteFilePath);
|
|
555
|
+
if (!projectRoot) return true;
|
|
556
|
+
const relativeFile = normalizeRelativeFile(projectRoot, absoluteFilePath);
|
|
557
|
+
if (!relativeFile) return true;
|
|
558
|
+
const indexedMtime = lookupIndexedMtime(db, relativeFile);
|
|
559
|
+
if (indexedMtime == null) return false;
|
|
560
|
+
return mtimeMs <= indexedMtime + FRESHNESS_TOLERANCE_MS;
|
|
561
|
+
} catch {
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
}
|
|
551
565
|
function fileAnnotations(db, file, { startLine = null, endLine = null, limit = 8 } = {}) {
|
|
552
566
|
try {
|
|
553
567
|
const hasRange = Number.isInteger(startLine) && Number.isInteger(endLine);
|
|
@@ -2914,7 +2928,7 @@ ${serializeReadBlock(block)}`;
|
|
|
2914
2928
|
const relFile = db ? getRelativePath(real) : null;
|
|
2915
2929
|
if (db && relFile && fullDiff && minLine <= maxLine) {
|
|
2916
2930
|
graphDbAvailable = true;
|
|
2917
|
-
graphFresh =
|
|
2931
|
+
graphFresh = isGraphFreshAtMtime(db, real, currentSnapshot.mtimeMs);
|
|
2918
2932
|
semanticImpacts = semanticImpact(db, relFile, minLine, maxLine);
|
|
2919
2933
|
if (semanticImpacts.length > 0) {
|
|
2920
2934
|
const sections = semanticImpacts.map((impact) => {
|
|
@@ -4794,7 +4808,7 @@ function errorResult(code, message, recovery, { large = false, extra = null } =
|
|
|
4794
4808
|
}
|
|
4795
4809
|
|
|
4796
4810
|
// server.mjs
|
|
4797
|
-
var version = true ? "1.23.
|
|
4811
|
+
var version = true ? "1.23.1" : (await null).createRequire(import.meta.url)("./package.json").version;
|
|
4798
4812
|
var STATUS_ENUM = z2.enum(["OK", "ERROR", "AUTO_REBASED", "CONFLICT", "STALE", "INVALID", "NO_CHANGES", "CHANGED", "UNSUPPORTED"]);
|
|
4799
4813
|
var ERROR_SHAPE = z2.object({ code: z2.string(), message: z2.string(), recovery: z2.string() }).optional();
|
|
4800
4814
|
var LINE_REPORT_KEYS = /* @__PURE__ */ new Set([
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@levnikolaevich/hex-line-mcp",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.1",
|
|
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. 9 tools: inspect_path, read, edit, write, grep, outline, verify, changes, bulk_replace.",
|