history.json is the local audit log for a Buttons workspace.
It records two kinds of changes:
- command-driven changes, like
buttons create,buttons install,buttons update,buttons delete, and rollback - file-hook changes, like editing
button.json,main.sh,AGENT.md,drawer.json,buttons.json, orbuttons-lock.jsondirectly
Event shape
Actions
History should record:| Action | Cause |
|---|---|
create | A button or drawer is created. |
edit | A tracked button, drawer, manifest, or lock file changes. |
delete | A button or drawer is removed. |
install | A registry or source installs a button. |
update | An installed button resolves to a newer version/hash. |
rollback | A button is restored to an earlier locked version. |
resolve_failed | Registry/source resolution fails. |
File-hook tracking
Commands should write explicit history events when they mutate state. File hooks should catch manual edits and agent edits that happen outside a Buttons command. The watcher should track:edit event.
Commit policy
Commit:.buttons/buttons.json.buttons/buttons-lock.json- authored button and drawer files
.buttons/history.json- pressed run history
- batteries or webhook config
history.json gives each machine local auditability.