@hiveai/mcp 0.10.0 → 0.10.2
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/README.md +3 -3
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +9 -11
- package/dist/server.js +10 -3
- package/dist/server.js.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# @hiveai/mcp
|
|
2
2
|
|
|
3
|
-
> **hAIve MCP server**
|
|
3
|
+
> **hAIve MCP server** - policy-aware briefing and memory tools for MCP-compatible coding-agent harnesses.
|
|
4
4
|
|
|
5
|
-
The MCP server is how agents load team policy before changing code. By default it exposes a small
|
|
5
|
+
The MCP server is how agents load team policy before changing code. By default it exposes a small harness-oriented tool surface: briefing, relevant memories, failed-attempt capture, anchor verification, code-map lookup, and pre-commit checks. Larger maintenance and experimental surfaces are opt-in via `HAIVE_TOOL_PROFILE`.
|
|
6
6
|
|
|
7
|
-
hAIve is not just a memory database. The MCP layer participates in
|
|
7
|
+
hAIve is not just a memory database. The MCP layer participates in context policy: state-changing hAIve tools require `get_briefing` or `mem_relevant_to` first, so agents cannot silently skip team context while using hAIve.
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
package/dist/index.js
CHANGED
|
@@ -1414,6 +1414,7 @@ import {
|
|
|
1414
1414
|
getUsage as getUsage5,
|
|
1415
1415
|
inferModulesFromPaths as inferModulesFromPaths2,
|
|
1416
1416
|
isGlobPath,
|
|
1417
|
+
isRetiredMemory,
|
|
1417
1418
|
isAutoPromoteEligible,
|
|
1418
1419
|
isDecaying,
|
|
1419
1420
|
isStackPackSeed,
|
|
@@ -1500,6 +1501,7 @@ async function getBriefing(input, ctx) {
|
|
|
1500
1501
|
const s = memory.frontmatter.status;
|
|
1501
1502
|
if (s === "rejected" || s === "deprecated") return false;
|
|
1502
1503
|
if (!input.include_stale && s === "stale") return false;
|
|
1504
|
+
if (!input.include_stale && isRetiredMemory(memory.frontmatter, memory.body)) return false;
|
|
1503
1505
|
if (memory.frontmatter.type === "session_recap") return false;
|
|
1504
1506
|
return true;
|
|
1505
1507
|
});
|
|
@@ -2443,6 +2445,7 @@ import { existsSync as existsSync22 } from "fs";
|
|
|
2443
2445
|
import {
|
|
2444
2446
|
deriveConfidence as deriveConfidence6,
|
|
2445
2447
|
getUsage as getUsage7,
|
|
2448
|
+
isRetiredMemory as isRetiredMemory2,
|
|
2446
2449
|
loadMemoriesFromDir as loadMemoriesFromDir17,
|
|
2447
2450
|
loadUsageIndex as loadUsageIndex9,
|
|
2448
2451
|
literalMatchesAnyToken as literalMatchesAnyToken3,
|
|
@@ -2460,6 +2463,9 @@ var AntiPatternsCheckInputSchema = {
|
|
|
2460
2463
|
limit: z24.number().int().positive().max(20).default(8).describe("Cap on returned warnings."),
|
|
2461
2464
|
semantic: z24.boolean().default(true).describe(
|
|
2462
2465
|
"When true, also use semantic search (requires @hiveai/embeddings + memory index) to find related anti-patterns."
|
|
2466
|
+
),
|
|
2467
|
+
min_semantic_score: z24.number().min(0).max(1).default(0.45).describe(
|
|
2468
|
+
"Minimum cosine score for semantic-only anti-pattern hits. Anchor/literal matches still surface. Default 0.45 keeps broad, weakly-related memories out of review noise."
|
|
2463
2469
|
)
|
|
2464
2470
|
};
|
|
2465
2471
|
var CODE_STOPWORDS = /* @__PURE__ */ new Set([
|
|
@@ -2530,11 +2536,12 @@ async function antiPatternsCheck(input, ctx) {
|
|
|
2530
2536
|
return { scanned: 0, warnings: [], notice: "No .ai/memories directory \u2014 nothing to check against." };
|
|
2531
2537
|
}
|
|
2532
2538
|
const all = await loadMemoriesFromDir17(ctx.paths.memoriesDir);
|
|
2539
|
+
const minSemanticScore = input.min_semantic_score ?? 0.45;
|
|
2533
2540
|
const negative = all.filter(({ memory }) => {
|
|
2534
2541
|
const t = memory.frontmatter.type;
|
|
2535
2542
|
if (t !== "attempt" && t !== "gotcha") return false;
|
|
2536
2543
|
const s = memory.frontmatter.status;
|
|
2537
|
-
return s !== "rejected" && s !== "deprecated" && s !== "stale";
|
|
2544
|
+
return s !== "rejected" && s !== "deprecated" && s !== "stale" && !isRetiredMemory2(memory.frontmatter, memory.body);
|
|
2538
2545
|
});
|
|
2539
2546
|
if (negative.length === 0) {
|
|
2540
2547
|
return { scanned: 0, warnings: [], notice: "No attempt/gotcha memories found yet." };
|
|
@@ -2588,6 +2595,7 @@ async function antiPatternsCheck(input, ctx) {
|
|
|
2588
2595
|
const negativeIds = new Set(negative.map(({ memory }) => memory.frontmatter.id));
|
|
2589
2596
|
for (const hit of result.hits) {
|
|
2590
2597
|
if (!negativeIds.has(hit.id)) continue;
|
|
2598
|
+
if (hit.score < minSemanticScore && !seen.has(hit.id)) continue;
|
|
2591
2599
|
const found = negative.find(({ memory }) => memory.frontmatter.id === hit.id);
|
|
2592
2600
|
if (found) upsert(found.memory.frontmatter, found.memory.body, "semantic", hit.score);
|
|
2593
2601
|
}
|
|
@@ -3866,7 +3874,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
3866
3874
|
// src/server.ts
|
|
3867
3875
|
import { loadConfigSync } from "@hiveai/core";
|
|
3868
3876
|
var SERVER_NAME = "haive";
|
|
3869
|
-
var SERVER_VERSION = "0.10.
|
|
3877
|
+
var SERVER_VERSION = "0.10.2";
|
|
3870
3878
|
function jsonResult(data) {
|
|
3871
3879
|
return {
|
|
3872
3880
|
content: [
|
|
@@ -3905,7 +3913,6 @@ var MAINTENANCE_PROFILE_TOOLS = [
|
|
|
3905
3913
|
"mem_delete",
|
|
3906
3914
|
"mem_diff",
|
|
3907
3915
|
"get_recap",
|
|
3908
|
-
"code_search",
|
|
3909
3916
|
"anti_patterns_check",
|
|
3910
3917
|
"mem_distill",
|
|
3911
3918
|
"mem_timeline",
|