/** * @manifesto-ai/compiler * * MEL (Manifesto Expression Language) compiler. * Provides lexer, parser, analyzer, lowering, evaluation, and rendering. */ export * from "./lexer/index.js"; export * from "./parser/index.js"; export * from "./analyzer/index.js"; export * from "./diagnostics/index.js"; export * from "./generator/index.js"; export { renderTypeExpr, renderTypeField, renderValue, renderExprNode, renderPatchOp, extractTypeName, renderFragment, renderFragments, renderFragmentsByKind, renderAsDomain, type TypeExpr, type TypeField, type ExprNode as RendererExprNode, type PatchOp, type AddTypeOp, type AddFieldOp, type SetFieldTypeOp, type SetDefaultValueOp, type AddConstraintOp, type AddComputedOp, type AddActionAvailableOp, type RenderOptions, type PatchFragment, type FragmentRenderOptions, } from "./renderer/index.js"; export type { AllowedSysPrefix, ExprLoweringContext, PatchLoweringContext, LoweringErrorCode, MelPrimitive, MelPathSegment, MelPathNode, MelSystemPath, MelObjField, MelExprNode, MelTypeExpr, MelTypeField, MelPatchOp, MelPatchFragment, LoweredTypeExpr, LoweredTypeField, LoweredPatchOp, SchemaConditionalPatchOp, /** @deprecated Use SchemaConditionalPatchOp */ ConditionalPatchOp, } from "./lowering/index.js"; export { DEFAULT_SCHEMA_CONTEXT, DEFAULT_ACTION_CONTEXT, DEFAULT_DISPATCHABLE_CONTEXT, EFFECT_ARGS_CONTEXT, DEFAULT_PATCH_CONTEXT, LoweringError, invalidKindForContext, unknownCallFn, invalidSysPath, unsupportedBase, invalidShape, unknownNodeKind, lowerExprNode, lowerPatchFragments, } from "./lowering/index.js"; export * from "./api/index.js"; export * from "./annotations.js"; export * from "./schema-graph.js"; import type { ParseResult } from "./parser/index.js"; import { type DomainSchema } from "./generator/index.js"; import type { CompileTrace } from "./api/index.js"; import type { Diagnostic } from "./diagnostics/types.js"; export interface CompileOptions { /** Whether to lower system values during compilation */ lowerSystemValues?: boolean; /** Skip scope/semantic validation */ skipSemanticAnalysis?: boolean; /** Backward-compatible passthrough for legacy callers */ mode?: "domain"; } export interface CompileResult { schema: DomainSchema | null; trace: CompileTrace[]; warnings: Diagnostic[]; errors: Diagnostic[]; success: boolean; } /** * Backward-compatible compile API. * * Current public API is `compileMelDomain`, but several test/code paths and CLI * still call this legacy helper. * * This wrapper keeps the legacy contract: * - returns `{ success }` * - supports optional `lowerSystemValues` and `skipSemanticAnalysis` * - includes parse/analyze/generate diagnostics in one result */ export declare function compile(source: string, options?: CompileOptions): CompileResult; /** * Backward-compatible token+parse helper. */ export declare function parseSource(source: string): ParseResult; /** * Backward-compatible check helper. */ export declare function check(source: string): Diagnostic[];