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

Function cleanupRemovedPrompts

src/targets/pi.ts:355–367  ·  view source on GitHub ↗
(
  promptsDir: string,
  manifest: PiInstallManifest | null,
  currentPrompts: string[],
)

Source from the content-addressed store, hash-verified

353}
354
355async function cleanupRemovedPrompts(
356 promptsDir: string,
357 manifest: PiInstallManifest | null,
358 currentPrompts: string[],
359): Promise<void> {
360 if (!manifest) return
361 const current = new Set(currentPrompts)
362 for (const promptFile of manifest.prompts) {
363 if (current.has(promptFile)) continue
364 if (!isSafeManagedPath(promptsDir, promptFile)) continue
365 await fs.rm(path.join(promptsDir, promptFile), { force: true })
366 }
367}
368
369async function cleanupRemovedExtensions(
370 extensionsDir: string,

Callers 1

writePiBundleFunction · 0.70

Calls 1

isSafeManagedPathFunction · 0.90

Tested by

no test coverage detected