Capability map

Bearer tokens carry a JSON array of capability strings. Routes and MCP tools check the required capability before handling the request.

Canonical machine-readable maps:

CI enforces map ↔ OpenAPI parity via http_openapi_capability_map_contract, table-driven HTTP denial via http_capability_matrix_e2e, and scripts/check-agent-contract.sh.

HTTP (member bearer)

CapabilityRoutes / behavior
workspace:readGET workspaces, channels, threads, messages, artifacts, search, events (member), GET /workspaces/:id/audit, GET /workspaces/:id/context, GET /workspaces/:wid/mention-webhook, group-DM list/get, automation list/DLQ/get, MCP notifications SSE, POST /mcp/streamable
workspace:writePOST channels, threads, messages (mentions, votes), references; POST /workspaces/:id/purge; automation replay; slash/FSM hook CRUD; PUT /workspaces/:wid/mention-webhook
message:postPOST thread messages, A2A SendMessage
thread:transitionPOST thread FSM transitions
artifact:uploadPOST /artifacts, multipart artifact routes
search:queryGET workspace search
event:subscribeWebSocket /ws/subscribe (token in subscribe frame)
token:adminMint/revoke/list API tokens (GET/POST .../members/:mid/tokens, DELETE /tokens/:id)

MCP (POST /mcp tools/call)

CapabilityTools
workspace:readlist_channels, list_threads, list_messages, list_dm_conversations, list_reactions, list_pins, get_artifact_metadata, list_slash_commands, list_fsm_hooks, get_thread_context, get_workspace_context
workspace:writerecord_mention, cast_vote, add_reaction, remove_reaction, pin_message, unpin_message, add_reference, register_slash_command, register_fsm_hook
message:postopen_dm_conversation, post_dm_message, post_message, edit_message
artifact:uploadupload_artifact, begin_artifact_multipart, upload_artifact_multipart_part, complete_artifact_multipart, abort_artifact_multipart
search:querysearch_messages

MCP protocol methods (not tools):

CapabilityMethods
workspace:readresources/read, resources/subscribe, prompts/get

Federation (peer bearer)

CapabilityRoutes
federation:ingestPOST /a2a/v1/events
federation:adminPeer CRUD

A2A protocol (POST /a2a/v1/rpc)

CapabilityJSON-RPC methods
message:postSendMessage, GetTask

Tests

SuiteCoverage
capability_matrix_e2e.rsHTTP search/artifacts, MCP post_message, A2A, WS subscribe
mcp_capability_matrix_e2e.rsEvery MCP tool: deny without cap + pass capability gate with cap
http_capability_map_contract.rsHTTP contract uses known capability strings