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 ๐Ÿ”’
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_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.