import { ClineAccountUser, ClineOrganization } from "@clinebot/core/node";
import { LlmsProviders } from "@clinebot/llms";
import { type CreateMcpToolsOptions, type Tool } from "@clinebot/agents";
export type ManagedClineOauthProviderId = "cline" | "oca" | "openai-codex";
export type SdkReasoningEffort = NonNullable<LlmsProviders.ReasoningSettings["effort"]>;
export interface ManagedOauthCredentials {
    access: string;
    refresh: string;
    expires: number;
    accountId?: string | null;
}
export interface ManagedOauthCallbacks {
    onAuth: (input: {
        url: string;
        instructions?: string;
    }) => void;
    onPrompt: () => Promise<never>;
    onProgress: () => void;
}
export interface SdkProviderCatalogItem {
    id: string;
    name: string;
    defaultModelId?: string;
    capabilities?: string[];
}
export interface SdkUserRemoteConfigResponse {
    organizationId: string;
    value: string;
    enabled: boolean;
}
export type SdkProviderModelRecord = Record<string, LlmsProviders.ModelInfo>;
export type SdkProviderSettings = LlmsProviders.ProviderSettings;
export interface SaveSdkProviderSettingsInput {
    settings: SdkProviderSettings;
    tokenSource?: "oauth" | "manual";
    setLastUsed?: boolean;
}
export type SdkMcpTool = Tool;
export interface SdkMcpServerRegistration {
    name: string;
    disabled?: boolean;
    transport: {
        type: "stdio";
        command: string;
        args?: string[];
        cwd?: string;
        env?: Record<string, string>;
    } | {
        type: "sse";
        url: string;
        headers?: Record<string, string>;
    } | {
        type: "streamableHttp";
        url: string;
        headers?: Record<string, string>;
    };
}
export interface SdkMcpServerSnapshot {
    name: string;
    status: "disconnected" | "connecting" | "connected";
    disabled: boolean;
    lastError?: string;
    toolCount: number;
    updatedAt: number;
}
export interface SdkMcpServerClient {
    connect(): Promise<void>;
    disconnect(): Promise<void>;
    listTools(): Promise<readonly {
        name: string;
        description?: string;
        inputSchema: Record<string, unknown>;
    }[]>;
    callTool(request: {
        name: string;
        arguments?: Record<string, unknown>;
    }): Promise<unknown>;
}
export interface SdkMcpManagerOptions {
    clientFactory: ((registration: SdkMcpServerRegistration) => Promise<SdkMcpServerClient>) | ((registration: SdkMcpServerRegistration) => SdkMcpServerClient);
    toolsCacheTtlMs?: number;
}
export interface SdkMcpManager {
    registerServer(registration: SdkMcpServerRegistration): Promise<void>;
    listServers(): readonly SdkMcpServerSnapshot[];
    listTools(serverName: string): Promise<readonly {
        name: string;
        description?: string;
        inputSchema: Record<string, unknown>;
    }[]>;
    callTool(request: {
        serverName: string;
        toolName: string;
        arguments?: Record<string, unknown>;
        context?: unknown;
    }): Promise<unknown>;
    dispose(): Promise<void>;
}
export type SdkCreateMcpToolsOptions = CreateMcpToolsOptions;
export declare function refreshManagedOauthCredentials(input: {
    providerId: ManagedClineOauthProviderId;
    currentCredentials: ManagedOauthCredentials;
    baseUrl?: string | null;
    oauthProvider?: string | null;
}): Promise<ManagedOauthCredentials | null>;
export declare function loginManagedOauthProvider(input: {
    providerId: ManagedClineOauthProviderId;
    baseUrl?: string | null;
    oauthProvider?: string | null;
    callbacks: ManagedOauthCallbacks;
}): Promise<ManagedOauthCredentials>;
export declare function listSdkProviderCatalog(): Promise<SdkProviderCatalogItem[]>;
export declare function listSdkProviderModels(providerId: string): Promise<SdkProviderModelRecord>;
export declare function supportsSdkModelThinking(modelInfo: LlmsProviders.ModelInfo): boolean;
export declare function getSdkProviderSettings(providerId: string): SdkProviderSettings | null;
export declare function getLastUsedSdkProviderSettings(): SdkProviderSettings | null;
export declare function saveSdkProviderSettings(input: SaveSdkProviderSettingsInput): void;
export declare function createSdkInMemoryMcpManager(options: SdkMcpManagerOptions): SdkMcpManager;
export declare function createSdkMcpTools(options: SdkCreateMcpToolsOptions): Promise<SdkMcpTool[]>;
type ApiRequestParams = {
    apiBaseUrl: string;
    accessToken: string;
};
export declare function fetchSdkClineAccountProfile(input: ApiRequestParams): Promise<ClineAccountUser>;
export declare function fetchSdkOrgData(input: ApiRequestParams & {
    organizatinId: string;
}): Promise<ClineOrganization>;
export declare function fetchSdkClineUserRemoteConfig(input: ApiRequestParams): Promise<SdkUserRemoteConfigResponse>;
export {};
//# sourceMappingURL=sdk-provider-boundary.d.ts.map