@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/index.js +41 -6
- package/dist/index.js.map +1 -1
- package/dist/server.js +41 -6
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1223,7 +1223,8 @@ var SessionTracker = class {
|
|
|
1223
1223
|
const ranPostTask = this.events.some(
|
|
1224
1224
|
(e) => e.tool === "mem_session_end" && !e.summary?.startsWith("Auto-captured")
|
|
1225
1225
|
);
|
|
1226
|
-
|
|
1226
|
+
const isSubstantialSession = totalCalls >= 3 || writingTools.length > 0;
|
|
1227
|
+
if (!ranPostTask && isSubstantialSession && existsSync16(this.ctx.paths.haiveDir)) {
|
|
1227
1228
|
try {
|
|
1228
1229
|
const memoriesSaved = writingTools.map((e) => e.summary ?? "").filter(Boolean).slice(0, 20);
|
|
1229
1230
|
const payload = {
|
|
@@ -1317,7 +1318,12 @@ async function memSessionEnd(input, ctx) {
|
|
|
1317
1318
|
}
|
|
1318
1319
|
const body = buildBody(input);
|
|
1319
1320
|
const topic = recapTopic(input.scope, input.module);
|
|
1320
|
-
const
|
|
1321
|
+
const normalizedFiles = input.files_touched.map((p) => {
|
|
1322
|
+
if (!p || !path8.isAbsolute(p)) return p;
|
|
1323
|
+
const rel = path8.relative(ctx.paths.root, p);
|
|
1324
|
+
return rel.startsWith("..") ? p : rel;
|
|
1325
|
+
});
|
|
1326
|
+
const invalidPaths = normalizedFiles.filter(
|
|
1321
1327
|
(p) => !existsSync17(path8.resolve(ctx.paths.root, p))
|
|
1322
1328
|
);
|
|
1323
1329
|
if (invalidPaths.length > 0) {
|
|
@@ -1336,7 +1342,7 @@ async function memSessionEnd(input, ctx) {
|
|
|
1336
1342
|
revision_count: revisionCount,
|
|
1337
1343
|
anchor: {
|
|
1338
1344
|
...fm.anchor,
|
|
1339
|
-
paths:
|
|
1345
|
+
paths: normalizedFiles.length ? normalizedFiles : fm.anchor.paths
|
|
1340
1346
|
}
|
|
1341
1347
|
};
|
|
1342
1348
|
await writeFile10(
|
|
@@ -1359,7 +1365,7 @@ async function memSessionEnd(input, ctx) {
|
|
|
1359
1365
|
scope: input.scope,
|
|
1360
1366
|
module: input.module,
|
|
1361
1367
|
tags: ["session", "recap"],
|
|
1362
|
-
paths:
|
|
1368
|
+
paths: normalizedFiles,
|
|
1363
1369
|
topic,
|
|
1364
1370
|
status: "validated"
|
|
1365
1371
|
});
|
|
@@ -3082,7 +3088,36 @@ function isDocLikePath(file) {
|
|
|
3082
3088
|
}
|
|
3083
3089
|
function isPackageOrConfigPath(file) {
|
|
3084
3090
|
const lower = file.toLowerCase();
|
|
3085
|
-
|
|
3091
|
+
const base = lower.split("/").pop() ?? lower;
|
|
3092
|
+
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
|
|
3093
|
+
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");
|
|
3094
|
+
}
|
|
3095
|
+
function isJsonConfigFile(base) {
|
|
3096
|
+
const knownConfigs = /* @__PURE__ */ new Set([
|
|
3097
|
+
"tsconfig.json",
|
|
3098
|
+
"jsconfig.json",
|
|
3099
|
+
"deno.json",
|
|
3100
|
+
"deno.jsonc",
|
|
3101
|
+
"nx.json",
|
|
3102
|
+
"turbo.json",
|
|
3103
|
+
"lerna.json",
|
|
3104
|
+
"rush.json",
|
|
3105
|
+
"jest.config.json",
|
|
3106
|
+
"vitest.config.json",
|
|
3107
|
+
"babel.config.json",
|
|
3108
|
+
".babelrc.json",
|
|
3109
|
+
".swcrc",
|
|
3110
|
+
".mocharc.json",
|
|
3111
|
+
"renovate.json",
|
|
3112
|
+
"dependabot.json",
|
|
3113
|
+
".prettierrc.json",
|
|
3114
|
+
".eslintrc.json",
|
|
3115
|
+
".stylelintrc.json"
|
|
3116
|
+
]);
|
|
3117
|
+
if (knownConfigs.has(base)) return true;
|
|
3118
|
+
if (/^tsconfig\..+\.json$/.test(base)) return true;
|
|
3119
|
+
if (/^\.[a-z]+rc\.json$/.test(base)) return true;
|
|
3120
|
+
return false;
|
|
3086
3121
|
}
|
|
3087
3122
|
function repairCommandForWarning(warning, paths) {
|
|
3088
3123
|
const firstPath = paths[0];
|
|
@@ -3674,7 +3709,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
3674
3709
|
// src/server.ts
|
|
3675
3710
|
import { loadConfigSync } from "@hiveai/core";
|
|
3676
3711
|
var SERVER_NAME = "haive";
|
|
3677
|
-
var SERVER_VERSION = "0.9.
|
|
3712
|
+
var SERVER_VERSION = "0.9.27";
|
|
3678
3713
|
function jsonResult(data) {
|
|
3679
3714
|
return {
|
|
3680
3715
|
content: [
|