MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / probeSeedCache

Function probeSeedCache

source code/utils/plugins/pluginLoader.ts:197–211  ·  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

195 * seed is configured or none contains a populated directory at this version.
196 */
197async function probeSeedCache(
198 pluginId: string,
199 version: string,
200): Promise<string | null> {
201 for (const seedDir of getPluginSeedDirs()) {
202 const seedPath = getVersionedCachePathIn(seedDir, pluginId, version)
203 try {
204 const entries = await readdir(seedPath)
205 if (entries.length > 0) return seedPath
206 } catch {
207 // Try next seed
208 }
209 }
210 return null
211}
212
213/**
214 * 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