/** * Built-in skill stores + the storage-config factory. * * First-party backends: in-process memory (tests, embedded), filesystem * (curator-style JSON alongside Claude-skills-style markdown — `.md` * or `/SKILL.md` with YAML frontmatter), S3 (skillStoreS3.ts, optional * @aws-sdk/client-s3 peer), and Redis (skillStoreRedis.ts, pooled core * client). Anything else plugs in via `{ type: "custom", store }`. */ import type { SkillDefinition, SkillIndexItem, SkillStore, SkillsStorageConfig } from "../types/index.js"; /** In-process store backed by a Map. */ export declare class InMemorySkillStore implements SkillStore { private skills; /** skill id → relative path → content. */ private resources; constructor(seed?: SkillDefinition[], resources?: Record>); get(id: string): Promise; put(skill: SkillDefinition): Promise; delete(id: string): Promise; index(): Promise; getResource(id: string, resourcePath: string): Promise; } /** * Directory-backed store. Read layouts: * - `/.json` — JSON SkillDefinition (mutable) * - `/.md` — frontmatter markdown (read-only source) * - `//SKILL.md` — Claude-skills directory layout (read-only source); * sibling files become on-demand resources (read_skill_resource) * Mutations always write `.json`; a JSON file shadows a markdown skill * with the same id, so updating a markdown-sourced skill "copies up" to JSON. */ export declare class FileSystemSkillStore implements SkillStore { private readonly baseDir; private cache; /** skill id → directory, for skills loaded from the SKILL.md layout. */ private skillDirs; constructor(baseDir: string); invalidate(): void; get(id: string): Promise; /** * Resources exist only for directory-layout skills (`/SKILL.md`) — * every sibling file of SKILL.md is addressable by its relative path. * The REAL path must stay inside the skill directory: lexical * containment alone would follow a symlink planted inside the skill dir * to anywhere on the host. */ getResource(id: string, resourcePath: string): Promise; put(skill: SkillDefinition): Promise; delete(id: string): Promise; index(): Promise; /** * Scan the directory into an id→skill map. Markdown sources load first * so JSON files (the mutable layer) shadow them on id collision. */ private load; } /** Resolve a storage config to a concrete store. Defaults to memory. */ export declare function createSkillStore(config?: SkillsStorageConfig): SkillStore;