export declare const DEFAULT_SKILLS_HOST = "https://netlify-agent-skills.netlify.app"; export declare const SKILLS_HOST_ENV = "NETLIFY_SKILLS_HOST"; export declare const DEFAULT_SKILLS_DIRECTORY: string; export declare const AGENT_DIRECTORIES: readonly ['.claude', '.agents', '.grok']; export declare const LEFTOVER_DETAIL = "leftover from an interrupted install"; export interface SkillHistoryEntry { version: string | null; name?: string; tree_hash: string; } export interface ManifestSkill { name: string; status: 'active' | 'deprecated'; version: string | null; prior_names?: string[]; description?: string; tree_hash: string | null; files?: Record; executable?: string[]; history?: SkillHistoryEntry[]; deprecated?: { since: string; replaced_by?: string; }; } export interface SkillsManifest { schema_version: number; version: string; skills: ManifestSkill[]; } export type SkillRecord = { name: string; status: 'current'; version: string | null; } | { name: string; status: 'stale'; version: string | null; have: string | null; } | { name: string; status: 'modified'; version: string | null; } | { name: string; status: 'renamed'; currentName: string; modified: boolean; } | { name: string; status: 'deprecated'; replacedBy: string | null; modified: boolean; } | { name: string; status: 'unknown'; }; export interface SkillsClassification { skills: SkillRecord[]; missing: string[]; } export type SkillAction = 'current' | 'added' | 'updated' | 'reset' | 'renamed' | 'removed' | 'kept' | 'ignored' | 'failed'; export interface SkillActionRecord { name: string; action: SkillAction; detail?: string; } export interface SkillsSyncResult { directory: string; actions: SkillActionRecord[]; } export declare const resolveSkillsHost: (env?: NodeJS.ProcessEnv) => string; /** * What started a sync. It is sent in the user agent, so the skills host can tell syncs people ran * from automatic ones. */ export type SkillsTrigger = 'init' | 'refresh'; export interface FetchedManifest { manifest: SkillsManifest; etag: string | null; } /** * Fetches the manifest, sending `etag` as `If-None-Match` when given. Returns null when the * host answers 304, meaning the manifest is unchanged since the response that carried `etag`. */ export declare const fetchSkillsManifestIfChanged: (host: string, { etag, trigger }?: { etag?: string; trigger?: SkillsTrigger; }) => Promise; export declare const fetchSkillsManifest: (host: string) => Promise; export declare const hashSkillTree: (dir: string, declaredExecutable?: Set) => Promise; export declare const classifySkillsDirectory: (root: string, manifest: SkillsManifest) => Promise; export declare const installSkill: (host: string, dest: string, skill: ManifestSkill, { force, trigger }?: { force?: boolean; trigger?: SkillsTrigger; }) => Promise; /** * Brings `directory` in line with `manifest`. `shouldAdd` decides which active skills absent from * the directory get installed; by default all of them are. */ export declare const syncSkills: ({ host, directory, manifest, reset, shouldAdd, trigger, }: { host: string; directory: string; manifest: SkillsManifest; reset?: boolean; shouldAdd?: (skill: ManifestSkill) => boolean; trigger?: SkillsTrigger; }) => Promise; export declare const resolveSkillsDirectories: (workingDir: string, env?: NodeJS.ProcessEnv) => Promise; export declare const describeSync: ({ directory, actions }: SkillsSyncResult) => string; /** * Records a finished sync in the project's skills state, so a background refresh compares against * it. A skill joins the known skills only once it is installed in every one of `directories`, so a * later refresh still adds one that is missing anywhere. A null `etag` makes the next refresh * download the manifest again. Never throws. */ export declare const recordSync: (repositoryRoot: string, { manifest, directories, etag, notice, }: { manifest: SkillsManifest; directories: string[]; etag: string | null; notice?: SkillsSyncResult[]; }) => Promise; export interface AgentSkillsSetupSummary { installed: boolean; directories: string[]; skillsVersion?: string; summary: Record; error?: string; } export declare const setupAgentSkills: ({ workingDir, env, reset, }: { workingDir: string; env?: NodeJS.ProcessEnv; reset?: boolean; }) => Promise; //# sourceMappingURL=agent-skills.d.ts.map