@nanocollective/nanocoder
Version:
A local-first CLI coding agent that brings the power of agentic coding tools like Claude Code and Gemini CLI to local models or controlled APIs like OpenRouter
123 lines • 3.34 kB
TypeScript
import type { TitleShape } from '../components/ui/styled-title.js';
import type { NanocoderShape, ThemePreset } from '../types/ui.js';
export type SdkProvider = 'openai-compatible' | 'google' | 'anthropic';
export interface AIProviderConfig {
name: string;
type: string;
models: string[];
requestTimeout?: number;
socketTimeout?: number;
maxRetries?: number;
connectionPool?: {
idleTimeout?: number;
cumulativeMaxIdleTimeout?: number;
};
disableTools?: boolean;
disableToolModels?: string[];
sdkProvider?: SdkProvider;
config: {
baseURL?: string;
apiKey?: string;
headers?: Record<string, string>;
[key: string]: unknown;
};
}
export interface ProviderConfig {
name: string;
baseUrl?: string;
apiKey?: string;
models: string[];
requestTimeout?: number;
socketTimeout?: number;
maxRetries?: number;
organizationId?: string;
timeout?: number;
connectionPool?: {
idleTimeout?: number;
cumulativeMaxIdleTimeout?: number;
};
disableTools?: boolean;
disableToolModels?: string[];
headers?: Record<string, string>;
sdkProvider?: SdkProvider;
[key: string]: unknown;
}
export type CompressionMode = 'default' | 'aggressive' | 'conservative';
export interface AutoCompactConfig {
enabled: boolean;
threshold: number;
mode: CompressionMode;
notifyUser: boolean;
}
export interface AppConfig {
providers?: {
name: string;
baseUrl?: string;
apiKey?: string;
models: string[];
requestTimeout?: number;
socketTimeout?: number;
maxRetries?: number;
connectionPool?: {
idleTimeout?: number;
cumulativeMaxIdleTimeout?: number;
};
disableTools?: boolean;
disableToolModels?: string[];
sdkProvider?: SdkProvider;
[key: string]: unknown;
}[];
mcpServers?: MCPServerConfig[];
lspServers?: {
name: string;
command: string;
args?: string[];
languages: string[];
env?: Record<string, string>;
}[];
alwaysAllow?: string[];
nanocoderTools?: {
alwaysAllow?: string[];
};
autoCompact?: AutoCompactConfig;
}
export interface MCPServerConfig {
name: string;
transport: 'stdio' | 'websocket' | 'http';
command?: string;
args?: string[];
env?: Record<string, string>;
url?: string;
headers?: Record<string, string>;
auth?: {
type: 'bearer' | 'basic' | 'api-key' | 'custom';
token?: string;
username?: string;
password?: string;
apiKey?: string;
customHeaders?: Record<string, string>;
};
timeout?: number;
reconnect?: {
enabled: boolean;
maxAttempts: number;
backoffMs: number;
};
description?: string;
tags?: string[];
enabled?: boolean;
source?: 'project' | 'global';
}
export interface UserPreferences {
lastProvider?: string;
lastModel?: string;
providerModels?: {
[key in string]?: string;
};
lastUpdateCheck?: number;
selectedTheme?: ThemePreset;
trustedDirectories?: string[];
titleShape?: TitleShape;
nanocoderShape?: NanocoderShape;
}
//# sourceMappingURL=config.d.ts.map