import type { MEMOConfig } from '../model/config.js'; import { type IrIdentityIndex } from '../model/ir-identity.js'; import type { Diagnostic } from '../toolchain/diagnostic.js'; import type { MemoIr } from '../toolchain/protocol.js'; import { type ElementWriteRequest, type ElementWriteResult } from '../server/persistor.js'; export interface AuthoringContext { projectDir: string; /** Project settings; loaded from the project when the caller has none. */ config?: MEMOConfig; /** Identity index of the revision the caller's request was built against. */ irIndex?: IrIdentityIndex; } /** What a recompile produced, in the shape every write-back returns it. */ export interface RecompiledRevision { ir: MemoIr; index: IrIdentityIndex; diagnostics: Diagnostic[]; /** The provider that answered, so the caller can report which one ran. */ provider: string; } /** * Recompile the project through the selected lowering provider. * * Exported on its own because "what does the model look like now" is a question * the CLI asks too, not only the thing that happens after a write. */ export declare function recompileProject(context: AuthoringContext): Promise; export interface ElementWriteBackResult extends ElementWriteResult { /** The revision the write produced, absent when nothing was written. */ revision?: RecompiledRevision; } /** * Write one element and recompile. * * A failed write does not recompile: there is nothing new to compile, and * running the provider anyway would charge every rejected edit the cost of a * full lowering. */ export declare function writeElement(context: AuthoringContext, element: ElementWriteRequest): Promise; //# sourceMappingURL=authoring.d.ts.map