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

Function probeSeedCache

src/utils/plugins/pluginLoader.ts:196–210  ·  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

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