import OpenAI from 'openai';
import { Agent, OpenAIProvider, tool } from '@openai/agents';
import { type UseChatAgentOptions } from '../../';
export type AgentContext = object;
type AttachmentToolRuntime = {
    attachments?: Record<string, unknown>;
    additionalPrompts?: unknown;
    getAttachmentCache?: () => unknown;
};
export type ToolNeedsApprovalOption = Parameters<typeof tool>[0] extends {
    needsApproval?: infer T;
} ? T : never;
type ToolApprovalVariant = Exclude<ToolNeedsApprovalOption, boolean | undefined>;
type AttachmentToolApprovalFunction = ToolApprovalVariant extends (...args: infer Args) => infer Result ? (...args: Args) => Result : never;
type AttachmentToolDefinition = {
    name: string;
    description: string;
    parameters: unknown;
    needsApproval?: AttachmentToolApprovalFunction;
    handler: (input: Record<string, unknown> | undefined, runtime: AttachmentToolRuntime) => Promise<Record<string, unknown>>;
};
export declare const getCurrentOpenAIClient: () => OpenAI | null;
export declare const getCurrentOpenAIProvider: () => OpenAIProvider | null;
export declare const getCurrentOpenAIProviderOptions: () => ConstructorParameters<typeof OpenAIProvider>[0] | null;
export declare const setAttachmentToolDefinitionsResolver: (resolver: () => unknown[]) => void;
export declare class OpenAIChatAgent extends Agent<AgentContext, 'text'> {
    readonly options: UseChatAgentOptions;
    constructor(props: UseChatAgentOptions, resolveAttachmentTools?: () => AttachmentToolDefinition[]);
}
export declare const normalizeBaseUrl: (explicitBaseUrl?: string, connection?: Record<string, unknown>) => string | undefined;
export declare const normalizeClientHeaders: (headers?: Record<string, string>) => Record<string, string> | undefined;
export declare const createOpenAIClient: (options: UseChatAgentOptions) => OpenAI;
export {};
//# sourceMappingURL=chatAgent.d.ts.map