()
| 195 | * @returns Array of installed plugin IDs |
| 196 | */ |
| 197 | export async function getInstalledPlugins(): Promise<string[]> { |
| 198 | // Trigger sync in background (don't await - don't block startup) |
| 199 | // This syncs enabledPlugins from settings.json to installed_plugins.json |
| 200 | void migrateFromEnabledPlugins().catch(error => { |
| 201 | logError(error) |
| 202 | }) |
| 203 | |
| 204 | // Always use V2 format - initializes in-memory session state and triggers V1→V2 migration |
| 205 | const v2Data = getInMemoryInstalledPlugins() |
| 206 | const installed = Object.keys(v2Data.plugins) |
| 207 | logForDebugging(`Found ${installed.length} installed plugins`) |
| 208 | return installed |
| 209 | } |
| 210 | |
| 211 | /** |
| 212 | * Finds plugins that are enabled but not installed |
no test coverage detected