@hiveai/mcp 0.9.25 → 0.9.27

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.js CHANGED
@@ -1221,7 +1221,8 @@ var SessionTracker = class {
1221
1221
  const ranPostTask = this.events.some(
1222
1222
  (e) => e.tool === "mem_session_end" && !e.summary?.startsWith("Auto-captured")
1223
1223
  );
1224
- if (!ranPostTask && existsSync16(this.ctx.paths.haiveDir)) {
1224
+ const isSubstantialSession = totalCalls >= 3 || writingTools.length > 0;
1225
+ if (!ranPostTask && isSubstantialSession && existsSync16(this.ctx.paths.haiveDir)) {
1225
1226
  try {
1226
1227
  const memoriesSaved = writingTools.map((e) => e.summary ?? "").filter(Boolean).slice(0, 20);
1227
1228
  const payload = {
@@ -1315,7 +1316,12 @@ async function memSessionEnd(input, ctx) {
1315
1316
  }
1316
1317
  const body = buildBody(input);
1317
1318
  const topic = recapTopic(input.scope, input.module);
1318
- const invalidPaths = input.files_touched.filter(
1319
+ const normalizedFiles = input.files_touched.map((p) => {
1320
+ if (!p || !path8.isAbsolute(p)) return p;
1321
+ const rel = path8.relative(ctx.paths.root, p);
1322
+ return rel.startsWith("..") ? p : rel;
1323
+ });
1324
+ const invalidPaths = normalizedFiles.filter(
1319
1325
  (p) => !existsSync17(path8.resolve(ctx.paths.root, p))
1320
1326
  );
1321
1327
  if (invalidPaths.length > 0) {
@@ -1334,7 +1340,7 @@ async function memSessionEnd(input, ctx) {
1334
1340
  revision_count: revisionCount,
1335
1341
  anchor: {
1336
1342
  ...fm.anchor,
1337
- paths: input.files_touched.length ? input.files_touched : fm.anchor.paths
1343
+ paths: normalizedFiles.length ? normalizedFiles : fm.anchor.paths
1338
1344
  }
1339
1345
  };
1340
1346
  await writeFile10(
@@ -1357,7 +1363,7 @@ async function memSessionEnd(input, ctx) {
1357
1363
  scope: input.scope,
1358
1364
  module: input.module,
1359
1365
  tags: ["session", "recap"],
1360
- paths: input.files_touched,
1366
+ paths: normalizedFiles,
1361
1367
  topic,
1362
1368
  status: "validated"
1363
1369
  });
@@ -3080,7 +3086,36 @@ function isDocLikePath(file) {
3080
3086
  }
3081
3087
  function isPackageOrConfigPath(file) {
3082
3088
  const lower = file.toLowerCase();
3083
- return lower.endsWith("package.json") || lower.endsWith("package-lock.json") || lower.endsWith("pnpm-lock.yaml") || lower.endsWith("yarn.lock") || lower.endsWith("bun.lockb") || lower.endsWith(".config.ts") || lower.endsWith(".config.js") || lower.endsWith(".json") || lower.endsWith(".yml") || lower.endsWith(".yaml") || lower.startsWith(".github/workflows/");
3089
+ const base = lower.split("/").pop() ?? lower;
3090
+ return lower.endsWith("package.json") || lower.endsWith("package-lock.json") || lower.endsWith("pnpm-lock.yaml") || lower.endsWith("yarn.lock") || lower.endsWith("bun.lockb") || lower.endsWith(".config.ts") || lower.endsWith(".config.js") || isJsonConfigFile(base) || lower.endsWith(".yml") || lower.endsWith(".yaml") || lower.endsWith(".toml") || lower.startsWith(".github/workflows/") || lower.startsWith(".github/") && lower.endsWith(".yml") || // Dotfiles that are pure configuration/tooling — never trigger runtime gotchas
3091
+ base === ".gitignore" || base === ".gitattributes" || base === ".gitmodules" || base === ".editorconfig" || base === ".nvmrc" || base === ".node-version" || base === ".npmrc" || base === ".yarnrc" || base === ".yarnrc.yml" || base === ".dockerignore" || base === "dockerfile" || base.startsWith("dockerfile.") || base === ".env.example" || base === ".env.template" || lower.endsWith(".prettierrc") || lower.endsWith(".eslintrc") || lower.endsWith(".eslintignore") || lower.endsWith(".prettierignore") || lower.endsWith(".stylelintrc") || lower.endsWith(".browserslistrc");
3092
+ }
3093
+ function isJsonConfigFile(base) {
3094
+ const knownConfigs = /* @__PURE__ */ new Set([
3095
+ "tsconfig.json",
3096
+ "jsconfig.json",
3097
+ "deno.json",
3098
+ "deno.jsonc",
3099
+ "nx.json",
3100
+ "turbo.json",
3101
+ "lerna.json",
3102
+ "rush.json",
3103
+ "jest.config.json",
3104
+ "vitest.config.json",
3105
+ "babel.config.json",
3106
+ ".babelrc.json",
3107
+ ".swcrc",
3108
+ ".mocharc.json",
3109
+ "renovate.json",
3110
+ "dependabot.json",
3111
+ ".prettierrc.json",
3112
+ ".eslintrc.json",
3113
+ ".stylelintrc.json"
3114
+ ]);
3115
+ if (knownConfigs.has(base)) return true;
3116
+ if (/^tsconfig\..+\.json$/.test(base)) return true;
3117
+ if (/^\.[a-z]+rc\.json$/.test(base)) return true;
3118
+ return false;
3084
3119
  }
3085
3120
  function repairCommandForWarning(warning, paths) {
3086
3121
  const firstPath = paths[0];
@@ -3672,7 +3707,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
3672
3707
  // src/server.ts
3673
3708
  import { loadConfigSync } from "@hiveai/core";
3674
3709
  var SERVER_NAME = "haive";
3675
- var SERVER_VERSION = "0.9.25";
3710
+ var SERVER_VERSION = "0.9.27";
3676
3711
  function jsonResult(data) {
3677
3712
  return {
3678
3713
  content: [