/**
 * CredentialBridge — the single public entry point for credential access.
 *
 * Design rules:
 *   • Callers never see raw secrets except through `typeInto()`, which
 *     resolves + types + clears in one shot.
 *   • Every fetch registers the secret with the redactor so any leak into
 *     logs / chat / LLM context shows "[REDACTED]".
 *   • Per-host binding is enforced in the store; a handle for github.com
 *     cannot be typed on facebook.com.
 *   • Auto-fetch is opportunistic: the planner calls `autoFetchForHost()`
 *     when it sees a password field; if it fails, the caller falls back
 *     to ask_user.
 */
import type { CredentialProvider } from "./credential-provider.js";
import type { CredentialHandle } from "./credential-store.js";
export interface FetchOptions {
    host: string;
    account?: string;
}
export type FetchFailureReason = "not_found" | "denied" | "unsupported" | "error";
export type FetchOutcome = {
    ok: true;
    handle: CredentialHandle;
} | {
    ok: false;
    reason: FetchFailureReason;
    message: string;
};
export declare class CredentialBridge {
    private store;
    private providers;
    constructor(providers?: CredentialProvider[]);
    /** Fetch a credential from a provider and store as a short-lived handle. */
    fetch(opts: FetchOptions): Promise<FetchOutcome>;
    /** Return an existing handle bound to this host, if any. */
    findForHost(host: string): CredentialHandle | undefined;
    /**
     * Resolve a handle into its actual value, IF the current host matches.
     * Callers MUST immediately use the value; do not store it.
     */
    resolveFor(handleId: string, currentHost: string): string | null;
    /** Wipe a handle. */
    forget(handleId: string): void;
    list(): CredentialHandle[];
    dispose(): void;
    /** Public redactor passthrough — callers can scrub arbitrary text. */
    scrub(text: string): string;
}
//# sourceMappingURL=credential-bridge.d.ts.map