import { ConversationPluginDefinition, ConversationPlugin, PluginDataFromName, PluginOutputFromName, ConversationPluginDefinitionFromPlugin } from "../utils/types/index.js"; import { ConversationPluginService } from "./ConversationPluginService.js"; /** * Provides methods to interact with the plugins of a conversation. * It is a bridge between client code and the `ConversationPluginService`, which is internal to the library. * * @internal * This class is used internally by the library and is not meant to be **instantiated** by consumers of the library. */ export declare class ConversationPlugins, TPluginName extends string = TPluginCreators[number]["name"] | (string & {})> { private readonly pluginService; constructor(pluginService: ConversationPluginService); /** * Gets a `PluginDefinition` by its name. * * @param name The name of the plugin to get. (case-sensitive) * @returns The plugin with the specified name. * @throws If no plugin with the specified name is found. */ getPlugin(name: N): ConversationPluginDefinition, PluginDataFromName>; /** * Like `getPlugin`, but returns `undefined` instead of throwing an error if no plugin with the specified name is found. * * @param name The name of the plugin to get. (case-sensitive) * @returns The plugin with the specified name, or `undefined` if no plugin with the specified name is found. */ safeGetPlugin(name: N): ConversationPluginDefinition, PluginDataFromName> | undefined; /** * Gets a `PluginDefinition`'s output by its name. * * @param name The name of the plugin to get. (case-sensitive) * @returns The output of the plugin with the specified name. * @throws If no plugin with the specified name is found. */ getPluginOutput(name: N): PluginOutputFromName; /** * Like `getPluginOutput`, but returns `undefined` instead of throwing an error if no plugin with the specified name is found. * * @param name The name of the plugin to get. (case-sensitive) * @returns The output of the plugin with the specified name, or `undefined` if no plugin with the specified name is found. */ safeGetPluginOutput(name: N): PluginOutputFromName | undefined; /** * Gets all the **initialized** plugin definitions of the conversation. * These are different from the plugins passed to the `Conversation` constructor. * * @remarks * This is a shallow copy of the plugins array, so modifying the array will not modify the plugins of the conversation. */ getPlugins(): ConversationPluginDefinition[]; private get plugins(); }