(plugin: Awaited<ReturnType<typeof loadClaudePlugin>>, piRoot: string)
| 392 | } |
| 393 | |
| 394 | async function cleanupPi(plugin: Awaited<ReturnType<typeof loadClaudePlugin>>, piRoot: string): Promise<CleanupResult> { |
| 395 | const bundle = convertClaudeToPi(plugin, { |
| 396 | agentMode: "subagent", |
| 397 | inferTemperature: true, |
| 398 | permissions: "none", |
| 399 | }) |
| 400 | const artifacts = getLegacyPiArtifacts(bundle) |
| 401 | const managedDir = path.join(piRoot, "compound-engineering") |
| 402 | let moved = 0 |
| 403 | for (const skillName of artifacts.skills) { |
| 404 | moved += await moveLegacySkillIfOwned(managedDir, "skills", path.join(piRoot, "skills"), skillName, "Pi") |
| 405 | } |
| 406 | for (const promptFile of artifacts.prompts) { |
| 407 | moved += await moveIfExists(managedDir, "prompts", path.join(piRoot, "prompts"), promptFile, "Pi") |
| 408 | } |
| 409 | for (const agentPath of artifacts.agents ?? []) { |
| 410 | moved += await moveLegacyAgentIfOwned(managedDir, "agents", path.join(piRoot, "agents"), agentPath, "Pi", ".md") |
| 411 | } |
| 412 | return { target: "pi", root: piRoot, moved } |
| 413 | } |
| 414 | |
| 415 | async function cleanupKiro(plugin: Awaited<ReturnType<typeof loadClaudePlugin>>, kiroRoot: string): Promise<CleanupResult> { |
| 416 | const bundle = convertClaudeToKiro(plugin, { |
no test coverage detected