import { type Reference } from '@frontmcp/di'; import { type PluginType, type ProviderType } from '../interfaces'; type InitOptions = ((TInput & { useFactory?: never; inject?: never; }) & { providers?: readonly ProviderType[]; }) | { inject: () => readonly Reference[]; useFactory: (...args: any[]) => TInput; providers?: readonly ProviderType[]; }; type PluginClassWithOptions = { new (...args: any[]): any; prototype: { __options_brand?: TOptions; __options_input_brand?: TInput; }; dynamicProviders?: (options: TInput) => readonly ProviderType[]; }; type ValueMcpPlugin = { provide: any; useValue: T; providers?: ProviderType[]; }; type FactoryMcpPlugin = { provide: any; inject: () => readonly Reference[]; useFactory: (...args: any[]) => T; }; type PluginReturn = (ValueMcpPlugin | FactoryMcpPlugin) & PluginType & { providers?: readonly ProviderType[]; }; /** * Base class for plugins that support dynamic configuration. * * @template TOptions - The resolved options type (after parsing with defaults applied) * @template TInput - The input options type (what users provide to init()). Defaults to TOptions for backwards compatibility. */ export declare abstract class DynamicPlugin { /** * Brand for resolved options type (used internally). */ __options_brand: TOptions; /** * Brand for input options type (used by init()). */ __options_input_brand: TInput; /** * Optional hook to contribute providers to the plugin. * @param options */ static dynamicProviders?(options: any): readonly ProviderType[]; get(token: Reference): T; /** * Static init() method to create a plugin provider. * @param options - Input options (with optional fields for defaults) */ static init>(this: TThis, options: InitOptions): PluginReturn; } export {}; //# sourceMappingURL=dynamic.plugin.d.ts.map