handle_self

Function handle_self 

Source
async fn handle_self(
    __arg0: State<AppState>,
    __arg1: Query<SelfQuery>,
) -> impl IntoResponse
Expand description

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.