import { ResponseCreateParams, ResponseObject, ResponseToolChoice, TruncationStrategy, TextConfig, ReasoningConfig, StreamingEvent, InputItemsListResponse, DeleteResponseResult, ResponseInputItem } from '../types.js';
/**
 * Extracts the text content from an assistant message in a Response.
 * Equivalent to OpenAI Python SDK's `response.output_text`.
 *
 * @param response - The Response object.
 * @returns The concatenated text from the first assistant message, or an empty string.
 */
export declare function getOutputText(response: ResponseObject): string;
/**
 * Configuration settings for the Responses API client.
 * Properties use camelCase in JS and are serialized to snake_case for the API.
 */
export declare class ResponsesClientSettings {
    /** System-level instructions to guide the model. */
    instructions?: string;
    temperature?: number;
    topP?: number;
    maxOutputTokens?: number;
    frequencyPenalty?: number;
    presencePenalty?: number;
    toolChoice?: ResponseToolChoice;
    truncation?: TruncationStrategy;
    parallelToolCalls?: boolean;
    store?: boolean;
    metadata?: Record<string, string>;
    reasoning?: ReasoningConfig;
    text?: TextConfig;
    seed?: number;
    /**
     * Serializes settings into an OpenAI Responses API-compatible request object.
     * @internal
     */
    _serialize(): Partial<ResponseCreateParams>;
}
/**
 * Client for the OpenAI Responses API served by Foundry Local's embedded web service.
 *
 * Unlike ChatClient/AudioClient (which use FFI via CoreInterop), the Responses API
 * is HTTP-only. This client uses fetch() for all operations and parses Server-Sent Events
 * for streaming.
 *
 * Create via `FoundryLocalManager.createResponsesClient()` or
 * `model.createResponsesClient(baseUrl)`.
 *
 * @example
 * ```typescript
 * const manager = FoundryLocalManager.create({ appName: 'MyApp' });
 * manager.startWebService();
 * const client = manager.createResponsesClient('my-model-id');
 *
 * // Non-streaming
 * const response = await client.create('Hello, world!');
 * console.log(response.output);
 *
 * // Streaming
 * await client.createStreaming('Tell me a story', (event) => {
 *     if (event.type === 'response.output_text.delta') {
 *         process.stdout.write(event.delta);
 *     }
 * });
 * ```
 */
export declare class ResponsesClient {
    private baseUrl;
    private modelId?;
    /**
     * Configuration settings for responses.
     */
    settings: ResponsesClientSettings;
    /**
     * @param baseUrl - The base URL of the Foundry Local web service (e.g. "http://127.0.0.1:5273").
     * @param modelId - Optional default model ID. Can be overridden per-request via options.
     */
    constructor(baseUrl: string, modelId?: string);
    /**
     * Creates a model response (non-streaming).
     * @param input - A string prompt or array of input items.
     * @param options - Additional request parameters that override client settings.
     *   The `model` field is optional here if a default model was set in the constructor.
     * @returns The completed Response object. Check `response.status` and `response.error`
     *   even on success — the server returns HTTP 200 for model-level failures too.
     */
    create(input: string | ResponseInputItem[], options?: Partial<ResponseCreateParams>): Promise<ResponseObject>;
    /**
     * Creates a model response with streaming via Server-Sent Events.
     * @param input - A string prompt or array of input items.
     * @param callback - Called for each streaming event received.
     * @param options - Additional request parameters that override client settings.
     */
    createStreaming(input: string | ResponseInputItem[], callback: (event: StreamingEvent) => void, options?: Partial<ResponseCreateParams>): Promise<void>;
    /**
     * Retrieves a stored response by ID.
     * @param responseId - The ID of the response to retrieve.
     * @returns The Response object, or throws if not found.
     */
    get(responseId: string): Promise<ResponseObject>;
    /**
     * Deletes a stored response by ID.
     * @param responseId - The ID of the response to delete.
     * @returns The deletion result.
     */
    delete(responseId: string): Promise<DeleteResponseResult>;
    /**
     * Cancels an in-progress response.
     * @param responseId - The ID of the response to cancel.
     * @returns The cancelled Response object.
     */
    cancel(responseId: string): Promise<ResponseObject>;
    /**
     * Retrieves input items for a stored response.
     * @param responseId - The ID of the response.
     * @returns The list of input items.
     */
    getInputItems(responseId: string): Promise<InputItemsListResponse>;
    /**
     * Builds the full request body by merging input, settings, and per-call options.
     */
    private buildRequest;
    /**
     * Validates that input is a non-empty string or a non-empty array of items.
     */
    private validateInput;
    /**
     * Validates that tools array is properly formed.
     * Follows the same pattern as ChatClient.validateTools.
     */
    private validateTools;
    /**
     * Validates that a string ID parameter is non-empty and within length bounds.
     */
    private validateId;
    /**
     * Performs a fetch and parses the JSON response, handling errors.
     */
    private fetchJson;
    /**
     * Low-level fetch wrapper with error handling.
     */
    private doFetch;
    /**
     * Parses a Server-Sent Events stream from the fetch response body.
     * Format: "event: {type}\ndata: {json}\n\n"
     * Terminal signal: "data: [DONE]\n\n"
     * Per SSE spec, multiple data: lines within a single event are joined with \n.
     */
    private parseSSEStream;
}
