@hivelore/mcp 0.35.0 → 0.36.0
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 +9 -2
- package/dist/index.js.map +1 -1
- package/dist/server.d.ts +4 -0
- package/dist/server.js +9 -2
- package/dist/server.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1159,6 +1159,9 @@ var ProposeSensorInputSchema = {
|
|
|
1159
1159
|
bad_example: z15.string().optional().describe("A code snippet that SHOULD match \u2014 proves the sensor catches the mistake. If omitted, examples are read from the lesson body."),
|
|
1160
1160
|
severity: z15.enum(["warn", "block"]).default("block").describe("block = hard-fail the gate (accepted ONLY if it passes self-validation). warn = advisory."),
|
|
1161
1161
|
message: z15.string().optional().describe("LLM-facing fix message shown when it fires. Defaults to one derived from the lesson."),
|
|
1162
|
+
incident: z15.string().optional().describe(
|
|
1163
|
+
"Provenance: the real incident this sensor guards \u2014 a ticket/prod ref ('prod #442', 'INC-1029', '2026-06 refund overcharge'). Turns 'a test failed' into 'this reproduces the incident the test exists to prevent'. Surfaced in the block message and the prevention receipt. Strongly recommended for command/test sensors routed from a post-incident test."
|
|
1164
|
+
),
|
|
1162
1165
|
flags: z15.string().optional().describe("Optional regex flags (e.g. 'i' for case-insensitive)."),
|
|
1163
1166
|
paths: z15.array(z15.string()).default([]).describe("Override scope paths. Defaults to the memory's anchor paths.")
|
|
1164
1167
|
};
|
|
@@ -1278,6 +1281,7 @@ ${verdictCmd.detail}`,
|
|
|
1278
1281
|
...input.timeout_ms ? { timeout_ms: input.timeout_ms } : {},
|
|
1279
1282
|
paths: anchorPathsCmd,
|
|
1280
1283
|
message: input.message?.trim() || deriveMessage(found.memory.body, input.command.trim(), void 0),
|
|
1284
|
+
...input.incident?.trim() ? { incident: input.incident.trim() } : {},
|
|
1281
1285
|
severity: input.severity,
|
|
1282
1286
|
autogen: false,
|
|
1283
1287
|
last_fired: null
|
|
@@ -1308,6 +1312,7 @@ ${verdictCmd.detail}`,
|
|
|
1308
1312
|
...input.flags ? { flags: input.flags } : {},
|
|
1309
1313
|
paths: anchorPaths,
|
|
1310
1314
|
message: input.message?.trim() || deriveMessage(found.memory.body, input.pattern, input.absent),
|
|
1315
|
+
...input.incident?.trim() ? { incident: input.incident.trim() } : {},
|
|
1311
1316
|
severity: input.severity,
|
|
1312
1317
|
autogen: false,
|
|
1313
1318
|
// deliberately authored by the agent and validated — higher trust than heuristic
|
|
@@ -1362,6 +1367,7 @@ var MemTriedInputSchema = {
|
|
|
1362
1367
|
absent: z16.string().optional().describe("kind=regex: regex marking CORRECT usage nearby \u2014 excludes it from firing"),
|
|
1363
1368
|
severity: z16.enum(["warn", "block"]).default("block").describe("block = deterministic gate refusal"),
|
|
1364
1369
|
message: z16.string().optional().describe("Self-correction message shown when the sensor fires"),
|
|
1370
|
+
incident: z16.string().optional().describe("Provenance: the incident this sensor guards (e.g. 'prod #442') \u2014 surfaced when it fires and in the receipt"),
|
|
1365
1371
|
bad_example: z16.string().optional().describe("kind=regex: code snippet the sensor MUST fire on (validation)")
|
|
1366
1372
|
}).optional().describe(
|
|
1367
1373
|
"ONE-SHOT loop close: validate and attach a sensor in the same call (equivalent to a follow-up propose_sensor). Validated against HEAD \u2014 silent on current code, fires on the bad example. If rejected, the attempt is still saved and the verdict tells you how to revise."
|
|
@@ -1405,6 +1411,7 @@ async function memTried(input, ctx) {
|
|
|
1405
1411
|
absent: input.sensor.absent,
|
|
1406
1412
|
severity: input.sensor.severity ?? "block",
|
|
1407
1413
|
message: input.sensor.message,
|
|
1414
|
+
incident: input.sensor.incident,
|
|
1408
1415
|
bad_example: input.sensor.bad_example,
|
|
1409
1416
|
flags: void 0,
|
|
1410
1417
|
paths: []
|
|
@@ -2706,7 +2713,7 @@ function oneLine(value) {
|
|
|
2706
2713
|
return value.replace(/\s+/g, " ").replace(/"/g, '\\"').trim().slice(0, 120);
|
|
2707
2714
|
}
|
|
2708
2715
|
function serverVersion() {
|
|
2709
|
-
return true ? "0.
|
|
2716
|
+
return true ? "0.36.0" : "dev";
|
|
2710
2717
|
}
|
|
2711
2718
|
|
|
2712
2719
|
// src/tools/code-map.ts
|
|
@@ -4134,7 +4141,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
|
|
|
4134
4141
|
// src/server.ts
|
|
4135
4142
|
import { hasRecentBriefingMarker, loadConfigSync } from "@hivelore/core";
|
|
4136
4143
|
var SERVER_NAME = "hivelore";
|
|
4137
|
-
var SERVER_VERSION = "0.
|
|
4144
|
+
var SERVER_VERSION = "0.36.0";
|
|
4138
4145
|
function jsonResult(data) {
|
|
4139
4146
|
return {
|
|
4140
4147
|
content: [
|