Skip to content

Local-first 🧠 memory for Hermes Agent that lives in your Obsidian vault and remembers project context. Nightly 😴 dream passes turn repeat corrections into confirmed preferences with measurable confidence. Adapters ship for Claude Code, Codex, and OpenClaw, with an MCP server for anything else.

TypeScript
557 B
Raw Blame
/**
 * Deterministic hygiene finding ids: `<detector>:<sha256 prefix>` over
 * the sorted target list, so the same finding keeps the same id across
 * scans and can be selected into an apply plan by id.
 */

import { createHash } from "node:crypto";

import type { HygieneDetectorId } from "../types.ts";

export function hygieneFindingId(
  detector: HygieneDetectorId,
  targets: ReadonlyArray<string>,
): string {
  const digest = createHash("sha256").update(targets.toSorted().join("\0")).digest("hex");
  return `${detector}:${digest.slice(0, 12)}`;
}