Database administration
rbook_dbMaintain the local Reasonbook store and dashboard mirror, handling snapshots, restores, purges, pruning, conflicts, and health checks to keep project records consistent.
Instructions
Maintain the local store and its dashboard mirror; health and conflicts only read. Database admin. snapshot creates unless listOnly=true; retention deletes oldest files. restore backs up then replaces the local store; shared stores refuse. purge deletes only the dashboard mirror. prune_snapshots previews unless confirmed; empties content, keeps rows, references and milestones. conflicts lists divergent shared fields; settle keeps one value. pull/clone retired: use reasonbook sync. backfill uploads owner stores; force is ignored; dryRun=true refuses retired replay.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | No | Retired; use reasonbook sync | |
| field | No | settle: the field in conflict | |
| force | No | Ignored | |
| limit | No | Retired; use reasonbook sync | |
| table | No | settle: the table, or "project" | |
| value | No | settle: the value to keep | |
| action | Yes | ||
| dryRun | No | backfill: refuses retired replay | |
| confirm | No | Required to restore, purge or apply a snapshot prune | |
| keepIds | No | Snapshot ids a prune keeps | |
| keepLast | No | Per context, keep 30 snapshots' content by default | |
| listOnly | No | snapshot: list, create none | |
| maxPages | No | Retired; use reasonbook sync | |
| recordId | No | settle: the row id this copy shows | |
| keepSince | No | Keep snapshots from this date on | |
| snapshotId | No | restore: required listed ID, not a path | |
| keepSources | No | Keep matching sources (* = anything) | |
| projectRoot | No | Folder/rbook:// address; inferred | |
| expectedSlug | No | purge: refuse unless slug matches | |
| maxSnapshots | No | snapshot retention: RBOOK_MAX_SNAPSHOTS or 50 |