MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / recordToSummary

Function recordToSummary

packages/agent-core/src/plugin/manager.ts:389–406  ·  view source on GitHub ↗
(record: PluginRecord)

Source from the content-addressed store, hash-verified

387}
388
389function 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
408async function countDiscoveredPluginSkills(
409 pluginId: string,

Callers 2

summariesMethod · 0.85
recordToInfoFunction · 0.85

Calls 2

pluginMcpServersInfoFunction · 0.85
keysMethod · 0.80

Tested by

no test coverage detected