Save the partners you reviewed in
agents.lock.jsonOne line per partner network: its URL and its fingerprint. Take the fingerprint from the partner's report in the index, from Pinned's published data/agents.lock.json, or copy check-lock.mjs and let it write the file after you have read the partner's files:
{ "https://kaushik-srinivasan.github.io/pinned/pinned_index": "sha256-524e3321efba7362668b4b18b6647473cc66b947db90cac75c7757fbdd61eb9b" }node check-lock.mjs agents.lock.json --update # writes today's fingerprints; review first
Put the file next to your
agent-manifest.json.Install Pin Guard after the runtime boots
Copy pin-guard.js and quiet-check.js into your site, then:
import { PinGuard } from "./pin-guard.js"; const booted = await boot("#agent-app", { originUrl: here }); const lock = await (await fetch("./agents.lock.json", { cache: "no-store" })).json(); PinGuard.install(booted.engine, lock, { onBlock: ({ host }) => showNotice(`${host} changed since you pinned it, so it was not called.`), });From then on, every call to another site is checked at the consent step, including hosts the visitor chose "Always allow" for. A changed partner is declined before it runs, and your agent is told why. The guard hands the runtime the exact bytes it checked, so there is no second fetch.
Check the lock in CI
Fail your build when a partner changes, so you find out before your visitors do:
- uses: kaushik-srinivasan/pinned@main with: lockfile: agents.lock.jsonWhen it fails, read what changed (the index shows each change), and run
check-lock.mjs --updateonce you accept it.
See it working: a test site that pins two partners; one of them really changed after it was pinned, and only that one is refused.