Skip to content

oracular / EngineState

Interface: EngineState ​

Defined in: types.ts:224

The whole engine state: plain JSON with no functions, class instances or hidden fields. Persist it with serialize, restore it with deserialize.

Example ​

ts
const state = createState(config);
state.intents.upgrade.alpha; // 0.5 for prior 0.05 × priorStrength 10
JSON.stringify(state) === serialize(state); // true

Properties ​

PropertyTypeDescriptionDefined in
configEngineConfigSnapshot of the config this state was built with. Pass your current config to deserialize on load.types.ts:227
episodeEpisodeState-types.ts:229
intentsRecord<string, IntentState>-types.ts:228
version3-types.ts:225

Released under the MIT License.