import type { OrgRole, ProviderConfig } from './types.js'; /** * o-18: the three env vars `resolveProviderEnv` manages (sets or deletes in * every provider-kind branch below). No vendor CLI (codex, grok, qwen, * opencode, hermes, copilot, kimicode, pi, antigravity, crush) has a * legitimate use for an AMBIENT/inherited value of any of these — only * explicit configuration should ever reach them. `omitAnthropicManagedKeys` * is used at every runner's spawn boundary to strip these three out of the * `process.env` FALLBACK ONLY; an explicit value in a caller's own `args.env` * (e.g. a deliberately configured base-url provider, opencode-runner.test.ts * #262) still reaches the child normally, since it is spread on top. */ export declare const ANTHROPIC_MANAGED_ENV_KEYS: readonly [string, 'ANTHROPIC_BASE_URL', 'ANTHROPIC_AUTH_TOKEN']; /** `process.env` (or any parent env), minus the three ANTHROPIC_* keys above. */ export declare function omitAnthropicManagedKeys(env: NodeJS.ProcessEnv | Record): Record; /** * Builds the child-process env for one agent session. * Default (no provider block) = subscription: remove the API key var so the * spawned Claude Code engine uses the user's `claude login` credentials. * Never stores secrets in org JSON — only env var NAMES. */ export declare function resolveProviderEnv(cfg: ProviderConfig | undefined, parentEnv?: Record): Record; /** One entry of `agents.providers` as written by `monomind providers configure`. */ export interface ConfiguredProviderEntry { name: string; apiKey?: string; model?: string; baseUrl?: string; } /** Look up a named provider from the project config (`agents.providers`, * written by `monomind providers configure`). Fresh disk read — the daemon is * long-lived and a cached config would miss keys configured after start. */ export declare function lookupConfiguredProvider(name: string, searchFrom?: string): ConfiguredProviderEntry | undefined; /** Every named provider configured for this project (`agents.providers`), * redaction left to the caller — org_list_runtime_options strips secrets * before returning (see runtime-options.ts). */ export declare function listConfiguredProviders(searchFrom?: string): ConfiguredProviderEntry[]; /** Effective provider config for a role. Precedence: * 1. explicit role-level `provider` block (unchanged behaviour), * 2. `adapter_config.provider` — a named provider resolved from * `monomind providers configure` (baseUrl+apiKey → base-url kind, * apiKey only → api-key kind), * 3. none (subscription login). * * `defaultModel` carries the named provider's configured default model so * roles without an explicit adapter_config.model still get a sensible one. * Throws with an actionable message when the named provider is missing or * carries neither key nor endpoint — before this, the reference was silently * stripped by the schema and the run died ten minutes later with an opaque * "issue with the selected model" from the engine. */ export declare function resolveRoleProvider(role: Pick, searchFrom?: string): { cfg?: ProviderConfig; defaultModel?: string; }; //# sourceMappingURL=provider.d.ts.map