Expand description
Identity subsystem — accounts, bundles, and the junctions that tie them to agents.
Layered model:
IdentityAccount(db_identity_accounts): a single credential pointer (provider + kind + secret_ref).Identity(db_identity_bundles): a named bundle that contains zero or more accounts via thedb_identity_bindingsjunction. The launch UI picks an Identity bundle, not raw accounts.AgentIdentityLink(db_agent_identity_links): legacy junction binding an agent to an account directly. Kept for the identity migration path.
Extracted from store.rs in Phase R.2 of the storage
modularization plan
(docs/specs/SPEC_STORE_MODULARIZATION_2026_05_27.md). The
method surface is unchanged — Store::identity_*,
bundle_identity_*, and agent_identity_* still live on Store
via this impl block; existing imports of the structs from
storage::store::* keep working thanks to re-exports.
Structs§
- Agent
Identity Link - Junction row: which identity an agent uses for a given provider.
- Identity
- A named credential bundle. Contains zero or more accounts via the
db_identity_bindingsjunction.is_blanktags the seeded singleton row that the launch UI uses as the default option. - Identity
Account - An identity account (reusable credential, linked to agents via the
db_agent_identity_linksjunction). Replaces the browser localStorage identity store. - Identity
Binding - Junction row binding an account to an identity for a given provider.
Enums§
- Secret
Ref - Provider-specific credential reference. Stored as JSON in
db_identity_accounts.secret_ref.backendis the discriminator. The actual secret value is NEVER stored in the DB — only how to look it up at launch time (env var, secrets-manager path, etc.).PlaintextDevexists for local dev convenience and must never be the default path in production builds.