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
865 B
Raw Blame
/**
 * The host-backup hook stays stdlib-only at load: its only static import
 * from `src/core` is the leaf of directory-name constants, so a broken
 * core build can cost the receipt but never the backup or the deny, and
 * the flag-off path loads no behaviour module.
 */
import { expect, test } from "bun:test";
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { fileURLToPath } from "node:url";

const HOOK = join(
  dirname(fileURLToPath(import.meta.url)),
  "..",
  "..",
  "hooks",
  "pretool-host-backup.ts",
);

test("the only static core import is the path-constants leaf", () => {
  const source = readFileSync(HOOK, "utf8");
  const statics = [...source.matchAll(/^import[^;]*?from\s+"(\.\.\/src\/[^"]+)";/gms)].map(
    (m) => m[1],
  );
  expect(statics).toEqual(["../src/core/brain/path-constants.ts"]);
});