import type { CredentialResolver, Gate } from "./types.ts"; /** * The gate that allows everything. * * **This is the only gate this project ships, and that is deliberate.** There is * no pricing model here, no quota, no rate limit, and no account. A fork adds * its own by implementing `Gate`, and never has to edit anything in these * packages to do it. * * If you are adding billing: `allow` runs before the pipeline, so a refusal * costs nothing at all. `record` runs after, with the answer and its usage, * which is where you count or charge. */ export declare const openGate: Gate; /** Combine gates. The first refusal wins, and every gate still records. */ export declare function allGates(...gates: Gate[]): Gate; /** * The variable `fromEnv` reads when a caller names none. * * Exported so that a message telling somebody to set a credential can name the * one this package actually reads. The `rulekit ask` miss message said only * "the agent needs a model key", which is the moment a reader most needs the * name, and a second copy of the string would drift from this one. */ export declare const DEFAULT_CREDENTIAL_VARIABLE = "AI_GATEWAY_API_KEY"; /** * A credential from the process environment. * * The ordinary way to run this: one key, set once, used for everybody. The * variable name is yours; nothing here requires a particular provider. */ export declare function fromEnv(variable?: string): CredentialResolver; /** * A credential the caller supplied on the request. * * This is the bring-your-own-key path: each reader pays their own provider with * their own key, and the host holds nothing. The key travels on every request * and is never stored here. * * Serve this over HTTPS only. A key in a header is a bearer credential, and a * plain-text hop hands it to anybody on the path. */ export declare function fromHeader(header?: string): CredentialResolver; /** Try each resolver in order and take the first credential offered. */ export declare function firstOf(...resolvers: CredentialResolver[]): CredentialResolver; //# sourceMappingURL=gate.d.ts.map