Skip to main content

Module identity

Module identity 

Source

Modulesยง

accounts ๐Ÿ”’
The account RPCs (listidentityaccounts, getidentityaccount, upsertidentityaccount, account.key.verify), moved out of identity::register unchanged as named functions.
links ๐Ÿ”’
The agent โ†” identity junction RPCs (linkagentidentity, unlinkagentidentity), moved out of identity::register unchanged as named functions.
named_agents ๐Ÿ”’
The named-agent RPCs (listnamedagents, hidenamedagent), moved out of identity::register unchanged as named functions. They power the pickerโ€™s My Agents and the Files pane, joining instance rows with the definition, account and bundle names so the frontend renders without follow-ups.
oauth ๐Ÿ”’
The service-OAuth RPCs (account.oauth.start, .poll, .cancel, .client.get, .client.clear), moved out of identity::register unchanged as named functions.

Structsยง

AccountKeyVerifyResult
What account.key.verify answers: { valid: false, error } when validation failed, otherwise every field but error (the same keys the handler sent).
AccountOAuthClientClearResult
What account.oauth.client.clear answers: whether a client was saved.
AccountOAuthClientInfo
What account.oauth.client.get answers: whether the userโ€™s own client is saved for the provider, never its secret.
AccountOAuthStartResult
What account.oauth.start answers: { sessionId, status }, or { error }.
DeleteIdentityAccountResult
What deleteidentityaccount answers.
GithubConnectionReq
Request for github.connection: nothing.
OAuthClientReq
Request for account.oauth.client.get / account.oauth.client.clear.
OAuthSessionReq
OAuthStartReq ๐Ÿ”’
Request for account.oauth.start. clientId/clientSecret are BYO OAuth app credentials (optional; required for secret-mandatory providers). Never log this struct: clientSecret is a secret.
VerifyKeyReq ๐Ÿ”’
Request for account.key.verify (account key flow). The api_key field is a secret โ€” never log this struct.

Functionsยง

builtin_client_of ๐Ÿ”’
Whether AgentMux ships its own client for provider, and (Google) which services it may ask for in this build.
byo_from_req ๐Ÿ”’
The OAuthStartReq fields that become oauth_client::StartOptions, minus the reads (saved client, existing account) the handler does.
merge_json_object ๐Ÿ”’
Shallow-merge the keys of overlay (if both are JSON objects) into base.
oauth_status_wire ๐Ÿ”’
panel_start_options ๐Ÿ”’
Serialize an OAuthStatus to the frontend wire shape. What the Accounts panelโ€™s Connect starts a flow with: the consent page opens in the system browser, and Googleโ€™s account picker has no hint.
reads_saved_client ๐Ÿ”’
Whether a start reads the personโ€™s saved client: only when the request brought none and did not ask for AgentMuxโ€™s own.
register
register_accounts ๐Ÿ”’
Identity account CRUD. id_store routes to shared/store.db when available so accounts survive version upgrades, and falls back to mstore transparently.
register_agent_links ๐Ÿ”’
The agent โ†” identity junction.
register_github_installations ๐Ÿ”’
github.installations: the installations of the GitHub App this account is linked to.
register_named_agents ๐Ÿ”’
Named agent continuation (v8).
register_oauth ๐Ÿ”’
Service OAuth, and the GitHub connection that rides on it.
reject_ambient_home_dir_binding ๐Ÿ”’
Refuses to persist an OAuth account bound directly to its providerโ€™s ambient home dir (e.g. ~/.claude) โ€” nothing downstream validates secret_ref.dir, and a real, currently-live account configured exactly this way was found in this repoโ€™s own data (docs/status/STATUS_IDENTITY_ISOLATION_GATE_NOT_ENFORCING_2026_08_20.md ยง8). Split out of the upsertidentityaccount handler closure so itโ€™s directly unit-testable without spinning up the RPC engine. See docs/specs/SPEC_BLOCK_AMBIENT_HOME_DIR_IDENTITY_BINDING_2026_08_25.md.
revoke_keeps_account ๐Ÿ”’
Whether a delete stops, keeping the account, because revoking its grant failed and the caller asked for the revoke to succeed first.