(result: SkillsCheckResult)
| 241 | } |
| 242 | |
| 243 | function renderCheck(result: SkillsCheckResult): void { |
| 244 | const { summary } = result; |
| 245 | console.log(); |
| 246 | console.log(c.bold("hyperframes skills")); |
| 247 | console.log(); |
| 248 | |
| 249 | if (!result.location) { |
| 250 | console.log(` ${c.dim("No HyperFrames skills found in the usual locations.")}`); |
| 251 | console.log(` ${c.accent("Install: npx hyperframes skills")}`); |
| 252 | console.log(); |
| 253 | return; |
| 254 | } |
| 255 | |
| 256 | console.log(` ${c.bold("Location")} ${c.dim(result.location)} ${c.dim(`(${result.agent})`)}`); |
| 257 | console.log(); |
| 258 | |
| 259 | const parts = [c.success(`✓ ${summary.current} current`)]; |
| 260 | if (summary.outdated) parts.push(c.warn(`↑ ${summary.outdated} outdated`)); |
| 261 | if (summary.missing) parts.push(c.dim(`◦ ${summary.missing} not installed`)); |
| 262 | if (summary.removed) parts.push(c.warn(`✗ ${summary.removed} removed upstream`)); |
| 263 | console.log(` ${parts.join(" ")}`); |
| 264 | |
| 265 | printSkillSection(result, "outdated", "Outdated:", "↑", c.warn); |
| 266 | printSkillSection(result, "missing", "Not installed:", "◦", c.dim); |
| 267 | printSkillSection( |
| 268 | result, |
| 269 | "removed", |
| 270 | "Removed upstream (renamed or dropped — no longer published):", |
| 271 | "✗", |
| 272 | c.warn, |
| 273 | ); |
| 274 | |
| 275 | // Removed-detection cross-references the upstream skills lock. If that lock is |
| 276 | // absent where we expect it (e.g. upstream moved its path), removed-detection |
| 277 | // silently reports zero — so warn rather than imply a clean "up to date". |
| 278 | if (result.lockMissing) { |
| 279 | console.log(); |
| 280 | console.log( |
| 281 | ` ${c.warn(`! Skills lock not found — can't check for skills removed upstream.`)}`, |
| 282 | ); |
| 283 | console.log( |
| 284 | ` ${c.dim(` (lock paths verified against ${SKILLS_CLI_LOCK_PATHS_VERIFIED_AT})`)}`, |
| 285 | ); |
| 286 | } |
| 287 | |
| 288 | console.log(); |
| 289 | if (result.updateAvailable) { |
| 290 | console.log(` ${c.accent("Update: npx hyperframes skills update")}`); |
| 291 | } else { |
| 292 | console.log(` ${c.success("◇")} ${c.success("Installed skills are up to date")}`); |
| 293 | } |
| 294 | console.log(); |
| 295 | } |
| 296 | |
| 297 | const checkCommand = defineCommand({ |
| 298 | meta: { name: "check", description: "Check whether installed skills are the latest version" }, |
no test coverage detected