INNER CODE UNIT · TypeScript
validateConfig
AgentDock/AgentDock · agentdock-core/src/config/index.ts:403
export function validateConfig(config: AgentDockConfig): void {
if (!config.storage?.type) {
throw new Error('Storage type is required');
}
if (!config.memory) {
throw new Error('Memory configuration is required');
}
if (
config.storage.type === 'postgresql' &&
!config.storage.config?.connectionString
) {
throw new Error('PostgreSQL connection string is required');
}
if (config.storage.type === 'sqlite' && !config.storage.config?.path) {
throw new Error('SQLite database path is required');