/**
 * Vercel AI SDK adapter for StreamTextProvider.
 *
 * This adapter bridges our high-level StreamTextProvider interface
 * to the Vercel AI SDK's streamText function. It handles:
 * - Mapping our options to SDK options
 * - Adding onFinally support via stream wrapping
 * - Translating SDK results to our interface
 *
 * This is the only place that depends on Vercel AI SDK internals.
 * All other code (middlewares, etc.) depends only on our interface.
 */
import type { Tool } from "../../../agent/tools2/types.js";
import type { StreamTextProvider, StreamTextOptions, StreamTextResult } from "../provider.js";
/**
 * Adapter that implements StreamTextProvider using Vercel AI SDK.
 *
 * This class wraps Vercel's streamText function and adds our custom
 * lifecycle management (particularly onFinally support).
 *
 * @example
 * ```typescript
 * const provider = new VercelStreamTextAdapter();
 * const result = await provider.streamText({
 *   model: anthropic('claude-3-5-sonnet-20241022'),
 *   messages: [{ role: 'user', content: 'Hello!' }],
 *   onFinally: async () => {
 *     console.log('Stream consumed!');
 *   }
 * });
 *
 * for await (const text of result.textStream) {
 *   console.log(text);
 * }
 * // onFinally runs here
 * ```
 */
export declare class VercelStreamTextAdapter implements StreamTextProvider {
    /**
     * Streams text using Vercel AI SDK with lifecycle management.
     *
     * @param options - Stream options including onFinally hook
     * @returns Promise resolving to stream result
     */
    streamText<TOOLS extends Record<string, Tool> = Record<string, Tool>>(options: StreamTextOptions<TOOLS>): Promise<StreamTextResult<TOOLS>>;
}
/**
 * Creates a StreamTextProvider using Vercel AI SDK.
 *
 * Convenience function for creating the adapter.
 *
 * @returns A new Vercel SDK adapter instance
 *
 * @example
 * ```typescript
 * const provider = createVercelProvider();
 *
 * // Use with middlewares
 * const wrapped = applyMiddleware(
 *   provider,
 *   contextMiddleware,
 *   loggingMiddleware
 * );
 * ```
 */
export declare function createVercelProvider(): StreamTextProvider;
//# sourceMappingURL=vercel.d.ts.map