/**
 * The connector contract.
 *
 * A {@link Connector} is one provider dialect's implementation: given a {@link ModelCard}, a
 * {@link Conversation}, and {@link StreamOptions}, it either streams
 * {@link Emission}s ({@link Connector.stream}) or resolves a single
 * {@link Reply} ({@link Connector.complete}).
 */
import type { ApiKind, ModelCard } from "./model-card";
import type { Conversation } from "./conversation";
import type { StreamOptions } from "./options";
import type { Channel } from "./emission";
import type { Reply } from "./reply";
import type { ProviderId } from "./model-card";
/** One provider-dialect implementation of the gateway protocol. */
export interface Connector {
    /** Stable identifier for this connector instance. */
    readonly id: string;
    /** The wire dialect this connector speaks. */
    readonly api: ApiKind;
    /** Open a streaming invocation, yielding incremental emissions. */
    stream(model: ModelCard, conversation: Conversation, options: StreamOptions): Channel;
    /** Run a one-shot invocation and resolve the assembled reply. */
    complete(model: ModelCard, conversation: Conversation, options: StreamOptions): Promise<Reply>;
}
/**
 * Resolves a provider credential, optionally honoring a caller-supplied
 * override before falling back to environment/cloud detection.
 */
export interface CredentialResolver {
    resolve(provider: ProviderId, override?: string): Promise<string | undefined>;
}
