import { i as OpenClawConfig } from "./types.openclaw-oSBece7v.js"; import { s as AuthProfileStore } from "./types-B8wfqACJ.js"; import { t as OpenClawAgentDatabase } from "./openclaw-agent-db-DHwlG4FY.js"; //#region src/agents/auth-profiles/external-cli-discovery.d.ts /** External CLI auth discovery mode used while loading auth profile stores. */ type ExternalCliAuthDiscovery = { mode: "none"; allowKeychainPrompt?: false; config?: OpenClawConfig; } | { mode: "existing"; allowKeychainPrompt?: boolean; config?: OpenClawConfig; } | { mode: "scoped"; allowKeychainPrompt?: boolean; config?: OpenClawConfig; providerIds?: Iterable; profileIds?: Iterable; }; //#endregion //#region src/agents/auth-profiles/store.d.ts type LoadAuthProfileStoreOptions = { allowKeychainPrompt?: boolean; config?: OpenClawConfig; database?: OpenClawAgentDatabase; externalCli?: ExternalCliAuthDiscovery; readOnly?: boolean; syncExternalCli?: boolean; externalCliProviderIds?: Iterable; externalCliProfileIds?: Iterable; }; type SaveAuthProfileStoreOptions = { filterExternalAuthProfiles?: boolean; preserveOrderProfileIds?: Iterable; preserveStateProfileIds?: Iterable; pruneOrderProfileIds?: Iterable; syncExternalCli?: boolean; }; /** Apply an auth store update inside the SQLite write lock. */ declare function updateAuthProfileStoreWithLock(params: { agentDir?: string; saveOptions?: SaveAuthProfileStoreOptions; updater: (store: AuthProfileStore) => boolean; }): Promise; /** Load the main auth profile store with runtime external profiles overlaid. */ declare function loadAuthProfileStore(): AuthProfileStore; /** Loads the effective runtime store for an agent, including inherited main profiles. */ declare function loadAuthProfileStoreForRuntime(agentDir?: string, options?: LoadAuthProfileStoreOptions): AuthProfileStore; /** Load auth profiles for secret resolution without keychain prompts or writes. */ declare function loadAuthProfileStoreForSecretsRuntime(agentDir?: string, options?: Pick): AuthProfileStore; /** Load auth profiles with runtime external profiles removed from the result. */ declare function loadAuthProfileStoreWithoutExternalProfiles(agentDir?: string, loadOptions?: Pick): AuthProfileStore; /** Ensure an auth store is available, including runtime/external profile overlays. */ declare function ensureAuthProfileStore(agentDir?: string, options?: { allowKeychainPrompt?: boolean; config?: OpenClawConfig; externalCli?: ExternalCliAuthDiscovery; externalCliProviderIds?: Iterable; externalCliProfileIds?: Iterable; readOnly?: boolean; syncExternalCli?: boolean; }): AuthProfileStore; /** Ensure an auth store is available without external profile overlays. */ declare function ensureAuthProfileStoreWithoutExternalProfiles(agentDir?: string, options?: { allowKeychainPrompt?: boolean; readOnly?: boolean; syncExternalCli?: boolean; }): AuthProfileStore; /** Find a persisted credential in the scoped store, falling back to the main store. */ declare function findPersistedAuthProfileCredential(params: { agentDir?: string; profileId: string; }): AuthProfileStore["profiles"][string] | undefined; /** Resolve which agent dir owns a persisted profile, accounting for inherited OAuth. */ declare function resolvePersistedAuthProfileOwnerAgentDir(params: { agentDir?: string; profileId: string; }): string | undefined; /** Load the store shape used when applying local-only auth updates. */ declare function ensureAuthProfileStoreForLocalUpdate(agentDir?: string): AuthProfileStore; /** Replace runtime auth-profile snapshots, used by tests and prepared runtimes. */ declare function replaceRuntimeAuthProfileStoreSnapshots(entries: Array<{ agentDir?: string; store: AuthProfileStore; }>): void; /** Clear all runtime auth-profile snapshots. */ declare function clearRuntimeAuthProfileStoreSnapshots(): void; /** Save the auth profile store plus sidecar state, preserving runtime overlay metadata. */ declare function saveAuthProfileStore(store: AuthProfileStore, agentDir?: string, options?: SaveAuthProfileStoreOptions, database?: OpenClawAgentDatabase): void; //#endregion export { findPersistedAuthProfileCredential as a, loadAuthProfileStoreForSecretsRuntime as c, resolvePersistedAuthProfileOwnerAgentDir as d, saveAuthProfileStore as f, ensureAuthProfileStoreWithoutExternalProfiles as i, loadAuthProfileStoreWithoutExternalProfiles as l, ExternalCliAuthDiscovery as m, ensureAuthProfileStore as n, loadAuthProfileStore as o, updateAuthProfileStoreWithLock as p, ensureAuthProfileStoreForLocalUpdate as r, loadAuthProfileStoreForRuntime as s, clearRuntimeAuthProfileStoreSnapshots as t, replaceRuntimeAuthProfileStoreSnapshots as u };