import { type BuilderRegistries } from '../model/builder.js'; import { type ParseError } from '../model/semantic.js'; import type { MEMOConfig } from '../model/config.js'; import { type MemoIr } from './protocol.js'; /** * The project's effective settings. * * Settings are optional — a project with none is complete, because a MEMO * project declares its identity in SysML, not in YAML. */ export declare function loadProjectConfig(projectDir: string): MEMOConfig; /** * The ontology registries the builder resolves kinds against. * * A project that cannot load them still lowers, with reduced kind resolution — * §1.1 again: the compiler reports what is wrong, it does not refuse to work. */ export declare function loadBuilderRegistries(projectDir: string): Promise; export interface LoweringOptions { /** * Ontology registries the caller has already loaded. See `ProviderContext`. */ registries?: BuilderRegistries; /** * The exact sources to read, instead of the directory's own discovery. * * Absolute paths, and never a project's normal input: a project is defined * by what is in it. It exists for callers whose subject is a *file set* * rather than a project — conformance runs a corpus unit whose Kernel * libraries are `.kerml`, which the project walker does not collect, and a * run that silently analysed none of them would report a clean pass on * files it never opened. */ files?: readonly string[]; } /** * The sources a run reads: the caller's explicit list, or the project's own. * * Sorted either way, because "both transports are byte-identical" only holds * against an input order that does not depend on who built the list. */ export declare function resolveSources(root: string, files?: readonly string[]): string[]; /** * Lower a project to IR. * * Everything here is deterministic given the file contents: file discovery is * sorted, element identity is content-hashed, and the payload is plain JSON. It * has to be — "both transports are byte-identical" is only a meaningful test * against a function whose output does not depend on which process ran it. */ export declare function lowerProject(projectDir: string, options?: LoweringOptions): Promise; /** * Parse without building — what `check` needs and nothing more. * * The validator role asks a narrower question than lowering does, and paying * for a full model build to answer it would make `memo validate` slower for no * reason. */ export declare function checkProject(projectDir: string, files?: readonly string[]): Promise<{ accepted: boolean; parseErrors: ParseError[]; }>; //# sourceMappingURL=lowering.d.ts.map