history.json is the local audit log for a Buttons workspace.
It records workspace mutations:
- registry dependency changes from
buttons add - manifest installs from
buttons install
Event shape
The file has a schema version and an orderedevents array:
Actions
History records:What’s tracked
Lifecycle events are local audit records. They are not the source of truth for dependency resolution; the source of truth is:Commit policy
Commit:- your authored button and drawer specs —
button.json,drawer.json, the code file, andAGENTS.md .buttons/buttons.jsonand.buttons/buttons-lock.jsonwhen your project depends on registry buttons
.buttons/history.json- pressed run history (
buttons/*/pressed/,drawers/*/pressed/) batteries.json,webhook.json,idempotency/,queues/
.buttons/buttons-lock.json, not inside each installed button.json. Committing the manifest and lockfile lets a teammate materialize the same versions with buttons install. history.json stays local — it is each machine’s own audit trail.
Press failures & replay
history.json above tracks dependency lifecycle events. A target’s run history is separate: one JSON file per press under buttons/<name>/pressed/ (and drawers/<name>/pressed/), each recording the args, exit code, output, and status. There is no dead-letter queue — a failed press is just a run record with a non-ok status.
That makes triage a short loop an agent runs entirely from the CLI:
- Spot failures —
buttons summary --jsonaggregates recent failures across the workspace underrecent_failures. - Drill in —
buttons history <name>(orbuttons drawer <name> --json) shows that target’s recent runs, including the exact args each was pressed with. - Replay — once the cause is fixed, re-press with those same args: