MCPcopy
hub / github.com/EveryInc/compound-engineering-plugin / loadClaudePlugin

Function loadClaudePlugin

src/parsers/claude.ts:16–37  ·  view source on GitHub ↗
(inputPath: string)

Source from the content-addressed store, hash-verified

14const PLUGIN_MANIFEST = path.join(".claude-plugin", "plugin.json")
15
16export async function loadClaudePlugin(inputPath: string): Promise<ClaudePlugin> {
17 const root = await resolveClaudeRoot(inputPath)
18 const manifestPath = path.join(root, PLUGIN_MANIFEST)
19 const manifest = await readJson<ClaudeManifest>(manifestPath)
20
21 const agents = await loadAgents(resolveComponentDirs(root, "agents", manifest.agents))
22 const commands = await loadCommands(resolveComponentDirs(root, "commands", manifest.commands))
23 const skills = await loadSkills(resolveComponentDirs(root, "skills", manifest.skills))
24 const hooks = await loadHooks(root, manifest.hooks)
25
26 const mcpServers = await loadMcpServers(root, manifest)
27
28 return {
29 root,
30 manifest,
31 agents,
32 commands,
33 skills,
34 hooks,
35 mcpServers,
36 }
37}
38
39async function resolveClaudeRoot(inputPath: string): Promise<string> {
40 const absolute = path.resolve(inputPath)

Callers 11

runFunction · 0.90
runFunction · 0.90
runFunction · 0.90
converter.test.tsFile · 0.90
pi-writer.test.tsFile · 0.90

Calls 7

resolveClaudeRootFunction · 0.85
loadAgentsFunction · 0.85
resolveComponentDirsFunction · 0.85
loadCommandsFunction · 0.85
loadSkillsFunction · 0.85
loadHooksFunction · 0.85
loadMcpServersFunction · 0.85

Tested by

no test coverage detected