import type { RuntimeContext } from '../types/runtime.js'; import type { TypeStructure, RillValue, RillStream } from '../types/structures.js'; import type { StreamChannel } from './invocation/stream-closures.js'; import type { CallableInvocationStrategy } from './invocation/callable-strategy.js'; /** * EvalState — the shared evaluation state threaded through all module-level * eval functions. * * Concrete data shape (no methods): `ctx` plus the per-context mutable * fields formerly held on the composed Evaluator instance. */ export interface EvalState { ctx: RuntimeContext; activeStreamChannel: (StreamChannel & { readonly resolution: RillValue; }) | null; activeStreamChunkType: TypeStructure | null; streamScopeStack: RillStream[][]; invocationStrategy: CallableInvocationStrategy | undefined; } /** * Get or create the EvalState for a given RuntimeContext. * * EvalState instances are cached per context to avoid recreating the same * state multiple times during script execution. * * @param ctx - The runtime context * @returns EvalState (cached or newly created) * * @internal — not exported from packages/core/src/index.ts. */ export declare function getEvalState(ctx: RuntimeContext): EvalState;