import 'reflect-metadata'; import { type EntryOwnerRef, type PluginEntry, type PluginRecord, type PluginRegistryInterface, type PluginType, type ScopeEntry } from '../common'; import ProviderRegistry from '../provider/provider.registry'; import { RegistryAbstract, type RegistryBuildMapResult } from '../regsitry'; import ToolRegistry from '../tool/tool.registry'; /** * Scope information for plugin hook registration. * Used to determine where plugin hooks should be registered based on * the plugin's scope setting and whether the app is standalone. */ export interface PluginScopeInfo { /** The scope where the plugin is defined (app's own scope) */ ownScope: ScopeEntry; /** Parent scope for non-standalone apps (gateway scope) */ parentScope?: ScopeEntry; /** Whether the app is standalone (standalone: true) */ isStandaloneApp: boolean; } export default class PluginRegistry extends RegistryAbstract implements PluginRegistryInterface { /** providers by token */ private readonly pProviders; /** providers by token */ private readonly pPlugins; /** adapters by token */ private readonly pAdapters; /** tools by token */ private readonly pTools; /** resources by token */ private readonly pResources; /** prompts by token */ private readonly pPrompts; /** skills by token */ private readonly pSkills; private readonly scope; private readonly scopeInfo?; private readonly owner?; private readonly logger?; constructor(providers: ProviderRegistry, list: PluginType[], owner?: EntryOwnerRef, /** * Scope information for hook registration. Determines where plugin hooks * are registered based on the plugin's scope setting ('app' or 'server'). * - scope='app' (default): hooks register to ownScope * - scope='server': hooks register to parentScope (if available) */ scopeInfo?: PluginScopeInfo); getPlugins(): PluginEntry[]; /** * Returns the names of all registered plugins from their definition records. * Unlike getPlugins().map(p => p.metadata.name), this is safe because * raw plugin instances (e.g. DynamicPlugin subclasses) may not carry a .metadata property. */ getPluginNames(): string[]; /** * Returns all ToolRegistries created by plugins in this registry. * Used for propagating server-level plugin tools to the scope. */ getToolRegistries(): ToolRegistry[]; protected buildMap(list: PluginType[]): RegistryBuildMapResult; protected buildGraph(): void; protected initialize(): Promise; } //# sourceMappingURL=plugin.registry.d.ts.map