Verified Rec

io.github.zaojiaoci由 GitHub 帳號 zaojiaoci 發布v0.1.0更新於 Oct 30, 2026

Hash-chained audit ledger for AI agent work — record, verify and replay what the agent did.

發布方自己的服務:verified.fyi

已驗證STDIO僅桌面開發者工具安全與監控

概覽

AI 產生的概覽

本機 MCP 伺服器,為 AI Agent 的工作維護雜湊鏈、僅可追加的稽核帳本,事後可驗證與重播。

可以做什麼
  • 建立新的僅可追加帳本檔案,寫入創世條目並回傳第一個鏈頭
  • 追加一筆記錄(動作,可選執行者與備註)並回傳新鏈頭,鏈已損壞時拒絕寫入
  • 端對端驗證帳本,重算每個雜湊與連結,回報第一個斷鏈行號
  • 依序重播帳本條目,可指定序號區間
  • 用已登記的決定性核心重播遊戲 .rec 錄影,計算鏈頭並與預期鏈頭比對
適用情境
適合需要留下可查核紀錄的情境,例如發版或其他重要工作中記錄 Agent 實際做了什麼,事後確認紀錄未被更動。也適用於驗證遊戲 .rec 錄影的完整性。
執行需求
以 stdio 在本機執行,通常透過 npx 啟動 npm 套件 verified-rec,也可用 node 執行本機程式碼。需要 Node.js 18 或更新版本。不需帳號、API 金鑰、環境變數或網路存取。
安裝前請注意
帳本只能發現誤改和隨手竄改;若攻擊者重算整條鏈並偽造鏈頭則無法發現,除非把鏈頭另行公開登記。帳本檔案會在本機建立與追加,且不會覆寫既有檔案。遊戲驗證核心是編譯產物,若用於稽核應先核對其來源。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Verified Rec,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

verified-rec

Hash-chained audit ledger for AI agent work. Append-only records anyone can verify and replay — did the agent really do what it says it did?

An MCP server. Zero npm dependencies. Records land in a plain text file you own.

You:   "ship the release."Agent: *does the work, records each step into the ledger*You:   "verify the ledger."Agent: "chain intact — 14 entries, head 9f3c…, nothing edited."

Tools

ToolWhat it does
ledger_startStart a new ledger (.vrec). Genesis entry + chain head. Never overwrites.
ledger_appendAppend one step. Returns the new chain head. Refuses to write to a broken chain.
ledger_verifyRecompute every hash, check every link. Returns the first broken line if someone edited the file.
ledger_replayList entries in order (optionally a range).
game_verify_recReplay a game .rec recording through a deterministic kernel and compute its chain head — see Origin.

Install

One line, any MCP host:

jsonc
// ~/.codebuddy/.mcp.json  (WorkBuddy / CodeBuddy)   — user scope// ~/Library/Application Support/Claude/claude_desktop_config.json  (Claude Desktop){  "mcpServers": {    "verified-rec": {      "type": "stdio",      "command": "npx",      "args": ["-y", "verified-rec"]    }  }}

Local checkout works the same way ("command": "node", "args": ["/path/to/verified-rec/src/server.js"]). Node ≥ 18. No build step, no native modules, no network.

Usage

After installing, just talk to your agent — the tools are named in plain language and it will pick them up:

  • "Open a ledger for today's release work." → ledger_start creates release.vrec with a genesis entry and returns the first chain head.
  • "Record what you just did." (as the agent works) → ledger_append adds one step (action, optional actor / note) and returns the new head.
  • "Verify the ledger." → ledger_verify recomputes the chain and reports ok + entry count + head — or the first broken line number if anything was edited.
  • "Show me the ledger." → ledger_replay lists entries in order.

