/** * Configuration Manager - Handles Piagnet configuration loading, validation, and saving */ import { type AgentDefinition, type ChannelBinding, type ChannelConfig, type PiagnetConfig } from "./schema.js"; /** Configuration manager options */ export interface ConfigManagerOptions { /** Configuration directory */ configDir?: string; /** Configuration file name */ configFile?: string; } /** Configuration manager */ export declare class ConfigManager { private configDir; private configFile; private config; private loaded; constructor(options?: ConfigManagerOptions); /** Get default configuration directory */ private getDefaultConfigDir; /** Expand tilde in paths */ private expandPath; /** Get full configuration file path */ getConfigPath(): string; /** Ensure configuration directory exists */ ensureConfigDir(): Promise; /** Load configuration from file */ load(): Promise; /** Save configuration to file */ save(): Promise; /** Get current configuration */ getConfig(): PiagnetConfig; /** Update configuration */ updateConfig(updates: Partial): void; /** Get gateway configuration */ getGatewayConfig(): PiagnetConfig["gateway"]; /** Get agent by ID */ getAgent(id: string): AgentDefinition | undefined; /** Get default agent */ getDefaultAgent(): AgentDefinition | undefined; /** Add or update agent */ upsertAgent(agent: AgentDefinition): void; /** Remove agent */ removeAgent(id: string): boolean; /** Get channel by type */ getChannel(type: string): ChannelConfig | undefined; /** Get enabled channels */ getEnabledChannels(): ChannelConfig[]; /** Add or update channel */ upsertChannel(channel: ChannelConfig): void; /** Remove channel */ removeChannel(type: string): boolean; /** Get bindings for agent */ getBindingsForAgent(agentId: string): ChannelBinding[]; /** Get bindings for channel */ getBindingsForChannel(channel: string): ChannelBinding[]; /** Add binding */ addBinding(binding: ChannelBinding): void; /** Remove binding */ removeBinding(agentId: string, channel: string, bindType: string, bindValue: string): boolean; /** Resolve route for incoming message */ resolveRoute(channel: string, scope: string, identifier: string, guildId?: string): ChannelBinding | undefined; /** Create initial configuration file if it doesn't exist */ createInitialConfig(): Promise; /** Validate configuration */ validate(): { valid: boolean; errors: string[]; }; /** Create config manager instance */ static create(options?: ConfigManagerOptions): Promise; } /** Create config manager and load configuration */ export declare function loadConfig(options?: ConfigManagerOptions): Promise; //# sourceMappingURL=manager.d.ts.map