Skip to main content

Module http_self

Module http_self 

Source
Expand description

Presets, identity accounts and self. Split out of server/mod.rs unchanged (SPEC_LARGE_FILE_MODULE_ANALYSIS_2026_09_30.md Β§4.1).

StructsΒ§

AgentIdentityAccountsQuery πŸ”’
AgentIdentityCheckLimitsRequest πŸ”’
AgentIdentitySwitchRequest πŸ”’
AgentIdentityValidateRequest πŸ”’
AgentPresetGetQuery πŸ”’
SelfQuery πŸ”’

FunctionsΒ§

handle_agent_identity_accounts πŸ”’
GET /api/v1/agent/identity/accounts?agent_id=<slug> β€” list the agent’s own linked credential accounts (masked tails only, never secrets). Backs the IdentityAccounts MCP tool.
handle_agent_identity_check_limits πŸ”’
POST /api/v1/agent/identity/check-limits: look again, now, at the agents marked out of quota. Backs Identity with action check_limits (task #2648): a small turn on each, and one that works clears the limit.
handle_agent_identity_switch πŸ”’
POST /api/v1/agent/identity/switch β€” move an agent (the caller by default) to another signed-in account of its provider, now or when its turn ends. Backs Identity with action switch; the audit row names the caller (SPEC_ACCOUNT_SWITCH_FROM_THE_COMPOSER_NO_BIND_2026_10_26.md Β§3.4).
handle_agent_identity_validate πŸ”’
POST /api/v1/agent/identity/validate β€” live-probe one of the agent’s own linked accounts using its stored keychain secret (the agent never supplies a secret). Backs the IdentityValidate MCP tool.
handle_agent_preset_get πŸ”’
GET /api/v1/agent/preset/get?agent_id=<slug>&id=&name= β€” fetch a preset by id or name; with neither, return the agent’s own bound preset (self). Backs the PresetGet MCP tool.
handle_agent_preset_list πŸ”’
GET /api/v1/agent/preset/list β€” list all presets (shared catalog, summary fields only). Backs the PresetList MCP tool.
handle_self πŸ”’
GET /api/v1/self?block_id=<id> β€” resolve the calling agent’s place in the object tree (block β†’ tab β†’ window β†’ workspace, with their names). The sidecar serves many agents, so the caller identifies itself by its block id (the MCP WhoAmI tool passes AGENTMUX_BLOCKID). Naming verbs reuse the same resolver to default their target to the agent’s own context.