import type { AuthSourceReadiness, HarnessEvent } from "@claudexor/schema"; import { runCapture } from "@claudexor/core"; /** * Native-session probe with a distinct PROBE-FAILURE state (same contract as * the codex adapter's probeLogin). `claude auth status` prints a typed JSON * verdict; a probe that produces no parseable verdict is a probe error, never * a silent "not logged in". */ export interface ClaudeAuthStatusProbe { loggedIn: boolean; authed: boolean; authMethod: string | null; probeError: string | null; /** True only when the result came from the bounded LKG grace window. */ stale?: boolean; /** Age of the LKG auth verdict in milliseconds, when `stale` is true. */ staleAgeMs?: number; } /** * Auth-status is a read of one vendor-owned store. A daemon can ask for the * same store from several concurrent runs, so coalesce those reads and keep a * short, process-local last-known-good value. The cache is deliberately not * persisted: it is only a grace window for a transient child-process failure, * never an auth proof after a daemon restart. */ export declare const CLAUDE_AUTH_STATUS_CACHE_TTL_MS = 60000; /** The two-attempt probe must fit the same 10s wall-clock budget as one run. */ export declare const CLAUDE_AUTH_STATUS_TOTAL_TIMEOUT_MS = 10000; interface ClaudeAuthStatusCoordinatorOptions { env: Record; configDir: string; abortSignal?: AbortSignal; runCapture?: typeof runCapture; } export declare function redactClaudeDoctorDetail(text: string): string; export declare function claudeAuthSourceReadiness(input: { native: ClaudeAuthStatusProbe; oauthAvailable: boolean; oauthVerification: "passed" | "failed" | "not_run"; oauthDetail: string; apiKeyAvailable: boolean; apiKeyVerification: "passed" | "failed" | "not_run"; apiKeyDetail: string; }): AuthSourceReadiness[]; export declare function staleClaudeAuthStatusEvent(sessionId: string, ageMs?: number): HarnessEvent; /** Test seam for isolating the process-local cache between focused cases. */ export declare function clearClaudeAuthStatusCache(): void; /** * Probe one exact `(binary, config-dir)` store. Concurrent callers share one * child process. The lock is intentionally process-local and auth-status-only; * full Claude runs are not serialized, and no cross-process lock or new wire * schema is required for this recovery path. */ export declare function probeClaudeAuthStatus(bin: string, options: ClaudeAuthStatusCoordinatorOptions): Promise; export {}; //# sourceMappingURL=auth-status.d.ts.map