Expand description
Named Gmail account resolution (issue #1500, ADR-0066).
A second, Gmail-specific multi-tenancy axis, orthogonal to --profile
(ADR-0045): named accounts in the gmail
block of settings.json, selected per invocation via --account /
GMAIL_ACCOUNT_ENV. resolve_account (reads) and
resolve_account_for_write (account-creating writes: login,
import) are the two entry points the credential CRUD layer
(crate::gmail::auth, crate::gmail::import) and the CLI/MCP surfaces
route through.
Structs§
- Account
Summary - One row of
gmail account list/ thegmail_account_listMCP tool. Never carries a secret — only what’s safe to render.
Enums§
- Resolved
Account - Which credential source a Gmail command should read from, as decided by
resolve_account.
Constants§
- GMAIL_
ACCOUNT_ ENV - Selects the active Gmail account for every command, mirroring
OMNI_DEV_PROFILE. Propagated by the global--accountflag inCli::propagate_global_flags.
Functions§
- active_
gmail_ account_ from - Returns the account named by
GMAIL_ACCOUNT_ENVinraw, orNonewhen unset or empty. - is_
first_ legacy_ to_ named_ transition - Whether the write about to happen would be the first time a named Gmail account is configured while legacy (pre-migration) credentials still exist.
- list_
accounts - Lists configured Gmail accounts, sorted by name.
- resolve_
account - Resolves which Gmail account a read command (credential load, status, client construction, MCP tools, …) should use.
- resolve_
account_ for_ write - Resolves which Gmail account a write command that can create a new
account (
gmail auth login,gmail auth import) should target. - validate_
account - Validates that
nameis a known Gmail account.