Expand description
Agent environment detection for output mode selection.
This module provides heuristics to detect whether the current process is running under an AI coding agent (Claude Code, Codex, Cursor, etc.) or in a human-interactive terminal.
Structs§
- Detection
Result - Detection result with diagnostics.
Enums§
- Output
Preference - Output preference based on detection.
- Override
Mode - Override modes for forcing specific detection results.
Functions§
- detect_
environment - Full detection with diagnostics for debugging.
- detected_
preference - Return user preference based on detection.
- detection_
diagnostics - Get detailed diagnostics as a formatted string (for debugging).
- is_
agent_ environment - Check if running under an AI coding agent.