import { type ProviderAuthMaterial, type ResolvedAuthEnvelope } from "./authEnvelope.js";
import type { CredentialRef } from "./credentialRef.js";
import type { CredentialStore } from "./credentialStore.js";
export type AuthResolverFileReader = (path: string) => string | undefined;
export type AuthResolverEnvReader = (name: string) => string | undefined;
export type AuthResolverRequest = {
    credentialRef?: CredentialRef;
    store?: CredentialStore;
    injectedSecret?: string;
    injectedMaterial?: ProviderAuthMaterial;
    readEnv?: AuthResolverEnvReader;
    readFile?: AuthResolverFileReader;
    extraHeaders?: Readonly<Record<string, string>>;
};
export type AuthResolverErrorCode = "MISSING_CREDENTIAL_REF" | "MISSING_SECRET_MATERIAL" | "UNSUPPORTED_CREDENTIAL_TYPE" | "INVALID_CODEX_AUTH_FILE";
export type AuthResolverResult = {
    ok: true;
    resolved: ResolvedAuthEnvelope;
    events: readonly string[];
} | {
    ok: false;
    resolved: ResolvedAuthEnvelope;
    error: {
        code: AuthResolverErrorCode;
        message: string;
        boundary: "input" | "source" | "credential";
        publicSafe: true;
    };
    events: readonly string[];
};
export declare function resolveAuthEnvelope(request?: AuthResolverRequest): AuthResolverResult;
