@hiveai/mcp 0.9.12 → 0.9.13

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.d.ts CHANGED
@@ -516,6 +516,7 @@ interface PreCommitCheckOutput {
516
516
  /** Per-section summary; clients should surface the warnings + reasons to the user. */
517
517
  summary: {
518
518
  anti_patterns: number;
519
+ blocking_warnings?: number;
519
520
  relevant_memories: number;
520
521
  stale_anchors: number;
521
522
  };
package/dist/server.js CHANGED
@@ -1322,6 +1322,7 @@ async function memSessionEnd(input, ctx) {
1322
1322
  const revisionCount = (fm.revision_count ?? 0) + 1;
1323
1323
  const newFrontmatter = {
1324
1324
  ...fm,
1325
+ verified_at: (/* @__PURE__ */ new Date()).toISOString(),
1325
1326
  revision_count: revisionCount,
1326
1327
  anchor: {
1327
1328
  ...fm.anchor,
@@ -2834,13 +2835,11 @@ async function preCommitCheck(input, ctx) {
2834
2835
  const filesTouching = new Set(relevantMatches.map((m) => m.id));
2835
2836
  const staleHits = verifyResult.results.filter((r) => r.stale && filesTouching.has(r.id));
2836
2837
  const blockOn = input.block_on;
2838
+ const blockingWarnings = apResult.warnings.filter(isBlockingWarning);
2837
2839
  let should_block = false;
2838
2840
  if (blockOn !== "never") {
2839
- const high = apResult.warnings.filter(
2840
- (w) => w.confidence === "authoritative" || w.confidence === "trusted"
2841
- );
2842
2841
  if (blockOn === "any" && (apResult.warnings.length > 0 || staleHits.length > 0)) should_block = true;
2843
- if (blockOn === "high-confidence" && (high.length > 0 || staleHits.length > 0)) should_block = true;
2842
+ if (blockOn === "high-confidence" && (blockingWarnings.length > 0 || staleHits.length > 0)) should_block = true;
2844
2843
  }
2845
2844
  const relevant_memories = relevantMatches.slice(0, 8).map((m) => ({
2846
2845
  id: m.id,
@@ -2852,6 +2851,7 @@ async function preCommitCheck(input, ctx) {
2852
2851
  should_block,
2853
2852
  summary: {
2854
2853
  anti_patterns: apResult.warnings.length,
2854
+ blocking_warnings: blockingWarnings.length,
2855
2855
  relevant_memories: relevant_memories.length,
2856
2856
  stale_anchors: staleHits.length
2857
2857
  },
@@ -2865,6 +2865,11 @@ async function preCommitCheck(input, ctx) {
2865
2865
  }))
2866
2866
  };
2867
2867
  }
2868
+ function isBlockingWarning(warning) {
2869
+ const highConfidence = warning.confidence === "authoritative" || warning.confidence === "trusted";
2870
+ if (!highConfidence) return false;
2871
+ return warning.reasons.includes("semantic") && (warning.semantic_score ?? 0) >= 0.65;
2872
+ }
2868
2873
 
2869
2874
  // src/tools/pattern-detect.ts
2870
2875
  import { mkdir as mkdir7, writeFile as writeFile12 } from "fs/promises";
@@ -3451,7 +3456,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
3451
3456
  // src/server.ts
3452
3457
  import { loadConfigSync } from "@hiveai/core";
3453
3458
  var SERVER_NAME = "haive";
3454
- var SERVER_VERSION = "0.9.12";
3459
+ var SERVER_VERSION = "0.9.13";
3455
3460
  function jsonResult(data) {
3456
3461
  return {
3457
3462
  content: [