storage-manifest
The storage shelf: one card per item archived to object storage (B2, Supabase Storage, S3). Register a card after a verified archive, find a card before any restore, restore through the agent's own restore skill with the card's restore form, then record the restore on the card.
- License 许可
- MIT
- 所属仓库
- garrytan/gbrain
- 最近更新
- 2026-11-15
- Stars
- ★ 3.3w
- Forks
- 4.9k
01 前言 Front Matter
- name
- storage-manifest
- tools
- [ "storage_find", "storage_get", "storage_list" ]
- version
- 1.0.0
- mutating
- true
- triggers
- [ "bring back", "restore the archived", "where did X go", "what's in B2", "what did we archive", "register this archive" ]
- description
- The storage shelf: one card per item archived to object storage (B2, Supabase Storage, S3). Register a card after a verified archive, find a card before any restore, restore through the agent's own restore skill with the card's restore form, then record the restore on the card.
- when_to_use
- Use when the user asks: "bring back", "restore the archived", "where did X go", "what's in B2", "what did we archive".
- writes_pages
- false
03 SKILL.md 正文
Storage manifest
Convention: see conventions/brain-first.md: look on the shelf with
gbrain storage-findbefore listing a bucket or asking the user where something went.
Full guide: docs/guides/storage-manifest.md.
Contract
- Register after the archive is verified, never before. Once the upload's checksum or snapshot check passed,
run
gbrain storage-register --card '<json>'(or pipe the card on stdin) from the trusted local CLI. The card names every copy (store, bucket, path, tool, repository, snapshot, size, hash and its kind, when verified), the original path, why it was archived, and the restore form{ skill, args }. - Find before restore.
gbrain storage-find "<the user's words>" --json(MCPstorage_find), thengbrain storage-get <id> --jsonfor the copies and the restore form. A miss lists the closest cards: show them. Onstorage_record_invalidthe stored card is broken: tell the user and do not restore from it. - Restore through the agent's own restore skill. Run the skill the card's
restore.skillnames withrestore.args. Cards never carry commands or credentials; the restore skill reads credentials from its own environment. gbrain never contacts a store. - Record the restore. After the restore, run
gbrain storage-update <id> --expected-revision <rev> --restored-to <path>with--restored-verifiedonly when the checksums matched.<rev>is the revisionstorage-getreturned; onstorage_revision_conflictread the card again and update once. - Interim records (
stored-objectpages understorage-manifest/written before the shelf existed) move withgbrain storage adopt: preview, show the user every refused field, then apply the printed command.
Anti-Patterns
- Putting a command, a password, a signed URL or an environment assignment on a card: it is refused.
- Writing the shelf with
put_pageorremember: refusedstorage_source_managed. - Restoring from a bucket listing without reading the card first.
- Recording
--restored-verifiedwithout checking the hashes.
Output Format
Tell the user what the card says in plain words: what the item is, where each copy lives, its size, when it was last verified, and which skill restores it. After a restore, say where it landed and whether the checksums matched.
When it fails
Read the refusal's code and follow its fix (see the agent operator protocol).
storage_manifest_missing on a brain with a Git checkout means the shelf is not hosted yet: relay the
gbrain storage init preview to the user.