export type ProviderName = 'anthropic' | 'openai' | 'openai-compat' | 'gemini' | 'claude-code' | 'codex-cli' | 'mistral-vibe' | 'copilot' | 'gemini-cli' | 'antigravity-cli' | 'cursor-agent'; export interface GenerationProviderConfig { generation?: { provider?: string; model?: string; openaiCompatBaseUrl?: string; }; } export interface GenerationProviderOverrides { provider?: ProviderName; model?: string; openaiCompatBaseUrl?: string; } /** Operator signal pre-approving a CLI-backed provider, which silences the disclosure below. */ export declare const GENERATION_PROVIDER_ENV = "OPENLORE_GENERATION_PROVIDER"; /** * Honour `generation.provider` from `.openlore/config.json`, disclosing the CLI-backed case. * * The field is committed in the analyzed repository, so on a clone it is attacker-authored. * For a KEYED provider the consent signal already exists: the run proceeds only if the * operator's own environment holds that provider's credential, and the caller below returns * null when it does not. The CLI-backed providers have no such brake — they are in * {@link NO_KEY_PROVIDERS} precisely because they need no key — so a clone shipping * `{"generation":{"provider":"cursor-agent"}}` gets OpenLore to spawn the operator's * already-authenticated agent binary on prompt text the repository wrote: their paid * subscription, and a prompt-injection channel into a tool-runner they did not pick. * * DISCLOSED, not refused, and the distinction is deliberate. Selecting a provider in the * project's own config is the documented way to configure generation, and refusing it would * break that for every honest repository to defend against a hostile one — while generation * only ever runs from an explicit `openlore generate`/`run`, never from `analyze` or a read * path, and the CLI providers already run sandboxed (read-only, tools disabled, throwaway * cwd). So the residual risk is bounded, and what the operator actually lacked was * VISIBILITY: they chose to generate, but not which binary would be launched. Naming the * provider in {@link GENERATION_PROVIDER_ENV} (or passing `--provider`, which does not come * through here) says the choice is theirs and silences the line. */ export declare function resolveConfiguredProvider(configValue: string | undefined): ProviderName | undefined; export interface ResolvedGenerationProvider { provider: ProviderName; model: string; openaiCompatBaseUrl?: string; } /** Canonical provider/model resolution shared by CLI and embeddable entry points. */ export declare function resolveGenerationProvider(config?: GenerationProviderConfig, overrides?: GenerationProviderOverrides): ResolvedGenerationProvider | null; //# sourceMappingURL=llm-provider-resolution.d.ts.map