(md: string)
| 40 | /** Hash of the skill's CONTENT, excluding the auto-eval section — so writing an eval |
| 41 | * result doesn't change the hash, but editing the skill body does. */ |
| 42 | export function skillContentHash(md: string): string { |
| 43 | const withoutEval = stripEvalSection(md); |
| 44 | return createHash('sha1').update(withoutEval.trim()).digest('hex').slice(0, 12); |
| 45 | } |
| 46 | |
| 47 | function stripEvalSection(md: string): string { |
| 48 | // Remove from "## Auto-evaluation" up to the next "## " heading or EOF. |
no test coverage detected