type RuntimeAllocationState = { ordinal: number; }; /** * Evaluation Context Types * * Defines context for expression evaluation. * * @see SPEC v0.4.0 §18.3 */ /** * Minimal snapshot shape for evaluation. * * @see SPEC v0.4.0 §18.7 */ export interface EvaluationSnapshot { /** * Domain state (matches StateSpec). * Path resolution default target. */ state: unknown; /** * Computed values (matches ComputedSpec). * Accessed via bare key paths (e.g., "total", not "computed.total"). */ computed: Record; } /** * Legacy evaluator metadata. * * @see SPEC v0.4.0 §18.3 */ export interface EvaluationMeta { /** * Intent identifier. */ intentId: string; /** * Actor reference (optional). */ actor?: { type: string; id: string; }; /** * Timestamp (optional). */ timestamp?: number; } /** * Evaluation context. * * @see SPEC v0.4.0 §18.3 */ export interface EvaluationContext { /** * Current snapshot for state lookups. * Paths resolve to snapshot.state.* by default. */ snapshot: EvaluationSnapshot; /** * Legacy metadata retained for older call sites. MEL v5 runtime reads must * enter through explicit `$runtime.*` and `$context.*` inputs. */ meta: EvaluationMeta; /** * Intent input. * Paths starting with "input.*" resolve here. */ input: Record; /** * Current $item value (for effect.args evaluation). * Paths starting with "$item.*" resolve here. */ item?: unknown; /** * Bound transition runtime facts for `$runtime.*` reads. */ runtime?: { intent?: { id?: string; action?: string; }; time?: { timestamp?: number; iso?: string; }; random?: { seed?: string; }; }; /** * Direct-injected external context for `$context.*` reads. */ context?: Record; } /** * Create a minimal evaluation context. * * @param options - Context options * @returns Evaluation context */ export declare function createEvaluationContext(options: Partial & { meta: EvaluationMeta; }): EvaluationContext; export declare function getRuntimeAllocationState(ctx: EvaluationContext): RuntimeAllocationState; export declare function inheritRuntimeAllocationState(parent: EvaluationContext, child: EvaluationContext): EvaluationContext; /** * Create a working snapshot by cloning and applying a patch. * * Used for sequential evaluation semantics. * * @see FDR-MEL-070 */ export declare function applyPatchToWorkingSnapshot(snapshot: EvaluationSnapshot, path: string, value: unknown): EvaluationSnapshot; export {};