MCPcopy
hub / github.com/codeaashu/claude-code / probeSeedCache

Function probeSeedCache

src/utils/plugins/pluginLoader.ts:195–209  ·  view source on GitHub ↗

* Probe seed directories for a populated cache at this plugin version. * Seeds are checked in precedence order; first hit wins. Returns null if no * seed is configured or none contains a populated directory at this version.

(
  pluginId: string,
  version: string,
)

Source from the content-addressed store, hash-verified

193 * seed is configured or none contains a populated directory at this version.
194 */
195async function probeSeedCache(
196 pluginId: string,
197 version: string,
198): Promise<string | null> {
199 for (const seedDir of getPluginSeedDirs()) {
200 const seedPath = getVersionedCachePathIn(seedDir, pluginId, version)
201 try {
202 const entries = await readdir(seedPath)
203 if (entries.length > 0) return seedPath
204 } catch {
205 // Try next seed
206 }
207 }
208 return null
209}
210
211/**
212 * When the computed version is 'unknown', probe seed/cache/<m>/<p>/ for an

Callers 2

Calls 3

getPluginSeedDirsFunction · 0.85
getVersionedCachePathInFunction · 0.85
readdirFunction · 0.85

Tested by

no test coverage detected