import { type ProviderConnection } from '../connection-config.js'; import { type OAuthCredentials, type OAuthLoginCallbacks, type OAuthLoginAdapter } from "../models.js"; import { type CredentialStore } from "@earendil-works/pi-ai"; import { type ModelCredentialProfile, type PublicModelCredentialProfile } from "../models.js"; import { ModelRuntime } from "@earendil-works/pi-coding-agent"; export declare class PiAiOAuthLoginAdapter implements OAuthLoginAdapter { login(providerId: string, callbacks: OAuthLoginCallbacks): Promise; } export declare function loginProviderApiKey(providerId: string, apiKey: string | undefined, connection: ProviderConnection, signal: AbortSignal): Promise<{ apiKey?: string; env?: Record; }>; export declare function getBossmodePiRuntimeRoot(): string; export declare function createCredentialStore(profile: Pick): CredentialStore; export interface PiCredentialExport { agentDir: string; extensionPaths: string[]; profile?: PublicModelCredentialProfile; } export declare function buildAllProvidersCatalog(preferredProfileId?: string): Record>; export declare function createDatabaseModelRuntime(credentials: CredentialStore, preferredProfileId?: string): Promise; export declare function refreshDatabaseModelRuntime(runtime: ModelRuntime, preferredProfileId?: string, options?: { skipUnchanged?: boolean; }): Promise; export declare function resolvePiAgentDir(memberId: string): string; export declare function exportPiConfigForMember(args: { memberId: string; modelRef: string; credentialId?: string; }): PiCredentialExport | null; type Profile = Parameters[0]; /** * Each SDK model snapshot owns a fixed profile. Only secrets are read live. * An auth operation retains that store across the SDK's read/modify awaits. */ export declare class ModelCredentialBinding implements CredentialStore { private readonly request; private readonly models; private readonly initial; private currentModel; constructor(profile: Profile); bind(model: T, profile: Profile): T; followSession(getModel: () => object | undefined): void; private forModel; private current; run(model: object | undefined, fn: () => T): T; runProfile(profile: Profile, fn: () => T): T; /** SDK request and catalog entry points; no SDK history/state replacement. */ attach(runtime: ModelRuntime): void; read(...args: Parameters): ReturnType; list(): ReturnType; modify(...args: Parameters): ReturnType; delete(...args: Parameters): ReturnType; } export {}; //# sourceMappingURL=credentials.d.ts.map