/** * Skill types — shape chung cho mọi nguồn (manual / npm / builtin, project / global). */ /** Nguồn skill, dùng để hiển thị + tính precedence khi trùng tên. */ export type SkillSource = 'project-manual' | 'global-manual'; /** Precedence cao → thắng khi trùng skill name (giống CSS specificity). */ export declare const SOURCE_PRIORITY: Record; /** Metadata gọn — chỉ tên + mô tả, dùng để inject vào system prompt cloud agent. */ export interface SkillMeta { /** Tên skill duy nhất (kebab-case). */ name: string; /** Mô tả trigger — Claude/cloud dùng để quyết định có invoke không. */ description: string; /** Semver, optional. */ version?: string; /** Đường dẫn tuyệt đối tới thư mục chứa SKILL.md. */ path: string; /** Đường dẫn tuyệt đối tới SKILL.md. */ skillMdPath: string; /** Nguồn skill. */ source: SkillSource; /** Tên npm package nếu source là npm. */ packageName?: string; } /** Full skill — meta + body markdown + danh sách resource. */ export interface Skill extends SkillMeta { /** Markdown body (đã strip frontmatter). */ body: string; /** Files trong references/, examples/, scripts/, assets/ (relative path). */ resources: SkillResource[]; } export interface SkillResource { /** Kind = thư mục cha (references | examples | scripts | assets). */ kind: 'references' | 'examples' | 'scripts' | 'assets'; /** Đường dẫn relative tới skill root. */ relativePath: string; /** Đường dẫn tuyệt đối. */ absolutePath: string; /** Size in bytes. */ size: number; }