/** * Pure environment predicates that gate the auto device-login feature. * * Everything here is synchronous, side-effect free, never touches the network * and never reads a PrivToken. The conservative bias is: when in doubt, treat * the environment as headless so we fail fast rather than pop a useless browser. * * See .kiro/specs/cli-auto-device-login/design.md (Requirement 1.4–1.7). */ /** Total kill switch: hosts can force-disable auto auth and fall back to fail-fast. */ export declare function autoAuthDisabled(): boolean; /** * Whether the process is likely running without a desktop session capable of * opening a browser. * * - CI environments are always treated as headless. * - On Linux a browser needs an X11 / Wayland display; absence → headless. * - macOS / Windows are assumed to have a GUI session available. */ export declare function isHeadless(): boolean; /** * Master gate for auto authorization. Only true when auto auth is not disabled * AND the environment can plausibly open a browser for the user. */ export declare function canAutoAuth(): boolean; /** * Whether the CLI is being driven by an agent host (Claude Code / Codex / * ab-agent) rather than typed by a human at a terminal. * * Used to decide (a) whether to emit the machine-readable AUTH_REQUIRED block * alongside the human text, and (b) whether an interactive `login` may block * for the device code's full lifetime — an agent's tool call is time-bounded, * so it must get a bounded, resumable wait instead. * * Detection is deliberately loose: a piped stdout is the reliable signal, the * env markers just make the intent explicit for hosts that allocate a pty. */ export declare function isAgentHost(): boolean;