import type { PromptHistoryEntry, PromptLabel, PromptStore, PromptVersion } from '../types/prompts.js'; /** * Prompts as files in a directory: one reviewable JSON file per version and per label, and one * history log per prompt. * * Meant to live in version control beside the code that uses the prompts, so a prompt change is a * diff in a pull request like any other. Writes go through a temporary file and a rename, so a reader * never sees half a file. Label compare-and-set is checked before writing, which protects one process * against itself; several processes promoting the same label at once need the Redis or Postgres store. * * Layout: `//versions/.json`, `/labels/