@hiveai/mcp 0.9.12 → 0.9.14
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/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +1 -0
- package/dist/server.js +10 -5
- package/dist/server.js.map +1 -1
- package/package.json +8 -5
package/dist/index.js
CHANGED
|
@@ -1324,6 +1324,7 @@ async function memSessionEnd(input, ctx) {
|
|
|
1324
1324
|
const revisionCount = (fm.revision_count ?? 0) + 1;
|
|
1325
1325
|
const newFrontmatter = {
|
|
1326
1326
|
...fm,
|
|
1327
|
+
verified_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
1327
1328
|
revision_count: revisionCount,
|
|
1328
1329
|
anchor: {
|
|
1329
1330
|
...fm.anchor,
|
|
@@ -2836,13 +2837,11 @@ async function preCommitCheck(input, ctx) {
|
|
|
2836
2837
|
const filesTouching = new Set(relevantMatches.map((m) => m.id));
|
|
2837
2838
|
const staleHits = verifyResult.results.filter((r) => r.stale && filesTouching.has(r.id));
|
|
2838
2839
|
const blockOn = input.block_on;
|
|
2840
|
+
const blockingWarnings = apResult.warnings.filter(isBlockingWarning);
|
|
2839
2841
|
let should_block = false;
|
|
2840
2842
|
if (blockOn !== "never") {
|
|
2841
|
-
const high = apResult.warnings.filter(
|
|
2842
|
-
(w) => w.confidence === "authoritative" || w.confidence === "trusted"
|
|
2843
|
-
);
|
|
2844
2843
|
if (blockOn === "any" && (apResult.warnings.length > 0 || staleHits.length > 0)) should_block = true;
|
|
2845
|
-
if (blockOn === "high-confidence" && (
|
|
2844
|
+
if (blockOn === "high-confidence" && (blockingWarnings.length > 0 || staleHits.length > 0)) should_block = true;
|
|
2846
2845
|
}
|
|
2847
2846
|
const relevant_memories = relevantMatches.slice(0, 8).map((m) => ({
|
|
2848
2847
|
id: m.id,
|
|
@@ -2854,6 +2853,7 @@ async function preCommitCheck(input, ctx) {
|
|
|
2854
2853
|
should_block,
|
|
2855
2854
|
summary: {
|
|
2856
2855
|
anti_patterns: apResult.warnings.length,
|
|
2856
|
+
blocking_warnings: blockingWarnings.length,
|
|
2857
2857
|
relevant_memories: relevant_memories.length,
|
|
2858
2858
|
stale_anchors: staleHits.length
|
|
2859
2859
|
},
|
|
@@ -2867,6 +2867,11 @@ async function preCommitCheck(input, ctx) {
|
|
|
2867
2867
|
}))
|
|
2868
2868
|
};
|
|
2869
2869
|
}
|
|
2870
|
+
function isBlockingWarning(warning) {
|
|
2871
|
+
const highConfidence = warning.confidence === "authoritative" || warning.confidence === "trusted";
|
|
2872
|
+
if (!highConfidence) return false;
|
|
2873
|
+
return warning.reasons.includes("semantic") && (warning.semantic_score ?? 0) >= 0.65;
|
|
2874
|
+
}
|
|
2870
2875
|
|
|
2871
2876
|
// src/tools/pattern-detect.ts
|
|
2872
2877
|
import { mkdir as mkdir7, writeFile as writeFile12 } from "fs/promises";
|
|
@@ -3453,7 +3458,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
3453
3458
|
// src/server.ts
|
|
3454
3459
|
import { loadConfigSync } from "@hiveai/core";
|
|
3455
3460
|
var SERVER_NAME = "haive";
|
|
3456
|
-
var SERVER_VERSION = "0.9.
|
|
3461
|
+
var SERVER_VERSION = "0.9.14";
|
|
3457
3462
|
function jsonResult(data) {
|
|
3458
3463
|
return {
|
|
3459
3464
|
content: [
|