import { i as OpenClawConfig } from "./types.openclaw-Dkap9jPv.js"; import { _ as coerceSecretRef, l as SecretInput, m as SecretRefSource, v as hasConfiguredSecretInput } from "./types.secrets-tbFW-hY6.js"; import { c as OAuthCredential, l as OAuthProvider, s as AuthProfileStore } from "./types-D6ePUYK_.js"; import { Fc as CODEX_CLI_PROFILE_ID, Nc as hasUsableOAuthCredential, Pc as CLAUDE_CLI_PROFILE_ID, Tt as ProviderAuthContext, Us as resolveEnvApiKey, fc as updateAuthProfileStoreWithLock, gc as removeProviderAuthProfilesWithLock, jc as DEFAULT_OAUTH_REFRESH_MARGIN_MS, jt as ProviderAuthResult, mc as suggestOAuthProfileIdForLegacyDefault, nc as ensureAuthProfileStoreForLocalUpdate, tc as ensureAuthProfileStore, vc as upsertAuthProfile, xc as listProfilesForProvider, yc as upsertAuthProfileWithLock } from "./types-VTSyQW4p.js"; import { i as omitEnvKeysCaseInsensitive, r as listKnownProviderAuthEnvVarNames } from "./provider-env-vars-C1Ea_Kwi.js"; import { C as SecretInputMode } from "./types-CllBlUKV.js"; import { t as resolveOpenClawAgentDir } from "./agent-dir-compat-ochOeoeD.js"; import { _ as resolveOAuthApiKeyMarker, h as resolveNonEnvSecretRefApiKeyMarker, l as isKnownEnvApiKeyMarker, r as MINIMAX_OAUTH_MARKER, t as CUSTOM_LOCAL_AUTH_MARKER, u as isNonSecretApiKeyMarker } from "./model-auth-markers-rG64hvLL.js"; import { a as upsertApiKeyProfile, i as buildApiKeyCredential, n as WriteOAuthCredentialsOptions, o as writeOAuthCredentials, r as applyAuthProfileConfig, t as ApiKeyStorageOptions } from "./provider-auth-helpers-DQ9DNhH7.js"; import { o as resolveRequiredHomeDir } from "./home-dir-BVRAYC3w.js"; import { a as normalizeSecretInputModeInput, c as promptSecretRefForSetup, i as normalizeApiKeyInput, n as ensureApiKeyFromOptionEnvOrPrompt, o as validateApiKeyInput, r as formatApiKeyPreview, s as resolveSecretInputModeForEnvSelection, t as ensureApiKeyFromEnvOrPrompt } from "./provider-auth-input-yY20MlHC.js"; import { t as createProviderApiKeyAuthMethod } from "./provider-api-key-auth-CeAzcrhG.js"; import { n as normalizeSecretInput, t as normalizeOptionalSecretInput } from "./normalize-secret-input-Bh-uX6uj.js"; import { buildOauthProviderAuthResult } from "./provider-auth-result.js"; import { execFileSync, execSync } from "node:child_process"; //#region src/agents/cli-credentials.d.ts type ClaudeCliCredential = { type: "oauth"; provider: "anthropic"; access: string; refresh: string; expires: number; } | { type: "token"; provider: "anthropic"; token: string; expires: number; }; type CodexCliCredential = { type: "oauth"; provider: OAuthProvider; access: string; refresh: string; expires: number; accountId?: string; idToken?: string; }; type ExecSyncFn = typeof execSync; /** @deprecated Anthropic provider-owned CLI credential helper; do not use from third-party plugins. */ declare function readClaudeCliCredentialsCached(options?: { allowKeychainPrompt?: boolean; ttlMs?: number; platform?: NodeJS.Platform; homeDir?: string; execSync?: ExecSyncFn; }): ClaudeCliCredential | null; declare function readCodexCliCredentialsCached(options?: { codexHome?: string; allowKeychainPrompt?: boolean; ttlMs?: number; platform?: NodeJS.Platform; execSync?: ExecSyncFn; }): CodexCliCredential | null; //#endregion //#region src/agents/models-config.providers.secret-helpers.d.ts declare function normalizeApiKeyConfig(value: string): string; //#endregion //#region src/plugins/provider-auth-token.d.ts /** @deprecated Provider-owned setup helper; do not use from third-party plugins. */ declare function buildTokenProfileId(params: { provider: string; name: string; }): string; /** @deprecated Anthropic provider-owned setup helper; do not use from third-party plugins. */ declare function validateAnthropicSetupToken(raw: string): string | undefined; //#endregion //#region src/secrets/ref-contract.d.ts type SecretRefDefaultsCarrier = { secrets?: { defaults?: { env?: string; file?: string; exec?: string; }; providers?: Record; }; }; declare function resolveDefaultSecretProviderAlias(config: SecretRefDefaultsCarrier, source: SecretRefSource, options?: { preferFirstProviderForSource?: boolean; }): string; //#endregion //#region src/plugin-sdk/oauth-utils.d.ts /** * Encode a flat object as application/x-www-form-urlencoded form data. * * @deprecated OAuth provider-owned helper; keep this local to provider plugins instead. */ declare function toFormUrlEncoded(data: Record): string; /** * Generate a PKCE verifier/challenge pair suitable for OAuth authorization flows. * * @deprecated OAuth provider-owned helper; keep this local to provider plugins instead. */ declare function generatePkceVerifierChallenge(): { verifier: string; challenge: string; }; /** Generate a PKCE verifier/challenge pair with a 64-character hex verifier. */ declare function generateHexPkceVerifierChallenge(): { verifier: string; challenge: string; }; //#endregion //#region src/agents/copilot-dynamic-headers.d.ts /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const COPILOT_EDITOR_VERSION = "vscode/1.107.0"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const COPILOT_USER_AGENT = "GitHubCopilotChat/0.35.0"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const COPILOT_EDITOR_PLUGIN_VERSION = "copilot-chat/0.35.0"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const COPILOT_GITHUB_API_VERSION = "2025-04-01"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const COPILOT_INTEGRATION_ID = "vscode-chat"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare function buildCopilotIdeHeaders(params?: { includeApiVersion?: boolean; }): Record; //#endregion //#region src/plugin-sdk/provider-auth.d.ts /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare const DEFAULT_COPILOT_API_BASE_URL = "https://api.individual.githubcopilot.com"; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ type CachedCopilotToken = { token: string; expiresAt: number; updatedAt: number; integrationId?: string; }; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare function deriveCopilotApiBaseUrlFromToken(token: string): string | null; /** @deprecated GitHub Copilot provider-owned helper; do not use from third-party plugins. */ declare function resolveCopilotApiToken(params: { githubToken: string; env?: NodeJS.ProcessEnv; fetchImpl?: typeof fetch; cachePath?: string; loadJsonFileImpl?: (path: string) => unknown; saveJsonFileImpl?: (path: string, value: CachedCopilotToken) => void; }): Promise<{ token: string; expiresAt: number; source: string; baseUrl: string; }>; declare function isProviderApiKeyConfigured(params: { provider: string; agentDir?: string; }): boolean; declare function listUsableProviderAuthProfileIds(params: { provider: string; cfg?: OpenClawConfig; agentDir?: string; allowKeychainPrompt?: boolean; includeExternalCliAuth?: boolean; }): { agentDir: string; profileIds: string[]; }; declare function isProviderAuthProfileConfigured(params: { provider: string; cfg?: OpenClawConfig; agentDir?: string; allowKeychainPrompt?: boolean; includeExternalCliAuth?: boolean; }): boolean; declare function resolveProviderAuthProfileApiKey(params: { provider: string; cfg?: OpenClawConfig; agentDir?: string; allowKeychainPrompt?: boolean; includeExternalCliAuth?: boolean; }): Promise; //#endregion export { type ApiKeyStorageOptions, type AuthProfileStore, CLAUDE_CLI_PROFILE_ID, CODEX_CLI_PROFILE_ID, COPILOT_EDITOR_PLUGIN_VERSION, COPILOT_EDITOR_VERSION, COPILOT_GITHUB_API_VERSION, COPILOT_INTEGRATION_ID, COPILOT_USER_AGENT, CUSTOM_LOCAL_AUTH_MARKER, CachedCopilotToken, DEFAULT_COPILOT_API_BASE_URL, DEFAULT_OAUTH_REFRESH_MARGIN_MS, MINIMAX_OAUTH_MARKER, type OAuthCredential, type OpenClawConfig, type ProviderAuthContext, type ProviderAuthResult, type SecretInput, type SecretInputMode, type WriteOAuthCredentialsOptions, applyAuthProfileConfig, buildApiKeyCredential, buildCopilotIdeHeaders, buildOauthProviderAuthResult, buildTokenProfileId, coerceSecretRef, createProviderApiKeyAuthMethod, deriveCopilotApiBaseUrlFromToken, ensureApiKeyFromEnvOrPrompt, ensureApiKeyFromOptionEnvOrPrompt, ensureAuthProfileStore, ensureAuthProfileStoreForLocalUpdate, formatApiKeyPreview, generateHexPkceVerifierChallenge, generatePkceVerifierChallenge, hasConfiguredSecretInput, hasUsableOAuthCredential, isKnownEnvApiKeyMarker, isNonSecretApiKeyMarker, isProviderApiKeyConfigured, isProviderAuthProfileConfigured, listKnownProviderAuthEnvVarNames, listProfilesForProvider, listUsableProviderAuthProfileIds, normalizeApiKeyConfig, normalizeApiKeyInput, normalizeOptionalSecretInput, normalizeSecretInput, normalizeSecretInputModeInput, omitEnvKeysCaseInsensitive, promptSecretRefForSetup, readClaudeCliCredentialsCached, readCodexCliCredentialsCached, removeProviderAuthProfilesWithLock, resolveCopilotApiToken, resolveDefaultSecretProviderAlias, resolveEnvApiKey, resolveNonEnvSecretRefApiKeyMarker, resolveOAuthApiKeyMarker, resolveOpenClawAgentDir, resolveProviderAuthProfileApiKey, resolveRequiredHomeDir, resolveSecretInputModeForEnvSelection, suggestOAuthProfileIdForLegacyDefault, toFormUrlEncoded, updateAuthProfileStoreWithLock, upsertApiKeyProfile, upsertAuthProfile, upsertAuthProfileWithLock, validateAnthropicSetupToken, validateApiKeyInput, writeOAuthCredentials };