Migrating to the new data names
greenbelay 5.0.0 renames its data names: the GREENBELAY_* variables, the
greenbelay.* git config keys, the greenbelay state directories, the
greenbelay-*-v1 schemas and the clear-relay@greenbelay plugin.
The first greenbelay command after upgrading (a hook, or any subcommand except
migrate and doctor) migrates the machine once, under a lock. A hook never
waits for the lock and is never blocked or refused by the migration.
What moves
- The two state roots,
~/.claude/amont-agentand<state home>/amont-agent, are each renamed togreenbelay, with a symlink left at the old path. - The
amont.agent.*git config keys are renamed in the files that hold them. Includes are followed whether or not their condition holds. Each key is copied, verified and only then removed. - The clear-relay plugin registration in
settings.jsonand its marketplace file.
Markers
Three files in the Claude config directory record the state:
| file | meaning |
|---|---|
greenbelay-migrated | the migration finished; hooks stop checking |
greenbelay-migrate-reversed | --reverse ran; a hook never migrates forward while it exists |
greenbelay-migrate-failed | a step failed; it holds the step and what to fix |
The command
greenbelay migrate [--reverse] [--dry-run]
An explicit run waits up to 30 s for the lock. --dry-run changes nothing.
--reverse puts everything back, rewriting 5.0 journal and ledger rows to the
old names, and leaves nothing at the new paths.
Until the migration is done
- Until the done-marker exists, a hook still reads an old
amont.agent.*key when its new twin is absent. The new key wins when both exist. After the marker exists the old keys are ignored. - Old environment variables are no longer read.
greenbelay doctorlists each one that is set, with the name to set instead. - Old journal rows, review rows and committed
.casesfiles are still read until the old names are retired. - The installers accept
AMONT_AGENT_BIN_DIRandAMONT_AGENT_VERSIONwith a warning; the new names areGREENBELAY_BIN_DIRandGREENBELAY_VERSION.
Claude Code keeps its own plugin registry (plugins/installed_plugins.json and
plugins/known_marketplaces.json under the Claude config directory).
greenbelay never changes it and never runs claude; migrate, install and
doctor read it, and when it does not match the clear-relay plugin that
settings.json registers they print the claude plugin commands to run
(doctor as a failing finding, since the plugin stays off until they are run).
The commands always go to stderr; migrate --dry-run and install without
--write print them as would then need: lines, and a dry run with nothing
to move but a registry to fix says nothing to move rather than nothing to do.