LaTeX diagnostic contract (D38) — the one shape the typesetting
engine, the compile route and the editor UI all agree on. Lives in shared
(not in packages/typeset) because it crosses the wire: the engine produces
these, the API serialises them, apps/web renders them (D11).
Everything here is JSON-serialisable by construction — no Dates, no Maps, no
classes — so a diagnostic survives JSON.stringify on the way out of the
compile job and JSON.parse on the way into the editor unchanged.
LaTeX diagnostic contract (D38) — the one shape the typesetting engine, the compile route and the editor UI all agree on. Lives in shared (not in
packages/typeset) because it crosses the wire: the engine produces these, the API serialises them, apps/web renders them (D11).Everything here is JSON-serialisable by construction — no Dates, no Maps, no classes — so a diagnostic survives
JSON.stringifyon the way out of the compile job andJSON.parseon the way into the editor unchanged.