superaugment
Version:
Enterprise-grade MCP server with world-class C++ analysis, robust error handling, and production-ready architecture for VS Code Augment
223 lines • 6.26 kB
TypeScript
import { z } from 'zod';
import { type ValidationResult } from './ConfigValidator.js';
declare const PersonaSchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
expertise: z.ZodArray<z.ZodString, "many">;
approach: z.ZodString;
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}, {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}>;
declare const ToolConfigSchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
category: z.ZodString;
parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
personas: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}, {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}>;
declare const ConfigSchema: z.ZodObject<{
personas: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
expertise: z.ZodArray<z.ZodString, "many">;
approach: z.ZodString;
tools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}, {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}>, "many">;
tools: z.ZodArray<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
category: z.ZodString;
parameters: z.ZodRecord<z.ZodString, z.ZodAny>;
personas: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
examples: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
}, "strip", z.ZodTypeAny, {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}, {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}>, "many">;
patterns: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, "strip", z.ZodTypeAny, {
tools: {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}[];
personas: {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}[];
patterns?: Record<string, any> | undefined;
settings?: Record<string, any> | undefined;
}, {
tools: {
name: string;
description: string;
category: string;
parameters: Record<string, any>;
personas?: string[] | undefined;
examples?: any[] | undefined;
}[];
personas: {
name: string;
description: string;
expertise: string[];
approach: string;
tools?: string[] | undefined;
}[];
patterns?: Record<string, any> | undefined;
settings?: Record<string, any> | undefined;
}>;
export type Persona = z.infer<typeof PersonaSchema>;
export type ToolConfig = z.infer<typeof ToolConfigSchema>;
export type Config = z.infer<typeof ConfigSchema>;
/**
* Enhanced configuration manager with validation and hot reload capabilities
*/
export declare class ConfigManager {
private config;
private configPath;
private validator;
private watcher;
private isInitialized;
private lastValidationResult;
constructor();
/**
* Initialize the configuration manager with validation and optional hot reload
*/
initialize(options?: {
enableHotReload?: boolean;
validateOnLoad?: boolean;
}): Promise<void>;
/**
* Get the current configuration
*/
getConfig(): Config;
/**
* Get all personas
*/
getPersonas(): Persona[];
/**
* Get a specific persona by name
*/
getPersona(name: string): Persona | undefined;
/**
* Get all tool configurations
*/
getToolConfigs(): ToolConfig[];
/**
* Get a specific tool configuration by name
*/
getToolConfig(name: string): ToolConfig | undefined;
/**
* Load personas from configuration
*/
private loadPersonas;
/**
* Load tool configurations
*/
private loadTools;
/**
* Load patterns configuration
*/
private loadPatterns;
/**
* Load settings configuration
*/
private loadSettings;
/**
* Setup hot reload functionality
*/
private setupHotReload;
/**
* Reload configuration from files
*/
private reloadConfiguration;
/**
* Validate current configuration
*/
validateConfiguration(): Promise<ValidationResult>;
/**
* Get last validation result
*/
getLastValidationResult(): ValidationResult | null;
/**
* Check if configuration manager is initialized
*/
isConfigInitialized(): boolean;
/**
* Get configuration health status
*/
getHealthStatus(): {
initialized: boolean;
valid: boolean;
hotReloadEnabled: boolean;
lastValidation?: Date;
errors: number;
warnings: number;
};
/**
* Force reload configuration (useful for testing or manual refresh)
*/
forceReload(): Promise<void>;
/**
* Cleanup resources
*/
cleanup(): Promise<void>;
}
export {};
//# sourceMappingURL=ConfigManager.d.ts.map