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