@hiveai/mcp 0.9.27 → 0.9.28

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 CHANGED
@@ -1402,6 +1402,7 @@ import {
1402
1402
  isGlobPath,
1403
1403
  isAutoPromoteEligible,
1404
1404
  isDecaying,
1405
+ isStackPackSeed,
1405
1406
  literalMatchesAllTokens as literalMatchesAllTokens2,
1406
1407
  literalMatchesAnyToken as literalMatchesAnyToken2,
1407
1408
  loadCodeMap,
@@ -1415,7 +1416,8 @@ import {
1415
1416
  serializeMemory as serializeMemory9,
1416
1417
  tokenizeQuery as tokenizeQuery2,
1417
1418
  trackReads as trackReads3,
1418
- truncateToTokens
1419
+ truncateToTokens,
1420
+ writeBriefingMarker
1419
1421
  } from "@hiveai/core";
1420
1422
  import { z as z17 } from "zod";
1421
1423
  var GetBriefingInputSchema = {
@@ -1869,6 +1871,16 @@ When done, call \`mem_session_end\` to acknowledge \u2014 this clears the pendin
1869
1871
  );
1870
1872
  }
1871
1873
  }
1874
+ if (existsSync18(ctx.paths.haiveDir)) {
1875
+ await writeBriefingMarker(ctx.paths, {
1876
+ sessionId: process.env.HAIVE_SESSION_ID,
1877
+ ...input.task ? { task: input.task } : {},
1878
+ source: "mcp-get-briefing",
1879
+ files: input.files,
1880
+ memoryIds: outputMemories.map((m) => m.id)
1881
+ }).catch(() => {
1882
+ });
1883
+ }
1872
1884
  return {
1873
1885
  ...input.task ? { task: input.task } : {},
1874
1886
  search_mode: searchMode,
@@ -1923,6 +1935,9 @@ function classifyMemoryPriority(memory, loaded, inputFiles, inputSymbols) {
1923
1935
  if (fm?.requires_human_approval || directAnchor || directSymbol || memory.type === "attempt" && (memory.match_quality === "exact" || strongSemantic) || memory.type === "skill" && (memory.match_quality === "exact" || strongSemantic)) {
1924
1936
  return "must_read";
1925
1937
  }
1938
+ if (isStackPackSeed(fm)) {
1939
+ return "background";
1940
+ }
1926
1941
  if (memory.type === "skill" || memory.reasons.includes("module") || memory.reasons.includes("domain") || memory.match_quality === "exact" || usefulSemantic) {
1927
1942
  return "useful";
1928
1943
  }
@@ -2452,6 +2467,8 @@ async function antiPatternsCheck(input, ctx) {
2452
2467
  confidence: deriveConfidence6(fm, u),
2453
2468
  body_preview: body.split("\n").slice(0, 5).join("\n").slice(0, 400),
2454
2469
  reasons: [reason],
2470
+ tags: fm.tags ?? [],
2471
+ anchor_paths: fm.anchor?.paths ?? [],
2455
2472
  ...score !== void 0 ? { semantic_score: score } : {}
2456
2473
  });
2457
2474
  };
@@ -3077,8 +3094,45 @@ function fileTypeDowngradeReason(warning, paths) {
3077
3094
  if (configOnly && !warning.reasons.includes("anchor") && !hasStrongSemantic(warning)) {
3078
3095
  return "package/config-only change; warning has no anchor on these files and no strong semantic match \u2014 downgraded to info.";
3079
3096
  }
3097
+ const touchesBuildFile = paths.some(isPackageOrConfigPath);
3098
+ if (!touchesBuildFile && isBuildScopedWarning(warning) && !warning.reasons.includes("anchor") && !hasStrongSemantic(warning)) {
3099
+ return "build/packaging gotcha, but no package/build file changed \u2014 downgraded to info.";
3100
+ }
3080
3101
  return null;
3081
3102
  }
3103
+ function isBuildScopedWarning(warning) {
3104
+ const tags = warning.tags ?? [];
3105
+ if (tags.some((t) => BUILD_SCOPED_TAGS.has(t.toLowerCase()))) return true;
3106
+ const anchors = warning.anchor_paths ?? [];
3107
+ return anchors.length > 0 && anchors.every(isPackageOrConfigPath);
3108
+ }
3109
+ var BUILD_SCOPED_TAGS = /* @__PURE__ */ new Set([
3110
+ "npm",
3111
+ "pnpm",
3112
+ "yarn",
3113
+ "publish",
3114
+ "install",
3115
+ "packaging",
3116
+ "package",
3117
+ "build",
3118
+ "tsup",
3119
+ "bundler",
3120
+ "monorepo",
3121
+ "workspace",
3122
+ "versioning",
3123
+ "version",
3124
+ "dev-workflow",
3125
+ "hotswap",
3126
+ "ci",
3127
+ "workflow",
3128
+ "release",
3129
+ "changelog",
3130
+ "dependencies",
3131
+ "deps",
3132
+ "dependency",
3133
+ "tooling",
3134
+ "config"
3135
+ ]);
3082
3136
  function hasStrongSemantic(warning) {
3083
3137
  return warning.reasons.includes("semantic") && (warning.semantic_score ?? 0) >= 0.65;
3084
3138
  }
@@ -3709,7 +3763,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
3709
3763
  // src/server.ts
3710
3764
  import { loadConfigSync } from "@hiveai/core";
3711
3765
  var SERVER_NAME = "haive";
3712
- var SERVER_VERSION = "0.9.27";
3766
+ var SERVER_VERSION = "0.9.28";
3713
3767
  function jsonResult(data) {
3714
3768
  return {
3715
3769
  content: [