mnemos-coder
Version:
CLI-based coding agent with graph-based execution loop and terminal UI
146 lines • 3.62 kB
TypeScript
/**
* Global configuration management for mnemos-coder
* Handles LLM and embedding model settings
*/
export interface LLMConfig {
name: string;
description: string;
base_url: string;
api_key: string;
model: string;
max_tokens?: number;
temperature?: number;
stream?: boolean;
timeout?: number;
}
export interface EmbeddingConfig {
name: string;
description: string;
base_url: string;
api_key: string;
model: string;
dimension: number;
batch_size?: number;
}
export interface MCPServerConfig {
transport: 'stdio' | 'sse' | 'http';
command?: string;
args?: string[];
env?: Record<string, string>;
url?: string;
headers?: Record<string, string>;
timeout?: number;
verify_ssl?: boolean;
}
export interface AgentConfig {
max_iterations: number;
system_prompt: string;
}
export interface ParsingConfig {
use_symbol_aware_chunking: boolean;
max_tokens: number;
preserve_signatures: boolean;
split_large_functions: boolean;
include_control_flow: boolean;
include_comments: boolean;
include_imports: boolean;
context_lines: number;
}
export interface GlobalSettings {
llm: {
reasoning: LLMConfig;
nothink: LLMConfig;
default: 'reasoning' | 'nothink';
};
embedding: EmbeddingConfig;
mcp_servers: Record<string, MCPServerConfig>;
agent: AgentConfig;
parsing: ParsingConfig;
version: string;
last_updated: string;
}
export declare class GlobalConfig {
private static instance;
private configPath;
private settings;
private activeModel;
private constructor();
/**
* Find the correct path to MCP servers based on installation type
*/
private getMCPServerPath;
/**
* Generate MCP servers configuration with dynamic paths
*/
private getDynamicMCPServersConfig;
static getInstance(): GlobalConfig;
/**
* Get default configurations
*/
private getDefaultSettings;
/**
* Load configuration from file
*/
load(): GlobalSettings;
/**
* Save configuration to file
*/
save(settings: GlobalSettings): void;
/**
* Update LLM configuration
*/
updateLLM(llmConfig: LLMConfig, modelType?: 'reasoning' | 'nothink'): void;
/**
* Update embedding configuration
*/
updateEmbedding(embeddingConfig: EmbeddingConfig): void;
/**
* Get current LLM configuration based on active model
*/
getLLMConfig(): LLMConfig;
/**
* Set active model (reasoning or nothink)
*/
setActiveModel(model: 'reasoning' | 'nothink'): void;
/**
* Get active model name
*/
getActiveModel(): 'reasoning' | 'nothink';
/**
* Get current embedding configuration
*/
getEmbeddingConfig(): EmbeddingConfig;
/**
* Get MCP servers configuration
*/
getMCPServersConfig(): Record<string, MCPServerConfig>;
/**
* Get agent configuration
*/
getAgentConfig(): AgentConfig;
/**
* Get parsing configuration
*/
getParsingConfig(): ParsingConfig;
/**
* Check if configuration has been initialized
*/
isInitialized(): boolean;
/**
* Get configuration file path
*/
getConfigPath(): string;
/**
* Reset to default configuration
*/
reset(): void;
/**
* Validate and merge settings with defaults
*/
private validateAndMergeSettings;
/**
* Get settings summary for display
*/
getSummary(): string;
}
//# sourceMappingURL=GlobalConfig.d.ts.map