export type ProviderCredentialKind = "openai" | "anthropic" | "deepmind" | "customFormat" | (string & {});
export type CredentialType = "openai_api_key" | "chatgpt_codex_oauth" | "anthropic_api_key" | "gemini_api_key" | "custom";
export type CredentialSourceKind = "injected" | "environment" | "codex-auth-file" | "profile-store" | "test";
export type CredentialSource = {
    kind: CredentialSourceKind;
    label?: string;
    envName?: string;
    filePath?: string;
};
export type CredentialRefInput = {
    kind?: ProviderCredentialKind;
    id?: string;
    provider?: ProviderCredentialKind;
    source?: CredentialSource;
    credentialType?: CredentialType;
};
export type CredentialRef = {
    kind: ProviderCredentialKind;
    id: string;
    provider: ProviderCredentialKind;
    source: CredentialSource;
    credentialType: CredentialType;
    publicSafe: true;
};
export type CredentialRefErrorCode = "MISSING_CREDENTIAL_ID" | "MISSING_PROVIDER" | "MISSING_SOURCE" | "MISSING_CREDENTIAL_TYPE" | "INVALID_OPENAI_CREDENTIAL_TYPE";
export type CredentialRefResult = {
    ok: true;
    credentialRef: CredentialRef;
    events: readonly string[];
} | {
    ok: false;
    error: {
        code: CredentialRefErrorCode;
        message: string;
        boundary: "input" | "source" | "provider";
        publicSafe: true;
    };
    events: readonly string[];
};
export declare function createCredentialRef(input?: CredentialRefInput): CredentialRefResult;
export declare function credentialRefKey(ref: Pick<CredentialRef, "provider" | "id" | "credentialType">): string;
