diff --git a/packages/chess/src/engine.ts b/packages/chess/src/engine.ts index 0f2ef45..fc7e8be 100644 --- a/packages/chess/src/engine.ts +++ b/packages/chess/src/engine.ts @@ -259,13 +259,14 @@ class PresetStateImpl> } set(key: K, value: T[K]): void { - // The rete session validates that `value` is a legal FactValue - // (string | number | boolean | null). Passing objects here will - // throw — a deliberate constraint to keep facts serialization-safe. + // `FactValue` is `unknown` in the rete package, so any `T[K]` + // assigns directly. Runtime serialization guarantees (the value + // round-trips through JSON in event-log replay) are the caller's + // responsibility. this.#session.insert( PRESET_STATE_ENTITY, this.#attrOf(key as string), - value as unknown as import("@paratype/rete").FactValue, + value, ); }