EngineSnapshot
Defined in: packages/engine/src/engine/EngineSnapshot.ts:165
A complete, JSON-safe snapshot of an engine’s session state.
Produced by ExpressionEngine.toJSON and consumed by
ExpressionEngine.fromJSON. Safe to JSON.stringify, store, and
JSON.parse back into fromJSON.
Properties
Section titled “Properties”bytecodeCache
Section titled “bytecodeCache”bytecodeCache: { expression: string; program: SerializedBytecode;}[];Defined in: packages/engine/src/engine/EngineSnapshot.ts:181
The expression-keyed bytecode cache, a pure recompilation cache, carried so a warm start skips re-parsing unchanged expressions.
expression
Section titled “expression”expression: string;program
Section titled “program”program: SerializedBytecode;engineVersion
Section titled “engineVersion”engineVersion: string;Defined in: packages/engine/src/engine/EngineSnapshot.ts:171
The engine’s semver at write time, for diagnostics and forward compatibility decisions. Not itself a gate.
format
Section titled “format”format: "solve-engine/snapshot";Defined in: packages/engine/src/engine/EngineSnapshot.ts:167
Always SNAPSHOT_FORMAT. Identifies the object as a snapshot before anything reads deeper.
lineCache
Section titled “lineCache”lineCache: SerializedLineCacheEntry[];Defined in: packages/engine/src/engine/EngineSnapshot.ts:179
Cached lines, minus any backed by an async resolver.
locale
Section titled “locale”locale: string;Defined in: packages/engine/src/engine/EngineSnapshot.ts:173
The locale the snapshot was taken under, so fromJSON can rebuild a matching lexer when the caller does not override it.
userFunctions
Section titled “userFunctions”userFunctions: SerializedUserFunction[];Defined in: packages/engine/src/engine/EngineSnapshot.ts:177
User-defined functions (f(x) = ...).
variables
Section titled “variables”variables: Record<string, SerializedValue>;Defined in: packages/engine/src/engine/EngineSnapshot.ts:175
Named variables, by name. Async-backed and in-flight variables are omitted (see the module doc).
version
Section titled “version”version: number;Defined in: packages/engine/src/engine/EngineSnapshot.ts:169
The serialised-shape version, SNAPSHOT_VERSION at write time. fromJSON refuses any other value.