import type { Api, AssistantMessageEventStreamContract, Context, Model, SimpleStreamOptions, StreamFunction, StreamOptions } from "@openclaw/llm-core"; /** Runtime stream adapter signature stored in the API provider registry. */ export type ApiStreamFunction = (model: Model, context: Context, options?: StreamOptions) => AssistantMessageEventStreamContract; /** Runtime simple-stream adapter signature stored in the API provider registry. */ export type ApiStreamSimpleFunction = (model: Model, context: Context, options?: SimpleStreamOptions) => AssistantMessageEventStreamContract; /** Provider implementation registered by core or plugins for a specific model API. */ export interface ApiProvider { /** Model API id this provider handles. */ api: TApi; /** Full streaming adapter for callers that already own structured options. */ stream: StreamFunction; /** Simple streaming adapter used by agent and plugin runtime defaults. */ streamSimple: StreamFunction; } /** Type-erased provider returned by a registry after API guards are installed. */ export interface RegisteredApiProvider { api: Api; stream: ApiStreamFunction; streamSimple: ApiStreamSimpleFunction; } /** Creates an isolated provider registry for one runtime or tenant. */ export declare function createApiRegistry(): { registerApiProvider: (provider: ApiProvider, sourceId?: string) => void; getApiProvider: (api: Api) => RegisteredApiProvider | undefined; getApiProviders: () => RegisteredApiProvider[]; unregisterApiProviders: (sourceId: string) => void; clearApiProviders: () => void; }; export type ApiRegistry = ReturnType;