Module auth_patterns

Module auth_patterns 

Source
Expand description

Per-provider stdout/stderr pattern matchers for the pre-launch OAuth flow. The auth login subprocess of each CLI provider emits an OAuth URL (or device code) to stdout/stderr in a slightly different shape. This module knows how to extract them.

See docs/specs/SPEC_PRE_LAUNCH_OAUTH_FLOW_2026_05_14.md ยง4.

Enumsยง

AuthPatternMatch
What a pattern matcher extracted from a single line of provider output.

Functionsยง

extract_device_code ๐Ÿ”’
extract_email ๐Ÿ”’
extract_first_https_url ๐Ÿ”’
is_api_key_provider ๐Ÿ”’
looks_like_oauth_url ๐Ÿ”’
match_claude_url ๐Ÿ”’
match_codex_url ๐Ÿ”’
match_copilot_device_code ๐Ÿ”’
match_gemini_url ๐Ÿ”’
match_line
Try every pattern for the given provider against a single line of captured output. Returns the FIRST match found โ€” patterns are listed by descending specificity in patterns_for(provider_id).
match_logged_in_as ๐Ÿ”’
patterns_for ๐Ÿ”’

Type Aliasesยง

LineMatcher ๐Ÿ”’