/** * PEAC Samples Loader * * Loads sample definitions from specs/conformance/samples/ when available, * falling back to embedded defaults when running outside the repo. * * This ensures a single source of truth (specs folder is canonical). */ /** * Sample category */ export type SampleCategory = 'valid' | 'invalid' | 'edge'; /** * Valid sample: a current PEAC signed interaction record, expressed as the * inputs passed to issue(). Generation supplies privateKey and kid. Generated * output passes local verification (verifyLocal). */ export interface ValidSampleDefinition { id: string; name: string; description: string; category: 'valid'; format: 'issue-options'; /** Inputs for issue() (without privateKey/kid, which generation supplies). */ input: Record; } /** * Invalid / edge sample: a rejection fixture expressed as raw legacy claims * that are signed directly (not issued), so it can carry intentionally invalid * shapes that issue() would refuse to produce. */ export interface LegacySampleDefinition { id: string; name: string; description: string; category: 'invalid' | 'edge'; format: 'legacy-claims'; claims: Record; header?: Record; expectedError?: string; } /** * Sample definition (discriminated by category/format). */ export type SampleDefinition = ValidSampleDefinition | LegacySampleDefinition; /** * Find samples directory */ export declare function findSamplesDir(customPath?: string): string | null; /** * Get sample definitions. * * An explicit `customSamplesPath` is an authoritative source: it must exist, * and its contents are returned as-is (even if empty after skipping malformed * samples). It never falls back to embedded samples, so a malformed custom * catalog is not masked. With no custom path, the repo/package samples * directory is used when present; the embedded samples are a fallback only for * runtime environments where that directory is unavailable. */ export declare function getSamples(customSamplesPath?: string): SampleDefinition[]; /** * Get a specific sample by ID */ export declare function getSampleById(id: string, customSamplesPath?: string): SampleDefinition | null; /** * List available sample IDs by category */ export declare function listSampleIds(category?: SampleCategory, customSamplesPath?: string): string[]; //# sourceMappingURL=samples-loader.d.ts.map