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

Function moveLegacySkillIfOwned

src/commands/cleanup.ts:600–613  ·  view source on GitHub ↗
(
  managedDir: string,
  kind: string,
  artifactRoot: string,
  relativePath: string,
  label: string,
)

Source from the content-addressed store, hash-verified

598}
599
600async function moveLegacySkillIfOwned(
601 managedDir: string,
602 kind: string,
603 artifactRoot: string,
604 relativePath: string,
605 label: string,
606): Promise<number> {
607 if (!isSafeManagedPath(artifactRoot, relativePath)) return 0
608 const artifactPath = path.join(artifactRoot, ...relativePath.split("/"))
609 if (!(await pathExists(artifactPath))) return 0
610 if (!(await isLegacySkillArtifactOwned(artifactPath, path.basename(relativePath)))) return 0
611 await moveLegacyArtifactToBackup(managedDir, kind, artifactRoot, relativePath, label)
612 return 1
613}
614
615async function moveLegacyAgentIfOwned(
616 managedDir: string,

Callers 8

cleanupCodexFunction · 0.85
cleanupOpenCodeFunction · 0.85
cleanupPiFunction · 0.85
cleanupKiroFunction · 0.85
cleanupCopilotFunction · 0.85
cleanupDroidFunction · 0.85
cleanupQwenFunction · 0.85
cleanupWindsurfFunction · 0.85

Calls 4

isSafeManagedPathFunction · 0.90
pathExistsFunction · 0.90

Tested by

no test coverage detected