@hivelore/mcp 0.35.1 → 0.37.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/server.d.ts CHANGED
@@ -515,6 +515,7 @@ declare const ProposeSensorInputSchema: {
515
515
  bad_example: z.ZodOptional<z.ZodString>;
516
516
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
517
517
  message: z.ZodOptional<z.ZodString>;
518
+ incident: z.ZodOptional<z.ZodString>;
518
519
  flags: z.ZodOptional<z.ZodString>;
519
520
  paths: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
520
521
  };
@@ -564,6 +565,7 @@ declare const MemTriedInputSchema: {
564
565
  absent: z.ZodOptional<z.ZodString>;
565
566
  severity: z.ZodDefault<z.ZodEnum<["warn", "block"]>>;
566
567
  message: z.ZodOptional<z.ZodString>;
568
+ incident: z.ZodOptional<z.ZodString>;
567
569
  bad_example: z.ZodOptional<z.ZodString>;
568
570
  }, "strip", z.ZodTypeAny, {
569
571
  kind: "regex" | "shell" | "test";
@@ -573,6 +575,7 @@ declare const MemTriedInputSchema: {
573
575
  command?: string | undefined;
574
576
  timeout_ms?: number | undefined;
575
577
  absent?: string | undefined;
578
+ incident?: string | undefined;
576
579
  bad_example?: string | undefined;
577
580
  }, {
578
581
  pattern?: string | undefined;
@@ -582,6 +585,7 @@ declare const MemTriedInputSchema: {
582
585
  timeout_ms?: number | undefined;
583
586
  absent?: string | undefined;
584
587
  severity?: "warn" | "block" | undefined;
588
+ incident?: string | undefined;
585
589
  bad_example?: string | undefined;
586
590
  }>>;
587
591
  };
package/dist/server.js CHANGED
@@ -1157,6 +1157,9 @@ var ProposeSensorInputSchema = {
1157
1157
  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."),
1158
1158
  severity: z15.enum(["warn", "block"]).default("block").describe("block = hard-fail the gate (accepted ONLY if it passes self-validation). warn = advisory."),
1159
1159
  message: z15.string().optional().describe("LLM-facing fix message shown when it fires. Defaults to one derived from the lesson."),
1160
+ incident: z15.string().optional().describe(
1161
+ "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."
1162
+ ),
1160
1163
  flags: z15.string().optional().describe("Optional regex flags (e.g. 'i' for case-insensitive)."),
1161
1164
  paths: z15.array(z15.string()).default([]).describe("Override scope paths. Defaults to the memory's anchor paths.")
1162
1165
  };
@@ -1276,6 +1279,7 @@ ${verdictCmd.detail}`,
1276
1279
  ...input.timeout_ms ? { timeout_ms: input.timeout_ms } : {},
1277
1280
  paths: anchorPathsCmd,
1278
1281
  message: input.message?.trim() || deriveMessage(found.memory.body, input.command.trim(), void 0),
1282
+ ...input.incident?.trim() ? { incident: input.incident.trim() } : {},
1279
1283
  severity: input.severity,
1280
1284
  autogen: false,
1281
1285
  last_fired: null
@@ -1306,6 +1310,7 @@ ${verdictCmd.detail}`,
1306
1310
  ...input.flags ? { flags: input.flags } : {},
1307
1311
  paths: anchorPaths,
1308
1312
  message: input.message?.trim() || deriveMessage(found.memory.body, input.pattern, input.absent),
1313
+ ...input.incident?.trim() ? { incident: input.incident.trim() } : {},
1309
1314
  severity: input.severity,
1310
1315
  autogen: false,
1311
1316
  // deliberately authored by the agent and validated — higher trust than heuristic
@@ -1360,6 +1365,7 @@ var MemTriedInputSchema = {
1360
1365
  absent: z16.string().optional().describe("kind=regex: regex marking CORRECT usage nearby \u2014 excludes it from firing"),
1361
1366
  severity: z16.enum(["warn", "block"]).default("block").describe("block = deterministic gate refusal"),
1362
1367
  message: z16.string().optional().describe("Self-correction message shown when the sensor fires"),
1368
+ incident: z16.string().optional().describe("Provenance: the incident this sensor guards (e.g. 'prod #442') \u2014 surfaced when it fires and in the receipt"),
1363
1369
  bad_example: z16.string().optional().describe("kind=regex: code snippet the sensor MUST fire on (validation)")
1364
1370
  }).optional().describe(
1365
1371
  "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."
@@ -1403,6 +1409,7 @@ async function memTried(input, ctx) {
1403
1409
  absent: input.sensor.absent,
1404
1410
  severity: input.sensor.severity ?? "block",
1405
1411
  message: input.sensor.message,
1412
+ incident: input.sensor.incident,
1406
1413
  bad_example: input.sensor.bad_example,
1407
1414
  flags: void 0,
1408
1415
  paths: []
@@ -2704,7 +2711,7 @@ function oneLine(value) {
2704
2711
  return value.replace(/\s+/g, " ").replace(/"/g, '\\"').trim().slice(0, 120);
2705
2712
  }
2706
2713
  function serverVersion() {
2707
- return true ? "0.35.1" : "dev";
2714
+ return true ? "0.37.0" : "dev";
2708
2715
  }
2709
2716
 
2710
2717
  // src/tools/code-map.ts
@@ -4132,7 +4139,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
4132
4139
  // src/server.ts
4133
4140
  import { hasRecentBriefingMarker, loadConfigSync } from "@hivelore/core";
4134
4141
  var SERVER_NAME = "hivelore";
4135
- var SERVER_VERSION = "0.35.1";
4142
+ var SERVER_VERSION = "0.37.0";
4136
4143
  function jsonResult(data) {
4137
4144
  return {
4138
4145
  content: [