Skip to main content

inherit_source_account_links

Function inherit_source_account_links 

Source
fn inherit_source_account_links(
    mstore: &Store,
    identity_store: &Store,
    source: &AgentDefinition,
    fork: &AgentDefinition,
) -> usize
Expand description

Link a new fork to the account its source runs on, for the fork’s own provider: the source’s own links, or its template’s when it has none (effective_identity_links, the spawn gate’s rule). Every caller of forkagentdefinition launches the fork on its source’s account (quick-fork.ts; AgentPicker.tsx’s handleFork), but the launch wrote that link only after its first spawn. A quick fork resumes its source’s conversation, so that spawn runs at launch, and it was refused with “no credentials” until the link landed. Writing it here means a fork never exists without it.

Links for other providers are not copied, matching what those callers write. A source with no account leaves the fork unbound: its first spawn gets the ordinary bind-an-account refusal. Best-effort: a failure is logged and leaves the fork unbound, as forks were before.