import type { Api, AssistantMessage, Context, Model, StreamOptions } from "../types.js";
import type { AssistantMessageEventStream } from "./event-stream.js";
import type { StreamingStateManager } from "./streaming-state-manager.js";
/**
 * Type definitions reused across the various provider stream-handler classes.
 */
/**
 * The full working set a handler operates with for one run: which model to
 * call, the request context, the event stream to emit on, caller-supplied
 * options, an optional abort signal, and the mutable state tracker.
 */
export interface StreamHandlerExecutionContext {
    model: Model<Api>;
    context: Context;
    stream: AssistantMessageEventStream;
    options?: StreamOptions;
    signal?: AbortSignal;
    state: StreamingStateManager;
}
/**
 * A loosely typed request bag; individual providers refine it to their shape.
 */
export interface ProviderRequest {
    [key: string]: unknown;
}
/**
 * A loosely typed response bag; individual providers refine it to their shape.
 */
export interface ProviderResponse {
    [key: string]: unknown;
}
/**
 * Strongly typed scaffold for provider handlers. The model, context, stream,
 * options, and abort signal are stored on construction, leaving subclasses to
 * supply only {@link execute}.
 */
export declare abstract class TypedStreamHandler<TOptions extends StreamOptions = StreamOptions> {
    protected readonly model: Model<Api>;
    protected readonly context: Context;
    protected readonly stream: AssistantMessageEventStream;
    protected readonly options?: TOptions | undefined;
    protected readonly signal?: AbortSignal | undefined;
    constructor(model: Model<Api>, context: Context, stream: AssistantMessageEventStream, options?: TOptions | undefined, signal?: AbortSignal | undefined);
    protected createStateManager(initialOutput: AssistantMessage): StreamingStateManager;
    abstract execute(): AssistantMessageEventStream;
}
