@promptsnap/config
v0.2.0
Published
Shared Zod schemas for PromptSnap (snapshot format, judge output, user config).
Downloads
23
Readme
@promptsnap/config
Zod schema and helpers for promptsnap.config.ts.
Usage
import { defineConfig } from '@promptsnap/config';
export default defineConfig({
snapshotsDir: '__llm_snapshots__',
cacheDir: 'node_modules/.cache/promptsnap',
ignore: ['tone-only', 'whitespace'],
criticalClaims: [],
embeddingProvider: 'openai',
embeddingModel: 'text-embedding-3-small',
embeddingThreshold: 0.97,
judgeProvider: 'anthropic',
judgeModel: 'claude-3-5-haiku-20241022',
maxJudgeCalls: 50,
judgeConcurrency: 4,
redactPaths: [],
failOn: ['changed'],
});Schema reference
| Field | Type | Default | Description |
|---|---|---|---|
| snapshotsDir | string | __llm_snapshots__ | Where baselines are stored |
| cacheDir | string | node_modules/.cache/promptsnap | Disk cache for judge calls |
| ignore | IgnoreCategory[] | [] | Change types to treat as equivalent |
| criticalClaims | string[] | [] | Tokens that force changed verdict |
| embeddingThreshold | number | 0.97 | Cosine similarity cutoff |
| judgeProvider | anthropic\|openai\|null | null | LLM judge backend |
| judgeModel | string | '' | Model name for judge |
| maxJudgeCalls | number | 50 | Per-run judge call budget |
| judgeConcurrency | number | 4 | Parallel judge calls |
| redactPaths | string[] | [] | JSON paths redacted before hashing |
| failOn | Verdict[] | ['changed'] | Verdicts that fail the run |
