/** * Agent engine API-key helpers (browser). * * Named client helper for storing a bring-your-own provider key (Anthropic, * OpenAI, etc.) so the agent chat can run without a Builder connection or an * account. The key is persisted by the framework under the matching provider * key (e.g. ANTHROPIC_API_KEY) for the current user or org, exactly like the * LLM settings panel does — UI code should call this instead of hand-writing * a fetch to framework routes. */ /** Providers that can be configured with a single pasted API key. */ export type AgentEngineProvider = "anthropic" | "openai"; export interface SaveAgentEngineApiKeyOptions { provider?: AgentEngineProvider; key?: string; apiKey: string; scope?: "user" | "org"; } export interface SaveAgentEngineProviderSettingsOptions { provider?: AgentEngineProvider; key?: string; apiKey?: string; baseUrl?: string; clearBaseUrl?: boolean; scope?: "user" | "org"; } /** * Persist a provider API key for the current owner. Resolves on success. * Throws an Error with a readable message on failure. On success it also * dispatches `agent-engine:configured-changed` so any open agent chat flips * out of its "needs setup" state without a reload. */ export declare function saveAgentEngineApiKey({ provider, key, apiKey, scope, }: SaveAgentEngineApiKeyOptions): Promise; /** * Persist provider-specific settings for the current owner. This intentionally * stays narrow: API keys for built-in BYOK providers, plus OpenAI's optional * compatible endpoint URL. Values are stored server-side in scoped secrets. */ export declare function saveAgentEngineProviderSettings({ provider, key, apiKey, baseUrl, clearBaseUrl, scope, }: SaveAgentEngineProviderSettingsOptions): Promise; //# sourceMappingURL=agent-engine-key.d.ts.map