@hiveai/mcp 0.9.15 → 0.9.16
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 +12 -3
- package/dist/index.js +50 -5
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +7 -1
- package/dist/server.js +55 -5
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **hAIve MCP server** — policy-aware briefing and memory tools for MCP-compatible AI coding agents.
|
|
4
4
|
|
|
5
|
-
The MCP server is how agents load team policy before changing code. By default it exposes a small enforcement-oriented tool surface: briefing, relevant memories, failed-attempt capture, anchor verification, code-map lookup, and pre-commit checks.
|
|
5
|
+
The MCP server is how agents load team policy before changing code. By default it exposes a small enforcement-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
7
|
hAIve is not just a memory database. The MCP layer participates in enforcement: state-changing hAIve tools require `get_briefing` or `mem_relevant_to` first, so agents cannot silently skip team context while using hAIve.
|
|
8
8
|
|
|
@@ -117,17 +117,26 @@ Default tools:
|
|
|
117
117
|
- `mem_tried`
|
|
118
118
|
- `mem_search`
|
|
119
119
|
- `mem_get`
|
|
120
|
-
- `mem_update`
|
|
121
120
|
- `mem_verify`
|
|
122
121
|
- `code_map`
|
|
123
122
|
- `pre_commit_check`
|
|
123
|
+
- `mem_session_end`
|
|
124
124
|
|
|
125
125
|
Default prompts:
|
|
126
126
|
|
|
127
127
|
- `bootstrap_project`
|
|
128
128
|
- `post_task`
|
|
129
129
|
|
|
130
|
-
|
|
130
|
+
### Tool Profiles
|
|
131
|
+
|
|
132
|
+
`HAIVE_TOOL_PROFILE` controls how much hAIve surface an agent sees:
|
|
133
|
+
|
|
134
|
+
- `enforcement` (default): compact repo-native context harness for coding agents.
|
|
135
|
+
- `maintenance`: adds corpus review, lifecycle, distillation, code-search, and project-context maintenance tools.
|
|
136
|
+
- `experimental`: adds exploratory diagnostics such as runtime journal, pattern detection, why-this-file, why-this-decision, and conflict analysis.
|
|
137
|
+
- `full`: legacy alias for `experimental`.
|
|
138
|
+
|
|
139
|
+
Use `maintenance` for human/team stewardship sessions and `experimental` only when you are intentionally working on hAIve's broader research tooling.
|
|
131
140
|
|
|
132
141
|
### `get_briefing` ⭐ Start every task with this
|
|
133
142
|
|
package/dist/index.js
CHANGED
|
@@ -3530,7 +3530,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
3530
3530
|
// src/server.ts
|
|
3531
3531
|
import { loadConfigSync } from "@hiveai/core";
|
|
3532
3532
|
var SERVER_NAME = "haive";
|
|
3533
|
-
var SERVER_VERSION = "0.9.
|
|
3533
|
+
var SERVER_VERSION = "0.9.16";
|
|
3534
3534
|
function jsonResult(data) {
|
|
3535
3535
|
return {
|
|
3536
3536
|
content: [
|
|
@@ -3541,7 +3541,7 @@ function jsonResult(data) {
|
|
|
3541
3541
|
]
|
|
3542
3542
|
};
|
|
3543
3543
|
}
|
|
3544
|
-
var ENFORCEMENT_PROFILE_TOOLS =
|
|
3544
|
+
var ENFORCEMENT_PROFILE_TOOLS = [
|
|
3545
3545
|
"get_briefing",
|
|
3546
3546
|
"mem_save",
|
|
3547
3547
|
"mem_tried",
|
|
@@ -3552,7 +3552,47 @@ var ENFORCEMENT_PROFILE_TOOLS = /* @__PURE__ */ new Set([
|
|
|
3552
3552
|
"code_map",
|
|
3553
3553
|
"pre_commit_check",
|
|
3554
3554
|
"mem_session_end"
|
|
3555
|
-
]
|
|
3555
|
+
];
|
|
3556
|
+
var MAINTENANCE_PROFILE_TOOLS = [
|
|
3557
|
+
...ENFORCEMENT_PROFILE_TOOLS,
|
|
3558
|
+
"mem_suggest_topic",
|
|
3559
|
+
"mem_for_files",
|
|
3560
|
+
"mem_list",
|
|
3561
|
+
"get_project_context",
|
|
3562
|
+
"bootstrap_project_save",
|
|
3563
|
+
"mem_resolve_project",
|
|
3564
|
+
"mem_update",
|
|
3565
|
+
"mem_approve",
|
|
3566
|
+
"mem_reject",
|
|
3567
|
+
"mem_pending",
|
|
3568
|
+
"mem_delete",
|
|
3569
|
+
"mem_diff",
|
|
3570
|
+
"get_recap",
|
|
3571
|
+
"code_search",
|
|
3572
|
+
"anti_patterns_check",
|
|
3573
|
+
"mem_distill",
|
|
3574
|
+
"mem_timeline",
|
|
3575
|
+
"mem_conflict_candidates"
|
|
3576
|
+
];
|
|
3577
|
+
var EXPERIMENTAL_PROFILE_TOOLS = [
|
|
3578
|
+
...MAINTENANCE_PROFILE_TOOLS,
|
|
3579
|
+
"mem_observe",
|
|
3580
|
+
"why_this_file",
|
|
3581
|
+
"why_this_decision",
|
|
3582
|
+
"mem_conflicts_with",
|
|
3583
|
+
"pattern_detect",
|
|
3584
|
+
"runtime_journal_append",
|
|
3585
|
+
"runtime_journal_tail"
|
|
3586
|
+
];
|
|
3587
|
+
var TOOL_PROFILES = {
|
|
3588
|
+
enforcement: new Set(ENFORCEMENT_PROFILE_TOOLS),
|
|
3589
|
+
maintenance: new Set(MAINTENANCE_PROFILE_TOOLS),
|
|
3590
|
+
experimental: new Set(EXPERIMENTAL_PROFILE_TOOLS)
|
|
3591
|
+
};
|
|
3592
|
+
function getAllowedToolsForProfile(profile) {
|
|
3593
|
+
if (profile === "full") return TOOL_PROFILES.experimental;
|
|
3594
|
+
return TOOL_PROFILES[profile] ?? TOOL_PROFILES.enforcement;
|
|
3595
|
+
}
|
|
3556
3596
|
var BRIEFING_TOOLS = /* @__PURE__ */ new Set(["get_briefing", "mem_relevant_to"]);
|
|
3557
3597
|
var MUTATING_TOOLS = /* @__PURE__ */ new Set([
|
|
3558
3598
|
"mem_save",
|
|
@@ -3579,7 +3619,8 @@ function createHaiveServer(options = {}) {
|
|
|
3579
3619
|
{ name: SERVER_NAME, version: SERVER_VERSION },
|
|
3580
3620
|
{ capabilities: { tools: {}, prompts: {} } }
|
|
3581
3621
|
);
|
|
3582
|
-
const
|
|
3622
|
+
const allowedTools = getAllowedToolsForProfile(toolProfile);
|
|
3623
|
+
const shouldRegisterTool = (name) => allowedTools.has(name);
|
|
3583
3624
|
const registerTool = (name, description, schema, handler) => {
|
|
3584
3625
|
if (!shouldRegisterTool(name)) return;
|
|
3585
3626
|
const tool = server.tool.bind(server);
|
|
@@ -3603,7 +3644,11 @@ function createHaiveServer(options = {}) {
|
|
|
3603
3644
|
}
|
|
3604
3645
|
);
|
|
3605
3646
|
};
|
|
3606
|
-
const shouldRegisterPrompt = (name) =>
|
|
3647
|
+
const shouldRegisterPrompt = (name) => {
|
|
3648
|
+
if (name === "bootstrap_project" || name === "post_task") return true;
|
|
3649
|
+
if (name === "import_docs") return toolProfile !== "enforcement";
|
|
3650
|
+
return toolProfile === "experimental" || toolProfile === "full";
|
|
3651
|
+
};
|
|
3607
3652
|
registerTool(
|
|
3608
3653
|
"mem_save",
|
|
3609
3654
|
[
|