MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / refreshSkillsCache

Function refreshSkillsCache

packages/cli/src/utils/skillsUpdateCheck.ts:37–53  ·  view source on GitHub ↗

Run the real check and persist the result to the cache.

()

Source from the content-addressed store, hash-verified

35
36/** Run the real check and persist the result to the cache. */
37async function refreshSkillsCache(): Promise<SkillsUpdateMeta> {
38 const result = await checkSkills();
39 // Only record a meaningful check when skills were actually found.
40 if (result.location) {
41 const config = readConfig();
42 config.lastSkillsCheck = new Date().toISOString();
43 config.skillsUpdateAvailable = result.updateAvailable;
44 config.skillsOutdatedCount = result.summary.outdated;
45 config.skillsMissingCount = result.summary.missing;
46 writeConfig(config);
47 }
48 return {
49 updateAvailable: result.updateAvailable,
50 outdated: result.summary.outdated,
51 missing: result.summary.missing,
52 };
53}
54
55/**
56 * Refresh the skills freshness cache if it is older than 24h. Best-effort:

Callers 1

checkSkillsForUpdateFunction · 0.85

Calls 3

checkSkillsFunction · 0.85
readConfigFunction · 0.85
writeConfigFunction · 0.85

Tested by

no test coverage detected