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

Function cleanupRemovedExtensions

src/targets/pi.ts:369–381  ·  view source on GitHub ↗
(
  extensionsDir: string,
  manifest: PiInstallManifest | null,
  currentExtensions: string[],
)

Source from the content-addressed store, hash-verified

367}
368
369async function cleanupRemovedExtensions(
370 extensionsDir: string,
371 manifest: PiInstallManifest | null,
372 currentExtensions: string[],
373): Promise<void> {
374 if (!manifest) return
375 const current = new Set(currentExtensions)
376 for (const extensionFile of manifest.extensions) {
377 if (current.has(extensionFile)) continue
378 if (!isSafeManagedPath(extensionsDir, extensionFile)) continue
379 await fs.rm(path.join(extensionsDir, extensionFile), { force: true })
380 }
381}
382
383async function cleanupRemovedAgents(
384 agentsDir: string,

Callers 1

writePiBundleFunction · 0.85

Calls 1

isSafeManagedPathFunction · 0.90

Tested by

no test coverage detected