(id: string, enabled: boolean)
| 140 | } |
| 141 | |
| 142 | async setEnabled(id: string, enabled: boolean): Promise<void> { |
| 143 | const key = normalizePluginId(id); |
| 144 | const current = this.records.get(key); |
| 145 | if (current === undefined) throw new Error(`Plugin "${id}" is not installed`); |
| 146 | if (current.enabled === enabled) return; |
| 147 | const now = new Date().toISOString(); |
| 148 | this.records.set(key, { ...current, enabled, updatedAt: now }); |
| 149 | await this.persist(); |
| 150 | } |
| 151 | |
| 152 | async setMcpServerEnabled(id: string, server: string, enabled: boolean): Promise<void> { |
| 153 | const key = normalizePluginId(id); |
no test coverage detected