.buttons/buttons/. Desired dependencies live in .buttons/buttons.json; exact resolved versions live in .buttons/buttons-lock.json.
buttons.json
buttons.json is the project manifest. It lives at the root of .buttons/ and is committed with the repo.
It declares trusted registries and desired buttons:
auto_update, channels, constraints, or rollout policy.
buttons-lock.json
buttons-lock.json is the resolved lock file. It lives next to buttons.json and should be committed with the repo.
buttons.json is the desired state. buttons-lock.json is the exact resolved state.
history.json
history.json is local and should not be committed. It records what happened on one machine over time: creates, edits, installs, updates, rollbacks, deletes, and failed registry fetches.
See History for the event model.
Install Flow
When registry-backed install runs, Buttons should:- Read
.buttons/buttons.jsonfor registries, desired buttons, and version policy. - Resolve the requested button, version, or tag from the configured registry.
- Fetch the button bundle, including
button.json,main.*,AGENT.md, and support files. - Install the runnable copy into
.buttons/buttons/<name>/. - Install required peer buttons from
requires. - Stamp
source,version, andcontent_hashinto the installedbutton.json. - Update
.buttons/buttons-lock.jsonwith exact resolved versions and hashes. - Append an event to
.buttons/history.json.
Resolution
Install requests can target a button, a pinned version, or a tag:--source, for explicit one-off local installs.BUTTONS_SOURCE, for a local default source..buttons/buttons.json, for the project team contract.
Source Layout
A local registry source is a directory of button folders:button.json. Support files are copied into the installed button.