Document engine
AI / Intelligence
Providers emit ChangeProposals — validate, rebase if needed, accept explicitly.
AI in Lextrix emits proposals. It does not write into the Document or the editor DOM directly.
Provider → ChangeProposal → your validation → accept → Document → Versionlextrix-intelligence depends only on lextrix-change. Deterministic providers ship in the package; OpenAI is optional (lextrix-intelligence/openai).
Typical flow: create a proposal against a base Version, inspect whether it is stale, review it in your app if you want, rebase if HEAD moved, then accept or reject. Metadata like model name or confidence is for your logs — it does not unlock accept.
editor.acceptProposalAndProject(proposal); // experimentalDo not pipe model output into updateContents or blot APIs. Put it in a proposal first.