@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, and professional CLI. Built-in tools operational, 58+ external MCP servers discoverable. Connect to filesystem, GitHub, database operations, and more. Build, test, and
151 lines (150 loc) • 3.35 kB
TypeScript
/**
* NeuroLink Configuration Types
* Industry standard camelCase interfaces for config management
*/
/**
* Main NeuroLink configuration interface
*/
export interface NeuroLinkConfig {
providers?: Record<string, ProviderConfig>;
performance?: PerformanceConfig;
analytics?: AnalyticsConfig;
tools?: ToolConfig;
lastUpdated?: number;
configVersion?: string;
[key: string]: unknown;
}
/**
* Provider-specific configuration
*/
export interface ProviderConfig {
model?: string;
available?: boolean;
lastCheck?: number;
reason?: string;
apiKey?: string;
endpoint?: string;
maxTokens?: number;
temperature?: number;
timeout?: number;
costPerToken?: number;
features?: string[];
[key: string]: unknown;
}
/**
* Performance and caching configuration
*/
export interface PerformanceConfig {
cache?: CacheConfig;
fallback?: FallbackConfig;
timeoutMs?: number;
maxConcurrency?: number;
retryConfig?: RetryConfig;
}
/**
* Cache configuration
*/
export interface CacheConfig {
enabled?: boolean;
ttlMs?: number;
strategy?: "memory" | "writeThrough" | "cacheAside";
maxSize?: number;
persistToDisk?: boolean;
diskPath?: string;
}
/**
* Fallback configuration
*/
export interface FallbackConfig {
enabled?: boolean;
maxAttempts?: number;
delayMs?: number;
circuitBreaker?: boolean;
commonResponses?: Record<string, string>;
localFallbackPath?: string;
degradedMode?: boolean;
}
/**
* Retry configuration
*/
export interface RetryConfig {
enabled?: boolean;
maxAttempts?: number;
baseDelayMs?: number;
maxDelayMs?: number;
exponentialBackoff?: boolean;
retryConditions?: string[];
}
/**
* Analytics configuration
*/
export interface AnalyticsConfig {
enabled?: boolean;
trackTokens?: boolean;
trackCosts?: boolean;
trackPerformance?: boolean;
trackErrors?: boolean;
exportFormat?: "json" | "csv" | "prometheus";
exportPath?: string;
retention?: {
days?: number;
maxEntries?: number;
};
}
/**
* Tool configuration
*/
export interface ToolConfig {
/** Whether built-in tools should be disabled */
disableBuiltinTools?: boolean;
/** Whether custom tools are allowed */
allowCustomTools?: boolean;
/** Maximum number of tools per provider */
maxToolsPerProvider?: number;
/** Whether MCP tools should be enabled */
enableMCPTools?: boolean;
}
/**
* Backup metadata information
*/
export interface BackupInfo {
filename: string;
path: string;
metadata: BackupMetadata;
config: NeuroLinkConfig;
}
/**
* Backup metadata
*/
export interface BackupMetadata {
reason: string;
timestamp: number;
version: string;
originalPath: string;
hash?: string;
size?: number;
createdBy?: string;
}
/**
* Configuration validation result
*/
export interface ConfigValidationResult {
valid: boolean;
errors: string[];
warnings: string[];
suggestions: string[];
}
/**
* Configuration update options
*/
export interface ConfigUpdateOptions {
createBackup?: boolean;
validate?: boolean;
merge?: boolean;
reason?: string;
silent?: boolean;
}
/**
* Default configuration values
*/
export declare const DEFAULT_CONFIG: NeuroLinkConfig;