/**
 * Schema loader — parses every `platform/plugins/memory/references/schema-*.md`
 * file at server startup and returns a structured LoadedSchema that the
 * validator consults on every write.
 *
 * Design decisions (see Task 197):
 *
 * - Header-keyed table parsing. The base schema has 5 columns
 *   (Entity | Neo4j Label | Schema.org Type | Interchange Standard |
 *   Required Properties) while vertical schemas have 4 columns (no
 *   Interchange Standard). We resolve "Neo4j Label" and "Required Properties"
 *   by header name, never by index.
 *
 * - Parenthetical annotations in the Required Properties column are type /
 *   enum / policy hints, not property names:
 *       customer (id)                 -> "customer"
 *       listingType (sale/let)        -> "listingType"
 *       status (scope must be `admin`) -> "status"
 *   We strip the first `(...)` suffix and its contents from every comma-split
 *   token before emitting the property name.
 *
 * - Disjunctions in the Required Properties column use the literal word `or`:
 *       `email` or `telephone`        -> ["email", "telephone"] (any-of)
 *   We split on `\s+or\s+` per token (not per cell) so that a row like
 *   "accountId, email or telephone" yields two groups: one simple, one any-of.
 *
 * - Inheritance sentinel. estate-agent's Applicant and hospitality's
 *   GuestProfile use the literal phrase "Base Person properties + …" in the
 *   required-properties column. A second pass resolves these by merging the
 *   referenced parent label's groups.
 *
 * - Property naming rules (schema-base.md only). The `| Correct | Wrong |`
 *   table yields a `wrongToCorrect` map. Rows whose wrong-column contains
 *   "(on" are context-dependent (e.g. `status` is wrong on Order but valid
 *   on Task/Lead) and are skipped to avoid false positives. A future
 *   per-label synonym system could reintroduce them.
 *
 * Failures throw. A memory server running with a half-parsed schema is
 * worse than one that fails to start.
 */
/** A single required-property rule for a label. */
export type RequiredGroup = {
    kind: "simple";
    name: string;
} | {
    kind: "any-of";
    names: string[];
};
export interface LabelDefinition {
    /** Neo4j label (the string the agent puts in `labels`) */
    label: string;
    /** Required-property groups. Every group must be satisfied. */
    required: RequiredGroup[];
    /** Source file that declared this label (for error messages) */
    sourceFile: string;
    /**
     * Raw inheritance sentinel, if the cell was "Base X properties + extras".
     * Consumed and cleared during the second pass.
     */
    inheritsFrom?: string;
}
export interface LoadedSchema {
    /** label string -> definition */
    labels: Map<string, LabelDefinition>;
    /** wrong property name -> correct property name (from schema-base.md only) */
    wrongToCorrect: Map<string, {
        correct: string;
        sourceFile: string;
    }>;
    /** Absolute paths of every schema file that was read */
    sourceFiles: string[];
}
/**
 * Load every `schema-*.md` file from the memory plugin's references directory.
 *
 * The directory is resolved relative to this source file, matching the
 * pattern used by neo4j.ts for config paths. Both src/ and dist/ locations
 * end up four hops above the references directory
 * (src/lib/schema-loader.ts -> src/ -> mcp/ -> memory/ -> references/).
 */
export declare function loadSchema(): LoadedSchema;
//# sourceMappingURL=schema-loader.d.ts.map