Verifying a game recording (see Origin):

  • "Check this recording: /path/to/play.rec, head 9f3c…" → game_verify_rec replays it and answers one of three ways: reproduced (some registered kernel recomputes the head — authentic), not-reproduced (none does — tampered or from an unregistered game version), premise-broken (the recording's facts match no kernel at all). Without an expected head it just proves the recording is replayable and reports its head.

Tip: after any important ledger_append, publish the chain head (commit message, release note, chat). That is what turns "I didn't edit it" into "nobody edited it" — the published head pins the chain retroactively.

How verification works

Each entry links to the previous one by hash:

entry.hash = sha256([seq, ts, actor, action, note, prev].canonical)entry.prev = previous entry.hash          (genesis prev = 64 zeros)

ledger_verify recomputes the whole chain. Edit one field in one line, swap two lines, delete one — the first broken line is reported by number.

Threat model, honestly stated: this catches accidental edits and casual tampering. It cannot catch an attacker who rewrites the entire chain and its head. The fix is the oldest trick in accounting: publish the head — commit it, tweet it, put it in a release note. A retroactive edit then breaks against the published head, anywhere.

Origin

This ledger is an extraction. It came from a game — 《它在维护一场对话》(It Is Maintaining a Conversation), a free narrative game about a mind that maintains memories for someone, and loses them. Every in-game state is hash-chained; every playthrough can be recorded as a .rec file and replayed byte-for-byte. The design discipline behind that ("decisions are hashed, prose is not; same inputs, same chain head") is what this tool generalizes.

The lineage is one step older: the game evolved from dbx-sql-guard, a hash-chain guard for SQL — the same instinct, three forms: a database guard, a game, a work ledger.

game_verify_rec keeps that story executable. It replays a .rec recording through the same deterministic narrative kernel (versioned compiled artifacts, see LICENSE-content.md and PROVENANCE.md) and reports the chain head — the head of the game's own hash chain, where head = H(prev ‖ frame ‖ canonical state) per frame. Give it an expectedHead and it becomes an integrity check with three outcomes: reproduced (some registered kernel version recomputes the head — authentic), not-reproduced (no registered kernel does — tampered, or from an unregistered game version), premise-broken (the recording's facts digest matches no kernel at all). Kernel upgrades add a new registered version; old recordings keep verifying against old kernels — an upgrade never falsifies an honest recording.

The kernel is a compiled artifact, and that is a fair thing to be suspicious of in an audit tool. PROVENANCE.md answers it: every kernel version ships with its source wasm and SHA-256, is byte-reproducible from it via a pinned wasm2js command (./gen-kernel.sh), and is anchored to the game's publicly registered golden chain heads — verify it yourself in minutes, no trust in the author required.

Files

  • *.vrec — ledger files, newline-delimited JSON. Plain text; diffable, greppable.
  • .rec — game recordings (crossgame-slice-recording line format: seed=, facts=, variants=, then f=<frame> <tokens> per frame). Produced by the game's own export panel.

License

Code: Apache-2.0. The narrative content compiled into kernel/ (sim-<ver>.wasm / kernel-asm-<ver>.js): All Rights Reserved (see LICENSE-content.md). The two halves are explained in both files — engine is engineering, story is authorship.


中文

给 AI Agent 工作用的哈希链账本。 追加式记录,任何人都能校验和重放—— Agent 说它做过的事,链上做没做过,一验便知。

MCP server,零 npm 依赖,账本是你自己机器上的纯文本文件。

工具作用
ledger_start开一本新账(.vrec),创世环 + 链头。已存在则拒绝(账不覆盖旧账)
ledger_append记一环,返回新链头。链断了先修账才准记
ledger_verify全量重算哈希、环环相扣。谁改过文件,报第一个断链行号
ledger_replay按序重放(可切片)
game_verify_rec用版本化确定性内核重放游戏 .rec,算出链头并给三态判定(见下)

安装:上面那段 JSON 照抄进 MCP 配置(WorkBuddy/CodeBuddy 是 ~/.codebuddy/.mcp.json),一行 npx -y verified-rec。Node ≥ 18, 无构建、无原生模块、不碰网络。

