(record: PluginRecord)
| 387 | } |
| 388 | |
| 389 | function recordToSummary(record: PluginRecord): PluginSummary { |
| 390 | return { |
| 391 | id: record.id, |
| 392 | displayName: record.manifest?.interface?.displayName ?? record.id, |
| 393 | version: record.manifest?.version, |
| 394 | enabled: record.enabled, |
| 395 | state: record.state, |
| 396 | skillCount: record.skillCount, |
| 397 | mcpServerCount: Object.keys(record.manifest?.mcpServers ?? {}).length, |
| 398 | enabledMcpServerCount: pluginMcpServersInfo(record).filter((server) => server.enabled).length, |
| 399 | hookCount: record.manifest?.hooks?.length ?? 0, |
| 400 | commandCount: record.manifest?.commands?.length ?? 0, |
| 401 | hasErrors: record.diagnostics.some((d) => d.severity === 'error'), |
| 402 | source: record.source, |
| 403 | originalSource: record.originalSource, |
| 404 | github: record.github, |
| 405 | }; |
| 406 | } |
| 407 | |
| 408 | async function countDiscoveredPluginSkills( |
| 409 | pluginId: string, |
no test coverage detected