/** * Dependency Injection Container * * Provides a service locator pattern for better dependency management * and testability. Eliminates global state usage and promotes proper DI. */ import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import type { LoadedPlugin } from '../types/plugin.types.js'; /** * Service identifiers for type-safe dependency resolution */ export declare const SERVICE_IDENTIFIERS: { readonly AGENT_CAPABILITY_MATCHER: symbol; readonly AGENT_CAPABILITY_REGISTRY: symbol; readonly AGENT_LOADER: symbol; readonly COMMAND_EXECUTOR: symbol; readonly COMMAND_LOADER: symbol; readonly CONFIG_LOADER: symbol; readonly CONSOLE_OUTPUT: symbol; readonly CONTEXT_ANALYZER: symbol; readonly DOCUMENT_APPROVAL: symbol; readonly DOCUMENT_DETECTOR: symbol; readonly DOCUMENT_OUTPUT_PROCESSOR: symbol; readonly DOCUMENT_PATH_RESOLVER: symbol; readonly DOCUMENT_TEMPLATE: symbol; readonly DOCUMENT_WRITER: symbol; readonly DYNAMIC_AGENT_RESOLVER: symbol; readonly HEADER_FORMATTER: symbol; readonly ISOLATION_EXECUTOR: symbol; readonly LOGGER: symbol; readonly MCP_APPROVAL_CACHE: symbol; readonly MCP_APPROVAL_WORKFLOW: symbol; readonly MCP_AUDIT_LOGGER: symbol; readonly MCP_CLIENT_MANAGER: symbol; readonly MCP_EXTERNAL_INTEGRATOR: symbol; readonly MCP_SERVER: symbol; readonly MCP_TOOL_PROXY: symbol; readonly PIPELINE_EXECUTOR: symbol; readonly PROGRESS: symbol; readonly PROMPT_LOADER: symbol; readonly PROVIDER_REGISTRY: symbol; readonly PROVIDER_RESOLVER: symbol; readonly RATE_LIMITER: symbol; readonly RENDERER: symbol; readonly REQUEST_HANDLER: symbol; readonly SAMPLING_SERVICE: symbol; readonly SECURITY_COMMAND_GUARD: symbol; readonly SECURITY_CREDENTIAL_GUARD: symbol; readonly SECURITY_PROMPT_INJECTION_DETECTOR: symbol; readonly SECURITY_TOOL_DEFINITION_VALIDATOR: symbol; readonly SECURITY_TOOL_INTEGRITY_MONITOR: symbol; readonly SESSION_LIFECYCLE: symbol; readonly SESSION_MANAGER: symbol; readonly SESSION_STORE: symbol; readonly TASK_CLASSIFIER: symbol; readonly TOOL_REGISTRY: symbol; readonly PLUGIN_LIFECYCLE_REGISTRIES: symbol; readonly PLUGIN_LOADER: symbol; }; /** * Dependency Injection Container * * Manages service registration and resolution with proper lifecycle management. */ export declare class DIContainer { private factories; private services; private singletons; /** * Register a service instance (singleton) */ register(identifier: symbol, instance: T): void; /** * Register a factory function for creating service instances */ registerFactory(identifier: symbol, factory: () => T, singleton?: boolean): void; /** * Resolve a service by identifier */ resolve(identifier: symbol): T; /** * Check if a service is registered */ has(identifier: symbol): boolean; /** * Clear all services (useful for testing) */ clear(): void; } /** * Create a new DI container with default services */ export declare function createContainer(): DIContainer; export declare function dispatchDeactivateHooks(container: DIContainer): Promise; export declare function getLoadedPlugins(): LoadedPlugin[]; export declare function initializePlugins(container: DIContainer): Promise; /** * `bootstrapMemoryFromConfig()` activates the ephemeral provider as a default * before any plugin has loaded — a memory plugin (e.g. * valora-plugin-memory-vault) may still override it moments later via * `api.memory.activate()`. Only warn here, once all plugins have finished * loading, so the message reflects the FINAL active provider rather than the * bootstrap default that's about to be superseded. */ export declare function registerPluginMcpsFile(mcpsFile: string): void; /** * Bootstrap the bundled memory provider. Loaded lazily so it does not inflate * CLI startup time for commands that do not need memory (e.g. --help). */ export declare function bootstrapMemoryFromConfig(): Promise; /** * Setup MCP-specific services in the container * Must be called after the MCP server is created */ export declare function setupMCPServices(container: DIContainer, mcpServer: McpServer): void; //# sourceMappingURL=container.d.ts.map