Skip to main content

apply_config_migration_fixes

Function apply_config_migration_fixes 

Source
pub fn apply_config_migration_fixes(root: &Path) -> Result<bool>
Expand description

Rewrites .apm/config.toml (or apm.toml) to migrate legacy worker config fields to the current worker_profile = "agent/role" shape.

Handles two generations of legacy format:

  • V1→V2: [workers] command/args/model[workers] agent/options.model
  • V2→V3: [workers] agent/options.model[workers] default/model

Returns true when the file was rewritten, false when no migration was needed or migration was blocked by a non-Claude command.