agentdefhide → set user_hidden = 1 on a seeded template, so it
disappears from the picker’s “+ New from template” tier. Phase 2
(Q2 Decision Y) of SPEC_AGENT_PICKER_TWO_TIER_2026_05_24.md.
agentdefunhide → set user_hidden = 0 on a seeded template,
bringing it back into the picker. Same validation + broadcast as
agentdefhide. Phase 2 of the two-tier picker spec.
The copy’s row before it is inserted: what the source keeps, a fresh id, and the opt-in settings reset.
lineage is whether it is a fork, and its label.
A new agent built from source_id’s definition, as fork_definition
builds one, but not a fork (as_fork: false): no lineage, so it isn’t among
the source’s forks, a slug of its own name (required), and no account
link, which the caller makes. The Agentsspawn action’s workers
(app_api/agent_spawn.rs): a worker is a new agent, not a fork. It gets
the leader’s definition and a brief, never the leader’s conversation
(“Fork, spawn and worker” in mod.rs).
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.
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.
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.
agentdeflisthiddentemplates → templates the user has hidden
(is_seeded = 1 AND user_hidden = 1). Used by the settings panel
to render the unhide list. The picker proper never calls this —
it uses listagents with the default-filter-out behaviour.
name_taken, or the store’s own name resolution finds it (slug, name,
a launched agent’s instance name, or a slug an agent was renamed from):
every name a fork could take is checked against both, automatic or typed
(#4746). So is the name it would be addressed by, its route name: a former
slug or display name stays reserved for its agent
(SPEC_FORK_SLUG_MIGRATION_2026_10_22.md Phase 1; former_names).
Whether a user agent (not a seeded template) already goes by name,
case-insensitively: as its name, or as its branch label, which is what a
renamed fork shows. Names are unique among user agents: the picker lists
them by name, and name-keyed registrations collide otherwise. A launched
agent’s instance name is the store’s to check (agents_matching_name).