fn copy_name(
mstore: &Store,
all_defs: &[AgentDefinition],
source: &AgentDefinition,
root: &AgentDefinition,
branch_label: &str,
as_fork: bool,
) -> Result<String, String>Expand description
The new definition’s name: the label it was given (checked against the reserved and taken names), or the next free lineage-wide “Name #N” when none was.
branch_label is the fork’s full display name when provided. When empty, auto-generate a flat, lineage-wide
“Name #N” (see suggest_fork_name’s doc comment).