import type { PromptEntry } from '../types/prompt.js'; import type { WstackPaths } from '../utils/wstack-paths.js'; export type { PromptEntry, PromptSource, PromptVariable } from '../types/prompt.js'; export interface PromptStore { list(): Promise; get(id: string): Promise; save(entry: PromptEntry): Promise; delete(id: string): Promise; find(query: string): Promise; } /** sha256 of a prompt's content — used for builtin/synced integrity checks. */ export declare function promptChecksum(content: string): string; /** * Upgrade any persisted prompt record (v1 or v2) to a fully-populated v2 * `PromptEntry`. Pure — does not touch disk. v1 records (only * `id/title/content/tags/createdAt/updatedAt`) get sensible defaults: * slug from title, empty description, `uncategorized` category, `user` source. */ export declare function migratePromptEntry(raw: unknown): PromptEntry | null; /** * DefaultPromptStore — file-per-prompt JSON in a single directory (the global * the active profile's `prompts` directory by default, or a layer dir the loader passes in). * Reads tolerate legacy v1 files via `migratePromptEntry`; writes always emit * the current v2 schema. */ export declare class DefaultPromptStore implements PromptStore { private readonly dir; constructor(pathsOrDir: WstackPaths | string); list(): Promise; get(id: string): Promise; save(entry: PromptEntry): Promise; delete(id: string): Promise; find(query: string): Promise; /** Create a new v2 entry and return it. Does NOT persist — call save() afterwards. */ createNew(title: string, content: string, tags?: string[], extra?: Partial>): PromptEntry; } //# sourceMappingURL=prompt-store.d.ts.map