bc-code-intelligence-mcp
Version:
BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows
186 lines • 5.85 kB
TypeScript
/**
* Configuration system types for BC Code Intelligence MCP server
* Supports multi-source configuration with layer-based knowledge management
*/
import { SessionStorageConfig } from './session-types.js';
export interface BCCodeIntelConfiguration {
layers: LayerConfiguration[];
resolution: ResolutionSettings;
cache: CacheSettings;
security: SecuritySettings;
performance: PerformanceSettings;
developer: DeveloperSettings;
sessionStorage?: SessionStorageConfig;
}
export interface LayerConfiguration {
name: string;
priority: number;
source: LayerSource;
enabled: boolean;
patterns?: string[];
cache_duration?: string;
auth?: AuthConfiguration;
}
export declare enum LayerSourceType {
EMBEDDED = "embedded",// ✅ Implemented
GIT = "git",// ✅ Implemented
LOCAL = "local",// ✅ Implemented
HTTP = "http",// 🚧 Planned - HTTP-based knowledge sources
NPM = "npm"
}
export interface LayerSource {
type: LayerSourceType;
path?: string;
url?: string;
branch?: string;
subpath?: string;
package?: string;
}
export interface GitLayerSource extends LayerSource {
type: LayerSourceType.GIT;
url: string;
branch?: string;
subpath?: string;
auth?: AuthConfiguration;
}
export interface LocalLayerSource extends LayerSource {
type: LayerSourceType.LOCAL;
path: string;
}
export interface EmbeddedLayerSource extends LayerSource {
type: LayerSourceType.EMBEDDED;
path?: string;
}
export interface HttpLayerSource extends LayerSource {
type: LayerSourceType.HTTP;
url: string;
auth?: AuthConfiguration;
}
export interface NpmLayerSource extends LayerSource {
type: LayerSourceType.NPM;
package: string;
}
export declare enum AuthType {
TOKEN = "token",
SSH_KEY = "ssh",
BASIC = "basic",
OAUTH = "oauth",
AZ_CLI = "az_cli"
}
export interface AuthConfiguration {
type: AuthType;
token?: string;
token_env_var?: string;
username?: string;
password?: string;
password_env_var?: string;
key_path?: string;
client_id?: string;
client_secret?: string;
}
export interface ResolutionSettings {
strategy: 'first_match' | 'best_match' | 'merge_all';
conflict_resolution: 'priority_wins' | 'user_choice' | 'merge_smart';
enable_fallback: boolean;
fallback_to_embedded: boolean;
}
export interface CacheSettings {
strategy: 'none' | 'minimal' | 'moderate' | 'aggressive';
ttl: CacheTTLSettings;
max_size_mb: number;
clear_on_startup: boolean;
background_refresh: boolean;
}
export interface CacheTTLSettings {
git: string;
local: string;
http: string;
embedded: string;
npm: string;
}
export interface SecuritySettings {
validate_sources: boolean;
allow_local_paths: boolean;
allow_http_sources: boolean;
trusted_domains: string[];
max_download_size_mb: number;
scan_for_malicious_content: boolean;
}
export interface PerformanceSettings {
max_concurrent_loads: number;
load_timeout_ms: number;
max_layers: number;
lazy_loading: boolean;
preload_embedded: boolean;
memory_limit_mb: number;
}
export interface DeveloperSettings {
debug_layers: boolean;
hot_reload: boolean;
log_level: 'error' | 'warn' | 'info' | 'debug';
profile_performance: boolean;
validate_on_startup: boolean;
export_config_schema: boolean;
enable_diagnostic_tools: boolean;
}
export interface ConfigurationSource {
type: 'file' | 'environment' | 'default';
path?: string;
format?: 'json' | 'yaml';
priority: number;
}
export interface ConfigurationLoadResult {
config: BCCodeIntelConfiguration;
sources: ConfigurationSource[];
warnings: ConfigurationWarning[];
validation_errors: ValidationError[];
}
export interface ConfigurationWarning {
type: 'deprecated' | 'invalid_value' | 'missing_optional' | 'security';
message: string;
source?: string;
suggestion?: string;
}
export interface ValidationError {
field: string;
message: string;
value?: any;
source?: string;
suggestion?: string;
}
export interface LayerLoadResult {
layer_name: string;
success: boolean;
topics_loaded: number;
load_time_ms: number;
errors: string[];
warnings: string[];
source_info: LayerSourceInfo;
}
export interface LayerSourceInfo {
type: LayerSourceType;
location: string;
last_updated?: Date;
version?: string;
size_bytes?: number;
}
export declare const DEFAULT_BC_CODE_INTEL_CONFIG: BCCodeIntelConfiguration;
export declare const ENV_VAR_MAPPINGS: {
readonly BC_CODE_INTEL_CONFIG_PATH: "config_file_path";
readonly BC_CODE_INTEL_DEBUG_LAYERS: "developer.debug_layers";
readonly BC_CODE_INTEL_ENABLE_DIAGNOSTICS: "developer.enable_diagnostic_tools";
readonly BC_CODE_INTEL_HOT_RELOAD: "developer.hot_reload";
readonly BC_CODE_INTEL_LOG_LEVEL: "developer.log_level";
readonly BC_CODE_INTEL_CACHE_STRATEGY: "cache.strategy";
readonly BC_CODE_INTEL_CACHE_TTL_GIT: "cache.ttl.git";
readonly BC_CODE_INTEL_CACHE_TTL_LOCAL: "cache.ttl.local";
readonly BC_CODE_INTEL_ALLOW_HTTP_SOURCES: "security.allow_http_sources";
readonly BC_CODE_INTEL_MAX_LAYERS: "performance.max_layers";
readonly BC_CODE_INTEL_MEMORY_LIMIT_MB: "performance.memory_limit_mb";
readonly BC_CODE_INTEL_PROJECT_OVERRIDES_PATH: "layers[project].source.path";
readonly BC_CODE_INTEL_COMPANY_KNOWLEDGE_URL: "layers[company].source.url";
readonly BC_CODE_INTEL_COMPANY_KNOWLEDGE_TOKEN: "layers[company].auth.token";
readonly BC_CODE_INTEL_COMPANY_KNOWLEDGE_BRANCH: "layers[company].source.branch";
};
export type ConfigurationPath = typeof ENV_VAR_MAPPINGS[keyof typeof ENV_VAR_MAPPINGS];
//# sourceMappingURL=config-types.d.ts.map