export type CredentialFailureCategory = "invalid-source" | "command-failed" | "command-timeout" | "command-aborted" | "command-empty" | "command-invalid-output" | "command-output-too-large" | "environment-empty" | "oauth-credential-rejected"; export declare class CredentialResolutionError extends Error { readonly provider: string; readonly category: CredentialFailureCategory; constructor(provider: string, category: CredentialFailureCategory); } export interface CredentialCommandResult { stdout: string | Buffer; } export interface CredentialCommandOptions { signal?: AbortSignal | undefined; timeoutMs: number; maxOutputBytes: number; environment: Record; } export type CredentialCommandRunner = (command: string, options: CredentialCommandOptions) => Promise; export interface CredentialOptions { provider: string; configuredValue?: unknown; environmentValue?: unknown; environment?: Record | undefined; signal?: AbortSignal | undefined; runCommand?: CredentialCommandRunner | undefined; } export declare function redactCredential(text: string, credential: string | null | undefined): string; /** Resolves bash on Windows in Pi's own `!command` order: Git Bash install locations, then bash.exe on PATH. */ export declare function findWindowsBash(environment: Record, exists: (path: string) => boolean, findOnPath: () => Promise): Promise; export declare function hasCredentialSource(options: CredentialOptions): boolean; export declare function resolveCredential(options: CredentialOptions): Promise;