blake-witness

Who touched the space.

Part of blake-guard: policy gates intents; witness witnesses filesystem contact with a personal space — process, OS user, agent, or host — as durable JSONL on disk.

blake-guard · blake-witness · Apache-2.0 · Node ≥ 20

why

Disk is the ground truth.

  • Outside the chat

    Access is recorded where files live — not in a model transcript. Process, OS user, and host actor stay on disk.

  • Personal space on FS

    Blake keeps each space under data/agents/{name}/. The witness log sits beside it: .blake-space-access/access.jsonl.

  • Portable

    Same package on Blake or your host. No Blake UI required — CLI + JSONL are enough.

install

Get the package.

Public name: blake-witness.

npm install blake-witness

# or from GitHub
npm install github:ndblk3/blake-witness

record

Append when you open the tree.

import {
  createFsAccessLog,
  recordSpaceAccess,
} from "blake-witness";

const log = createFsAccessLog("/var/spaces/andy");

await recordSpaceAccess(log, {
  spaceId: "andy",
  op: "sync",
  path: "agents/",
  actor: { kind: "agent", id: "agt_123", label: "inbox agent" },
});
// also captures pid · uid · OS user · process title
const rows = await log.recent(20);
for (const row of rows) {
  console.log(row.at, row.op, row.actor.user, row.actor.pid);
}

cli

Inspect without a UI.

npx blake-witness whoami
npx blake-witness record --dir ./data/agents/andy --space andy --op write
npx blake-witness recent --dir ./data/agents/andy --limit 20

on blake

Already wired to agent disk.

Provision and sync of data/agents/{nickname} append witness rows. Open Account → Profile to see who touched your space.

Part of blake-guard — gate intents, witness the space, keep the compliance trail.