Package exitmap provides centralized error-to-exit-code mapping for the CLI.
All CLI commands should use ToExit() to convert internal errors to exit codes.
This ensures consistent exit codes across the codebase and prevents exit code
logic from being scattered across multiple packages.
Security: All error messages are passed through redact.Error() before being
returned to sanitize any sensitive information (tokens, secrets, etc.).
ToExit converts an error to an exit code and sanitized message.
It extracts the exit code from errors.Error (which implements ExitCode()).
Falls back to general error (exit code 1) for non-typed errors.
The returned message is always sanitized via redact.Error().