pub(crate) fn fork_definition(
mstore: &Store,
id_store: &Store,
identity_store: &Store,
source_id: &str,
branch_label: &str,
) -> Result<AgentDefinition, String>Expand description
Fork source_id into a new definition: its content, skills, provider and
flags, linked to its account, with a fresh id, workspace, bus id and own
bundle, recorded as the source’s fork. branch_label is the fork’s name;
empty picks the next free Name #N. The forkagentdefinition RPC (the
user’s forks) creates forks here; the history is copied separately, by
copyforkhistory, once the fork is known to continue the parent’s
conversation (“Fork, spawn and worker” in mod.rs). The caller publishes
AgentsChanged.