export interface Credentials {
    token: string;
    apiUrl: string;
    workspaceId?: string;
    workspaceName?: string;
    botId?: string;
}
export interface Profile {
    name: string;
    credentials: Credentials;
    apiUrl: string;
    lastUsed: string;
    email?: string;
    displayName?: string;
    accountId?: string;
    createdAt?: string;
}
export interface ProfileMetadata {
    lastUsed: string;
    accountId?: string;
    email?: string;
    displayName?: string;
    createdAt?: string;
}
export interface CredentialsStore {
    profiles: Record<string, Credentials>;
    profileMetadata: Record<string, ProfileMetadata>;
    currentProfile: string;
}
export declare class CredentialsManager {
    private credentialsPath;
    private configDir;
    private profileOverride;
    constructor();
    /**
     * Set a profile override that takes precedence over the stored current profile.
     * This is used by the CLI's global --profile flag.
     */
    setProfileOverride(profile: string | undefined): void;
    private ensureConfigDir;
    private readCredentials;
    private writeCredentials;
    saveCredentials(profileName: string, credentials: Credentials, userInfo?: Partial<ProfileMetadata>): Promise<void>;
    getCredentials(profileName?: string): Promise<Credentials | null>;
    listProfiles(): Promise<Profile[]>;
    getCurrentProfile(): Promise<string>;
    getCurrentProfileDetails(): Promise<Profile | null>;
    setCurrentProfile(profileName: string): Promise<void>;
    deleteProfile(profileName: string): Promise<void>;
    getActiveCredentials(): Promise<Credentials>;
    /**
     * Find a profile whose apiUrl matches the given URL.
     * Returns the credentials of the first matching profile, or null if none match.
     * Accepts a pre-loaded store to avoid redundant file reads.
     */
    private findProfileByApiUrl;
    /**
     * Get credentials for agent-specific operations
     * This will prioritize workspaceId and apiUrl from agent.json over credentials file.
     * When no explicit profile is specified, it auto-selects the profile whose apiUrl
     * matches the agent.json apiUrl.
     *
     * @param agentPath - Path to the agent project directory
     * @throws Error if agent.json is missing or doesn't contain workspaceId
     */
    getAgentCredentials(agentPath: string): Promise<Credentials>;
}
//# sourceMappingURL=credentials.d.ts.map