/** * hmem v2 — generic, prefix-agnostic schema engine. * * v1 hardcoded the P-entry schema in several code paths (E0150). Here a schema is * just `config.schemas[prefix]`, and validation/scaffolding run the SAME code for * every prefix — P, E, or a user-defined A from `hmem.config.json`. A prefix with * no configured schema is unrestricted (any sections allowed). * * Section matching mirrors v1 `hmem-store.ts:445`: a candidate section is valid if * its first token (split on — - :) starts with an allowed section name, so titles * like "Reproduction — exact steps" still match the "Reproduction" section. */ import type { HmemConfig, EntrySchema } from '../config/config.js'; import type { Prefix, ValidationResult } from './types.js'; export interface SchemaEngine { getSchema(prefix: Prefix): EntrySchema | undefined; validateSchema(prefix: Prefix, sections: unknown): ValidationResult; scaffoldSections(prefix: Prefix): string[]; } export declare function createSchemaEngine(config: HmemConfig): SchemaEngine;