import { validateGatewaySettings } from './adapters/gateway'; import type { OmpSettingsValidationContext } from './omp/sdk-settings'; import type { ModelLevel, ProviderAdapter, StructuredOutputRecoveryAdapter } from './types'; export type ProviderCapabilityState = boolean | 'experimental'; export interface ProviderCapabilities { readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly mcpServers: ProviderCapabilityState; readonly jsonSchema: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly reasoningEffort: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; } interface FixedProviderCommandSpec { readonly kind: 'fixed'; readonly command: string; readonly args: readonly string[]; } interface ConfiguredClaudeCommandSpec { readonly kind: 'configured-claude'; } export interface SpawnProviderInvokeSpec { readonly lane: 'spawn'; } export interface AcpStdioProviderInvokeSpec { readonly lane: 'acp-stdio'; readonly transport: 'stdio'; } export interface RpcStdioProviderInvokeSpec { readonly lane: 'rpc-stdio'; readonly protocol: 'omp-v2'; } export type ProviderInvokeSpec = SpawnProviderInvokeSpec | AcpStdioProviderInvokeSpec | RpcStdioProviderInvokeSpec; export type ProviderCommandSpec = FixedProviderCommandSpec | ConfiguredClaudeCommandSpec; export interface ProviderDocsMetadata { readonly label: string; readonly setupHeading: string; } export interface ProviderDockerMountPreset { readonly host: string; readonly hostEnv?: string; readonly container: string; readonly readonly: boolean; } export interface ProviderDockerEnvAuth { readonly requireOneOf: readonly string[]; readonly requireTogether?: readonly (readonly string[])[]; readonly requireUrl?: readonly string[]; } export interface ProviderDockerMetadata { readonly mount?: ProviderDockerMountPreset; readonly envPassthrough: readonly string[]; readonly credentialInMount?: boolean; readonly install?: string; readonly platform?: string; readonly configRoots?: readonly string[]; readonly envAuth?: ProviderDockerEnvAuth; } interface ProviderRegistryEntryBase { readonly id: string; readonly default: boolean; readonly aliases: readonly string[]; readonly displayName: string; readonly binary: string; readonly command: ProviderCommandSpec; readonly invoke: ProviderInvokeSpec; readonly installInstructions: string; readonly authInstructions: string; readonly credentialPaths: readonly string[]; readonly credentialEnvKeys: readonly string[]; readonly configurationEnvKeys?: readonly string[]; readonly settingsFields: readonly string[]; readonly settingsDefaults?: Readonly>; readonly settingsValidator?: (settings: Record, context?: OmpSettingsValidationContext) => string | null; readonly availabilityProbe?: 'command' | 'help-or-version' | 'supported-version'; readonly docs: ProviderDocsMetadata; readonly docker: ProviderDockerMetadata; readonly defaultLevels: Readonly<{ readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }>; } export interface StructuredOutputProviderRegistryEntry extends ProviderRegistryEntryBase { readonly capabilities: Omit & { readonly jsonSchema: true | 'experimental'; }; readonly adapter: StructuredOutputRecoveryAdapter; } export interface UnstructuredOutputProviderRegistryEntry extends ProviderRegistryEntryBase { readonly capabilities: Omit & { readonly jsonSchema: false; }; readonly adapter: ProviderAdapter; } export type ProviderRegistryEntry = StructuredOutputProviderRegistryEntry | UnstructuredOutputProviderRegistryEntry; export declare const providerRegistry: readonly [{ readonly id: "claude"; readonly default: true; readonly aliases: readonly ["anthropic"]; readonly displayName: "Claude"; readonly binary: "claude"; readonly command: { readonly kind: "configured-claude"; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "npm install -g @anthropic-ai/claude-code\nOr (macOS): brew install claude"; readonly authInstructions: "claude login"; readonly credentialPaths: readonly ["~/.claude"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly ["anthropicApiKey", "bedrockApiKey", "bedrockRegion"]; readonly capabilities: { readonly jsonSchema: true; readonly reasoningEffort: true; readonly sessionResume: true; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly mcpServers: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Claude"; readonly setupHeading: "Claude Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.claude"; readonly container: "$HOME/.claude"; readonly readonly: true; }; readonly envPassthrough: readonly ["ANTHROPIC_API_KEY", "ANTHROPIC_AUTH_TOKEN", "ANTHROPIC_BASE_URL", "ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL", "CLAUDE_CODE_SUBAGENT_MODEL", "AWS_BEARER_TOKEN_BEDROCK", "AWS_REGION", "CLAUDE_CODE_USE_BEDROCK"]; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: StructuredOutputRecoveryAdapter; }, { readonly id: "codex"; readonly default: false; readonly aliases: readonly ["openai"]; readonly displayName: "Codex"; readonly binary: "codex"; readonly command: { readonly kind: "fixed"; readonly command: "codex"; readonly args: readonly ["exec"]; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "npm install -g @openai/codex"; readonly authInstructions: "codex login"; readonly credentialPaths: readonly ["~/.config/codex", "~/.codex"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly ["webSearch", "trustIsolatedRecoveryProfile"]; readonly settingsDefaults: { readonly webSearch: false; readonly trustIsolatedRecoveryProfile: false; }; readonly settingsValidator: typeof validateCodexSettings; readonly capabilities: { readonly jsonSchema: true; readonly reasoningEffort: true; readonly sessionResume: true; readonly webSearch: true; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly mcpServers: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; }; readonly docs: { readonly label: "Codex"; readonly setupHeading: "Codex Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.config/codex"; readonly container: "$HOME/.config/codex"; readonly readonly: true; }; readonly install: "npm install -g @openai/codex"; readonly envPassthrough: readonly []; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: StructuredOutputRecoveryAdapter; }, { readonly id: "gateway"; readonly default: false; readonly aliases: readonly []; readonly displayName: "Gateway"; readonly binary: "node"; readonly command: { readonly kind: "fixed"; readonly command: "node"; readonly args: readonly []; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "Bundled with Zeroshot; no external provider CLI install is required."; readonly authInstructions: string; readonly credentialPaths: readonly []; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly ["protocol", "baseUrl", "apiKey", "apiKeyEnv", "headers", "model", "maxTokens", "toolPolicy"]; readonly settingsDefaults: Readonly>; readonly settingsValidator: typeof validateGatewaySettings; readonly capabilities: { readonly mcpServers: false; readonly jsonSchema: false; readonly reasoningEffort: false; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Gateway"; readonly setupHeading: "Gateway Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.zeroshot"; readonly container: "$HOME/.zeroshot"; readonly readonly: true; }; readonly envPassthrough: readonly []; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: ProviderAdapter; }, { readonly id: "gemini"; readonly default: false; readonly aliases: readonly ["google"]; readonly displayName: "Gemini"; readonly binary: "gemini"; readonly command: { readonly kind: "fixed"; readonly command: "gemini"; readonly args: readonly []; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "npm install -g @google/gemini-cli"; readonly authInstructions: "gemini auth login"; readonly credentialPaths: readonly ["~/.config/gcloud", "~/.config/gemini", "~/.gemini"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly []; readonly capabilities: { readonly jsonSchema: "experimental"; readonly reasoningEffort: false; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly mcpServers: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Gemini"; readonly setupHeading: "Gemini Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.config/gemini"; readonly container: "$HOME/.config/gemini"; readonly readonly: true; }; readonly install: "npm install -g @google/gemini-cli"; readonly envPassthrough: readonly []; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: StructuredOutputRecoveryAdapter; }, { readonly id: "opencode"; readonly default: false; readonly aliases: readonly []; readonly displayName: "Opencode"; readonly binary: "opencode"; readonly command: { readonly kind: "fixed"; readonly command: "opencode"; readonly args: readonly ["run"]; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "See https://opencode.ai for installation instructions."; readonly authInstructions: "opencode auth login"; readonly credentialPaths: readonly ["~/.local/share/opencode"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly ["webSearch"]; readonly settingsDefaults: { readonly webSearch: false; }; readonly settingsValidator: (settings: Record) => string | null; readonly capabilities: { readonly jsonSchema: "experimental"; readonly reasoningEffort: true; readonly sessionResume: true; readonly webSearch: true; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly mcpServers: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; }; readonly docs: { readonly label: "Opencode"; readonly setupHeading: "Opencode Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.local/share/opencode"; readonly container: "$HOME/.local/share/opencode"; readonly readonly: true; }; readonly envPassthrough: readonly []; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: StructuredOutputRecoveryAdapter; }, { readonly id: "pi"; readonly default: false; readonly aliases: readonly []; readonly displayName: "Pi"; readonly binary: "pi"; readonly command: { readonly kind: "fixed"; readonly command: "pi"; readonly args: readonly []; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1"; readonly authInstructions: "pi\n/login"; readonly credentialPaths: readonly ["$PI_CODING_AGENT_DIR/auth.json", "~/.pi/agent/auth.json"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly []; readonly availabilityProbe: "supported-version"; readonly capabilities: { readonly mcpServers: false; readonly jsonSchema: false; readonly reasoningEffort: true; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Pi"; readonly setupHeading: "Pi Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.pi/agent"; readonly hostEnv: "PI_CODING_AGENT_DIR"; readonly container: "$HOME/.pi/agent"; readonly readonly: false; }; readonly install: "npm install -g --ignore-scripts @earendil-works/pi-coding-agent@0.84.1"; readonly configRoots: readonly ["$HOME/.pi/agent"]; readonly envPassthrough: readonly [...string[], "AWS_BEDROCK_FORCE_CACHE", "AWS_BEDROCK_FORCE_HTTP1", "AWS_BEDROCK_SKIP_AUTH", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL_BEDROCK_RUNTIME", "AWS_REGION", "AZURE_OPENAI_API_VERSION", "AZURE_OPENAI_BASE_URL", "AZURE_OPENAI_DEPLOYMENT_NAME_MAP", "AZURE_OPENAI_RESOURCE_NAME", "CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_GATEWAY_ID", "GCLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION", "GOOGLE_CLOUD_PROJECT", "KIMI_CODE_OAUTH_HOST", "KIMI_OAUTH_HOST", "PI_CACHE_RETENTION"]; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: ProviderAdapter; }, { readonly id: "omp"; readonly default: false; readonly aliases: readonly ["oh-my-pi"]; readonly displayName: "OMP (Oh My Pi)"; readonly binary: "omp"; readonly command: { readonly kind: "fixed"; readonly command: "omp"; readonly args: readonly []; }; readonly invoke: RpcStdioProviderInvokeSpec; readonly installInstructions: "bun install -g @oh-my-pi/pi-coding-agent@17.2.1"; readonly authInstructions: "Manually edit providerSettings.omp in ZEROSHOT_SETTINGS_FILE or $HOME/.zeroshot/settings.json (file 0600, parent directory 0700). Use declared environment or broker variables, an explicit host-only OMP agent directory containing agent.db, or keyless mode; Zeroshot never logs in or stores credential values."; readonly credentialPaths: readonly ["~/.omp"]; readonly credentialEnvKeys: readonly string[]; readonly configurationEnvKeys: readonly ["AWS_BEDROCK_FORCE_CACHE", "AWS_BEDROCK_FORCE_HTTP1", "AWS_BEDROCK_SKIP_AUTH", "AWS_DEFAULT_REGION", "AWS_ENDPOINT_URL_BEDROCK_RUNTIME", "AWS_REGION", "AZURE_OPENAI_API_VERSION", "AZURE_OPENAI_BASE_URL", "AZURE_OPENAI_DEPLOYMENT_NAME_MAP", "AZURE_OPENAI_RESOURCE_NAME", "CLOUDFLARE_ACCOUNT_ID", "CLOUDFLARE_GATEWAY_ID", "GCLOUD_PROJECT", "GOOGLE_CLOUD_LOCATION", "GOOGLE_CLOUD_PROJECT", "KIMI_CODE_OAUTH_HOST", "KIMI_OAUTH_HOST", "PI_CACHE_RETENTION"]; readonly settingsFields: readonly ["transport", "minLevel", "defaultLevel", "maxLevel", "levelOverrides", "modelsConfig", "auth", "tools", "nestedAgents", "mcp"]; readonly settingsDefaults: { readonly transport: import("./omp/sdk-settings-types").OmpTransport; readonly minLevel: import("./omp/sdk-settings-types").OmpModelLevel; readonly defaultLevel: import("./omp/sdk-settings-types").OmpModelLevel; readonly maxLevel: import("./omp/sdk-settings-types").OmpModelLevel; readonly levelOverrides: Readonly>>; readonly modelsConfig: import("./omp/sdk-settings-types").OmpModelsConfig; readonly auth?: import("./omp/sdk-settings-types").OmpSdkAuth; readonly tools: readonly import("./omp/sdk-settings-types").OmpSdkToolId[]; readonly nestedAgents: false; readonly mcp: false; }; readonly settingsValidator: (settings: Record, context: OmpSettingsValidationContext | undefined) => string | null; readonly availabilityProbe: "help-or-version"; readonly capabilities: { readonly dockerIsolation: true; readonly worktreeIsolation: true; readonly mcpServers: false; readonly jsonSchema: false; readonly streamJson: true; readonly thinkingMode: true; readonly reasoningEffort: true; readonly sessionResume: true; readonly webSearch: false; }; readonly docs: { readonly label: "OMP"; readonly setupHeading: "OMP Manual Configuration"; }; readonly docker: { readonly platform: "linux/amd64"; readonly install: string; readonly configRoots: readonly ["$HOME/.omp"]; readonly credentialInMount: false; readonly envPassthrough: readonly ["ANTHROPIC_API_KEY", "GEMINI_API_KEY", "OMP_AUTH_BROKER_TOKEN", "OMP_AUTH_BROKER_URL", "OPENAI_API_KEY"]; readonly envAuth: { readonly requireOneOf: readonly ["ANTHROPIC_API_KEY", "GEMINI_API_KEY", "OMP_AUTH_BROKER_TOKEN", "OPENAI_API_KEY"]; readonly requireTogether: readonly [readonly ["OMP_AUTH_BROKER_URL", "OMP_AUTH_BROKER_TOKEN"]]; readonly requireUrl: readonly ["OMP_AUTH_BROKER_URL"]; }; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: ProviderAdapter; }, { readonly id: "kiro"; readonly default: false; readonly aliases: readonly []; readonly displayName: "Kiro"; readonly binary: "kiro-cli"; readonly command: { readonly kind: "fixed"; readonly command: "kiro-cli"; readonly args: readonly ["acp"]; }; readonly invoke: AcpStdioProviderInvokeSpec; readonly installInstructions: "See https://kiro.dev/docs/cli/"; readonly authInstructions: "See https://kiro.dev/docs/cli/authentication/"; readonly credentialPaths: readonly ["~/.kiro"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly []; readonly capabilities: { readonly mcpServers: false; readonly jsonSchema: false; readonly reasoningEffort: false; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Kiro"; readonly setupHeading: "Kiro Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.kiro"; readonly container: "$HOME/.kiro"; readonly readonly: true; }; readonly envPassthrough: readonly ["KIRO_API_KEY"]; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: ProviderAdapter; }, { readonly id: "copilot"; readonly default: false; readonly aliases: readonly []; readonly displayName: "Copilot"; readonly binary: "copilot"; readonly command: { readonly kind: "fixed"; readonly command: "copilot"; readonly args: readonly []; }; readonly invoke: SpawnProviderInvokeSpec; readonly installInstructions: "npm install -g @github/copilot"; readonly authInstructions: "copilot\n/login\n(Docker/CI: export COPILOT_GITHUB_TOKEN=)"; readonly credentialPaths: readonly ["~/.copilot"]; readonly credentialEnvKeys: readonly string[]; readonly settingsFields: readonly []; readonly availabilityProbe: "help-or-version"; readonly capabilities: { readonly mcpServers: true; readonly jsonSchema: false; readonly reasoningEffort: false; readonly dockerIsolation: ProviderCapabilityState; readonly worktreeIsolation: ProviderCapabilityState; readonly streamJson: ProviderCapabilityState; readonly thinkingMode: ProviderCapabilityState; readonly sessionResume: ProviderCapabilityState; readonly webSearch: ProviderCapabilityState; }; readonly docs: { readonly label: "Copilot"; readonly setupHeading: "Copilot Setup"; }; readonly docker: { readonly mount: { readonly host: "~/.copilot"; readonly container: "$HOME/.copilot"; readonly readonly: true; }; readonly install: "npm install -g @github/copilot"; readonly envPassthrough: readonly ["COPILOT_GITHUB_TOKEN", "GH_TOKEN", "GITHUB_TOKEN"]; readonly credentialInMount: false; }; readonly defaultLevels: { readonly min: ModelLevel; readonly default: ModelLevel; readonly max: ModelLevel; }; readonly adapter: ProviderAdapter; }]; declare function validateCodexSettings(settings: Record): string | null; type RegistryProviderId = (typeof providerRegistry)[number]['id']; type RegistryProviderAlias = (typeof providerRegistry)[number]['aliases'][number]; export declare const providerIds: readonly RegistryProviderId[]; export declare const providerAliases: readonly RegistryProviderAlias[]; export declare const knownProviderNames: readonly (RegistryProviderId | RegistryProviderAlias)[]; export declare const providerAliasMap: Readonly>; export declare function assertExactlyOneDefaultProvider(entries: readonly T[]): T['id']; export declare function getDefaultProviderId(): RegistryProviderId; export declare function normalizeProviderName(name: string): RegistryProviderId | string; export declare function listProviderRegistryEntries(): readonly ProviderRegistryEntry[]; export declare function findProviderRegistryEntry(name: string | null | undefined): ProviderRegistryEntry | undefined; export declare function getProviderRegistryEntry(name: string): ProviderRegistryEntry; export declare function credentialEnvKeysForProvider(providerId: string): readonly string[]; export declare function resolveProviderCommand(name: string): { readonly command: string; readonly args: readonly string[]; }; export declare function supportsProviderCapability(name: string, capability: keyof ProviderCapabilities): boolean; export declare function supportsProviderOutputReformatting(name: string): boolean; export {}; //# sourceMappingURL=provider-registry.d.ts.map