Skip to content

Engine

Snapshots are immutable and reusable; the engine owns their representation.

Snapshot = unknown

apply(envelope): void

Applies text edits and atomic effect states, retaining provenance in snapshots.

Envelope

void


author(edit, context): Envelope

Author against the current projection, reserve IDs once, and leave text unchanged.

OffsetEdit

AuthorContext

Envelope


changesBetween(snapshot): readonly EffectiveEdit[]

Snapshot

readonly EffectiveEdit[]


characters(): readonly CharacterIdentity[]

Diagnostic inventory sorted by bunch/counter; hidden IDs retain their visible gap.

readonly CharacterIdentity[]


projectEffects(effects): Snapshot

A local review snapshot with selected effect states; the live engine and log stay unchanged.

readonly Effect[]

Snapshot


restore(snapshot): void

Snapshot

void


snapshot(): Snapshot

Snapshot


text(): string

string