Loading
feat(api): expand coding agent telemetry detection and add GitLab Duo support
What does this MR do?
Expands DetectCodingAgent() in internal/api/coding_agent.go to close telemetry detection gaps for modern AI coding agents and adds native GitLab Duo detection (both GitLab Duo CLI and Duo Agent Platform).
Detected Agents Added / Expanded:
- GitLab Duo Platform & CLI (closes #8766):
duo-agent-platform: detectsDUO_WORKFLOW_IDandGITLAB_DUO_WORKFLOW_ID. Takes precedence when remote platform flows run the CLI.duo-cli: detectsDUO_CLI=1andGITLAB_DUO_CLI=1.
- Additional coding agents (closes #8749):
amazon-qviaAWS_EXECUTION_ENVcontainingAmazonQ-For-CLIampviaAMP_CURRENT_THREAD_ID(takes precedence over Claude Code)antigravityviaANTIGRAVITY_AGENTaugmentviaAUGMENT_AGENTclineviaCLINE_ACTIVEcopilotextended withCOPILOT_AGENT_SESSION_IDandCOPILOT_AGENT_JOB_IDcursoraccommodates presence matchgooseviaGOOSE_TERMINALjunieviaJUNIE_SHIM_PATHkiloviaKILO=1(takes precedence over OpenCode)kiroviaKIRO_AGENT_PATHqwen-codeviaQWEN_CODEroo-codeextended withROO_ACTIVEandROO_CODE_TASK_IDtraeviaTRAE_AI_SHELL_IDwarpviaOZ_RUN_IDwindsurfextended withWINDSURF_CASCADE_TERMINALzedagent vs terminal fallback viaPAGERandGIT_PAGERAGENTuniversal fallback (ignoring bare boolean values)
Tests:
- Added comprehensive unit test coverage in
internal/api/coding_agent_test.gocovering each agent, precedence rules, and edge cases.
Closes #8766 Closes #8749