turbo
0c8bfe03 - feat: Add AI coding agent detection telemetry (#12159)

Commit
76 days ago
feat: Add AI coding agent detection telemetry (#12159) ## Summary - Adds a new `turborepo-ai-agents` crate that detects when `turbo` is invoked by an AI coding agent - Emits the detected agent name as a telemetry event (`ai_agent` key) via `turborepo-telemetry` - Shows the detected agent in `turbo info` output ## Detection Heuristics Matches [`@vercel/detect-agent`](https://github.com/vercel/vercel/tree/main/packages/detect-agent) so Turborepo and the Vercel CLI report the same agent names. Notable exception: OpenCode detection extends the heuristic by also checking `OPENCODE` (which is what current OpenCode versions set), in addition to `OPENCODE_CLIENT`. ## Testing ```bash # See detection in turbo info CLAUDE_CODE=1 ./target/debug/turbo info # => AI agent: claude # See telemetry event emission TURBO_TELEMETRY_DEBUG=1 CLAUDE_CODE=1 ./target/debug/turbo run build --dry # Custom agent AI_AGENT=my-custom-agent ./target/debug/turbo info # => AI agent: my-custom-agent ``` <sub>CLOSES TURBO-5329</sub>
Author
Parents
Loading