使用:装完直接跟 Agent 说话就行,工具会被自动挑中:

  • "开一本账记今天的发版工作" → ledger_start 建 .vrec,创世环 + 首个链头
  • "把刚才做的事记上"(干活途中随时)→ ledger_append 记一环,返回新链头
  • "验一下这本账" → ledger_verify 全量重算:完好报 ok + 条数 + 链头, 被改过就报第一个断链行号
  • "把账读一遍" → ledger_replay 按序列出

验游戏录像(见出处段):

  • "验这份录像 /path/to/play.rec,链头 9f3c…" → game_verify_rec 三态回答: reproduced(某登记内核复现链头 ⇒ 真实)/ not-reproduced(都复现不出 ⇒ 篡改或未登记版本)/ premise-broken(facts 对不上任何内核)。不给链头 则只证明可重放并报出链头。

用法要点:重要操作 ledger_append 之后,把链头登记出去(提交信息 / 发布记录 / 聊天里贴一下)——这一步才把"我没改过"升级成"谁都没法改"。

防篡改的诚实边界:抓得住手改和误改;抓不住「重算整条链并伪造链头」的 攻击者。解法是会计行最古老的一招——把链头登记出去(git 提交 / 公开贴文), 事后改账就与公开链头对不上。

内核的出生证明:kernel/ 里的编译产物不是黑箱——每个版本带源 wasm 与 SHA-256,可用 PROVENANCE.md 里钉死的 wasm2js 命令 (./gen-kernel.sh)逐字节重建,并用游戏公开登记的黄金链头锚定内容。 game_verify_rec 的三态判定:reproduced(某登记版本内核复现链头 ⇒ 真实)/ not-reproduced(所有登记版本都算不出 ⇒ 篡改或录自未登记版本)/ premise-broken(facts 对不上任何内核)。内核升级是追加新版本,老录像 永远用老内核验,升级不会冤枉诚实的录像。

出处:这套账本是从游戏里提出来的。《它在维护一场对话》 ——一个关于记忆衰减的免费叙事游戏,它把每一帧状态都串成哈希链,每一局都能 录成 .rec 逐帧重放。本工具就是那套纪律的通用化。谱系再往前一步:游戏本身 演化自 dbx-sql-guard—— 同一个本能的三种形态:数据库守卫、游戏、工作账本。

來源:README.md,提交 d88de35

工具

5

ledger_start

Start a new append-only hash-chained ledger file (.vrec). Each entry links to the previous one by hash; anyone can later verify the file was not tampered with. Fails if the file already exists (ledgers never overwrite).

輸入參數path必填actortitle

ledger_append

Append one entry to a ledger. Returns the new chain head. Verifies the existing chain first — you cannot append to a broken ledger.

輸入參數notepath必填actoraction必填

ledger_verify

Verify a ledger end-to-end: recompute every entry hash, check the links and sequence. Returns ok=true with the chain head, or the first broken line number and why.

輸入參數path必填

ledger_replay

Replay a ledger: list entries in order (optionally a seq range). Read-only; run ledger_verify to check integrity.

輸入參數tofrompath必填

game_verify_rec

Replay a game .rec recording through versioned deterministic kernels and compute its chain head. With expectedHead this is an integrity check with three outcomes: "reproduced" (some registered kernel reproduces the head — authentic), "not-reproduced" (no registered kernel does — tampered, or from an unregistered game version), "premise-broken" (facts digest matches no kernel). Without expectedHead it proves the recording is replayable and reports its head plus the kernel version used. Old recordings verify against old kernels — kernel upgrades never falsify them.

輸入參數path必填expectedHeadkernelVersion

版本歷史

1
  1. v0.1.0最新Oct 29, 2026

評分

已滿足適用檢查項的 80%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。

其他 Verified 整合