( managedDir: string, kind: string, artifactRoot: string, relativePath: string, label: string, )
| 598 | } |
| 599 | |
| 600 | async 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 | |
| 615 | async function moveLegacyAgentIfOwned( |
| 616 | managedDir: string, |
no test coverage detected