@hiveai/mcp 0.10.8 → 0.10.9
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 +4 -4
package/dist/server.js
CHANGED
|
@@ -3147,7 +3147,9 @@ async function preCommitCheck(input, ctx) {
|
|
|
3147
3147
|
};
|
|
3148
3148
|
}
|
|
3149
3149
|
function classifyWarning(warning, paths, anchoredBlocks = false) {
|
|
3150
|
-
const affectedFiles = paths.filter(
|
|
3150
|
+
const affectedFiles = paths.filter(
|
|
3151
|
+
(p) => !p.startsWith(".ai/.usage/") && !p.startsWith(".ai/.cache/") && !p.startsWith(".ai/.runtime/")
|
|
3152
|
+
);
|
|
3151
3153
|
const repairCommand = repairCommandForWarning(warning, affectedFiles);
|
|
3152
3154
|
const fileDowngrade = fileTypeDowngradeReason(warning, affectedFiles);
|
|
3153
3155
|
if (fileDowngrade) {
|
|
@@ -3178,6 +3180,15 @@ function classifyWarning(warning, paths, anchoredBlocks = false) {
|
|
|
3178
3180
|
};
|
|
3179
3181
|
}
|
|
3180
3182
|
if (isBlockingWarning(warning)) {
|
|
3183
|
+
if (warning.scope === "personal") {
|
|
3184
|
+
return {
|
|
3185
|
+
...warning,
|
|
3186
|
+
level: "review",
|
|
3187
|
+
rationale: "personal anti-pattern memories are review guidance unless a deterministic block-severity sensor fires",
|
|
3188
|
+
affected_files: affectedFiles,
|
|
3189
|
+
repair_command: repairCommand
|
|
3190
|
+
};
|
|
3191
|
+
}
|
|
3181
3192
|
if (warning.has_sensor && !warning.reasons.includes("sensor")) {
|
|
3182
3193
|
return {
|
|
3183
3194
|
...warning,
|
|
@@ -3198,7 +3209,7 @@ function classifyWarning(warning, paths, anchoredBlocks = false) {
|
|
|
3198
3209
|
const hasSemantic = warning.reasons.includes("semantic");
|
|
3199
3210
|
const semanticScore = warning.semantic_score ?? 0;
|
|
3200
3211
|
const highConfidence = warning.confidence === "authoritative" || warning.confidence === "trusted";
|
|
3201
|
-
if (anchoredBlocks && highConfidence && warning.reasons.includes("anchor") && (warning.reasons.includes("literal") || hasSemantic && semanticScore >= 0.45)) {
|
|
3212
|
+
if (anchoredBlocks && highConfidence && warning.scope !== "personal" && warning.reasons.includes("anchor") && (warning.reasons.includes("literal") || hasSemantic && semanticScore >= 0.45)) {
|
|
3202
3213
|
if (warning.has_sensor && !warning.reasons.includes("sensor")) {
|
|
3203
3214
|
return {
|
|
3204
3215
|
...warning,
|
|
@@ -3332,8 +3343,20 @@ function isJsonConfigFile(base) {
|
|
|
3332
3343
|
return false;
|
|
3333
3344
|
}
|
|
3334
3345
|
function repairCommandForWarning(warning, paths) {
|
|
3335
|
-
const
|
|
3336
|
-
return
|
|
3346
|
+
const targetPath = repairTargetPathForWarning(warning, paths);
|
|
3347
|
+
return targetPath ? `haive briefing --files "${targetPath}" --task "review ${warning.id}"` : `haive memory show ${warning.id}`;
|
|
3348
|
+
}
|
|
3349
|
+
function repairTargetPathForWarning(warning, paths) {
|
|
3350
|
+
const usablePaths = paths.filter(
|
|
3351
|
+
(p) => !p.startsWith(".ai/.usage/") && !p.startsWith(".ai/.cache/") && !p.startsWith(".ai/.runtime/")
|
|
3352
|
+
);
|
|
3353
|
+
const anchors = warning.anchor_paths ?? [];
|
|
3354
|
+
for (const file of usablePaths) {
|
|
3355
|
+
if (anchors.some((anchor) => anchor === file || file.startsWith(`${anchor}/`) || anchor.startsWith(`${file}/`))) {
|
|
3356
|
+
return file;
|
|
3357
|
+
}
|
|
3358
|
+
}
|
|
3359
|
+
return usablePaths[0];
|
|
3337
3360
|
}
|
|
3338
3361
|
|
|
3339
3362
|
// src/tools/pattern-detect.ts
|
|
@@ -3836,7 +3859,19 @@ This creates/updates a single rolling recap that **get_briefing automatically su
|
|
|
3836
3859
|
|
|
3837
3860
|
Calling \`mem_session_end\` also **clears the pending-distill marker** (if any), confirming that this session's learnings have been properly captured rather than left as an auto-recap skeleton.
|
|
3838
3861
|
|
|
3839
|
-
|
|
3862
|
+
### 7. Verify the git/release exit protocol \u2014 always
|
|
3863
|
+
Run **\`haive enforce finish\`** before your final response.
|
|
3864
|
+
|
|
3865
|
+
This executable gate checks the multi-agent git-sync decision:
|
|
3866
|
+
- no completed work is left as an uncommitted local diff
|
|
3867
|
+
- shippable package changes have a lockstep version bump
|
|
3868
|
+
- the release tag \`vX.Y.Z\` exists when a version was bumped
|
|
3869
|
+
- commits and tags have been pushed
|
|
3870
|
+
- agents never run \`npm publish\` (publication remains human-owned)
|
|
3871
|
+
|
|
3872
|
+
If it blocks, fix the reported Git/version/tag/push issue before telling the developer the task is done.
|
|
3873
|
+
|
|
3874
|
+
When done, respond with a brief summary: "Saved N memories: [list of IDs]. Session recap saved. hAIve finish gate passed."
|
|
3840
3875
|
`;
|
|
3841
3876
|
return {
|
|
3842
3877
|
description: "Post-task reflection: capture what you learned before closing the session",
|
|
@@ -3921,7 +3956,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
3921
3956
|
// src/server.ts
|
|
3922
3957
|
import { hasRecentBriefingMarker, loadConfigSync } from "@hiveai/core";
|
|
3923
3958
|
var SERVER_NAME = "haive";
|
|
3924
|
-
var SERVER_VERSION = "0.10.
|
|
3959
|
+
var SERVER_VERSION = "0.10.9";
|
|
3925
3960
|
function jsonResult(data) {
|
|
3926
3961
|
return {
|
|
3927
3962
|
content: [
|