@hivelore/cli 0.35.0 → 0.35.1

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.
@@ -2723,7 +2723,7 @@ function oneLine(value) {
2723
2723
  return value.replace(/\s+/g, " ").replace(/"/g, '\\"').trim().slice(0, 120);
2724
2724
  }
2725
2725
  function serverVersion() {
2726
- return true ? "0.35.0" : "dev";
2726
+ return true ? "0.35.1" : "dev";
2727
2727
  }
2728
2728
  var CodeMapInputSchema = {
2729
2729
  file: z20.string().optional().describe("Filter to files whose path contains this substring"),
@@ -4050,7 +4050,7 @@ When done, respond with: "Imported N memories: [list of IDs]" or "Nothing action
4050
4050
  };
4051
4051
  }
4052
4052
  var SERVER_NAME = "hivelore";
4053
- var SERVER_VERSION = "0.35.0";
4053
+ var SERVER_VERSION = "0.35.1";
4054
4054
  function jsonResult(data) {
4055
4055
  return {
4056
4056
  content: [
@@ -4993,4 +4993,4 @@ export {
4993
4993
  printHaiveMcpVersion,
4994
4994
  runHaiveMcpStdio
4995
4995
  };
4996
- //# sourceMappingURL=chunk-ZR7UPTRR.js.map
4996
+ //# sourceMappingURL=chunk-QQANGHJK.js.map
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  preCommitCheck,
11
11
  readPresumedCorrectTargets,
12
12
  runHaiveMcpStdio
13
- } from "./chunk-ZR7UPTRR.js";
13
+ } from "./chunk-QQANGHJK.js";
14
14
  import {
15
15
  registerMemoryPending
16
16
  } from "./chunk-OYJKHD22.js";
@@ -3755,7 +3755,7 @@ ${SEED_FOOTER(stack)}` });
3755
3755
 
3756
3756
  // src/commands/init.ts
3757
3757
  var execFileAsync = promisify2(execFile2);
3758
- var HAIVE_GITHUB_ACTION_REF = `v${"0.35.0"}`;
3758
+ var HAIVE_GITHUB_ACTION_REF = `v${"0.35.1"}`;
3759
3759
  var PROJECT_CONTEXT_TEMPLATE = `# Project context
3760
3760
 
3761
3761
  > Generated by \`hivelore init\`. Run \`hivelore init --bootstrap\` to auto-fill from your codebase,
@@ -4715,6 +4715,7 @@ import "commander";
4715
4715
  import {
4716
4716
  DEFAULT_AUTO_PROMOTE_RULE,
4717
4717
  assessSensorHealth,
4718
+ sensorPromotedAtMap,
4718
4719
  buildFrontmatter as buildFrontmatter3,
4719
4720
  existingGateMissShas,
4720
4721
  findProjectRoot as findProjectRoot9,
@@ -4773,10 +4774,12 @@ function registerSync(program2) {
4773
4774
  let promoted = 0;
4774
4775
  let autoApproved = 0;
4775
4776
  let quarantined = 0;
4777
+ const quarantineCandidates = await loadMemoriesFromDir7(paths.memoriesDir);
4776
4778
  const sensorHealth = new Map(
4777
- assessSensorHealth(await loadSensorLedger(paths)).map((health) => [health.memory_id, health])
4779
+ assessSensorHealth(await loadSensorLedger(paths), /* @__PURE__ */ new Date(), {
4780
+ promotedAt: sensorPromotedAtMap(quarantineCandidates.map((m) => m.memory.frontmatter))
4781
+ }).map((health) => [health.memory_id, health])
4778
4782
  );
4779
- const quarantineCandidates = await loadMemoriesFromDir7(paths.memoriesDir);
4780
4783
  for (const { memory: memory2, filePath } of quarantineCandidates) {
4781
4784
  const sensor = memory2.frontmatter.sensor;
4782
4785
  const health = sensorHealth.get(memory2.frontmatter.id);
@@ -5261,7 +5264,8 @@ async function processGateMissWatch(root, paths, dryRun) {
5261
5264
  const proposals = proposeGateMissDrafts(
5262
5265
  readGitCommitsRange(root, plan.range),
5263
5266
  existingGateMissShas(await loadMemoriesFromDir7(paths.memoriesDir)),
5264
- gatePassedShas(await loadSensorLedger(paths))
5267
+ gatePassedShas(await loadSensorLedger(paths)),
5268
+ { pathExists: (rel) => existsSync14(path15.join(root, rel)) }
5265
5269
  );
5266
5270
  const ids = [];
5267
5271
  for (const proposal of proposals) {
@@ -8574,6 +8578,7 @@ import "commander";
8574
8578
  import {
8575
8579
  codeMapPath as codeMapPath2,
8576
8580
  assessSensorHealth as assessSensorHealth2,
8581
+ sensorPromotedAtMap as sensorPromotedAtMap2,
8577
8582
  countSourceFilesOnDisk,
8578
8583
  extractReferencedPaths,
8579
8584
  sensorPatternBrittleness,
@@ -8832,7 +8837,9 @@ function registerDoctor(program2) {
8832
8837
  fix: "Make the pattern discriminating (add an 'absent' companion), or demote: `hivelore sensors promote <id> --severity warn`"
8833
8838
  });
8834
8839
  }
8835
- const sensorHealth = assessSensorHealth2(await loadSensorLedger2(paths));
8840
+ const sensorHealth = assessSensorHealth2(await loadSensorLedger2(paths), /* @__PURE__ */ new Date(), {
8841
+ promotedAt: sensorPromotedAtMap2(memories.map((m) => m.memory.frontmatter))
8842
+ });
8836
8843
  for (const health of sensorHealth.filter((h) => h.quarantine_pending)) {
8837
8844
  const last = health.flaps.at(-1);
8838
8845
  findings.push({
@@ -8949,7 +8956,7 @@ function registerDoctor(program2) {
8949
8956
  fix: "Edit .ai/haive.config.json: set autoSessionEnd: true (or re-run `hivelore init` without --manual)."
8950
8957
  });
8951
8958
  }
8952
- findings.push(...await collectInstallFindings(root, "0.35.0"));
8959
+ findings.push(...await collectInstallFindings(root, "0.35.1"));
8953
8960
  findings.push(...await collectToolchainFindings(root));
8954
8961
  try {
8955
8962
  const legacyRaw = execSync("haive-mcp --version", {
@@ -8957,7 +8964,7 @@ function registerDoctor(program2) {
8957
8964
  timeout: 3e3,
8958
8965
  stdio: ["ignore", "pipe", "ignore"]
8959
8966
  }).trim();
8960
- const cliVersion = "0.35.0";
8967
+ const cliVersion = "0.35.1";
8961
8968
  if (legacyRaw && legacyRaw !== cliVersion) {
8962
8969
  findings.push({
8963
8970
  severity: "warn",
@@ -9697,6 +9704,7 @@ import {
9697
9704
  antiPatternGateParams as antiPatternGateParams2,
9698
9705
  appendSensorEvaluations,
9699
9706
  assessSensorHealth as assessSensorHealth3,
9707
+ sensorPromotedAtMap as sensorPromotedAtMap3,
9700
9708
  assessBootstrapState,
9701
9709
  isSensorScannablePath,
9702
9710
  findProjectRoot as findProjectRoot37,
@@ -10657,7 +10665,7 @@ async function buildEnforcementReport(dir, stage, sessionId) {
10657
10665
  findings: [{ severity: "info", code: "enforcement-off", message: "Hivelore enforcement is disabled." }]
10658
10666
  });
10659
10667
  }
10660
- findings.push(...await inspectIntegrationVersions(root, "0.35.0"));
10668
+ findings.push(...await inspectIntegrationVersions(root, "0.35.1"));
10661
10669
  if (config.enforcement?.requireBriefingFirst !== false && stage !== "ci") {
10662
10670
  const hasBriefing = await hasRecentBriefingMarker(paths, sessionId);
10663
10671
  findings.push(hasBriefing ? { severity: "ok", code: "briefing-loaded", message: "A recent Hivelore briefing marker exists." } : {
@@ -11045,7 +11053,10 @@ async function runSensorGate(paths, diff, stage) {
11045
11053
  }, { exit_code: run.exit_code, duration_ms: run.duration_ms }));
11046
11054
  }
11047
11055
  const prior = await loadSensorLedger3(paths);
11048
- const health = new Map(assessSensorHealth3([...prior, ...ledgerRows]).map((h) => [h.memory_id, h]));
11056
+ const promotedAt = sensorPromotedAtMap3(scannable.map((m) => m.frontmatter));
11057
+ const health = new Map(
11058
+ assessSensorHealth3([...prior, ...ledgerRows], /* @__PURE__ */ new Date(), { promotedAt }).map((h) => [h.memory_id, h])
11059
+ );
11049
11060
  for (const run of runs) {
11050
11061
  const sensorHealth = health.get(run.memory_id);
11051
11062
  const quarantined = sensorHealth?.quarantine_pending === true;
@@ -12108,6 +12119,7 @@ import {
12108
12119
  extractSensorExamples,
12109
12120
  appendSensorEvaluations as appendSensorEvaluations2,
12110
12121
  assessSensorHealth as assessSensorHealth4,
12122
+ sensorPromotedAtMap as sensorPromotedAtMap4,
12111
12123
  findProjectRoot as findProjectRoot39,
12112
12124
  isRetiredMemory as isRetiredMemory3,
12113
12125
  judgeProposedSensor,
@@ -12203,7 +12215,10 @@ function registerSensors(program2) {
12203
12215
  }, { exit_code: run.exit_code, duration_ms: run.duration_ms }));
12204
12216
  }
12205
12217
  const prior = await loadSensorLedger4(paths);
12206
- const health = new Map(assessSensorHealth4([...prior, ...ledgerRows]).map((h) => [h.memory_id, h]));
12218
+ const promotedAt = sensorPromotedAtMap4(allSensorMemories.map((m) => m.frontmatter));
12219
+ const health = new Map(
12220
+ assessSensorHealth4([...prior, ...ledgerRows], /* @__PURE__ */ new Date(), { promotedAt }).map((h) => [h.memory_id, h])
12221
+ );
12207
12222
  for (const run of runs) {
12208
12223
  const quarantined = health.get(run.memory_id)?.quarantine_pending === true;
12209
12224
  if (run.status === "failed") {
@@ -12336,7 +12351,9 @@ function registerSensors(program2) {
12336
12351
  const next = {
12337
12352
  frontmatter: {
12338
12353
  ...found.memory.frontmatter,
12339
- sensor: { ...sensor, severity }
12354
+ // promoted_at makes health assessment ignore pre-promotion ledger rows: promoting is the
12355
+ // human's assertion the oracle was fixed, so old flaps must not re-quarantine it.
12356
+ sensor: severity === "block" ? { ...sensor, severity, promoted_at: (/* @__PURE__ */ new Date()).toISOString() } : { ...sensor, severity }
12340
12357
  },
12341
12358
  body: severity === "block" ? withoutQuarantineNote(found.memory.body) : found.memory.body
12342
12359
  };
@@ -12355,7 +12372,7 @@ function registerSensors(program2) {
12355
12372
  return;
12356
12373
  }
12357
12374
  const root2 = findProjectRoot39(opts.dir);
12358
- const { proposeSensor } = await import("./server-2FUYM6KI.js");
12375
+ const { proposeSensor } = await import("./server-W5Q35K7Q.js");
12359
12376
  const out = await proposeSensor(
12360
12377
  {
12361
12378
  memory_id: id,
@@ -13192,7 +13209,7 @@ function registerBridges(program2) {
13192
13209
 
13193
13210
  // src/index.ts
13194
13211
  var program = new Command48();
13195
- program.name("hivelore").description("Hivelore - repo-native memory and context policy for coding-agent harnesses").version("0.35.0").option("--advanced", "show maintenance and experimental commands in help").showSuggestionAfterError(true);
13212
+ program.name("hivelore").description("Hivelore - repo-native memory and context policy for coding-agent harnesses").version("0.35.1").option("--advanced", "show maintenance and experimental commands in help").showSuggestionAfterError(true);
13196
13213
  registerInit(program);
13197
13214
  registerResolveProject(program);
13198
13215
  registerEnforce(program);