Expand description
The account RPCs (listidentityaccounts, getidentityaccount, upsertidentityaccount,
account.key.verify), moved out of identity::register unchanged as named functions.
Structs§
- KeyProbe 🔒
- What the optional live probe learned about a key.
- Stored
Secret 🔒
Functions§
- allocate_
numbers 🔒 - #4936 §3.3: give each account that shares a provider and email with another a number that stays its own. Computed over the unfiltered list, so a provider filter can’t renumber a group. One allocation at a time, from a fresh read: two overlapping lists must not both plan the same number, or the one written last renumbers what the first returned.
- backfill_
emails 🔒 - SPEC_ACCOUNT_EMAIL_IN_ARMORY_2026_09_23.md §4: backfill each OAuth account’s login email from its own
config dir, so accounts signed in before #3541, and every Claude login (whose transcript prints no email),
show it. Written only when it changed, and only that one field, in this store and the global mirror (a full
upsert here could re-create an account deleted since the list, undo a status written meanwhile, or repoint
the mirror’s
secret_ref). A failed write still returns the email. - copy_
stored_ 🔒numbers - Each listed account carries the
seqandseqmaxthe store holds now, or neither. - drop_
orphaned_ 🔒secret - A new account whose row could not be saved leaves nothing behind that points at no account.
- get_
identity_ 🔒account - key_
account_ 🔒row - The row a stored key is saved as. Its non-secret context is merged so nothing the user set is lost: existing context, then user-entered context, then validation metadata, then the masked tail.
- list_
identity_ 🔒accounts - On the blocking pool: the email backfill reads each OAuth account’s
.claude.jsonand canonicalizes its dir (#3617), like this module’s other fs/keyring calls. - list_
with_ 🔒numbers - probe_
key 🔒 - The single outbound probe, fired only when the user clicked “Validate” (
validate = true). An invalid key comes back as the result to answer with. - store_
secret 🔒 - Where the key is kept: a key added to a new account goes into the Vault, as an
api-keyentry the account row points at. An account that already keeps its key in the OS keychain keeps it there (a replaced key goes to the same place), and one whose Vault entry is gone gets a new entry. Both are blocking (the keychain’s sync D-Bus on Linux, the Vault’s database), so they run off the async runtime worker. Returns the pointer and whether a new entry was created. - upsert_
identity_ 🔒account - Accepts the full
IdentityAccountpayload. A missingidmints a fresh UUID;created_atandupdated_atare server-set so callers don’t have to know the current time. - verify_
account_ 🔒key - Connectors → Accounts: validate (optional) and securely store an API key. The plaintext goes to the Vault (an account
that already keeps its key in the OS keychain keeps it there); the DB row keeps only the
SecretRefpointer, the masked tail and non-secret metadata. See docs/specs/archive/SPEC_TRUST_CENTER_2026_06_15.md §5/§6.