export declare const MANAGED_STATE_FILE = ".state.json"; export interface ManagedEntry { /** The definition this skill serves (src/definitions.ts). */ sha256: string; installed_at: string; /** Who asked (the cloud command's requester, `sync`, `adopt`). */ by?: string; /** A person accepted `auth: none` for this skill. */ allow_unauthenticated?: boolean; /** Earlier definitions still on disk, newest first (at most two). */ previous?: string[]; /** For a skill adopted from `/skills`: where its old directory was kept. */ adopted_from?: string; } export interface ManagedState { version: 1; skills: Record; } export declare function managedStateFile(dir: string): string; /** The directory a version's SKILL.md lives in (its basename is the skill's name, as a SKILL.md requires). */ export declare function managedSkillDir(dir: string, name: string, sha256: string): string; /** The state, or an empty one when the file is missing or unreadable (a broken file never takes every skill down). */ export declare function readManagedState(dir: string): ManagedState; /** Writes the state atomically (a temporary file renamed into place). */ export declare function writeManagedState(dir: string, state: ManagedState): void; /** The state, re-read only when the file's mtime changed (what the registry calls on every lookup). */ export declare function managedStateReader(dir: string): () => ManagedState;