import type { SkillContent } from '../../common/interfaces'; /** * Components of a skill hash, useful for debugging and partial updates. */ export interface SkillHashComponents { /** * SHA-256 hash of the instructions only. */ instructionsHash: string; /** * SHA-256 hash of the tools array (sorted by name). */ toolsHash: string; /** * SHA-256 hash of metadata (id, name, description). */ metadataHash: string; /** * Combined hash of all components. */ combinedHash: string; } /** * Compute a deterministic SHA-256 hash of a skill's content. * Used for change detection during sync operations. * * @param skill - The skill content to hash * @returns Hexadecimal SHA-256 hash string * * @example * ```typescript * const hash1 = computeSkillHash(skill); * // ... modify skill ... * const hash2 = computeSkillHash(skill); * if (hash1 !== hash2) { * // Skill content changed, need to sync * } * ``` */ export declare function computeSkillHash(skill: SkillContent): string; /** * Compute detailed hash components for a skill. * Useful for understanding what changed between versions. * * @param skill - The skill content to hash * @returns Individual hash components and combined hash * * @example * ```typescript * const components = computeSkillHashComponents(skill); * if (components.instructionsHash !== prevComponents.instructionsHash) { * console.log('Instructions changed'); * } * ``` */ export declare function computeSkillHashComponents(skill: SkillContent): SkillHashComponents; /** * Compare two skills for content equality using their hashes. * * @param skill1 - First skill * @param skill2 - Second skill * @returns True if skills have identical content */ export declare function areSkillsEqual(skill1: SkillContent, skill2: SkillContent): boolean; //# sourceMappingURL=skill-hash.d.ts.map