Loading
Support cursor and codex external agent types
What
Adds cursor and codex to Ai::ExternalAgents::AgentIdentity::AGENT_TYPES, so identities and sessions can be registered for them through the API.
Changes
- Model:
AGENT_TYPESnow includescursorandcodex. The identities and sessions API params read from this list, so they pick up the new types with no further change. - Frontend: add
codextoAGENT_TYPE_LABELS(cursorwas already there) andcursorandcodextoCLIENT_TYPES. Without these, the agent artifacts view labels them as GitLab Duo or a humanized fallback. - Specs: extend
utils_spec.jsand add an identities request spec that registers every type inAGENT_TYPES. The model spec already iteratesAGENT_TYPES.
Not included
Sessions::CreateServicestill hardcodessource: :claude_code_glab. Cursor and codex sessions created through glab are therefore labelled Claude Code (glab). Fixing this needs a new session source value, which touches GraphQL and ClickHouse, so it belongs in a follow-up.Mcp::Audit::ResolveSessionServicealready mapscursorandcodex, so it needs no change.
Why no migration
ai_agent_identities.agent_type is a text column with a limit of 50 and no DB check constraint. The allowlist is enforced only by the model validation.
Edited by Jean van der Walt