feat: add explicit plugins config to control plugin auto-detection

Previously, plugins: [] still auto-detected cortex because autoDetect()
always tried importing @soulcraft/cortex regardless of config. Now:
- undefined (default): auto-detect installed plugins
- false: no plugins, skip auto-detection entirely
- []: no plugins, skip auto-detection entirely
- ['@soulcraft/cortex']: load only specified, no auto-detection

Also adds typed plugins field to BrainyConfig interface.
This commit is contained in:
David Snelling 2026-02-02 08:52:18 -08:00
parent 389e9d6258
commit 6625385913
2 changed files with 35 additions and 3 deletions

View file

@ -747,6 +747,14 @@ export interface BrainyConfig {
// WASM compilation to happen during container startup, not on first request
eagerEmbeddings?: boolean
// Plugin configuration
// Controls which plugins are loaded during init()
// - undefined (default): Auto-detect installed plugins (@soulcraft/cortex, etc.)
// - false: No plugins — skip auto-detection entirely
// - []: No plugins — skip auto-detection entirely
// - ['@soulcraft/cortex']: Load only specified plugins, no auto-detection
plugins?: string[] | false
// Logging configuration
verbose?: boolean // Enable verbose logging
silent?: boolean // Suppress all logging output