/** * Persistent state store for the skills manager. * Mirrors src/runtime/auto-update/state-store.ts in structure and behaviour. */ import type { LoggerLike, SkillsManagerState } from "./types.js"; /** * Reads and writes {@link SkillsManagerState} to a JSON file so that * per-skill version tracking and notification dedup survive gateway restarts. */ export declare class SkillsManagerStateStore { private readonly stateDir; /** * Skills directory search path. Single-string form is accepted for * backward compat with legacy callers; arrays follow the standard * "primary first, mirrors after" convention. */ private readonly skillsDir; private readonly logger?; private readonly filePath; constructor(stateDir: string, /** * Skills directory search path. Single-string form is accepted for * backward compat with legacy callers; arrays follow the standard * "primary first, mirrors after" convention. */ skillsDir: string | readonly string[], logger?: LoggerLike | undefined); /** All configured dirs as an array, regardless of how the constructor was called. */ private get skillsDirs(); /** * Load persisted state, falling back to defaults when the file is absent * (first run) or unreadable / corrupt. * * On first run (ENOENT), discovers any skills already installed in * `skillsDir` and pre-populates default state entries for them so the * first tick has something to work with. */ load(): Promise; /** Atomically write state; creates the directory if it does not exist. */ save(state: SkillsManagerState): Promise; /** * Called on first run (no state file yet). Walks every dir in the * `skillsDir` search path and creates a default {@link SkillState} entry * for each installed skill so the first poll tick starts with a populated * state rather than an empty map. * * Multi-dir semantics: dirs are scanned in order; the first dir containing * a given skill name wins. This matches the read priority used elsewhere * (`readLocalVersion`, bootstrap pre-check) — the primary dir's view of a * skill is canonical, secondary mirrors are fallbacks only. * * Per-dir ENOENT is silent (dir does not exist yet); any other I/O error * is logged as a warning and the scan continues into the next dir, so one * misconfigured mirror cannot wipe the whole initial state. */ private buildInitialState; } //# sourceMappingURL=state-store.d.ts.map