/** * Server configuration management utilities for v1.1 format. * Handles CRUD operations for server templates and instances. */ import type { ServerTemplate, ServerInstance, ServerConfig } from './config.schema.js'; /** * Adds multiple server configurations to the system in a single operation. * * @param servers - Array of server objects containing name and partial template configuration * @param currentServers - Current servers configuration object (will be modified) * @returns The updated servers configuration */ export declare function addServers(servers: Array<{ name: string; config: Partial; }>, currentServers: Record): Record; /** * Adds a new server configuration to the system (v1.1 format). * Creates a template and a default instance. * * @param name - The unique name for the server * @param config - The server template configuration (partial, will be validated) * @param currentServers - Current servers configuration object (will be modified) * @returns The complete server configuration (v1.1) */ export declare function addServer(name: string, config: Partial, currentServers: Record): ServerConfig; /** * Adds a new server instance for the specified server. * * @param name - The name of the server to add an instance for * @param instance - The server instance configuration (partial, will be validated) * @param currentServers - Current servers configuration object (will be modified) * @returns The validated and complete server instance configuration */ export declare function addServerInstance(name: string, instance: Partial, currentServers: Record): ServerInstance; /** * Reassigns server instance indexes to be consecutive (0, 1, 2, ...). * * @param name - The name of the server to reassign indexes for * @param currentServers - Current servers configuration object (will be modified) * @returns True if the server exists and indexes were reassigned */ export declare function reassignServerInstanceIndexes(name: string, currentServers: Record): boolean; /** * Updates an existing server configuration (template and/or instance selection strategy). * * @param name - The name of the server to update * @param updates - The partial server configuration updates to apply (can include template and instanceSelectionStrategy) * @param currentServers - Current servers configuration object (will be modified) * @returns True if the server was updated */ export declare function updateServerTemplate(name: string, updates: Partial, currentServers: Record): boolean; /** * Updates an existing server instance configuration. * * @param name - The name of the server containing the instance to update * @param index - The index of the instance to update * @param updates - The partial instance updates to apply * @param currentServers - Current servers configuration object (will be modified) * @returns True if the instance was updated */ export declare function updateServerInstance(name: string, index: number | string, updates: Partial, currentServers: Record): boolean; /** * Removes a server configuration and all its instances from the system. * * @param name - The name of the server to remove * @param currentServers - Current servers configuration object (will be modified) * @returns True if the server was removed */ export declare function removeServer(name: string, currentServers: Record): boolean; /** * Removes a specific server instance from the system. * * @param name - The name of the server containing the instance to remove * @param index - The index of the instance to remove * @param currentServers - Current servers configuration object (will be modified) * @returns True if the instance was removed */ export declare function removeServerInstance(name: string, index: number | string, currentServers: Record): boolean; //# sourceMappingURL=server-config-manager.d.ts.map